From 40f7272b0dc02b3de2645e57bffb4ea9e19905b8 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 26 May 2022 09:50:03 +0800 Subject: [PATCH 001/104] P @geekpi @turbokernel https://linux.cn/article-14638-1.html --- ...How To Reset Root Password In Fedora 36.md | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) rename {translated/tech => published}/20220516 How To Reset Root Password In Fedora 36.md (75%) diff --git a/translated/tech/20220516 How To Reset Root Password In Fedora 36.md b/published/20220516 How To Reset Root Password In Fedora 36.md similarity index 75% rename from translated/tech/20220516 How To Reset Root Password In Fedora 36.md rename to published/20220516 How To Reset Root Password In Fedora 36.md index 5857bd4d9e..ef311d9227 100644 --- a/translated/tech/20220516 How To Reset Root Password In Fedora 36.md +++ b/published/20220516 How To Reset Root Password In Fedora 36.md @@ -4,30 +4,33 @@ [#]: collector: "lkxed" [#]: translator: "geekpi" [#]: reviewer: "turbokernel" -[#]: publisher: " " -[#]: url: " " +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14638-1.html" -在 Fedora 36 中如何重置 Root 密码 +在 Fedora 36 中如何重置 root 密码 ====== -在 Fedora 中重置忘记的 root 密码。 -您是否忘记了 Fedora 中的 root 密码?或者您想更改 Fedora 系统中的 root 用户密码?没问题!本手册将指导您在 Fedora 操作系统中完成更改或重置 root 密码的步骤。 +![](https://img.linux.net.cn/data/attachment/album/202205/26/094836cgtywrtwkywg2nem.jpg) + +> 在 Fedora 中重置忘记的 root 密码。 + +你是否忘记了 Fedora 中的 root 密码?或者你想更改 Fedora 系统中的 root 用户密码?没问题!本手册将指导你在 Fedora 操作系统中完成更改或重置 root 密码的步骤。 **注意:** 本手册已在 Fedora 36 和 35 版本上进行了正式测试。下面提供的步骤与在 Fedora Silverblue 和旧 Fedora 版本中重置 root 密码的步骤相同。 -**步骤 1** - 打开 Fedora 系统并按下 **ESC** 键,直到看到 GRUB 启动菜单。出现 GRUB 菜单后,选择要引导的内核并按下 **e** 编辑选定的引导条目。 +**步骤 1** - 打开 Fedora 系统并按下 `ESC` 键,直到看到 GRUB 启动菜单。出现 GRUB 菜单后,选择要引导的内核并按下 `e` 编辑选定的引导条目。 ![Grub Menu In Fedora 36][1] -**步骤 2** - 在下一个页面中,你将看到所有启动参数。找到名为 **ro** 的参数。 +**步骤 2** - 在下一个页面中,你将看到所有启动参数。找到名为 `ro` 的参数。 ![Find ro Kernel Parameter In Grub Entry][2] -**步骤 3** - 将 **“ro”** 参数替换为 **“rw init=/sysroot/bin/sh”**(不带引号)。请注意 “`rw`” 和 “`init=/sysroot`...” 之间的空格。修改后的内核参数行应如下所示。 +**步骤 3** - 将 `ro` 参数替换为 `rw init=/sysroot/bin/sh`。请注意 `rw` 和 `init=/sysroot`...之间的空格。修改后的内核参数行应如下所示。 ![Modify Kernel Parameters][3] -**步骤 4** - 上述步骤更改参数后,按 **Ctrl+x** 进入紧急模式,即单用户模式。 +**步骤 4** - 上述步骤更改参数后,按 `Ctrl+x` 进入紧急模式,即单用户模式。 在紧急模式下,输入以下命令以 **读/写** 模式挂载根文件系统(`/`)。 @@ -73,7 +76,7 @@ reboot ![Login To Fedora As Root User][8] -如你所见,在 Fedora 36 中重置 root 密码的步骤非常简单,并且与**[在 RHEL 中重置 root 密码][9]**及其衍生版本(如 CentOS、AlmaLinux 和 Rocky Linux)完全相同。 +如你所见,在 Fedora 36 中重置 root 密码的步骤非常简单,并且与 [在 RHEL 中重置 root 密码][9] 及其衍生版本(如 CentOS、AlmaLinux 和 Rocky Linux)完全相同。 -------------------------------------------------------------------------------- From 9a719dc9b879578ba6856a432e81ee0ccc0c3490 Mon Sep 17 00:00:00 2001 From: SamMa Date: Thu, 26 May 2022 10:49:24 +0800 Subject: [PATCH 002/104] Update 20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md --- ...24 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/tech/20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md b/sources/tech/20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md index 9fda760338..16ec7ebb1d 100644 --- a/sources/tech/20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md +++ b/sources/tech/20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md @@ -2,7 +2,7 @@ [#]: via: "https://www.linuxtechi.com/how-to-install-kvm-on-ubuntu-22-04/" [#]: author: "James Kiarie https://www.linuxtechi.com/author/james/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "turbokernel" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " @@ -233,7 +233,7 @@ via: https://www.linuxtechi.com/how-to-install-kvm-on-ubuntu-22-04/ 作者:[James Kiarie][a] 选题:[lkxed][b] -译者:[译者ID](https://github.com/译者ID) +译者:[turbokernel](https://github.com/turbokernel) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 3b2404b241a7c9c58d769ef93bf2a2fd1e4f9789 Mon Sep 17 00:00:00 2001 From: lkxed Date: Thu, 26 May 2022 12:44:08 +0800 Subject: [PATCH 003/104] =?UTF-8?q?[=E6=8F=90=E4=BA=A4=E8=AF=91=E6=96=87][?= =?UTF-8?q?tech]:=2020180625=203=20ways=20to=20copy=20files=20in=20Go.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20180625 3 ways to copy files in Go.md | 217 ------------------ .../20180625 3 ways to copy files in Go.md | 217 ++++++++++++++++++ 2 files changed, 217 insertions(+), 217 deletions(-) delete mode 100644 sources/tech/20180625 3 ways to copy files in Go.md create mode 100644 translated/tech/20180625 3 ways to copy files in Go.md diff --git a/sources/tech/20180625 3 ways to copy files in Go.md b/sources/tech/20180625 3 ways to copy files in Go.md deleted file mode 100644 index dd662a120b..0000000000 --- a/sources/tech/20180625 3 ways to copy files in Go.md +++ /dev/null @@ -1,217 +0,0 @@ -[#]: subject: "3 ways to copy files in Go" -[#]: via: "https://opensource.com/article/18/6/copying-files-go" -[#]: author: "Mihalis Tsoukalos https://opensource.com/users/mtsouk" -[#]: collector: "lkxed" -[#]: translator: "lkxed" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -3 ways to copy files in Go -====== -In the third article in this series about the Go programming language, learn the three most popular ways to copy a file. - -![Periwinkle the Cat: A crowdsourced name][1] - -Image by: Opensource.com - -This article will show you how to copy a file in the [Go programming language][3]. Although there are more than three ways to copy a file in Go, this article will present the three most common ways: using the `io.Copy()` function call from the Go library; reading the input file all at once and writing it to another file; and copying the file in small chunks using a buffer. - -### Method 1: Using io.Copy() - -The first version of the utility will use the `io.Copy()` function of the standard Go library. The logic of the utility can be found in the implementation of the `copy()` function, which is as follows: - -``` -func copy(src, dst string) (int64, error) { -        sourceFileStat, err := os.Stat(src) -        if err != nil { -                return 0, err -        } - -        if !sourceFileStat.Mode().IsRegular() { -                return 0, fmt.Errorf("%s is not a regular file", src) -        } - -        source, err := os.Open(src) -        if err != nil { -                return 0, err -        } -        defer source.Close() - -        destination, err := os.Create(dst) -        if err != nil { -                return 0, err -        } -        defer destination.Close() -        nBytes, err := io.Copy(destination, source) -        return nBytes, err -} -``` - -Apart from testing whether the file that will be copied exists (`os.Stat(src)` ) and is a regular file (`sourceFileStat.Mode().IsRegular()` ) so you can open it for reading, all the work is done by the `io.Copy(destination, source)` statement. The `io.Copy()` function returns the number of bytes copied and the first error message that happened during the copying process. In Go, if there is no error message, the value of the error variable will be `nil`. - -You can learn more about the `io.Copy()` function at the [io package][4] documentation page. - -Executing `cp1.go` will generate the next kind of output: - -``` -$ go run cp1.go -Please provide two command line arguments! -$ go run cp1.go fileCP.txt /tmp/fileCPCOPY -Copied 3826 bytes! -$ diff fileCP.txt /tmp/fileCPCOPY -``` - -This technique is as simple as possible but gives no flexibility to the developer, which is not always a bad thing. However, there are times that the developer needs or wants to decide how they want to read the file. - -### Method 2: Using ioutil.WriteFile() and ioutil.ReadFile() - -A second way to copy a file uses the `ioutil.ReadFile()` and `ioutil.WriteFile()` functions. The first function reads the contents of an entire file into a byte slice, and the second function writes the contents of a byte slice into a file. - -The logic of the utility can be found in the following Go code: - -``` -input, err := ioutil.ReadFile(sourceFile) -        if err != nil { -                fmt.Println(err) -                return -        } - -        err = ioutil.WriteFile(destinationFile, input, 0644) -        if err != nil { -                fmt.Println("Error creating", destinationFile) -                fmt.Println(err) -                return -        } -``` - -Apart from the two `if` blocks, which are part of the Go way of working, you can see that the functionality of the program is found in the `ioutil.ReadFile()` and `ioutil.WriteFile()` statements. - -Executing `cp2.go` will generate the next kind of output: - -``` -$ go run cp2.go -Please provide two command line arguments! -$ go run cp2.go fileCP.txt /tmp/copyFileCP -$ diff fileCP.txt /tmp/copyFileCP -``` - -Please note that, although this technique will copy a file, it might not be efficient when you want to copy huge files because the byte slice returned by `ioutil.ReadFile()` will also be huge. - -### Method 3: Using os.Read() and os.Write() - -A third method of copying files in Go uses a `cp3.go`  utility that will be developed in this section. It accepts three parameters: the filename of the input file, the filename of the output file, and the size of the buffer. - -The most important part of `cp3.go` resides in the following `for` loop, which can be found in the `copy() function:` - -``` -buf := make([]byte, BUFFERSIZE) -        for { -                n, err := source.Read(buf) -                if err != nil && err != io.EOF { -                        return err -                } -                if n == 0 { -                        break -                } - -                if _, err := destination.Write(buf[:n]); err != nil { -                        return err -                } -        } -``` - -This technique uses `os.Read()` for reading small portions of the input file into a buffer named `buf` and `os.Write()` for writing the contents of that buffer to a file. The copying process stops when there is an error in reading or when you reach the end of the file (`io.EOF` ). - -Executing `cp3.go` will generate the next kind of output: - -``` -$ go run cp3.go -usage: cp3 source destination BUFFERSIZE -$ go run cp3.go fileCP.txt /tmp/buf10 10 -Copying fileCP.txt to /tmp/buf10 -$ go run cp3.go fileCP.txt /tmp/buf20 20 -Copying fileCP.txt to /tmp/buf20 -``` - -As you will see, the size of the buffer greatly affects the performance of `cp3.go`. - -### Doing some benchmarking - -The last part of this article will try to compare the three programs as well as the performance of `cp3.go`  for various buffer sizes using the `time(1)` command line utility. - -The following output shows the performance of `cp1.go`, `cp2.go`, and `cp3.go` when copying a 500MB file: - -``` -$ ls -l INPUT --rw-r--r--  1 mtsouk  staff  512000000 Jun  5 09:39 INPUT -$ time go run cp1.go INPUT /tmp/cp1 -Copied 512000000 bytes! - -real    0m0.980s -user    0m0.219s -sys     0m0.719s -$ time go run cp2.go INPUT /tmp/cp2 - -real    0m1.139s -user    0m0.196s -sys     0m0.654s -$ time go run cp3.go INPUT /tmp/cp3 1000000 -Copying INPUT to /tmp/cp3 - -real    0m1.025s -user    0m0.195s -sys     0m0.486s -``` - -The output shows that the performance of all three utilities is pretty similar, which means that the functions of the standard Go library are quite clever and optimized. - -Now, let's test how the buffer size affects the performance of `cp3.go`. Executing `cp3.go` with a buffer size of 10, 20, and 1,000 bytes to copy a 500MB file on a pretty fast machine will generate the following results: - -``` -$ ls -l INPUT --rw-r--r--  1 mtsouk  staff  512000000 Jun  5 09:39 INPUT -$ time go run cp3.go INPUT /tmp/buf10 10 -Copying INPUT to /tmp/buf10 - -real    6m39.721s -user    1m18.457s -sys         5m19.186s -$ time go run cp3.go INPUT /tmp/buf20 20 -Copying INPUT to /tmp/buf20 - -real    3m20.819s -user    0m39.444s -sys         2m40.380s -$ time go run cp3.go INPUT /tmp/buf1000 1000 -Copying INPUT to /tmp/buf1000 - -real    0m4.916s -user    0m1.001s -sys     0m3.986s -``` - -The generated output shows that the bigger the buffer, the faster the performance of the `cp3.go` utility, which is more or less expected. Moreover, using buffer sizes smaller than 20 bytes for copying big files is a very slow process and should be avoided. - -You can find the Go code of `cp1.go`, `cp2.go`, and `cp3.go` at [GitHub][5]. - -If you have any questions or feedback, please leave a comment below or reach out to me on [Twitter][6]. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/18/6/copying-files-go - -作者:[Mihalis Tsoukalos][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/mtsouk -[b]: https://github.com/lkxed -[1]: https://opensource.com/sites/default/files/lead-images/LIFE_cat.png -[3]: https://golang.org/ -[4]: https://golang.org/pkg/io/ -[5]: https://github.com/mactsouk/opensource.com -[6]: https://twitter.com/mactsouk diff --git a/translated/tech/20180625 3 ways to copy files in Go.md b/translated/tech/20180625 3 ways to copy files in Go.md new file mode 100644 index 0000000000..b362d05e2f --- /dev/null +++ b/translated/tech/20180625 3 ways to copy files in Go.md @@ -0,0 +1,217 @@ +[#]: subject: "3 ways to copy files in Go" +[#]: via: "https://opensource.com/article/18/6/copying-files-go" +[#]: author: "Mihalis Tsoukalos https://opensource.com/users/mtsouk" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +在 Go 中复制文件的三种方法 +====== +本文是 Go 系列的第三篇文章,我将介绍三种最流行的复制文件的方法。 + +![][1] + +图源:Opensource.com + +本文将介绍展示如何使用 [Go 编程语言][3] 来复制文件。在 Go 中复制文件的方法有很多,我只介绍三种最常见的:使用 Go 库中的 `io.Copy()` 函数调用、一次读取输入文件并将其写入另一个文件,以及使用缓冲区一块块地复制文件。 + +### 方法一:使用 io.Copy() + +第一种方法就是使用 Go 标准库的 `io.Copy()` 函数。你可以在 `copy()` 函数的代码中找到它的实现逻辑,如下所示: + +``` +func copy(src, dst string) (int64, error) { + sourceFileStat, err := os.Stat(src) + if err != nil { + return 0, err + } + + if !sourceFileStat.Mode().IsRegular() { + return 0, fmt.Errorf("%s is not a regular file", src) + } + + source, err := os.Open(src) + if err != nil { + return 0, err + } + defer source.Close() + + destination, err := os.Create(dst) + if err != nil { + return 0, err + } + defer destination.Close() + nBytes, err := io.Copy(destination, source) + return nBytes, err + } +``` + +首先,上述代码做了两个判断,以便确定它可以被打开读取:一是判断将要复制的文件是否存在(`os.Stat(src)`),二是判断它是否为常规文件(`sourceFileStat.Mode().IsRegular()`)。剩下的所有工作都由 `io.Copy(destination, source)` 这行代码来完成。`io.Copy()` 函数执行结束后,会返回复制的字节数和复制过程中发生的第一条错误消息。在 Go 中,如果没有错误消息,错误变量的值就为 `nil`。 + +你可以在 [io 包][4] 的文档页面了解有关 `io.Copy()` 函数的更多信息。 + +运行 `cp1.go` 将产生以下输出: + +``` +$ go run cp1.go +Please provide two command line arguments! +$ go run cp1.go fileCP.txt /tmp/fileCPCOPY +Copied 3826 bytes! +$ diff fileCP.txt /tmp/fileCPCOPY +``` + +这个方法已经非常简单了,不过它没有为开发者提供灵活性。这并不总是一件坏事,但是,有些时候,开发者可能会需要/想要告诉程序该如何读取文件。 + +### 方法二:使用 ioutil.WriteFile() 和 ioutil.ReadFile() + +复制文件的第二种方法是使用 `ioutil.ReadFile()` 和 `ioutil.WriteFile()` 函数。第一个函数用于将整个文件的内容,一次性地读入到某个内存中的字节切片里;第二个函数则用于将字节切片的内容写入到一个磁盘文件中。 + +实现代码如下: + +``` +input, err := ioutil.ReadFile(sourceFile) +if err != nil { + fmt.Println(err) + return +} + +err = ioutil.WriteFile(destinationFile, input, 0644) +if err != nil { + fmt.Println("Error creating", destinationFile) + fmt.Println(err) + return +} +``` + +上述代码包括了两个 if 代码块(嗯,用 Go 写程序就是这样的),程序的实际功能其实体现在 `ioutil.ReadFile()` 和 `ioutil.WriteFile()` 这两行代码中。 + +运行 `cp2.go`,你会得到下面的输出: + +``` +$ go run cp2.go +Please provide two command line arguments! +$ go run cp2.go fileCP.txt /tmp/copyFileCP +$ diff fileCP.txt /tmp/copyFileCP +``` + +请注意,虽然这种方法能够实现文件复制,但它在复制大文件时的效率可能不高。这是因为当文件很大时,`ioutil.ReadFile()` 返回的字节切片会很大。 + +### 方法三:使用 os.Read() 和 os.Write() + +在 Go 中复制文件的第三种方法就是下面要介绍的 `cp3.go`。它接受三个参数:输入文件名、输出文件名和缓冲区大小。 + +`cp3.go` 最重要的部分位于以下 `for` 循环中,你可以在 `copy()` 函数中找到它,如下所示: + +``` +buf := make([]byte, BUFFERSIZE) +for { + n, err := source.Read(buf) + if err != nil && err != io.EOF { + return err + } + if n == 0 { + break + } + + if _, err := destination.Write(buf[:n]); err != nil { + return err + } +} +``` + +该方法使用 `os.Read()` 将输入文件的一小部分读入名为 `buf` 的缓冲区,然后使用 `os.Write()` 将该缓冲区的内容写入文件。当读取出错或到达文件末尾(`io.EOF`)时,复制过程将停止。 + +运行 `cp3.go`,你会得到下面的输出: + +``` +$ go run cp3.go +usage: cp3 source destination BUFFERSIZE +$ go run cp3.go fileCP.txt /tmp/buf10 10 +Copying fileCP.txt to /tmp/buf10 +$ go run cp3.go fileCP.txt /tmp/buf20 20 +Copying fileCP.txt to /tmp/buf20 +``` + +在接下来的基准测试中,你会发现,缓冲区的大小极大地影响了 `cp3.go` 的性能。 + +### 运行基准测试 + +在本文的最后一部分,我将尝试比较这三个程序以及 `cp3.go` 在不同缓冲区大小下的性能(使用 `time(1)` 命令行工具)。 + +以下输出显示了复制 500MB 大小的文件时,`cp1.go`、`cp2.go` 和 `cp3.go` 的性能对比: + +``` +$ ls -l INPUT +-rw-r--r--  1 mtsouk  staff  512000000 Jun  5 09:39 INPUT +$ time go run cp1.go INPUT /tmp/cp1 +Copied 512000000 bytes! + +real    0m0.980s +user    0m0.219s +sys     0m0.719s +$ time go run cp2.go INPUT /tmp/cp2 + +real    0m1.139s +user    0m0.196s +sys     0m0.654s +$ time go run cp3.go INPUT /tmp/cp3 1000000 +Copying INPUT to /tmp/cp3 + +real    0m1.025s +user    0m0.195s +sys     0m0.486s +``` + +我们可以看出,这三个程序的性能非常接近,这意味着 Go 标准库函数的实现非常聪明、经过了充分优化。 + +现在,让我们测试一下缓冲区大小对 `cp3.go` 的性能有什么影响吧!执行 `cp3.go`,并分别指定缓冲区大小为 10、20 和 1000 字节,在一台运行很快的机器上复制 500MB 文件,得到的结果如下: + +``` +$ ls -l INPUT +-rw-r--r--  1 mtsouk  staff  512000000 Jun  5 09:39 INPUT +$ time go run cp3.go INPUT /tmp/buf10 10 +Copying INPUT to /tmp/buf10 + +real    6m39.721s +user    1m18.457s +sys 5m19.186s +$ time go run cp3.go INPUT /tmp/buf20 20 +Copying INPUT to /tmp/buf20 + +real    3m20.819s +user    0m39.444s +sys 2m40.380s +$ time go run cp3.go INPUT /tmp/buf1000 1000 +Copying INPUT to /tmp/buf1000 + +real    0m4.916s +user    0m1.001s +sys     0m3.986s +``` + +我们可以发现,缓冲区越大,`cp3.go` 运行得就越快,这或多或少是符合预期的。此外,使用小于 20 字节的缓冲区来复制大文件会非常缓慢,应该避免。 + +你可以在 [GitHub][5] 找到 `cp1.go`、`cp2.go` 和 `cp3.go` 的 Go 代码。 + +如果你有任何问题或反馈,请在(原文)下方发表评论或在 [Twitter][6] 上与我(原作者)联系。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/18/6/copying-files-go + +作者:[Mihalis Tsoukalos][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/mtsouk +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/LIFE_cat.png +[3]: https://golang.org/ +[4]: https://golang.org/pkg/io/ +[5]: https://github.com/mactsouk/opensource.com +[6]: https://twitter.com/mactsouk From 3e2b2722be640245c3037fcef27a176ec7395b58 Mon Sep 17 00:00:00 2001 From: SamMa Date: Thu, 26 May 2022 13:16:41 +0800 Subject: [PATCH 004/104] Update 20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md --- ...4 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sources/tech/20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md b/sources/tech/20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md index 16ec7ebb1d..ba43974dae 100644 --- a/sources/tech/20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md +++ b/sources/tech/20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md @@ -7,9 +7,10 @@ [#]: publisher: " " [#]: url: " " -How to Install KVM on Ubuntu 22.04 (Jammy Jellyfish) +Ubuntu 22.04 (Jammy Jellyfish) 之 KVM 安装手札 ====== -KVM, an acronym for Kernel-based Virtual Machine is an opensource virtualization technology integrated into the Linux kernel. It’s a type 1 (bare metal ) hypervisor that enables the kernel to act as a bare-metal hypervisor. +**KVM** 是 **Kernel-based Virtual Machine** 首字母缩写,一项嵌入内核的开源虚拟化技术。其基于内核的裸设备虚拟化引擎。 +It’s a type 1 (bare metal ) hypervisor that enables the kernel to act as a bare-metal hypervisor. KVM allows users to create and run multiple guest machines which can be either Windows or Linux. Each guest machine runs independently of other virtual machines and the underlying OS ( host system ) and has its own computing resources such as CPU, RAM, network interfaces, and storage to mention a few. From 807487fb7436f7e5275f53955b1a61655917a81b Mon Sep 17 00:00:00 2001 From: beamrolling <33046439+beamrolling@users.noreply.github.com> Date: Thu, 26 May 2022 13:42:15 +0800 Subject: [PATCH 005/104] translated by beamrolling --- ...ction Of Open Source Software libraries.md | 23 ++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) rename {sources => translated}/news/20220518 Google To Start Distributing A Collection Of Open Source Software libraries.md (61%) diff --git a/sources/news/20220518 Google To Start Distributing A Collection Of Open Source Software libraries.md b/translated/news/20220518 Google To Start Distributing A Collection Of Open Source Software libraries.md similarity index 61% rename from sources/news/20220518 Google To Start Distributing A Collection Of Open Source Software libraries.md rename to translated/news/20220518 Google To Start Distributing A Collection Of Open Source Software libraries.md index 3fa05b7613..d26b7ba945 100644 --- a/sources/news/20220518 Google To Start Distributing A Collection Of Open Source Software libraries.md +++ b/translated/news/20220518 Google To Start Distributing A Collection Of Open Source Software libraries.md @@ -7,21 +7,28 @@ [#]: publisher: " " [#]: url: " " -Google To Start Distributing A Collection Of Open Source Software libraries +Google To Start Distributing A Collection Of Open Source Software libraries谷歌开始分发一系列开源软件库 ====== ![][1] -On Tuesday, Google unveiled a new program aimed at safeguarding the open-source software supply chain by curating and delivering a security-vetted selection of open source packages to Google Cloud users. The business announced the new service, dubbed Assured Open Source Software, in a blog [post][2]. Andy Chang, Google Cloud’s group product manager for security and privacy, highlighted some of the problems of safeguarding open source software and emphasised Google’s commitment to open source in his blog post. +On Tuesday, Google unveiled a new program aimed at safeguarding the open-source software supply chain by curating and delivering a security-vetted selection of open source packages to Google Cloud users. The business announced the new service, dubbed Assured Open Source Software, in a blog [post][2]. Andy Chang, Google Cloud’s group product manager for security and privacy, highlighted some of the problems of safeguarding open source software and emphasised Google’s commitment to open source in his blog post. +5 月 17 日,谷歌推出了一项新计划,该计划向谷歌云用户策划并提供经过安全审查的开源包选项,以保护开源软件供应链。该公司在一篇[博文][2]中宣布了这项名为 Assured Open Source Software 的新服务。在博文中,谷歌云安全和隐私部门产品经理 Andy Chang 强调了保障开源软件的一些问题,并强调了谷歌对开源的承诺。 -“There has been an increasing awareness in the developer community, enterprises, and governments of software supply chain risks,” Chang wrote, citing last year’s major log4j vulnerability as an example. “Google continues to be one of the largest maintainers, contributors, and users of open source and is deeply involved in helping make the open source software ecosystem more secure.” +“There has been an increasing awareness in the developer community, enterprises, and governments of software supply chain risks,” Chang wrote, citing last year’s major log4j vulnerability as an example. “Google continues to be one of the largest maintainers, contributors, and users of open source and is deeply involved in helping make the open source software ecosystem more secure.” +“开发者社区、企业及政府对软件供应链风险的意识越来越强,”Chang 写道,并以去年的 log4j 重大漏洞为例。“谷歌仍是开源代码最大的维护者、贡献者和使用者之一,并深入参与了帮助开源软件生态系统更加安全的工作。” -According to Google, the Assured Open Source Software service will give Cloud clients access to Google’s substantial software auditing knowledge. According to Google, all open source packages made available through the service are also used internally by the corporation and are inspected and analysed for vulnerabilities on a regular basis. +According to Google, the Assured Open Source Software service will give Cloud clients access to Google’s substantial software auditing knowledge. According to Google, all open source packages made available through the service are also used internally by the corporation and are inspected and analysed for vulnerabilities on a regular basis. +据谷歌称,Assured Open Source Software 服务将让云客户能够访问谷歌的大量软件审计知识。另据其称,所有通过该服务提供的开源软件包也在公司内部使用,公司会定期检查和分析其漏洞。 -A list of the 550 important open source libraries that Google is currently reviewing is available on [GitHub][3]. While these libraries may all be downloaded independently of Google, the Assured OSS program will see audited versions provided through Google Cloud, preventing developers from corrupting widely used open source libraries. This service is now in early access phase and will be ready for wider consumer testing in Q3 2022. +A list of the 550 important open source libraries that Google is currently reviewing is available on [GitHub][3]. While these libraries may all be downloaded independently of Google, the Assured OSS program will see audited versions provided through Google Cloud, preventing developers from corrupting widely used open source libraries. This service is now in early access phase and will be ready for wider consumer testing in Q3 2022. +谷歌目前正在审核的 550 个重要开源库的清单可以在[GitHub][3]上找到。虽然这些库都可以独立于谷歌下载,但该计划将呈现通过谷歌云提供的审核版本,防止开发者破坏广泛使用的开放源码库。这项服务现在处于预先体验阶段,将在 2022 年第三季度准备好进行更广泛的消费者测试。 -The Google statement is part of a broader industry effort to strengthen the security of the open source software supply chain, which has the support of the Biden administration. In January, representatives from the Department of Homeland Security and the Cybersecurity and Infrastructure Security Agency met with executives from some of the country’s major IT companies to examine open-source software security in the wake of the log4j bug. Since then, the corporations involved have pledged more than $30 million in financing to improve open source software security during a recent summit. -In addition to cash, Google is devoting engineering time to ensuring the supply chain’s security. The corporation has announced the development of a “Open Source Maintenance Crew” that will collaborate with library maintainers to improve security. +The Google statement is part of a broader industry effort to strengthen the security of the open source software supply chain, which has the support of the Biden administration. In January, representatives from the Department of Homeland Security and the Cybersecurity and Infrastructure Security Agency met with executives from some of the country’s major IT companies to examine open-source software security in the wake of the log4j bug. Since then, the corporations involved have pledged more than $30 million in financing to improve open source software security during a recent summit. +谷歌的声明只是广大行业努力加强开源软件供应链的安全的一部分,这份努力得到了拜登政府的支持。今年 1 月,国土安全部和网络安全与基础设施安全局的代表与美国一些主要 IT 公司的高管会面,研究 log4j 漏洞之后的开源软件安全问题。此后,有关公司在最近的一次峰会上承诺提供超过 3000 万美元的资金,以改善开源软件的安全问题。 + +In addition to cash, Google is devoting engineering time to ensuring the supply chain’s security. The corporation has announced the development of a “Open Source Maintenance Crew” that will collaborate with library maintainers to improve security. +除了现金,谷歌还在投入工程时间来确保供应链的安全。该公司已宣布发展“开源维护小组”,该团队将与库维护人员合作以提高安全性。 -------------------------------------------------------------------------------- @@ -29,7 +36,7 @@ via: https://www.opensourceforu.com/2022/05/google-to-start-distributing-a-colle 作者:[Laveesh Kocher][a] 选题:[lkxed][b] -译者:[译者ID](https://github.com/译者ID) +译者:[beamrolling](https://github.com/beamrolling) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From bb1ed6bcc7e2d2417ed235170832ac147feaa1ee Mon Sep 17 00:00:00 2001 From: lkxed Date: Thu, 26 May 2022 17:49:14 +0800 Subject: [PATCH 006/104] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020220526=20Document=20your=20source=20code=20with=20Do?= =?UTF-8?q?xygen=20on=20Linux.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... your source code with Doxygen on Linux.md | 254 ++++++++++++++++++ 1 file changed, 254 insertions(+) create mode 100644 sources/tech/20220526 Document your source code with Doxygen on Linux.md diff --git a/sources/tech/20220526 Document your source code with Doxygen on Linux.md b/sources/tech/20220526 Document your source code with Doxygen on Linux.md new file mode 100644 index 0000000000..053e300e79 --- /dev/null +++ b/sources/tech/20220526 Document your source code with Doxygen on Linux.md @@ -0,0 +1,254 @@ +[#]: subject: "Document your source code with Doxygen on Linux" +[#]: via: "https://opensource.com/article/22/5/document-source-code-doxygen-linux" +[#]: author: "Stephan Avenwedde https://opensource.com/users/hansic99" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Document your source code with Doxygen on Linux +====== +This widely used open source tool can generate documentation from your comments. + +![5 trends in open source documentation][1] + +Image by: Internet Archive Book Images. Modified by Opensource.com. CC BY-SA 4.0 + +When trying to familiarize yourself with someone else's project, you usually appreciate the comments left behind that help you understand the meaning of their code. In the same way, whenever you are programming, whether for yourself or for others, it is good practice to comment your own code. All programming languages offer a special syntax to mark a word, a line, or a whole section as a comment. Those areas are then ignored by the compiler or interpreter when the source code is processed. + +Comments don't take the place of documentation, but there is a way to use your comments to produce documentation easily. Meet [Doxygen][2], an open source tool for generating HTML or LaTeX documentation based on comments in the code. Doxygen enables you to provide a comprehensive overview of the structure of your code without additional effort. While Doxygen is mainly used to document C++, you can use it for many other languages, like C, Objective-C, C#, PHP, Java, Python, and more. + +To use Doxygen, you simply comment your source code in a syntax that Doxygen can read. Doxygen then walks through your source files and creates HTML or LaTeX documentation based on those special comments. The C++ example project below will illustrate how the source code is commented and how the documentation is generated from it. The example is available on [GitHub][3], and I will also include references to different sections of the [Doxygen manual and documentation][4]. + +### Install Doxygen on Linux + +On Fedora, Doxygen is available as a package. Open a terminal and run: + +``` +sudo dnf install doxygen +``` + +On Debian-based systems, you can install it by running: + +``` +sudo apt-get install doxygen +``` + +### Usage + +Once installed, all you need is a project with Doxygen-compatible comments and a Doxyfile, a configuration file that controls the behavior of Doxygen. + +Note: If you stick to the related example project on GitHub, you can omit the next step. + +If there is no `Doxyfile` yet, you can simply let Doxygen generate a standard template. To do so, navigate to the root of your project and run: + +``` +doxygen -g +``` + +The `-g` stands for generate. You should now notice a newly created file called `Doxyfile`. You can invoke Doxygen by simply running: + +``` +doxygen +``` + +You should now notice two newly created folders: + +* html/ +* latex/ + +By default, Doxygen outputs LaTeX-formatted documentation as well as HTML-based documentation. In this article, I will focus only on HTML-based documentation. You can find out more about LaTeX output in the official Doxygen documentation, in the *Getting started* section. + +Double click on `html/index.html` to open the actual HTML documentation. With a blank configuration, it probably looks like the screenshot below: + +![A screenshot of a doxygen generated main page on Firefox. The content field under My Project Documentation is blank.][6] + +Now it's time to modify the `Doxyfile` and add some special comments to the source code. + +### Doxyfile + +The `Doxyfile` allows you to define tons of adjustment possibilities, so I will describe only a very small subset. The settings correspond to the `Doxyfile` of the example project. + +#### Line 35: Project name + +Here you can specify the project name, which will be visible in the header line and the browser tab. + +``` +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by +# double-quotes, unless you are using Doxywizard) that should identify the +# project for which the documentation is generated. This name is used in the +# title of most generated pages and in a few other places. +# The default value is: My Project. + +PROJECT_NAME           = "My Project" +``` + +#### Line 47: Project brief description + +The brief description will also be shown in the header but in a smaller font. + +``` +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer a +# quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF          = "An example of using Doxygen in C++" +``` + +#### Line 926: Inclusion of subdirectories + +Allow Doxygen to walk recursively through subdirectories to find source and documentation files. + +``` +# The RECURSIVE tag can be used to specify whether or not subdirectories should +# be searched for input files as well. +# The default value is: NO. + +RECURSIVE = YES +``` + +#### Line 1769: Disable LaTeX output + +If you are just interested in the HTML output, you can disable the LaTeX code generation using this switch. + +``` +# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output. + +# The default value is: YES. + +GENERATE_LATEX = NO +``` + +After every change, you can run Doxygen again to check whether your changes have had the desired effect. If you just want to check which modification an existing `Doxyfile` has, invoke Doxygen with the `-x` switch: + +![A screenshot of the terminal showing the differences, Project Name, Project Brief, Recursive, and status of Generate Latex][7] + +As with the command `diff`, Doxygen displays only the differences between the actual Doxyfile and the template. + +### Special comments + +Doxygen reads the sources and checks each file for special comments. Based on those comments and keywords, it builds up the HTML documentation. The anatomy of the special comments can be well explained using the header file of the class ByteStream, as shown in the GitHub example linked above. + +I will look at the constructor and destructor as an example: + +``` +/*! @brief Constructor which takes an external buffer to operate on +* +* The specified buffer already exist. +* Memory and size can be accessed by buffer() and size(). +* +* @param[in] pBuf Pointer to existing buffer +* @param[in] size Size of the existing buffer +*/ + +ByteStream(char* pBuf, size_t size) noexcept; +``` + +There are different flavors of formatting a special comment block. I prefer to start the comment in the Qt-style (`/*!` ) and add an asterisk (`*` ) before each line. The block then ends with an asterisk followed by a forward slash (`*/` ). To get an overview of the different style options, refer to the Doxygen manual, in the section *Documenting the code*. + +Comments in Doxygen are divided into two sections, a brief description and a detailed description. Both sections are optional. In the code sample above, the comment block refers to the following line of code, the declaration of a constructor. The sentence behind the `@brief` will be shown in the compact class overview: + +![A screenshot of the C++ example of using Doxygen showing the Byte Stream Class Reference. The categories in the list are public member functions, writing (operators for writing to the stream), and reading (operators for reading from the stream)][8] + +After a blank line (blank lines are treated as paragraph separators), the actual documentation for the constructor begins. With the `@param[in/out]` keyword, you can mark the arguments passed to the constructor, and Doxygen will make a clear argument list from it: + +![Screenshot of the Doxygen example showing the parameters under ByteStream][9] + +Note that Doxygen automatically creates a link to the mentioned `buffer()` and `size()` method in the comment. In contrast, the comment before the destructor declaration won't have any effect on Doxygen as it is not recognized as a special comment: + +``` +// Destructor +~ByteStream(); +``` + +Now you have seen 90% of the magic. By using a slightly modified syntax for your comments, you can convert them into special comments that Doxygen can read. Furthermore, by using a few keywords, you can advance the formatting. In addition, Doxygen has some special features, which I will highlight in the following section. + +### Features + +Most of the work is already done via your regular commenting on the source code. But with a few tweaks, you can easily enhance the output of Doxygen. + +#### Markdown + +For advanced formatting, Doxygen supports Markdown syntax and HTML commands. There is a Markdown cheat sheet available in the [download section][10] of opensource.com. + +#### Mainpage + +Aside from your customized header, you will get a mostly empty page when you open `html/index.html`. You can add some meaningful content to this empty space by using specific keywords. Because the main page is usually not dedicated to a particular source code file, you can add an ordinary text file containing the content for the main page into the root of your project. You can see this in the example on GitHub. The comments in there produce the following output: + +![The Doxygen Example Documentation field now contains headings and documentation: Introduction, Running the example, System requirements, and Building the code, with step by step examples and code snippets (all can be found in the example on GitHub)][11] + +#### Automatic link generation + +As noted above, Doxygen automatically figures out when you are referring to an existing part of the code and creates a link to the related documentation. Be aware that automatic link creation only works if the part you refer to is documented as well. + +More information can be found in the official documentation, under *Automatic link generation*. + +#### Groups + +The ByteStream class has overloaded stream operators for writing (`<<` ) and reading (`>>` ). In the class overview in the **Special comments** section above, you can see that the operator declarations are grouped as Writing and Reading. These groups are defined and named in the ByteStream header file. + +Grouping is done using a special syntax: You start a group with `@{` and end it with `}@`. All members inside those marks belong to this group. In the header `ByteStream.h` it is implemented as follows: + +``` +/** @name Writing +* Operators for writing to the stream +* @{ +*/ + +(...) + +/** @} +* @name Reading +* Operators for reading from the stream +* @{ +*/ + +(...) + +/** @} */ +``` + +You can find more information about grouping in the Doxygen documentation, under *Grouping*. + +#### LLVM Support + +If you are building with [Clang][12], you can apply the flag `-Wdocumentation` to the build process to let Clang check your special comments. You can find more information about this feature in the LLVM Users Manual or in Dmitri Gribenko's presentation, both on the Clang website. + +### Where Doxygen is used + +Doxygen was first released in 1997, so it has been already around for some years. Despite its age, many projects use Doxygen to create their documentation. Some examples are NASA's [F Prime][13] flight software framework, the image processing library [OpenCV][14], and the package manager [RPM][15]. You can also find the Doxygen syntax in other areas, like in the documentation standards of the content management platform [Drupal][16]. + +A caveat: One drawback of using Doxygen is that it outputs HTML documentation with the look and feel of web pages from the nineties. It is also hard to depict the architecture of meta and template programming using Doxygen. For those cases, you would probably choose [Sphinx][17] over Doxygen. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/5/document-source-code-doxygen-linux + +作者:[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/documentation-type-keys-yearbook.png +[2]: https://www.doxygen.n/ +[3]: https://github.com/hANSIc99/DoxygenSample +[4]: https://www.doxygen.nl/manual/ +[5]: https://opensource.com/downloads/doxygen-cheat-sheet +[6]: https://opensource.com/sites/default/files/2022-05/main%20page%20doxy.png +[7]: https://opensource.com/sites/default/files/2022-05/doxygen%20class%20overview.png +[8]: https://opensource.com/sites/default/files/2022-05/actual%20doxy%20byte%20stream%20class.png +[9]: https://opensource.com/sites/default/files/2022-05/argument%20list%20from%20Doxygen.png +[10]: https://opensource.com/downloads/cheat-sheet-markdown +[11]: https://opensource.com/sites/default/files/2022-05/main%20page%20doxygen.png +[12]: https://clang.llvm.org/ +[13]: https://github.com/nasa/fprime +[14]: https://docs.opencv.org/4.5.5/index.html +[15]: https://github.com/rpm-software-management/rpm +[16]: https://www.drupal.org/docs/develop/standards/api-documentation-and-comment-standards +[17]: https://opensource.com/article/18/11/building-custom-workflows-sphinx +[18]: https://opensource.com/downloads/doxygen-cheat-sheet From 8f64e4dcb98bb2868e687ec3a716d8dd56e96225 Mon Sep 17 00:00:00 2001 From: lkxed Date: Thu, 26 May 2022 17:50:54 +0800 Subject: [PATCH 007/104] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020220526=20Write=20C=20applications=20using=20Vely=20o?= =?UTF-8?q?n=20Linux.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...rite C applications using Vely on Linux.md | 306 ++++++++++++++++++ 1 file changed, 306 insertions(+) create mode 100644 sources/tech/20220526 Write C applications using Vely on Linux.md diff --git a/sources/tech/20220526 Write C applications using Vely on Linux.md b/sources/tech/20220526 Write C applications using Vely on Linux.md new file mode 100644 index 0000000000..858cd4ed19 --- /dev/null +++ b/sources/tech/20220526 Write C applications using Vely on Linux.md @@ -0,0 +1,306 @@ +[#]: subject: "Write C applications using Vely on Linux" +[#]: via: "https://opensource.com/article/22/5/write-c-appplications-vely-linux" +[#]: author: "Sergio Mijatovic https://opensource.com/users/vely" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Write C applications using Vely on Linux +====== +Vely is an open source tool for writing web and command-line applications in C on major Linux distributions. + +![Women in computing and open source][1] + +Image by: Ray Smith + +Vely is a tool for writing web and command-line applications in C. Vely combines high performance and the low footprint associated with C programming with ease of use and improved safety reminiscent of languages like PHP. It's free and open source software, and licensed under GPLv3 and LGPL 3 for libraries, so you can even build commercial software with it. + +Vely works on major Linux distributions and processor architectures. You can use webservers, such as Apache, Nginx, or others, and databases such as MariaDB, PostgreSQL, and SQLite. + +You can use Vely for web applications, command-line programs, as middleware, database applications, services software, data integration, IoT (Internet of Things), and anywhere else. It's well suited for the cloud, works easily in a container, and, due to low resource requirements, it's also a good choice when memory and processing power are at a premium. + +### Install Vely + +To try Vely, install the Apache webserver and [MariaDB database][2]. You can use a different webserver and database, and the setup would be similar, but in this example, I use Apache and MariaDB. + +Next, install Vely. On Linux use a package manager such as `dnf` or `apt`. + +### Stock tickers project + +This example saves the names of stock tickers and their prices so you can view them in a list. + +Start by creating `stock.v` file, and paste this code into it: + +``` +#include "vely.h" + +void stock() { +   out-header default +   @ +       @ +       input-param action +       input-param stock_name +       input-param stock_price +       if (!strcmp (action, "add")) { +          // Add to stock table, update if stock exists +          run-query#add_data@db = "insert into stock (stock_name,\ +              stock_price) values ('%s', '%s') on duplicate key \ +              update stock_price='%s'" : stock_name, stock_price, \ +              stock_price +           end-query +           error#add_data to define err +           if (strcmp (err, "0")) { +               report-error "Cannot update stock price, error [%s]", err +           } +           @
+              @Stock price updated! +           @
+       } else if (!strcmp (action, "show")) { +         // Show stock names and values +           @ +               @ +                   @ +                   @ +               @ +               run-query#show_data@db = "select stock_name, \ +                    stock_price from stock" output stock_name, \ +                    stock_price +                   @ +                       @ +                       @ +                   @ +               end-query +           @
Stock nameStock price
+                       query-result#show_data, stock_name +                       @ +                       query-result#show_data, stock_price +                       @
+       } else { +           @
Unrecognized request!
+       } +       @ +   @ +} +``` + +### Build the database + +For this example, create a database named `dbstock`, owned by user `vely` with the password `your_password`. These are arbitrary names, and in real life, you can use whatever values you want, as long as they're consistent throughout your code. + +First, log in to the MariaDB database as root and execute this: + +``` +CREATE DATABASE IF NOT EXISTS dbstock; +FLUSH privileges; +CREATE USER IF NOT EXISTS vely@localhost IDENTIFIED BY 'your_password'; +FLUSH privileges; +GRANT ALL privileges ON dbstock.* TO vely@localhost; +FLUSH privileges; +exit; +``` + +Now log in to MariaDB again and set the current database: + +``` +$ mysql -u vely -pyour_password +``` + +Now you can create the database objects needed for the application. You need a `stock` table in the `dbstock` database for this example. + +``` +USE dbstock; +CREATE TABLE IF NOT EXISTS stock (stock_name VARCHAR(100) PRIMARY KEY, stock_price BIGINT); +``` + +Finally, create a database configuration file named `db` so that your application can log into the database. You must call it `db` because that's what the code in `stock.v` uses. For instance: + +``` +[...] +run-query#add_data@db = "insert into stock ..." +[...] +``` + +The database name is preceded by the `@` sign, in this case, `@db`, so the name of the database configuration file is `db`. As with other values, you can name your database configuration file whatever you want, as long as your code is consistent. + +Here's the configuration for the `db` file: + +``` +[client] +user=vely +password=your_password +database=dbstock +``` + +The above is a standard MariaDB [client options file][3]. Vely uses native database connectivity, so you can specify any options a given database allows. + +### Build the application + +Next, you can create your Vely application. For this example, you're going to create a web app called `stockapp` : + +``` +$ sudo vf -i -u $(whoami) stockapp +``` + +This creates an application home under the Vely directory (`/var/lib/vv` ) and performs the required application setup steps for you. + +To build your application, use the `vv` command: + +``` +$ vv -q --db=mariadb:db stockapp +``` + +Here's what each option means: + +* -q builds an application +* --db specifies the database to be used (mariadb:db, as specified in your configuration file) +* stockapp is the application name + +You can actually use any number of databases and different vendors in your application. This example is simple, though, so you only need one database. Vely has many other useful options you can use, but this is sufficient for now. + +### Configure web access + +To access your application via a web browser or various web clients, you need to set up a webserver. It can be Apache, Nginx, or any other server that supports FastCGI proxying (most, if not all, webservers and load balancers do this). Here, I will set up Apache, but the setup is similar for other webservers. + +The `proxy` and `proxy_fcgi` modules are installed and enabled by default on the Fedora install of the Apache web server, but you must enable them on Debian-based systems (like Ubuntu): + +``` +$ sudo a2enmod proxy +$ sudo a2enmod proxy_fcgi +$ sudo systemctl restart apache2 +``` + +If you're not on a Debian-based system, you can enable an Apache module by adding it to the Apache configuration file or in a file in the `/etc/httpd/conf.modules.d/` directory, depending on your distribution's configuration. + +Next, open your Apache configuration file in a text editor. For example, on a Debian-based system: + +``` +$ sudo vi /etc/apache2/apache2.conf +``` + +On a Fedora system (including Red Hat Enterprise Linux and CentOS): + +``` +$ sudo vi /etc/httpd/conf/httpd.conf +``` + +Add this line to the end of the file: + +``` +ProxyPass "/stockapp" unix:///var/lib/vv/stockapp/sock/sock|fcgi://localhost/stockapp +``` + +Depending on your webserver configuration, there may be a better place to add the `ProxyPass` directive. For this example, though, the above is sufficient. + +Save the file and restart the webserver. On Fedora-based systems: + +``` +$ sudo systemctl restart httpd +``` + +On Debian-based systems: + +``` +$ sudo systemctl restart apache2 +``` + +In this case, you're connecting to your application through a socket, but you can use a TCP port instead (which comes in handy when your application resides in a container or something similar). + +### Run the application + +Start the application server for your application: + +``` +$ vf stockapp +``` + +By default, this runs anywhere from 0 to 20 server processes for your application, depending on the load. When the user load is low, your application uses virtually no memory at all. + +That was it! Navigate to [http://127.0.0.1/stockapp?req=stock&action=add&stock_name=XYZ&stock_pri…][4] in your web browser to see the application. + +You've just updated the stock price for ticker "XYZ" to 440. Try different tickers and prices to build a list of stocks, which you can view with the URL [http://127.0.0.1/stockapp?req=stock&action=show][5]. + +Congratulations, you've created your first Vely application, reverse proxied behind a web server. + +You can also view the output without a graphical browser by [using curl][6]: + +``` +$ curl -s \ +"http://127.0.0.1/stockapp?req=stock&action=add&stock_name=XYZ&stock_price=440" +$ curl -s "http://127.0.0.1/stockapp?req=stock&action=show" +``` + +### Run the application from the terminal + +You can run your application from the terminal, too. A terminal command is always made along with the FastCGI application server, and it's named the same as your application (in this case, `stockapp` ). It works exactly the same as the web app. You can write some requests to your application to be fulfilled as web requests and others to run from the command-line. To do that, you provide the request as environment variables. For instance, to output the list of stocks as HTML, type: + +``` +$ export REQUEST_METHOD=GET +$ export QUERY_STRING="req=stock&action=show" +$ /var/lib/vv/bld/stockapp/stockapp +``` + +To suppress HTTP headers, use: + +``` +$ export VV_SILENT_HEADER=yes +$ /var/lib/vv/bld/stockapp/stockapp +``` + +### How Vely works + +Your application works by processing requests and sending back replies. A request is one of two HTTP methods: GET or POST. + +A request always has a parameter `req`. In the example here, its value is `stock`. That means source code compiled from file `stock.v` is called automatically to handle such a request. + +A source file like this can do many different things, all grouped logically under a single request. Here, you have another parameter `action`, which can have a value of `add` (to add or update a stock) or `show` (to show a list of stocks). You specify `stock_name` and `stock_price` parameters when adding or updating. Pretty easy stuff. Other than `req`, you can choose parameter names however you wish. + +Looking at the code in `stock.v`, it's simple to follow. You use the [input-param][7] construct to get the values for your input parameters. Yes, those strange things in the C code that aren't C are [Vely language constructs][8], and they do lots of useful stuff for you, such as [run-query][9], which (as you might expect from the name) runs your queries. An easy one is `@`, which is an [output construct][10]. String handling is made simple and reliable without worrying about buffer overruns. Check out the [full reference of Vely constructs][11] to understand Vely's capabilities. + +Vely converts all constructs in your code into pure C and makes a native executable that is very small and fast. Your application runs as several FastCGI server processes, which stay resident in memory while accepting and processing requests. All of these processes work in parallel. + +For more info, see [how Vely works][12] and read more about [Vely architecture][13]. + +### Manage strings and memory + +Vely has automatic garbage collection for all of its constructs. In fact, most of the time, you shouldn't need to free memory at all, so application development is even simpler. Leave that to Vely and enjoy computing free of memory leaks and far fewer memory issues than you might expect. String constructs such as `write-string` make it safe, fast, and easy to create complex strings just as they do simple ones. + +### FastCGI program manager + +Even if you don't want to develop your own applications with Vely, you can use `vf`, [Vely's FastCGI program manager][14], with any generic FastCGI program, not just those created with Vely. + +### Want to learn more about Vely? + +I sometimes get asked about the project name. *Vely* is short for *Vel(ocit)y*. It's fast to program with, fast to understand code and maintain, and fast (and small!) at run time. It's even easy to containerize. + +Check out the documentation at [vely.dev][15], which features downloads and examples that go beyond the introduction this article provides. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/5/write-c-appplications-vely-linux + +作者:[Sergio Mijatovic][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/vely +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/OSDC_women_computing_2.png +[2]: https://www.redhat.com/sysadmin/mysql-mariadb-introduction?intcmp=7013a000002qLH8AAM +[3]: https://mariadb.com/kb/en/configuring-mariadb-connectorc-with-option-files/#options +[4]: http://127.0.0.1/stockapp?req=stock&action=add&stock_name=XYZ&stock_price=440 +[5]: http://127.0.0.1/stockapp?req=stock&action=show +[6]: https://opensource.com/article/20/5/curl-cheat-sheet +[7]: https://vely.dev/input-param.html +[8]: https://vely.dev/language_constructs.html +[9]: https://vely.dev/run-query.html +[10]: https://vely.dev/output_construct.html +[11]: https://vely.dev/reference.html +[12]: https://vely.dev/how_vely_works.html +[13]: https://vely.dev/vely_architecture.html +[14]: https://vely.dev/plain_C_FCGI.html +[15]: http://vely.dev From efe5a0d0957ee92581ee30b6dd2199d534b9917a Mon Sep 17 00:00:00 2001 From: lkxed Date: Thu, 26 May 2022 17:51:55 +0800 Subject: [PATCH 008/104] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?news]:=2020220526=20Plex=20Desktop=20Player=20is=20Now=20Availa?= =?UTF-8?q?ble=20for=20Linux.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...sktop Player is Now Available for Linux.md | 73 +++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 sources/news/20220526 Plex Desktop Player is Now Available for Linux.md diff --git a/sources/news/20220526 Plex Desktop Player is Now Available for Linux.md b/sources/news/20220526 Plex Desktop Player is Now Available for Linux.md new file mode 100644 index 0000000000..0dce34bc6c --- /dev/null +++ b/sources/news/20220526 Plex Desktop Player is Now Available for Linux.md @@ -0,0 +1,73 @@ +[#]: subject: "Plex Desktop Player is Now Available for Linux" +[#]: via: "https://news.itsfoss.com/plex-desktop-linux/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Plex Desktop Player is Now Available for Linux +====== +Plex.tv finally added support for its desktop app, and its brand new HTPC app on Linux. It’s only snap for now. + +![plex][1] + +Plex is a popular streaming player with the ability to use as a media server software. + +In fact, it is also one of the [best media server software for Linux][2]. + +Yes, the media server was already available for Linux, and we also had a [tutorial covering the installation steps][3]. + +### Plex Desktop Player on Linux as a Snap + +I’m aware that many of you may not like the preference for the Snap package to install the desktop player. But, as of now, the desktop player is available in the Snap store to easily let you install it on any Linux distribution of your choice. + +![][4] + +Fortunately, the [announcement][5] for the desktop player also mentions that they have a **Flatpak package** in the works, which should be available on Flathub in the near future. + +So, with a Flatpak and Snap package, Plex can be a fantastic choice to stream and organize your personal media collection on Linux. + +![][6] + +In case you are curious, HTPC is the successor to the PMP TV (Plex Media Player TV) mode. + +They announced it along with the Linux support for the desktop app. + +With HTPC, the desktop app would be shared by the TV with support for advanced features like audio pass-through, refresh rate switching, controller support, and configurable input maps. + +![][7] + +So, if you have got a big screen, and want to connect your system (irrespective of the desktop platform), you can do it using the HTPC app. + +[Plex Desktop][8] + +[Plex HTPC][9] + +What do you prefer to use when streaming content on your Linux system or a connected TV? Is Plex good enough? Now that it supports Linux, do you think that you might want to switch if you use something else? + +Feel free to share your thoughts in the comments below. + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/plex-desktop-linux/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/plex-ft.jpg +[2]: https://itsfoss.com/best-linux-media-server/ +[3]: https://itsfoss.com/install-plex-ubuntu/ +[4]: https://news.itsfoss.com/wp-content/uploads/2022/05/plex-desktop-ubuntu.jpg +[5]: https://www.plex.tv/blog/way-to-be-htpc/ +[6]: https://news.itsfoss.com/wp-content/uploads/2022/05/plex-snap-1024x524.jpg +[7]: https://news.itsfoss.com/wp-content/uploads/2022/05/plex-feat-1024x576.jpg +[8]: https://snapcraft.io/plex-desktop +[9]: https://snapcraft.io/plex-htpc From fb21740954b400d5088c7b71e94289c6c7d5086f Mon Sep 17 00:00:00 2001 From: lkxed Date: Thu, 26 May 2022 17:54:56 +0800 Subject: [PATCH 009/104] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020220526=20Shell=20Scripting=20is=20Still=20Going=20St?= =?UTF-8?q?rong.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...6 Shell Scripting is Still Going Strong.md | 198 ++++++++++++++++++ 1 file changed, 198 insertions(+) create mode 100644 sources/tech/20220526 Shell Scripting is Still Going Strong.md diff --git a/sources/tech/20220526 Shell Scripting is Still Going Strong.md b/sources/tech/20220526 Shell Scripting is Still Going Strong.md new file mode 100644 index 0000000000..f4a5b767cd --- /dev/null +++ b/sources/tech/20220526 Shell Scripting is Still Going Strong.md @@ -0,0 +1,198 @@ +[#]: subject: "Shell Scripting is Still Going Strong" +[#]: via: "https://www.opensourceforu.com/2022/05/shell-scripting-is-still-going-strong/" +[#]: author: "Bipin Patwardhan https://www.opensourceforu.com/author/bipin-patwardhan/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Shell Scripting is Still Going Strong +====== +This article introduces you to the basics of shell scripting and its importance in day-to-day life. A shell script is a command-line interpreter that runs on a UNIX/Linux shell. + +![Penguin-with-linux-command][1] + +The first thing we notice when we log into a UNIX/Linux system is the blinking cursor next to the $ sign. This is the shell. It has been – for many decades – the ubiquitous (and many times the only) interface to interact with a computer. Before the advent and popularity of graphical user interfaces (GUIs), the terminal and the shell were the only mechanism to make the computer do what we wanted it to do. At first glance, one may wonder what the shell does – other than passing commands to the underlying operating system for execution. Most of us are familiar with commands like ‘ls’ (for listing contents of a directory), ‘cd’ (for changing the current directory), and so on. It is through the shell that we can execute these commands. The shell understands the text we type — converts it into tokens — and then executes them on the operating system. + +### Flavours + +Initially, the terminal started with the humble Bourne shell or ‘sh’. Over the years, many shell variants were developed and used. Some of the popular ones are ‘C Shell’ / ‘csh’ and ‘Korn Shell’ / ‘ksh’. ‘sh’ fell out of favour for a few years, but has gained popularity once again through its recent avatar, namely ‘bash’ / ‘Bourne Again Shell’. + +### What does the shell actually do? + +The shell is the immediate interface between the operating system (OS) and the user. We make the computer do what we want, by using commands and applications supported by the tools installed on the computer we are using. Some commands are applications installed on the operating system, while some are built into the shell itself. Some of the commands built into bash are ‘clear’, ‘cd’, ‘eval’, and ‘exec’, to name a few, while commands like ‘ls’, and ‘mkdir’ are applications. The commands built into the shell vary as per the shell. + +In this article, we cover a few aspects related to ‘bash’. + +### More about the shell + +Most of us have used commands like ‘ls’, ‘cd’, and ‘mkdir’. When we run the ‘ls -l’ command on a directory, all the directories and files in that directory are listed on the screen. If the number is large, the screen scrolls. If the terminal does not support scroll bars (as was the case for many years), there is no way to look at the entries that have scrolled past. To help overcome this, we use commands like ‘more’ and ‘less’. These allow us to view the output on a page-by-page basis. The command typically used is: + +``` +ls -l | less +``` + +What is the shell doing here? What looks like a single command is actually two commands executing one after the other, ls and less. The pipe (‘|’) connects the two programs, but the connection is managed by the shell. Because of the pipe character, the shell connects the two programs – it connects the standard output of the ls command and connects it to the standard input or standard in or stdin of less. The pipe feature allows us to take the output of any program and provide it as the input to another program – without us having to do any changes to the programs. This is the philosophy of many UNIX/Linux applications — keep the applications simple and then combine many applications together to achieve the end result, rather than having one program do many things. + +If needed, we can redirect the output of ls to a file and then view it using ‘vi’. For this, we use the command: + +``` +ls -l > /tmp/my_file.txt +vi /tmp/my_file.txt +``` + +In this case, the output of ls is being redirected to a file. This is managed by the shell, which understands the ‘>’ symbol to mean redirection. It treats the token that follows as a file. + +### Automation using shell + +This ability to combine commands is one of the key elements for the creation of automation scripts using shell commands. In my most recent project, we were executing Python/Spark (PySpark) applications using cluster mode. Each application executed many structured query language (SQL) statements – SparkSQL. To keep track of application progress, we were printing details about the SQL being executed. This allowed us to maintain a log of what was happening in the application. As the applications were executed in cluster mode, to view the log, we had to use the yarn command as follows: + +``` +yarn log –applicationId [application_id] +``` + +In most cases, the log produced by an application was very large. So we typically piped the log to ‘less’ or redirected it to a file. The command we used was: + +``` +yarn log –aplicationId [application_id] | less +``` + +Our development team had a strength of 40 people. Each one had to remember this command. To make it simpler, I converted this command into a bash script. For this, I created a file with a ‘.sh’ extension. On UNIX and Linux systems, file extension does not matter. As long as the file is an executable, it will work. Extensions have significance on MS Windows. + +### Important thing to remember + +The shell is an interpreter. This means that it will read the program line by line and execute it. The limitation of this approach is that errors (if any) are not identified upfront. Errors are not identified till they are read and executed by the interpreter. In short, we can have a shell program that will execute perfectly for the first 20 lines and then fail due to a syntax error on line 21. When the script fails at line 21, the shell does not unroll/undo the previous steps. When such a thing occurs, we have to correct the script and start execution from the first line. Thus, as an example, if we have deleted a few files before encountering an error, execution of the shell script will stop, but the files are gone forever. + +The script I created was: + +``` +#!/bin/bash +yarn log –applicationId 123 | less +``` + +…where 123 was the application ID. + +The first two characters of the first line are magic characters. They tell the script that this is an executable file and the line contains the name of the program to be used for execution. The remaining lines of the script are passed to the program mentioned. In this case, we are going to execute bash. Even after including the first line, we have to apply execute permissions to the file using: + +``` +chmod +x my_file.sh +``` + +After giving execute permissions to the file, we can execute it as: + +``` +./my_file.sh +``` + +If we do not give execute permissions to the file, we can execute the script as: + +``` +sh ./my_file.sh +``` + +### Passing parameters + +You will realise quickly that such a script is handy, but becomes useless immediately. Each time we execute the Python/Spark application, a new ID is generated. Hence, for each run, we have to edit the file and add the new application ID. This definitely reduces the usability of the script. To be useful, we should be passing the application ID as a parameter: + +``` +#!/bin/bash +yarn –log -applicationId ${1} | less +``` + +We need to execute the script as: + +``` +./show_log.sh 123 +``` + +The script will execute the yarn command, fetch the log for the application and allow us to view it. + +What if we want to redirect the output to a file? Not a problem. Instead of sending the output to less, we can redirect it to a file: + +``` +#!/bin/bash +ls –l ${1} > ${2} +view ${2} +``` + +To run the script, we have to provide two parameters, and the command becomes: + +``` +./my_file.sh /tmp /tmp/listing.txt +``` + +When executed, $1 will bind to /tmp and $2 will bind to /tmp/listing.txt. For the shell, the parameters are named from one to nine. This does not mean we cannot pass more than nine parameters to a script. We can, but that is the topic of another article. You will note that I have mentioned the parameters as ${1} and ${2} instead of $1 and $2. It is a good practice to enclose the name of the parameter in curly brackets as it allows us to unambiguously combine the parameters as part of a longer variable. For example, we can ask the user to provide file name as a parameter and then use that to form a larger file name. As an example, we can take $1 as the parameter and create a new file name as ${1}_student_names.txt. + +### Making the script robust + +What if the user forgets to provide parameters? The shell allows us to check for such conditions. We modify the script as below: + +``` +#!/bin/bash +if [ -z “${2}” ]; then +echo “file name not provided” +exit 1 +fi +if [ -z “${1}” ]; then +echo “directory name not provided” +exit 1 +fi +DIR_NAME=${1} +FILE_NAME=${2} +ls -l ${DIR_NAME} > /tmp/${FILE_NAME} +view /tmp/${FILE_NAME} +``` + +In this program, we check if the proper parameters are passed. We exit the script if parameters are not passed. You will note that I am checking the parameters in reverse order. If we check for the presence of the first parameter before checking the presence of the second parameter, the script will pass to the next step if only one parameter is passed. While the presence of parameters can be checked in ascending order, I recently realised that it might be better to check from nine to one, as we can provide proper error messages. You will also note that the parameters have been assigned to variables. The parameters one to nine are positional parameters. Assigning positional parameters to named parameters makes it easy to debug the script in case of issues. + +### Automating backup + +Another task that I automated was that of taking a backup. During development, in the initial days, we did not have a version control system in place. But we needed to have a mechanism to take regular backups. So the best method was to write a shell script that, when executed, copied all the code files into a separate directory, zipped them and then uploaded them to HDFS, using the date and time as the suffix. I know that this method is not as clean as having a version control system, as we store complete files and finding differences still needs the use of a program like diff; however, it is better than nothing. While we did not end up deleting the code files, the team did end up deleting the bin directory where the helper scripts were stored!!! And for this directory I did not have a backup. I had no choice but to re-create all the scripts. + +Once the source code control system was in place, I easily extended the backup script to upload the files to the version control system in addition to the previous method uploading to HDFS. + +### Summing up + +These days, programming languages like Python, Spark, Scala, and Java are in vogue as they are used to develop applications related to artificial intelligence and machine learning. While these languages are far more powerful when compared to shells, the ‘humble’ shell provides a ready platform that allows us to create helper scripts that ease our day-to-day tasks. The shell is quite powerful, more so because we can combine the powers of all the applications installed on the OS. As I found out in my project, even after many decades, shell scripting is still going strong. I hope I have convinced you to give it a try. + +### One for the road + +Shell scripts can be very handy. Consider the following command: + +``` +spark3-submit --queue pyspark --conf “spark.yarn.principal= abcd@abcd.com --conf “spark.yarn.keytab=/keytabs/abcd.keytab --jars /opt/custom_jars/abcd_1.jar --deploy-mode cluster --master yarn $* +``` + +We were expected to use this command while executing a Python/Spark application. Now imagine this command has to be used multiple times a day, by a team of 40 people. Most of us will copy this command in Notepad++, and each time we need to use it, we will copy it from Notepad++ and paste it on the terminal. What if there is an error during copy paste? What if someone uses the parameters incorrectly? How do we debug which command was used? Looking at history does not help much. +To make it simple for the team to get on with the task of Python/Spark application execution, we can create a bash shell script as follows: + +``` +#!/bin/bash +SERVICE_PRINCIPAL=abcd@abcd.com +KEYTAB_PATH=/keytabs/abcd.keytab +MY_JARS=/opt/custom_jars/abcd_1.jar +MAX_RETRIES=128 +QUEUE=pyspark +MASTER=yarn +MODE=cluster + +spark3-submit --queue ${QUEUE} --conf “spark.yarn.principal=${SERVICE_PRINCIPAL} --conf “spark.yarn.keytab=${KEYTAB_PATH} --jars ${MY_JARS} --deploy-mode ${MODE} --master ${MASTER} $* +``` + +This demonstrates how powerful a shell script can be and make our life easy. You can try more commands and scripts as per your requirement and explore further. + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/05/shell-scripting-is-still-going-strong/ + +作者:[Bipin Patwardhan][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/bipin-patwardhan/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/05/Penguin-with-linux-command.jpg From 97e01c5128571247f1c99f0317b4985df44a6fc5 Mon Sep 17 00:00:00 2001 From: lkxed Date: Thu, 26 May 2022 19:35:58 +0800 Subject: [PATCH 010/104] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020220526=20Garuda=20Linux-=20All-Rounder=20Distro=20Ba?= =?UTF-8?q?sed=20on=20Arch=20Linux.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... All-Rounder Distro Based on Arch Linux.md | 154 ++++++++++++++++++ 1 file changed, 154 insertions(+) create mode 100644 sources/tech/20220526 Garuda Linux- All-Rounder Distro Based on Arch Linux.md diff --git a/sources/tech/20220526 Garuda Linux- All-Rounder Distro Based on Arch Linux.md b/sources/tech/20220526 Garuda Linux- All-Rounder Distro Based on Arch Linux.md new file mode 100644 index 0000000000..8862a57bb2 --- /dev/null +++ b/sources/tech/20220526 Garuda Linux- All-Rounder Distro Based on Arch Linux.md @@ -0,0 +1,154 @@ +[#]: subject: "Garuda Linux: All-Rounder Distro Based on Arch Linux" +[#]: via: "https://www.debugpoint.com/2022/05/garuda-linux-review-2022/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Garuda Linux: All-Rounder Distro Based on Arch Linux +====== +A review of the Arch Linux based Garuda Linux, which brings a collection of desktop environments, window managers, and tools for general users and gamers. + +I have been planning to review Garuda Linux for a long time. But never got into it due to several reasons. Over the years, we [reviewed][1] a couple of Arch-based distros – spread across new ones, stables distros and more. Each one of them is a little different from the others. Finally, we review the Garuda Linux in 2022 – it’s our first review of this distro, and we will continue with all the major releases. + +![Garuda Linux Desktop (2022)][2] + +### What does it offer? + +There are many customized and easy-to-use Arch-based Linux distributions available. Every one of those tries to present something new other than just another variant of Arch Linux. + +Garuda Linux does offer a few new features compared to others. Firstly, it brings almost all popular desktops and window managers such as KDE, Xfce, GNOME, LXQt-kwin, Cinnamon, Mate, Wayfire, Qtile, i3wm and Sway. Second, it offers the default BTRFS file system with zstd compression for better performance. In addition, it provides the popular Chaotic-Aur, which contains a vast collection of pre-compiled binaries from AUR. Moreover, a group of hand-picked themes, icons and cursors give Garuda Linux an edge over the other Arch-based distros. + +Finally, its primary selling point is its pre-made for Gaming in Arch Linux with native apps such as Garuda Gamer and the option for Zen Kernel. + +### Garuda Linux Review – 2022 Edition + +This review is based on Garuda’s default offering, i.e. Garuda dragonized zen kernel with KDE Plasma (April 28, 2022 iso). + +#### Download and Installation + +![Garuda Linux – boot screen][3] + +The download via torrent was fast without any problems. The LIVE boot gives you whether you want to boot using the open-source or NVIDIA drivers. Finally, the welcome screen is well designed and gives you clear instructions to launch the installer. + +Garuda offers separate ISO files for different desktops and window managers. Because a massive set of packages pre-loaded in ISO files also gives you the option for the LITE version with KDE Plasma. The LITE versions are the base Garuda Linux without additional theming and packages. + +So, pick the one you want for your needs. + +Garuda Linux uses Calamares installer. The Calamares are not configured heavily, and installation is pretty straightforward. However, Calamares doesn’t give you the option to choose the desktop environments or packages. As I mentioned above, it has a separate installer for each of those. + +During my test, the installation went smooth, and it took around 5 minutes for launching the LIVE medium to installation completion in an Intel i5, 8 GB, SSD configuration. It’s blazing fast, in my opinion. + +#### Look and Feel + +After the successful installation, you see a nice login screen (SDDM with themes). It is well designed and aligned with Garda Linux’s design patterns. + +![The Login screen (SDDM) of Garuda Linux][4] + +The KDE Plasma desktop is heavily customized in terms of look in Garuda Linux. Firstly, the Latte dock is well placed with essential shortcuts at the bottom. No unnecessary shortcuts are there, which is nice. + +![Garuda Linux Desktop with Latte dock][5] + +Second, at the top bar, you get the application menu of KDE Plasma with Latte dock widgets. All the widgets are well placed and necessary for all user bases. By default, the top bar contains NEtSpeed widgets, clipboard and volume controls and the event calendar widget of the Latte dock. + +Garuda Linux uses Kvantum theme engine with “sweetified-plasma” theme with kvantum-dark application style, giving it its unique look. In addition, the famous BeautyLine icon theme provides the much-needed contrast (as designed) to this distro. + +#### Initial Setup and Applications + +Firstly, the initial setup gives you several options to quickly configure your desktop before your first use. A series of terminal-based operations is provided by its welcome applications such as system upgrades, etc. + +The welcome application gives an assorted list of Garuda utilities, ranging from system configurations to changing looks. It includes system cleaner, partition manager, Chaotic-aur managers, Gaming utilities, etc. + +Not only that, but it also provides access to Garuda services for its users directly from the desktop. It helps new to advanced users in terms of discovery of the services and features. + +![Garuda Welcome App][6] + +Now, I would like to highlight two crucial apps in this Garuda Linux review. First, the Snapper tool gives you controls to create a system restore points using several options. If your system breaks at some point, you can always restore it to a stable state using this utility. This is one of the much-needed applications, considering it’s a rolling release. + +![The Snapper Tools for system restore points][7] + +Second, the Octopi software manager (similar to synaptic) gives you access to all necessary packages in the Arch repo. You can easily install with one click after verifying the dependencies. Moreover, it also gives you the ability to add and remove Arch repositories via GUI. It’s worth mentioning here that Garuda includes “chaotic-aur” and “multilib” repo by default in addition to the typical “community”, “extra”, and “core” repo. + +![Octopi Software Manager][8] + +#### The Browser + +Garuda doesn’t provide a Firefox web browser by default. It includes the customized LibreWolf-based [FireDragon][9] web browser, which integrates well with the KDE Plasma desktop. In addition, UBlock Origin and Dark Reader add-ons are pre-installed in FireDragon. The FireDragon web browser uses Garuda’s server for searching the web. I am not entirely sure whether it connects to Google in the backend. + +![FireDragon Web browser][10] + +In addition to the above apps, Garuda uses the advanced Fish shell for command line work. However, LibreOffice and other graphical utilities are not installed by default. + +#### Performance and Resource Usage + +Garuda is a little resource heavy, even in an idle state. It consumed around 17% of CPU and RAM usage of approximately 1.2 GB at idle. And if you open more apps, then it will further shoot up. + +The htop shows that most of the idle state resources are consumed by KWin. I am not sure why there are five forks of KWin running (perhaps for Kvuntam and other theming). I cross-checked this with a standard Plasma installation, where only one process of KWin runs. + +The default KDE Plasma edition of Garuda Linux takes around 6.4 GB of disk space. + +![Garuda Linux Performance – Idle State][11] + +With the above performance metric, you may not be able to run it in low-end hardware. For better performance, I recommend using an Intel i7 or similar system with at least 8GB of memory. However, the official system requirement states 4 GB of memory as below. + +* 30 GB storage space +* 4 GB RAM +* Video card with OpenGL 3.3 or better +* 64-bit system + +Also, it is worth mentioning that other flavours such as GNOME, Cinnamon etc, should have much better performance metrics. + +### Things which grabbed my attention + +Garuda requires 30 GB of disk space, which I overlooked before installing. And it also seems a hard requirement, and the Calamares installer is configured that way. So, you have to have a minimum of 30 GB of root partition to install this version of Garuda Linux. + +Moreover, it takes around 6 GB of disk space for a default install, and I am not sure why the 30 GB limit is too hardcoded in the installer. + +![Garuda Linux requires min 30 GB disk space for installation][12] + +While Garuda Linux looks wonderful, I feel the default theming and colour contrast are a little “too much”. It feels excellent with high contrast colours on a dark backdrop at first look. But it does look a little “fanboy” type. Although look and feel are subjective, everyone has a different taste. + +But always, you can change the themes, icons and whatnot with just a click in KDE Plasma. + +### Closing Notes + +Finally, to wrap up the Garuda Linux review of 2022, I must say it is one of the Arch-based distros which stands out from the other distros in the same category. Due to its popularity and active participation from the user base, it shall not be discontinued in the future. + +From a general user’s perspective, community help is available via several active channels (which can be accessed via shortcuts from the welcome screen). + +If you are keen on gaming, zen Kernel and passionate about Arch Linux, you can choose Garuda. The use case of this distro may vary. I would not recommend it for serious development, projects, media related work. + +Then again, Garuda undoubtedly brings unique apps to manage Arch Linux, which is also a plus point. If you need a fancy looking Arch-based distro to start your Linux journey, it’s perfect. + +That said, you can download Garuda Linux from the [official website][13]. + +And do let me know your opinion about Garuda in the comment box down below. + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/05/garuda-linux-review-2022/ + +作者:[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/tag/linux-distro-review +[2]: https://www.debugpoint.com/wp-content/uploads/2022/05/Garuda-Linux-Desktop-2022.jpg +[3]: https://www.debugpoint.com/wp-content/uploads/2022/05/Garuda-Linux-boot-screen.jpg +[4]: https://www.debugpoint.com/wp-content/uploads/2022/05/The-Login-screen-SDDM-of-Garuda-Linux.jpg +[5]: https://www.debugpoint.com/wp-content/uploads/2022/05/Garuda-Linux-Desktop-with-Latte-dock.jpg +[6]: https://www.debugpoint.com/wp-content/uploads/2022/05/Garuda-Welcome-App.jpg +[7]: https://www.debugpoint.com/wp-content/uploads/2022/05/The-Snapper-Tools-for-system-restore-points.jpg +[8]: https://www.debugpoint.com/wp-content/uploads/2022/05/Octopi-Software-Manager.jpg +[9]: https://github.com/dr460nf1r3/firedragon-browser +[10]: https://www.debugpoint.com/wp-content/uploads/2022/05/FireDragon-Web-browser.jpg +[11]: https://www.debugpoint.com/wp-content/uploads/2022/05/Garuda-Linux-Performance-Idle-State.jpg +[12]: https://www.debugpoint.com/wp-content/uploads/2022/05/Garuda-Linux-requires-min-30-GB-disk-space-for-installation.jpg +[13]: https://garudalinux.org/downloads.html From 4813eddd991840cde7bdd3006f7e4d6f7cc62700 Mon Sep 17 00:00:00 2001 From: lkxed Date: Thu, 26 May 2022 19:40:51 +0800 Subject: [PATCH 011/104] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?news]:=2020220526=20DeepMind-s=20Open=20Source=20MuJoCo=20Is=20?= =?UTF-8?q?Available=20On=20GitHub.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...en Source MuJoCo Is Available On GitHub.md | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 sources/news/20220526 DeepMind-s Open Source MuJoCo Is Available On GitHub.md diff --git a/sources/news/20220526 DeepMind-s Open Source MuJoCo Is Available On GitHub.md b/sources/news/20220526 DeepMind-s Open Source MuJoCo Is Available On GitHub.md new file mode 100644 index 0000000000..a16726459e --- /dev/null +++ b/sources/news/20220526 DeepMind-s Open Source MuJoCo Is Available On GitHub.md @@ -0,0 +1,45 @@ +[#]: subject: "DeepMind’s Open Source MuJoCo Is Available On GitHub" +[#]: via: "https://www.opensourceforu.com/2022/05/deepminds-open-source-mujoco-is-available-on-github/" +[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +DeepMind’s Open Source MuJoCo Is Available On GitHub +====== +![deepmind1][1] + +DeepMind, an Alphabet subsidiary and AI research lab, acquired the MuJoCo physics engine for robotics research and development in October 2021. The simulator was to be open-sourced and maintained as a free, open source, community-driven project. DeepMind claims that the open sourcing is now complete, with the entire codebase [available on GitHub][2]. + +MuJoCo, which stands for Multi-Joint Dynamics with Contact, is a physics engine designed to aid research and development in robotics, biomechanics, graphics and animation, and other fields that require fast and accurate simulation. MuJoCo can be used to implement model-based computations for machine learning applications such as control synthesis, state estimation, system identification, mechanism design, data analysis through inverse dynamics, and parallel sampling. It can also be used as a standard simulator, such as for gaming and interactive virtual environments. + +According to DeepMind, the following are some of the features that make MuJoCo appealing for collaboration: + +* Comprehensive simulator capable of simulating complex mechanisms +* Readable, performant, portable code +* Codebase that is easily extensible +* Extensive documentation, including both user-facing and code comments – We hope that colleagues from academia and the OSS community will use this platform and contribute to the codebase, thereby improving research for all. + +DeepMind has more to say: + +“As a C library with no dynamic memory allocation, MuJoCo is very fast. Unfortunately, raw physics speed has historically been hindered by Python wrappers, which made batched, multi-threaded operations non-performant due to the presence of the Global Interpreter Lock (GIL) and non-compiled code. In our roadmap below, we address this issue going forward. + +“For now, we’d like to share some benchmarking results for two common models. The results were obtained on a standard AMD Ryzen 9 5950X machine, running Windows 10.” + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/05/deepminds-open-source-mujoco-is-available-on-github/ + +作者:[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/05/deepmind1.jpg +[2]: https://github.com/deepmind/mujoco From 102fa4a80b3a71db5a3fc77faec70084d9e58305 Mon Sep 17 00:00:00 2001 From: Peter Pan Date: Fri, 27 May 2022 02:42:22 +0800 Subject: [PATCH 012/104] =?UTF-8?q?[=E7=BF=BB=E8=AF=91=E5=AE=8C=E6=88=90]L?= =?UTF-8?q?inux=20Kernel=205.18=20Released=20with=20Graphics=20Driver=20Ch?= =?UTF-8?q?anges=20and=20New=20Hardware=20Support?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 翻译完成 --- ...Driver Changes and New Hardware Support.md | 130 ------------------ ...Driver Changes and New Hardware Support.md | 130 ++++++++++++++++++ 2 files changed, 130 insertions(+), 130 deletions(-) delete mode 100644 sources/news/20220523 Linux Kernel 5.18 Released with Graphics Driver Changes and New Hardware Support.md create mode 100644 translated/news/20220523 Linux Kernel 5.18 Released with Graphics Driver Changes and New Hardware Support.md diff --git a/sources/news/20220523 Linux Kernel 5.18 Released with Graphics Driver Changes and New Hardware Support.md b/sources/news/20220523 Linux Kernel 5.18 Released with Graphics Driver Changes and New Hardware Support.md deleted file mode 100644 index 382accea8e..0000000000 --- a/sources/news/20220523 Linux Kernel 5.18 Released with Graphics Driver Changes and New Hardware Support.md +++ /dev/null @@ -1,130 +0,0 @@ -[#]: subject: "Linux Kernel 5.18 Released with Graphics Driver Changes and New Hardware Support" -[#]: via: "https://news.itsfoss.com/linux-kernel-5-18-release/" -[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" -[#]: collector: "lkxed" -[#]: translator: "PeterPan0106" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Linux Kernel 5.18 Released with Graphics Driver Changes and New Hardware Support -====== -The latest Linux Kernel 5.18 is now available as per the expected schedule without any delays. The release includes support for new hardware, and some core changes. - -![Linux kernel 5.18 release][1] - -[Linux Kernel 5.17][2] came loaded with support for next-gen hardware, including improvements for the Steam Deck. - -Not to forget, every Linux Kernel release is technically exciting, and Linux Kernel 5.18 is no exception. - -### Linux Kernel 5.18: What’s New? - -This time around, we get to see improved support for Razer hardware, Apple Magic keyboard, AMD graphics, and numerous networking, core, and security changes. - -#### A New Razer Driver - -When it comes to gaming gears, the hardware support in Linux needs serious upgrades. - -Yes, there are useful workarounds with open-source drivers. But, that’s not always the solution for every user. - -As spotted by [Phoronix][3], a new Razer HID driver comes with Linux Kernel 5.18, which focuses on Razer BlackWidow keyboards fixing the macro key handling. - -#### AMDGPU FreeSync Video Mode Enabled by Default - -![][4] - -While the support for FreeSync video was good enough, it was a temporary solution to improve the user experience with FreeSync monitors. - -Now, with Linux Kernel 5.18, the FreeSync video mode is enabled by default ([changelog][5]). You do not have to do anything from your side to enable it with supported monitors. - -#### Graphics Driver Updates - -In addition to the improvements to the AMDGPU driver, you also get updates preparing for future hardware. - -There have been changes to support higher DisplayPort rates as well. - -#### Switch from C89 to C11 (GNU11) - -![][6] - -The C programming used for the Linux Kernel was limited to the old C89 standard, which lacked certain features for the current requirements. - -So, C11 was decided to replace it considering the current compiler version requirement i.e. GCC 5.1 sounds perfectly fine with it. - -#### Networking Tweaks - -Linux Kernel 5.18 adds support for new wireless hardware, including MediaTek MT7916, MT7921U, and Broadcom BCM43454/6. - -![][7] - -When it comes to mobile solutions, support for Intel M.2 WWAN card has also been added. - -The Realtek W89 driver now supports AP mode, 6 GHz band, and adds a hardware scan feature. - -Several other improvements have been made to configure IPv6, and handle various protocols, including performance optimizations. - -#### USB Improvements - -Xen USB driver is being hardened against malicious hosts, and the USB DWC3 driver received improvements to support more hardware types. - -You can find various other refinements in the [commit log][8]. - -#### Enhanced Apple Keyboard and Tablet Support - -![][9] - -Advancements were made to improve the experience with Apple Magic Keyboards, including the first-generation models. - -Some of the fixes included correcting function-key mapping, keyboard backlight events, and the ability to report the battery level for the 2021 Magic Keyboard model when connected via USB. - -Linux Kernel 5.18 improves input handling and makes things reliable when it comes to tablets. - -You can find changes for new hardware, touchscreens, and other stuff in the related [commit][10]. - -#### New ARM Chip Support (Tesla FSD, Raspberry Pi Zero 2 W) - -![][11] - -Tesla’s full self-driving SoC is now supported with Linux Kernel 5.18. Samsung engineers made it possible to upstream into the Linux Kernel. - -Other interesting chip additions include Qualcomm Snapdragon 625/632, and Samsung Exynos 850/7885. - -You also find the support for Raspberry Pi Zero 2 W with Linux Kernel 5.18. In addition to the new entrants, old hardware/boards were removed as well. You can explore the [commit l][12]og to know more. - -You can refer to the [official changelog][13] and Linus Torvald’s announcement to explore more details. - -### How to Install Linux Kernel 5.18? - -You should find the newer kernel listed on [Linux Kernel Archives][14]. So, you can download the [tarball][15] to test it out. Or, you can follow our [Linux Kernel upgrade guide][16] for help. - -If you want to avoid compiling it yourself, you should wait for a few weeks for Linux distributions to push it to the repositories. - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/linux-kernel-5-18-release/ - -作者:[Ankush Das][a] -选题:[lkxed][b] -译者:[PeterPan0106](https://github.com/PeterPan0106) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://news.itsfoss.com/author/ankush/ -[b]: https://github.com/lkxed -[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/kernel-5-18-release.png -[2]: https://news.itsfoss.com/linux-kernel-5-17-release/ -[3]: https://www.phoronix.com/scan.php?page=news_item&px=Linux-5.18-HID -[4]: https://news.itsfoss.com/wp-content/uploads/2022/05/amd-linux-5-18-1024x576.jpg -[5]: https://lists.freedesktop.org/archives/amd-gfx/2022-February/075262.html -[6]: https://news.itsfoss.com/wp-content/uploads/2022/05/c-linux-5-18-1024x576.jpg -[7]: https://news.itsfoss.com/wp-content/uploads/2022/05/networking-linux-5-18-1024x576.jpg -[8]: https://lore.kernel.org/lkml/Yj7vGtn8fILavjyL@kroah.com/ -[9]: https://news.itsfoss.com/wp-content/uploads/2022/05/apple-linux-5-18-1024x576.jpg -[10]: https://lore.kernel.org/lkml/nycvar.YFH.7.76.2203231015060.24795@cbobk.fhfr.pm/ -[11]: https://news.itsfoss.com/wp-content/uploads/2022/05/arm-linux-5-18-1024x576.jpg -[12]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=baaa68a9796ef2cadfe5caaf4c730412eda0f31c -[13]: https://lore.kernel.org/lkml/CAHk-=wjiqyoH6qntYvYTjR1F2L-pHtgX9esZMRS13iktCOJ1zA@mail.gmail.com/T/#u -[14]: https://www.kernel.org/ -[15]: https://git.kernel.org/torvalds/t/linux-5.16.tar.gz -[16]: https://itsfoss.com/upgrade-linux-kernel-ubuntu/ diff --git a/translated/news/20220523 Linux Kernel 5.18 Released with Graphics Driver Changes and New Hardware Support.md b/translated/news/20220523 Linux Kernel 5.18 Released with Graphics Driver Changes and New Hardware Support.md new file mode 100644 index 0000000000..4868921b59 --- /dev/null +++ b/translated/news/20220523 Linux Kernel 5.18 Released with Graphics Driver Changes and New Hardware Support.md @@ -0,0 +1,130 @@ +[#]: subject: "Linux Kernel 5.18 Released with Graphics Driver Changes and New Hardware Support" +[#]: via: "https://news.itsfoss.com/linux-kernel-5-18-release/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "PeterPan0106" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Linux 内核 5.18版本正式发布,新增显卡驱动以及硬件支持 +====== +Linux 最新的稳定版内核 5.18 版本现已如期发布,本次更细包括针对新硬件的支持以及许多其他的变化。 + +![Linux kernel 5.18 release][1] + +[Linux 5.17 内核][2] 发布时包含了对下一代硬件的支持,同时增强了 Steam Deck的游戏体验。 + +每一代内核都包含了令人兴奋的技术进步,Linux 内核 5.18也不例外。 + +### Linux 内核 5.18 有哪些变化呢? + +本次我们可以看到,内核针对雷蛇外设硬件、苹果外设硬件和AMD的图形增强了支持,包括一些网络、核心和安全方面的更新。 + +#### 新的雷蛇驱动 + +说到游戏装备,Linux的硬件支持亟待更新。 + +目前存在一些开源驱动程序的解决方案。但是这些方案不具有普适性,适配和支持较少。 + +正如 [Phoronix][3] 所发现的,一个新的雷蛇 HID驱动程序与 Linux 内核 5.18一同发布,它适配了雷蛇黑寡妇蜘蛛键盘,并修复了宏键此前存在的问题。 + +#### AMD 显卡特性 FreeSync 模式被默认开启 + +![][4] + +尽管能够支持FreeSync是很好的一件事情并可以改善用户体验,但前序版本的支持仅是临时性解决方案。 + +现在在 Linux 内核 5.18版本中 ([见更新日志][5]) ,用户无需调整任何设置即可使用 FreeSync,因为这一显示模式已被默认启用。 + +#### 显卡驱动更新 + +针对当前和未来的 AMD显卡驱动进行了改进。 + +更高刷新率的DisplayPort也在这一个版本中支持。 + +#### 从 C89标准升级到 C11标准 (GNU11) + +![][6] + +用于Linux内核的C语言被限制在旧的C89标准中,在当前已经稍显老旧并且缺失了许多十分必要的新特性。 + +考虑到目前的编译器版本要求,C11标准和GCC5.1可以满足兼容性要求。 + +#### 网络优化 + +Linux 内核 5.18 增加了对新硬件的支持,包括联发科 MT7916、MT7921U和博通 BCM43454/6。 + +![][7] + +针对移动端的改进包括对英特尔 M.2 WWAN 卡的支持。 + +Realtek W89 驱动现在支持AP模式、6GHz频段并增加了硬件扫描功能。 + +在配置IPv6和其他各种协议方面,通过一系列的改进提升了性能。 + +#### USB 改进 + +Xen USB驱动程序进行了改进,以抵御恶意主机,USB DWC3驱动程序也支持了更多的硬件类型。 + +其他改进详见 [更新日志][8]。 + +#### 增强对苹果键盘以及平板的支持 + +![][9] + +当前版本针对苹果包含第一代在内的键盘的使用体验进行了优化。 + +包括功能键的映射、键盘背光以及通过USB连接时报告电池水平的能力都得到了改进。 + +Linux 内核 5.18改进了输入处理,在平板电脑上输入将变得更为容易。 + +硬件相关的改进详见 [更新日志][10]。 + +#### ARM 架构芯片的支持 (特斯拉 FSD,树莓派 Zero 2 W) + +![][11] + +特斯拉的全套自动驾驶SoC现在支持Linux 内核 5.18。三星工程师使其可以向上移植到 Linux 内核。 + +其他芯片支持包括高通骁龙625/632,以及三星Exynos 850/7885。 + +你还会发现对采用 Linux 内核 5.18 的树莓派 Zero 2 W受到了支持。旧的硬件/主板的支持则被同步去除。详见 [更新日志][12]。 + +你可以参考 [官方更新日志][13] 和 Linus Torvald 的官方发布获取更多信息。 + +### 如何安装 Linux 内核 5.18? + +你可以在 [Linux Kernel Archives][14]的网站上找到最新版本的内核。你可以下载 [tarball][15] 以进行测试。你也可以参照 [Linux 内核升级指南][16] 获取帮助 + +如果想避免自己编译它,你可以稍等几周,等 Linux发行版把它推到仓库。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/linux-kernel-5-18-release/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[PeterPan0106](https://github.com/PeterPan0106) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/kernel-5-18-release.png +[2]: https://news.itsfoss.com/linux-kernel-5-17-release/ +[3]: https://www.phoronix.com/scan.php?page=news_item&px=Linux-5.18-HID +[4]: https://news.itsfoss.com/wp-content/uploads/2022/05/amd-linux-5-18-1024x576.jpg +[5]: https://lists.freedesktop.org/archives/amd-gfx/2022-February/075262.html +[6]: https://news.itsfoss.com/wp-content/uploads/2022/05/c-linux-5-18-1024x576.jpg +[7]: https://news.itsfoss.com/wp-content/uploads/2022/05/networking-linux-5-18-1024x576.jpg +[8]: https://lore.kernel.org/lkml/Yj7vGtn8fILavjyL@kroah.com/ +[9]: https://news.itsfoss.com/wp-content/uploads/2022/05/apple-linux-5-18-1024x576.jpg +[10]: https://lore.kernel.org/lkml/nycvar.YFH.7.76.2203231015060.24795@cbobk.fhfr.pm/ +[11]: https://news.itsfoss.com/wp-content/uploads/2022/05/arm-linux-5-18-1024x576.jpg +[12]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=baaa68a9796ef2cadfe5caaf4c730412eda0f31c +[13]: https://lore.kernel.org/lkml/CAHk-=wjiqyoH6qntYvYTjR1F2L-pHtgX9esZMRS13iktCOJ1zA@mail.gmail.com/T/#u +[14]: https://www.kernel.org/ +[15]: https://git.kernel.org/torvalds/t/linux-5.16.tar.gz +[16]: https://itsfoss.com/upgrade-linux-kernel-ubuntu/ From e2686d1b35e939ff388021fc88dae2505e30bd69 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 27 May 2022 08:52:58 +0800 Subject: [PATCH 013/104] translating --- ...Linux App to Verify ISO and Other Files.md | 130 ------------------ ...Linux App to Verify ISO and Other Files.md | 130 ++++++++++++++++++ 2 files changed, 130 insertions(+), 130 deletions(-) delete mode 100644 sources/tech/20220524 Collision- Linux App to Verify ISO and Other Files.md create mode 100644 translated/tech/20220524 Collision- Linux App to Verify ISO and Other Files.md diff --git a/sources/tech/20220524 Collision- Linux App to Verify ISO and Other Files.md b/sources/tech/20220524 Collision- Linux App to Verify ISO and Other Files.md deleted file mode 100644 index 66d7309862..0000000000 --- a/sources/tech/20220524 Collision- Linux App to Verify ISO and Other Files.md +++ /dev/null @@ -1,130 +0,0 @@ -[#]: subject: "Collision: Linux App to Verify ISO and Other Files" -[#]: via: "https://www.debugpoint.com/2022/05/collision/" -[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" -[#]: collector: "lkxed" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Collision: Linux App to Verify ISO and Other Files -====== -The tutorial outlines the features and usage guide of Collision. It is a GUI-based, easy-to-use utility that lets you verify files using cryptographic hash functions. - -### Why do you need to verify files? - -Everyone downloads files every day over the internet. But many users never bother to verify their integrity or authenticity. That means whether the file is legitimate and not tampered with by any malicious codes. - -Take an example of any [Linux Distributions][1]‘ ISO files which come as standard installer images. All popular distribution makers also provide a hash file alongside the ISO file. Using that file, you can easily compare the hash value of your downloaded file. And you can rest assured that your file is correct and not corrupted by any means. - -Moreover, if you download a large file over an unstable internet connection, the file may get corrupted. IN those scenarios also, it helps to verify. - -### Collision – Features and How to Use - -The app – [Collision][2] uses Cryptographic Hash Functions to help you verify files. The cryptographic hash functions are popular algorithms that generate the file data into a fixed-length data stream via several encryption algorithms. The most popular ones are MD5, SHA-1, SHA-256 and SHA-512. All of these are supported by the Collision app. - -In addition to that, Collision also presents a neat user interface which is simple and easy to use for every Linux user. Here’s how it looks. - -![Collision – First Screen][3] - -Firstly, it has two primary features. a) upload a file to get the checksum or hash values and b) compare the checksum with the uploaded file. - -For example, if you have a simple file, you can upload it via the “Open a File” button or “Open” for re-uploading another file. - -As you can see in the below image, the text file has the below checksum for various hash functions. Now you can share the file over the internet/with anyone, along with the checksum values for verification. - -![Hash values of a test file][4] - -Moreover, if someone tampers with the file (even with a single byte) or the file gets corrupted during distribution, then the hash value changes entirely. - -Secondly, if you want to verify the integrity of a file you have downloaded, go to the Verify tab. Then upload the file and enter the hash value of the uploaded file you received. - -If it matches, you should see a green tick showing its authenticity. - -![Collision verifies a sample file with SHA-256][5] - -In addition, here is another example where I have modified the test file and kept the values as same. This use case clearly states that it’s not valid for this file. - -![Collision showing that a file is not valid][6] - -#### An important note - -It is worth mentioning here that the hash methods don’t verify the file meta attributes such as modify time, modify date, etc. If someone tampers any file and reverts it to its original content, the hash methods would term it a valid file. - -Now, let’s see a typical example of validating an ISO file. - -### Example of Using Collision to verify a sample ISO file of Ubuntu Linux - -I am sure you download many ISO files while using Linux in general. So to illustrate, I have downloaded the popular Ubuntu ISO server image from the official Ubuntu download page. - -![Ubuntu server ISO file and checksums][7] - -The SHA256SUMS file has the below checksum value for the installer, as shown above. - -![SHA-256 value of Ubuntu server ISO image][8] - -After you download, open the Collision application and upload the ISO file via the Verify tab. Then copy the SHA-256 value and paste it to the checksum box on the left. - -You should see that the file is authentic if you have correctly downloaded and followed the steps. - -![Ubuntu server ISO image verified][9] - -### How to Install Collision - -The Collision app installation is effortless using Flatpak. You need to [set up Flatpak][10] for your Linux Distributions and click on the below link to install Collision. - -[Install Collision via Flathub][11] - -After installation, you should find it via the application menu of your distro. - -### Is there another way to verify files without any app? - -Yes, there are some built-in utilities available in all Linux distributions, which you can also use to verify the files and their integrity using the terminal. - -The following terminal utilities can be used to determine the hash of any file. They are installed by default in all distros, and you can even use them for your shell script to automate. - -``` -md5sum -``` - -``` -sha1sum -``` - -``` -sha256sum -``` - -Using the above utilities, you can find out the hash value. But you need to compare them to verify manually. - -![Verify files via command-line utilities][12] - -### Closing Notes - -I hope this guide helps you verify your files using the Collision GTK app. It is straightforward to use. Moreover, you can use the command line methods to verify any files you want when you are in the terminal. Also, it’s a best practice to always check for file integrity wherever possible. - --------------------------------------------------------------------------------- - -via: https://www.debugpoint.com/2022/05/collision/ - -作者:[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/category/distributions -[2]: https://collision.geopjr.dev/ -[3]: https://www.debugpoint.com/wp-content/uploads/2022/05/Collision-First-Screen.jpg -[4]: https://www.debugpoint.com/wp-content/uploads/2022/05/Hash-values-of-a-test-file.jpg -[5]: https://www.debugpoint.com/wp-content/uploads/2022/05/Collision-verifies-a-sample-file-with-SHA-256.jpg -[6]: https://www.debugpoint.com/wp-content/uploads/2022/05/Collision-showing-that-a-file-is-not-valid.jpg -[7]: https://www.debugpoint.com/wp-content/uploads/2022/05/Ubuntu-server-ISO-file-and-checksums.jpg -[8]: https://www.debugpoint.com/wp-content/uploads/2022/05/SHA-256-valud-of-Ubuntu-server-ISO-image.jpg -[9]: https://www.debugpoint.com/wp-content/uploads/2022/05/Ubuntu-server-ISO-image-verified.jpg -[10]: https://flatpak.org/setup/ -[11]: https://dl.flathub.org/repo/appstream/dev.geopjr.Collision.flatpakref -[12]: https://www.debugpoint.com/wp-content/uploads/2022/05/Verify-files-via-command-line-utilities.jpg diff --git a/translated/tech/20220524 Collision- Linux App to Verify ISO and Other Files.md b/translated/tech/20220524 Collision- Linux App to Verify ISO and Other Files.md new file mode 100644 index 0000000000..7d59ad4431 --- /dev/null +++ b/translated/tech/20220524 Collision- Linux App to Verify ISO and Other Files.md @@ -0,0 +1,130 @@ +[#]: subject: "Collision: Linux App to Verify ISO and Other Files" +[#]: via: "https://www.debugpoint.com/2022/05/collision/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Collision:用于验证 ISO 和其他文件的 Linux 应用 +====== +本教程概述了 Collision 的功能和使用指南。它是一个基于 GUI 且易于使用的程序,可让你使用加密哈希函数验证文件。 + +### 为什么需要验证文件? + +每个人每天都通过 Internet 下载文件。但许多用户从不费心去验证他们的完整性或真实性。这意味着该文件是否合法且未被任何恶意代码篡改。 + +以作为标准安装镜像的 [Linux 发行版][1]的 ISO 文件为例。所有流行的发行版制造商还提供哈希文件和 ISO 文件。使用该文件,你可以轻松比较下载文件的哈希值。你可以放心,你的文件是正确的并且没有以任何方式损坏。 + +此外,如果你通过不稳定的互联网连接下载大文件,该文件可能会损坏。在这些情况下,它也有助于验证。 + +### Collision – 功能和使用方法 + +[Collision][2] 使用加密哈希函数来帮助你验证文件。加密哈希函数是一种流行的算法,它通过多种加密算法将文件数据生成为固定长度的数据流。最受欢迎的是 MD5、SHA-1、SHA-256 和 SHA-512。所有这些 Collision 都支持。 + +除此之外,Collision 还提供了一个简洁的用户界面,它对每个 Linux 用户都简单易用。这是它的外观。 + +![Collision – First Screen][3] + +首先,它有两个主要特点。 a) 上传文件以获取校验和和或哈希值 b) 将校验和与上传的文件进行比较。 + +例如,如果你有一个简单的文件,你可以通过“打开文件”按钮或“打开”按钮重新上传另一个文件。 + +如下图所示,文本文件具有以下各种哈希函数的校验和。现在你可以通过互联网/与任何人共享该文件,以及用于验证的校验和值。 + +![Hash values of a test file][4] + +此外,如果有人篡改文件(即使是单个字节)或文件在分发过程中被破坏,那么哈希值就会完全改变。 + +其次,如果要验证已下载文件的完整性,请点击“验证”选项卡。然后上传文件,输入你收到的上传文件的哈希值。 + +如果匹配,你应该会看到一个绿色勾号,显示其真实性。 + +![Collision verifies a sample file with SHA-256][5] + +此外,这是另一个示例,我修改了测试文件并保持值相同。这个场景清楚地表明它对该文件无效。 + +![Collision showing that a file is not valid][6] + +#### 重要说明 + +这里值得一提的是,哈希方法不会验证文件元属性,如修改时间、修改日期等。如果有人篡改了文件并将其还原为原始内容,哈希方法将其称为有效文件。 + +现在,让我们看一个验证 ISO 文件的典型示例。 + +### 使用 Collision 验证 Ubuntu Linux 的示例 ISO 文件 + +我相信你在使用 Linux 时通常会下载许多 ISO 文件。为了说明,我从官方 Ubuntu 下载页面下载了流行的 Ubuntu ISO 服务器镜像。 + +![Ubuntu server ISO file and checksums][7] + +SHA256SUMS 文件具有以下安装程序的校验和值,如上所示。 + +![SHA-256 value of Ubuntu server ISO image][8] + +下载后,打开 Collision 应用并通过验证选项卡上传 ISO 文件。然后复制 SHA-256 值并将其粘贴到左侧的校验和框中。 + +如果你已正确下载并按照步骤操作,你应该会看到该文件是真实的。 + +![Ubuntu server ISO image verified][9] + +### 如何安装 Collision + +使用 Flatpak 可以轻松安装 Collision 应用。你需要为你的 Linux 发行版[设置 Flatpak][10],并单击以下链接以安装 Collision。 + +[通过 Flathub 安装 Collision][11] + +安装后,你应该通过发行版的应用菜单找到它。 + +### 有没有其他方法可以在没有任何应用的情况下验证文件? + +是的,所有 Linux 发行版中都有一些内置程序,你还可以使用它们来使用终端验证文件及其完整性。 + +下面的终端程序可用于确定任何文件的哈希值。它们默认安装在所有发行版中,你甚至可以将它们用于你的 shell 脚本以实现自动化。 + +``` +md5sum <文件名> +``` + +``` +sha1sum <文件名> +``` + +``` +sha256sum <文件名> +``` + +使用上述程序,你可以找出哈希值。但是你需要比较它们以手动验证。 + +![Verify files via command-line utilities][12] + +### 结束语 + +我希望本指南可以帮助你使用 Collision GTK 应用验证你的文件。它使用起来很简单。此外,你可以在终端中使用命令行方法来验证您想要的任何文件。另外,最好的做法是尽可能始终检查文件完整性。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/05/collision/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者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/category/distributions +[2]: https://collision.geopjr.dev/ +[3]: https://www.debugpoint.com/wp-content/uploads/2022/05/Collision-First-Screen.jpg +[4]: https://www.debugpoint.com/wp-content/uploads/2022/05/Hash-values-of-a-test-file.jpg +[5]: https://www.debugpoint.com/wp-content/uploads/2022/05/Collision-verifies-a-sample-file-with-SHA-256.jpg +[6]: https://www.debugpoint.com/wp-content/uploads/2022/05/Collision-showing-that-a-file-is-not-valid.jpg +[7]: https://www.debugpoint.com/wp-content/uploads/2022/05/Ubuntu-server-ISO-file-and-checksums.jpg +[8]: https://www.debugpoint.com/wp-content/uploads/2022/05/SHA-256-valud-of-Ubuntu-server-ISO-image.jpg +[9]: https://www.debugpoint.com/wp-content/uploads/2022/05/Ubuntu-server-ISO-image-verified.jpg +[10]: https://flatpak.org/setup/ +[11]: https://dl.flathub.org/repo/appstream/dev.geopjr.Collision.flatpakref +[12]: https://www.debugpoint.com/wp-content/uploads/2022/05/Verify-files-via-command-line-utilities.jpg From 7b691b5b86992923eb630a5e1d6df5357f08792b Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 27 May 2022 08:56:12 +0800 Subject: [PATCH 014/104] translating --- .../20220525 Machine Learning- Classification Using Python.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20220525 Machine Learning- Classification Using Python.md b/sources/tech/20220525 Machine Learning- Classification Using Python.md index a970b9b08d..1d1606d788 100644 --- a/sources/tech/20220525 Machine Learning- Classification Using Python.md +++ b/sources/tech/20220525 Machine Learning- Classification Using Python.md @@ -2,7 +2,7 @@ [#]: via: "https://www.opensourceforu.com/2022/05/machine-learning-classification-using-python/" [#]: author: "Gayatri Venugopal https://www.opensourceforu.com/author/gayatri-venugopal/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 4f4ade83532d047520b5d9ba14adcf6f5a2106b2 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 27 May 2022 10:23:15 +0800 Subject: [PATCH 015/104] RP @PeterPan0106 https://linux.cn/article-14640-1.html --- ...Driver Changes and New Hardware Support.md | 135 ++++++++++++++++++ ...Driver Changes and New Hardware Support.md | 130 ----------------- 2 files changed, 135 insertions(+), 130 deletions(-) create mode 100644 published/20220523 Linux Kernel 5.18 Released with Graphics Driver Changes and New Hardware Support.md delete mode 100644 translated/news/20220523 Linux Kernel 5.18 Released with Graphics Driver Changes and New Hardware Support.md diff --git a/published/20220523 Linux Kernel 5.18 Released with Graphics Driver Changes and New Hardware Support.md b/published/20220523 Linux Kernel 5.18 Released with Graphics Driver Changes and New Hardware Support.md new file mode 100644 index 0000000000..1cc8ffd93f --- /dev/null +++ b/published/20220523 Linux Kernel 5.18 Released with Graphics Driver Changes and New Hardware Support.md @@ -0,0 +1,135 @@ +[#]: subject: "Linux Kernel 5.18 Released with Graphics Driver Changes and New Hardware Support" +[#]: via: "https://news.itsfoss.com/linux-kernel-5-18-release/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "PeterPan0106" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14640-1.html" + +Linux 内核 5.18 版本正式发布,新增显卡驱动以及硬件支持 +====== + +> 最新的 Linux 内核 5.18 版本现已如期发布,本次更新包括针对新硬件的支持以及许多其他核心变化。 + +![Linux kernel 5.18 release][1] + +[Linux 5.17 内核][2] 发布时包含了对下一代硬件的支持,同时增强了 Steam Deck 的游戏体验。 + +每一代内核都包含了令人兴奋的技术进步,Linux 内核 5.18 也不例外。 + +### Linux 内核 5.18 有哪些变化呢? + +本次我们可以看到,内核针对雷蛇外设硬件、苹果妙控键盘和 AMD 显卡增强了支持,还有一些网络、核心和安全方面的更新。 + +#### 新的雷蛇驱动 + +说到游戏装备,Linux 的硬件支持亟待更新。 + +目前存在一些开源驱动程序的变通解决方案。但是这些方案不具有普适性,适配和支持较少。 + +正如 [Phoronix][3] 所发现的,Linux 内核 5.18 中一同发布了一个新的雷蛇 HID 驱动程序,它适配了雷蛇黑寡妇蜘蛛键盘,并修复了宏键此前存在的问题。 + +此外,这个驱动程序应该也有助于解决其他雷蛇硬件的问题。 + +#### AMD 显卡特性 FreeSync 模式被默认开启 + +![][4] + +虽然对 FreeSync 视频的支持足够好,但这只是改善 FreeSync 显示器用户体验的一个临时解决方案。 + +现在在 Linux 内核 5.18 版本中这一显示模式已被默认启用,用户无需调整任何设置即可使用 FreeSync([见更新日志][5])。 + +#### 显卡驱动更新 + +针对当前和未来的 AMD 显卡的驱动进行了改进。此外,支持英特尔 Arch 图形处理器和英特尔 Alder Lake N 的工作也取得了一些进展。 + +更高刷新率的 DisplayPort 也在这一个版本中得到支持。 + +#### 从 C89 标准升级到 C11 标准(GNU11) + +![][6] + +在 Linux 内核中使用的是 C89 C 语言标准,在当前已经稍显老旧并且缺失了许多十分必要的新特性。 + +考虑到目前的编译器版本 GCC 5.1 的要求,从 Linux 内核 5.18 开始决定用 C11 标准来取代它。 + +#### 网络优化 + +Linux 内核 5.18 增加了对新的无线硬件的支持,这包括联发科 MT7916、MT7921U 和博通 BCM43454/6。 + +![][7] + +针对移动设备的改进也包括对英特尔 M.2 WWAN 卡的支持。 + +Realtek W89 驱动现在支持 AP 模式、6GHz 频段并增加了硬件扫描功能。 + +在配置 IPv6 和其他各种协议方面,通过一系列的改进提升了性能。 + +你可以在 Linux 内核 5.18 中网络方面的变更提交中了解所有情况(包括对驱动 API、协议和一些核心功能的改进)。 + +#### USB 改进 + +Xen USB 驱动程序进行了改进,以抵御恶意主设备,USB DWC3 驱动程序也支持了更多的硬件类型。 + +其他改进详见 [更新日志][8]。 + +#### 增强对苹果键盘以及平板的支持 + +![][9] + +当前版本针对苹果妙控键盘(包含第一代型号)的使用体验进行了优化。 + +改进了功能键映射、键盘背光事件,以及 2021 款的妙控键盘通过 USB 连接时报告电池水平的能力。 + +Linux 内核 5.18 改进了输入处理,在平板电脑上输入将变得更为容易。 + +硬件相关的改进详见 [更新日志][10]。 + +#### ARM 架构芯片的支持(特斯拉 FSD,树莓派 Zero 2 W) + +![][11] + +Linux 内核 5.18 现在支持特斯拉的全套自动驾驶 SoC。三星工程师将其贡献到了 Linux 内核上游。 + +其他芯片支持包括高通骁龙 625/632,以及三星 Exynos 850/7885。 + +你还会发现 Linux 内核 5.18 支持了树莓派 Zero 2 W,而同时去除了旧的硬件/主板的支持。详见 [更新日志][12]。 + +你可以参考 [官方更新日志][13] 和 Linus Torvald 的官方公告获取更多信息。 + +### 如何安装 Linux 内核 5.18? + +你可以在 [Linux Kernel Archives][14] 网站上找到最新版本的内核。你可以下载 [Tarball][15] 以进行测试。你也可以参照我们的 [Linux 内核升级指南][16] 获取帮助。 + +如果不想自己编译它,你可以稍等几周,等 Linux 发行版们把它推到仓库。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/linux-kernel-5-18-release/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[PeterPan0106](https://github.com/PeterPan0106) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/kernel-5-18-release.png +[2]: https://news.itsfoss.com/linux-kernel-5-17-release/ +[3]: https://www.phoronix.com/scan.php?page=news_item&px=Linux-5.18-HID +[4]: https://news.itsfoss.com/wp-content/uploads/2022/05/amd-linux-5-18-1024x576.jpg +[5]: https://lists.freedesktop.org/archives/amd-gfx/2022-February/075262.html +[6]: https://news.itsfoss.com/wp-content/uploads/2022/05/c-linux-5-18-1024x576.jpg +[7]: https://news.itsfoss.com/wp-content/uploads/2022/05/networking-linux-5-18-1024x576.jpg +[8]: https://lore.kernel.org/lkml/Yj7vGtn8fILavjyL@kroah.com/ +[9]: https://news.itsfoss.com/wp-content/uploads/2022/05/apple-linux-5-18-1024x576.jpg +[10]: https://lore.kernel.org/lkml/nycvar.YFH.7.76.2203231015060.24795@cbobk.fhfr.pm/ +[11]: https://news.itsfoss.com/wp-content/uploads/2022/05/arm-linux-5-18-1024x576.jpg +[12]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=baaa68a9796ef2cadfe5caaf4c730412eda0f31c +[13]: https://lore.kernel.org/lkml/CAHk-=wjiqyoH6qntYvYTjR1F2L-pHtgX9esZMRS13iktCOJ1zA@mail.gmail.com/T/#u +[14]: https://www.kernel.org/ +[15]: https://git.kernel.org/torvalds/t/linux-5.16.tar.gz +[16]: https://itsfoss.com/upgrade-linux-kernel-ubuntu/ diff --git a/translated/news/20220523 Linux Kernel 5.18 Released with Graphics Driver Changes and New Hardware Support.md b/translated/news/20220523 Linux Kernel 5.18 Released with Graphics Driver Changes and New Hardware Support.md deleted file mode 100644 index 4868921b59..0000000000 --- a/translated/news/20220523 Linux Kernel 5.18 Released with Graphics Driver Changes and New Hardware Support.md +++ /dev/null @@ -1,130 +0,0 @@ -[#]: subject: "Linux Kernel 5.18 Released with Graphics Driver Changes and New Hardware Support" -[#]: via: "https://news.itsfoss.com/linux-kernel-5-18-release/" -[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" -[#]: collector: "lkxed" -[#]: translator: "PeterPan0106" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Linux 内核 5.18版本正式发布,新增显卡驱动以及硬件支持 -====== -Linux 最新的稳定版内核 5.18 版本现已如期发布,本次更细包括针对新硬件的支持以及许多其他的变化。 - -![Linux kernel 5.18 release][1] - -[Linux 5.17 内核][2] 发布时包含了对下一代硬件的支持,同时增强了 Steam Deck的游戏体验。 - -每一代内核都包含了令人兴奋的技术进步,Linux 内核 5.18也不例外。 - -### Linux 内核 5.18 有哪些变化呢? - -本次我们可以看到,内核针对雷蛇外设硬件、苹果外设硬件和AMD的图形增强了支持,包括一些网络、核心和安全方面的更新。 - -#### 新的雷蛇驱动 - -说到游戏装备,Linux的硬件支持亟待更新。 - -目前存在一些开源驱动程序的解决方案。但是这些方案不具有普适性,适配和支持较少。 - -正如 [Phoronix][3] 所发现的,一个新的雷蛇 HID驱动程序与 Linux 内核 5.18一同发布,它适配了雷蛇黑寡妇蜘蛛键盘,并修复了宏键此前存在的问题。 - -#### AMD 显卡特性 FreeSync 模式被默认开启 - -![][4] - -尽管能够支持FreeSync是很好的一件事情并可以改善用户体验,但前序版本的支持仅是临时性解决方案。 - -现在在 Linux 内核 5.18版本中 ([见更新日志][5]) ,用户无需调整任何设置即可使用 FreeSync,因为这一显示模式已被默认启用。 - -#### 显卡驱动更新 - -针对当前和未来的 AMD显卡驱动进行了改进。 - -更高刷新率的DisplayPort也在这一个版本中支持。 - -#### 从 C89标准升级到 C11标准 (GNU11) - -![][6] - -用于Linux内核的C语言被限制在旧的C89标准中,在当前已经稍显老旧并且缺失了许多十分必要的新特性。 - -考虑到目前的编译器版本要求,C11标准和GCC5.1可以满足兼容性要求。 - -#### 网络优化 - -Linux 内核 5.18 增加了对新硬件的支持,包括联发科 MT7916、MT7921U和博通 BCM43454/6。 - -![][7] - -针对移动端的改进包括对英特尔 M.2 WWAN 卡的支持。 - -Realtek W89 驱动现在支持AP模式、6GHz频段并增加了硬件扫描功能。 - -在配置IPv6和其他各种协议方面,通过一系列的改进提升了性能。 - -#### USB 改进 - -Xen USB驱动程序进行了改进,以抵御恶意主机,USB DWC3驱动程序也支持了更多的硬件类型。 - -其他改进详见 [更新日志][8]。 - -#### 增强对苹果键盘以及平板的支持 - -![][9] - -当前版本针对苹果包含第一代在内的键盘的使用体验进行了优化。 - -包括功能键的映射、键盘背光以及通过USB连接时报告电池水平的能力都得到了改进。 - -Linux 内核 5.18改进了输入处理,在平板电脑上输入将变得更为容易。 - -硬件相关的改进详见 [更新日志][10]。 - -#### ARM 架构芯片的支持 (特斯拉 FSD,树莓派 Zero 2 W) - -![][11] - -特斯拉的全套自动驾驶SoC现在支持Linux 内核 5.18。三星工程师使其可以向上移植到 Linux 内核。 - -其他芯片支持包括高通骁龙625/632,以及三星Exynos 850/7885。 - -你还会发现对采用 Linux 内核 5.18 的树莓派 Zero 2 W受到了支持。旧的硬件/主板的支持则被同步去除。详见 [更新日志][12]。 - -你可以参考 [官方更新日志][13] 和 Linus Torvald 的官方发布获取更多信息。 - -### 如何安装 Linux 内核 5.18? - -你可以在 [Linux Kernel Archives][14]的网站上找到最新版本的内核。你可以下载 [tarball][15] 以进行测试。你也可以参照 [Linux 内核升级指南][16] 获取帮助 - -如果想避免自己编译它,你可以稍等几周,等 Linux发行版把它推到仓库。 - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/linux-kernel-5-18-release/ - -作者:[Ankush Das][a] -选题:[lkxed][b] -译者:[PeterPan0106](https://github.com/PeterPan0106) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://news.itsfoss.com/author/ankush/ -[b]: https://github.com/lkxed -[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/kernel-5-18-release.png -[2]: https://news.itsfoss.com/linux-kernel-5-17-release/ -[3]: https://www.phoronix.com/scan.php?page=news_item&px=Linux-5.18-HID -[4]: https://news.itsfoss.com/wp-content/uploads/2022/05/amd-linux-5-18-1024x576.jpg -[5]: https://lists.freedesktop.org/archives/amd-gfx/2022-February/075262.html -[6]: https://news.itsfoss.com/wp-content/uploads/2022/05/c-linux-5-18-1024x576.jpg -[7]: https://news.itsfoss.com/wp-content/uploads/2022/05/networking-linux-5-18-1024x576.jpg -[8]: https://lore.kernel.org/lkml/Yj7vGtn8fILavjyL@kroah.com/ -[9]: https://news.itsfoss.com/wp-content/uploads/2022/05/apple-linux-5-18-1024x576.jpg -[10]: https://lore.kernel.org/lkml/nycvar.YFH.7.76.2203231015060.24795@cbobk.fhfr.pm/ -[11]: https://news.itsfoss.com/wp-content/uploads/2022/05/arm-linux-5-18-1024x576.jpg -[12]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=baaa68a9796ef2cadfe5caaf4c730412eda0f31c -[13]: https://lore.kernel.org/lkml/CAHk-=wjiqyoH6qntYvYTjR1F2L-pHtgX9esZMRS13iktCOJ1zA@mail.gmail.com/T/#u -[14]: https://www.kernel.org/ -[15]: https://git.kernel.org/torvalds/t/linux-5.16.tar.gz -[16]: https://itsfoss.com/upgrade-linux-kernel-ubuntu/ From f4cc1f249ae6cc47c424877a6df9037ccdd9a2cd Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 27 May 2022 10:44:59 +0800 Subject: [PATCH 016/104] R MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @beamrolling 下回记得不用保留英文原文 --- ...ction Of Open Source Software libraries.md | 26 +++++++------------ 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/translated/news/20220518 Google To Start Distributing A Collection Of Open Source Software libraries.md b/translated/news/20220518 Google To Start Distributing A Collection Of Open Source Software libraries.md index d26b7ba945..dd248fc382 100644 --- a/translated/news/20220518 Google To Start Distributing A Collection Of Open Source Software libraries.md +++ b/translated/news/20220518 Google To Start Distributing A Collection Of Open Source Software libraries.md @@ -3,32 +3,26 @@ [#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" [#]: collector: "lkxed" [#]: translator: "beamrolling" -[#]: reviewer: " " +[#]: reviewer: "wxy" [#]: publisher: " " [#]: url: " " -Google To Start Distributing A Collection Of Open Source Software libraries谷歌开始分发一系列开源软件库 +谷歌开始分发一系列开源软件库 ====== -![][1] -On Tuesday, Google unveiled a new program aimed at safeguarding the open-source software supply chain by curating and delivering a security-vetted selection of open source packages to Google Cloud users. The business announced the new service, dubbed Assured Open Source Software, in a blog [post][2]. Andy Chang, Google Cloud’s group product manager for security and privacy, highlighted some of the problems of safeguarding open source software and emphasised Google’s commitment to open source in his blog post. -5 月 17 日,谷歌推出了一项新计划,该计划向谷歌云用户策划并提供经过安全审查的开源包选项,以保护开源软件供应链。该公司在一篇[博文][2]中宣布了这项名为 Assured Open Source Software 的新服务。在博文中,谷歌云安全和隐私部门产品经理 Andy Chang 强调了保障开源软件的一些问题,并强调了谷歌对开源的承诺。 +![](https://img.linux.net.cn/data/attachment/album/202205/27/104331cwwqji26wlwwfw2n.jpg) + +5 月 17 日,谷歌推出了一项新计划,该计划向谷歌云用户策划并提供经过安全审查的开源包选项,以保护开源软件供应链。该公司在一篇 [博文][2] 中宣布了这项名为 “安心开源软件Assured Open Source Software” 的新服务。在博文中,谷歌云安全和隐私部门产品经理 Andy Chang 强调了保障开源软件的一些问题,并强调了谷歌对开源的承诺。 -“There has been an increasing awareness in the developer community, enterprises, and governments of software supply chain risks,” Chang wrote, citing last year’s major log4j vulnerability as an example. “Google continues to be one of the largest maintainers, contributors, and users of open source and is deeply involved in helping make the open source software ecosystem more secure.” “开发者社区、企业及政府对软件供应链风险的意识越来越强,”Chang 写道,并以去年的 log4j 重大漏洞为例。“谷歌仍是开源代码最大的维护者、贡献者和使用者之一,并深入参与了帮助开源软件生态系统更加安全的工作。” -According to Google, the Assured Open Source Software service will give Cloud clients access to Google’s substantial software auditing knowledge. According to Google, all open source packages made available through the service are also used internally by the corporation and are inspected and analysed for vulnerabilities on a regular basis. -据谷歌称,Assured Open Source Software 服务将让云客户能够访问谷歌的大量软件审计知识。另据其称,所有通过该服务提供的开源软件包也在公司内部使用,公司会定期检查和分析其漏洞。 +据谷歌称,“安心开源软件”服务将让云客户能够访问谷歌的大量软件审计知识。另据其称,所有通过该服务提供的开源软件包也在公司内部使用,该公司会定期检查和分析其漏洞。 -A list of the 550 important open source libraries that Google is currently reviewing is available on [GitHub][3]. While these libraries may all be downloaded independently of Google, the Assured OSS program will see audited versions provided through Google Cloud, preventing developers from corrupting widely used open source libraries. This service is now in early access phase and will be ready for wider consumer testing in Q3 2022. -谷歌目前正在审核的 550 个重要开源库的清单可以在[GitHub][3]上找到。虽然这些库都可以独立于谷歌下载,但该计划将呈现通过谷歌云提供的审核版本,防止开发者破坏广泛使用的开放源码库。这项服务现在处于预先体验阶段,将在 2022 年第三季度准备好进行更广泛的消费者测试。 +谷歌目前正在审核的 550 个重要开源库的清单可以在 [GitHub][3] 上找到。虽然这些库都可以独立于谷歌下载,但该计划将呈现通过谷歌云提供的审核版本,防止开发者破坏广泛使用的开放源码库。这项服务现在处于预先体验阶段,将在 2022 年第三季度准备好进行更广泛的消费者测试。 +谷歌的声明只是广大行业努力加强开源软件供应链的安全的一部分,这份努力得到了拜登政府的支持。今年 1 月,美国国土安全部和美国网络安全与基础设施安全局的代表与美国一些主要 IT 公司的高管会面,研究 log4j 漏洞之后的开源软件安全问题。此后,有关公司在最近的一次峰会上承诺提供超过 3000 万美元的资金,以改善开源软件的安全问题。 -The Google statement is part of a broader industry effort to strengthen the security of the open source software supply chain, which has the support of the Biden administration. In January, representatives from the Department of Homeland Security and the Cybersecurity and Infrastructure Security Agency met with executives from some of the country’s major IT companies to examine open-source software security in the wake of the log4j bug. Since then, the corporations involved have pledged more than $30 million in financing to improve open source software security during a recent summit. -谷歌的声明只是广大行业努力加强开源软件供应链的安全的一部分,这份努力得到了拜登政府的支持。今年 1 月,国土安全部和网络安全与基础设施安全局的代表与美国一些主要 IT 公司的高管会面,研究 log4j 漏洞之后的开源软件安全问题。此后,有关公司在最近的一次峰会上承诺提供超过 3000 万美元的资金,以改善开源软件的安全问题。 - -In addition to cash, Google is devoting engineering time to ensuring the supply chain’s security. The corporation has announced the development of a “Open Source Maintenance Crew” that will collaborate with library maintainers to improve security. -除了现金,谷歌还在投入工程时间来确保供应链的安全。该公司已宣布发展“开源维护小组”,该团队将与库维护人员合作以提高安全性。 +除了现金,谷歌还在投入工程时间来确保供应链的安全。该公司已宣布发展一个“开源维护小组Open Source Maintenance Crew”,该团队将与库维护人员合作以提高安全性。 -------------------------------------------------------------------------------- @@ -37,7 +31,7 @@ via: https://www.opensourceforu.com/2022/05/google-to-start-distributing-a-colle 作者:[Laveesh Kocher][a] 选题:[lkxed][b] 译者:[beamrolling](https://github.com/beamrolling) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 492112a1816795870ed3ac614ea3b9c564416cd2 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 27 May 2022 10:45:37 +0800 Subject: [PATCH 017/104] P @beamrolling https://linux.cn/article-14641-1.html --- ...ributing A Collection Of Open Source Software libraries.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/news => published}/20220518 Google To Start Distributing A Collection Of Open Source Software libraries.md (97%) diff --git a/translated/news/20220518 Google To Start Distributing A Collection Of Open Source Software libraries.md b/published/20220518 Google To Start Distributing A Collection Of Open Source Software libraries.md similarity index 97% rename from translated/news/20220518 Google To Start Distributing A Collection Of Open Source Software libraries.md rename to published/20220518 Google To Start Distributing A Collection Of Open Source Software libraries.md index dd248fc382..1edc4b7a48 100644 --- a/translated/news/20220518 Google To Start Distributing A Collection Of Open Source Software libraries.md +++ b/published/20220518 Google To Start Distributing A Collection Of Open Source Software libraries.md @@ -4,8 +4,8 @@ [#]: collector: "lkxed" [#]: translator: "beamrolling" [#]: reviewer: "wxy" -[#]: publisher: " " -[#]: url: " " +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14641-1.html" 谷歌开始分发一系列开源软件库 ====== From 900780c51325fbbf5f6c3098b2f39aee4573a21c Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 27 May 2022 11:29:54 +0800 Subject: [PATCH 018/104] RP @robsean https://linux.cn/article-14642-1.html --- ...stall Multimedia Codecs In Fedora Linux.md | 27 +++++++++++-------- 1 file changed, 16 insertions(+), 11 deletions(-) rename {translated/tech => published}/20220514 How To Install Multimedia Codecs In Fedora Linux.md (74%) diff --git a/translated/tech/20220514 How To Install Multimedia Codecs In Fedora Linux.md b/published/20220514 How To Install Multimedia Codecs In Fedora Linux.md similarity index 74% rename from translated/tech/20220514 How To Install Multimedia Codecs In Fedora Linux.md rename to published/20220514 How To Install Multimedia Codecs In Fedora Linux.md index 5464430b6a..962a7faddb 100644 --- a/translated/tech/20220514 How To Install Multimedia Codecs In Fedora Linux.md +++ b/published/20220514 How To Install Multimedia Codecs In Fedora Linux.md @@ -3,15 +3,20 @@ [#]: author: "sk https://ostechnix.com/author/sk/" [#]: collector: "lkxed" [#]: translator: "robsean" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14642-1.html" 如何在 Fedora Linux 中安装多媒体编码器 ====== -在新安装 Fedora后,安装多媒体编码器来播放音频和视频是第一件要事。在这篇简单的教程中,我们将看到如何在 Fedora 36 workstation 中从 RPM Fusion 软件包存储库中安装多媒体编码器。 -### 序言 +![](https://img.linux.net.cn/data/attachment/album/202205/27/112826w7kyg5vddudxwwdg.jpg) + +> 在新安装 Fedora后,安装多媒体编码器来播放音频和视频是第一件要事。 + +在这篇简单的教程中,我们将看到如何在 Fedora 36 工作站中从 RPM Fusion 软件包存储库安装多媒体编码器。 + +### 介绍 很多多媒体编码器要么是闭源的,要么是非自由的,因此出于法律的原因,它们没有包含在 Fedora Linux 的默认存储库中。 @@ -49,7 +54,7 @@ $ sudo dnf group upgrade --with-optional Multimedia #### 安装多媒体播放器 -一些流行的媒体播放器,诸如 VLC、Celluloid、SMplayer 和 Plex-media-palyer 等等,将提供所有需要是编码器。你不需要将它们全部都安装,只要任意一两个就足够了。下面给出安装这些播放器的命令: +一些流行的媒体播放器,诸如 VLC、Celluloid、SMplayer 和 Plex-media-palyer 等等,将提供所有需要的编码器。你不需要将它们全部都安装,只要任意一两个就足够了。下面给出安装这些播放器的命令: ``` $ sudo dnf install vlc @@ -69,9 +74,9 @@ $ sudo dnf install smplayer $ sudo dnf install plex-media-player ``` -这将不仅为你提供 h264、h265、vp8 和 vp9 编码器 (均带硬件支持),它也将启用一种更高效的编码器 av1 (又名 av01)。你可以使用 [AV1 Beta Launch Playlist][2]来测试你的浏览器是否支持这个编码器。 +这将不仅为你提供 H264、H265、VP8 和 VP9 编码器(均带硬件支持),它也将启用一种更高效的编码器 AV1(又名 AV01)。你可以使用 [AV1 Beta Launch Playlist][2] 来测试你的浏览器是否支持这个编码器。 -它们中的一些播放器也可以作为 **flatpak** 格式的应用程序来使用的。如果与传统的软件包管理器相比,你更喜欢 flatpak 格式的应用程序,你可以安装它们。现在大多数的 Linux 发行版都支持开箱即用的 flatpak 格式的应用程序 +它们中的一些播放器也可以作为 **flatpak** 格式的应用程序来使用。如果与传统的软件包管理器相比,你更喜欢 flatpak 格式的应用程序,你可以安装它们。现在大多数的 Linux 发行版都支持开箱即用的 flatpak 格式的应用程序 为安装 VLC 的 flatpak 版本,运行: @@ -81,13 +86,13 @@ $ flatpak install vlc #### 可选 - 安装 FFmpeg -**FFmpeg** 是一个功能强大的多媒体框架,它可用于编码、解码、转码、mux, demux, record, stream, filter, 以及播放各种类型的媒体文件。你可以通过在你的系统上安装 FFmpeg 来获取相应的解码器。 +**FFmpeg** 是一个功能强大的多媒体框架,它可用于编码、解码、转码、混流、解混流、录制、音轨、过滤等,以及播放各种类型的媒体文件。你可以通过在你的系统上安装 FFmpeg 来获取相应的解码器。 * [如何在 Linux 中安装 FFmpeg][3] 希望这有帮助。 -**相关阅读:** +**相关阅读:** * [在 Fedora Silverblue 中的 Chromium 和 Firefox 上启用 H264][4] * [如何在 OpenSUSE 中安装多媒体解码器][5] @@ -99,7 +104,7 @@ via: https://ostechnix.com/how-to-install-multimedia-codecs-in-fedora-linux/ 作者:[sk][a] 选题:[lkxed][b] 译者:[robsean](https://github.com/robsean) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 7e8215b23b0f77ef75093142e658e59f4b7f234f Mon Sep 17 00:00:00 2001 From: lkxed Date: Fri, 27 May 2022 13:57:23 +0800 Subject: [PATCH 019/104] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?news]:=2020220527=20AlmaLinux=20Continues=20the=20Legacy=20of?= =?UTF-8?q?=20CentOS=20with=20the=20Release=20of=20Version=209.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...of CentOS with the Release of Version 9.md | 78 +++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 sources/news/20220527 AlmaLinux Continues the Legacy of CentOS with the Release of Version 9.md diff --git a/sources/news/20220527 AlmaLinux Continues the Legacy of CentOS with the Release of Version 9.md b/sources/news/20220527 AlmaLinux Continues the Legacy of CentOS with the Release of Version 9.md new file mode 100644 index 0000000000..d9d11be5a4 --- /dev/null +++ b/sources/news/20220527 AlmaLinux Continues the Legacy of CentOS with the Release of Version 9.md @@ -0,0 +1,78 @@ +[#]: subject: "AlmaLinux Continues the Legacy of CentOS with the Release of Version 9" +[#]: via: "https://news.itsfoss.com/almalinux-9-release/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +AlmaLinux Continues the Legacy of CentOS with the Release of Version 9 +====== +AlmaLinux 9 is the latest release based on Red Hat Enterprise Linux 9 with new wallpapers, and performance enhancements. + +![almalinux][1] + +If you have been keeping up with our coverages, you may have come across [AlmaLinux 9.0 beta release][2] last month. + +AlmaLinux is one of the[best RHEL alternatives][3], so a new stable release based on the latest version of Red Hat Enterprise Linux (RHEL 9) is useful as a CentOS replacement. + +The latest AlmaLinux 9 release supports the major architectures that include Intel/AMD(x86_64), ARM64 (aarch64), IBM PowerPC(ppc64le), and IBM Z (s390x). + +### AlmaLinux 9.0: What’s New? + +AlmaLinux 9.0 utilizes Linux kernel 5.14 with this release. It includes improvements for cloud and container development, with refinements to the web console. + +You can also expect performance improvements with other changes that include: + +#### New Wallpapers + +![AlmaLinux 9][4] + +With AlmaLinux 9.0, you will notice a couple of new wallpapers along with the ones available in the last release. + +The new wallpapers look pleasant to the eye and offer a few background variations. + +#### Linux Kernel 5.14 + +One of the significant changes, Linux Kernel 5.14, brings newer hardware support, among various other improvements. + +You can read more about the improvements in Linux kernel 5.14 in our [older coverage][5]. + +#### Updated Packages + +It’s no surprise that this release comes with new package updates. Some include Git 2.31, PHP 8.0, Perl 5.32, and MySQL 8.0. + +GCC has also been updated to its latest version, 11. + +To explore all the technical changes, you can refer to the [official release notes][6]. + +### Download AlmaLinux 9.0 + +You can grab the latest ISO through the [official mirrors][7] available on the download page. A .torrent file is also available in the mirrors. + +[AlmaLinux 9.0][8] + +*What do you think of AlmaLinux 9.0 release based on RHEL? Planning to use it for your server? Let me know your thoughts in the comments below.* + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/almalinux-9-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/05/alma-linux-9.jpg +[2]: https://linux.cn/article-14500-1.html +[3]: https://itsfoss.com/rhel-based-server-distributions/ +[4]: https://news.itsfoss.com/wp-content/uploads/2022/05/alma-linux-wallpapers-9-1024x609.jpg +[5]: https://news.itsfoss.com/kernel-5-14-release/ +[6]: https://wiki.almalinux.org/release-notes/9.0.html +[7]: https://mirrors.almalinux.org/isos.html +[8]: https://mirrors.almalinux.org/isos.html From ca9b4cd3d9d5222a9b4465a6f59ec1394503c00d Mon Sep 17 00:00:00 2001 From: lkxed Date: Fri, 27 May 2022 14:13:56 +0800 Subject: [PATCH 020/104] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020220527=20Plotting=20Data=20in=20R-=20Graphs.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20220527 Plotting Data in R- Graphs.md | 311 ++++++++++++++++++ 1 file changed, 311 insertions(+) create mode 100644 sources/tech/20220527 Plotting Data in R- Graphs.md diff --git a/sources/tech/20220527 Plotting Data in R- Graphs.md b/sources/tech/20220527 Plotting Data in R- Graphs.md new file mode 100644 index 0000000000..b7d1506fd2 --- /dev/null +++ b/sources/tech/20220527 Plotting Data in R- Graphs.md @@ -0,0 +1,311 @@ +[#]: 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: " " +[#]: 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 Punjab’s CPI can be generated as follows, and is shown in Figure 3: + +![Figure 3: Line chart of Punjab’s 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 From fa7dcc18c59ab8d7c495ece6b672df57cf4c48e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91?= Date: Fri, 27 May 2022 18:17:42 +0800 Subject: [PATCH 021/104] Translated --- ...do Password In Ubuntu 22.04 - 20.04 LTS.md | 125 ------------------ ...do Password In Ubuntu 22.04 - 20.04 LTS.md | 125 ++++++++++++++++++ 2 files changed, 125 insertions(+), 125 deletions(-) delete mode 100644 sources/tech/20220518 How To Reset Sudo Password In Ubuntu 22.04 - 20.04 LTS.md create mode 100644 translated/tech/20220518 How To Reset Sudo Password In Ubuntu 22.04 - 20.04 LTS.md diff --git a/sources/tech/20220518 How To Reset Sudo Password In Ubuntu 22.04 - 20.04 LTS.md b/sources/tech/20220518 How To Reset Sudo Password In Ubuntu 22.04 - 20.04 LTS.md deleted file mode 100644 index 0d21ba5f9f..0000000000 --- a/sources/tech/20220518 How To Reset Sudo Password In Ubuntu 22.04 - 20.04 LTS.md +++ /dev/null @@ -1,125 +0,0 @@ -[#]: subject: "How To Reset Sudo Password In Ubuntu 22.04 / 20.04 LTS" -[#]: via: "https://ostechnix.com/how-to-reset-sudo-password-in-ubuntu-20-04-lts/" -[#]: author: "sk https://ostechnix.com/author/sk/" -[#]: collector: "lkxed" -[#]: translator: "robsean" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -How To Reset Sudo Password In Ubuntu 22.04 / 20.04 LTS -====== -Reset Forgotten Root Password In Ubuntu - -This brief guide explains how to reset sudo password in Ubuntu 22.04 and 20.04 LTS desktop and server editions from rescue mode. - -### Introduction - -When **[installing Ubuntu][1]**, a new user will be created with sudo privileges to perform all sorts of administrative tasks. - -If your Ubuntu system have multiple sudo users, you can easily reset the forgotten password of a sudo user or administrative user from another sudo user's account. - -What If you have only one sudo user and you lost the password? No problem! It is very easy to recover forgotten sudo user password in Ubuntu from the **"rescue"** or **"single user"** mode. - -This guide has been officially tested on Ubuntu 22.04 and 20.04 LTS editions, however the steps given below are same for other Ubuntu versions and derivatives. - -### Reset Sudo Password In Ubuntu 22.04 / 20.04 LTS - -First, boot your Ubuntu system into rescue mode to reset a sudo user's password as described in the link below. - -> [How To Boot Into Rescue Mode Or Emergency Mode In Ubuntu 22.04 /  20.04 / 18.04][2] - -After you entered into the rescue mode, mount the root (**/**) file system in read/write mode by running the following command: - -``` -# mount -n -o remount,rw / -``` - -Now, reset the sudo user's password using **"passwd"** command: - -``` -# passwd ostechnix -``` - -Here, **"ostechnix"** is the sudo user. Replace it with your own user name. - -Enter the password twice: - -``` -New password: -Retype new password: -passwd: password updated successfully -``` - -![Reset Sudo Password In Ubuntu 22.04 / 20.04 LTS][3] - -That's it. We have reset the sudo user password. If you have followed the **Method 1** to enter into rescue mode as described in the above link, press **“Ctrl+d”** to boot into normal mode. Alternatively, you can type any one of the following commands to boot into normal mode. - -``` -# systemctl default -``` - -Or, - -``` -# exit -``` - -If you want to reboot the system instead of booting into normal mode, enter: - -``` -# systemctl reboot -``` - -If you have followed the **Method 2** to enter into rescue mode as described in the above link, type: - -``` -# exit -``` - -You will go back to the recovery menu. Choose "**Resume normal boot**" and hit ENTER key. - -![Boot Into Normal Mode In Ubuntu][4] - -Again, choose OK and press ENTER to continue booting into normal mode: - -![Exit Recovery Mode And Boot Into Normal Mode][5] - -You can now use the new sudo password when running administrative commands. - -##### What If I Forgot Both Username And Password? - -If you forget the username, you can easily list the available users in your Linux system from the rescue mode using command: - -``` -# cat etc/passwd -``` - -Sample output from my Ubuntu 22.04 system: - -``` -[...] -ostechnix:x:1000:1000:Ostechnix,,,:/home/ostechnix:/bin/bash -[...] -``` - -Well, you now have the user name. Just follow the aforementioned steps to reset the user's password. - --------------------------------------------------------------------------------- - -via: https://ostechnix.com/how-to-reset-sudo-password-in-ubuntu-20-04-lts/ - -作者:[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://ostechnix.com/install-ubuntu-desktop/ -[2]: https://ostechnix.com/how-to-boot-into-rescue-mode-or-emergency-mode-in-ubuntu-18-04/ -[3]: https://ostechnix.com/wp-content/uploads/2022/05/Reset-Sudo-Password-In-Ubuntu.png -[4]: https://ostechnix.com/wp-content/uploads/2020/05/Boot-into-normal-mode-in-Ubuntu.png -[5]: https://ostechnix.com/wp-content/uploads/2020/05/Booting-into-normal-mode-from-rescue-mode-in-Ubuntu.png diff --git a/translated/tech/20220518 How To Reset Sudo Password In Ubuntu 22.04 - 20.04 LTS.md b/translated/tech/20220518 How To Reset Sudo Password In Ubuntu 22.04 - 20.04 LTS.md new file mode 100644 index 0000000000..63c1703c11 --- /dev/null +++ b/translated/tech/20220518 How To Reset Sudo Password In Ubuntu 22.04 - 20.04 LTS.md @@ -0,0 +1,125 @@ +[#]: subject: "How To Reset Sudo Password In Ubuntu 22.04 / 20.04 LTS" +[#]: via: "https://ostechnix.com/how-to-reset-sudo-password-in-ubuntu-20-04-lts/" +[#]: author: "sk https://ostechnix.com/author/sk/" +[#]: collector: "lkxed" +[#]: translator: "robsean" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +如何在 Ubuntu 22.04 / 20.04 LTS 中重新设置 sudo 密码 +====== +在 Ubuntu 中重新设置已忘记的 root 用户的密码 + +这篇简单的指南将向你解释,如何在 Ubuntu 22.04 好 20.04 LTS 桌面环境中,以及从服务器版本中的 恢复rescue 模式中重新设置 sudo 密码。 + +### 介绍 + +在 **[安装 Ubuntu][1]** 时,新创建的一个用户将会带有 sudo 权限,用以执行各种各样的管理任务。 + +如果你的 Ubuntu 系统有多个 sudo 用户,你能够从另外一个 sudo 用户的账号下,轻松地重新设置所忘记的一个 sudo 用户或管理员用户的密码。 + +如果你只有一个 sudo 用户,并且忘记了密码怎么办?没有问题! 从 Ubuntu 的 **恢复rescue** 或 **单一用户single user**** 模式中恢复 sudo 用户密码很容易。 + +虽然这篇指南是在 Ubuntu 22.04 和 20.04 LTS 版本上进行的正式测试,不过,下面给定的步骤对于其它的 Ubuntu 版本和衍生版本来说是相同的。 + +### 在 Ubuntu 22.04 / 20.04 LTS 中重新设置 sudo 密码 + +首先,启动你的 Ubuntu 系统到 **恢复rescue** 模式下,来重新设置一个 sudo 用户的密码,如下面的链接所述。 + +> [如何启动到 Ubuntu 22.04 /  20.04 / 18.04 的 恢复rescue 模式 或 急救Emergency 模式 ][2] + +在吗进入到 **恢复rescue** 模式下,通过运行下面的命令,以读/写的模式挂载 root (**/**) 文件系统: + +``` +# mount -n -o remount,rw / +``` + +现在,使用 **"passwd"** 命令来重新设置 sudo 用户的密码: + +``` +# passwd ostechnix +``` + +在这里,**"ostechnix"** 是 sudo 用户的名称。 使用你自己的用户名称来替换掉它。 + +输入两次密码: + +``` +New password: +Retype new password: +passwd: password updated successfully +``` + +![Reset Sudo Password In Ubuntu 22.04 / 20.04 LTS][3] + +就这样。我们已经重新设置 sudo 用户密码。如果你按照上面链接所述的 **方法 1** 来进入到 **恢复rescue** 模式,按下 **“Ctrl+d”** 组合键来启动到正常模式。或者,你也可以输入下面的任意一个命令来启动到正常模式。 + +``` +# systemctl default +``` + +或, + +``` +# exit +``` + +如果你想重新启动系统,而不是启动到正常模式,输入: + +``` +# systemctl reboot +``` + +如果你已经按照上面链接所述的 **方法 2** 进入到恢复rescue 模式,输入: + +``` +# exit +``` + +你将返回到 恢复菜单recovery menu 。 现在 "**恢复正常启动Resume normal boot**" ,并按下 回车ENTER 键。 + +![Boot Into Normal Mode In Ubuntu][4] + +在强调一次,选择 确定OK 按钮,并按下 回车ENTER 按键来继续启动到正常模式: + +![Exit Recovery Mode And Boot Into Normal Mode][5] + +现在,你在运行管理命令时可以使用新的 sudo 密码。 + +##### 如果我把用户名称和密码都忘了怎么办? + +如果你忘记了用户名称,在 恢复rescue 模式下,你可以很容易地列出你的 Linux 系统中的用户名称,使用目录: + +``` +# cat etc/passwd +``` + +来自我 Ubuntu 22.04 系统的输出示例: + +``` +[...] +ostechnix:x:1000:1000:Ostechnix,,,:/home/ostechnix:/bin/bash +[...] +``` + +好了,现在,你找到用户名称了。只需要按照上面的步骤来重新设置用户的密码即可。 + +-------------------------------------------------------------------------------- + +via: https://ostechnix.com/how-to-reset-sudo-password-in-ubuntu-20-04-lts/ + +作者:[sk][a] +选题:[lkxed][b] +译者:[robsean](https://github.com/robsean) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://ostechnix.com/author/sk/ +[b]: https://github.com/lkxed +[1]: https://ostechnix.com/install-ubuntu-desktop/ +[2]: https://ostechnix.com/how-to-boot-into-rescue-mode-or-emergency-mode-in-ubuntu-18-04/ +[3]: https://ostechnix.com/wp-content/uploads/2022/05/Reset-Sudo-Password-In-Ubuntu.png +[4]: https://ostechnix.com/wp-content/uploads/2020/05/Boot-into-normal-mode-in-Ubuntu.png +[5]: https://ostechnix.com/wp-content/uploads/2020/05/Booting-into-normal-mode-from-rescue-mode-in-Ubuntu.png From 9cebd3c0fe0686f11614ece413f569392961f183 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91?= Date: Fri, 27 May 2022 18:19:01 +0800 Subject: [PATCH 022/104] Translated --- ... A programmer-s guide to GNU C Compiler.md | 272 ------------------ ... A programmer-s guide to GNU C Compiler.md | 125 ++++++++ 2 files changed, 125 insertions(+), 272 deletions(-) delete mode 100644 sources/tech/20220520 A programmer-s guide to GNU C Compiler.md create mode 100644 translated/tech/20220520 A programmer-s guide to GNU C Compiler.md diff --git a/sources/tech/20220520 A programmer-s guide to GNU C Compiler.md b/sources/tech/20220520 A programmer-s guide to GNU C Compiler.md deleted file mode 100644 index 04f176acf9..0000000000 --- a/sources/tech/20220520 A programmer-s guide to GNU C Compiler.md +++ /dev/null @@ -1,272 +0,0 @@ -[#]: subject: "A programmer's guide to GNU C Compiler" -[#]: via: "https://opensource.com/article/22/5/gnu-c-compiler" -[#]: author: "Jayashree Huttanagoudar https://opensource.com/users/jayashree-huttanagoudar" -[#]: collector: "lkxed" -[#]: translator: "robsean" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -A programmer's guide to GNU C Compiler -====== -Get a behind-the-scenes look at the steps it takes to produce a binary file so that when something goes wrong, you know how to step through the process to resolve problems. - -![GitHub launches Open Source Friday][1] -Image by: Opensource.com - -C is a well-known programming language, popular with experienced and new programmers alike. Source code written in C uses standard English terms, so it's considered human-readable. However, computers only understand binary code. To convert code into machine language, you use a tool called a *compiler*. - -A very common compiler is GCC (GNU C Compiler). The compilation process involves several intermediate steps and adjacent tools. - -### Install GCC - -To confirm whether GCC is already installed on your system, use the `gcc` command: - -``` -$ gcc --version -``` - -If necessary, install GCC using your packaging manager. On Fedora-based systems, use `dnf` : - -``` -$ sudo dnf install gcc libgcc -``` - -On Debian-based systems, use `apt` : - -``` -$ sudo apt install build-essential -``` - -After installation, if you want to check where GCC is installed, then use: - -``` -$ whereis gcc -``` - -### Simple C program using GCC - -Here's a simple C program to demonstrate how to compile code using GCC. Open your favorite text editor and paste in this code: - -``` -// hellogcc.c -#include -  -int main() { -    printf("Hello, GCC!\n"); - return 0; -} -``` - -Save the file as `hellogcc.c` and then compile it: - -``` -$ ls -hellogcc.c - -$ gcc hellogcc.c - -$ ls -1 -a.out -hellogcc.c -``` - -As you can see, `a.out` is the default executable generated as a result of compilation. To see the output of your newly-compiled application, just run it as you would any local binary: - -``` -$ ./a.out -Hello, GCC! -``` - -### Name the output file - -The filename `a.out` isn't very descriptive, so if you want to give a specific name to your executable file, you can use the `-o` option: - -``` -$ gcc -o hellogcc hellogcc.c - -$ ls -a.out  hellogcc  hellogcc.c - -$ ./hellogcc -Hello, GCC! -``` - -This option is useful when developing a large application that needs to compile multiple C source files. - -### Intermediate steps in GCC compilation - -There are actually four steps to compiling, even though GCC performs them automatically in simple use-cases. - -1. Pre-Processing: The GNU C Preprocessor (cpp) parses the headers (#include statements), expands macros (#define statements), and generates an intermediate file such as `hellogcc.i` with expanded source code. -2. Compilation: During this stage, the compiler converts pre-processed source code into assembly code for a specific CPU architecture. The resulting assembly file is named with a `.s` extension, such as `hellogcc.s` in this example. -3. Assembly: The `as`sembler (as) converts the assembly code into machine code in an object file, such as `hellogcc.o`. -4. Linking: The linker (ld) links the object code with the library code to produce an executable file, such as `hellogcc`. - -When running GCC, use the `-v` option to see each step in detail. - -``` -$ gcc -v -o hellogcc hellogcc.c -``` - -![Compiler flowchart][2] - -Image by: - -(Jayashree Huttanagoudar, CC BY-SA 4.0) - -### Manually compile code - -It can be useful to experience each step of compilation because, under some circumstances, you don't need GCC to go through all the steps. - -First, delete the files generated by GCC in the current folder, except the source file. - -``` -$ rm a.out hellogcc.o - -$ ls -hellogcc.c -``` - -#### Pre-processor - -First, start the pre-processor, redirecting its output to `hellogcc.i` : - -``` -$ cpp hellogcc.c > hellogcc.i - -$ ls -hellogcc.c  hellogcc.i -``` - -Take a look at the output file and notice how the pre-processor has included the headers and expanded the macros. - -#### Compiler - -Now you can compile the code into assembly. Use the `-S` option to set GCC just to produce assembly code. - -``` -$ gcc -S hellogcc.i - -$ ls -hellogcc.c  hellogcc.i  hellogcc.s - -$ cat hellogcc.s -``` - -Take a look at the assembly code to see what's been generated. - -#### Assembly - -Use the assembly code you've just generated to create an object file: - -``` -$ as -o hellogcc.o hellogcc.s - -$ ls -hellogcc.c  hellogcc.i  hellogcc.o  hellogcc.s -``` - -#### Linking - -To produce an executable file, you must link the object file to the libraries it depends on. This isn't quite as easy as the previous steps, but it's educational: - -``` -$ ld -o hellogcc hellogcc.o -ld: warning: cannot find entry symbol _start; defaulting to 0000000000401000 -ld: hellogcc.o: in function `main`: -hellogcc.c:(.text+0xa): undefined reference to `puts' -``` - -An error referencing an`undefined puts` occurs after the linker is done looking at the `libc.so` library. You must find suitable linker options to link the required libraries to resolve this. This is no small feat, and it's dependent on how your system is laid out. - -When linking, you must link code to core runtime (CRT) objects, a set of subroutines that help binary executables launch. The linker also needs to know where to find important system libraries, including libc and libgcc, notably within special start and end instructions. These instructions can be delimited by the `--start-group` and `--end-group` options or using paths to `crtbegin.o` and `crtend.o`. - -This example uses paths as they appear on a RHEL 8 install, so you may need to adapt the paths depending on your system. - -``` -$ ld -dynamic-linker \ -/lib64/ld-linux-x86-64.so.2 \ --o hello \ -/usr/lib64/crt1.o /usr/lib64/crti.o \ ---start-group \ --L/usr/lib/gcc/x86_64-redhat-linux/8 \ --L/usr/lib64 -L/lib64 hello.o \ --lgcc \ ---as-needed -lgcc_s \ ---no-as-needed -lc -lgcc \ ---end-group -/usr/lib64/crtn.o -``` - -The same linker procedure on Slackware uses a different set of paths, but you can see the similarity in the process: - -``` -$ ld -static -o hello \ --L/usr/lib64/gcc/x86_64-slackware-linux/11.2.0/ \ -/usr/lib64/crt1.o /usr/lib64/crti.o \ -hello.o /usr/lib64/crtn.o \ ---start-group -lc -lgcc -lgcc_eh \ ---end-group -``` - -Now run the resulting executable: - -``` -$ ./hello -Hello, GCC! -``` - -### Some helpful utilities - -Below are a few utilities that help examine the file type, symbol table, and the libraries linked with the executable. - -Use the `file` utility to determine the type of file: - -``` -$ file hellogcc.c -hellogcc.c: C source, ASCII text - -$ file hellogcc.o -hellogcc.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped - -$ file hellogcc -hellogcc: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=bb76b241d7d00871806e9fa5e814fee276d5bd1a, for GNU/Linux 3.2.0, not stripped -``` - -The use the `nm` utility to list symbol tables for object files: - -``` -$ nm hellogcc.o -0000000000000000 T main -                          U puts -``` - -Use the `ldd` utility to list dynamic link libraries: - -``` -$ ldd hellogcc -linux-vdso.so.1 (0x00007ffe3bdd7000) -libc.so.6 => /lib64/libc.so.6 (0x00007f223395e000) -/lib64/ld-linux-x86-64.so.2 (0x00007f2233b7e000) -``` - -### Wrap up - -In this article, you learned the various intermediate steps in GCC compilation and the utilities to examine the file type, symbol table, and libraries linked with an executable. The next time you use GCC, you'll understand the steps it takes to produce a binary file for you, and when something goes wrong, you know how to step through the process to resolve problems. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/22/5/gnu-c-compiler - -作者:[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/lead-images/build_structure_tech_program_code_construction.png -[2]: https://opensource.com/sites/default/files/2022-05/compiler-flowchart.png diff --git a/translated/tech/20220520 A programmer-s guide to GNU C Compiler.md b/translated/tech/20220520 A programmer-s guide to GNU C Compiler.md new file mode 100644 index 0000000000..63c1703c11 --- /dev/null +++ b/translated/tech/20220520 A programmer-s guide to GNU C Compiler.md @@ -0,0 +1,125 @@ +[#]: subject: "How To Reset Sudo Password In Ubuntu 22.04 / 20.04 LTS" +[#]: via: "https://ostechnix.com/how-to-reset-sudo-password-in-ubuntu-20-04-lts/" +[#]: author: "sk https://ostechnix.com/author/sk/" +[#]: collector: "lkxed" +[#]: translator: "robsean" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +如何在 Ubuntu 22.04 / 20.04 LTS 中重新设置 sudo 密码 +====== +在 Ubuntu 中重新设置已忘记的 root 用户的密码 + +这篇简单的指南将向你解释,如何在 Ubuntu 22.04 好 20.04 LTS 桌面环境中,以及从服务器版本中的 恢复rescue 模式中重新设置 sudo 密码。 + +### 介绍 + +在 **[安装 Ubuntu][1]** 时,新创建的一个用户将会带有 sudo 权限,用以执行各种各样的管理任务。 + +如果你的 Ubuntu 系统有多个 sudo 用户,你能够从另外一个 sudo 用户的账号下,轻松地重新设置所忘记的一个 sudo 用户或管理员用户的密码。 + +如果你只有一个 sudo 用户,并且忘记了密码怎么办?没有问题! 从 Ubuntu 的 **恢复rescue** 或 **单一用户single user**** 模式中恢复 sudo 用户密码很容易。 + +虽然这篇指南是在 Ubuntu 22.04 和 20.04 LTS 版本上进行的正式测试,不过,下面给定的步骤对于其它的 Ubuntu 版本和衍生版本来说是相同的。 + +### 在 Ubuntu 22.04 / 20.04 LTS 中重新设置 sudo 密码 + +首先,启动你的 Ubuntu 系统到 **恢复rescue** 模式下,来重新设置一个 sudo 用户的密码,如下面的链接所述。 + +> [如何启动到 Ubuntu 22.04 /  20.04 / 18.04 的 恢复rescue 模式 或 急救Emergency 模式 ][2] + +在吗进入到 **恢复rescue** 模式下,通过运行下面的命令,以读/写的模式挂载 root (**/**) 文件系统: + +``` +# mount -n -o remount,rw / +``` + +现在,使用 **"passwd"** 命令来重新设置 sudo 用户的密码: + +``` +# passwd ostechnix +``` + +在这里,**"ostechnix"** 是 sudo 用户的名称。 使用你自己的用户名称来替换掉它。 + +输入两次密码: + +``` +New password: +Retype new password: +passwd: password updated successfully +``` + +![Reset Sudo Password In Ubuntu 22.04 / 20.04 LTS][3] + +就这样。我们已经重新设置 sudo 用户密码。如果你按照上面链接所述的 **方法 1** 来进入到 **恢复rescue** 模式,按下 **“Ctrl+d”** 组合键来启动到正常模式。或者,你也可以输入下面的任意一个命令来启动到正常模式。 + +``` +# systemctl default +``` + +或, + +``` +# exit +``` + +如果你想重新启动系统,而不是启动到正常模式,输入: + +``` +# systemctl reboot +``` + +如果你已经按照上面链接所述的 **方法 2** 进入到恢复rescue 模式,输入: + +``` +# exit +``` + +你将返回到 恢复菜单recovery menu 。 现在 "**恢复正常启动Resume normal boot**" ,并按下 回车ENTER 键。 + +![Boot Into Normal Mode In Ubuntu][4] + +在强调一次,选择 确定OK 按钮,并按下 回车ENTER 按键来继续启动到正常模式: + +![Exit Recovery Mode And Boot Into Normal Mode][5] + +现在,你在运行管理命令时可以使用新的 sudo 密码。 + +##### 如果我把用户名称和密码都忘了怎么办? + +如果你忘记了用户名称,在 恢复rescue 模式下,你可以很容易地列出你的 Linux 系统中的用户名称,使用目录: + +``` +# cat etc/passwd +``` + +来自我 Ubuntu 22.04 系统的输出示例: + +``` +[...] +ostechnix:x:1000:1000:Ostechnix,,,:/home/ostechnix:/bin/bash +[...] +``` + +好了,现在,你找到用户名称了。只需要按照上面的步骤来重新设置用户的密码即可。 + +-------------------------------------------------------------------------------- + +via: https://ostechnix.com/how-to-reset-sudo-password-in-ubuntu-20-04-lts/ + +作者:[sk][a] +选题:[lkxed][b] +译者:[robsean](https://github.com/robsean) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://ostechnix.com/author/sk/ +[b]: https://github.com/lkxed +[1]: https://ostechnix.com/install-ubuntu-desktop/ +[2]: https://ostechnix.com/how-to-boot-into-rescue-mode-or-emergency-mode-in-ubuntu-18-04/ +[3]: https://ostechnix.com/wp-content/uploads/2022/05/Reset-Sudo-Password-In-Ubuntu.png +[4]: https://ostechnix.com/wp-content/uploads/2020/05/Boot-into-normal-mode-in-Ubuntu.png +[5]: https://ostechnix.com/wp-content/uploads/2020/05/Booting-into-normal-mode-from-rescue-mode-in-Ubuntu.png From fc72a3701aaa80aaa56bceb9f29bca2989674af7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91?= Date: Fri, 27 May 2022 18:27:56 +0800 Subject: [PATCH 023/104] Translating --- ...20220516 How to Dual Boot Ubuntu 22.04 LTS and Windows 11.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20220516 How to Dual Boot Ubuntu 22.04 LTS and Windows 11.md b/sources/tech/20220516 How to Dual Boot Ubuntu 22.04 LTS and Windows 11.md index af32772116..0a13767da7 100644 --- a/sources/tech/20220516 How to Dual Boot Ubuntu 22.04 LTS and Windows 11.md +++ b/sources/tech/20220516 How to Dual Boot Ubuntu 22.04 LTS and Windows 11.md @@ -2,7 +2,7 @@ [#]: via: "https://www.linuxtechi.com/dual-boot-ubuntu-22-04-and-windows-11/" [#]: author: "James Kiarie https://www.linuxtechi.com/author/james/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "robsean" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 7a4b9976765b21ee4b9e7a05590101d466bdafb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91?= Date: Fri, 27 May 2022 18:29:34 +0800 Subject: [PATCH 024/104] Translating --- ...ue Mode Or Emergency Mode In Ubuntu 22.04 - 20.04 - 18.04.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20220518 How To Boot Into Rescue Mode Or Emergency Mode In Ubuntu 22.04 - 20.04 - 18.04.md b/sources/tech/20220518 How To Boot Into Rescue Mode Or Emergency Mode In Ubuntu 22.04 - 20.04 - 18.04.md index 48e4259579..0824725cdf 100644 --- a/sources/tech/20220518 How To Boot Into Rescue Mode Or Emergency Mode In Ubuntu 22.04 - 20.04 - 18.04.md +++ b/sources/tech/20220518 How To Boot Into Rescue Mode Or Emergency Mode In Ubuntu 22.04 - 20.04 - 18.04.md @@ -2,7 +2,7 @@ [#]: via: "https://ostechnix.com/how-to-boot-into-rescue-mode-or-emergency-mode-in-ubuntu-18-04/" [#]: author: "sk https://ostechnix.com/author/sk/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "robsean" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 3b941bc8c83784aca95b59618a3eba138def72a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91?= Date: Fri, 27 May 2022 18:30:48 +0800 Subject: [PATCH 025/104] Translating --- ...stall Specific Package Version With Apt Command in Ubuntu.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20220518 Install Specific Package Version With Apt Command in Ubuntu.md b/sources/tech/20220518 Install Specific Package Version With Apt Command in Ubuntu.md index 1881da46e0..c88a655218 100644 --- a/sources/tech/20220518 Install Specific Package Version With Apt Command in Ubuntu.md +++ b/sources/tech/20220518 Install Specific Package Version With Apt Command in Ubuntu.md @@ -2,7 +2,7 @@ [#]: via: "https://itsfoss.com/apt-install-specific-version-2/" [#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "robsean" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 4a80ffd141fb4619a0feedab076a9619eb8ac580 Mon Sep 17 00:00:00 2001 From: Peter Pan Date: Fri, 27 May 2022 20:14:19 +0800 Subject: [PATCH 026/104] =?UTF-8?q?[=E7=94=B3=E9=A2=86=E5=8E=9F=E6=96=87]A?= =?UTF-8?q?lmaLinux=20Continues=20the=20Legacy=20of=20CentOS=20with=20the?= =?UTF-8?q?=20Release=20of=20Version=209?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 申领原文 --- ...nues the Legacy of CentOS with the Release of Version 9.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/news/20220527 AlmaLinux Continues the Legacy of CentOS with the Release of Version 9.md b/sources/news/20220527 AlmaLinux Continues the Legacy of CentOS with the Release of Version 9.md index d9d11be5a4..4bc1fa2699 100644 --- a/sources/news/20220527 AlmaLinux Continues the Legacy of CentOS with the Release of Version 9.md +++ b/sources/news/20220527 AlmaLinux Continues the Legacy of CentOS with the Release of Version 9.md @@ -2,7 +2,7 @@ [#]: via: "https://news.itsfoss.com/almalinux-9-release/" [#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "PeterPan0106" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " @@ -61,7 +61,7 @@ via: https://news.itsfoss.com/almalinux-9-release/ 作者:[Ankush Das][a] 选题:[lkxed][b] -译者:[译者ID](https://github.com/译者ID) +译者:[PeterPan0106](https://github.com/PeterPan0106) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 788763253fc243d6eff80349c52cc8605f3ab124 Mon Sep 17 00:00:00 2001 From: lkxed Date: Fri, 27 May 2022 21:21:59 +0800 Subject: [PATCH 027/104] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020220527=204=20cool=20new=20projects=20to=20try=20in?= =?UTF-8?q?=20Copr=20for=20May=202022.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ew projects to try in Copr for May 2022.md | 149 ++++++++++++++++++ 1 file changed, 149 insertions(+) create mode 100644 sources/tech/20220527 4 cool new projects to try in Copr for May 2022.md diff --git a/sources/tech/20220527 4 cool new projects to try in Copr for May 2022.md b/sources/tech/20220527 4 cool new projects to try in Copr for May 2022.md new file mode 100644 index 0000000000..4ea0efa4fc --- /dev/null +++ b/sources/tech/20220527 4 cool new projects to try in Copr for May 2022.md @@ -0,0 +1,149 @@ +[#]: subject: "4 cool new projects to try in Copr for May 2022" +[#]: via: "https://fedoramagazine.org/4-cool-new-projects-to-try-in-copr-for-may-2022/" +[#]: author: "Miroslav Suchý https://fedoramagazine.org/author/msuchy/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +4 cool new projects to try in Copr for May 2022 +====== + +![4 packages to try from the Copr repos][1] + +[Copr][2] is a build system for anyone in the Fedora community. It hosts thousands of projects for various purposes and audiences. Some of them should never be installed by anyone, some are already being transitioned to the official Fedora Linux repositories, and the rest are somewhere in between. Copr gives you the opportunity to install third-party software that is not available in Fedora Linux repositories, try nightly versions of your dependencies, use patched builds of your favorite tools to support some non-standard use cases, and just experiment freely. + +If you don’t know [how to enable a repository][3] or if you are concerned about whether [it is safe to use Copr][4], please consult the [project documentation][5]. + +This article takes a closer look at interesting projects that recently landed in Copr. + +### Python-QT6 + +Do you miss QT6 Python bindings for Fedora Linux? Here they are. [https://copr.fedorainfracloud.org/coprs/g/kdesig/python-qt6/][6] + +KDE SIG owns this project. Therefore, it should be a quality one. And one day, it may land in Fedora Linux. + +Example of usage: + +``` +$ python + Python 3.10.4 (main, Mar 25 2022, 00:00:00) [GCC 12.0.1 20220308 (Red Hat 12.0.1-0)] on linux + Type "help", "copyright", "credits" or "license" for more information. + >>> import PyQt6 + >>> from PyQt6.QtWidgets import QApplication, QWidget + >>> import sys + >>> app = QApplication(sys.argv) + >>> window = QWidget() + >>> window.show() + >>> app.exec() + 0 +``` + +More documentation can be found at + +[https://www.pythonguis.com/tutorials/pyqt6-creating-your-first-window/][7]. + +**Installation instructions** + +This package is available for Fedora Linux 36 and Rawhide. To install it, enter these commands: + +``` +sudo dnf copr enable @kdesig/python-qt6 +sudo dnf install python3-qt6 +``` + +### Cloud-Native Utilities + +[A collection of cloud-native development tools][8]. + +These packages do not follow Fedora packaging guidelines, are statically built, and opt to bundle all dependencies. + +**Currently available packages**: + +* Terraform – terraform +* Packer – packer +* Helm – helm +* Tekton CLI – tektoncd-cli tektoncd-cli-doc +* Knative CLI – knative-client knative-client-doc +* Buildpack CLI – pack + +All build recipes can be viewed in dist-git or from Pagure:[https://pagure.io/mroche/cloud-utilities][9] + +**Installation instructions** + +These packages are available for Fedora 36 Linux and Rawhide. To install them, enter this command: + +``` +sudo dnf copr enable mroche/cloud-native-utilities +``` + +### DNF 5 + +You may be aware the DNF team is working on DNF5. There is a [change proposal][10] for Fedora Linux 38. The benefit is that every package management software — including PackageKit, and DNFDragora — should use a common *libdnf* library. If you have an application that handles RPM packages, you should definitely check out this project. + +[https://copr.fedorainfracloud.org/coprs][11][/][12][rpmsoftwaremanagement/dnf5-unstable/][13] + +Another similar project from the DNF team is + +[https://copr.fedorainfracloud.org/coprs/jmracek/dnf5-alternatives/][14]. + +**Installation instructions** + +These packages are available for Fedora Linux 35, 36 and Rawhide. To install them, enter these commands: + +``` +sudo dnf copr enable  rpmsoftwaremanagement/dnf5-unstable +sudo dnf install dnf5 +sudo dnf copr enable jmracek/dnf5-alternatives +sudo dnf install microdnf-deprecated +``` + +### Hare + +[Hare][15] is a systems programming language designed to be simple, stable and robust. Hare uses a static type system, manual memory management, and a minimal runtime. It is well suited to writing operating systems, system tools, compilers, networking software, and other low-level, high-performance tasks. A detailed overview can be found in [these slides][16]. + +My summary is: Hare is simpler than C. It can be easy. But if you insist on shooting in your legs, Hare will allow you to do it. + +[Copr project][17]. + +**Installation Instructions** + +These packages are available for Fedora Linux 35, 36 and Rawhide. They are also available for OpenSUSE Leap and Tumbleweed. To install them, enter these commands: + +``` +sudo dnf copr enable sentry/qbe +sudo dnf copr enable sentry/hare +sudo dnf install hare harec qbe +``` + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/4-cool-new-projects-to-try-in-copr-for-may-2022/ + +作者:[Miroslav Suchý][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://fedoramagazine.org/author/msuchy/ +[b]: https://github.com/lkxed +[1]: https://fedoramagazine.org/wp-content/uploads/2017/08/4-copr-945x400.jpg +[2]: https://copr.fedorainfracloud.org/ +[3]: https://docs.pagure.org/copr.copr/how_to_enable_repo.html#how-to-enable-repo +[4]: https://docs.pagure.org/copr.copr/user_documentation.html#is-it-safe-to-use-copr +[5]: https://docs.pagure.org/copr.copr/user_documentation.html +[6]: https://copr.fedorainfracloud.org/coprs/g/kdesig/python-qt6/ +[7]: https://www.pythonguis.com/tutorials/pyqt6-creating-your-first-window/ +[8]: https://copr.fedorainfracloud.org/coprs/mroche/cloud-native-utilities/ +[9]: https://pagure.io/mroche/cloud-utilities +[10]: https://fedoraproject.org/wiki/Changes/MajorUpgradeOfMicrodnf +[11]: https://copr.fedorainfracloud.org/coprs/rpmsoftwaremanagement/dnf5-unstable/ +[12]: https://copr.fedorainfracloud.org/coprs/rpmsoftwaremanagement/dnf5-unstable/ +[13]: https://copr.fedorainfracloud.org/coprs/rpmsoftwaremanagement/dnf5-unstable/ +[14]: https://copr.fedorainfracloud.org/coprs/jmracek/dnf5-alternatives/ +[15]: https://harelang.org/ +[16]: https://mirror.drewdevault.com/hare.pdf +[17]: https://copr.fedorainfracloud.org/coprs/sentry/hare/ From 48deb6146a684a64b395fbf2d793afba6bea7ee0 Mon Sep 17 00:00:00 2001 From: Peter Pan Date: Fri, 27 May 2022 21:49:59 +0800 Subject: [PATCH 028/104] =?UTF-8?q?[=E5=AE=8C=E6=88=90=E7=BF=BB=E8=AF=91]A?= =?UTF-8?q?lmaLinux=20Continues=20the=20Legacy=20of=20CentOS=20with=20the?= =?UTF-8?q?=20Release=20of=20Version=209?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 完成翻译 --- ...of CentOS with the Release of Version 9.md | 78 ------------------- ...of CentOS with the Release of Version 9.md | 78 +++++++++++++++++++ 2 files changed, 78 insertions(+), 78 deletions(-) delete mode 100644 sources/news/20220527 AlmaLinux Continues the Legacy of CentOS with the Release of Version 9.md create mode 100644 translated/news/20220527 AlmaLinux Continues the Legacy of CentOS with the Release of Version 9.md diff --git a/sources/news/20220527 AlmaLinux Continues the Legacy of CentOS with the Release of Version 9.md b/sources/news/20220527 AlmaLinux Continues the Legacy of CentOS with the Release of Version 9.md deleted file mode 100644 index 4bc1fa2699..0000000000 --- a/sources/news/20220527 AlmaLinux Continues the Legacy of CentOS with the Release of Version 9.md +++ /dev/null @@ -1,78 +0,0 @@ -[#]: subject: "AlmaLinux Continues the Legacy of CentOS with the Release of Version 9" -[#]: via: "https://news.itsfoss.com/almalinux-9-release/" -[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" -[#]: collector: "lkxed" -[#]: translator: "PeterPan0106" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -AlmaLinux Continues the Legacy of CentOS with the Release of Version 9 -====== -AlmaLinux 9 is the latest release based on Red Hat Enterprise Linux 9 with new wallpapers, and performance enhancements. - -![almalinux][1] - -If you have been keeping up with our coverages, you may have come across [AlmaLinux 9.0 beta release][2] last month. - -AlmaLinux is one of the[best RHEL alternatives][3], so a new stable release based on the latest version of Red Hat Enterprise Linux (RHEL 9) is useful as a CentOS replacement. - -The latest AlmaLinux 9 release supports the major architectures that include Intel/AMD(x86_64), ARM64 (aarch64), IBM PowerPC(ppc64le), and IBM Z (s390x). - -### AlmaLinux 9.0: What’s New? - -AlmaLinux 9.0 utilizes Linux kernel 5.14 with this release. It includes improvements for cloud and container development, with refinements to the web console. - -You can also expect performance improvements with other changes that include: - -#### New Wallpapers - -![AlmaLinux 9][4] - -With AlmaLinux 9.0, you will notice a couple of new wallpapers along with the ones available in the last release. - -The new wallpapers look pleasant to the eye and offer a few background variations. - -#### Linux Kernel 5.14 - -One of the significant changes, Linux Kernel 5.14, brings newer hardware support, among various other improvements. - -You can read more about the improvements in Linux kernel 5.14 in our [older coverage][5]. - -#### Updated Packages - -It’s no surprise that this release comes with new package updates. Some include Git 2.31, PHP 8.0, Perl 5.32, and MySQL 8.0. - -GCC has also been updated to its latest version, 11. - -To explore all the technical changes, you can refer to the [official release notes][6]. - -### Download AlmaLinux 9.0 - -You can grab the latest ISO through the [official mirrors][7] available on the download page. A .torrent file is also available in the mirrors. - -[AlmaLinux 9.0][8] - -*What do you think of AlmaLinux 9.0 release based on RHEL? Planning to use it for your server? Let me know your thoughts in the comments below.* - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/almalinux-9-release/ - -作者:[Ankush Das][a] -选题:[lkxed][b] -译者:[PeterPan0106](https://github.com/PeterPan0106) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://news.itsfoss.com/author/ankush/ -[b]: https://github.com/lkxed -[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/alma-linux-9.jpg -[2]: https://linux.cn/article-14500-1.html -[3]: https://itsfoss.com/rhel-based-server-distributions/ -[4]: https://news.itsfoss.com/wp-content/uploads/2022/05/alma-linux-wallpapers-9-1024x609.jpg -[5]: https://news.itsfoss.com/kernel-5-14-release/ -[6]: https://wiki.almalinux.org/release-notes/9.0.html -[7]: https://mirrors.almalinux.org/isos.html -[8]: https://mirrors.almalinux.org/isos.html diff --git a/translated/news/20220527 AlmaLinux Continues the Legacy of CentOS with the Release of Version 9.md b/translated/news/20220527 AlmaLinux Continues the Legacy of CentOS with the Release of Version 9.md new file mode 100644 index 0000000000..922ca2c77b --- /dev/null +++ b/translated/news/20220527 AlmaLinux Continues the Legacy of CentOS with the Release of Version 9.md @@ -0,0 +1,78 @@ +[#]: subject: "AlmaLinux Continues the Legacy of CentOS with the Release of Version 9" +[#]: via: "https://news.itsfoss.com/almalinux-9-release/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "PeterPan0106" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +AlmaLinux 9发布,继承了 CentOS的目标 +====== +AlmaLinux 9 是基于 Red Hat Enterprise Linux 9 的最新版本,添加了新的壁纸并进一步增强了性能。 + +![almalinux][1] + +如果您一直在关注我们的话,应当知道 [AlmaLinux 9.0 测试版][2] 上月发布。 + +AlmaLinux 是目前[最好的 RHEL 衍生版][3]之一。所以最新的稳定版也是基于RHEL 9进行制作并发布,这也成为了CentOS的一个很好的替代品。 + +最新的 AlmaLinux 9 支持所有主流架构,包括 Intel/AMD(x86_64)、ARM64 (aarch64)、IBM PowerPC(ppc64le)和 IBM Z (s390x)。 + +### AlmaLinux 9.0 有哪些改变呢 + +AlmaLinux 9.0 在这个版本中使用了 Linux 内核 5.14。它包括对云和容器开发的改进,以及对网络控制台的完善。 + +还包括其他变化带来的性能改进。更新包括: + +#### 新壁纸 + +![AlmaLinux 9][4] + +在AlmaLinux 9.0中,更新了一些新的壁纸。 + +这些新的壁纸看起来很美观,并提供了更丰富的选择。 + +#### Linux 内核 5.14 + +最大的变化是升级到了Linux 内核 5.14,带来了更新的硬件支持,以及其他各种改进。 + + Linux kernel 5.14 的改进详见 [这篇文章][5]. + +#### 更新的软件包 + +这个版本带有新的软件包更新。其中包括Git 2.31、PHP 8.0、Perl 5.32和MySQL 8.0。 + +GCC也被更新到最新的GCC 11。 + +更多技术方面的更新详见 [官方更新日志][6]. + +### 下载 AlmaLinux 9.0 + +你可以在 [官方镜像网站][7] 下载最新的镜像。在镜像站也包含了 .torrent 文件的下载选项。 + +[AlmaLinux 9.0][8] + +*您认为基于 RHEL 的最新版 AlmaLinux 9.0 怎么样呢?您有计划在服务器上迁移到最新的版本吗?欢迎评论。* + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/almalinux-9-release/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[PeterPan0106](https://github.com/PeterPan0106) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/alma-linux-9.jpg +[2]: https://linux.cn/article-14500-1.html +[3]: https://itsfoss.com/rhel-based-server-distributions/ +[4]: https://news.itsfoss.com/wp-content/uploads/2022/05/alma-linux-wallpapers-9-1024x609.jpg +[5]: https://news.itsfoss.com/kernel-5-14-release/ +[6]: https://wiki.almalinux.org/release-notes/9.0.html +[7]: https://mirrors.almalinux.org/isos.html +[8]: https://mirrors.almalinux.org/isos.html From 833e7b5185134b440fa5f9abeb6ff46ac72ed98e Mon Sep 17 00:00:00 2001 From: lkxed Date: Fri, 27 May 2022 23:08:13 +0800 Subject: [PATCH 029/104] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?news]:=2020220527=20TypeScript=20Based=20Headless=20CMS=20-Payl?= =?UTF-8?q?oad-=20Becomes=20Open=20Source.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...dless CMS -Payload- Becomes Open Source.md | 79 +++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 sources/news/20220527 TypeScript Based Headless CMS -Payload- Becomes Open Source.md diff --git a/sources/news/20220527 TypeScript Based Headless CMS -Payload- Becomes Open Source.md b/sources/news/20220527 TypeScript Based Headless CMS -Payload- Becomes Open Source.md new file mode 100644 index 0000000000..0e99f3c1d1 --- /dev/null +++ b/sources/news/20220527 TypeScript Based Headless CMS -Payload- Becomes Open Source.md @@ -0,0 +1,79 @@ +[#]: subject: "TypeScript Based Headless CMS ‘Payload’ Becomes Open Source" +[#]: via: "https://news.itsfoss.com/payload-open-source/" +[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +TypeScript Based Headless CMS ‘Payload’ Becomes Open Source +====== +A new option added to the list of open-source headless CMS. Now, a better headless WordPress alternative? + +![payload][1] + +Since its first beta release a little over a year ago, Payload has slowly built a name for itself within the web development community as a headless Content Management System (CMS). For a bit of background information, Payload is a CMS tailored specifically toward being simpler to develop websites, web apps, or native applications. + +Recently, they decided to go completely open-source, putting it among the likes of some of the [best open-source CMS available][2]. + +However, that raises some questions, like what will their business model look like? And what are the plans for Payload CMS? Let’s take a brief look. + +### Why Has Payload Gone Open-Source? + +Since its initial launch back in 2021, Payload has received many contributions from the open-source community. As Payload said in their [recent announcement][3], the decision to go open-source is massive, and it allows projects to read much greater heights than could ever be possible if kept behind closed doors. + +![][4] + +In addition, this openness often results in much greater levels of trust from the developer community. This trust also extends to businesses, naturally turning to the platform with the greatest developer support and trust. + +Due to all these reasons, Payload is now switching to the MIT license. This allows anyone to modify, distribute, and use Payload for free and without limitations. + +However, Payload still needs money flowing in to operate sustainably. So, that begs the question, how will Payload make money? + +### How Payload Is Going To Make Money? + +As is always the case, Payload requires some financial backing to remain afloat. They have outlined a two-part plan that should both provide users with even more convenience-focused features while still leaving self-hosted customers incredible flexibility. + +![][5] + +#### Enterprise Licenses + +This option is extremely similar to other open-source CMS software services. These licenses would provide more advanced SSO options and give the developers guaranteed response times from the core Payload team. + +These licenses should look appealing to larger corporations, especially those that require the utmost reliability. + +#### Cloud Hosting + +This option is quite attractive, as it combines multiple services to create the most convenient experience possible. Although traditional hosting remains reasonably easy, as soon as you add in a database, permanent file storage, and deliberate infrastructure for Node apps, you are left with four or five different services that all need to work seamlessly together. + +It should be noted that this is not required, and users are still encouraged to host their instances. However, this service simply takes a lot of the expenses and challenges associated with hosting out of the equation. + +As of now, things haven’t been finalized. But, you can keep an eye on the discussions on [GitHub][6] to keep up with it. + +### Wrapping Up + +As an emerging CMS option, it is great to see Payload take this step to become a popular alternative to WordPress and other options. Additionally, it appears to me that the Payload team is confident in their new business model, signifying a (hopefully) bright future for them. + +[Payload CMS][7] + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/payload-open-source/ + +作者:[Jacob Crume][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/jacob/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/payload-opensource.jpg +[2]: https://itsfoss.com/open-source-cms/ +[3]: https://payloadcms.com/blog/open-source +[4]: https://news.itsfoss.com/wp-content/uploads/2022/05/payloadcms-demo.png +[5]: https://news.itsfoss.com/wp-content/uploads/2022/05/payload-free-opensource-1024x576.jpg +[6]: https://github.com/payloadcms/payload +[7]: https://payloadcms.com/ From ef34ce8a772a5db359e3c40b0a2b93a6a9d1a9f7 Mon Sep 17 00:00:00 2001 From: lkxed Date: Fri, 27 May 2022 23:12:06 +0800 Subject: [PATCH 030/104] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?news]:=2020220527=20Tails=20Linux=20Users=20Warned=20Against=20?= =?UTF-8?q?Using=20the=20Tor=20Browser-=20Here-s=20why!.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...inst Using the Tor Browser- Here-s why!.md | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 sources/news/20220527 Tails Linux Users Warned Against Using the Tor Browser- Here-s why!.md diff --git a/sources/news/20220527 Tails Linux Users Warned Against Using the Tor Browser- Here-s why!.md b/sources/news/20220527 Tails Linux Users Warned Against Using the Tor Browser- Here-s why!.md new file mode 100644 index 0000000000..6096910ef4 --- /dev/null +++ b/sources/news/20220527 Tails Linux Users Warned Against Using the Tor Browser- Here-s why!.md @@ -0,0 +1,65 @@ +[#]: subject: "Tails Linux Users Warned Against Using the Tor Browser: Here’s why!" +[#]: via: "https://news.itsfoss.com/tails-tor-browser/" +[#]: author: "Rishabh Moharir https://news.itsfoss.com/author/rishabh/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Tails Linux Users Warned Against Using the Tor Browser: Here’s why! +====== +A crucial fix for a dangerous vulnerability that bypasses security in Tor browser is due to arrive in Tails 5.1. Here’s what it is all about. + +![tails][1] + +The developers of the security-focused portable Linux distro, **Tails**, have recently released an important advisory regarding its current release. They have warned users to avoid entering or using any personal or sensitive information while using Tor Browser on **Tails 5.0 or older**. + +Tor Browser is the de-facto web browser used in Tails and helps protect the user’s identity online when connected to the Internet. It is mainly used by various journalists and activists to evade censorship. Everyday users can use it too. + +### What’s the problem? + +Recently, two nasty vulnerabilities have been found that enable harmful websites to steal the user’s information from other websites. + +To be specific, the vulnerabilities have been identified as CVE-2022-1802 and CVE-2022-1529 in an [advisory published by Mozilla.][2] + +The Tails advisory best explains this: + +> “For example, after you visit a malicious website, an attacker controlling this website might access the password or other sensitive information that you send to other websites afterwards during the same Tails session.” + +### Should You Stop Using Tails Linux Distro? + +Not necessarily. + +Other apps in Tails, especially Thunderbird, are safe to use since the JavaScript is disabled if in use. + +Furthermore, you can even enable the safest security level in the Tor browser. This is preferred because the JavaScript engine gets disabled. Do note that this will make websites function improperly. + +In other words, the Tails Linux distro is still safe to use if you know what you’re doing. + +### A Fix is Coming Soon + +Good news! Mozilla has already patched these bugs upstream and now it’s up to the Tails team when it comes to releasing the fix. + +Here’s what they have stated – + +> This vulnerability will be fixed in Tails 5.1 (**May 31**), but our team doesn’t have the capacity to publish an emergency release earlier. + +So, your best option is to wait for the Tails 5.1 release next week. You can read the [official advisory][3] released by Tails devs to know more. + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/tails-tor-browser/ + +作者:[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/05/tails-5-0-privacy-issue.jpg +[2]: https://www.mozilla.org/en-US/security/advisories/mfsa2022-19/ +[3]: https://tails.boum.org/security/prototype_pollution/index.en.html From 5bc244f765cca78ac1986a9bd45c5b6434d23c31 Mon Sep 17 00:00:00 2001 From: lkxed Date: Sat, 28 May 2022 11:46:41 +0800 Subject: [PATCH 031/104] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020220528=20Top=2010=20GNOME=20Themes=20for=20Your=20Ub?= =?UTF-8?q?untu=20Desktop.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...10 GNOME Themes for Your Ubuntu Desktop.md | 205 ++++++++++++++++++ 1 file changed, 205 insertions(+) create mode 100644 sources/tech/20220528 Top 10 GNOME Themes for Your Ubuntu Desktop.md diff --git a/sources/tech/20220528 Top 10 GNOME Themes for Your Ubuntu Desktop.md b/sources/tech/20220528 Top 10 GNOME Themes for Your Ubuntu Desktop.md new file mode 100644 index 0000000000..580bf5b306 --- /dev/null +++ b/sources/tech/20220528 Top 10 GNOME Themes for Your Ubuntu Desktop.md @@ -0,0 +1,205 @@ +[#]: subject: "Top 10 GNOME Themes for Your Ubuntu Desktop" +[#]: via: "https://www.debugpoint.com/2022/05/gnome-themes-2022/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Top 10 GNOME Themes for Your Ubuntu Desktop +====== +You can use this list of 10 GNOME themes to transform your Ubuntu distro look in 2022. + +You can use GTK themes to give your GNOME or Ubuntu a sassy look without much effort. Themes are straightforward to download/install, and the result is a stunning desktop. + +There are hundreds of GTK themes available. It’s challenging to pick the best ten among them. To help you choose some of the best ones, we give you the ten best GTK based themes on this page. + +### Points to Note + +Before you apply these themes to your latest GNOME desktop and Ubuntu, a few important points. + +* All the below GNOME themes uses the GNOME Tweak tool for configuration. Also, you should install the User Themes GNOME extensions to apply these themes. + +* Moreover, if you apply these themes, the GNOME’s default light and dark styles in settings are automatically turned off. If you are using Ubuntu 22.04 and above, the accent colour is also turned off to honour custom themes. Because accent colours and the light/dark style combinations set the respective Yaru theme variant. + +* Make sure to close the Settings application in Ubuntu while applying the themes because the settings window gives default Yaru themes higher priority via the Appearance tab. + +* Finally, change the Shell and Legacy Application themes to custom themes (see the below example image). + +![Changing GNOME Theme in Tweaks Tool][1] + +### Best GNOME Themes For Your Ubuntu Desktop in 2022 + +### 1. Arc + +The first GNOME theme we want to feature in this list is the Arc theme. It is the most popular GNOME theme and is suitable for giving the best look with its looks. Arc brings a simple 2D interface with a basic flat look across the desktop. The Flat look is designed so lovely that it gives you a perfect modern desktop look without gradient or glossy effects. It also provides a nice touch to the sidebars in Nautilus and other sidebar-based apps with its Dark version. + +Arc theme comes in light, dark and darker versions. Installing the Arc theme is easy in Ubuntu because it is available in the official repo. Fire up a terminal window and run the following command to install. + +``` +sudo apt install arc-theme +``` + +If you want to install via source, you can grab the files on [GitHub][2] and follow the compilation instructions. + +After the installation, set the theme using the Tweaks tool and pair it using any Yaru-blue icons in Ubuntu for the best look. + +![Arc Darker Theme in Ubuntu GNOME][3] + +#### 2. Layan + +The second theme we highlight here is Layan. Based on material design (materia-gtk), Layan gives you a flat layout for the entire GNOME Shell. In addition, it comes with a few more rounded corners in the windows and larger shadows. Moreover, it brings light and dark variants for every taste bud. + +Perhaps the unique feature of this theme is the sidebar in Nautilus (see below image). It’s a sleek vertical bar with a little mountain icon at the top. I must say, it enhances the entire desktop look with this touch. + +We recommend that you pair it with Yaru-prusiangreen icon and a nice gradient wallpaper for best results. + +For installation, [download the theme from GitHub][4]and extract it. Then run the install.sh. + +It is also available as a snap if you prefer. + +``` +sudo snap install layan-themes +``` + +![Layan GNOME Theme][5] + +#### 3. Orchis + +If you ask me to choose one theme for all possible renovation of your desktop, then I would suggest Orchis. The Orchis theme combines Google’s material design and rounded corners with a sober colour palette. Furthermore, Orchis is bound to make an impression with its visual tone, which brings eight colour options, with each having dark, compact and light variants. + +![Orchis colour options][6] + +For an instant desktop makeover, you can easily pair Orchis with any icon themes and wallpaper. + +Installation is super easy for Orchis. [Download the package from Github][7]. Then run the below command from the installation directory for all variants and colours. + +``` +./install.sh -t all +``` + +![Orchis GNOME Theme][8] + +#### 4. Numix + +Numix theme for GNOME desktops is similar to the Arc theme featured in this list. But it’s a little different in terms of its colour tone. The primary highlight colour is complemented by its flat design. It comes with light and dark variants. However, you can only download and install the light version for free. + +You can easily install it using the following command in Ubuntu. + +``` +sudo apt install numix-gtk-theme +``` + +If you prefer the dark variant, you can get it via the [developer’s home page][9] instructions. + +![Numix Theme | image credit: Author of Numix][10] + +#### 5. Adapta + +[Adapta][11] is one of the most popular GTK themes, which inspired many child themes. The theme creators often base their theme on Adapta and modify it further. Hence you can imagine its flexibility and features. In addition, Adapta is based on Google’s Material Design principle. + +Moreover, if you like the Android user interface, you will enjoy the Adapta theme on your GNOME desktop because it brings ample padding, well-placed shadows and layers, better contrast, etc. + +Before installing, you should know that the installation size is slightly larger for a theme (~200MB+). + +Finally, you can easily install the Adapta theme using the command below. + +``` +sudo apt install adapta-gtk-theme +``` + +![Adapta Theme – follows Android Style][12] + +#### 6. Cloudy + +Cloudy provides a comfortable and smooth look. It is based on the Arc theme featured in this list. In addition, it follows the material design approach that offers a unique feel of “cloudy sky”. Moreover, the Cloudy theme offers grey and blue flavour with light/dark variants. + +If you love the colour sky blue and want a material design theme, then choose this one. + +Download this theme from the gnome-look website [here][13] and copy the extracted files in your ~/.themes directory to install. + +![Cloudy GNOME Theme][14] + +#### 7. Nord + +The Nord theme is one of the famous GTK themes you can install on the GNOME desktop. It tenders a cool and stylish piece with several colour options. In addition, all the colour options come with light and dark variants. + +The colour options are blue, green and grey. If you want this for your desktop, follow the below instructions to install. + +[Download the files][15] from gnome-look and place them in the ~/.themes folder after extract. + +![Nord Theme | Image Credit: Ant Author][16] + +#### 8. Prof-GNOME + +The eighth theme in this list is the Prof-GNOME theme. It is a perfect theme that calms your mind with its unique way of resting your eyes. In my opinion, if you want to renovate your GNOME desktop but still want it to look like a professional desktop with a legacy macOS look, then choose Prof-GNOME. + +Moreover, it is not a fancy theme but rather a legacy theme with a modern approach to design, keeping the older macOS look alive. + +To try this theme, download the files from [GitHub][17] and place them to ~/.themes after extracting. + +However, a word of caution is that it’s not updated for some time. + +![Prof-GNOME Theme][18] + +#### 9. Whitesur + +A list of GNOME themes is incomplete without a theme which makes your desktop look like macOS. Hence, as its name suggests, we present the 9th theme in this list – the popular [Whitesur theme][19]. It’s a GTK theme that helps you make your desktop look like macOS Big Sur. + +Furthermore, the Whitesur theme is compatible with non-GNOME based desktop Xfce, Cinnamon, etc. + +Pair it with the Plack Dock and Whitesur Icon theme for a complete macOS makeover. + +[Download][20] the theme from GitHub and place the files in the ~/.themes after extracting. + +![Whitesur theme for GNOME][21] + +#### 10. Ant + +The final theme in this list is Ant. The Ant is an exciting theme which is a little bold in its approach. It brings the Flat look and feels but with a twist of “Dracula” and “Bloody” flavour. + +I must say a perfect Halloween theme, and you can download it from [here][22]. + +![Ant Theme for GNOME | Image Credit: Author of Ant theme][23] + +### Closing Notes + +I hope this list of 10 best GNOME themes of 2022 encourages your to renovate the rather mundane Ubuntu distro look or any GNOME desktop setup. In the comment box below, let me know which one is your favourite? Also, add your favourite one, which you think should be on the list. + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/05/gnome-themes-2022/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/wp-content/uploads/2022/05/Changing-GNOME-Theme-in-Tweaks-Tool.jpg +[2]: https://github.com/jnsh/arc-theme +[3]: https://www.debugpoint.com/wp-content/uploads/2022/05/Arc-Darker-Theme-in-Ubuntu-GNOME-1.jpg +[4]: https://github.com/vinceliuice/Layan-gtk-theme/archive/refs/heads/master.zip +[5]: https://www.debugpoint.com/wp-content/uploads/2022/05/Layan-GNOME-Theme.jpg +[6]: https://www.debugpoint.com/wp-content/uploads/2022/05/Orchis-colour-options.jpg +[7]: https://github.com/vinceliuice/Orchis-theme/archive/refs/heads/master.zip +[8]: https://www.debugpoint.com/wp-content/uploads/2022/05/Orchis-GNOME-Theme.jpg +[9]: https://satya164.deviantart.com/art/Numix-GTK3-theme-360223962 +[10]: https://www.debugpoint.com/wp-content/uploads/2022/05/Numix-Theme.jpg +[11]: https://github.com/adapta-project/adapta-gtk-theme +[12]: https://www.debugpoint.com/wp-content/uploads/2022/05/Adapta-Theme-follows-Android-Style.jpg +[13]: https://www.gnome-look.org/p/1242416/ +[14]: https://www.debugpoint.com/wp-content/uploads/2022/05/Cloudy-GNOME-Theme.jpg +[15]: https://www.gnome-look.org/p/1267246/ +[16]: https://www.debugpoint.com/wp-content/uploads/2022/05/Nord-Theme.jpg +[17]: https://github.com/paullinuxthemer/Prof-Gnome/archive/refs/heads/master.zip +[18]: https://www.debugpoint.com/wp-content/uploads/2022/05/Prof-GNOME-Theme.jpg +[19]: https://github.com/vinceliuice/WhiteSur-gtk-theme +[20]: https://github.com/vinceliuice/WhiteSur-gtk-theme +[21]: https://www.debugpoint.com/wp-content/uploads/2022/05/Whitesur-theme-for-GNOME.jpg +[22]: https://www.gnome-look.org/p/1099856/#files +[23]: https://www.debugpoint.com/wp-content/uploads/2022/05/Ant-Theme-for-GNOME.jpg From cebbdea995c78ca40125365493d234825ff89d55 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 28 May 2022 12:20:34 +0800 Subject: [PATCH 032/104] RP @PeterPan0106 https://linux.cn/article-14644-1.html --- ...of CentOS with the Release of Version 9.md | 37 ++++++++++--------- 1 file changed, 20 insertions(+), 17 deletions(-) rename {translated/news => published}/20220527 AlmaLinux Continues the Legacy of CentOS with the Release of Version 9.md (57%) diff --git a/translated/news/20220527 AlmaLinux Continues the Legacy of CentOS with the Release of Version 9.md b/published/20220527 AlmaLinux Continues the Legacy of CentOS with the Release of Version 9.md similarity index 57% rename from translated/news/20220527 AlmaLinux Continues the Legacy of CentOS with the Release of Version 9.md rename to published/20220527 AlmaLinux Continues the Legacy of CentOS with the Release of Version 9.md index 922ca2c77b..e2515dc7e9 100644 --- a/translated/news/20220527 AlmaLinux Continues the Legacy of CentOS with the Release of Version 9.md +++ b/published/20220527 AlmaLinux Continues the Legacy of CentOS with the Release of Version 9.md @@ -3,21 +3,22 @@ [#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" [#]: collector: "lkxed" [#]: translator: "PeterPan0106" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14644-1.html" -AlmaLinux 9发布,继承了 CentOS的目标 +CentOS 的继承者 AlmaLinux 9 发布 ====== -AlmaLinux 9 是基于 Red Hat Enterprise Linux 9 的最新版本,添加了新的壁纸并进一步增强了性能。 + +> AlmaLinux 9 是基于 Red Hat Enterprise Linux 9 的最新版本,添加了新的壁纸并进一步增强了性能。 ![almalinux][1] -如果您一直在关注我们的话,应当知道 [AlmaLinux 9.0 测试版][2] 上月发布。 +如果你一直在关注我们的话,应当知道 [AlmaLinux 9.0 测试版][2] 已于上月发布。 -AlmaLinux 是目前[最好的 RHEL 衍生版][3]之一。所以最新的稳定版也是基于RHEL 9进行制作并发布,这也成为了CentOS的一个很好的替代品。 +AlmaLinux 是目前 [最好的 RHEL 替代版][3] 之一。其最新的稳定版是基于 RHEL 9 的,这也成为了 CentOS 的一个很好的替代品。 -最新的 AlmaLinux 9 支持所有主流架构,包括 Intel/AMD(x86_64)、ARM64 (aarch64)、IBM PowerPC(ppc64le)和 IBM Z (s390x)。 +最新的 AlmaLinux 9 支持所有主流架构,包括 Intel/AMD(x86_64)、ARM64 (aarch64)、IBM PowerPC(ppc64le)和 IBM Z(s390x)。 ### AlmaLinux 9.0 有哪些改变呢 @@ -29,31 +30,33 @@ AlmaLinux 9.0 在这个版本中使用了 Linux 内核 5.14。它包括对云和 ![AlmaLinux 9][4] -在AlmaLinux 9.0中,更新了一些新的壁纸。 +在 AlmaLinux 9.0 中,更新了一些新的壁纸。 这些新的壁纸看起来很美观,并提供了更丰富的选择。 #### Linux 内核 5.14 -最大的变化是升级到了Linux 内核 5.14,带来了更新的硬件支持,以及其他各种改进。 +最大的变化是升级到了 Linux 内核 5.14,它带来了更新的硬件支持,以及其他各种改进。 - Linux kernel 5.14 的改进详见 [这篇文章][5]. +Linux 内核 5.14 的改进详见 [这篇文章][5]。 #### 更新的软件包 -这个版本带有新的软件包更新。其中包括Git 2.31、PHP 8.0、Perl 5.32和MySQL 8.0。 +这个版本带有新的软件包更新。其中包括 Git 2.31、PHP 8.0、Perl 5.32 和 MySQL 8.0。 -GCC也被更新到最新的GCC 11。 +GCC 也被更新到最新的 GCC 11。 -更多技术方面的更新详见 [官方更新日志][6]. +其它更新包括 Python 3.9 和最新版的 LLVM、Rust 和 Go compilers,使应用程序的现代化更快、更容易。 + +更多技术方面的更新详见 [官方更新日志][6]。 ### 下载 AlmaLinux 9.0 你可以在 [官方镜像网站][7] 下载最新的镜像。在镜像站也包含了 .torrent 文件的下载选项。 -[AlmaLinux 9.0][8] +> **[AlmaLinux 9.0][8]** -*您认为基于 RHEL 的最新版 AlmaLinux 9.0 怎么样呢?您有计划在服务器上迁移到最新的版本吗?欢迎评论。* +*你认为基于 RHEL 的最新版 AlmaLinux 9.0 怎么样呢?你有计划在服务器上迁移到最新的版本吗?欢迎评论。* -------------------------------------------------------------------------------- @@ -62,7 +65,7 @@ via: https://news.itsfoss.com/almalinux-9-release/ 作者:[Ankush Das][a] 选题:[lkxed][b] 译者:[PeterPan0106](https://github.com/PeterPan0106) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 43c0358f4d0dc20dce4af4281503b20b3d155a46 Mon Sep 17 00:00:00 2001 From: lkxed Date: Sat, 28 May 2022 13:11:12 +0800 Subject: [PATCH 033/104] =?UTF-8?q?[=E6=8F=90=E4=BA=A4=E8=AF=91=E6=96=87][?= =?UTF-8?q?tech]:=2020180712=20An=20introduction=20to=20Go=20arrays=20and?= =?UTF-8?q?=20slices.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...An introduction to Go arrays and slices.md | 207 ----------------- ...An introduction to Go arrays and slices.md | 216 ++++++++++++++++++ 2 files changed, 216 insertions(+), 207 deletions(-) delete mode 100644 sources/tech/20180712 An introduction to Go arrays and slices.md create mode 100644 translated/tech/20180712 An introduction to Go arrays and slices.md diff --git a/sources/tech/20180712 An introduction to Go arrays and slices.md b/sources/tech/20180712 An introduction to Go arrays and slices.md deleted file mode 100644 index 00700b26b6..0000000000 --- a/sources/tech/20180712 An introduction to Go arrays and slices.md +++ /dev/null @@ -1,207 +0,0 @@ -[#]: subject: "An introduction to Go arrays and slices" -[#]: via: "https://opensource.com/article/18/7/introduction-go-arrays-and-slices" -[#]: author: "Mihalis Tsoukalos https://opensource.com/users/mtsouk" -[#]: collector: "lkxed" -[#]: translator: "lkxed" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -An introduction to Go arrays and slices -====== -Learn the pros and cons of storing data in Go using arrays and slices and why one is usually better than the other. - -![Testing certificate chains with a 34-line Go program][1] - -Image by: carrotmadman6. Modified by Opensource.com. CC BY-SA 2.0 - -In this fourth article in the series, I will explain [Go][5] arrays and slices, how to use them, and why you'll usually want to choose one over the other. - -### Arrays - -Arrays are one of the most popular data structures among programming languages for two main reasons: They are simple and easy to understand, and they can store many different kinds of data. - -You can declare a Go array named `anArray` that stores four integers with the following: - -``` -anArray := [4]int{-1, 2, 0, -4} -``` - -The array's size should be stated before its type, which should be defined before its elements. The `len()` function can help you find the length of any array. The size of the array above is 4. - -If you are familiar with other programming languages, you might try to access all the elements of an array using a `for` loop. However, as you will see below, Go's `range` keyword allows you to access all the elements of an array or a slice in a more elegant way. - -Last, here is how you can define an array with two dimensions: - -``` -twoD := [3][3]int{ -    {1, 2, 3}, -    {6, 7, 8}, -    {10, 11, 12}} -``` - -The `arrays.go` source file explains the use of Go arrays. The most important code in `arrays.go` is: - -``` -for i := 0; i < len(twoD); i++ { -        k := twoD[i] -        for j := 0; j < len(k); j++ { -                fmt.Print(k[j], " ") -        } -        fmt.Println() -} - -for _, a := range twoD { -        for _, j := range a { -                fmt.Print(j, " ") -        } -        fmt.Println() -} -``` - -This shows how you can iterate over the elements of an array using a `for` loop and the `range` keyword. The rest of the code of `arrays.go` shows how to pass an array into a function as a parameter. - -Following is the output of `arrays.go` : - -``` -$ go run arrays.go -Before change(): [-1 2 0 -4] -After change(): [-1 2 0 -4] -1 2 3 -6 7 8 -10 11 12 -1 2 3 -6 7 8 -10 11 12 -``` - -This output demonstrates that the changes you make to an array inside a function are lost after the function exits. - -### Disadvantages of arrays - -Go arrays have many disadvantages that will make you reconsider using them in your Go projects. First, you can't change the size of an array after you define it, which means Go arrays are not dynamic. Putting it simply, if you need to add an element to an array that doesn't have any space left, you will need to create a bigger array and copy all the elements of the old array to the new one. Second, when you pass an array to a function as a parameter, you actually pass a copy of the array, which means any changes you make to an array inside a function will be lost after the function exits. Last, passing a large array to a function can be pretty slow, mostly because Go has to create a copy of the array. - -The solution to all these problems is to use Go slices. - -### Slices - -A Go slice is similar to a Go array without the shortcomings. First, you can add an element to an existing slice using the `append()` function. Moreover, Go slices are implemented internally using arrays, which means Go uses an underlying array for each slice. - -Slices have a *capacity* property and a *length* property, which are not always the same. The length of a slice is the same as the length of an array with the same number of elements, and it can be found using the `len()` function. The capacity of a slice is the room that has currently been allocated for the slice, and it can be found with the `cap()` function. - -As slices are dynamic in size, if a slice runs out of room (which means the current length of the array is the same as its capacity while you are trying to add another element to the array), Go automatically doubles its current capacity to make room for more elements and adds the requested element to the array. - -Additionally, slices are passed by reference to functions, which means what is actually passed to a function is the memory address of the slice variable, and any modifications you make to a slice inside a function won't get lost after the function exits. As a result, passing a big slice to a function is significantly faster than passing an array with the same number of elements to the same function. This is because Go will not have to make a copy of the slice—it will just pass the memory address of the slice variable. - -Go slices are illustrated in `slice.go`, which contains the following code: - -``` -package main - -import ( -        "fmt" -) - -func negative(x []int) { -        for i, k := range x { -                x[i] = -k -        } -} - -func printSlice(x []int) { -        for _, number := range x { -                fmt.Printf("%d ", number) -        } -        fmt.Println() -} - -func main() { -        s := []int{0, 14, 5, 0, 7, 19} -        printSlice(s) -        negative(s) -        printSlice(s) - -        fmt.Printf("Before. Cap: %d, length: %d\n", cap(s), len(s)) -        s = append(s, -100) -        fmt.Printf("After. Cap: %d, length: %d\n", cap(s), len(s)) -        printSlice(s) - -        anotherSlice := make([]int, 4) -        fmt.Printf("A new slice with 4 elements: ") -        printSlice(anotherSlice) -} -``` - -The biggest difference between a slice definition and an array definition is that you do not need to specify the size of the slice, which is determined by the number of elements you want to put in it. Additionally, the `append()` function allows you to add an element to an existing slice—notice that even if the capacity of a slice allows you to add an element to that slice, its length will not be modified unless you call `append()`. The `printSlice()` function is a helper function used for printing the elements of its slice parameter, whereas the `negative()` function processes all the elements of its slice parameter. - -The output of `slice.go` is: - -``` -$ go run slice.go -0 14 5 0 7 19 -0 -14 -5 0 -7 -19 -Before. Cap: 6, length: 6 -After. Cap: 12, length: 7 -0 -14 -5 0 -7 -19 -100 -A new slice with 4 elements: 0 0 0 0 -``` - -Please note that when you create a new slice and allocate memory space for a given number of elements, Go will automatically initialize all the elements to the zero value of its type, which in this case is 0. - -### Referencing arrays with slices - -Go allows you to reference an existing array with a slice using the `[:]` notation. In that case, any changes you make into a slice's function will be propagated to the array—this is illustrated in `refArray.go`. Please remember that the `[:]` notation does not create a copy of the array, just a reference to it. - -The most interesting part of `refArray.go` is: - -``` -func main() { -        anArray := [5]int{-1, 2, -3, 4, -5} -        refAnArray := anArray[:] - -        fmt.Println("Array:", anArray) -        printSlice(refAnArray) -        negative(refAnArray) -        fmt.Println("Array:", anArray) -} -``` - -The output of `refArray.go` is: - -``` -$ go run refArray.go -Array: [-1 2 -3 4 -5] --1 2 -3 4 -5 -Array: [1 -2 3 -4 5] -``` - -So, the elements of the `anArray` array changed because of the slice reference to it. - -### Summary - -Although Go supports both arrays and slices, it should be clear by now that you will most likely use slices because they are more versatile and powerful than Go arrays. There are only a few occasions where you will need to use an array instead of a slice. The most obvious one is when you are absolutely sure that you will need to store a fixed number of elements. - -You can find the Go code of `arrays.go`, `slice.go`, and `refArray.go` at [GitHub][6]. - -If you have any questions or feedback, please leave a comment below or reach out to me on [Twitter][7]. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/18/7/introduction-go-arrays-and-slices - -作者:[Mihalis Tsoukalos][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/mtsouk -[b]: https://github.com/lkxed -[1]: https://opensource.com/sites/default/files/lead-images/traffic-light-go.png -[2]: https://opensource.com/article/18/5/creating-random-secure-passwords-go -[3]: https://opensource.com/article/18/5/building-concurrent-tcp-server-go -[4]: https://opensource.com/article/18/6/copying-files-go -[5]: https://golang.org/ -[6]: https://github.com/mactsouk/opensource.com -[7]: https://twitter.com/mactsouk diff --git a/translated/tech/20180712 An introduction to Go arrays and slices.md b/translated/tech/20180712 An introduction to Go arrays and slices.md new file mode 100644 index 0000000000..40e3f9a3b6 --- /dev/null +++ b/translated/tech/20180712 An introduction to Go arrays and slices.md @@ -0,0 +1,216 @@ +[#]: subject: "An introduction to Go arrays and slices" +[#]: via: "https://opensource.com/article/18/7/introduction-go-arrays-and-slices" +[#]: author: "Mihalis Tsoukalos https://opensource.com/users/mtsouk" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Go 数组和切片的介绍 +====== +了解使用数组和切片在 Go 中存储数据的优缺点,以及为什么其中一个比另一个更好。 + +![][1] + +图源:carrotmadman6,经 Opensource.com 修改,CC BY-SA 2.0 + +在本系列的第四篇文章中,我将解释 [Go][5] 数组和切片,包括如何使用它们,以及为什么你通常要选择其中一个而不是另一个。 + +### 数组 + +数组是编程语言中最流行的数据结构之一,主要原因有两个:一是简单易懂,二是可以存储许多不同类型的数据。 + +你可以声明一个名为 `anArray` 的 Go 数组,该数组存储四个整数,如下所示: + +``` +anArray := [4]int{-1, 2, 0, -4} +``` +数组的大小应该在它的类型之前声明,而类型应该在声明元素之前定义。`len()` 函数可以帮助你得到任何数组的长度。上面数组的大小是 4。 + +如果你熟悉其他编程语言,你可能会尝试使用 `for` 循环来遍历数组。Go 当然也支持 `for` 循环,不过,正如你将在下面看到的,Go 的 `range` 关键字可以让你更优雅地遍历数组或切片。 + +最后,你也可以定义一个二维数组,如下: + +``` +twoD := [3][3]int{ + {1, 2, 3}, + {6, 7, 8}, + {10, 11, 12}} +``` + +The `arrays.go` source file explains the use of Go arrays. The most important code in `arrays.go` is: +`arrays.go` 源文件中包含了 Go 数组的示例代码。其中最重要的部分是: + +``` +for i := 0; i < len(twoD); i++ { + k := twoD[i] + for j := 0; j < len(k); j++ { + fmt.Print(k[j], " ") + } + fmt.Println() +} + +for _, a := range twoD { + for _, j := range a { + fmt.Print(j, " ") + } + fmt.Println() +} +``` + +通过上述代码,我们知道了如何使用 `for` 循环和 `range` 关键字迭代数组的元素。`arrays.go` 的其余代码则展示了如何将数组作为参数传递给函数。 + +以下是 `arrays.go` 的输出: + +``` +$ go run arrays.go +Before change(): [-1 2 0 -4] +After change(): [-1 2 0 -4] +1 2 3 +6 7 8 +10 11 12 +1 2 3 +6 7 8 +10 11 12 +``` + +这个输出告诉我们:对函数内的数组所做的更改,会在函数退出后丢失。 + +### 数组的缺点 + +Go 数组有很多缺点,你应该重新考虑是否要在 Go 项目中使用它们。 + +首先,数组定义之后,大小就无法改变,这意味着 Go 数组不是动态的。简而言之,如果你需要将一个元素添加到一个没有剩余空间的数组中,你将需要创建一个更大的数组,并将旧数组的所有元素复制到新数组中。 + +其次,当你将数组作为参数传递给函数时,实际上是传递了数组的副本,这意味着你对函数内部的数组所做的任何更改,都将在函数退出后丢失。 + +最后,将大数组传递给函数可能会很慢,主要是因为 Go 必须创建数组的副本。 + +以上这些问题的解决方案,就是使用 Go 切片。 + +### 切片 + +Go 切片与 Go 数组类似,但是它没有后者的缺点。 + +首先,你可以使用 `append()` 函数将元素添加到现有切片中。此外,Go 切片在内部使用数组实现,这意味着 Go 中每个切片都有一个底层数组。 + +切片具有 `capacity` 属性和 `length` 属性,它们并不总是相同的。切片的长度与元素个数相同的数组的长度相同,可以使用 `len()` 函数得到。切片的容量是当前为切片分配的空间,可以使用 `cap()` 函数得到。 + +由于切片的大小是动态的,如果切片空间不足(也就是说,当你尝试再向切片中添加一个元素时,底层数组的长度恰好与容量相等),Go 会自动将它的当前容量加倍,使其空间能够容纳更多元素,然后将请求的元素添加到底层数组中。 + +此外,切片是通过引用传递给函数的,这意味着实际传递给函数的是切片变量的内存地址,这样一来,你对函数内部的切片所做的任何修改,都不会在函数退出后丢失。因此,将大切片传递给函数,要比将具有相同数量元素的数组传递给同一函数快得多。这是因为 Go 不必拷贝切片 —— 它只需传递切片变量的内存地址。 + +Go slices are illustrated in `slice.go`, which contains the following code: +`slice.go` 源文件中有 Go 切片的代码示例,其中包含以下代码: + +``` +package main + +import ( + "fmt" +) + +func negative(x []int) { + for i, k := range x { + x[i] = -k + } +} + +func printSlice(x []int) { + for _, number := range x { + fmt.Printf("%d ", number) + } + fmt.Println() +} + +func main() { + s := []int{0, 14, 5, 0, 7, 19} + printSlice(s) + negative(s) + printSlice(s) + + fmt.Printf("Before. Cap: %d, length: %d\n", cap(s), len(s)) + s = append(s, -100) + fmt.Printf("After. Cap: %d, length: %d\n", cap(s), len(s)) + printSlice(s) + + anotherSlice := make([]int, 4) + fmt.Printf("A new slice with 4 elements: ") + printSlice(anotherSlice) +} +``` + +切片和数组在定义方式上的最大区别就在于:你不需要指定切片的大小。实际上,切片的大小取决于你要放入其中的元素数量。此外,`append()` 函数允许你将元素添加到现有切片 —— 请注意,即使切片的容量允许你将元素添加到该切片,它的长度也不会被修改,除非你调用 `append ()`。上述代码中的 `printSlice()` 函数是一个辅助函数,用于打印切片中的所有元素,而 `negative()` 函数将切片中的每个元素都变为各自的相反数。 + +运行 `slice.go` 将得到以下输出: + +``` +$ go run slice.go +0 14 5 0 7 19 +0 -14 -5 0 -7 -19 +Before. Cap: 6, length: 6 +After. Cap: 12, length: 7 +0 -14 -5 0 -7 -19 -100 +A new slice with 4 elements: 0 0 0 0 +``` + +请注意,当你创建一个新切片,并为给定数量的元素分配内存空间时,Go 会自动地将所有元素都初始化为其类型的零值,在本例中为 0(`int` 类型的零值)。 + +### 使用切片来引用数组 + +Go 允许你使用 `[:]` 语法,使用切片来引用现有的数组。在这种情况下,你对切片所做的任何更改都将传播到数组中 —— 详见 `refArray.go`。请记住,使用 `[:]` 不会创建数组的副本,它只是对数组的引用。 + +`refArray.go` 中最有趣的部分是: + +``` +func main() { + anArray := [5]int{-1, 2, -3, 4, -5} + refAnArray := anArray[:] + + fmt.Println("Array:", anArray) + printSlice(refAnArray) + negative(refAnArray) + fmt.Println("Array:", anArray) +} +``` + +运行 `refArray.go`,输出如下: + +``` +$ go run refArray.go +Array: [-1 2 -3 4 -5] +-1 2 -3 4 -5 +Array: [1 -2 3 -4 5] +``` + +我们可以发现:对 `anArray` 数组的切片引用进行了操作后,它本身也被改变了。 + +### 总结 + +尽管 Go 提供了数组和切片两种类型,你很可能还是会使用切片,因为它们比 Go 数组更加通用、强大。只有少数情况需要使用数组而不是切片,特别是当你完全确定元素的数量固定不变时。 + +你可以在 [GitHub][6] 上找到 `arrays.go`、`slice.go` 和 `refArray.go` 的源代码。 + +如果您有任何问题或反馈,请在下方发表评论或在 [Twitter][7] 上与我联系。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/18/7/introduction-go-arrays-and-slices + +作者:[Mihalis Tsoukalos][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/mtsouk +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/traffic-light-go.png +[2]: https://opensource.com/article/18/5/creating-random-secure-passwords-go +[3]: https://opensource.com/article/18/5/building-concurrent-tcp-server-go +[4]: https://opensource.com/article/18/6/copying-files-go +[5]: https://golang.org/ +[6]: https://github.com/mactsouk/opensource.com +[7]: https://twitter.com/mactsouk From 5922a9167d48f33cfa593e7f4c8d2ac279fa8a36 Mon Sep 17 00:00:00 2001 From: lkxed Date: Sat, 28 May 2022 13:19:20 +0800 Subject: [PATCH 034/104] Delete 20220525 Open Source Initiative Releases News Blog On WordPress.md --- ...tiative Releases News Blog On WordPress.md | 42 ------------------- 1 file changed, 42 deletions(-) delete mode 100644 sources/news/20220525 Open Source Initiative Releases News Blog On WordPress.md diff --git a/sources/news/20220525 Open Source Initiative Releases News Blog On WordPress.md b/sources/news/20220525 Open Source Initiative Releases News Blog On WordPress.md deleted file mode 100644 index 898a6245ad..0000000000 --- a/sources/news/20220525 Open Source Initiative Releases News Blog On WordPress.md +++ /dev/null @@ -1,42 +0,0 @@ -[#]: subject: "Open Source Initiative Releases News Blog On WordPress" -[#]: via: "https://www.opensourceforu.com/2022/05/open-source-initiative-releases-news-blog-on-wordpress/" -[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" -[#]: collector: "lkxed" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Open Source Initiative Releases News Blog On WordPress -====== -![osi][1] - -The Open Source Initiative (OSI), a public benefit corporation that oversees the Open Source Definition, has launched a WordPress news [blog][2]. Stefano Maffulli was appointed as OSI’s first Executive Director in 2021, and he is leading the organisation in overhauling its web presence. - -The blog was launched on a subdomain of the opensource.org website, which runs Drupal 7 and is self-hosted on a Digital Ocean droplet. It is also tightly integrated with CiviCRM to manage member subscriptions, individual donations, sponsorship tracking, and newsletter distribution. - -As Drupal 7 approaches its end of life in November 2022, the team intends to migrate everything to WordPress. They looked into managed Drupal hosting but discovered it was more expensive and required them to migrate to a more recent version of Drupal. Because D7 themes and plugins are incompatible with D9+, they saw no advantage in terms of time or simplicity. - -Because the Tavern’s theme wasn’t yet on GitHub, Maffulli hired a developer to create a simple child theme based on the Twenty Twenty-Two default theme using WordPress’ new full-site editing features. He expressed gratitude for the opportunity to learn the fundamentals of FSE while overseeing the project. - -Some OSI employees were already familiar with WordPress, which influenced their decision to use the software. The extensive functionality and third-party integrations were also important considerations. OSI is also looking into ways to give its members the ability to comment. This would necessitate a method to integrate authentication with CiviCRM in order to access members’ records. - -The new Voices of Open Source blog began by highlighting the OSI affiliate network, which includes 80 organisations such as Mozilla, Wikimedia, the Linux Foundation, OpenUK, and others. - -“One of the main objectives for OSI in 2022 is to reinforce our communication channels,” Maffulli said. “We’re improving the perception of OSI as a reliable, trustworthy organization. The OSI didn’t have a regular publishing schedule before, nor a content plan. Now we have established a regular cadence, publishing at least once a week (often more), commenting on recent news like a winning against a patent troll or court decisions about open source licenses, featuring our sponsors, and offering opinions on topics of interest for the wider community. It’s a starting point to affirm OSI as a convener of conversations among various souls of the open source communities.” - --------------------------------------------------------------------------------- - -via: https://www.opensourceforu.com/2022/05/open-source-initiative-releases-news-blog-on-wordpress/ - -作者:[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/05/osi-e1653464907238.jpg -[2]: https://blog.opensource.org/ From 3ac7492bfbfc79d466ebf7c8dad9c9e46ec2ecd7 Mon Sep 17 00:00:00 2001 From: lkxed Date: Sat, 28 May 2022 13:22:25 +0800 Subject: [PATCH 035/104] =?UTF-8?q?[=E7=94=B3=E9=A2=86=E5=8E=9F=E6=96=87][?= =?UTF-8?q?news]:=2020220523=20System76=20Collaborates=20with=20HP=20for?= =?UTF-8?q?=20a=20Powerful=20Linux=20Laptop=20for=20Developers.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...orates with HP for a Powerful Linux Laptop for Developers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/news/20220523 System76 Collaborates with HP for a Powerful Linux Laptop for Developers.md b/sources/news/20220523 System76 Collaborates with HP for a Powerful Linux Laptop for Developers.md index 78a1b8ac38..c6a292ecaf 100644 --- a/sources/news/20220523 System76 Collaborates with HP for a Powerful Linux Laptop for Developers.md +++ b/sources/news/20220523 System76 Collaborates with HP for a Powerful Linux Laptop for Developers.md @@ -2,7 +2,7 @@ [#]: via: "https://news.itsfoss.com/hp-dev-one-system76/" [#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "lkxed" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 97e1f67ccaa983518b32e6481f203d6b3cdcb2b7 Mon Sep 17 00:00:00 2001 From: lkxed Date: Sat, 28 May 2022 13:54:30 +0800 Subject: [PATCH 036/104] =?UTF-8?q?[=E6=8F=90=E4=BA=A4=E8=AF=91=E6=96=87][?= =?UTF-8?q?news]:=2020220523=20System76=20Collaborates=20with=20HP=20for?= =?UTF-8?q?=20a=20Powerful=20Linux=20Laptop=20for=20Developers.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... a Powerful Linux Laptop for Developers.md | 77 ------------------- ... a Powerful Linux Laptop for Developers.md | 74 ++++++++++++++++++ 2 files changed, 74 insertions(+), 77 deletions(-) delete mode 100644 sources/news/20220523 System76 Collaborates with HP for a Powerful Linux Laptop for Developers.md create mode 100644 translated/news/20220523 System76 Collaborates with HP for a Powerful Linux Laptop for Developers.md diff --git a/sources/news/20220523 System76 Collaborates with HP for a Powerful Linux Laptop for Developers.md b/sources/news/20220523 System76 Collaborates with HP for a Powerful Linux Laptop for Developers.md deleted file mode 100644 index c6a292ecaf..0000000000 --- a/sources/news/20220523 System76 Collaborates with HP for a Powerful Linux Laptop for Developers.md +++ /dev/null @@ -1,77 +0,0 @@ -[#]: subject: "System76 Collaborates with HP for a Powerful Linux Laptop for Developers" -[#]: via: "https://news.itsfoss.com/hp-dev-one-system76/" -[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" -[#]: collector: "lkxed" -[#]: translator: "lkxed" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -System76 Collaborates with HP for a Powerful Linux Laptop for Developers -====== -HP is entering the Linux hardware market featuring Pop!_OS out-of-the-box, making things exciting. Let’s take a look. - -![hp][1] - -System76 already makes Linux laptops. So, what is this all about? - -Well, this time, it will be a Linux laptop by HP, powered by Pop!_OS, i.e., the Ubuntu-based Linux distribution by System76. - -*Carl Richell* (System76’s Founder) made the announcement through his Twitter handle, with a link to the website that provides additional information on this. - -> Hp-Pop Hooray! Check out [https://t.co/gf2brjjUl8][2] - -[May 20, 2022][3] - -### HP Dev One: A Linux Laptop Built for Developers - -System76 laptops are highly praised for their out-of-the-box hardware compatibility with Pop!_OS. A - -More of the reason Pop!_OS sits nicely with laptops without many hiccups. - -Pop!_OS constantly comes up with updates and feature additions to improve the workflow and make the best out of the available hardware for Linux. - -Now, teaming up with HP sounds like a great idea to step up the notch. - -![HP System76][4] - -So, the idea of a partnership between Pop!_OS and HP is exciting! - -With HP, the availability/warranty of the laptop sounds good on paper compared to System76 laptops in the region where it is not available. - -### AMD-Powered Laptop to Help You Code Better - -HP Dev One seems to start featuring the essentials for developers to multitask, and get things done quickly. - -The laptop uses an **8-core AMD Ryzen 7 PRO processor** coupled with **16 GB RAM** (DDR4 @ 3200 MHz) for starters. - -You can expect a 14-inch full-HD anti-glare display powered by AMD’s Radeon Graphics. - -With HP Dev One, Carl Richell mentions that the laptop will receive **firmware updates** via the [LVFS][5] (Linux Vendor Firmware Service). - -The pricing for the laptop has been mentioned to start at **$1099** for the mentioned specifications. - -The website only says that it is coming soon. So, we do not have an official launch date as of now. - -For a commercial manufacturer like HP, the pricing for the laptop does not sound mind-blowing, but could be a fair deal. - -*What do you think about the pricing for the HP laptop tailored for developers using Linux? Does the price tag sound good? What are your expectations from the laptop?* - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/hp-dev-one-system76/ - -作者:[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/05/hpdevone-laptop.jpg -[2]: https://t.co/gf2brjjUl8 -[3]: https://twitter.com/carlrichell/status/1527757934364479488?ref_src=twsrc%5Etfw -[4]: https://news.itsfoss.com/wp-content/uploads/2022/05/hpdevone-illustration-1024x576.jpg -[5]: https://fwupd.org/ diff --git a/translated/news/20220523 System76 Collaborates with HP for a Powerful Linux Laptop for Developers.md b/translated/news/20220523 System76 Collaborates with HP for a Powerful Linux Laptop for Developers.md new file mode 100644 index 0000000000..b01955f64c --- /dev/null +++ b/translated/news/20220523 System76 Collaborates with HP for a Powerful Linux Laptop for Developers.md @@ -0,0 +1,74 @@ +[#]: subject: "System76 Collaborates with HP for a Powerful Linux Laptop for Developers" +[#]: via: "https://news.itsfoss.com/hp-dev-one-system76/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +System76 与惠普合作为开发者提供功能强大的 Linux 笔记本电脑 +====== +惠普正在以开箱即用的 Pop!_OS 为特色进入 Linux 硬件市场,貌似有点激动人心?还是先来看一看吧! + +![hp][1] + +System76 不是早就自己生产 Linux 笔记本电脑了吗?那么,这次和惠普合作是怎么回事? + +嗯,这一次是惠普要发行一款 Linux 笔记本电脑,搭载 Pop!_OS,也就是 System76 的基于 Ubuntu 的 Linux 发行版。 + +Carl Richell(System76 的创始人)在他的 Twitter 上宣布了这一消息,并附带了一个网站链接,该网站提供了更多相关信息。推文如下: + +> Hp-Pop 好耶!来看看这个:[https://t.co/gf2brjjUl8][2] + +### HP Dev One:专为开发者打造的 Linux 笔记本电脑 + +一方面,System76 笔记本电脑与 Pop!_OS 有着开箱即用硬件兼容性,因此它备受赞誉。 + +另一方面,Pop!_OS 也与笔记本电脑完美搭配,适配没有太多麻烦。 + +Pop!_OS 也一直在推出更新和新增功能,以改进工作流程并充分利用 Linux 的可用硬件。 + +此时,和惠普合作听起来是一个提高档次的好主意。 + +![HP System76][3] + +所以说,Pop!_OS 和惠普合作的想法有点激动人心啊! + +挂上了惠普这个牌子,笔记本电脑的可用性/保修(在纸面上)就比 System76 要好了,考虑到后者在某些地区是不提供保修的。 + +### AMD 驱动的笔记本电脑可帮助你更好地写代码 + +HP Dev One 似乎是把“为开发者提供多任务处理的能力,从而快速完成任务”作为卖点。 + +这款笔记本电脑的入门款搭载了 **8 核的 AMD Ryzen 7 PRO 处理器** 和 **16 GB RAM**(DDR4 @ 3200 MHz)。 + +预计它还会搭载由 AMD Radeon Graphics 提供支持的 14 英寸全高清防眩光显示屏。 + +对于 HP Dev One,Carl Richell 提到了这款笔记本电脑将通过 [LVFS][5](Linux 供应商固件服务)接收**固件更新**。 + +他还提到,这款笔记本电脑(以上规格)的定价为 **1099 美元** 起。 + +网站上只显示了它即将推出。因此,我们目前还不知道正式的发布日期。 + +对于像惠普这样的商业制造商来说,笔记本电脑的定价听起来并不令人兴奋(LCTT 译注:毕竟不是国内互联网品牌的笔记本),但可能是一个划算的交易。 + +你怎么看这款惠普笔记本电脑(运行 Linux、为开发者量身定制)的定价?你觉得这个价格合理吗?你对这款笔记本电脑有什么期望呢? + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/hp-dev-one-system76/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/hpdevone-laptop.jpg +[2]: https://t.co/gf2brjjUl8 +[3]: https://news.itsfoss.com/wp-content/uploads/2022/05/hpdevone-illustration-1024x576.jpg +[4]: https://fwupd.org/ From 29a6a51812335d80315c0a70d4f6417ae4aede15 Mon Sep 17 00:00:00 2001 From: lkxed Date: Sat, 28 May 2022 13:57:25 +0800 Subject: [PATCH 037/104] =?UTF-8?q?[=E7=94=B3=E9=A2=86=E5=8E=9F=E6=96=87][?= =?UTF-8?q?news]:=2020220524=20Woah!=20Broadcom=20Could=20Acquire=20VMware?= =?UTF-8?q?=20for=20$60=20Billion.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...20524 Woah! Broadcom Could Acquire VMware for $60 Billion.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/news/20220524 Woah! Broadcom Could Acquire VMware for $60 Billion.md b/sources/news/20220524 Woah! Broadcom Could Acquire VMware for $60 Billion.md index f30d3a0b95..a336349c5d 100644 --- a/sources/news/20220524 Woah! Broadcom Could Acquire VMware for $60 Billion.md +++ b/sources/news/20220524 Woah! Broadcom Could Acquire VMware for $60 Billion.md @@ -2,7 +2,7 @@ [#]: via: "https://news.itsfoss.com/broadcom-vmware-deal/" [#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "lkxed" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 06bf418e4a457bd11fda8d7b24d8bb8af80343dd Mon Sep 17 00:00:00 2001 From: lkxed Date: Sat, 28 May 2022 14:36:58 +0800 Subject: [PATCH 038/104] =?UTF-8?q?[=E6=8F=90=E4=BA=A4=E8=AF=91=E6=96=87][?= =?UTF-8?q?news]:=2020220524=20Woah!=20Broadcom=20Could=20Acquire=20VMware?= =?UTF-8?q?=20for=20$60=20Billion.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...om Could Acquire VMware for $60 Billion.md | 60 ------------------ ...om Could Acquire VMware for $60 Billion.md | 63 +++++++++++++++++++ 2 files changed, 63 insertions(+), 60 deletions(-) delete mode 100644 sources/news/20220524 Woah! Broadcom Could Acquire VMware for $60 Billion.md create mode 100644 translated/news/20220524 Woah! Broadcom Could Acquire VMware for $60 Billion.md diff --git a/sources/news/20220524 Woah! Broadcom Could Acquire VMware for $60 Billion.md b/sources/news/20220524 Woah! Broadcom Could Acquire VMware for $60 Billion.md deleted file mode 100644 index a336349c5d..0000000000 --- a/sources/news/20220524 Woah! Broadcom Could Acquire VMware for $60 Billion.md +++ /dev/null @@ -1,60 +0,0 @@ -[#]: subject: "Woah! Broadcom Could Acquire VMware for $60 Billion" -[#]: via: "https://news.itsfoss.com/broadcom-vmware-deal/" -[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" -[#]: collector: "lkxed" -[#]: translator: "lkxed" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Woah! Broadcom Could Acquire VMware for $60 Billion -====== -Broadcom’s interested to acquire VMware for $60 billion, making it one of the biggest tech deals in 2022. - -![broadcom][1] - -Broadcom, a semiconductor chip company, is infamous among desktop Linux users for the incompatibility issues with its wireless adapter/card and drivers. - -And, it is now planning to get into the cloud computing market by acquiring one of the biggest players in the industry, i.e., **VMware**. - -VMware is not an open-source company, but it offers some open-source tools and Linux support for its virtualization software. - -In this case, **The Wall Street Journal** [reports][2] that Broadcom and VMware can potentially announce this acquisition later this week on Thursday. - -### Broadcom to Enter the Cloud Computing Market - -[Broadcom][3] should be a familiar name to Linux users when we talk about wireless network chips and their drivers. - -And, with the $60 billion deal for [VMware][4], they could expand their take on the industry through VMware’s reach in the cloud computing sector. - -So, their decision also influences the talk about the acquisition by Broadcom. - -Hence, it is safe to say that the deal may or may not go through if the discussions fall apart. - -And, for the payment to succeed, the report also mentions that Broadcom plans to take help of banks for a $40 billion debt package. - -Considering that the report mentions the final price is still up for discussion, the $60 billion value can change (but something around it). - -### Wrapping Up - -You can keep an eye on VMware’s shares and Broadcom Inc if you are someone who is interested in getting involved in the market. - -What do you think about Broadcom acquiring VMware? Do you think it’s going to go through with Dell involved with a major stake in the company? Feel free to share your thoughts in the comments below. - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/broadcom-vmware-deal/ - -作者:[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/05/broadcom-vmware-acquisition.jpg -[2]: https://www.wsj.com/articles/broadcom-discussing-paying-around-140-a-share-for-vmware-people-say-11653334946 -[3]: https://www.broadcom.com/ -[4]: https://www.vmware.com/i diff --git a/translated/news/20220524 Woah! Broadcom Could Acquire VMware for $60 Billion.md b/translated/news/20220524 Woah! Broadcom Could Acquire VMware for $60 Billion.md new file mode 100644 index 0000000000..7c1faf0c04 --- /dev/null +++ b/translated/news/20220524 Woah! Broadcom Could Acquire VMware for $60 Billion.md @@ -0,0 +1,63 @@ +[#]: subject: "Woah! Broadcom Could Acquire VMware for $60 Billion" +[#]: via: "https://news.itsfoss.com/broadcom-vmware-deal/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +震惊!博通或以 600 亿美元收购 VMware +====== +Broadcom’s interested to acquire VMware for $60 billion, making it one of the biggest tech deals in 2022. +博通有意以 600 亿美元收购 VMware,这或将成为 2022 年最大的科技交易之一。 + +![博通][1] + +博通Broadcom 是一家半导体芯片公司,其无线适配器/无线网卡和驱动程序的不兼容问题,使得它在桌面 Linux 用户中臭名昭著。 + +现在,它正计划通过收购业内最大的参与者之一,也就是 **VMware**,来进入云计算市场。 + +VMware 不是一家开源公司,但它为其虚拟化软件提供了一些开源工具和 Linux 支持。 + +据 **《华尔街日报》** [报道][2],博通和 VMware 可能会在本周四(5 月 26 日)的晚些时候宣布此次收购。(LCTT 译注:抱歉,我们来晚了……) + +### 博通进军云计算市场 + +当谈到无线网络芯片及其驱动程序时,[博通][3] 应该是一个 Linux 用户熟悉的名称。 + +现在,若能以 600 亿美元交易收购 [VMware][4],他们就可以借助 VMware 在云计算领域的影响力,来扩大自身在该行业的影响力。 + +因此,他们的决定也会影响有关博通收购的讨论。 + +可以肯定地说,如果讨论的意见不一,这笔交易就不一定能继续进行下去了。 + +为了能够成功支付(这笔巨款),该报告还提到博通计划接受银行提供的 400 亿美元的债务帮助。 + +考虑到该报告提到最终价格仍有待讨论,600 亿美元的价值可能会发生变化(但不会太大)。(LCTT 译注:最新的数字是 610 亿美元,该收购预计要到 2023 年才能完成。) + +### 说在最后 + +如果你有兴趣踏入股市,(这段时间)你可以关注一下 VMware 的股票和博通公司(的动态)。 + +你怎么看待博通收购 VMware 这件事呢?你认为它最后的结局会是戴尔成为公司的大股东吗?(LCTT 译注:这里的关系有点复杂,简单来说,VMware 曾经是 EMC 的子公司,后来戴尔收购了 EMC,再后来 VMware 独立。) + +有任何想法,都请在下面的评论中分享吧! + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/broadcom-vmware-deal/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/broadcom-vmware-acquisition.jpg +[2]: https://www.wsj.com/articles/broadcom-discussing-paying-around-140-a-share-for-vmware-people-say-11653334946 +[3]: https://www.broadcom.com/ +[4]: https://www.vmware.com/i From 26332a70f322bd64c78b615ffb022a61c9bf2342 Mon Sep 17 00:00:00 2001 From: lkxed Date: Sat, 28 May 2022 15:07:48 +0800 Subject: [PATCH 039/104] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020220528=20Portmaster-=20A=20GlassWire=20Alternative?= =?UTF-8?q?=20for=20Linux=20to=20Monitor=20&=20Secure=20Network=20Connecti?= =?UTF-8?q?ons.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...to Monitor & Secure Network Connections.md | 114 ++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 sources/tech/20220528 Portmaster- A GlassWire Alternative for Linux to Monitor & Secure Network Connections.md diff --git a/sources/tech/20220528 Portmaster- A GlassWire Alternative for Linux to Monitor & Secure Network Connections.md b/sources/tech/20220528 Portmaster- A GlassWire Alternative for Linux to Monitor & Secure Network Connections.md new file mode 100644 index 0000000000..a90aa18bbf --- /dev/null +++ b/sources/tech/20220528 Portmaster- A GlassWire Alternative for Linux to Monitor & Secure Network Connections.md @@ -0,0 +1,114 @@ +[#]: subject: "Portmaster: A GlassWire Alternative for Linux to Monitor & Secure Network Connections" +[#]: via: "https://itsfoss.com/portmaster/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Portmaster: A GlassWire Alternative for Linux to Monitor & Secure Network Connections +====== +GlassWire is a popular network monitoring app (with no support for Linux) that helps you track data usage, unusual network activity, malicious access to the network, and more. + +I wish it supports Linux, but for now, it only works on Windows and Android. + +For Linux, we do not have a full-fledged GUI-based application that helps us [monitor the network in Linux][1]. + +However, I recently stumbled upon “Portmaster”, an open-source network monitor available for Linux and other platforms. Interestingly, it offers some of the same abilities as seen with Glasswire, with some extras. + +Note that it is not exactly a replacement for “GlassWire” but a potential alternative in the making. + +Here, I shall share more details about it. + +Note + +> Safing Portmaster (or simply ‘Portmaster’) is in its early stages of development (Alpha). We feature it here, considering it aims to offer something new to Linux users. +> +> While it worked fine in our quick tests, you can expect issues with it. + +### Portmaster: Open-Source App to Monitor Computer’s Network Connection + +![portmaster][2] + +Portmaster by [Safing][3] is an open-source GUI program available for Windows and Linux. + +You can track every connection being made through the applications and services used in your Linux distribution. + +It is an entirely free and open-source software that aims to make money using its paid VPN service (**SPN**), which uses onion-encryption (inspired by Tor) to route your connections from through destinations keeping your identity private. + +The paid VPN is a part of the tool, but it is also in the alpha testing stage. + +Even if you download things from your terminal, it tracks them and provides you the detailed information regarding the domain, IP, encryption status, protocol, and the option to block future connections if needed. + +![portmaster network monitor][4] + +You also get several abilities to manage the network connections, add filter lists, rules, and some other advanced options. + +Portmaster gives you an overview of all the connections per application/service and also lets you view the data associated with an individual application. + +![portmaster connection details][5] + +It supports numerous useful features that include real-time network monitoring. + +### Features of Portmaster + +![portmaster firewall network][6] + +Portmaster is not just a simple network connection monitor, it also gives you great control to enforce a secure DNS, and filter your network connections for best security. + +Some key features include: + +* Network monitor overview to sum up connections from the entire system. +* Provide debug information for every app connection history. +* Ability to block a domain from the connection list. +* Retain connection history offline. +* Manage P2P connections. +* Ability to block incoming connections. +* Option to add outgoing rules to manage the network connections easily. +* Add a filter list to easily block connections that you do not want. For instance, preventing NSFW domains to load on your network. +* Choose from different secure DNS servers (Cloudflare as the preferred default) +* Stats about network connections, destinations connected, countries involved, allowed, and blocked connections. + +In addition to the mentioned features, you will find fine-grained controls to get prompts for network connections (block/allow), customize your privacy filter, choose a different DNS, inspect DNS requests for the connections made, and so much more. + +### Install Portmaster on Linux + +Portmaster is officially supported for Ubuntu and Fedora with .deb and .rpm packages available. + +You can download the package from its [official website][7] to try on a supported Linux distribution. + +The [installation documentation][8] gives you more details about the steps for Arch Linux and other Linux distributions. + +You can also explore more about it in its [GitHub page][9]. + +### Wrapping Up + +Portmaster is certainly an interesting addition to the Linux and open-source world. It could become the one tool that everyone uses to monitor, and secure networks while enhancing their online privacy. + +The feature set is promising, but whether it can replace proprietary network monitors like “GlassWire” is another story to be unraveled in the future. + +*What do you think about Portmaster? Please let me know your thoughts in the comments below.* + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/portmaster/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/network-speed-monitor-linux/ +[2]: https://itsfoss.com/wp-content/uploads/2022/05/portmaster.jpg +[3]: https://safing.io/ +[4]: https://itsfoss.com/wp-content/uploads/2022/05/portmaster-network-monitor.jpg +[5]: https://itsfoss.com/wp-content/uploads/2022/05/portmaster-connection-details.jpg +[6]: https://itsfoss.com/wp-content/uploads/2022/05/portmaster-firewall-network.jpg +[7]: https://safing.io/portmaster/#download +[8]: https://docs.safing.io/portmaster/install/linux +[9]: https://github.com/safing/portmaster/ From fd09aef40aad131d784c89d5e830395c8e32564c Mon Sep 17 00:00:00 2001 From: lkxed Date: Sat, 28 May 2022 16:09:28 +0800 Subject: [PATCH 040/104] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020220528=20How=20I=20automate=20plant=20care=20using?= =?UTF-8?q?=20Raspberry=20Pi=20and=20open=20source=20tools.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...sing Raspberry Pi and open source tools.md | 90 +++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 sources/tech/20220528 How I automate plant care using Raspberry Pi and open source tools.md diff --git a/sources/tech/20220528 How I automate plant care using Raspberry Pi and open source tools.md b/sources/tech/20220528 How I automate plant care using Raspberry Pi and open source tools.md new file mode 100644 index 0000000000..d11da87617 --- /dev/null +++ b/sources/tech/20220528 How I automate plant care using Raspberry Pi and open source tools.md @@ -0,0 +1,90 @@ +[#]: subject: "How I automate plant care using Raspberry Pi and open source tools" +[#]: via: "https://opensource.com/article/22/5/plant-care" +[#]: author: "Kevin Sonney https://opensource.com/users/ksonney" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +How I automate plant care using Raspberry Pi and open source tools +====== +I keep tabs on all my houseplants by using Home Assistant and a Raspberry Pi. + +![Digital images of a computer desktop][1] + +Image by: Opensource.com + +> Automation is a hot topic right now. In my day job as an SRE part of my remit is to automate as many repeating tasks as possible. But how many of us do that in our daily, not-work, lives? This year, I am focused on automating away the toil so that we can focus on the things that are important. + +Home Assistant has so many features and integrations, it can be overwhelming at times. And as I’ve mentioned in previous articles, I use it for many things, including monitoring plants. + +``` +$ bluetoothctl scan le +Discovery started +[NEW] Device +[NEW] Device +[NEW] Device +[NEW] Device +[NEW] Device +[NEW] Device +[NEW] Device +``` + +There are numerous little devices you can buy to keep an eye on your plants. The Xiomi MiaFlora devices are small, inexpensive, and have a native integration with Home Assistant. Which is great—as long as the plant and Home Assistant are in the same room. + +We've all been in places where one spot there is a great signal, and moving 1mm in any direction makes it a dead zone—and it is even more frustrating when you are indoors. Most Bluetooth LE (Low Energy) devices have a range of about 100m, but that's using line of sight, and does not include interference from things like walls, doors, windows, or major appliances (seriously, a refrigerator is a great big signal blocker). Remote Home Assistant is perfect for this. You can set up a Raspberry Pi with Home Assistant Operating System (HASSOS) in the room with the plants, and then use the main Home Assistant as a central control panel. I tried this on a Raspberry Pi Zero W, and while the Pi Zero W can run Home Assistant, it doesn't do it very well. You probably want a Pi 3 or Pi 4 when doing this. + +Start with a fresh HASSOS installation, and make sure everything is up-to-date, then install HACS and Remote Home Assistant like I did in my article [Automate and manage multiple devices with Remote Home Assistant][2]. Now for the tricky bits. Install the `SSH and Web Terminal` Add-on, and turn off `Protection Mode` so that you can get a session on the base OS and not in a container. Start the add-on, and it appears on the sidebar. Click on it to load the terminal. + +You are now in a root session terminal on the Pi. Insert all the warnings here about being careful and how you can mess up the system (you know the ones). Inside the terminal, run `bluetoothctl scan le` to find the plant sensor, often named "Flower Care" like mine. + +![Image of finding plant sensors][3] + +Image by: (Kevin Sonney, CC BY-SA 40) + +Make a note of the address for the plant sensor. If you have more than one, it could be confusing to figure out which is which, and can take some trial and error. Once you've identified the plant sensor, it is time to add it to Home Assistant. This requires editing the `configuration.yml` file directly, either with the file editor add on, or in the terminal you just created. In my case, I added both a sensor and a plant block to the configuration. + +``` +sensor: + - platform: miflora + scan_interval: 60 + mac: "C4:7C:8D:6C:DE:FE" + name: "pitcher_plant" + plant: + pitcher_plant: + sensors: + moisture: sensor.pitcher_plant_moisture + battery: sensor.pitcher_plant_battery + temperature: sensor.pitcher_plant_temperature + conductivity: sensor.pitcher_plant_conductivity + brightness: sensor.pitcher_plant_brightness +``` + +Save the file, and restart Home Assistant, and you should see a plant card on the Overview tab. + +![Image showing plant needs watering][4] + +Image by: (Kevin Sonney, CC BY-SA 40) + +Once that's done, go back to the main Home Assistant, and add the newly available `plant` component to the list of things to import from the remote. You can then add the component to dashboards on the main HASS installation, and create automations and notifications based on the plant status. + +I use this to monitor a pitcher plant, and I have more sensors on the way so I can keep tabs on all my houseplants—all of which live outside the Bluetooth range of my central Home Assistant Pi. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/5/plant-care + +作者:[Kevin Sonney][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/ksonney +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/computer_desk_home_laptop_browser.png +[2]: https://opensource.com/article/22/5/remote-home-assistant +[3]: https://opensource.com/sites/default/files/2022-05/Day_06-2.png +[4]: https://opensource.com/sites/default/files/2022-05/Day_06-3.png From df0487ed63ed11824f2e5708f2b2f41fc3b1da17 Mon Sep 17 00:00:00 2001 From: FYJNEVERFOLLOWS Date: Sat, 28 May 2022 16:31:21 +0800 Subject: [PATCH 041/104] translating finished --- ...awk by coding a -guess the number- game.md | 208 ------------------ ...awk by coding a -guess the number- game.md | 199 +++++++++++++++++ 2 files changed, 199 insertions(+), 208 deletions(-) delete mode 100644 sources/tech/20210115 Learn awk by coding a -guess the number- game.md create mode 100644 translated/tech/20210115 Learn awk by coding a -guess the number- game.md diff --git a/sources/tech/20210115 Learn awk by coding a -guess the number- game.md b/sources/tech/20210115 Learn awk by coding a -guess the number- game.md deleted file mode 100644 index 2d817ff9b8..0000000000 --- a/sources/tech/20210115 Learn awk by coding a -guess the number- game.md +++ /dev/null @@ -1,208 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (FYJNEVERFOLLOWS ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Learn awk by coding a "guess the number" game) -[#]: via: (https://opensource.com/article/21/1/learn-awk) -[#]: author: (Chris Hermansen https://opensource.com/users/clhermansen) - -Learn awk by coding a "guess the number" game -====== -Programming languages tend to share many common traits. One great way to -learn a new language is to create a familiar program. In this article, I -will create a "guess the number" game by using awk to demonstrate -familiar concepts. -![question mark in chalk][1] - -When you learn a new programming language, it's good to focus on the things most programming languages have in common: - - * Variables – places where information is stored - * Expressions – ways to calculate things - * Statements – the means by which state changes are expressed in a program - - - -These concepts are the basis of most programming languages. - -Once you understand these concepts, you can start figuring the rest out. For example, most languages have a "way of doing things" supported by their design, and those ways can be quite different from one program to another. These ways include modularity (grouping related functionality together), declarative vs. imperative, object-orientation, low- vs. high-level syntactic features, and so on. An example familiar to many programmers is "ceremony," that is, the amount of work required to set the scene before tackling the problem. The Java programming language is said to have a significant ceremony requirement, stemming from its design, which requires all code to be defined within a class. - -But back to the basics. Programming languages usually share similarities. Once you know one programming language, start by learning the basics of another to appreciate the differences in that new language. - -A good way to proceed is to create a set of basic test programs. With these in hand, learning starts with these similarities. - -One test program you can use is a "guess the number" program. The computer picks a number between one and one hundred and asks you to guess the number. The program loops until you make a correct guess. - -The "guess the number" program exercises several concepts in programming languages: - - * Variables - * Input - * Output - * Conditional evaluation - * Loops - - - -That's a great practical experiment to learn a new programming language. - -**Note**: This article is adapted from Moshe Zadka's article on doing using this approach in [Julia][2] and Jim Hall's article on doing it in [Bash][3]. - -### Guess the number in awk - -Let's write a "guess the number" game as an Awk program. - -Awk is dynamically typed, is a scripting language oriented toward data transformation, and has surprisingly good support for interactive use. Awk has been around since the 1970s, originally as a part of the Unix operating system. If you don't know Awk but love spreadsheets, this is a sign… [go learn Awk][4]! - -You can begin your exploration of Awk by writing a version of the "guess the number" game. - -Here is my implementation (with line numbers so we can review some of the specific features): - - -``` -     1    BEGIN { -     2        srand(42) -     3        randomNumber = int(rand() * 100) + 1 -     4        print "random number is",randomNumber -     5        printf "guess a number between 1 and 100\n" -     6    } -     7    { -     8        guess = int($0) -     9        if (guess < randomNumber) { -    10            printf "too low, try again:" -    11        } else if (guess > randomNumber) { -    12            printf "too high, try again:" -    13        } else { -    14            printf "that's right\n" -    15            exit -    16        } -    17    } -``` - -We can immediately see similarities between Awk control structures and those of C or Java, but unlike Python. In statements such as _if-then-else_ or _while_, the _then_, _else_, and _while_ parts take either a statement or a group of statements enclosed within **{** and **}**. However, there is one big difference about AWk that needs to be understood from the start: - -By design, Awk is built around a data pipeline. - -What does that mean? Most Awk programs are snippets of code that receive a line of input, do something with the data, and write it to output. Recognizing the need for such a transformation pipeline, Awk by default provides all the transformation plumbing. Let's explore that through the above program by asking a basic question: Where is the 'read data from the console' structure? - -The answer to that is – it's built-in. In particular, lines 7 – 17 tell Awk what to do with each line that is read. Given that context, it's pretty easy to see that lines 1 – 6 are executed before anything is read. - -More specifically, the **BEGIN** keyword on line 1 is a kind of "pattern," in this case indicating to Awk that, before reading any data, it should execute what follows the **BEGIN** in the { … }. A similar **END** keyword, not used in this program, indicates to Awk what to do when everything has been read. - -Coming back to lines 7 – 17, we see they create a block of code { … } that is similar, but there is no keyword in front. Because there is nothing before the **{** for Awk to match, it will apply this line to every line of input received. Each line of input will be entered as guesses by the user. - -Let's look at the code being executed. First, the preamble that happens before any input is read. - -In line 2, we initialize the random number generator with the number 42 (if we don't provide an argument, the system clock is used). 42? [Of course 42][5]. Line 3 calculates a random number between 1 and 100, and line 4 prints that number out for debugging purposes. Line 5 invites the user to guess a number. Note this line uses `printf`, not `print`. Like C, `printf'`s first argument is a template used to format the output. - -Now that the user is aware the program expects input, she can type a guess on the console. Awk supplies this guess to the code in lines 7 – 17, as mentioned previously. Line 18 converts the input record to an integer; `$0` indicates the entire input record, whereas `$1` indicates the first field of the input record, `$2` the second, and so on. Yup, Awk splits an input line into constituent fields, using the predefined separator, which defaults to white space. Lines 9 – 15 compare the guess to the random number, printing appropriate responses. If the guess is correct, line 15 exits prematurely from the input line processing pipeline. - -Simple! - -Given the unusual structure of Awk programs as code snippets that react to specific input line configurations and do stuff with the data, let’s look at an alternative structure just to see how the filtering part works: - - -``` -     1    BEGIN { -     2        srand(42) -     3        randomNumber = int(rand() * 100) + 1 -     4        print "random number is",randomNumber -     5        printf "guess a number between 1 and 100\n" -     6    } -     7    int($0) < randomNumber { -     8        printf "too low, try again: " -     9    } -    10    int($0) > randomNumber { -    11        printf "too high, try again: " -    12    } -    13    int($0) == randomNumber { -    14        printf "that's right\n" -    15        exit -    16    } -``` - -Lines 1 – 6 haven’t changed. But now we see that lines 7 – 9 is code that is executed when the integer value of the line is less than the random number, lines 10 – 12 is code that is executed when the integer value of the line is greater than the random number, and lines 13 – 16 is code that is executed when the two match. - -This should seem "cool but weird" – why would we repeatedly calculate `int($0)`, for example? And for sure, it would be a weird way to solve the problem. But those patterns can be really quite wonderful ways to separate conditional processing since they can employ regular expressions or any other structure supported by Awk. - -For completeness, we can use these patterns to separate common computations from things that only apply to specific circumstances. Here’s a third version to illustrate: - - -``` -     1    BEGIN { -     2        srand(42) -     3        randomNumber = int(rand() * 100) + 1 -     4        print "random number is",randomNumber -     5        printf "guess a number between 1 and 100\n" -     6    } -     7    { -     8        guess = int($0) -     9    } -    10    guess < randomNumber { -    11        printf "too low, try again: " -    12    } -    13    guess > randomNumber { -    14        printf "too high, try again: " -    15    } -    16    guess == randomNumber { -    17        printf "that's right\n" -    18        exit -    19    } -``` - -Recognizing that, no matter what value of input comes in, it needs to be converted to an integer, we have created lines 7 – 9 to do just that. Now the three groups of lines, 10 – 12, 13 – 15 and 16 – 19, refer to the already-defined variable guess instead of converting the input line each time. - -Let's go back to the list of things we wanted to learn: - - * variables – yup, Awk has those; we can infer that input data comes in as strings but can be converted to a numeric value when required - * input – Awk just sends input through its "data transformation pipeline" approach to reading stuff - * output – we have used Awk's `print` and `printf` procedures to write stuff to output - * conditional evaluation – we have learned about Awk's _if-then-else_ and input filters that respond to specific input line configurations - * loops – huh, imagine that! We didn't need a loop here, once again, thanks to the "data transformation pipeline" approach that Awk takes; the loop "just happens." Note the user can exit the pipeline prematurely by sending an end-of-file signal to Awk (a **CTRL-D** when using a Linux terminal window) - - - -It's well worth considering the importance of not needing a loop to handle input. One reason Awk has remained viable for so long is that Awk programs are compact, and one of the reasons they are compact is there is no boilerplate required to read from the console or a file. - -Let's run the program: - - -``` -$ awk -f guess.awk -random number is 25 -guess a number between 1 and 100: 50 -too high, try again: 30 -too high, try again: 10 -too low, try again: 25 -that's right -$ -``` - -One thing we didn't cover was comments. An Awk comment begins with a `#` and ends with the end of line. - -### Wrap up - -Awk is incredibly powerful and this "guess the number" game is a great way to get started. It shouldn't be the end of your journey, though. You can [read about the history of Awk and Gawk (GNU Awk)][6], an expanded version of Awk and probably the one you have on your computer if you're running Linux, or [read all about the original from its initial developers][7]. - -You can also [download our cheatsheet][8] to help you keep track of everything you learn. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/1/learn-awk - -作者:[Chris Hermansen][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/FYJNEVERFOLLOWS) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/clhermansen -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/question-mark_chalkboard.jpg?itok=DaG4tje9 (question mark in chalk) -[2]: https://opensource.com/article/20/12/julia -[3]: https://opensource.com/article/20/12/learn-bash -[4]: https://opensource.com/article/20/9/awk-ebook -[5]: https://en.wikipedia.org/wiki/42_(number)#The_Hitchhiker's_Guide_to_the_Galaxy -[6]: https://www.gnu.org/software/gawk/manual/html_node/History.html -[7]: https://archive.org/details/pdfy-MgN0H1joIoDVoIC7 -[8]: https://opensource.com/downloads/cheat-sheet-awk-features diff --git a/translated/tech/20210115 Learn awk by coding a -guess the number- game.md b/translated/tech/20210115 Learn awk by coding a -guess the number- game.md new file mode 100644 index 0000000000..30040b9347 --- /dev/null +++ b/translated/tech/20210115 Learn awk by coding a -guess the number- game.md @@ -0,0 +1,199 @@ +[#]: collector: (lujun9972) +[#]: translator: (FYJNEVERFOLLOWS ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Learn awk by coding a "guess the number" game) +[#]: via: (https://opensource.com/article/21/1/learn-awk) +[#]: author: (Chris Hermansen https://opensource.com/users/clhermansen) + +编写一个“猜数”游戏的程序来学习 awk +====== +编程语言往往具有许多共同特征。学习一门新语言的好方法是去写一个熟悉的程序。在本文中,我将会使用 awk 编写一个“猜数”程序来展示熟悉的概念。 + +![question mark in chalk][1] + +当你学习一门新的编程语言时,最好把重点放在大多数编程语言都有的共同点上: + * 变量 —— 存储信息的地方 + * 表达式 —— 计算的方法 + * 语句 —— 在程序中表示状态变化的方法 + + +这些概念是大多是编程语言的基础。 + +一旦你理解了这些概念,你就可以开始把其他的弄清楚。例如,大多数语言都有得到其设计支持的“处理方式”,这些方式在不同语言之间可能有很大的不同。这些方法包括模块化(将相关功能分组在一起)、声明性与命令性、面向对象、低级与高级语法特性等等。许多程序员熟悉的一个例子是“仪式”,即,在处理问题之前设置场景所需的工作量。据说 Java 编程语言有一个重要的仪式要求,这源于它的设计,要求所有代码都在一个类中定义。 + +但是回到最基本的,编程语言通常有相似之处。一旦你掌握了一种编程语言,就从学习另一种语言的基本知识开始,去品味这种新语言的不同之处。 + +继续进行的一个好方法是创建一组基本的测试程序。有了这些,就可以从这些相似之处开始学习。 + +你可以选择创建的一个测试程序是“猜数字”程序。电脑从 1 到 100 之间选择一个数字,让你猜这个数字。程序一直循环,直到你猜对为止。 + +“猜数字”程序练习了编程语言中的几个概念: + * 变量 + * 输入 + * 输出 + * 条件判断 + * 循环 + + +这是学习一门新的编程语言的一个很好的实践实验。 + + +**注**:本文改编自 Moshe Zadka 关于在 [Julia][2] 中使用这种方法的文章和Jim Hall关于在 [Bash][3] 中使用这种方法的文章。 + +### 在 awk 程序中猜数 +让我们编写一个实现“猜数字”游戏的 awk 程序。 + +Awk 是动态类型的,是一种面向数据转换的脚本语言,并且对交互使用有着令人惊讶的良好支持。Awk 出现于 20 世纪 70 年代,最初是 Unix 操作系统的一部分。如果你不了解 Awk,但是喜欢电子表格,可以看一下这个链接 [去学习 Awk][4]! + +您可以通过编写一个版本的“猜数字”游戏来开始对 Awk 的探索。 + +以下是我的实现(带有行号,以便我们可以查看一些特定功能): + + +``` +     1    BEGIN { +     2        srand(42) +     3        randomNumber = int(rand() * 100) + 1 +     4        print "random number is",randomNumber +     5        printf "guess a number between 1 and 100\n" +     6    } +     7    { +     8        guess = int($0) +     9        if (guess < randomNumber) { +    10            printf "too low, try again:" +    11        } else if (guess > randomNumber) { +    12            printf "too high, try again:" +    13        } else { +    14            printf "that's right\n" +    15            exit +    16        } +    17    } +``` +我们可以立即看到 Awk 控制结构与 C 或 Java 的相似之处,但与 Python 不同。 +在像 *if-then-else*、*while* 这样的语句中,*then*、*else* 和 *while* 部分接受一个语句或一组被 **{** 和 **}** 包围的语句。然而,Awk 有一个很大的区别需要从一开始就了解: + +根据设计,Awk 是围绕数据管道构建的。 + +这是什么意思呢?大多数 Awk 程序都是一些代码片段,它们接收一行输入,对数据做一些处理,然后将其写入输出。认识到这种转换管道的需要,Awk 默认情况下提供了所有的转换管道。让我们通过关于上面程序的一个基本问题来探索:“从控制台读取数据”的结构在哪里? + +答案是——“内置的”。特别的,第 7-17 行告诉 Awk 如何处理被读取的每一行。在这种情况下,很容易看到第 1-6 行在读取任何内容之前被执行。 + +更具体地说,第 1 行上的 **BEGIN** 关键字是一种“模式”,在本例中,它指示 Awk 在读取任何数据之前,应该先执行 { … } 中 **BEGIN** 后面的内容。另一个类似的关键字 **END**,在这个程序中没有被使用,它指示 Awk 在读取完所有内容后要做什么。 + +回到第 7-17 行,我们看到它们创建了一个类似代码块 { … } 的片段,但前面没有关键字。因为在 **{** 之前没有任何东西可以让 Awk 匹配,所以它将把这一行用于接收每一行输入。每一行的输入都将由用户输入作为猜测。 + +让我们看看正在执行的代码。首先,在读取任何输入之前发生的序言。 + +在第 2 行,我们用数字 42 初始化随机数生成器(如果不提供参数,则使用系统时钟)。为什么要用 42?[当然要选 42!][5] 第 3 行计算 1 到 100 之间的随机数,第 4 行输出该随机数以供调试使用。第 5 行邀请用户猜一个数字。注意这一行使用的是 `printf`,而不是 `print`。和 C 语言一样,`printf` 的第一个参数是一个用于格式化输出的模板。 + +既然用户知道程序需要输入,她就可以在控制台上键入猜测。如前所述,Awk 将这种猜测提供给第 7-17 行的代码。第 18 行将输入记录转换为整数;`$0` 表示整个输入记录,而 `$1` 表示输入记录的第一个字段,`$2` 表示第二个字段,以此类推。是的,Awk 使用预定义的分隔符(默认为空格)将输入行分割为组成字段。第 9-15 行将猜测结果与随机数进行比较,打印适当的响应。如果猜对了,第 15 行就会从输入行处理管道中提前退出。 + +就这么简单! + +考虑到 Awk 程序不同寻常的结构,代码片段会对特定的输入行配置做出反应,并处理数据,让我们看看另一种结构,看看过滤部分是如何工作的: + + +``` +     1    BEGIN { +     2        srand(42) +     3        randomNumber = int(rand() * 100) + 1 +     4        print "random number is",randomNumber +     5        printf "guess a number between 1 and 100\n" +     6    } +     7    int($0) < randomNumber { +     8        printf "too low, try again: " +     9    } +    10    int($0) > randomNumber { +    11        printf "too high, try again: " +    12    } +    13    int($0) == randomNumber { +    14        printf "that's right\n" +    15        exit +    16    } +``` + +第 1–6 行代码没有改变。但是现在我们看到第 7-9 行是当输入整数值小于随机数时执行的代码,第 10-12 行是当输入整数值大于随机数时执行的代码,第 13-16 行是两者相等时执行的代码。 + +这看起来“很酷但很奇怪” —— 例如,为什么我们会重复计算 `int($0)`?可以肯定的是,用这种方法来解决问题会很奇怪。但这些模式确实是分离条件处理的非常好的方式,因为它们可以使用正则表达式或 Awk 支持的任何其他结构。 + +为了完整起见,我们可以使用这些模式将普通的计算与只适用于特定环境的计算分离开来。下面是第三个版本: + + +``` +     1    BEGIN { +     2        srand(42) +     3        randomNumber = int(rand() * 100) + 1 +     4        print "random number is",randomNumber +     5        printf "guess a number between 1 and 100\n" +     6    } +     7    { +     8        guess = int($0) +     9    } +    10    guess < randomNumber { +    11        printf "too low, try again: " +    12    } +    13    guess > randomNumber { +    14        printf "too high, try again: " +    15    } +    16    guess == randomNumber { +    17        printf "that's right\n" +    18        exit +    19    } +``` +认识到这一点,无论输入的是什么值,都需要将其转换为整数,因此我们创建了第 7-9 行来完成这一任务。现在第 10-12、13-15 和 16-19 行这三组代码,都是指已经定义好的变量 guess,而不是每次都对输入行进行转换。 + +让我们回到我们想要学习的东西列表: + * 变量 —— 是的,Awk 有这些;我们可以推断出,输入数据以字符串形式输入,但在需要时可以转换为数值 + * 输入 —— Awk 只是通过它的“数据转换管道”的方式发送输入来读取数据 + * 输出 —— 我们已经使用了 Awk 的 `print` 和 `printf` 函数来将内容写入输出 + * 条件判断 —— 我们已经学习了 Awk 的 *if-then-else* 和对应特定输入行配置的输入过滤器 + * 循环 —— 嗯,想象一下!我们在这里不需要循环,这还是多亏了 Awk 采用的“数据转换管道”方法;循环“就这么发生了”。注意,用户可以通过向 Awk 发送一个文件结束信号(当使用 Linux 终端窗口时可通过快捷键 **CTRL-D**)来提前退出管道。 + +考虑不需要循环来处理输入的重要性是非常值得的。Awk 能够长期存在的一个原因是 Awk 程序是紧凑的,而它们紧凑的一个原因是不需要从控制台或文件中读取样板文件。 + +让我们运行下面这个程序: + + +``` +$ awk -f guess.awk +random number is 25 +guess a number between 1 and 100: 50 +too high, try again: 30 +too high, try again: 10 +too low, try again: 25 +that's right +$ +``` + +我们没有涉及的一件事是注释。Awk 注释以“#”开头,以行尾结束。 + +### 总结 + +Awk 非常强大,这种“猜数字”游戏是入门的好方法。但这不应该是你探索 Awk 的终点。你可以 [阅读关于 Awk 和 Gawk (GNU Awk) 的历史][6],Gawk是 Awk 的扩展版本,如果你在电脑上运行Linux,可能会有这个。或者,你可以 [阅读所有关于它最初开发者的原始版本][7]。 + +你还可以 [下载我们的备忘单][8] 来帮你记录下你所学的一切。 + + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/1/learn-awk + +作者:[Chris Hermansen][a] +选题:[lujun9972][b] +译者:[FYJNEVERFOLLOWS](https://github.com/FYJNEVERFOLLOWS) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/clhermansen +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/question-mark_chalkboard.jpg?itok=DaG4tje9 (question mark in chalk) +[2]: https://opensource.com/article/20/12/julia +[3]: https://opensource.com/article/20/12/learn-bash +[4]: https://opensource.com/article/20/9/awk-ebook +[5]: https://en.wikipedia.org/wiki/42_(number)#The_Hitchhiker's_Guide_to_the_Galaxy +[6]: https://www.gnu.org/software/gawk/manual/html_node/History.html +[7]: https://archive.org/details/pdfy-MgN0H1joIoDVoIC7 +[8]: https://opensource.com/downloads/cheat-sheet-awk-features From f3f521e1a90d6f3f657e6fbfc7bcb2141902beb4 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 28 May 2022 18:25:13 +0800 Subject: [PATCH 042/104] RP @lkxed https://linux.cn/article-14645-1.html --- ...h HP for a Powerful Linux Laptop for Developers.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) rename {translated/news => published}/20220523 System76 Collaborates with HP for a Powerful Linux Laptop for Developers.md (92%) diff --git a/translated/news/20220523 System76 Collaborates with HP for a Powerful Linux Laptop for Developers.md b/published/20220523 System76 Collaborates with HP for a Powerful Linux Laptop for Developers.md similarity index 92% rename from translated/news/20220523 System76 Collaborates with HP for a Powerful Linux Laptop for Developers.md rename to published/20220523 System76 Collaborates with HP for a Powerful Linux Laptop for Developers.md index b01955f64c..ad1edfd55d 100644 --- a/translated/news/20220523 System76 Collaborates with HP for a Powerful Linux Laptop for Developers.md +++ b/published/20220523 System76 Collaborates with HP for a Powerful Linux Laptop for Developers.md @@ -3,13 +3,14 @@ [#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" [#]: collector: "lkxed" [#]: translator: "lkxed" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14645-1.html" System76 与惠普合作为开发者提供功能强大的 Linux 笔记本电脑 ====== -惠普正在以开箱即用的 Pop!_OS 为特色进入 Linux 硬件市场,貌似有点激动人心?还是先来看一看吧! + +> 惠普正在以开箱即用的 Pop!_OS 为特色进入 Linux 硬件市场,貌似有点激动人心?还是先来看一看吧! ![hp][1] @@ -62,7 +63,7 @@ via: https://news.itsfoss.com/hp-dev-one-system76/ 作者:[Ankush Das][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/) 荣誉推出 From dcf50486145c19586dca698571a1bdf0f0aceabb Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 28 May 2022 19:16:28 +0800 Subject: [PATCH 043/104] RP @geekpi https://linux.cn/article-14646-1.html --- ...Customize GNOME 42 with A Polished Look.md | 132 ++++++++++++++++++ ...Customize GNOME 42 with A Polished Look.md | 129 ----------------- 2 files changed, 132 insertions(+), 129 deletions(-) create mode 100644 published/20220520 Customize GNOME 42 with A Polished Look.md delete mode 100644 translated/tech/20220520 Customize GNOME 42 with A Polished Look.md diff --git a/published/20220520 Customize GNOME 42 with A Polished Look.md b/published/20220520 Customize GNOME 42 with A Polished Look.md new file mode 100644 index 0000000000..7f5fabc586 --- /dev/null +++ b/published/20220520 Customize GNOME 42 with A Polished Look.md @@ -0,0 +1,132 @@ +[#]: subject: "Customize GNOME 42 with A Polished Look" +[#]: via: "https://www.debugpoint.com/2022/05/customize-gnome-42-look-1/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14646-1.html" + +如何把你的 GNOME 42 打磨得更精致 +====== + +![](https://img.linux.net.cn/data/attachment/album/202205/28/191525nx791r930j88ra3z.jpg) + +> 在 5 分钟内将你最喜欢的 GNOME 桌面打磨得更精致。 + +你可以使用图标、主题、光标和壁纸等多种方式来定制你最喜爱的 GNOME 桌面。本文向你展示了如何使你的 GNOME 42 桌面看起来更精致。在最近发布的 Ubuntu 22.04 LTS 和 Fedora 36 上提供了 GNOME 42 桌面环境。 + +在你进一步阅读之前,先看看调整之前和之后的外观比较。 + +![GNOME before customisation][1] + +![GNOME after customisation][2] + +我将把本教程分为两个部分。 + +第一部分涉及设置和安装所需的软件包。然后第二部分是如何应用各种设置来获得你想要的外观。 + +本教程主要在 Ubuntu 22.04 LTS 上测试。但是,它应该适用于 Ubuntu 和 Fedora 的其他变体。 + +### 将 GNOME 42 定制得更精致 + +#### 设置 + +首先,为你的系统启用 Flatpak,因为我们需要安装扩展管理器来下载本教程所需的 GNOME Shell 扩展。 + +因此,要做到这一点,请打开一个终端并运行以下命令: + +``` +sudo apt install flatpak gnome-software-plugin-flatpak +flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo +``` + +完成后重启计算机。 + +然后从终端运行以下命令,来安装扩展管理器应用以下载 GNOME Shell 扩展: + +``` +flatpak install flathub com.mattjakeman.ExtensionManager +``` + +打开扩展管理器应用,并安装两个扩展。第一个是 “浮动停靠区Floating Dock”,它提供了超酷的停靠区,你可以在桌面上的任何位置移动它。第二个,安装 “用户主题User themes” 扩展来帮助你在 Ubuntu Linux 中安装外部 GTK 主题。 + +![User Themes Extension][3] + +![Floating Dock Extension][4] + +接着,使用以下命令安装 [Materia 主题][5]。你必须构建它,因为它没有任何可执行文件。在 Ubuntu 中依次运行以下命令进行安装: + +``` +git clone https://github.com/ckissane/materia-theme-transparent.git +cd materia-theme-transparent +meson _build +meson install -C _build +``` + +此外,请从 [这里][7] 下载 [Kora 图标主题][6]。下载后解压文件,将以下四个文件夹复制到 `/home/<用户名>/.icons` 路径下。如果 `.icons` 文件夹不存在,请创建它。 + +![Kora Icon Theme][8] + +除了上述更改,从 [这里][9] 下载 Bibata 光标主题。下载后,解压文件夹并将其复制到相同的 `/home/<用户名>/.icons` 文件夹中。 + +除了上述之外,如果你想要一个与上述主题相匹配的漂亮字体,请从谷歌字体 [下载 Robot 字体][10],并将它们复制到 `/home//.fonts` 文件夹。 + +最后,再次重启系统。 + +#### 配置 + +打开扩展管理器,启用 “浮动停靠区Floating Dock” 和 “用户主题User themes”,并禁用 “Ubuntu Dock”。 + +![Changes to Extensions][11] + +此外,打开 “浮动停靠区Floating Dock” 设置并进行以下更改: + +![Floating Dock Settings][12] + +此外,打开 [GNOME 优化工具][13]GNOME Tweak Tool,然后转到外观Appearance选项卡。设置以下内容: + +* 光标:Bibata-Original-Ice +* Shell 主题:Materia +* 图标:Kora + +除此之外,你可能还想更改字体。为此,请转到字体Fonts选项卡并将文档和界面更改为 “Robot 10pt”。 + +或者,你也可以从 Ubuntu 22.04 的默认设置中更改强调色和样式。 + +最后,根据你的喜好下载漂亮的壁纸。对于本教程,我从 [这里][14] 下载了一个示例壁纸。 + +如果一切顺利,你应该有一个漂亮的桌面,如下图所示: + +![Customize GNOME 42 – Final Look][15] + +享受你的精致的 GNOME 42!干杯。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/05/customize-gnome-42-look-1/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://i2.wp.com/www.debugpoint.com/wp-content/uploads/2022/05/GNOME-before-customisation.jpg?ssl=1 +[2]: https://i0.wp.com/www.debugpoint.com/wp-content/uploads/2022/05/GNOME-after-customisation.jpg?ssl=1 +[3]: https://www.debugpoint.com/wp-content/uploads/2022/05/User-Themes-Extension2.jpg +[4]: https://www.debugpoint.com/wp-content/uploads/2022/05/Floating-Doc-Extension.jpg +[5]: https://github.com/ckissane/materia-theme-transparent +[6]: https://github.com/bikass/kora/ +[7]: https://github.com/bikass/kora/archive/refs/heads/master.zip +[8]: https://www.debugpoint.com/wp-content/uploads/2022/05/Kora-Icon-Theme.jpg +[9]: https://www.pling.com/p/1197198/ +[10]: https://fonts.google.com/specimen/Roboto +[11]: https://www.debugpoint.com/wp-content/uploads/2022/05/Changes-to-Extensions.jpg +[12]: https://www.debugpoint.com/wp-content/uploads/2022/05/Floating-Dock-Settings.jpg +[13]: https://www.debugpoint.com/2018/05/customize-your-ubuntu-desktop-using-gnome-tweak/ +[14]: https://www.pexels.com/photo/colorful-blurred-image-6985048/ +[15]: https://www.debugpoint.com/wp-content/uploads/2022/05/Customize-GNOME-42-Final-Look.jpg diff --git a/translated/tech/20220520 Customize GNOME 42 with A Polished Look.md b/translated/tech/20220520 Customize GNOME 42 with A Polished Look.md deleted file mode 100644 index 2d392a328d..0000000000 --- a/translated/tech/20220520 Customize GNOME 42 with A Polished Look.md +++ /dev/null @@ -1,129 +0,0 @@ -[#]: subject: "Customize GNOME 42 with A Polished Look" -[#]: via: "https://www.debugpoint.com/2022/05/customize-gnome-42-look-1/" -[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" -[#]: collector: "lkxed" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -自定义 GNOME 42 的精致外观 -====== -一个关于如何在 5 分钟内为你最喜欢的 GNOME 桌面提供精美外观的教程。 - -你可以通过多种方式使用图标、主题、光标和壁纸自定义你最喜爱的 GNOME 桌面。本文向你展示了如何使 GNOME 42 桌面看起来更加精致。GNOME 42 桌面环境可用于最近发布的 Ubuntu 22.04 LTS 和 Fedora 36。 - -在你进一步阅读之前,这是并排比较(之前和之后)的外观。 - -![GNOME before customisation][1] - -![GNOME after customisation][2] - -我将把本教程分为两个部分。 - -第一部分涉及设置和安装所需的软件包。其次,如何应用各种设置来获得你想要的外观。 - -本教程主要在 Ubuntu 22.04 LTS 上测试。但是,它应该适用于 Ubuntu 和 Fedora 的其他变体。 - -### 使用精致外观自定义 GNOME 42 - -#### 设置 - -* 首先,为你的系统启用 Flatpak,因为我们需要安装扩展管理器来下载本教程所需的 GNOME Shell 扩展。 - -* 因此,要做到这一点,请打开一个终端并运行以下命令。 - -``` -sudo apt install flatpak gnome-software-plugin-flatpakflatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo -``` - -* 完成后重启计算机。 - -* 然后从终端运行以下命令来安装扩展管理器应用以下载 GNOME Shell 扩展。 - -``` -flatpak install flathub com.mattjakeman.ExtensionManager -``` - -* 打开扩展管理器应用并安装两个扩展。第一个是浮动 dock,它具有超酷的 dock,你可以在桌面上的任何位置移动。其次,安装用户主题扩展来帮助你在 Ubuntu Linux 中安装外部 GTK 主题。 - -![User Themes Extension][3] - -![Floating Dock Extension][4] - -* 其次,使用以下命令安装 [Materia 主题][5]。你必须构建它,因为它没有任何可执行文件。在 Ubuntu 中依次运行以下命令进行安装。 - -``` -git clone https://github.com/ckissane/materia-theme-transparent.gitcd materia-theme-transparentmeson _buildmeson install -C _build -``` - -* 此外,请从以下链接下载 [Kora 图标主题][6]。下载后解压文件,将以下四个文件夹复制到 `/home/<用户名>/.icons` 路径下。如果 .icons 文件夹不存在,请创建它。 - -[下载 Kora 图标主题][7] - -![Kora Icon Theme][8] - -* 除了上述更改,从下面的链接下载 Bibata 光标主题。下载后,解压文件夹并将其复制到相同的 `/home/<用户名>/.icons` 文件夹中。 - -[下载 Bibata 光标主题][9] - -* 除了上述之外,如果你想要一个与上述主题相匹配的漂亮字体,请从 Google Fonts [下载 Robot font][10] 并将它们复制到 `/home//.fonts` 文件夹。 - -* 最后,再次重启系统。 - -#### 配置 - -* 打开扩展管理器,启用浮动 dock 和用户主题,并禁用 Ubuntu Dock。 - -![Changes to Extensions][11] - -* 此外,打开浮动 dock 设置并进行以下更改。 - -![Floating Dock Settings][12] - -* 此外,打开 [GNOME Tweak Tool][13],然后转到外观选项卡。设置以下内容。 - -* 光标:Bibata-Original-Ice -* Shell 主题:Materia -* 图标:Kora - -* 除此之外,你可能还想更改字体。为此,请转到字体选项卡并将文档和界面更改为 Robot 10pt。 - -* 或者,你也可以从 Ubuntu 22.04 的默认设置中更改强调色和样式。 - -* 最后,根据你的喜好下载漂亮的壁纸。对于本教程,我从[这里][14]下载了一个示例壁纸。 - -* 如果一切顺利,你应该有一个漂亮的桌面,如下图所示。 - -![Customize GNOME 42 – Final Look][15] - -享受精致的 GNOME 42。干杯。 - --------------------------------------------------------------------------------- - -via: https://www.debugpoint.com/2022/05/customize-gnome-42-look-1/ - -作者:[Arindam][a] -选题:[lkxed][b] -译者:[geekpi](https://github.com/geekpi) -校对:[校对者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://i2.wp.com/www.debugpoint.com/wp-content/uploads/2022/05/GNOME-before-customisation.jpg?ssl=1 -[2]: https://i0.wp.com/www.debugpoint.com/wp-content/uploads/2022/05/GNOME-after-customisation.jpg?ssl=1 -[3]: https://www.debugpoint.com/wp-content/uploads/2022/05/User-Themes-Extension2.jpg -[4]: https://www.debugpoint.com/wp-content/uploads/2022/05/Floating-Doc-Extension.jpg -[5]: https://github.com/ckissane/materia-theme-transparent -[6]: https://github.com/bikass/kora/ -[7]: https://github.com/bikass/kora/archive/refs/heads/master.zip -[8]: https://www.debugpoint.com/wp-content/uploads/2022/05/Kora-Icon-Theme.jpg -[9]: https://www.pling.com/p/1197198/ -[10]: https://fonts.google.com/specimen/Roboto -[11]: https://www.debugpoint.com/wp-content/uploads/2022/05/Changes-to-Extensions.jpg -[12]: https://www.debugpoint.com/wp-content/uploads/2022/05/Floating-Dock-Settings.jpg -[13]: https://www.debugpoint.com/2018/05/customize-your-ubuntu-desktop-using-gnome-tweak/ -[14]: https://www.pexels.com/photo/colorful-blurred-image-6985048/ -[15]: https://www.debugpoint.com/wp-content/uploads/2022/05/Customize-GNOME-42-Final-Look.jpg From d8163bf70f2568cb5c473c27a1c3aa325e3a18ed Mon Sep 17 00:00:00 2001 From: MjSeven Date: Sun, 29 May 2022 06:47:48 +0800 Subject: [PATCH 044/104] Translating --- sources/tech/20220214 A guide to Kubernetes architecture.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20220214 A guide to Kubernetes architecture.md b/sources/tech/20220214 A guide to Kubernetes architecture.md index 2f3ce6fc63..f334912823 100644 --- a/sources/tech/20220214 A guide to Kubernetes architecture.md +++ b/sources/tech/20220214 A guide to Kubernetes architecture.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/22/2/kubernetes-architecture" [#]: author: "Nived Velayudhan https://opensource.com/users/nivedv" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "MjSeven" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 6abaa35e2d720e7ce0543dacaae57b5726330827 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 29 May 2022 08:35:38 +0800 Subject: [PATCH 045/104] RP @robsean https://linux.cn/article-14648-1.html --- ...do Password In Ubuntu 22.04 - 20.04 LTS.md | 41 ++++++++++--------- 1 file changed, 22 insertions(+), 19 deletions(-) rename {translated/tech => published}/20220518 How To Reset Sudo Password In Ubuntu 22.04 - 20.04 LTS.md (55%) diff --git a/translated/tech/20220518 How To Reset Sudo Password In Ubuntu 22.04 - 20.04 LTS.md b/published/20220518 How To Reset Sudo Password In Ubuntu 22.04 - 20.04 LTS.md similarity index 55% rename from translated/tech/20220518 How To Reset Sudo Password In Ubuntu 22.04 - 20.04 LTS.md rename to published/20220518 How To Reset Sudo Password In Ubuntu 22.04 - 20.04 LTS.md index 63c1703c11..b6bb934753 100644 --- a/translated/tech/20220518 How To Reset Sudo Password In Ubuntu 22.04 - 20.04 LTS.md +++ b/published/20220518 How To Reset Sudo Password In Ubuntu 22.04 - 20.04 LTS.md @@ -3,45 +3,48 @@ [#]: author: "sk https://ostechnix.com/author/sk/" [#]: collector: "lkxed" [#]: translator: "robsean" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14648-1.html" 如何在 Ubuntu 22.04 / 20.04 LTS 中重新设置 sudo 密码 ====== -在 Ubuntu 中重新设置已忘记的 root 用户的密码 + +![](https://img.linux.net.cn/data/attachment/album/202205/29/083429wzrvirffinihrfv5.jpg) + +> 在 Ubuntu 中重新设置已忘记的 root 用户的密码 这篇简单的指南将向你解释,如何在 Ubuntu 22.04 好 20.04 LTS 桌面环境中,以及从服务器版本中的 恢复rescue 模式中重新设置 sudo 密码。 ### 介绍 -在 **[安装 Ubuntu][1]** 时,新创建的一个用户将会带有 sudo 权限,用以执行各种各样的管理任务。 +在 [安装 Ubuntu][1] 时,创建的一个新用户将会带有 `sudo` 权限,用以执行各种各样的管理任务。 -如果你的 Ubuntu 系统有多个 sudo 用户,你能够从另外一个 sudo 用户的账号下,轻松地重新设置所忘记的一个 sudo 用户或管理员用户的密码。 +如果你的 Ubuntu 系统有多个 `sudo` 用户,你能够从另外一个 `sudo` 用户的账号下,轻松地重新设置所忘记的一个 `sudo` 用户或管理员用户的密码。 -如果你只有一个 sudo 用户,并且忘记了密码怎么办?没有问题! 从 Ubuntu 的 **恢复rescue** 或 **单一用户single user**** 模式中恢复 sudo 用户密码很容易。 +如果你只有一个 `sudo` 用户,并且忘记了密码怎么办?没有问题! 从 Ubuntu 的 恢复rescue单一用户single user 模式中恢复 `sudo` 用户密码很容易。 虽然这篇指南是在 Ubuntu 22.04 和 20.04 LTS 版本上进行的正式测试,不过,下面给定的步骤对于其它的 Ubuntu 版本和衍生版本来说是相同的。 ### 在 Ubuntu 22.04 / 20.04 LTS 中重新设置 sudo 密码 -首先,启动你的 Ubuntu 系统到 **恢复rescue** 模式下,来重新设置一个 sudo 用户的密码,如下面的链接所述。 +首先,启动你的 Ubuntu 系统到 恢复rescue 模式下,来重新设置一个 `sudo` 用户的密码,操作如下面的链接所述。 -> [如何启动到 Ubuntu 22.04 /  20.04 / 18.04 的 恢复rescue 模式 或 急救Emergency 模式 ][2] +> [如何启动到 Ubuntu 22.04 /  20.04 / 18.04 的 恢复rescue 模式 或 急救Emergency模式 ][2] -在吗进入到 **恢复rescue** 模式下,通过运行下面的命令,以读/写的模式挂载 root (**/**) 文件系统: +现在,进入到 恢复rescue 模式下,通过运行下面的命令,以读/写的模式挂载根(`/`)文件系统: ``` # mount -n -o remount,rw / ``` -现在,使用 **"passwd"** 命令来重新设置 sudo 用户的密码: +现在,使用 `passwd` 命令来重新设置 `sudo` 用户的密码: ``` # passwd ostechnix ``` -在这里,**"ostechnix"** 是 sudo 用户的名称。 使用你自己的用户名称来替换掉它。 +在这里,`ostechnix` 是 sudo 用户的名称。使用你自己的用户名称来替换掉它。 输入两次密码: @@ -53,7 +56,7 @@ passwd: password updated successfully ![Reset Sudo Password In Ubuntu 22.04 / 20.04 LTS][3] -就这样。我们已经重新设置 sudo 用户密码。如果你按照上面链接所述的 **方法 1** 来进入到 **恢复rescue** 模式,按下 **“Ctrl+d”** 组合键来启动到正常模式。或者,你也可以输入下面的任意一个命令来启动到正常模式。 +就这样。我们已经重新设置 `sudo` 用户密码。如果你按照上面链接所述的方法 1 进入到 恢复rescue 模式,按下 `Ctrl+d` 组合键来启动到正常模式。或者,你也可以输入下面的任意一个命令来启动到正常模式。 ``` # systemctl default @@ -71,23 +74,23 @@ passwd: password updated successfully # systemctl reboot ``` -如果你已经按照上面链接所述的 **方法 2** 进入到恢复rescue 模式,输入: +如果你已经按照上面链接所述的方法 2 进入到恢复rescue 模式,输入: ``` # exit ``` -你将返回到 恢复菜单recovery menu 。 现在 "**恢复正常启动Resume normal boot**" ,并按下 回车ENTER 键。 +你将返回到 恢复菜单recovery menu。现在选择 “恢复正常启动Resume normal boot”,并按下回车键。 ![Boot Into Normal Mode In Ubuntu][4] -在强调一次,选择 确定OK 按钮,并按下 回车ENTER 按键来继续启动到正常模式: +在强调一次,选择 “确定OK” 按钮,并按下回车按键来继续启动到正常模式: ![Exit Recovery Mode And Boot Into Normal Mode][5] -现在,你在运行管理命令时可以使用新的 sudo 密码。 +现在,你在运行管理命令时可以使用新的 `sudo` 密码。 -##### 如果我把用户名称和密码都忘了怎么办? +### 如果我把用户名称和密码都忘了怎么办? 如果你忘记了用户名称,在 恢复rescue 模式下,你可以很容易地列出你的 Linux 系统中的用户名称,使用目录: @@ -112,7 +115,7 @@ via: https://ostechnix.com/how-to-reset-sudo-password-in-ubuntu-20-04-lts/ 作者:[sk][a] 选题:[lkxed][b] 译者:[robsean](https://github.com/robsean) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From a0b5379f11d920f7d72ea82a4b5012cd4e6da15d Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 29 May 2022 09:11:12 +0800 Subject: [PATCH 046/104] RP @geekpi https://linux.cn/article-14649-1.html --- ...age for Smart Contracts in a Blockchain.md | 33 ++++++++++--------- 1 file changed, 17 insertions(+), 16 deletions(-) rename {translated/tech => published}/20220523 DAML- The Programming Language for Smart Contracts in a Blockchain.md (66%) diff --git a/translated/tech/20220523 DAML- The Programming Language for Smart Contracts in a Blockchain.md b/published/20220523 DAML- The Programming Language for Smart Contracts in a Blockchain.md similarity index 66% rename from translated/tech/20220523 DAML- The Programming Language for Smart Contracts in a Blockchain.md rename to published/20220523 DAML- The Programming Language for Smart Contracts in a Blockchain.md index fb88edaab8..c333cb5a81 100644 --- a/translated/tech/20220523 DAML- The Programming Language for Smart Contracts in a Blockchain.md +++ b/published/20220523 DAML- The Programming Language for Smart Contracts in a Blockchain.md @@ -3,21 +3,22 @@ [#]: author: "Dr Kumar Gaurav https://www.opensourceforu.com/author/dr-gaurav-kumar/" [#]: collector: "lkxed" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14649-1.html" DAML:区块链中智能合约的编程语言 ====== -DAML 智能合约语言是一种专门设计的特定领域语言,用于编码应用的共享业务逻辑。它用于区块链环境中分布式应用的开发和部署。 -![blockchain-hand-shake][1] +> DAML 智能合约语言是一种专门设计的特定领域语言domain specific language(DSL),用于编码应用的共享业务逻辑。它用于区块链环境中分布式应用的开发和部署。 + +![](https://img.linux.net.cn/data/attachment/album/202205/29/090752supudcno3dufa41j.jpg) 区块链技术是一种安全机制,以一种使人难以或不可能修改或入侵的方式来跟踪信息。区块链整合了交易的数字账本,它被复制并发送至其网络上的每台计算机。在链的每个区块中,都有一些交易。当区块链上发生新的交易时,该交易的记录就会被添加到属于该链的每个人的账簿中。 -区块链使用分布式账本技术(DLT),其中数据库并不保存在一个服务器或节点中。在区块链中,交易被记录在一个被称为哈希的不可改变的加密符号中。这意味着,如果一个通道或链上的一个区块被改变,黑客将很难改变链上的那个区块,因为他们必须对外面的每一个版本的链都要这样做。区块链,如比特币和以太坊,随着新的区块被添加到链上而不断增长,这使得账本更加安全。 +区块链使用分布式账本技术distributed ledger technology(DLT),其中数据库并不保存在一个服务器或节点中。在区块链中,交易被记录在一个被称为哈希hash的不可改变的加密符号中。这意味着,如果一个通道或链上的一个区块被改变,黑客将很难改变链上的那个区块,因为他们必须对外面的每一个版本的链都要这样做。区块链,如比特币和以太坊,随着新的区块被添加到链上而不断增长,这使得账本更加安全。 -随着区块链中智能合约的实施,在没有任何人工干预的情况下,有自动执行的场景。智能合约技术使得执行最高级别的安全、隐私和反黑客实施成为可能。 +随着区块链中智能合约的实施,在没有任何人工干预的情况下,有了自动执行的场景。智能合约技术使得执行最高级别的安全、隐私和反黑客实施成为可能。 ![Figure 1: Market size of blockchain technology (Source: Statista.com)][2] @@ -34,7 +35,7 @@ DAML 智能合约语言是一种专门设计的特定领域语言,用于编码 * 数字投票 * 供应链管理 -根据 *Statista.com*,自过去几年以来,区块链技术市场的规模正在以非常快的速度增长,预计到 2025 年将达到 400 亿美元。 +根据 Statista.com,自过去几年以来,区块链技术市场的规模正在以非常快的速度增长,预计到 2025 年将达到 400 亿美元。 ### 区块链的编程语言和工具箱 @@ -46,7 +47,7 @@ DAML 智能合约语言是一种专门设计的特定领域语言,用于编码 开发区块链的主要平台有: -* Ethereum +* 以太坊 * XDC Network * Tezos * Stellar @@ -63,7 +64,7 @@ DAML 智能合约语言是一种专门设计的特定领域语言,用于编码 ### DAML:一种高性能的编程语言 -数字资产建模语言或 DAML(daml.com)是一种高性能的编程语言,用于开发和部署区块链环境中的分布式应用。它是一个轻量级和简洁的平台,用于快速应用开发。 +数字资产建模语言Digital Asset Modeling Language,即 DAML(daml.com),是一种高性能的编程语言,用于开发和部署区块链环境中的分布式应用。它是一个轻量级和简洁的平台,用于快速应用开发。 ![Figure 3: Official portal of DAML][4] @@ -83,14 +84,14 @@ DAML 的主要特点是: ### 安装和使用 DAML -DAML SDK 可以安装在 Linux、macOS 或 Windows 上。在多个操作系统上安装 DAML 的详细说明可访问 *https://docs.daml.com/getting-started/installation.html*。 +DAML SDK 可以安装在 Linux、macOS 或 Windows 上。在多个操作系统上安装 DAML 的详细说明可访问 https://docs.daml.com/getting-started/installation.html 。 你必须具备以下条件才能使用 DAML: * Visual Studio Code * Java 开发套件(JDK) -DAML 可以通过下载并运行可执行的安装程序在 Windows 上安装,你可访问 *https://github.com/digital-asset/daml/releases/download/v1.18.1/daml-sdk-1.18.1-windows.exe。* +DAML 可以通过下载并运行可执行的安装程序在 Windows 上安装,你可访问 https://github.com/digital-asset/daml/releases/download/v1.18.1/daml-sdk-1.18.1-windows.exe 。 在 Linux 或 Mac 上安装 DAML 可以通过在终端执行以下内容来完成: @@ -112,13 +113,13 @@ WorkingDirectory>npm install WorkingDirectory>npm start ``` -WebUI 被启动,该应用可在 Web 浏览器上通过 URL *http://localhost:3000/* 访问。 +这样启动了 WebUI,该应用可在 Web 浏览器上通过 URL http://localhost:3000/ 访问。 ![Figure 6: Login panel in DAML app][7] ### 研究和开发的范围 -区块链技术为不同类别的应用提供了广泛的开发平台和框架。其中许多平台是免费和开源的,可以下载和部署以用于基于研究的实现。研究学者、从业者和院士可以使用这些平台为众多应用提出和实施他们的算法。 +区块链技术为不同类别的应用提供了广泛的开发平台和框架。其中许多平台是免费和开源的,可以下载和部署以用于基于研究的实现。研究学者、从业者和专家们可以使用这些平台为众多应用提出和实施他们的算法。 -------------------------------------------------------------------------------- @@ -127,7 +128,7 @@ via: https://www.opensourceforu.com/2022/05/daml-the-programming-language-for-sm 作者:[Dr Kumar Gaurav][a] 选题:[lkxed][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -135,7 +136,7 @@ via: https://www.opensourceforu.com/2022/05/daml-the-programming-language-for-sm [b]: https://github.com/lkxed [1]: https://www.opensourceforu.com/wp-content/uploads/2022/04/blockchain-hand-shake.jpg [2]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-1-Market-size-of-blockchain-technology.jpg -[3]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-2-Factors-to-look-at-when-selecting-a-blockchain-platform-2.jpg +[3]: https://www.opensourceforu.com/wp-content/uploads/2022/05/Untitled.png [4]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-3-Official-portal-of-DAML-1.jpg [5]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-4-Creating-a-new-app.jpg [6]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-5-Running-DAML.jpg From 7e24069cff806470c5434e231943c2b763d9a51c Mon Sep 17 00:00:00 2001 From: lkxed Date: Sun, 29 May 2022 14:44:41 +0800 Subject: [PATCH 047/104] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020220529=20Compile=20GNOME=20Shell=20and=20Apps=20From?= =?UTF-8?q?=20Source=20[Beginner-s=20Guide].md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...and Apps From Source [Beginner-s Guide].md | 168 ++++++++++++++++++ 1 file changed, 168 insertions(+) create mode 100644 sources/tech/20220529 Compile GNOME Shell and Apps From Source [Beginner-s Guide].md diff --git a/sources/tech/20220529 Compile GNOME Shell and Apps From Source [Beginner-s Guide].md b/sources/tech/20220529 Compile GNOME Shell and Apps From Source [Beginner-s Guide].md new file mode 100644 index 0000000000..f93267c241 --- /dev/null +++ b/sources/tech/20220529 Compile GNOME Shell and Apps From Source [Beginner-s Guide].md @@ -0,0 +1,168 @@ +[#]: subject: "Compile GNOME Shell and Apps From Source [Beginner’s Guide]" +[#]: via: "https://www.debugpoint.com/2022/05/compile-gnome-source/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Compile GNOME Shell and Apps From Source [Beginner’s Guide] +====== +Here’s a quick guide for you on how to compile GNOME from its source, including the shell, mutter and some native apps. + +Before you compile, you need to make sure certain things because the following compilation is directly from the master branch in GitLab, which contains some development packages. + +In general, you can compile in any Linux distribution of your choice. But I would recommend using Fedora Rawhide which is the development branch of Fedora, for future releases. + +Also, do not try this in a stable system. Because things may go wrong, you may end up with a broken system. + +To summarize, you need the following to compile GNOME from the source. + +* A test setup ([Virtual machine][1] or a test system) +* Fedora Rawhide Distro (recommended. [Download from here][2]) +* Make sure your distro is up to date. +* And you are logged in to an X.Org session. + +I would not recommend compiling in the Wayland session because you will run into problems. + +### Compile GNOME from the Source + +The GNOME desktop is a collection of packages based on their functions. The desktop component of a Linux distribution works under a window manager and shell. + +So for GNOME, I will first compile mutter – the window manager for GNOME Shell. And then followed by the compilation of GNOME Shell. Finally, I will compile some native apps. + +I will use the meson build system for compilation. The meson is a beautiful build system which is fast and user friendly. + +#### Compile Mutter + +Open a terminal and install the required packages for GNOME Shell and mutter. + +``` +sudo dnf build-dep mutter gnome-shell +``` + +Create a demo directory in your home drive (or anywhere you want). + +``` +cd ~ +``` + +``` +mkdir demo +``` + +``` +cd demo +``` + +Clone the mutter master branch from GitLab. + +git clone https://gitlab.gnome.org/GNOME/mutter + +Go to the cloning directory and use the below meson command to prepare the build files. By default, meson uses `/usr/local` for building files. However, you can also use prefix switch to redirect the output to a specific folder (shown below). + +``` +cd mutter +``` + +``` +meson _build --prefix=/usr +``` + +![Compile Mutter for GNOME][3] + +Install mutter in your system when the build is complete using the below command. + +``` +sudo ninja install -C _build +``` + +#### Compile GNOME Shell + +The compilation of GNOME Shell and other packages are similar. First, clone the GNOME Shell master repository from GitLab, then build and install. You can follow the below commands in sequence. + +There are two dependencies which you need for GNOME Shell. They are [asciidoc][4] and [sassc][5]. Install them before you build GNOME Shell. + +``` +sudo dnf install asciidoc +``` + +``` +sudo dnf install sassc +``` + +After installing these dependencies, follow the below commands to build and install GNOME Shell. Make sure you go back to the `demo` folder (which I created in the first step) before running this command. + +``` +git clone https://gitlab.gnome.org/GNOME/gnome-shellcd gnome-shellmeson _build --prefix=/usrsudo ninja install -C _build +``` + +### Running the GNOME Shell + +After you finish compiling, you can try restarting the GNOME Shell to see the changes from the master branch. + +Before you restart, as I mentioned earlier, make sure you are in the X.Org session. Press `ALT+F2` and type `r`. Then press enter. This command will restart GNOME Shell. + +![Restart GNOME Shell (X11)][6] + +And congratulations! You have successfully compiled GNOME Shell and Mutter. + +Now, it’s time to compile some sample GNOME native applications. + +### Compile GNOME Native Applications + +The steps are the same for all sources of GNOME or any applications. You need to change the repo name. So, here are some sample commands to compile necessary GNOME native apps. + +#### Files (Nautilus) + +``` +git clone https://gitlab.gnome.org/GNOME/nautilus/cd gnome-shellmeson _build --prefix=/usrsudo ninja install -C _build +``` + +#### GNOME Software + +``` +git clone https://gitlab.gnome.org/GNOME/gnome-software/cd gnome-shellmeson _build --prefix=/usrsudo ninja install -C _build +``` + +#### GNOME Control Center + +``` +git clone https://gitlab.gnome.org/GNOME/gnome-control-center/cd gnome-shellmeson _build --prefix=/usrsudo ninja install -C _build +``` + +### FAQ + +1. Using the above steps, you can compile any source branch. Not only GNOME. +2. The GitLab server is sometimes slow, and it may take a longer time to clone a repo. If the `git clone` fails, I would recommend you to try again. + +### Closing Notes + +I hope this little advanced tutorial helps you try out new GNOME features before they land in GNOME nightly OS. Since you compiled, you may also contribute to testing new GNOME features and report any bugs or problems on the GitLab Issues page for specific packages. + +This article is the first instalment of the open-source app compilation series. Stay tuned for more compilation articles of more open-source apps. + +Also, do let me know your comments, suggestions, or any error you faced using these instructions in the comment box. + +Cheers. + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/05/compile-gnome-source/ + +作者:[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/tag/virtual-machine +[2]: https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Workstation/x86_64/iso/ +[3]: https://www.debugpoint.com/wp-content/uploads/2022/05/Compile-Mutter-for-GNOME.jpg +[4]: https://asciidoc.org/ +[5]: https://github.com/sass/sassc +[6]: https://www.debugpoint.com/wp-content/uploads/2022/05/Restart-GNOME-Shell-X11.jpg From f48b6c0550a5b55c89abde2d990c751c77895fc7 Mon Sep 17 00:00:00 2001 From: lkxed Date: Sun, 29 May 2022 14:48:47 +0800 Subject: [PATCH 048/104] =?UTF-8?q?[=E7=94=B3=E9=A2=86=E5=8E=9F=E6=96=87][?= =?UTF-8?q?news]:=2020220525=20ProtonMail=20is=20Now=20Just=20-Proton-=20O?= =?UTF-8?q?ffering=20a=20Privacy=20Ecosystem.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...tonMail is Now Just -Proton- Offering a Privacy Ecosystem.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/news/20220525 ProtonMail is Now Just -Proton- Offering a Privacy Ecosystem.md b/sources/news/20220525 ProtonMail is Now Just -Proton- Offering a Privacy Ecosystem.md index 4ad4483b0b..c2163f76b9 100644 --- a/sources/news/20220525 ProtonMail is Now Just -Proton- Offering a Privacy Ecosystem.md +++ b/sources/news/20220525 ProtonMail is Now Just -Proton- Offering a Privacy Ecosystem.md @@ -2,7 +2,7 @@ [#]: via: "https://news.itsfoss.com/protonmail-now-proton/" [#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "lkxed" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 205f385908baf0a9ba65ca0c27d0fc4ed461e648 Mon Sep 17 00:00:00 2001 From: lkxed Date: Sun, 29 May 2022 15:17:03 +0800 Subject: [PATCH 049/104] =?UTF-8?q?[=E6=8F=90=E4=BA=A4=E8=AF=91=E6=96=87][?= =?UTF-8?q?news]:=2020220525=20ProtonMail=20is=20Now=20Just=20-Proton-=20O?= =?UTF-8?q?ffering=20a=20Privacy=20Ecosystem.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...t -Proton- Offering a Privacy Ecosystem.md | 91 ------------------- ...t -Proton- Offering a Privacy Ecosystem.md | 91 +++++++++++++++++++ 2 files changed, 91 insertions(+), 91 deletions(-) delete mode 100644 sources/news/20220525 ProtonMail is Now Just -Proton- Offering a Privacy Ecosystem.md create mode 100644 translated/news/20220525 ProtonMail is Now Just -Proton- Offering a Privacy Ecosystem.md diff --git a/sources/news/20220525 ProtonMail is Now Just -Proton- Offering a Privacy Ecosystem.md b/sources/news/20220525 ProtonMail is Now Just -Proton- Offering a Privacy Ecosystem.md deleted file mode 100644 index c2163f76b9..0000000000 --- a/sources/news/20220525 ProtonMail is Now Just -Proton- Offering a Privacy Ecosystem.md +++ /dev/null @@ -1,91 +0,0 @@ -[#]: subject: "ProtonMail is Now Just ‘Proton’ Offering a Privacy Ecosystem" -[#]: via: "https://news.itsfoss.com/protonmail-now-proton/" -[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" -[#]: collector: "lkxed" -[#]: translator: "lkxed" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -ProtonMail is Now Just ‘Proton’ Offering a Privacy Ecosystem -====== -ProtonMail announced a re-brand with a new website, new name, updated pricing plans, a refreshed UI, and more changes. - -![proton][1] - -[ProtonMail][2] is rebranding itself as “Proton” to unify all its offerings under a single umbrella. - -Let us not confuse it with Steam’s Proton (which is also simply referred to as Proton), *right?* - -In other words, there will no longer be a separate product page for ProtonMail, ProtonVPN, or any of its services. - -### Proton: An Open-Source Privacy Ecosystem - -![Updated Proton, unified protection][3] - -Proton will have a new single platform (new website) where you can access all the services including: - -* Proton Mail -* Proton VPN -* Proton Drive -* Proton Calendar - -For new log-in sessions, you will be redirected to **proton.me** instead of **protonmail.com/mail.protonmail.com/protonvpn.com** and so on. - -Not just limited to the name/brand, the overall brand accent color, and the approach to its existing user experience will also be impacted by this change. - -![][4] - -Instead of choosing separate upgrades for VPN and Mail, the entire range of services will now be available with a single paid subscription. This also means that the pricing for the premium upgrades is more affordable with the change. - -![][5] - -Overall, the change to make “Proton” a privacy ecosystem aims to appeal to more users who aren’t interested to learn the tech jargon to know how it all works. - -You can take a look at all the details on its new official website ([proton.me][6]) - -The new website looks much cleaner, organized, and a bit more commercially attractive. - -### What’s New? - -You can expect a refreshed user interface with the re-branding and a new website. - -![proton][7] - -In addition to that, Proton also mentions that it has improved the integration between the services for a better user experience. - -![][8] - -If you have already been using ProtonMail, you probably know that they offered existing users to activate their “**@proton.me**” account, which is also a part of this change. - -You can choose to make your new email address **xyz@proton.me** the default, which is shorter and makes more sense with the new name. - -* The old email address isn’t going away. But, a new address is available @proton.me -* Existing paid subscribers should receive a storage boost at no extra cost. -* Refreshed user experience across web applications and mobile applications. -* A new website (you will be automatically redirected to it for new sessions). -* New pricing plans with more storage for Proton Drive. - -*Excited about the change? Do you like the new name and its approach to it? Feel free to drop your thoughts in the comments section below.* - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/protonmail-now-proton/ - -作者:[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/05/proton-ft.jpg -[2]: https://itsfoss.com/recommends/protonmai -[3]: https://youtu.be/s5GNTQ63HJE -[4]: https://news.itsfoss.com/wp-content/uploads/2022/05/proton-ui-new-1024x447.jpg -[5]: https://news.itsfoss.com/wp-content/uploads/2022/05/proton-pricing-1024x494.jpg -[6]: https://proton.me/ -[7]: https://news.itsfoss.com/wp-content/uploads/2022/05/Proton-me-website.png -[8]: https://news.itsfoss.com/wp-content/uploads/2022/05/Proton-Product.png diff --git a/translated/news/20220525 ProtonMail is Now Just -Proton- Offering a Privacy Ecosystem.md b/translated/news/20220525 ProtonMail is Now Just -Proton- Offering a Privacy Ecosystem.md new file mode 100644 index 0000000000..550d8d57e3 --- /dev/null +++ b/translated/news/20220525 ProtonMail is Now Just -Proton- Offering a Privacy Ecosystem.md @@ -0,0 +1,91 @@ +[#]: subject: "ProtonMail is Now Just ‘Proton’ Offering a Privacy Ecosystem" +[#]: via: "https://news.itsfoss.com/protonmail-now-proton/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +ProtonMail 改名为 “Proton”,致力于提供一个隐私生态系统 +====== +ProtonMail 宣布了重塑后的品牌,包括新网站、新名称、新的定价计划、新的 UI 和其他变化。 + +![proton][1] + +[ProtonMail][2] 将自己重新命名为 ”Proton”,以将其所有产品囊括在统一的品牌下。 + +注意,别把它和 Steam 的 Proton(它也简称为 Proton)混淆哦! + +换句话说,ProtonMail、ProtonVPN 和它的任何服务将不再有单独的产品页面。 + +### Proton:一个开源隐私生态系统 + +![更新后的 Proton,统一保护][3] + +Proton 将拥有一个新的统一平台(新网站),您可以在其中访问所有服务,包括: + +* Proton 邮件 +* Proton VPN +* Proton 网盘 +* Proton 日历 + +现在,新的登录会话将会被重定向到 **proton.me** 而不是 **protonmail.com/mail.protonmail.com/protonvpn.com** 等等。 + +不仅限于名称/品牌,整体的强调色和现有的用户体验,也将受到影响。 + +![][4] + +现在,你只需一次付费订阅即可获得全部服务,而不必单独升级 VPN 和邮件。这也意味着,经过这次改变,高级订阅的价格变得更加实惠了。 + +![][5] + +总体而言,让 “Proton” 成为隐私生态系统,是为了吸引更多对技术细节不感兴趣的用户来了解它是如何运作的。 + +你可以在其新的官方网站([proton.me][6])上查看所有详细信息。 + +新网站看起来更干净、更有条理,并且更具商业吸引力。 + +### 本次更改的内容 + +你可以期待有一个焕然一新的用户界面,包括新的品牌和新的网站。 + +![proton][7] + +除此之外,Proton 还提到它改进了服务之间的集成,以获得更好的用户体验。 + +![][8] + +如果你已经在使用 ProtonMail,你可能知道,他们正在主动建议现有用户激活 “**@proton.me**” 帐户,这也是本次更改的一部分。 + +你可以选择将新电子邮件地址 **xyz@proton.me** 设为默认值,它更短,看起来也更有意义一些。 + +* 旧的电子邮件地址不会消失,只是额外提供了新地址(@proton.me)。 +* 现有的付费订阅者应该可以免费获得存储空间提升。 +* 升级了网页和移动应用中的用户体验。 +* 新的官方网站(你将被自动重定向到它以进行新会话)。 +* 新的定价计划,为 Proton 网盘提供更多存储空间。 + +你对本次变更感兴趣吗?你喜欢 Proton 的新名字和新的服务方式吗?请在下方评论中分享你的想法吧! + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/protonmail-now-proton/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/proton-ft.jpg +[2]: https://itsfoss.com/recommends/protonmai +[3]: https://youtu.be/s5GNTQ63HJE +[4]: https://news.itsfoss.com/wp-content/uploads/2022/05/proton-ui-new-1024x447.jpg +[5]: https://news.itsfoss.com/wp-content/uploads/2022/05/proton-pricing-1024x494.jpg +[6]: https://proton.me/ +[7]: https://news.itsfoss.com/wp-content/uploads/2022/05/Proton-me-website.png +[8]: https://news.itsfoss.com/wp-content/uploads/2022/05/Proton-Product.png From 5a93083bcab3a9a2d009eb94abf6c49ac3b4f008 Mon Sep 17 00:00:00 2001 From: lkxed Date: Sun, 29 May 2022 15:18:37 +0800 Subject: [PATCH 050/104] =?UTF-8?q?[=E7=94=B3=E9=A2=86=E5=8E=9F=E6=96=87][?= =?UTF-8?q?news]:=2020220526=20DeepMind-s=20Open=20Source=20MuJoCo=20Is=20?= =?UTF-8?q?Available=20On=20GitHub.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...0526 DeepMind-s Open Source MuJoCo Is Available On GitHub.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/news/20220526 DeepMind-s Open Source MuJoCo Is Available On GitHub.md b/sources/news/20220526 DeepMind-s Open Source MuJoCo Is Available On GitHub.md index a16726459e..54f11ea54b 100644 --- a/sources/news/20220526 DeepMind-s Open Source MuJoCo Is Available On GitHub.md +++ b/sources/news/20220526 DeepMind-s Open Source MuJoCo Is Available On GitHub.md @@ -2,7 +2,7 @@ [#]: via: "https://www.opensourceforu.com/2022/05/deepminds-open-source-mujoco-is-available-on-github/" [#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "lkxed" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 29b0ae5f5fdf840d11db83b11f703035344e54c8 Mon Sep 17 00:00:00 2001 From: lkxed Date: Sun, 29 May 2022 15:50:26 +0800 Subject: [PATCH 051/104] =?UTF-8?q?[=E6=8F=90=E4=BA=A4=E8=AF=91=E6=96=87][?= =?UTF-8?q?news]:=2020220526=20DeepMind-s=20Open=20Source=20MuJoCo=20Is=20?= =?UTF-8?q?Available=20On=20GitHub.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...en Source MuJoCo Is Available On GitHub.md | 45 -------------- ...en Source MuJoCo Is Available On GitHub.md | 60 +++++++++++++++++++ 2 files changed, 60 insertions(+), 45 deletions(-) delete mode 100644 sources/news/20220526 DeepMind-s Open Source MuJoCo Is Available On GitHub.md create mode 100644 translated/news/20220526 DeepMind-s Open Source MuJoCo Is Available On GitHub.md diff --git a/sources/news/20220526 DeepMind-s Open Source MuJoCo Is Available On GitHub.md b/sources/news/20220526 DeepMind-s Open Source MuJoCo Is Available On GitHub.md deleted file mode 100644 index 54f11ea54b..0000000000 --- a/sources/news/20220526 DeepMind-s Open Source MuJoCo Is Available On GitHub.md +++ /dev/null @@ -1,45 +0,0 @@ -[#]: subject: "DeepMind’s Open Source MuJoCo Is Available On GitHub" -[#]: via: "https://www.opensourceforu.com/2022/05/deepminds-open-source-mujoco-is-available-on-github/" -[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" -[#]: collector: "lkxed" -[#]: translator: "lkxed" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -DeepMind’s Open Source MuJoCo Is Available On GitHub -====== -![deepmind1][1] - -DeepMind, an Alphabet subsidiary and AI research lab, acquired the MuJoCo physics engine for robotics research and development in October 2021. The simulator was to be open-sourced and maintained as a free, open source, community-driven project. DeepMind claims that the open sourcing is now complete, with the entire codebase [available on GitHub][2]. - -MuJoCo, which stands for Multi-Joint Dynamics with Contact, is a physics engine designed to aid research and development in robotics, biomechanics, graphics and animation, and other fields that require fast and accurate simulation. MuJoCo can be used to implement model-based computations for machine learning applications such as control synthesis, state estimation, system identification, mechanism design, data analysis through inverse dynamics, and parallel sampling. It can also be used as a standard simulator, such as for gaming and interactive virtual environments. - -According to DeepMind, the following are some of the features that make MuJoCo appealing for collaboration: - -* Comprehensive simulator capable of simulating complex mechanisms -* Readable, performant, portable code -* Codebase that is easily extensible -* Extensive documentation, including both user-facing and code comments – We hope that colleagues from academia and the OSS community will use this platform and contribute to the codebase, thereby improving research for all. - -DeepMind has more to say: - -“As a C library with no dynamic memory allocation, MuJoCo is very fast. Unfortunately, raw physics speed has historically been hindered by Python wrappers, which made batched, multi-threaded operations non-performant due to the presence of the Global Interpreter Lock (GIL) and non-compiled code. In our roadmap below, we address this issue going forward. - -“For now, we’d like to share some benchmarking results for two common models. The results were obtained on a standard AMD Ryzen 9 5950X machine, running Windows 10.” - --------------------------------------------------------------------------------- - -via: https://www.opensourceforu.com/2022/05/deepminds-open-source-mujoco-is-available-on-github/ - -作者:[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/05/deepmind1.jpg -[2]: https://github.com/deepmind/mujoco diff --git a/translated/news/20220526 DeepMind-s Open Source MuJoCo Is Available On GitHub.md b/translated/news/20220526 DeepMind-s Open Source MuJoCo Is Available On GitHub.md new file mode 100644 index 0000000000..6830a9eaac --- /dev/null +++ b/translated/news/20220526 DeepMind-s Open Source MuJoCo Is Available On GitHub.md @@ -0,0 +1,60 @@ +[#]: subject: "DeepMind’s Open Source MuJoCo Is Available On GitHub" +[#]: via: "https://www.opensourceforu.com/2022/05/deepminds-open-source-mujoco-is-available-on-github/" +[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +DeepMind 的开源物理引擎 MuJoCo 已搬至 GitHub +====== +![deepmind1][1] + +DeepMind 是 Alphabet 的子公司和 AI 研究实验室,在 2021 年 10 月,它收购了用于机器人研发的 MuJoCo 物理引擎,并承诺该模拟器将作为免费、开源、社区驱动的项目进行维护。现在,DeepMind 声称开源计划已完成,它的整个代码库 [可在 GitHub 上获得][2]。 + +MuJoCo 是 Multi-Joint Dynamics with Contact 的缩写,它是一个物理引擎,旨在帮助机器人、生物力学、图形和动画等领域的研究和开发(也包括其他需要快速准确模拟的领域)。MuJoCo 可用于帮助机器学习应用实现基于模型的计算,例如控制综合control synthesis状态估计state estimation系统识别system identification机制设计mechanism design、通过逆动力学inverse dynamics来进行数据分析,以及并行采样parallel sampling。它也可以用作标准模拟器,例如用于游戏和交互式虚拟环境。(LCTT 译注:这段话中涉及到不少专业词汇,鉴于译者水平有限,若有谬误,请在评论中指出,同时也欢迎在评论中科普,一起学习~) + +根据 DeepMind 的说法,以下是 MuJoCo 适合协作的一些功能: + +* 能够模拟复杂机制的综合模拟器 +* 可读、高性能、可移植的代码 +* 易于扩展的代码库 +* 丰富的文档,包括面向用户的和代码注释 —— 我们希望学术界和 OSS 社区的同事能够使用这个平台并为代码库做出贡献,从而改善所有人的研究 + +DeepMind 还说: + +> “作为没有动态内存分配的 C 库,MuJoCo 非常快。不幸的是,原始物理速度一直受到 Python 包装器的阻碍:全局解释器锁 (GIL) 和非编译代码的存在,使得批处理、多线程操作无法执行。在下面的路线图中,我们将解决这个问题。” + +(LCTT 译注:原文忘记贴上路线图了,这里补上。) + +路线图: + +* 通过批处理、多线程模拟释放 MuJoCo 的速度潜力 +* 通过改进内部内存管理支持更大的场景 +* 新的增量编译器,带来更好的模型可组合性 +* 通过 Unity 集成支持更好的渲染 +* 对物理导数的原生支持,包括解析和有限差分 + +> “目前,我们想分享两个常见模型的基准测试结果。注意,这个结果是在运行 Windows 10 的标准 AMD Ryzen 9 5950X 机器上获得的。” + +(LCTT 译注:原文忘记贴上测试结果了,这里补上。) + +![基准测试结果][3] + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/05/deepminds-open-source-mujoco-is-available-on-github/ + +作者:[Laveesh Kocher][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[校对者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/05/deepmind1.jpg +[2]: https://github.com/deepmind/mujoco +[3]: https://assets-global.website-files.com/621e749a546b7592125f38ed/628b971675cb60d74f5fa189_2A54E864-FE90-49E4-8E58-FE40298303E2.jpeg From 51e4f6fe908d54a67cc74a7bee50f82634f28f4a Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 29 May 2022 17:42:31 +0800 Subject: [PATCH 052/104] RP @lkxed https://linux.cn/article-14650-1.html --- ...en Source MuJoCo Is Available On GitHub.md | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) rename {translated/news => published}/20220526 DeepMind-s Open Source MuJoCo Is Available On GitHub.md (63%) diff --git a/translated/news/20220526 DeepMind-s Open Source MuJoCo Is Available On GitHub.md b/published/20220526 DeepMind-s Open Source MuJoCo Is Available On GitHub.md similarity index 63% rename from translated/news/20220526 DeepMind-s Open Source MuJoCo Is Available On GitHub.md rename to published/20220526 DeepMind-s Open Source MuJoCo Is Available On GitHub.md index 6830a9eaac..4a21ef7ecf 100644 --- a/translated/news/20220526 DeepMind-s Open Source MuJoCo Is Available On GitHub.md +++ b/published/20220526 DeepMind-s Open Source MuJoCo Is Available On GitHub.md @@ -3,17 +3,18 @@ [#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" [#]: collector: "lkxed" [#]: translator: "lkxed" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14650-1.html" -DeepMind 的开源物理引擎 MuJoCo 已搬至 GitHub +DeepMind 的开源物理引擎 MuJoCo 已在 GitHub 发布 ====== + ![deepmind1][1] DeepMind 是 Alphabet 的子公司和 AI 研究实验室,在 2021 年 10 月,它收购了用于机器人研发的 MuJoCo 物理引擎,并承诺该模拟器将作为免费、开源、社区驱动的项目进行维护。现在,DeepMind 声称开源计划已完成,它的整个代码库 [可在 GitHub 上获得][2]。 -MuJoCo 是 Multi-Joint Dynamics with Contact 的缩写,它是一个物理引擎,旨在帮助机器人、生物力学、图形和动画等领域的研究和开发(也包括其他需要快速准确模拟的领域)。MuJoCo 可用于帮助机器学习应用实现基于模型的计算,例如控制综合control synthesis状态估计state estimation系统识别system identification机制设计mechanism design、通过逆动力学inverse dynamics来进行数据分析,以及并行采样parallel sampling。它也可以用作标准模拟器,例如用于游戏和交互式虚拟环境。(LCTT 译注:这段话中涉及到不少专业词汇,鉴于译者水平有限,若有谬误,请在评论中指出,同时也欢迎在评论中科普,一起学习~) +MuJoCo 是 “Multi-Joint Dynamics with Contact” 的缩写,它是一个物理引擎,旨在帮助机器人、生物力学、图形和动画等领域的研究和开发(也包括其他需要快速准确模拟的领域)。MuJoCo 可用于帮助机器学习应用实现基于模型的计算,例如控制综合control synthesis状态估计state estimation系统识别system identification机制设计mechanism design、通过逆动力学inverse dynamics来进行数据分析,以及并行采样parallel sampling。它也可以用作标准模拟器,例如用于游戏和交互式虚拟环境。(LCTT 译注:这段话中涉及到不少专业词汇,鉴于译者水平有限,若有谬误,请在评论中指出,同时也欢迎在评论中科普,一起学习~) 根据 DeepMind 的说法,以下是 MuJoCo 适合协作的一些功能: @@ -24,9 +25,9 @@ MuJoCo 是 Multi-Joint Dynamics with Contact 的缩写,它是一个物理引 DeepMind 还说: -> “作为没有动态内存分配的 C 库,MuJoCo 非常快。不幸的是,原始物理速度一直受到 Python 包装器的阻碍:全局解释器锁 (GIL) 和非编译代码的存在,使得批处理、多线程操作无法执行。在下面的路线图中,我们将解决这个问题。” +> “作为没有动态内存分配的 C 库,MuJoCo 非常快。不幸的是,原始物理速度一直受到 Python 包装器的阻碍:全局解释器锁(GIL)和非编译代码的存在,使得批处理、多线程操作无法执行。在下面的路线图中,我们将解决这个问题。” -(LCTT 译注:原文忘记贴上路线图了,这里补上。) +(LCTT 译注: 这里补充了原文没有提及的路线图和基准测试结果。) 路线图: @@ -38,8 +39,6 @@ DeepMind 还说: > “目前,我们想分享两个常见模型的基准测试结果。注意,这个结果是在运行 Windows 10 的标准 AMD Ryzen 9 5950X 机器上获得的。” -(LCTT 译注:原文忘记贴上测试结果了,这里补上。) - ![基准测试结果][3] -------------------------------------------------------------------------------- @@ -49,7 +48,7 @@ via: https://www.opensourceforu.com/2022/05/deepminds-open-source-mujoco-is-avai 作者:[Laveesh Kocher][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/) 荣誉推出 From c60b27a43fdcc0e7da88589f5d9fee705d79a865 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91?= Date: Mon, 30 May 2022 08:21:17 +0800 Subject: [PATCH 053/104] Translated MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 先前把两篇文章提交混了,现在更新一下 --- ... A programmer-s guide to GNU C Compiler.md | 274 ++++++++++++++---- 1 file changed, 210 insertions(+), 64 deletions(-) diff --git a/translated/tech/20220520 A programmer-s guide to GNU C Compiler.md b/translated/tech/20220520 A programmer-s guide to GNU C Compiler.md index 63c1703c11..cde56fc04c 100644 --- a/translated/tech/20220520 A programmer-s guide to GNU C Compiler.md +++ b/translated/tech/20220520 A programmer-s guide to GNU C Compiler.md @@ -1,125 +1,271 @@ -[#]: subject: "How To Reset Sudo Password In Ubuntu 22.04 / 20.04 LTS" -[#]: via: "https://ostechnix.com/how-to-reset-sudo-password-in-ubuntu-20-04-lts/" -[#]: author: "sk https://ostechnix.com/author/sk/" +[#]: subject: "A programmer's guide to GNU C Compiler" +[#]: via: "https://opensource.com/article/22/5/gnu-c-compiler" +[#]: author: "Jayashree Huttanagoudar https://opensource.com/users/jayashree-huttanagoudar" [#]: collector: "lkxed" [#]: translator: "robsean" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " -如何在 Ubuntu 22.04 / 20.04 LTS 中重新设置 sudo 密码 +一篇 GNU C 编译器的程序员指南 ====== -在 Ubuntu 中重新设置已忘记的 root 用户的密码 +设法查看生成二进制文件步骤的幕后信息,在你的一些东西出错时,以便你知道如何逐步处理解决问题。 -这篇简单的指南将向你解释,如何在 Ubuntu 22.04 好 20.04 LTS 桌面环境中,以及从服务器版本中的 恢复rescue 模式中重新设置 sudo 密码。 +![GitHub launches Open Source Friday][1] -### 介绍 +图片版权: Opensource.com -在 **[安装 Ubuntu][1]** 时,新创建的一个用户将会带有 sudo 权限,用以执行各种各样的管理任务。 +C 语言是一种著名保存语言,深受新老程序员的好评。使用 C 语言编写的源文件代码,因为使用标准的英语术语,所以,它被认为是人类可读的。然而,计算机只能理解二进制代码。为将代码转换位机器语言,你需要使用一种被称为 *编译器compiler* 的工具。 -如果你的 Ubuntu 系统有多个 sudo 用户,你能够从另外一个 sudo 用户的账号下,轻松地重新设置所忘记的一个 sudo 用户或管理员用户的密码。 +一种非常常见的编译器是 GCC (GNU C Compiler)。编译过程涉及一些中间步骤和附属的工具。 -如果你只有一个 sudo 用户,并且忘记了密码怎么办?没有问题! 从 Ubuntu 的 **恢复rescue** 或 **单一用户single user**** 模式中恢复 sudo 用户密码很容易。 +### 安装 GCC -虽然这篇指南是在 Ubuntu 22.04 和 20.04 LTS 版本上进行的正式测试,不过,下面给定的步骤对于其它的 Ubuntu 版本和衍生版本来说是相同的。 - -### 在 Ubuntu 22.04 / 20.04 LTS 中重新设置 sudo 密码 - -首先,启动你的 Ubuntu 系统到 **恢复rescue** 模式下,来重新设置一个 sudo 用户的密码,如下面的链接所述。 - -> [如何启动到 Ubuntu 22.04 /  20.04 / 18.04 的 恢复rescue 模式 或 急救Emergency 模式 ][2] - -在吗进入到 **恢复rescue** 模式下,通过运行下面的命令,以读/写的模式挂载 root (**/**) 文件系统: +为验证在你的系统上是否已经安装了 GCC,使用 `gcc` 命令: ``` -# mount -n -o remount,rw / +$ gcc --version ``` -现在,使用 **"passwd"** 命令来重新设置 sudo 用户的密码: +如有必要,使用你的软件包管理器来安装 GCC 。在基于 Fedora 的系统上,使用 `dnf` : ``` -# passwd ostechnix +$ sudo dnf install gcc libgcc ``` -在这里,**"ostechnix"** 是 sudo 用户的名称。 使用你自己的用户名称来替换掉它。 - -输入两次密码: +在基于 Debian 的系统上,使用 `apt` : ``` -New password: -Retype new password: -passwd: password updated successfully +$ sudo apt install build-essential ``` -![Reset Sudo Password In Ubuntu 22.04 / 20.04 LTS][3] - -就这样。我们已经重新设置 sudo 用户密码。如果你按照上面链接所述的 **方法 1** 来进入到 **恢复rescue** 模式,按下 **“Ctrl+d”** 组合键来启动到正常模式。或者,你也可以输入下面的任意一个命令来启动到正常模式。 +在安装后,如果你想查看 GCC 的安装位置,那么使用: ``` -# systemctl default +$ whereis gcc ``` -或, +### 演示使用 GCC 来编译一个简单的 C 程序 + +这里有一个简单的 C 程序,用于演示如何使用 GCC 来编译。打开你最喜欢的文本编辑器,并在其中粘贴这段代码: ``` -# exit +// hellogcc.c +#include + +int main() { + printf("Hello, GCC!\n"); + return 0; +} ``` -如果你想重新启动系统,而不是启动到正常模式,输入: +保存文件为 `hellogcc.c` ,接下来编译它: ``` -# systemctl reboot +$ ls +hellogcc.c + +$ gcc hellogcc.c + +$ ls -1 +a.out +hellogcc.c ``` -如果你已经按照上面链接所述的 **方法 2** 进入到恢复rescue 模式,输入: +如你所见,`a.out` 是编译后默认生成的二进制文件。为查看你所新编译的应用程序的输出,只需要运行它,就像你运行任意本地二进制文件一样: ``` -# exit +$ ./a.out +Hello, GCC! ``` -你将返回到 恢复菜单recovery menu 。 现在 "**恢复正常启动Resume normal boot**" ,并按下 回车ENTER 键。 +### 命名输出的文件 -![Boot Into Normal Mode In Ubuntu][4] - -在强调一次,选择 确定OK 按钮,并按下 回车ENTER 按键来继续启动到正常模式: - -![Exit Recovery Mode And Boot Into Normal Mode][5] - -现在,你在运行管理命令时可以使用新的 sudo 密码。 - -##### 如果我把用户名称和密码都忘了怎么办? - -如果你忘记了用户名称,在 恢复rescue 模式下,你可以很容易地列出你的 Linux 系统中的用户名称,使用目录: +文件名称 `a.out` 是非常莫名其妙的,所以,如果你想具体指定可执行文件的名称,你可以使用 `-o` 选项: ``` -# cat etc/passwd +$ gcc -o hellogcc hellogcc.c + +$ ls +a.out hellogcc hellogcc.c + +$ ./hellogcc +Hello, GCC! ``` -来自我 Ubuntu 22.04 系统的输出示例: +当开发一个大型的并且需要编译多个 C 源文件文件的应用程序时,这种选项是很有用的。 + +### 在 GCC 编译中的中间步骤 + +编译实际上有四个步骤,即使在简单的用法示例中,GCC 自动地执行编译。 + +1. 预处理Pre-Processing:GNU 的 C 预处理器 (cpp) 解析头文件 (#include 语句),详细阐明扩展 macros (#define 语句),并使用宏中的源文件代码来生成一个中间文件,如 `hellogcc.i` 。 +2. 编译Compilation:在这个期间中,编译器转换预处理的源文件代码为一种具体指定的 CPU 架构的汇编代码。由此生成是汇编文件使用一个 `.s` 扩展名来命名,如在这个示例中的 `hellogcc.s` 。 +3. 汇编Assembly:`as` 汇编程序 (as) 转换汇编代码为在 对象object 文件中的机器代码,例如 `hellogcc.o` 。 +4. 链接Linking:链接器 (ld) 链接使用库代码的 对象object 代码来生成一个可执行文件,例如 `hellogcc` 。 + +在运行 GCC 时,使用 `-v` 选项来查看每一步的细节。 ``` -[...] -ostechnix:x:1000:1000:Ostechnix,,,:/home/ostechnix:/bin/bash -[...] +$ gcc -v -o hellogcc hellogcc.c ``` -好了,现在,你找到用户名称了。只需要按照上面的步骤来重新设置用户的密码即可。 +![Compiler flowchart][2] + +图片版权:(Jayashree Huttanagoudar, CC BY-SA 4.0) + +### 手动编译代码 + +体验编译的每个步骤可能是很有用的,因此在一些环境下,你不需要 GCC 来完成所有的步骤。 + +首先,除源文件文件以外,删除在当前文件夹下生成的文件。 + +``` +$ rm a.out hellogcc.o + +$ ls +hellogcc.c +``` + +#### 预处理器 + +首先,启动预处理器,将其输出重定向为 `hellogcc.i` : + +``` +$ cpp hellogcc.c > hellogcc.i + +$ ls +hellogcc.c hellogcc.i +``` + +查看输出文件,并注意预处理器如何包含头文件和扩展宏中的源文件代码。 + +#### 编译器 + +现在,你可以编译代码为汇编代码。使用 `-S` 选项来设置 GCC 只生成汇编代码。 + +``` +$ gcc -S hellogcc.i + +$ ls +hellogcc.c hellogcc.i hellogcc.s + +$ cat hellogcc.s +``` + +查看汇编代码,来查看生成了什么。 + +#### 汇编 + +使用你刚刚所生成的汇编代码来创建一个对象文件: + +``` +$ as -o hellogcc.o hellogcc.s + +$ ls +hellogcc.c hellogcc.i hellogcc.o hellogcc.s +``` + +#### 链接 + +为生成一个可执行文件,你必需链接对象文件到它所依赖的库。这并不像前面的步骤那么简单,但它却是有教育意义的: + +``` +$ ld -o hellogcc hellogcc.o +ld: warning: cannot find entry symbol _start; defaulting to 0000000000401000 +ld: hellogcc.o: in function `main`: +hellogcc.c:(.text+0xa): undefined reference to `puts' +``` + +在链接器完成后,出现一个引用 `undefined puts` 错误,查看 `libc.so` 库。你必须找出适合的链接器选项来链接必要的库以解决这个问题。这不是一个小技巧,它取决于你发系统的布局。 + +在链接时,你必需链接代码到核心运行时 (CRT) 对象,一组帮助二进制文件启动的子实例程序。链接器也需要知道在哪里可以找到重要的系统库,包括 libc 和 libgcc,尤其是其中的特殊的开始和介绍指令。这些指令通过 `--start-group` 和 `--end-group` 选项来限定,或者使用指向 `crtbegin.o` 和 `crtend.o` 的路径. + +这个示例显示在 RHEL 8 上使用的路径,因此你可能需要依据你的系统调整路径。 + +``` +$ ld -dynamic-linker \ +/lib64/ld-linux-x86-64.so.2 \ +-o hello \ +/usr/lib64/crt1.o /usr/lib64/crti.o \ +--start-group \ +-L/usr/lib/gcc/x86_64-redhat-linux/8 \ +-L/usr/lib64 -L/lib64 hello.o \ +-lgcc \ +--as-needed -lgcc_s \ +--no-as-needed -lc -lgcc \ +--end-group +/usr/lib64/crtn.o +``` + +在 Slackware 上,同样的链接过程会使用一组不同的路径,但是,你可以看到这其中的相似之处: + +``` +$ ld -static -o hello \ +-L/usr/lib64/gcc/x86_64-slackware-linux/11.2.0/ \ +/usr/lib64/crt1.o /usr/lib64/crti.o \ +hello.o /usr/lib64/crtn.o \ +--start-group -lc -lgcc -lgcc_eh \ +--end-group +``` + +现在,运行由此生成的可执行文件: + +``` +$ ./hello +Hello, GCC! +``` + +### 一些有用的实用程序 + +下面是一些帮助检查文件类型、 符号表symbol tables 、和链接到可执行文件的库的实用程序。 + +使用 `file` 实用程序来准确算出文件的类型: + +``` +$ file hellogcc.c +hellogcc.c: C source, ASCII text + +$ file hellogcc.o +hellogcc.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped + +$ file hellogcc +hellogcc: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=bb76b241d7d00871806e9fa5e814fee276d5bd1a, for GNU/Linux 3.2.0, not stripped +``` + +针对 对象object 文件,使用 `nm` 实用程序来列出 符号表symbol tables : + +``` +$ nm hellogcc.o +0000000000000000 T main + U puts +``` + +使用 `ldd` 实用程序来列出动态链接库: + +``` +$ ldd hellogcc +linux-vdso.so.1 (0x00007ffe3bdd7000) +libc.so.6 => /lib64/libc.so.6 (0x00007f223395e000) +/lib64/ld-linux-x86-64.so.2 (0x00007f2233b7e000) +``` + +### 总结 + +在这篇文章中,你学习了在 GCC 编译中各种中间步骤,和检查文件类型、 符号表symbol tables 、和链接到可执行文件的库的实用程序。在你下次使用 GCC 时,你将会明白它为你生成一个二进制文件所要做的步骤,并且当一些东西出错时,你会知道如何逐步处理解决问题。 -------------------------------------------------------------------------------- -via: https://ostechnix.com/how-to-reset-sudo-password-in-ubuntu-20-04-lts/ +via: https://opensource.com/article/22/5/gnu-c-compiler -作者:[sk][a] +作者:[Jayashree Huttanagoudar][a] 选题:[lkxed][b] 译者:[robsean](https://github.com/robsean) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]: https://ostechnix.com/author/sk/ +[a]: https://opensource.com/users/jayashree-huttanagoudar [b]: https://github.com/lkxed -[1]: https://ostechnix.com/install-ubuntu-desktop/ -[2]: https://ostechnix.com/how-to-boot-into-rescue-mode-or-emergency-mode-in-ubuntu-18-04/ -[3]: https://ostechnix.com/wp-content/uploads/2022/05/Reset-Sudo-Password-In-Ubuntu.png -[4]: https://ostechnix.com/wp-content/uploads/2020/05/Boot-into-normal-mode-in-Ubuntu.png -[5]: https://ostechnix.com/wp-content/uploads/2020/05/Booting-into-normal-mode-from-rescue-mode-in-Ubuntu.png +[1]: https://opensource.com/sites/default/files/lead-images/build_structure_tech_program_code_construction.png +[2]: https://opensource.com/sites/default/files/2022-05/compiler-flowchart.png From 93c81cb063ef3d4edb021502205f80ebcf5d8753 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 30 May 2022 08:37:34 +0800 Subject: [PATCH 054/104] translated --- ...manually installed-- What does it Mean-.md | 95 ------------------- ...manually installed-- What does it Mean-.md | 95 +++++++++++++++++++ 2 files changed, 95 insertions(+), 95 deletions(-) delete mode 100644 sources/tech/20220525 Package is -set to manually installed-- What does it Mean-.md create mode 100644 translated/tech/20220525 Package is -set to manually installed-- What does it Mean-.md diff --git a/sources/tech/20220525 Package is -set to manually installed-- What does it Mean-.md b/sources/tech/20220525 Package is -set to manually installed-- What does it Mean-.md deleted file mode 100644 index 9fdab245ec..0000000000 --- a/sources/tech/20220525 Package is -set to manually installed-- What does it Mean-.md +++ /dev/null @@ -1,95 +0,0 @@ -[#]: subject: "Package is “set to manually installed”? What does it Mean?" -[#]: via: "https://itsfoss.com/package-set-manually-installed/" -[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" -[#]: collector: "lkxed" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Package is “set to manually installed”? What does it Mean? -====== -If you use the apt command to install packages in the terminal, you’ll see all kinds of output. - -If you pay attention and read the output, sometimes you’ll notice a message that reads: - -**package_name set to manually installed** - -Have you ever wondered what this message means and why you don’t see it for all packages? Let me share some details in this explainer. - -### Understanding “Package set to manually installed” - -You’ll see this message when you try installing an already installed library or development package. This dependency package was installed automatically with another package. The dependency package gets removed with the apt autoremove command if the main package is removed. - -But since you tried to install the dependency package explicitly, your Ubuntu system thinks that you need this package independent of the main package. And hence the package is marked as manually installed so that it is not removed automatically. - -Not very clear, right? Take the example of [installing VLC on on Ubuntu][1]. - -Since the main vlc package depends on a number of other packages, those packages are automatically installed with it. - -![installing vlc with apt ubuntu][2] - -If you check the [list of installed packages][3] that have vlc in their name, you’ll see that except vlc, the rest are marked ‘automatic’. This indicates that these packages were installed automatically (with vlc) and they will be removed automatically with apt autoremove command (when vlc is uninstalled). - -![list installed packages vlc ubuntu][4] - -Now suppose you thought to install “vlc-plugin-base” for some reason. If you run the apt install command on it, the system tells you that the package is already installed. At the same time, it changes the mark from automatic to manual because the system thinks that you need this vlc-plugin-base explicitly as you tried to manually install it. - -![package set manually][5] - -You can see that its status has been changed to [installed] from [installed,automatic]. - -![listing installed packages with vlc][6] - -Now, let me remove VLC and run the auoremove command. You can see that “vlc-plugin-base” is not in the list of packages to be removed. - -![autoremove vlc ubuntu][7] - -Check the list of installed packages again. vlc-plugin-base is still installed on the system. - -![listing installed packages after removing vlc][8] - -You can see two more vlc-related packages here. These are the dependencies for the vlc-plugin-base package and this is why they are also present on the system but marked ‘automatic’. - -I believe things are more clear now with the examples. Let me add a bonus tip for you. - -### Reset package to automatic - -If the state of the package got changed to manual from automatic, you can set it back to automatic in the following manner: - -``` -sudo apt-mark auto package_name -``` - -![set package to automatic][9] - -### Conclusion - -This is not a major error and doesn’t stop you from doing your work in your system. However, knowing these little things increase your knowledge a little. - -**Curiosity may have killed the cat but it makes a penguin smarter**. That’s an original quote to add humor to this otherwise dull article :) - -Let me know if you would like to read more such articles that may seem insignificant but help you understand your Linux system a tiny bit better. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/package-set-manually-installed/ - -作者:[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/install-latest-vlc/ -[2]: https://itsfoss.com/wp-content/uploads/2022/05/installing-vlc-with-apt-ubuntu-800x489.png -[3]: https://itsfoss.com/list-installed-packages-ubuntu/ -[4]: https://itsfoss.com/wp-content/uploads/2022/05/list-installed-packages-vlc-ubuntu-800x477.png -[5]: https://itsfoss.com/wp-content/uploads/2022/05/package-set-manually.png -[6]: https://itsfoss.com/wp-content/uploads/2022/05/listing-installed-packages-with-vlc.png -[7]: https://itsfoss.com/wp-content/uploads/2022/05/autoremove-vlc-ubuntu.png -[8]: https://itsfoss.com/wp-content/uploads/2022/05/listing-installed-packages-after-removing-vlc.png -[9]: https://itsfoss.com/wp-content/uploads/2022/05/set-package-to-automatic.png diff --git a/translated/tech/20220525 Package is -set to manually installed-- What does it Mean-.md b/translated/tech/20220525 Package is -set to manually installed-- What does it Mean-.md new file mode 100644 index 0000000000..13f06a1f14 --- /dev/null +++ b/translated/tech/20220525 Package is -set to manually installed-- What does it Mean-.md @@ -0,0 +1,95 @@ +[#]: subject: "Package is “set to manually installed”? What does it Mean?" +[#]: via: "https://itsfoss.com/package-set-manually-installed/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +软件包 “set to manually installed”?这是什么意思? +====== +如果你使用 apt 命令在终端中安装软件包,你将看到各种输出。 + +如果你注意并查看输出,有时你会注意到一条消息: + +**package_name set to manually installed** + +你有没有想过这条消息是什么意思,为什么你没有在所有包上看到它?让我在本篇中分享一些细节。 + +### 理解 “Package set to manually installed” + +当你尝试安装已安装的库或开发包时,你会看到此消息。此依赖包是与另一个包一起自动安装的。如果删除了主包,则使用 apt autoremove 命令删除依赖包。 + +但是由于你试图显式安装依赖包,你的 Ubuntu 系统认为你需要这个包独立于主包。因此,该软件包被标记为手动安装,因此不会自动删除。 + +不是很清楚,对吧?以[在 Ubuntu 上安装 VLC][1] 为例。 + +由于主 vlc 包依赖于许多其他包,因此这些包会自动安装。 + +![installing vlc with apt ubuntu][2] + +如果你检查名称中包含 vlc 的[已安装软件包列表][3],你会看到除了 vlc,其余都标记为“自动”。这表明这些软件包是自动安装的(使用 vlc),它们将使用 apt autoremove 命令自动删除(当 vlc 被卸载时)。 + +![list installed packages vlc ubuntu][4] + +现在假设你出于某种原因考虑安装 “vlc-plugin-base”。如果你在其上运行 apt install 命令,系统会告诉你该软件包已安装。同时,它将标记从自动更改为手动,因为系统认为你在尝试手动安装时明确需要此 vlc-plugin-base。 + +![package set manually][5] + +可以看到它的状态已经从 [installed,automatic] 变成了 [installed]。 + +![listing installed packages with vlc][6] + +现在,让我删除 VLC 并运行 autoremove 命令。你可以看到 “vlc-plugin-base” 不在要删除的软件包列表中。 + +![autoremove vlc ubuntu][7] + +再次检查已安装软件包的列表。vlc-plugin-base 仍然安装在系统上。 + +![listing installed packages after removing vlc][8] + +你可以在这里看到另外两个与 vlc 相关的包。这些是 vlc-plugin-base 包的依赖项,这就是为什么它们也存在于系统上但标记为 “automatic” 的原因。 + +我相信现在有了这些例子,事情就更清楚了。让我给你一个额外提示。 + +### 将包重置为自动 + +如果包的状态从自动更改为手动,你可以通过以下方式将其设置回自动: + +``` +sudo apt-mark auto 包名 +``` + +![set package to automatic][9] + +### 结论 + +这不是一个重大错误,也不会阻止你在系统中进行工作。但是,了解这些小事会增加你的知识。 + +**好奇心可能会害死猫,但它会让企鹅变得更聪明**。这是为这篇原本枯燥的文章增添幽默感的原始引述 :) + +如果你想阅读更多这样的文章,这些文章可能看起来微不足道,但可以帮助你更好地了解您的 Linux 系统,请告诉我。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/package-set-manually-installed/ + +作者:[Abhishek Prakash][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/install-latest-vlc/ +[2]: https://itsfoss.com/wp-content/uploads/2022/05/installing-vlc-with-apt-ubuntu-800x489.png +[3]: https://itsfoss.com/list-installed-packages-ubuntu/ +[4]: https://itsfoss.com/wp-content/uploads/2022/05/list-installed-packages-vlc-ubuntu-800x477.png +[5]: https://itsfoss.com/wp-content/uploads/2022/05/package-set-manually.png +[6]: https://itsfoss.com/wp-content/uploads/2022/05/listing-installed-packages-with-vlc.png +[7]: https://itsfoss.com/wp-content/uploads/2022/05/autoremove-vlc-ubuntu.png +[8]: https://itsfoss.com/wp-content/uploads/2022/05/listing-installed-packages-after-removing-vlc.png +[9]: https://itsfoss.com/wp-content/uploads/2022/05/set-package-to-automatic.png From 6d5d9ab7c8a686777563c7e50f2cdd068c7d8e5e Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 30 May 2022 08:47:01 +0800 Subject: [PATCH 055/104] translating --- ...mpile GNOME Shell and Apps From Source [Beginner-s Guide].md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20220529 Compile GNOME Shell and Apps From Source [Beginner-s Guide].md b/sources/tech/20220529 Compile GNOME Shell and Apps From Source [Beginner-s Guide].md index f93267c241..6d8cf31684 100644 --- a/sources/tech/20220529 Compile GNOME Shell and Apps From Source [Beginner-s Guide].md +++ b/sources/tech/20220529 Compile GNOME Shell and Apps From Source [Beginner-s Guide].md @@ -2,7 +2,7 @@ [#]: via: "https://www.debugpoint.com/2022/05/compile-gnome-source/" [#]: author: "Arindam https://www.debugpoint.com/author/admin1/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From e0b07895496959aa2ef8c994ae34cb314317a021 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 30 May 2022 09:45:42 +0800 Subject: [PATCH 056/104] RP @lkxed https://linux.cn/article-14652-1.html --- ...t -Proton- Offering a Privacy Ecosystem.md | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) rename {translated/news => published}/20220525 ProtonMail is Now Just -Proton- Offering a Privacy Ecosystem.md (80%) diff --git a/translated/news/20220525 ProtonMail is Now Just -Proton- Offering a Privacy Ecosystem.md b/published/20220525 ProtonMail is Now Just -Proton- Offering a Privacy Ecosystem.md similarity index 80% rename from translated/news/20220525 ProtonMail is Now Just -Proton- Offering a Privacy Ecosystem.md rename to published/20220525 ProtonMail is Now Just -Proton- Offering a Privacy Ecosystem.md index 550d8d57e3..2676f438a1 100644 --- a/translated/news/20220525 ProtonMail is Now Just -Proton- Offering a Privacy Ecosystem.md +++ b/published/20220525 ProtonMail is Now Just -Proton- Offering a Privacy Ecosystem.md @@ -3,17 +3,18 @@ [#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" [#]: collector: "lkxed" [#]: translator: "lkxed" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14652-1.html" ProtonMail 改名为 “Proton”,致力于提供一个隐私生态系统 ====== -ProtonMail 宣布了重塑后的品牌,包括新网站、新名称、新的定价计划、新的 UI 和其他变化。 + +> ProtonMail 宣布了重塑后的品牌,包括新网站、新名称、新的定价计划、新的 UI 和其他变化。 ![proton][1] -[ProtonMail][2] 将自己重新命名为 ”Proton”,以将其所有产品囊括在统一的品牌下。 +[ProtonMail][2] 将自己重新命名为 “Proton”,以将其所有产品囊括在统一的品牌下。 注意,别把它和 Steam 的 Proton(它也简称为 Proton)混淆哦! @@ -23,14 +24,14 @@ ProtonMail 宣布了重塑后的品牌,包括新网站、新名称、新的定 ![更新后的 Proton,统一保护][3] -Proton 将拥有一个新的统一平台(新网站),您可以在其中访问所有服务,包括: +Proton 将拥有一个新的统一平台(新网站),你可以在其中访问所有服务,包括: * Proton 邮件 * Proton VPN * Proton 网盘 * Proton 日历 -现在,新的登录会话将会被重定向到 **proton.me** 而不是 **protonmail.com/mail.protonmail.com/protonvpn.com** 等等。 +现在,新的登录会话将会被重定向到 `proton.me` 而不是 `protonmail.com`、`mail.protonmail.com`、`protonvpn.com` 等等。 不仅限于名称/品牌,整体的强调色和现有的用户体验,也将受到影响。 @@ -56,9 +57,9 @@ Proton 将拥有一个新的统一平台(新网站),您可以在其中访 ![][8] -如果你已经在使用 ProtonMail,你可能知道,他们正在主动建议现有用户激活 “**@proton.me**” 帐户,这也是本次更改的一部分。 +如果你已经在使用 ProtonMail,你可能知道,他们正在主动建议现有用户激活 “@proton.me” 帐户,这也是本次更改的一部分。 -你可以选择将新电子邮件地址 **xyz@proton.me** 设为默认值,它更短,看起来也更有意义一些。 +你可以选择将新电子邮件地址 xyz@proton.me 设为默认值,它更短,看起来也更有意义一些。 * 旧的电子邮件地址不会消失,只是额外提供了新地址(@proton.me)。 * 现有的付费订阅者应该可以免费获得存储空间提升。 @@ -75,7 +76,7 @@ via: https://news.itsfoss.com/protonmail-now-proton/ 作者:[Ankush Das][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/) 荣誉推出 From fee4138dfb4cdf7d1dc7bb8784d0a0193eb210e5 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 30 May 2022 11:20:47 +0800 Subject: [PATCH 057/104] RP @robsean https://linux.cn/article-14653-1.html --- ... A programmer-s guide to GNU C Compiler.md | 269 +++++++++++++++++ ... A programmer-s guide to GNU C Compiler.md | 271 ------------------ 2 files changed, 269 insertions(+), 271 deletions(-) create mode 100644 published/20220520 A programmer-s guide to GNU C Compiler.md delete mode 100644 translated/tech/20220520 A programmer-s guide to GNU C Compiler.md diff --git a/published/20220520 A programmer-s guide to GNU C Compiler.md b/published/20220520 A programmer-s guide to GNU C Compiler.md new file mode 100644 index 0000000000..38cc8d46af --- /dev/null +++ b/published/20220520 A programmer-s guide to GNU C Compiler.md @@ -0,0 +1,269 @@ +[#]: subject: "A programmer's guide to GNU C Compiler" +[#]: via: "https://opensource.com/article/22/5/gnu-c-compiler" +[#]: author: "Jayashree Huttanagoudar https://opensource.com/users/jayashree-huttanagoudar" +[#]: collector: "lkxed" +[#]: translator: "robsean" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14653-1.html" + +GNU C 编译器的程序员入门指南 +====== + +![](https://img.linux.net.cn/data/attachment/album/202205/30/111925gbh7yldbolroheqy.jpg) + +> 带你一窥生成二进制文件步骤的幕后,以便在出现一些错误时,你知道如何逐步解决问题。 + +C 语言广为人知,深受新老程序员的好评。使用 C 语言编写的源文件代码,使用了标准的英语术语,因而人们可以方便阅读。然而,计算机只能理解二进制代码。为将代码转换为机器语言,你需要使用一种被称为 编译器compiler 的工具。 + +最常见的编译器是 GCC(GNU 编译器集GNU Compiler Collection)。编译过程涉及到一系列的中间步骤及相关工具。 + +### 安装 GCC + +为验证在你的系统上是否已经安装了 GCC,使用 `gcc` 命令: + +``` +$ gcc --version +``` + +如有必要,使用你的软件包管理器来安装 GCC。在基于 Fedora 的系统上,使用 `dnf` : + +``` +$ sudo dnf install gcc libgcc +``` + +在基于 Debian 的系统上,使用 `apt` : + +``` +$ sudo apt install build-essential +``` + +在安装后,如果你想查看 GCC 的安装位置,那么使用: + +``` +$ whereis gcc +``` + +### 演示使用 GCC 来编译一个简单的 C 程序 + +这里有一个简单的 C 程序,用于演示如何使用 GCC 来编译。打开你最喜欢的文本编辑器,并在其中粘贴这段代码: + +``` +// hellogcc.c +#include + +int main() { + printf("Hello, GCC!\n"); + return 0; +} +``` + +保存文件为 `hellogcc.c` ,接下来编译它: + +``` +$ ls +hellogcc.c + +$ gcc hellogcc.c + +$ ls -1 +a.out +hellogcc.c +``` + +如你所见,`a.out` 是编译后默认生成的二进制文件。为查看你所新编译的应用程序的输出,只需要运行它,就像你运行任意本地二进制文件一样: + +``` +$ ./a.out +Hello, GCC! +``` + +### 命名输出的文件 + +文件名称 `a.out` 是非常莫名其妙的,所以,如果你想具体指定可执行文件的名称,你可以使用 `-o` 选项: + +(LCTT 译注:注意这和最近 Linux 内核废弃的 a.out 格式无关,只是名字相同,这里生成的 a.out 是 ELF 格式的 —— 也不知道谁给起了个 `a.out` 这破名字,在我看来,默认输出文件名就应该是去掉了 `.c` 扩展名后的名字。by wxy) + +``` +$ gcc -o hellogcc hellogcc.c + +$ ls +a.out hellogcc hellogcc.c + +$ ./hellogcc +Hello, GCC! +``` + +当开发一个需要编译多个 C 源文件文件的大型应用程序时,这种选项是很有用的。 + +### 在 GCC 编译中的中间步骤 + +编译实际上有四个步骤,即使在简单的用例中 GCC 自动执行了这些步骤。 + +1. 预处理Pre-Processing:GNU 的 C 预处理器(cpp)解析头文件(`#include` 语句),展开 macros 定义(`#define` 语句),并使用展开的源文件代码来生成一个中间文件,如 `hellogcc.i`。 +2. 编译Compilation:在这个期间中,编译器将预处理的源文件代码转换为指定 CPU 架构的汇编代码。由此生成是汇编文件使用一个 `.s` 扩展名来命名,如在这个示例中的 `hellogcc.s` 。 +3. 汇编Assembly:汇编程序(`as`)将汇编代码转换为目标机器代码,放在目标文件中,例如 `hellogcc.o` 。 +4. 链接Linking:链接器(`ld`)将目标代码和库代码链接起来生成一个可执行文件,例如 `hellogcc` 。 + +在运行 GCC 时,可以使用 `-v` 选项来查看每一步的细节: + +``` +$ gcc -v -o hellogcc hellogcc.c +``` + +![Compiler flowchart][2] + +### 手动编译代码 + +体验编译的每个步骤可能是很有用的,因此在一些情况下,你不需要 GCC 完成所有的步骤。 + +首先,除源文件文件以外,删除在当前文件夹下生成的文件。 + +``` +$ rm a.out hellogcc.o + +$ ls +hellogcc.c +``` + +#### 预处理器 + +首先,启动预处理器,将其输出重定向为 `hellogcc.i` : + +``` +$ cpp hellogcc.c > hellogcc.i + +$ ls +hellogcc.c hellogcc.i +``` + +查看输出文件,并注意一下预处理器是如何包含头文件和扩展宏中的源文件代码的。 + +#### 编译器 + +现在,你可以编译代码为汇编代码。使用 `-S` 选项来设置 GCC 只生成汇编代码: + +``` +$ gcc -S hellogcc.i + +$ ls +hellogcc.c hellogcc.i hellogcc.s + +$ cat hellogcc.s +``` + +查看汇编代码,来看看生成了什么。 + +#### 汇编 + +使用你刚刚所生成的汇编代码来创建一个目标文件: + +``` +$ as -o hellogcc.o hellogcc.s + +$ ls +hellogcc.c hellogcc.i hellogcc.o hellogcc.s +``` + +#### 链接 + +要生成一个可执行文件,你必须将对象文件链接到它所依赖的库。这并不像前面的步骤那么简单,但它却是有教育意义的: + +``` +$ ld -o hellogcc hellogcc.o +ld: warning: cannot find entry symbol _start; defaulting to 0000000000401000 +ld: hellogcc.o: in function `main`: +hellogcc.c:(.text+0xa): undefined reference to `puts' +``` + +在链接器查找完 `libc.so` 库后,出现一个引用 `undefined puts` 错误。你必须找出适合的链接器选项来链接必要的库以解决这个问题。这不是一个小技巧,它取决于你的系统的布局。 + +在链接时,你必须链接代码到核心运行时core runtime(CRT)目标,这是一组帮助二进制可执行文件启动的子例程。链接器也需要知道在哪里可以找到重要的系统库,包括 `libc` 和 `libgcc`,尤其是其中的特殊的开始和结束指令。这些指令可以通过 `--start-group` 和 `--end-group` 选项来分隔,或者使用指向 `crtbegin.o` 和 `crtend.o` 的路径。 + +这个示例使用了 RHEL 8 上的路径,因此你可能需要依据你的系统调整路径。 + +``` +$ ld -dynamic-linker /lib64/ld-linux-x86-64.so.2 \ + -o hello \ + /usr/lib64/crt1.o /usr/lib64/crti.o \ + --start-group \ + -L/usr/lib/gcc/x86_64-redhat-linux/8 \ + -L/usr/lib64 -L/lib64 hello.o \ + -lgcc \ + --as-needed -lgcc_s \ + --no-as-needed -lc -lgcc \ + --end-group \ + /usr/lib64/crtn.o +``` + +在 Slackware 上,同样的链接过程会使用一组不同的路径,但是,你可以看到这其中的相似之处: + +``` +$ ld -static -o hello \ + -L/usr/lib64/gcc/x86_64-slackware-linux/11.2.0/ \ + /usr/lib64/crt1.o /usr/lib64/crti.o hello.o /usr/lib64/crtn.o \ + --start-group \ + -lc -lgcc -lgcc_eh \ + --end-group +``` + +现在,运行由此生成的可执行文件: + +``` +$ ./hello +Hello, GCC! +``` + +### 一些有用的实用程序 + +下面是一些帮助检查文件类型、符号表symbol tables 和链接到可执行文件的库的实用程序。 + +使用 `file` 实用程序可以确定文件的类型: + +``` +$ file hellogcc.c +hellogcc.c: C source, ASCII text + +$ file hellogcc.o +hellogcc.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped + +$ file hellogcc +hellogcc: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=bb76b241d7d00871806e9fa5e814fee276d5bd1a, for GNU/Linux 3.2.0, not stripped +``` + +对目标文件使用 `nm` 实用程序可以列出 符号表symbol tables : + +``` +$ nm hellogcc.o +0000000000000000 T main + U puts +``` + +使用 `ldd` 实用程序来列出动态链接库: + +``` +$ ldd hellogcc +linux-vdso.so.1 (0x00007ffe3bdd7000) +libc.so.6 => /lib64/libc.so.6 (0x00007f223395e000) +/lib64/ld-linux-x86-64.so.2 (0x00007f2233b7e000) +``` + +### 总结 + +在这篇文章中,你了解到了 GCC 编译中的各种中间步骤,和检查文件类型、符号表symbol tables 和链接到可执行文件的库的实用程序。在你下次使用 GCC 时,你将会明白它为你生成一个二进制文件所要做的步骤,并且当出现一些错误时,你会知道如何逐步处理解决问题。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/5/gnu-c-compiler + +作者:[Jayashree Huttanagoudar][a] +选题:[lkxed][b] +译者:[robsean](https://github.com/robsean) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jayashree-huttanagoudar +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/build_structure_tech_program_code_construction.png +[2]: https://opensource.com/sites/default/files/2022-05/compiler-flowchart.png diff --git a/translated/tech/20220520 A programmer-s guide to GNU C Compiler.md b/translated/tech/20220520 A programmer-s guide to GNU C Compiler.md deleted file mode 100644 index cde56fc04c..0000000000 --- a/translated/tech/20220520 A programmer-s guide to GNU C Compiler.md +++ /dev/null @@ -1,271 +0,0 @@ -[#]: subject: "A programmer's guide to GNU C Compiler" -[#]: via: "https://opensource.com/article/22/5/gnu-c-compiler" -[#]: author: "Jayashree Huttanagoudar https://opensource.com/users/jayashree-huttanagoudar" -[#]: collector: "lkxed" -[#]: translator: "robsean" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -一篇 GNU C 编译器的程序员指南 -====== -设法查看生成二进制文件步骤的幕后信息,在你的一些东西出错时,以便你知道如何逐步处理解决问题。 - -![GitHub launches Open Source Friday][1] - -图片版权: Opensource.com - -C 语言是一种著名保存语言,深受新老程序员的好评。使用 C 语言编写的源文件代码,因为使用标准的英语术语,所以,它被认为是人类可读的。然而,计算机只能理解二进制代码。为将代码转换位机器语言,你需要使用一种被称为 *编译器compiler* 的工具。 - -一种非常常见的编译器是 GCC (GNU C Compiler)。编译过程涉及一些中间步骤和附属的工具。 - -### 安装 GCC - -为验证在你的系统上是否已经安装了 GCC,使用 `gcc` 命令: - -``` -$ gcc --version -``` - -如有必要,使用你的软件包管理器来安装 GCC 。在基于 Fedora 的系统上,使用 `dnf` : - -``` -$ sudo dnf install gcc libgcc -``` - -在基于 Debian 的系统上,使用 `apt` : - -``` -$ sudo apt install build-essential -``` - -在安装后,如果你想查看 GCC 的安装位置,那么使用: - -``` -$ whereis gcc -``` - -### 演示使用 GCC 来编译一个简单的 C 程序 - -这里有一个简单的 C 程序,用于演示如何使用 GCC 来编译。打开你最喜欢的文本编辑器,并在其中粘贴这段代码: - -``` -// hellogcc.c -#include - -int main() { - printf("Hello, GCC!\n"); - return 0; -} -``` - -保存文件为 `hellogcc.c` ,接下来编译它: - -``` -$ ls -hellogcc.c - -$ gcc hellogcc.c - -$ ls -1 -a.out -hellogcc.c -``` - -如你所见,`a.out` 是编译后默认生成的二进制文件。为查看你所新编译的应用程序的输出,只需要运行它,就像你运行任意本地二进制文件一样: - -``` -$ ./a.out -Hello, GCC! -``` - -### 命名输出的文件 - -文件名称 `a.out` 是非常莫名其妙的,所以,如果你想具体指定可执行文件的名称,你可以使用 `-o` 选项: - -``` -$ gcc -o hellogcc hellogcc.c - -$ ls -a.out hellogcc hellogcc.c - -$ ./hellogcc -Hello, GCC! -``` - -当开发一个大型的并且需要编译多个 C 源文件文件的应用程序时,这种选项是很有用的。 - -### 在 GCC 编译中的中间步骤 - -编译实际上有四个步骤,即使在简单的用法示例中,GCC 自动地执行编译。 - -1. 预处理Pre-Processing:GNU 的 C 预处理器 (cpp) 解析头文件 (#include 语句),详细阐明扩展 macros (#define 语句),并使用宏中的源文件代码来生成一个中间文件,如 `hellogcc.i` 。 -2. 编译Compilation:在这个期间中,编译器转换预处理的源文件代码为一种具体指定的 CPU 架构的汇编代码。由此生成是汇编文件使用一个 `.s` 扩展名来命名,如在这个示例中的 `hellogcc.s` 。 -3. 汇编Assembly:`as` 汇编程序 (as) 转换汇编代码为在 对象object 文件中的机器代码,例如 `hellogcc.o` 。 -4. 链接Linking:链接器 (ld) 链接使用库代码的 对象object 代码来生成一个可执行文件,例如 `hellogcc` 。 - -在运行 GCC 时,使用 `-v` 选项来查看每一步的细节。 - -``` -$ gcc -v -o hellogcc hellogcc.c -``` - -![Compiler flowchart][2] - -图片版权:(Jayashree Huttanagoudar, CC BY-SA 4.0) - -### 手动编译代码 - -体验编译的每个步骤可能是很有用的,因此在一些环境下,你不需要 GCC 来完成所有的步骤。 - -首先,除源文件文件以外,删除在当前文件夹下生成的文件。 - -``` -$ rm a.out hellogcc.o - -$ ls -hellogcc.c -``` - -#### 预处理器 - -首先,启动预处理器,将其输出重定向为 `hellogcc.i` : - -``` -$ cpp hellogcc.c > hellogcc.i - -$ ls -hellogcc.c hellogcc.i -``` - -查看输出文件,并注意预处理器如何包含头文件和扩展宏中的源文件代码。 - -#### 编译器 - -现在,你可以编译代码为汇编代码。使用 `-S` 选项来设置 GCC 只生成汇编代码。 - -``` -$ gcc -S hellogcc.i - -$ ls -hellogcc.c hellogcc.i hellogcc.s - -$ cat hellogcc.s -``` - -查看汇编代码,来查看生成了什么。 - -#### 汇编 - -使用你刚刚所生成的汇编代码来创建一个对象文件: - -``` -$ as -o hellogcc.o hellogcc.s - -$ ls -hellogcc.c hellogcc.i hellogcc.o hellogcc.s -``` - -#### 链接 - -为生成一个可执行文件,你必需链接对象文件到它所依赖的库。这并不像前面的步骤那么简单,但它却是有教育意义的: - -``` -$ ld -o hellogcc hellogcc.o -ld: warning: cannot find entry symbol _start; defaulting to 0000000000401000 -ld: hellogcc.o: in function `main`: -hellogcc.c:(.text+0xa): undefined reference to `puts' -``` - -在链接器完成后,出现一个引用 `undefined puts` 错误,查看 `libc.so` 库。你必须找出适合的链接器选项来链接必要的库以解决这个问题。这不是一个小技巧,它取决于你发系统的布局。 - -在链接时,你必需链接代码到核心运行时 (CRT) 对象,一组帮助二进制文件启动的子实例程序。链接器也需要知道在哪里可以找到重要的系统库,包括 libc 和 libgcc,尤其是其中的特殊的开始和介绍指令。这些指令通过 `--start-group` 和 `--end-group` 选项来限定,或者使用指向 `crtbegin.o` 和 `crtend.o` 的路径. - -这个示例显示在 RHEL 8 上使用的路径,因此你可能需要依据你的系统调整路径。 - -``` -$ ld -dynamic-linker \ -/lib64/ld-linux-x86-64.so.2 \ --o hello \ -/usr/lib64/crt1.o /usr/lib64/crti.o \ ---start-group \ --L/usr/lib/gcc/x86_64-redhat-linux/8 \ --L/usr/lib64 -L/lib64 hello.o \ --lgcc \ ---as-needed -lgcc_s \ ---no-as-needed -lc -lgcc \ ---end-group -/usr/lib64/crtn.o -``` - -在 Slackware 上,同样的链接过程会使用一组不同的路径,但是,你可以看到这其中的相似之处: - -``` -$ ld -static -o hello \ --L/usr/lib64/gcc/x86_64-slackware-linux/11.2.0/ \ -/usr/lib64/crt1.o /usr/lib64/crti.o \ -hello.o /usr/lib64/crtn.o \ ---start-group -lc -lgcc -lgcc_eh \ ---end-group -``` - -现在,运行由此生成的可执行文件: - -``` -$ ./hello -Hello, GCC! -``` - -### 一些有用的实用程序 - -下面是一些帮助检查文件类型、 符号表symbol tables 、和链接到可执行文件的库的实用程序。 - -使用 `file` 实用程序来准确算出文件的类型: - -``` -$ file hellogcc.c -hellogcc.c: C source, ASCII text - -$ file hellogcc.o -hellogcc.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped - -$ file hellogcc -hellogcc: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=bb76b241d7d00871806e9fa5e814fee276d5bd1a, for GNU/Linux 3.2.0, not stripped -``` - -针对 对象object 文件,使用 `nm` 实用程序来列出 符号表symbol tables : - -``` -$ nm hellogcc.o -0000000000000000 T main - U puts -``` - -使用 `ldd` 实用程序来列出动态链接库: - -``` -$ ldd hellogcc -linux-vdso.so.1 (0x00007ffe3bdd7000) -libc.so.6 => /lib64/libc.so.6 (0x00007f223395e000) -/lib64/ld-linux-x86-64.so.2 (0x00007f2233b7e000) -``` - -### 总结 - -在这篇文章中,你学习了在 GCC 编译中各种中间步骤,和检查文件类型、 符号表symbol tables 、和链接到可执行文件的库的实用程序。在你下次使用 GCC 时,你将会明白它为你生成一个二进制文件所要做的步骤,并且当一些东西出错时,你会知道如何逐步处理解决问题。 - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/22/5/gnu-c-compiler - -作者:[Jayashree Huttanagoudar][a] -选题:[lkxed][b] -译者:[robsean](https://github.com/robsean) -校对:[校对者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/lead-images/build_structure_tech_program_code_construction.png -[2]: https://opensource.com/sites/default/files/2022-05/compiler-flowchart.png From 8474b25ddb918198e4b6c196049977bb3f31629c Mon Sep 17 00:00:00 2001 From: SamMa Date: Mon, 30 May 2022 14:06:05 +0800 Subject: [PATCH 058/104] Update 20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md --- ...w to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sources/tech/20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md b/sources/tech/20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md index ba43974dae..fd285a2cc5 100644 --- a/sources/tech/20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md +++ b/sources/tech/20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md @@ -9,14 +9,13 @@ Ubuntu 22.04 (Jammy Jellyfish) 之 KVM 安装手札 ====== -**KVM** 是 **Kernel-based Virtual Machine** 首字母缩写,一项嵌入内核的开源虚拟化技术。其基于内核的裸设备虚拟化引擎。 -It’s a type 1 (bare metal ) hypervisor that enables the kernel to act as a bare-metal hypervisor. +**KVM** 是 **Kernel-based Virtual Machine** 首字母缩写,一项嵌入内核的开源虚拟化技术。其属于标准的基于内核的裸设备虚拟化引擎。 -KVM allows users to create and run multiple guest machines which can be either Windows or Linux. Each guest machine runs independently of other virtual machines and the underlying OS ( host system ) and has its own computing resources such as CPU, RAM, network interfaces, and storage to mention a few. +在 **KVM** 之上可以运行 Windows 和 Liunx 虚拟机。每个虚拟机之间相互独立并独享 CPU、内存、网络设备、存储设备等相关资源。 -This guide shows you how to install KVM on Ubuntu 22.04 LTS (Jammy Jellyfish). At the tail end of this guide, we will demonstrate how you can create a virtual machine once the installation of KVM is complete. +本文将介绍如何在 Ubuntu 22.04 LTS (Jammy Jellyfish) 中安装 **KVM** 。在文末,我们也将演示在安装 **KVM** 完成之后如何创建虚拟机。 -### 1) Update Ubuntu 22.04 +### 1) 更新 Ubuntu 22.04 To get off the ground, launch the terminal and update your local package index as follows. From 646d7a4ec5cbbc5369de730408d00fedb34f3ba1 Mon Sep 17 00:00:00 2001 From: lkxed Date: Mon, 30 May 2022 15:10:22 +0800 Subject: [PATCH 059/104] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020220530=20Using=20a=20Machine=20Learning=20Model=20to?= =?UTF-8?q?=20Make=20Predictions.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...hine Learning Model to Make Predictions.md | 88 +++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 sources/tech/20220530 Using a Machine Learning Model to Make Predictions.md diff --git a/sources/tech/20220530 Using a Machine Learning Model to Make Predictions.md b/sources/tech/20220530 Using a Machine Learning Model to Make Predictions.md new file mode 100644 index 0000000000..4482107ba8 --- /dev/null +++ b/sources/tech/20220530 Using a Machine Learning Model to Make Predictions.md @@ -0,0 +1,88 @@ +[#]: subject: "Using a Machine Learning Model to Make Predictions" +[#]: via: "https://www.opensourceforu.com/2022/05/using-a-machine-learning-model-to-make-predictions/" +[#]: author: "Jishnu Saurav Mittapalli https://www.opensourceforu.com/author/jishnu-saurav-mittapalli/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Using a Machine Learning Model to Make Predictions +====== +Machine learning is basically a subset of artificial intelligence that uses previously existing data to make a prediction on new data. Of course, all of us know this by now! This article demonstrates how a machine learning model developed in Python can be used as a part of a Java code to make predictions. + +![Machine-learning][1] + +This article assumes you are familiar with the basic development skills and understanding of machine learning. We will start with training our model, and then make a machine learning model in Python. + +This article assumes you are familiar with the basic development skills and understanding of machine learning. We will start with training our model, and then make a machine learning model in Python. + +I am taking the example of a flood prediction model. First, import the following libraries: + +``` +import pandas as pd +import numpy as np +import matplotlib.pyplot as plt +``` + +Once we have successfully imported the libraries, we need to take in the data sets, as shown in the code below. To predict floods, I am using the river level data set. + +``` +from google.colab import files +uploaded = files.upload() +for fn in uploaded.keys(): print(‘User uploaded file “{name}” with length {length} bytes’.format( +name=fn, length=len(uploaded[fn]))) +Choose files No file chosen +``` + +The upload widget is only available when the cell has been executed in the current browser session. Please rerun this cell to enable*Saving Hoppers Crossing-Hourly-River-Level.csv to Hoppers Crossing-Hourly-River-Level.csv User uploaded file “Hoppers Crossing-Hourly-River-Level.csv”* with length 2207036 bytes. + +Once this is done, we can train our model using the *sklearn library*. For this, we first need to import the library and the algorithm model, as shown in Figure 1. + +![Figure 1: Training the model][2] + +``` +from sklearn.linear_model import LinearRegression +regressor = LinearRegression() +regressor.fit(X_train, y_train) +``` + +Once that is done we have trained our model, and it’s now ready to make predictions, as shown in Figure 2. + +![Figure 2: Making predictions][3] + +**Using ML model in Java** +What we need to do now is to convert the ML model into a model that can be used by a Java program. There is a library called sklearn2pmml that helps us do this: + +``` +# Install the library +pip install sklearn2pmml +``` + +Once the library is installed we can convert our already trained model, as shown below: + +``` +sklearn2pmml(pipeline, ‘model.pmml’, with_repr = True) +``` + +This is it! We can now use the generated `model.pmml` file in our Java code to make predictions. Do try it out! + +(LCTT 译注:Java 中有第三方库 [jpmml/jpmml-evaluator][4],它能帮助你使用生成的 `model.pmml` 进行预测。) + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/05/using-a-machine-learning-model-to-make-predictions/ + +作者:[Jishnu Saurav Mittapalli][a] +选题:[lkxed][b] +译者:[译者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/jishnu-saurav-mittapalli/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/05/Machine-learning.jpg +[2]: https://www.opensourceforu.com/wp-content/uploads/2022/05/Figure-1Training-the-model.jpg +[3]: https://www.opensourceforu.com/wp-content/uploads/2022/05/Figure-2-Making-predictions.jpg +[4]: https://github.com/jpmml/jpmml-evaluator From ac236dbd5d819e34d88bb61097850fbdf7031500 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Mon, 30 May 2022 15:11:37 +0800 Subject: [PATCH 060/104] Update 20220530 Using a Machine Learning Model to Make Predictions.md --- ...20530 Using a Machine Learning Model to Make Predictions.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20220530 Using a Machine Learning Model to Make Predictions.md b/sources/tech/20220530 Using a Machine Learning Model to Make Predictions.md index 4482107ba8..c8e7fbf0be 100644 --- a/sources/tech/20220530 Using a Machine Learning Model to Make Predictions.md +++ b/sources/tech/20220530 Using a Machine Learning Model to Make Predictions.md @@ -51,7 +51,8 @@ Once that is done we have trained our model, and it’s now ready to make predic ![Figure 2: Making predictions][3] -**Using ML model in Java** +### Using ML model in Java + What we need to do now is to convert the ML model into a model that can be used by a Java program. There is a library called sklearn2pmml that helps us do this: ``` From c1257c8b71439d5e077e5db8b73701e439ae6835 Mon Sep 17 00:00:00 2001 From: lkxed Date: Mon, 30 May 2022 15:15:02 +0800 Subject: [PATCH 061/104] =?UTF-8?q?[=E7=94=B3=E9=A2=86=E5=8E=9F=E6=96=87][?= =?UTF-8?q?news]:=2020220526=20Plex=20Desktop=20Player=20is=20Now=20Availa?= =?UTF-8?q?ble=20for=20Linux.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20220526 Plex Desktop Player is Now Available for Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/news/20220526 Plex Desktop Player is Now Available for Linux.md b/sources/news/20220526 Plex Desktop Player is Now Available for Linux.md index 0dce34bc6c..9aa8c1a6e5 100644 --- a/sources/news/20220526 Plex Desktop Player is Now Available for Linux.md +++ b/sources/news/20220526 Plex Desktop Player is Now Available for Linux.md @@ -2,7 +2,7 @@ [#]: via: "https://news.itsfoss.com/plex-desktop-linux/" [#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "lkxed" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 6c92228b119c020465f77fc2f02a98e850d8181c Mon Sep 17 00:00:00 2001 From: lkxed Date: Mon, 30 May 2022 15:35:47 +0800 Subject: [PATCH 062/104] =?UTF-8?q?[=E6=8F=90=E4=BA=A4=E8=AF=91=E6=96=87][?= =?UTF-8?q?news]:=2020220526=20Plex=20Desktop=20Player=20is=20Now=20Availa?= =?UTF-8?q?ble=20for=20Linux.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...sktop Player is Now Available for Linux.md | 73 ------------------- ...sktop Player is Now Available for Linux.md | 73 +++++++++++++++++++ 2 files changed, 73 insertions(+), 73 deletions(-) delete mode 100644 sources/news/20220526 Plex Desktop Player is Now Available for Linux.md create mode 100644 translated/news/20220526 Plex Desktop Player is Now Available for Linux.md diff --git a/sources/news/20220526 Plex Desktop Player is Now Available for Linux.md b/sources/news/20220526 Plex Desktop Player is Now Available for Linux.md deleted file mode 100644 index 9aa8c1a6e5..0000000000 --- a/sources/news/20220526 Plex Desktop Player is Now Available for Linux.md +++ /dev/null @@ -1,73 +0,0 @@ -[#]: subject: "Plex Desktop Player is Now Available for Linux" -[#]: via: "https://news.itsfoss.com/plex-desktop-linux/" -[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" -[#]: collector: "lkxed" -[#]: translator: "lkxed" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Plex Desktop Player is Now Available for Linux -====== -Plex.tv finally added support for its desktop app, and its brand new HTPC app on Linux. It’s only snap for now. - -![plex][1] - -Plex is a popular streaming player with the ability to use as a media server software. - -In fact, it is also one of the [best media server software for Linux][2]. - -Yes, the media server was already available for Linux, and we also had a [tutorial covering the installation steps][3]. - -### Plex Desktop Player on Linux as a Snap - -I’m aware that many of you may not like the preference for the Snap package to install the desktop player. But, as of now, the desktop player is available in the Snap store to easily let you install it on any Linux distribution of your choice. - -![][4] - -Fortunately, the [announcement][5] for the desktop player also mentions that they have a **Flatpak package** in the works, which should be available on Flathub in the near future. - -So, with a Flatpak and Snap package, Plex can be a fantastic choice to stream and organize your personal media collection on Linux. - -![][6] - -In case you are curious, HTPC is the successor to the PMP TV (Plex Media Player TV) mode. - -They announced it along with the Linux support for the desktop app. - -With HTPC, the desktop app would be shared by the TV with support for advanced features like audio pass-through, refresh rate switching, controller support, and configurable input maps. - -![][7] - -So, if you have got a big screen, and want to connect your system (irrespective of the desktop platform), you can do it using the HTPC app. - -[Plex Desktop][8] - -[Plex HTPC][9] - -What do you prefer to use when streaming content on your Linux system or a connected TV? Is Plex good enough? Now that it supports Linux, do you think that you might want to switch if you use something else? - -Feel free to share your thoughts in the comments below. - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/plex-desktop-linux/ - -作者:[Ankush Das][a] -选题:[lkxed][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://news.itsfoss.com/author/ankush/ -[b]: https://github.com/lkxed -[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/plex-ft.jpg -[2]: https://itsfoss.com/best-linux-media-server/ -[3]: https://itsfoss.com/install-plex-ubuntu/ -[4]: https://news.itsfoss.com/wp-content/uploads/2022/05/plex-desktop-ubuntu.jpg -[5]: https://www.plex.tv/blog/way-to-be-htpc/ -[6]: https://news.itsfoss.com/wp-content/uploads/2022/05/plex-snap-1024x524.jpg -[7]: https://news.itsfoss.com/wp-content/uploads/2022/05/plex-feat-1024x576.jpg -[8]: https://snapcraft.io/plex-desktop -[9]: https://snapcraft.io/plex-htpc diff --git a/translated/news/20220526 Plex Desktop Player is Now Available for Linux.md b/translated/news/20220526 Plex Desktop Player is Now Available for Linux.md new file mode 100644 index 0000000000..3abeea5a3b --- /dev/null +++ b/translated/news/20220526 Plex Desktop Player is Now Available for Linux.md @@ -0,0 +1,73 @@ +[#]: subject: "Plex Desktop Player is Now Available for Linux" +[#]: via: "https://news.itsfoss.com/plex-desktop-linux/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Plex 桌面播放器现已支持 Linux +====== +Plex.tv 终于在 Linux 上增加了它的桌面版本和全新的 HTPC 应用。不过,它目前只提供了 snap 包。 + +![plex][1] + +Plex 是一个流行的流媒体播放器,同时,它能够用作一个媒体服务器软件。 + +事实上,它也是 [Linux 上最好的媒体服务器软件][2] 之一。 + +是的,这个媒体服务器已经支持 Linux,而且还提供了一个 [包含安装步骤的教程][3]。 + +### Linux 上的 Plex 桌面播放器提供 Snap 包 + +我知道很多人都不喜欢使用 Snap 包来安装这个桌面播放器。但现在,这个桌面播放器已在 Snap 商店中提供,你可以轻松地在任何 Linux 发行版上安装它。 + +![][4] + +幸运的是,这个桌面播放器的 [公告][5] 还提到他们正在开发一个 **Flatpak 包**,它应该会在近期登陆 Flathub。 + +这样一来,借助 Flatpak 和 Snap 软件包,Plex 就可以成为在 Linux 上流式传输和组织个人媒体收藏的绝佳选择。 + +![][6] + +如果你感兴趣的话,HTPC 是 PMP TV(全称为 Plex Media Player TV)模式的继承者。 + +官网上发布了这款产品,以及它的 Linux 桌面应用程序 。 + +使用 HTPC,这个桌面应用就可以和电视共享,并支持音频直通、刷新率切换、控制器支持和可配置输入映射等高级功能。 + +![][7] + +因此,如果你有一个大屏幕,并且想要连接你的系统(不管是什么桌面平台)的话,你现在可以使用 HTPC 应用程序来完成。 + +[Plex 桌面版][8] + +[Plex HTPC][9] + +在 Linux 系统或联网电视上流式传输内容时,你通常会使用什么呢?你觉得 Plex 能满足你的需求吗?即然它支持 Linux 了,你会想要用它来替代当前使用的软件吗? + +欢迎在评论区告诉我们你的想法! + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/plex-desktop-linux/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/plex-ft.jpg +[2]: https://itsfoss.com/best-linux-media-server/ +[3]: https://itsfoss.com/install-plex-ubuntu/ +[4]: https://news.itsfoss.com/wp-content/uploads/2022/05/plex-desktop-ubuntu.jpg +[5]: https://www.plex.tv/blog/way-to-be-htpc/ +[6]: https://news.itsfoss.com/wp-content/uploads/2022/05/plex-snap-1024x524.jpg +[7]: https://news.itsfoss.com/wp-content/uploads/2022/05/plex-feat-1024x576.jpg +[8]: https://snapcraft.io/plex-desktop +[9]: https://snapcraft.io/plex-htpc From e80cd7789b3f2e67fdad101259b832d8561f0b03 Mon Sep 17 00:00:00 2001 From: lkxed Date: Mon, 30 May 2022 15:36:44 +0800 Subject: [PATCH 063/104] =?UTF-8?q?[=E7=94=B3=E9=A2=86=E5=8E=9F=E6=96=87][?= =?UTF-8?q?news]:=2020220527=20Tails=20Linux=20Users=20Warned=20Against=20?= =?UTF-8?q?Using=20the=20Tor=20Browser-=20Here-s=20why!.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...x Users Warned Against Using the Tor Browser- Here-s why!.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/news/20220527 Tails Linux Users Warned Against Using the Tor Browser- Here-s why!.md b/sources/news/20220527 Tails Linux Users Warned Against Using the Tor Browser- Here-s why!.md index 6096910ef4..3a55a76f41 100644 --- a/sources/news/20220527 Tails Linux Users Warned Against Using the Tor Browser- Here-s why!.md +++ b/sources/news/20220527 Tails Linux Users Warned Against Using the Tor Browser- Here-s why!.md @@ -2,7 +2,7 @@ [#]: via: "https://news.itsfoss.com/tails-tor-browser/" [#]: author: "Rishabh Moharir https://news.itsfoss.com/author/rishabh/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "lkxed" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From a8b7815d02284eb64d3b0501953e8a64e8a62ba7 Mon Sep 17 00:00:00 2001 From: lkxed Date: Mon, 30 May 2022 15:54:41 +0800 Subject: [PATCH 064/104] =?UTF-8?q?[=E6=8F=90=E4=BA=A4=E8=AF=91=E6=96=87][?= =?UTF-8?q?news]:=2020220527=20Tails=20Linux=20Users=20Warned=20Against=20?= =?UTF-8?q?Using=20the=20Tor=20Browser-=20Here-s=20why!.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...inst Using the Tor Browser- Here-s why!.md | 65 ------------------- ...inst Using the Tor Browser- Here-s why!.md | 65 +++++++++++++++++++ 2 files changed, 65 insertions(+), 65 deletions(-) delete mode 100644 sources/news/20220527 Tails Linux Users Warned Against Using the Tor Browser- Here-s why!.md create mode 100644 translated/news/20220527 Tails Linux Users Warned Against Using the Tor Browser- Here-s why!.md diff --git a/sources/news/20220527 Tails Linux Users Warned Against Using the Tor Browser- Here-s why!.md b/sources/news/20220527 Tails Linux Users Warned Against Using the Tor Browser- Here-s why!.md deleted file mode 100644 index 3a55a76f41..0000000000 --- a/sources/news/20220527 Tails Linux Users Warned Against Using the Tor Browser- Here-s why!.md +++ /dev/null @@ -1,65 +0,0 @@ -[#]: subject: "Tails Linux Users Warned Against Using the Tor Browser: Here’s why!" -[#]: via: "https://news.itsfoss.com/tails-tor-browser/" -[#]: author: "Rishabh Moharir https://news.itsfoss.com/author/rishabh/" -[#]: collector: "lkxed" -[#]: translator: "lkxed" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Tails Linux Users Warned Against Using the Tor Browser: Here’s why! -====== -A crucial fix for a dangerous vulnerability that bypasses security in Tor browser is due to arrive in Tails 5.1. Here’s what it is all about. - -![tails][1] - -The developers of the security-focused portable Linux distro, **Tails**, have recently released an important advisory regarding its current release. They have warned users to avoid entering or using any personal or sensitive information while using Tor Browser on **Tails 5.0 or older**. - -Tor Browser is the de-facto web browser used in Tails and helps protect the user’s identity online when connected to the Internet. It is mainly used by various journalists and activists to evade censorship. Everyday users can use it too. - -### What’s the problem? - -Recently, two nasty vulnerabilities have been found that enable harmful websites to steal the user’s information from other websites. - -To be specific, the vulnerabilities have been identified as CVE-2022-1802 and CVE-2022-1529 in an [advisory published by Mozilla.][2] - -The Tails advisory best explains this: - -> “For example, after you visit a malicious website, an attacker controlling this website might access the password or other sensitive information that you send to other websites afterwards during the same Tails session.” - -### Should You Stop Using Tails Linux Distro? - -Not necessarily. - -Other apps in Tails, especially Thunderbird, are safe to use since the JavaScript is disabled if in use. - -Furthermore, you can even enable the safest security level in the Tor browser. This is preferred because the JavaScript engine gets disabled. Do note that this will make websites function improperly. - -In other words, the Tails Linux distro is still safe to use if you know what you’re doing. - -### A Fix is Coming Soon - -Good news! Mozilla has already patched these bugs upstream and now it’s up to the Tails team when it comes to releasing the fix. - -Here’s what they have stated – - -> This vulnerability will be fixed in Tails 5.1 (**May 31**), but our team doesn’t have the capacity to publish an emergency release earlier. - -So, your best option is to wait for the Tails 5.1 release next week. You can read the [official advisory][3] released by Tails devs to know more. - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/tails-tor-browser/ - -作者:[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/05/tails-5-0-privacy-issue.jpg -[2]: https://www.mozilla.org/en-US/security/advisories/mfsa2022-19/ -[3]: https://tails.boum.org/security/prototype_pollution/index.en.html diff --git a/translated/news/20220527 Tails Linux Users Warned Against Using the Tor Browser- Here-s why!.md b/translated/news/20220527 Tails Linux Users Warned Against Using the Tor Browser- Here-s why!.md new file mode 100644 index 0000000000..9657aeda03 --- /dev/null +++ b/translated/news/20220527 Tails Linux Users Warned Against Using the Tor Browser- Here-s why!.md @@ -0,0 +1,65 @@ +[#]: subject: "Tails Linux Users Warned Against Using the Tor Browser: Here’s why!" +[#]: via: "https://news.itsfoss.com/tails-tor-browser/" +[#]: author: "Rishabh Moharir https://news.itsfoss.com/author/rishabh/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Tails 警告用户不要使用 Tor 浏览器:原因如下! +====== +Tails 5.1 将针对“可绕过 Tor 浏览器安全措施的危险漏洞”提供关键修复。以下是它的全部内容。 + +![Tails][1] + +**Tails** 是一个专注于安全的便携式 Linux 发行版,最近,它的开发团队发布了有关其当前版本的重要公告。他们警告用户在 **Tails 5.0 或更早版本** 上使用 Tor 浏览器时,避免输入或使用任何个人或敏感信息。 + +Tor 浏览器是 Tails 事实上的(默认)网络浏览器,它有助于在用户连接到 Internet 时,保护他们的在线身份。它主要被各种记者和活动家用来逃避审查。不过,普通用户也可以使用它。 + +### 问题说明 + +最近,有人发现了两个令人讨厌的漏洞,它们允许有害网站能够从其他网站窃取用户的信息。 + +具体来说,在 [Mozilla 发布的公告][2] 中,这些漏洞已被确定为 CVE-2022-1802 和 CVE-2022-1529。 + +Tails 公告中也对此进行了说明: + +> “例如,在你访问恶意网站后,控制该网站的攻击者可能会在同一个 Tails 会话期间,访问你随后发送到其他网站的密码或其他敏感信息。” + +### 你应该停止使用 Tail 发行版吗? + +没有这个必要。 + +Tails 中的其他应用程序,尤其是 Thunderbird,仍然可以安全使用,因为 JavaScript 在使用时会被禁用。 + +此外,你也可以在 Tor 浏览器中启用最高的安全级别。这是推荐的,因为(该级别下)JavaScript 引擎会被禁用。不过,请注意,这会使网站无法正常运行。 + +换句话说,如果你知道自己在做什么的话,Tails 发行版仍然可以安全使用。 + +### 漏洞修复即将发布 + +好消息!Mozilla 已经在上游修补了这些错误,现在就等 Tails 团队发布修复程序了。 + +至于何时发布,他们是这样说的: + +> 此漏洞将在 Tails 5.1(**5 月 31 日**)中修复,但我们的团队没有能力提前发布紧急版本。 + +因此,你最好的选择是等待下周的 Tails 5.1 发布。你可以阅读 Tails 开发团队的 [官方公告][3] 以了解更多信息。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/tails-tor-browser/ + +作者:[Rishabh Moharir][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[校对者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/05/tails-5-0-privacy-issue.jpg +[2]: https://www.mozilla.org/en-US/security/advisories/mfsa2022-19/ +[3]: https://tails.boum.org/security/prototype_pollution/index.en.html From 8c72de74f1e40f144260e103605be2355497bd7b Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 30 May 2022 16:09:58 +0800 Subject: [PATCH 065/104] RP @lkxed https://linux.cn/article-14654-1.html --- ...inst Using the Tor Browser- Here-s why!.md | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) rename {translated/news => published}/20220527 Tails Linux Users Warned Against Using the Tor Browser- Here-s why!.md (68%) diff --git a/translated/news/20220527 Tails Linux Users Warned Against Using the Tor Browser- Here-s why!.md b/published/20220527 Tails Linux Users Warned Against Using the Tor Browser- Here-s why!.md similarity index 68% rename from translated/news/20220527 Tails Linux Users Warned Against Using the Tor Browser- Here-s why!.md rename to published/20220527 Tails Linux Users Warned Against Using the Tor Browser- Here-s why!.md index 9657aeda03..4e3c9f8c5e 100644 --- a/translated/news/20220527 Tails Linux Users Warned Against Using the Tor Browser- Here-s why!.md +++ b/published/20220527 Tails Linux Users Warned Against Using the Tor Browser- Here-s why!.md @@ -3,19 +3,20 @@ [#]: author: "Rishabh Moharir https://news.itsfoss.com/author/rishabh/" [#]: collector: "lkxed" [#]: translator: "lkxed" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14654-1.html" Tails 警告用户不要使用 Tor 浏览器:原因如下! ====== -Tails 5.1 将针对“可绕过 Tor 浏览器安全措施的危险漏洞”提供关键修复。以下是它的全部内容。 + +> Tails 5.1 将针对“可绕过 Tor 浏览器安全措施的危险漏洞”提供关键修复。以下是它的全部内容。 ![Tails][1] -**Tails** 是一个专注于安全的便携式 Linux 发行版,最近,它的开发团队发布了有关其当前版本的重要公告。他们警告用户在 **Tails 5.0 或更早版本** 上使用 Tor 浏览器时,避免输入或使用任何个人或敏感信息。 +Tails 是一个专注于安全的便携式 Linux 发行版,最近,它的开发团队发布了有关其当前版本的重要公告。他们警告用户在 **Tails 5.0 或更早版本** 上使用 Tor 浏览器时,避免输入或使用任何个人或敏感信息。 -Tor 浏览器是 Tails 事实上的(默认)网络浏览器,它有助于在用户连接到 Internet 时,保护他们的在线身份。它主要被各种记者和活动家用来逃避审查。不过,普通用户也可以使用它。 +Tor 浏览器是 Tails 事实上的(默认)网页浏览器,它有助于在用户连接到互联网时,保护他们的在线身份。它主要被各种记者和活动家用来逃避审查。不过,普通用户也可以使用它。 ### 问题说明 @@ -31,6 +32,8 @@ Tails 公告中也对此进行了说明: 没有这个必要。 +用户会很高兴地知道,这些漏洞并不影响 Tor 的连接。这意味着,如果你不交换任何敏感信息,如密码、个人信息、信息等,你可以随意地浏览互联网。 + Tails 中的其他应用程序,尤其是 Thunderbird,仍然可以安全使用,因为 JavaScript 在使用时会被禁用。 此外,你也可以在 Tor 浏览器中启用最高的安全级别。这是推荐的,因为(该级别下)JavaScript 引擎会被禁用。不过,请注意,这会使网站无法正常运行。 @@ -39,7 +42,7 @@ Tails 中的其他应用程序,尤其是 Thunderbird,仍然可以安全使 ### 漏洞修复即将发布 -好消息!Mozilla 已经在上游修补了这些错误,现在就等 Tails 团队发布修复程序了。 +好的消息是,Mozilla 已经在上游修补了这些错误,现在就等 Tails 团队发布修复程序了。 至于何时发布,他们是这样说的: @@ -54,7 +57,7 @@ via: https://news.itsfoss.com/tails-tor-browser/ 作者:[Rishabh Moharir][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/) 荣誉推出 From 66b55480ea125698204a1633d63a0b2e18f4f371 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 30 May 2022 16:18:32 +0800 Subject: [PATCH 066/104] R --- ...Users Warned Against Using the Tor Browser- Here-s why!.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/published/20220527 Tails Linux Users Warned Against Using the Tor Browser- Here-s why!.md b/published/20220527 Tails Linux Users Warned Against Using the Tor Browser- Here-s why!.md index 4e3c9f8c5e..f30dae7372 100644 --- a/published/20220527 Tails Linux Users Warned Against Using the Tor Browser- Here-s why!.md +++ b/published/20220527 Tails Linux Users Warned Against Using the Tor Browser- Here-s why!.md @@ -22,6 +22,10 @@ Tor 浏览器是 Tails 事实上的(默认)网页浏览器,它有助于在 最近,有人发现了两个令人讨厌的漏洞,它们允许有害网站能够从其他网站窃取用户的信息。 +这些都是在 Firefox 使用的 JavaScript 引擎中发现的。 + +但是,Tor 与此有什么关系?对于那些不知道的人来说,Tor 实际上是 Firefox 的一个复刻,因此包含许多类似的功能,如 JavaScript 引擎。 + 具体来说,在 [Mozilla 发布的公告][2] 中,这些漏洞已被确定为 CVE-2022-1802 和 CVE-2022-1529。 Tails 公告中也对此进行了说明: From c490c8570c288fa57aa114887d5a227ff85fb82b Mon Sep 17 00:00:00 2001 From: perfiffer Date: Mon, 30 May 2022 16:24:28 +0800 Subject: [PATCH 067/104] Translating by perfiffer --- sources/tech/20211017 How I use open source to play RPGs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20211017 How I use open source to play RPGs.md b/sources/tech/20211017 How I use open source to play RPGs.md index 89f0b6e3a0..0c4ebf3b1e 100644 --- a/sources/tech/20211017 How I use open source to play RPGs.md +++ b/sources/tech/20211017 How I use open source to play RPGs.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/21/10/open-source-rpgs" [#]: author: "Seth Kenlon https://opensource.com/users/seth" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "perfiffer" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 09e23a9ac0e1d75e0813fbdc80d249f0a99f16c2 Mon Sep 17 00:00:00 2001 From: lkxed Date: Mon, 30 May 2022 19:13:21 +0800 Subject: [PATCH 068/104] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?news]:=2020220530=20Surfshark=20VPN=20Now=20Offers=20a=20Full-f?= =?UTF-8?q?ledged=20GUI=20App=20for=20Linux.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Offers a Full-fledged GUI App for Linux.md | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 sources/news/20220530 Surfshark VPN Now Offers a Full-fledged GUI App for Linux.md diff --git a/sources/news/20220530 Surfshark VPN Now Offers a Full-fledged GUI App for Linux.md b/sources/news/20220530 Surfshark VPN Now Offers a Full-fledged GUI App for Linux.md new file mode 100644 index 0000000000..cb956a1c46 --- /dev/null +++ b/sources/news/20220530 Surfshark VPN Now Offers a Full-fledged GUI App for Linux.md @@ -0,0 +1,82 @@ +[#]: subject: "Surfshark VPN Now Offers a Full-fledged GUI App for Linux" +[#]: via: "https://news.itsfoss.com/surfshark-vpn-gui-linux/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Surfshark VPN Now Offers a Full-fledged GUI App for Linux +====== +Surfshark VPN releases a fully functional GUI app for Linux users with several essential features. + +![surfshark][1] + +With VPN providers, it is often important to look for Linux support. + +Some VPN services only provide you with OpenVPN configuration, and others offer a CLI app. + +ProtonVPN, Mullvad, and a handful of [other providers][2] provide a full-fledged GUI app for Linux. + +And, [Surfshark VPN][3] (popular for its incredibly cheap deals) is joining the game with a good-looking graphical user interface. + +### Surfshark VPN: A Linux App is Always a Good Addition + +![The best VPN for Linux is here!][4] + +**Note:** Surfshark VPN is not open-source. We cover it here as an option available for Linux. + +Previously, with [Surfshark][5] on Linux, users had to utilize the terminal to initiate connections and manage the app. + +Overall, it wasn’t all convenient and limited to a few options. So, they finally launched a GUI app to make things straightforward for Linux users. + +Even though you should find more features with the GUI app, there are still a few things that you cannot do with the new app. Surfshark mentions that they will be addressing those in the near future. + +Some accessible features with the new GUI app include: + +* Setting favorite servers. +* Viewing recently used ones. +* Accessing MultiHop and static options. +* Beautiful VPN state transitions and graceful error handling. +* WireGuard support. +* Adblocker. +* Dark mode. + +In addition to the essentials, it also supports a system tray icon that many users should find useful. + +![][6] + +Abilities like auto-connect and the kill-switch aren’t present at the moment. But, you can expect it in the near future. + +### Install Surfshark VPN on Linux + +Surfshark officially supports Ubuntu, Debian, and Linux Mint. You can easily install the deb file for these Linux distros from the official website to get started. Refer to the [methods to install deb files][7], if you need help. + +If you prefer the terminal, you can also follow some official instructions on its download page to install the package. + +In case you haven’t tried Surfshark previously, they offer a 30-day money-back guarantee. So, it should be a hassle-free way to try it out if you’re not sure. + +[Surfshark VPN][8] + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/surfshark-vpn-gui-linux/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/surfshark.jpg +[2]: https://itsfoss.com/best-vpn-linux +[3]: https://get.surfshark.net/aff_c?offer_id=926&aff_id=13591 +[4]: https://youtu.be/JrmOUkORZRI +[5]: https://get.surfshark.net/aff_c?offer_id=926&aff_id=13591 +[6]: https://news.itsfoss.com/wp-content/uploads/2022/05/surfshark-system-tray-indicator.jpg +[7]: https://itsfoss.com/install-deb-files-ubuntu/ +[8]: https://get.surfshark.net/aff_c?offer_id=926&aff_id=13591 From 9bcba4eb5d83f49c1f2518fe4f23d1a880567210 Mon Sep 17 00:00:00 2001 From: lkxed Date: Mon, 30 May 2022 19:14:37 +0800 Subject: [PATCH 069/104] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020220530=20Dynamically=20linking=20libraries=20while?= =?UTF-8?q?=20compiling=20code.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... linking libraries while compiling code.md | 137 ++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100644 sources/tech/20220530 Dynamically linking libraries while compiling code.md diff --git a/sources/tech/20220530 Dynamically linking libraries while compiling code.md b/sources/tech/20220530 Dynamically linking libraries while compiling code.md new file mode 100644 index 0000000000..a180a71852 --- /dev/null +++ b/sources/tech/20220530 Dynamically linking libraries while compiling code.md @@ -0,0 +1,137 @@ +[#]: subject: "Dynamically linking libraries while compiling code" +[#]: via: "https://opensource.com/article/22/5/compile-code-ldlibrarypath" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Dynamically linking libraries while compiling code +====== +Compiling software gives you a lot of flexibility in how you run your system. The LD_LIBRARY_PATH variable, along with the -L and -l GCC options, are components of that flexibility. + +![women programming][1] + +Image by: WOCinTech Chat. Modified by Opensource.com. CC BY-SA 4.0 + +Compiling software is something that developers do a lot, and in open source some users even choose to do it themselves. Linux podcaster Dann Washko calls source code the "universal package format" because it contains all the components necessary to make an application run on any platform. Of course, not all source code is written for all systems, so it's only "universal" within the subset of targeted systems, but the point is that source code is extremely flexible. With open source, you can decide how code is compiled and run. + +When you're compiling code, you're usually dealing with multiple source files. Developers tend to keep different classes or modules in separate files so that they can be maintained separately, and possibly even used by different projects. But when you're compiling these files, many of them get compiled into a single executable. + +This is usually done by creating shared libraries, and then dynamically linking back to them from the executable. This keeps the executable small by keeping modular functions external, and ensures that libraries can be updated independently of the applications that use them. + +### Locating a shared object during compilation + +When you're [compiling with GCC][2], you usually need a library to be installed on your workstation for GCC to be able to locate it. By default, GCC assumes that libraries are in a system library path, such as `/lib64` and `/usr/lib64`. However, if you're linking to a library of your own that's not yet installed, or if you need to link to a library that's not installed in a standard location, then you have to help GCC find the files. + +There are two options significant for finding libraries in GCC: + +* -L (capital L) adds an additional library path to GCC's search locations. +* -l (lowercase L) sets the name of the library you want to link against. + +For example, suppose you've written a library called `libexample.so`, and you want to use it when compiling your application `demo.c`. First, create an object file from `demo.c` : + +``` +$ gcc -I ./include -c src/demo.c +``` + +The `-I` option adds a directory to GCC's search path for header files. In this example, I assume that custom header files are in a local directory called `include`. The `-c` option prevents GCC from running a linker, because this task is only to create an object file. And that's exactly what happens: + +``` +$ ls +demo.o   include/   lib/    src/ +``` + +Now you can use the `-L` option to set a path for your library, and compile: + +``` +$ gcc -L`pwd`/lib -o myDemo demo.o -lexample +``` + +Notice that the `-L` option comes *before* the `-l` option. This is significant, because if `-L` hasn't been added to GCC's search path before you tell GCC to look for a non-default library, GCC won't know to search in your custom location. The compilation succeeds as expected, but there's a problem when you attempt to run it: + +``` +$ ./myDemo +./myDemo: error while loading shared libraries: +libexample.so: cannot open shared object file: +No such file or directory +``` + +### Troubleshooting with ldd + +The `ldd` utility prints shared object dependencies, and it can be useful when troubleshooting issues like this: + +``` +$ ldd ./myDemo +        linux-vdso.so.1 (0x00007ffe151df000) +        libexample.so => not found +        libc.so.6 => /lib64/libc.so.6 (0x00007f514b60a000) +        /lib64/ld-linux-x86-64.so.2 (0x00007f514b839000) +``` + +You already knew that `libexample` couldn't be located, but the `ldd` output at least affirms what's expected from a *working* library. For instance, `libc.so.6` has been located, and `ldd` displays its full path. + +### LD_LIBRARY_PATH + +The `LD_LIBRARY_PATH` [environment variable][3] defines the path to libraries. If you're running an application that relies on a library that's not installed to a standard directory, you can add to the system's library search path using `LD_LIBRARY_PATH`. + +There are several ways to set environment variables, but the most flexible is to place them before you run a command. Look at what setting `LD_LIBRARY_PATH` does for the `ldd` command when it's analyzing a "broken" executable: + +``` +$ LD_LIBRARY_PATH=`pwd`/lib ldd ./ +   linux-vdso.so.1 (0x00007ffe515bb000) +   libexample.so => /tmp/Demo/lib/libexample.so (0x0000... +   libc.so.6 => /lib64/libc.so.6 (0x00007eff037ee000) +   /lib64/ld-linux-x86-64.so.2 (0x00007eff03a22000) +``` + +It applies just as well to your custom command: + +``` +$ LD_LIBRARY_PATH=`pwd`/lib myDemo +hello world! +``` + +If you move the library file or the executable, however, it breaks again: + +``` +$ mv lib/libexample.so ~/.local/lib64 +$ LD_LIBRARY_PATH=`pwd`/lib myDemo +./myDemo: error while loading shared libraries... +``` + +To fix it, you must adjust the `LD_LIBRARY_PATH` to match the library's new location: + +``` +$ LD_LIBRARY_PATH=~/.local/lib64 myDemo +hello world! +``` + +### When to use LD_LIBRARY_PATH + +In most cases, `LD_LIBRARY_PATH` isn't a variable you need to set. By design, libraries are installed to `/usr/lib64` and so applications naturally search it for their required libraries. You may need to use `LD_LIBRARY_PATH` in two cases: + +* You're compiling software that needs to link against a library that itself has just been compiled and has not yet been installed. Good build systems, such as [Autotools][4] and [CMake][5], can help handle this. +* You're bundling software that's designed to run out of a single directory, with no install script or an install script that places libraries in non-standard directories. Several applications have releases that a Linux user can download, copy to `/opt`, and run with "no install." The `LD_PATH_LIBRARY` variable gets set through wrapper scripts so the user often isn't even aware it's been set. + +Compiling software gives you a lot of flexibility in how you run your system. The `LD_LIBRARY_PATH` variable, along with the `-L` and `-l` GCC options, are components of that flexibility. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/5/compile-code-ldlibrarypath + +作者:[Seth Kenlon][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/collab-team-pair-programming-code-keyboard2.png +[2]: https://opensource.com/article/22/5/what-happens-behind-scenes-during-gcc-compilation-c-programs +[3]: https://opensource.com/article/19/8/what-are-environment-variables +[4]: https://opensource.com/article/19/7/introduction-gnu-autotools +[5]: https://opensource.com/article/21/5/cmake From d6d3aa4e60910ab2ee8194c7dbdce14440686cab Mon Sep 17 00:00:00 2001 From: lkxed Date: Mon, 30 May 2022 21:27:25 +0800 Subject: [PATCH 070/104] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020220530=2011=20Themes=20to=20Make=20Xfce=20Look=20Mod?= =?UTF-8?q?ern=20and=20Beautiful.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... to Make Xfce Look Modern and Beautiful.md | 200 ++++++++++++++++++ 1 file changed, 200 insertions(+) create mode 100644 sources/tech/20220530 11 Themes to Make Xfce Look Modern and Beautiful.md diff --git a/sources/tech/20220530 11 Themes to Make Xfce Look Modern and Beautiful.md b/sources/tech/20220530 11 Themes to Make Xfce Look Modern and Beautiful.md new file mode 100644 index 0000000000..dfc96ae23f --- /dev/null +++ b/sources/tech/20220530 11 Themes to Make Xfce Look Modern and Beautiful.md @@ -0,0 +1,200 @@ +[#]: subject: "11 Themes to Make Xfce Look Modern and Beautiful" +[#]: via: "https://itsfoss.com/best-xfce-themes/" +[#]: author: "Community https://itsfoss.com/author/itsfoss/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +11 Themes to Make Xfce Look Modern and Beautiful +====== + +[Xfce][1] is known for being one of the most lightweight desktop environments yet flexible enough to carry out heavy loads easily. + +One major issue with Xfce is that its default interface may look old and outdated to many users. This could be offputting for some new users who prefer [beautiful-looking Linux distributions][2]. + +![xfce desktop screenshot][3] + +But Xfce does not bound you to use the default theming and allows you to theme your Desktop as per your taste. + +Where to find some good themes for Xfce? There are numerous themes listed on [Xfce Look website][4]. You can surely browse through the huge collection. + +But to save you some time, I am going to list some of the best Xfce themes that should attract a variety of users. + +### Best Xfce themes + +I have tried to list themes that have been updated not too long ago in the past. + +Some or all of these themes could also be available for other desktop environments such as GNOME and KDE. However, I cannot guarantee that. You’ll have to confirm it on your own. + +A quick word about [installing themes in Xfce][5]. There is an appearance tool in the system menu. You can just drag and drop the downloaded theme file in zip format and it should handle the rest. + +![appearance xfce][6] + +Alternatively, you can extract the contents of the archived theme file in the .themes folder in your home directory. + +With that aside, it’s time to see the themes in action. + +#### 1. BaZik + +![bazik xfce theme][7] + +This is one of my favorite themes, especially for Xfce Desktop as it can revamp the whole experience of using it. Rather than just giving us Dark and Light variants of theme, you get 6 color accents to match your Desktop taste. + +BaZik is one of those modern flat themes based on Materia design which allows users to completely change how your default Xfce Desktop visually appears. So if you are looking for something modern which is completely different, BaZik will surely please you. + +[Get BaZik][8] + +#### 2. Flat Remix GTK + +![flat remix xfce theme][9] + +This is one of the rare themes which supports GTK 2, 3, and even 4! A flat remix is one of the most pleasant-looking flat themes which are available for Xfce Desktop. It comes in 4 variants: Normal, Dark, Darker, and The Darkest. + +You also get 13 color variants to match your taste. So if you are looking for one of the best falt themes available, Flat Remix GTK is all you need. + +[Get Flat Remix GTK][10] + +#### 3. Sweet + +![sweet theme xfce][11] + +As its name suggests, its sweet combination of futuristic looks and premium finish with on-point color gradients. Sweets have been used by numerous users and are often suggested for those who are looking for something different from the traditional look. + +Sweet is available in 5 variants: Dark, Mars, Sweet, Ambar Blue, and Ambar. It is GTK 3-based theme and blends well with Xfce Desktop. Sweet can be a good option for those who are tired of traditional options and want to have a completely different look. + +[Get Sweet][12] + +#### 4. Skeuos + +![skeuos xfce theme][13] + +This is yet another theme by the creator of Flat Remix GTK which I have already discussed above. While Flat Remix GTK was more inclined towards the Dark variants, Skeuos is an overall package as you get dark and white variants which are equally good! + +Skeuos also supports GTK 2,3 and 4 so you can have great synchronization with all other apps. Being simple yet elegant, Skeuos deserves a try! + +[Get Skeuos][14] + +#### 5. Pandora Arc + +![pandora arc xfce theme][15] + +Pandora Arc is a completely different theme from the given list as it brings wives of hacker-ish or cyberpunk. You will get dark colors with cyan and green fonts, and a purple accent bundled with green buttons. + +So if you are looking for something which brings hacker-ish vibes to your Xfce Desktop, Pandora Arc is just made for you. + +[Get Pandora Arc][16] + +#### 6. Drakula + +![drakula theme xfce][17] + +Being the official theme for [Awesome][18], Drakula is known for getting users one of the best dark theme experiences. A Dark theme with a purple and pink accent will surely bring a perfect experience to your Xfce Desktop. + +Sure, there are many options for dark themes but personally, Drakula is what you need. Creator has precisely selected the color pallet so you can have a great experience without many tweaks. + +[Get Drakula][19] + +#### 7. Pop Xfwm + +![pop theme xfce][20] + +As its name suggests, this theme will bring a similar look to what System 76 offers in their Pop!_OS. As Pop!_OS is one of the most popular Linux distros, many users are fans of its visuals, and using Pop Xfwm, you can achieve it easily. + +So if you are someone who has just switched from Pop!_OS or are impressed by the visuals of it and you want a similar experience, Pop Xfwm is just for you. + +[Get Pop Xfwm][21] + +#### 8. Windows 10 (no, seriously) + +![windows 10 xfce theme][22] + +You can easily guess what this theme will offer. The reason why this theme made it to the best Xfce themes list is attention to detail. This is considerably the best Windows 10 theme for Linux Desktop which also includes Xfce. + +It requires GTK 3.6 and above for better integration as has some dependencies such as Murrine and Pixmap theme engines but once you are done with the setup, you can enjoy the Windows 10 vibes on your Linux system. + +[Get Windows 10][23] + +#### 9. WhiteSur (still serious) + +![white sur xfce theme][24] + +There is the majority of people who loves the visuals of macOS including me and WhiteSur is considerably the best option to bring macOS to feel to your Xfce Desktop. + +You do have add-on options for this theme such as Firefox theming to better sync. This is the best option for users who are willing to add a premium feel to their Xfce Desktop as WhiteSur mimics macOS theming. + +[Get WhiteSur][25] + +#### 10. Axiom + +![axiom xfce theme][26] + +Axiom is an Arc-Dark-based theme that is created to get you a more spacious Desktop and improve your workflow. Being more consistent than its base, you can surely rely on Axiom. + +It’s inclined more towards bringing simplicity to your Desktop than getting you futuristic looks and it is amazing on what it does. So if you are interested in improving your workflow, Axiom is a must-try. + +[Get Axiom][27] + +#### 11. Orchis + +![orchis xfce theme][28] + +This is yet another flat-style GTK theme for your Xfce Desktop. I included Orchis to this list as it is one of the most popular themes in Linux and users are having mostly positive feedback. + +Orchis will not surprise you with its elegant looks but will bring simplicity and minimal vibes to your setup as it looks so clean out of the box. + +[Get Orchis][29] + +### Conclusion + +As you can see, I have tried to include a wide variety of themes from dark themes for hackers to flat, light themes for minimalists. + +You can combine these themes with a set of [beautiful icons for your Linux desktop][30] and make it look even better. Read this post for more [Xfce customization tips][31]. + +There are surely more themes out there. We don’t have the functionality of sharing images in the comments otherwise I would have loved to see a screenshot of your Xfce desktop. Share the name of your favorite Xfce them nonetheless. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/best-xfce-themes/ + +作者:[Community][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/itsfoss/ +[b]: https://github.com/lkxed +[1]: https://www.xfce.org/ +[2]: https://itsfoss.com/beautiful-linux-distributions/ +[3]: https://itsfoss.com/wp-content/uploads/2022/05/xfce-desktop-screenshot-800x431.webp +[4]: https://www.xfce-look.org/browse/ +[5]: https://itsfoss.com/install-themes-xfce-xubuntu/ +[6]: https://itsfoss.com/wp-content/uploads/2021/10/appearance-xfce.png +[7]: https://itsfoss.com/wp-content/uploads/2022/05/BaZik-xfce-theme-800x450.jpg +[8]: https://www.xfce-look.org/p/1304241/ +[9]: https://itsfoss.com/wp-content/uploads/2022/05/flat-remix-xfce-theme-800x413.webp +[10]: https://www.xfce-look.org/p/1214931/ +[11]: https://itsfoss.com/wp-content/uploads/2022/05/sweet-theme-xfce-800x450.webp +[12]: https://www.xfce-look.org/p/1253385 +[13]: https://itsfoss.com/wp-content/uploads/2022/05/Skeuos-xfce-theme-800x481.jpg +[14]: https://www.xfce-look.org/p/1441725 +[15]: https://itsfoss.com/wp-content/uploads/2022/05/pandora-arc-xfce-theme-800x447.png +[16]: https://www.xfce-look.org/p/1352568/ +[17]: https://itsfoss.com/wp-content/uploads/2022/05/drakula-theme-xfce-800x450.png +[18]: https://awesomewm.org/ +[19]: https://www.xfce-look.org/p/1687249 +[20]: https://itsfoss.com/wp-content/uploads/2022/05/pop-theme-xfce-800x500.png +[21]: https://www.xfce-look.org/p/1299758/ +[22]: https://itsfoss.com/wp-content/uploads/2022/05/windows-10-xfce-theme-800x449.jpg +[23]: https://github.com/B00merang-Project/Windows-10#windows-10-theme-for-linux +[24]: https://itsfoss.com/wp-content/uploads/2022/05/white-sur-xfce-theme-800x450.webp +[25]: https://www.xfce-look.org/p/1403328/ +[26]: https://itsfoss.com/wp-content/uploads/2022/05/axiom-xfce-theme-800x500.jpg +[27]: https://www.xfce-look.org/p/1154707 +[28]: https://itsfoss.com/wp-content/uploads/2022/05/orchis-xfce-theme-800x450.webp +[29]: https://www.xfce-look.org/p/1357889/ +[30]: https://itsfoss.com/best-icon-themes-ubuntu-16-04/ +[31]: https://itsfoss.com/customize-xfce/ From 816c5ba162e0a3363fb73ce83fc313606bc69672 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 31 May 2022 08:14:19 +0800 Subject: [PATCH 071/104] translated --- ...e Learning- Classification Using Python.md | 108 ------------------ ...e Learning- Classification Using Python.md | 108 ++++++++++++++++++ 2 files changed, 108 insertions(+), 108 deletions(-) delete mode 100644 sources/tech/20220525 Machine Learning- Classification Using Python.md create mode 100644 translated/tech/20220525 Machine Learning- Classification Using Python.md diff --git a/sources/tech/20220525 Machine Learning- Classification Using Python.md b/sources/tech/20220525 Machine Learning- Classification Using Python.md deleted file mode 100644 index 1d1606d788..0000000000 --- a/sources/tech/20220525 Machine Learning- Classification Using Python.md +++ /dev/null @@ -1,108 +0,0 @@ -[#]: subject: "Machine Learning: Classification Using Python" -[#]: via: "https://www.opensourceforu.com/2022/05/machine-learning-classification-using-python/" -[#]: author: "Gayatri Venugopal https://www.opensourceforu.com/author/gayatri-venugopal/" -[#]: collector: "lkxed" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Machine Learning: Classification Using Python -====== -In machine learning (ML), a set of data is analysed to predict a result. Python is considered one of the best programming language choices for ML. In this article, we will discuss machine learning with respect to classification using Python. - -![machine-learning-classification][1] - -Let’s say you want to teach a child to differentiate between apples and oranges. There are various ways to do this. You could ask the child to touch both kinds of fruits so that they get familiar with the shape and the softness. You could also show her multiple examples of apples and oranges, so that they can visually spot the differences. The technological equivalent of this process is known as machine learning. - -Machine learning teaches computers to solve a particular problem, and to get better at it through experience. The example discussed here is a classification problem, where the machine is given various labelled examples, and is expected to label an unlabelled sample using the knowledge it acquired from the labelled samples. A machine learning problem can also take the form of regression, where it is expected to predict a real-valued solution to a given problem based on known samples and their solutions. Classification and regression are broadly termed as supervised learning. Machine learning can also be unsupervised, where the machine identifies patterns in unlabelled data, and forms clusters of samples with similar patterns. Another form of machine learning is reinforcement learning, where the machine learns from its environment by making mistakes. - -### Classification - -Classification is the process of predicting the label of a given set of points based on the information obtained from known points. The class, or label, associated with a data set could be binary or multiple in nature. As an example, if we have to label the sentiment associated with a sentence, we could label it as positive, negative or neutral. On the other hand, problems where we have to predict whether a fruit is an apple or an orange will have binary labels. Table 1 gives a sample data set for a classification problem. - -In this table, the value of the last column, i.e., loan approved, is expected to be predicted based on the other variables. In the subsequent sections, we will learn how to train and evaluate a classifier using Python. - -| - | - | - | - | - | -| :- | :- | :- | :- | :- | -| Age | Credit rating | Job | Property owned | Load approval | -| 35 | good | yes | yes | yes | -| 32 | poor | yes | no | no | -| 22 | fair | no | no | no | -| 42 | good | yes | no | yes | - -Table 1 - -### Training and evaluating a classifier - -In order to train a classifier, we need to have a data set containing labelled examples. Though the process of cleaning the data is not covered in this section, it is recommended that you read about various data preprocessing and cleaning techniques before feeding your data set to a classifier. In order to process the data set in Python, we will import the pandas package and the data frame structure. You may then choose from a variety of classification algorithms such as decision tree, support vector classifier, random forest, XG boost, ADA boost, etc. We will look at the random forest classifier, which is an ensemble classifier formed using multiple decision trees. - -``` -from sklearn.ensemble import RandomForestClassifier -from sklearn import metrics - -classifier = RandomForestClassifier() - -#creating a train-test split with a proportion of 70:30 -X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.33) - -classifier.fit(X_train, y_train) #train the classifier on the training set - -y_pred = classifier.predict(X_test) #evaluate the classifier on unknown data - -print(“Accuracy: “, metrics.accuracy_score(y_test, y_pred)) #compare the predictions with the actual values in the test set -``` - -Although this program uses accuracy as the performance metric, a combination of metrics should be used, as accuracy tends to generate non-representative results when the test set is imbalanced. For instance, we will get a high accuracy if the model gives the same prediction for every record and the data set that is used to test the model is imbalanced, i.e., most of the records in the data set have the same class that the model predicted. - -### Tuning a classifier - -Tuning refers to the process of modifying the values of the hyperparameters of a model in order to improve its performance. A hyperparameter is a parameter whose value can be changed to improve the learning process of the algorithm. - -The following code depicts random search hyperparameter tuning. In this, we define a search space from which the algorithm will pick different values, and choose the one that produces the best results: - -``` -from sklearn.model_selection import RandomizedSearchCV - -#define the search space -min_samples_split = [2, 5, 10] -min_samples_leaf = [1, 2, 4] -grid = {‘min_samples_split’ : min_samples_split, ‘min_samples_leaf’ : min_samples_leaf} - -classifier = RandomizedSearchCV(classifier, grid, n_iter = 100) - -#n_iter represents the number of samples to extract from the search space -#result.best_score and result.best_params_ can be used to obtain the best performance of the model, and the best values of the parameters - -classifier.fit(X_train, y_train) -``` - -### Voting classifier - -You can also use multiple classifiers and their predictions to create a model that will give a single prediction based on the individual predictions. This process (in which only the number of classifiers that voted for each prediction is considered) is called hard voting. Soft voting is a process in which each classifier generates a probability of a given record belonging to a particular class, and the voting classifier generates as its prediction, the class that obtained the maximum probability. - -A code snippet for creating a soft voting classifier is given below: - -``` -soft_voting_clf = VotingClassifier( -estimators=[(‘rf’, rf_clf), (‘ada’, ada_clf), (‘xgb’, xgb_clf), (‘et’, et_clf), (‘gb’, gb_clf)], -voting=’soft’) -soft_voting_clf.fit(X_train, y_train) -``` - -This article has summarised the use of classifiers, tuning a classifier and the process of combining the results of multiple classifiers. Do use this as a reference point and explore each area in detail. - --------------------------------------------------------------------------------- - -via: https://www.opensourceforu.com/2022/05/machine-learning-classification-using-python/ - -作者:[Gayatri Venugopal][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/gayatri-venugopal/ -[b]: https://github.com/lkxed -[1]: https://www.opensourceforu.com/wp-content/uploads/2022/04/machine-learning-classification.jpg diff --git a/translated/tech/20220525 Machine Learning- Classification Using Python.md b/translated/tech/20220525 Machine Learning- Classification Using Python.md new file mode 100644 index 0000000000..bb0d734528 --- /dev/null +++ b/translated/tech/20220525 Machine Learning- Classification Using Python.md @@ -0,0 +1,108 @@ +[#]: subject: "Machine Learning: Classification Using Python" +[#]: via: "https://www.opensourceforu.com/2022/05/machine-learning-classification-using-python/" +[#]: author: "Gayatri Venugopal https://www.opensourceforu.com/author/gayatri-venugopal/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +机器学习:使用 Python 进行分类 +====== +在机器学习 (ML) 中,分析一组数据以预测结果。 Python 被认为是 ML 的最佳编程语言选择之一。在本文中,我们将讨论使用 Python 进行分类的机器学习。 + +![machine-learning-classification][1] + +假设你想教孩子区分苹果和橙子。有多种方法可以做到这一点。你可以让孩子触摸这两种水果,让他们熟悉形状和柔软度。你还可以向她展示苹果和橙子的多个例子,以便他们可以直观地发现差异。这个过程的技术等价物被称为机器学习。 + +机器学习教计算机解决特定问题,并通过经验变得更好。这里讨论的示例是一个分类问题,其中机器被赋予各种标记示例,并期望使用它从标记样本中获得的知识来标记未标记样本。机器学习问题也可以采用回归的形式,其中期望根据已知样本及其解决方案来预测给定问题的实值解决方案。分类和回归被广泛称为监督学习。机器学习也可以是无监督的,机器识别未标记数据中的模式,并形成具有相似模式的样本集群。机器学习的另一种形式是强化学习,机器通过犯错从环境中学习。 + +### 分类 + +分类是根据从已知点获得的信息来预测一组给定点的标签的过程。与一个数据集相关的类别或标签可以是二元的,也可以是多元的。举例来说,如果我们必须给与一个句子相关的情绪打上标签,我们可以把它标记为正面、负面或中性。另一方面,我们必须预测一个水果是苹果还是橘子的问题将有二元标签。表 1 给出了一个分类问题的样本数据集。 + +在该表中,最后一列的值,即贷款批准,预计将基于其他变量进行预测。在接下来的部分中,我们将学习如何使用 Python 训练和评估分类器。 + +| - | - | - | - | - | +| :- | :- | :- | :- | :- | +| 年龄 | 信用等级 | 工作 | 拥有房产 | 贷款批准 | +| 35 | 好 | 是 | 是 | 是 | +| 32 | 差 | 是 | 不 | 不 | +| 22 | 一般 | 不 | 不 | 不 | +| 42 | 好 | 是 | 不 | 是 | + +表格 1 + +### 训练和评估分类器 + +为了训练分类器,我们需要一个包含标记示例的数据集。尽管本节不涉及清理数据的过程,但建议你在将数据集输入分类器之前阅读各种数据预处理和清理技术。为了在 Python 中处理数据集,我们将导入 pandas 包和 data frame 结构。然后,你可以从多种分类算法中进行选择,例如决策树、支持向量分类器、随机森林、XG boost、ADA boost 等。我们将看看随机森林分类器,它是使用多个决策树形成的集成分类器。 + +``` +from sklearn.ensemble import RandomForestClassifier +from sklearn import metrics + +classifier = RandomForestClassifier() + +#creating a train-test split with a proportion of 70:30 +X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.33) + +classifier.fit(X_train, y_train) #train the classifier on the training set + +y_pred = classifier.predict(X_test) #evaluate the classifier on unknown data + +print(“Accuracy: “, metrics.accuracy_score(y_test, y_pred)) #compare the predictions with the actual values in the test set +``` + +虽然这个程序使用准确性作为性能指标,但应该使用多种指标的组合,因为当测试集不平衡时,准确性往往会产生非代表性的结果。例如,如果模型对每条记录都给出了相同的预测,而用于测试模型的数据集是不平衡的,即数据集中的大多数记录与模型预测的类别相同,我们就会得到很高的准确率。 + +### 调整分类器 + +调优是指修改模型的超参数值以提高其性能的过程。超参数是可以改变其值以改进算法的学习过程的参数。 + +以下代码描述了随机搜索超参数调整。在此,我们定义了一个搜索空间,算法将从该搜索空间中选择不同的值,并选择产生最佳结果的那个: + +``` +from sklearn.model_selection import RandomizedSearchCV + +#define the search space +min_samples_split = [2, 5, 10] +min_samples_leaf = [1, 2, 4] +grid = {‘min_samples_split’ : min_samples_split, ‘min_samples_leaf’ : min_samples_leaf} + +classifier = RandomizedSearchCV(classifier, grid, n_iter = 100) + +#n_iter represents the number of samples to extract from the search space +#result.best_score and result.best_params_ can be used to obtain the best performance of the model, and the best values of the parameters + +classifier.fit(X_train, y_train) +``` + +### 投票分类器 + +你也可以使用多个分类器和它们的预测来创建一个模型,根据各个预测给出一个预测。这个过程(只考虑为每个预测投票的分类器的数量)被称为硬投票。软投票是一个过程,其中每个分类器产生一个给定记录属于特定类别的概率,而投票分类器产生的预测是获得最大概率的类别。 + +A code snippet for creating a soft voting classifier is given below: + +``` +soft_voting_clf = VotingClassifier( +estimators=[(‘rf’, rf_clf), (‘ada’, ada_clf), (‘xgb’, xgb_clf), (‘et’, et_clf), (‘gb’, gb_clf)], +voting=’soft’) +soft_voting_clf.fit(X_train, y_train) +``` + +这篇文章总结了分类器的使用,调整分类器和结合多个分类器的结果的过程。请将此作为一个参考点,详细探讨每个领域。 + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/05/machine-learning-classification-using-python/ + +作者:[Gayatri Venugopal][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/gayatri-venugopal/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/04/machine-learning-classification.jpg From 1f694077d0ed66bdf87510026f2966850e78c220 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 31 May 2022 08:18:32 +0800 Subject: [PATCH 072/104] translating --- ...220530 Using a Machine Learning Model to Make Predictions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20220530 Using a Machine Learning Model to Make Predictions.md b/sources/tech/20220530 Using a Machine Learning Model to Make Predictions.md index c8e7fbf0be..7c107e5f39 100644 --- a/sources/tech/20220530 Using a Machine Learning Model to Make Predictions.md +++ b/sources/tech/20220530 Using a Machine Learning Model to Make Predictions.md @@ -2,7 +2,7 @@ [#]: via: "https://www.opensourceforu.com/2022/05/using-a-machine-learning-model-to-make-predictions/" [#]: author: "Jishnu Saurav Mittapalli https://www.opensourceforu.com/author/jishnu-saurav-mittapalli/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From e7313c408dcd29c7fd10f80b15594c2006bf536d Mon Sep 17 00:00:00 2001 From: lkxed Date: Tue, 31 May 2022 10:19:18 +0800 Subject: [PATCH 073/104] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020220530=20Top=2010=20Linux=20Distributions=20for=20Wi?= =?UTF-8?q?ndows=20Users=20in=202022.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Distributions for Windows Users in 2022.md | 250 ++++++++++++++++++ 1 file changed, 250 insertions(+) create mode 100644 sources/tech/20220530 Top 10 Linux Distributions for Windows Users in 2022.md diff --git a/sources/tech/20220530 Top 10 Linux Distributions for Windows Users in 2022.md b/sources/tech/20220530 Top 10 Linux Distributions for Windows Users in 2022.md new file mode 100644 index 0000000000..a61d2eb83d --- /dev/null +++ b/sources/tech/20220530 Top 10 Linux Distributions for Windows Users in 2022.md @@ -0,0 +1,250 @@ +[#]: subject: "Top 10 Linux Distributions for Windows Users in 2022" +[#]: via: "https://www.debugpoint.com/2022/05/best-linux-distributions-windows-2022/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Top 10 Linux Distributions for Windows Users in 2022 +====== +We compiled an inventory of the 10 best Linux distributions for Windows users in 2022 based on how easy they are to adopt and successfully migrate from Windows. + +Although there are hundreds of Linux Distributions, very few of them can seriously replace Windows operating system. With the advancements and stability across Linux Kernel and desktop environments, 2022 is the perfect year to adopt Linux as a daily driver. This applies to students, school administrations, hobbyists, scientists, and related work profiles. In addition, the hardware makers also provide Linux support for their device live-ups. + +Linux, in general, still requires some workaround for specific workflows. However, Linux is still catching up on specific niche work profiles. The reason is some specific application vendors do not provide Linux executables. But there are plenty of alternatives available for everything in the Linux world. + +Moreover, for day-to-day work from an average user standpoint, the Linux operating system is now at a stage that can perform all the work you throw. With that in mind, we compiled the below 10 best Linux distributions in 2022 for Windows users. These should cover almost all possible use cases and work profiles (including desktop or Laptop). + +### Best Linux Distributions for Windows Users in 2022 + +#### 1. Zorin OS + +The first Linux distribution we feature in this list is Zorin OS. And there are reasons for that. From a new Windows user standpoint, familiarity is essential and stability. + +Zorin OS is the perfect starting point for Linux Journet for windows users. It comes with built-in Windows-like themes, which you can apply with just a click. Not only that, the main taskbar an appearance you can change with its easy to use settings manager. + +In addition, Zorin is based on the Ubuntu LTS version. Hence, the user gets ultimate stability in packages, applications, and multi-year security patches. + +Other than that, Zorin OS maintains three editions – Pro, Lite and Core, which cater to the different user bases. The Pro edition is a paid version with additional themes and tweaks out of the box with a minimal fee. + +![Zorin OS 16.1 Desktop][1] + +You can download Zorin OS from the below link. + +[Download Zorin OS][2] + +#### 2. Linux Mint Cinnamon Edition + +If you are ever confused about which distro to choose, you can blindly choose “Linux Mint”, especially the Cinnamon edition. Linux Mint Cinnamon edition is a robust Linux distribution that brings a traditional menu and icon-based desktop design perfect for Windows users. + +For the first time, Linux users (from Windows), the installing apps, packages and other aspects might be overwhelming. But the Linux Mint team did an outstanding job with this distribution, which makes your day to day work super uncomplicated. + +In addition, it brings all necessary applications pre-installed, which are helpful for new folks. Other than that, printers, multiple displays and all peripheral device works are “out of the box” in this distribution. + +Linux Mint is based on Ubuntu and Debian. Hence you should get good stability for multiple years. Finally, a helpful community to help you in need via its forums. + +![Linux Mint Cinnamon Edition][3] + +You can download Linux Mint Cinnamon Edition from the below link. + +[Download Linux Mint Cinnamon Edition][4] + +#### 3. Kubuntu LTS Release + +A Linux distribution list is incomplete without Kubuntu, which features the stunning KDE Plasma desktop. Kubuntu is a well designed and stable Linux distribution which brings a fusion of Ubuntu and KDE Plasma desktop. + +The primary selling point is the KDE Plasma desktop which brings a friendly and easy to use desktop environment similar to the Windows operating system. It has the typical bottom taskbar, panels, icons, and widgets that remind you about Windows 11 or 10. + +![Kubuntu 22.04 LTS Desktop][5] + +Moreover, the KDE framework and KDE applications enrich this desktop overall. One of the plus points of the KDE Plasma with Kubuntu is the very active community and development. + +If you are a new Linux user, you can get help from the hugely popular forums and documentation. + +The Kubuntu download link is present below. + +[Download Kubuntu][6] + +#### 4. Deepin + +Deepin Linux distribution is one of the most popular Linux flavours among Windows and macOS users due to its aesthetics and stability. This impressive open-source GNU/Linux distribution is based on Deepin tech and features free and proprietary software. Deepin is popular among users who want a beautiful Linux while being stable. + +At the core, Deepin is based on Debian, which is more stable and provides support for more than sufficient years of security updates. Hence once you install Deepin, you can keep on using the set-up for a longer duration. + +In addition, Deepin features its own App Store, which definitely helps windows users. Also, you get fingerprint support, new hardware support and an additional application pre-installed. + +![Deepin 20 Desktop][7] + +You can download Deepin from the below link. + +[Download Deepin][8] + +#### 5. Ubuntu LTS Release with GNOME + +The fifth distro we feature is the Ubuntu Linux (the default GNOME desktop edition). The Ubuntu LTS releases (with default GNOME Desktop) are the most used Linux Distribution today. It’s the most popular, most downloaded and used by users, enterprises and several real-world needs. + +There is no doubt about the Ubuntu LTS version’s power and stability. It has been time tested. With the vast community support, Ubuntu LTS versions with customized GNOME might be the perfect fit for your needs. + +From a Windows user standpoint, the advantage Ubuntu LTS release beings are the applications and games support. Most of the app and game developers target Ubuntu in Linux in general for initial support. Hence, if you are a Windows user with a critical workflow consisting of complex applications, you should choose Ubuntu LTS editions with GNOME desktop. + +I would not recommend Ubuntu to a Windows user experiencing Linux for the first time. + +![Ubuntu LTS with GNOME][9] + +Finally, you can download Ubuntu using the below link. + +[Download Ubuntu][10] + +#### 6. Endless OS + +Endless OS is one of the unique Linux distributions on this list. It is an [OSTree based][11] free and open-source[Linux Distribution][12]. Packaged from Debian/Ubuntu, but it is not directly based on those. + +We added this distribution because its underlying packages and system remain intact, and it is read-only. The isolated user-space deals with your work and applications. That means it never breaks, and your system remains fresh always as the first installation. + +Endless OS is perfect for schools and organizations that manage labs with many desktop computers and have a little budget for maintaining (updates, upgrades, etc.) those desktops. In addition, its unique and customized GNOME desktop is perfect for the first time Linux users coming from Windows. + +A Windows user may not know what GRUB is, right? Hence, the team designed its installer in a [unique way][13] for those use cases. Also, it has a unique and friendly way of educating WIndows users on its installation with a detailed step by step guide. + +![Endless OS Installer, which can run on Windows][14] + +![Endless OS Desktop version 4.0][15] + +In addition to the above points, if you are ahead of IT of schools, non-profits and planning to get rid of Windows for many desktop units, then it is a perfect distribution to try out. For an individual user, you can use it if you are a little experienced in Linux. + +You can read a detailed review of [Endless OS here][16]. And download it from the below link. + +[Download Endless OS][17] + +#### 7. Linux Lite + +You might be wondering why Linux Lite is a list of distributions for Windows users. Think about a million desktops and laptops that are so-called “outdated” by Windows requirements. They are perfectly well and can run for years with perfect Linux distribution that caters to older hardware. + +Hence, our seventh distro in this list is Linux Lite. It is based on Ubuntu LTS release and comes with easy to use and lightweight [Xfce desktop environment][18]. In addition, Linux Lite also supports 32-bit hardware for older hardware. Moreover, it brings its in-house utilities that make your day to day work super easy. If you have a laptop or desktop with Windows 7 or Windows 10, you can easily format and install Linux Lite for better support. + +![Linux Lite Desktop 5.2][19] + +You can download Linux Lite from the below link. + +[Download Linux Lite][20] + +#### 8. Pop OS + +The Pop OS is developed by Americal computer manufacturer System76 for their lineup of desktops and laptops. System76 sells and supports high-end desktops and notebooks with Pop OS pre-installed. + +Hence, you get better hardware and additional support if you use this distribution in your Windows 10 or Windows 11 system. + +Moreover, Pop OS (based on Ubuntu) is primarily known to have perfect for modern hardware (including NVIDIA graphics) and brings some unique features absent in the traditional Ubuntu with GNOME desktop. For example, you get a well-designed COSMIC desktop with Pop OS, built-in tiling feature, well-optimized power controls, and a stunning Pop Shop. The Pop Shop is a software store designed by its maker to give you a well-categorized set of applications for your study, learning, development, gaming, etc. This distribution is also perfect for gaming if you plan to start your Linux journey with gaming in mind. + +In addition, if you want to get a professional-grade Linux distribution with official help and support, you should check out actual System76 hardware with Pop OS. + +Furthermore, many OEMs such as HP recently decided to launch special edition laptops using Pop OS. This shows how vital this distribution is today and perhaps a professional-grade Windows replacement after Ubuntu. + +![Pop OS][21] + +You can download the Pop OS for various hardware for free using the link below. + +[Download Pop OS][22] + +#### 9. elementary OS + +Our 9th Linux distribution for Windows users is the famous elementary OS. The elementary OS is a Ubuntu LTS based Linux distribution, which brings a mac-OS style user interface. However, it looks like macOS but can be an ideal replacement for Windows. + +Firstly, it’s stable and well designed, keeping a professional experience in mind. It is based on Ubuntu. Hence you get a wide range of help and support already available for Ubuntu Linux. + +Second, elementary OS brings its own curated App Center with a wide range of applications specially designed for elementary OS. + +Moreover, thanks to the beautiful Pantheon desktop, it doesn’t get into your way of working. Overall a little different Linux distribution for Windows users. + +![elementary OS 6 ODIN Desktop][23] + +You can download the elementary OS from the below link. + +[Download elementary OS][24] + +#### 10. Peppermint OS + +The final Linux distribution in this list is Peppermint OS. + +Peppermint OS is a Debian stable-based Linux Distribution that featured LXDE components alongside Xfce earlier. This operating system is primarily used for older hardware which requires stability and minimal maintenance in terms of software. + +Peppermint OS is a user-friendly Linux distribution that is perfect for older hardware. It is based on Debian’s Stable branch, which gives your system multiple years of security updates. In addition, it is also based on an Xfce desktop environment like Linux Lite in this list. + +But it has one unique selling point for Windows users. + +First, it’s well designed welcome screen that gives shortcuts for tasks and activities, which is beneficial for Windows users. + +Second, the Peppermint Hub is an excellent utility which brings all the necessary shortcuts for your system management, from changing themes to updating and downloading software from the repository. + +If you are a new user coming from Windows, Peppermint Hub will take care of most system management tasks from one single point. + +![Peppermint 2022-02-02 Desktop][25] + +![The new Peppermint Hub Application written in Python][26] + +You can download Peppermint OS from the below link. + +[Download Peppermint OS][27] + +### Honorary Mention + +#### Twister UI + +Twister UI is not a Linux distribution. You do not need to download separate icons, themes or cursors. But it’s like an add-on to your Linux Mint (Xfce Edition), which gives you a one-click look and feel of Windows 7, Windows 98 and Windows 10 in Linux Mint. The Pi Labs created this UI, making the [Twister OS][28] for Raspberry Pi and related hardware. + +We mention this here because many “older-generation” Windows users can easily migrate to Linux with help from their friends and family. They mostly know how Windows behaves based on the UI, menu, icons and colours. And it’s easy for them to start with Linux. + +Here’s how it looks (Windows XP theme). For more details, read the [Twister UI review][29]. + +![Twister UI – Windows XP Theme][30] + +### Closing Notes + +I hope this list of “best Linux distributions for Windows users” helps you finally decide and pick one distro for yourself, your friends and co-workers. The above list is prepared based on their current status (active project), prospects (i.e. it has a well-defined vision for the future), how friendly they are to Windows users, and their stability. + +Finally, which Linux distribution for Windows users do you think should be in the top 10 list? Let me know in the comment box below. + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/05/best-linux-distributions-windows-2022/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/wp-content/uploads/2022/03/Zorin-OS-16.1-Desktop.jpg +[2]: https://zorin.com/os/download/ +[3]: https://www.debugpoint.com/wp-content/uploads/2022/05/Linux-Mint-Cinnamon-Edition.jpg +[4]: https://linuxmint.com/download.php +[5]: https://www.debugpoint.com/wp-content/uploads/2022/04/Kubuntu-22.04-LTS-Desktop.jpg +[6]: https://kubuntu.org/getkubuntu/ +[7]: https://www.debugpoint.com/wp-content/uploads/2020/09/Deepin-20-Desktop.jpg +[8]: https://www.deepin.org/en/download +[9]: https://www.debugpoint.com/wp-content/uploads/2022/05/Ubuntu-LTS-with-GNOME.jpg +[10]: https://ubuntu.com/download/desktop +[11]: https://ostree.readthedocs.io/en/stable/ +[12]: https://www.debugpoint.com/category/distributions +[13]: https://support.endlessos.org/en/installation/windows-installer/dual-boot +[14]: https://www.debugpoint.com/wp-content/uploads/2022/05/Endless-OS-Installer-which-can-run-in-Windows.jpg +[15]: https://www.debugpoint.com/wp-content/uploads/2021/11/Endless-OS-Desktop-version-4.0-1024x582.jpg +[16]: https://www.debugpoint.com/tag/endless-os/ +[17]: https://endlessos.com/ +[18]: https://www.debugpoint.com/tag/xfce +[19]: https://www.debugpoint.com/wp-content/uploads/2020/11/Linux-Lite-Desktop-5.2.jpg +[20]: https://linuxliteos.com/download.php +[21]: https://www.debugpoint.com/wp-content/uploads/2022/05/Pop-OS.jpg +[22]: https://pop.system76.com/ +[23]: https://www.debugpoint.com/wp-content/uploads/2021/08/elementary-OS-6-ODIN-Desktop.jpeg +[24]: https://elementary.io/ +[25]: https://www.debugpoint.com/wp-content/uploads/2022/02/Peppermint-2022-02-02-Desktop.jpg +[26]: https://www.debugpoint.com/wp-content/uploads/2022/02/The-new-Peppermint-Hub-Application-written-in-Python-1024x487.jpg +[27]: https://peppermintos.com/guide/downloading/ +[28]: https://twisteros.com +[29]: https://www.debugpoint.com/2022/02/twister-ui-2022/ +[30]: https://www.debugpoint.com/wp-content/uploads/2022/02/Twister-UI-Windows-XP-Theme.jpg From e4268773c24d9391d01541b7c24aaadde0639966 Mon Sep 17 00:00:00 2001 From: lkxed Date: Tue, 31 May 2022 10:22:53 +0800 Subject: [PATCH 074/104] =?UTF-8?q?[=E7=94=B3=E9=A2=86=E5=8E=9F=E6=96=87][?= =?UTF-8?q?news]:=2020220527=20TypeScript=20Based=20Headless=20CMS=20-Payl?= =?UTF-8?q?oad-=20Becomes=20Open=20Source.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...peScript Based Headless CMS -Payload- Becomes Open Source.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/news/20220527 TypeScript Based Headless CMS -Payload- Becomes Open Source.md b/sources/news/20220527 TypeScript Based Headless CMS -Payload- Becomes Open Source.md index 0e99f3c1d1..b38719b8a6 100644 --- a/sources/news/20220527 TypeScript Based Headless CMS -Payload- Becomes Open Source.md +++ b/sources/news/20220527 TypeScript Based Headless CMS -Payload- Becomes Open Source.md @@ -2,7 +2,7 @@ [#]: via: "https://news.itsfoss.com/payload-open-source/" [#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "lkxed" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 03d1213e57cd101558abb51648175533bde606e2 Mon Sep 17 00:00:00 2001 From: lkxed Date: Tue, 31 May 2022 10:52:24 +0800 Subject: [PATCH 075/104] =?UTF-8?q?[=E6=8F=90=E4=BA=A4=E8=AF=91=E6=96=87][?= =?UTF-8?q?news]:=2020220527=20TypeScript=20Based=20Headless=20CMS=20-Payl?= =?UTF-8?q?oad-=20Becomes=20Open=20Source.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...dless CMS -Payload- Becomes Open Source.md | 79 ------------------- ...dless CMS -Payload- Becomes Open Source.md | 78 ++++++++++++++++++ 2 files changed, 78 insertions(+), 79 deletions(-) delete mode 100644 sources/news/20220527 TypeScript Based Headless CMS -Payload- Becomes Open Source.md create mode 100644 translated/news/20220527 TypeScript Based Headless CMS -Payload- Becomes Open Source.md diff --git a/sources/news/20220527 TypeScript Based Headless CMS -Payload- Becomes Open Source.md b/sources/news/20220527 TypeScript Based Headless CMS -Payload- Becomes Open Source.md deleted file mode 100644 index b38719b8a6..0000000000 --- a/sources/news/20220527 TypeScript Based Headless CMS -Payload- Becomes Open Source.md +++ /dev/null @@ -1,79 +0,0 @@ -[#]: subject: "TypeScript Based Headless CMS ‘Payload’ Becomes Open Source" -[#]: via: "https://news.itsfoss.com/payload-open-source/" -[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/" -[#]: collector: "lkxed" -[#]: translator: "lkxed" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -TypeScript Based Headless CMS ‘Payload’ Becomes Open Source -====== -A new option added to the list of open-source headless CMS. Now, a better headless WordPress alternative? - -![payload][1] - -Since its first beta release a little over a year ago, Payload has slowly built a name for itself within the web development community as a headless Content Management System (CMS). For a bit of background information, Payload is a CMS tailored specifically toward being simpler to develop websites, web apps, or native applications. - -Recently, they decided to go completely open-source, putting it among the likes of some of the [best open-source CMS available][2]. - -However, that raises some questions, like what will their business model look like? And what are the plans for Payload CMS? Let’s take a brief look. - -### Why Has Payload Gone Open-Source? - -Since its initial launch back in 2021, Payload has received many contributions from the open-source community. As Payload said in their [recent announcement][3], the decision to go open-source is massive, and it allows projects to read much greater heights than could ever be possible if kept behind closed doors. - -![][4] - -In addition, this openness often results in much greater levels of trust from the developer community. This trust also extends to businesses, naturally turning to the platform with the greatest developer support and trust. - -Due to all these reasons, Payload is now switching to the MIT license. This allows anyone to modify, distribute, and use Payload for free and without limitations. - -However, Payload still needs money flowing in to operate sustainably. So, that begs the question, how will Payload make money? - -### How Payload Is Going To Make Money? - -As is always the case, Payload requires some financial backing to remain afloat. They have outlined a two-part plan that should both provide users with even more convenience-focused features while still leaving self-hosted customers incredible flexibility. - -![][5] - -#### Enterprise Licenses - -This option is extremely similar to other open-source CMS software services. These licenses would provide more advanced SSO options and give the developers guaranteed response times from the core Payload team. - -These licenses should look appealing to larger corporations, especially those that require the utmost reliability. - -#### Cloud Hosting - -This option is quite attractive, as it combines multiple services to create the most convenient experience possible. Although traditional hosting remains reasonably easy, as soon as you add in a database, permanent file storage, and deliberate infrastructure for Node apps, you are left with four or five different services that all need to work seamlessly together. - -It should be noted that this is not required, and users are still encouraged to host their instances. However, this service simply takes a lot of the expenses and challenges associated with hosting out of the equation. - -As of now, things haven’t been finalized. But, you can keep an eye on the discussions on [GitHub][6] to keep up with it. - -### Wrapping Up - -As an emerging CMS option, it is great to see Payload take this step to become a popular alternative to WordPress and other options. Additionally, it appears to me that the Payload team is confident in their new business model, signifying a (hopefully) bright future for them. - -[Payload CMS][7] - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/payload-open-source/ - -作者:[Jacob Crume][a] -选题:[lkxed][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://news.itsfoss.com/author/jacob/ -[b]: https://github.com/lkxed -[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/payload-opensource.jpg -[2]: https://itsfoss.com/open-source-cms/ -[3]: https://payloadcms.com/blog/open-source -[4]: https://news.itsfoss.com/wp-content/uploads/2022/05/payloadcms-demo.png -[5]: https://news.itsfoss.com/wp-content/uploads/2022/05/payload-free-opensource-1024x576.jpg -[6]: https://github.com/payloadcms/payload -[7]: https://payloadcms.com/ diff --git a/translated/news/20220527 TypeScript Based Headless CMS -Payload- Becomes Open Source.md b/translated/news/20220527 TypeScript Based Headless CMS -Payload- Becomes Open Source.md new file mode 100644 index 0000000000..6d2fc8783e --- /dev/null +++ b/translated/news/20220527 TypeScript Based Headless CMS -Payload- Becomes Open Source.md @@ -0,0 +1,78 @@ +[#]: subject: "TypeScript Based Headless CMS ‘Payload’ Becomes Open Source" +[#]: via: "https://news.itsfoss.com/payload-open-source/" +[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +基于 TypeScript 的 无头内容管理系统 “Payload” 现已开源 +====== +开源无头Headless 内容管理系统(CMS)列表中添加了一个新选项。它会是一个更好的无头 WordPress 替代品吗? + +![Payload][1] + +自从一年多前发布首个 beta 版本以来,Payload 已经逐渐在 Web 开发社区中,作为无头内容管理系统 (CMS) 给人们留下了深刻印象。先做一些背景介绍,Payload 是专门为更简单地开发网站、Web 应用或原生native应用而量身定制的内容管理系统。 + +最近,他们决定完全开源,现在,它已跻身 [可用的最佳开源内容管理系统][2]。 + +然而,这也带来了一些问题:他们会采用怎么样的商业模式?Payload 内容管理系统的计划是什么?下面,就让我们简要地看一下吧! + +### Payload 为什么要开源? + +自 2021 年首次发布以来,Payload 已经收到了来自开源社区的许多贡献。正如 Payload 在他们 [最近的公告] [3] 中所说,开源是一个重要的决定,它能够使项目能够达到的更高的高度,这是闭门造车做不到的。 + +![][4] +此外,这种开放性通常会增加开发者社区的信任。这种信任也会延伸到商业,自然而然地转向开发者最支持、最信任的平台。 + +因此,Payload 正在切换到 MIT 许可证。这将允许任何人免费且不受限制地修改、分发和使用 Payload。 + +然而,Payload 仍然需要资金流入才能持续运营。那么,这就引出了一个问题,Payload 将如何盈利呢? + +### Payload 将如何盈利? + +与往常一样,Payload 需要一些财务支持才能维持运营。团队拿出了一个由两部分组成的计划,该计划既要为用户提供更多以便利为中心convenience-focused的功能,又要为自托管self-hosted客户提供难以置信的灵活性。 + +![][5] + +#### 企业许可证 + +此选项与其他开源 CMS 的软件服务极为相似。这些许可证将提供更高级的 SSO 选项,并为开发者保证 Payload 核心团队的响应时间。 + +这些许可证应该对大公司有吸引力,尤其是那些需要最大程度可靠性的公司。 + +#### 云主机 + +这个选项非常有吸引力,因为它结合了多种服务来创造最方便的体验。尽管传统托管仍然相当容易,但只要你为 Node 应用程序添加数据库、持久文件存储和其他基础设施,你就会面对四五个不同的服务,而这些服务都需要无缝协同工作。 + +应该注意的是,这不是必需的,Payload 仍然鼓励用户托管他们的实例。这项服务只是消除了与托管相关的大量费用和挑战而已。 + +截至目前,事情还没有敲定。但是,你可以关注 [GitHub][6] 上的讨论来跟踪事情的进展。 + +### 总结 + +作为一个新兴的 CMS 选项,很高兴看到 Payload 迈出了这一步,成为 WordPress 和其他选项的流行替代品。此外,在我看来,Payload 团队对他们的新业务模式充满信心,或许这预示着一个光明的未来(希望如此)。 + +[Payload 内容管理系统][7] + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/payload-open-source/ + +作者:[Jacob Crume][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/jacob/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/payload-opensource.jpg +[2]: https://itsfoss.com/open-source-cms/ +[3]: https://payloadcms.com/blog/open-source +[4]: https://news.itsfoss.com/wp-content/uploads/2022/05/payloadcms-demo.png +[5]: https://news.itsfoss.com/wp-content/uploads/2022/05/payload-free-opensource-1024x576.jpg +[6]: https://github.com/payloadcms/payload +[7]: https://payloadcms.com/ From 9f9ecb25e3bfc76749d1f8489327f6d18f2fbc48 Mon Sep 17 00:00:00 2001 From: SamMa Date: Tue, 31 May 2022 11:41:43 +0800 Subject: [PATCH 076/104] Update 20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md --- ...l KVM on Ubuntu 22.04 -Jammy Jellyfish-.md | 52 +++++++++---------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/sources/tech/20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md b/sources/tech/20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md index fd285a2cc5..e3363274b2 100644 --- a/sources/tech/20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md +++ b/sources/tech/20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md @@ -13,21 +13,21 @@ Ubuntu 22.04 (Jammy Jellyfish) 之 KVM 安装手札 在 **KVM** 之上可以运行 Windows 和 Liunx 虚拟机。每个虚拟机之间相互独立并独享 CPU、内存、网络设备、存储设备等相关资源。 -本文将介绍如何在 Ubuntu 22.04 LTS (Jammy Jellyfish) 中安装 **KVM** 。在文末,我们也将演示在安装 **KVM** 完成之后如何创建虚拟机。 +本文将介绍在 Ubuntu 22.04 LTS (Jammy Jellyfish) 中如何安装 **KVM** 。在文末,我们也将演示在安装 **KVM** 完成之后如何创建虚拟机。 ### 1) 更新 Ubuntu 22.04 -To get off the ground, launch the terminal and update your local package index as follows. +在一切开始前,打开终端并通过如下命令更新更新apt软件包索引: ``` $ sudo apt update ``` -### 2) Check if Virtualization is enabled +### 2) 检查虚拟化是否开启 -Before you proceed any further, you need to check if your CPU supports KVM virtualization. For this to be possible, your system needs to either have a VT-x( vmx ) Intel processor or an AMD-V (svm) processor. +首先需要检查您的CPU是否支持 KVM 虚拟化。确保您系统中安装了 Intel 处理器 VT-x( vmx ) 或 AMD AMD-V (svm) 处理器。 -This is achieved by running the following command. if the output is greater than 0, then virtualization is enabled. Otherwise, virtualization is disabled and you need to enable it. +您可以通过运行如下命令,根据返回的结果是否大于0判断虚拟化是否启用。如果返回值等于0,则表示虚拟化已禁用,您需要先启用虚拟化。 ``` $ egrep -c '(vmx|svm)' /proc/cpuinfo @@ -37,7 +37,7 @@ $ egrep -c '(vmx|svm)' /proc/cpuinfo From the above output, you can deduce that virtualization is enabled since the result printed is greater than 0. If Virtualization is not enabled, be sure to enable the virtualization feature in your system’s BIOS settings. -In addition, you can verify if KVM virtualization is enabled by running the following command: +另外,您可以通过如下命令判断 KVM 虚拟化是否已经在运行: ``` $ kvm-ok @@ -49,13 +49,13 @@ Directly below, you will get instructions on how to resolve this issue, and that ![KVM-OK-Command-Not-Found-Ubuntu][2] -Therefore, install the cpu-checker package as follows. +随后,通过如下命令安装 cpu-checker 软件包: ``` $ sudo apt install -y cpu-checker ``` -Then run the kvm-ok command, and if KVM virtualization is enabled, you should get the following output. +接着运行 kvm-ok 命令,如果 KVM 已经启动,您将看到如下输出: ``` $ kvm-ok @@ -63,26 +63,26 @@ $ kvm-ok ![KVM-OK-Command-Output][3] -### 3) Install KVM on Ubuntu 22.04 +### 3) 在 Ubuntu 22.04 上安装 KVM -Next, run the command below to install KVM and additional virtualization packages on Ubuntu 22.04. +随后,通过如下命令在 Ubuntu 22.04 中安装 KVM 以及其他相关虚拟化软件包: ``` $ sudo apt install -y qemu-kvm virt-manager libvirt-daemon-system virtinst libvirt-clients bridge-utils ``` -Let us break down the packages that we are installing: +为您解释下刚刚安装了哪些软件包: -* qemu-kvm  – An opensource emulator and virtualization package that provides hardware emulation. -* virt-manager – A Qt-based graphical interface for managing virtual machines via the libvirt daemon. -* libvirt-daemon-system – A package that provides configuration files required to run the libvirt daemon. -* virtinst – A  set of command-line utilities for provisioning and modifying virtual machines. +* qemu-kvm – 一款开源模拟器,为虚拟化安装包提供硬件模拟的支持 +* virt-manager – 一款基于 **QT** 和 **libvirt** 的图形的 libvirt 虚拟机管理工具 +* libvirt-daemon-system – 一款为运行 libvirt 进程提供必要配置文件的工具 +* virtinst – 一套为置备和修改虚拟机提供的命令行工具 * libvirt-clients – A set of client-side libraries and APIs for managing and controlling virtual machines & hypervisors from the command line. * bridge-utils – A set of tools for creating and managing bridge devices. -###  4) Enable the virtualization daemon (libvirtd) +### 4) 启用虚拟化守护进程 (libvirtd) -With all the packages installed, enable and start the Libvirt daemon. +在所有软件包安装完毕之后,通过如下命令 启用并启动 Libvirt 守护进程: ``` $ sudo systemctl enable --now libvirtd @@ -106,7 +106,7 @@ $ sudo usermod -aG libvirt $USER The $USER environment variable points to the name of the currently logged-in user.  To apply this change, you need to log out and log back again. -### 5) Create Network Bridge (br0) +### 5) 创建网桥(br0) If you are planning to access KVM virtual machines outside from your Ubuntu 22.04 system, then you must map VM’s interface to a network bridge. Though a virtual bridge named virbr0, created automatically when KVM is installed but it is used for testing purposes. @@ -148,7 +148,7 @@ To apply above change, run ‘netplan apply’ $ sudo netplan apply ``` -Verify the network bridge ‘br0’, run below ip command +您可以通过如下命令,验证网桥 ‘br0’: ``` $ ip add show @@ -156,7 +156,7 @@ $ ip add show ![Network-Bridge-br0-ubuntu-linux][5] -### 6) Launch KVM Virtual Machines Manager +### 6) 启动 KVM 虚拟机管理器 With KVM installed, you can begin creating your virtual machines using the virt-manager GUI tool. To get started, use the GNOME search utility and search for ‘Virtual machine Manager’. @@ -203,7 +203,7 @@ Next, define the RAM and the number of CPU cores for your virtual machine and cl ![Virtual-Machine-RAM-CPU-Virt-Manager][14] -In the next step, define the disk space for your virtual machine and click ‘Forward’. +下一页中,输入虚拟机磁盘空间,并点击 ‘Forward’ 继续。 ![Storage-for-Virtual-Machine-KVM-Virt-Manager][15] @@ -211,21 +211,21 @@ To associate virtual machine’s nic to network bridge, click on ‘Network sele ![Network-Selection-KVM-Virtual-Machine-Virt-Manager][16] -Finally, click ‘Finish’ to wind up setting the virtual machine. +最后,点击 ‘Finish’ 按钮结束设置虚拟机。 ![Choose-Finish-to-OS-Installation-KVM-VM][17] -Shortly afterward, the virtual machine creation will get underway. +稍等片刻,虚拟机的创建过程将开始。 ![Creating-Domain-Virtual-Machine-Virt-Manager][18] -Once completed, the virtual machine will start with the OS installer displayed. Below is the Debian 11 installer listing the options for installation. From here, you can proceed to install your preferred system. +当创建结束时,虚拟机将开机并进入系统安装界面。如下是 Debian 11 的安装选项。在这里您可以根据需要进行系统安装。 ![Virtual-Machine-Console-Virt-Manager][19] -##### Conclusion +##### 小结 -And that’s it. In this guide, we have demonstrated how you can install the KVM hypervisor on Ubuntu 22.04. Your feedback on this guide is much welcome. +至此,本文向您演示了如何在 Ubuntu 22.04 上 安装 KVM 虚拟化引擎。您的反馈对我们至关重要。 -------------------------------------------------------------------------------- From c4545d268ec716e912a7326e0f45cac39b7b4b7d Mon Sep 17 00:00:00 2001 From: SamMa Date: Tue, 31 May 2022 12:47:55 +0800 Subject: [PATCH 077/104] Update 20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md --- ...all KVM on Ubuntu 22.04 -Jammy Jellyfish-.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/sources/tech/20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md b/sources/tech/20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md index e3363274b2..4541dd1935 100644 --- a/sources/tech/20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md +++ b/sources/tech/20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md @@ -35,7 +35,7 @@ $ egrep -c '(vmx|svm)' /proc/cpuinfo ![SVM-VMX-Flags-Cpuinfo-linux][1] -From the above output, you can deduce that virtualization is enabled since the result printed is greater than 0. If Virtualization is not enabled, be sure to enable the virtualization feature in your system’s BIOS settings. +根据上方命令输出,您通过返回值是否大于0判断虚拟化环境启用与否。如果虚拟化未启用,请在BIOS设置中将其开启。 另外,您可以通过如下命令判断 KVM 虚拟化是否已经在运行: @@ -43,9 +43,9 @@ From the above output, you can deduce that virtualization is enabled since the r $ kvm-ok ``` -For this to work, you need to have installed the cpu-checker package, otherwise, you will bump into the error ‘Command ‘kvm-ok’ not found’. +请确保您已经安装了 cpu-checker 软件包,否则将提示未找到该命令的报错。 -Directly below, you will get instructions on how to resolve this issue, and that is to install the cpu-checker package. +关于此类问题的解决方案以及 cp-checker 软件包的安装,您可以参考如下: ![KVM-OK-Command-Not-Found-Ubuntu][2] @@ -77,9 +77,8 @@ $ sudo apt install -y qemu-kvm virt-manager libvirt-daemon-system virtinst libvi * virt-manager – 一款基于 **QT** 和 **libvirt** 的图形的 libvirt 虚拟机管理工具 * libvirt-daemon-system – 一款为运行 libvirt 进程提供必要配置文件的工具 * virtinst – 一套为置备和修改虚拟机提供的命令行工具 -* libvirt-clients – A set of client-side libraries and APIs for managing and controlling virtual machines & hypervisors from the command line. -* bridge-utils – A set of tools for creating and managing bridge devices. - +* libvirt-clients – 一套提供管理和控制虚拟机以及虚拟化引擎的客户端侧库和API命令行工具 +* bridge-utils – 一套用于创建和管理桥接设备的工具 ### 4) 启用虚拟化守护进程 (libvirtd) 在所有软件包安装完毕之后,通过如下命令 启用并启动 Libvirt 守护进程: @@ -89,7 +88,7 @@ $ sudo systemctl enable --now libvirtd $ sudo systemctl start libvirtd ``` -Confirm that the virtualization daemon is running as shown. +您可以通过如下命令验证虚拟化守护进程是否已经运行: ``` $ sudo systemctl status libvirtd @@ -97,14 +96,14 @@ $ sudo systemctl status libvirtd ![Libvirtd-Status-Ubuntu-Linux][4] -In addition, you need to add the currently logged-in user to the kvm and libvirt groups so that they can create and manage virtual machines. +另外,请将当前登录用户加入 kvm 和 libvirt 用户组,以便能够创建和管理虚拟机。 ``` $ sudo usermod -aG kvm $USER $ sudo usermod -aG libvirt $USER ``` -The $USER environment variable points to the name of the currently logged-in user.  To apply this change, you need to log out and log back again. +$USER 环境变量引用的即为当前登录的用户名。您需要重新登录才能使得配置生效。 ### 5) 创建网桥(br0) From 914fd2e82f4085487e055eed027cc147fef576e5 Mon Sep 17 00:00:00 2001 From: lkxed Date: Tue, 31 May 2022 13:50:16 +0800 Subject: [PATCH 078/104] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?news]:=2020220531=20Rocket.Chat=20is=20Switching=20to=20Matrix?= =?UTF-8?q?=20to=20Enable=20Cross-App=20Messaging.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...to Matrix to Enable Cross-App Messaging.md | 81 +++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 sources/news/20220531 Rocket.Chat is Switching to Matrix to Enable Cross-App Messaging.md diff --git a/sources/news/20220531 Rocket.Chat is Switching to Matrix to Enable Cross-App Messaging.md b/sources/news/20220531 Rocket.Chat is Switching to Matrix to Enable Cross-App Messaging.md new file mode 100644 index 0000000000..8e6dbfde37 --- /dev/null +++ b/sources/news/20220531 Rocket.Chat is Switching to Matrix to Enable Cross-App Messaging.md @@ -0,0 +1,81 @@ +[#]: subject: "Rocket.Chat is Switching to Matrix to Enable Cross-App Messaging" +[#]: via: "https://news.itsfoss.com/rocket-chat-matrix/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Rocket.Chat is Switching to Matrix to Enable Cross-App Messaging +====== +Rocket.Chat is embracing the Matrix protocol to enable decentralized communication for the platform. That’s a huge change, isn’t it? + +![rocket chat matrix][1] + +Rocket.Chat is an excellent open-source messaging (collaboration) platform. + +In fact, it is one of the [best open-source Slack alternatives][2] available. We use it as well for internal communication. + +Rocket.Chat is also making good progress compared to some of its open-source competitors. For instance, they [teamed up with Nextcloud to provide an alternative to Office 365][3]. + +And recently announced a switch to Matrix protocol to introduce federation capabilities that allow its users to communicate with users on other platforms. In other words, [Rocket.Chat][4] will be utilizing a decentralized network for communication with the Matrix integration. + +As a Rocket.Chat user; you can talk to users on any other app using the Matrix protocol. + +### Rocket.Chat is Switching to a Decentralized Protocol to Enhance Collaboration + +![][5] + +Matrix protocol is a fantastic choice to enable an interoperable federation. Now, with Rocket.Chat onboard; the decentralized network should be stronger than ever. + +Not to forget, we already have [Element][6], and [Gitter][7], as some of the platforms that already utilize Matrix. So, Rocket.Chat joining the network sounds exciting! + +The [official announcement][8] further explains the collaboration: + +> The Rocket.Chat adoption of Matrix makes it simple for organizations to easily connect with external parties, whether they’re using Rocket.Chat or any other Matrix compatible platform. This initiative is another step forward on Rocket.Chat’s journey to let every conversation flow without compromise and enable full interoperability with its ecosystem. + +The new change with the Matrix network is already available in the latest [alpha release for Rocket.Chat 4.7.0][9]. Unless you want to experiment with it, you should wait for the stable release to introduce the Matrix network support. + +**Aron Ogle** (*Core Developer at Rocket.Chat*) has put together a [guide][10] and a video to help you out if you want to explore the technical details of Rocket.Chat integration with the Matrix. Here’s the video for it: + +![Setting up Rocket Chat to talk with Matrix][11] + +### Is This a Good Move? + +While decentralized tech hasn’t taken the internet by storm, it is promising and makes more sense with its reliability and decentralized capabilities. Matrix protocol has been getting all the praise for a couple of years now, and it seems to be heading in the right direction. + +As of now, most of the big platforms rely on centralized infrastructure to make things work. + +And, with the current implementations, cross-communication is not possible with most of the chat applications. + +So, Rocket.Chat will be making a difference by offering cross-app interactions, like the ability to chat with an Element user on **matrix.org,** as shown in the image above. + +Rocket.Chat entering the scene with Matrix protocol could open up the potential for its competitors or other services to give a second thought to solutions like Matrix protocol. + +*What do you think about Rocket.Chat adopting the Matrix protocol? Share your thoughts in the comments section below.* + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/rocket-chat-matrix/ + +作者:[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/05/rocketchat-matrix-protocol.jpg +[2]: https://itsfoss.com/open-source-slack-alternative/ +[3]: https://news.itsfoss.com/rocket-chat-nextcloud-collaboration/ +[4]: https://itsfoss.com/rocket-chat/ +[5]: https://news.itsfoss.com/wp-content/uploads/2022/05/rocket-chat-matrix.jpg +[6]: https://itsfoss.com/element/ +[7]: https://itsfoss.com/gitter/ +[8]: https://rocket.chat/press-releases/rocket-chat-leverages-matrix-protocol-for-decentralized-and-interoperable-communications +[9]: https://github.com/RocketChat/Rocket.Chat/releases/tag/4.7.0 +[10]: https://geekgonecrazy.com/2022/05/30/rocketchat-and-the-matrix-protocol/ +[11]: https://youtu.be/oQhIH8kql9I From 5f5da7277af4c28a6aab1618ae102f885d881483 Mon Sep 17 00:00:00 2001 From: lkxed Date: Tue, 31 May 2022 14:37:27 +0800 Subject: [PATCH 079/104] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020220531=20SQLx-=20The=20Rust=20SQL=20Toolkit.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20220531 SQLx- The Rust SQL Toolkit.md | 355 ++++++++++++++++++ 1 file changed, 355 insertions(+) create mode 100644 sources/tech/20220531 SQLx- The Rust SQL Toolkit.md diff --git a/sources/tech/20220531 SQLx- The Rust SQL Toolkit.md b/sources/tech/20220531 SQLx- The Rust SQL Toolkit.md new file mode 100644 index 0000000000..1904601008 --- /dev/null +++ b/sources/tech/20220531 SQLx- The Rust SQL Toolkit.md @@ -0,0 +1,355 @@ +[#]: subject: "SQLx: The Rust SQL Toolkit" +[#]: via: "https://www.opensourceforu.com/2022/05/sqlx-the-rust-sql-toolkit/" +[#]: author: "Sibi Prabakaran https://www.opensourceforu.com/author/sibi-prabakaran/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +SQLx: The Rust SQL Toolkit +====== +An async, pure Rust SQL crate features compile-time checked queries without a domain specific language. This article will give a basic whirlwind tour of the library by showing CRUD operations and the transactions supported using it. + +![The-Rust-SQL-Toolkit-Featured-imade][1] + +SQLx is a Rust crate for interacting with your database. Some of its features that distinguish it from other crates in the Rust ecosystem are: + +* Built with async IO in mind +* Compile-time checked queries +* Database agnostic +* Postgres/MySQL drivers are written in pure Rust (as opposed to them being a FFI binding to a C library) +* Works with various runtimes + +**Database setup** +For our demo, we will start with a simple database with two tables and a simple relationship between them: + +``` +CREATe TABLE “person”(“id” SERIAL8 PRIMARY KEY UNIQUE,”name” TEXT NOT NULL,”age” smallint NOT NULL,”email” TEXT NULL) +CREATe TABLE “book”(“id” SERIAL8 PRIMARY KEY UNIQUE,”name” TEXT NOT NULL,”isbn” TEXT NOT NULL,”person” INT8 NOT NULL) +ALTER TABLE “book” ADD CONSTRAINT “book_person_fkey” FOREIGN KEY(“person”) REFERENCES “person”(“id”) ON DELETE RESTRICT ON UPDATE RESTRICT +``` + +We have two tables: + +* Person +* Book + +And there is a relationship between the ‘book’ and the ‘person’ tables. Make sure you have a local (or remote, if you prefer) PostgreSQL running to test it out. You will also need the sqlx *cli* in your *$PATH*. + +**Rust project setup** +We will use Cargo to create a new project. Cargo is the package manager for Rust. It can download your Rust package’s dependencies, compile your packages, make distributable packages, and upload them to crates.io. You can refer to Rust documentation for more details. + +``` +❯ cargo new sqlx-demo Created binary (application) `sqlx-demo` package +``` + +The project is set up as a binary project: + +``` +❯ tree +. +├── Cargo.toml +└── src +└── main.rs +1 directory, 2 files +``` + +Let’s export the database credentials in an environment variable: + +``` +export DATABASE_URL=postgres://postgres:postgres@localhost/sqlx-demo +``` + +Next, we will add the SQL file (20211223133946_initial_setup.sql) as part of the migration: + +``` +❯ sqlx migrate add initial_setup +Creating migrations/20211223133946_initial_setup.sql +``` + +Congratulations on creating your first migration! +Did you know you can embed your migrations in your application binary? On startup, after creating your database connection or pool, add: + +``` +sqlx::migrate!().run(<&your_pool OR &mut your_connection>).await?; +``` + +Note that the compiler won’t pick up new migrations if no Rust source files have changed. You can create a Cargo build script to work around this with `sqlx migrate build-script` (see *https://docs.rs/sqlx/0.5/sqlx/macro.migrate.html).* + +Now you have to go to the above file and add your SQL statements. Once you have done that, you can set up the database: + +``` +❯ sqlx database setup +Applied 20211223133946/migrate initial setup (27.149609ms) +``` + +Next, let’s add the required dependencies to the Cargo*.toml* file: + +``` +[dependencies] +anyhow = “1.0.51” +sqlx = { version = “0.5.9”, features = [ “runtime-tokio-rustls”, “postgres” ]} +tokio = { version = “1”, features = [“full”] } +``` + +And you can modify the main.rs code to do the following things: + +* Set up a connection pool +* Pass credentials to get a connection from the pool + +``` +use sqlx::{PgPool}; +use anyhow::*; +use sqlx::postgres::PgPoolOptions; + +#[derive(Clone)] +pub struct DBApplication { + pool: PgPool +} + +impl DBApplication { + pub async fn new(config: String) -> Result { + let pool = PgPoolOptions::new() + .max_connections(5) + .connect(&config) + .await?; + Ok(DBApplication { pool }) + } +} + +#[tokio::main] +async fn main() -> Result<()> { + let db = DBApplication::new(“postgres://postgres:postgres@localhost/sqlx-demo”.into()).await?; + println!(“Connection acquired!”); + Ok(()) +} +``` + +You can confirm if this works by running the command *cargo run*: + +``` +❯ cargo run + Finished dev [unoptimized + debuginfo] target(s) in 0.04s + Running `target/debug/sqlx-demo` +Connection acquired! +``` + +**Domain types** +We have two tables and, usually, we would want to model them into Rust structs. The easy way of doing this is to use *derive* macros: + +``` +#[derive(sqlx::FromRow, Debug)] +pub struct Person { + id: i64, + name: String, + age: i16, + email: String +} +``` + +The usual convention is to have two sets of records — one for inserting and the other for fetching. I use the New prefix to distinguish them: + +``` +pub struct NewPerson { + pub name: String, + pub age: i16, + pub email: String +} +``` + +Another nice option is to use the *query_as!* macro, as it doesn’t need the above derive macro. I will be using that later in the demo. + +**Transactions** +Let’s write a function to create a person, and let’s use a transaction to do the same: + +``` +pub async fn create_person(&self, person: NewPerson) -> Result { + let mut transaction = self.pool.begin().await?; + let person = sqlx::query_as(“INSERT INTO person(name, age, email) VALUES ($1, $2, $3) RETURNING *;”) + .bind(person.name) + .bind(person.age) + .bind(person.email) + .fetch_one(&mut transaction).await?; + transaction.commit().await?; + Ok(person) +} +``` + +You can modify your main fetch to use it: + +``` +#[tokio::main] +async fn main() -> Result<()> { + let db = DBApplication::new(“postgres://postgres:postgres@localhost/sqlx-demo”.into()).await?; + let sibi = db.create_person(NewPerson{ name: “Sibi”.into(), age: 20, email: “test@psibi.in”.into()}).await?; + println!(“Sibi: {:?}”, sibi); + Ok(()) +} +``` + +Now let’s check if the function returns early because of an error, if the transaction rolls back. We will simulate a failure in the above function by an early return after insert: + +``` +pub async fn create_person(&self, person: NewPerson) -> Result { + let mut transaction = self.pool.begin().await?; + let person = sqlx::query_as(“INSERT INTO person(name, age, email) VALUES ($1, $2, $3) RETURNING *;”) + .bind(person.name) + .bind(person.age) + .bind(person.email) + .fetch_one(&mut transaction).await?; + bail!(“Simulate error”); + transaction.commit().await?; + Ok(person) +} +``` + +And the main function will be like this: + +``` +#[tokio::main] +async fn main() -> Result<()> { + let db = DBApplication::new(“postgres://postgres:postgres@localhost/sqlx-demo”.into()).await?; + let sibi = db.create_person(NewPerson{ name: “Sibi”.into(), age: 20, email: “test@psibi.in”.into()}).await?; + println!(“Sibi: {:?}”, sibi); + Ok(()) +} +``` + +Before running the executable, you can check the current rows in your table: + +``` +sqlx-demo=# select * from person; + id | name | age | email +----+------+-----+------- +(0 rows) +``` + +Now let’s execute the program: + +``` +❯ cargo run Finished dev [unoptimized + debuginfo] target(s) in 0.05s + Running `target/debug/sqlx-demo` +Error: Simulate error +``` + +You can see that it did return an error. You can also verify that the transaction has rolled back and has not inserted the row, by inspecting the rows: + +``` +sqlx-demo=# select * from person; + id | name | age | email +----+------+-----+------- +(0 rows) +``` + +**Other CRUD operations** +Similarly, you can implement other CRUD (create, read, update, delete) operations too: + +``` +pub async fn get_person(&self, id: i64) -> Result { + let mut transaction = self.pool.begin().await?; + let person = sqlx::query_as(“SELECT * from person where id = $1”) + .bind(id) + .fetch_one(&mut transaction).await?; + transaction.commit().await?; + Ok(person) +} + +pub async fn update_person_name(&self, id: i64, name: String) -> Result { + let mut transaction = self.pool.begin().await?; + let person = sqlx::query_as(“UPDATE person SET name = $1 WHERE id = $2 RETURNING *”) + .bind(name) + .bind(id) + .fetch_one(&mut transaction).await?; + transaction.commit().await?; + Ok(person) +} + +pub async fn delete_book(&self, id: i64) -> Result<()> { + let mut transaction = self.pool.begin().await?; + sqlx::query(“DELETE FROM book WHERE id = $1”) + .bind(id) + .fetch_optional(&mut transaction).await?; + transaction.commit().await?; + Ok(()) +} +``` + +**Compile time queries** +One nice thing about SQLx is that it can perform static checks against your database server. Using the *query_as* macro will achieve this. Rewriting the above *get_person* function to use the macro will look like this: + +``` +pub async fn get_person_macro(&self, id: i64) -> Result { + let mut transaction = self.pool.begin().await?; + let person = sqlx::query_as!(Person, “SELECT * from person where id = $1”, id) + .fetch_one(&mut transaction) + .await?; + transaction.commit().await?; + Ok(person) +} +``` + +The real power of it shines when you make mistakes in your SQL query. Let’s change the above code to use *id_*wrong instead of id: + +``` +pub async fn get_person_macro(&self, id: i64) -> Result { + let mut transaction = self.pool.begin().await?; + let person = sqlx::query_as!(Person, “SELECT * from person where id_wrong = $1”, id) + .fetch_one(&mut transaction) + .await?; + transaction.commit().await?; + Ok(person) +} +``` + + +Compiling the above code will give this error: + +``` +error: error returned from database: column “id_wrong” does not exist + --> src/main.rs:99:22 + | +99 | let person = sqlx::query_as!(Person, “SELECT * from person where id_wrong = $1”, id) + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: this error originates in the macro `$crate::sqlx_macros::expand_query` (in Nightly builds, run with -Z macro-backtrace for more info) +``` + +As the error message indicates, there is no column named *id_wrong* in your table. + +**Migrations** +You could see above that we ran the migrations using the *sqlx-cli tool.* But in our application code, it will often be handy to run the migrations on a fresh database.*The sqlx::migration* macro is specifically meant for that. It embeds the migration into your binary and can be used to run it before the application is started. This is how your new main function will look like with migrations integration: + +``` +#[tokio::main] +async fn main() -> Result<()> { + let db = DBApplication::new(“postgres://postgres:postgres@localhost/sqlx-demo”.into()).await?; + sqlx::migrate!().run(&db.pool).await?; + ... + ... + Ok(()) +} +``` + +Hopefully, this article gave you a good idea of how to use SQLx for interacting with your database. If you prefer an object-relational mapping (ORM) based solution, these are some of the popular options: + +* Diesel: https://diesel.rs/ +* sea_orm: https://docs.rs/sea-orm/latest/sea_orm/ +* ormx: https://github.com/NyxCode/ormx + +Both sea_orm and ormx are built on top of SQLx. The major differentiating factor between Diesel and the other ORM based solutions is that the former isn’t async IO ready yet. + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/05/sqlx-the-rust-sql-toolkit/ + +作者:[Sibi Prabakaran][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/sibi-prabakaran/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/04/The-Rust-SQL-Toolkit-Featured-imade.jpg From 254033e9366b6137c3d9047ca25452eaee1c10c6 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 31 May 2022 14:56:28 +0800 Subject: [PATCH 080/104] RP @lkxed https://linux.cn/article-14656-1.html --- ...sktop Player is Now Available for Linux.md | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) rename {translated/news => published}/20220526 Plex Desktop Player is Now Available for Linux.md (77%) diff --git a/translated/news/20220526 Plex Desktop Player is Now Available for Linux.md b/published/20220526 Plex Desktop Player is Now Available for Linux.md similarity index 77% rename from translated/news/20220526 Plex Desktop Player is Now Available for Linux.md rename to published/20220526 Plex Desktop Player is Now Available for Linux.md index 3abeea5a3b..af12ffedbf 100644 --- a/translated/news/20220526 Plex Desktop Player is Now Available for Linux.md +++ b/published/20220526 Plex Desktop Player is Now Available for Linux.md @@ -3,13 +3,14 @@ [#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" [#]: collector: "lkxed" [#]: translator: "lkxed" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14656-1.html" Plex 桌面播放器现已支持 Linux ====== -Plex.tv 终于在 Linux 上增加了它的桌面版本和全新的 HTPC 应用。不过,它目前只提供了 snap 包。 + +> Plex.tv 终于增加了 Linux 桌面版本和全新的 HTPC 应用。不过,它目前只提供了 Snap 包。 ![plex][1] @@ -29,21 +30,23 @@ Plex 是一个流行的流媒体播放器,同时,它能够用作一个媒体 这样一来,借助 Flatpak 和 Snap 软件包,Plex 就可以成为在 Linux 上流式传输和组织个人媒体收藏的绝佳选择。 +除了桌面应用程序,如果你利用你的 Linux 机器连接到一个大屏幕来观看所有的内容,还有一个 Plex HTPC(有计划发布 Flatpak 软件包)。 + ![][6] -如果你感兴趣的话,HTPC 是 PMP TV(全称为 Plex Media Player TV)模式的继承者。 +顺便说一句,HTPC 是 PMP TV(全称为 Plex Media Player TV)模式的继承者。 -官网上发布了这款产品,以及它的 Linux 桌面应用程序 。 +他们在官网上与它的 Linux 桌面应用程序一同发布了这款产品。 -使用 HTPC,这个桌面应用就可以和电视共享,并支持音频直通、刷新率切换、控制器支持和可配置输入映射等高级功能。 +使用 HTPC,这个桌面应用就可以和电视共享,并支持音频直通、刷新率切换、控制器和可配置输入映射等高级功能。 ![][7] 因此,如果你有一个大屏幕,并且想要连接你的系统(不管是什么桌面平台)的话,你现在可以使用 HTPC 应用程序来完成。 -[Plex 桌面版][8] +> **[Plex 桌面版][8]** -[Plex HTPC][9] +> **[Plex HTPC][9]** 在 Linux 系统或联网电视上流式传输内容时,你通常会使用什么呢?你觉得 Plex 能满足你的需求吗?即然它支持 Linux 了,你会想要用它来替代当前使用的软件吗? @@ -56,7 +59,7 @@ via: https://news.itsfoss.com/plex-desktop-linux/ 作者:[Ankush Das][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/) 荣誉推出 From d643a8c0bbd8a2581c1d38bedc1cf37c943bddd7 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 31 May 2022 15:16:22 +0800 Subject: [PATCH 081/104] RP @geekpi https://linux.cn/article-14657-1.html --- ...ve common mistakes when using automation.md | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) rename {translated/tech => published}/20220518 Five common mistakes when using automation.md (91%) diff --git a/translated/tech/20220518 Five common mistakes when using automation.md b/published/20220518 Five common mistakes when using automation.md similarity index 91% rename from translated/tech/20220518 Five common mistakes when using automation.md rename to published/20220518 Five common mistakes when using automation.md index cf8b52b775..c41b5d825b 100644 --- a/translated/tech/20220518 Five common mistakes when using automation.md +++ b/published/20220518 Five common mistakes when using automation.md @@ -3,16 +3,14 @@ [#]: author: "Gary Scarborough https://fedoramagazine.org/author/gscarbor/" [#]: collector: "lujun9972" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14657-1.html" 使用自动化时的五个常见错误 ====== -![][1] - -背景图片来自 [“Modern Times”(1936)][2],[United Artists][3],公共领域,通过 Wikimedia Commons +![](https://img.linux.net.cn/data/attachment/album/202205/31/151450ukwk98weqgefgowa.jpg) 随着自动化扩展到涵盖 IT 的更多方面,越来越多的管理员正在学习自动化技能并应用它们来减轻他们的工作量。自动化可以减轻重复性任务的负担,并为基础设施增加一定程度的一致性。但是,当 IT 工作人员部署自动化时,会出现可能对大大小小的基础设施造成严重破坏的常见错误。在自动化部署中通常会出现五个常见错误。 @@ -20,7 +18,7 @@ 初学者常犯的错误是自动化脚本没有经过全面测试。由于拼写错误或逻辑错误,简单的 shell 脚本可能会对服务器产生不利影响。将该错误乘以基础架构中的服务器数量,你可能会遇到一大堆问题需要清理。在大规模部署之前始终测试你的自动化脚本。 -### 意外的服务器负载 +### 意外负载 经常发生的第二个错误是没有预测脚本可能对其他资源施加的系统负载。当目标是十几个服务器时,运行从仓库下载文件或安装包的脚本可能没问题。脚本通常在成百上千台服务器上运行。这种负载可以使支持服务停止或完全崩溃。不要忘记考虑端点影响或设置合理的并发率。 @@ -30,11 +28,11 @@ ### 缺乏文档 -管理员的一项固定职责应该是记录他们的工作。由于合同到期、升职或定期员工流动,公司可能会在 IT 部门频繁招聘新员工。公司内的工作组相互隔离也很常见。由于这些原因,重要的是记录哪些自动化已经到位。与用户运行脚本不同,自动化可能会在创建它的人离开组之后继续很长时间。管理员可能会发现自己在其基础设施中面临着来自自动化未经检查的奇怪行为。 +管理员的一项固定职责应该是记录他们的工作。由于合同到期、升职或定期员工流动,公司可能会在 IT 部门频繁招聘新员工。公司内的工作组相互隔离也很常见。由于这些原因,重要的是记录哪些自动化已经到位。与用户运行脚本不同,自动化可能会在创建它的人离开组之后继续很长时间。管理员可能会发现自己在其基础设施中面临着来自未经检查的自动化的奇怪行为。 ### 缺乏经验 -列表中的最后一个错误是管理员对他们正在自动化的系统不够了解。管理员经常被雇用到他们没有接受过足够培训且没有人可以学习的职位上工作。自 COVID 以来,当公司努力填补空缺时,这一点尤其重要。然后管理员被迫处理他们没有设置并且可能不完全理解的基础设施。这可能会导致非常低效的脚本浪费资源或配置错误的服务器。 +列表中的最后一个错误是管理员对他们正在自动化的系统不够了解。管理员经常被雇用到他们没有接受过足够培训且没有人可以求教的职位上工作。自 COVID 以来,当公司努力填补空缺时,这一点尤其重要。然后管理员被迫处理他们没有设置并且可能不完全理解的基础设施。这可能会导致非常低效的脚本浪费资源或配置错误的服务器。 ### 结论 @@ -47,7 +45,7 @@ via: https://fedoramagazine.org/five-common-mistakes-when-using-automation/ 作者:[Gary Scarborough][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From ed918d73969375d43de3cef454815c7d51a7b9d2 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 31 May 2022 15:49:32 +0800 Subject: [PATCH 082/104] RP @lkxed https://linux.cn/article-14658-1.html --- .../20180625 3 ways to copy files in Go.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) rename {translated/tech => published}/20180625 3 ways to copy files in Go.md (93%) diff --git a/translated/tech/20180625 3 ways to copy files in Go.md b/published/20180625 3 ways to copy files in Go.md similarity index 93% rename from translated/tech/20180625 3 ways to copy files in Go.md rename to published/20180625 3 ways to copy files in Go.md index b362d05e2f..7a6d0a1647 100644 --- a/translated/tech/20180625 3 ways to copy files in Go.md +++ b/published/20180625 3 ways to copy files in Go.md @@ -3,17 +3,16 @@ [#]: author: "Mihalis Tsoukalos https://opensource.com/users/mtsouk" [#]: collector: "lkxed" [#]: translator: "lkxed" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14658-1.html" 在 Go 中复制文件的三种方法 ====== -本文是 Go 系列的第三篇文章,我将介绍三种最流行的复制文件的方法。 -![][1] +![](https://img.linux.net.cn/data/attachment/album/202205/31/153413kcrth9v8c93r5u8e.jpg) -图源:Opensource.com +> 本文是 Go 系列的第三篇文章,我将介绍三种最流行的复制文件的方法。 本文将介绍展示如何使用 [Go 编程语言][3] 来复制文件。在 Go 中复制文件的方法有很多,我只介绍三种最常见的:使用 Go 库中的 `io.Copy()` 函数调用、一次读取输入文件并将其写入另一个文件,以及使用缓冲区一块块地复制文件。 @@ -85,7 +84,7 @@ if err != nil { } ``` -上述代码包括了两个 if 代码块(嗯,用 Go 写程序就是这样的),程序的实际功能其实体现在 `ioutil.ReadFile()` 和 `ioutil.WriteFile()` 这两行代码中。 +上述代码包括了两个 `if` 代码块(嗯,用 Go 写程序就是这样的),程序的实际功能其实体现在 `ioutil.ReadFile()` 和 `ioutil.WriteFile()` 这两行代码中。 运行 `cp2.go`,你会得到下面的输出: @@ -204,7 +203,7 @@ via: https://opensource.com/article/18/6/copying-files-go 作者:[Mihalis Tsoukalos][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/) 荣誉推出 From 9d9e1a5d1a6f701cfebb4665b4dcaf857080ff27 Mon Sep 17 00:00:00 2001 From: lkxed Date: Tue, 31 May 2022 16:29:38 +0800 Subject: [PATCH 083/104] Update 20220527 TypeScript Based Headless CMS -Payload- Becomes Open Source.md --- ...Script Based Headless CMS -Payload- Becomes Open Source.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/translated/news/20220527 TypeScript Based Headless CMS -Payload- Becomes Open Source.md b/translated/news/20220527 TypeScript Based Headless CMS -Payload- Becomes Open Source.md index 6d2fc8783e..9ea9847477 100644 --- a/translated/news/20220527 TypeScript Based Headless CMS -Payload- Becomes Open Source.md +++ b/translated/news/20220527 TypeScript Based Headless CMS -Payload- Becomes Open Source.md @@ -9,7 +9,7 @@ 基于 TypeScript 的 无头内容管理系统 “Payload” 现已开源 ====== -开源无头Headless 内容管理系统(CMS)列表中添加了一个新选项。它会是一个更好的无头 WordPress 替代品吗? +开源的无头Headless内容管理系统(CMS)列表中添加了一个新选项。它会是一个更好的无头 WordPress 替代品吗? ![Payload][1] @@ -21,7 +21,7 @@ ### Payload 为什么要开源? -自 2021 年首次发布以来,Payload 已经收到了来自开源社区的许多贡献。正如 Payload 在他们 [最近的公告] [3] 中所说,开源是一个重要的决定,它能够使项目能够达到的更高的高度,这是闭门造车做不到的。 +自 2021 年首次发布以来,Payload 已经收到了来自开源社区的许多贡献。正如 Payload 在他们 [最近的公告][3] 中所说,开源是一个重要的决定,它能够使项目能够达到的更高的高度,这是闭门造车做不到的。 ![][4] 此外,这种开放性通常会增加开发者社区的信任。这种信任也会延伸到商业,自然而然地转向开发者最支持、最信任的平台。 From d78ad08f1d962d304e1d9a9fb507e640cfa84352 Mon Sep 17 00:00:00 2001 From: lkxed Date: Tue, 31 May 2022 17:09:41 +0800 Subject: [PATCH 084/104] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020220531=20How=20dynamic=20linking=20for=20modular=20l?= =?UTF-8?q?ibraries=20works=20on=20Linux.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ng for modular libraries works on Linux.md | 223 ++++++++++++++++++ 1 file changed, 223 insertions(+) create mode 100644 sources/tech/20220531 How dynamic linking for modular libraries works on Linux.md diff --git a/sources/tech/20220531 How dynamic linking for modular libraries works on Linux.md b/sources/tech/20220531 How dynamic linking for modular libraries works on Linux.md new file mode 100644 index 0000000000..e3cba06c3e --- /dev/null +++ b/sources/tech/20220531 How dynamic linking for modular libraries works on Linux.md @@ -0,0 +1,223 @@ +[#]: subject: "How dynamic linking for modular libraries works on Linux" +[#]: via: "https://opensource.com/article/22/5/dynamic-linking-modular-libraries-linux" +[#]: author: "Jayashree Huttanagoudar https://opensource.com/users/jayashree-huttanagoudar" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +How dynamic linking for modular libraries works on Linux +====== +Learn how to combine multiple C object files into single executable with dynamic libraries. + +![Links][1] + +Image by: Paul Lewin. Modified by Opensource.com. CC BY-SA 2.0 + +When you write an application using the C programming language, your code usually has multiple source files. + +Ultimately, these files must be compiled into a single executable. You can do this by creating either static or dynamic libraries (the latter are also referred to as shared libraries). These two types of libraries vary in how they are created and linked. Both have advantages and disadvantages, depending on your use case. + +Dynamic linking is the most common method, especially on Linux systems. Dynamic linking keeps libraries modular, so just one library can be shared between any number of applications. Modularity also allows a shared library to be updated independently of the applications that rely upon it. + +In this article, I demonstrate how dynamic linking works. In a future article, I'll demonstrate static linking. + +### Linker + +A linker is a command that combines several pieces of a program together and reorganizes the memory allocation for them. + +The functions of a linker include: + +* Integrating all the pieces of a program +* Figuring out a new memory organization so that all the pieces fit together +* Reviving addresses so that the program can run under the new memory organization +* Resolving symbolic references + +As a result of all these linker functionalities, a runnable program called an executable is created. Before you can create a dynamically linked executable, you need some libraries to link *to* and an application to compile. Get your [favorite text editor][2] ready and follow along. + +### Create the object files + +First, create the header file `mymath.h` with these function signatures: + +``` +int add(int a, int b); +int sub(int a, int b); +int mult(int a, int b); +int divi(int a, int b); +``` + +Create `add.c`, `sub.c` , `mult.c` and `divi.c` with these function definitions. I'm placing all of the code in one code block, so divide it up among four files, as indicated in the comments: + +``` +// add.c +int add(int a, int b){ +return (a+b); +} + +//sub.c +int sub(int a, int b){ +return (a-b); +} + +//mult.c +int mult(int a, int b){ +return (a*b); +} + +//divi.c +int divi(int a, int b){ +return (a/b); +} +``` + +Now generate object files `add.o`, `sub.o`, `mult.o`, and `divi.o` using GCC: + +``` +$ gcc -c add.c sub.c mult.c divi.c +``` + +The `-c` option skips the linking step and creates only object files. + +### Creating a shared object file + +Dynamic libraries are linked during the execution of the final executable. Only the name of the dynamic library is placed in the final executable. The actual linking happens during runtime, when both executable and library are placed in the main memory. + +In addition to being sharable, another advantage of a dynamic library is that it reduces the size of the final executable file. Instead of having a redundant copy of the library, an application using a library includes only the name of the library when the final executable is created. + +You can create dynamic libraries from your existing sample code: + +``` +$ gcc -Wall -fPIC -c add.c sub.c mult.c divi.c +``` + +The option `-fPIC` tells GCC to generate position-independent code (PIC). The `-Wall` option isn't necessary and has nothing to do with how the code is compiling. Still, it's a valuable option because it enables compiler warnings, which can be helpful when troubleshooting. + +Using GCC, create the shared library `libmymath.so` : + +``` +$ gcc -shared -o libmymath.so \ +add.o sub.o mult.o divi.o +``` + +You have now created a simple example math library, `libmymath.so`, which you can use in C code. There are, of course, very complex C libraries out there, and this is the process their developers use to generate the final product that you or I install for use in C code. + +Next, you can use your new math library in some custom code, then link it. + +### Creating a dynamically linked executable + +Suppose you've written a command for mathematics. Create a file called `mathDemo.c` and paste this code into it: + +``` +#include +#include +#include + +int main() +{ +  int x, y; +  printf("Enter two numbers\n"); +  scanf("%d%d",&x,&y); +  +  printf("\n%d + %d = %d", x, y, add(x, y)); +  printf("\n%d - %d = %d", x, y, sub(x, y)); +  printf("\n%d * %d = %d", x, y, mult(x, y)); + +  if(y==0){ +    printf("\nDenominator is zero so can't perform division\n"); +      exit(0); +  }else{ +      printf("\n%d / %d = %d\n", x, y, divi(x, y)); +      return 0; +  } +} +``` + +Notice that the first line is an `include` statement referencing, by name, your own `libmymath` library. To use a shared library, you must have it installed. If you don't install the library you use, then when your executable runs and searches for the included library, it won't be able to find it. Should you need to compile code without installing a library to a known directory, there are [ways to override default settings][3]. For general use, however, it's expected that libraries exist in known locations, so that's what I'm demonstrating here. + +Copy the file `libmymath.so` to a standard system directory, such as `/usr/lib64`, and then run `ldconfig`. The `ldconfig` command creates the required links and cache to the most recent shared libraries found in the standard library directories. + +``` +$ sudo cp libmymath.so /usr/lib64/ +$ sudo ldconfig +``` + +### Compiling the application + +Create an object file called `mathDemo.o` from your application source code (`mathDemo.c` ): + +``` +$ gcc -I . -c mathDemo.c +``` + +The `-I` option tells GCC to search for header files (`mymath.h` in this case) in the directory listed after it. In this case, you're specifying the current directory, represented by a single dot (`.` ). Create an executable, referring to your shared math library by name using the `-l` option: + +``` +$ gcc -o mathDynamic mathDemo.o -lmymath +``` + +GCC finds `libmymath.so` because it exists in a default system library directory. Use `ldd` to verify the shared libraries used: + +``` +$ ldd mathDemo +    linux-vdso.so.1 (0x00007fffe6a30000) +    libmymath.so => /usr/lib64/libmymath.so (0x00007fe4d4d33000) +    libc.so.6 => /lib64/libc.so.6 (0x00007fe4d4b29000) +    /lib64/ld-linux-x86-64.so.2 (0x00007fe4d4d4e000) +``` + +Take a look at the size of the `mathDemo` executable: + +``` +$ du ./mathDynamic +24   ./mathDynamic +``` + +It's a small application, of course, and the amount of disk space it occupies reflects that. For comparison, a statically linked version of the same code (as you'll see in my next article) is 932K! + +``` +$ ./mathDynamic +Enter two numbers +25 +5 + +25 + 5 = 30 +25 - 5 = 20 +25 * 5 = 125 +25 / 5 = 5 +``` + +You can verify that it's dynamically linked with the `file` command: + +``` +$ file ./mathDynamic +./mathDynamic: ELF 64-bit LSB executable, x86-64, +dynamically linked, +interpreter /lib64/ld-linux-x86-64.so.2, +with debug_info, not stripped +``` + +Success! + +### Dynamically linking + +A shared library leads to a lightweight executable, as the linking happens during runtime. Because it resolves references during runtime, it does take more time for execution. However, since the vast majority of commands on everyday Linux systems are dynamically linked and on modern hardware, the time saved is negligible. Its inherent modularity is a powerful feature for developers and users alike. + +In this article, I described how to create dynamic libraries and link them into a final executable. I'll use the same source code to create a statically linked executable in my next article. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/5/dynamic-linking-modular-libraries-linux + +作者:[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/lead-images/links.png +[2]: https://opensource.com/article/21/2/open-source-text-editors +[3]: https://opensource.com/article/22/5/compile-code-ldlibrarypath From ff1625bcee48c12b1448f8f720f3515eedc1d9aa Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 1 Jun 2022 00:33:42 +0800 Subject: [PATCH 085/104] =?UTF-8?q?=E5=BD=92=E6=A1=A3=20202205?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20180523 Creating random, secure passwords in Go.md | 0 .../{ => 202205}/20180529 Build a concurrent TCP server in Go.md | 0 published/{ => 202205}/20180625 3 ways to copy files in Go.md | 0 ...0190404 Why you should choose mindfulness over multitasking.md | 0 ...303 Watching activity on Linux with watch and tail commands.md | 0 .../{ => 202205}/20200807 A Beginner-s Guide to Open Source.md | 0 ...2 Explore the night sky with this open source astronomy app.md | 0 ... Media Platforms Like Twitter, Facebook, YouTube and Reddit.md | 0 .../{ => 202205}/20210112 8 tips for the Linux command line.md | 0 .../{ => 202205}/20210122 Convert your filesystem to Btrfs.md | 0 .../20210211 31 open source text editors you need to try.md | 0 ...10305 Build a printer UI for Raspberry Pi with XML and Java.md | 0 ...10310 Troubleshoot WiFi problems with Go and a Raspberry Pi.md | 0 .../20210323 WebAssembly Security, Now and in the Future.md | 0 .../20210428 Share files between Linux and Windows computers.md | 0 published/{ => 202205}/20210615 Listen to music on FreeDOS.md | 0 .../{ => 202205}/20210617 Linux package management with dnf.md | 0 .../{ => 202205}/20210624 Linux package management with apt.md | 0 ...710 A new open source operating system for embedded systems.md | 0 .../20211213 How I use open source to design my own card games.md | 0 published/{ => 202205}/20220113 Learn Rust in 2022.md | 0 ...220212 5 levels of transparency for open source communities.md | 0 .../20220219 Crop and resize photos on Linux with Gwenview.md | 0 .../20220221 3 steps to start running containers today.md | 0 ...op 10 Linux Distributions for Programmers in 2022 -Featured.md | 0 .../20220414 A guide to JVM parameters for Java developers.md | 0 ...220419 Difference Between Ubuntu 22.04 and Ubuntu 20.04 LTS.md | 0 ...tation Isn’t Just Another Aspect of Open Source Development.md | 0 ...Popular Features that Make Ubuntu 22.04 LTS an Epic Release.md | 0 ...New Features Revealed for KDE Plasma 5.25- Take a Look Here.md | 0 .../20220425 Linux Mint Upgrade Tool - Here-s How it Works.md | 0 ...How to Upgrade to Pop OS 22.04 LTS from 21.10 -Step by Step.md | 0 .../20220427 10 Reasons to Run Linux in Virtual Machines.md | 0 ...427 Bloomberg Open Sources Memray, A Python Memory Profiler.md | 0 ...20427 Hands on With GNOME-s New Text Editor for Linux Users.md | 0 ...27 How I grew my product management career with open source.md | 0 ...e With UI Upgrades, Private Stations, and More Improvements.md | 0 ... New Menu System Makes it Even Easier to Install Arch Linux.md | 0 ... Musk’s Plan To Open Source The Twitter Algorithm Has Flaws.md | 0 .../20220428 How to Remove Snap Packages in Ubuntu Linux.md | 0 ...hy use Apache Druid for your open source analytics database.md | 0 ...0429 Detect a Phishing URL Using Machine Learning in Python.md | 0 ...20220430 Hands On With GNOME’s New Terminal for Linux Users.md | 0 .../20220430 How to Install h.264 decoder on Ubuntu Linux.md | 0 ...based Redox OS 0.7.0 Arrives with Enhanced Hardware Support.md | 0 ... How to Install Classic GNOME Flashback in Ubuntu 22.04 LTS.md | 0 .../20220502 How to make community recognition more inclusive.md | 0 ...Joins The Open 3D Foundation For Open Source 3D Development.md | 0 ...502 Tools You Can Use for the Security Audit of IoT Devices.md | 0 ...ill Lives- Version 7.6 is Available for Testing After 6 Years.md | 0 ...s To Set The Foundation For Future Open And Parallel Coding.md | 0 ... Examines Packages In Open Source Repositories In Real Time.md | 0 ...laborates With ENSAM, Open Sources Its “Inspector” Software.md | 0 ...100 Marks 17 Years of Development with Interesting Upgrades.md | 0 .../20220504 How I manage my own virtual network with ZeroTier.md | 0 ...s 3D Movie Maker, First Released In 1995, Is Now Open Source.md | 0 ...04 elementary OS 7 Code Name Revealed. Here are the Details.md | 0 ...05 Experiment with containers and pods on your own computer.md | 0 ...loper Creates First-of-its-Kind Fund To Support Maintainers.md | 0 ...0 Release is Based on Debian 11 With a New -Kleopatra- Tool.md | 0 ...05 Xebian – A Blend of Debian and Goodness of Xfce [Review].md | 0 published/{ => 202205}/20220506 Announcing Fedora Linux 36.md | 0 .../20220506 My favorite open source tool for using crontab.md | 0 ...d Creates a Nifty Tool to Help Install 3rd Party Deb Packages.md | 0 ...08 How open source leads the way for sustainable technology.md | 0 ...20509 PyCaret- Machine Learning Model Development Made Easy.md | 0 ...10 Can’t Run AppImage on Ubuntu 22.04- Here’s How to Fix it.md | 0 ...r- A Wallpaper Manager for Linux with Multi-Monitor Support.md | 0 ...20511 Good News! Docker Desktop is Now Here for Linux Users.md | 0 .../20220511 How to Install Fedora 36 Workstation Step by Step.md | 0 ...Linux 9 Announced as the Next-Gen Backbone of Enterprise IT.md | 0 published/{ => 202205}/20220512 5 reasons to use sudo on Linux.md | 0 ...DIA Takes a Big Step to Improve its GPU Experience on Linux.md | 0 ...able Minimize And Maximize Buttons In Fedora 36 Workstation.md | 0 .../20220514 How To Install Multimedia Codecs In Fedora Linux.md | 0 ...- The Awesome Budgie Desktop is Coming to Fedora Linux Soon.md | 0 .../20220516 How To Reset Root Password In Fedora 36.md | 0 ...ft has another Linux distribution and it is based on Debian.md | 0 .../20220516 Structured Data Processing with Spark SQL.md | 0 ...Adobe Illustrator Alternative Inkscape Releases Version 1.2.md | 0 ...Adds an Amusing New Feature for the Hackers to Scare People.md | 0 .../20220518 Five common mistakes when using automation.md | 0 ...Distributing A Collection Of Open Source Software libraries.md | 0 ...0518 How To Reset Sudo Password In Ubuntu 22.04 - 20.04 LTS.md | 0 ...Adds ARM Compatibility, a New PDF Viewer, and More Features.md | 0 ...able Activate Linux Watermark Notification In Linux Desktop.md | 0 .../20220520 A programmer-s guide to GNU C Compiler.md | 0 .../20220520 Customize GNOME 42 with A Polished Look.md | 0 ...ch, delete a branch, and find the author of a branch in Git.md | 0 ... Does Not Accept Debian as a Free Distribution. Here-s Why!.md | 0 ...he Programming Language for Smart Contracts in a Blockchain.md | 0 ...eased with Graphics Driver Changes and New Hardware Support.md | 0 ...aborates with HP for a Powerful Linux Laptop for Developers.md | 0 ...rotonMail is Now Just -Proton- Offering a Privacy Ecosystem.md | 0 ...220526 DeepMind-s Open Source MuJoCo Is Available On GitHub.md | 0 .../20220526 Plex Desktop Player is Now Available for Linux.md | 0 ...ontinues the Legacy of CentOS with the Release of Version 9.md | 0 ...nux Users Warned Against Using the Tor Browser- Here-s why!.md | 0 98 files changed, 0 insertions(+), 0 deletions(-) rename published/{ => 202205}/20180523 Creating random, secure passwords in Go.md (100%) rename published/{ => 202205}/20180529 Build a concurrent TCP server in Go.md (100%) rename published/{ => 202205}/20180625 3 ways to copy files in Go.md (100%) rename published/{ => 202205}/20190404 Why you should choose mindfulness over multitasking.md (100%) rename published/{ => 202205}/20200303 Watching activity on Linux with watch and tail commands.md (100%) rename published/{ => 202205}/20200807 A Beginner-s Guide to Open Source.md (100%) rename published/{ => 202205}/20210102 Explore the night sky with this open source astronomy app.md (100%) rename published/{ => 202205}/20210111 9 Decentralized, P2P and Open Source Alternatives to Mainstream Social Media Platforms Like Twitter, Facebook, YouTube and Reddit.md (100%) rename published/{ => 202205}/20210112 8 tips for the Linux command line.md (100%) rename published/{ => 202205}/20210122 Convert your filesystem to Btrfs.md (100%) rename published/{ => 202205}/20210211 31 open source text editors you need to try.md (100%) rename published/{ => 202205}/20210305 Build a printer UI for Raspberry Pi with XML and Java.md (100%) rename published/{ => 202205}/20210310 Troubleshoot WiFi problems with Go and a Raspberry Pi.md (100%) rename published/{ => 202205}/20210323 WebAssembly Security, Now and in the Future.md (100%) rename published/{ => 202205}/20210428 Share files between Linux and Windows computers.md (100%) rename published/{ => 202205}/20210615 Listen to music on FreeDOS.md (100%) rename published/{ => 202205}/20210617 Linux package management with dnf.md (100%) rename published/{ => 202205}/20210624 Linux package management with apt.md (100%) rename published/{ => 202205}/20210710 A new open source operating system for embedded systems.md (100%) rename published/{ => 202205}/20211213 How I use open source to design my own card games.md (100%) rename published/{ => 202205}/20220113 Learn Rust in 2022.md (100%) rename published/{ => 202205}/20220212 5 levels of transparency for open source communities.md (100%) rename published/{ => 202205}/20220219 Crop and resize photos on Linux with Gwenview.md (100%) rename published/{ => 202205}/20220221 3 steps to start running containers today.md (100%) rename published/{ => 202205}/20220327 Top 10 Linux Distributions for Programmers in 2022 -Featured.md (100%) rename published/{ => 202205}/20220414 A guide to JVM parameters for Java developers.md (100%) rename published/{ => 202205}/20220419 Difference Between Ubuntu 22.04 and Ubuntu 20.04 LTS.md (100%) rename published/{ => 202205}/20220422 Documentation Isn’t Just Another Aspect of Open Source Development.md (100%) rename published/{ => 202205}/20220423 5 Less Popular Features that Make Ubuntu 22.04 LTS an Epic Release.md (100%) rename published/{ => 202205}/20220425 Exciting New Features Revealed for KDE Plasma 5.25- Take a Look Here.md (100%) rename published/{ => 202205}/20220425 Linux Mint Upgrade Tool - Here-s How it Works.md (100%) rename published/{ => 202205}/20220426 How to Upgrade to Pop OS 22.04 LTS from 21.10 -Step by Step.md (100%) rename published/{ => 202205}/20220427 10 Reasons to Run Linux in Virtual Machines.md (100%) rename published/{ => 202205}/20220427 Bloomberg Open Sources Memray, A Python Memory Profiler.md (100%) rename published/{ => 202205}/20220427 Hands on With GNOME-s New Text Editor for Linux Users.md (100%) rename published/{ => 202205}/20220427 How I grew my product management career with open source.md (100%) rename published/{ => 202205}/20220427 Shortwave 3.0 is Here With UI Upgrades, Private Stations, and More Improvements.md (100%) rename published/{ => 202205}/20220428 Archinstall-s New Menu System Makes it Even Easier to Install Arch Linux.md (100%) rename published/{ => 202205}/20220428 Elon Musk’s Plan To Open Source The Twitter Algorithm Has Flaws.md (100%) rename published/{ => 202205}/20220428 How to Remove Snap Packages in Ubuntu Linux.md (100%) rename published/{ => 202205}/20220428 Why use Apache Druid for your open source analytics database.md (100%) rename published/{ => 202205}/20220429 Detect a Phishing URL Using Machine Learning in Python.md (100%) rename published/{ => 202205}/20220430 Hands On With GNOME’s New Terminal for Linux Users.md (100%) rename published/{ => 202205}/20220430 How to Install h.264 decoder on Ubuntu Linux.md (100%) rename published/{ => 202205}/20220430 Rust-based Redox OS 0.7.0 Arrives with Enhanced Hardware Support.md (100%) rename published/{ => 202205}/20220501 How to Install Classic GNOME Flashback in Ubuntu 22.04 LTS.md (100%) rename published/{ => 202205}/20220502 How to make community recognition more inclusive.md (100%) rename published/{ => 202205}/20220502 Microsoft Joins The Open 3D Foundation For Open Source 3D Development.md (100%) rename published/{ => 202205}/20220502 Tools You Can Use for the Security Audit of IoT Devices.md (100%) rename published/{ => 202205}/20220502 Ubuntu’s Unity Desktop Still Lives- Version 7.6 is Available for Testing After 6 Years.md (100%) rename published/{ => 202205}/20220503 Nvidia Begins To Set The Foundation For Future Open And Parallel Coding.md (100%) rename published/{ => 202205}/20220503 Package Analysis Examines Packages In Open Source Repositories In Real Time.md (100%) rename published/{ => 202205}/20220504 ESI Group Collaborates With ENSAM, Open Sources Its “Inspector” Software.md (100%) rename published/{ => 202205}/20220504 Firefox 100 Marks 17 Years of Development with Interesting Upgrades.md (100%) rename published/{ => 202205}/20220504 How I manage my own virtual network with ZeroTier.md (100%) rename published/{ => 202205}/20220504 Microsoft’s 3D Movie Maker, First Released In 1995, Is Now Open Source.md (100%) rename published/{ => 202205}/20220504 elementary OS 7 Code Name Revealed. Here are the Details.md (100%) rename published/{ => 202205}/20220505 Experiment with containers and pods on your own computer.md (100%) rename published/{ => 202205}/20220505 Open Source Developer Creates First-of-its-Kind Fund To Support Maintainers.md (100%) rename published/{ => 202205}/20220505 Tails 5.0 Release is Based on Debian 11 With a New -Kleopatra- Tool.md (100%) rename published/{ => 202205}/20220505 Xebian – A Blend of Debian and Goodness of Xfce [Review].md (100%) rename published/{ => 202205}/20220506 Announcing Fedora Linux 36.md (100%) rename published/{ => 202205}/20220506 My favorite open source tool for using crontab.md (100%) rename published/{ => 202205}/20220506 Ubuntu MATE’s Lead Creates a Nifty Tool to Help Install 3rd Party Deb Packages.md (100%) rename published/{ => 202205}/20220508 How open source leads the way for sustainable technology.md (100%) rename published/{ => 202205}/20220509 PyCaret- Machine Learning Model Development Made Easy.md (100%) rename published/{ => 202205}/20220510 Can’t Run AppImage on Ubuntu 22.04- Here’s How to Fix it.md (100%) rename published/{ => 202205}/20220510 HydraPaper- A Wallpaper Manager for Linux with Multi-Monitor Support.md (100%) rename published/{ => 202205}/20220511 Good News! Docker Desktop is Now Here for Linux Users.md (100%) rename published/{ => 202205}/20220511 How to Install Fedora 36 Workstation Step by Step.md (100%) rename published/{ => 202205}/20220511 Red Hat Enterprise Linux 9 Announced as the Next-Gen Backbone of Enterprise IT.md (100%) rename published/{ => 202205}/20220512 5 reasons to use sudo on Linux.md (100%) rename published/{ => 202205}/20220512 NVIDIA Takes a Big Step to Improve its GPU Experience on Linux.md (100%) rename published/{ => 202205}/20220514 How To Enable Minimize And Maximize Buttons In Fedora 36 Workstation.md (100%) rename published/{ => 202205}/20220514 How To Install Multimedia Codecs In Fedora Linux.md (100%) rename published/{ => 202205}/20220516 Fudgie- The Awesome Budgie Desktop is Coming to Fedora Linux Soon.md (100%) rename published/{ => 202205}/20220516 How To Reset Root Password In Fedora 36.md (100%) rename published/{ => 202205}/20220516 Microsoft has another Linux distribution and it is based on Debian.md (100%) rename published/{ => 202205}/20220516 Structured Data Processing with Spark SQL.md (100%) rename published/{ => 202205}/20220517 Adobe Illustrator Alternative Inkscape Releases Version 1.2.md (100%) rename published/{ => 202205}/20220517 Kali Linux 2022.2 Release Adds an Amusing New Feature for the Hackers to Scare People.md (100%) rename published/{ => 202205}/20220518 Five common mistakes when using automation.md (100%) rename published/{ => 202205}/20220518 Google To Start Distributing A Collection Of Open Source Software libraries.md (100%) rename published/{ => 202205}/20220518 How To Reset Sudo Password In Ubuntu 22.04 - 20.04 LTS.md (100%) rename published/{ => 202205}/20220518 ONLYOFFICE 7.1 Release Adds ARM Compatibility, a New PDF Viewer, and More Features.md (100%) rename published/{ => 202205}/20220519 How To Enable Activate Linux Watermark Notification In Linux Desktop.md (100%) rename published/{ => 202205}/20220520 A programmer-s guide to GNU C Compiler.md (100%) rename published/{ => 202205}/20220520 Customize GNOME 42 with A Polished Look.md (100%) rename published/{ => 202205}/20220520 How to rename a branch, delete a branch, and find the author of a branch in Git.md (100%) rename published/{ => 202205}/20220521 FSF Does Not Accept Debian as a Free Distribution. Here-s Why!.md (100%) rename published/{ => 202205}/20220523 DAML- The Programming Language for Smart Contracts in a Blockchain.md (100%) rename published/{ => 202205}/20220523 Linux Kernel 5.18 Released with Graphics Driver Changes and New Hardware Support.md (100%) rename published/{ => 202205}/20220523 System76 Collaborates with HP for a Powerful Linux Laptop for Developers.md (100%) rename published/{ => 202205}/20220525 ProtonMail is Now Just -Proton- Offering a Privacy Ecosystem.md (100%) rename published/{ => 202205}/20220526 DeepMind-s Open Source MuJoCo Is Available On GitHub.md (100%) rename published/{ => 202205}/20220526 Plex Desktop Player is Now Available for Linux.md (100%) rename published/{ => 202205}/20220527 AlmaLinux Continues the Legacy of CentOS with the Release of Version 9.md (100%) rename published/{ => 202205}/20220527 Tails Linux Users Warned Against Using the Tor Browser- Here-s why!.md (100%) diff --git a/published/20180523 Creating random, secure passwords in Go.md b/published/202205/20180523 Creating random, secure passwords in Go.md similarity index 100% rename from published/20180523 Creating random, secure passwords in Go.md rename to published/202205/20180523 Creating random, secure passwords in Go.md diff --git a/published/20180529 Build a concurrent TCP server in Go.md b/published/202205/20180529 Build a concurrent TCP server in Go.md similarity index 100% rename from published/20180529 Build a concurrent TCP server in Go.md rename to published/202205/20180529 Build a concurrent TCP server in Go.md diff --git a/published/20180625 3 ways to copy files in Go.md b/published/202205/20180625 3 ways to copy files in Go.md similarity index 100% rename from published/20180625 3 ways to copy files in Go.md rename to published/202205/20180625 3 ways to copy files in Go.md diff --git a/published/20190404 Why you should choose mindfulness over multitasking.md b/published/202205/20190404 Why you should choose mindfulness over multitasking.md similarity index 100% rename from published/20190404 Why you should choose mindfulness over multitasking.md rename to published/202205/20190404 Why you should choose mindfulness over multitasking.md diff --git a/published/20200303 Watching activity on Linux with watch and tail commands.md b/published/202205/20200303 Watching activity on Linux with watch and tail commands.md similarity index 100% rename from published/20200303 Watching activity on Linux with watch and tail commands.md rename to published/202205/20200303 Watching activity on Linux with watch and tail commands.md diff --git a/published/20200807 A Beginner-s Guide to Open Source.md b/published/202205/20200807 A Beginner-s Guide to Open Source.md similarity index 100% rename from published/20200807 A Beginner-s Guide to Open Source.md rename to published/202205/20200807 A Beginner-s Guide to Open Source.md diff --git a/published/20210102 Explore the night sky with this open source astronomy app.md b/published/202205/20210102 Explore the night sky with this open source astronomy app.md similarity index 100% rename from published/20210102 Explore the night sky with this open source astronomy app.md rename to published/202205/20210102 Explore the night sky with this open source astronomy app.md diff --git a/published/20210111 9 Decentralized, P2P and Open Source Alternatives to Mainstream Social Media Platforms Like Twitter, Facebook, YouTube and Reddit.md b/published/202205/20210111 9 Decentralized, P2P and Open Source Alternatives to Mainstream Social Media Platforms Like Twitter, Facebook, YouTube and Reddit.md similarity index 100% rename from published/20210111 9 Decentralized, P2P and Open Source Alternatives to Mainstream Social Media Platforms Like Twitter, Facebook, YouTube and Reddit.md rename to published/202205/20210111 9 Decentralized, P2P and Open Source Alternatives to Mainstream Social Media Platforms Like Twitter, Facebook, YouTube and Reddit.md diff --git a/published/20210112 8 tips for the Linux command line.md b/published/202205/20210112 8 tips for the Linux command line.md similarity index 100% rename from published/20210112 8 tips for the Linux command line.md rename to published/202205/20210112 8 tips for the Linux command line.md diff --git a/published/20210122 Convert your filesystem to Btrfs.md b/published/202205/20210122 Convert your filesystem to Btrfs.md similarity index 100% rename from published/20210122 Convert your filesystem to Btrfs.md rename to published/202205/20210122 Convert your filesystem to Btrfs.md diff --git a/published/20210211 31 open source text editors you need to try.md b/published/202205/20210211 31 open source text editors you need to try.md similarity index 100% rename from published/20210211 31 open source text editors you need to try.md rename to published/202205/20210211 31 open source text editors you need to try.md diff --git a/published/20210305 Build a printer UI for Raspberry Pi with XML and Java.md b/published/202205/20210305 Build a printer UI for Raspberry Pi with XML and Java.md similarity index 100% rename from published/20210305 Build a printer UI for Raspberry Pi with XML and Java.md rename to published/202205/20210305 Build a printer UI for Raspberry Pi with XML and Java.md diff --git a/published/20210310 Troubleshoot WiFi problems with Go and a Raspberry Pi.md b/published/202205/20210310 Troubleshoot WiFi problems with Go and a Raspberry Pi.md similarity index 100% rename from published/20210310 Troubleshoot WiFi problems with Go and a Raspberry Pi.md rename to published/202205/20210310 Troubleshoot WiFi problems with Go and a Raspberry Pi.md diff --git a/published/20210323 WebAssembly Security, Now and in the Future.md b/published/202205/20210323 WebAssembly Security, Now and in the Future.md similarity index 100% rename from published/20210323 WebAssembly Security, Now and in the Future.md rename to published/202205/20210323 WebAssembly Security, Now and in the Future.md diff --git a/published/20210428 Share files between Linux and Windows computers.md b/published/202205/20210428 Share files between Linux and Windows computers.md similarity index 100% rename from published/20210428 Share files between Linux and Windows computers.md rename to published/202205/20210428 Share files between Linux and Windows computers.md diff --git a/published/20210615 Listen to music on FreeDOS.md b/published/202205/20210615 Listen to music on FreeDOS.md similarity index 100% rename from published/20210615 Listen to music on FreeDOS.md rename to published/202205/20210615 Listen to music on FreeDOS.md diff --git a/published/20210617 Linux package management with dnf.md b/published/202205/20210617 Linux package management with dnf.md similarity index 100% rename from published/20210617 Linux package management with dnf.md rename to published/202205/20210617 Linux package management with dnf.md diff --git a/published/20210624 Linux package management with apt.md b/published/202205/20210624 Linux package management with apt.md similarity index 100% rename from published/20210624 Linux package management with apt.md rename to published/202205/20210624 Linux package management with apt.md diff --git a/published/20210710 A new open source operating system for embedded systems.md b/published/202205/20210710 A new open source operating system for embedded systems.md similarity index 100% rename from published/20210710 A new open source operating system for embedded systems.md rename to published/202205/20210710 A new open source operating system for embedded systems.md diff --git a/published/20211213 How I use open source to design my own card games.md b/published/202205/20211213 How I use open source to design my own card games.md similarity index 100% rename from published/20211213 How I use open source to design my own card games.md rename to published/202205/20211213 How I use open source to design my own card games.md diff --git a/published/20220113 Learn Rust in 2022.md b/published/202205/20220113 Learn Rust in 2022.md similarity index 100% rename from published/20220113 Learn Rust in 2022.md rename to published/202205/20220113 Learn Rust in 2022.md diff --git a/published/20220212 5 levels of transparency for open source communities.md b/published/202205/20220212 5 levels of transparency for open source communities.md similarity index 100% rename from published/20220212 5 levels of transparency for open source communities.md rename to published/202205/20220212 5 levels of transparency for open source communities.md diff --git a/published/20220219 Crop and resize photos on Linux with Gwenview.md b/published/202205/20220219 Crop and resize photos on Linux with Gwenview.md similarity index 100% rename from published/20220219 Crop and resize photos on Linux with Gwenview.md rename to published/202205/20220219 Crop and resize photos on Linux with Gwenview.md diff --git a/published/20220221 3 steps to start running containers today.md b/published/202205/20220221 3 steps to start running containers today.md similarity index 100% rename from published/20220221 3 steps to start running containers today.md rename to published/202205/20220221 3 steps to start running containers today.md diff --git a/published/20220327 Top 10 Linux Distributions for Programmers in 2022 -Featured.md b/published/202205/20220327 Top 10 Linux Distributions for Programmers in 2022 -Featured.md similarity index 100% rename from published/20220327 Top 10 Linux Distributions for Programmers in 2022 -Featured.md rename to published/202205/20220327 Top 10 Linux Distributions for Programmers in 2022 -Featured.md diff --git a/published/20220414 A guide to JVM parameters for Java developers.md b/published/202205/20220414 A guide to JVM parameters for Java developers.md similarity index 100% rename from published/20220414 A guide to JVM parameters for Java developers.md rename to published/202205/20220414 A guide to JVM parameters for Java developers.md diff --git a/published/20220419 Difference Between Ubuntu 22.04 and Ubuntu 20.04 LTS.md b/published/202205/20220419 Difference Between Ubuntu 22.04 and Ubuntu 20.04 LTS.md similarity index 100% rename from published/20220419 Difference Between Ubuntu 22.04 and Ubuntu 20.04 LTS.md rename to published/202205/20220419 Difference Between Ubuntu 22.04 and Ubuntu 20.04 LTS.md diff --git a/published/20220422 Documentation Isn’t Just Another Aspect of Open Source Development.md b/published/202205/20220422 Documentation Isn’t Just Another Aspect of Open Source Development.md similarity index 100% rename from published/20220422 Documentation Isn’t Just Another Aspect of Open Source Development.md rename to published/202205/20220422 Documentation Isn’t Just Another Aspect of Open Source Development.md diff --git a/published/20220423 5 Less Popular Features that Make Ubuntu 22.04 LTS an Epic Release.md b/published/202205/20220423 5 Less Popular Features that Make Ubuntu 22.04 LTS an Epic Release.md similarity index 100% rename from published/20220423 5 Less Popular Features that Make Ubuntu 22.04 LTS an Epic Release.md rename to published/202205/20220423 5 Less Popular Features that Make Ubuntu 22.04 LTS an Epic Release.md diff --git a/published/20220425 Exciting New Features Revealed for KDE Plasma 5.25- Take a Look Here.md b/published/202205/20220425 Exciting New Features Revealed for KDE Plasma 5.25- Take a Look Here.md similarity index 100% rename from published/20220425 Exciting New Features Revealed for KDE Plasma 5.25- Take a Look Here.md rename to published/202205/20220425 Exciting New Features Revealed for KDE Plasma 5.25- Take a Look Here.md diff --git a/published/20220425 Linux Mint Upgrade Tool - Here-s How it Works.md b/published/202205/20220425 Linux Mint Upgrade Tool - Here-s How it Works.md similarity index 100% rename from published/20220425 Linux Mint Upgrade Tool - Here-s How it Works.md rename to published/202205/20220425 Linux Mint Upgrade Tool - Here-s How it Works.md diff --git a/published/20220426 How to Upgrade to Pop OS 22.04 LTS from 21.10 -Step by Step.md b/published/202205/20220426 How to Upgrade to Pop OS 22.04 LTS from 21.10 -Step by Step.md similarity index 100% rename from published/20220426 How to Upgrade to Pop OS 22.04 LTS from 21.10 -Step by Step.md rename to published/202205/20220426 How to Upgrade to Pop OS 22.04 LTS from 21.10 -Step by Step.md diff --git a/published/20220427 10 Reasons to Run Linux in Virtual Machines.md b/published/202205/20220427 10 Reasons to Run Linux in Virtual Machines.md similarity index 100% rename from published/20220427 10 Reasons to Run Linux in Virtual Machines.md rename to published/202205/20220427 10 Reasons to Run Linux in Virtual Machines.md diff --git a/published/20220427 Bloomberg Open Sources Memray, A Python Memory Profiler.md b/published/202205/20220427 Bloomberg Open Sources Memray, A Python Memory Profiler.md similarity index 100% rename from published/20220427 Bloomberg Open Sources Memray, A Python Memory Profiler.md rename to published/202205/20220427 Bloomberg Open Sources Memray, A Python Memory Profiler.md diff --git a/published/20220427 Hands on With GNOME-s New Text Editor for Linux Users.md b/published/202205/20220427 Hands on With GNOME-s New Text Editor for Linux Users.md similarity index 100% rename from published/20220427 Hands on With GNOME-s New Text Editor for Linux Users.md rename to published/202205/20220427 Hands on With GNOME-s New Text Editor for Linux Users.md diff --git a/published/20220427 How I grew my product management career with open source.md b/published/202205/20220427 How I grew my product management career with open source.md similarity index 100% rename from published/20220427 How I grew my product management career with open source.md rename to published/202205/20220427 How I grew my product management career with open source.md diff --git a/published/20220427 Shortwave 3.0 is Here With UI Upgrades, Private Stations, and More Improvements.md b/published/202205/20220427 Shortwave 3.0 is Here With UI Upgrades, Private Stations, and More Improvements.md similarity index 100% rename from published/20220427 Shortwave 3.0 is Here With UI Upgrades, Private Stations, and More Improvements.md rename to published/202205/20220427 Shortwave 3.0 is Here With UI Upgrades, Private Stations, and More Improvements.md diff --git a/published/20220428 Archinstall-s New Menu System Makes it Even Easier to Install Arch Linux.md b/published/202205/20220428 Archinstall-s New Menu System Makes it Even Easier to Install Arch Linux.md similarity index 100% rename from published/20220428 Archinstall-s New Menu System Makes it Even Easier to Install Arch Linux.md rename to published/202205/20220428 Archinstall-s New Menu System Makes it Even Easier to Install Arch Linux.md diff --git a/published/20220428 Elon Musk’s Plan To Open Source The Twitter Algorithm Has Flaws.md b/published/202205/20220428 Elon Musk’s Plan To Open Source The Twitter Algorithm Has Flaws.md similarity index 100% rename from published/20220428 Elon Musk’s Plan To Open Source The Twitter Algorithm Has Flaws.md rename to published/202205/20220428 Elon Musk’s Plan To Open Source The Twitter Algorithm Has Flaws.md diff --git a/published/20220428 How to Remove Snap Packages in Ubuntu Linux.md b/published/202205/20220428 How to Remove Snap Packages in Ubuntu Linux.md similarity index 100% rename from published/20220428 How to Remove Snap Packages in Ubuntu Linux.md rename to published/202205/20220428 How to Remove Snap Packages in Ubuntu Linux.md diff --git a/published/20220428 Why use Apache Druid for your open source analytics database.md b/published/202205/20220428 Why use Apache Druid for your open source analytics database.md similarity index 100% rename from published/20220428 Why use Apache Druid for your open source analytics database.md rename to published/202205/20220428 Why use Apache Druid for your open source analytics database.md diff --git a/published/20220429 Detect a Phishing URL Using Machine Learning in Python.md b/published/202205/20220429 Detect a Phishing URL Using Machine Learning in Python.md similarity index 100% rename from published/20220429 Detect a Phishing URL Using Machine Learning in Python.md rename to published/202205/20220429 Detect a Phishing URL Using Machine Learning in Python.md diff --git a/published/20220430 Hands On With GNOME’s New Terminal for Linux Users.md b/published/202205/20220430 Hands On With GNOME’s New Terminal for Linux Users.md similarity index 100% rename from published/20220430 Hands On With GNOME’s New Terminal for Linux Users.md rename to published/202205/20220430 Hands On With GNOME’s New Terminal for Linux Users.md diff --git a/published/20220430 How to Install h.264 decoder on Ubuntu Linux.md b/published/202205/20220430 How to Install h.264 decoder on Ubuntu Linux.md similarity index 100% rename from published/20220430 How to Install h.264 decoder on Ubuntu Linux.md rename to published/202205/20220430 How to Install h.264 decoder on Ubuntu Linux.md diff --git a/published/20220430 Rust-based Redox OS 0.7.0 Arrives with Enhanced Hardware Support.md b/published/202205/20220430 Rust-based Redox OS 0.7.0 Arrives with Enhanced Hardware Support.md similarity index 100% rename from published/20220430 Rust-based Redox OS 0.7.0 Arrives with Enhanced Hardware Support.md rename to published/202205/20220430 Rust-based Redox OS 0.7.0 Arrives with Enhanced Hardware Support.md diff --git a/published/20220501 How to Install Classic GNOME Flashback in Ubuntu 22.04 LTS.md b/published/202205/20220501 How to Install Classic GNOME Flashback in Ubuntu 22.04 LTS.md similarity index 100% rename from published/20220501 How to Install Classic GNOME Flashback in Ubuntu 22.04 LTS.md rename to published/202205/20220501 How to Install Classic GNOME Flashback in Ubuntu 22.04 LTS.md diff --git a/published/20220502 How to make community recognition more inclusive.md b/published/202205/20220502 How to make community recognition more inclusive.md similarity index 100% rename from published/20220502 How to make community recognition more inclusive.md rename to published/202205/20220502 How to make community recognition more inclusive.md diff --git a/published/20220502 Microsoft Joins The Open 3D Foundation For Open Source 3D Development.md b/published/202205/20220502 Microsoft Joins The Open 3D Foundation For Open Source 3D Development.md similarity index 100% rename from published/20220502 Microsoft Joins The Open 3D Foundation For Open Source 3D Development.md rename to published/202205/20220502 Microsoft Joins The Open 3D Foundation For Open Source 3D Development.md diff --git a/published/20220502 Tools You Can Use for the Security Audit of IoT Devices.md b/published/202205/20220502 Tools You Can Use for the Security Audit of IoT Devices.md similarity index 100% rename from published/20220502 Tools You Can Use for the Security Audit of IoT Devices.md rename to published/202205/20220502 Tools You Can Use for the Security Audit of IoT Devices.md diff --git a/published/20220502 Ubuntu’s Unity Desktop Still Lives- Version 7.6 is Available for Testing After 6 Years.md b/published/202205/20220502 Ubuntu’s Unity Desktop Still Lives- Version 7.6 is Available for Testing After 6 Years.md similarity index 100% rename from published/20220502 Ubuntu’s Unity Desktop Still Lives- Version 7.6 is Available for Testing After 6 Years.md rename to published/202205/20220502 Ubuntu’s Unity Desktop Still Lives- Version 7.6 is Available for Testing After 6 Years.md diff --git a/published/20220503 Nvidia Begins To Set The Foundation For Future Open And Parallel Coding.md b/published/202205/20220503 Nvidia Begins To Set The Foundation For Future Open And Parallel Coding.md similarity index 100% rename from published/20220503 Nvidia Begins To Set The Foundation For Future Open And Parallel Coding.md rename to published/202205/20220503 Nvidia Begins To Set The Foundation For Future Open And Parallel Coding.md diff --git a/published/20220503 Package Analysis Examines Packages In Open Source Repositories In Real Time.md b/published/202205/20220503 Package Analysis Examines Packages In Open Source Repositories In Real Time.md similarity index 100% rename from published/20220503 Package Analysis Examines Packages In Open Source Repositories In Real Time.md rename to published/202205/20220503 Package Analysis Examines Packages In Open Source Repositories In Real Time.md diff --git a/published/20220504 ESI Group Collaborates With ENSAM, Open Sources Its “Inspector” Software.md b/published/202205/20220504 ESI Group Collaborates With ENSAM, Open Sources Its “Inspector” Software.md similarity index 100% rename from published/20220504 ESI Group Collaborates With ENSAM, Open Sources Its “Inspector” Software.md rename to published/202205/20220504 ESI Group Collaborates With ENSAM, Open Sources Its “Inspector” Software.md diff --git a/published/20220504 Firefox 100 Marks 17 Years of Development with Interesting Upgrades.md b/published/202205/20220504 Firefox 100 Marks 17 Years of Development with Interesting Upgrades.md similarity index 100% rename from published/20220504 Firefox 100 Marks 17 Years of Development with Interesting Upgrades.md rename to published/202205/20220504 Firefox 100 Marks 17 Years of Development with Interesting Upgrades.md diff --git a/published/20220504 How I manage my own virtual network with ZeroTier.md b/published/202205/20220504 How I manage my own virtual network with ZeroTier.md similarity index 100% rename from published/20220504 How I manage my own virtual network with ZeroTier.md rename to published/202205/20220504 How I manage my own virtual network with ZeroTier.md diff --git a/published/20220504 Microsoft’s 3D Movie Maker, First Released In 1995, Is Now Open Source.md b/published/202205/20220504 Microsoft’s 3D Movie Maker, First Released In 1995, Is Now Open Source.md similarity index 100% rename from published/20220504 Microsoft’s 3D Movie Maker, First Released In 1995, Is Now Open Source.md rename to published/202205/20220504 Microsoft’s 3D Movie Maker, First Released In 1995, Is Now Open Source.md diff --git a/published/20220504 elementary OS 7 Code Name Revealed. Here are the Details.md b/published/202205/20220504 elementary OS 7 Code Name Revealed. Here are the Details.md similarity index 100% rename from published/20220504 elementary OS 7 Code Name Revealed. Here are the Details.md rename to published/202205/20220504 elementary OS 7 Code Name Revealed. Here are the Details.md diff --git a/published/20220505 Experiment with containers and pods on your own computer.md b/published/202205/20220505 Experiment with containers and pods on your own computer.md similarity index 100% rename from published/20220505 Experiment with containers and pods on your own computer.md rename to published/202205/20220505 Experiment with containers and pods on your own computer.md diff --git a/published/20220505 Open Source Developer Creates First-of-its-Kind Fund To Support Maintainers.md b/published/202205/20220505 Open Source Developer Creates First-of-its-Kind Fund To Support Maintainers.md similarity index 100% rename from published/20220505 Open Source Developer Creates First-of-its-Kind Fund To Support Maintainers.md rename to published/202205/20220505 Open Source Developer Creates First-of-its-Kind Fund To Support Maintainers.md diff --git a/published/20220505 Tails 5.0 Release is Based on Debian 11 With a New -Kleopatra- Tool.md b/published/202205/20220505 Tails 5.0 Release is Based on Debian 11 With a New -Kleopatra- Tool.md similarity index 100% rename from published/20220505 Tails 5.0 Release is Based on Debian 11 With a New -Kleopatra- Tool.md rename to published/202205/20220505 Tails 5.0 Release is Based on Debian 11 With a New -Kleopatra- Tool.md diff --git a/published/20220505 Xebian – A Blend of Debian and Goodness of Xfce [Review].md b/published/202205/20220505 Xebian – A Blend of Debian and Goodness of Xfce [Review].md similarity index 100% rename from published/20220505 Xebian – A Blend of Debian and Goodness of Xfce [Review].md rename to published/202205/20220505 Xebian – A Blend of Debian and Goodness of Xfce [Review].md diff --git a/published/20220506 Announcing Fedora Linux 36.md b/published/202205/20220506 Announcing Fedora Linux 36.md similarity index 100% rename from published/20220506 Announcing Fedora Linux 36.md rename to published/202205/20220506 Announcing Fedora Linux 36.md diff --git a/published/20220506 My favorite open source tool for using crontab.md b/published/202205/20220506 My favorite open source tool for using crontab.md similarity index 100% rename from published/20220506 My favorite open source tool for using crontab.md rename to published/202205/20220506 My favorite open source tool for using crontab.md diff --git a/published/20220506 Ubuntu MATE’s Lead Creates a Nifty Tool to Help Install 3rd Party Deb Packages.md b/published/202205/20220506 Ubuntu MATE’s Lead Creates a Nifty Tool to Help Install 3rd Party Deb Packages.md similarity index 100% rename from published/20220506 Ubuntu MATE’s Lead Creates a Nifty Tool to Help Install 3rd Party Deb Packages.md rename to published/202205/20220506 Ubuntu MATE’s Lead Creates a Nifty Tool to Help Install 3rd Party Deb Packages.md diff --git a/published/20220508 How open source leads the way for sustainable technology.md b/published/202205/20220508 How open source leads the way for sustainable technology.md similarity index 100% rename from published/20220508 How open source leads the way for sustainable technology.md rename to published/202205/20220508 How open source leads the way for sustainable technology.md diff --git a/published/20220509 PyCaret- Machine Learning Model Development Made Easy.md b/published/202205/20220509 PyCaret- Machine Learning Model Development Made Easy.md similarity index 100% rename from published/20220509 PyCaret- Machine Learning Model Development Made Easy.md rename to published/202205/20220509 PyCaret- Machine Learning Model Development Made Easy.md diff --git a/published/20220510 Can’t Run AppImage on Ubuntu 22.04- Here’s How to Fix it.md b/published/202205/20220510 Can’t Run AppImage on Ubuntu 22.04- Here’s How to Fix it.md similarity index 100% rename from published/20220510 Can’t Run AppImage on Ubuntu 22.04- Here’s How to Fix it.md rename to published/202205/20220510 Can’t Run AppImage on Ubuntu 22.04- Here’s How to Fix it.md diff --git a/published/20220510 HydraPaper- A Wallpaper Manager for Linux with Multi-Monitor Support.md b/published/202205/20220510 HydraPaper- A Wallpaper Manager for Linux with Multi-Monitor Support.md similarity index 100% rename from published/20220510 HydraPaper- A Wallpaper Manager for Linux with Multi-Monitor Support.md rename to published/202205/20220510 HydraPaper- A Wallpaper Manager for Linux with Multi-Monitor Support.md diff --git a/published/20220511 Good News! Docker Desktop is Now Here for Linux Users.md b/published/202205/20220511 Good News! Docker Desktop is Now Here for Linux Users.md similarity index 100% rename from published/20220511 Good News! Docker Desktop is Now Here for Linux Users.md rename to published/202205/20220511 Good News! Docker Desktop is Now Here for Linux Users.md diff --git a/published/20220511 How to Install Fedora 36 Workstation Step by Step.md b/published/202205/20220511 How to Install Fedora 36 Workstation Step by Step.md similarity index 100% rename from published/20220511 How to Install Fedora 36 Workstation Step by Step.md rename to published/202205/20220511 How to Install Fedora 36 Workstation Step by Step.md diff --git a/published/20220511 Red Hat Enterprise Linux 9 Announced as the Next-Gen Backbone of Enterprise IT.md b/published/202205/20220511 Red Hat Enterprise Linux 9 Announced as the Next-Gen Backbone of Enterprise IT.md similarity index 100% rename from published/20220511 Red Hat Enterprise Linux 9 Announced as the Next-Gen Backbone of Enterprise IT.md rename to published/202205/20220511 Red Hat Enterprise Linux 9 Announced as the Next-Gen Backbone of Enterprise IT.md diff --git a/published/20220512 5 reasons to use sudo on Linux.md b/published/202205/20220512 5 reasons to use sudo on Linux.md similarity index 100% rename from published/20220512 5 reasons to use sudo on Linux.md rename to published/202205/20220512 5 reasons to use sudo on Linux.md diff --git a/published/20220512 NVIDIA Takes a Big Step to Improve its GPU Experience on Linux.md b/published/202205/20220512 NVIDIA Takes a Big Step to Improve its GPU Experience on Linux.md similarity index 100% rename from published/20220512 NVIDIA Takes a Big Step to Improve its GPU Experience on Linux.md rename to published/202205/20220512 NVIDIA Takes a Big Step to Improve its GPU Experience on Linux.md diff --git a/published/20220514 How To Enable Minimize And Maximize Buttons In Fedora 36 Workstation.md b/published/202205/20220514 How To Enable Minimize And Maximize Buttons In Fedora 36 Workstation.md similarity index 100% rename from published/20220514 How To Enable Minimize And Maximize Buttons In Fedora 36 Workstation.md rename to published/202205/20220514 How To Enable Minimize And Maximize Buttons In Fedora 36 Workstation.md diff --git a/published/20220514 How To Install Multimedia Codecs In Fedora Linux.md b/published/202205/20220514 How To Install Multimedia Codecs In Fedora Linux.md similarity index 100% rename from published/20220514 How To Install Multimedia Codecs In Fedora Linux.md rename to published/202205/20220514 How To Install Multimedia Codecs In Fedora Linux.md diff --git a/published/20220516 Fudgie- The Awesome Budgie Desktop is Coming to Fedora Linux Soon.md b/published/202205/20220516 Fudgie- The Awesome Budgie Desktop is Coming to Fedora Linux Soon.md similarity index 100% rename from published/20220516 Fudgie- The Awesome Budgie Desktop is Coming to Fedora Linux Soon.md rename to published/202205/20220516 Fudgie- The Awesome Budgie Desktop is Coming to Fedora Linux Soon.md diff --git a/published/20220516 How To Reset Root Password In Fedora 36.md b/published/202205/20220516 How To Reset Root Password In Fedora 36.md similarity index 100% rename from published/20220516 How To Reset Root Password In Fedora 36.md rename to published/202205/20220516 How To Reset Root Password In Fedora 36.md diff --git a/published/20220516 Microsoft has another Linux distribution and it is based on Debian.md b/published/202205/20220516 Microsoft has another Linux distribution and it is based on Debian.md similarity index 100% rename from published/20220516 Microsoft has another Linux distribution and it is based on Debian.md rename to published/202205/20220516 Microsoft has another Linux distribution and it is based on Debian.md diff --git a/published/20220516 Structured Data Processing with Spark SQL.md b/published/202205/20220516 Structured Data Processing with Spark SQL.md similarity index 100% rename from published/20220516 Structured Data Processing with Spark SQL.md rename to published/202205/20220516 Structured Data Processing with Spark SQL.md diff --git a/published/20220517 Adobe Illustrator Alternative Inkscape Releases Version 1.2.md b/published/202205/20220517 Adobe Illustrator Alternative Inkscape Releases Version 1.2.md similarity index 100% rename from published/20220517 Adobe Illustrator Alternative Inkscape Releases Version 1.2.md rename to published/202205/20220517 Adobe Illustrator Alternative Inkscape Releases Version 1.2.md diff --git a/published/20220517 Kali Linux 2022.2 Release Adds an Amusing New Feature for the Hackers to Scare People.md b/published/202205/20220517 Kali Linux 2022.2 Release Adds an Amusing New Feature for the Hackers to Scare People.md similarity index 100% rename from published/20220517 Kali Linux 2022.2 Release Adds an Amusing New Feature for the Hackers to Scare People.md rename to published/202205/20220517 Kali Linux 2022.2 Release Adds an Amusing New Feature for the Hackers to Scare People.md diff --git a/published/20220518 Five common mistakes when using automation.md b/published/202205/20220518 Five common mistakes when using automation.md similarity index 100% rename from published/20220518 Five common mistakes when using automation.md rename to published/202205/20220518 Five common mistakes when using automation.md diff --git a/published/20220518 Google To Start Distributing A Collection Of Open Source Software libraries.md b/published/202205/20220518 Google To Start Distributing A Collection Of Open Source Software libraries.md similarity index 100% rename from published/20220518 Google To Start Distributing A Collection Of Open Source Software libraries.md rename to published/202205/20220518 Google To Start Distributing A Collection Of Open Source Software libraries.md diff --git a/published/20220518 How To Reset Sudo Password In Ubuntu 22.04 - 20.04 LTS.md b/published/202205/20220518 How To Reset Sudo Password In Ubuntu 22.04 - 20.04 LTS.md similarity index 100% rename from published/20220518 How To Reset Sudo Password In Ubuntu 22.04 - 20.04 LTS.md rename to published/202205/20220518 How To Reset Sudo Password In Ubuntu 22.04 - 20.04 LTS.md diff --git a/published/20220518 ONLYOFFICE 7.1 Release Adds ARM Compatibility, a New PDF Viewer, and More Features.md b/published/202205/20220518 ONLYOFFICE 7.1 Release Adds ARM Compatibility, a New PDF Viewer, and More Features.md similarity index 100% rename from published/20220518 ONLYOFFICE 7.1 Release Adds ARM Compatibility, a New PDF Viewer, and More Features.md rename to published/202205/20220518 ONLYOFFICE 7.1 Release Adds ARM Compatibility, a New PDF Viewer, and More Features.md diff --git a/published/20220519 How To Enable Activate Linux Watermark Notification In Linux Desktop.md b/published/202205/20220519 How To Enable Activate Linux Watermark Notification In Linux Desktop.md similarity index 100% rename from published/20220519 How To Enable Activate Linux Watermark Notification In Linux Desktop.md rename to published/202205/20220519 How To Enable Activate Linux Watermark Notification In Linux Desktop.md diff --git a/published/20220520 A programmer-s guide to GNU C Compiler.md b/published/202205/20220520 A programmer-s guide to GNU C Compiler.md similarity index 100% rename from published/20220520 A programmer-s guide to GNU C Compiler.md rename to published/202205/20220520 A programmer-s guide to GNU C Compiler.md diff --git a/published/20220520 Customize GNOME 42 with A Polished Look.md b/published/202205/20220520 Customize GNOME 42 with A Polished Look.md similarity index 100% rename from published/20220520 Customize GNOME 42 with A Polished Look.md rename to published/202205/20220520 Customize GNOME 42 with A Polished Look.md diff --git a/published/20220520 How to rename a branch, delete a branch, and find the author of a branch in Git.md b/published/202205/20220520 How to rename a branch, delete a branch, and find the author of a branch in Git.md similarity index 100% rename from published/20220520 How to rename a branch, delete a branch, and find the author of a branch in Git.md rename to published/202205/20220520 How to rename a branch, delete a branch, and find the author of a branch in Git.md diff --git a/published/20220521 FSF Does Not Accept Debian as a Free Distribution. Here-s Why!.md b/published/202205/20220521 FSF Does Not Accept Debian as a Free Distribution. Here-s Why!.md similarity index 100% rename from published/20220521 FSF Does Not Accept Debian as a Free Distribution. Here-s Why!.md rename to published/202205/20220521 FSF Does Not Accept Debian as a Free Distribution. Here-s Why!.md diff --git a/published/20220523 DAML- The Programming Language for Smart Contracts in a Blockchain.md b/published/202205/20220523 DAML- The Programming Language for Smart Contracts in a Blockchain.md similarity index 100% rename from published/20220523 DAML- The Programming Language for Smart Contracts in a Blockchain.md rename to published/202205/20220523 DAML- The Programming Language for Smart Contracts in a Blockchain.md diff --git a/published/20220523 Linux Kernel 5.18 Released with Graphics Driver Changes and New Hardware Support.md b/published/202205/20220523 Linux Kernel 5.18 Released with Graphics Driver Changes and New Hardware Support.md similarity index 100% rename from published/20220523 Linux Kernel 5.18 Released with Graphics Driver Changes and New Hardware Support.md rename to published/202205/20220523 Linux Kernel 5.18 Released with Graphics Driver Changes and New Hardware Support.md diff --git a/published/20220523 System76 Collaborates with HP for a Powerful Linux Laptop for Developers.md b/published/202205/20220523 System76 Collaborates with HP for a Powerful Linux Laptop for Developers.md similarity index 100% rename from published/20220523 System76 Collaborates with HP for a Powerful Linux Laptop for Developers.md rename to published/202205/20220523 System76 Collaborates with HP for a Powerful Linux Laptop for Developers.md diff --git a/published/20220525 ProtonMail is Now Just -Proton- Offering a Privacy Ecosystem.md b/published/202205/20220525 ProtonMail is Now Just -Proton- Offering a Privacy Ecosystem.md similarity index 100% rename from published/20220525 ProtonMail is Now Just -Proton- Offering a Privacy Ecosystem.md rename to published/202205/20220525 ProtonMail is Now Just -Proton- Offering a Privacy Ecosystem.md diff --git a/published/20220526 DeepMind-s Open Source MuJoCo Is Available On GitHub.md b/published/202205/20220526 DeepMind-s Open Source MuJoCo Is Available On GitHub.md similarity index 100% rename from published/20220526 DeepMind-s Open Source MuJoCo Is Available On GitHub.md rename to published/202205/20220526 DeepMind-s Open Source MuJoCo Is Available On GitHub.md diff --git a/published/20220526 Plex Desktop Player is Now Available for Linux.md b/published/202205/20220526 Plex Desktop Player is Now Available for Linux.md similarity index 100% rename from published/20220526 Plex Desktop Player is Now Available for Linux.md rename to published/202205/20220526 Plex Desktop Player is Now Available for Linux.md diff --git a/published/20220527 AlmaLinux Continues the Legacy of CentOS with the Release of Version 9.md b/published/202205/20220527 AlmaLinux Continues the Legacy of CentOS with the Release of Version 9.md similarity index 100% rename from published/20220527 AlmaLinux Continues the Legacy of CentOS with the Release of Version 9.md rename to published/202205/20220527 AlmaLinux Continues the Legacy of CentOS with the Release of Version 9.md diff --git a/published/20220527 Tails Linux Users Warned Against Using the Tor Browser- Here-s why!.md b/published/202205/20220527 Tails Linux Users Warned Against Using the Tor Browser- Here-s why!.md similarity index 100% rename from published/20220527 Tails Linux Users Warned Against Using the Tor Browser- Here-s why!.md rename to published/202205/20220527 Tails Linux Users Warned Against Using the Tor Browser- Here-s why!.md From 129a2e202fda4dd34b71c9a83b6266274031a6e9 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 1 Jun 2022 00:35:29 +0800 Subject: [PATCH 086/104] =?UTF-8?q?=E6=B8=85=E9=99=A4=E8=BF=87=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 另外 VPN 内容尽量不涉及。 @lkxed --- ...Offers a Full-fledged GUI App for Linux.md | 82 ------------------- ...om Could Acquire VMware for $60 Billion.md | 63 -------------- 2 files changed, 145 deletions(-) delete mode 100644 sources/news/20220530 Surfshark VPN Now Offers a Full-fledged GUI App for Linux.md delete mode 100644 translated/news/20220524 Woah! Broadcom Could Acquire VMware for $60 Billion.md diff --git a/sources/news/20220530 Surfshark VPN Now Offers a Full-fledged GUI App for Linux.md b/sources/news/20220530 Surfshark VPN Now Offers a Full-fledged GUI App for Linux.md deleted file mode 100644 index cb956a1c46..0000000000 --- a/sources/news/20220530 Surfshark VPN Now Offers a Full-fledged GUI App for Linux.md +++ /dev/null @@ -1,82 +0,0 @@ -[#]: subject: "Surfshark VPN Now Offers a Full-fledged GUI App for Linux" -[#]: via: "https://news.itsfoss.com/surfshark-vpn-gui-linux/" -[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" -[#]: collector: "lkxed" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Surfshark VPN Now Offers a Full-fledged GUI App for Linux -====== -Surfshark VPN releases a fully functional GUI app for Linux users with several essential features. - -![surfshark][1] - -With VPN providers, it is often important to look for Linux support. - -Some VPN services only provide you with OpenVPN configuration, and others offer a CLI app. - -ProtonVPN, Mullvad, and a handful of [other providers][2] provide a full-fledged GUI app for Linux. - -And, [Surfshark VPN][3] (popular for its incredibly cheap deals) is joining the game with a good-looking graphical user interface. - -### Surfshark VPN: A Linux App is Always a Good Addition - -![The best VPN for Linux is here!][4] - -**Note:** Surfshark VPN is not open-source. We cover it here as an option available for Linux. - -Previously, with [Surfshark][5] on Linux, users had to utilize the terminal to initiate connections and manage the app. - -Overall, it wasn’t all convenient and limited to a few options. So, they finally launched a GUI app to make things straightforward for Linux users. - -Even though you should find more features with the GUI app, there are still a few things that you cannot do with the new app. Surfshark mentions that they will be addressing those in the near future. - -Some accessible features with the new GUI app include: - -* Setting favorite servers. -* Viewing recently used ones. -* Accessing MultiHop and static options. -* Beautiful VPN state transitions and graceful error handling. -* WireGuard support. -* Adblocker. -* Dark mode. - -In addition to the essentials, it also supports a system tray icon that many users should find useful. - -![][6] - -Abilities like auto-connect and the kill-switch aren’t present at the moment. But, you can expect it in the near future. - -### Install Surfshark VPN on Linux - -Surfshark officially supports Ubuntu, Debian, and Linux Mint. You can easily install the deb file for these Linux distros from the official website to get started. Refer to the [methods to install deb files][7], if you need help. - -If you prefer the terminal, you can also follow some official instructions on its download page to install the package. - -In case you haven’t tried Surfshark previously, they offer a 30-day money-back guarantee. So, it should be a hassle-free way to try it out if you’re not sure. - -[Surfshark VPN][8] - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/surfshark-vpn-gui-linux/ - -作者:[Ankush Das][a] -选题:[lkxed][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://news.itsfoss.com/author/ankush/ -[b]: https://github.com/lkxed -[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/surfshark.jpg -[2]: https://itsfoss.com/best-vpn-linux -[3]: https://get.surfshark.net/aff_c?offer_id=926&aff_id=13591 -[4]: https://youtu.be/JrmOUkORZRI -[5]: https://get.surfshark.net/aff_c?offer_id=926&aff_id=13591 -[6]: https://news.itsfoss.com/wp-content/uploads/2022/05/surfshark-system-tray-indicator.jpg -[7]: https://itsfoss.com/install-deb-files-ubuntu/ -[8]: https://get.surfshark.net/aff_c?offer_id=926&aff_id=13591 diff --git a/translated/news/20220524 Woah! Broadcom Could Acquire VMware for $60 Billion.md b/translated/news/20220524 Woah! Broadcom Could Acquire VMware for $60 Billion.md deleted file mode 100644 index 7c1faf0c04..0000000000 --- a/translated/news/20220524 Woah! Broadcom Could Acquire VMware for $60 Billion.md +++ /dev/null @@ -1,63 +0,0 @@ -[#]: subject: "Woah! Broadcom Could Acquire VMware for $60 Billion" -[#]: via: "https://news.itsfoss.com/broadcom-vmware-deal/" -[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" -[#]: collector: "lkxed" -[#]: translator: "lkxed" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -震惊!博通或以 600 亿美元收购 VMware -====== -Broadcom’s interested to acquire VMware for $60 billion, making it one of the biggest tech deals in 2022. -博通有意以 600 亿美元收购 VMware,这或将成为 2022 年最大的科技交易之一。 - -![博通][1] - -博通Broadcom 是一家半导体芯片公司,其无线适配器/无线网卡和驱动程序的不兼容问题,使得它在桌面 Linux 用户中臭名昭著。 - -现在,它正计划通过收购业内最大的参与者之一,也就是 **VMware**,来进入云计算市场。 - -VMware 不是一家开源公司,但它为其虚拟化软件提供了一些开源工具和 Linux 支持。 - -据 **《华尔街日报》** [报道][2],博通和 VMware 可能会在本周四(5 月 26 日)的晚些时候宣布此次收购。(LCTT 译注:抱歉,我们来晚了……) - -### 博通进军云计算市场 - -当谈到无线网络芯片及其驱动程序时,[博通][3] 应该是一个 Linux 用户熟悉的名称。 - -现在,若能以 600 亿美元交易收购 [VMware][4],他们就可以借助 VMware 在云计算领域的影响力,来扩大自身在该行业的影响力。 - -因此,他们的决定也会影响有关博通收购的讨论。 - -可以肯定地说,如果讨论的意见不一,这笔交易就不一定能继续进行下去了。 - -为了能够成功支付(这笔巨款),该报告还提到博通计划接受银行提供的 400 亿美元的债务帮助。 - -考虑到该报告提到最终价格仍有待讨论,600 亿美元的价值可能会发生变化(但不会太大)。(LCTT 译注:最新的数字是 610 亿美元,该收购预计要到 2023 年才能完成。) - -### 说在最后 - -如果你有兴趣踏入股市,(这段时间)你可以关注一下 VMware 的股票和博通公司(的动态)。 - -你怎么看待博通收购 VMware 这件事呢?你认为它最后的结局会是戴尔成为公司的大股东吗?(LCTT 译注:这里的关系有点复杂,简单来说,VMware 曾经是 EMC 的子公司,后来戴尔收购了 EMC,再后来 VMware 独立。) - -有任何想法,都请在下面的评论中分享吧! - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/broadcom-vmware-deal/ - -作者:[Ankush Das][a] -选题:[lkxed][b] -译者:[lkxed](https://github.com/lkxed) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://news.itsfoss.com/author/ankush/ -[b]: https://github.com/lkxed -[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/broadcom-vmware-acquisition.jpg -[2]: https://www.wsj.com/articles/broadcom-discussing-paying-around-140-a-share-for-vmware-people-say-11653334946 -[3]: https://www.broadcom.com/ -[4]: https://www.vmware.com/i From 85a670272d6f93f18c9ceb05c6e988ac691b498a Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 1 Jun 2022 08:15:35 +0800 Subject: [PATCH 087/104] translated --- ...and Apps From Source [Beginner-s Guide].md | 168 ------------------ ...and Apps From Source [Beginner-s Guide].md | 168 ++++++++++++++++++ 2 files changed, 168 insertions(+), 168 deletions(-) delete mode 100644 sources/tech/20220529 Compile GNOME Shell and Apps From Source [Beginner-s Guide].md create mode 100644 translated/tech/20220529 Compile GNOME Shell and Apps From Source [Beginner-s Guide].md diff --git a/sources/tech/20220529 Compile GNOME Shell and Apps From Source [Beginner-s Guide].md b/sources/tech/20220529 Compile GNOME Shell and Apps From Source [Beginner-s Guide].md deleted file mode 100644 index 6d8cf31684..0000000000 --- a/sources/tech/20220529 Compile GNOME Shell and Apps From Source [Beginner-s Guide].md +++ /dev/null @@ -1,168 +0,0 @@ -[#]: subject: "Compile GNOME Shell and Apps From Source [Beginner’s Guide]" -[#]: via: "https://www.debugpoint.com/2022/05/compile-gnome-source/" -[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" -[#]: collector: "lkxed" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Compile GNOME Shell and Apps From Source [Beginner’s Guide] -====== -Here’s a quick guide for you on how to compile GNOME from its source, including the shell, mutter and some native apps. - -Before you compile, you need to make sure certain things because the following compilation is directly from the master branch in GitLab, which contains some development packages. - -In general, you can compile in any Linux distribution of your choice. But I would recommend using Fedora Rawhide which is the development branch of Fedora, for future releases. - -Also, do not try this in a stable system. Because things may go wrong, you may end up with a broken system. - -To summarize, you need the following to compile GNOME from the source. - -* A test setup ([Virtual machine][1] or a test system) -* Fedora Rawhide Distro (recommended. [Download from here][2]) -* Make sure your distro is up to date. -* And you are logged in to an X.Org session. - -I would not recommend compiling in the Wayland session because you will run into problems. - -### Compile GNOME from the Source - -The GNOME desktop is a collection of packages based on their functions. The desktop component of a Linux distribution works under a window manager and shell. - -So for GNOME, I will first compile mutter – the window manager for GNOME Shell. And then followed by the compilation of GNOME Shell. Finally, I will compile some native apps. - -I will use the meson build system for compilation. The meson is a beautiful build system which is fast and user friendly. - -#### Compile Mutter - -Open a terminal and install the required packages for GNOME Shell and mutter. - -``` -sudo dnf build-dep mutter gnome-shell -``` - -Create a demo directory in your home drive (or anywhere you want). - -``` -cd ~ -``` - -``` -mkdir demo -``` - -``` -cd demo -``` - -Clone the mutter master branch from GitLab. - -git clone https://gitlab.gnome.org/GNOME/mutter - -Go to the cloning directory and use the below meson command to prepare the build files. By default, meson uses `/usr/local` for building files. However, you can also use prefix switch to redirect the output to a specific folder (shown below). - -``` -cd mutter -``` - -``` -meson _build --prefix=/usr -``` - -![Compile Mutter for GNOME][3] - -Install mutter in your system when the build is complete using the below command. - -``` -sudo ninja install -C _build -``` - -#### Compile GNOME Shell - -The compilation of GNOME Shell and other packages are similar. First, clone the GNOME Shell master repository from GitLab, then build and install. You can follow the below commands in sequence. - -There are two dependencies which you need for GNOME Shell. They are [asciidoc][4] and [sassc][5]. Install them before you build GNOME Shell. - -``` -sudo dnf install asciidoc -``` - -``` -sudo dnf install sassc -``` - -After installing these dependencies, follow the below commands to build and install GNOME Shell. Make sure you go back to the `demo` folder (which I created in the first step) before running this command. - -``` -git clone https://gitlab.gnome.org/GNOME/gnome-shellcd gnome-shellmeson _build --prefix=/usrsudo ninja install -C _build -``` - -### Running the GNOME Shell - -After you finish compiling, you can try restarting the GNOME Shell to see the changes from the master branch. - -Before you restart, as I mentioned earlier, make sure you are in the X.Org session. Press `ALT+F2` and type `r`. Then press enter. This command will restart GNOME Shell. - -![Restart GNOME Shell (X11)][6] - -And congratulations! You have successfully compiled GNOME Shell and Mutter. - -Now, it’s time to compile some sample GNOME native applications. - -### Compile GNOME Native Applications - -The steps are the same for all sources of GNOME or any applications. You need to change the repo name. So, here are some sample commands to compile necessary GNOME native apps. - -#### Files (Nautilus) - -``` -git clone https://gitlab.gnome.org/GNOME/nautilus/cd gnome-shellmeson _build --prefix=/usrsudo ninja install -C _build -``` - -#### GNOME Software - -``` -git clone https://gitlab.gnome.org/GNOME/gnome-software/cd gnome-shellmeson _build --prefix=/usrsudo ninja install -C _build -``` - -#### GNOME Control Center - -``` -git clone https://gitlab.gnome.org/GNOME/gnome-control-center/cd gnome-shellmeson _build --prefix=/usrsudo ninja install -C _build -``` - -### FAQ - -1. Using the above steps, you can compile any source branch. Not only GNOME. -2. The GitLab server is sometimes slow, and it may take a longer time to clone a repo. If the `git clone` fails, I would recommend you to try again. - -### Closing Notes - -I hope this little advanced tutorial helps you try out new GNOME features before they land in GNOME nightly OS. Since you compiled, you may also contribute to testing new GNOME features and report any bugs or problems on the GitLab Issues page for specific packages. - -This article is the first instalment of the open-source app compilation series. Stay tuned for more compilation articles of more open-source apps. - -Also, do let me know your comments, suggestions, or any error you faced using these instructions in the comment box. - -Cheers. - --------------------------------------------------------------------------------- - -via: https://www.debugpoint.com/2022/05/compile-gnome-source/ - -作者:[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/tag/virtual-machine -[2]: https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Workstation/x86_64/iso/ -[3]: https://www.debugpoint.com/wp-content/uploads/2022/05/Compile-Mutter-for-GNOME.jpg -[4]: https://asciidoc.org/ -[5]: https://github.com/sass/sassc -[6]: https://www.debugpoint.com/wp-content/uploads/2022/05/Restart-GNOME-Shell-X11.jpg diff --git a/translated/tech/20220529 Compile GNOME Shell and Apps From Source [Beginner-s Guide].md b/translated/tech/20220529 Compile GNOME Shell and Apps From Source [Beginner-s Guide].md new file mode 100644 index 0000000000..aa47c84a31 --- /dev/null +++ b/translated/tech/20220529 Compile GNOME Shell and Apps From Source [Beginner-s Guide].md @@ -0,0 +1,168 @@ +[#]: subject: "Compile GNOME Shell and Apps From Source [Beginner’s Guide]" +[#]: via: "https://www.debugpoint.com/2022/05/compile-gnome-source/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +从源码编译 Gnome Shell 和应用(初学者指南) +====== +这是你如何从其来源码编译 GNOME 的快速指南,包括 shell,mutter 和一些原生应用。 + +在编译之前,你需要确保一些事情,因为以下编译直接来自 Gitlab 的主分支,其中包含一些开发包。 + +通常,你可以选择在任何 Linux 分发中编译。但是我建议使用 Fedora Rawhide(Fedora 的开发分支,即未来版本)。 + +另外,请勿在稳定系统中尝试此操作。因为操作可能出错,所以你可能最终得到损坏的系统。 + +总而言之,你需要以下内容来从源码编译 Gnome。 + +* 测试设置([虚拟机][1]或测试系统)。 +* Fedora Rawhide 发行版(推荐,[从此处下载][2])。 +* 确保你的发行版是最新的。 +* 你已登录 X.org 会话。 + +我不建议你在 Wayland 会话中进行编译,因为你会遇到问题。 + +### 从源码编译 Gnome + +Gnome 桌面是基于其功能的软件包集合。Linux 发行版的桌面组件在窗口管理器和 shell 下工作。 + +因此,对于 Gnome,我将首先编译 mutter – Gnome Shell 的窗口管理。然后进行 Gnome Shell 的编译。最后,我将编译一些原生应用。 + +我将使用 meson 构建系统进行编译。meson 是一个美丽的构建系统,快速且用户友好。 + +#### 编译 Mutter + +打开终端并安装需要的 GNOME Shell 和 mutter。 + +``` +sudo dnf build-dep mutter gnome-shell +``` + +在主目录(或你想要的任何地方)中创建演示目录。 + +``` +cd ~ +``` + +``` +mkdir demo +``` + +``` +cd demo +``` + +从 Gitlab 克隆 mutter 的主分支。 + +git clone https://gitlab.gnome.org/GNOME/mutter + +进入克隆目录,然后使用以下 meson 命令来准备构建文件。默认情况下,Meson 使用 `/usr/local` 用于构建文件。但是,你也可以使用前缀开关将输出重定向到特定文件夹(如下所示)。 + +``` +cd mutter +``` + +``` +meson _build --prefix=/usr +``` + +![Compile Mutter for GNOME][3] + +使用以下命令在构建完成时,将 mutter 安装在到系统中。 + +``` +sudo ninja install -C _build +``` + +#### 编译 GNOME Shell + +GNOME Shell 和其他软件包的编译方法类似。首先,从 GitLab 克隆 GNOME Shell 主仓库,然后进行编译和安装。你可以按照下面的命令依次进行。 + +在 GNOME Shell 中,你需要两个依赖项。它们是 [asciidoc][4] 和 [sassc][5] 。请在构建 GNOME Shell 之前安装它们。 + +``` +sudo dnf install asciidoc +``` + +``` +sudo dnf install sassc +``` + +安装完这些依赖项后,按照下面的命令来构建和安装 GNOME Shell。在运行这个命令之前,请确保你回到 `demo` 文件夹(我在第一步创建的)。 + +``` +git clone https://gitlab.gnome.org/GNOME/gnome-shellcd gnome-shellmeson _build --prefix=/usrsudo ninja install -C _build +``` + +### 运行 GNOME Shell + +编译完成后,你可以尝试重新启动 GNOME Shell 来查看主分支的变化。 + +在重启之前,正如我之前提到的,确保你处于 X.Org 会话中。按 `ALT+F2` 并输入 `r`。然后按回车键。这个命令将重启 GNOME Shell。 + +![Restart GNOME Shell (X11)][6] + +恭喜你! 你已经成功地编译了 GNOME Shell 和 Mutter。 + +现在,是时候编译一些 GNOME 原生应用了。 + +### 编译 GNOME 原生应用 + +这些步骤对于 GNOME 或任何应用的所有源码都是一样的。你需要改变仓库的名字。因此,这里有一些编译必要的 GNOME 原生应用的命令示例。 + +#### Files(Nautilus) + +``` +git clone https://gitlab.gnome.org/GNOME/nautilus/cd gnome-shellmeson _build --prefix=/usrsudo ninja install -C _build +``` + +#### GNOME 软件 + +``` +git clone https://gitlab.gnome.org/GNOME/gnome-software/cd gnome-shellmeson _build --prefix=/usrsudo ninja install -C _build +``` + +#### GNOME 控制中心 + +``` +git clone https://gitlab.gnome.org/GNOME/gnome-control-center/cd gnome-shellmeson _build --prefix=/usrsudo ninja install -C _build +``` + +### FAQ + +1. 使用上述步骤,你可以编译任何源码分支。不仅仅是 GNOME。 +2. GitLab 服务器有时很慢,克隆一个仓库可能需要较长的时间。如果 `git clone` 失败,我建议你再试一次。 + +### 结束语 + +我希望这个小小的高级教程能够帮助你在 GNOME 每日构建系统出现之前尝试新的 GNOME 功能。既然你编译了,你也可以为测试新的 GNOME 功能做出贡献,并在 GitLab 问题页面上报告任何特定包的 bug 或问题。 + +这篇文章是开源应用编译系列的第一篇文章。请继续关注更多开源应用的编译文章。 + +另外,请让我在下面的评论栏中知道你的评论、建议,或者你在使用这些说明时遇到的任何错误。 + +干杯。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/05/compile-gnome-source/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者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/tag/virtual-machine +[2]: https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Workstation/x86_64/iso/ +[3]: https://www.debugpoint.com/wp-content/uploads/2022/05/Compile-Mutter-for-GNOME.jpg +[4]: https://asciidoc.org/ +[5]: https://github.com/sass/sassc +[6]: https://www.debugpoint.com/wp-content/uploads/2022/05/Restart-GNOME-Shell-X11.jpg From 47fd76a9c81af341b6907035ed7bae85f246228f Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 1 Jun 2022 08:17:02 +0800 Subject: [PATCH 088/104] translating --- ...220530 Dynamically linking libraries while compiling code.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20220530 Dynamically linking libraries while compiling code.md b/sources/tech/20220530 Dynamically linking libraries while compiling code.md index a180a71852..b4192ccfa2 100644 --- a/sources/tech/20220530 Dynamically linking libraries while compiling code.md +++ b/sources/tech/20220530 Dynamically linking libraries while compiling code.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/22/5/compile-code-ldlibrarypath" [#]: author: "Seth Kenlon https://opensource.com/users/seth" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 6697d0bce02a013b3cc33290d247c623f3d4f699 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E4=B8=80=E5=AE=89?= Date: Wed, 1 Jun 2022 08:48:51 +0800 Subject: [PATCH 089/104] add --- ...How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sources/tech/20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md b/sources/tech/20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md index 4541dd1935..054d9168f4 100644 --- a/sources/tech/20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md +++ b/sources/tech/20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md @@ -137,12 +137,11 @@ network:   version: 2 ``` -save and exit the file. +保存并推出文件。 -Note: These details as per my setup, so replace the IP address entries, interface name and mac address as per your setup. - -To apply above change, run ‘netplan apply’ +注:上述文件的配置是我环境中的,请根据您实际环境替换 IP 地址、网口名称以及mac地址。 +您可以通过运行 ‘netplan apply’命令应用上述变更。T ``` $ sudo netplan apply ``` From 34973a4b8df75ec7189357d3b804b62d3d734350 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 1 Jun 2022 09:41:42 +0800 Subject: [PATCH 090/104] RP @lkxed https://linux.cn/article-14660-1.html --- ...dless CMS -Payload- Becomes Open Source.md | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) rename {translated/news => published}/20220527 TypeScript Based Headless CMS -Payload- Becomes Open Source.md (75%) diff --git a/translated/news/20220527 TypeScript Based Headless CMS -Payload- Becomes Open Source.md b/published/20220527 TypeScript Based Headless CMS -Payload- Becomes Open Source.md similarity index 75% rename from translated/news/20220527 TypeScript Based Headless CMS -Payload- Becomes Open Source.md rename to published/20220527 TypeScript Based Headless CMS -Payload- Becomes Open Source.md index 9ea9847477..6e41f831e1 100644 --- a/translated/news/20220527 TypeScript Based Headless CMS -Payload- Becomes Open Source.md +++ b/published/20220527 TypeScript Based Headless CMS -Payload- Becomes Open Source.md @@ -3,19 +3,20 @@ [#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/" [#]: collector: "lkxed" [#]: translator: "lkxed" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14660-1.html" -基于 TypeScript 的 无头内容管理系统 “Payload” 现已开源 +基于 TypeScript 的无头内容管理系统 “Payload” 现已开源 ====== -开源的无头Headless内容管理系统(CMS)列表中添加了一个新选项。它会是一个更好的无头 WordPress 替代品吗? + +> 开源的无头Headless内容管理系统(CMS)列表中添加了一个新选项。它会是一个更好的无头 WordPress 替代品吗? ![Payload][1] -自从一年多前发布首个 beta 版本以来,Payload 已经逐渐在 Web 开发社区中,作为无头内容管理系统 (CMS) 给人们留下了深刻印象。先做一些背景介绍,Payload 是专门为更简单地开发网站、Web 应用或原生native应用而量身定制的内容管理系统。 +自从一年多前发布首个测试版以来,作为无头内容管理系统(CMS),Payload 已经逐渐在 Web 开发社区中给人们留下了深刻印象。先做一些背景介绍,Payload 是专门为更简单地开发网站、Web 应用或原生native应用而量身定制的内容管理系统。 -最近,他们决定完全开源,现在,它已跻身 [可用的最佳开源内容管理系统][2]。 +最近,他们决定完全开源,现在,它已跻身 [可用的最佳开源内容管理系统][2] 之一。 然而,这也带来了一些问题:他们会采用怎么样的商业模式?Payload 内容管理系统的计划是什么?下面,就让我们简要地看一下吧! @@ -24,7 +25,8 @@ 自 2021 年首次发布以来,Payload 已经收到了来自开源社区的许多贡献。正如 Payload 在他们 [最近的公告][3] 中所说,开源是一个重要的决定,它能够使项目能够达到的更高的高度,这是闭门造车做不到的。 ![][4] -此外,这种开放性通常会增加开发者社区的信任。这种信任也会延伸到商业,自然而然地转向开发者最支持、最信任的平台。 + +此外,这种开放性通常会增加开发者社区的信任。这种信任也会延伸到商业,自然而然地转而成为开发者最支持、最信任的平台。 因此,Payload 正在切换到 MIT 许可证。这将允许任何人免费且不受限制地修改、分发和使用 Payload。 @@ -32,7 +34,7 @@ ### Payload 将如何盈利? -与往常一样,Payload 需要一些财务支持才能维持运营。团队拿出了一个由两部分组成的计划,该计划既要为用户提供更多以便利为中心convenience-focused的功能,又要为自托管self-hosted客户提供难以置信的灵活性。 +与往常一样,Payload 需要一些财务支持才能维持运营。团队拿出了一个由两部分组成的计划,该计划既要为用户提供更多 以便利为中心convenience-focused 的功能,又要为 自托管self-hosted 客户提供难以置信的灵活性。 ![][5] @@ -54,7 +56,7 @@ 作为一个新兴的 CMS 选项,很高兴看到 Payload 迈出了这一步,成为 WordPress 和其他选项的流行替代品。此外,在我看来,Payload 团队对他们的新业务模式充满信心,或许这预示着一个光明的未来(希望如此)。 -[Payload 内容管理系统][7] +> **[Payload 内容管理系统][7]** -------------------------------------------------------------------------------- @@ -63,7 +65,7 @@ via: https://news.itsfoss.com/payload-open-source/ 作者:[Jacob Crume][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/) 荣誉推出 From 8be9f509041457f1d8d96b795150b1bc6c031bc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E4=B8=80=E5=AE=89?= Date: Wed, 1 Jun 2022 10:18:41 +0800 Subject: [PATCH 091/104] finish --- ...l KVM on Ubuntu 22.04 -Jammy Jellyfish-.md | 37 +++++++++---------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/sources/tech/20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md b/sources/tech/20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md index 054d9168f4..7a13965311 100644 --- a/sources/tech/20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md +++ b/sources/tech/20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md @@ -107,9 +107,8 @@ $USER 环境变量引用的即为当前登录的用户名。您需要重新登 ### 5) 创建网桥(br0) -If you are planning to access KVM virtual machines outside from your Ubuntu 22.04 system, then you must map VM’s interface to a network bridge. Though a virtual bridge named virbr0, created automatically when KVM is installed but it is used for testing purposes. - -To create a network bridge, create the file ‘01-netcfg.yaml’ with following content under the folder /etc/netplan. +如果您打算从本机(Ubuntu 22.04)之外访问 KVM 虚拟机,您必须将虚拟机的网卡映射至网桥。virbr0 网桥是 KVM安装完成后自动创建的,仅做测试用途。 +您可以通过如下内容在 /etc/netplan 目录下创建文件 ‘01-netcfg.yaml’ 来新建网桥: ``` $ sudo vi /etc/netplan/01-netcfg.yaml @@ -156,48 +155,48 @@ $ ip add show ### 6) 启动 KVM 虚拟机管理器 -With KVM installed, you can begin creating your virtual machines using the virt-manager GUI tool. To get started, use the GNOME search utility and search for ‘Virtual machine Manager’. +当KVM安装完成后,您可以使用 virt-manager 图形管理工具创建虚拟机。您可以在 GNOME 搜索工具中搜索 ‘Virtual machine Manager’ 以启动。 -Click on the icon that pops up. +点击搜索出来的图标即可。 ![Access-Virtual-Machine-Manager-Ubuntu-Linux][6] -This launches the Virtual Machine Manager Interface. +虚拟机管理器界面如下所示: ![Virtual-Machine-Manager-Interface-Ubuntu-Linux][7] -Click on “File” then select “New Virtual Machine”. Alternatively, you can click on the button shown. +您可以点击 “File” 并选择 “New Virtual Machine”。您也可以点击下图所示的图标: ![New-Virtual-Machine-Icon-Virt-Manager][8] -This pops open the virtual machine installation wizard which presents you with the following four options: +您在弹出的虚拟机安装向导将看到如下四个选项: -* Local install Media ( ISO image or CDROM ) -* Network Install ( HTTP, HTTPS, and FTP ) -* Import existing disk image -* Manual Install +* 本地安装介质 ( ISO 镜像或 CDROM ) +* 网络安装 ( HTTP, HTTPS, 和 FTP ) +* 导入现有磁盘镜像 +* 手动安装 -In this guide, we have downloaded a Debian 11 ISO image, and therefore, if you have an ISO image, select the first option and click ‘Forward’. +本文使用已下载的 ISO镜像,您可以选择自己的 ISO 镜像,选择第一个选项,并点击 ‘Forward’。 ![Local-Install-Media-ISO-Virt-Manager][9] -In the next step, click ‘Browse’ to navigate to the location of the ISO image, +下一步中,点击‘Browse’选择ISO 镜像路径。 ![Browse-ISO-File-Virt-Manager-Ubuntu-Linux][10] -In the next window, click ‘Browse local’ in order to select the ISO image from the local directories on your Linux PC. +在下一个窗口中点击‘Browse local’选取本机中 ISO 镜像。 ![Browse-Local-ISO-Virt-Manager][11] -As demonstrated below, we have selected the Debian 11 ISO image. Then click ‘Open’ +如下所示,我们选择了 Debian 11 ISO 镜像,随后点击‘Open’。 ![Choose-ISO-File-Virt-Manager][12] -Once the ISO image is selected, click ‘Forward’ to proceed to the next step. +当 ISO 镜像选择后,点击‘Forward’进入下一步。 ![Forward-after-browsing-iso-file-virt-manager][13] -Next, define the RAM and the number of CPU cores for your virtual machine and click ‘Forward’. +接着定义虚拟机所用 RAM 大小以及 CPU 核心数,并点击 ‘Forward’。 ![Virtual-Machine-RAM-CPU-Virt-Manager][14] @@ -205,7 +204,7 @@ Next, define the RAM and the number of CPU cores for your virtual machine and cl ![Storage-for-Virtual-Machine-KVM-Virt-Manager][15] -To associate virtual machine’s nic to network bridge, click on ‘Network selection’ and choose br0 bridge. +如您需要将虚拟机网卡连接至网桥,点击‘Network selection’并选择 br0 网桥。 ![Network-Selection-KVM-Virtual-Machine-Virt-Manager][16] From cd77d0b23a1675e9ffcaac692f05fda7cf630458 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E4=B8=80=E5=AE=89?= Date: Wed, 1 Jun 2022 10:20:29 +0800 Subject: [PATCH 092/104] finish --- ...220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources/tech => translated}/20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md (100%) diff --git a/sources/tech/20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md b/translated/20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md similarity index 100% rename from sources/tech/20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md rename to translated/20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md From 9414a484d5f7181162b2a1521be63eb7c48a7804 Mon Sep 17 00:00:00 2001 From: lkxed Date: Wed, 1 Jun 2022 12:28:46 +0800 Subject: [PATCH 093/104] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?news]:=2020220601=20Linux=20Lite=206.0=20Ditches=20Firefox=20to?= =?UTF-8?q?=20Favor=20Google=20Chrome=20as=20the=20Default=20Browser.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...or Google Chrome as the Default Browser.md | 133 ++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 sources/news/20220601 Linux Lite 6.0 Ditches Firefox to Favor Google Chrome as the Default Browser.md diff --git a/sources/news/20220601 Linux Lite 6.0 Ditches Firefox to Favor Google Chrome as the Default Browser.md b/sources/news/20220601 Linux Lite 6.0 Ditches Firefox to Favor Google Chrome as the Default Browser.md new file mode 100644 index 0000000000..b36f57c2dd --- /dev/null +++ b/sources/news/20220601 Linux Lite 6.0 Ditches Firefox to Favor Google Chrome as the Default Browser.md @@ -0,0 +1,133 @@ +[#]: subject: "Linux Lite 6.0 Ditches Firefox to Favor Google Chrome as the Default Browser" +[#]: via: "https://news.itsfoss.com/linux-lite-6-0-release/" +[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Linux Lite 6.0 Ditches Firefox to Favor Google Chrome as the Default Browser +====== +Linux Lite 6.0 is an interesting release with a new default browser, accessibility improvements, new theme, a new system monitor, and more refinements. + +![linux lite][1] + +Linux Lite, one of the [best Windows-like distros][2], has just released its latest version, 6.0. + +Linux Lite 6.0 is based on [Ubuntu 22.04 LTS][3] and includes [Linux Kernel 5.15][4] LTS out of the box. + +This upgrade packs in a considerable number of exciting new features, including a new window theme and assistive technologies. + +Let’s dive into what’s new! + +### Linux Lite 6.0: Overview + +Linux Lite 6.0 includes numerous changes, including: + +* Updated software +* New window theme +* New on-screen keyboard +* Screen reader +* Screen magnifier +* Firefox replaced by Chrome as the default browser +* New grub menu + +#### Accessibility Improvements + +![Linux Lite 6.0][5] + +Linux Lite has stepped up into the big leagues with this change. Accessibility, which has historically been a GNOME-specific advantage, has greatly improved. This comes in three different tools: An on-screen keyboard, a screen reader (Orca), and a screen magnifier. + +The on-screen keyboard will be pretty useful for many touchscreen users and those without a keyboard. On the other hand, the screen reader will be perfect for sight-impaired users. + +![Linux Lite 6.0][6] + +The final accessibility improvement, the screen magnifier, also targets the same audience as the screen reader. However, it is quite a bit more aligned with the traditional desktop philosophy, so it may be preferred by numerous users over the screen reader. + +These accessibility improvements help bring Linux Lite 6.0 as a mainstream alternative. + +#### Updated Software + +As with almost all distribution upgrades, Linux Lite 6.0 includes updated software. Most notable is the latest stable LibreOffice version, 7.2.6. + +Other updates include VLC 3.0.16, Thunderbird 91.7, Chrome 100, GIMP 2.10.30, and more. + +Although not necessarily a massive upgrade in itself, it demonstrates a significant change in the included LibreOffice version. + +Previously, Linux Lite was held back with an older release due to the increased stability offered. However, the Linux Lite developers now feel comfortable using the latest stable release, with more people testing new LibreOffice versions than ever. + +#### New Window Theme + +![Linux Lite 6.0][7] + +Linux Lite 6.0 introduces a new window theme called ‘**Materia**.’ Those in the theming community will probably be quite familiar with it, as it has been ported to almost every platform. These include GTK 2, 3, and 4, GNOME Shell, Budgie, Cinnamon, MATE, Unity, Xfce, LightDM, GDM, and even Google Chrome. + +The switch to Materia should bring a familiar interface to ChromeOS users, as it is based on the Material UI that Google develops. + +#### Google Chrome is the new default browser + +![Linux Lite 6.0][8] + +With Ubuntu moving its Firefox version to a snap app, Linux Lite has completely ditched Firefox for Google Chrome. While I can’t say I’m a fan of this change, it does make sense, especially for a distro targeting Windows users. + +While you are free to install anything you like, Chrome is a popular option for most users, no matter what. + +Furthermore, Linux Lite developers include a Virus Total scanner extension (disabled by default) with Chrome if you want to scan files before accessing them. + +Note that you can install Firefox from the Linux Lite’s software center, but it will install the snap package. + +#### System Monitor Center as a replacement for Task Manager + +![Linux Lite 6.0][9] + +Linux Lite 6.0 now comes packed with the [System Monitoring Center][10] to replace the task manager and the process viewer. + +Note that Linux Lite developers have forked the application to provide specific information regarding the distribution in the system tab. + +It offers all the essential functionalities to help you keep an eye on your resources. + +### Other Improvements + +In addition to the fundamental changes, Linux Lite 6.0 involves updates to the grub menu, the ability to push emergency fixes to packages, a new whisker menu, and many more tweaks. + +![Linux Lite 6.0][11] + +As you can notice, the new grub menu also includes shut down and reboot while removing the memtest option. + +You can explore more technical details in its [official announcement post][12]. + +### Wrapping Up + +Linux Lite 6.0 appears to be a solid release, especially for those waiting for accessibility features and visual refreshments. + +The ISO file is available from the official download page if you want to try it out for yourself. + +[Download Linux Lite][13] + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/linux-lite-6-0-release/ + +作者:[Jacob Crume][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/jacob/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/06/linux-lite-6.jpg +[2]: https://itsfoss.com/windows-like-linux-distributions/ +[3]: https://news.itsfoss.com/ubuntu-22-04-release/ +[4]: https://news.itsfoss.com/linux-kernel-5-15-release/ +[5]: https://news.itsfoss.com/wp-content/uploads/2022/05/Screen-Reader-Linux-Lite-6.0.png +[6]: https://news.itsfoss.com/wp-content/uploads/2022/06/linux-lite-accessibility.png +[7]: https://news.itsfoss.com/wp-content/uploads/2022/05/Materia-Linux-Lite-6.0.png +[8]: https://news.itsfoss.com/wp-content/uploads/2022/05/Chrome-Linux-Lite-6.0.png +[9]: https://news.itsfoss.com/wp-content/uploads/2022/05/system-monitoring-center-linux-lite.png +[10]: https://itsfoss.com/system-monitoring-center/ +[11]: https://news.itsfoss.com/wp-content/uploads/2022/06/grub-linux-lite-6.png +[12]: https://www.linuxliteos.com/forums/release-announcements/linux-lite-6-0-final-released/ +[13]: https://www.linuxliteos.com/download.php#current From 08963af185882441f908c640ac01598f27be3ffe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E4=B8=80=E5=AE=89?= Date: Wed, 1 Jun 2022 13:04:44 +0800 Subject: [PATCH 094/104] change location --- ...220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename translated/{ => tech}/20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md (100%) diff --git a/translated/20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md b/translated/tech/20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md similarity index 100% rename from translated/20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md rename to translated/tech/20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md From d7e7f4643e8a520ee8d4b96734982f9de73ab7fc Mon Sep 17 00:00:00 2001 From: lkxed Date: Wed, 1 Jun 2022 16:23:34 +0800 Subject: [PATCH 095/104] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020220601=20A=20visual=20guide=20to=20Kubernetes=20netw?= =?UTF-8?q?orking=20fundamentals.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...e to Kubernetes networking fundamentals.md | 123 ++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 sources/tech/20220601 A visual guide to Kubernetes networking fundamentals.md diff --git a/sources/tech/20220601 A visual guide to Kubernetes networking fundamentals.md b/sources/tech/20220601 A visual guide to Kubernetes networking fundamentals.md new file mode 100644 index 0000000000..535c40fd66 --- /dev/null +++ b/sources/tech/20220601 A visual guide to Kubernetes networking fundamentals.md @@ -0,0 +1,123 @@ +[#]: subject: "A visual guide to Kubernetes networking fundamentals" +[#]: via: "https://opensource.com/article/22/6/kubernetes-networking-fundamentals" +[#]: author: "Nived Velayudhan https://opensource.com/users/nivedv" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +A visual guide to Kubernetes networking fundamentals +====== +Networking within Kubernetes isn't so different from networking in the physical world. Remember networking basics, and you'll have no trouble enabling communication between containers, Pods, and Services. + +![Parts, modules, containers for software][1] + +Image by: Opensource.com + +Moving from physical networks using switches, routers, and ethernet cables to virtual networks using software-defined networks (SDN) and virtual interfaces involves a slight learning curve. Of course, the principles remain the same, but there are different specifications and best practices. Kubernetes has its own set of rules, and if you're dealing with containers and the cloud, it helps to understand how Kubernetes networking works. + +The Kubernetes Network Model has a few general rules to keep in mind: + +1. Every Pod gets its own IP address: There should be no need to create links between Pods and no need to map container ports to host ports. +2. NAT is not required: Pods on a node should be able to communicate with all Pods on all nodes without NAT. +3. Agents get all-access passes: Agents on a node (system daemons, Kubelet) can communicate with all the Pods in that node. +4. Shared namespaces: Containers within a Pod share a network namespace (IP and MAC address), so they can communicate with each other using the loopback address. + +### What Kubernetes networking solves + +Kubernetes networking is designed to ensure that the different entity types within Kubernetes can communicate. The layout of a Kubernetes infrastructure has, by design, a lot of separation. Namespaces, containers, and Pods are meant to keep components distinct from one another, so a highly structured plan for communication is important. + +![Container-to-container and pod-to-pod networking][2] + +### Container-to-container networking + +Container-to-container networking happens through the Pod network namespace. Network namespaces allow you to have separate network interfaces and routing tables that are isolated from the rest of the system and operate independently. Every Pod has its own network namespace, and containers inside that Pod share the same IP address and ports. All communication between these containers happens through localhost, as they are all part of the same namespace. (Represented by the green line in the diagram.) + +### Pod-to-Pod networking + +With Kubernetes, every node has a designated CIDR range of IPs for Pods. This ensures that every Pod receives a unique IP address that other Pods in the cluster can see. When a new Pod is created, the IP addresses never overlap. Unlike container-to-container networking, Pod-to-Pod communication happens using real IPs, whether you deploy the Pod on the same node or a different node in the cluster. + +The diagram shows that for Pods to communicate with each other, the traffic must flow between the Pod network namespace and the Root network namespace. This is achieved by connecting both the Pod namespace and the Root namespace by a virtual ethernet device or a veth pair (veth0 to Pod namespace 1 and veth1 to Pod namespace 2 in the diagram). A virtual network bridge connects these virtual interfaces, allowing traffic to flow between them using the Address Resolution Protocol (ARP). + +When data is sent from Pod 1 to Pod 2, the flow of events is: + +1. Pod 1 traffic flows through eth0 to the Root network namespace's virtual interface veth0. +2. Traffic then goes through veth0 to the virtual bridge, which is connected to veth1. +3. Traffic goes through the virtual bridge to veth1. +4. Finally, traffic reaches the eth0 interface of Pod 2 through veth1. + +### Pod-to-Service networking + +Pods are very dynamic. They may need to scale up or down based on demand. They may be created again in case of an application crash or a node failure. These events cause a Pod's IP address to change, which would make networking a challenge. + +![Pod-to-Service networking][3] + +Kubernetes solves this problem by using the Service function, which does the following: + +1. Assigns a static virtual IP address in the frontend to connect any backend Pods associated with the Service. +2. Load-balances any traffic addressed to this virtual IP to the set of backend Pods. +3. Keeps track of the IP address of a Pod, such that even if the Pod IP address changes, the clients don't have any trouble connecting to the Pod because they only directly connect with the static virtual IP address of the Service itself. + +The in-cluster load balancing occurs in two ways: + +1. IPTABLES: In this mode, kube-proxy watches for changes in the API Server. For each new Service, it installs iptables rules, which capture traffic to the Service's clusterIP and port, then redirects traffic to the backend Pod for the Service. The Pod is selected randomly. This mode is reliable and has a lower system overhead because Linux Netfilter handles traffic without the need to switch between userspace and kernel space. +2. IPVS: IPVS is built on top of Netfilter and implements transport-layer load balancing. IPVS uses the Netfilter hook function, using the hash table as the underlying data structure, and works in the kernel space. This means that kube-proxy in IPVS mode redirects traffic with lower latency, higher throughput, and better performance than kube-proxy in iptables mode. + +The diagram above shows the package flow from Pod 1 to Pod 3 through a Service to a different node (marked in red). The package traveling to the virtual bridge would have to use the default route (eth0) as ARP running on the bridge wouldn't understand the Service. Later, the packages have to be filtered by iptables, which uses the rules defined in the node by kube-proxy. Therefore the diagram shows the path as it is. + +### Internet-to-Service networking + +So far, I have discussed how traffic is routed within a cluster. There's another side to Kubernetes networking, though, and that's exposing an application to the external network. + +![Internet-to-service][4] + +You can expose an application to an external network in two different ways. + +1. Egress: Use this when you want to route traffic from your Kubernetes Service out to the Internet. In this case, iptables performs the source NAT, so the traffic appears to be coming from the node and not the Pod. +2. Ingress: This is the incoming traffic from the external world to Services. Ingress also allows and blocks particular communications with Services using rules for connections. Typically, there are two ingress solutions that function on different network stack regions: the service load balancer and the ingress controller. + +### Discovering Services + +There are two ways Kubernetes discovers a Service: + +1. Environment Variables: The kubelet service running on the node where your Pod runs is responsible for setting up environment variables for each active service in the format {SVCNAME}_SERVICE_HOST and {SVCNAME}_SERVICE_PORT. You must create the Service before the client Pods come into existence. Otherwise, those client Pods won't have their environment variables populated. +2. DNS: The DNS service is implemented as a Kubernetes service that maps to one or more DNS server Pods, which are scheduled just like any other Pod. Pods in the cluster are configured to use the DNS service, with a DNS search list that includes the Pod's own namespace and the cluster's default domain. A cluster-aware DNS server, such as CoreDNS, watches the Kubernetes API for new Services and creates a set of DNS records for each one. If DNS is enabled throughout your cluster, all Pods can automatically resolve Services by their DNS name. The Kubernetes DNS server is the only way to access ExternalName Services. + +### ServiceTypes for publishing Services: + +Kubernetes Services provide you with a way of accessing a group of Pods, usually defined by using a label selector. This could be applications trying to access other applications within the cluster, or it could allow you to expose an application running in the cluster to the external world. Kubernetes ServiceTypes enable you to specify what kind of Service you want. + +![Four ServiceTypes][5] + +The different ServiceTypes are: + +1. ClusterIP: This is the default ServiceType. It makes the Service only reachable from within the cluster and allows applications within the cluster to communicate with each other. There is no external access. +2. LoadBalancer: This ServiceType exposes the Services externally using the cloud provider's load balancer. Traffic from the external load balancer is directed to the backend Pods. The cloud provider decides how it is load-balanced. +3. NodePort: This allows the external traffic to access the Service by opening a specific port on all the nodes. Any traffic sent to this Port is then forwarded to the Service. +4. ExternalName: This type of Service maps a Service to a DNS name by using the contents of the externalName field by returning a CNAME record with its value. No proxying of any kind is set up. + +### Networking software + +Networking within Kubernetes isn't so different from networking in the physical world, as long as you understand the technologies used. Study up, remember networking basics, and you'll have no trouble enabling communication between containers, Pods, and Services. + +Image by: (Nived Velayudhan, CC BY-SA 4.0) + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/6/kubernetes-networking-fundamentals + +作者:[Nived Velayudhan][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/nivedv +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/containers_modules_networking_hardware_parts.png +[2]: https://opensource.com/sites/default/files/2022-05/1containerandpodnets.jpg +[3]: https://opensource.com/sites/default/files/2022-05/2podtoservicenets.jpg +[4]: https://opensource.com/sites/default/files/2022-05/3internettoservicenets.jpg +[5]: https://opensource.com/sites/default/files/2022-05/4servicetypes_0.png From 791644bceddf269495ed091a473b492f407a34ea Mon Sep 17 00:00:00 2001 From: lkxed Date: Wed, 1 Jun 2022 16:25:04 +0800 Subject: [PATCH 096/104] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020220601=20Linux=20desktops-=20KDE=20vs=20GNOME.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20220601 Linux desktops- KDE vs GNOME.md | 96 +++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 sources/tech/20220601 Linux desktops- KDE vs GNOME.md diff --git a/sources/tech/20220601 Linux desktops- KDE vs GNOME.md b/sources/tech/20220601 Linux desktops- KDE vs GNOME.md new file mode 100644 index 0000000000..ba2c80e25d --- /dev/null +++ b/sources/tech/20220601 Linux desktops- KDE vs GNOME.md @@ -0,0 +1,96 @@ +[#]: subject: "Linux desktops: KDE vs GNOME" +[#]: via: "https://opensource.com/article/22/6/kde-vs-gnome-linux-desktop" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Linux desktops: KDE vs GNOME +====== +Comparing two open source desktops side by side shows that both styles serve important purposes. + +![How to upgrade your Fedora Linux system with DNF][1] + +Image by: Opensource.com + +I'm an ardent KDE [Plasma Desktop][2] user, but at work I happily use [GNOME][3]. Without getting into the question of which desktop I'd take to a desert island (that happens to have a power outlet), I see the merits of both desktops, and I'd rather use either of them than non-open source desktop alternatives. + +I've tried the proprietary alternatives, and believe me, they're not fun (it took one over a decade to get virtual workspaces, and the other still doesn't have a screenshot function built in). And for all the collaboration that the KDE and GNOME developers do these days at conferences like GUADEC, there's still a great philosophical divide between the two. + +And you know what? That's a good thing. + +### Missing the tree for the forest + +As a KDE user, I'm used to options. When I right-click on an object, whether it's a file, a widget, or even the empty space between widgets, I expect to see at least 10 options for what I'd like to do or how I'd like to configure the object. I like that because I like to configure my environment. I see that as the "power" part of being a "power user." I want to be able to adapt my environment to my whims to make it work better for me, even when the way I work is utterly unique and maybe not even sensible. + +GNOME doesn't give the user dozens of options with every right-click. In fact, GNOME doesn't even give you that many options when you go to Settings. To get configuration options, you have to download a tool called Tweaks, and for some you must install extensions. + +I'm not a GNOME developer, but I've set up a lot of Linux computers for friends and colleagues, and one thing I've noticed is that everybody has a unique perception of interface design. Some people, myself included, enjoy seeing a multitude of choices readily available at every turn. + +Other people don't. + +Here's what I see when I right-click on a file in the KDE Plasma Desktop: + +![This screenshot shows a menu that opens when right-clicking on a file in KDE. There is a list of 15 options of things to do with the file, such as copy, rename, compress, share, and so forth, many of which have submenus for additional options. Actions is selected on the menu, showing an additional 7 options.][4] + +Here's what I see when I right-click on a file in the GNOME desktop: + +![This screenshot of the menu that appears when right-clicking on a file on GNOME shows a list of 11 action options.][5] + +Including submenus, my Plasma Desktop has over 30 choices in a right-click. Of course, that's partly because I've configured it that way, and context matters, too. I have more options in a Git repository, for instance, than outside of one. By contrast, GNOME has 11 options in a right-click. + +Bottom line: Some users aren't keen to mentally filter out 29 different options so they can see the one option they're looking for. Minimalism allows users to focus on essential and common actions. Having only the essential options can be comforting for new users, a mental relief for the experienced user, and efficient for all users. + +### Mistake vectors + +As a Linux "power user," I fall prey to the old adage that I'm responsible for my own errors. It's the stuff of legend that Linux gives you access to "dangerous" commands and that, should you choose to use them, you're implicitly forgoing your right to complain about the results. For the record, I've never agreed with this sentiment, and I've [written and promoted tools][6] that help avoid mistakes in the terminal. + +The problem is that mistakes are not planned. If you could plan your mistakes, you could choose not to make them. What actually happens is that mistakes occur when you haven't planned them, usually at the worst possible moment. + +One way to reduce error is to reduce choice. When you have only two buttons to press, you can make only one mistake. It's also easier to identify what mistake you've made when there are fewer avenues to take. When you have five buttons, not only can you make four mistakes, but you also might not recall which button out of the five was the wrong one (and the other wrong one, and the other, and so on). + +Bottom line: Fewer choices mean fewer mistakes for users. + +### Maintenance + +If you've ever coded anything, this story might seem familiar to you. It's Friday evening, and you have an idea for a fun little improvement to your code. It seems like an easy feature to implement; you can practically see the code changes in your head. You have nothing better to do that evening, so you get to work. Three weeks later, you've implemented the feature, and all it took was a complete overhaul of your code. + +This is not an uncommon developer story. It happens because code changes can have unanticipated ripple effects that you just don't foresee before making the change. In other words, code is expensive. The more code you write, the more you have to maintain. The less code you write, the fewer bugs you have to hunt. + +### The eye of the beholder + +Most users customize their desktop with digital wallpaper. Beyond that, however, I expect most people use the desktop they've been given. So the desktop that GNOME and KDE developers provide is generally what people use, and in the end not just beauty but also the best workflow really are in the eye of the beholder. + +I fall into a particular work style when I'm using KDE, and a different style of work when I use GNOME. After all, things are arranged in different locations (although I keep my KDE panel at the top of my screen partly to mimic GNOME's design), and the file managers and the layout of my virtual workspaces are different. + +It's a luxury of open source to have arbitrary preferences for your tools. There's plenty to choose from, so you don't have to justify what you do or don't like about one desktop or another. If you try one and can't get used to it, you can always switch to the other. + +### Minimalism with Linux + +I used to think that it made sense to use a tool with 100 options because you can just ignore the 95 that you don't need and focus on the five that you do. The more I use GNOME, however, the more I understand the advantages of minimalism. Reduced design helps some users focus on what matters, it helps others avoid confusion and mistakes due to a complex user interface (UI), and it helps developers maintain quality code. And some people just happen to prefer it. + +There's a lesson here for users and developers alike, but it's not that one is better than the other. In fact, these principles apply to a lot more than just KDE and GNOME. User experience and developer experience are each important, and sometimes complexity is warranted while other times minimalism has the advantage. + +Image by: (Seth Kenlon, CC BY-SA 4.0) + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/6/kde-vs-gnome-linux-desktop + +作者:[Seth Kenlon][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/rh_003499_01_linux31x_cc.png +[2]: https://opensource.com/article/19/12/linux-kde-plasma +[3]: https://opensource.com/article/19/12/gnome-linux-desktop +[4]: https://opensource.com/sites/default/files/2022-05/kde-right-click.png +[5]: https://opensource.com/sites/default/files/2022-05/gnome-right-click.png +[6]: https://www.redhat.com/sysadmin/recover-file-deletion-linux#trash From 3296397326616e1162e6625917d3f5a9d7d36c30 Mon Sep 17 00:00:00 2001 From: lkxed Date: Wed, 1 Jun 2022 16:26:01 +0800 Subject: [PATCH 097/104] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020220601=20How=20to=20Create=20Local=20Yum-DNF=20Repos?= =?UTF-8?q?itory=20on=20RHEL=209.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...eate Local Yum-DNF Repository on RHEL 9.md | 136 ++++++++++++++++++ 1 file changed, 136 insertions(+) create mode 100644 sources/tech/20220601 How to Create Local Yum-DNF Repository on RHEL 9.md diff --git a/sources/tech/20220601 How to Create Local Yum-DNF Repository on RHEL 9.md b/sources/tech/20220601 How to Create Local Yum-DNF Repository on RHEL 9.md new file mode 100644 index 0000000000..990804f3f4 --- /dev/null +++ b/sources/tech/20220601 How to Create Local Yum-DNF Repository on RHEL 9.md @@ -0,0 +1,136 @@ +[#]: subject: "How to Create Local Yum/DNF Repository on RHEL 9" +[#]: via: "https://www.linuxtechi.com/create-local-yum-dnf-repository-rhel/" +[#]: author: "Pradeep Kumar https://www.linuxtechi.com/author/pradeep/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +How to Create Local Yum/DNF Repository on RHEL 9 +====== +Hello techies, recently Red Hat has released its latest operating system RHEL 9. RHEL 9 fulfill all the requirements of hybrid cloud. It can be installed on physical server, virtual machine and inside the container image. + +When we don’t have subscription and want to install packages for doing the POCs then setting up local yum or dnf repository will be handy. + +In this guide, we will cover how to create local yum/dnf repository on RHEL 9 using DVD or ISO file step by step. + +Prerequisites for creating local Yum/DNF repository + +* Minimal Install RHEL 9 system +* Sudo User with admin privileges +* RHEL 9 DVD or ISO file + +### 1 ) Mount RHEL 9 ISO File or DVD + +We are assuming RHEL 9 iso file is already copied into the system. Run following mount command to mount ISO file on /opt/repo folder. + +``` +$ sudo mkdir /var/repo +$ sudo mount -o loop rhel-baseos-9.0-x86_64-dvd.iso /var/repo/ +``` + +![Mount-RHEL9-ISO-File-Command][1] + +In case of  dvd, run + +``` +$ sudo mount /dev/sr0 /var/repo/ +``` + +### 2) Create Repo File in ‘/etc/yum.repos.d/’ Directory + +Create a repo file with name ‘rhel9-local.repo’ under the folder /etc/yum.repos.d/ with following content + +``` +$ sudo vi /etc/yum.repos.d/rhel9-local.repo +[Local-BaseOS] +name=Red Hat Enterprise Linux 9 - BaseOS +metadata_expire=-1 +gpgcheck=1 +enabled=1 +baseurl=file:///var/repo//BaseOS/ +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release + +[Local-AppStream] +name=Red Hat Enterprise Linux 9 - AppStream +metadata_expire=-1 +gpgcheck=1 +enabled=1 +baseurl=file:///var/repo//AppStream/ +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release +``` + +Save and close the file. + +![RHEL8-Local-Repo-File][2] + +### 3) Flush Yum/DNF & Subscription Manager Cache + +Execute following commands to clean yum or dnf and subscription manager cache. + +``` +$ sudo dnf clean all +$ sudo subscription-manager clean +``` + +![DNF-Subscription-Manager-Clean][3] + +In the above output, we are getting a warning message ‘This system is not registered with an entitlement’. So, to suppress this warning message, edit the file  ‘/etc/yum/pluginconf.d/subscription-manager.conf’ , change the parameter ‘enabled=1’ to ‘enabled=0’. + +``` +$ sudo vi /etc/yum/pluginconf.d/subscription-manager.conf +``` + +![Disable-Subscription-Parameter-RHEL-9][4] + +Save and exit the file. + +### 4) Install Packages using Local Repository + +Now we are all set to test our local repository. Run beneath command to view configure repository. + +``` +$ sudo dnf repolist +``` + +Output, + +![DNF-Repolist-RHEL-9][5] + +Now, try Install packages using dnf command via above configure local repository. + +``` +$ sudo dnf install nfs-utils +``` + +Output, + +![Install-RPM-Package-via-local-repo-rhel9][6] + +![Package-Installation-Completion-RHEL9-DNF-Command][7] + +Perfect, above output confirms that nfs-utils package along with its dependencies are installed successfully via locally configured yum or dnf repository. + +That’s all from this guide. I hope you have found it informative. Kindly do post your queries and feedback in below comments section. + +-------------------------------------------------------------------------------- + +via: https://www.linuxtechi.com/create-local-yum-dnf-repository-rhel/ + +作者:[Pradeep Kumar][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.linuxtechi.com/author/pradeep/ +[b]: https://github.com/lkxed +[1]: https://www.linuxtechi.com/wp-content/uploads/2022/06/Mount-RHEL9-ISO-File-Command.png +[2]: https://www.linuxtechi.com/wp-content/uploads/2022/06/RHEL8-Local-Repo-File.png +[3]: https://www.linuxtechi.com/wp-content/uploads/2022/06/DNF-Subscription-Manager-Clean.png +[4]: https://www.linuxtechi.com/wp-content/uploads/2022/06/Disable-Subscription-Parameter-RHEL-9.png +[5]: https://www.linuxtechi.com/wp-content/uploads/2022/06/DNF-Repolist-RHEL-9.png +[6]: https://www.linuxtechi.com/wp-content/uploads/2022/06/Install-RPM-Package-via-local-repo-rhel9.png +[7]: https://www.linuxtechi.com/wp-content/uploads/2022/06/Package-Installation-Completion-RHEL9-DNF-Command.png From 7497e86277b389859b18bcc96c46f596ce2c355c Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 1 Jun 2022 17:18:23 +0800 Subject: [PATCH 098/104] R MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @turbokernel 感谢您,完成了第一篇翻译贡献! --- ...l KVM on Ubuntu 22.04 -Jammy Jellyfish-.md | 118 +++++++++--------- 1 file changed, 62 insertions(+), 56 deletions(-) diff --git a/translated/tech/20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md b/translated/tech/20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md index 7a13965311..15c559db0b 100644 --- a/translated/tech/20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md +++ b/translated/tech/20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md @@ -3,31 +3,34 @@ [#]: author: "James Kiarie https://www.linuxtechi.com/author/james/" [#]: collector: "lkxed" [#]: translator: "turbokernel" -[#]: reviewer: " " +[#]: reviewer: "wxy" [#]: publisher: " " [#]: url: " " -Ubuntu 22.04 (Jammy Jellyfish) 之 KVM 安装手札 +Ubuntu 22.04 之 KVM 安装手札 ====== -**KVM** 是 **Kernel-based Virtual Machine** 首字母缩写,一项嵌入内核的开源虚拟化技术。其属于标准的基于内核的裸设备虚拟化引擎。 -在 **KVM** 之上可以运行 Windows 和 Liunx 虚拟机。每个虚拟机之间相互独立并独享 CPU、内存、网络设备、存储设备等相关资源。 +![](https://img.linux.net.cn/data/attachment/album/202206/01/171619m6dd7bjb8292bbb9.jpg) -本文将介绍在 Ubuntu 22.04 LTS (Jammy Jellyfish) 中如何安装 **KVM** 。在文末,我们也将演示在安装 **KVM** 完成之后如何创建虚拟机。 +**KVM** 是 基于内核的虚拟机Kernel-based Virtual Machine 的首字母缩写,这是一项集成在内核中的开源虚拟化技术。它是一种类型一(裸机)的管理程序hypervisor,可以使内核能够作为一个裸机管理程序bare-metal hypervisor。 -### 1) 更新 Ubuntu 22.04 +在 KVM 之上可以运行 Windows 和 Liunx 虚拟机。每个虚拟机都独立于其它虚拟机和底层操作系统(宿主机系统),并拥有自己的 CPU、内存、网络接口、存储设备等计算资源。 -在一切开始前,打开终端并通过如下命令更新更新apt软件包索引: +本文将介绍在 Ubuntu 22.04 LTS(Jammy Jellyfish)中如何安装 KVM 。在文末,我们也将演示如何在安装 KVM 完成之后创建一台虚拟机。 + +### 1、更新 Ubuntu 22.04 + +在一切开始前,打开终端并通过如下命令更新本地的软件包索引: ``` $ sudo apt update ``` -### 2) 检查虚拟化是否开启 +### 2、检查虚拟化是否开启 -首先需要检查您的CPU是否支持 KVM 虚拟化。确保您系统中安装了 Intel 处理器 VT-x( vmx ) 或 AMD AMD-V (svm) 处理器。 +在进一步行动之前,首先需要检查你的 CPU 是否支持 KVM 虚拟化,确保你系统中有 VT-x( vmx)英特尔处理器或 AMD-V(svm)处理器。 -您可以通过运行如下命令,根据返回的结果是否大于0判断虚拟化是否启用。如果返回值等于0,则表示虚拟化已禁用,您需要先启用虚拟化。 +你可以通过运行如下命令,如果输出值大于 0,那么虚拟化被启用。否则,虚拟化被禁用,你需要启用它: ``` $ egrep -c '(vmx|svm)' /proc/cpuinfo @@ -35,27 +38,27 @@ $ egrep -c '(vmx|svm)' /proc/cpuinfo ![SVM-VMX-Flags-Cpuinfo-linux][1] -根据上方命令输出,您通过返回值是否大于0判断虚拟化环境启用与否。如果虚拟化未启用,请在BIOS设置中将其开启。 +根据上方命令输出,你可以推断出虚拟化功能已经启用,因为输出结果大于 0。如果虚拟化功能没有启用,请确保在系统的 BIOS 设置中启用虚拟化功能。 -另外,您可以通过如下命令判断 KVM 虚拟化是否已经在运行: +另外,你可以通过如下命令判断 KVM 虚拟化是否已经在运行: ``` $ kvm-ok ``` -请确保您已经安装了 cpu-checker 软件包,否则将提示未找到该命令的报错。 +运行该命令之前,请确保你已经安装了 `cpu-checker` 软件包,否则将提示未找到该命令的报错。 -关于此类问题的解决方案以及 cp-checker 软件包的安装,您可以参考如下: +直接就在下面,你会得到如何解决这个问题的指示,那就是安装 `cpu-checker` 包。 ![KVM-OK-Command-Not-Found-Ubuntu][2] -随后,通过如下命令安装 cpu-checker 软件包: +随后,通过如下命令安装 `cpu-checker` 软件包: ``` $ sudo apt install -y cpu-checker ``` -接着运行 kvm-ok 命令,如果 KVM 已经启动,您将看到如下输出: +接着再运行 `kvm-ok` 命令,如果 KVM 已经启动,你将看到如下输出: ``` $ kvm-ok @@ -63,7 +66,7 @@ $ kvm-ok ![KVM-OK-Command-Output][3] -### 3) 在 Ubuntu 22.04 上安装 KVM +### 3、在 Ubuntu 22.04 上安装 KVM 随后,通过如下命令在 Ubuntu 22.04 中安装 KVM 以及其他相关虚拟化软件包: @@ -71,24 +74,25 @@ $ kvm-ok $ sudo apt install -y qemu-kvm virt-manager libvirt-daemon-system virtinst libvirt-clients bridge-utils ``` -为您解释下刚刚安装了哪些软件包: +以下为你解释刚刚安装了哪些软件包: -* qemu-kvm – 一款开源模拟器,为虚拟化安装包提供硬件模拟的支持 -* virt-manager – 一款基于 **QT** 和 **libvirt** 的图形的 libvirt 虚拟机管理工具 -* libvirt-daemon-system – 一款为运行 libvirt 进程提供必要配置文件的工具 -* virtinst – 一套为置备和修改虚拟机提供的命令行工具 -* libvirt-clients – 一套提供管理和控制虚拟机以及虚拟化引擎的客户端侧库和API命令行工具 -* bridge-utils – 一套用于创建和管理桥接设备的工具 -### 4) 启用虚拟化守护进程 (libvirtd) +* `qemu-kvm` – 一个提供硬件仿真的开源仿真器和虚拟化包 +* `virt-manager` – 一款通过 libvirt 守护进程,基于 QT 的图形界面的虚拟机管理工具 +* `libvirt-daemon-system` – 为运行 libvirt 进程提供必要配置文件的工具 +* `virtinst` – 一套为置备和修改虚拟机提供的命令行工具 +* `libvirt-clients` – 一组客户端的库和API,用于从命令行管理和控制虚拟机和管理程序 +* `bridge-utils` – 一套用于创建和管理桥接设备的工具 -在所有软件包安装完毕之后,通过如下命令 启用并启动 Libvirt 守护进程: +### 4、启用虚拟化守护进程(libvirtd) + +在所有软件包安装完毕之后,通过如下命令启用并启动 libvirt 守护进程: ``` $ sudo systemctl enable --now libvirtd $ sudo systemctl start libvirtd ``` -您可以通过如下命令验证虚拟化守护进程是否已经运行: +你可以通过如下命令验证该虚拟化守护进程是否已经运行: ``` $ sudo systemctl status libvirtd @@ -96,19 +100,20 @@ $ sudo systemctl status libvirtd ![Libvirtd-Status-Ubuntu-Linux][4] -另外,请将当前登录用户加入 kvm 和 libvirt 用户组,以便能够创建和管理虚拟机。 +另外,请将当前登录用户加入 `kvm` 和 `libvirt` 用户组,以便能够创建和管理虚拟机。 ``` $ sudo usermod -aG kvm $USER $ sudo usermod -aG libvirt $USER ``` -$USER 环境变量引用的即为当前登录的用户名。您需要重新登录才能使得配置生效。 +`$USER` 环境变量引用的即为当前登录的用户名。你需要重新登录才能使得配置生效。 -### 5) 创建网桥(br0) +### 5、创建网桥(br0) -如果您打算从本机(Ubuntu 22.04)之外访问 KVM 虚拟机,您必须将虚拟机的网卡映射至网桥。virbr0 网桥是 KVM安装完成后自动创建的,仅做测试用途。 -您可以通过如下内容在 /etc/netplan 目录下创建文件 ‘01-netcfg.yaml’ 来新建网桥: +如果你打算从本机(Ubuntu 22.04)之外访问 KVM 虚拟机,你必须将虚拟机的网卡映射至网桥。`virbr0` 网桥是 KVM 安装完成后自动创建的,仅做测试用途。 + +你可以通过如下内容在 `/etc/netplan` 目录下创建文件 `01-netcfg.yaml` 来新建网桥: ``` $ sudo vi /etc/netplan/01-netcfg.yaml @@ -136,16 +141,17 @@ network:   version: 2 ``` -保存并推出文件。 +保存并退出文件。 -注:上述文件的配置是我环境中的,请根据您实际环境替换 IP 地址、网口名称以及mac地址。 +注:上述文件的配置是我环境中的,请根据你实际环境替换 IP 地址、网口名称以及 MAC 地址。 + +你可以通过运行 `netplan apply` 命令应用上述变更。 -您可以通过运行 ‘netplan apply’命令应用上述变更。T ``` $ sudo netplan apply ``` -您可以通过如下命令,验证网桥 ‘br0’: +你可以通过如下 `ip` 命令,验证网桥 `br0`: ``` $ ip add show @@ -153,11 +159,11 @@ $ ip add show ![Network-Bridge-br0-ubuntu-linux][5] -### 6) 启动 KVM 虚拟机管理器 +### 6、启动 KVM 虚拟机管理器 -当KVM安装完成后,您可以使用 virt-manager 图形管理工具创建虚拟机。您可以在 GNOME 搜索工具中搜索 ‘Virtual machine Manager’ 以启动。 +当 KVM 安装完成后,你可以使用图形管理工具 `virt-manager` 创建虚拟机。你可以在 GNOME 搜索工具中搜索 `Virtual Machine Manager` 以启动。 -点击搜索出来的图标即可。 +点击搜索出来的图标即可: ![Access-Virtual-Machine-Manager-Ubuntu-Linux][6] @@ -165,50 +171,50 @@ $ ip add show ![Virtual-Machine-Manager-Interface-Ubuntu-Linux][7] -您可以点击 “File” 并选择 “New Virtual Machine”。您也可以点击下图所示的图标: +你可以点击 “文件File” 并选择 “新建虚拟机New Virtual Machine”。你也可以点击下图所示的图标: ![New-Virtual-Machine-Icon-Virt-Manager][8] -您在弹出的虚拟机安装向导将看到如下四个选项: +在弹出的虚拟机安装向导将看到如下四个选项: -* 本地安装介质 ( ISO 镜像或 CDROM ) -* 网络安装 ( HTTP, HTTPS, 和 FTP ) +* 本地安装介质(ISO 镜像或 CDROM) +* 网络安装(HTTP、HTTPS 和 FTP) * 导入现有磁盘镜像 * 手动安装 -本文使用已下载的 ISO镜像,您可以选择自己的 ISO 镜像,选择第一个选项,并点击 ‘Forward’。 +本文使用已下载的 ISO 镜像,你可以选择自己的 ISO 镜像,选择第一个选项,并点击 “向前Forward”。 ![Local-Install-Media-ISO-Virt-Manager][9] -下一步中,点击‘Browse’选择ISO 镜像路径。 +下一步中,点击 “浏览Browse” 选择 ISO 镜像位置。 ![Browse-ISO-File-Virt-Manager-Ubuntu-Linux][10] -在下一个窗口中点击‘Browse local’选取本机中 ISO 镜像。 +在下一个窗口中点击 “浏览本地Browse local” 选取本机中 ISO 镜像。 ![Browse-Local-ISO-Virt-Manager][11] -如下所示,我们选择了 Debian 11 ISO 镜像,随后点击‘Open’。 +如下所示,我们选择了 Debian 11 ISO 镜像,随后点击 “打开Open”。 ![Choose-ISO-File-Virt-Manager][12] -当 ISO 镜像选择后,点击‘Forward’进入下一步。 +当 ISO 镜像选择后,点击 “向前Forward” 进入下一步。 ![Forward-after-browsing-iso-file-virt-manager][13] -接着定义虚拟机所用 RAM 大小以及 CPU 核心数,并点击 ‘Forward’。 +接着定义虚拟机所用内存大小以及 CPU 核心数,并点击 “向前Forward” 。 ![Virtual-Machine-RAM-CPU-Virt-Manager][14] -下一页中,输入虚拟机磁盘空间,并点击 ‘Forward’ 继续。 +下一步中,输入虚拟机磁盘空间,并点击 “向前Forward” 继续。 ![Storage-for-Virtual-Machine-KVM-Virt-Manager][15] -如您需要将虚拟机网卡连接至网桥,点击‘Network selection’并选择 br0 网桥。 +如你需要将虚拟机网卡连接至网桥,点击 “选择网络Network selection” 并选择 `br0` 网桥。 ![Network-Selection-KVM-Virtual-Machine-Virt-Manager][16] -最后,点击 ‘Finish’ 按钮结束设置虚拟机。 +最后,点击 “完成Finish” 按钮结束设置虚拟机。 ![Choose-Finish-to-OS-Installation-KVM-VM][17] @@ -216,13 +222,13 @@ $ ip add show ![Creating-Domain-Virtual-Machine-Virt-Manager][18] -当创建结束时,虚拟机将开机并进入系统安装界面。如下是 Debian 11 的安装选项。在这里您可以根据需要进行系统安装。 +当创建结束时,虚拟机将开机并进入系统安装界面。如下是 Debian 11 的安装选项。在这里你可以根据需要进行系统安装。 ![Virtual-Machine-Console-Virt-Manager][19] -##### 小结 +### 小结 -至此,本文向您演示了如何在 Ubuntu 22.04 上 安装 KVM 虚拟化引擎。您的反馈对我们至关重要。 +至此,本文向你演示了如何在 Ubuntu 22.04 上 安装 KVM 虚拟化引擎。你的反馈对我们至关重要。 -------------------------------------------------------------------------------- @@ -231,7 +237,7 @@ via: https://www.linuxtechi.com/how-to-install-kvm-on-ubuntu-22-04/ 作者:[James Kiarie][a] 选题:[lkxed][b] 译者:[turbokernel](https://github.com/turbokernel) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 8c339beec5590cdb647e69ca9f6f7c513677f057 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 1 Jun 2022 17:19:29 +0800 Subject: [PATCH 099/104] P MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @turbokernel 本文首发地址:https://linux.cn/article-14661-1.html 您的 LCTT 专页:https://linux.cn/lctt/turbokernel --- ...24 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md (99%) diff --git a/translated/tech/20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md b/published/20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md similarity index 99% rename from translated/tech/20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md rename to published/20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md index 15c559db0b..c60fbf2e57 100644 --- a/translated/tech/20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md +++ b/published/20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md @@ -4,8 +4,8 @@ [#]: collector: "lkxed" [#]: translator: "turbokernel" [#]: reviewer: "wxy" -[#]: publisher: " " -[#]: url: " " +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14661-1.html" Ubuntu 22.04 之 KVM 安装手札 ====== From b2308ecbf2efb5432038f035d677e69914cf3ad6 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 1 Jun 2022 18:06:56 +0800 Subject: [PATCH 100/104] RP @geekpi https://linux.cn/article-14662-1.html --- ...and Apps From Source [Beginner-s Guide].md | 55 ++++++++----------- 1 file changed, 24 insertions(+), 31 deletions(-) rename {translated/tech => published}/20220529 Compile GNOME Shell and Apps From Source [Beginner-s Guide].md (71%) diff --git a/translated/tech/20220529 Compile GNOME Shell and Apps From Source [Beginner-s Guide].md b/published/20220529 Compile GNOME Shell and Apps From Source [Beginner-s Guide].md similarity index 71% rename from translated/tech/20220529 Compile GNOME Shell and Apps From Source [Beginner-s Guide].md rename to published/20220529 Compile GNOME Shell and Apps From Source [Beginner-s Guide].md index aa47c84a31..5620f379f6 100644 --- a/translated/tech/20220529 Compile GNOME Shell and Apps From Source [Beginner-s Guide].md +++ b/published/20220529 Compile GNOME Shell and Apps From Source [Beginner-s Guide].md @@ -3,40 +3,43 @@ [#]: author: "Arindam https://www.debugpoint.com/author/admin1/" [#]: collector: "lkxed" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14662-1.html" -从源码编译 Gnome Shell 和应用(初学者指南) +如何从源码编译 GNOME Shell 和应用 ====== -这是你如何从其来源码编译 GNOME 的快速指南,包括 shell,mutter 和一些原生应用。 + +![](https://img.linux.net.cn/data/attachment/album/202206/01/180518p98dt89wz7779tyb.jpg) + +> 这是一篇如何从源码编译 GNOME 的快速指南,包括 Shell、mutter 和一些原生应用。 在编译之前,你需要确保一些事情,因为以下编译直接来自 Gitlab 的主分支,其中包含一些开发包。 -通常,你可以选择在任何 Linux 分发中编译。但是我建议使用 Fedora Rawhide(Fedora 的开发分支,即未来版本)。 +通常,你可以选择在任何 Linux 发行版中编译。但是我建议使用 Fedora Rawhide(Fedora 的开发分支,用于将来的发布)。 另外,请勿在稳定系统中尝试此操作。因为操作可能出错,所以你可能最终得到损坏的系统。 -总而言之,你需要以下内容来从源码编译 Gnome。 +总而言之,你需要以下内容来从源码编译 GNOME。 -* 测试设置([虚拟机][1]或测试系统)。 +* 测试环境([虚拟机][1] 或测试系统)。 * Fedora Rawhide 发行版(推荐,[从此处下载][2])。 * 确保你的发行版是最新的。 * 你已登录 X.org 会话。 我不建议你在 Wayland 会话中进行编译,因为你会遇到问题。 -### 从源码编译 Gnome +### 从源码编译 GNOME -Gnome 桌面是基于其功能的软件包集合。Linux 发行版的桌面组件在窗口管理器和 shell 下工作。 +GNOME 桌面是一个基于其功能的软件包集合。Linux 发行版的桌面组件工作于窗口管理器和 shell 之下。 -因此,对于 Gnome,我将首先编译 mutter – Gnome Shell 的窗口管理。然后进行 Gnome Shell 的编译。最后,我将编译一些原生应用。 +因此,对于 GNOME,我将首先编译 mutter – 它是 GNOME Shell 的窗口管理器。然后进行 GNOME Shell 的编译。最后,我将编译一些原生应用。 -我将使用 meson 构建系统进行编译。meson 是一个美丽的构建系统,快速且用户友好。 +我将使用 meson 构建系统进行编译。meson 是一个漂亮的构建系统,快速且用户友好。 -#### 编译 Mutter +#### 编译 mutter -打开终端并安装需要的 GNOME Shell 和 mutter。 +打开终端并安装 GNOME Shell 和 mutter 所需的软件包。 ``` sudo dnf build-dep mutter gnome-shell @@ -46,27 +49,20 @@ sudo dnf build-dep mutter gnome-shell ``` cd ~ -``` - -``` mkdir demo -``` - -``` cd demo ``` 从 Gitlab 克隆 mutter 的主分支。 +``` git clone https://gitlab.gnome.org/GNOME/mutter +``` -进入克隆目录,然后使用以下 meson 命令来准备构建文件。默认情况下,Meson 使用 `/usr/local` 用于构建文件。但是,你也可以使用前缀开关将输出重定向到特定文件夹(如下所示)。 +进入克隆目录,然后使用以下 `meson` 命令来准备构建文件。默认情况下,meson 使用 `/usr/local` 用于构建文件。但是,你也可以使用前缀开关将输出重定向到特定文件夹(如下所示)。 ``` cd mutter -``` - -``` meson _build --prefix=/usr ``` @@ -86,9 +82,6 @@ GNOME Shell 和其他软件包的编译方法类似。首先,从 GitLab 克隆 ``` sudo dnf install asciidoc -``` - -``` sudo dnf install sassc ``` @@ -100,7 +93,7 @@ git clone https://gitlab.gnome.org/GNOME/gnome-shellcd gnome-shellmeson _build - ### 运行 GNOME Shell -编译完成后,你可以尝试重新启动 GNOME Shell 来查看主分支的变化。 +编译完成后,你可以尝试重新启动 GNOME Shell 来查看来自主分支的变化。 在重启之前,正如我之前提到的,确保你处于 X.Org 会话中。按 `ALT+F2` 并输入 `r`。然后按回车键。这个命令将重启 GNOME Shell。 @@ -120,7 +113,7 @@ git clone https://gitlab.gnome.org/GNOME/gnome-shellcd gnome-shellmeson _build - git clone https://gitlab.gnome.org/GNOME/nautilus/cd gnome-shellmeson _build --prefix=/usrsudo ninja install -C _build ``` -#### GNOME 软件 +#### GNOME 软件商店 ``` git clone https://gitlab.gnome.org/GNOME/gnome-software/cd gnome-shellmeson _build --prefix=/usrsudo ninja install -C _build @@ -139,7 +132,7 @@ git clone https://gitlab.gnome.org/GNOME/gnome-control-center/cd gnome-shellmeso ### 结束语 -我希望这个小小的高级教程能够帮助你在 GNOME 每日构建系统出现之前尝试新的 GNOME 功能。既然你编译了,你也可以为测试新的 GNOME 功能做出贡献,并在 GitLab 问题页面上报告任何特定包的 bug 或问题。 +我希望这个小小的高级教程能够帮助你在新的 GNOME 功能出现在 GNOME 每日构建系统之前尝试它。既然你编译了,你也可以为测试新的 GNOME 功能做出贡献,并在 GitLab 问题页面上报告任何特定包的 bug 或问题。 这篇文章是开源应用编译系列的第一篇文章。请继续关注更多开源应用的编译文章。 @@ -154,7 +147,7 @@ via: https://www.debugpoint.com/2022/05/compile-gnome-source/ 作者:[Arindam][a] 选题:[lkxed][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From bfee2aab1916f702db9b08b0f0c7c664ca386ba8 Mon Sep 17 00:00:00 2001 From: lkxed Date: Wed, 1 Jun 2022 19:37:02 +0800 Subject: [PATCH 101/104] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?news]:=2020220601=20GNOME=20Shell=20for=20Mobile-=20A=20Promisi?= =?UTF-8?q?ng=20Start=20with=20Huge=20Expectations=20[Opinion].md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Start with Huge Expectations [Opinion].md | 92 +++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 sources/news/20220601 GNOME Shell for Mobile- A Promising Start with Huge Expectations [Opinion].md diff --git a/sources/news/20220601 GNOME Shell for Mobile- A Promising Start with Huge Expectations [Opinion].md b/sources/news/20220601 GNOME Shell for Mobile- A Promising Start with Huge Expectations [Opinion].md new file mode 100644 index 0000000000..3ac9e6a31d --- /dev/null +++ b/sources/news/20220601 GNOME Shell for Mobile- A Promising Start with Huge Expectations [Opinion].md @@ -0,0 +1,92 @@ +[#]: subject: "GNOME Shell for Mobile: A Promising Start with Huge Expectations [Opinion]" +[#]: via: "https://www.debugpoint.com/2022/06/gnome-shell-mobile-announcement/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +GNOME Shell for Mobile: A Promising Start with Huge Expectations [Opinion] +====== +The GNOME devs gave ideas about porting GNOME Shell entirely to a mobile phone in a recent blog post. Here are some insights about the project. + +### GNOME Shell for Mobile Phones + +GNOME as a desktop environment evolved over the last decade to become [GNOME 40][1]. The GNOME 40 was a significant release that changed the complete user interface design with a modern approach. + +Looking at how GNOME 40 is designed, you may feel that the Shell and its underlying tech are ready for smaller screens. Because the gesture-driven workspaces, icons grid, and dock – somehow feel closer to a mobile operating system such as Android than a desktop environment. + +Moreover, the system tray, calendar, notifications and the native apps – can efficiently work well in smaller form factor devices. Thanks to GTK4 and libadwaita, the design is responsive, and the looks of apps and controls match a mobile platform well. + +After GNOME 40, the GNOME developers worked on several concepts of GNOME Shell for smaller form factor devices such as tablets and mobile phones. + +#### Why Now? + +The development and research efforts cost time and money for any project. Although there are donations to GNOME from major tech companies, this time a “Prototype Fund” helped the team to carry on with this effort. The [Prototype Fund][2] is a grant program supporting public interest software by the German Ministry of Education (BMBF). + +#### What is in scope? + +Designing a complete mobile user interface and integrating it with a mobile operating system is a very complex project. It requires a well-designed vision to support thousands of mobile hardware and user support. Not to mention, the privacy and security of users on a mobile device. + +![GNOME Shell Running on a prototype Pinephone][3] + +Hence, with this fund, the team concentrates on a proof of concept that caters to some essential user interactions in GNOME Shell. + +* Launcher +* Application Grids +* Swipe, gestures and navigations +* Search with mobile keyboard +* Detect screen size and screen rotation support +* Workspaces and multitasking +* Settings +* on-screen keyboard + +![GNOME Shell Mobile mock-up][4] + +It is always important to remember that a mobile experience is much more than just the user interface. Also, GNOME itself is not an operating system. It consists of the underlying stable operating system, which gives much-needed privacy and security. Plus, the “App Store” like the concept. The phone manufacturers need to work with GNOME devs for their products to adopt this concept. + +#### The Progress + +The team gave us a quick demo of the progress made while writing this article. See yourself in the below video. + +![][5] + +The complex task is to recognize various gestures in a touchscreen mobile. For example, you may use long touch, a short touch, a two-finger swipe and drag, and many possibilities that are only feasible in a small form factor device. It requires an absolute rework in the respective GNOME shell components. + +And developing them entirely on the existing GNOME Shell base is challenging work. + +Furthermore, the team uses the famous Pinephone Pro for development and testing. The Pinephone is already a commercial product featuring the “friendly neighbour” KDE Plasma mobile and other Linux OSes. + +![][6] + +### Conclusion + +And if all goes according to plan, we all may get a native GNOME experience in a complete open-source mobile phone. And you can have your privacy back! + +On a side note, I am not sure what will happen to Phosh (which is also based on GNOME). Although Phosh is developed and managed by Purism, it will be interesting to see what direction both GNOME Shell for mobile initiative and PHosh takes in the coming days. + +So, what do you think about the prospects of this project? Let me know in the comment box below. + +*[Image and video credits: GNOME Developers. Via blogs.][7]* + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/06/gnome-shell-mobile-announcement/ + +作者:[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/tag/gnome-40 +[2]: http://www.prototypefund.de +[3]: https://www.debugpoint.com/wp-content/uploads/2022/06/GNOME-Shell-Running-on-a-prototype-Pinephone.jpg +[4]: https://www.debugpoint.com/wp-content/uploads/2022/06/GNOME-Shell-Mobile-mock-up.jpg +[5]: +[6]: +[7]: https://blogs.gnome.org/shell-dev/2022/05/30/towards-gnome-shell-on-mobile/ From 52301a1c7f37fe305979cb972618a452fafe9a9e Mon Sep 17 00:00:00 2001 From: lkxed Date: Wed, 1 Jun 2022 19:37:50 +0800 Subject: [PATCH 102/104] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020220601=20KDE=20Plasma=20vs.=20Xfce-=20Comparing=20Le?= =?UTF-8?q?an=20and=20Mean=20Desktop=20Environments=20for=20Linux=20Users.?= =?UTF-8?q?md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...an Desktop Environments for Linux Users.md | 161 ++++++++++++++++++ 1 file changed, 161 insertions(+) create mode 100644 sources/tech/20220601 KDE Plasma vs. Xfce- Comparing Lean and Mean Desktop Environments for Linux Users.md diff --git a/sources/tech/20220601 KDE Plasma vs. Xfce- Comparing Lean and Mean Desktop Environments for Linux Users.md b/sources/tech/20220601 KDE Plasma vs. Xfce- Comparing Lean and Mean Desktop Environments for Linux Users.md new file mode 100644 index 0000000000..9bbd549a8e --- /dev/null +++ b/sources/tech/20220601 KDE Plasma vs. Xfce- Comparing Lean and Mean Desktop Environments for Linux Users.md @@ -0,0 +1,161 @@ +[#]: subject: "KDE Plasma vs. Xfce: Comparing Lean and Mean Desktop Environments for Linux Users" +[#]: via: "https://itsfoss.com/kde-vs-xfce/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +KDE Plasma vs. Xfce: Comparing Lean and Mean Desktop Environments for Linux Users +====== +KDE Plasma and Xfce are two popular desktop environment options for lightweight Linux distributions. + +While Xfce is still favored more for some of the [best lightweight Linux distributions][1], KDE Plasma is not a resource-heavy desktop either. + +To help you pick a suitable desktop environment, we will be comparing some of the most common aspects of a desktop environment. + +In case you are exploring some of the [best desktop environments][2] for the first time, you might want to know the [differences between KDE Plasma and GNOME][3] as well. It should help you choose the ideal desktop for your system. + +**Note**: *KDE is the entire community of people working on various projects under its umbrella. And, the desktop environment is Plasma. Here, we compare the Plasma desktop with Xfce. However, for simplicity, we tend to use “KDE” instead of “Plasma”* *in some cases.* + +### User Experience + +Both [KDE Plasma][4] and [Xfce][5] are tailored to provide the most comfortable Windows-like experience in a Linux distribution. However, KDE can be a more suitable choice. + +This is a big deal for users who recently switched from[Windows to Linux to experience the perks][6]. + +![kde home 2022][7] + +In other words, you will find a similar layout with a start menu (app menu) and navigate your way around through that in KDE. + +Xfce does provide a simple user interface. But, it could be too bland for users coming from macOS or Windows. + +![xfce xubuntu][8] + +Previously, Xfce could have been tagged as an old-school Linux desktop using a retro-style icon theme and window decorations. However, Xfce has evolved over the years to provide elementary-OS-like visuals out of the box. + +KDE can be a more modern experience vs. Xfce, but none of them should disappoint you. + +### App Ecosystem + +KDE comes packed with several utilities and countless projects under its umbrella. You’ll find a number of ‘K apps’ such as KDE Connect, Kdenlive, Konsole, etc. The software center ‘Discover’ is a good GUI utility for finding and installing applications. + +![kde discover][9] + +In contrast, Xfce falls short on the offerings. There are not as many ‘X apps’. It also doesn’t offers a software center. You are likely be using the good old [Synaptic Package Manager][10]. + +However, Xfce manages to offer the essentials without adding bloat to your system. + +If you want the option to explore various applications tailored for your desktop environment, KDE should offer a better app ecosystem overall. + +### Customizability + +![kde appearance custom][11] + +KDE Plasma is best known for its customizability. You can also refer to our [guide to explore customization tips][12] if you are a new KDE Plasma user. + +Considering KDE as a desktop environment that offers a wide range of options, colors, themes, widgets, and more, you get to tweak numerous things to personalize your experience. + +That being said, it can be overwhelming for beginners. + +So, if you want customizability of essential parts of the distro but still want to keep things simple, Xfce can be the right choice. + +![xfce customization][13] + +Xfce may not be customizable, but it [offers all the useful tweaks][14], including adding a launcher, customizing the taskbar, etc. + +### Development Activity and Stability  + +KDE and Xfce aim to provide the most stable experience possible. + +However, if you dislike frequent changes/updates to the desktop environment, Xfce should be a better option. + +There are no exact schedules for Xfce upgrades, but you will likely find them once in two-three years or longer. + +Of course, the Xfce development team is smaller than KDE’s, which is also a reason for fewer releases. But, it is still a good reason for stability without breaking many of the functionalities in Linux distributions. + +While KDE Plasma’s development activity always manages to grab the spotlight, the frequent updates may introduce bugs/issues for some users. + +Fortunately, you also have KDE Plasma LTS versions if you do not want the latest features always. + +Suppose you do not worry much about the stability but want to keep up with the modern standards. In that case, KDE Plasma will be a better candidate in terms of faster development activity while introducing user-requested changes regularly. + +### Performance + +Even though Xfce is favored more for resource-friendly distributions, KDE Plasma cannot be ignored. + +![xfce performance][15] + +You should get a snappy experience with both the desktop environments on older computers. + +For example, I tried comparing Kubuntu vs. Xubuntu to check the resource usage. It appears that the memory usage is about the same. + +![kde resource usage][16] + +It should not be a big deal. But, it is something to note on paper. + +### Accessibility Options + +A desktop environment needs to enhance accessibility for physically challenged users. + +While both the desktop environments offer insufficient accessibility support compared to GNOME, KDE can be an easier option to work with instead of Xfce. + +![kde accesibility][17] + +You get the option to enable the screen reader, customize mouse navigation, apply keyboard filters, and more. You need to install Orca Screen Reader before accessing the feature from KDE Plasma’s settings. + +With Xfce, we have less clarity on what to do with a screen reader, except you have a simple option to enable screen readers and magnifiers with a single click. + +![xfce accessibility][18] + +Of course, none of them are excellent choices in terms of accessibility options. So, you can try exploring both of them if you are not sure about it. + +### Available Distributions + +You can find KDE and Xfce editions for the most popular Linux distributions, including Ubuntu flavors, Manjaro, Linux Mint, and more. + +Xfce is pretty standard with lightweight Linux distributions as the primary offering, such as Linux Lite. + +In general, KDE-powered distributions are more popular. You can refer to our [list of KDE-based Linux distributions][19] to find some of the best options for your system. + +### Final Verdict: What Should You Pick? + +KDE Plasma should be an easy pick for most looking for a modern user experience with customizability. + +However, if you just need to get some things done on your older computer, with a simple user interface, Xfce can be an impressive option. + +What would you prefer between the two desktop environments? Let me know your thoughts in the comments below. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/kde-vs-xfce/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/lightweight-linux-beginners/ +[2]: https://itsfoss.com/best-linux-desktop-environments/ +[3]: https://itsfoss.com/kde-vs-gnome/ +[4]: https://kde.org/plasma-desktop/ +[5]: https://www.xfce.org/ +[6]: https://itsfoss.com/linux-better-than-windows/ +[7]: https://itsfoss.com/wp-content/uploads/2022/02/kde-home-2022.png +[8]: https://itsfoss.com/wp-content/uploads/2022/06/xfce-xubuntu.jpg +[9]: https://itsfoss.com/wp-content/uploads/2022/02/kde-discover-800x595.png +[10]: https://itsfoss.com/synaptic-package-manager/ +[11]: https://itsfoss.com/wp-content/uploads/2022/02/kde-appearance-custom-800x564.png +[12]: https://itsfoss.com/kde-customization/ +[13]: https://itsfoss.com/wp-content/uploads/2022/06/xfce-customization.jpg +[14]: https://itsfoss.com/customize-xfce/ +[15]: https://itsfoss.com/wp-content/uploads/2022/06/xfce-performance-800x556.png +[16]: https://itsfoss.com/wp-content/uploads/2022/02/kde-resource-usage-800x599.png +[17]: https://itsfoss.com/wp-content/uploads/2022/02/kde-accesibility.png +[18]: https://itsfoss.com/wp-content/uploads/2022/06/xfce-accessibility.png +[19]: https://itsfoss.com/best-kde-distributions/ From f1338d07ddd998bebc355e74715113f426bbb3b1 Mon Sep 17 00:00:00 2001 From: lkxed Date: Wed, 1 Jun 2022 22:38:29 +0800 Subject: [PATCH 103/104] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?news]:=2020220601=20de-Googled=20-e-OS=20v1=20Released=20Along?= =?UTF-8?q?=20with=20a=20New=20Brand=20-Murena-=20for=20Smartphone=20and?= =?UTF-8?q?=20Cloud=20Services.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...rena- for Smartphone and Cloud Services.md | 88 +++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 sources/news/20220601 de-Googled -e-OS v1 Released Along with a New Brand -Murena- for Smartphone and Cloud Services.md diff --git a/sources/news/20220601 de-Googled -e-OS v1 Released Along with a New Brand -Murena- for Smartphone and Cloud Services.md b/sources/news/20220601 de-Googled -e-OS v1 Released Along with a New Brand -Murena- for Smartphone and Cloud Services.md new file mode 100644 index 0000000000..e3c35985d4 --- /dev/null +++ b/sources/news/20220601 de-Googled -e-OS v1 Released Along with a New Brand -Murena- for Smartphone and Cloud Services.md @@ -0,0 +1,88 @@ +[#]: subject: "de-Googled /e/OS v1 Released Along with a New Brand ‘Murena’ for Smartphone and Cloud Services" +[#]: via: "https://news.itsfoss.com/murena-e-os/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +de-Googled /e/OS v1 Released Along with a New Brand ‘Murena’ for Smartphone and Cloud Services +====== +Murena is a new brand related to the e Foundation that focuses on offering privacy-friendly /e/OS with new smartphones, and cloud services. + +![murena][1] + +/e/OS is a popular privacy-focused mobile operating system as an alternative to Google’s Android. + +The operating system (fork of Lineage OS) eliminates any Google-related dependencies and encourages you to work without relying directly on any Google services. + +Instead, it offers some of its solutions as alternatives to offer you a privacy-friendly ecosystem. + +To streamline its offering, e Foundation responsible for the OS announced a new brand ‘**Murena**‘ that includes the operating system at its core, with new features and a new smartphone as well. + +### Murena or /e/ Foundation? + +The eFoundation is here to stay as a non-profit organization, working on /e/OS. Hence, it is safe to say that this is not a re-brand. + +However, [Murena][2] as a new startup company seems to be a separate commercial entity that will focus on encouraging mainstream users to try e/OS/ and promote the use of smartphones that support the operating system. + +The creator of /e/OS mentioned the following about the company: + +![][3] + +### /e/OS v1.0: What’s New? + +With the latest upgrade to the operating system, they aim to make things more accessible, improving the ease of use while still keeping privacy in mind. + +A new app store (App Lounge) and a new privacy tool (Advanced Privacy) have been introduced with the update. + +**App Lounge**: The new application installer lets you install numerous open-source applications and PWAs (Progress Web Apps). It also informs you of existing trackers in each application before you install it. + +![][4] + +I believe the existence of a tailored app store will help eliminate confusion for new users, whether they should try installing the Play Store or F-Droid with /e/OS. + +In addition to that, the Advanced Privacy tool will help limit exposing users’ data after they install third-party applications. + +You will also find a Murena cloud service as a private email account service and cloud storage if you want to get away from the big tech. The email service offers features to also hide your original email address. + +### Murena One + +![][5] + +The first Murena branded smartphone will be launching later in June and will ship to users in the USA, Canada, Europe, UK, and Switzerland. + +The smartphone will sport a 6.5-inch display, with a 25 Megapixel front shooter, and a rear camera setup with three sensors that include 48 MP, 8 MP, and 5 MP. + +We do not have clarity on the processor, but it mentions an octa-core chip coupled with 4 GB of RAM. All this is powered by a 4500 mAh battery. + +In addition to its first smartphone, you can also purchase smartphones by Fairphone and Teracube from its official website that packs in /e/OS out of the box. + +### Wrapping Up + +You can explore more about the new /e/OS upgrade, cloud services, and available smartphones on its official website. + +[Murena][6] + +The pricing for the smartphone hasn’t been disclosed in the press release. So, we suggest you to keep an eye on it if you’re interested. + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/murena-e-os/ + +作者:[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/06/murena.jpg +[2]: https://murena.com/ +[3]: https://news.itsfoss.com/wp-content/uploads/2022/06/murena-quote.jpeg +[4]: https://news.itsfoss.com/wp-content/uploads/2022/06/eos-app-lounge-1024x1024.jpg +[5]: https://news.itsfoss.com/wp-content/uploads/2022/06/murena-one-1024x576.jpeg +[6]: https://murena.com/ From ee7d54671e5f63721993d58196de2196f2ad47fb Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 2 Jun 2022 08:57:00 +0800 Subject: [PATCH 104/104] translated --- ...hine Learning Model to Make Predictions.md | 89 ------------------- ...hine Learning Model to Make Predictions.md | 87 ++++++++++++++++++ 2 files changed, 87 insertions(+), 89 deletions(-) delete mode 100644 sources/tech/20220530 Using a Machine Learning Model to Make Predictions.md create mode 100644 translated/tech/20220530 Using a Machine Learning Model to Make Predictions.md diff --git a/sources/tech/20220530 Using a Machine Learning Model to Make Predictions.md b/sources/tech/20220530 Using a Machine Learning Model to Make Predictions.md deleted file mode 100644 index 7c107e5f39..0000000000 --- a/sources/tech/20220530 Using a Machine Learning Model to Make Predictions.md +++ /dev/null @@ -1,89 +0,0 @@ -[#]: subject: "Using a Machine Learning Model to Make Predictions" -[#]: via: "https://www.opensourceforu.com/2022/05/using-a-machine-learning-model-to-make-predictions/" -[#]: author: "Jishnu Saurav Mittapalli https://www.opensourceforu.com/author/jishnu-saurav-mittapalli/" -[#]: collector: "lkxed" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Using a Machine Learning Model to Make Predictions -====== -Machine learning is basically a subset of artificial intelligence that uses previously existing data to make a prediction on new data. Of course, all of us know this by now! This article demonstrates how a machine learning model developed in Python can be used as a part of a Java code to make predictions. - -![Machine-learning][1] - -This article assumes you are familiar with the basic development skills and understanding of machine learning. We will start with training our model, and then make a machine learning model in Python. - -This article assumes you are familiar with the basic development skills and understanding of machine learning. We will start with training our model, and then make a machine learning model in Python. - -I am taking the example of a flood prediction model. First, import the following libraries: - -``` -import pandas as pd -import numpy as np -import matplotlib.pyplot as plt -``` - -Once we have successfully imported the libraries, we need to take in the data sets, as shown in the code below. To predict floods, I am using the river level data set. - -``` -from google.colab import files -uploaded = files.upload() -for fn in uploaded.keys(): print(‘User uploaded file “{name}” with length {length} bytes’.format( -name=fn, length=len(uploaded[fn]))) -Choose files No file chosen -``` - -The upload widget is only available when the cell has been executed in the current browser session. Please rerun this cell to enable*Saving Hoppers Crossing-Hourly-River-Level.csv to Hoppers Crossing-Hourly-River-Level.csv User uploaded file “Hoppers Crossing-Hourly-River-Level.csv”* with length 2207036 bytes. - -Once this is done, we can train our model using the *sklearn library*. For this, we first need to import the library and the algorithm model, as shown in Figure 1. - -![Figure 1: Training the model][2] - -``` -from sklearn.linear_model import LinearRegression -regressor = LinearRegression() -regressor.fit(X_train, y_train) -``` - -Once that is done we have trained our model, and it’s now ready to make predictions, as shown in Figure 2. - -![Figure 2: Making predictions][3] - -### Using ML model in Java - -What we need to do now is to convert the ML model into a model that can be used by a Java program. There is a library called sklearn2pmml that helps us do this: - -``` -# Install the library -pip install sklearn2pmml -``` - -Once the library is installed we can convert our already trained model, as shown below: - -``` -sklearn2pmml(pipeline, ‘model.pmml’, with_repr = True) -``` - -This is it! We can now use the generated `model.pmml` file in our Java code to make predictions. Do try it out! - -(LCTT 译注:Java 中有第三方库 [jpmml/jpmml-evaluator][4],它能帮助你使用生成的 `model.pmml` 进行预测。) - --------------------------------------------------------------------------------- - -via: https://www.opensourceforu.com/2022/05/using-a-machine-learning-model-to-make-predictions/ - -作者:[Jishnu Saurav Mittapalli][a] -选题:[lkxed][b] -译者:[译者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/jishnu-saurav-mittapalli/ -[b]: https://github.com/lkxed -[1]: https://www.opensourceforu.com/wp-content/uploads/2022/05/Machine-learning.jpg -[2]: https://www.opensourceforu.com/wp-content/uploads/2022/05/Figure-1Training-the-model.jpg -[3]: https://www.opensourceforu.com/wp-content/uploads/2022/05/Figure-2-Making-predictions.jpg -[4]: https://github.com/jpmml/jpmml-evaluator diff --git a/translated/tech/20220530 Using a Machine Learning Model to Make Predictions.md b/translated/tech/20220530 Using a Machine Learning Model to Make Predictions.md new file mode 100644 index 0000000000..94a7feb229 --- /dev/null +++ b/translated/tech/20220530 Using a Machine Learning Model to Make Predictions.md @@ -0,0 +1,87 @@ +[#]: subject: "Using a Machine Learning Model to Make Predictions" +[#]: via: "https://www.opensourceforu.com/2022/05/using-a-machine-learning-model-to-make-predictions/" +[#]: author: "Jishnu Saurav Mittapalli https://www.opensourceforu.com/author/jishnu-saurav-mittapalli/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +使用机器学习模型进行预测 +====== +机器学习基本上是人工智能的一个子集,它使用以前存在的数据对新数据进行预测。当然,现在我们所有人都知道这个道理了!这篇文章展示了如何将 Python 中开发的机器学习模型作为 Java 代码的一部分来进行预测。 + +![Machine-learning][1] + +本文假设你熟悉基本的开发技巧并理解机器学习。我们将从训练我们的模型开始,然后在 Python 中制作一个机器学习模型。 + +我以一个洪水预测模型为例。首先,导入以下库: + +``` +import pandas as pd +import numpy as np +import matplotlib.pyplot as plt +``` + +当我们成功地导入了这些库,我们就需要输入数据集,如下面的代码所示。为了预测洪水,我使用的是河流水位数据集。 + +``` +from google.colab import files +uploaded = files.upload() +for fn in uploaded.keys(): print(‘User uploaded file “{name}” with length {length} bytes’.format( +name=fn, length=len(uploaded[fn]))) +Choose files No file chosen +``` + +只有在当前浏览器会话中执行了该单元格时,上传部件才可用。请重新运行此单元,上传文件 *“Hoppers Crossing-Hourly-River-Level.csv”*,大小 2207036 字节。 + +完成后,我们就可以使用 *sklearn 库*来训练我们的模型。为此,我们首先需要导入该库和算法模型,如图 1 所示。 + +![Figure 1: Training the model][2] + +``` +from sklearn.linear_model import LinearRegression +regressor = LinearRegression() +regressor.fit(X_train, y_train) +``` + +完成后,我们就训练好了我们的模型,现在可以进行预测了,如图 2 所示。 + +![Figure 2: Making predictions][3] + +### 在 Java 中使用 ML 模型 + +我们现在需要做的是把 ML 模型转换成一个可以被 Java 程序使用的模型。有一个叫做 sklearn2pmml 的库可以帮助我们做到这一点: + +``` +# Install the library +pip install sklearn2pmml +``` + +库安装完毕后,我们就可以转换我们已经训练好的模型,如下图所示: + +``` +sklearn2pmml(pipeline, ‘model.pmml’, with_repr = True) +``` + +这就完成了!我们现在可以在我们的 Java 代码中使用生成的 `model.pmml` 文件来进行预测。请试一试吧! + +(LCTT 译注:Java 中有第三方库 [jpmml/jpmml-evaluator][4],它能帮助你使用生成的 `model.pmml` 进行预测。) + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/05/using-a-machine-learning-model-to-make-predictions/ + +作者:[Jishnu Saurav Mittapalli][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/jishnu-saurav-mittapalli/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/05/Machine-learning.jpg +[2]: https://www.opensourceforu.com/wp-content/uploads/2022/05/Figure-1Training-the-model.jpg +[3]: https://www.opensourceforu.com/wp-content/uploads/2022/05/Figure-2-Making-predictions.jpg +[4]: https://github.com/jpmml/jpmml-evaluator