mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-03-09 01:30:10 +08:00
Merge branch 'LCTT:master' into master
This commit is contained in:
commit
018c829d1e
125
published/20210602 New ways to learn about open organizations.md
Normal file
125
published/20210602 New ways to learn about open organizations.md
Normal file
@ -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)
|
||||
|
||||
了解开放组织的新途径
|
||||
======
|
||||
|
||||
> 通过参与两个令人兴奋的新项目来庆祝开放组织社区的六周年。
|
||||
|
||||

|
||||
|
||||
2021 年 6 月 2 日,<ruby>开放组织<rt>Open Organization</rt></ruby>社区庆祝其成立六周年。这是六年来([上百篇的][2])文章、([一系列的][3])书籍、([具有启发性的][4])对话、(我们所 [喜欢的][5])教学和学习。我们非常自豪地成为一个充满活力的开放专家和领导者的社区,致力于将 [开放原则][6] 带到大大小小的组织。事实上,许多 <ruby>[开放组织大使][7]<rt>Open Organization Ambassadors</rt></ruby> 以帮助他人变得更加开放为职业,我们的社区仍然致力于帮助各行业的领导者以开放的心态和行为融入他们的社区和环境中。
|
||||
|
||||
[去年][8] 是开放组织项目的一个 [成长][9] 和 [发展][10] 时期。今年,我们将在这一势头的基础上继续努力。今天,我们很自豪地介绍两项新的倡议——当然,也邀请你的参加。
|
||||
|
||||
### 开启,调整,开放
|
||||
|
||||
首先,我们很高兴地宣布:我们社区的工作有了一个全新的场所。[OpenOrgTV][11]。这不仅仅是一个新的平台。它也是另一种媒介的实验:视频。
|
||||
|
||||
在我们的频道上,我们将举办各种对话 —— 从深层次的书评到社区圆桌会议。首先,请查看“<ruby>[开放领导力对话][12]<rt>Open Leadership Conversations</rt></ruby>”系列,其中包括对某些富有洞察力的领导者的采访,提供他们对根据开放原则进行领导的意义的观点。或者观看我们的 Q&A 式写作节目 “<ruby>[问大使][13]<rt>Ask the Ambassadors</rt></ruby>”,由社区专家回答你关于组织文化和设计的问题。也想参与这个节目吗?在我们的 [新的专门的论坛][14] 中向社区成员提交你的问题。
|
||||
|
||||
整个月,我们都会介绍 <ruby>[开放组织大使][15]<rt>Open Organization Ambassadors</rt></ruby>,让你终于可以看到他们的面孔,并听到你多年来阅读的故事、案例研究和采访背后的声音。
|
||||
|
||||
### 定义开放领导力
|
||||
|
||||
自从我们几年前发布它以来,<ruby>[开放组织定义][16]<rt>Open Organization Definition</rt></ruby> 已成为更好地理解开放组织文化和设计本质的组织指导框架(并且我们已经做了很多工作来 [教导其他人][17])。随着时间的推移,我们甚至开发了 [一个成熟度模型][18] 来操作该定义,因此组织可以评估自己的开放程度并制定具体计划以变得 _更加_ 开放。
|
||||
|
||||
现在,我们认为是时候将这项工作更进一步了。
|
||||
|
||||
但是,开放组织社区不仅仅是平台、工具或项目的任何组合。它是所有人都热情地一起工作,以帮助传播开放原则和实践。
|
||||
|
||||
受我们自己经验、[红帽][19] 和 [Mozilla][20] 等开放组织已有的框架、多年研究和采访该领域的开放领袖的启发,以及我们对更好地理解开放领导力如何 _真正_ 发挥作用的渴望,我们很高兴公布一份全新文件的早期草案:<ruby>开放领导力定义<rt>Open Leadership Definition</rt></ruby>。
|
||||
|
||||
本文档概述了建立开放型组织,并使其成为思想开放的人能够成长和茁壮成长的地方的各类领导者所特有的心态和行为。它建立在<ruby>开放领导力定义<rt>Open Leadership Definition</rt></ruby>的基础上,解释了开放型领导者如何体现和倡导开放型组织的特征,如透明度、包容性、适应性、协作性和社区性。
|
||||
|
||||
而且我们渴望与世界分享。
|
||||
|
||||
从今天开始(在接下来的两周内),我们将收集你对我们文件草案的见解和意见。我们渴望听到你的想法,并将接受你的意见的 _整体_ 或片段。你可以对文件的个别部分或整个文件提出意见。请查看下面的链接。我们期待着听到你的意见。
|
||||
|
||||
![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
|
@ -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 的优势和劣势
|
||||
======
|
||||
|
||||

|
||||
|
||||
Linux 是一个流行词,你到处都能听到与 Linux 相关的内容。人们在技术论坛上讨论它、Linux 是课程中的一部分;你最喜欢的 YouTube 技术主播在兴奋地展示构建他们的 Linux 内核;你在 Twitter 上关注的 <ruby>10 倍效率开发者<rt>10x developers</rt></ruby>都是 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/
|
@ -3,23 +3,24 @@
|
||||
[#]: author: "Alan Formy-Duval https://opensource.com/users/alanfdoss"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "Donkey-Hao"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-15130-1.html"
|
||||
|
||||
我在 Linux 中使用的 5 个 Git 配置
|
||||
======
|
||||
这份简要指南能够帮助你快速开始使用 Git,以及配置一些选项。
|
||||
|
||||
![Linux keys on the keyboard for a desktop computer][1]
|
||||
> 这份简要指南能够帮助你快速开始使用 Git,以及配置一些选项。
|
||||
|
||||

|
||||
|
||||
在 Linux 中设置 Git 十分简单,但为了获得完美的配置,我做了以下五件事:
|
||||
|
||||
1. [创建全局配置][2]
|
||||
2. [设置默认名称][3]
|
||||
3. [设置默认邮箱地址][4]
|
||||
4. [设置默认分支名称][5]
|
||||
5. [设置默认编辑器][6]
|
||||
1. 创建全局配置
|
||||
2. 设置默认名称
|
||||
3. 设置默认邮箱地址
|
||||
4. 设置默认分支名称
|
||||
5. 设置默认编辑器
|
||||
|
||||
我使用 Git 管理我的代码、命令行脚本以及文档版本。这意味着每次我开始一项新的任务,首先我需要创建一个文件目录并将其添加到 Git 库中:
|
||||
|
||||
@ -38,9 +39,9 @@ $ git config user.email alan@opensource.com
|
||||
fatal: not in a git directory
|
||||
```
|
||||
|
||||
此外,当这个命令在 Git 仓库中运行时,它只会配置特定的一个。在新的仓库中,你不得不重复这个步骤。我可以通过全局配置来避免重复。选项 *--global* 会指示 Git 将邮箱地址写入全局配置 `~/.gitconfig` 文件中,甚至在必要时会创建它:
|
||||
此外,当这个命令在 Git 仓库中运行时,它只会配置特定的一个仓库。在新的仓库中,你不得不重复这个步骤。我可以通过全局配置来避免重复。选项 `--global` 会指示 Git 将邮箱地址写入全局配置 `~/.gitconfig` 文件中,甚至在必要时会创建它:
|
||||
|
||||
> 请记住,波浪线(~) 代表你的 `home` 文件夹。在我的电脑中它是 `/home/alan`。
|
||||
> 请记住,波浪线(`~`)代表你的主文件夹。在我的电脑中它是 `/home/alan`。
|
||||
|
||||
```
|
||||
$ git config --global user.email alan@opensource.com
|
||||
@ -51,7 +52,7 @@ $ cat ~/.gitconfig
|
||||
|
||||
这里的缺点是,如果你有大量偏好设置,需要输入很多命令,这将花费大量时间并且很容易出错。Git 提供了更加快捷有效的方式,可以直接编辑你的全局配置文件——这是我列表中的第一项!
|
||||
|
||||
### 1. 创建全局配置
|
||||
### 1、创建全局配置
|
||||
|
||||
如果你刚开始使用 Git,或许你还没有该文件。不用担心,让我们直接开始。只需要用 `--edit` 选项:
|
||||
|
||||
@ -75,15 +76,15 @@ $ git config --global --edit
|
||||
|
||||
现在我们已经打开了编辑器,并且 Git 已经在后台创建了全局配置文件,我们可以继续接下来的设置。
|
||||
|
||||
### 2. 设置默认名称
|
||||
### 2、设置默认名称
|
||||
|
||||
名称是该文件中的首要条目,让我们先从它开始。用命令行设置我的名称是 `git config --global user.name "Alan Formy-Duval"`。只需要在配置文件中编辑 *name* 条目就行,而不是在命令行中运行命令:
|
||||
名字是该文件中的首要条目,让我们先从它开始。用命令行设置我的名称是 `git config --global user.name "Alan Formy-Duval"`。不用在命令行中运行该命令,只需要在配置文件中编辑 `name` 条目就行:
|
||||
|
||||
```
|
||||
name = Alan Formy-Duval
|
||||
```
|
||||
|
||||
### 3. 设置默认邮箱地址
|
||||
### 3、设置默认邮箱地址
|
||||
|
||||
邮箱地址是第二个条目,让我们添加它。默认情况下,Git 使用你的系统提供的名称和邮箱地址。如果不正确或者你想要更改,你可以在配置文件中具体说明。事实上,如果你没有配置这些,Git 在你第一次提交时会友好的提示你:
|
||||
|
||||
@ -93,18 +94,17 @@ 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"][7]** 会设置好我的邮箱。同样,我们在配置文件中编辑 *email* 条目,提供你的邮箱地址:
|
||||
在命令行中运行 `git config --global user.email "alan@opensource.com"` 会设置好我的邮箱。同样,我们在配置文件中编辑 `email` 条目,提供你的邮箱地址:
|
||||
|
||||
```
|
||||
email = alan@opensource.com
|
||||
```
|
||||
|
||||
|
||||
我喜欢设置的最后两个设置是默认分支名称和默认编辑器。当你仍在编辑器中时,需要添加这些指令。
|
||||
|
||||
### 4. 设置默认分支名称
|
||||
### 4、设置默认分支名称
|
||||
|
||||
目前有一种趋势,即不再使用 *master* 作为默认分支名称。事实上,在新存储库初始化时,Git 将通过友好的消息提示更改默认分支名称:
|
||||
目前有一种趋势,即不再使用 `master` 作为默认分支名称。事实上,在新存储库初始化时,Git 将通过友好的消息提示更改默认分支名称:
|
||||
|
||||
```
|
||||
$ git init
|
||||
@ -115,23 +115,23 @@ hint:
|
||||
hint: git config --global init.defaultBranch <name>
|
||||
```
|
||||
|
||||
这个名为 *defaultBranch* 的指令需要位于一个名为 *init* 的新部分中。现在普遍接受的是,许多程序员使用 *main* 这个词作为他们的默认分支。这是我喜欢使用的。将此部分后跟指令添加到配置中:
|
||||
这个名为 `defaultBranch` 的指令需要位于一个名为 `init` 的新部分中。现在普遍接受的是,许多程序员使用 `main` 这个词作为他们的默认分支。这是我喜欢使用的。将此部分后跟指令添加到配置中:
|
||||
|
||||
```
|
||||
[init]
|
||||
defaultBranch = main
|
||||
```
|
||||
|
||||
### 5. 设置默认编辑器
|
||||
### 5、设置默认编辑器
|
||||
|
||||
第五个设置是,设置默认的编辑器。这是指 Git 将使用的编辑器,用于在你每次将更改提交到存储库时输入你的提交消息。不论是 [nano][8]、[emacs][9]、[vi][10] 还是其他编辑器,每个人都有他喜欢的。我喜欢用 vi。添加 *core* 部分,并设置 *editor* 指令为你喜欢的编辑器。
|
||||
第五个设置是设置默认的编辑器。这是指 Git 将使用的编辑器,用于在你每次将更改提交到存储库时输入你的提交消息。不论是 [nano][8]、[emacs][9]、[vi][10] 还是其他编辑器,每个人都有他喜欢的。我喜欢用 vi。添加 `core` 部分,并设置 `editor` 指令为你喜欢的编辑器。
|
||||
|
||||
```
|
||||
[core]
|
||||
editor = vi
|
||||
```
|
||||
|
||||
这是最后一项。退出编辑器。Git 在 *home* 目录下保存全局配置文件。如果你再次运行编辑命令,将会看到所有内容。要知道。配置文件是明文存储的文本文件,因此它可以很容易使用文本工具查看,如 [cat][11] 命令。这是我的配置文件内容:
|
||||
这是最后一项。退出编辑器。Git 在主目录下保存全局配置文件。如果你再次运行编辑命令,将会看到所有内容。注意配置文件是明文存储的文本文件,因此它可以很容易使用文本工具查看,如 [cat][11] 命令。这是我的配置文件内容:
|
||||
|
||||
```
|
||||
$ cat ~/.gitconfig
|
||||
@ -144,6 +144,8 @@ $ cat ~/.gitconfig
|
||||
defaultBranch = main
|
||||
```
|
||||
|
||||
这是一个简单的指南,可以让你快速开始使用 Git 和它的一些配置选项。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/9/git-configuration-linux
|
||||
@ -151,7 +153,7 @@ via: https://opensource.com/article/22/9/git-configuration-linux
|
||||
作者:[Alan Formy-Duval][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[Donkey-Hao](https://github.com/Donkey-Hao)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
@ -3,25 +3,28 @@
|
||||
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "chai001125"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-15132-1.html"
|
||||
|
||||
使用 PostgreSQL 建立你的数据库
|
||||
======
|
||||
Postgres 是最灵活的数据库之一,并且它是开源的。
|
||||
|
||||
数据库是一种有组织性且灵活地存储信息的工具。电子表格在本质上就是一个数据库,但是图形化应用程序这一限制使得大多数的电子表格应用程序对程序员毫无用处。随着 [边缘计算][3] 和物联网设备成为重要的平台,开发者们需要更有效且轻量级的方法,来存储、处理、查询大量的数据。我最爱的一种结合是使用 [Lua 连接][4] PostgreSQL 数据库。无论你使用什么编程语言,Postgres 一定是数据库的绝佳选择,但是在使用 Postgres 之前,首先你需要知道一些基本的东西。
|
||||

|
||||
|
||||
### 安装 Postgres
|
||||
> PostgreSQL 是最灵活的数据库之一,并且它是开源的。
|
||||
|
||||
在 linux 上安装 PostgreSQL,要使用你的软件库。在 Fedora,CentOS,Megeia 等类似的 linux 版本上使用命令:
|
||||
数据库是以一种有组织且灵活的方式存储信息的工具。电子表格在本质上就是一个数据库,但是图形化应用程序这一限制使得大多数的电子表格应用程序对程序员毫无用处。随着 [边缘计算][3] 和物联网设备成为重要的平台,开发者们需要更有效且轻量级的方法,来存储、处理、查询大量的数据。我最爱的一种组合是使用 [Lua 连接][4] PostgreSQL 数据库。无论你使用什么编程语言,PostgreSQL 一定是数据库的绝佳选择,但是在使用 PostgreSQL 之前,首先你需要知道一些基本的东西。
|
||||
|
||||
### 安装 PostgreSQL
|
||||
|
||||
在 Linux 上安装 PostgreSQL,要使用你的软件库。在 Fedora,CentOS,Megeia 等类似的 Linux 版本上使用命令:
|
||||
|
||||
```
|
||||
$ sudo dnf install postgresql postgresql-server
|
||||
```
|
||||
|
||||
在 Debian, Linux Mint, Elementary 等类似的 linux 版本上使用命令:
|
||||
在 Debian, Linux Mint, Elementary 等类似的 Linux 版本上使用命令:
|
||||
|
||||
```
|
||||
$ sudo apt install postgresql postgresql-contrib
|
||||
@ -29,14 +32,13 @@ $ sudo apt install postgresql postgresql-contrib
|
||||
|
||||
在 macOs 和 Windows 上,可以从官网 [postgresql.org][5] 下载安装包。
|
||||
|
||||
### 配置 Postgres
|
||||
### 配置 PostgreSQL
|
||||
|
||||
Most distributions install the Postgres database without *starting* it, but provide you with a script or [systemd service][6] to help it start reliably. However, before you start PostgreSQL, you must create a database cluster.
|
||||
大多数发行版安装 Postgres 数据库时没有启动它,但是为你提供了一个脚本或 [systemd 服务][6],能够可靠地启动 Postgres。但是,在启动 PostgreSQL 之前,必须创建一个数据库集群。
|
||||
大多数发行版安装 PostgreSQL 数据库时没有启动它,但是为你提供了一个脚本或 [systemd 服务][6],能够可靠地启动 PostgreSQL。但是,在启动 PostgreSQL 之前,必须创建一个数据库集群。
|
||||
|
||||
#### Fedora
|
||||
|
||||
在 Fedora,CentOS 等类似的版本上,Postgres 安装包中提供了一个 Postgres 配置脚本。运行这个脚本,可以进行简单地配置:
|
||||
在 Fedora,CentOS 等类似的版本上,PostgreSQL 安装包中提供了一个 PostgreSQL 配置脚本。运行这个脚本,可以进行简单地配置:
|
||||
|
||||
```
|
||||
$ sudo /usr/bin/postgresql-setup --initdb
|
||||
@ -51,7 +53,7 @@ $ sudo /usr/bin/postgresql-setup --initdb
|
||||
|
||||
#### 其他版本
|
||||
|
||||
最后,如果你是在其他版本上运行的,那么你可以直接使用 Postgres 提供的一些工具。`initdb` 命令会创建一个数据库集群,但是这个命令必须在 `postgres` 用户下运行,你可以使用 `sudo` 来暂时地成为 `postgres` 用户:
|
||||
最后,如果你是在其他版本上运行的,那么你可以直接使用 PostgreSQL 提供的一些工具。`initdb` 命令会创建一个数据库集群,但是这个命令必须在 `postgres` 用户下运行,你可以使用 `sudo` 来暂时地成为 `postgres` 用户:
|
||||
|
||||
```
|
||||
$ sudo -u postgres \
|
||||
@ -59,9 +61,9 @@ $ sudo -u postgres \
|
||||
--locale en_US.UTF-8 --auth md5 --pwprompt"
|
||||
```
|
||||
|
||||
### 运行 Postgres
|
||||
### 运行 PostgreSQL
|
||||
|
||||
现在,数据库集群已经存在了,使用 `initdb` 的输出中提供给你的命令或者使用 systemd 启动 Postgres 服务器:
|
||||
现在,数据库集群已经存在了,使用 `initdb` 的输出中提供给你的命令或者使用 systemd 启动 PostgreSQL 服务器:
|
||||
|
||||
```
|
||||
$ sudo systemctl start postgresql
|
||||
@ -99,15 +101,16 @@ Type "help" for help.
|
||||
exampledb=>
|
||||
```
|
||||
|
||||
### 创建一个表
|
||||
#### 创建一个表
|
||||
|
||||
数据库包含很多表。这些表可以可视化为表格,有很多行(在数据库中称为 *记录*)和很多列。行和列的交集称为 *字段*。
|
||||
|
||||
结构化查询语言(SQL)是以它提供的内容而命名的,它能提供可预测且一致的语法,来查询数据库内容,从而收到有用的结果。
|
||||
|
||||
目前,你的数据库是空的,没有任何的表。你可以用 `CTEATE` 语句来创建一个表。结合使用 `IF NOT EXISTS` 是很有用的,它可以避免破坏现有的表。
|
||||
目前,你的数据库是空的,没有任何的表。你可以用 `CREATE` 语句来创建一个表。结合使用 `IF NOT EXISTS` 是很有用的,它可以避免破坏现有的表。
|
||||
|
||||
在你创建一个表之前,想想看你希望这个表包含哪一种数据(在 SQL 术语中称为“数据类型”)。在这个例子中,我创建了一个表,包含两列,有唯一标识符的一列和最多九个字符的可变长的一列。
|
||||
|
||||
```
|
||||
exampledb=> CREATE TABLE IF NOT EXISTS my_sample_table(
|
||||
exampledb(> id SERIAL,
|
||||
@ -117,7 +120,7 @@ exampledb(> wordlist VARCHAR(9) NOT NULL
|
||||
|
||||
关键字 `SERIAL` 并不是一个数据类型。`SERIAL` 是 [PostgreSQL 中的一个特殊的标记][7],它可以创建一个自动递增的整数字段。关键字 `VARCHAR` 是一个数据类型,表示限制内字符数的可变字符。在此例中,我指定了最多 9 个字符。PostgreSQL 中有很多数据类型,因此请参阅项目文档以获取选项列表。
|
||||
|
||||
### 插入数据
|
||||
#### 插入数据
|
||||
|
||||
你可以使用 `INSERT` 语句来给你的新表插入一些样本数据:
|
||||
|
||||
@ -133,7 +136,7 @@ exampledb=> INSERT INTO my_sample_table (WORDLIST) VALUES ('Alexandria');
|
||||
ERROR: VALUE too long FOR TYPE CHARACTER VARYING(9)
|
||||
```
|
||||
|
||||
### 改变表或者列
|
||||
#### 改变表或者列
|
||||
|
||||
当你需要改变一个域的定义时,你可以使用 `ALTER` 这一 SQL 关键字。例如,如果你想改变 `wordlist` 域中最多只能有 9 个字符的限制,你可以重新设置这个数据类型。
|
||||
|
||||
@ -145,20 +148,21 @@ exampledb=> INSERT INTO my_sample_table (WORDLIST) VALUES ('Alexandria');
|
||||
INSERT 0 1
|
||||
```
|
||||
|
||||
### 查询表中的内容
|
||||
#### 查询表中的内容
|
||||
|
||||
SQL 是一种查询语言,因此你可以通过查询来查看数据库的内容。查询可以是很简单的,也可以涉及连接多个不同表之间的复杂关系。要查看表中的所有内容,请使用 `SELECT` 关键字和 `*`(`*` 是通配符):
|
||||
|
||||
SQL 是一种查询语言,因此你可以通过查询来查看数据库的内容。查询可以是很简单的,也可以涉及连接多个不同表之间的复杂关系。要查看表中的所有内容,请使用 `*` 上的 `SELECT` 关键字(`*` 是通配符):
|
||||
```
|
||||
exampledb=> SELECT * FROM my_sample_table;
|
||||
id | wordlist
|
||||
\----+------------
|
||||
----+------------
|
||||
1 | Alice
|
||||
2 | Bob
|
||||
3 | Alexandria
|
||||
(3 ROWS)
|
||||
```
|
||||
|
||||
### 更多信息
|
||||
### 更多数据
|
||||
|
||||
PostgreSQL 可以处理很多数据,但是对于任何数据库来说,关键之处在于你是如何设计你的数据库的,以及数据存储下来之后你是怎么查询数据的。在 [OECD.org][8] 上可以找到一个相对较大的公共数据集,你可以使用它来尝试一些先进的数据库技术。
|
||||
|
||||
@ -166,7 +170,7 @@ PostgreSQL 可以处理很多数据,但是对于任何数据库来说,关键
|
||||
|
||||
在文本编辑器或电子表格应用程序中浏览数据,来了解有哪些列,以及每列包含哪些类型的数据。仔细查看数据,并留意错误情况。例如,`COU` 列指的是国家代码,例如 `AUS` 表示澳大利亚和 `GRC` 表示希腊,在奇怪的 `BRIICS` 之前,这一列的值通常是 3 个字符。
|
||||
|
||||
在你理解了这些数据项后,你就可以准备一个 Postgres 数据库了。
|
||||
在你理解了这些数据项后,你就可以准备一个 PostgreSQL 数据库了。
|
||||
|
||||
```
|
||||
$ createdb landcoverdb --owner bogus
|
||||
@ -195,20 +199,20 @@ 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
|
||||
```
|
||||
|
||||
That's 22,113 records imported. Seems like a good start!
|
||||
插入了 22113 条记录。这是一个很好的开始!
|
||||
|
||||
### 查询数据
|
||||
#### 查询数据
|
||||
|
||||
用 `SELECT` 语句可以查询这 22113 条记录的所有列,此外 Postgres 将输出通过管道传输到屏幕上,因此你可以轻松地滚动鼠标来查看输出的结果。更进一步,你可以使用高级SQL,来获得一些有用的视图。
|
||||
用 `SELECT` 语句可以查询这 22113 条记录的所有列,此外 PostgreSQL 将输出通过管道传输到屏幕上,因此你可以轻松地滚动鼠标来查看输出的结果。更进一步,你可以使用高级 SQL 语句,来获得一些有用的视图。
|
||||
|
||||
```
|
||||
landcoverdb=> SELECT
|
||||
@ -240,11 +244,10 @@ ORDER BY country_name,
|
||||
year_value;
|
||||
```
|
||||
|
||||
Here's some sample output:
|
||||
下面是样例的一些输出:
|
||||
|
||||
```
|
||||
\---------------+------------+------------
|
||||
---------------+------------+------------
|
||||
Afghanistan | 2019 | 743.48425
|
||||
Albania | 2019 | 128.82532
|
||||
Algeria | 2019 | 2417.3281
|
||||
@ -260,7 +263,7 @@ SQL 是一种很丰富的语言,超出了本文的讨论范围。通读 SQL
|
||||
|
||||
### 拓展数据库
|
||||
|
||||
PostgreSQL 是伟大的开源数据库之一。有了它,你可以为结构化数据设计存储库,然后使用 SQL 以不同的方式查询它,以便能够获得有关该数据的新视角。Postgres 也能与许多语言集成,包括Python,Lua,Groovy,Java等,因此无论你使用什么工具集,你都可以充分利用好这个出色的数据库。
|
||||
PostgreSQL 是伟大的开源数据库之一。有了它,你可以为结构化数据设计存储库,然后使用 SQL 以不同的方式查询它,以便能够获得有关该数据的新视角。PostgreSQL 也能与许多语言集成,包括 Python、Lua、Groovy、Java 等,因此无论你使用什么工具集,你都可以充分利用好这个出色的数据库。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
@ -269,7 +272,7 @@ via: https://opensource.com/article/22/9/drop-your-database-for-postgresql
|
||||
作者:[Seth Kenlon][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[chai001125](https://github.com/chai001125)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
@ -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 中设置互联网
|
||||
======
|
||||
|
||||

|
||||
|
||||
> 在最小安装的服务器中设置互联网或网络非常容易。本指南将解释如何在最小安装的 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 窗口中的“<ruby>编辑连接<rt>Edit a connection</rt></ruby>”。
|
||||
|
||||
![nmtui - 选择选项][3]
|
||||
|
||||
选择接口名称
|
||||
|
||||
![选择要编辑的接口][4]
|
||||
|
||||
在“<ruby>编辑连接<rt>Edit Connection</rt></ruby>”窗口中,为 IPv4 和 IPv6 选择“<ruby>自动<rt>Automatic</rt></ruby>”选项。并选择“<ruby>自动连接<rt>Automatically Connect</rt></ruby>”。完成后按 “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
|
@ -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 在网站发生变化或更新时获得提醒。
|
||||
|
||||

|
||||
|
||||
那一年是 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`)中访问该应用。如果你的电脑可以从外部网络访问,你可以在 <ruby>设置<rt>Settings</rt></ruby>中设置一个密码。
|
||||
|
||||
![change detection watch list][11]
|
||||
|
||||
提交你想监控的页面的 URL。有几个与如何过滤该网页有关的设置。例如,你很可能不想知道一家公司在其网站页脚列出的股票价格何时发生变化,但你可能想知道他们在其博客上发布的新闻文章。
|
||||
|
||||
### 监控一个网站
|
||||
|
||||
想象一下,你想添加你最喜欢的网站 Opensource.com 进行监控。你只想知道主要标注文章何时包含 “python” 一词,并且通过 Matrix 收到通知。
|
||||
|
||||
要做到这点,首先要使用“<ruby>视觉选择器<rt>Visual Filter Selector</rt></ruby>”工具。(这需要连接 **playwright** 浏览器界面)。
|
||||
|
||||
![Find an element to monitor][12]
|
||||
|
||||
该工具会自动计算出针对内容的最佳 Xpath 或 CSS 过滤器。否则,你会从每天的页面更新中得到大量的噪音。
|
||||
|
||||
接下来,访问“<ruby>过滤器和触发器<rt>Filters & Triggers</rt></ruby>”标签。
|
||||
|
||||
![Filters and triggers][13]
|
||||
|
||||
在 “<ruby>CSS/JSON/XPATH 过滤器<rt>CSS/JSON/XPATH Filter</rt></ruby>”区域(蓝色圆圈),你可以看到上一步自动生成的 CSS 过滤器。
|
||||
|
||||
有几个有用的过滤器,比如“<ruby>移除元素<rt>Remove elements</rt></ruby>”(适合移除嘈杂的元素)、“<ruby>忽略文本<rt>Ignore text</rt></ruby>”、“<ruby>触发/等待文本<rt>Trigger/wait for text</rt></ruby>”,和“<ruby>如果文本匹配则阻止变化检测<rt>Block change-detection if text matches</rt></ruby>”(用于等待一些文本消失,如“售罄”)。
|
||||
|
||||
在“<ruby>触发/等待文本<rt>Trigger/wait for text</rt></ruby>”(红色圆圈)中,输入你想监测的关键词。(在这个例子中是 “python”)。
|
||||
|
||||
最后一步是在“<ruby>通知<rt>Notifications</rt></ruby>”选项卡中,你要在那里配置你想收到的通知。下面我使用 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
|
@ -3,19 +3,22 @@
|
||||
[#]: author: "Abhishek Prakash https://itsfoss.com/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-15137-1.html"
|
||||
|
||||
如何在 Brave 浏览器中使用画中画模式
|
||||
======
|
||||
Brave 是一款出色的类似于 Chrome, 但可[替代 Chrome 的网络浏览器][1]。
|
||||
|
||||

|
||||
|
||||
> Brave 是一款出色的类似于 Chrome,但可 [替代 Chrome 的网络浏览器][1]。
|
||||
|
||||
[Firefox 和 Brave][2] 是我喜欢在 Linux 系统上使用的两种浏览器。两者都有不同的优势。
|
||||
|
||||
Firefox 比 Brave 做得更好的一件事就是画中画 (PIP) 模式,它适用于 YouTube、Netflix 和大多数流媒体网站。
|
||||
Firefox 比 Brave 做得更好的一件事就是画中画(PIP)模式,它适用于 YouTube、Netflix 和大多数流媒体网站。
|
||||
|
||||
Brave 也有画中画模式,但它是如此隐藏,以至于你觉得根本没有 PIP 支持。
|
||||
Brave 也有画中画模式,但它是如此隐藏,以至于你觉得它根本没有 PIP 支持。
|
||||
|
||||
内置画中画适用于某些网站(如 YouTube),但可能不适用于其他网站(如 Prime Video)。不用担心!你可以为此使用专用扩展。
|
||||
|
||||
@ -29,7 +32,7 @@ Brave 也有画中画模式,但它是如此隐藏,以至于你觉得根本
|
||||
|
||||
![第一次右键单击后将光标从上下文菜单稍微移开][3]
|
||||
|
||||
再次右键单击。它应该在视频上,但不在上一个上下文菜单上。就在视频的其他地方。
|
||||
再次右键单击。它应该在视频上,但不在上一个上下文菜单上,而在视频的其他地方。
|
||||
|
||||
现在你应该看到另一个带有画中画选项的上下文菜单。
|
||||
|
||||
@ -43,7 +46,7 @@ Brave 也有画中画模式,但它是如此隐藏,以至于你觉得根本
|
||||
|
||||
![Brave 在画中画模式中播放影片][6]
|
||||
|
||||
在最近的 Brave 版本中,您可以根据自己的喜好调整弹出窗口的大小。
|
||||
在最近的 Brave 版本中,你可以根据自己的喜好调整弹出窗口的大小。
|
||||
|
||||
我不明白为什么 Brave 把它隐藏成这样。为什么不突出它?
|
||||
|
||||
@ -51,11 +54,11 @@ Brave 也有画中画模式,但它是如此隐藏,以至于你觉得根本
|
||||
|
||||
### 方法 2:使用画中画扩展
|
||||
|
||||
Google 提供了一个官方插件,可让你在 Google Chrome 中获得画中画功能。由于 Brave 基于 Chromium,你可以在 Brave 中使用相同的扩展。
|
||||
谷歌提供了一个官方插件,可让你在谷歌 Chrome 中获得画中画功能。由于 Brave 基于 Chromium,你可以在 Brave 中使用相同的扩展。
|
||||
|
||||
[画中画扩展][7]
|
||||
> **[画中画扩展][7]**
|
||||
|
||||
进入扩展页面并**点击 Add to Brave 按钮**。
|
||||
进入扩展页面并点击 “<ruby>添加到 Brave<rt>Add to Brave</rt></ruby>” 按钮。
|
||||
|
||||
![为 Brave 添加画中画扩展][8]
|
||||
|
||||
@ -67,7 +70,7 @@ Google 提供了一个官方插件,可让你在 Google Chrome 中获得画中
|
||||
|
||||
![使用画中画扩展][10]
|
||||
|
||||
播放视频时,单击扩展名,视频应该会弹出。
|
||||
播放视频时,单击该扩展图标,视频应该会弹出。
|
||||
|
||||
### 你能在 Brave 中启用 PIP 模式吗?
|
||||
|
||||
@ -82,7 +85,7 @@ via: https://itsfoss.com/picture-in-picture-brave/
|
||||
作者:[Abhishek Prakash][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
@ -90,7 +93,7 @@ via: https://itsfoss.com/picture-in-picture-brave/
|
||||
[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.png
|
||||
[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
|
@ -3,23 +3,26 @@
|
||||
[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "KevinZonda"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-15128-1.html"
|
||||
|
||||
谷歌 AI 推出新的阵列存储开源库
|
||||
谷歌 AI 推出新的数组存储开源库
|
||||
======
|
||||
*TensorStore,一个用于阵列存储的高性能开源库,已被谷歌 AI 创造。*
|
||||
|
||||
谷歌开发的开源 C++ 和 Python 框架 TensorStore 旨在加速读写大型多维数组的设计。覆盖单个大型坐标系的多维数据集通常用于当代计算机科学和机器学习应用程序中。使用这些数据集具有挑战性,因为客户经常希望进行涉及多个工作站并行操作的调查,并且可能会以不可预测的间隔和不同的规模接收和输出数据。
|
||||

|
||||
|
||||
谷歌研究院开发了 TensorStore,这是一个为用户提供 API 访问权限的库,该 API 无需复杂的硬件即可管理庞大的数据集,以解决数据存储和操作问题。该库支持许多存储系统,包括本地和网络文件系统、Google Cloud Storage 等。
|
||||
> 谷歌 AI 引入了一个用于数组存储的高性能开源库 TensorStore。
|
||||
|
||||
为了加载和处理大量数据,TensorStore 提供了一个简单的 Python API。任何大型基础数据集都可以加载和更新,而无需将完整的数据集存储在内存中,因为在需要精确切片之前不会读取或保存实际数据。
|
||||
谷歌开发的开源 C++ 和 Python 框架 TensorStore 旨在加速大型多维数组的读写设计。覆盖单一大型坐标系的多维数据集通常用于当代计算机科学和机器学习应用程序中。使用这些数据集具有挑战性,因为客户经常希望进行涉及多个工作站并行操作的调查,并且可能会以不可预测的间隔和不同的规模接收和输出数据。
|
||||
|
||||
这是通过索引和操作语法实现的,这与用于 NumPy 操作的语法非常相似。除了虚拟视图、广播、对齐和其他复杂的索引功能,TensorStore 还支持,如数据类型转换、降低取样和随意创建的数组这些功能。
|
||||
谷歌研究院开发了 TensorStore,该库为用户提供了一个可以管理巨大数据集的 API,而无需复杂的硬件,以解决数据存储和操作问题。该库支持许多存储系统,包括本地和网络文件系统、谷歌云存储等。
|
||||
|
||||
此外,TensorStore 包含一个异步 API,可以同时进行读取或写入操作。在执行其他工作时,软件可以执行可配置的内存缓存,从而减少在访问常用数据时处理较慢存储系统的需要。
|
||||
为了加载和处理大量数据,TensorStore 提供了一个简单的 Python API。任何任意大小的基础数据集都可以加载和更新,而无需将数据集完整存储在内存中,因为在需要精确切片之前不需要在内存中读取或保存实际数据。
|
||||
|
||||
这是通过索引和操作语法实现的,它与 NumPy 操作的语法非常相似。除了虚拟视图、广播、对齐和其他复杂的索引功能,TensorStore 还支持如数据类型转换、降低取样和随意创建的数组这些功能。
|
||||
|
||||
此外,TensorStore 包含一个异步 API,可以并发进行读取或写入操作。在执行其他工作时,软件可以进行内存缓存处理(可配置),从而减少在访问常用数据时处理较慢存储系统的需要。
|
||||
|
||||
大型数值数据集需要大量的处理能力来检查和分析。实现这一点的常用方法是在分散在许多设备上的大量 CPU 或加速器内核之间并行化任务。在保持出色速度的同时并行分析单个数据集的能力一直是 TensorStore 的关键目标。 PaLM、脑图和其他复杂的大规模机器学习模型是 TensorStore 应用案例的一些例子。
|
||||
|
||||
@ -29,8 +32,8 @@ via: https://www.opensourceforu.com/2022/10/google-ai-unveils-a-new-open-source-
|
||||
|
||||
作者:[Laveesh Kocher][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
译者:[KevinZonda](https://github.com/KevinZonda)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
@ -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 中的各种软件包
|
||||
======
|
||||
|
||||

|
||||
|
||||
更新 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
|
@ -0,0 +1,105 @@
|
||||
[#]: 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: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
VirtualBox 7.0 Releases With Secure Boot and Full VM Encryption Support
|
||||
======
|
||||
VirtualBox 7.0 is a big upgrade since its last major update. Some nice advancements!
|
||||
|
||||
![VirtualBox 7.0 Releases With Secure Boot and Full VM Encryption Support][1]
|
||||
|
||||
A big upgrade for VirtualBox. This release is pretty interesting because we haven't seen a major update in recent years.
|
||||
|
||||
For those unfamiliar with VirtualBox, it is a virtualization software developed by [Oracle][2].
|
||||
|
||||
With the launch of VirtualBox 7.0, many new features have been added.
|
||||
|
||||
Let's take a look at some of the most crucial ones.
|
||||
|
||||
### VirtualBox 7.0: What's New?
|
||||
|
||||
![virtualbox 7.0][3]
|
||||
|
||||
VirtualBox 7.0 is a helpful upgrade. There are icon updates, theme improvements, and some key highlights, including:
|
||||
|
||||
* A new utility to show performance statistics for running guests.
|
||||
* Secure boot support.
|
||||
* Full VM encryption support (via CLI).
|
||||
* Reworked new virtual machine wizard.
|
||||
|
||||
#### Full VM Encryption via CLI
|
||||
|
||||
Virtual Machines (VM) can now be fully encrypted, but only through the command-line interface.
|
||||
|
||||
This also includes the config logs and saved states.
|
||||
|
||||
As of now, users can encrypt their machines only through the command-line interface, and different methods are to be added in the future.
|
||||
|
||||
#### New Resource Monitor Utility
|
||||
|
||||
![virtualbox 7.0 resource monitor][4]
|
||||
|
||||
The new utility lets you monitor performance statistics like CPU, RAM usage, disk I/O, and more. It would list the performance stats for all the running guests.
|
||||
|
||||
Not the most attractive addition, but useful.
|
||||
|
||||
#### Improved Theme Support
|
||||
|
||||
The support for themes has been improved on all platforms. The native engine is used on Linux and macOS, and on Windows, a separate implementation is in place.
|
||||
|
||||
#### Support for Secure Boot
|
||||
|
||||
VirtualBox now supports Secure Boot, enhancing security against malware, viruses, and spyware.
|
||||
|
||||
It will also prevent a VM from booting up with broken drivers, which is very important for enterprise applications.
|
||||
|
||||
Users who use operating systems that require a secure boot to run should be able to create VMs easily.
|
||||
|
||||
#### Other Changes
|
||||
|
||||
VirtualBox 7.0 is a significant upgrade. So, there are several feature additions and refinements across the board.
|
||||
|
||||
For instance, the new VM wizard has now been reworked to integrate unattended guest OS installations.
|
||||
|
||||
![virtualbox 7.0 unattended distro installs][5]
|
||||
|
||||
Other improvements include:
|
||||
|
||||
* Cloud virtual machines can now be added to VirtualBox and controlled as local VMs.
|
||||
* The VirtualBox icon has been updated with this release.
|
||||
* A new 3D stack has been introduced that supports DirectX 11. It uses [DXVK][6] to provide the same support for non-Windows hosts.
|
||||
* Support for virtual TPM 1.2/2.0.
|
||||
* Improved mouse handling in multi-monitor setups.
|
||||
* Vorbis is the default audio codec for audio recording.
|
||||
|
||||
You can review the [release notes][7] for additional information.
|
||||
|
||||
If you were looking for enhanced features, such as better theme support, encryption features, secure boot support, and similar feature additions, VirtualBox 7.0 is a nice upgrade.
|
||||
|
||||
💬 *What do you think about the upgrade? Would you use the newer version or stick to the older version for your VMs for now?*
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://news.itsfoss.com/virtualbox-7-0-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/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
|
@ -1,253 +0,0 @@
|
||||
[#]: 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: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Advantages and Disadvantages of Using Linux
|
||||
======
|
||||
Linux is a buzzword and you keep hearing about Linux here and there. People discuss it in the tech forum, it is part of the course curriculum and your favorite tech YouTubers get excited while showing their Linux build. The 10x developers you follow on Twitter are all Linux fans.
|
||||
|
||||
Basically, Linux is everywhere and everyone keeps talking about it. And that gives you FOMO.
|
||||
|
||||
So, you wonder about the advantages of Linux and whether is it really worth trying.
|
||||
|
||||
I have compiled various possible advantages and disadvantages of Linux in this article.
|
||||
|
||||
If you are on the fence about choosing Linux over your preferred operating system, we would like to help you out.
|
||||
|
||||
Before you start, you should know that Linux is not an operating system on its own. The operating systems are called [Linux distributions and there are hundreds of them][1]. For simplicity, I’ll address it as Linux OS instead of a specific Linux distribution. This [article][2] explains things better.
|
||||
|
||||
### Advantages of Using Linux
|
||||
|
||||
Considering you are curious about Linux as an alternative operating system choice, it only makes sense that you know its advantages.
|
||||
|
||||
You might never regret your decision if it excels at what you want it to do.
|
||||
|
||||
#### No Need to Purchase a License
|
||||
|
||||
![open source proprietary illustration][3]
|
||||
|
||||
You need to own an Apple device to use macOS as your daily driver and a Windows license to use Microsoft’s Windows.
|
||||
|
||||
Therefore, you need a bit of investment with these options. But, with Linux? It’s entirely free.
|
||||
|
||||
Not just the OS, there are many software packages available for free on Linux when compared to Windows and macOS.
|
||||
|
||||
You can try every mainstream Linux distribution without paying for a license. Of course, you get the option to donate to support the project, but that is up to you if you really like it.
|
||||
|
||||
**Additionally**, Linux is totally open-source, meaning anyone can inspect the source code for transparency.
|
||||
|
||||
#### Can Run With Minimal System Resources
|
||||
|
||||
![linux mint 21 resource usage][4]
|
||||
|
||||
Typically, when users think of trying another operating system, it is because they are frustrated with the performance of their system.
|
||||
|
||||
This is from my personal experience. I have had friends willing to try Linux to revive their old laptop or a system that constantly lags.
|
||||
|
||||
And, when it comes to Linux distributions, they are capable of running on decent hardware configurations. You do not need to have the latest and greatest. Moreover, there are specialized [lightweight Linux distributions][5] that are tailored to run on older hardware with no hiccups.
|
||||
|
||||
So, you have more chances to revive your old system or get a fast-performing computer in no time with Linux.
|
||||
|
||||
#### Less Exposed to Malware
|
||||
|
||||
![malware illustration][6]
|
||||
|
||||
No operating system is safe from malicious files or scripts. If you download and run something from an unknown source, you cannot guarantee its safety.
|
||||
|
||||
However, things are better for Linux. Yes, researchers have found attackers targeting Linux IoT devices. But, for desktop Linux, it is not “yet” something to worry about.
|
||||
|
||||
Malicious actors target platforms that are more popular among households, and Linux does not have a big market share in the desktop space to attract that kind of attention. In a way, it can be a good thing.
|
||||
|
||||
All you have to do is just stick to the official software packages, and read instructions before you do anything.
|
||||
|
||||
As an extra plus, you do not necessarily need an antivirus program to get protection from malware.
|
||||
|
||||
#### Customization
|
||||
|
||||
![Pop!_OS 22.04 LTS][7]
|
||||
|
||||
With an open-source code, you get the freedom to customize your Linux experience as much as you want.
|
||||
|
||||
Of course, you require a bit of technical expertise to go utilize the best of it. Even without any experience, you get more customization features in your operating system when compared to macOS and Windows.
|
||||
|
||||
![Customized Linux experience | Reddit user: u/ZB652][8]
|
||||
|
||||
[u/ZB652][9]
|
||||
|
||||
If you are into personalizing your experience and willing to put in extra effort, Linux is for you. As an example, refer to the [KDE customization guide][10] and [dock options][11] to get basic ideas.
|
||||
|
||||
#### Something for Everyone
|
||||
|
||||
With macOS or Windows, you get limited to the design/preference choices finalized by Microsoft or Apple.
|
||||
|
||||
But, with Linux, you will find several Linux distributions that try to focus on various things.
|
||||
|
||||
For instance, you can opt for a Linux distribution that focuses on getting the latest features all the time, or you can opt for something that only gives you security/maintenance updates.
|
||||
|
||||
You can get something that looks beautiful out of the box or something that you provide crazy customization options. You will not run out of options with Linux.
|
||||
|
||||
I recommend starting with [options that give you the best user experience][12].
|
||||
|
||||
#### Complete Development Environment
|
||||
|
||||
If you are a software developer or student learning to code, Linux definitely has an edge. A lot of your build tools are available and integrated into Linux. With Docker, you can create specialized test environment easily.
|
||||
|
||||
Microsoft knows about this part and this is why it created WSL to give developers access to Linux environments inside Windows. Still, WSL doesn’t come close to the real Linux experience. The same goes for using Docker on Windows.
|
||||
|
||||
I know the same cannot be said about web designing because the coveted Adobe tools are not available on Linux yet. But if you don’t need Adobe for your work, Linux is a pretty good choice.
|
||||
|
||||
#### Learning Linux is a Skill One Must Have!
|
||||
|
||||
There is a learning curve to using Linux, but it provides you with insights on various things.
|
||||
|
||||
You get to learn how things work in an operating system by exploring and customizing it, or even just by using it.
|
||||
|
||||
Not everyone knows how to use Linux.
|
||||
|
||||
So, it can be a great skill to gain and expand your knowledge of software and computers.
|
||||
|
||||
#### Linux is an in-demand Job Skill
|
||||
|
||||
![job illustration][13]
|
||||
|
||||
As I mentioned above, it is a great skill to have. But, not just limited to expanding your knowledge, it is also useful professionally.
|
||||
|
||||
You can work your way to become a Linux system administrator or a security expert and fill several other job roles by learning the fundamentals of Linux.
|
||||
|
||||
So, learning Linux opens up a whole range of opportunities!
|
||||
|
||||
#### Privacy-Friendly
|
||||
|
||||
These days you cannot use Windows without a Microsoft account. And when you set up Windows, you’ll find that it tries to track your data from a number of services and applications.
|
||||
|
||||
![privacy windows][14]
|
||||
|
||||
While you can find such settings and disable them, it is clear that Windows is configured to disregard your privacy by default.
|
||||
|
||||
That’s not the case in Linux. While some applications/distributions may have an optional feature to let you share useful insights with them, it has never been a big deal. Most of the things on Linux are tailored to give you maximum privacy by default without needing to configure anything.
|
||||
|
||||
Apple and Microsoft on the other hand have clever tactics to collect anonymous usage data from your computer. Occasionally, they log your activity on their app store and while you are signed in through your account.
|
||||
|
||||
#### DIY projects and Self-hosting
|
||||
|
||||
Got a tinkerer in you? If you like to make electronics or software projects, Linux is your paradise.
|
||||
|
||||
You can use Linux on [single-board computers like Raspberry Pi][15] and create cool things like retro gaming consoles, home automation systems, etc.
|
||||
|
||||
You can also deploy open source software on your own server and maintain them. This is called self-hosting and it has the following advantages:
|
||||
|
||||
* Reduce hosting costs
|
||||
* Take control of your data
|
||||
* Customize the app/service as per your requirements
|
||||
|
||||
Clearly, you’ll be doing all this either directly with Linux or tools built on top of it.
|
||||
|
||||
### Disadvantages of Linux
|
||||
|
||||
Linux is not a flawless choice. Just like everything, there are some downsides to Linux as well. Those include:
|
||||
|
||||
#### Learning Curve
|
||||
|
||||
![too much learn illustration][16]
|
||||
|
||||
Every so often it is not just about learning a new skill, it is more about getting comfortable as quickly as possible.
|
||||
|
||||
If a user cannot get their way around the task they intend to do, it is not for them. It is true for every operating system. For instance, a user who uses Windows/macOS, may not get comfortable with Linux as quickly.
|
||||
|
||||
You can read our comparison article to know the [difference between macOS and Linux][17].
|
||||
|
||||
I agree that some users catch on quicker than others. But, in general, when you step into the Linux world, you need to be willing to put a bit of effort into learning the things that are not obvious.
|
||||
|
||||
#### Variety
|
||||
|
||||
While we recommend using the [best Linux distributions tailored for beginners][18], choosing what you like at first can be overwhelming.
|
||||
|
||||
You might want to try multiple of them to see what works with you best, which can be time-consuming and confusing.
|
||||
|
||||
It’s best to settle with one of the Linux distributions. But, if you remain confused, you can stick to Windows/macOS.
|
||||
|
||||
#### Market Share in Desktop Space
|
||||
|
||||
![linux desktop market share][19]
|
||||
|
||||
Linux is not a popular desktop operating system.
|
||||
|
||||
This should not be of concern to a user. However, without having a significant market presence, you cannot expect app developers to make/maintain tools for Linux.
|
||||
|
||||
Sure, there are lots of essential and popular tools available for Linux, more than ever. But, it remains a factor that may mean that not all good tools/services work on Linux.
|
||||
|
||||
Refer to our regularly updated article on [Linux’s market share][20], to get an idea.
|
||||
|
||||
#### Lack of Proprietary Software
|
||||
|
||||
As I mentioned above, not everyone is interested in bringing their tools/apps to Linux.
|
||||
|
||||
Hence, you may not find all the good proprietary offerings for Windows/macOS. Sure, you can use a compatibility layer to run Windows/macOS programs on Linux.
|
||||
|
||||
But that doesn’t work all the time. For instance, you do not have official Microsoft 365 support for Linux and tools like Wallpaper Engine.
|
||||
|
||||
#### Not a Gaming-first OS
|
||||
|
||||
![gaming illustration][21]
|
||||
|
||||
If you want to game on your computer, Windows remains the best option for its support for the newest hardware and technologies.
|
||||
|
||||
When it comes to Linux, there are a lot of “ifs and buts” for a clear answer. You can refer to our [gaming guide for Linux][22] to explore more if interested.
|
||||
|
||||
#### Lack of Professional Tech Support
|
||||
|
||||
I know not everyone needs it. But, there are tech support options that can guide users/fix issues remotely on their laptop or computer.
|
||||
|
||||
With Linux, you can seek help from the community, but it may not be as seamless as some professional tech support services.
|
||||
|
||||
You’ll still have to do most of the hit and try stuff on your own and not everyone would like it.
|
||||
|
||||
### Wrapping Up
|
||||
|
||||
I am primarily a Linux user but I use Windows when I have to play games. Though my preference is Linux, I have tried to be unbiased and give you enough pointers so that you can make up your mind if Linux is for you or not.
|
||||
|
||||
If you are going for Linux and have never used it, take the baby step and [use Linux in a virtual machine first][23]. You can also use WSL2 if you have Windows 11.
|
||||
|
||||
I welcome your comments and suggestions.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/advantages-linux/
|
||||
|
||||
作者:[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/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/
|
@ -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/
|
@ -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:
|
||||
|
||||
|
||||
```
|
||||
`<weather-card longitude='85.8245' latitude='20.296' />`
|
||||
```
|
||||
|
||||
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/
|
@ -2,7 +2,7 @@
|
||||
[#]: via: "https://jvns.ca/blog/2022/01/29/reasons-for-servers-to-support-ipv6/"
|
||||
[#]: author: "Julia Evans https://jvns.ca/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: translator: "chai001125"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
@ -1,206 +0,0 @@
|
||||
[#]: 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: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
GUI Apps for Package Management in Arch Linux
|
||||
======
|
||||
|
||||
[Installing Arch Linux][1] is considered challenging. This is why [several Arch-based distributions exist][2] to make things easier by providing a graphical installer.
|
||||
|
||||
Even if you manage to install Arch Linux, you’ll notice that it relies heavily on the command line. You’ll have to open the terminal if you have to install applications or update the system.
|
||||
|
||||
Yes! Arch Linux does not have a software center. Shocking for many, I know.
|
||||
|
||||
If you feel uncomfortable using the command line for managing applications, you can install a GUI tool. This helps in searching for packages and installing and removing them from the comfort of the GUI.
|
||||
|
||||
Wondering which graphical frontend for [pacman commands][3] you should use? I have some suggestions to help you get started.
|
||||
|
||||
**Please note that some software managers are desktop environment specific.**
|
||||
|
||||
### 1. Apper
|
||||
|
||||
![Installing Firefox using Apper][4]
|
||||
|
||||
Apper is a minimal Qt5 application and package manager using PackageKit which also supports AppStream and automatic updates. But, **there is no AUR support**.
|
||||
|
||||
To install it from the official repos use the command below.
|
||||
|
||||
```
|
||||
sudo pacman -Syu apper
|
||||
```
|
||||
|
||||
[Apper on GitLab][5]
|
||||
|
||||
### 2. Deepin App Store
|
||||
|
||||
![Installing Firefox using Deepin App Store][6]
|
||||
|
||||
Deepin App Store is an app store for Deepin Desktop Environment built with DTK(Qt5), using PackageKit with AppStream support and also provides system update notifications. There is **no AUR support**.
|
||||
|
||||
To install it, use the command below.
|
||||
|
||||
```
|
||||
sudo pacman -Syu deepin-store
|
||||
```
|
||||
|
||||
[Deepin Store on Github][7]
|
||||
|
||||
### 3. Discover
|
||||
|
||||
![Installing Firefox using Discover][8]
|
||||
|
||||
Discover needs no introduction for KDE Plasma users. It is a Qt-based application manager using PackageKit which supports AppStream, Flatpak and Firmware updates.
|
||||
|
||||
For installing Flatpak and Firmware updates from Discover `flatpak` and `fwupd` packages need to be installed respectively.
|
||||
|
||||
There is no AUR support.
|
||||
|
||||
```
|
||||
sudo pacman -Syu discover packagekit-qt5
|
||||
```
|
||||
|
||||
[Discover on GitLab][9]
|
||||
|
||||
### 4. GNOME PackageKit
|
||||
|
||||
![Installing Firefox using GNOME PackageKit][10]
|
||||
|
||||
GNOMEPackageKit is a GTK3 package manager using PackageKit which supports AppStream. Unfortunately, there is **no AUR support**.
|
||||
|
||||
To install it from the official repos use the command below.
|
||||
|
||||
```
|
||||
sudo pacman -Syu gnome-packagekit
|
||||
```
|
||||
|
||||
[PackageKit on freedesktop][11]
|
||||
|
||||
### 5. GNOME Software
|
||||
|
||||
![Installing Firefox using GNOME Software][12]
|
||||
|
||||
GNOME Software needs no introduction for GNOME desktop users. It is the GTK4 application manager using PackageKit which supports AppStream, Flatpak and Firmware updates.
|
||||
|
||||
There is no AUR support. To install Flatpak and Firmware updates from GNOME Software `flatpak` and `fwupd` packages need to be installed respectively.
|
||||
|
||||
Install it using:
|
||||
|
||||
```
|
||||
sudo pacman -Syu gnome-software-packagekit-plugin gnome-software
|
||||
```
|
||||
|
||||
[GNOME Software on GitLab][13]
|
||||
|
||||
### 6. tkPacman
|
||||
|
||||
![Installing Firefox using tkPacman][14]
|
||||
|
||||
It is a Tk pacman wrapper written in Tcl. The interface is similar to [Synaptic Package Manager][15].
|
||||
|
||||
It is quite lightweight due to no GTK/Qt dependencies as it is uses Tcl/Tk GUI toolkit.
|
||||
|
||||
It does not support AUR which is ironic because you need to install it from [AUR][16]. You need to install an [AUR helper][17] like yay beforehand.
|
||||
|
||||
```
|
||||
yay -Syu tkpacman
|
||||
```
|
||||
|
||||
[tkPacman on Sourceforge][18]
|
||||
|
||||
### 7. Octopi
|
||||
|
||||
![Installing Firefox using Octopi][19]
|
||||
|
||||
Consider it a better looking cousin of tkPacman. It uses Qt5 and Alpm and also supports Appstream and **AUR (via yay)**.
|
||||
|
||||
You also get desktop notifications, repository editor and cache cleaner. The interface is similar to Synaptic Package Manager.
|
||||
|
||||
To install it from the AUR, use the following command.
|
||||
|
||||
```
|
||||
yay -Syu octopi
|
||||
```
|
||||
|
||||
[Octopi on GitHub][20]
|
||||
|
||||
### 8. Pamac
|
||||
|
||||
![Installing Firefox using Pamac][21]
|
||||
|
||||
Pamac is the graphical package manager from Manjaro Linux. It based on GTK3 and Alpm and **supports AUR, Appstream, Flatpak and Snap**.
|
||||
|
||||
Pamac also supports automatic download of updates and downgrade of packages.
|
||||
|
||||
It is the most widely used Application in Arch Linux derivatives. But, has been notorious for [DDoSing the AUR webpage][22].
|
||||
|
||||
There are several ways to [install Pamac on Arch Linux][23]. The simplest would be to use an AUR helper.
|
||||
|
||||
```
|
||||
yay -Syu pamac-aur
|
||||
```
|
||||
|
||||
[Pamac on GitLab][24]
|
||||
|
||||
### Conclusion
|
||||
|
||||
To remove any of the above-mentioned GUI package managers along with the dependencies and configuration files, use the following command replacing *packagename* with the name of package to be removed.
|
||||
|
||||
```
|
||||
sudo pacman -Rns packagename
|
||||
```
|
||||
|
||||
So it seems Arch Linux can also be used without touching the terminal with the right tools.
|
||||
|
||||
There are also some other applications also which use Terminal User Interface (TUI). A few examples are [pcurses][25], [cylon][26], [pacseek][27], and [yup][28]. But, this article is about only the ones with proper GUI.
|
||||
|
||||
**Note:** PackageKit opens up system permissions by default, and is otherwise [not recommended][29] for general usage. Because if the user is part of the wheel group no password is required to update or install any software.
|
||||
|
||||
**You saw several options for using GUI software center on Arch Linux. It’s time to make a decision on using one of them. Which one would you choose? Pamac or OctoPi or something else? Leave a quick comment below right now.**
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/arch-linux-gui-package-managers/
|
||||
|
||||
作者:[Anuj 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://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/apper-arch-install-firefox.png
|
||||
[7]: https://github.com/dekzi/dde-store
|
||||
[8]: https://itsfoss.com/wp-content/uploads/2022/09/apper-arch-install-firefox.png
|
||||
[9]: https://invent.kde.org/plasma/discover
|
||||
[10]: https://itsfoss.com/wp-content/uploads/2022/09/apper-arch-install-firefox.png
|
||||
[11]: https://freedesktop.org/software/PackageKit/index.html
|
||||
[12]: https://itsfoss.com/wp-content/uploads/2022/09/apper-arch-install-firefox.png
|
||||
[13]: https://gitlab.gnome.org/GNOME/gnome-software
|
||||
[14]: https://itsfoss.com/wp-content/uploads/2022/09/apper-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/apper-arch-install-firefox.png
|
||||
[20]: https://github.com/aarnt/octopi
|
||||
[21]: https://itsfoss.com/wp-content/uploads/2022/09/apper-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
|
@ -1,149 +0,0 @@
|
||||
[#]: 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: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Upgrade Various Kinds of Packages in Linux at Once With Topgrade
|
||||
======
|
||||
Updating a Linux system is not that complicated, is it? After all, to update Ubuntu like distros, you just have to use apt update && apt upgrade.
|
||||
|
||||
That would have been the case if all the packages had been installed through a single package manager.
|
||||
|
||||
But that’s not the case anymore. You have the classic apt/dnf/pacman and then come snap, flatpak, appimages. It doesn’t end here. You may also install applications using PIP (for Python) and Cargo (for Rust).
|
||||
|
||||
Use node? The npm packages need to be updated separately. Oh My Zsh? Needs to be updated separately. [Plugins in Vim][1], Atom etc may also not be covered by apt/dnf/pacman.
|
||||
|
||||
Do you see the problem now? And this is the kind of problem a new tool called topgrade aims to solve.
|
||||
|
||||
### Topgrade: A single utility to take care of all kinds of updates
|
||||
|
||||
This [topgrade][2] is a CLI utility and it detects which tools you use and then runs the appropriate commands to update them.
|
||||
|
||||
![topgrade disable system][3]
|
||||
|
||||
Apart from the usual Linux package managers, it can detect and update brew, cargo, PIP, pihole, Vim and Emacs plugins, R packages etc. You can see the list of supported packages on [its wiki page][4].
|
||||
|
||||
##### Key Features of Topgrade:
|
||||
|
||||
* Ability to update packages from different package managers, including firmware!
|
||||
* You do have control over how you want to update packages.
|
||||
* Extremely customizable.
|
||||
* Ability to have an overview even before updating packages.
|
||||
|
||||
So without wasting any time, let’s jump to the installation.
|
||||
|
||||
### Install Topgrade in Linux using Cargo
|
||||
|
||||
The installation process is quite straightforward as I’m going to use the cargo package manager.
|
||||
|
||||
We already have a [detailed guide with multiple methods for setting up a cargo package manager][5] So I’m going to make it quick by using Ubuntu in my example.
|
||||
|
||||
So let’s start with some dependencies and installation of cargo in the least extensive way:
|
||||
|
||||
```
|
||||
sudo apt install cargo libssl-dev pkg-config
|
||||
```
|
||||
|
||||
Once the cargo has been installed, utilize the given command to install topgrade:
|
||||
|
||||
```
|
||||
cargo install topgrade
|
||||
```
|
||||
|
||||
And it will throw a warning as given:
|
||||
|
||||
![cargo error][6]
|
||||
|
||||
Where you just have to add the path of cargo to run binaries. This can be done through given command where you’ve to change `sagar` with your username:
|
||||
|
||||
```
|
||||
echo 'export PATH=$PATH:/home/sagar/.cargo/bin' >> /home/sagar/.bashrc
|
||||
```
|
||||
|
||||
Now, reboot your system and topgrade is ready to use. But wait, we need to install another package that will update cargo to get the most recent packages.
|
||||
|
||||
```
|
||||
cargo install cargo-update
|
||||
```
|
||||
|
||||
And we’re done with installation.
|
||||
|
||||
### Using Topgrade
|
||||
|
||||
Using topgrade is extremely easy. Use a single command and that’s it:
|
||||
|
||||
```
|
||||
topgrade
|
||||
```
|
||||
|
||||
![][7]
|
||||
|
||||
But this won’t give you any control apart from system packages but as I mentioned, you can blacklist the repo that you don’t want to get updated.
|
||||
|
||||
#### Exclude package managers and repositories from Topgrade
|
||||
|
||||
Let’s suppose I want to exclude snaps and packages downloaded from the default package manager, so my command would be:
|
||||
|
||||
```
|
||||
topgrade --disable snap system
|
||||
```
|
||||
|
||||
![topgrade disable snap system][8]
|
||||
|
||||
For making a permanent change, you’d have to make a few changes in its config file which can be accessed through the given command:
|
||||
|
||||
```
|
||||
topgrade --edit-config
|
||||
```
|
||||
|
||||
For this example, I discluded snaps and default system repo:
|
||||
|
||||
![configuring topgrade][9]
|
||||
|
||||
#### Dry run topgrade
|
||||
|
||||
Having an estimation of outdated packages that will be updated is always a good idea and I find this most useful option from the entire catalog of topgrade.
|
||||
|
||||
You just have to use topgrade with `-n` option and it will generate a summary of outdated packages.
|
||||
|
||||
```
|
||||
topgrade -n
|
||||
```
|
||||
|
||||
![summery of topgrade][10]
|
||||
|
||||
A neat way of checking packages that need to be updated.
|
||||
|
||||
### Final Words
|
||||
|
||||
After using Topgrade for a few weeks, it became an integral part of my Linux arsenal. Like most other Linux users, I was only updating packages through my default package manager. Python and Rust packages were ignored completely. Thanks to topgrade, my system is updated completely now.
|
||||
|
||||
I understand that this is not a tool everyone would want to use. What about you? Willing to give it a try?
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/topgrade/
|
||||
|
||||
作者:[Sagar 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://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
|
@ -1,216 +0,0 @@
|
||||
[#]: 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: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
How to Create LVM Partition Step-by-Step in Linux
|
||||
======
|
||||
In this guide, we will cover how to create lvm partition step-by-step in Linux.
|
||||
|
||||
LVM stands for Logical Volume Management, it is the recommended way to manage disk or storage on Linux systems specially for servers. One of the main advantages of LVM partition is that we can extend its size online without any downtime. LVM partition can also be reduced but it is not recommended.
|
||||
|
||||
For the demo purpose, I have attached 15GB disk to my Ubuntu 22.04 system, we will create LVM partition on this disk from the command line.
|
||||
|
||||
##### Prerequisites
|
||||
|
||||
* Raw disk attached to Linux system
|
||||
* Local User with Sudo rights
|
||||
* Pre-Installed lvm2 package
|
||||
|
||||
Without further ado, let’s deep dive into the steps.
|
||||
|
||||
### Step 1) Identify new attached raw disk
|
||||
|
||||
Login to your system, open the terminal and run following dmesg command,
|
||||
|
||||
```
|
||||
$ sudo dmesg | grep -i sd
|
||||
```
|
||||
|
||||
In the output, look for new disk attached of size 15GB,
|
||||
|
||||
![dmesg-command-new-attached-disk-linux][1]
|
||||
|
||||
Alternate way to identify new attached raw disk is via fdisk command,
|
||||
|
||||
```
|
||||
$ sudo fdisk -l | grep -i /dev/sd
|
||||
```
|
||||
|
||||
Output,
|
||||
|
||||
![fdisk-command-output-new-disk][2]
|
||||
|
||||
From output above, it is confirmed that new attached disk is ‘/dev/sdb’
|
||||
|
||||
### Step 2) Create PV (Physical Volume)
|
||||
|
||||
Before start creating pv on disk /dev/sdb, make sure lvm2 package is installed. In case it is not installed, then run following command,
|
||||
|
||||
```
|
||||
$ sudo apt install lvm2 // On Ubuntu / Debian
|
||||
$ sudo dnf install lvm2 // on RHEL / CentOS
|
||||
```
|
||||
|
||||
Run following pvcreate command to create pv on disk /dev/sdb,
|
||||
|
||||
```
|
||||
$ sudo pvcreate /dev/sdb
|
||||
Physical volume "/dev/sdb" successfully created.
|
||||
$
|
||||
```
|
||||
|
||||
To verify pv status run,
|
||||
|
||||
```
|
||||
$ sudo pvs /dev/sdb
|
||||
Or
|
||||
$ sudo pvdisplay /dev/sdb
|
||||
```
|
||||
|
||||
![pvdisplay-command-output-linux][3]
|
||||
|
||||
### Step 3) Create VG (Volume Group)
|
||||
|
||||
To create a volume group, we will use vgcreate command. Creating VG means adding pv to the volume group.
|
||||
|
||||
Syntax :
|
||||
|
||||
```
|
||||
$ sudo vgcreare <vg_name> <pv>
|
||||
```
|
||||
|
||||
In our case, command would be,
|
||||
|
||||
```
|
||||
$ sudo vgcreate volgrp01 /dev/sdb
|
||||
Volume group "volgrp01" successfully created
|
||||
$
|
||||
```
|
||||
|
||||
Run following commands to verify the status of vg (volgrp01)
|
||||
|
||||
```
|
||||
$ sudo vgs volgrp01
|
||||
Or
|
||||
$ sudo vgdisplay volgrp01
|
||||
```
|
||||
|
||||
Output of above commands,
|
||||
|
||||
![vgs-command-output-linux][4]
|
||||
|
||||
Above output confirms that volume group (volgrp01) of size 15 GiB is created successful and size of one physical extend (PE) is 4 MB. PE size can be changed while creating vg.
|
||||
|
||||
### Step 4) Create LV (Logical Volume)
|
||||
|
||||
|
||||
Lvcreate command is used to create LV from the VG. Syntax of lvcreate command would look like below,
|
||||
|
||||
```
|
||||
$ sudo lvcreate -L <Size-of-LV> -n <LV-Name> <VG-Name>
|
||||
```
|
||||
|
||||
In our case, following command will be used to create lv of size 14 GB
|
||||
|
||||
```
|
||||
$ sudo lvcreate -L 14G -n lv01 volgrp01
|
||||
Logical volume "lv01" created.
|
||||
$
|
||||
```
|
||||
|
||||
Validate the status of lv, run
|
||||
|
||||
```
|
||||
$ sudo lvs /dev/volgrp01/lv01
|
||||
or
|
||||
$ sudo lvdisplay /dev/volgrp01/lv01
|
||||
```
|
||||
|
||||
Output,
|
||||
|
||||
![lvs-command-output-linux][5]
|
||||
|
||||
Output above shows that LV (lv01) has been created successfully of size 14 GiB.
|
||||
|
||||
### Step 5) Format LVM Partition
|
||||
|
||||
Use mkfs command to format the lvm partition. In our case lvm partition is /dev/volgrp01/lv01
|
||||
|
||||
Note: We can format the partition either ext4 or xfs, so choose the file system type according to your setup and requirement.
|
||||
|
||||
Run following command to format LVM partition as ext4 file system.
|
||||
|
||||
```
|
||||
$ sudo mkfs.ext4 /dev/volgrp01/lv01
|
||||
```
|
||||
|
||||
![mkfs-ext4-filesystem-lvm][6]
|
||||
|
||||
Execute beneath command to format the lvm partition with xfs file system,
|
||||
|
||||
```
|
||||
$ sudo mkfs.xfs /dev/volgrp01/lv01
|
||||
```
|
||||
|
||||
To use above formatted partition, we must mount it on some folder. So, let’s create a folder /mnt/data
|
||||
|
||||
```
|
||||
$ sudo mkdir /mnt/data
|
||||
```
|
||||
|
||||
Now run mount command to mount it on /mnt/data folder,
|
||||
|
||||
```
|
||||
$ 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
|
||||
$
|
||||
```
|
||||
|
||||
Try to create some dummy file, run following commands,
|
||||
|
||||
```
|
||||
$ cd /mnt/data/
|
||||
$ echo "testing lvm partition" | sudo tee dummy.txt
|
||||
$ cat dummy.txt
|
||||
testing lvm partition
|
||||
$
|
||||
$ sudo rm -f dummy.txt
|
||||
```
|
||||
|
||||
Perfect, above commands output confirm that we can access lvm partition.
|
||||
|
||||
To mount above lvm partition permanently, add its entries in fstab file using following echo command,
|
||||
|
||||
```
|
||||
$ echo '/dev/volgrp01/lv01 /mnt/data ext4 defaults 0 0' | sudo tee -a /etc/fstab
|
||||
$ sudo mount -a
|
||||
```
|
||||
|
||||
That’s all from this guide, thanks for the reading. Kindly do post your queries and feedback in below comments section.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.linuxtechi.com/how-to-create-lvm-partition-in-linux/
|
||||
|
||||
作者:[James Kiarie][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.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
|
@ -0,0 +1,93 @@
|
||||
[#]: 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: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
How to Update Google Chrome on Ubuntu Linux
|
||||
======
|
||||
So, you managed to install Google Chrome browser on your Ubuntu system. And now you wonder how to keep the browser updated.
|
||||
|
||||
On Windows and macOS, when there is an update available on Chrome, you are notified in the browser itself and you can hit the update option from the browser.
|
||||
|
||||
Things are different in Linux. You don’t update Chrome from the browser. You update it with the system updates.
|
||||
|
||||
Yes. When there is a new update available on Chrome, Ubuntu notifies you via the system updater tool.
|
||||
|
||||
![Ubuntu sends notifications when a new version of Chrome is available][1]
|
||||
|
||||
You just have to click on the Install Now button, enter your account’s password when asked for it and have Chrome updated to a new version.
|
||||
|
||||
Let me tell you why you see the updates on the system level and how you can update Google Chrome in the command line.
|
||||
|
||||
### Method 1: Updating Google Chrome with system updates
|
||||
|
||||
How did you install Chrome in the first place? You got the deb installer file from the [Chrome website][2] and used it to [install Chrome on Ubuntu][3].
|
||||
|
||||
The thing is that when you do that, Google adds a repository entry into your system’s sources list. This way, your system trusts the packages coming from the Google repository.
|
||||
|
||||
![Google Chrome repository is added to the Ubuntu system][4]
|
||||
|
||||
For all such entries added to your system, the package updates are centralized through the Ubuntu Updater.
|
||||
|
||||
And this is why when there is an update available to Google Chrome (and other installed applications), your Ubuntu system sends you notification.
|
||||
|
||||
![Chrome update available with other applications via System Updater][5]
|
||||
|
||||
**Click the “Install Now” button and enter your password when asked for it**. Soon, the system will install all the upgradeable packages.
|
||||
|
||||
Depending on the update preference, the notification may not be immediate. If you want, you can manually run the updater tool and see what updates are available for your Ubuntu system.
|
||||
|
||||
![Run Software Updater to see what updates are available for your system][6]
|
||||
|
||||
### Method 2: Updating Chrome in the Ubuntu command line
|
||||
|
||||
If you prefer the terminal over the graphical interface, you can update Chrome with commands as well.
|
||||
|
||||
Open a terminal and run the following commands one by one:
|
||||
|
||||
```
|
||||
sudo apt update
|
||||
|
||||
sudo apt --only-upgrade install google-chrome-stable
|
||||
```
|
||||
|
||||
The first command updates the package cache so that your system is aware of what packages can be upgraded.
|
||||
|
||||
The second command [only updates the single package][7] which is Google Chrome (installed as google-chrome-stable).
|
||||
|
||||
### Conclusion
|
||||
|
||||
As you can see, things are more streamlined in Ubuntu than in Windows. You get Chrome updated along with other system updates.
|
||||
|
||||
On a related note, you may learn about [removing google Chrome from Ubuntu][8] if you are unhappy with it.
|
||||
|
||||
Chrome is a fine browser. You can experiment with it by [using shortcuts in Chrome][9] as it makes the browsing experience even smoother.
|
||||
|
||||
Enjoy Chrome on Ubuntu!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/update-google-chrome-ubuntu/
|
||||
|
||||
作者:[Abhishek Prakash][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/
|
||||
[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/
|
122
sources/tech/20221010 Xubuntu 22.10- Top New Features.md
Normal file
122
sources/tech/20221010 Xubuntu 22.10- Top New Features.md
Normal file
@ -0,0 +1,122 @@
|
||||
[#]: 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: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Xubuntu 22.10: Top New Features
|
||||
======
|
||||
Here’s a quick summary of Xubuntu 22.10 Kinetic Kudu and its new features.
|
||||
|
||||
![Xubuntu 22.10 Desktop][1]
|
||||
|
||||
Quality takes time to build. It applies to all phases of life, including software.
|
||||
|
||||
Since Xfce 4.16 release, many new features to Xfce 4.17 (development version) have been added. That includes core Xfce, native applications, adoption of GNOME 43, MATE 1.26 and libadwaita. Since Xfce is also a combination of GNOME and MATE – it takes time to properly incorporate and test the changes.
|
||||
|
||||
In the Xubuntu 22.10 Kinetic Kudu release, you get to experience all the improvements done since December 2020 – almost two years of bug fixes and enhancements.
|
||||
|
||||
Let’s quickly check on the schedule. Currently, the Xubuntu 22.10 beta is out and under testing (link to ISO at the end of this page). The final release is expected on October 20, 2022.
|
||||
|
||||
### Xubuntu 22.10 New Features
|
||||
|
||||
#### Core updates and GNOME framework
|
||||
|
||||
At its core, Xubuntu 22.10 is powered by Linux Kernel 5.19 as its base on Ubuntu 22.10. In addition, the Xfce desktop version is Xfce 4.17.
|
||||
|
||||
The 4.17 version is a development tag because it’s a stepping stone for the next big release, Xfce 4.18, which is [planned for this Christmas.][2]
|
||||
|
||||
Let’s talk about GNOME and related apps. For the first time, Xfce 4.17 in Xubuntu 22.10 gets the libadwaita with GNOME 43 updates. That means the default GNOME apps can render correctly under the Xfce desktop.
|
||||
|
||||
That being said, the GNOME Software 43 looks great under Xfce desktop in Xubuntu 22.10. If you compare this to Xfce native look and GNOME apps with CSD/SSD (such as DIsks) – they all look neat.
|
||||
|
||||
I am surprised at how good Software 43 is with libadwaita/GTK4 rendered under Xfce desktop.
|
||||
|
||||
![Three different window decorations – together in Xubuntu 22.10][3]
|
||||
|
||||
#### Xfce Applications
|
||||
|
||||
The Xfce desktop brings its own native set of applications. All the apps are bumped to version 4.17 from 4.16 in this release.
|
||||
|
||||
Noteworthy changes include the Xfce panel getting middle-click support for the tasklist plugin and binary time mode in the tray clock. The pulse audio plugin introduces a new recording indicator and can filter out multiple button press events.
|
||||
|
||||
Thunar file manager gets a massive set of under-the-hood features and bug fixes. It’s vast if you compare Thunar 4.16 to Thunar 4.17. Changes include an updated context menu, path bar, search, navigation and more. You can read the entire change log of Thunar [here][4].
|
||||
|
||||
Moreover, the screenshot application screenshooter gets WebP support by default. Bluetooth manager Blueman receives a profile switcher right from the system tray and updates the Catfish file search tool.
|
||||
|
||||
Here’s the updated list of Xfce application versions and a link to their change log (if you want to dig further).
|
||||
|
||||
* Appfinder [4.17.0][5]
|
||||
* Catfish [4.16.4][6]
|
||||
* Mousepad [0.5.10][7]
|
||||
* Panel [4.17.3][8]
|
||||
* PulseAudio Plugin [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]
|
||||
|
||||
#### Look and Feel
|
||||
|
||||
The default elementary-xfce icon set (both light and dark) gets updated icon set with extra polished icons to give your Xfce desktop a new look. The default Greybird GTK theme gets the necessary improvements for window decorations and added Openbox support.
|
||||
|
||||
One of the important and visible changes you might notice is the ALT+TAB look. The icons are a little larger and more comfortable for eyes for faster window switching with a dark background.
|
||||
|
||||
![Refreshed icon set sample in elementary-xfce with Xubuntu 22.10][15]
|
||||
|
||||
![ALT TAB is refreshed with larger icons][16]
|
||||
|
||||
The above changes align the default applications with the base [Ubuntu 22.10 release][17]. Here’s a summary of the changes in Xubuntu 22.10.
|
||||
|
||||
### Summary
|
||||
|
||||
* Linux Kernel 5.19 and based on Ubuntu 22.10
|
||||
* Xfce desktop version 4.17
|
||||
* Native applications are all updated to 4.17
|
||||
* The core aligns with GNOME 43, libadwaita, GTK4
|
||||
* MATE apps bump to 1.26
|
||||
* Mozilla Firefox web-browser 105.0
|
||||
* Thunderbird email client 102.3
|
||||
* LibreOffice 7.4.4.2
|
||||
|
||||
### Wrapping up
|
||||
|
||||
The most critical changes of Xfce desktop as a whole are arriving in version 4.18. For example, the initial Wayland support, updated glib and GTK packages. If all goes well, you can expect these finest changes in next year’s April release of Xubuntu.
|
||||
|
||||
Finally, you can download the beta image from [this page][18] if you want to try it.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/xubuntu-22-10-features/
|
||||
|
||||
作者:[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://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/
|
@ -0,0 +1,81 @@
|
||||
[#]: 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: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Easiest Way to Open Files as Root in GNOME Files
|
||||
======
|
||||
Here’s the simplest way to access a file or directory as root in GNOME Files.
|
||||
|
||||
![][1]
|
||||
|
||||
In Windows, you generally get an option to open a file or folder as “Open As Administrator” in the right-click context menu.
|
||||
|
||||
That feature is part of the File manager, i.e. for Windows; it’s part of Windows Explorer. However, it is executed by the operating system and its permission control modules.
|
||||
|
||||
In Linux distributions and file managers, the situation is a little different. The different desktop has their way of handling this.
|
||||
|
||||
Since modifying the files and folders as admin (or root) is risky and may cause a broken system, the feature is not easily available to users via the GUI of file managers.
|
||||
|
||||
For example, KDE Plasma’s default file manager Dolphin recently [added this feature][2] so that when a root privilege is required, it will ask for you with a PolicyKit KDE Agent (polkit) window – as shown below. Not the other way around. You want to open/execute something via root from the file manager.
|
||||
|
||||
It’s worth mentioning that you can not use “sudo dolphin” to run the file manager itself with root privilege.
|
||||
|
||||
![Dolphin root access after KIO with Polkit implementation][3]
|
||||
|
||||
In a way, it saves many unforeseen situations. But advanced users can always use sudo via the terminal to do their job.
|
||||
|
||||
### GNOME Files (Nautilus) and root access to files, directories
|
||||
|
||||
That being said, [GNOME Files][4] (aka Nautilus) has a way to open files and folders via root.
|
||||
|
||||
Here’s how.
|
||||
|
||||
* Open GNOME Files or Nautilus.
|
||||
* Then click on other locations at the left pane.
|
||||
* Press CTRL+L to bring up the address bar.
|
||||
* In the address bar, type in below and hit enter.
|
||||
|
||||
```
|
||||
admin:///
|
||||
```
|
||||
|
||||
* It would ask for the admin password; once you authenticate yourself successfully, you get the system open for you as admin.
|
||||
* Now, here onwards, whatever you do, it’s as admin or root.
|
||||
|
||||
![Enter the location address as admin][5]
|
||||
|
||||
![Give admin password][6]
|
||||
|
||||
![Opening GNOME Files as root][7]
|
||||
|
||||
But, as always, be careful what you do as an admin. It’s often easy to forget after you authenticate yourself as root.
|
||||
|
||||
There’s always a reason why these options are not easily visible to prevent you and many new Linux users from breaking their system.
|
||||
|
||||
Cheers.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/gnome-files-root-access/
|
||||
|
||||
作者:[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://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
|
@ -0,0 +1,159 @@
|
||||
[#]: subject: "Groovy vs Java: Connecting a PostgreSQL database with JDBC"
|
||||
[#]: via: "https://opensource.com/article/22/10/groovy-vs-java-sql"
|
||||
[#]: author: "Chris Hermansen https://opensource.com/users/clhermansen"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Groovy vs Java: Connecting a PostgreSQL database with JDBC
|
||||
======
|
||||
This example demonstrates how Groovy streamlines the clunkiness of Java.
|
||||
|
||||
![Coffee beans][1]
|
||||
|
||||
Image by: Pixabay. CC0.
|
||||
|
||||
Lately, I've been looking at how Groovy streamlines the slight clunkiness of Java. This article examines some differences between connecting to a PostgreSQL database using JDBC in Java versus Groovy.
|
||||
|
||||
### Install Java and Groovy
|
||||
|
||||
Groovy is based on Java and requires a Java installation. Both a recent/decent version of Java and Groovy might be in your Linux distribution's repositories, or you can install Groovy by following [these instructions][2]. A nice alternative for Linux users is SDKMan, which provides multiple versions of Java, Groovy, and many other related tools. For this article, I'm using SDK's releases of:
|
||||
|
||||
* Java version 11.0.12-open of OpenJDK 11
|
||||
* Groovy version 3.0.8
|
||||
|
||||
### Back to the problem
|
||||
|
||||
If you haven't already, please review [this article][3] on installing JDBC and [this article][4] on setting up PostgreSQL.
|
||||
|
||||
Whether you're using Java or Groovy, several basic steps happen in any program that uses JDBC to pull data out of a database:
|
||||
|
||||
1. Establish a `Connection` instance to the database back end where the data resides.
|
||||
2. Using an SQL string, get an instance of a `Statement` (or something similar, like a `PreparedStatement`) that will handle the execution of the SQL string.
|
||||
3. Process the `ResultSet` instance returned by having the `Statement` instance execute the query, for example, printing the rows returned on the console.
|
||||
4. Close the `Statement` and `Connection` instances when done.
|
||||
|
||||
In Java, the correspondence between the code and the list above is essentially one-for-one. Groovy, as usual, streamlines the process.
|
||||
|
||||
#### Java example
|
||||
|
||||
Here's the Java code to look at the land cover data I loaded in the second article linked above:
|
||||
|
||||
```
|
||||
1 import java.sql.Connection;
|
||||
2 import java.sql.Statement;
|
||||
3 import java.sql.ResultSet;
|
||||
4 import java.sql.DriverManager;
|
||||
5 import java.sql.SQLException;
|
||||
|
||||
6 public class TestQuery {
|
||||
|
||||
7 public static void main(String[] args) {
|
||||
|
||||
8 final String url = "jdbc:postgresql://localhost/landcover";
|
||||
9 final String user = "clh";
|
||||
10 final String password = "carl-man";
|
||||
11 try (Connection connection = DriverManager.getConnection(url, user, password)) {
|
||||
12 try (Statement statement = connection.createStatement()) {
|
||||
13 ResultSet res = statement.executeQuery("select distinct country_code from land_cover");
|
||||
14 while (res.next()) {
|
||||
15 System.out.println("country code " + res.getString("country_code"));
|
||||
16 }
|
||||
|
||||
17 } catch (SQLException se) {
|
||||
18 System.err.println(se.getMessage());
|
||||
19 }
|
||||
20 } catch (SQLException ce) {
|
||||
21 System.err.println(ce.getMessage());
|
||||
22 }
|
||||
23 }
|
||||
24 }
|
||||
```
|
||||
|
||||
Lines 1-5 are the necessary import statements for the JDBC classes. Of course, I could shorten this to `import java.sql.*` but that sort of thing is somewhat frowned-upon these days.
|
||||
|
||||
Lines 6-24 define the public class `TestQuery` I will use to connect to the database and print some of the contents of the main table.
|
||||
|
||||
Lines 7-23 define the `main` method that does the work.
|
||||
|
||||
Lines 8-10 define the three strings needed to connect to a database: The URL, the user name, and the user password.
|
||||
|
||||
Lines 11-22 use a try-with-resources to open the `Connection` instance and automatically close it when done.
|
||||
|
||||
Lines 12 -19 use another try-with-resources to open the `Statement` instance and automatically close it when done.
|
||||
|
||||
Line 13 creates the `ResultSet` instance handle the SQL query, which uses **SELECT DISTINCT** to get all unique values of **country_code** from the **land_cover** table in the database.
|
||||
|
||||
Lines 14-16 process the result set returned by the query, printing out the country codes one per line.
|
||||
|
||||
Lines 17-19 and 20-22 handle any SQL exceptions.
|
||||
|
||||
#### Groovy example
|
||||
|
||||
I'll do something similar in Groovy:
|
||||
|
||||
```
|
||||
1 import groovy.sql.Sql
|
||||
|
||||
2 final String url = "jdbc:postgresql://localhost/landcover"
|
||||
3 final String user = "me"
|
||||
4 final String password = "my-password"
|
||||
5 final String driver = "org.postgresql.Driver"
|
||||
|
||||
6 Sql.withInstance(url, user, password, driver) { sql ->
|
||||
|
||||
7 sql.eachRow('select distinct country_code from land_cover') { row ->
|
||||
8 println "row.country_code ${row.country_code}"
|
||||
9 }
|
||||
10 }
|
||||
```
|
||||
|
||||
Okay, that's a lot shorter–10 lines instead of 24! Here are the details:
|
||||
|
||||
Line 1 is the only import needed. In my view, not having to jump around JavaDocs for three different classes is a distinct advantage.
|
||||
|
||||
Lines 2-5 define the four strings needed to connect to a database using the `Sql` class. The first three are the same as for `java.sql.Connection` ; the fourth names the driver I want.
|
||||
|
||||
Line 6 is doing a bunch of heavy lifting. The method call is `Sql.withInstance()`, similar to other uses of "with" in Groovy. The call:
|
||||
|
||||
* Creates an instance of `Sql` (connection, statement, etc.).
|
||||
* Takes a closure as its final parameter, passing it the instance of `Sql` that it created.
|
||||
* Closes the instance of `Sql` when the closure exits.
|
||||
|
||||
Line 7 calls the `eachRow()` method of the `Sql` instance, wrapping the creation and processing of the result set. The `eachRow()` method takes a closure as its final argument and passes each `row` to the closure as it processes the returned lines of data from the table.
|
||||
|
||||
### Groovy can simplify your life
|
||||
|
||||
For those of you whose day job involves scripting and relational databases, I think it's pretty obvious from the above that Groovy can simplify your life. A few closing comments:
|
||||
|
||||
* I could have accomplished this similarly to the Java version; for example, instead of calling `sql.eachRow()`, I could have called `sql.query()`, which takes a closure as its last argument and passes a result set to that closure, at which point I would have probably used a `while()` as in the Java version (or maybe `each()`).
|
||||
* I could also read the resulting rows into a list, all at once, using a call to `sql.rows()`, which can transform the data in a manner similar to using `.collect()` on a list.
|
||||
* Remember that the SQL passed into the `eachRow()` (or `query()`) method can be arbitrarily complex, including table joins, grouping, ordering, and any other operations supported by the database in question.
|
||||
* Note that SQL can also be parametrized when using an instance of `PreparedStatement`, which is a nice way to avoid SQL injection if any part of the SQL comes in from outside the coder's sphere of control.
|
||||
* This is a good moment to point the diligent reader to the [JavaDocs for groovy.sql.Sql][5].
|
||||
|
||||
### Groovy resources
|
||||
|
||||
The [Apache Groovy language site][6] provides a good tutorial-level overview of working with databases, including other ways to connect, plus additional operations, including insertions, deletions, transactions, batching, pagination—the list goes on. This documentation is quite concise and easy to follow, at least partly because the facility it is documenting has itself been designed to be concise and easy to use!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/10/groovy-vs-java-sql
|
||||
|
||||
作者:[Chris Hermansen][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/clhermansen
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://opensource.com/sites/default/files/lead-images/java-coffee-beans.jpg
|
||||
[2]: https://groovy.apache.org/download.html
|
||||
[3]: https://opensource.com/article/22/9/install-jdbc-linux
|
||||
[4]: https://opensource.com/article/22/9/drop-your-database-for-postgresql
|
||||
[5]: https://docs.groovy-lang.org/latest/html/api/index.html
|
||||
[6]: https://groovy-lang.org/
|
@ -0,0 +1,146 @@
|
||||
[#]: 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: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
How to Enable Snap Support in Arch Linux
|
||||
======
|
||||
Snap is a universal package format designed by Canonical, the parent company of Ubuntu. Some people do not like Snap, but it has some advantages.
|
||||
|
||||
Often, some applications are only available in the Snap format. This gives you a good enough reason to enable snap in Arch Linux.
|
||||
|
||||
I know that AUR has a vast collection of applications but the snap apps often come directly from the developers.
|
||||
|
||||
If you want to be able to install Snap applications in Arch Linux, you need to enable snap support first.
|
||||
|
||||
There are two ways to do it:
|
||||
|
||||
* Enable Snap support using an AUR helper (easier)
|
||||
* Enable Snap support manually by getting the packages from AUR
|
||||
|
||||
Let’s see how to do it.
|
||||
|
||||
### Method 1. Use an AUR helper to enable Snap
|
||||
|
||||
Snap is available in the Arch User Repository as the *snapd* package. You can install it easily using an AUR helper.
|
||||
|
||||
There are [many AUR helpers][1] out there, but *yay* is what I prefer because it has syntax similar to the [pacman command][2].
|
||||
|
||||
If you don’t have an AUR installed already, install Yay using the command below (needs git beforehand):
|
||||
|
||||
```
|
||||
git clone https://aur.archlinux.org/yay
|
||||
|
||||
cd yay
|
||||
|
||||
makepkg -si
|
||||
```
|
||||
|
||||
![Installing yay][3]
|
||||
|
||||
Now that *yay* is installed, you can install snapd by:
|
||||
|
||||
```
|
||||
yay -Sy snapd
|
||||
```
|
||||
|
||||
![Installing snapd from AUR using yay][4]
|
||||
|
||||
Yay enables automatic updating of snapd whenever you [update your Arch Linux][5] system.
|
||||
|
||||
### Verify that snap works
|
||||
|
||||
To test if snap works fine, install and run the *hello-world* snap package.
|
||||
|
||||
```
|
||||
sudo snap install hello-world
|
||||
|
||||
hello-world
|
||||
(or)
|
||||
sudo snap run hello-world
|
||||
```
|
||||
|
||||
![The hello-world snap package executes][6]
|
||||
|
||||
If it runs fine, then you can install other snap packages easily.
|
||||
|
||||
### Method 2. Manually build the snap package from AUR
|
||||
|
||||
If you do not want to use an AUR helper, you can still get the snapd from the AUR. Let me show the detailed procedure.
|
||||
|
||||
You will need to install some build tools first.
|
||||
|
||||
```
|
||||
sudo pacman -Sy git go go-tools python-docutils
|
||||
```
|
||||
|
||||
![Installing Dependencies for snap][7]
|
||||
|
||||
Once you’re done with installing the dependencies, now you can clone the AUR directory, which goes as:
|
||||
|
||||
```
|
||||
git clone https://aur.archlinux.org/snapd
|
||||
|
||||
cd snapd
|
||||
```
|
||||
|
||||
![Cloning the repository][8]
|
||||
|
||||
Then make the snapd package:
|
||||
|
||||
```
|
||||
makepkg -si
|
||||
```
|
||||
|
||||
Enter yes when it asks to install other dependency packages.
|
||||
|
||||
![snapd manual install makepkg][9]
|
||||
|
||||
You have installed the snapd daemon. However, it needs to be enabled to auto start at boot time.
|
||||
|
||||
```
|
||||
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
|
||||
```
|
||||
|
||||
![Enable Snap at startup][10]
|
||||
|
||||
The major disadvantage of manually building a package is that you have to manually build every time a new update kicks in. Using an AUR helper solves that problem for us.
|
||||
|
||||
### Conclusion
|
||||
|
||||
I prefer pacman and AUR in Arch Linux. It’s rare to see an application that is not in AUR but available in some other formats. Still, using snap could be advantageous in some conditions where you want it directly from the source, like [installing Spotify on Arch][11] for example.
|
||||
|
||||
I hope you find this tutorial helpful. Let me know if you have any questions.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/install-snap-arch-linux/
|
||||
|
||||
作者:[Pranav Krishna][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/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/
|
@ -1,135 +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: (MareDevi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
||||
了解开放组织的新途径
|
||||
======
|
||||
通过参与两个令人兴奋的新项目来庆祝开放组织社区的六周年。
|
||||
![][1]
|
||||
|
||||
6月2日,开放组织社区庆祝其成立六周年。这是六年来的文章([上百篇][2])、书籍([一系列][3])、对话([具有启发性][4])、教学(我们所[喜欢的][5])和学习。我们非常自豪地成为一个充满活力的开放专家和领导者的社区,致力于将[开放原则][6]带到大大小小的组织。事实上,许多[开放组织大使][7]以帮助他人变得更加开放为职业,我们的社区仍然致力于帮助各行业的领导者以开放的心态和行为融入他们的社区和环境中。
|
||||
|
||||
[去年][8]是开放组织项目的一个[成长][9]和[发展][10]时期。今年,我们将在这一势头的基础上继续努力。今天,我们很自豪地介绍两项新的倡议——当然,也邀请你的参加。
|
||||
|
||||
### 开启,调整,开放
|
||||
|
||||
首先,我们很高兴地宣布:我们社区的工作有了一个全新的场所。[OpenOrgTV][11]。这不仅仅是一个新的平台。它也是另一种媒介的实验:视频。
|
||||
|
||||
在我们的频道上,我们将举办各种对话--从深层次的书评到社区圆桌会议。首先,请查看"[Open Leadership Conversations][12]"系列,其中包括对某些富有洞察力的领导者的采访,提供他们对根据开放原则进行领导的意义的观点。或者观看"[问大使][13]",我们的Q&A式写作节目,由社区专家回答你关于组织文化和设计的问题。也想参与这个节目吗?在我们的[new dedicated forum][14]中向社区成员提交你的问题。
|
||||
|
||||
整个月,我们都会介绍 [开放组织大使][15],让您终于可以看到他们的面孔并听到您多年来阅读的故事、案例研究和采访背后的声音。
|
||||
|
||||
### 定义开放式领导
|
||||
|
||||
自从我们几年前发布它以来,[开放组织定义][16] 已成为更好地理解开放组织文化和设计本质的组织指导框架(并且我们已经做了很多工作来[教导其他人] [17])。 随着时间的推移,我们甚至开发了 [一个成熟度模型][18] 来操作该定义,因此组织可以评估自己的开放程度并制定具体计划以变得 _更加_ 开放。
|
||||
|
||||
现在,我们认为是时候将这项工作更进一步了。
|
||||
|
||||
但是,开放组织社区不仅仅是平台、工具或项目的任何组合。它是所有人都热情地一起工作,以帮助传播开放原则和实践。
|
||||
|
||||
受我们自己经验、[Red Hat][19]和[Mozilla][20]等开放组织已有的框架、多年研究和采访该领域的开放领袖的启发,以及我们对更好地理解开放领导力如何 _真正_ 发挥作用的渴望,我们很高兴公布一份全新文件的早期草案:开放领导力定义(the Open Leadership Definition)。
|
||||
|
||||
本文档概述了建立开放型组织并使其成为思想开放的人能够成长和茁壮成长的地方的各类领导者所特有的心态和行为。它建立在开放型组织定义的基础上,解释了开放型领导者如何体现和倡导开放型组织的特征,如透明度、包容性、适应性、协作性和社区性。
|
||||
|
||||
而且我们渴望与世界分享。
|
||||
|
||||
从今天开始(在接下来的两周内),我们将收集您对我们文件草案的见解和意见。我们渴望听到您的想法,并将接受您的意见的 _整体_ 或片段。您可以对文件的个别部分或整个文件提出意见。请查看下面的链接。我们期待着听到您的意见。
|
||||
|
||||
* * *
|
||||
|
||||
####
|
||||
|
||||
![Open Leadership Definition word cloud][21]
|
||||
|
||||
_Laura Hiliger 提供的的开放式领导定义词云 (CC BY-SA)_
|
||||
|
||||
#### 开放式领导定义
|
||||
|
||||
[Open Leadership: 简介][22]
|
||||
|
||||
[Open Leadership: 透明度][23]
|
||||
|
||||
[Open Leadership: 包容性][24]
|
||||
|
||||
[Open Leadership: 适应性][25]
|
||||
|
||||
[Open Leadership: 协作][26]
|
||||
|
||||
[Open Leadership: 社区][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)
|
||||
校对:[校对者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
|
195
translated/tech/20210721 Write your first web component.md
Normal file
195
translated/tech/20210721 Write your first web component.md
Normal file
@ -0,0 +1,195 @@
|
||||
[#]: 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: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
||||
开发第一个 Web 组件
|
||||
======
|
||||
不要做重复的工作;
|
||||
基于浏览器开发 Web App 时,需要制作一些可重用的模块。
|
||||
![Digital creative of a browser on the internet][1]
|
||||
|
||||
Web 组件是一系列开源技术(例如 JavaScript 和 HTML),你可以用它创建一些 Web App 中可重用的自定义元素。你创建的组件是独立于其他代码的,所以这些组件可以方便地在多个项目中重用。
|
||||
|
||||
首先,它是一个平台标准,所有主流的浏览器都支持它。
|
||||
|
||||
### Web 组件中包含什么?
|
||||
|
||||
* **定制元素:** 支持定义HTML元素的新类别。
|
||||
* **Shadow DOM:** 提供一种将一个隐藏的、独立的[文档对象模型][2] (DOM) 附加到一个元素的方法。它通过保留从页面的其他代码分离出来的样式、标记结构和行为特征对 Web 组件进行封装。它确保 Web 组件内样式不会被外部样式覆盖,反之亦然,Web 组件内样式也不会“泄露”到页面的其他部分。
|
||||
* **HTML 模板:** 支持定义可重用的 DOM 元素。可重用 DOM 元素和它的内容不会呈现在 DOM 内,但仍然可以通过 JavaScript 被引用。
|
||||
|
||||
|
||||
|
||||
### 开发你的第一个 Web 组件
|
||||
|
||||
你可以借助你最喜欢的文本编辑器和 JavaScript 写一个简单的 Web 组件。本指南使用引导程序生成简单的样式,并创建一个简易的卡片式的 Web 组件,给定了位置信息,该组件就能显示该位置的温度。组件使用了 [Open Weather API][3],你需要先注册,然后创建 APPID/APIKey,才能正常使用。
|
||||
|
||||
调用该组件,需要给出位置的经度和纬度:
|
||||
|
||||
|
||||
```
|
||||
`<weather-card longitude='85.8245' latitude='20.296' />`
|
||||
```
|
||||
|
||||
创建一个名为 **weather-card.js** 的文件,这个文件包含 Web 组件的所有代码。首先,需要定义你的组件,创建一个模板元素,并在其中加入一些简单的 HTML 标签:
|
||||
|
||||
|
||||
```
|
||||
const template = document.createElement('template');
|
||||
|
||||
template.innerHTML = `
|
||||
<div class="card">
|
||||
<div class="card-body"></div>
|
||||
</div>
|
||||
`
|
||||
```
|
||||
|
||||
定义 WebComponent 类及其构造函数:
|
||||
|
||||
|
||||
```
|
||||
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\\`][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);
|
||||
}
|
||||
```
|
||||
|
||||
一旦获取到天气数据,附加的 HTML 元素就添加进了模板。至此,完成了类的定义。
|
||||
|
||||
最后,使用 `window.customElements.define` 方法定义并注册一个新的自定义元素:
|
||||
|
||||
|
||||
```
|
||||
`window.customElements.define('weather-card', WeatherCard);`
|
||||
```
|
||||
|
||||
其中,第一个参数是自定义元素的名称,第二个参数是所定义的类。这里是[整个组件的链接][5]。
|
||||
|
||||
你的第一个 Web 组件的代码已完成!现在应该把它放入 DOM。为了把它放入 DOM,你需要在 HTML 文件(**index.html**)中载入指向 Web 组件的 JavaScript 脚本。
|
||||
|
||||
|
||||
```
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<weather-card longitude='85.8245' latitude='20.296'/>
|
||||
<script src='./weather-card.js'></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
```
|
||||
|
||||
这就是显示在浏览器中的 Web 组件:
|
||||
|
||||
![Web component displayed in a browser][6]
|
||||
|
||||
(Ramakrishna Pattnaik, [CC BY-SA 4.0][7])
|
||||
|
||||
由于 Web 组件中只包含 HTML、CSS 和 JavaScript,它们本来就是浏览器所支持的,并且可以无瑕疵地跟前端框架(例如 React 和 Vue)一同使用。下面这段简单的代码展现的是它跟一个由 [Create React App] 引导的一个简单的 React App 的整合方法。如果你需要,可以引入前面定义的 **weather-card.js**,把它作为一个组件使用:
|
||||
|
||||
|
||||
```
|
||||
import './App.css';
|
||||
import './weather-card';
|
||||
|
||||
function App() {
|
||||
return (
|
||||
<weather-card longitude='85.8245' latitude='20.296'></weather-card>
|
||||
);
|
||||
}
|
||||
|
||||
export default App;
|
||||
```
|
||||
|
||||
### Web 组件的生命周期
|
||||
|
||||
一切组件都遵循从初始化到移除的生命周期法则。每个生命周期事件都有相应的方法,你可以借助这些方法令组件更好地工作。Web 组件的生命周期事件包括:
|
||||
|
||||
* **Constructor:** Web 组件的构造函数在它被挂载前调用,意味着在元素附加到文档对象前被创建。它用于初始化本地状态、绑定事件处理器以及创建 Shadow 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 的老手,还是初学者,无论你的目标客户使用哪种浏览器,借助这种开源标准创建可重用的代码都是一件可以轻松完成的事。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/7/web-components
|
||||
|
||||
作者:[Ramakrishna Pattnaik][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[cool-summer-021](https://github.com/cool-summer-021)
|
||||
校对:[校对者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/
|
@ -1,123 +0,0 @@
|
||||
[#]: 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: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
如何在 CentOS、RHEL、Rocky Linux 最小安装中设置互联网
|
||||
======
|
||||
在最小的服务器安装中设置互联网或网络非常容易。本指南将解释如何在 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 窗口中的编辑连接。
|
||||
|
||||
![nmtui - 选择选项][3]
|
||||
|
||||
* 选择接口名称
|
||||
|
||||
![选择要编辑的接口][4]
|
||||
|
||||
* 在编辑连接窗口中,为 IPv4 和 IPv6 选择自动。并选择自动连接。完成后按 OK。
|
||||
|
||||
![nmtui - 编辑连接][5]
|
||||
|
||||
* 使用以下命令通过 [systemd systemctl][6] 重启 NetworkManager 服务。
|
||||
|
||||
```
|
||||
systemctl restart NetworkManager
|
||||
```
|
||||
|
||||
* 如果一切顺利,你可以在最小安装的 CentOS、RHEL 和 Rocky Linux 服务器中连接到网络和互联网。前提是你的网络有互联网连接。你可以使用 ping 来验证它是否正常工作。
|
||||
|
||||
![设置最小化服务器互联网 - CentOS Rocky Linux RHEL][7]
|
||||
|
||||
### 附加技巧:在最小化服务器中设置静态 IP
|
||||
|
||||
当你将网络配置设置为自动时,接口会在你连接到互联网时动态分配 IP。在你设置局域网 (LAN) 的某些情况下,你可能希望将静态 IP 分配给你的网络接口。这非常容易。
|
||||
|
||||
打开你的网络配置脚本。将高亮部分设置为你自己的设备。
|
||||
|
||||
```
|
||||
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` 的 `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)
|
||||
校对:[校对者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://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
|
@ -0,0 +1,205 @@
|
||||
[#]: 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: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
# Arch Linux 中用于包管理的 GUI 应用
|
||||
|
||||
[安装 Arch Linux][1] 被认为具有挑战性。这就是为什么[有几个基于 Arch 的发行版][2]通过提供图形化的安装程序使事情变得简单。
|
||||
|
||||
即使你设法安装了 Arch Linux,你也会注意到它严重依赖命令行。如果你需要安装应用或更新系统,那么必须打开终端。
|
||||
|
||||
是的! Arch Linux 没有软件中心。我知道,这让很多人感到震惊。
|
||||
|
||||
如果你对使用命令行管理应用感到不舒服,你可以安装一个 GUI 工具。这有助于在舒适的 GUI 中搜索包以及安装和删除它们。
|
||||
|
||||
想知道你应该使用 [pacman 命令][3]的哪个图形前端?我有一些建议可以帮助你入门。
|
||||
|
||||
**请注意,某些软件管理器是特定于桌面环境的。**
|
||||
|
||||
### 1. Apper
|
||||
|
||||
![使用 Apper 安装 Firefox][4]
|
||||
|
||||
Apper 是使用 PackageKit 的最小化 Qt5 应用和包管理器,它还支持 AppStream 和自动更新。但是,**没有 AUR 支持**。
|
||||
|
||||
要从官方仓库安装它,请使用以下命令。
|
||||
|
||||
```
|
||||
sudo pacman -Syu apper
|
||||
```
|
||||
|
||||
[GitLab 上的应用][5]
|
||||
|
||||
### 2. 深度应用商店
|
||||
|
||||
![使用深度应用商店安装 Firefox][6]
|
||||
|
||||
深度应用商店是深度桌面环境的应用商店,使用 DTK(QT5)构建,使用 PackageKit,支持 AppStream,同时提供系统更新通知。 **没有 AUR 支持**。
|
||||
|
||||
要安装它,请使用以下命令。
|
||||
|
||||
```
|
||||
sudo pacman -Syu deepin-store
|
||||
```
|
||||
|
||||
[Github 上的深度商店][7]
|
||||
|
||||
### 3. Discover
|
||||
|
||||
![使用 Discover 安装 Firefox][8]
|
||||
|
||||
Discover 不需要为 KDE Plasma 用户介绍。它是一个使用 PackageKit 的基于 Qt 的应用管理器,支持 AppStream、Flatpak 和固件更新。
|
||||
|
||||
为了安装 Flatpak 和固件更新,需要分别安装 Discover 的 `flatpak` 和 `fwupd` 包。
|
||||
|
||||
它没有 AUR 支持。
|
||||
|
||||
```
|
||||
sudo pacman -Syu discover packagekit-qt5
|
||||
```
|
||||
|
||||
[GitLab 上的 Discover][9]
|
||||
|
||||
### 4. GNOME PackageKit
|
||||
|
||||
![Installing Firefox using GNOME PackageKit][10]
|
||||
|
||||
GNOMEPackageKit 是一个使用 PackageKit 的 GTK3 包管理器,支持 AppStream。不幸的是,**没有 AUR 支持**。
|
||||
|
||||
要从官方仓库安装它,请使用以下命令。
|
||||
|
||||
```
|
||||
sudo pacman -Syu gnome-packagekit
|
||||
```
|
||||
|
||||
[freedesktop 上的 PackageKit][11]
|
||||
|
||||
### 5. GNOME 软件
|
||||
|
||||
![Installing Firefox using GNOME Software][12]
|
||||
|
||||
GNOME 软件不需要向 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]
|
||||
|
||||
### 总结
|
||||
|
||||
要删除任何上面 GUI 包管理器以及依赖项和配置文件,请使用以下命令将 _packagename_ 替换为要删除的包的名称。
|
||||
|
||||
```
|
||||
sudo pacman -Rns packagename
|
||||
```
|
||||
|
||||
这样看来,Arch Linux 也可以在不接触终端的情况下使用合适的工具。
|
||||
|
||||
还有一些其他应用程序也使用终端用户界面 (TUI)。一些例子是 [pcurses][25]、[cylon][26]、[pacseek][27] 和 [yup][28]。但是,这篇文章只讨论那些有适当的 GUI 的软件。
|
||||
|
||||
**注意:** PackageKit 默认打开系统权限,否则[不推荐][29]用于一般用途。因为如果用户是 wheel 组的一部分,更新或安装任何软件都不需要密码。
|
||||
|
||||
**你看到了在 Arch Linux 上使用 GUI 软件中心的几种选择。现在是时候决定使用其中一个了。你会选择哪一个?Pamac 或 OctoPi 还是其他?现在就在下面留言吧**。
|
||||
|
||||
---
|
||||
|
||||
via: https://itsfoss.com/arch-linux-gui-package-managers/
|
||||
|
||||
作者:[Anuj Sharma][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/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/apper-arch-install-firefox.png
|
||||
[7]: https://github.com/dekzi/dde-store
|
||||
[8]: https://itsfoss.com/wp-content/uploads/2022/09/apper-arch-install-firefox.png
|
||||
[9]: https://invent.kde.org/plasma/discover
|
||||
[10]: https://itsfoss.com/wp-content/uploads/2022/09/apper-arch-install-firefox.png
|
||||
[11]: https://freedesktop.org/software/PackageKit/index.html
|
||||
[12]: https://itsfoss.com/wp-content/uploads/2022/09/apper-arch-install-firefox.png
|
||||
[13]: https://gitlab.gnome.org/GNOME/gnome-software
|
||||
[14]: https://itsfoss.com/wp-content/uploads/2022/09/apper-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/apper-arch-install-firefox.png
|
||||
[20]: https://github.com/aarnt/octopi
|
||||
[21]: https://itsfoss.com/wp-content/uploads/2022/09/apper-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
|
@ -1,102 +0,0 @@
|
||||
[#]: 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: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
用这个开源工具从任何网站获取变化提醒
|
||||
======
|
||||
使用 changeetection.io 在网站发生变化或更新时获得提醒。
|
||||
|
||||
![Browser of things][1]
|
||||
|
||||
那一年是 2020 年,关于 COVID-19 的消息迅速涌来,每个人都感到完全被只是提供了不同程度的更新的类似新闻所淹没,。
|
||||
|
||||
但我需要知道的是,我的官方政府准则何时改变。最后,这就是对我来说最重要的事情。
|
||||
|
||||
无论关注的是大流行病还是最新的科技新闻,提前了解网站内容的变化都至关重要。
|
||||
|
||||
[changedetection.io][2] 项目为网站变更检测和通知提供了一个简单但强大的开源解决方案。它很容易设置,而且可以通知 70 多个不同的通知系统,如 Matrix、Mattermost、[Nextcloud][3]、[Signal][4]、[Zulip][5]、[Home Assistant][6]、电子邮件等等。它还能通知专有应用,如 Discord、Office365、Reddit、Telegram 和许多其他应用。
|
||||
|
||||
但 [changeetection.io][7] 并不只是局限于观察监测内容。你也可以监视 XML 和 JSON 源,它将建立一个 RSS 源,记录变化的网站。
|
||||
|
||||
由于其内置的 JSON 简单存储系统,不需要设置复杂的数据库来接收和存储信息。你可以[使用 Docker 镜像运行][8]或用 `pip` 安装它。该项目有一个[全面的维基帮助页][9],大多数常见的问题都有涵盖。
|
||||
|
||||
对于使用复杂 JavaScript 的网站,你可以用内置的 [Playwright 内容获取器][10]将你的 changeetection.io 安装到 Chromium 或 Chrome 浏览器。
|
||||
|
||||
运行后,在你的浏览器(默认情况下是 `http://localhost:5000`)中访问该应用。如果你的电脑可以从外部网络访问,你可以在**设置**中设置一个密码。
|
||||
|
||||
![change detection watch list][11]
|
||||
|
||||
提交你想监控的页面的 URL。有几个设置与如何过滤该网页有关。例如,你很可能不想知道一家公司在其网站页脚列出的股票价格何时发生变化,但你可能想知道他们在其博客上发布的新闻文章。
|
||||
|
||||
### 监控一个网站
|
||||
|
||||
想象一下,你想添加你最喜欢的网站 Opensource.com 进行监控。 你只想知道主要标注文章何时包含 “python” 一词,并且通过 Matrix 收到通知。
|
||||
|
||||
要做到这点,首先要使用**视觉选择器**工具。(这需要连接 **playwright** 浏览器界面)。
|
||||
|
||||
![Find an element to monitor][12]
|
||||
|
||||
**视觉选择器**工具会自动计算出针对内容的最佳 Xpath 或 CSS 过滤器。否则,你会从每天的页面更新中得到大量的噪音。
|
||||
|
||||
接下来,访问**过滤器和触发器**标签。
|
||||
|
||||
![Filters and triggers][13]
|
||||
|
||||
在 **CSS/JSON/XPATH 过滤器**区域(蓝色圆圈),你可以看到上一步自动生成的 CSS 过滤器。
|
||||
|
||||
有几个有用的过滤器,比如**移除元素**(适合移除嘈杂的元素),**忽略文本,触发/等待文本**,和**如果文本匹配则阻止变化检测**(用于等待一些文本消失,如“售罄”)。
|
||||
|
||||
在**触发/等待文本**(红色圆圈)中,输入你想监测的关键词。(在这个例子中是 “python”)。
|
||||
|
||||
最后一步是在**通知**选项卡中,你要在那里配置你想收到的通知。下面我使用 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)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [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
|
@ -7,37 +7,38 @@
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
How to Enable RPM Fusion Repo in Fedora, CentOS, RHEL
|
||||
如何在 Fedora、CentOS、RHEL 中启用 RPM Fusion 仓库
|
||||
======
|
||||
This guide explains the steps to enable third-party software repository RPM Fusion in Fedora Linux Distribution.
|
||||
本指南解释了在 Fedora Linux 发行版中启用第三方软件仓库 RPM Fusion 的步骤。
|
||||
|
||||
The [RPM Fusion][1] software repo is a community-maintained software repo that provides additional packages for Fedora Linux which is not distributed by the official Fedora team such as DVD playback, media playback, software from GNOME and KDE work, etc. This is because of licensing, other legal reasons, and country-specific software norms.
|
||||
[RPM Fusion][1] 软件仓库是一个社区维护的软件仓库,它为 Fedora Linux 提供额外的软件包,这些软件包不是由 Fedora 官方团队分发,例如 DVD 播放、媒体播放、来自 GNOME 和 KDE 的软件等。这是因为许可、其他法律原因和特定国家/地区的软件规范。
|
||||
|
||||
The RPM Fusion provides .rpm packages for Red Hat Enterprise Linux as well alongside Fedora.
|
||||
RPM Fusion 为 Red Hat Enterprise Linux 以及 Fedora 提供了 .rpm 包。
|
||||
|
||||
This guide explains the steps you need to enable the RPM Fusion repo in Fedora Linux. This guide applies to all Fedora release versions.
|
||||
本指南介绍了在 Fedora Linux 中启用 RPM Fusion 仓库所需的步骤。本指南适用于所有 Fedora 发行版本。
|
||||
|
||||
This is tested in all the current supported Fedora versions – 35, 36 and 37.
|
||||
这在所有当前支持的 Fedora 版本(35、36 和 37)中进行了测试。
|
||||
|
||||
![RPM Fusion][2]
|
||||
|
||||
### How to Enable RPM Fusion Repo in Fedora Linux, RHEL, CentOS
|
||||
### 如何在 Fedora Linux、RHEL、CentOS 中启用 RPM Fusion 仓库
|
||||
|
||||
RPM Fusion has two flavours of the repo. Free and non-Free.
|
||||
RPM Fusion 有两种版本的仓库:自由和非自由。
|
||||
|
||||
The Free one, as its name says, contains a free version of software packages and the non-free ones contain compiled packages of closed source and “non-commercial” open-source software.
|
||||
顾名思义,自由版包含软件包的自由版本,非自由版包含封闭源代码和“非商业”开源软件的编译软件包。
|
||||
|
||||
Before you proceed, first check whether you have RPM fusion installed. Open up a terminal and run the below command.
|
||||
在继续之前,首先检查你是否安装了 RPM fusion。打开终端并运行以下命令。
|
||||
|
||||
```
|
||||
dnf repolist | grep rpmfusion
|
||||
```
|
||||
|
||||
If RPM is installed, you should see a message like the one below. Then no need to proceed at all. If it is not installed, you may proceed with the following steps.
|
||||
|
||||
![RPM-Fusion-Already-Installed-][3]
|
||||
如果安装了 RPM,你应该会看到如下所示的消息。就不用下面的步骤。如果未安装,你可以继续执行以下步骤。
|
||||
|
||||
Open a terminal and run the below commands as per your operating system versions. Please note that the commands contain both a free and non-free version. If you want, you can omit either one from below while running.
|
||||
![RPM Fusion 已安装][3]
|
||||
|
||||
打开终端并根据你的操作系统版本运行以下命令。请注意,这些命令包含自由和非自由版本。如果你愿意,你可以在运行时省略下面的任何一个。
|
||||
|
||||
#### Fedora
|
||||
|
||||
@ -49,7 +50,7 @@ sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-rele
|
||||
sudo dnf install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
|
||||
```
|
||||
|
||||
#### Silverblue with rpm-ostree
|
||||
#### 带 rpm-ostree 的 Silverblue
|
||||
|
||||
```
|
||||
sudo rpm-ostree install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
|
||||
@ -95,15 +96,15 @@ sudo dnf install --nogpgcheckhttps://download1.rpmfusion.org/nonfree/el/rpmfusio
|
||||
sudo dnf config-manager --enable PowerTools
|
||||
```
|
||||
|
||||
### Additional Instructions
|
||||
### 附加说明
|
||||
|
||||
* RPM Fusion also provides to help users install packages from GNOME Software or KDE Discover. To enable it in Fedora, run the below command.
|
||||
* RPM Fusion 还提供帮助用户安装来自 GNOME 软件或 KDE Discover 的软件包。要在 Fedora 中启用它,请运行以下命令。
|
||||
|
||||
```
|
||||
sudo dnf groupupdate core
|
||||
```
|
||||
|
||||
* You can also enable RPM Fusion to play multimedia files that use gstreamer, and additional multimedia playback packages via the below command.
|
||||
* 你还可以通过以下命令启用 RPM Fusion 来使用 gstreamer 和其他多媒体播放包来播放媒体文件。
|
||||
|
||||
```
|
||||
sudo dnf groupupdate multimedia --setop="install_weak_deps=False" --exclude=PackageKit-gstreamer-plugin
|
||||
@ -113,53 +114,53 @@ sudo dnf groupupdate multimedia --setop="install_weak_deps=False" --exclude=Pack
|
||||
sudo dnf groupupdate sound-and-video
|
||||
```
|
||||
|
||||
* Enable RPM Fusion to play a DVD that uses libdvdcss.
|
||||
* 启用 RPM Fusion 以使用 libdvdcss 播放 DVD。
|
||||
|
||||
```
|
||||
sudo dnf install rpmfusion-free-release-taintedsudo dnf install libdvdcss
|
||||
```
|
||||
|
||||
* Enable RPM Fusion to enable non-FLOSS hardware packages via the below command.
|
||||
* 通过以下命令启用 RPM Fusion 以启用非 FLOSS 硬件包。
|
||||
|
||||
```
|
||||
sudo dnf install rpmfusion-nonfree-release-taintedsudo dnf install *-firmware
|
||||
```
|
||||
|
||||
After running the commands, if you are using Fedora or CentOS/RHEL – run the below commands before rebooting.
|
||||
运行命令后,如果你使用的是 Fedora 或 CentOS/RHEL,请在重启前运行以下命令。
|
||||
|
||||
```
|
||||
sudo dnf check-updatesudo dnf update
|
||||
```
|
||||
|
||||
### How to remove repo using dnf
|
||||
### 如何使用 dnf 删除仓库
|
||||
|
||||
If you want to remove the repository, follow the steps below.
|
||||
如果要删除仓库,请按照以下步骤操作。
|
||||
|
||||
First, check using the below command to view the repo list added to your Fedora system.
|
||||
首先,使用以下命令查看添加到 Fedora 系统的仓库列表。
|
||||
|
||||
```
|
||||
dnf repolist
|
||||
```
|
||||
|
||||
![dnf repolist][4]
|
||||
![dnf 仓库列表][4]
|
||||
|
||||
As you can see, both rpmfusion free and non-free repo is added. To remove it via dnf, you need to know precisely the repo file name using the following command.
|
||||
如你所见,添加了 rpmfusion 自由和非自由仓库。要通过 dnf 删除它,你需要使用以下命令准确知道仓库文件名。
|
||||
|
||||
```
|
||||
rpm -qa 'rpmfusion*'
|
||||
```
|
||||
|
||||
This would list the exact name of the repo. In the example, they are ‘rpmfusion-free-release’.
|
||||
这将列出仓库的确切名称。在示例中,它们是 “rpmfusion-free-release”。
|
||||
|
||||
![remove rpmfusion from fedora][5]
|
||||
![从 Fedora 中移除 rpmfusion][5]
|
||||
|
||||
Now you can simply run the below command to remove it.
|
||||
现在你可以简单地运行以下命令来删除它。
|
||||
|
||||
```
|
||||
sudo dnf remove rpmfusion-free-release
|
||||
```
|
||||
|
||||
You can repeat the above example to remove rpmfusion from Fedora, also, use this to remove any other repo from your system.
|
||||
你可以重复上面的例子从 Fedora 中删除 rpmfusion,也可以使用它从系统中删除任何其他仓库。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
@ -167,7 +168,7 @@ via: https://www.debugpoint.com/enable-rpm-fusion-fedora-rhel-centos/
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
@ -0,0 +1,215 @@
|
||||
[#]: 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: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
# 如何在 Linux 中逐步创建 LVM 分区
|
||||
|
||||
在本指南中,我们将逐步介绍如何在 Linux 中创建 lvm 分区。
|
||||
|
||||
LVM 代表逻辑卷管理,它是专门为服务器管理 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 上创建 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(卷组)
|
||||
|
||||
要创建卷组,我们将使用 vgcreate 命令。创建 VG 意味着将 pv 添加到卷组。
|
||||
|
||||
语法:
|
||||
|
||||
```
|
||||
$ sudo vgcreare <vg_name> <pv>
|
||||
```
|
||||
|
||||
在我们的例子中,命令是:
|
||||
|
||||
```
|
||||
$ 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) 已成功创建,一个物理扩展 (PE) 的大小为 4 MB。创建 vg 时可以更改 PE 大小。
|
||||
|
||||
### 步骤 4)创建 LV(逻辑卷)
|
||||
|
||||
Lvcreate 命令用于从 VG 创建 LV。 lvcreate 命令的语法如下所示:
|
||||
|
||||
```
|
||||
$ sudo lvcreate -L <Size-of-LV> -n <LV-Name> <VG-Name>
|
||||
```
|
||||
|
||||
在我们的例子中,以下命令将用于创建大小为 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)
|
||||
校对:[校对者 ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [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
|
Loading…
Reference in New Issue
Block a user