Merge branch 'master' of https://github.com/LCTT/TranslateProject into translating

This commit is contained in:
geekpi 2022-07-13 08:25:35 +08:00
commit 5621e55a5f
21 changed files with 2173 additions and 774 deletions

View File

@ -4,41 +4,40 @@
[#]: collector: "lkxed"
[#]: translator: "robsean"
[#]: reviewer: "turbokernel"
[#]: publisher: " "
[#]: url: " "
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14819-1.html"
Linux 静态链接工作原理
Linux 静态链接工作原理
======
学习如何将多个 C <ruby>对象<rt>object</rt></ruby> 文件组合到一个带有静态库的单个可执行文件文件之中。
![Woman using laptop concentrating][1]
![](https://img.linux.net.cn/data/attachment/album/202207/12/120441y0q5a5abfyjyy7ug.jpg)
图片作者Mapbox Uncharted ERG, [CC-BY 3.0 US][2]
> 学习如何用静态链接库将多个 C 目标文件结合到一个单个的可执行文件之中。
使用 C 编写的应用程序时,通常有多个源码文件,但最终需要编译成单个的可执行文件。
使用 C 编写的应用程序时,通常有多个源码文件,但最终需要编译成单个的可执行文件。
你可以通过两种方式来完成这项工作:通过创建一个 <ruby>静态<rt>static</rt></ruby> 库 或 一个 <ruby>动态<rt>dynamic</rt></ruby> (也被称为 <ruby>共享<rt>shared</rt></ruby>)。从创建和链接的方式来看,它们是两种不同类型的库。选择使用哪种方式取决于你的的具体场景。
你可以通过两种方式来完成这项工作:通过创建一个 <ruby>静态<rt>static</rt></ruby> 库 或 一个 <ruby>动态<rt>dynamic</rt></ruby>也被称为 <ruby>共享<rt>shared</rt></ruby>。从创建和链接的方式来看,它们是两种不同类型的库。选择使用哪种方式取决于你的的具体场景。
在 [上一篇文章][3] 中,我演示了如何创建一个动态链接的可执行文件,这是一种更通用的方法。在这篇文章中,我将说明如何创建一个静态链接的可执行文件。
### 使用静态库链接器
链接器是一个命令,它将一个程序的多个部分组合,并为它们重新组织存储器分配。
<ruby>链接器<rt>linker</rt></ruby>是一个命令,它将一个程序的多个部分结合在一起,并为它们重新组织内存分配。
链接器的功能包括:
* 集成一个程序的所有的部分
* 装配一个新的存储器结构,以便所有的部分组合在一起
* 恢复存储器地址,以便程序可以在新的存储器组织下运行
* 整合一个程序的所有的部分
* 计算出一个新的内存组织结构,以便所有的部分组合在一起
* 恢复存地址,以便程序可以在新的存组织结构下运行
* 解析符号引用
经过这些链接器功能,创建了一个名称为可执行文件的一个可运行程序。
链接器通过这些功能,创建了一个名称为可执行文件的一个可运行程序。
静态库是通过复制一个程序中的所有依赖库模块到最终的可执行镜像来创建的。链接器将链接静态库作为编译过程的最后一步。可执行文件是通过解析外部引用、库实例程序与程序代码组合来创建的。
静态库是通过复制一个程序中的所有依赖库模块到最终的可执行镜像来创建的。链接器将链接静态库作为编译过程的最后一步。可执行文件是通过解析外部引用、将库例程与程序代码结合在一起来创建的。
### 创建对象文件
### 创建目标文件
这里是一个静态库的示例以及其链接过程。首先,创建带有这些函数识别标志的头文件 `mymath.h` :
这里是一个静态库的示例以及其链接过程。首先,创建带有这些函数识别标志的头文件 `mymath.h` :
```
int add(int a, int b);
@ -47,7 +46,7 @@ int mult(int a, int b);
int divi(int a, int b);
```
使用这些函数定义来创建 `add.c` 、`sub.c` 、`mult.c` 和 `divi.c` 文件:
使用这些函数定义来创建 `add.c` 、`sub.c` 、`mult.c` 和 `divi.c` 文件。我将把所有的代码都放置到一个代码块中,请将其分为四个文件,如注释所示
```
// add.c
@ -71,15 +70,17 @@ return (a/b);
}
```
现在,使用 GCC 来生成对象文件 `add.o` 、`sub.o` 、`mult.o` 和 `divi.o` :
现在,使用 GCC 来生成目标文件 `add.o` 、`sub.o` 、`mult.o` 和 `divi.o`
LCTT 校注:关于“<ruby>目标文件<rt>object file</rt></ruby>”,有时候也被称作“对象文件”,对此,存在一些译法混乱情形,称之为“目标文件”的译法比较流行,本文采用此译法。)
```
$ gcc -c add.c sub.c mult.c divi.c
```
`-c` 选项跳过链接步骤,并且只创建对象文件。
`-c` 选项跳过链接步骤,而只创建目标文件。
创建一个名称为 `libmymath.a` 的静态库,接下来,移除对象文件,因为它们不再被需要。(注意,使用一个 `trash` 命令比使用一个 `rm` 命令更安全。)
创建一个名称为 `libmymath.a` 的静态库,接下来,移除目标文件,因为它们不再被需要。(注意,使用一个 `trash` 命令比使用一个 `rm` 命令更安全。)
```
$ ar rs libmymath.a add.o sub.o mult.o divi.o
@ -88,7 +89,7 @@ $ ls
add.c  divi.c  libmymath.a  mult.c  mymath.h  sub.c
```
现在,你已经创建了一个简单的名称为 `libmymath` 是数学示例库,你可以在 C 代码中使用它。当然,这里有非常复杂的 C 库,这就是开发者们用于开发最终产品的过程,你和我可以安装这些库并在 C 代码中使用。
现在,你已经创建了一个名称为 `libmymath` 的简单数学示例库,你可以在 C 代码中使用它。当然,也有非常复杂的 C 库,这就是他们这些开发者来生成最终产品的工艺流程,你和我可以安装这些库并在 C 代码中使用。
接下来,在一些自定义代码中使用你的数学库,然后链接它。
@ -129,9 +130,9 @@ int main()
$ gcc -I . -c mathDemo.c
```
`-I` 选项告诉 GCC 搜索在其后列出的头文件。在这个实例中,你通过单个点 (`.` ) 来指定当前目录。
`-I` 选项告诉 GCC 搜索在其后列出的头文件。在这个实例中,你通过单个点`.`来指定当前目录。
`mathDemo.o``libmymath.a` 来生成最终的可执行文件。这里有两种方法来向 GCC 表达这一点。
`mathDemo.o``libmymath.a` 来生成最终的可执行文件。这里有两种方法来向 GCC 告知这一点。
你可以指向文件:
@ -145,7 +146,7 @@ $ gcc -static -o mathDemo mathDemo.o libmymath.a
$ gcc -static -o mathDemo -L . mathDemo.o -lmymath
```
在后面的那个示例中,`-lmymath` 选项告诉链接器来链接随对象文件 `mathDemo.o` 中的对象文件 `libmymath.a` 来生成最终的可执行文件。`-L` 选项指示链接器在下面的参数中查找库 (类似于你使用 `-I` 所做的工作)
在后面的那个示例中,`-lmymath` 选项告诉链接器来链接对象文件 `mathDemo.o`对象文件 `libmymath.a` 来生成最终的可执行文件。`-L` 选项指示链接器在下面的参数中查找库(类似于你使用 `-I` 所做的工作)
### 分析结果
@ -171,7 +172,7 @@ $ du -h ./mathDemo
932K    ./mathDemo
```
在我 [前一篇文章][5] 的示例中,动态链接的可执行文件只占有 24K 大小。
在我 [前一篇文章][3] 的示例中,动态链接的可执行文件只占有 24K 大小。
运行该命令来看看它的工作内容:
@ -193,7 +194,7 @@ Enter two numbers
动态链接可执行文件通常优于静态链接可执行文件,因为动态链接会保持应用程序的组件模块化。假如一个库接收到一次关键安全更新,那么它可以很容易地修补,因为它存在于应用程序的外部。
当你使用静态链接时,库的代码会 "隐藏" 在你创建的可执行文件之中,意味着在库每次更新时(相信我,你会有更好的东西),仅有的一种修补方法是重新编译和发布一个新的可执行文件。
当你使用静态链接时,库的代码会“隐藏”在你创建的可执行文件之中,意味着在库每次更新时(相信我,你会有更好的东西),仅有的一种修补方法是重新编译和发布一个新的可执行文件。
不过,如果一个库的代码,要么存在于它正在使用的具有相同代码的可执行文件中,要么存在于不会接收到任何更新的专用嵌入式设备中,那么静态连接将是一种可接受的选项。
@ -212,6 +213,6 @@ via: https://opensource.com/article/22/6/static-linking-linux
[b]: https://github.com/lkxed
[1]: https://opensource.com/sites/default/files/lead-images/lenovo-thinkpad-laptop-concentration-focus-windows-office.png
[2]: https://creativecommons.org/licenses/by/3.0/us/
[3]: https://opensource.com/article/22/5/dynamic-linking-modular-libraries-linux
[3]: https://linux.cn/article-14813-1.html
[4]: https://www.redhat.com/sysadmin/recover-file-deletion-linux
[5]: https://opensource.com/article/22/5/dynamic-linking-modular-libraries-linux

View File

@ -3,14 +3,14 @@
[#]: author: "The Linux Foundation https://www.linuxfoundation.org/blog/google-summer-of-code-zephyr-rtos/"
[#]: collector: "lkxed"
[#]: translator: "lkxed"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14818-1.html"
谷歌编程之夏与 Zephyr RTOS 项目介绍
======
**谷歌编程之夏**GSoC是一个谷歌举办的国际年度项目每年都在夏季举办。当贡献者们参与并完成一个 [自由开源软件][3] 的编码项目,[谷歌][1] 就会给他们发放 [津贴][2]。谷歌编程之夏于 2005 年推出,于 5 月至 8 月举行。项目创意由参与开源软件开发的主办组织提交,但学生也可以提出自己的项目创意。
**谷歌编程之夏**GSoC是一个谷歌举办的国际年度项目每年都在夏季举办。当贡献者们参与并完成一个 [自由开源软件][3] 的编码项目,[谷歌][1] 就会给他们发放 [津贴][2]。谷歌编程之夏于 2005 年推出,于每年 5 月至 8 月举行。项目创意由参与开源软件开发的主办组织提交,但学生也可以提出自己的项目创意。
今年,该项目向 18 岁或以上的任何人开放 —— 不仅限于学生和应届毕业生了。参与者通过编写软件获得报酬,其 [津贴][4] 的金额取决于他们所在国家/地区的 [购买力平价][5]。
@ -30,7 +30,7 @@
* 得益于 Zephyrs 的设备支持,用户可以选择标准 Arduino 生态系统更广泛的设备
* 能够重复使用 Arduino 工具,如 Arduino IDE 和丰富的库
Arduino Core 使用 LGPL 下进行许可Zephyr 使用 Apache 2 下进行许可。这意味着该项目的开发很可能需要脱离主分支,并在单独的 repo 中进行,以保持代码和许可证分离。有关这方面的历史讨论,请参阅 [#22247][9],有关 Arduino 核心架构之前的早期尝试,请参阅 [soburi/arduino-on-zephyr][10]。
Arduino Core 使用 LGPL 许可Zephyr 使用 Apache 2 许可。这意味着该项目的开发很可能需要脱离主分支,并在单独的仓库中进行,以保持代码和许可证分离。有关这方面的历史讨论,请参阅 [#22247][9],有关 Arduino 核心架构之前的早期尝试,请参阅 [soburi/arduino-on-zephyr][10]。
**贡献者的任务是:**
@ -40,7 +40,7 @@ Arduino Core 使用 LGPL 下进行许可Zephyr 使用 Apache 2 下进行许
**导师:**
[Jonathan Beri][12] Golioth 和 Zephyr TSC 的首席执行官
[Jonathan Beri][12] Golioth 和 Zephyr TSC 的首席执行官
[Alvaro Viebrantz][13] Golioth 和 Google GDE 的创始工程师
**代码许可证:** LGPL
@ -61,7 +61,7 @@ Dhruva 是一名电气工程专业的本科生。他的兴趣广泛,从嵌入
### 项目二Zephyr 的 Apache Thrift 模块
一个贡献者350 hours)。
一个贡献者350 小时)。
[Apache Thrift][17] 是一个 [IDL][18] 规范、[RPC][19] 框架和代码生成器,它抽象出传输和协议细节,让开发者专注于应用逻辑。它适用于所有主流操作系统,支持超过 27 种编程语言、7 种协议和 6 种底层传输方式。最初,它于 [2007 年在 Facebook 开发][20],随后与 Apache 软件基金会共享。
@ -100,7 +100,7 @@ via: https://www.linux.com/news/google-summer-of-code-zephyr-rtos/
作者:[The Linux Foundation][a]
选题:[lkxed][b]
译者:[lkxed](https://github.com/lkxed)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -0,0 +1,141 @@
[#]: subject: "7 Reasons Why Ubuntu 22.04 LTS is the Most Secure Release Yet"
[#]: via: "https://news.itsfoss.com/reasons-ubuntu-22-04-secure/"
[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/"
[#]: collector: "lkxed"
[#]: translator: "wxy"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14820-1.html"
Ubuntu 22.04 LTS 是目前最安全的版本的七大原因
======
> Ubuntu 22.04 LTS 是迄今为止最好的 Ubuntu 版本之一。是什么让它如此安全?
![ubuntu 22.04][1]
早在今年 4 月就发布了的 [Ubuntu 22.04 LTS][2],是迄今为止最安全的 Ubuntu 版本。
其安全更新的延长支持、新的硬件支持和其他林林总总的改进,使它在安全方面远远超过了之前的所有版本。
但它是如何做到这一点的呢?还有,是什么让这个版本与以前的版本不同的呢?
有几个原因Canonical 在一篇新的博客文章中为我们重点指出了这些。在这里,让我总结一下,以帮助你了解更多。
### 是什么让 Ubuntu 22.04 LTS 变得安全?
在这个版本中Ubuntu 团队似乎投入了大量的工作来确保其长期的安全性和可靠性。尽管多年来他们以难以想象的方式做到了这一点,但我将强调其中的几件事:
* 改进的硬件安全措施支持
* 更新了安全包
* 私有家目录
* OpenSSL 3
* GCC 11
* nftables 作为默认的防火墙后端
* Linux 内核改进
#### 1、改进的硬件安全措施支持
![][3]
随着英特尔、AMD 和 ARM 的 CPU/SoC 开始推出更多的安全措施,拥有足够的软件来让这些功能发挥作用就变得越来越重要。
截至目前Ubuntu 22.04 支持三种主要的硬件安全措施。
英特尔的 “<ruby>软件保护扩展<rt>Software Guard eXtensions</rt></ruby>SGX提供了一个安全独立的区域来进行敏感计算。例如理想情况下密码处理将在这里进行因为它确保没有其他应用程序可以访问这些数据。
还有 AMD 的“<ruby>安全加密虚拟化<rt>Secure Encrypted Virtualization</rt></ruby>SEV。这项技术旨在防止主机操作系统干扰正在运行的虚拟机。
尽管这与桌面用户的相关性不如其他技术,但要知道,很多数据中心的基础设施都依赖虚拟机来实现应用的容器化。总的来说,此类针对硬件的安全措施应该会加强对桌面和服务器用户的保护。
#### 2、Linux 内核安全的改进
随着 Ubuntu 的每一次发布Linux 内核都会得到升级,提供了许多有用的功能和支持。
但是这一次Canonical 推出了针对不同的平台的优化内核版本。对于 OEM 认证的桌面设备,它提供了 [Linux 内核 5.17][4]。
而对于所有的桌面和服务器用户,可以使用 [Linux 内核 5.15 LTS][5]。
不仅仅限于这个概念,在 [博文][6] 中提到的一些基本内核安全增强措施包括:
* 支持 [核心调度][7],它允许进程控制哪些线程可以在 SMT 同级之间调度,以便让它们保护敏感信息,而不泄露给系统中其他不受信任的进程。
* 内核堆栈随机化提供了一种加固措施,以挫败希望在内核内进行内存破坏攻击的攻击者。
* BPF 子系统也有一些安全方面的增强,包括默认情况下限制为只有特权进程可以使用,以及对签名的 BPF 程序的初步支持。
* 新的 Landlock Linux 安全模块的加入为应用程序沙箱提供了另一种机制,可以通过 AppArmor 或 SELinux 与更传统的方式结合使用。
总之,所有这些改进使 Ubuntu 22.04 LTS 成为开发者、用户和系统管理员的更安全的选择。
#### 3、更新的安全软件包
![][8]
让我们从技术性的安全概念退后一步,回到每个 Ubuntu 用户都应该已经熟悉的概念:软件包。每一个新的 Ubuntu 版本,软件库中的大多数软件包都会更新,以带来更好的安全性和新功能。
尽管对于 Ubuntu 22.04 来说,这并不完全是新的东西,但这确实包括了很多安全方面的更新。这方面的例子包括 openSSL 3 和 GCC 11。
#### 4、OpenSSL 3
OpenSSL 是所有安全通信的支柱。
考虑到包括 MD2 和 DES 在内的许多传统算法已经被废弃并默认禁用OpenSSL 3 作为一个重大的升级特别值得关注。
因此,除非用户特别想使用不太安全的算法,否则你将在默认情况下获得最好的安全性。
#### 5、GCC 11
另一方面GCC 是许多开发者用来将他们的代码变成可以在你的计算机上运行的程序的编译器。
它带来了许多改进,但有一项特别显著地提高了安全性。静态分析得到了极大的加强,使开发人员能够更快地发现软件的漏洞,在第一步就防止有漏洞的代码被发布。
这可能不会直接影响到用户,许多开发人员使用 Ubuntu 来开发他们的应用程序。因此,你下载的很多程序,即使在非 Ubuntu 系统上,也应该比以前更安全。
#### 6、私有家目录
![][9]
作为一个传统上以桌面为重点的发行版Ubuntu 经常选择方便而不是安全。然而,随着他们越来越努力地推动云计算的采用,这种情况必须改变。
以前,任何有权限进入电脑的人都可以打开并查看任何用户的家目录。然而,你可以想象,这给非桌面用户带来了很多问题。因此,需要改变为私有家目录。
对于多用户系统来说,这可能稍显不方便,但这可以相对容易地改变。而且,对于那些不太熟悉技术的人来说,他们不需要做任何事情就可以得到更好的安全保障。
#### 7、nftables 作为默认防火墙后端
![][10]
25 年来防火墙一直是将你的计算机与更广泛的互联网隔离开来的一个关键部分。这些年来Linux 发行版通常使用两种不同的防火墙解决方案iptables 和 xtables。
然而近些年来一种不同的解决方案进入了人们的视野nftables。它提供了显著的性能和灵活性的改进使网络管理员能够更好地保护你的设备。
### 总结
毋庸置疑Ubuntu 22.04 LTS 做了很多不错的升级。不仅仅是用户体验,它在安全方面也是一个重大的飞跃。
当然,还有更多,但上面提到的改进是很好的成就!
关于更多的技术细节,你可以查看这篇 [Ubuntu 的官方博客文章][11]。
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/reasons-ubuntu-22-04-secure/
作者:[Jacob Crume][a]
选题:[lkxed][b]
译者:[wxy](https://github.com/wxy)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/jacob/
[b]: https://github.com/lkxed
[1]: https://news.itsfoss.com/wp-content/uploads/2022/07/ubuntu-22-04-is-most-secure-release.jpg
[2]: https://news.itsfoss.com/ubuntu-22-04-release/
[3]: https://news.itsfoss.com/wp-content/uploads/2022/07/hardware-security-illustration-1024x576.jpg
[4]: https://news.itsfoss.com/linux-kernel-5-17-release/
[5]: https://news.itsfoss.com/linux-kernel-5-15-release/
[6]: https://ubuntu.com/blog/whats-new-in-security-for-ubuntu-22-04-lts
[7]: https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/core-scheduling.html
[8]: https://news.itsfoss.com/wp-content/uploads/2021/07/open-source-security-illustration-1024x576.png
[9]: https://news.itsfoss.com/wp-content/uploads/2021/04/private-home-directory-ubuntu-21.png
[10]: https://news.itsfoss.com/wp-content/uploads/2022/07/firewall-illustration-1024x576.jpg
[11]: https://ubuntu.com/blog/whats-new-in-security-for-ubuntu-22-04-lts

View File

@ -1,93 +0,0 @@
[#]: subject: "The Next-Gen TUXEDO Pulse 15 is a Workstation Powerhouse"
[#]: via: "https://news.itsfoss.com/tuxedo-pulse-gen-2/"
[#]: author: "Rishabh Moharir https://news.itsfoss.com/author/rishabh/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
The Next-Gen TUXEDO Pulse 15 is a Workstation Powerhouse
======
TUXEDOs all-new Pulse 15 Gen 2 now packs an improved WQHD 165Hz display and AMDs Ryzen 7 5700U that runs at 35W!
![tuxedo][1]
TUXEDO Computers is a German manufacturer popular for offering a wide range of consumer Linux desktops and laptops.
One of their latest notebook releases, the **Pulse 15** which was introduced two years ago has received a second revision and it sounds like a big upgrade.
### Tuxedo Pulse 15 Gen-2: Whats New?
![][2]
The notebooks new 15.6-inch display takes the center stage here. A **2560 x 1440 pixels LED panel** is definitely a huge enhancement compared to the 1080p display used in the previous model. So you can expect clearer and more detailed images, not to mention fluid movements thanks to the high **165Hz refresh rate**!
The AMD Ryzen 5 4600H is now replaced by the year-old **Ryzen 7 5700U**. Offering a total of 8 cores and 16 threads with a boost up to 4.3Ghz clock speed, it should be ideal for heavy workloads.
TUXEDO has optimized the CPU to run at a whopping 35W instead of the maximum recommended 25W. Moreover, a 35% decrease in power consumption compared to the Ryzen 5 4600H has been benchmarked. The integrated AMD RX Vega 8 graphics running at 1900MHz will be slightly more powerful thanks to the increased wattage.
![][3]
Lastly, the criticisms of the cooling system should be addressed by a new design that features an **“above-average” dual-fan setup** and includes two heat pipes. TUXEDO stated that users shouldnt come across thermal throttling issues and loud fan noise when at full load.
![][4]
#### Other Specifications
Despite such big hardware upgrades, the magnesium-chassis laptop weighs only about 1.5Kg with a 1.7cm thickness.
You get two M.2 NVMe slots for storage and two DDR4 memory slots that support up to 3200MHz.
As far as the battery is concerned, the same **91-Wh** battery is being used promising a best estimate of up to 18 hours, varying with usage.
The connectivity options also include a new DisplayPort via USB-C, which was absent with the first-generation model. Other options contain:
* Intel Dual Band AX 200 (WiFi 6 & Bluetooth 5.2)
* 1 x USB 3.2 Gen2 Type-C
* 2 x USB 3.2 Gen2 Type-A
* 1 x USB 2.0 Type-A
* 1 x HDMI 2.0
* 1 x Gigabit RJ45 LAN
* 2-in-1 Headphone & Microphone
* Kensington Lock
* UHS-50 Micro SD Cardreader
### Pricing & Availability
The base configuration which includes 8 GB Samsung 3200 MHz DDR 4 RAM and 250 GB NVMe SSD costs**1149 EUR or 1185 USD**. You can choose the flagship TUXEDO_OS 22.04 LTS, Ubuntu 22.04 LTS, Kubuntu 22.04 LTS, or Ubuntu Budgie 22.04 LTS as the operating system of your choice.
Shipping for orders starts on July 15, 2022. You can pre-order the laptop now.
You can check out the official website product page for more details.
[TUXEDO Pulse 15 Gen-2][5]
### Powerful Linux Laptop Lineup
The Tuxedo Pulse 15 specs indicate that it is a solid offering. Thus, developers and business users should not have any complaints regarding its performance.
Not to forget, we also had a recent launch of [HP Dev One][6], and a teaser for [StarFighter][7] with a 4K 10-bit IPS display by Star Labs.
Looks like youre in for a treat if you are saving up for a premium Linux-specific laptop.
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/tuxedo-pulse-gen-2/
作者:[Rishabh Moharir][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/rishabh/
[b]: https://github.com/lkxed
[1]: https://news.itsfoss.com/wp-content/uploads/2022/07/TUXEDO-Pulse-15-linux-laptop.jpg
[2]: https://news.itsfoss.com/wp-content/uploads/2022/07/1250-1100-max-1-1024x901.png
[3]: https://news.itsfoss.com/wp-content/uploads/2022/07/1600-1600-max-1-1024x1024.png
[4]: https://news.itsfoss.com/wp-content/uploads/2022/07/1600-1600-max-2.png
[5]: https://www.tuxedocomputers.com/en/Linux-Hardware/Notebooks/15-16-inch/TUXEDO-Pulse-15-Gen2.tuxedo
[6]: https://news.itsfoss.com/hp-dev-one-system76/
[7]: https://news.itsfoss.com/starfighter-laptop-reveal/

View File

@ -1,65 +0,0 @@
[#]: subject: "Do You Miss Firefox Send? Internxt Send is Ready as a Replacement"
[#]: via: "https://news.itsfoss.com/internxt-send/"
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Do You Miss Firefox Send? Internxt Send is Ready as a Replacement
======
A new offering by Internxt lets you send encrypted files to anyone quickly while retaining your privacy. We can only hope that it does not shut down like Firefox Send.
![internxt][1]
[Internxt][2] is a fairly new open-source encrypted cloud service that aims to replace the offerings by the big tech. For instance, you can use it as an alternative to Google Photos, and Drive.
You get 10 GB for free. So, you can sign up for it to test it out.
Recently, they have also added another product “Internxt Send”, as a replacement to fill the void for Firefox Send.
Unfortunately, Firefox Send was discontinued, but it was a good tool!
[Internxt Send][3] lets you send/share images, videos, documents, and other files securely, just like Firefox Send.
### Internxt Send: A Secure File Sharing Service
![][4]
While I couldnt find the repository on GitHub for Internxt Send, Ive asked them for clarification.
As one would expect, you can upload your files to Internxt Send without needing to create an account.
The file upload limit is 5 GB. And, you cannot increase the limit in any way.
You can choose to upload the files required and generate a link to share. Or, you can directly send an email to the recipient, where you would also need to share your email address.
![][5]
Interestingly, it also lets you add custom text to the email you send with the file uploaded.
Unlike Firefox Send, you cannot tweak the expiry for the link generated to share the file or set it to stop working after a number of downloads. The link expires in 15 days by default, and you cannot change that. So, that is a bummer.
But, if you were waiting for an encrypted service that lets you privately share files, this can be an alternative.
*It is good to have more Firefox Send alternatives I think! What are your thoughts on Internxt Send?*
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/internxt-send/
作者:[Ankush Das][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/ankush/
[b]: https://github.com/lkxed
[1]: https://news.itsfoss.com/wp-content/uploads/2022/07/internxt-send-ft-1.jpg
[2]: https://itsfoss.com/internxt-cloud-service/
[3]: https://send.internxt.com/
[4]: https://news.itsfoss.com/wp-content/uploads/2022/07/internxt-send-1024x640.png
[5]: https://news.itsfoss.com/wp-content/uploads/2022/07/internxt-send-screenshot-1024x782.png

View File

@ -0,0 +1,37 @@
[#]: subject: "Microsoft Postpones A Contentious Ban On Paid for Open Source And WebKit"
[#]: via: "https://www.opensourceforu.com/2022/07/microsoft-postpones-a-contentious-ban-on-paid-for-open-source-and-webkit/"
[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Microsoft Postpones A Contentious Ban On Paid for Open Source And WebKit
======
![microsoft][1]
On July 16, the Microsoft Store, an online store for Windows apps and other apps, was supposed to implement new policies prohibiting developers from selling open source apps that are otherwise free and from distributing browser apps that use Apples WebKit engine. However, Giorgio Sardo, general manager of the Microsoft Store, stated on Friday that Microsoft will postpone enforcement in response to the developer communitys criticism. The changes, which were announced last month, appear to be aimed at improving the Microsoft Store experience. They include, for example, a section prohibiting apps from disseminating misinformation if they “provide content related to information, news, or current events in the real world.”
However, the new rules restrict what developers can do with open source software. They forbid Microsoft Store apps from using Apples WebKit browser engine, for example. In fact, any web browser engine other than Chromium, Gecko, or EdgeHTML would be prohibited, so its not just WebKit thats forbidden. Apples Safari browser, which is based on WebKit, hasnt been officially supported for Windows since 2012. However, because WebKit is open source, an enterprising developer (or team of developers, because browsers are complicated) could presumably create a browser for Windows.
What makes this unusual is that Microsoft announced its Open App Store Principles in February to address regulatory concerns about competition stemming from its acquisition of Activision/Blizzard. The Windows behemoth did so fully aware of the global antitrust challenges to Apples App Store and Google Play. In fact, Microsoft has backed efforts to force its competitors to relax their own store policies. The App Store browser rule, which requires all iOS browser apps to be based on Apples WebKit engine rather than Googles open source Chromium/Blink or Mozillas open source Gecko engine, has been a major source of regulatory pushback against Apple.
The EUs Digital Markets Act and Digital Services Act aim to boost competition by removing Apples WebKit requirement. The UK Competition and Markets Authority, like the US National Telecommunications and Information Administration (NTIA), is considering a similar rule. As a result, Microsoft declares in Section 10.2.1: “Products that browse the web must use either the Chromium or the Gecko open source engine.” (The company is also making an exception for legacy apps in the Microsoft Store built with its discontinued EdgeHTML engine.)
Developers appear to be more concerned about Microsofts decision to restrict the sale of apps based on open source software. “Not attempt to profit from open source or other software that is otherwise generally available for free, nor be priced irrationally high relative to the features and functionality provided by your product,” says Section 10.8.7 of the revised policy. The policy change comes in the wake of Microsofts commercial release of GitHub Copilot, a subscription-based AI code suggestion tool trained on open source code. The Software Freedom Conservancy, an open source advocacy group, accused Microsoft last week of profiting from open source without clarifying whether Copilot complies with licencing terms and urged open source developers to abandon GitHub.
--------------------------------------------------------------------------------
via: https://www.opensourceforu.com/2022/07/microsoft-postpones-a-contentious-ban-on-paid-for-open-source-and-webkit/
作者:[Laveesh Kocher][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.opensourceforu.com/author/laveesh-kocher/
[b]: https://github.com/lkxed
[1]: https://www.opensourceforu.com/wp-content/uploads/2022/07/microsoft-e1657525936852.jpg

View File

@ -0,0 +1,88 @@
[#]: subject: "Nokia Targets An Amateur Linux Phone Project NOTKIA for a Name Change"
[#]: via: "https://news.itsfoss.com/nokia-notkia/"
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Nokia Targets An Amateur Linux Phone Project NOTKIA for a Name Change
======
An open-source project wants to bring you a Nokia-like Linux phone, but Nokia does not seem to like the projects name.
![nokia][1]
An open-source project that aims to make a classic Nokia like (small form factor) Linux phone has come under fire, by Nokia.
The projects name was originally “**Notkia**“, which Nokia finds similar while potentially affecting its brand reputation, and infringement of Nokias rights.
While it is okay to protect your business, what is it with these companies sending infringement notices to projects that arent even a threat to them at its current state?
### Notkia: Developing a Pocket-Sized Linux Phone
Thanks to the notice by Nokia, we get to know about an interesting collaborative effort to develop a small Linux phone for basic use, while keeping privacy in mind.
They aim to design a PCB that fits exactly in the classic Nokias phone shell.
![][2]
As of now, they have a decent amount of things working with the hardware that includes Bluetooth, and Wi-Fi.
It is not an Android-based operating system, rather it relies on Mainline Linux Kernel.
You can learn more about the project and the specifications for the planned phone in their [official blog post][3].
The project is waiting for fundraising, and will make early prototypes to available to be purchased separately.
### Inspired by Nokia, and Noticed by Nokia
Well, the project clearly states that they have been inspired by Nokias classic phones and they do not try to mislead any of their contributors and potential customers.
The projects creator shared the email by Nokia on Twitter, mentioning that Nokia should be more sensitive before sending such notices to projects that are led with community interests.
> After reading the email from [@Nokia][4] one more time, I started to feel angry. This nothing more than a staged accident. Since this is already a collaborative project and contributed by people around the world, I'm going to release the complete email to its "intended recipients".
>
> ![Twitter: @ReimuNotMoe][5]
[June 30, 2022][6]
**Also, they confirmed that the project will be changing its name.**
Of course, as an open-source project, it should not concern Nokia unless they start selling their prototypes/phones while using Nokias brand name.
But, at its current state, this is more of a passion project, and a collaborative effort by a community of open-source enthusiasts. So, it sounds a bit far-fetched to send a notice to them for infringing Nokias rights.
*Right?*
Of course, this is not surprising for companies, but for Nokia, it seems a bit too overly cautious and anti-competitive.
Especially, when it is safe to say that the company is not doing as good as youd expect with their latest smartphone releases.
Interestingly, theres also an [IT company][7] with the name “Notkia”, as spotted by a fellow Twitter user. Did they also receive a notice by Nokia? Who knows?
*What do you think about the open-source project for a pocket-sized phone powered by Linux?* *Share your thoughts in the comments down below.*
**Via**: [Vice][8]
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/nokia-notkia/
作者:[Ankush Das][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/ankush/
[b]: https://github.com/lkxed
[1]: https://news.itsfoss.com/wp-content/uploads/2022/07/nokia-targets-linux-phone-notkia.jpg
[2]: https://news.itsfoss.com/wp-content/uploads/2022/07/notkia-nokia-1024x766.jpg
[3]: https://hackaday.io/project/185645-notkia-name-change-planned
[4]: https://twitter.com/nokia?ref_src=twsrc%5Etfw
[5]: https://pbs.twimg.com/media/FWftWyjUYAA49ew?format=jpg&name=large
[6]: https://twitter.com/ReimuNotMoe/status/1542466662154108930?ref_src=twsrc%5Etfw
[7]: https://www.linkedin.com/company/notkia-it/
[8]: https://www.vice.com/en/article/93awjz/nokia-asks-open-source-notkia-phone-project-to-change-its-name

View File

@ -0,0 +1,83 @@
[#]: subject: "Cutefish OS Halts Development and Its Future is Uncertain"
[#]: via: "https://www.debugpoint.com/cutefish-os-development-halts/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Cutefish OS Halts Development and Its Future is Uncertain
======
The famous Cutefish OS, with its Cutefish Desktop development, apparently stopped, which is evident from the GitHub commit history.
### Cutefish OS Halts Development
A few months back, we [reviewed][1] the emerging Linux distribution Cutefish OS which comes with its own desktop environment (Cutefish DE). The look and feel, the way it was built from the ground up was perfect in terms of usability and customization options.
![Cutefish OS - Application Menu][2]
Cutefish OS is built primarily for the general users who want a stable Linux Operating system and looks like “macOS” out of the box. Hence the team designed the Cutefish Desktop Environment (DE) with a Global menu, bottom dock, top panel, icon and cursor themes and many such features to fulfil that goal.
You might think that almost all Linux desktop environments are customizable to look like “mac OS” with some effort. I agree. But that requires some knowledge about how to install a cursor theme, desktop theme, rounded corners, blur and so on. Almost all of these customization doesnt come by default.
Moreover, Cutefish OS also brings Debian and Ubuntu as its base, which is a perfect choice considering the average Linux users and their knowledge level.
With all the promises and some exciting BETA releases, the development seems now completely stalled. A quick walk on [GitHub][3] shows the activities are minimal in terms of feature additions.
Moreover, the official home page of Cutefish OS, i.e. cutefishos.com, is not reachable (timed-out).
![The activity in GitHub of Cutefish OS shows a straight line for a few months][4]
### Whats Next
In the discussion on [Reddit][5], one of the users pitched the idea of forking the OS. The idea is to carry on with the development. This is the main advantage of community-driven projects in the open-source world.
![File Manager Global menu in Top bar in Cutefish OS Desktop][6]
However, it is a fact that maintaining, developing and steering a Linux distribution is a massive effort by itself. And a single person cant make it a successful one. Hence, I believe a desktop environment fork is a rational choice rather than the entire operating system. A portable DE is easier to maintain and continues its development for a longer term.
However, as of writing this piece, no one has forked it yet. But I believe it will be soon.
### An OpenMandriva Fork?
On the other hand, it looks like the OpenMandriva project is already [continuing][7] with the development of the Cutefish DE (not the OS) for its own OS. For more details, visit the Matrix [discussion page][8].
Besides, its worth mentioning that Arch Linux already have the Cutefish desktop packages in the community repo. You can even [install it][9] as a standalone DE in Arch Linux with easy steps.
As you can see, it is easier to maintain the DE to continue its development because the structure is already out there.
![Cutefish Desktop in Arch Linux][10]
### Conclusion
I have tested and [reviewed hundreds of distros][11] for years, and Cutefish OS is the promising one with its stunning desktop environment. It was written from the ground up with QML and C++ and took advantage of KWin. It would have been an attractive desktop as a separate component and could have been another great option besides KDE Plasma or GNOME.
Many open-source projects are born and die every year, and its unfortunate to see the situation of Cutefish OS. I hope an official fork comes up soon, and we all can contribute to it. I think the best way forward is to fork only the Cutefish Desktop Environment and fine-tune the edge cases.
So, what do you think about the entire situation of Cutefish OS? Lets have a conversation in the comment box.
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/cutefish-os-development-halts/
作者:[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/cutefish-os-review-2021/
[2]: https://www.debugpoint.com/wp-content/uploads/2021/11/Cutefish-OS-Application-Menu-1024x582.jpg
[3]: https://github.com/cutefishos
[4]: https://www.debugpoint.com/wp-content/uploads/2022/07/The-activity-in-GitHub-of-Cutefish-OS-shows-a-straight-line-for-a-few-months.jpg
[5]: https://www.reddit.com/r/linux/comments/vwd0m8/i_am_about_to_fork_cutefishos_and_i_need_your_help/
[6]: https://www.debugpoint.com/wp-content/uploads/2021/11/File-Manager-Global-menu-in-Top-bar-in-Cutefish-OS-Desktop-1024x577.jpg
[7]: https://abf.openmandriva.org/platforms/cooker/products/43/product_build_lists/1162
[8]: https://matrix.to/#/#oma:matrix.org
[9]: https://www.debugpoint.com/cutefish-arch-linux-install/
[10]: https://www.debugpoint.com/wp-content/uploads/2022/02/Cutefish-Desktop-in-Arch-Linux.jpg
[11]: https://www.debugpoint.com/tag/linux-distro-review

View File

@ -0,0 +1,99 @@
[#]: subject: "eBook Manager Calibre 6.0 is Here With Full-Text Search and Other Improvements"
[#]: via: "https://news.itsfoss.com/calibre-6-release/"
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
eBook Manager Calibre 6.0 is Here With Full-Text Search and Other Improvements
======
A much-needed upgrade for Calibre has finally landed with improvements and changes. Try it out!
![calibre 6.0][1]
Calibre is a popular open-source eBook reader for Linux, macOS, and Windows. It is also available for the ARM platform (Linux).
It happens to be one of the [best eBook readers for Linux][2].
After a year and a half of development, a new major upgrade for Calibre has finally landed.
### Calibre 6.0: Whats New?
While it is a big deal to put an end to the 5.x series of updates, you do not get a big list of additions.
However, the release includes significant improvements and a few feature additions that I will be highlighting here.
#### Full-Text Search
![calibre 6.0][3]
With Calibre 6.0, you can search the entire text of all books in your library collection.
This should come in handy for users, who want to quickly search for something specific, even though they do not remember the name of a book.
It will help you find things quickly when you need them.
#### Support for ARM and Apple Silicon
Calibre 6.0 adds support for ARM64 on Linux and Apple Silicon.
It will no longer work with 32-bit systems, considering [Qt 6][4] does not support it.
#### Easy Dark Mode Switch & Icon Themes
![calibre 6.0][5]
You can now easily head to the preferences, and tweak the look/feel settings to toggle the dark mode.
A quick switch could have helped, but it should be good enough. By default, it respects the system preference, so it should not be an issue for most.
In addition to this, you also get to choose icon themes for your preferences.
#### Switch to Qt 6
You can expect some unmaintained third-party plugins to no longer work with Qt 6 on Calibre 6.0.
Essential plugins that have been ported to Qt 6 should work as you would expect.
### Other Changes
Along with all the upgrades, you get a few improvements and changes that include:
* No support for Windows 8.
* The Calibre:// URL scheme is more useful to create links and can be accessed from other programs.
* Improved “Read aloud” button to start reading the book text using OSs text-to-speech engine.
You can also check out its [official announcement][6] for more information.
### Download Calibre 6.0
Calibre 6.0 can be downloaded from its [GitHub releases section][7]. You have to download the archived package for Linux (ARM64/AMD64) and extract it to run the executable.
In either case, you can also install it using the Flatpak package from [Flathub][8].
[Calibre 6.0][9]
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/calibre-6-release/
作者:[Ankush Das][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/ankush/
[b]: https://github.com/lkxed
[1]: https://news.itsfoss.com/wp-content/uploads/2022/07/calibre-6-0-release.jpg
[2]: https://itsfoss.com/best-ebook-readers-linux/
[3]: https://news.itsfoss.com/wp-content/uploads/2022/07/calibre-6.png
[4]: https://news.itsfoss.com/qt-6-released/
[5]: https://news.itsfoss.com/wp-content/uploads/2022/07/calibre-dark-theme.jpg
[6]: https://calibre-ebook.com/new-in/fifteen
[7]: https://github.com/kovidgoyal/calibre/releases/tag/v6.0.0
[8]: https://flathub.org/apps/details/com.calibre_ebook.calibre
[9]: https://calibre-ebook.com/

View File

@ -2,7 +2,7 @@
[#]: via: "https://opensource.com/article/22/1/raspberry-pi-business"
[#]: author: "Giuseppe Cassibba https://opensource.com/users/peppe8o"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: translator: " void-mori"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
@ -75,7 +75,7 @@ via: https://opensource.com/article/22/1/raspberry-pi-business
[a]: https://opensource.com/users/peppe8o
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/BIZ_WorkInPublic_4618517_1110_CS_A.png?itok=RwVrWArk (A chair in a field.)
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/BIZ_WorkInPublic_4618517_1110_CS_A.png?itok=RwVrWArk "A chair in a field."
[2]: https://opensource.com/resources/raspberry-pi
[3]: https://enterprisersproject.com/article/2020/11/raspberry-pi-7-enterprise-it-uses
[4]: https://peppe8o.com

View File

@ -0,0 +1,89 @@
[#]: subject: "Why Agile coaches need internal cooperation"
[#]: via: "https://opensource.com/article/22/7/agile-coach-internal-cooperation"
[#]: author: "Kelsea Zhang https://opensource.com/users/kelsea-zhang"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Why Agile coaches need internal cooperation
======
An Agile coach is only as successful as their Agile partner. Here's how to foster internal cooperation and create an Agile team.
![Working meetings can be effective meetings][1]
Image by Mapbox Uncharted ERG, [CC-BY 3.0 US][2]
If you're an Agile coach, you probably seek to inspire and empower others as an external member of your team or department. However, many Agile coaches overlook the importance of internal cooperation. That's not necessarily a term you are familiar with, so allow me to explain.
### What is internal cooperation?
As an Agile coach, you don't work alone. You try to find a partner in the team you're taking care of. This partner is expected to:
* Undertake all or most of the Agile transformation in the future.
* Find all possible opportunities for systematic improvement and team optimization.
* Be self-motivated.
* Not be managed by you; you delegate your enthusiasm and vision to them.
Of course, maybe you don't need such a person because, theoretically speaking, everyone in the team is your ideal candidate, and everyone is self-driven. Or maybe your whole team will magically become what you want it to be overnight.
Reality check: most of the time, you need a partner, an inside agent. Somebody to keep the spirit of Agile alive, whether you're there to encourage it or not.
### Internal cooperation is required
Getting buy-in from the team you are coaching isn't a luxury; it's a requirement. If you're the only Agile practitioner on your team, then your team isn't Agile! So how do you cultivate this internal cooperation?
#### Clarify responsibility
Being Agile is supposed to be a team effort. The beneficiary is the team itself, but the team must also bear the burden of transformation. An Agile coach is meant to be inspiring and empowering, but the change doesn't happen in just one person. That's why teams must learn to consider and solve problems on their own. A team must have its own *engine* (your Agile partner is such an engine) rather than relying on the external force of the Agile coach. It's the engines that want to solve problems, and with the help of Agile coaches, their abilities and ways of thinking can be enriched and improved.
It's best to have an engine from the beginning, but that's not always possible. The earlier, the better, so look for allies from the start.
#### Know the team
When you find a partner, you gain someone who understands the team's situation better than you do. A good partner knows the team from the inside and communicates with it on a level you cannot. No matter how good you are as an Agile coach, you must recognize that an excellent Agile partner has a unique advantage in "localization."
The best approach is not *An Agile coach makes a customized implementation plan for the team, and then the team is responsible for execution*. In my opinion, with the support of the Agile coach, the Agile partner should work with the team to make plans that best fit its needs. Next, try to implement those plans with frequent feedback and keep adjusting them as needed.
You continue to observe progress, whether the team members falter in Agile principles, and give them support at the right moments. Of course, when there's something wrong, you often want to stay silent, let the team hit a wall, and learn from their setbacks. Other times, stepping in to provide guidance is the right thing.
### Is an Agile coach still necessary?
In a word: Absolutely!
Agile is a team effort. Everyone must collaborate to find processes that work. Solutions are often sparked by the collision of ideas between the Agile coach and the partner. Then the partner can accurately get how an Agile theory is applied in the daily work. The partner understands the essence of Agile theories through the solutions.
As an Agile coach, you must have a solid theoretical foundation and the ability to apply that theory to specific scenarios. On the surface, you take charge of the theory while your Agile partner is responsible for the practice. However, an Agile coach must not be an armchair strategist, and teams aren't supposed to assume that the Agile coach is a theorist. In fact, an Agile coach must consciously let go of the practice part so the Agile partner can take over.
The significance of accompanying a team is not supposed to be pushing the team to move passively toward the Agile coach's vision. The amount of guidance required from you will fluctuate over time, but it shouldn't and can't last forever.
### Find an Agile partner
How do you find your Agile partner? First of all, observe the team you are coaching and notice anyone who is in charge of continuous improvement, whether it's their defined job role or not. That person is your Agile partner.
If there's nobody like that yet, you must cultivate one. Be sure to choose someone with a good sense of project management. I have observed that team leaders or project managers who perform well in the traditional development model may not be good candidates in the Agile environment. In an Agile management model, you must have an open mind, a sense of continuous pursuit of excellence, a flexible approach, extensive knowledge, and strong self-motivation.
### Be Agile together
Don't be shy about bringing on a partner to help you with your work and communication. Instead, find willing partners, and work together to make your organization an Agile one.
*[This article is translated from Xu Dongwei's Blog and is republished with permission.][4]*
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/7/agile-coach-internal-cooperation
作者:[Kelsea Zhang][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/kelsea-zhang
[b]: https://github.com/lkxed
[1]: https://opensource.com/sites/default/files/lead-images/leader-team-laptops-conference-meeting.png
[2]: https://creativecommons.org/licenses/by/3.0/us/
[3]: https://enterprisersproject.com/article/2022/2/agile-adoption-6-steps-IT-leaders?intcmp=7013a000002qLH8AAM
[4]: https://mp.weixin.qq.com/s/OQUAY6JkpTEgnev_EgZdZA

View File

@ -1,268 +0,0 @@
[#]: subject: "Beginners Guide to Installing Arch Linux on VirtualBox"
[#]: via: "https://itsfoss.com/install-arch-linux-virtualbox/"
[#]: author: "Ankush Das https://itsfoss.com/author/ankush/"
[#]: collector: "lujun9972"
[#]: translator: "hanszhao80"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Beginners Guide to Installing Arch Linux on VirtualBox
======
[Arch Linux is hugely popular][1] in the desktop Linux world. One of the reasons for the popularity is that [installing Arch Linux][2] itself is a complicated task.
I am not exaggerating. Installing [Ubuntu or Debian][3] is a lot easier task than Arch Linux because it doesnt have an official GUI based installer. And this is where virtual machines come in.
You can try installing Arch Linux in VirtualBox first and see if its something you would like to run on actual hardware. This way, you get to experience Arch Linux without disturbing your current operating system.
In this article, I will be guiding you through the steps to install a functional Arch Linux virtual machine.
### Installing Arch Linux on VirtualBox
Undoubtedly, you need to first [install VirtualBox on Linux][4] or Windows. On Windows, simply go to the Oracles website and download VirtualBox.
[Download VirtualBox][5]
If you are using Windows 10 or newer version, please ensure that you have virtualization enabled on your system.
Once done, you need to head to [Arch Linuxs official website][6] to download the ISO file. You should find options to [download using torrent][7] or download the file directly.
![][8]
Hold on to the ISO file when needed, you can delete it to [free space on your system][9] after successful installation.
Now, let us begin installing Arch Linux on VirtualBox.
#### Part 1. Creating the Virtual Machine
**Step 1:** First, you need to set up a few things in VirtualBox. Launch VirtualBox and click on “**New**” to create a virtual machine.
![][10]
Note that you can continue creating the virtual machine using the guided mode, but you get more options at a single glance with the expert mode.
![][11]
Hence, I recommend using the expert mode to create the virtual machine.
Fret not, the expert mode is as easy, with just a bit of extra available options and nothing else to worry about.
**Step 2**: Enter the name of your virtual machine, it should auto-detect the “Type” and “Version” respectively when you type in “**Arch Linux**” in the name field.
![][12]
You should increase the memory size to use the virtual machine comfortably. If it is just for minor testing, you can go ahead with the default setting.
In my case, I allocate ~**4 GB of RAM**.
Also, make sure to **create a virtual hard disk** under the “Hard disk” option. It should be the selected option by default.
Now, proceed to set the virtual hard disk size.
**Step 3:** You can choose a preferred location path for the virtual hard disk and tweak the size as per your requirements. The installation should not be a problem with the minimum allocated size (8 GB), but to be on the safe side, you may want to allocate at least 10-15 GB.
![][13]
Next, you need to select the hard disk file type as “**VDI (VirtualBox Disk Image)**” and the storage as “**Dynamically allocated**,” as shown in the image above.
VDI is the most common hard disk type for the virtual hard disk.
And, when you select the “**Dynamically allocated**” option for the hard disk storage, it means that the storage space will be utilized as per usage. In other words, 15 GB of space wont be locked from your disk as soon as the virtual machine is created.
Now, all you have to do is hit “**Create**” to add the virtual machine.
#### Part 2. Adding the ISO File to Start Installing Arch Linux
![][14]
Once the VM has been listed, you can look at its configuration and select the ISO as the disk drive under the **Storage** option.
You can also separately head to the virtual machine settings to explore more and choose the ISO file.
![][15]
To do that, navigate your way to the “**Storage**” setting of the VM.
![][16]
Here, you will have to click on the “**Empty**” device under Controller and then proceed to select the Arch Linux ISO file as the disk file (as shown in the image above).
![][17]
Once you select it, hit “**OK**” to save the changes to your setting.
Heres how the virtual machine setting should look like with the ISO set as the disk to boot:
![][18]
Now, hit “**Start**” to start the VM and get started with the installation.
#### Part 3. Installing Arch Linux using the Guided Installer
Arch Linux has made the installation easier by [introducing a guided installer][19], i.e., it gives you all the options you need to set up a full-fledged Arch Linux system.
So, with the help of a guided installer, you do not have to install a desktop environment and other essential packages yourself separately. All you have to do is follow the onscreen instructions and choose the options suitable for your installation.
In this article, we focus on the guided installer. If you want to do things yourself, you should follow our [Arch installation guide][2].
Moving on to the installation, when you start the VM, you will be looking at this screen:
![][20]
The first option is the ideal way of proceeding. If you have a specific requirement, you can choose other options to boot up Arch Linux.
Now, you should be looking at a terminal window. Heres how to get started:
**Step 1**: Type in “**archinstall**” to initiate installation using the guided installer.
![][21]
**Step 2:** Choose a keyboard layout as per your requirements, selecting a US layout should be the most common choice. Just type in a number to make the selection, as shown in the image below (for instance, 26).
![][22]
**Step 3:** Next, you need to select a region to download packages.
![][23]
Choosing a preferred region instead of “Worldwide” is crucial because it downloads many unnecessary packages if you select “**Worldwide**” as your region.
**Step 4:** Once you select the region, it will ask you to choose the drive for installation. In this case, we already created a virtual drive of ~15 GB displayed as **/dev/sda**.
Similarly, check for the drive you created as per the size and choose that disk to proceed. Here, I type in **1** as the input; yours can differ.
![][24]
**Step 5:** For the next set of steps, you will be asked the following:
* **Select a filesystem type**
* **Encryption password** (optional)
* **Hostname**
* **Create root password** (optional)
* **Creating a super-user**
* **Choose a pre-programmed profile**
![][25]
In my test, I chose BTRFS as the filesystem without setting any disk encryption password.
The hostname can be anything of your choice, but Id suggest keeping it short.
You may choose to create a root password, but it shouldnt be an issue if you do not. However, you need to create a superuser with Sudo privileges.
I used “**admin**” and “**pass**” as the user and the password, respectively. But, you should not use easy-to-guess credentials if you do not want anyone else to access the VM on your computer.
And, then, you will be shown a choice to select a profile. In this case, we want a full-fledged Arch Linux desktop. So, we choose “**desktop**” by typing in **0**.
**Step 6:** Next, you will be asked to choose a desktop environment. I decided to proceed with KDE. You can select anything else you like.
![][26]
**Step 7**: To finalize, you will be asked to choose the graphics card driver. Here, we install Arch Linux on VirtualBox, so you can select option 4 as “**VMware/VirtualBox**,” as shown in the image below.
![][27]
You may also be asked to choose pipewire instead of PulseAudio for audio with a “Yes (y) or No (no)” response. Any of those should serve the purpose.
****Step 8:**** Next comes an important step. Here, you can choose to go with **linux-lts** if you need the LTS version of the kernel, or else proceed with the default.
![][28]
The installer will prompt you to explicitly install any packages required. In this case, we do not have any specific requirements, so we will leave it blank and press enter to skip.
**Step 9:** To enable internet access, you will be asked to select the required network adapter. You will have to choose the option:
**Use network manager to control and manage your internet connection**
![][29]
**Step 10:** The timezone needs to be defined in the next step. Choose what applies to you, or continue with the default option.
**Step 11:** Once done, it will display most of the options you selected as confirmation. Press **Enter** to continue.
![][30]
**Step 12:** It will take a few minutes for the installation to complete, depending on your internet connection speed.
After the installation is complete, it will ask you to **chroot into a newly created installation for post-installation configuration**, but we dont need that. So, type in “**N**” to complete the installation.
**Step 13:** Finally, you should see the terminal window again. Type in:
```
shutdown now
```
This will safely exit the installation and close the virtual machine.
Its all set! Before starting the virtual machine with Arch installed, you need to do one more thing **remove the ISO disk selected as the optical drive**. Similar to how you added the ISO to boot from, you can head to the virtual machine settings and remove it as shown below:
![][31]
Thats it! You are done installing Arch Linux on VirtualBox.
All you have to do is start the virtual machine, and heres how it looks in my case:
![virtualbox arch][32]
Even though it takes a bit of time to go through the options, the new guided installer on Arch Linux saves a lot of time to get the essentials right.
![][33]
The same set of steps apply for installing Arch Linux on your computer. You need to [make a separate bootable USB drive using Etcher][34] with the Arch Linux ISO file.
### Wrapping Up
[Arch Linux is a popular choice][1] for a variety of reasons. However, if it is your first time installing, or if you want to test it out, a virtual machine is the best way to experience it without disrupting your host computer.
I hope this helps you install Arch Linux on VirtualBox. Let me know your thoughts in the comments down below.
--------------------------------------------------------------------------------
via: https://itsfoss.com/install-arch-linux-virtualbox/
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[hanszhao80](https://github.com/hanszhao80)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://itsfoss.com/why-arch-linux/
[2]: https://itsfoss.com/install-arch-linux/
[3]: https://itsfoss.com/debian-vs-ubuntu/
[4]: https://itsfoss.com/install-virtualbox-ubuntu/
[5]: https://www.virtualbox.org/wiki/Downloads
[6]: https://archlinux.org/download/
[7]: https://itsfoss.com/best-torrent-ubuntu/
[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/archlinux-downloads.png?resize=800%2C419&ssl=1
[9]: https://itsfoss.com/free-up-space-ubuntu-linux/
[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/virtualbox-new.png?resize=800%2C562&ssl=1
[11]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/10/virtualbox-expert-mode.png?resize=707%2C438&ssl=1
[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/10/virtualbox-create.png?resize=800%2C536&ssl=1
[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/10/virtualbox-disk.png?resize=800%2C528&ssl=1
[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/choose-disk-virtualbox-arch.png?resize=800%2C440&ssl=1
[15]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/10/virtualbox-settings-option.png?resize=800%2C551&ssl=1
[16]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/virtualbox-choose-iso.png?resize=800%2C314&ssl=1
[17]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/virtualbox-arch-iso-select.png?resize=800%2C348&ssl=1
[18]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/10/virtualbox-set-start.png?resize=800%2C548&ssl=1
[19]: https://news.itsfoss.com/arch-linux-easy-install/
[20]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/virtualbox-archlinux-boot.png?resize=800%2C593&ssl=1
[21]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/vb-archinstall-guided.png?resize=800%2C400&ssl=1
[22]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/10/vb-archinstall-kb-layout.png?resize=800%2C694&ssl=1
[23]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/archinstall-region.png?resize=800%2C664&ssl=1
[24]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/archinstall-selectdisk.png?resize=800%2C199&ssl=1
[25]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/10/archinstall-desktop-configure.png?resize=800%2C497&ssl=1
[26]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/archinstall-virtualbox-desktop-environment.png?resize=800%2C415&ssl=1
[27]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/10/virtualbox-environment.png?resize=419%2C173&ssl=1
[28]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/archinstall-linux-kernel.png?resize=800%2C692&ssl=1
[29]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/virtualbox-arch-network-manager.png?resize=800%2C151&ssl=1
[30]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/archinstall-confirmation.png?resize=800%2C697&ssl=1
[31]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/iso-remove-archinstall.png?resize=800%2C286&ssl=1
[32]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/virtualbox-arch.png?resize=800%2C635&ssl=1
[33]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/10/kde-arch-virtualbox.png?resize=800%2C453&ssl=1
[34]: https://itsfoss.com/install-etcher-linux/

View File

@ -1,311 +0,0 @@
[#]: subject: "Plotting Data in R: Graphs"
[#]: via: "https://www.opensourceforu.com/2022/05/plotting-data-in-r-graphs/"
[#]: author: "Shakthi Kannan https://www.opensourceforu.com/author/shakthi-kannan/"
[#]: collector: "lkxed"
[#]: translator: "tanloong"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Plotting Data in R: Graphs
======
R has a number of packages for plotting graphs and data visualisation, such as graphics, lattice, and ggplot2. In this ninth article in the R series, we shall explore the various functions to plot data in R.
![business-man-visulising-graphs][1]
We will be using R version 4.1.2 installed on Parabola GNU/Linux-libre (x86-64) for the code snippets.
```
$ R --version
R version 4.1.2 (2021-11-01) -- “Bird Hippie”
Copyright (C) 2021 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
```
R is free software and comes with absolutely no warranty. You are welcome to redistribute it under the terms of the GNU General Public License versions 2 or 3. For more information about these matters, see *https://www.gnu.org/licenses/.*
### Plot
Consider the all-India consumer price index (CPI rural/urban) data set up to November 2021 available at *https://data.gov.in/catalog/all-india-consumer-price-index-ruralurban-0* for the different states in India. We can read the data from the downloaded file using the read.csv function, as shown below:
```
> cpi <- read.csv(file=”CPI.csv”, sep=”,”)
> head(cpi)
Sector Year Name Andhra.Pradesh Arunachal.Pradesh Assam Bihar
1 Rural 2011 January 104 NA 104 NA
2 Urban 2011 January 103 NA 103 NA
3 Rural+Urban 2011 January 103 NA 104 NA
4 Rural 2011 February 107 NA 105 NA
5 Urban 2011 February 106 NA 106 NA
6 Rural+Urban 2011 February 105 NA 105 NA
Chattisgarh Delhi Goa Gujarat Haryana Himachal.Pradesh Jharkhand Karnataka
1 105 NA 103 104 104 104 105 104
2 104 NA 103 104 104 103 104 104
3 104 NA 103 104 104 103 105 104
4 107 NA 105 106 106 105 107 106
5 106 NA 105 107 107 105 107 108
6 105 NA 104 105 106 104 106 106
...
```
Let us aggregate the CPI values per year for the state of Punjab, and plot a line chart using the plot function, as follows:
```
> punjab <- aggregate(x=cpi$Punjab, by=list(cpi$Year), FUN=sum)
> head(punjab)
Group.1 x
1 2011 3881.76
2 2012 4183.30
3 2013 4368.40
4 2014 4455.50
5 2015 4584.30
6 2016 4715.80
> plot(punjab$Group.1, punjab$x, type=”l”, main=”Punjab Consumer Price Index upto November 2021”, xlab=”Year”, ylab=”Consumer Price Index”)
```
The following arguments are supported by the plot function:
| Argument | Description |
| :- | :- |
| x | A vector for the x-axis |
| y | The vector or list in the y-axis |
| type | p for points, l for lines, o for overplotted plots and lines, s for stair steps, h for histogram |
| xlim | The x limits of the plot |
| ylim | The y limits of the plot |
| main | The title of the plot |
| sub | The subtitle of the plot |
| xlab | The label for the x-axis |
| ylab | The label for the y-axis |
| axes | Logical value to draw the axes |
The line chart is shown in Figure 1.
![Figure 1: Line chart][2]
The autocorrelation plot can be used to obtain correlation statistics for time series analysis, and the same can be generated using the acf function in R. You can specify the following autocorrelation types: *correlation, covariance*, or partial. Figure 2 shows the ACF chart that represents the CPI values (x in the chart) for the state of Punjab.
![Figure 2: ACF chart][3]
The function*acf* accepts the following arguments:
| Argument | Description |
| :- | :- |
| x | A univariate or multivariate object or vector or matrix |
| lag.max | The maximum lag to calculate the acf |
| type | Supported values correlation, covariance, partial |
| plot | The acf is plotted if this value is TRUE |
| i | A set of time difference lags to retain |
| j | A collection of names or numbers to retain |
### Bar chart
The barplot function is used to draw a bar chart. The chart for Punjabs CPI can be generated as follows, and is shown in Figure 3:
![Figure 3: Line chart of Punjabs CPI][4]
```
> barplot(punjab$x, main=”Punjab Consumer Price Index”, sub=”Upto November 2021”, xlab=”Year”, ylab=”Consumer Price Index”, col=”navy”)
```
The function is quite flexible and supports the following arguments:
| Argument | Description |
| :- | :- |
| height | A numeric vector or matrix that contains the values |
| width | A numeric vector that specifies the widths of the bars |
| space | The amount of space between bars |
| beside | A logical value to specify if the bars should be stacked or next to each other |
| density | A numerical value that specifies the density of the shading lines |
| angle | The angle used to shade the lines |
| border | The colour of the border |
| main | The title of the chart |
| sub | The sub-title of the chart |
| xlab | The label for the x-axis |
| ylab | The label for the y-axis |
| xlim | The limits for the x-axis |
| ylim | The limits for the y-axis |
| axes | A value that specifies whether the axes should be drawn |
You can get more details on the barplot function using the help command, as shown below:
```
> help(barplot)
acf package:stats R Documentation
Auto- and Cross- Covariance and -Correlation Function Estimation
Description:
The function acf computes (and by default plots) estimates of
the autocovariance or autocorrelation function. Function pacf
is the function used for the partial autocorrelations. Function
ccf computes the cross-correlation or cross-covariance of two
univariate series.
Usage:
acf(x, lag.max = NULL,
type = c(“correlation”, “covariance”, “partial”),
plot = TRUE, na.action = na.fail, demean = TRUE, ...)
pacf(x, lag.max, plot, na.action, ...)
## Default S3 method:
pacf(x, lag.max = NULL, plot = TRUE, na.action = na.fail,
...)
ccf(x, y, lag.max = NULL, type = c(“correlation”, “covariance”),
plot = TRUE, na.action = na.fail, ...)
## S3 method for class acf
x[i, j]
```
### Pie chart
Pie charts need to be used wisely, as they may not actually show relative differences among the slices. We can generate the Rural, Urban, and Rural+Urban values for the month of January 2021 for Gujarat as follows, using the subset function:
```
> jan2021 <- subset(cpi, Name==”January” & Year==”2021”)
> jan2021$Gujarat
[1] 153.9 151.2 149.1
> names <- c(Rural, Urban, Rural+Urban)
```
![Figure 4: Pie chart][5]
The pie function can be used to generate the actual pie chart for the state of Gujarat, as shown below:
```
> pie(jan2021$Gujarat, names, main=”Gujarat CPI Rural and Urban Pie Chart”)
```
The following arguments are supported by the pie function:
| Argument | Description |
| :- | :- |
| x | Positive numeric values to be plotted |
| label | A vector of character strings for the labels |
| radius | The size of the pie |
| clockwise | A value to indicate if the pie should be drawn clockwise or counter-clockwise |
| density | A value for the density of shading lines per inch |
| angle | The angle that specifies the slope of the shading lines in degrees |
| col | A numeric vector of colours to be used |
| lty | The line type for each slice |
| main | The title of the chart |
### Boxplot
A boxplot shows the interquartile range between the 25th and 75th percentile using two whiskers for the distribution of a variable. The values outside the range are plotted separately. The boxplot functions take the following arguments:
| Argument | Description |
| :- | :- |
| data | A data frame or list that is defined |
| x | A vector that contains the values to plot |
| width | The width of the boxes to be plotted |
| outline | A logical value indicating whether to draw the outliers |
| names | The names of the labels for each box plot |
| border | The colour to use for the outline of each box plot |
| range | A maximum numerical amount the whiskers should extend from the boxes |
| plot | The boxes are plotted if this value is TRUE |
| horizontal | A logical value to indicate if the boxes should be drawn horizontally |
The boxplot for a few states from the CPI data is shown below:
```
> names <- c (Andaman and Nicobar, Lakshadweep, Delhi, Goa, Gujarat, Bihar)
> boxplot(cpi$Andaman.and.Nicobar, cpi$Lakshadweep, cpi$Delhi, cpi$Goa, cpi$Gujarat, cpi$Bihar, names=names)
```
![Figure 5: Box plot][6]
![Figure 6: Q-Q plot][7]
### Q-Q plot
The Quantile-Quantile (Q-Q) plot is a way to compare two data sets. You can also compare a data set with a theoretical distribution. The qqnorm function is a generic function, and we can view the Q-Q plot for the Punjab CPI data as shown below:
```
> qqnorm(punjab$x)
```
![Figure 7: Volcano][8]
The*qqline* function adds a theoretical line to a normal, quantile-quantile plot. The following arguments are accepted by these functions:
| Argument | Description |
| :- | :- |
| x | The first data sample |
| y | The second data sample |
| datax | A logical value indicating if values should be on the x-axis |
| probs | A numerical vector representing probabilities |
| xlab | The label for x-axis |
| ylab | The label for y-axis |
| qtype | The type of quantile computation |
### Contour plot
The contour function is useful for plotting three-dimensional data. You can generate a new contour plot, or add contour lines to an existing chart. These are commonly used along with image charts. The volcano data set in R provides information on the Maunga Whau (Mt Eden) volcanic field, and the same can be visualised with the contour function as follows:
```
> contour(volcano)
```
The contour function accepts the following arguments:
| Argument | Description |
| :- | :- |
| x,y | The location of the grid for z |
| z | A numeric vector to be plotted |
| nlevels | The number of contour levels |
| labels | A vector of labels for the contour lines |
| xlim | The x limits for the plot |
| ylim | The y limits for the plot |
| zlim | The z limits for the plot |
| axes | A value to indicate to print the axes |
| col | The colour for the contour lines |
| lty | The line type to draw |
| lwd | Width for the lines |
| vfont | The font for the labels |
The areas between the contour lines can be filled using a solid colour to indicate the levels, as shown below:
```
> filled.contour(volcano, asp = 1)
```
The same volcano data set with the filled.contour colours is illustrated in Figure 8.
![Figure 8: Filled volcano][9]
You are encouraged to explore the other functions and charts in the graphics package in R.
--------------------------------------------------------------------------------
via: https://www.opensourceforu.com/2022/05/plotting-data-in-r-graphs/
作者:[Shakthi Kannan][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.opensourceforu.com/author/shakthi-kannan/
[b]: https://github.com/lkxed
[1]: https://www.opensourceforu.com/wp-content/uploads/2022/04/business-man-visulising-graphs.jpg
[2]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-1-Line-chart.jpg
[3]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-2-ACF-chart.jpg
[4]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-3-Line-chart-of-Punjabs-CPI.jpg
[5]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-4-Pie-chart.jpg
[6]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-5-ox-plot.jpg
[7]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-6-Q-Q-plot.jpg
[8]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-7-Volcano.jpg
[9]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-8-Filled-volcano.jpg

View File

@ -0,0 +1,80 @@
[#]: subject: "Manual Renewal of SSL Certificates: A Simple Guide"
[#]: via: "https://www.opensourceforu.com/2022/07/manual-renewal-of-ssl-certificates-a-simple-guide/"
[#]: author: "Jitendra Bhojwani https://www.opensourceforu.com/author/jitendra-bhojwani/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Manual Renewal of SSL Certificates: A Simple Guide
======
![SSL-Certificates-Featured-image][1]
*In the April 2022 issue of this magazine, we read about the different types of SSL certificates and their applications. This article explains how to manually renew an existing SSL certificate, so that it stays updated with the latest security requirements.*
When visitors interact with your website and share critical details like credit card numbers, they trust that their information has been secured against misuse. So it becomes your responsibility to respect that trust and offer complete protection to all the visitors on your site. Failing to do so can not only cost you the loyalty of customers but may also put you in a legal soup. There have been many instances where websites that couldnt protect their customers data against leakage, theft or misuse were forced to pay hefty penalties, and also lost their reputation.
#### How does an SSL certificate secure customers data?
One of the best ways to protect sensitive customer information is to secure your site with an SSL (secure sockets layer) certificate. Without going into the technical nitty-gritties, an SSL certificate encrypts the communication between a Web server and the visitors browser, and thus makes it technically impossible for hackers or threat actors to steal data in transit. SSL establishes a secure handshake process to decrypt the encrypted information — a process that is too complex to be cracked by humans or even software.
#### Why do you need to update your SSL certificate?
While an SSL certificate does offer security against data theft or misuse, you need to update it periodically to ensure the most effective security against the latest threats. This article will list the step-by-step instructions for renewing your SSL certificate in the right way.
There are quite a few benefits of updating an SSL certificate:
* Timely renewal authenticates your websites identity.
* You get updated security.
* A one-year validity promotes the healthy practice of periodically renewing/upgrading the scope of protection, thus eliminating the risks associated with outdated versions.
> Note: The best practice is to select an auto renewal option that relieves you from the stress of remembering the renewal date or manually following the related steps. |
#### A bit off topic …a pure open source way to build your own SSL certificate
Yes, it is absolutely true! With some simplified and compact steps you can actually build your own SSL certificate from scratch! While the entire process is out of the scope of this article, here are a few key open source components and tools that you can use to create your SSL certificate.
* OpenSSL: This is a highly credible tool to implement TLS and crypto libraries.
* EasyRSA: This command-line tool enables you to build PKI CA and manage it efficiently.
* CFSSL: Cloudflare has finally built a multi-purpose, multi-capability tool for PKI and TLS.
* Lemur: A fair enough TLS producer developed by Netflix.
### How to renew your SSL certificate
While the broad process of [SSL][2] renewal remains the same, there could be some minor tweaks and variations depending upon your specific SSL provider.
The renewal process follows three main steps — CSR (certificate signing request) generation, certificate activation and, finally, the certificate installation.
**Generating CSR:** For cPanel hosting panels, you can click on the Security tab and search for the *SSL/TLS* option. It will display a screen that shows a link just under the CSR option. This section facilitates new CSR generation for your desired domain name.
You will be asked detailed contact information for confirming that you are the genuine domain owner. After filling the form, you will get a CSR code that is needed for certificate reactivation.
*Activating an SSL certificate:* In your dashboard, you can see a quick overview of the SSL certificate, domains and other digital infrastructure products that you own. Click this button to start the SSL renewal process. Enter the CSR generated a while ago and confirm the accuracy of the information. You can now validate the SSL renewal process.
*Validating the SSL certificate:* You will once again be prompted to confirm domain ownership. Enter your domain-associated email. Upload a file on the Web server where the certificate needs to be installed. Validate the SSL certificate with the help of CNAME records. While there are multiple options, it is best and easiest to validate it with an email. Once you enter the domain associated email, you will get an email containing a specific link followed by another mail that comprises the new certificate file with a .*crt* extension.
*Installing the SSL certificate:* Your Web hosting provider will either give you an option for communicating with the support team for installing renewed files or provide you with the detailed instructions on how you can do it manually through your cPanel. Keep in mind that different hosts offer different options for renewal. That said, if you are a non-technical person then contacting the support team will be the best option for you.
For manual updating, visit the *SSL/TLS* section of your cPanel and find the *Manage SSL* sites option. It contains the entire domain list that you own. Corresponding to each domain name you can see the Certificate Renewal option.
In the screen next to it, enter the details in *Private Key* using the *Autofill* by *Domain* option. Under the *Certificate* option, fill the details of your .*crt file*. You are almost done. Just click the button that reads *Install Certificate*.
Along with saving the critical data and sensitive information of your users, the SSL certificate also builds trust by reaffirming that data shared on your site is secure. It can also affect your SEO profile positively as Google considers SSL certification a healthy practice. However, to continue enjoying the best security with this certificate, you need to update it periodically. This ensures that your site is fully secured against the data in transit attacks as per the latest security requirements.
--------------------------------------------------------------------------------
via: https://www.opensourceforu.com/2022/07/manual-renewal-of-ssl-certificates-a-simple-guide/
作者:[Jitendra Bhojwani][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.opensourceforu.com/author/jitendra-bhojwani/
[b]: https://github.com/lkxed
[1]: https://www.opensourceforu.com/wp-content/uploads/2022/05/SSL-Certificates-Featured-image.jpg
[2]: https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&cad=rja&uact=8&ved=2ahUKEwitou7xjv_3AhWLRmwGHVZ2BWwQFnoECB0QAQ&url=https%3A%2F%2Fgithub.com%2Fopenssl%2Fopenssl&usg=AOvVaw0niwMRCpb4nN_PtJFMQwWP

View File

@ -0,0 +1,382 @@
[#]: subject: "Run Linux, macOS, Windows Virtual Machines With Quickemu"
[#]: via: "https://ostechnix.com/run-linux-macos-windows-virtual-machines-with-quickemu/"
[#]: author: "sk https://ostechnix.com/author/sk/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Run Linux, macOS, Windows Virtual Machines With Quickemu
======
Use Quickemu To Quickly Spin Up Virtual Machines For Linux, macOS And Windows
This guide explains what is **Quickemu** and how to create and **run Linux, macOS and Windows desktop virtual machines with Quickemu** in Linux.
### What Is Quickemu?
Quickemu is a command line program to quickly create and run optimized Linux, macOS and Windows desktop virtual machines.
You don't need sudo or root permissions to run virtual machines. You can simply test any Linux, macOS or Windows VMs as a normal user and store the virtual machine configurations in your HOME directory or USB disk.
The Quickemu application consists of two CLI tools namely **quickemu** and **quickget**.
The quickget CLI tool downloads the latest ISO image for your OS. By default, the downloaded images are saved in your HOME directory. You can change it to other location for example external USB drive.
And, the Quickemu CLI tool uses **QEMU** under the hood to create and manage virtual machines. So the VMs are highly optimized and should work out of the box without any additional configuration.
### Quickemu Features
Quickemu ships with a lot of features out of the box.
* Over 300 operating systems are supported.
* Supports both EFI (with or without SecureBoot) and Legacy BIOS boot.
* Full SPICE support with host/guest clipboard sharing.
* Enables file sharing for Linux and Windows guests using VirtIO-webdavd.
* Enables file sharing for Linux and macOS guests using VirtIO-9p.
* Enables Samba file sharing between Linux, macOS and Windows guests.
* Configures automatic SSH port-forwarding for guests.
* Network port forwarding.
* Full duplex audio support.
* Smartcard, USB device pass-through.
* VirGL acceleration.
* Braille support.
* Free and Opensource.
### Install Quickemu In Linux
Quickemu is a new project and has been packaged for a few operating systems at the moment.
**Arch Linux:**
Quickemu is available in **[AUR][1]**. If you're on Arch Linux and its variants like EndeavourOS, Manjaro Linux, you can install Quickemu using **[Paru][2]** or **[Yay][3]** helpers.
```
$ paru -S quickemu
```
Or,
```
$ yay -S quickemu
```
**NixOS:**
To install Quickemu in NixOS, run:
```
$ nix-env -i quickemu
```
**Ubuntu:**
The developer of Quickemu has created a dedicated PPA for Ubuntu and its derivatives such as Elementary OS, Linux Mint and Pop!_OS.
To install Quickemu in Ubuntu and its derivatives, run the following commands one by one.
```
$ sudo apt-add-repository ppa:flexiondotorg/quickemu
```
```
$ sudo apt update
```
```
$ sudo apt install quickemu
```
For other Linux distributions, refer to the project's GitHub repository given at the end.
### Run Linux, MacOS And Windows Virtual Machines With Quickemu
Creating and managing VMs with Quickemu is just two step process.
Download the OS image, for example Alpine Linux, using quickget CLI:
```
$ quickget alpine latest
```
You can also download a specific version of the Alpine like below:
```
$ quickget alpine 3.15
```
It will create a configuration file for the chosen OS. It will be named based on the selected OS.
```
alpine-latest/alpin 100%[===================>] 47.00M 3.52MB/s in 14s
Checking alpine-latest/alpine-virt-3.16.0-x86_64.iso with sha256sum... Good!
Making alpine-latest.conf
To start your Alpine Linux virtual machine run:
quickemu --vm alpine-latest.conf
```
![Download Alpine Linux ISO Image With Quickget][4]
Now start your Alpine Linux virtual machine using command:
```
$ quickemu --vm alpine-latest.conf
```
This command will create and launch the Alpine Linux virtual machine via Spicy GTK client.
![Run Alpine Linux Virtual Machine With Quickemu][5]
Please note that it is just a live system. You still need to install the OS. You can now start the Alpine OS installation as usual.
Each VM and its associated files(ISO, Qcow2, other configuration files) are stored in a separate directory in your HOME directory. For instance, if you created Alpine VM using the Alpine latest image, a new directory called "alpine-latest" will be created and the VM's related files will be kept in this directory.
```
$ ls alpine-latest
alpine-latest-agent.sock alpine-latest.pid alpine-latest.sh disk.qcow2
alpine-latest.log alpine-latest.ports alpine-virt-3.16.0-x86_64.iso OVMF_VARS.fd
```
As you see in the above output, my Alpine Linux VM's ISO file, Qcow2 disk file and other config files such as `.ports`, `.fd`, `.sock` etc., are saved inside **~/alpine-latest** directory.
### Accessing Virtual Machines From Host Via Terminal
Whenever you launch a VM, Quickemu will display the following useful information on your host system's terminal.
```
Quickemu 3.15 using /usr/bin/qemu-system-x86_64 v6.2.0
- Host: Ubuntu 22.04 LTS running Linux 5.15 (ubuntu2204)
- CPU: 11th Gen Intel(R) Core(TM) i3-1115G4 @ 3.00GHz
- CPU VM: 1 Socket(s), 1 Core(s), 1 Thread(s), 4G RAM
- BOOT: EFI (Linux), OVMF (/usr/share/OVMF/OVMF_CODE_4M.fd), SecureBoot (off).
- Disk: alpine-latest/disk.qcow2 (16G)
Looks unused, booting from alpine-latest/alpine-virt-3.16.0-x86_64.iso
- Boot ISO: alpine-latest/alpine-virt-3.16.0-x86_64.iso
- Display: SPICE, qxl-vga, GL (on), VirGL (off)
- ssh: On host: ssh user@localhost -p 22220
- SPICE: On host: spicy --title "alpine-latest" --port 5930 --spice-shared-dir /home/ostechnix/Public
- WebDAV: On guest: dav://localhost:9843/
- 9P: On guest: sudo mount -t 9p -o trans=virtio,version=9p2000.L,msize=104857600 Public-ostechnix ~/Public
- Process: Starting alpine-latest.conf as alpine-latest (11272)
```
As you see, It displays the configuration details of both host and VM including the other details such as how to access the VM via SSH, access the shared folder via SPICE client etc. You can use these details to access the VM from your host system.
For example, if the SSH service is configured with port 22220 in your VM, you can access the VM from your hosts system like below.
```
$ ssh -P 22220 vm-user@localhost
```
You can check the `.ports` file in the VM directory to find what SSH and SPICE ports the VM is connected to.
```
$ cat alpine-latest/alpine-latest.ports
ssh,22220
spice,5930
```
This can be useful when you want to start the VMs in headless mode.
### Create VMs With Custom Specification(CPU Core, Disk And Memory)
By default, Quickemu will allocate the number of CPUs cores, and the size of the disk and RAM based on your host computer's specification. You can override this default behavior by using the following parameters.
* cpu_cores="2" - Specify the number of CPU cores(E.g. 2 cores) allocated to the VM.
* ram="4G" - Specify the RAM capacity(E.g. 4 GB) to allocate to the VM.
* disk_size="20G" - Specify the disk size(E.g. 20 GB) to allocate to the VM.
To create a VM with 2 CPU cores, 4 GB RAM and 20 GB hdd, edit your VM configuration file:
```
$ nano alpine-latest.conf
```
Add the following lines:
```
cpu_cores="2"
ram="4G"
disk_size="20G"
```
![Create Custom Configuration VM Using Quickemu][6]
Now, start the VM using the updated config file:
```
$ quickemu --vm alpine-latest.conf
```
### Create Desktop Shortcut For VMs
Instead of typing the whole command, you can create a desktop shortcut for your VM like below.
```
$ quickemu --vm alpine-latest.conf --shortcut
```
This command will create shortcut for the Alpine VM in `~/.local/share/applications/` location.
```
$ ls ~/.local/share/applications/
alpine-latest.desktop
```
A menu entry for the VM is also created for the VM. From now on, you can launch the VM from the Dash or menu.
![Desktop Shortcut For VMs][7]
### Start VMs With SPICE Client
Launching VMs with SPICE protocol will offer you the following benefits.
* Share clipboard between host and guest.
* Share files between host and guest.
* Enable USB pass-through.
Make sure the `spicy` client is installed and run the following command to
```
$ quickemu --vm alpine-latest.conf --display spice
```
### Use Existing ISO Images
Sometimes, you might have already downloaded the ISO files. In that case, you don't need to use "quickget" command to download the ISO file. Instead, just edit your VM configuration file:
```
$ nano alpine-latest.conf
```
Update the correct ISO file pathg(E.g. /home/ostechnix/Downloads/) like below:
```
[...]
iso="/home/ostechnix/Downloads/alpine-virt-3.16.0-x86_64.iso"
```
Now Quickemu will use the ISO file saved in the "Downloads" directory.
### Start VMs In Headless Mode
Make sure the **spicy** client is installed.
Run the following command to start the VM with SPICE, but no display attached:
```
$ quickemu --vm alpine-latest.conf --display none
```
Since the VM is started in headless mode, you can access it via SSH only.
Assuming the SSH service is configured with port 22220 in your VM, you can access the VM from your hosts system like below.
```
$ ssh -P 22220 vm-user@localhost
```
You can check the `.ports` file in the VM directory to lookup what SSH and SPICE ports the VM is connected to.
```
$ cat alpine-latest/alpine-latest.ports
ssh,22220
spice,5930
```
### Configure Networking
**Enable Bridge Networking**
To allow your VM to a preconfigured network bridge, add the following line to the VM configuration:
```
bridge="br0"
```
**Port Forwarding**
To allow port forwarding, add the following line to VM configuration:
```
port_forwards=("22:2200" "8800:80"
```
Here,
* 22:2200 - The port 22 on your host system is forwarded to the port 2200 on your guest system.
* 8800:80 - The port 8800 on your host system is forwarded to the port 80 on your guest system.
Quickemu allows you to do a few other customization. For more details, refer the project's GitHub page given at the end.
### Delete Virtual Machine
You can delete a VM if it is no longer required using command:
```
$ quickemu --vm alpine-latest.conf --delete-vm
```
This command will the entire virtual machine along with its configuration.
### Display Help
To view Quickemu help, run:
```
$ quickemu --help
Usage
quickemu --vm ubuntu.conf
You can also pass optional parameters
--braille : Enable braille support. Requires SDL.
--delete-disk : Delete the disk image and EFI variables
--delete-vm : Delete the entire VM and it's configuration
--display : Select display backend. 'sdl' (default), 'gtk', 'none', or 'spice'
--fullscreen : Starts VM in full screen mode (Ctl+Alt+f to exit)
--ignore-msrs-always : Configure KVM to always ignore unhandled machine-specific registers
--screen <screen> : Use specified screen to determine the window size.
--shortcut : Create a desktop shortcut
--snapshot apply <tag> : Apply/restore a snapshot.
--snapshot create <tag> : Create a snapshot.
--snapshot delete <tag> : Delete a snapshot.
--snapshot info : Show disk/snapshot info.
--status-quo : Do not commit any changes to disk/snapshot.
--version : Print version
```
### Conclusion
Quickemu provides an easy way to quickly deploy and run Windows, macOS and Linux desktop virtual machines.
One distinct feature of Quickemu, we can download the ISO image directly using the Quickget CLI. I don't think if this feature is included in the other virtualization applications and hypervisors.
Also Quickemu usage is very easy! If you're looking for a simple way to run optimized Virtual machines for Linux, macOS and Windows, Quickemu is perfect choice!
**Resource:**
* [Quickemu GitHub Repository][8]
--------------------------------------------------------------------------------
via: https://ostechnix.com/run-linux-macos-windows-virtual-machines-with-quickemu/
作者:[sk][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://ostechnix.com/author/sk/
[b]: https://github.com/lkxed
[1]: https://aur.archlinux.org/packages/quickemu
[2]: https://ostechnix.com/how-to-install-paru-aur-helper-in-arch-linux/
[3]: https://ostechnix.com/yay-found-yet-another-reliable-aur-helper/
[4]: https://ostechnix.com/wp-content/uploads/2022/07/Download-Alpine-Linux-ISO-Image-With-Quickget.png
[5]: https://ostechnix.com/wp-content/uploads/2022/07/Run-Alpine-Linux-Virtual-Machine-With-Quickemu.png
[6]: https://ostechnix.com/wp-content/uploads/2022/07/Create-Custom-Configuration-VM-Using-Quickemu.png
[7]: https://ostechnix.com/wp-content/uploads/2022/07/Desktop-Shortcut-For-VMs.png
[8]: https://github.com/quickemu-project/quickemu

View File

@ -0,0 +1,120 @@
[#]: subject: "7 kinds of garbage collection for Java"
[#]: via: "https://opensource.com/article/22/7/garbage-collection-java"
[#]: author: "Jayashree Huttanagoudar https://opensource.com/users/jayashree-huttanagoudar"
[#]: collector: "lkxed"
[#]: translator: "Veryzzj"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
7 kinds of garbage collection for Java
======
Learn about the choices you have in Java for memory management.
An application written using programming languages like C and C++ requires you to program the destruction of objects in memory when they're no longer needed. The more your application grows, the great the probability that you'll overlook releasing unused objects. This leads to a memory leak and eventually the system memory gets used up, and at some point there's no further memory to allocate. This results in a situation where the application fails with an OutOfMemoryError. But in the case of Java, Garbage Collection (GC) happens automatically during application execution, so it alleviates the task of manual deallocation and possible memory leaks.
Garbage Collection isn't a single task. The Java Virtual Machine (JVM) has eight different kinds of Garbage Collection, and it's useful to understand each one's purpose and strength.
### 1. Serial GC
![Serial threaded garbage collection][1]
A primitive implementation of GC using just a single thread. When Garbage Collection happens, it pauses the application (commonly known as a "stop the world" event.) This is suitable for applications that can withstand small pauses. Garbage Collection has a small footprint, so this is the preferred GC type for embedded applications. This Garbage Collection style can be enabled at runtime:
```
$ java -XX:+UseSerialGC
```
### 2. Parallel GC
![Parallel garbage collection][2]
Like Serial GC, this also uses a "stop the world" method. That means that while GC is happening, application threads are paused. But in this case, there are multiple threads performing GC operation. This type of GC is suitable for applications with medium to large data sets running in a multithreaded and multiprocessor environment.
This is the default GC in JVM, and is also known as the *Throughput Collector*. Various GC parameters, like throughput, pause time, number of threads, and footprint, can be tuned with suitable JVM flags:
* Number of threads: `-XX:ParallelGCThreads=<N>`
* Pause time: `-XX:MaxGCPauseMillis=<N>`
* Throughput (time spent for GC compared to actual application execution): `-XX:GCTimeRatio=<N>`
* Maximum heap footprint: `-Xmx<N>`
* Parallel GC can be explicitly enabled: `java -XX:+UseParallelGC`. With this option, minor GC in the young generation is done with multiple threads, but GC and compaction is done with a single thread in the old generation.
There's also a version of Parallel GC called *Parallel Old GC*, which uses multiple threads for both young and old generations:
```
$ java -XX:+UseParallelOldGC
```
### 3. Concurrent Mark Sweep (CMS)
![Concurrent garbage collection][3]
Concurrent Mark Sweep (CMS) garbage collection is run alongside an application. It uses multiple threads for both minor and major GC. Compaction for live objects isn't performed in CMS GC after deleting the unused objects, so the time paused is less than in other methods. This GC runs concurrently with the application, which slows the response time of the application. This is suitable for applications with low pause time. This GC was deprecated in Java 8u, and completely removed from 14u onwards. If you're still using a Java version that has it, though, you can enable it with:
```
$ java -XX:+UseConcMarkSweepGC
```
In the case of CMS GC, the application is paused twice. It's paused first when it marks a live object that's directly reachable. This pause is known as the *initial-mark*. It's paused a second time at the end of the CMS GC phase, to account for the objects that were missed during the concurrent cycle, when application threads updated the objects after CMS GC were completed. This is known as the *remark phase*.
### 4. G1 (Garbage First) GC
![Garbage first][4]
Garbage first (G1) was meant to replace CMS. G1 GC is parallel, concurrent, and incrementally compacting, with low pause-time. G1 uses a different memory layout than CMS, dividing the heap memory into equal sized regions. G1 triggers a global mark phase with multiple threads. After the mark phase is complete, G1 knows which region might be mostly empty and chooses that region for a sweep/deletion phase first.
In the case of G1, an object that's more than half a region size is considered a "humongous object." These objects are placed in the Old generation, in a region appropriately called the *humongous region*. To enable G1:
```
$ java -XX:+UseG1GC
```
### 5. Epsilon GC
This GC was introduced in 11u and is a *no-op* (do nothing) GC. Epsilon just manages memory allocation. It doesnt do any actual memory reclamation. Epsilon is intended only when you know the exact memory footprint of your application, and knows that it is garbage collection free.
```
$ java -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC
```
### 6. Shenandoah
Shenandoah was introduced in JDK 12, and is a CPU intensive GC. It performs compaction, deletes unused objects, and release free space to the OS immediately. All of this happens in parallel with the application thread itself. To enable Shenandoah:
```
$ java -XX:+UnlockExperimentalVMOptions \
-XX:+UseShenandoahGC
```
### 7. ZGC
ZGC is designed for applications that have low latency requirements and use large heaps. ZGC allows a Java application to continue running while it performs all garbage collection operations. ZGC was introduced in JDK 11u and improved in JDK 12. Both Shenandoah and ZGC have been moved out of the experimental stage as of JDK 15. To enable ZGC:
```
$ java -XX:+UnlockExperimentalVMOptions -XX:+UseZGC
```
### Flexible garbage collection
Java provides flexibility for memory management. It's useful to get familiar with the different methods available so you can choose what's best for the application you're developing or running.
Image by: [Opensource.com][5]
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/7/garbage-collection-java
作者:[Jayashree Huttanagoudar][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/jayashree-huttanagoudar
[b]: https://github.com/lkxed
[1]: https://opensource.com/sites/default/files/2022-07/jaya-java-gc-serial.webp
[2]: https://opensource.com/sites/default/files/2022-07/jaya-java-gc-parallel.webp
[3]: https://opensource.com/sites/default/files/2022-07/jaya-java-gc-concurrent.webp
[4]: https://opensource.com/sites/default/files/2022-07/g1.png
[5]: https://opensource.com/home-page-new

View File

@ -0,0 +1,184 @@
[#]: subject: "List Upgradable Packages With apt Command in Ubuntu"
[#]: via: "https://itsfoss.com/apt-list-upgradable/"
[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
List Upgradable Packages With apt Command in Ubuntu
======
The [apt command][1] is used for package management in Debian and Ubuntu. While you are probably already familiar with the install and remove options, apt provides a few extra features as well.
One of them is the ability to see all the upgradable packages on your system. And to display them, all you have to do is to use this command in the terminal:
```
apt list --upgradable
```
As you can notice, you dont even need sudo to list the updatable packages. It just lists the packages that can be updated. It doesnt update them.
In fact, the apt command adds this hint when you run the `sudo apt update` command to update the local package repository cache.
```
Fetched 1,243 kB in 17s (71.4 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
30 packages can be upgraded. Run 'apt list --upgradable' to see them.
```
I dont recall any similar direct option in the older apt-get command to list all the upgradable packages. Thats one of the several new features apt has added on top of the older apt-get command.
Lets talk about it in a bit more detail.
### Listing all the upgradable packages
What you should know here is that **you only get to list the updates available through the APT package manager.** So, if you have added PPAs or [external repositories][2] to your systems sources.list, youll see the updates from them.
But you wont get updates for AppImage, Flatpak, Snap or some other packaging formats here.
In other words, it works with apt packages only.
So, to list all the upgradable packages on your Ubuntu or Debian system, you should update the local package cache first:
```
sudo apt update
```
And then your system will be aware of the available package updates. The apt command tells you how many packages can be upgraded at the end of the update command:
![The apt command shows the number of upgradable packages at the bottom of the apt update command output][3]
To see what package can be upgraded, run the command:
```
apt list --upgradable
```
You should see an output like this:
```
[email protected]:~$ apt list --upgradable
Listing... Done
apparmor/jammy-updates 3.0.4-2ubuntu2.1 amd64 [upgradable from: 3.0.4-2ubuntu2]
brave-browser/stable 1.40.113 amd64 [upgradable from: 1.40.107]
evolution-data-server-common/jammy-updates,jammy-updates 3.44.2-0ubuntu1 all [upgradable from: 3.44.1-0ubuntu2]
evolution-data-server/jammy-updates 3.44.2-0ubuntu1 amd64 [upgradable from: 3.44.1-0ubuntu2]
```
![Listing all the upgradable packages][4]
It **lists all the upgradable packages in alphabetical order** with the information on the currently installed version and the new available package version.
```
brave-browser/stable 1.40.113 amd64 [upgradable from: 1.40.107]
```
For example, It shows that I have Brave browser version 1.40.107 installed on the system, and version 1.40.113 is available.
What can you do with this information? Let me share a few things I can think of.
### Upgrade all the packages
This is probably what most casual Ubuntu users do. You can upgrade all the upgradable packages with the following command:
```
sudo apt upgrade
```
It lists what packages will be upgraded and then asks to confirm the upgrade by pressing enter or Y.
![Upgrade all packages][5]
If you are sure about upgrading all the packages, you can skip the Do you want to continue part by giving it the go ahead by adding -y to the command.
```
sudo apt upgrade -y
```
### Simulate an upgrade (but dont upgrade any packages)
This is what people did before the apt list command. With the simulate option, you dont actually make any changes. It just shows what packages will be installed or upgraded if you run the upgrade.
```
apt -s upgrade
```
You dont need to use sudo (even though I have used it in the screenshot below).
![Running an upgrade simulation with apt command][6]
### Upgrade only the selected packages
If you are managing an Ubuntu server and you dont want to upgrade all the packages but only one of a few selected ones (like MySQL/Ngnix), you can do that easily with the apt command.
```
sudo apt --only-upgrade install package_name
```
Actually, if you run the apt install command on an already installed package for which an update is available, it will upgrade the package.
With the `--only-upgrade` flag, you ensure that a package is only upgraded (if it is already installed). It wont install the given package if it is not already installed.
You can also upgrade selected few packages by providing their name:
```
sudo apt --only-upgrade install package1 package2
```
You can also do the opposite and [hold selected packages from the upgrade][7].
```
sudo apt-mark hold package_name
```
With that, the given package wont be upgraded when you upgrade all the system packages.
You can remove the hold with this command:
```
sudo apt-mark unhold package_name
```
### Does it show the kernel upgrades?
This is kind of tricky.
When you run the apt list upgradable command it shows all the packages that can be upgraded.
But if there are new kernel versions available, they might not be shown since the kernel package name starts with linux-headers-x-y. Its because the system treats them as new packages, not an upgrade on already installed package linux-headers-a-b.
However, you would still see “linux-generic-hwe” kind of package in the list of upgradable packages. Because that package will be upgraded (with the newer kernel).
### Conclusion
The ability to list upgradable packages is one of the several new features the apt command brought over the older apt-get command. For more on this topic, you can read my article [explaining the difference between the apt and apt-get commands][8].
As a desktop user, I dont always check the packages that can be upgraded. I go for the upgrade straightaway. However, when I am managing a server, I prefer to see what updates are available and then decide whether or not I am going for an upgrade.
How about you? Do you see a good use for this feature for yourself?
--------------------------------------------------------------------------------
via: https://itsfoss.com/apt-list-upgradable/
作者:[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/author/abhishek/
[b]: https://github.com/lkxed
[1]: https://itsfoss.com/apt-command-guide/
[2]: https://itsfoss.com/adding-external-repositories-ubuntu/
[3]: https://itsfoss.com/wp-content/uploads/2022/07/update-package-cache-ubuntu.png
[4]: https://itsfoss.com/wp-content/uploads/2022/07/apt-list-upgradable-packages-ubuntu.webp
[5]: https://itsfoss.com/wp-content/uploads/2022/07/upgrade-all-packages-ubuntu.webp
[6]: https://itsfoss.com/wp-content/uploads/2022/07/run-an-upgrade-simulation-apt-ubuntu.webp
[7]: https://itsfoss.com/prevent-package-update-ubuntu/
[8]: https://itsfoss.com/apt-vs-apt-get-difference/

View File

@ -0,0 +1,173 @@
[#]: subject: "OpenWrt, an open source alternative to firmware for home routers"
[#]: via: "https://opensource.com/article/22/7/openwrt-open-source-firmware"
[#]: author: "Stephan Avenwedde https://opensource.com/users/hansic99"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
OpenWrt, an open source alternative to firmware for home routers
======
OpenWrt is a Linux-based, open source operating system targeting embedded network devices.
If you're reading this article from home, you are probably connected with a LTE/5G/DSL/WIFI router. Such devices are usually responsible to route packets between your local devices (smartphone, PC, TV, and so on) and provide access to the world wide web through a built-in modem. Your router at home has most likely a web-based interface for configuration purposes. Such interfaces are often oversimplified as they are made for casual users.
If you want more configuration options, but don't want to spend for a professional device you should take a look at an alternative firmware such as [OpenWrt][2].
### OpenWrt features
OpenWrt is a Linux-based, open source operating system targeting embedded network devices. It is mainly used as a replacement for the original firmware on home routers of all kinds. OpenWrt comes with all the useful features a good router should have like a DNS server ([dnsmasq][3]), Wifi access point and client functionality, PPP protocol for modem functionality and, unlike with the standard firmware, everything is fully configurable.
### LuCI Web Interface
OpenWrt can be configured remotely by command line (SSH) or using [LuCI][4], a GUI configuration interface. LuCI is a lightweight, extensible web GUI written in [Lua][5], which enables an exact configuration of your device. Besides configuration, LuCI provides a lot of additional information like real time graphs, system logs, and network diagnostics.
![LuCI web interface][6]
Image by: Stephan Avenwedde, [CC BY-SA][7]
There are some optional extensions available for LuCI to add even further configuration choices.
### Writeable file system
Another highlight is the writeable filesystem. While the stock firmware is usually read-only, OpenWrt comes with a writeable filesystem thanks to a clever solution that combines OverlayFS with SquashFS and JFFS2 filesystems to allow installation of packages to enhance functionality. Find more information about the file system architecture in the [OpenWrt documentation][8].
### Extensions
OpenWrt has an associated package manager, [opkg][9], which allows to install additional services. Some examples are an FTP server, a DLNA media server, an OpenVPN server, a Samba server to enable file sharing, or Asterisk (software to control telephone calls). Of course, some extensions require appropriate resources of the underlying hardware.
### Motivation
You might wonder why you should try to replace a router manufacture's firmware, risking irreparable damage to your device and loss of warranty. If your device works the way you want, then you probably shouldnt. Never touch a running system! But if you want to enhance functionality, or if your device is lacking configuration options, then you should check whether OpenWrt could be a remedy.
In my case, I wanted a travel router which I can place on an appropriate position when Im on a campsite in order to get a good connection to the local Wifi access point. The router should connect itself as an ordinary client and broadcasts its own access point for my devices. This allows me to configure all my devices to connect with the routers access points and I only have to change the routers client connection when Im somewhere else. Moreover, on some campsites you only get an access code for one single device, which I can enhance with this setup.
As my travel router, I choose the TP-Link TL-WR902AC for the following reasons:
* Small
* Two Wifi antennas
* 5V power supply (USB)
* Low power consumption
* Cost effective (you get it for around $30)
To get an idea of the size, here it is next to a Raspberry Pi4:
![TP-Link TL-WR902AC next to a Raspberry Pi][10]
Image by: Stephan Avenwedde, [CC BY-SA 4.0][11]
Even though the router brings all hardware capabilities I demand, I relatively quickly found out that the default firmware dont let me configure it the way I wanted. The router is mainly intended as an Wifi access point, which repeats an existing Wifi network or connects itself to the web over the onboard Ethernet interface. The default firmware is very limited for these use cases.
Fortunately, the router is capable of running OpenWrt, so I decided to replace the original firmware with it.
### Installation
When your LTE/5G/DSL/WIFI router meets the [minimum requirements][12], chances are high that it's possible to run OpenWrt on it. As the next step, you look in the [hardware table][13] and check whether your devices is listed as compatible, and which firmware package you have to choose. The page for the [TP-Link TL-WR902AC][14] also includes the installation instructions which describe how to flash the internal memory.
The process of flashing the firmware can vary between different devices, so I wont go into detail on this. In a nutshell, I had to connect the device over  a TFTP server on a network interface with a certain IP address, rename the OpenWrt firmware file and then boot up the device considering pressing the reset button.
### Configuration
Once flashing was successfully, your device should now boot up with the new firmware. It may take a bit longer now to boot up as OpenWrt comes with much more features compared to the default firmware.
OpenWrt acts as a DHCP server, so in order to begin with configuration, make a direct Ethernet connection between your PC and the router, and configure your PCs Ethernet adapter as a DHCP client.
On Fedora Linux, to activate the DHCP client mode for your network adapter, first you have to find out the connection UUID by running:
```
$ nmcli connection show
NAME          UUID         TYPE      DEVICE
Wired Conn 1  7a96b...27a  ethernet  ens33
virbr0        360a0...673  bridge   virbr0
testwifi      2e865...ee8  wifi     --
virbr0        bd487...227  bridge   --
Wired Conn 2  16b23...7ba  ethernet --
```
Pick the UUID for the connection you want to modify and then run:
```
$ nmcli connection modify <UUID> ipv4.method auto
```
You can find more information about these commands in the [Fedora Networking Wiki][15].
After you have a connection to your router, open a web browser and navigate to [http://openwrt/][16]. You should now see LuCIs login manager:
![LuCI login][17]
Use **root** as the username, and leave the password field blank.
### Configuring Wifi and routing
To configure your Wifi antennas, click on the **Network** menu and select **Wireless**.
![LuCI wireless configuration][19]
On my device, the antenna **radio0** on top operates in 2.4 GHz mode and is connected to the local access point called *MOBILE-INTERNET*. The antenna **radio1** below operates at 5 GHz and has an associated access point with the SSID *OpenWrt_AV*. With a click of the **Edit**button, you can open the device configuration to decide whether the device belongs to the *LAN* or WWAN network. In my case, the access point *OpenWrt_AV* belongs to the LAN network and the client connection *MOBILE-INTERNET* belongs to the WWAN network.
![LuCI configuration screen][21]
Configured networks are listed under **Network**, in the **Interfaces** panel.
![Device list][23]
In order to get the functionality I want, network traffic must be routed between the LAN and the WWAN network. The routing can be configured in the **Firewall** section of the **Network** panel. I didnt change anything here because, by default, the traffic is routed between the networks, and incoming packets (from WWAN to LAN) have to pass the firewall.
So all you need to know is whether an interface belongs to LAN or (W)WAN. This concept makes it relatively easy to configure, especially for beginners. You can find more information in [OpenWrts basic networking][25] guide.
### Captive portals
Public Wifi access points are often protected by a [captive portal][26] where you have to enter an access code or similar. Usually, such portals show up when you are first connected to the access point and try to open an arbitrary web page. This mechanism is realized by the access point's DNS server.
By default, OpenWrt has a security feature activated that prevents connected clients from a [DNS rebinding attack][27]. OpenWrts rebind protection also prevents captive portals from being forwarded to clients, so you must disable rebind protection so you can reach captive portals. This option is in the **DHCP and DNS** panel of the **Network** menu.
![Firewall settings][28]
### Try OpenWrt
Thanks to an upgrade to OpenWrt, I got a flexible travel router based on commodity hardware. OpenWrt makes your router fully configurable and extensible and, thanks to the well-made web GUI, it's also appropriate for beginners. There are even a few [select routers][30] that ship with OpenWrt already installed. You are also able to enhance your router's functionality with lots of [available packages][31]. For example, Im using the [vsftp][32] FTP server to host some movies and TV series on a connected USB stick. Take a look at the [projects homepage][33], where you can find many reasons to switch to OpenWrt.
Image by: Stephan Avenwedde, [CC BY-SA 4.0][7]
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/7/openwrt-open-source-firmware
作者:[Stephan Avenwedde][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/hansic99
[b]: https://github.com/lkxed
[1]: https://opensource.com/sites/default/files/lead-images/OSDC_Internet_Cables_520x292_0614_RD.png
[2]: https://openwrt.org
[3]: https://thekelleys.org.uk/dnsmasq/doc.html
[4]: https://openwrt.org/docs/guide-user/luci/start
[5]: https://opensource.com/article/20/2/lua-cheat-sheet
[6]: https://opensource.com/sites/default/files/2022-07/openwrt_luci_overview_c_0.png
[7]: https://creativecommons.org/licenses/by-sa/4.0/legalcode
[8]: https://openwrt.org/docs/techref/flash.layout
[9]: https://openwrt.org/docs/guide-user/additional-software/opkg
[10]: https://opensource.com/sites/default/files/2022-07/OpenWrt_Comparison_RaspberryPi.jpg
[12]: https://openwrt.org/supported_devices
[13]: https://openwrt.org/toh/start
[14]: https://openwrt.org/toh/tp-link/tl-wr902ac_v3
[15]: https://fedoraproject.org/wiki/Networking/CLI
[16]: http://openwrt/
[17]: https://opensource.com/sites/default/files/2022-07/openwrt_luci_login_manager.png
[19]: https://opensource.com/sites/default/files/2022-07/openwrt_luci_wireless_section_c.webp
[21]: https://opensource.com/sites/default/files/2022-07/openwrt_luci_wifi_device_configuration.webp
[23]: https://opensource.com/sites/default/files/2022-07/openwrt_luci_network_devices_0.webp
[25]: https://openwrt.org/docs/guide-user/base-system/basic-networking
[26]: https://en.wikipedia.org/wiki/Captive_portal
[27]: https://en.wikipedia.org/wiki/DNS_rebinding
[28]: https://opensource.com/sites/default/files/2022-07/openwrt_luci_firewall_settings.webp
[30]: https://opensource.com/article/22/1/turris-omnia-open-source-router
[31]: https://openwrt.org/packages/table/start
[32]: https://openwrt.org/docs/guide-user/services/nas/ftp.overview
[33]: https://openwrt.org/reasons_to_use_openwrt

View File

@ -0,0 +1,67 @@
[#]: subject: "Do You Miss Firefox Send? Internxt Send is Ready as a Replacement"
[#]: via: "https://news.itsfoss.com/internxt-send/"
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
[#]: collector: "lkxed"
[#]: translator: "lkxed"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
怀念 Firefox Send 吗?不妨试试 Internxt Send 吧
======
Internxt 发布了一个新产品,它可以让你快速地将加密文件发送给任何人,同时保持你的隐私。嗯,我们只能希望它不会像 Firefox Send 那样关闭吧……
![Internxt][1]
[Internxt][2] 是一个相当新的开源加密云服务,旨在取代大型科技公司的产品。例如,你可以把它作为 Google Photos 和 Drive 的替代品。
它免费提供 10 GB 的容量。所以,如果感兴趣的话,你可以注册个账号试一试。
最近,他们还新增了另一个产品 “Internxt Send”作为 Firefox Send 的替代品,填补这个空缺。
说到这里还挺遗憾的Firefox Send 已停止服务了,不得不说它是一个很好的工具!
不过,[Internxt Send][3] 让你可以像 Firefox Send 一样安全地发送/共享图像、视频、文档和其他文件。
### Internxt Send一个安全的文件共享服务
![][4]
我在 GitHub 上找不到 Internxt Send 的存储库,但我已经要求他们澄清了。
*LCTT 译注:虽然 Internxt 是在 GitHub 上开源的,但是 GitHub 上没有 Internxt Send 这个产品的存储库,产品的介绍里也没有声称它是开源的。*
正如你所期望的那样,你无需创建帐户即可将文件上传到 Internxt Send。
文件上传限制为 5 GB。而且你不能以任何方式提高这个限制。
你可以选择文件,上传并生成共享链接。或者,你也可以直接向收件人发送电子邮件,那样的话,你需要在邮件里分享你的电子邮件地址。
![][5]
有趣的是,它还允许你在这个电子邮件中添加自定义文本。
与 Firefox Send 不同的是,你无法修改文件共享链接的到期时间,或者是让它在多次下载后失效。默认情况下,链接会在 15 天后过期,你无法更改这个时间。嗯,这还挺扫兴的。
但是,对于那些正在苦苦等待一个加密的共享文件服务的人来说,这可能是一种替代方案。
*我认为有更多的 Firefox Send 替代品是件好事!你对 Internxt Send 有何看法?欢迎在下方评论区里和大家分享。*
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/internxt-send/
作者:[Ankush Das][a]
选题:[lkxed][b]
译者:[lkxed](https://github.com/lkxed)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/ankush/
[b]: https://github.com/lkxed
[1]: https://news.itsfoss.com/wp-content/uploads/2022/07/internxt-send-ft-1.jpg
[2]: https://itsfoss.com/internxt-cloud-service/
[3]: https://send.internxt.com/
[4]: https://news.itsfoss.com/wp-content/uploads/2022/07/internxt-send-1024x640.png
[5]: https://news.itsfoss.com/wp-content/uploads/2022/07/internxt-send-screenshot-1024x782.png

View File

@ -0,0 +1,268 @@
[#]: subject: "Beginners Guide to Installing Arch Linux on VirtualBox"
[#]: via: "https://itsfoss.com/install-arch-linux-virtualbox/"
[#]: author: "Ankush Das https://itsfoss.com/author/ankush/"
[#]: collector: "lujun9972"
[#]: translator: "hanszhao80"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
VirtualBox 安装 Arch Linux 的新手操作指南
======
[Arch Linux 在桌面 Linux 世界中非常流行][1]。受欢迎的原因之一是 [安装 Arch Linux][2] 本身就是一项复杂的任务。
我没有夸大其词。安装 [Ubuntu 或 Debian][3] 比 Arch Linux 容易得多,因为官方没给后者提供图形界面的安装程序。这时虚拟机就派上用场了。
你可以先在 VirtualBox 中尝试安装 Arch Linux看看它是否是你想在实际硬件上运行的系统。通过这种方式你可以在不打乱当前操作系统的情况下体验 Arch Linux。
在本文,我将一步一步指导你完成一个实用的 Arch Linux 虚拟机的安装过程。
### 在 VirtualBox 上安装 Arch Linux
毫无疑问,你需要先 [在 Linux 上安装 VirtualBox][4](或 Windows。在 Windows 上,只需访问 Oracle 的网站并下载 VirtualBox。
[下载 VirtualBox][5]
如果你使用的是 Windows 10 或更高版本,请确保你的系统已启用虚拟化。
完成后,你需要到 [Arch Linux 官方网站][6] 下载 ISO 文件。你应该找到 [使用 torrent 下载][7] 或直接下载文件的选项。
![][8]
你可以保留 ISO 文件以备不时之需,安装成功后也可以将其删除以 [释放系统上的空间][9]。
现在,让我们开始在 VirtualBox 上安装 Arch Linux 吧。
#### 第一部分 创建虚拟机
**第一步**:首先,你需要在 VirtualBox 中设置一下。启动 VirtualBox 并单击 **<ruby>新建<rt>New</rt></ruby>** 来创建一个虚拟机。
![][10]
注意,你可以使用<ruby>向导模式<rt>guided mode</rt></ruby>继续创建虚拟机,但使用<ruby>专家模式<rt>expert mode</rt></ruby>可以一目了然地获得更多选项。
![][11]
因此,我推荐使用专家模式来创建虚拟机。
不用担心,专家模式同样简单,只是多了一些额外的可选项,无需担心其他任何事情。
**第二步**:输入你的虚拟机名称。当你在<ruby>名称<rt>Name</rt></ruby>字段中输入 **Arch Linux** 时,它会分别自动检测<ruby>类型<rt>Type</rt></ruby><ruby>版本<rt>Version</rt></ruby>
![][12]
你应该增加内存大小以舒适地使用虚拟机。如果只是用于小型测试,你可以继续使用默认设置。
我在这个例子中分配了 **4 GB 左右的内存**
另外,请确保在<ruby>硬盘<rt>Hard disk</rt></ruby>选项下选择**<ruby>现在创建虚拟硬盘<rt>create a virtual hard disk</rt></ruby>**。它应该是默认选项。
现在,继续设置虚拟硬盘大小。
**第三步**:你可以选择虚拟硬盘的存放位置,并根据你的需求调整大小。最小分配大小 (8 GB) 对于安装系统应该不是问题,但安全起见,你可能得分配至少 10 到 15 GB。
![][13]
接下来,你需要将硬盘硬盘文件类型选择为 **VDI (VirtualBox <ruby>磁盘镜像<rt>Disk Image</rt></ruby>)** ,将存储选择为 **<ruby>动态分配<rt>Dynamically assigned</rt></ruby>**,如上图所示。
VDI 是虚拟硬盘最常见的硬盘类型。
当你为硬盘存储选择 **动态分配** 选项时,这意味着存储空间将根据使用情况进行使用。换言之,当创建虚拟机后,并不会立即将这 15 GB 的空间从你的磁盘中锁定。
现在,你所要做的就是点击 **<ruby>创建<rt>Create</rt></ruby>** 来添加虚拟机。
#### 第二部分 添加 ISO 文件以开始安装 Arch Linux
![][14]
当虚拟机在左侧列表中出现后,你可以查看其配置并在 **<ruby>存储<rt>Storage</rt></ruby>** 选项下选择 ISO 文件作为磁盘驱动。
你也可以单独前往虚拟机设置以探索更多内容并选择 ISO 文件。
![][15]
为此,你需要导航至虚拟机设置的 **<ruby>存储<rt>Storage</rt></ruby>** 页签。
![][16]
在这里,你必须单击 <ruby>控制器<rt>Controller</rt></ruby> 下的 **<ruby>没有盘片<rt>Empty</rt></ruby>**,然后继续选择 Arch Linux ISO 文件作为磁盘文件(如上图所示)。
![][17]
完成选择后,点击 **OK** 以保存设置的变更。
将 ISO 设置为要引导的磁盘时,虚拟机设置应如下所示:
![][18]
现在,点击 **<ruby>启动<rt>Start</rt></ruby>** 启动虚拟机并开始安装。
#### 第三部分 使用引导式安装程序安装 Arch Linux
使用 [介绍一个引导式安装程序][19] 的方法使安装 Arch Linux 变得更容易,也就是说,它为你提供了设置成熟的 Arch Linux 系统所需的所有选项。
因此,在引导式安装程序的帮助下,你不必单独安装桌面环境和其他基本软件包。你所要做的就是按照屏幕上的说明选择适合你的选项。
在本文中,我们将重点介绍引导式安装程序。如果你想自己做,你应该遵循我们的 [Arch 安装指南][2]。
继续安装流程,当你启动虚拟机时,将看到以下屏幕:
![][20]
第一个选项是理想的处理方式。如果你有特定的要求,可以选择其他选项来启动 Arch Linux。
现在,你应该正在查看一个终端窗口。以下是如何开始:
**第一步**:输入 `archinstall` 以使用引导式安装程序启动安装。
![][21]
**第二步**根据你的要求选择键盘布局美式布局应该是最常见的选择。简单地输入一个数字即可进行选择如下图所示例如26
![][22]
**第三步**:接下来,你需要选择一个区域来下载包。
![][23]
选择首选地区而不是“<ruby>全球<rt>“Worldwide”</rt></ruby>”。这至关重要,因为如果你选择 **全球** 作为你的地区,它会下载许多不必要的包。
**第四步**:选择区域后,它会要求你选择驱动器进行安装。在这个例子中,我们已经创建了一个大约 15 GB 的虚拟驱动器,显示为 **/dev/sda**。
类似的,根据大小检查你创建的驱动器,然后选择该磁盘继续。在这里,我输入 `1` 作为输入;你的可能会有所不同。
![][24]
**第五步**:接下来,你将被询问以下内容:
- **选择文件系统类型**
- **加密密码** (可选的)
- **主机名**
- **创建 root 密码** (可选的)
- **创建超级用户**
- **选择一个预编程的配置文件**
![][25]
在我的测试中,我选择了 BTRFS 作为文件系统,没有设置任何磁盘加密密码。
主机名可随心所欲的设置,但我建议保持简短。
你可以选择创建一个 root 密码,即使不这么做也应该没什么问题。不过,你需要创建一个具有 Sudo 权限的超级用户。
我使用 **admin/pass** 作为用户名和密码。不过,如果你不想让其他人访问你计算机上的虚拟机,则不应使用易于猜测的密码。
然后,你将看到一个选择配置文件的选项。在这种情况下,我们需要一个成熟的 Arch Linux 桌面。因此,我们通过输入 `0` 来选择 **<ruby>桌面<rt>desktop</rt></ruby>**。
**第六步**:接下来,你将被要求选择桌面环境。我决定使用 KDE。你可以选择任何你喜欢的。
![][26]
**第七步**:最后,你将被要求选择显卡驱动程序。由于我们是在 VirtualBox 上安装的 Arch Linux你可以选择选项 4**VMware/VirtualBox**,如下图所示:
![][27]
你可能还会被要求输入“是y或否no”选择 pipewire 而不是 PulseAudio 作为音频服务。选任何一个都应该都能达到目的。
**第八步**:接下来是重要的一步。在这里,如果你需要内核的 LTS 版本,你可以选择使用 **linux-lts**,或者继续使用默认值。
![][28]
安装程序会提示你输入想安装的软件包。在这里,我们没有任何特殊要求,因此我们将其留空并按回车键跳过。
**第九步**:你将被要求选择所需的网络适配器以启用互联网访问。你必须选择以下选项:
**<ruby>使用网络管理器来控制和管理你的互联网连接<rt>Use network manager to control and manage your internet connection</rt></ruby>**
![][29]
**第十步**:下一步需要定义时区。选择适用于你的时区,或继续使用默认选项。
**第十一步**:完成后,它将显示你选择的大部分选项以供确认。按 **回车** 继续。
![][30]
**第十二步**:安装完成需要花费几分钟时间,这取决于你的互联网连接速度。
安装完成后,它会要求你**chroot 进入新创建的安装以进行安装后配置**,但我们不需要。因此输入 `N` 以完成安装。
**第十三步**:最后,你应该会再次看到终端窗口。输入:
```
shutdown now
```
这将安全地退出安装并关闭虚拟机。
一切就绪!在启动安装了 Arch 的虚拟机之前,你还需要做一件事 —— **移除选择作为光驱的 ISO 磁盘**。与添加启动 ISO 的方式类似,你可以前往虚拟机设置并将其删除,如下所示:
![][31]
到此为止你已在 VirtualBox 上安装了 Arch Linux。
你所要做的就是启动虚拟机,在我的例子中它是这样的:
![virtualbox arch][32]
尽管浏览这些选项需要一些时间,但 Arch Linux 上新的引导式安装程序可以节省大量时间使必填项配置正确。
![][33]
同样的步骤也适用于在你的计算机上安装 Arch Linux。你需要用 Arch Linux ISO 文件 [使用 Etcher 制作单独的可启动 USB 盘][34]。
### 总结
[Arch Linux 成为一种流行的选择][1] 有多种原因。但是,如果这是你第一次安装,或者你想对其进行测试,那么虚拟机是在不打乱主机的情况下体验它的最佳方式。
我希望这可以帮助你在 VirtualBox 上安装 Arch Linux。在下面的评论中让我知道你的想法。
--------------------------------------------------------------------------------
via: https://itsfoss.com/install-arch-linux-virtualbox/
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[hanszhao80](https://github.com/hanszhao80)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://itsfoss.com/why-arch-linux/
[2]: https://itsfoss.com/install-arch-linux/
[3]: https://itsfoss.com/debian-vs-ubuntu/
[4]: https://itsfoss.com/install-virtualbox-ubuntu/
[5]: https://www.virtualbox.org/wiki/Downloads
[6]: https://archlinux.org/download/
[7]: https://itsfoss.com/best-torrent-ubuntu/
[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/archlinux-downloads.png?resize=800%2C419&ssl=1
[9]: https://itsfoss.com/free-up-space-ubuntu-linux/
[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/virtualbox-new.png?resize=800%2C562&ssl=1
[11]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/10/virtualbox-expert-mode.png?resize=707%2C438&ssl=1
[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/10/virtualbox-create.png?resize=800%2C536&ssl=1
[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/10/virtualbox-disk.png?resize=800%2C528&ssl=1
[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/choose-disk-virtualbox-arch.png?resize=800%2C440&ssl=1
[15]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/10/virtualbox-settings-option.png?resize=800%2C551&ssl=1
[16]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/virtualbox-choose-iso.png?resize=800%2C314&ssl=1
[17]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/virtualbox-arch-iso-select.png?resize=800%2C348&ssl=1
[18]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/10/virtualbox-set-start.png?resize=800%2C548&ssl=1
[19]: https://news.itsfoss.com/arch-linux-easy-install/
[20]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/virtualbox-archlinux-boot.png?resize=800%2C593&ssl=1
[21]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/vb-archinstall-guided.png?resize=800%2C400&ssl=1
[22]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/10/vb-archinstall-kb-layout.png?resize=800%2C694&ssl=1
[23]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/archinstall-region.png?resize=800%2C664&ssl=1
[24]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/archinstall-selectdisk.png?resize=800%2C199&ssl=1
[25]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/10/archinstall-desktop-configure.png?resize=800%2C497&ssl=1
[26]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/archinstall-virtualbox-desktop-environment.png?resize=800%2C415&ssl=1
[27]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/10/virtualbox-environment.png?resize=419%2C173&ssl=1
[28]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/archinstall-linux-kernel.png?resize=800%2C692&ssl=1
[29]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/virtualbox-arch-network-manager.png?resize=800%2C151&ssl=1
[30]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/archinstall-confirmation.png?resize=800%2C697&ssl=1
[31]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/iso-remove-archinstall.png?resize=800%2C286&ssl=1
[32]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/virtualbox-arch.png?resize=800%2C635&ssl=1
[33]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/10/kde-arch-virtualbox.png?resize=800%2C453&ssl=1
[34]: https://itsfoss.com/install-etcher-linux/

View File

@ -0,0 +1,324 @@
[#]: subject: "Plotting Data in R: Graphs"
[#]: via: "https://www.opensourceforu.com/2022/05/plotting-data-in-r-graphs/"
[#]: author: "Shakthi Kannan https://www.opensourceforu.com/author/shakthi-kannan/"
[#]: collector: "lkxed"
[#]: translator: "tanloong"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
R 语言绘制数据:图表篇
======
R 语言有非常多的绘图和数据可视化的包,比如 graphics、lattice、ggplot2 等。这是 R 语言系列的第 9 篇文章,我们会介绍 R 中用来绘图的各种函数。
![business-man-visulising-graphs][1]
本文使用的 R 是 4.1.2 版本,
运行环境为 Parabola GNU/Linux-libre (x86-64)。
```R
$ R --version
R version 4.1.2 (2021-11-01) -- "Bird Hippie"
Copyright (C) 2021 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
```
R 是开源软件,没有任何担保责任。
只要遵守 GNU 通用公共许可证的版本 2 或者版本 3你就可以对它进行 (修改和) 再分发。
详情见 [*https://www.gnu.org/licenses/.*](https://www.gnu.org/licenses/.)
### 折线图
我们以印度全境消费者物价指数 (CPI -- 乡村/城市) 数据集为研究对象,它可以从 [*https://data.gov.in/catalog/all-india-consumer-price-index-ruralurban-0*](https://data.gov.in/catalog/all-india-consumer-price-index-ruralurban-0) 下载。选择 "截止到 2021 年 11 月" 的版本,用 read.csv 函数读取下载好的文件,如下所示:
```R
> cpi <- read.csv(file="CPI.csv", sep=",")
> head(cpi)
Sector Year Name Andhra.Pradesh Arunachal.Pradesh Assam Bihar
1 Rural 2011 January 104 NA 104 NA
2 Urban 2011 January 103 NA 103 NA
3 Rural+Urban 2011 January 103 NA 104 NA
4 Rural 2011 February 107 NA 105 NA
5 Urban 2011 February 106 NA 106 NA
6 Rural+Urban 2011 February 105 NA 105 NA
Chattisgarh Delhi Goa Gujarat Haryana Himachal.Pradesh Jharkhand Karnataka
1 105 NA 103 104 104 104 105 104
2 104 NA 103 104 104 103 104 104
3 104 NA 103 104 104 103 105 104
4 107 NA 105 106 106 105 107 106
5 106 NA 105 107 107 105 107 108
6 105 NA 104 105 106 104 106 106
...
```
以 Punjab 州为例,对每年各月份的 CPI 值求和,然后用 plot 函数画一张折线图:
```R
> punjab <- aggregate(x=cpi$Punjab, by=list(cpi$Year), FUN=sum)
> head(punjab)
Group.1 x
1 2011 3881.76
2 2012 4183.30
3 2013 4368.40
4 2014 4455.50
5 2015 4584.30
6 2016 4715.80
> plot(punjab$Group.1, punjab$x, type="l", main="Punjab Consumer Price Index upto November 2021", xlab="Year", ylab="Consumer Price Index")
```
plot 函数可以传入如下参数:
| 参数 | 描述 |
| :- | :- |
| x | 向量类型,用于绘制 x 轴的数据 |
| y | 向量或列表类型,用于绘制 y 轴的数据 |
| type | 设置绘图类型:"p" 画点;"l" 画线;"o" 同时画点和线,且相互重叠;"s" 画阶梯线;"h" 画铅垂线 |
| xlim | x 轴范围 |
| ylim | y 轴范围 |
| main | 标题 |
| sub | 副标题 |
| xlab | x 轴标题 |
| ylab | y 轴标题 |
| axes | 逻辑型,是否绘制坐标轴 |
结果如图 1。
![Figure 1: Line chart][2]
### 自相关图
自相关图能在时序分析中展示一个变量是否具有自相关性,可以用 R 中的 acf 函数绘制。acf 函数可以设置三种自相关类型:*correlation*、*covariance* 或 *partial*。图 2 是 Punjab 州 CPI 值的自相关图x 表示 CPI。
```R
acf(punjab$x,main='x')
```
![Figure 2: ACF chart][3]
acf 函数可以传入以下参数:
| 参数 | 描述 |
| :- | :- |
| x | 一个单变量或多变量的 time series 对象,或者一个数值向量或数值矩阵 |
| lag.max | 最大滞后阶数 |
| type | 字符型,设置所计算的自相关类型:"correlation"、"covariance" 或 "partial" |
| plot | 逻辑性,若 TRUE 则绘制图像,若 FALSE 则打印传入数据的描述信息 |
| i | 一组要保留的时差滞后 |
| j | 一组要保留的名称或数字 |
### 柱状图
R 中画柱状图的函数是 barplot。下面的代码用来画 Punjab 州 CPI 的柱状图如图3
```R
> barplot(punjab$x, main="Punjab Consumer Price Index", sub="Upto November 2021", xlab="Year", ylab="Consumer Price Index", col="navy")
```
![Figure 3: Line chart of Punjab's CPI][4]
barplot 函数的使用方法非常灵活,可以传入以下参数:
| 参数 | 描述 |
| :- | :- |
| height | 数值向量或数值矩阵,包含用于绘图的数据 |
| width | 数值向量,用于设置柱宽 |
| space | 柱间距 |
| beside | 逻辑型,若 FALSE 则绘制堆积柱状图,若 TRUE 则绘制并列柱状图 |
| density | 数值型,设置阴影线的填充密度 (条数/英寸),默认为 NULL即不填充阴影线|
| angle | 数值型,填充线条的角度,默认为 45 |
| border | 柱子边缘的颜色 |
| main | 标题 |
| sub | 副标题 |
| xlab | x 轴标题 |
| ylab | y 轴标题 |
| xlim | x 轴范围 |
| ylim | y 轴范围 |
| axes | 逻辑型,是否绘制坐标轴 |
用 help 命令可以查看 barplot 函数的详细信息:
```R
> help(barplot)
barplot package:graphics R Documentation
Bar Plots
Description:
Creates a bar plot with vertical or horizontal bars.
Usage:
barplot(height, ...)
## Default S3 method:
barplot(height, width = 1, space = NULL,
names.arg = NULL, legend.text = NULL, beside = FALSE,
horiz = FALSE, density = NULL, angle = 45,
col = NULL, border = par("fg"),
main = NULL, sub = NULL, xlab = NULL, ylab = NULL,
xlim = NULL, ylim = NULL, xpd = TRUE, log = "",
axes = TRUE, axisnames = TRUE,
cex.axis = par("cex.axis"), cex.names = par("cex.axis"),
inside = TRUE, plot = TRUE, axis.lty = 0, offset = 0,
add = FALSE, ann = !add && par("ann"), args.legend = NULL, ...)
## S3 method for class 'formula'
barplot(formula, data, subset, na.action,
horiz = FALSE, xlab = NULL, ylab = NULL, ...)
```
### 饼图
绘制饼图时要多加注意,因为饼图不一定能展示出各扇形间的区别。(LCTT 译注:"根据统计学家和一些心理学家的调查结果,这种以比例展示数据的统计图形 [实际上是很糟糕的可视化方式][10]因此R 关于饼图的帮助文件中清楚地说明了并不推荐使用饼图,而是使用条形图或点图作为替代。") 用 subset 函数获得 Gujarat 州在 2021 年 1 月 Rural、Urban、Rurual+Urban 的 CPI 值:
```R
> jan2021 <- subset(cpi, Name=="January" & Year=="2021")
> jan2021$Gujarat
[1] 153.9 151.2 149.1
> names <- c('Rural', 'Urban', 'Rural+Urban')
```
使用 pie 函数为 Gujarat 州的 CPI 值生成饼图,如下所示:
```R
> pie(jan2021$Gujarat, names, main="Gujarat CPI Rural and Urban Pie Chart")
```
![Figure 4: Pie chart][5]
pie 函数可以传入以下参数:
| 参数 | 描述 |
| :- | :- |
| x | 元素大于 0 的数值向量 |
| label | 字符向量,用于设置每个扇形的标签 |
| radius | 饼图的半径 |
| clockwise | 逻辑型,若 TRUE 则顺时针绘图,若 FALSE 则逆时针绘图 |
| density | 数值型,设置阴影线的填充密度 (条数/英寸),默认为 NULL即不填充阴影线|
| angle | 数值型,填充线条的角度,默认为 45 |
| col | 数值向量,用于设置颜色 |
| lty | 每个扇形的线条类型 |
| main | 标题 |
### 箱线图
(LCTT 译注:"箱线图主要是 [从四分位数的角度出发][11] 描述数据的分布,它通过最大值 (Q4)、上四分位数 (Q3)、中位数(Q2)、下四分位数 (Q1) 和最小值 (Q0) 五处位置来获取一维数据的分布概况。我们知道,这五处位置之间依次包含了四段数据,每段中数据量均为总数据量的 1/4。通过每一段数据占据的长度我们可以大致推断出数据的集中或离散趋势 (长度越短,说明数据在该区间上越密集,反之则稀疏。)")
箱线图能够用“须线” (whiskers) 展示一个变量的四分位距 (Interquartile Range简称 IQR=Q3-Q1)。用上下四分位数分别加/减内四分位距,再乘以一个人为设定的倍数 range (见下面的参数列表),得到 `range * c(Q1-IQR, Q3+IQR)`,超过这个范围的数据点就被视作离群点,在图中直接以点的形式表示出来。
boxplot 函数可以传入以下参数:
| 参数 | 描述 |
| :- | :- |
| data | 数据框或列表,用于参数类型为公式 (formula) 的情况 |
| x | 数值向量或者列表,若为列表则对列表中每一个子对象依次作出箱线图 |
| width | 设置箱子的宽度 |
| outline | 逻辑型,设置是否绘制离群点 |
| names | 设置每个箱子的标签 |
| border | 设置每个箱子的边缘的颜色 |
| range | 延伸倍数,设置箱线图末端 (须) 延伸到什么位置 |
| plot | 逻辑型,设置是否生成图像,若 TRUE 则生成图像,若 FALSE 则打印传入数据的描述信息 |
| horizontal | 逻辑型,设置箱线图是否水平放置 |
用 boxplot 函数绘制部分州的箱线图:
```R
> names <- c ('Andaman and Nicobar', 'Lakshadweep', 'Delhi', 'Goa', 'Gujarat', 'Bihar')
> boxplot(cpi$Andaman.and.Nicobar, cpi$Lakshadweep, cpi$Delhi, cpi$Goa, cpi$Gujarat, cpi$Bihar, names=names)
```
![Figure 5: Box plot][6]
### QQ 图
QQ 图 (Quantile-Quantile plot) 可以用来对比两个数据集也可以用来检查数据是否服从某种理论分布。qqnorm 函数能绘制正态分布 QQ 图,可以检验数据是否服从正态分布,用下面的代码绘制 Punjab 州 CPI 数据的 QQ 图:
```R
> qqnorm(punjab$x)
```
![Figure 6: Q-Q plot][7]
qqline 函数可以向正态分布 QQ 图上添加理论分布曲线,它可以传入以下参数:
| 参数 | 描述 |
| :- | :- |
| x | 第一个数据样本 |
| y | 第二个数据样本 |
| datax | 逻辑型,设置是否以 x 轴表示理论曲线的值,默认为 FALSE |
| probs | 长度为 2 的数值向量,代表概率 |
| xlab | x 轴标题 |
| ylab | y 轴标题 |
| qtype | [1,9] 内的整数,设置分位计算类型,详情见 help(quantile) 的 "Type" 小节 |
### 等高图
等高图可以描述三维数据,在 R 中对应的函数是 contour这个函数也可以用来向已有的图表添加等高线。等高图常与其他图表一起使用。我们用 contour 对 R 中的 volcano 数据集 (奥克兰的火山地形信息) 绘制等高图,代码如下:
```R
> contour(volcano)
```
![Figure 7: Volcano][8]
contour 函数的常用参数如下:
| 参数 | 描述 |
| :- | :- |
| x,y | z 中数值对应的点在平面上的位置 |
| z | 数值向量 |
| nlevels | 设置等高线的条数,调整等高线的疏密 |
| labels | 等高线上的标记字符串,默认是高度的数值 |
| xlim | 设置 x 轴的范围 |
| ylim | 设置 y 轴的范围 |
| zlim | 设置 z 轴的范围 |
| axes | 设置是否绘制坐标轴 |
| col | 设置等高线的颜色 |
| lty | 设置线条的类型 |
| lwd | 设置线条的粗细 |
| vfont | 设置标签字体 |
等高线之间的区域可以用颜色填充,每种颜色表示一个高度范围,如下所示:
```R
> filled.contour(volcano, asp = 1)
# asp 为图形纵横比,即 y 轴上的 1 单位长度和 x 轴上 1 单位长度的比率
```
填充结果见图 8。
![Figure 8: Filled volcano][9]
掌握上述内容后,你可以尝试 R 语言 graphics 包中的其他函数和图表 (LCTT 译注:用 help(package=graphics) 可以查看 graphics 包提供的函数列表)。
--------------------------------------------------------------------------------
via: https://www.opensourceforu.com/2022/05/plotting-data-in-r-graphs/
作者:[Shakthi Kannan][a]
选题:[lkxed][b]
译者:[tanloong](https://github.com/tanloong)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.opensourceforu.com/author/shakthi-kannan/
[b]: https://github.com/lkxed
[1]: https://www.opensourceforu.com/wp-content/uploads/2022/04/business-man-visulising-graphs.jpg
[2]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-1-Line-chart.jpg
[3]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-2-ACF-chart.jpg
[4]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-3-Line-chart-of-Punjabs-CPI.jpg
[5]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-4-Pie-chart.jpg
[6]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-5-ox-plot.jpg
[7]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-6-Q-Q-plot.jpg
[8]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-7-Volcano.jpg
[9]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-8-Filled-volcano.jpg
[10]: https://bookdown.org/xiangyun/msg/gallery.html#sec:pie
[11]: https://bookdown.org/xiangyun/msg/gallery.html#sec:boxplot