Merge pull request #16 from LCTT/master

update from LCTT
This commit is contained in:
北梦南歌 2022-05-09 21:28:08 +08:00 committed by GitHub
commit 199c05a61f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
83 changed files with 6516 additions and 3536 deletions

View File

@ -1,27 +1,32 @@
[#]: collector: (lujun9972)
[#]: translator: (Starryi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-14557-1.html)
[#]: subject: (Watching activity on Linux with watch and tail commands)
[#]: via: (https://www.networkworld.com/article/3529891/watching-activity-on-linux-with-watch-and-tail-commands.html)
[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/)
使用 watch 和 tail 命令监视 Linux 上的活动
======
watch 和 tail 命令可以帮助监视 Linux 系统上的活动。本文介绍了这两个命令的一些有用的使用方法。
**watch** 和 **tail** 命令为持续监视 Linux 系统上的活动提供了一些有趣的选项。
![](https://img.linux.net.cn/data/attachment/album/202205/07/091736ja5yt2yottef0kl4.jpg)
也就是说,你可以通过 **watch** 来显示谁已登录,并随着用户登陆和注销,更新显示内容,而不是仅仅提出问题并获得答案(例如询问 **who** 并获取当前登录用户的列表)
> watch 和 tail 命令可以帮助监视 Linux 系统上的活动。本文介绍了这两个命令的一些有用的使用方法
使用 **tail**,您可以显示文件的底部并在添加内容时查看内容。这种监控一般非常有用,并且比定期运行命令所需的工作更少。
`watch``tail` 命令为持续监视 Linux 系统上的活动提供了一些有趣的选项。
也就是说,你可以通过 `watch` 来显示谁已登录,并随着用户登录和注销不断更新,而不是仅仅提出问题并获得答案(例如询问 `who` 并获取当前登录用户的列表)。
使用 `tail`,你可以显示文件的底部并在添加内容时查看内容。这种监控一般非常有用,并且比定期运行命令所需的工作更少。
### 使用 watch 命令
使用 **watch** 的最简单示例之一是使用命令 **watch who**。你会看到一个列表,其中显示了谁登录了,以及他们登录的时间和登录位置。请注意,默认设置是每两秒更新一次显示(左上角),日期和时间(右上角)将按该间隔自行更新。用户列表将随着用户登录和注销而增长和缩小。
使用 `watch` 的最简单示例之一是使用命令 `watch who`。你会看到一个列表,其中显示了谁登录了,以及他们登录的时间和登录位置。请注意,默认设置是每两秒更新一次显示(左上角),日期和时间(右上角)将按该间隔自行更新。用户列表将随着用户登录和注销而增长和缩小。
### $ watch who
```
$ watch who
```
此命令将显示如下所示的登录列表:
@ -32,14 +37,14 @@ nemo pts/0 2020-02-27 08:07 (192.168.0.11)
shs pts/1 2020-02-27 10:58 (192.168.0.5)
```
你可以通过添加 **-n** 选项(例如 -n 10)来修改更新间的不同秒数,以修改更新间隔,从而获取较少的更新频率。
你可以通过添加 `-n` 选项(例如 `-n 10`)来修改更新间的不同秒数,以修改更新间隔,从而获取较少的更新频率。
### $ watch -n 10 who
```
$ watch -n 10 who
```
上述命令将以新的间隔显示,并且显示的时间更新频率较低,从而使显示时间与所选间隔保持一致。
[][2]
```
Every 10.0s: who dragonfly: Thu Feb 27 11:05:47 2020
@ -47,9 +52,11 @@ nemo pts/0 2020-02-27 08:07 (192.168.0.11)
shs pts/1 2020-02-27 10:58 (192.168.0.5)
```
如果你希望仅查看命令的输出,而不是标题(前 2 行),则可以通过添加 **-t**(无标题)选项来省略这些行。
如果你希望仅查看命令的输出,而不是标题(前 2 行),则可以通过添加 `-t`(无标题)选项来省略这些行。
### $ watch -t who
```
$ watch -t who
```
然后,你的屏幕将显示如下所示:
@ -60,21 +67,21 @@ shs pts/1 2020-02-27 10:58 (192.168.0.5)
如果每次运行监视的命令时,输出都是相同的,则只有标题行(如果未省略)会更改。其余显示的信息将保持不变。
如果你希望 **watch** 命令在它正在监视的命令的输出发生更新后立即退出,则可以使用 **-g**(将其视为“离开”)选项。例如,如果你只是在等待其他人开始登录系统,则可以选择执行此操作。
如果你希望 `watch` 命令在它正在监视的命令的输出发生更新后立即退出,则可以使用 `-g`(将其视为“<ruby>离开<rt>go away</rt></ruby>”)选项。例如,如果你只是在等待其他人开始登录系统,则可以选择执行此操作。
你还可以使用 **-d**(差异)选项突出显示显示输出中的更改。突出显示只会持续一个间隔(默认为 2 秒),但有助于引起你对更新的注意。
你还可以使用 `-d`<ruby>差异<rt>differences</rt></ruby>)选项突出显示显示输出中的更改。突出显示只会持续一个间隔(默认为 2 秒),但有助于引起你对更新的注意。
下面是一个更复杂的示例,该示例使用 **watch** 命令显示正在侦听连接的服务及其使用的端口。虽然输出不太可能更改,但它会提醒你任何新服务正在启动或关闭。
下面是一个更复杂的示例,该示例使用 `watch` 命令显示正在侦听连接的服务及其使用的端口。虽然输出不太可能更改,但它会提醒你任何新服务正在启动或关闭。
```console
```
$ watch 'sudo lsof -i -P -n | grep LISTEN'
```
值得注意的是,正在运行的命令需要用引号扩起来,以确保 **watch** 命令不会将其输出发送到 grep 命令。
值得注意的是,正在运行的命令需要用引号扩起来,以确保不会将 `watch` 命令的输出发送到 `grep` 命令。
使用 **watch -h** 命令将为你提供命令选项的列表。
使用 `watch -h` 命令将为你提供命令选项的列表。
```console
```
$ watch -h
Usage:
@ -98,19 +105,19 @@ Options:
### 使用 tail -f
**tail -f** 命令与 **watch** 有一些相同之处。它也会在添加文件时显示文件的底部和其他内容。你不必一次又一次地运行 “tail” 命令,而是运行一个命令并获得可重复更新显示视图的结果。例如,你可以使用如下命令查看系统日志:
`tail -f` 命令与 `watch` 有一些相同之处。它也会在添加文件时显示文件的底部和其他内容。你不必一次又一次地运行 `tail` 命令,而是运行一个命令并获得可重复更新显示视图的结果。例如,你可以使用如下命令查看系统日志:
```console
```
$ tail -f /var/log/syslog
```
某些文件(如 **/var/log/wtmp**)不适合这种类型的处理,因为它们的格式不是普通文本文件,但是通过组合 **watch****tail**,你可以获得类似的结果,如下所示:
某些文件(如 `/var/log/wtmp`)不适合这种类型的处理,因为它们的格式不是普通文本文件,但是通过组合 `watch``tail`,你可以获得类似的结果,如下所示:
```bash
```
watch 'who /var/log/wtmp | tail -20'
```
无论有多少用户仍处于登录状态, 此命令都将只显示最近的 5 次登录。如果发生其他登录,显示结果将添加一行记录并删除顶行记录。
无论有多少用户仍处于登录状态,此命令都将只显示最近的 5 次登录。如果发生其他登录,显示结果将添加一行记录并删除顶行记录。
```
Every 60.0s: who /var/log/wtmp | tail -5 dragonfly: Thu Feb 27 12:46:07 2020
@ -122,9 +129,7 @@ nemo pts/1 2020-02-27 11:34 (192.168.0.5)
dory pts/1 2020-02-27 12:14 (192.168.0.5)
```
对你有时可能想要监视的信息,无论监视进程、登录名还是系统资源,**watch** 和 **tail -f** 命令都可以提供自动更新视图,从而使监视任务变得更加容易。
加入 [Facebook][3] 和 [LinkedIn][4] 上的网络世界社区,对最重要的话题发表评论。
对你有时可能想要监视的信息,无论监视进程、登录名还是系统资源,`watch` 和 `tail -f` 命令都可以提供自动更新视图,从而使监视任务变得更加容易。
--------------------------------------------------------------------------------
@ -133,7 +138,7 @@ via: https://www.networkworld.com/article/3529891/watching-activity-on-linux-wit
作者:[Sandra Henry-Stocker][a]
选题:[lujun9972][b]
译者:[Starryi](https://github.com/Starryi)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -3,34 +3,34 @@
[#]: author: "Chris Collins https://opensource.com/users/clcollins"
[#]: collector: "lkxed"
[#]: translator: "lkxed"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
[#]: reviewer: "turbokernel"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14560-1.html"
使用 Go 和树莓派来解决 WiFi 问题
使用 Go 和树莓派排查 WiFi 问题
======
实现一个 WiFi 扫描仪玩玩~
![在在门廊上喝茶][1]
图源opensource.com
> 实现一个 WiFi 扫描器玩玩~
去年夏天,我和妻子卖掉了我们的全部财产,带着我们的两只狗搬到了夏威夷。这里有我们想象中的一切:美丽的阳光、温暖的沙滩、凉爽的冲浪 —— 你能想到的一切。我们也遇到了一些意料之外的事WiFi 问题。
![](https://img.linux.net.cn/data/attachment/album/202205/08/085020czfsvsfpdg0usuph.jpg)
不过,这不是夏威夷的问题,而是我们租住的公寓的问题。我们住在一个单身公寓里,与房东的公寓仅一墙之隔。我们的租房协议中包含了免费的网络连接!好耶!只不过,它是由房东的公寓里的 WiFi 提供的,哇哦……
去年夏天我和妻子变卖了家产带着我们的两只狗移居了夏威夷。这里有美丽的阳光、温暖的沙滩、凉爽的冲浪等你能想到的一切。我们同样遇到了一些意料之外的事WiFi 问题。
说实话,它的效果还不错……吗?好吧,我承认它不尽如人意,我也不知道是哪里出了问题。明明路由器就在墙的另一边,但我们的信号就是很不稳定,经常会自动断开连接。在家的时候,我们的 WiFi 路由器的信号能够穿过层层墙壁和地板。事实上,它所覆盖的区域比我们居住的 600 平方英尺(大约 55 平方米)的公寓还要大。
不过,这不是夏威夷的问题,而是我们租住公寓的问题。我们住在一个单身公寓里,与房东的公寓仅一墙之隔。我们的租房协议中包含了免费的网络连接!好耶!只不过,它是由房东的公寓里的 WiFi 提供的,哇哦……
在这种情况下,一个优秀的技术人员会怎么做呢?既然想知道为什么,当然是开始调查咯!
说实话,它的效果还不错……吧?好吧,我承认它不尽如人意,并且不知道是哪里的问题。路由器明明就在墙的另一边,但我们的信号就是很不稳定,经常会自动断开连接。在家的时候,我们的 WiFi 路由器的信号能够穿过层层墙壁和地板。事实上,它所覆盖的区域比我们居住的 600 平方英尺(大约 55 平方米)的公寓还要大。
幸运的是,我们在搬家之前卖掉的“全部财产”并不包括树莓派 Zero W。它是如此小! 如此便携! 我当然就把它一起带来了。我有一个机智的想法:使用树莓派和它内置的 WiFi 适配器,用 Go 语言编写一个小程序来测量并显示从路由器收到的 WiFi 信号。我打算先简单快速地把它实现出来,以后再去考虑该如何优化。烦死了!我现在只想知道这个 WiFi 是怎么回事
在这种情况下,一个优秀的技术人员会怎么做呢?既然想知道为什么,当然是开始排查咯
谷歌搜索了一番后,我发现了一个相对有用的 Go 软件包 [mdlayher/wifi][2],它专门用于 WiFi 相关操作,听起来很有希望!
幸运的是,我们在搬家之前并没有变卖掉树莓派 Zero W。它是如此小巧便携! 我当然就把它一起带来了。我有一个机智的想法:通过树莓派和它内置的 WiFi 适配器,使用 Go 语言编写一个小程序来测量并显示从路由器收到的 WiFi 信号。我打算先简单快速地把它实现出来,以后再去考虑优化。真是麻烦!我现在只想知道这个 WiFi 是怎么回事!
谷歌搜索了一番后,我发现了一个比较有用的 Go 软件包 [mdlayher/wifi][2],它专门用于 WiFi 相关操作,听起来很有希望!
### 获取 WiFi 接口的信息
我的计划是查询 WiFi 接口的统计数据并返回信号强度所以我需要先找到设备上的接口。幸运的是mdlayher/wifi 包有一个查询它们的方法,所以我可以创建一个 `main.go` 来实现它,就像下面这样
我的计划是查询 WiFi 接口的统计数据并返回信号强度,所以我需要先找到设备上的接口。幸运的是,`mdlayher/wifi` 包有一个查询它们的方法,所以我可以创建一个 `main.go` 来实现它,具体代码如下
```go
```
package main
import (
@ -54,9 +54,9 @@ func main() {
}
```
让我们来看看上面的代码都做了什么吧!嗯,首先是导入依赖模块,导入后,我就可以使用 mdlayher/wifi 模块就在主函数中创建一个新的客户端(类型为 `*Client`)。接下来,这个新的客户端(变量名为 `c`就可以获得系统中的接口列表,只需要调用 `c.Interfaces()` 方法即可。接着,我就可以遍历包含接口指针的切片(变长数组),然后打印出它们的具体信息。
让我们来看看上面的代码都做了什么吧!首先是导入依赖包,导入后,我就可以使用 `mdlayher/wifi` 模块就在 `main` 函数中创建一个新的客户端(类型为 `*Client`)。接下来,只需要调用这个新的客户端(变量名为 `c``c.Interfaces()` 方法就可以获得系统中的接口列表。接着,我就可以遍历包含接口指针的切片(变长数组),然后打印出它们的具体信息。
注意到 `%+v` 中有一个 “+” 了吗?它意味着程序会额外打印出 `*Interface` 结构中的属性名,这将有助于我辨认出我看到的东西,而不用回头去看文档。
注意到 `%+v` 中有一个 `+` 了吗?它意味着程序会详细输出 `*Interface` 结构体中的属性名,这将有助于我标识出我看到的东西,而不用去查阅文档。
运行上面的代码后,我得到了机器上的 WiFi 接口列表:
@ -65,17 +65,17 @@ func main() {
&{Index:3 Name:wlp2s0 HardwareAddr:5c:5f:67:f3:0a:a7 PHY:0 Device:1 Type:station Frequency:2412}
```
注意,两行输出中的 MAC 地址都是 `HardwareAddr`,这意味着它们是同一个物理硬件。你也可以通过 `PHY: 0` 来确认。根据 Go 的 [wifi 模块文档][3]`PHY` 指的就是接口所属的物理设备。
注意,两行输出中的 MAC 地址`HardwareAddr`)是相同的,这意味着它们是同一个物理硬件。你也可以通过 `PHY: 0` 来确认。查阅 Go 的 [wifi 模块文档][3]`PHY` 指的就是接口所属的物理设备。
第一个接口没有名字,类型是 `TYPE: P2P`。第二个接口名为 `wpl2s0`,类型是 `TYPE: Station`Go 的 wifi 模块文档列出了 [不同类型的接口][4],并描述了它们是什么。根据文档,“<ruby>P2P<rt>点对点传输</rt></ruby>” 类型表示“这个接口是点对点客户端网络中的一个设备”。我认为这个接口是用于 [WiFi 直连][5] ,这是一个允许两个 WiFi 设备在没有中间接入点的情况下直接连接的标准。
第一个接口没有名字,类型是 `TYPE: P2P`。第二个接口名为 `wpl2s0`,类型是 `TYPE: Station``wifi` 模块的文档列出了 [不同类型的接口][4],以及它们的用途。根据文档,`P2P`(点对点传输) 类型表示“该接口属于点对点客户端网络中的一个设备”。我认为这个接口的用途是 [WiFi 直连][5] ,这是一个允许两个 WiFi 设备在没有中间接入点的情况下直接连接的标准。
<ruby>Station<rt>基站</rt></ruby>” 类型表示“这个接口是带有<ruby>控制接入点<rt>controlling access point</rt></ruby>的客户端设备管理的<ruby>基本服务集BSS<rt>basic service set</rt></ruby>的一部分”。这是大多数人所习惯的无线设备标准功能,也就是作为一个客户端来连接到网络接入点。这是测试 WiFi 质量的重要接口。
`Station`(基站)类型表示“该接口是具有<ruby>控制接入点<rt>controlling access point</rt></ruby>的客户端设备管理的<ruby>基本服务集<rt>basic service set</rt></ruby>BSS的一部分”。这是大众熟悉的无线设备标准功能作为一个客户端来连接到网络接入点。这是测试 WiFi 质量的重要接口。
### 利用接口获取基站信息
利用这个信息,我可以修改遍历接口的代码来获取我正在寻找的信息:
利用该信息,我可以修改遍历接口的代码来获取所需信息:
```go
```
for _, x := range interfaces {
if x.Type == wifi.InterfaceTypeStation {
// c.StationInfo(x) returns a slice of all
@ -91,9 +91,9 @@ for _, x := range interfaces {
}
```
首先,这段程序检查了 `x.Type`(接口类型)是否为 `wifi.InterfaceTypeStation`,它是一个基站接口(也是本练习中唯一涉及到的类型)。这是一个不幸的命名冲突,因为这个接口“类型”和 Golang 中的“类型”不是一个东西。事实上,我在这里使用了一个叫做 `interfaceType` 的 Go 类型来代表接口类型。呼,我花了一分钟才弄明白!
首先,这段程序检查了 `x.Type`(接口类型)是否为 `wifi.InterfaceTypeStation`,它是一个基站接口(也是本练习中唯一涉及到的类型)。不幸的是名字出现了冲突,这个接口“类型”并不是 Golang 中的“类型”。事实上,我在这里使用了一个叫做 `interfaceType` 的 Go 类型来代表接口类型。呼,我花了一分钟才弄明白!
然后,假设接口的类型符合预期,我们就可以调用 `c.StationInfo(x)` 来检索基站信息,`StationInfo()` 方法可以获取到关于这个接口 `x` 的信息。
然后,假设接口的类型正确,我们就可以调用 `c.StationInfo(x)` 来检索基站信息,`StationInfo()` 方法可以获取到关于这个接口 `x` 的信息。
这将返回一个包含 `*StationInfo` 指针的切片。我不大确定这里为什么要用切片,或许是因为接口可能返回多个 `StationInfo`?不管怎么样,我都可以遍历这个切片,然后使用之前提到的 `+%v` 技巧格式化打印出 `StationInfo` 结构的属性名和属性值。
@ -103,7 +103,7 @@ for _, x := range interfaces {
&{HardwareAddr:70:5a:9e:71:2e:d4 Connected:17m10s Inactive:1.579s ReceivedBytes:2458563 TransmittedBytes:1295562 ReceivedPackets:6355 TransmittedPackets:6135 ReceiveBitrate:2000000 TransmitBitrate:43300000 Signal:-79 TransmitRetries:2306 TransmitFailed:4 BeaconLoss:2}
```
我感兴趣的是<ruby>信号<rt>Signal</rt></ruby>”部分,可能还有“<ruby>传输失败<rt>TransmitFailed</rt></ruby>”和“<ruby>信标丢失<rt>BeaconLoss</rt></ruby>”部分。信号强度是以 dBm全称 <ruby>decibel-milliwatts<rt>分贝-毫瓦</rt><ruby>)为单位来报告的。
我感兴趣的是 `Signal`(信号)部分,可能还有 `TransmitFailed`(传输失败)和 `BeaconLoss`(信标丢失)部分。信号强度是以 dBm<ruby>分贝-毫瓦<rt>decibel-milliwatts</rt><ruby>)为单位来报告的。
#### 简短科普:如何读懂 WiFi dBm
@ -112,16 +112,16 @@ for _, x := range interfaces {
* -30 最佳,但它既不现实也没有必要
* -67 非常好,它适用于需要可靠数据包传输的应用,例如流媒体
* -70 还不错,它是实现可靠数据包传输的底线,适用于电子邮件和网页浏览
* -80 很差,只能保持绝对的基本连接,不可靠的数据包传输
* -90 不可用,接近“<ruby>噪音底线<rt>noise floor</rt></ruby>
* -80 很差,只是基本连接,数据包传输不可靠
* -90 不可用,接近“<ruby>背景噪声<rt>noise floor</rt></ruby>
*注意dBm 是对数尺度,-60 比 -30 要低 1000 倍。*
### 使它成为一个真的“扫描
### 使它成为一个真的“扫描
所以,看着上面输出显示的我的信号:-79。哇哦感觉不大好呢。不过单看这个结果并没有太大帮助它只能提供某个时间点的参考只对 WiFi 网络适配器在那一瞬间所在的特定物理空间有效。一个连续的读数会更有用,它能使我们有可能看到信号随着树莓派的移动而变化。我可以再次修改主函数来实现这一点。
所以,看着上面输出显示的我的信号:-79。哇哦感觉不大好呢。不过单看这个结果并没有太大帮助它只能提供某个时间点的参考只对 WiFi 网络适配器在特定物理空间的某一瞬间有效。一个连续的读数会更有用,借助于它,我们观察到信号随着树莓派的移动而变化。我可以再次修改 `main` 函数来实现这一点。
```go
```
var i *wifi.Interface
for _, x := range interfaces {
@ -153,9 +153,9 @@ for {
首先,我命名了一个 `wifi.Interface` 类型的变量 `i`。因为它在循环的范围外,所以我可以用它来存储接口信息。循环内创建的任何变量在该循环的范围外都是不可访问的。
然后,我可以把这个循环一分为二。第一个遍历了 `c.Interfaces()` 返回的接口切片,如果元素是一个 `Station` 类型,它就将其存储在先前创建的变量 `i`中,并跳出循环。
然后,我可以把这个循环一分为二。第一个遍历了 `c.Interfaces()` 返回的接口切片,如果元素是一个 `Station` 类型,它就将其存储在先前创建的变量 `i` 中,并跳出循环。
第二个循环是一个无限循环,所以它将不断地运行,直到我按下 **Ctrl** + **C** 来结束程序。和之前一样,这个循环内部获取接口信息、检索基站信息,并打印出信号信息。然后它会休眠一秒钟,再次运行,反复打印信号信息,直到我退出为止。
第二个循环是一个死循环,它将不断地运行,直到我按下 `Ctrl + C` 来结束程序。和之前一样,这个循环内部获取接口信息、检索基站信息,并打印出信号信息。然后它会休眠一秒钟,再次运行,反复打印信号信息,直到我退出为止。
运行上面的程序后,我得到了下面的输出:
@ -173,13 +173,13 @@ Signal: -81
不管怎么说,知道这些信息总比不知道要好。让树莓派连接上显示器或者电子墨水屏,并接上电源,我就可以让它在公寓里移动,并绘制出信号死角的位置。
剧透一下:由于房东的接入点在隔壁的公寓里,对我来说最大的死角是公寓厨房的冰箱那里发射出的一个圆锥体形状区域......这个冰箱与房东的公寓共用一堵墙!
剧透一下:由于房东的接入点在隔壁的公寓里,对我来说最大的死角是以公寓厨房的冰箱为顶点的一个圆锥体形状区域......这个冰箱与房东的公寓靠着一堵墙!
我想如果用《龙与地下城》里的黑话来说,它就是一个“<ruby>沉默之锥<rt>Cone of Silence</rt></ruby>”。或者至少是一个“<ruby>糟糕的网络连接之锥<rt>Cone of Poor Internet</rt></ruby>”。
总之,这段代码可以直接在树莓派上运行 `go build -o wifi_scanner` 来编译,得到的二进制文件 `wifi_scanner` 可以与任何其他 ARM 设备(同一版本)共享。另外,它也可以在常规系统上用正确的 ARM 设备库进行编译。
总之,这段代码可以直接在树莓派上运行 `go build -o wifi_scanner` 来编译,得到的二进制文件 `wifi_scanner` 可以运行在其他同样的ARM 设备上。另外,它也可以在常规系统上用正确的 ARM 设备库进行编译。
祝你扫描愉快!希望你的 WiFi 路由器不在你的冰箱后面!你可以在 [我的 GitHub repo][7] 中找到这个项目所用的代码。
祝你扫描愉快!希望你的 WiFi 路由器不在你的冰箱后面!你可以在 [我的 GitHub 存储库][7] 中找到这个项目所用的代码。
--------------------------------------------------------------------------------
@ -188,7 +188,7 @@ via: https://opensource.com/article/21/3/troubleshoot-wifi-go-raspberry-pi
作者:[Chris Collins][a]
选题:[lkxed][b]
译者:[lkxed](https://github.com/lkxed)
校对:[校对者ID](https://github.com/校对者ID)
校对:[turbokernel](https://github.com/turbokernel)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -0,0 +1,235 @@
[#]: subject: (Share files between Linux and Windows computers)
[#]: via: (https://opensource.com/article/21/4/share-files-linux-windows)
[#]: author: (Stephan Avenwedde https://opensource.com/users/hansic99)
[#]: collector: (lujun9972)
[#]: translator: (hanszhao80)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-14537-1.html)
如何在 Linux 和 Windows 电脑之间共享文件
======
> 使用 Samba 设置跨平台文件共享。
![](https://img.linux.net.cn/data/attachment/album/202205/02/233859oqqjvfr6tqz9bfqp.jpg)
如果你使用不同的操作系统,能够在它们之间共享文件会让你倍感方便。这篇文章介绍如何使用 [Samba][3] 和 [mount.cifs][4] 在 Linux [Fedora 33][2])和 Windows 10 之间设置文件共享。
Samba 是 [SMB/CIFS][5] 协议的 Linux 实现,允许通过网络连接直接访问共享的文件夹和打印机。 mount.cifs 是 Samba 套件的一部分,可让你在 Linux 下挂载 [CIFS][5] 文件系统。
> **注意**: 这些说明适用于在你的私有本地网络内,或在 Linux 宿主机和虚拟化的 Windows 访客机之间的虚拟主机专用网络中共享文件。不要将本文视为你公司网络的操作指南,因为本文没有实现必要的网络安全考虑。
### 从 Windows 访问 Linux
本节介绍从 Windows 文件资源管理器访问用户的 Linux 主目录。
#### 1、安装和配置 Samba
进入你的系统安装 Samba:
```
dnf install samba
```
Samba 是一个系统守护进程,其配置文件位于 `/etc/samba/smb.conf`。它的默认配置应该就可以工作。如果不行,下面这个最小化配置应该可以解决问题:
```
[global]
        workgroup = SAMBA
        server string = %h server (Samba %v)
        invalid users = root
        security = user
[homes]
        comment = Home Directories
        browseable = no
        valid users = %S
        writable = yes
```
你可以在该项目网站的 [smb.conf][6] 部分找到参数的详细说明。
#### 2、修改 LinuxSE
如果你的 Linux 发行版受 [SELinux][7] 保护(比如 Fedora必须通过以下命令才能通过 Samba 共享主目录:
```
setsebool -P samba_enable_home_dirs on
```
通过以下命令查看这个值:
```
getsebool samba_enable_home_dirs
```
输出如下:
![Sebool][8]
#### 3、启用你的用户
Samba 使用一组用户/密码来管理连接权限。通过键入以下命令将你的 Linux 用户添加到该集合中:
```
smbpasswd -a <你的用户名>
```
系统提示你输入密码。这是一个 _全新_ 的密码;而不是你账户的当前密码。请输入你想用来登录 Samba 的密码。
键入以下命令得到有 Samba 使用权限的用户列表:
```
pdbedit -L -v
```
键入以下命令删除一个用户:
```
smbpasswd -x <用户名>
```
#### 4、开启 Samba
既然 Samba 是一个系统守护进程,你可以在 Fedora 上键入以下命令启动它:
```
systemctl start smb
```
这将为当前会话开启 Samba 服务。如果想让它自启动,键入以下命令:
```
systemctl enable smb
```
在某些系统上Samba 守护进程注册为 `smbd`
#### 4、配置防火墙
你的防火墙会默认阻拦 Samba。通过配置防火墙允许 Samba 能永久访问网络。
你可以在命令行执行如下操作:
```
firewall-cmd --add-service=samba --permanent
```
或者,你可以使用 `firewall-config` 工具以图形化方式进行操作:
![firewall-config][10]
#### 5、从 Windows 访问 Samba
在 Windows 中,打开文件资源管理器。在地址栏中,键入两个反斜杠(`\\`),紧跟你的 Linux 机器的地址IP 地址或主机名):
![从 Windows 访问 Linux][11]
系统将提示你输入登录信息。输入第 3 步中的用户名和密码组合。你现在应该可以访问 Linux 机器上的主目录:
![从 Windows 访问 Linux][12]
### 从 Linux 访问 Windows
以下步骤说明了如何从 Linux 访问共享的 Windows 文件夹。要实现这一点,需要你的 Windows 用户帐户具有管理员权限。
#### 1、启用文件共享
通过点击 “Windows 按钮” > “<ruby>设置<rt>Settings</rt></ruby>” > “<ruby>网络和 Internet<rt>Network & Internet</rt></ruby>” ,或者右键单击任务栏右下角的小监视器图标,<ruby>打开网络和共享中心<rt>Open Network an d Sharing Center</rt></ruby>
![打开网络和共享中心][13]
在打开的窗口中,找到你要使用的连接并记下其配置文件。我使用了 **以太网 3**,它被标记为 <ruby>公用网络<rt>Public Network</rt></ruby>
> **注意**:如果你的 PC 经常连接公用网络,请考虑将本地计算机的连接配置文件更改为 **私有**
记住你的网络配置,然后单击 <ruby>更改高级共享设置<rt>Change advanced sharing settings</rt></ruby>
![更改高级共享设置][14]
选择与你的连接对应的配置文件并打开 <ruby>网络发现<rt>network discovery</rt></ruby><ruby>文件和打印机共享<rt>file and printer sharing</rt></ruby>
![网络共享设置][15]
#### 2、定义一个共享文件夹
通过右键单击你要共享的文件夹打开上下文菜单,导航到 <ruby>授予访问权限<rt>Give access to</rt></ruby>,然后选择 <ruby>特定用户...<rt>Specific people...</rt></ruby>
![授予访问权限][16]
检查你当前的用户名是否在列表中。点击 <ruby>共享<rt>Share</rt></ruby> 将此文件夹标记为共享:
![标记为共享][17]
你可以通过在文件资源管理器的地址栏中输入 `\\localhost` 来显示所有共享文件夹的列表:
![共享文件夹][18]
![共享文件夹][19]
#### 3、在 Linux 下挂载共享文件夹
回到你的 Linux 系统,打开一个命令行,然后创建一个新文件夹,用于挂载 Windows 共享:
```
mkdir ~/WindowsShare
```
挂载 Windows 共享是使用 `mount.cifs` 完成的,它应该被默认安装。使用如下命令临时挂载你的共享文件夹:
```
sudo mount.cifs //<address-of-windows-pc>/MySharedFolder ~/WindowsShare/ -o user=<Windows-user>,uid=$UID
```
在这个命令里:
* `<address-of-windows-pc>` 是 Windows PC 的地址信息IP 或主机名)
* `<Windows-user>` 是允许访问共享文件夹的用户(见步骤 2
系统将提示你输入 Windows 密码。之后,你将能够使用普通 Linux 用户访问 Windows 上的共享文件夹。
要卸载共享文件夹:
```
sudo umount ~/WindowsShare/
```
你还可以在系统启动时挂载 Windows 共享文件夹。按照 [这些步骤][20] 相应地配置你的系统。
### 总结
在这里展示了如何建立临时的文件夹共享访问权限,每次重启后都要重新设置,因此修改成永久访问会更便利。我经常在不同的系统之间来回切换,对我而言设置直接文件访问非常实用。
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/4/share-files-linux-windows
作者:[Stephan Avenwedde][a]
选题:[lujun9972][b]
译者:[hanszhao80](https://github.com/hanszhao80)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/hansic99
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003499_01_cloud21x_cc.png?itok=5UwC92dO (Blue folders flying in the clouds above a city skyline)
[2]: https://getfedora.org/en/workstation/download/
[3]: https://www.samba.org/
[4]: https://linux.die.net/man/8/mount.cifs
[5]: https://en.wikipedia.org/wiki/Server_Message_Block
[6]: https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html
[7]: https://www.redhat.com/en/topics/linux/what-is-selinux
[8]: https://opensource.com/sites/default/files/uploads/sebool.png (Enabling Samba to enable user directory access)
[9]: https://creativecommons.org/licenses/by-sa/4.0/
[10]: https://opensource.com/sites/default/files/uploads/firewall_configuration.png (firewall-config tool)
[11]: https://opensource.com/sites/default/files/uploads/windows_access_shared_1.png (Accessing Linux machine from Windows)
[12]: https://opensource.com/sites/default/files/uploads/windows_acess_shared_2.png (Accessing Linux machine from Windows)
[13]: https://opensource.com/sites/default/files/uploads/open_network_and_sharing_center.png (Open network and sharing center)
[14]: https://opensource.com/sites/default/files/uploads/network_and_sharing_center_2.png (Change advanced sharing settings)
[15]: https://opensource.com/sites/default/files/uploads/network_sharing.png (Network sharing settings)
[16]: https://opensource.com/sites/default/files/pictures/give_access_to.png (Give access)
[17]: https://opensource.com/sites/default/files/pictures/tag_as_shared.png (Tag as shared)
[18]: https://opensource.com/sites/default/files/uploads/show_shared_folder_1.png (Shared folders)
[19]: https://opensource.com/sites/default/files/uploads/show_shared_folder_2.png (Shared folders)
[20]: https://timlehr.com/auto-mount-samba-cifs-shares-via-fstab-on-linux/

View File

@ -0,0 +1,177 @@
[#]: subject: (Linux package management with dnf)
[#]: via: (https://opensource.com/article/21/6/dnf-linux)
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
[#]: collector: (lujun9972)
[#]: translator: (hanszhao80)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-14542-1.html)
使用 dnf 进行 Linux 包管理
======
> 了解如何在 Linux 上使用 `dnf` 命令安装软件包,然后下载我们的速查表,让正确的命令触手可及。
![](https://img.linux.net.cn/data/attachment/album/202205/04/101526nlsnpu34ppgscsch.jpg)
在计算机系统上安装应用程序非常简单:就是将档案(如 `.zip` 文件)中的文件复制到目标计算机上,放在操作系统预期放应用程序的位置。因为我们中的许多人习惯于使用花哨的安装“向导”来帮助我们在计算机上安装软件,所以这个过程似乎在技术上应该比实际更复杂。
然而复杂的是是什么构成了一个程序用户认为的单个应用程序实际上包含了分散在操作系统中的软件库的各种依赖代码例如Linux 上的 .so 文件、Windows 上的 .dll 文件和 macOS 上的 .dylib 文件)。
为了让用户不必担心这些程序代码之间的复杂的互相依赖关系, Linux 使用 <ruby>包管理系统<rt>package management system</rt></ruby> 来跟踪哪些应用程序需要哪些库,哪些库或应用程序有安全或功能更新,以及每个软件会附带安装哪些额外的数据文件。包管理器本质上是一个安装向导。它们易于使用,提供了图形界面和基于终端的界面,让你的生活更轻松。你越了解你的发行版的包管理器,你的生活就会越轻松。
### 在 Linux 上安装应用程序
如果你在使用 Linux 桌面时,偶尔想要安装一个应用程序,那么你可能正在寻找 [GNOME “软件”][2],它是一个桌面应用程序浏览器。
![GNOME “软件” 程序][3]
它会按你的预期工作:点击它的界面,直到你找到一个看起来有用的应用程序,然后单击 “安装” 按钮。
或者,你可以在 GNOME “软件” 中打开从网络下载的 `.rpm``.flatpakref` 软件包,以便它进行安装。
但如果你更倾向于使用命令行,请继续阅读。
### 用 dnf 搜索软件
在安装应用程序之前,你可能需要确认它是否存在于你的发行版的服务器上。通常,使用 `dnf` 搜索应用程序的通用名称就足够了。例如,假设你最近阅读了 [一篇关于 Cockpit 的文章][4],并决定尝试一下。你可以搜索 `cockpit` 验证该发行版是否包含它:
```
$ dnf search cockpit
Last metadata expiration check: 0:01:46 ago on Tue 18 May 2021 19:18:15 NZST.
==== Name Exactly Matched: cockpit ====
cockpit.x86_64 : Web Console for Linux servers
==== Name & Summary Matched: cockpit ==
cockpit-bridge.x86_64 : Cockpit bridge server-side component
cockpit-composer.noarch : Composer GUI for use with Cockpit
[...]
```
有一个精确的匹配。上面列出的匹配的软件包名为 `cockpit.x86_64`,但名称中的 `.x86_64` 部分仅表示它兼容该 CPU 架构。默认情况下,你的系统会安装适配当前 CPU 架构的软件包,因此你可以忽略该扩展名。所以你确认你要查找的软件包确实简称为 `cockpit`
现在你可以放心地使用 `dnf install` 安装它。 此步骤需要管理员权限:
```
$ sudo dnf install cockpit
```
一般来说,这就是典型的 `dnf` 工作流:搜索并安装。
然而,有时 `dnf search` 的结果并不清晰,或者你想要关于一个软件包的更多信息,而不仅仅是它的通用名称。有一些相关的 `dnf` 子命令,具体取决于你想要的信息。
### 软件包的元数据
如果你觉得你的搜索已 _接近_ 想要的结果,但还不确定,查看软件包的元数据通常会有所帮助,例如项目的网址和描述。要获取此信息,请使用顾名思义的 `dnf info` 命令:
```
$ dnf info terminator
Available Packages
Name : terminator
Version : 1.92
Release : 2.el8
Architecture : noarch
Size : 526 k
Source : terminator-1.92-2.el8.src.rpm
Repository : epel
Summary : Store and run multiple GNOME terminals in one window
URL : https://github.com/gnome-terminator
License : GPLv2
Description : Multiple GNOME terminals in one window. This is a project to produce
: an efficient way of filling a large area of screen space with
: terminals. This is done by splitting the window into a resizeable
: grid of terminals. As such, you can produce a very flexible
: arrangements of terminals for different tasks.
```
这个信息告诉你可用软件包的版本、在你系统中注册的哪一个存储库提供了它、该项目的网站以及详细的功能描述。
### 哪个软件包提供的这个文件?
软件包名称并不总是与你要查找的内容相匹配。例如,假设你正在阅读的文档告诉你必须安装名为 `qmake-qt5` 的东西:
```
$ dnf search qmake-qt5
No matches found.
```
`dnf` 数据库非常广泛,因此你不要局限于搜索完全匹配的内容。你可以使用 `dnf provides` 命令来了解你正在寻找的东西是否作为某个更大的软件包的一部分而提供:
```
$ dnf provides qmake-qt5
qt5-qtbase-devel-5.12.5-8.el8.i686 : Development files for qt5-qtbase
Repo : appstream
Matched from:
Filename : /usr/bin/qmake-qt5
qt5-qtbase-devel-5.15.2-3.el8.x86_64 : Development files for qt5-qtbase
Repo : appstream
Matched from:
Filename : /usr/bin/qmake-qt5
```
可以确认应用程序 `qmake-qt5` 是名为 `qt5-qtbase-devel` 的软件包的一部分。它还告诉你,该应用程序会安装到 `/usr/bin`,因此你知道了安装后它的确切位置。
### 软件包中包含哪些文件?
有时我发现自己会从完全不同的角度来对待 `dnf`。有时,我已经确认我的系统上安装了一个应用程序;我只是不知道我是怎么得到它的。还有一些时候,我知道我安装了一个特定的软件包,但我不清楚这个软件包到底在我的系统上安装了什么。
如果你需要对包的<ruby>有效负载<rt>payload</rt></ruby>进行 “<ruby>逆向工程<rt>reverse engineer</rt></ruby>”,可以使用 `dnf repoquery` 命令和 `--list` 选项。这将查看存储库中有关软件包的元数据,并列出该软件包提供的所有文件:
```
$ dnf repoquery --list qt5-qtbase-devel
/usr/bin/fixqt4headers.pl
/usr/bin/moc-qt5
/usr/bin/qdbuscpp2xml-qt5
/usr/bin/qdbusxml2cpp-qt5
/usr/bin/qlalr
/usr/bin/qmake-qt5
/usr/bin/qvkgen
/usr/bin/rcc-qt5
[...]
```
这些列表可能很长,使用 `less` 或你喜欢的分页命令配合管道操作会有所帮助。
### 移除应用程序
如果你决定系统中不再需要某个应用程序,可以使用 `dnf remove` 卸载它,该软件包本身安装的文件以及不再需要的任何依赖项都会被移除:
```
$ dnf remove bigapp
```
有时,你发现随着一个应用程序一起安装的依赖项对后来安装的其他应用程序也有用。如果两个包需要相同的依赖项,`dnf remove` _不会_ 删除依赖项。在安装和卸载大量应用程序之后,孤儿软件包散落各处的现象并不少见。大约每年我都要执行一次 `dnf autoremove` 来清除所有未使用的软件包:
```
$ dnf autoremove
```
这不是必需的,但这是一个让我的电脑感觉更好的大扫除步骤。
### 了解 dnf
你对包管理器的工作方式了解得越多,在必要时安装和查询应用程序就越容易。即便你不是 `dnf` 的重度使用者,当你发现自己与基于 RPM 的发行版交互时,了解它也会很有用。
告别 `yum` 后,我最喜欢的包管理器之一是 `dnf` 命令。虽然我不喜欢它的所有子命令,但我发现它是目前最健壮的 <ruby>包管理系统<rt>package management system</rt></ruby> 之一。 [下载我们的 dnf 速查表][5] 习惯该命令,不要害怕尝试一些新技巧。一旦熟悉了它,你可能会发现很难使用其他任何东西替代它。
> **[dnf 速查表][5]**
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/6/dnf-linux
作者:[Seth Kenlon][a]
选题:[lujun9972][b]
译者:[hanszhao80](https://github.com/hanszhao80)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/seth
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/brown-package-red-bow.jpg?itok=oxZYQzH- (Package wrapped with brown paper and red bow)
[2]: https://wiki.gnome.org/Apps/Software
[3]: https://opensource.com/sites/default/files/gnome-software.png (The GNOME Software app)
[4]: https://opensource.com/article/20/11/cockpit-server-management
[5]: https://opensource.com/downloads/dnf-cheat-sheet

View File

@ -0,0 +1,184 @@
[#]: subject: (Linux package management with apt)
[#]: via: (https://opensource.com/article/21/6/apt-linux)
[#]: author: (Chris Hermansen https://opensource.com/users/clhermansen)
[#]: collector: (lujun9972)
[#]: translator: (hanszhao80)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-14558-1.html)
使用 apt 进行 Linux 包管理
======
> 学习如何使用 apt 命令在基于 Debian 的 Linux 发行版上安装软件包,然后下载我们的速查表,让正确的命令触手可及。
![](https://img.linux.net.cn/data/attachment/album/202205/07/104236md5zqhpub9vqeaah.jpg)
[包管理器][2] 可帮助你处理 Linux 系统的计算机上软件的更新、卸载、故障排除等问题。Seth Kenlon 写了 [使用 dnf 进行 Linux 包管理][3] 一文,介绍了如何使用 `dnf` 这款命令行包管理工具,在 RHEL、CentOS、Fedora、Mageia、OpenMandriva 等 Linux 发行版中安装软件。
Debian 和基于 Debian 的发行版(例如 MX Linux、Deepin、Ubuntu以及基于 Ubuntu 的发行版(例如 Linux Mint 和 Pop!_OS都有 `apt`,这是一个“相似但不同”的工具。在本文中,我将按照 Seth 的示例(但使用 `apt`)向你展示如何使用它。
在一开始,我想先提一下四个跟 `apt` 相关的软件安装工具:
* [Synaptic][4] 是为 `apt` 服务的一个基于 GTK+ 的图形用户界面GUI的前端工具。
* [Aptitude][5] 是为 `apt` 服务的一个基于 Ncurses 的全屏命令行前端工具。
* `apt` 的前身有 `apt-get`、`apt-cache` 等工具。
* [Dpkg][6] 是在 `apt` 包管理器背后处理繁杂事务的”幕后工作者“。
还有其他的包管理系统,例如 [Flatpak][7] 和 [Snap][8],你可能会在 Debian 和基于 Debian 的系统上遇到它们,但我不打算在这里讨论。还有一些应用程序“商店”,例如 [GNOME “软件”][9],与 `apt` 和其他打包技术重叠;我也不打算在这里讨论它们。最后,还有其他 Linux 发行版,例如 [Arch][10] 和 [Gentoo][11] 既不使用 `dnf` 也不使用 `apt`,我也不打算在这里讨论它们!
上面我讲了这么多我不想提及的内容,你可能怀疑 `apt` 到底还能处理多少软件。这么说吧,在我的 Ubuntu 20.04 上,`apt` 可以让我使用 69,371 个软件包,从 `0ad`(一款古代战争题材的即时战略游戏)到 `zzuf`(一个透明的应用程序模糊测试工具),一点也不差。
### 使用 apt 搜索软件
使用 `apt` 软件包管理器的第一步是找到感兴趣的软件包。Seth 的 `dnf` 文章以 [Cockpit][12] 服务器管理应用程序为例。用 `apt` 我会输入如下命令:
```
$ apt search cockpit
Sorting... Done
Full Text Search... Done
389-ds/hirsute,hirsute 1.4.4.11-1 all
  389 Directory Server suite - metapackage
cockpit/hirsute,hirsute 238-1 all
  Web Console for Linux servers
...
$
```
上面的第二个包就是你要的那个(以 `cockpit/hirsute` 开头的那一行)。如果你决定要安装它,输入:
```
$ sudo apt install cockpit
```
`apt` 将负责安装 Cockpit 以及使其工作所需的所有部件或 _依赖_。有时我们不太确定这是我们所需要的。了解更多的信息可能有助于你决定是否真的要安装此应用程序。
### 包元数据
要了解有关软件包的更多信息,使用 `apt show` 命令:
```
$ apt show cockpit
Package: cockpit
Version: 238-1
Priority: optional
Section: universe/admin
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 88.1 kB
Depends: cockpit-bridge (>= 238-1), cockpit-ws (>= 238-1), cockpit-system (>= 238-1)
Recommends: cockpit-storaged (>= 238-1), cockpit-networkmanager (>= 238-1), cockpit-packagekit (>= 238-1)
Suggests: cockpit-doc (>= 238-1), cockpit-pcp (>= 238-1), cockpit-machines (>= 238-1), xdg-utils
Homepage: https://cockpit-project.org/
Download-Size: 21.3 kB
APT-Sources: http://ca.archive.ubuntu.com/ubuntu hirsute/universe amd64 Packages
Description: Web Console for Linux servers
The Cockpit Web Console enables users to administer GNU/Linux servers using a
web browser.
.
It offers network configuration, log inspection, diagnostic reports, SELinux
troubleshooting, interactive command-line sessions, and more.
$
```
特别要注意的是 `Description` 字段,它会告诉你更多关于应用程序的信息。`Depends` 字段说明还必须安装什么,而 `Recommends` 则显示建议安装的其他(如果有的话)合作组件。`Homepage` 字段会提供一个网址,通过它你可以了解更多。
### 哪个包提供的这个文件?
有时你并不知道包名但你知道包里一定包含着的某个文件。Seth 以 `qmake-qt5` 程序作为示例。使用 `apt search` 找不到它:
```
$ apt search qmake-qt5
Sorting... Done
Full Text Search... Done
$
```
但是,另一个有关联的命令 `apt-file` 可以用来探索包内部:
```
$ apt-file search qmake-qt5
qt5-qmake-bin: /usr/share/man/man1/qmake-qt5.1.gz
$
```
这时会显示一个 `qmake-qt5` 的手册页。它是一个名为 `qt5-qmake-bin` 的包的一部分。注意,此包名称颠倒了字符串 `qmake``qt5` 的顺序。
### 包里包含哪些文件?
方便的 `apt-file` 命令会列出给定的包中包含哪些文件。例如:
```
$ apt-file list cockpit
cockpit: /usr/share/doc/cockpit/TODO.Debian
cockpit: /usr/share/doc/cockpit/changelog.Debian.gz
cockpit: /usr/share/doc/cockpit/copyright
cockpit: /usr/share/man/man1/cockpit.1.gz
cockpit: /usr/share/metainfo/cockpit.appdata.xml
cockpit: /usr/share/pixmaps/cockpit.png
$
```
注意,这与 `apt show` 命令提供的信息不同,后者列出了包的依赖(其他必须安装的包)。
### 移除一个应用程序
你还可以使用 `apt` 移除软件包。例如,要移除`apt-file` 应用程序:
```
$ sudo apt purge apt-file
```
注意必须由超级用户运行 `apt` 才能安装或移除应用程序。
移除一个包并不会自动移除 `apt` 在此过程中安装的所有依赖项。不过,一点点的工作就很容易去除这些残留:
```
$ sudo apt autoremove
```
### 认识一下 apt
正如 Seth 所写的,“你对包管理器的工作方式了解得越多,在需要安装和查询应用程序时就会越容易。”
即便你不是 `apt` 的重度使用者,当你需要在命令行中安装或删除软件包时(例如,在一台远程服务器上或遵循某些热心肠发布的操作指南时),掌握一些 `apt` 的知识也会很有用。在某些软件创作者仅提供了一个裸 `.pkg` 文件的情况下,可能还需要了解一些关于 dpkg 的知识(如上所述)。
我发现 Synaptic 包管理器在我的桌面上是一个非常有用的工具,但出于各种目的,我也在少数维护的服务器上使用着 `apt`
[下载我们的 apt 速查表][15] 习惯该命令并尝试一些新技巧。一旦你这样做了,你可能会发现很难再使用其他任何东西。
> **[apt 速查表][15]**
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/6/apt-linux
作者:[Chris Hermansen][a]
选题:[lujun9972][b]
译者:[hanszhao80](https://github.com/hanszhao80)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/clhermansen
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/bash_command_line.png?itok=k4z94W2U (bash logo on green background)
[2]: https://opensource.com/article/21/2/linux-package-management
[3]: https://linux.cn/article-14542-1.html
[4]: https://www.nongnu.org/synaptic/
[5]: https://wiki.debian.org/Aptitude
[6]: https://wiki.debian.org/Teams/Dpkg
[7]: https://flatpak.org/
[8]: https://snapcraft.io/
[9]: https://wiki.gnome.org/Apps/Software
[10]: https://archlinux.org/
[11]: https://www.gentoo.org/
[12]: https://opensource.com/article/20/11/cockpit-server-management
[13]: mailto:ubuntu-devel-discuss@lists.ubuntu.com
[14]: mailto:pkg-utopia-maintainers@lists.alioth.debian.org
[15]: https://opensource.com/downloads/apt-cheat-sheet

View File

@ -0,0 +1,91 @@
[#]: subject: (A new open source operating system for embedded systems)
[#]: via: (https://opensource.com/article/21/7/rt-thread-smart)
[#]: author: (Zhu Tianlong https://opensource.com/users/zhu-tianlong)
[#]: collector: (lujun9972)
[#]: translator: (tendertime)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-14552-1.html)
一种新的开源嵌入式操作系统
======
> RT-Thread Smart 致力于物联网和边缘计算领域的开源。
![](https://img.linux.net.cn/data/attachment/album/202205/06/131909kdb7f966j22qf7o9.jpg)
目前对 [嵌入式操作系统][2] 有巨大的需求,你建立的操作系统最好是开源的。[RT-Thread][3] 项目的研发团队花了两年时间研发出了该项目的最新成果RT-Thread Smart。这是一款微内核的操作系统主要针对中高端的处理器如具有内存管理单元MMU的 RISC-V 或 Arm Cortex-A为嵌入式领域的所有行业提供了一个具有竞争力的、基于 POSIX 的软件平台。
### 谁需要 RT-Thread Smart?
RT-Thread Smart 是一款专业的、高性能的微内核操作系统用于实时应用。它为所有市场的嵌入式设备提供了开源基础如安全IP 摄像头)、工业控制、车载设备、消费电子及其他嵌入式科技应用,可谓一切场景。它的意义在于:不像传统的物联网操作系统,一个微内核的操作系统可以填补传统实时操作系统 RTOS 和相对大型的操作系统如 Linux 之间的空白,实现实时性能、成本、安全、启动速度等等各方面之间的最佳平衡。
### RT-Thread Smart 的架构
RT-Thread Smart 通过 MMU 和系统调用将系统分割为内核模式和用户模式,并为每种模式区分了地址空间(一个 32 位系统可以提供 4G 地址空间)。
![RT-Thread Smart 架构][4]
RT-Thread, [CC BY-SA 4.0][5]
RT-Thread Smart 内核包括平台的基础功能并支持定制化。RT-Thread Smart 的用户应用环境使用 [musl libc][6] 来提供 [POSIX][7] 接口调用和 C 语言的运行时支持。它也继承了原始的 RT-Thread 生态系统,使用 [SCons][8] 或者其他编译工具如 [Autotools][9]、Makefile、[CMake][10] 等等来支持开发,以及 RT-Thread 开箱即用的在线软件包(撰写本文时超过 342 个)。你甚至可以将 Linux 应用程序(如 wget/cURL、BusyBox、OpenSSL 和 Simple DirectMedia Layer移植到你的平台。
压缩的 RT-Thread Smart 内核仅 217 KB搭配一个 127 KB 的根文件系统。大约 2 MB的存储占用。包括了对文件系统、网络协议栈、多媒体的完整支持。RT-Thread 只需要 3 到 5 秒完成启动而在不运行其他功能组件时RT-Thread Smart 需要的启动及准备时间不到 500ms。
通过其集成的 Persimmon 用户界面UI组件RT-Thread Smart 从上电到运行 UI 需要大约 1 秒。换句话说,这是一个非常轻巧快速的系统。当然,“实时”不是指启动,而是指系统随着时间推进而表现出的一致性。对于 RT-Thread ,实时性能需要优先考虑,中断时延小于 1μs满足大部分实时性要求严格的场景需求。
### RT-Thread Smart 和 RT-Thread
你可能想知道 RT-Thread Smart 和 RT-Thread 之间的不同。简单来说, RT-Thread Smart 是一个基于 RT-Thread RTOS 的操作系统但它整合了用户态的处理过程。RT-Smart 的内核部分本质上是 RT-Thread RTOS它在虚拟地址上运行增加了进程管理使用进程间通信机制IPC、虚拟内存/地址空间管理、ELF 加载器等等,以上特性全部在 RT-Thread RTOS 内实现当这些组件被禁用时RT-Smart 会回归 RT-Thread RTOS。
以下是对比:
| | RT-Thread | RT-Thread Smart
:-----| :----: | :----:
支持芯片 | Cortex-M/R、RISC-V RV32IMAC以及类似、Cortex-A MPU | Cortex-A 等具有 MMU 的 MPU
编译 | 内核和应用都编译到一个镜像 | 内核和应用可以被分开编译和运行
存储 | 使用线性地址空间(即使有 MMU使用物理地址的虚拟寻址 | 运行在内核占用超过 1GB 的 32 位操作系统,拥有完整 4G 地址空间的用户态进程彼此隔离,外设驱动程序必须通过虚拟地址访问外设
运行错误 | 当一个应用程序失败时,整个系统就会崩溃 | 当应用程序失败时,它不会影响内核和其他进程的执行
运行模式 | 多线程模型 | 多进程模型(进程内支持多线程,内核线程由内核支持)
用户模型 | 单用户模型 | 单用户模型
API | RT-Thread API、POSIX PSE52 | RT-Thread API内核态和用户态以及完整的 POSIX API
实时性 | 抢占式硬实时系统 | 抢占式硬实时系统
资源使用 | 非常小 | 相对小
调试 | 通常需要模拟器调试 | 支持 GDB 调试,不需要模拟器
RT-Thread RTOS 非常紧凑,它的所有应用和子系统都编译到镜像中,多线程应用运行并分享相同的地址空间。
RT-Thread Smart 是独立的。系统和应用是分别编译和运行的。应用拥有完整且互相隔离的地址空间。它也继承了 RT-Thread 优秀的实时性,同时也具有 POSIX 环境的特性。
类似地,它们都与 RT-Thread API 兼容。RT-Thread RTOS 的应用可以被平滑移植到 RT-Thread Smart。
### 嵌入式开源
RT-Thread Smart 是一个开源项目,项目地址:[GitHub][11]。你可以下载代码和文档,尝试一下,并提交评论和反馈,将该项目传播给更多开源倡导者。嵌入式系统属于它们的用户,有太多的嵌入式开发人员没有找到太多可用的嵌入式系统。
如果你是开发人员,请帮助改进 RT-Thread Smart。随着 RT-Thread 项目的不断推进,我们希望创建物联网和边缘计算的令人激动的开源世界。
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/7/rt-thread-smart
作者:[Zhu Tianlong][a]
选题:[lujun9972][b]
译者:[tendertime](https://github.com/tendertime)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/zhu-tianlong
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/LAW-Internet_construction_9401467_520x292_0512_dc.png?itok=RPkPPtDe (An intersection of pipes.)
[2]: https://opensource.com/article/20/6/open-source-rtos
[3]: https://www.rt-thread.io/
[4]: https://opensource.com/sites/default/files/uploads/rt-thread-smart.png (RT-Thread Smart architecture)
[5]: https://creativecommons.org/licenses/by-sa/4.0/legalcode
[6]: https://musl.libc.org/
[7]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains
[8]: https://scons.org/
[9]: https://opensource.com/article/19/7/introduction-gnu-autotools
[10]: https://opensource.com/article/21/5/cmake
[11]: https://github.com/RT-Thread/rt-thread/tree/rt-smart

View File

@ -0,0 +1,111 @@
[#]: subject: "How I use open source to design my own card games"
[#]: via: "https://opensource.com/article/21/12/open-source-card-game"
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
[#]: collector: "lujun9972"
[#]: translator: "hadisi1993"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14551-1.html"
我如何利用开源设计自己的卡牌游戏
======
> 开源并不仅仅指的是软件。开源是一种文化现象,自然也适合桌面游戏。
![](https://img.linux.net.cn/data/attachment/album/202205/06/094320k8uug3i84pg8u0w2.jpg)
我喜欢优秀的游戏,尤其是桌游,因为桌游的很多特性都和开源相同。在现实生活中,当你和朋友围坐在桌旁一起玩卡牌游戏时,作为一个团队,你们可以一起决定小丑牌是不是万能的。还有,你们可以随意地决定当出了小丑牌后,手上有 Ace 牌的人的要不要舍弃 Ace 牌,或者出了方块皇后以后,每个人是不是都要把手上的牌传给右手边的人。换句话说,你们可以随心所欲地重新制定规则,因为游戏不过是参与者们一致认同的条件集合罢了。对我来说,更棒的是你可以发明自己的游戏,而不用破坏别人的游戏规则。有时候,我会作为一个业余爱好者来开发桌游。因为我喜欢把自己的爱好结合起来,所以我倾向于只使用开源和开放的文化资源来设计游戏。
首先,游戏有大致有两个关键特征,风格和机制,理解这一点非常重要。游戏风格指的是游戏的故事或者主题,游戏机制指的是游戏的规则和条件。这两者并不总是完全脱离的,举个例子,在设计一款以赛车为主题的游戏时,自然而然就会要求玩家迅速完成动作。然而,风格和机制通常是被分开对待的,所以我们完全可以为了好玩就去创造一款使用标准扑克牌,却以太空羊驼为主题的游戏。
### 开源美术
如果你去过现代艺术博物馆,你可能会发现自己站在一幅纯蓝色的画布前,无意中听到有人说起老话:“见鬼,这我也能做!”。但事实是,艺术是一项艰巨的工作。创作赏心悦目的艺术品需要付出大量的思考、时间、信心和技巧。这也意味着艺术是你在设计游戏时中最难采购的部分之一。
我有一些“技巧”来解决这个典型难题。
#### 1、寻找同类素材
现在有很多免费、开放的艺术作品,而且大部分质量上佳。问题在于,游戏通常需要不止一件作品。如果你正在设计一款纸牌游戏,你大概至少需要四到六个不同的元素(假设你的纸牌遵循塔罗牌风格),有可能还需要更多。如果你花足够多的时间在这上面,你可以在 [OpenGameArt.org][3]、[FreeSVG.org][4]、[ArtStation.com][5]、[DeviantArt.com][6] 等网站上找到<ruby>[知识共享和公共领域][2]<rt>Creative Commons and Public Domain</rt></ruby>的艺术作品。
如果你使用的网站没有专门搜索<ruby>知识共享<rt>Creative Commons</rt></ruby>的功能,输入以下文字到任何搜索引擎当中,`"This work is licensed under a Creative Commons"` 或 `"本工作处于知识共享许可协议之下"`(引号很重要,不要把它们漏了),并用搜索引擎要求的语法,以便将搜索限制到一个具体的站点当中(举个例子,`site:deviantart.com`)。
一旦你有了一个可供挑选素材的艺术库,那就去辨别这些作品的主题,并根据主题分类。两个不同的人拍摄的机器人的照片可能看起来一点都不像,但它们的主题都是机器人。如果提供给你足够多机器人相关的美术素材,你可以围绕机器人这个主题构建你的游戏风格。
#### 2、委托创作知识共享艺术
你可以雇艺术家来为你定制艺术作品。我与使用开源绘画程序(如 [Krita][7] 和 Mypaint的艺术家一起合作。同时作为合同的一部分我规定艺术作品必须在<ruby>知识共享署名-相同方式许可证<rt>Creative Commons Attribution-ShareAlike</rt></ruby>CC BY-SA下授权。迄今为止只有一位艺术家因为许可证的限制拒绝了我的提议并且大多数人都很高兴自己的美术作品有可能有更大的生命力而不仅仅是作为业余爱好者自己发行的游戏的一部分。
#### 3、创作自己的艺术
就像现代艺术馆之旅展示的那样,艺术是一个非常灵活的词。我发现只要我给自己设定一个目标,也就是我需要为一款游戏创造多少纸牌或令牌,我便能够从 Linux 上的丰富图像创造工具中选择一种去创作。这并不需要什么高难度的东西。就像现代艺术一样,你可以用蓝色和黄色的条纹,或者红色和白色的圆点花纹,或者绿色和紫色的锯齿线来涂一张卡片,只要你能把它们画出来,那么除了你以外,其他人永远不会知道你暗地里把它们当做仙宫里的贵族和小姐。想想看,通过运用图形应用程序,描摹日常物品的照片,重组经典的扑克花色和塔罗牌主题等一系列方式,你可以创造出的简单作品吧。
### 版面设计
我用 [Inkscape][8]、Scribus 或者 [GIMP][9] 来进行版面设计,这取决与我有什么素材以及我追求的设计方式是什么。
对于卡牌,我发现简单的版面设计很容易实现,看上去也更好,纯色比渐变色更容易印刷,还有,直观的图像是最棒的。
![layout in Inkscape][10]
Seth Kenlon, CC BY-SA 4.0
我在一个单独的 Inkscape 文件中为我最新的游戏做了版面设计,这个游戏只使用了来自 OpenGameArt.com 上三四个不同艺术家的九张图片。在有着更大的美工集,更好的卡牌多样性的游戏中,我会在游戏中的每一种卡片的文件中为它们设计版面。
在为你的游戏素材做任何版面设计之前,要先了解你的目标输出是什么。如果你打算在家里打印游戏,那就做一些计算,搞清楚默认的纸张大小(有些是 US Letter或者是 A4可以容纳多少卡牌、令牌或卡片。如果你使用 [TheGameCrafter][11] 之类的桌游打印机打印,请下载好模板文件。
![printed cards][12]
Seth Kenlon, CC BY-SA 4.0
### 游戏机制
游戏机制是游戏中最重要的部分。它们使一款游戏成为游戏。开发游戏规则并不一定是一个正式的过程。你可以一时兴起地创造了一款游戏,可以拿一个现有的游戏重组它的规则,直到它和原来不同,可以修改一款你不喜欢的游戏,也可以将两款不同的游戏组合在一起。从简单容易的地方做起,拿索引卡,标准扑克牌,或塔罗牌去试着模拟你的想象中游戏是如何工作的。你可以自己尝试早期的游戏创意,但最终,让朋友来帮忙是找出意外故障和进行优化的好方法。
经常测试游戏。与不同类型的玩家一起玩游戏,并听取他们的反馈。你的游戏可能会激发许多玩家去创造新的规则和想法,因此要将关于 _哪些搞砸了_ 的反馈与关于 _哪些可以做修改_ 的反馈分开。你不一定要去真的实施这些反馈意见,只需迭代你的想法,但还是要仔细考虑错误报告。
一旦确定了你想要让你的规则如何运作,就把它们写下来,让它们 [简短且容易解析][13]。你定的规则不必说服玩家去玩这款游戏,不必向他们解释策略,你也不必允许玩家重新设置规则,只要告诉玩家为了让游戏玩起来,他们应该采取的步骤就可以了。
最重要的是,考虑一下,将你的规则开源。分享经验是游戏的一切,这其中也应该包括规则。知识共享或<ruby>开放游戏许可证<rt>Open Gaming License</rt></ruby>的规则集合允许其他玩家在你的作品上进行迭代、混合和构建。你永远不会知道,有人可能会因此想出一个你更喜欢的游戏变体!
### 开源游戏
开源不仅仅指的是软件。开源是一种文化现象,自然也适合桌面游戏。花几个晚上的时间来尝试制作游戏。如果你是新手,那就从一些简单的开始,比如下面的这个空白卡牌游戏:
1. 找来一些朋友。
2. 给每个人几张空白的索引卡,告诉他们在每张卡片上写一条规则。规则可以是任何东西(“如果你穿着红色衣服,你就赢了”或“第一个站起来的人赢”等等)。
3. 在你自己的索引卡片上,写上 “和”、“但是”、“但是不要”、“而且不要”、“除了”,以及其他的条件短语。
4. 洗牌并将牌发给所有玩家。
5. 每个玩家轮到的时候出一张牌。
6. 最终目标是获胜,但是玩家可以通过出 “和”、“但是”、“或者” 卡片来修改决定胜负的条件。
这是一个有趣的聚会游戏,同时是一份很好的介绍,告诉你如何像游戏设计者一样思考,它帮助你认识到什么适合作为游戏机制,什么不适合。
还有,当然的,这是开源的。
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/12/open-source-card-game
作者:[Seth Kenlon][a]
选题:[lujun9972][b]
译者:[hadisi1993](https://github.com/hadisi1993)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/seth
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rich-smith-unsplash.jpg?itok=uzzS0gRa (Deck of playing cards)
[2]: https://opensource.com/article/20/1/what-creative-commons
[3]: https://opensource.com/article/21/12/opengameart.org/
[4]: http://freesvg.org
[5]: http://artstation.com
[6]: http://deviantart.com
[7]: https://opensource.com/article/21/12/krita-digital-paint
[8]: https://opensource.com/article/21/12/linux-draw-inkscape
[9]: https://opensource.com/content/cheat-sheet-gimp
[10]: https://opensource.com/sites/default/files/inkscape-layout.jpg (Layout in Inkscape)
[11]: https://www.thegamecrafter.com/
[12]: https://opensource.com/sites/default/files/cards-printed_0.jpg (Printed cards)
[13]: https://opensource.com/life/16/11/software-documentation-tabletop-gaming

View File

@ -0,0 +1,275 @@
[#]: subject: "Learn Rust in 2022"
[#]: via: "https://opensource.com/article/22/1/rust-cheat-sheet"
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
[#]: collector: "lujun9972"
[#]: translator: "hanszhao80"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14563-1.html"
2022 Rust 入门指南
======
> 如果你打算在今年探索 Rust请下载我们的免费 Rust 速查表,以供快速参考基础知识。
![](https://img.linux.net.cn/data/attachment/album/202205/08/161625lvo8v82ell9l3xmm.jpg)
Rust 是一门相对较新的编程语言,受到各个企业的 [程序员的欢迎][2]。尽管如此它仍是一门建立在之前所有事物之上的语言。毕竟Rust 不是一天做出来的,所以即便 Rust 中的一些概念看起来与你从 Python、Java、C++ 等编程语言学到的东西大不相同,但它们都是基于同一个基础,那就是你一直与之交互(无论你是否知道)的 CPU 和 NUMA<ruby>非统一内存访问<rt>Non Uniform Memory Access</rt></ruby>)架构,因此 Rust 中的一些新功能让人感觉有些熟悉。
现在我的职业不是程序员。我没耐心但我又有点儿强迫症。当我需要完成某件事时如果一门语言不能帮助我相对较快地获得想要的结果那么我很少会受到鼓舞而使用它。Rust 试图平衡两个矛盾:现代计算机对安全和结构化代码的需求,和现代程序员对编码工作事半功倍的渴望。
### 安装 Rust
[rust-lang.org][3] 网站有丰富的的文档指导如何安装 Rust但通常它就像下载 `sh.rustup.rs` 脚本并运行它一样简单。
```
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs
$ less sh.rustup.sh
$ sh ./sh.rustup.rs
```
### 没有类
Rust 没有类,也不使用 `class` 关键字。Rust 确实有 `struct` 数据类型,但它的作用是充当数据集合的一种模板。因此,你可以使用<ruby>结构体<rt>struct</rt></ruby>,而不是创建一个类来表示虚拟对象:
```
struct Penguin {
  genus: String,
  species: String,
  extinct: bool,
  classified: u64,
}
```
你可以像使用类一样使用它。例如,当定义完 `Penguin` 结构,你就可以创建它的实例,并与该实例进行交互:
```
struct Penguin {
  genus: String,
  species: String,
  extinct: bool,
  classified: u64,
}
fn main() {
  let p = Penguin { genus: "Pygoscelis".to_owned(),
   species: "R adeliæ".to_owned(), 
   extinct: false, 
   classified: 1841 };
  println!("Species: {}", p.species);    
  println!("Genus: {}", p.genus);
  println!("Classified in {}", p.classified);
  if p.extinct == true {
    println!("Sadly this penguin has been made extinct.");
  }
}
```
`impl` 数据类型与 `struct` 数据类型结合使用,你可以实现一个包含函数的结构体,并且可以添加继承和其他与类相似的特性。
### 函数
Rust 中的函数很像其他语言中的函数。每个函数都代表一组严谨的任务,你可以在需要时调用它们。主函数名必须是 `main`
`fn` 关键字声明函数,后跟函数名称和函数接受的所有参数。
```
fn foo() {
  let n = 8;
  println!("Eight is written as {}", n);
}
```
通过参数,将信息从一个函数传递到另一个函数。例如,我已经创建了一个 `Penguin` 类(结构),并且我有一个 `Penguin` 的实例为 `p`,将目标函数的参数指定为 `Penguin` 类型,就可把 `p` 的属性从一个函数传递到另一个函数。
```
fn main() {
  let p = Penguin { genus: "Pygoscelis".to_owned(), 
    species: "R adeliæ".to_owned(), 
    extinct: false, classified: 1841 };
  printer(p);
}
fn printer(p: Penguin) {
  println!("Species: {}", p.species);    
  println!("Genus: {}", p.genus);
  println!("Classified in {}", p.classified);
  if p.extinct == true {
    println!("Sadly this penguin has been made extinct.");
  }
}
```
### 变量
Rust 默认创建的为<ruby>不可变<rt>immutable</rt></ruby>变量。这意味着你创建的变量以后无法更改。这段代码虽然看起来没问题,但无法编译:
```
fn main() {
 let n = 6;
  let n = 5;
}
```
但你可以使用关键字 `mut` 声明一个<ruby>可变<rt>mutable</rt></ruby>变量,因此下面这段代码可以编译成功:
```
fn main() {
  let mut n = 6;
  println!("Value is {}", n);
  n = 5;
  println!("Value is {}", n);
}
```
### 编译
Rust 编译器,至少就其报错信息而言,是可用的最好的编译器之一。当你在 Rust 中出错时,编译器会真诚地告诉你做错了什么。实际上,仅通过从编译器错误消息中学习,我就了解了 Rust 的许多细微差别(就我理解到的 Rust 的任何细微差别而言)。即便有时错误消息太过于模糊,而不知所以然,互联网搜索几乎总能得到解释。
启动 Rust 程序的最简单方法是使用 `cargo`,它是 Rust 的包管理和构建系统。
```
$ mkdir myproject
$ cd myproject
$ cargo init 
```
以上命令为项目创建了基本的基础架构,最值得注意的是 `src` 子目录中的 `main.rs` 文件。打开此文件,把我为本文生成的示例代码粘贴进去:
```
struct Penguin {
  genus: String,
  species: String,
  extinct: bool,
  classified: u64,
}
fn main() {
  let p = Penguin { genus: "Pygoscelis".to_owned(), species: "R adeliæ".to_owned(), extinct: false, classified: 1841 };
  printer(p);
  foo();
}
fn printer(p: Penguin) {
  println!("Species: {}", p.species);    
  println!("Genus: {}", p.genus);
  println!("Classified in {}", p.classified);
  if p.extinct == true {
    println!("Sadly this penguin has been made extinct.");
  }
}
fn foo() {
  let mut n = 6;
  println!("Value is {}", n);
  n = 8;
  println!("Eight is written as {}", n);
}
```
使用 `cargo build` 命令进行编译:
```
$ cargo build
```
执行 `target` 子目录下的二进制程序,或者直接运行 `cargo run` 命令来运行你的项目:
```
$ cargo run
Species: R adeliæ
Genus: Pygoscelis
Classified in 1841
Value is 6
Eight is written as 8
```
### Crates
任何语言的大部分便利都来自于它的库或模块。在 Rust 中,进行分发和跟踪的库称为 “crate”箱子。[crates.io][4] 是一个很好的社区 crate 注册网站。
把一个 crate 添加到你的 Rust 项目,首先要在 `Cargo.toml` 文件中添加这个 crate。例如要安装随机数函数我使用名为 `rand` 的 crate使用 `*` 作为通配符,以确保在编译时获得最新版本:
```
[package]
name = "myproject"
version = "0.1.0"
authors = ["Seth <seth@opensource.com>"]
edition = "2022"
[dependencies]
rand = "*"
```
在 Rust 代码中使用它需要在最顶行使用 `use` 语句:
```
use rand::Rng;
```
以下是一些创建随机种子和随机范围的示例代码:
```
fn foo() {
  let mut rng = rand::thread_rng();
  let mut n = rng.gen_range(1..99);
  println!("Value is {}", n);
  n = rng.gen_range(1..99);
  println!("Value is {}", n);
}
```
你可以使用 `cargo run` 来运行它,它会检测代码是否被更改并触发一个新的构建。构建过程中下载名为 `rand``crete` 和它依赖的所有 `crate`,编译代码,然后运行它:
```
$ cargo run
Updating crates.io index
Downloaded ppv-lite86 v0.2.16
Downloaded 1 crate (22.2 KB) in 1.40s
 Compiling libc v0.2.112
 Compiling cfg-if v1.0.0
 Compiling ppv-lite86 v0.2.16
 Compiling getrandom v0.2.3
 Compiling rand_core v0.6.3
 Compiling rand_chacha v0.3.1
 Compiling rand v0.8.4
 Compiling rustpenguin v0.1.0 (/home/sek/Demo/rustpenguin)
 Finished dev [unoptimized + debuginfo] target(s) in 13.97s
 Running `target/debug/rustpenguin`
Species: R adeliæ
Genus: Pygoscelis
Classified in 1841
Value is 70
Value is 35
```
### Rust 速查表
Rust 是一门令人非常愉快的语言。集成了在线注册网站、有用的编译器和几乎直观的语法,它给人的适当的现代感。
但请不要误会Rust 仍是一门复杂的语言它具有严格的数据类型、强作用域变量和许多内置方法。Rust 值得一看,如果你要探索它,那么你应该下载我们的免费 [Rust 速查表][6],以便快速了解基础知识。越早开始,就越早了解 Rust。当然你应该经常练习以避免生疏。
> **[Rust 速查表][6]**
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/1/rust-cheat-sheet
作者:[Seth Kenlon][a]
选题:[lujun9972][b]
译者:[hanszhao80](https://github.com/hanszhao80)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/seth
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/coverimage_cheat_sheet.png?itok=lYkNKieP (Cheat Sheet cover image)
[2]: https://opensource.com/article/20/5/rust-java
[3]: http://rust-lang.org
[4]: https://crates.io/
[5]: mailto:seth@opensource.com
[6]: https://opensource.com/downloads/rust-cheat-sheet

View File

@ -0,0 +1,120 @@
[#]: subject: "Crop and resize photos on Linux with Gwenview"
[#]: via: "https://opensource.com/article/22/2/crop-resize-photos-gwenview-kde"
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
[#]: collector: "lujun9972"
[#]: translator: "geekpi"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14550-1.html"
用 Gwenview 在 Linux 上裁剪和调整照片大小
======
> Gwenview 是一个优秀的照片编辑器,适合业余摄影师在 Linux KDE 桌面上使用。
![](https://img.linux.net.cn/data/attachment/album/202205/05/221207dtkjbbe1jets7n3u.jpg)
一张好的照片可以蕴含很多信息。表面上它表达了你所看到的,但它也讲述了你所经历的。细微之处也能说明很多问题:你在拍照时选择的角度、取景中隐约可见的的东西有多大,以及,相比之下,那些有意识选择忽略的部分。
照片通常并不意味着记录真实发生的事情,相反,它们会成为你(摄影师)如何看待发生的事情的洞察力。
这就是照片编辑如此普遍的原因之一。当你把照片发布到你的在线图片库或社交网络时,你不应该发布一张不能准确表达照片所包含的感受的照片。但同样的道理,你也不应该成为一个专业的照片合成师,而只是为了剪掉在最后时刻将头伸进你的家庭快照的路人。如果你使用的是 KDE你可以使用 Gwenview 这种休闲照片编辑器。
### 在 Linux 上安装 Gwenview
如果你正在运行 KDE Plasma 桌面,你可能已经安装了 Gwenview。如果你没有安装或者你正在使用一个不同的桌面而你想尝试 Gwenview那么你可以用你的软件包管理器安装它。
我建议同时安装 Gwenview 和 Kipi 插件集,它可以将 Gwenview 与几个在线照片服务连接起来,这样你就可以轻松上传照片。在 Fedora、Mageia 和类似发行版上:
```
$ sudo dnf install gwenview kipi-plugins
```
在 Debian、Elementary 和类似版本上:
```
$ sudo apt install gwenview kipi-plugins
```
### 使用 Gwenview
Gwenview 通常有两种启动方式。你可以在 Dolphin 中点击图片文件,并选择在 Gwenview 中打开它;或者你可以启动 Gwenview并在文件夹中寻找照片Gwenview 或多或少可以充当你的文件管理器。第一种方法是直接的方法,很适合快速方便地预览图片文件。第二种方法是当你浏览大量照片,不确定哪一个版本的照片是“正确的”时,你可能会使用。
无论你如何启动 Gwenview界面和功能都是一样的右边有一个工作区左边有一个面板。
![Gwenview][2]
Seth Kenlon [CC BY-SA 4.0][3], Photo courtesy [Andrea De Santis][4]
在左边的面板下面,有三个标签:
* <ruby>文件夹<rt>Folders</rt></ruby>:显示你电脑上的文件夹的树状视图,以便你可以浏览你的文件,寻找更多的照片。
* <ruby>信息<rt>Information</rt></ruby>:提供关于你目前正在查看的照片的元数据。
* <ruby>操作<rt>Operations</rt></ruby>:允许你对当前的照片进行小的修改,如在横向和纵向之间旋转、调整大小和裁剪等。
Gwenview 能理解文件系统,所以你可以按键盘上的**右**或**左**箭头,查看文件夹中的上一张或下一张照片。
要离开单张照片视图并查看一个文件夹中的所有图片,请点击顶部工具栏中的“<ruby>浏览<rt>Browse</rt></ruby>”按钮。
![Browsing photos in a folder][5]
Seth Kenlon[CC BY-SA 4.0][3]
你也可以同时拥有两种视图。点击 Gwenview 底部的“<ruby>缩略图栏<rt>Thumbnail Bar</rt></ruby>”按钮,可以以电影胶片的形式看到当前文件夹中的其他图片,而当前选择的照片则在主面板中。
![Thumbnail view][6]
Seth Kenlon[CC BY-SA 4.0][3]
### 用 Gwenview 编辑照片
数码照片是很常见的,因此在网上发布或与朋友分享之前,需要对照片进行细微的调整也是同样常见。有非常好的应用可以编辑照片,事实上,其中最好的一个是另一个 KDE 应用,叫做 Krita你可以在我的 [给摄影者的 Krita][7] 文章中阅读我如何使用它来处理照片),但是小的调整不应该需要艺术学位。这正是 Gwenview 所确保的:用一个休闲但功能强大的应用进行简单而快速的照片调整,并与你的 Plasma 桌面的其他部分整合。
我们大多数人对照片进行的最常见的调整是:
* **旋转**:当你的相机没有提供正确的元数据让你的电脑知道一张照片是要以横向还是纵向观看时,你可以手动修复它。
* **镜像**:许多笔记本电脑或面部摄像头模仿镜子,这很有用,因为这是我们习惯于看到自己的方式。但是,它会使文字逆转。**镜像**功能可以从右到左翻转图像。
* **翻转**:在数码相机和笔记本电脑上不太常见,但在手机上,无论你怎么拿手机,使用倒置设备拍照的现象在屏幕翻转的手机中并不少见。**翻转**功能可将图像旋转 180 度。
* **调整大小**:数字图像现在通常具有超高清尺寸,有时这比你需要的要多得多。如果你通过电子邮件发送照片或将其发布在你想要优化加载时间的网页上,你可以将尺寸(和相应的文件大小)缩小到更小的尺寸。
* **裁剪**:你有一张很棒的自己的照片,但不小心偶然发现了一个你认为不合适的人。用裁剪工具剪掉你不想要的所有东西。
* **红眼**当你的视网膜将相机的闪光灯反射回相机时会得到红眼效果。Gwenview 可以通过在可调节区域中对红色通道进行去饱和和变暗来减少这种情况。
所有这些工具都在“<ruby>操作<rt>Operations</rt></ruby>”侧面板或“<ruby>编辑<rt>Edit</rt></ruby>”菜单中可用。这些操作具有破坏性,因此在你进行更改后,单击“<ruby>另存为<rt>Save As</rt></ruby>”以保存图像的 _副本_
![Cropping a photo in Gwenview][8]
Seth Kenlon[CC BY-SA 4.0][3],照片由 [Elise Wilcox][9] 提供)
### 分享照片
当你准备好分享照片时,单击顶部工具栏中的“<ruby>分享<rt>Share</rt></ruby>”按钮,或转到“<ruby>插件<rt>Plugins</rt></ruby>”菜单并选择“<ruby>导出<rt>Export</rt></ruby>”。Gwenview 与 Kipi 插件集成在一起,可以在 [Nextcloud][10]、[Piwigo][11]、普通旧电子邮件以及 Google Drive、Flickr、Dropbox 等服务共享照片。
### Linux 上的照片编辑要点
Gwenview 拥有桌面照片管理器的所有必需功能。如果你需要的不仅仅是基本功能,你可以在 Krita 或 [Digikam][12] 中打开一张照片并根据需要进行重大修改。对于其他一切从浏览、排名、标记和小调整Gwenview 都很方便。
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/2/crop-resize-photos-gwenview-kde
作者:[Seth Kenlon][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/seth
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/design_photo_art_polaroids.png?itok=SqPLgWxJ (Polaroids and palm trees)
[2]: https://opensource.com/sites/default/files/kde-gwenview-ui.jpg (Gwenview)
[3]: https://creativecommons.org/licenses/by-sa/4.0/
[4]: http://unsplash.com/@santesson89
[5]: https://opensource.com/sites/default/files/kde-gwenview-browse.jpg (Browsing photos in a folder)
[6]: https://opensource.com/sites/default/files/kde-gwenview-thumbnail.jpg (Thumbnail view)
[7]: https://opensource.com/article/21/12/open-source-photo-editing-krita
[8]: https://opensource.com/sites/default/files/kde-gwenview-crop.jpg (Cropping a photo in Gwenview)
[9]: http://unsplash.com/@elise_outside
[10]: https://opensource.com/article/20/7/nextcloud
[11]: https://opensource.com/alternatives/google-photos
[12]: https://opensource.com/life/16/5/how-use-digikam-photo-management

View File

@ -3,42 +3,43 @@
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lujun9972"
[#]: translator: "aREversez"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14547-1.html"
2022 最适合程序员的 10 款 Linux 发行版 [精选]
最适合程序员的 10 款 Linux 发行版
======
我们为程序员和开发人员总结了 2022 年最好用的 10 款 Linux 发行版,以便他们开展日常工作和个人项目。由于工作和项目需要,程序员和开发人员会用到各种工具和应用,包括代码编辑器、编译器、插件以及数据库等等。若对现代开发人员的工作流程做一番整理,一般流程如下:
![](https://img.linux.net.cn/data/attachment/album/202205/05/143612dml7eizi0vh170v7.jpg)
> 我们为程序员和开发人员总结了 2022 年最好用的 10 款 Linux 发行版,以便他们开展日常工作和个人项目。
由于工作和项目需要,程序员和开发人员会用到各种工具和应用,包括代码编辑器、编译器、插件以及数据库等等。若对现代开发人员的工作流程做一番整理,一般流程如下:
- 创建代码仓库
- 编程
- 调试
- 测试
- 配置
- 部署
上述工作流程需要用到各种各样的工具,一份标准的工具清单如下:
- 代码编辑器
- 简单的文本编辑器
- 网络浏览器(包括 web 开发人员使用的各种浏览器)
- 网页浏览器(包括 Web 开发人员使用的各种浏览器)
- 数据库引擎
- 本地服务器
- 各类编程语言的编译器
- 调试程序
- 调试
- 监视或分析工具(客户端或者网页端)
与 Windows 相比Linux 可以说是编程的最佳平台。之所以这样说,主要是因为 Linux 发行版与 Windows 不同,预装了许多功能强大的包和软件,自行安装也比较容易。在本文中,考虑到一些原因,我不会将 macOS 纳入对比范围之内。
综上,本文将整理出 2022 年最适合程序员的 10 款 Linux 发行版。
### 2022 最适合程序员的 10 款 Linux 发行版
#### 1、Fedora Workstation
#### 1、Fedora 工作站
![Fedora 35 Workstation][1]
@ -46,29 +47,29 @@
Fedora Linux 默认安装了开箱即用的主流开发软件包,包括 PHP、OpenJDK、PostgreSQL、Django、Ruby on Rails 以及 Ansible 等等。
dnf 是 Fedora Linux 的包管理器,有了它,安装代码编辑器以及其他软件就相当容易了。此外,你还可以使用应用商店 Software 一键搜索、安装软件。
dnf 是 Fedora Linux 的包管理器,有了它,安装代码编辑器以及其他软件就相当容易了。此外,你还可以使用“软件”应用商店一键搜索、安装软件。
Fedora Linux 支持 Snap 和 Flatpak使用起来会更加灵活方便。你还可以使用 RPM Fusion 仓库,获取大量免费或收费的软件。因为许可证等一些原因, Fedora Linux 不希望一些包储存在其主仓库内,于是就有了 RPM Fusion。
Fedora Linux 支持 Snap 和 Flatpak使用起来会更加灵活方便。你还可以使用 RPM Fusion 仓库,获取大量自由或非自由的软件。因为许可证等一些原因Fedora Linux 不希望在其主仓库内包括这些包,于是就有了 RPM Fusion。
点击下方链接,了解 Fedora Linux 最新版本。
[下载 Fedora][2]
> **[下载 Fedora][2]**
#### 2、Ubuntu Linux
![Ubuntu Desktop is a perfect Linux Distribution for Programmers.][3]
在今天,无论是服务器还是个人电脑,使用最为广泛的发行版当属 Ubuntu Linux。Ubuntu 提供长期支持版本,每个长期支持版本官方支持年限为五年(外加五年的维护支持),每年为高级用户提供两个短期版本。
在今天,无论是服务器还是个人电脑,使用最为广泛的发行版当属 Ubuntu Linux。Ubuntu 提供长期支持版本,每个长期支持版本官方提供五年的支持(外加五年的维护支持),并且每年为高级用户提供两个短期版本。
由于 Ubuntu 非常流行,各种包与软件的供应商都会提供适用于 Ubuntu 的版本(.deb。此外得益于广泛的知名度Ubuntu 有着更为庞大的论坛群体和更为丰富的帮助文档。所以说Ubuntu 是开发人员的最佳之选尤其是在开发过程中陷入难题的时候Ubuntu 更能发挥其作用。点击下方链接,了解更多。
[下载 Ubuntu][4]
> **[下载 Ubuntu][4]**
#### 3、openSUSE
openSUSE 是最稳定、最专业的 Linux 发行版之一,是企业界(包括个人电脑、服务器以及瘦客户机)的首选解决方案。openSUSE 作为关键系统,在世界范围内得到了广泛应用。
openSUSE 是用在全球关键系统中最稳定、最专业的 Linux 发行版之一,是企业界(包括个人电脑、服务器以及瘦客户机)的首选解决方案。
相较于 Ubuntu 和 FedoraopenSUSE 具有一些独特的优势。首先openSUSE 有两个版本Leap 和 Tumbleweed。其中openSUSE Leap 属于长期支持版为用户带来稳定的升级体验。openSUSE Tumbleweed 属于滚动发行版,有着最新、最强大的软件包。
相较于 Ubuntu 和 FedoraopenSUSE 具有一些独特的优势。首先openSUSE 有两个版本Leap 和 Tumbleweed。其中openSUSE Leap 属于长期支持版为用户带来稳定的升级体验。openSUSE Tumbleweed 属于滚动发行版,有着最新、最尖端的软件包。
如果你想获得最新的包和硬件支持,助力开发工作,你可以选择 openSUSE Tumbleweed如果你想要的是稳定性无需频繁维护即可长期运行openSUSE Leap 会更适合你。
@ -78,7 +79,7 @@ openSUSE 是最稳定、最专业的 Linux 发行版之一,是企业界(包
如果你有一些 Linux 发行版的使用经验,推荐选择 openSUSE 进行开发工作。
[下载 openSUSE][5]
> **[下载 openSUSE][5]**
#### 4、Manjaro Linux
@ -86,25 +87,21 @@ Manjaro Linux 基于 Arch Linux不过安装起来更容易一些。Manjaro Li
如果你想使用 Arch Linux 及其滚动发行的软件包来满足开发需求,但又不想在安装原版 Arch 上来回折腾Manjaro 绝对是你的最佳选择。
[下载 Manjaro][6]
> **[下载 Manjaro][6]**
#### 5、Arch Linux
尽管有 Manjaro 以及其他基于 Arch Linux 的发行版,而且安装操作非常简单,你可能还是想在自己的定制电脑上折腾一番,亲自动手[安装原版 Arch][7]。
尽管有 Manjaro 以及其他基于 Arch Linux 的发行版,而且安装操作非常简单,你可能还是想在自己的定制电脑上折腾一番,亲自动手 [安装原版 Arch][7]。
不过这种选择更适合程序员和开发人员,因为他们想得到更多的掌控权,或者想要定制一个 Linux 操作系统,用于开发项目或满足开发需求。这样一来,他们可能就会安装 Arch Linux选择自己最喜欢的桌面设置专用于开发工作的操作系统。
[][8]
推荐阅读:[Nitrux 最佳 Maui 应用程序][24]
假设你对 Arch Linux 和普通的电脑都比较熟悉,那么 Arch Linux 就是你的最佳选择,因为在自己定制的 Linux 操作系统上,你可以完全控制每一个软件包。
[下载 Arch Linux][9]
> **[下载 Arch Linux][9]**
#### 6、Pop OS
Pop OS即 Pop!_OS由电脑制造商 System76 针对其系列硬件开发,是一款基于 Ubuntu 的免费开源发行版。发行周期与 Ubuntu 保持同步,并为用户提供了额外的调整工具和软件包。
Pop OS即 Pop!_OS由电脑制造商 System76 针对其系列硬件开发,是一款基于 Ubuntu 的自由开源的发行版。发行周期与 Ubuntu 保持同步,并为用户提供了额外的调整工具和软件包。
![Pop OS 21.10 Desktop][10]
@ -114,7 +111,7 @@ Pop OS 基于 Ubuntu默认支持多种程序语言所以非常适合程序
如果你既想要基于 Ubuntu又想要适合程序员的稳定 Linux 发行版,推荐选择 Pop OS。
[下载 POP OS][11]
> **[下载 POP OS][11]**
#### 7、KDE Neon
@ -124,17 +121,17 @@ KDE Neon 基于 Ubuntu 长期支持版本,兼具最新的 KDE Plasma 桌面和
运行速度快,程序开箱即用,用户界面友好,广泛的社区支持,如你所愿,完美如斯。
[下载 KDE Neon][12]
> **[下载 KDE Neon][12]**
#### 8、Debian
Debian GUN/Linux 就无需过多介绍了。Debian 的稳定分支是 Ubuntu 及其衍生系统的基础。换句话说Debian 是最基本、最稳定的 Linux 发行版。优秀的稳定性和较长的支持时间使得 Debian 非常适合用做开发环境。
Debian GUN/Linux 就无需过多介绍了。Debian 的稳定分支是 Ubuntu 及其衍生系统的基础。换句话说Debian 是最主要、最稳定的 Linux 发行版之一。优秀的稳定性和较长的支持时间使得 Debian 非常适合用做开发环境。
不过Debian 的稳定分支比较保守,很少使用最新的软件包。毕竟全世界都依赖 Debian 的稳定运行,所以维护者在检查、合并软件包时必须十分谨慎。
不过Debian 的稳定分支比较保守,很少使用最新的软件包。毕竟全世界(几乎)都依赖 Debian 的稳定运行,所以维护者在检查、合并软件包时必须十分谨慎。
Debian 不仅能够长期稳定运行,而且维护成本较低,是高级用户和系统管理员绝佳的编程环境。
[下载 Debian Linux][13]
> **[下载 Debian Linux][13]**
#### 9、Kali Linux
@ -142,7 +139,7 @@ Kali Linux 由 Offensive Security 开发,服务对象为道德黑客和查找
对技术娴熟的程序员和开发人员来说Kali Linux 堪称最佳之选。如果你精通 Linux具备解决错误和依赖问题的经验推荐选择 Kali Linux。
[下载 Kali Linux][14]
> **[下载 Kali Linux][14]**
#### 10、Fedora Labs
@ -150,7 +147,9 @@ Kali Linux 由 Offensive Security 开发,服务对象为道德黑客和查找
Fedora Labs 为程序员、科学家、学生等各类人群提供各类专业化的 Linux 发行版,内置各类专业软件、包和工具。很多人并没有意识到 Fedora Labs 的优势,只要经过适当的配置,这些版本都是非常优秀的发行版。
我们来总结一下这些 Fedora Labs。
我们来总结一下这些 Fedora Labs
Fedora Scientific
* 采用 KDE Plasma 桌面,集成科学和数学领域的各种开源工具
* 软件清单如下:
@ -161,16 +160,20 @@ Fedora Labs 为程序员、科学家、学生等各类人群提供各类专业
* Pandas用于数据处理的 Python 库
* IPython
* Java 和 R 程序语言相关包
* 了解更多,请点击 [下载 Fedora Scientific][15]
> **[下载 Fedora Scientific][15]**
* 采用 GNOME 桌面环境,预装神经科学领域的各种开源包和应用。了解更多,请点击 [下载 Comp Neuro][25]
Fedora COMP NEURO
* 采用 GNOME 桌面环境,预装神经科学领域的各种开源包和应用。
> **[下载 Comp Neuro][25]**
Fedora Robotics Suite
* 集成各种开源机器人技术包和软件,适合初学者、资深计算机科学家和编程人员。
* 了解更多,[下载 Fedora Robotics][16].
> **[下载 Fedora Robotics][16]**
除了上述版本,还有 [Fedora Security Labs][17]、[Fedora Astronomy][18] 和 [Fedora Python Classroom][19] 可供选择。
@ -180,9 +183,7 @@ Fedora Labs 为程序员、科学家、学生等各类人群提供各类专业
那么,怎样才能从以上 10 款 最适合程序员的 Linux 发行版中选出自己最喜欢的呢?
如果你想要一款开发系统,但又不想耗费太多精力,拿不定主意的话,推荐使用 Fedora Workstation 或者 Ubuntu。
If you have spare time or want more control in your system, like experimenting and being comfortable with occasional errors, then go for Arch Linux based systems.
如果你想要一款开发系统,但又不想耗费太多精力,拿不定主意的话,推荐使用 Fedora 工作站或者 Ubuntu。
如果你的空闲时间比较多或者想要进一步掌控自己的系统,乐于尝试并且能够忍受偶尔发生的错误,推荐选择基于 Arch Linux 的系统。
@ -192,10 +193,6 @@ If you have spare time or want more control in your system, like experimenting a
祝你好运!
* * *
我们分享最新的技术、软件等重要新闻资讯,关注我们的 [Telegram][20]、[Twitter][21]、[YouTube][22] 和 [Facebook][23],不要错过最新内容!
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/2022/03/top-linux-distributions-programmers-2022/
@ -203,7 +200,7 @@ via: https://www.debugpoint.com/2022/03/top-linux-distributions-programmers-2022
作者:[Arindam][a]
选题:[lujun9972][b]
译者:[aREversez](https://github.com/aREversez)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -0,0 +1,224 @@
[#]: subject: "A guide to JVM parameters for Java developers"
[#]: via: "https://opensource.com/article/22/4/jvm-parameters-java-developers"
[#]: author: "Jayashree Huttanagoudar https://opensource.com/users/jayashree-huttanagoudar"
[#]: collector: "lkxed"
[#]: translator: "Veryzzj"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14553-1.html"
面向 Java 开发人员的 JVM 参数指南
======
![](https://img.linux.net.cn/data/attachment/album/202205/06/134624iiubdjkqmxaaqhmx.jpg)
> 通过理解和使用 JVM 以及 JVM 参数开发人员和最终用户都可以诊断故障并且提高 Java 应用程序的性能。
当你在编写源代码时你是在编写人类可以阅读的代码。在将代码编译成机器语言之前计算机无法执行它。机器语言是一个通用术语指的是特定机器所需的任意数量的语言。通常如果你在 Linux 上编译代码它只能 Linux 上运行如果你在 Windows 上编译代码它就只在 Windows 上运行。但是Java 是不同的它并不以真实的机器为目标而是面向 <ruby>Java 虚拟机<rt>Java Virtual Machine</rt></ruby>JVM。因此它可以在任何机器上运行。
Java 源代码被编译成<ruby>字节码<rt>bytecode</rt></ruby>,然后由安装在计算机上的 JVM 运行。JVM 是一个执行引擎但我们通常不会直接与它交互。它在后台静默运行替我们处理 Java 字节码。大多数人不需要考虑甚至也不需要知道 JVM。但是了解它的工作原理是对我们来说是非常有用的因为这会有助于我们调试和优化 Java 代码。例如
* 在生产环境中,你发现已经部署的应用程序可能需要提升性能。
* 如果你写的应用程序出错了,开发人员和最终用户都可以选择对问题进行调试。
* 如果你想了解关于 JDK<ruby>Java 开发工具包<rt>Java Development Kit</rt></ruby>,用于开发/运行 Java 应用程序)的详细信息,你可以通过查询 JVM 来获取。
本文介绍了一些基础的 JVM 参数希望在这些场景中可以提供帮助。
![JVM 参数][2]
图源Jayashree HuttanagoudarCC BY-SA 4.0
### JVM、JDK 和 JRE 有什么不同?
Java 有许多 J 开头的缩略词包括 JVM、JDK  JRE。
* <ruby>Java 开发工具包<rt>Java Development Kit</rt></ruby>JDK可供需要在代码中使用开发库的程序员使用。
* <ruby>Java 运行时环境<rt>Java Runtime Environment</rt></ruby>JRE可供想运行 Java 应用程序的人使用。
* <ruby>Java 虚拟机<rt>Java Virtual Machine</rt></ruby>JVM是运行 Java 字节码的组件。
JDK 同时包含 JRE  JVM但有些 Java 发行版提供了包含 JRE包括 JVM的替代下载。
![JDK][3]
图源Jayashree HuttanagoudarCC BY-SA 4.0
Java 是开源的因此许多不同的公司都会构建和发行他们自己的 JDK 发行版。你可以在系统上安装多个 JDK这会对你参与或者运行不同的 Java 项目时很有帮助因为其中一些项目可能使用旧版本的 JDK。
你可以使用 `alternatives` 命令,来查看 Linux 系统上的 JDK 列表
```
$ alternatives --config java
There are 2 programs that provide java.
Selection Command
-----------------------------------------------
*+ 1 java-11-openjdk.x86_64 (/usr/lib/jvm/java-11-openjdk-11.0.13.0.8-2.fc35.x86_64/bin/java)
2 java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.312.b07-2.fc35.x86_64/jre/bin/java)
Enter to keep the current selection[+], or type selection number:
```
如果想要在可用的 JDK 之间进行切换请再次执行该命令
```
$ sudo alternatives --config java
```
或者可以使用 [SDKMan][4]它可以下载、更新和管理系统中的所有 JDK。
### 什么是 JVM 调优?
JVM 调优指的是通过调整 JVM 参数来提高 Java 应用程序性能的过程它还有助于诊断应用程序的故障。
通常情况下,在调试之前需要考虑以下几点:
* **成本**:有时改进运行代码的硬件可以提高应用程序的性能。这可能看起来像是在“作弊”,但请考虑你愿意花多少时间调整 JVM 参数。有时应用程序需要更多的内存来执行所需的功能,而这点是任何软件技术都无法改变的。
* **期望结果**:长期来看,稳定性比性能更重要。如果你的调优对稳定性产生了影响,那么谨慎地选择你的调优参数可能会更好。
* **底层问题**:有时,问题可能是主机操作系统的底层问题。那么,在调整 JVM 之前,请确保 JVM 平台按预期工作。
* **内存泄漏**如果你在使用垃圾回收GC调优参数那么应用程序代码中很可能会存在需要修复的内存泄漏。
### 参数类型
JVM 参数可以分为以下三类标准参数、非标准参数和高级选项。
#### 标准参数
所有的 JVM 实现都支持标准参数在终端执行 `java` 命令来查看标准参数列表:
```
$ java
Usage: java [options] <mainclass> [args...]
(to execute a class)
or java [options] -jar <jarfile> [args...]
(to execute a jar file)
where options include:
-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
--class-path <class search path of directories and zip/jar files>
A : separated list of directories, JAR archives,
and ZIP archives to search for class files.
--enable-preview
allow classes to depend on preview features of this release
To specify an argument for a long option, you can use --<name>=<value> or
--<name> <value>.
```
这些是所有 JVM 都会包含的标准参数,你可以像使用任何 [命令行选项][5] 一样安全地使用它们。例如要验证配置的命令选项创建 VM 并加载主类而不执行主类请使用
```
$ java --dry-run <classfile>
```
#### 非标准参数
非标准选项以 `-X` 开头。这些是通用的并且特定于 JVM 的特定实现。要列出这些参数请输入
```
$ java -X
-Xbatch disable background compilation
-Xbootclasspath/a:<directories and zip/jar files separated by :>
append to end of bootstrap class path
-Xinternalversion
displays more detailed JVM version information than the
-version option
-Xloggc:<file> log GC status to a file with time stamps
[...]
```
在这些参数可能会不经通知就发生变化。而且并非所有 JVM 实现都支持这些参数。
微软构建的 JVM 可能与 RedHat 构建的 JVM 有不同的参数诸如此类。
要获取详细的 JVM 版本信息请使用如下命令
```
$ java -Xinternalversion --version
OpenJDK 64-Bit Server VM (11.0.13+8) for linux-amd64 JRE (11.0.13+8), built on Nov 8 2021 00:00:00 by "mockbuild" with gcc 11.2.1 20210728 (Red Hat 11.2.1-1)
```
要获取这些属性设置,请使用:
```
$ java -XshowSettings:properties --version
```
#### 高级选项
这些参数不是随意使用的而是用于调整 Hotspot VM 的特定区域。这些参数可能会发生变化并且不能保证得到所有 JVM 实现的支持。
这些参数以 `-XX` 开头。如需列出参数列表,使用如下命令:
```
$ java -XX:+UnlockDiagnosticVMOptions -XX:+PrintFlagsFinal -version
```
例如,需要跟踪类的加载,那么使用下面的命令:
```
$ java -XX:+TraceClassLoading Hello
```
`Hello.java` 中:
```
public class Hello {
public static void main(String[] args) {
System.out.println("Inside Hello World!");
}
}
```
另一个可能会面临的问题是 OOM<ruby>内存超出<rt>Out Of Memory</rt></ruby>)错误,它发生的时候可能没有太多的调试信息。为了解决这个问题,使用调试参数 `-XX:+HeapDumpOnOutOfMemoryError`,它可以创建一个带有调试信息的 `.hprof` 文件。
```
// TestClass.java
import java.util.ArrayList;
import java.util.List;
public class TestClass {
public static void main(String[] args) {
List<Object> list = new ArrayList<Object>();
for (int i = 0; i < 1000; i++) {
list.add(new char[1000000]);
}
}
}
```
```
$ Javac TestClass.java
$ java -XX:+HeapDumpOnOutOfMemoryError -Xms10m -Xmx1g TestClass
java.lang.OutOfMemoryError: java heap space
Dumping heap to java_pid444496.hprof ...
Heap dump file created [1018925828 bytes in 1.442 secs]
Exception in thread "main" java.lang.OutOfMemoryError: java heap space
at TestClass.main(TestClass.Java:8)
```
[有一些工具][6] 可以查看这个 `.hprof` 文件以了解问题所在。
### 总结
通过了解和使用 JVM 以及 JVM 参数开发人员和终端用户都可以诊断故障并提高 Java 应用程序的性能。下次使用 Java 请花点时间看看有哪些参数可以用吧
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/4/jvm-parameters-java-developers
作者:[Jayashree Huttanagoudar][a]
选题:[lkxed][b]
译者:[Veryzzj](https://github.com/Veryzzj)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/jayashree-huttanagoudar
[b]: https://github.com/lkxed
[1]: https://opensource.com/sites/default/files/lead-images/lenovo-thinkpad-laptop-window-focus.png
[2]: https://opensource.com/sites/default/files/2022-03/java-jvm-parameters.jpg
[3]: https://opensource.com/sites/default/files/2022-03/jdk.jpg
[4]: https://opensource.com/%5Bhttps%3A//opensource.com/article/22/3/manage-java-versions-sdkman%5D%28https%3A//opensource.com/article/22/3/manage-java-versions-sdkman%29
[5]: https://opensource.com/%5Bhttps%3A//opensource.com/article/21/8/linux-terminal%5D%28https%3A//opensource.com/article/21/8/linux-terminal%29
[6]: https://opensource.com/%5Bhttps%3A//docs.oracle.com/javase/7/docs/technotes/tools/share/jhat.html%5D%28https%3A//docs.oracle.com/javase/7/docs/technotes/tools/share/jhat.html%29

View File

@ -0,0 +1,105 @@
[#]: subject: "Documentation Isnt Just Another Aspect of Open Source Development"
[#]: via: "https://www.opensourceforu.com/2022/04/documentation-isnt-just-another-aspect-of-open-source-development/"
[#]: author: "Harsh Bardhan Mishra https://www.opensourceforu.com/author/harsh-bardhan-mishra/"
[#]: collector: "lkxed"
[#]: translator: "lkxed"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14545-1.html"
文档并不是开源项目开发的附属品
======
有些项目长期保持活跃,有些项目却过早消亡 —— 这两者的区别往往在于它们的文档。严谨、聪明的文档可以给你的项目带来它所需要的动力。你应该把文档工作视为一项主要工作,把它与开发相提并论,下面我将说明这么做的理由和正确的做法。
![](https://img.linux.net.cn/data/attachment/album/202205/05/090003l7xrtrwszw6u4wqu.jpg)
经常会有开发者简单地认为他们的代码的“<ruby>自我描述<rt>self-documented</rt></ruby>”已经足够了,继而认为额外的文档是没有必要的。这种过度的自信会让项目付出很大的代价。匮乏或差劲的文档会扼杀你的项目。没有适当的文档,用户将无法理解项目的目标以及正确的工作流程。这可能会导致人们对采用你的开源产品产生一些疑虑。
### 撰写文档,从项目第一天就开始
文档不应该是次要的工作,它应该是与代码开发和管理同等的主要任务。随着内容以 Community Threads、Stack Overflow 和 Quora 问答等形式的广泛传播,文档承担了“<ruby>信息源<rt>source of truth</rt></ruby>”的角色。它应该满足那些想参考一手资料的贡献者的需要,并给工程师提供必要的参考支持。它还应该与利益相关者沟通基本计划。一个好的文档可以确保产品的持续改进和发展。
当发布一个软件产品时,我们不仅要发布代码,还要发布好的文档。这给我们带来了一个最重要的概念,大多数良好维护了文档的开源项目都遵循这个概念 —— “<ruby>文档即代码<rt>Documentation as code</rt></ruby>”。
### 文档及代码
今天,文档不再被存储为微软 Word 或 PDF 文件。新的需求是版本控制文档,其中所有的文档都是通过版本控制系统添加的,并持续发布。这个概念因 Read the DocsLCTT 译注:一个文档创建、托管和浏览的平台)而流行,现在已经成为大多数文档团队的内容策略的重要组成部分。
像 Bugzilla 和 GitHub <ruby>议题<rt>Issue</rt></ruby>这样的工具可以用来跟踪待处理的文档工作,并从维护者和用户那里获得反馈以验证文档的发布。外部审查可以用来验证文档作品,并持续发布文档。这就保证了除代码外,文档也能不断改进并快速发布。
请记住,如果不遵循规范化的实践,每个文档都会不同。这可能会导致一些混乱,使人们难以获取正确的信息。
哪些东西会被归类为混乱呢?当大多数文件都不遵循规范实践时,不一致就会产生,从而导致更大的混乱!那么,如何整理混乱的开源文档呢?
### 整理混乱的开源文档
遵循一个“文档风格指南”是很重要的。风格指南是创建和展示内容的指导方针的集合。无论你是一个独立的作家还是一个大型文档团队的成员,它都有助于在你的文档中保持一致的风格、口音和语气。
有几个流行的风格指南,如《红帽风格指南》、《谷歌文档风格指南》和《苹果风格指南》。如何选用?首先要从定义你的需求开始。如果你的要求与其他开源项目没有太大区别,你可以遵循一个现成的风格指南,或者你也可以先选一个,然后在它的基础上根据自身需要做一些修改。大多数与语法有关的准则和内容规则可能是通用的,但整体术语可能会有所不同。
你还需要在你的项目中自动采用这些风格指南。为此,你可以使用 Vale它集成了本地的持续集成CI服务该服务能帮助你确保文档严格遵循风格指南。
> **文档类型**
>
> * *自述文件*:包含基本的安装和使用说明,这也是任何开源文档中最重要的部分之一。它是潜在的用户/开发者与项目之间的第一个连接点。
> * *参考指南*:可能包括一些基本的参考资料,以便帮助你快速上手,或者是与项目贡献相关的文档。
> * *用户文档*:是最基本的文档,它描述了项目的使用方式。如果没有用户文档,大多数人就会对如何使用该项目感到迷茫。
> * *开发文档*:旨在支持开发团队在项目中不断取得新的进展。它还应该为内部开发工作提供一个良好的途径,并确保功能被很好地传达给股东。
> * *社区内容*:包括基本的博客、视频和外部内容,旨在为那些想进一步了解项目的社区成员提供支持。
通过使用风格指南,文件的整体前提将以统一的语言风格传达给用户。但是,这些文件毕竟是由一个技术作家团队准备的,它们的写作风格可能会冲突,因为写作风格是因人而异的。那么,如何才能使文档规范化呢?
### 规范化文档
当涉及到规范化文档时,有许多方法可以采取。第一个方法显然是创建适用于各种角色的预定义模板。这些模板可以用来记录新的功能、识别错误和问题,以及更新变更日志以适应正在增加的新内容。
如果你采用的是基于 Git 的工作流,试着开发一个规范的工作流程来发布你的文档。最规范的工作流是:<ruby>复刻<rt>fork</rt></ruby> 发布文档的仓库,在本地分支上添加你的修改,推送这些修改,提出请求并要求对其进行审查。规范化文档的一个好处就是带来更好的反馈和审查过程。
### 反馈和自动审查
规范化使得你能够得到用户的反馈并生成自动的审查,可以参考这些反馈来改进项目和文档。通过这些反馈,你也可以评估所分享的信息对用户是否有意义。像 GitBook 这样的文档平台会提供合适的反馈服务,这有助于验证文档是否有用。
始终寻求<ruby>主题专家<rt>subject matter expert</rt></ruby>SME对文档的反馈他们可以是利益相关者、开发者、工程师甚至是外部贡献者。你也可以使用自动测试和 CI 来验证你的文档是否遵循风格指南。
### 文档众包
如果你想开源你的文档,最好的方法也许是提供一个快速入门指南。它可以像 `CONTRIBUTING.md` 那样简单,基本上只要说明该如何设置项目并为其作出贡献/单纯使用它即可。
始终开发以用户为中心的文档,标明每个项目的目的。同时,打造学习课程来帮助新的贡献者。
> **带着目的编写文档**
>
> 始终带着目的编写文档。它是最基本的写作策略之一,它定义了你编写某个特定文档的理由,而非方式。首先回答以下问题:
>
> * 这个文档的目标是什么?
> * 需要传递的信息是什么?
> * 你希望用户在这之后采取什么行动?
> * 我与读者分享的价值观是什么?
> * 我的文档风格是否简洁、一致?
### 定义一致的内容策略
一致的内容策略有助于确保文档工作和项目基础设施的长期愿景。它可以围绕以下两个主要方面:
1. 资源:包括项目文档、案例研究和白皮书、项目架构等
2. 品牌内容:博客和特邀帖子、新闻和社区故事、学习课程等
每个开源项目都应该有适当的文档,以说明它能为用户提供的功能,这样用户就可以选择最合适的解决方案。适当的文档可以传达正确的信息,也可以让其他开发者贡献力量来进一步加强和改进项目。虽然听起来很简单,但只有做对了,文档才能成功。而你的项目,反过来,只有在你的文档正确的情况下才能成功,所以永远不要低估它的目标或过程!
策划Laveesh Kocher
--------------------------------------------------------------------------------
via: https://www.opensourceforu.com/2022/04/documentation-isnt-just-another-aspect-of-open-source-development/
作者:[Harsh Bardhan Mishra][a]
选题:[lkxed][b]
译者:[lkxed](https://github.com/lkxed)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.opensourceforu.com/author/harsh-bardhan-mishra/
[b]: https://github.com/lkxed
[1]: https://www.opensourceforu.com/wp-content/uploads/2022/03/Importance-of-documentation-696x477.jpg

View File

@ -0,0 +1,123 @@
[#]: subject: "5 Less Popular Features that Make Ubuntu 22.04 LTS an Epic Release"
[#]: via: "https://www.debugpoint.com/2022/04/ubuntu-22-04-release-unique-feature/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lujun9972"
[#]: translator: "geekpi"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14546-1.html"
使 Ubuntu 22.04 LTS 成为史诗版本的 5 个不太流行的功能
======
> 这是一份关于 Ubuntu 22.04 LTS 的次要特点的列表,这些特点使它成为迄今为止最好的 LTS 版本之一。
Canonical 的最新 LTS 版本 [Ubuntu 的代号为 “Jammy Jellyfish”][1] 受到了全球用户的好评。但是有数百个新的微小功能,以及一些不太流行的功能,没有引起人们的注意。因此,这里有五个 Ubuntu 22.04 的独特功能,我们认为这些功能可以使它成为一个史诗般的版本。
![](https://img.linux.net.cn/data/attachment/album/202205/05/112722nabll6gs7s6sgzdr.jpg)
### Ubuntu 22.04 发布 五个独特的功能
#### 为数据驱动的方案进行了优化
数据分析和处理是当今每个企业的核心。而要做到这一点你需要巨大的计算能力。Ubuntu 22.04 LTS 带来了开箱即用的 [英伟达虚拟 GPUvGPU][3] 驱动支持。这意味着你可以利用英伟达虚拟 GPU 软件,使你能够在虚拟机中使用从物理 GPU 服务器共享的 GPU 计算能力。
不仅如此,如果你的业务依赖于 SQL ServerUbuntu LTS for Azure 带来了 Ubuntu 中的 SQL Server它由 “Micro$oft” 支持,提供优化的性能和可扩展性。
#### 改进的活动目录集成
此外,许多企业在多个工作站中为整个企业用户部署 Ubuntu。而且部署工作站策略以监测和控制用户访问和各种关键业务控制非常重要。
活动目录实现了基于策略的工作站管理(在 Ubuntu 20.04 中引入),在这个版本中得到了进一步改善。除此之外,这个版本还带来了 [ADsys][4] 客户端,它有助于通过命令行远程管理组策略、权限升级和远程脚本执行。从这个版本开始,活动目录现在也支持与高级组策略对象的安装程序集成。
#### 实时内核支持
此外,在 Ubuntu 22.04 LTS 发布期间Canonical 宣布的一个有趣的消息是提供“实时”内核选项现在是测试版。对于电信和其他行业来说一个低延迟的操作系统对于时间敏感的工作是必需的。因此考虑到这一点和渗透到这些领域的愿景Ubuntu 22.04 LTS 带来了一个应用了 PREEMPT_RT 补丁的实时内核构建。它可用于 x86_64 和 AArch64 架构。
然而,该 [补丁][5] 还没有在主线内核中出现,希望它能很快能出现。
#### 最新的应用、软件包和驱动程序
除了上述变化之外,这个版本还带来了大量的软件包和工具链的升级。例如,这个版本带来了基于各种用途的多种 Linux 内核类型,如 Ubuntu 桌面可以选择使用 [内核 5.17][6],而硬件启用内核仍然是 5.15。
不仅如此Ubuntu Server 采用长期支持版的 [内核 5.15][8],而 Ubuntu Cloud 镜像可以选择使用与云供应商合作的更优化的内核。
此外如果你是英伟达用户值得一提的是ARM64 上的英伟达驱动的 Linux 限制模块现在已经可用(在 x86_64 中已经可用)。你可以使用 [ubuntu-drivers][9] 程序来安装和配置英伟达驱动。
核心模块和子系统构成的完整的操作系统可以完美无缺地工作。因此考虑到这一点Ubuntu 22.04 LTS 对它们都进行了仔细的升级,以迎合这个很好的版本。以下是简介:
GNU/Linux 核心:
* GCC 11.2.0
* binutils 2.38
* glibc 2.35
编程工具链:
* Python 3.10.4
* Perl 5.34.0
* LLVM 14
* golang 1.18
* rustc 1.58
* OpenJDK 11可选使用 OpenJDK 18
* Ruby 3.0
* PHP 8.1.2
* Apache 2.4.52
* PostgreSQL 14.2
* Django 3.2.12
* MySQL 8.0
* 更新的 NFS 以及 Samba Server
* Systemd 249.11
* OpenSSL 3.0
虚拟化:
* qemu 6.2.0
* libvirt 8.0.0
* virt-manager 4.0.0
#### 性能提升
但这还不是全部。由于一些长期等待的更新,你应该体验到更快的 Ubuntu 22.04 Jammy Jellyfish这些体验最终会在这个版本中出现。
首先,长期等待的 GNOME 桌面的 [三重缓冲代码] 已经来到。当先前的帧缓冲落后时,三重缓冲会自动启用,它在英特尔和树莓派驱动中产生了更快的桌面性能。不仅如此,代码还监控最后一帧,以便系统不会遇到过量缓冲的情况。
其次,改进的电源管理,在运行时对 AMD 和英伟达的 GPU 起作用,将帮助笔记本电脑用户。
此外Wayland 现在是大多数系统的默认显示服务器,除了英伟达 GPU 硬件默认为 X11。Wayland 为你提供了更快的跨应用的桌面体验,包括网页浏览器。
最后,定制的 GNOME 42 及其 [独特功能][11](例如平衡和省电电源配置文件)为重度笔记本电脑用户提供了更多优势。此外,带有浅色/深色外观的新强调色和将选定的 GNOME 模块移植到 GTK4/libadwaita 只是这个史诗般的 Ubuntu 22.04 LTS 版本的一个补充。
### 结论
总而言之,就上述所有内容的变化和许多其他方面而言,我相信这是 Canonical 发布的最好的 LTS 版本之一。
我们希望它得到好评,并在未来能保持稳定。
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/2022/04/ubuntu-22-04-release-unique-feature/
作者:[Arindam][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.debugpoint.com/author/admin1/
[b]: https://github.com/lujun9972
[1]: https://www.debugpoint.com/2022/01/ubuntu-22-04-lts/
[2]: https://www.debugpoint.com/wp-content/uploads/2022/04/Ubuntu-22.04-LTS-Desktop-GNOME-1024x580.jpg
[3]: https://docs.英伟达.com/grid/latest/grid-vgpu-release-notes-ubuntu/index.html
[4]: https://github.com/ubuntu/adsys
[5]: https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-stable-rt.git/
[6]: https://www.debugpoint.com/2022/03/linux-kernel-5-17/
[8]: https://www.debugpoint.com/2021/11/linux-kernel-5-15/
[9]: https://launchpad.net/ubuntu/+source/ubuntu-drivers-common
[10]: https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1441
[11]: https://www.debugpoint.com/2022/03/gnome-42-release/
[12]: https://t.me/debugpoint
[13]: https://twitter.com/DebugPoint
[14]: https://www.youtube.com/c/debugpoint?sub_confirmation=1
[15]: https://facebook.com/DebugPoint

View File

@ -0,0 +1,117 @@
[#]: subject: "Exciting New Features Revealed for KDE Plasma 5.25! Take a Look Here"
[#]: via: "https://news.itsfoss.com/plasma-5-25-features/"
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
[#]: collector: "lujun9972"
[#]: translator: "PeterPan0106"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14532-1.html"
KDE Plasma 5.25 推出了令人激动的新特性!先睹为快
======
> 作为 KDE 的下一次桌面环境升级Plasma 5.25 包含了一些令人耳目一新的新功能!在这里,我们可以看到它的一些新功能。敬请阅读。
![](https://news.itsfoss.com/wp-content/uploads/2022/04/kde-5-25-release.png)
[KDE Plasma 5.24][1] 提供了关于 breeze 主题的更新,并对多任务“概览”界面进行了修改。
现在,开发者们已经准备好向大家介绍 KDE Plasma 5.25 令人激动的新特性。
### KDE Plasma 5.25 :拥有哪些新功能?
Nate Graham 在一篇博文中着重介绍了一些最为有趣的变化,让我们一起先睹为快。
#### 有选择地应用全局主题的部分样式
![来源: Pointiestick Blog / Nate Graham][2]
当你在系统设置里应用一个全局主题时,系统会提示你应用全部的样式或是仅仅应用其中一部分样式。
例如,当你更换桌面背景以及应用样式时,你可能并不愿意更换鼠标指针和图标。
总体而言,当你在基于 KDE 的系统上应用全局主题时,你将能够更为自由地设置你的样式。
这个令人惊叹的 [贡献][3] 来自 Dominic Hayes。
#### 根据当前壁纸自动生成强调色
尽管能够使用预设或自定义的强调色已经很好了。
但在 KDE Plasma 5.25 上,他们更进一步,允许让系统根据当前壁纸自动生成并使用强调色。
只要你选择了这一选项,每次更换壁纸时系统会自动生成匹配的强调色,无需额外操作。
你可以在这里找到相关选项:
![来源: Pointiestick Blog / Nate Graham][4]
所以如果你希望桌面和你的壁纸更为匹配,你无需反复进入设置去调整强调色来做到这一点。这个自动生成的功能将会使这一需求更容易完成。
这是一个对新特性库增添的很小但十分强大的功能。感谢来自 Tanbir Jishan 的 [贡献][5]。
#### 基于强调色的配色方案
为了进一步加强个性化的视觉体验, KDE Plasma 5.25 允许你增加基于强调色的个性化配色方案。
![来源: Jan Blackquill][6]
你可以自由选择是否使用个性化配色方案。
关于这一特性的详情请见 Jan Blackquill 的 [贡献][7]。
#### 为 Flatpak/Snap 应用提供桌面文件编辑权限
之前, Flatpak/Snap 应用在 KDE 上并不支持桌面文件(`.desktop`)。
得益于最新的 “动态启动器” 门户(来自 Harald Sitter 的 [贡献][8]),这将允许你创建和编辑桌面文件,从而使沙盒应用程序无缝集成到系统。
#### 对“发现”的更多优化
在“发现”软件中心有一些细微的调整。你将可以在侧边栏中找到所有的应用程序类别而无需经由“应用”、“插件”和“Plasma 插件”等子类别分别选择。
KDE Discover 修改前和修改后(贡献者:[Taavi Juursalu][9]
![修改前][12]
![修改后][13]
关于这一变化详情请见 [合并请求][10] 。
#### 其他优化
针对 KDE Plasma 5.25 还计划的其他优化,包括:
* 针对 KRunner 的性能优化
* 网络组件增添了频率信息以及 Wi-Fi 网络的 BSSID 详细信息
所有错误修复与优化可在 [Nate 的博文][11] 中查看:
期待 KDE Plasma 5.25 吗?有了这些新特性,我十分期待它的正式发布。如果你有任何想法欢迎在下方评论。
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/plasma-5-25-features/
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[PeterPan0106](https://github.com/PeterPan0106)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://news.itsfoss.com/kde-plasma-5-24-lts-release/
[2]: https://news.itsfoss.com/wp-content/uploads/2022/04/kde-plasma-5-25.jpg
[3]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1043
[4]: https://news.itsfoss.com/wp-content/uploads/2022/04/plasma-5-25-tinted-wallpaper-accent.jpg
[5]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1325
[6]: https://news.itsfoss.com/wp-content/uploads/2022/04/tint-color-scheme.png
[7]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1620
[8]: https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/commit/d5f958e149705e27bbba9f3bbec659ff5bed1d80
[9]: https://invent.kde.org/taavi
[10]: https://invent.kde.org/plasma/discover/-/merge_requests/234
[11]: https://pointieststick.com/2022/04/22/this-week-in-kde-major-accent-color-and-global-theme-improvements/
[12]: https://news.itsfoss.com/wp-content/uploads/2022/04/kde-discover-plasma-5-25.png
[13]: https://news.itsfoss.com/wp-content/uploads/2022/04/kde-plasma-5-25-discover.png

View File

@ -0,0 +1,105 @@
[#]: subject: "How to Upgrade to Pop OS 22.04 LTS from 21.10 [Step by Step]"
[#]: via: "https://www.debugpoint.com/2022/04/upgrade-pop-os-22-04-from-21-10/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lujun9972"
[#]: translator: "hwlife"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14561-1.html"
分步指南:从 Pop OS 21.10 更新到 Pop OS 22.04 LTS
======
![](https://img.linux.net.cn/data/attachment/album/202205/08/094819p7c49e1fc9b4vc15.jpg)
> 从 Pop OS 21.10 升级到 Pop OS 22.04 LTS 的简单步骤。
System76 跟着 [Ubuntu 22.04 LTS][2] [发布][1] 了 Pop OS 22.04 LTS 它带来了一些令人兴奋的功能。Pop OS 22.04 LTS 是来自 System76 发布的长期支持版本,它带来了自动计划更新、自定义的 GNOME 42、底层性能改进和 [许多其它的功能][3]。
你肯定很想体验一下,计划更新到 Pop OS 22.04 。这里我给出你升级 Pop OS 22.04 LTS 的步骤。
注意: 你不能直接从 Pop OS 20.04 升级到 Pop OS 22.04 。首先,你需要先升级到 Pop OS 21.10,然后按照此处概述的步骤升级到这个版本。
### 从 Pop OS 21.10 升级到 Pop OS 22.04
#### 升级之前的准备
Pop OS 升级过程是相对稳定的。因为根据我们 [上一篇关于升级的文章][4],许多用户面临升级方面的问题。但是如果你正在使用英伟达硬件运行 Pop OS ,我建议你做个备份。
* 确保你的系统是最新的。你可以使用 Pop 商店应用检查更新。或者,你可以打开终端提示符并运行以下命令更新:
```
sudo apt update && sudo apt upgrade
```
* 按照以上步骤升级完成之后,重启系统。
* 备份你的文档、照片、视频和其它文件到独立的磁盘分区或者 USB 驱动器。
* 升级之前,禁用所有 GNOME 扩展。许多扩展会阻挡迁移到 GNOME 42 的过程,最好在你升级之前禁用所有扩展,之后再启用它们。
* 记下所有额外的软件源或你已经添加的 PPA 仓库,因为它们可能与 “jammy” 分支不兼容。升级之后你可能需要验证它们。
* 关闭所有运行的程序。
* 最后,确保你有时间和稳定的网络连接来完成升级。
### Pop OS 22.04 LTS 的升级步骤
#### 图形界面升级方法
如果你正在运行的是 Pop OS 21.10 ,你应该看到如下提示是否你的系统需要升级。
![Pop OS 22.04 升级提示][6]
或者,你可以打开 “<ruby>设置<rt>Settings</rt></ruby>” 然后访问 “<ruby>系统升级和恢复<rt>OS Upgrade and Recovery</rt></ruby>” 标签。这里你应该看到有系统更新信息。
![Pop OS 22.04 在设置标签的提示][7]
点击 “<ruby>Download<rt>下载</rt></ruby>” 开始升级过程。
#### 升级到 Pop OS 22.04 LTS 的终端方法
* 打开终端运行以下命令:
```
sudo apt update
sudo apt full-upgrade
```
* 这能确保在升级过程开始前系统保持最新。如果你已经在上述升级前步骤中完成了这个步骤,那么你可以忽略它。
* 使用以下命令更新恢复分区并等待它完成。这只适用于 UEFI 安装模式。
```
pop-upgrade recovery upgrade from-release
```
* 现在使用以下命令开始升级过程:
```
pop-upgrade release upgrade
```
![开始升级过程][8]
* 首先,升级过程将会下载软件包。按照我们的测试,需要下载大约 1600 多个软件包。因此,你应该等到它结束。
* 其次,一旦下载完成,更新管理器将会提示你重启。
![准备升级][9]
* 重启之后Pop OS 将开始安装最新的软件包到你的系统中。
* 最后,这个下载过程要花将近一个小时,所以等待它完成。我不建议中途停止更新,这将会导致系统不稳定。
![Pop OS 22.04 LTS 桌面][10]
* 升级完成之后,享受全新的 Pop OS 22.04 LTS 吧。
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/2022/04/upgrade-pop-os-22-04-from-21-10/
作者:[Arindam][a]
选题:[lujun9972][b]
译者:[hwlife](https://github.com/hwlife)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.debugpoint.com/author/admin1/
[b]: https://github.com/lujun9972
[1]: https://blog.system76.com/post/682519660741148672/popos-2204-lts-has-landed
[2]: https://www.debugpoint.com/2022/01/ubuntu-22-04-lts/
[3]: https://www.debugpoint.com/2022/04/pop-os-22-04-lts/
[4]: https://www.debugpoint.com/2021/12/upgrade-pop-os-21-10-from-21-04/
[5]: https://www.debugpoint.com/2021/07/upgrade-pop-os-21-04-from-20-10/
[6]: https://www.debugpoint.com/wp-content/uploads/2022/04/Pop-OS-22.04-Upgrade-Prompt-1024x200.jpg
[7]: https://www.debugpoint.com/wp-content/uploads/2022/04/Pop-OS-22.04-Upgrade-Prompt-in-Settings.jpg
[8]: https://www.debugpoint.com/wp-content/uploads/2022/04/Start-the-upgrade-process.jpg
[9]: https://www.debugpoint.com/wp-content/uploads/2022/04/Ready-for-upgrade-1024x323.jpg
[10]: https://www.debugpoint.com/wp-content/uploads/2022/04/Pop-OS-22.04-LTS-Desktop-1024x641.jpg
[11]: https://t.me/debugpoint
[12]: https://twitter.com/DebugPoint
[13]: https://www.youtube.com/c/debugpoint?sub_confirmation=1
[14]: https://facebook.com/DebugPoint

View File

@ -0,0 +1,170 @@
[#]: subject: "10 Reasons to Run Linux in Virtual Machines"
[#]: via: "https://itsfoss.com/why-linux-virtual-machine/"
[#]: author: "Ankush Das https://itsfoss.com/author/ankush/"
[#]: collector: "lkxed"
[#]: translator: "PeterPan0106"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14541-1.html"
在虚拟机中运行 Linux 的十大优点
======
![](https://img.linux.net.cn/data/attachment/album/202205/04/093523wlzslifl2cp9papp.jpg)
> 你可以在虚拟机环境里运行任何操作系统,不论是测试还是为了某种需要。
对于 Linux 而言,它在虚拟环境下的性能会优于其他操作系统。即便你可能会犹豫是否在物理机(裸金属)上安装 Linux 系统,你仍然可以在虚拟机中安装一个性能几乎和物理机一样好的 Linux 系统。
当然,这并不意味着宿主系统为 Linux 时你就不能在虚拟机实例中安装 Linux 了。
更何况,你在虚拟环境下使用 Linux 系统有许多好处。大致如下。
### 在虚拟环境下运行 Linux 之前的注意事项
在虚拟环境下运行 Linux 或许并不是艰巨的任务,但仍有以下几点你需谨记。
* 虚拟机的性能取决于宿主机的性能,如果你并没有足够的系统资源分配给虚拟机,那么虚拟机的使用体验注定不会很好。
* 某些特性仅在物理机(裸金属)上生效,包括硬件加速以及图形(显卡)驱动等。
* 密集的磁盘 I/O 任务性能会十分受限,例如游戏测试场景。
* 用户的 Linux 虚拟机实例体验会根据你所使用的虚拟化程序而发生变化,这些虚拟化程序包括 VMware、VirtualBox、GNOME Boxes 以及 Hyper-V 。
此外,你应当列出你的需求,并根据这些需求选定适当的虚拟化程序来运行你的 Linux 实例。
### 十条在虚拟环境中运行 Linux 的优点
尽管运行虚拟化 Linux 实例极具吸引力,你仍然应当首先考虑当前使用的宿主系统中已有的选择。例如,如果你不需要图形化桌面,或许利用 Windows 操作系统中的 [WSL 安装 Linux][1] 就可以满足你的需求。
一旦你确定了使用虚拟机,那么这些优点将会如影随形:
#### 1、部署简便
![部署简便][2]
与在传统物理机(裸金属)上安装 Linux 相比,在虚拟机中部署一般会容易许多。
对于基于 Ubuntu 的发行版而言,像 VMware 这样的虚拟化程序会提供一个 **快速安装** 的选项,你仅需输入用户名和密码,其余过程将自动完成而无需其他操作。你无需手动设置分区、引导程序以及更多高级设置。
某些情况下,一些发行版的开发者会同时提供针对特定虚拟机的预构建镜像,只需打开就可使用。这就好像一个便携式虚拟机镜像,随时可以开箱即用。
例如,在 [这里][3] 你将看到如何在虚拟机中安装 Arch Linux 发行版。
对于其他的发行版,你或许仍需要进行一些配置,但一般都会有快速安装的选项令你可以轻松部署。
#### 2、不会影响宿主机
![不会影响宿主机][4]
对于虚拟机,你可以更为随心所欲地使用,因为虚拟机系统和宿主机系统是隔离的。
很多时候,如果你并不熟悉 Linux 系统,你很可能会把配置弄得十分混乱。
所以在虚拟机里,你可以随意尝试而无需担心是否会影响到宿主机系统。换句话说,任何虚拟机的操作都不会影响到宿主机,因为它们是完全隔离的。
故此,虚拟机是你最好的试验场,尤其是对于一些激进或具有破坏性的试验。
#### 3、资源可高效共享
![资源可高效共享][5]
如果你有十分充裕的系统资源,你可以使用虚拟机运行其他任务,从而充分利用起来这部分闲置的系统资源。例如,如果你需要一个十分私密的浏览环境,虚拟机将为你阻挡一切针对宿主机的追踪器。
这可能略显牵强,但这仅仅是一个例子。基于这样的想法你将可以充分利用全部的系统资源。
而对于双启动方案,你需要在单独的磁盘上在 Windows [之后安装 Linux][6],或者在 Linux [之后安装 Windows][7],你需要为你的任务锁定相应的资源。
但利用虚拟机,你无需锁定部分资源也可以使用 Linux ,也不必为了特定的任务而临时共享资源,这样会方便许多。
#### 4、多任务体验更好
![多任务体验更好][8]
有了资源共享机制,多任务会前所未有的容易。
在双启动的场景下,你需要来回重启切换才能使用 Linux 或 Windows 。
但如果使用虚拟机,你几乎不再需要 [双启动][9],两个系统将无缝协作并完成多任务。
当然,你需要确认你拥有足够的系统资源和额外的硬件(例如双显示器)来更高效地使用。而多任务的潜力也因 Linux 虚拟机的存在而愈发强大。
#### 5、软件测试更为便捷
有了虚拟化,你将可以创建大量的 Linux 实例,来模拟特定的使用场景,并对软件进行测试。
例如,你可以在不同的 Linux 虚拟机中同步测试不同的软件版本。这有丰富的使用场景,包括对开发版软件进行测试以及 Linux 发行版的早期测试等等。
#### 6、开发更为便捷
![开发更为便捷][10]
当你在学习编程或者刚加入一个软件项目的开发的时候,你会希望拥有一个没有任何冲突和错误的开发环境。
在 Linux 虚拟机里,你可以从零开始搭建一个不会与已经存在的环境冲突的开发环境。例如,你可以在 Ubuntu 上 [安装并测试 Flutter][11] 。
如果环境出了问题,你可以轻而易举地删掉这个虚拟机,并重新开始来修正错误。
Linux 虚拟机的隔离环境是一个绝佳的开发和测试环境。
#### 7、学习和研究的好帮手
Linux 值得反复探索。除了基础的计算任务,你可以做许多其他的事情。
你可以学习如何修改你的用户界面,[尝试一些常见的桌面环境][12] 、[安装大量常用软件][13] ,与此同时仍能让一切处于掌控之中。
如果出现问题,新建一个 Linux 虚拟机就可以解决。当然,这并不仅限于日常使用需要,还可以启发系统管理员在其中测试他们所学的知识。
#### 8、更容易复制和迁移
虚拟机可以很容易地复制和迁移。只要其它的宿主机系统支持该虚拟化程序,你就可以很容易地迁移它,而没有特别要求。
不论因何原因,几次简单的点击就可以完成复制和迁移的任务。
#### 9、尝试大量的发行版
![尝试大量的发行版][14]
你可以在虚拟环境下尝试数以百计的 Linux 发行版。
你或许会认为这和第七条重复了,但是我相信,测试一个发行版是一个巨大的系统性工程,尤其是当你决定切换发行版做为宿主机或其他用途时。
#### 10、便于调试
不论是严肃的开发活动还是一般的研究,在隔离的虚拟环境中调试和除错相对而言会更简单。
你可以快速尝试大量的调试方法而无需考虑影响。同时,如果你的宿主机是 Linux 系统的话,无需宿主机上的 root 权限便可以访问和修改虚拟机中的配置文件。
### 总而言之
如果你不熟悉正在使用的系统或者依赖不同的操作系统工作,虚拟机将是协助你工作的一大利器。
Linux 虚拟机可以广泛用于开发、学习、试验或任何特定用途。
你在虚拟机中使用过 Linux 吗?都有哪些应用场景呢?欢迎留言评论!
--------------------------------------------------------------------------------
via: https://itsfoss.com/why-linux-virtual-machine/
作者:[Ankush Das][a]
选题:[lkxed][b]
译者:[PeterPan0106](https://github.com/PeterPan0106)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/ankush/
[b]: https://github.com/lkxed
[1]: https://itsfoss.com/install-bash-on-windows/
[2]: https://itsfoss.com/wp-content/uploads/2022/04/easy-setup-linux-vm.jpg
[3]: https://itsfoss.com/install-arch-linux-virtualbox/
[4]: https://itsfoss.com/wp-content/uploads/2022/04/isolated-linux-vm.jpg
[5]: https://itsfoss.com/wp-content/uploads/2022/04/sharing-resources-linux-vm.jpg
[6]: https://itsfoss.com/dual-boot-hdd-ssd/
[7]: https://itsfoss.com/install-windows-after-ubuntu-dual-boot/
[8]: https://itsfoss.com/wp-content/uploads/2022/04/multitasking-linux-vm.jpg
[9]: https://itsfoss.com/dual-boot-fedora-windows/
[10]: https://itsfoss.com/wp-content/uploads/2022/04/development-linux-vm.jpg
[11]: https://itsfoss.com/install-flutter-linux/
[12]: https://itsfoss.com/best-linux-desktop-environments/
[13]: https://itsfoss.com/essential-linux-applications/
[14]: https://itsfoss.com/wp-content/uploads/2022/04/distros-linux-vm.jpg

View File

@ -3,22 +3,22 @@
[#]: author: "Shebuel Inyang https://opensource.com/users/shebuel"
[#]: collector: "lkxed"
[#]: translator: "lkxed"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14562-1.html"
我如何通过开源来发展我的产品经理职业
======
毫不夸张地说,在开源方面获得的经验,帮助我在产品管理领域创造了一条成功的职业道路。
![如何做好发布说明][1]
图源Opensource.com
![](https://img.linux.net.cn/data/attachment/album/202205/08/112446zy420r4zutdlu0ol.jpg)
> 毫不夸张地说,在开源方面获得的经验,帮助我在产品管理领域创造了一条成功的职业道路。
我是一个充满好奇心的人我喜欢探索科技行业的许多领域从视觉设计、编程到产品管理。我也被开放源码的理念所吸引。因此我很高兴与大家分享我作为一个产品经理PM是如何利用开源来建立我的职业生涯的。我相信我的经验可以帮助其他对产品管理感兴趣的人。
### 什么是开源软件
简单地说,开源软件是开放源代码的软件,这意味着任何人都可以检查、修改、增强和分享它的源代码。[Opensource.com][2] 上发表过一篇详细、[全面的文章][3] 来帮助你了解什么是开源。
简单地说,开源软件是开放源代码的软件,这意味着任何人都可以检查、修改、增强和分享它的源代码。我们发表过一篇详细、[全面的文章][3] 来帮助你了解什么是开源。
我最早知道开源是很久以前了,那时,我还是一名刚入行不久的视觉设计师。我很想知道开源是什么,也很想知道如何成为它的一部分。在这种好奇心的驱使下,我接触到了一些有经验的开源贡献者和倡导者。虽然我当时没有做出贡献,但是他们让我知道了什么是社区,这对我下定决心开始贡献有很大帮助。
@ -58,7 +58,7 @@
* 他们是如何被告知这个解决方案的?
* 该解决方案如何与当前和更广泛的生态系统相适应?
* 项目的文件是在哪里维护的?
* 项目维护者是否了解<ruby>无障碍<rt>accessibility</rt></ruby>>要求?它们是否被满足?
* 项目维护者是否了解<ruby>无障碍<rt>accessibility</rt></ruby>要求?它们是否被满足?
既然你已经获得了产品经理的所需技能,为何不应用它们呢?结合所学,表达出你深思熟虑的问题,并邀请你的团队来评估吧!你的团队可以选择那些能引起开发者和社区共鸣的问题,并优先考虑其中最重要的。
@ -70,7 +70,7 @@
OpenUnited 是一个开源平台,为各类贡献者(包括产品经理、开发人员、设计师、商业分析师和其他人)提供服务。它致力于帮助贡献者提高技能,并为他们提供长期的高质量付费工作来源。
Miro 公司的高级产品经理 Farbod Saraf 让我加入他与合作伙伴创建的一个平台。我加入了这个项目,并了解了如何对 OpenUnited 做出贡献。我还了解了其他可以帮助我在产品管理生涯中成长的项目,并做出了我的第一次贡献。这是一次很好的经历,因为我可以迅速地开始投入到产品的某些部分,以改善平台上其他用户的体验。在我为项目做贡献的时候,我的导师 Farbod 随时为我提供任何需要的帮助,使我的工作更加轻松。
Miro 公司的高级产品经理 Farbod Saraf 让我加入他与合作伙伴创建的一个平台。我加入了这个项目,并了解了如何对 OpenUnited 做出贡献。我还了解了其他可以帮助我在产品管理生涯中成长的项目,并做出了我的第一次贡献。这是一次很好的经历,因为我可以迅速地开始投入到产品的某些部分,以改善平台上其他用户的体验。在我为项目做贡献的时候,我的导师 Farbod 随时为我提供任何需要的帮助,使我的工作更加轻松。
你对开源项目所做的一切贡献,都会成为你成长为产品经理过程中的有力的公共记录。对于任何想通过开源上手产品管理的人,我都强烈推荐 OpenUnited 平台。
@ -82,13 +82,13 @@ Miro 公司的高级产品经理 Farbod Saraf 让我加入了他与合作伙伴
* 在产品经理社区中发言,如 Mind The Product 和 Product School。
* 参加当地的聚会和开源会议,如非洲开源社区节,以此来与开源项目的创建者和维护者保持联系。
* 与在大型开源公司工作的产品经理接触,如 GitLab 或 Mozilla。他们可能会把你推荐到需要你的技能和贡献的开源项目中。
* 访问开源公司的开源倡导者和开发者关系团队,让他们推荐一些入门级产品经理适合贡献的开源项目。
* 寻找 AngelList 上的开源公司或 Product Hunt 上流行开源产品。这些都是你可以找到适合贡献的开源产品的好地方。
* 与在 GitLab 或 Mozilla 等大型开源公司工作的产品经理接触。他们可能会把你推荐到需要你的技能和贡献的开源项目中。
* 联系开源公司的开源倡导者和开发者关系团队,让他们推荐一些适合入门级产品经理贡献的开源项目。
* 寻找 AngelList 上的开源公司或 Product Hunt 上流行开源产品。这些都是你可以找到适合贡献的开源产品的好地方。
### 下一步
[Ruth Ikegah][7] 是我的一个重要灵感来源,她写了一篇 [关于开源新手的文章][8]。她的文章给出了一些提示,在你开始为开源做贡献时,可能需要考虑一下它们。
[Ruth Ikegah][7] 是我的一个重要灵感来源,她 [为开源新手写了一篇文章][8]。她的文章给出了一些提示,在你开始为开源做贡献时,可能需要考虑一下它们。
在加入和贡献项目、社区或组织之前,对它们做一些研究,并提出自己的问题。当你最终决定加入社区时,试着积极地介绍自己,并说明你可以在哪些方面提供帮助。
@ -101,7 +101,7 @@ via: https://opensource.com/article/22/4/product-management-open-source
作者:[Shebuel Inyang][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/) 荣誉推出
@ -109,7 +109,7 @@ via: https://opensource.com/article/22/4/product-management-open-source
[b]: https://github.com/lkxed
[1]: https://opensource.com/sites/default/files/lead-images/rh_003784_02_os.comcareers_resume_rh1x.png
[2]: http://Opensource.com
[3]: https://opensource.com/resources/what-open-source
[3]: https://linux.cn/article-8624-1.html
[4]: https://twitter.com/hellodavidryan
[5]: https://twitter.com/susanavlopes
[6]: https://openunited.com

View File

@ -3,24 +3,26 @@
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
[#]: collector: "lujun9972"
[#]: translator: "lkxed"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14536-1.html"
Archinstall 新的菜单系统让安装 Arch Linux 更容易了
======
> Archinstall 让人们更容易上手 Arch Linux也应该可以为经验丰富的 Linux 用户节省时间。你觉得呢?
![][1]
去年的这个时候Arch Linux [引入了一个引导式的安装程序][2],使其安装过程更加简单。
你只需要输入 `archinstall`,就可以开始一步步的安装,而不需要自己全部定制。
即使你不是新手用户,它应该也能为你正常安装 Arch Linux 节省一些时间。你可以配置所有基本选项,无论是创建用户名/根用户,还是选择桌面、挑选软件包、选择音频服务器,等等。
即使你不是新手用户,它应该也能为你正常安装 Arch Linux 节省一些时间。你可以配置所有基本选项,无论是创建普通用户或 root 用户,还是选择桌面、挑选软件包、选择音频服务器,等等。
如果你感兴趣的话,可以在我们的 [在 VirtualBox 里安装 Arch Linux 的指南][3]中看看 archinstall 的实际使用。
如果你感兴趣的话,可以在我们的 [在 VirtualBox 里安装 Arch Linux 的指南][3] 中看看 Archinstall 的实际使用。
现在,archinstall v2.4.1 已发布,我们有了新的菜单系统和大量的技术变化。
现在,Archinstall v2.4.1 已发布,我们有了新的菜单系统和大量的技术变化。
让我们来看看它是如何工作的吧!
@ -30,17 +32,17 @@ Archinstall 新的菜单系统让安装 Arch Linux 更容易了
新的菜单系统看起来更有条理了。
它是以 [simple-term-menu][5] 为基础建立的simple-term-menu 是一个用于在命令行中创建交互式菜单的软件包。为了避免外部依赖,它与源代码捆绑,此处感谢 Ingo Meyer开发者
它是以 [simple-term-menu][5] 为基础建立的simple-term-menu 是一个用于在命令行中创建交互式菜单的软件包。为了避免外部依赖,它与源代码捆绑,这要归功于 Ingo Meyer开发者
另外还得感谢其他开发者,其中包括 [Werner Llácer][6] 和 [Daniel][7],是他们编写了 1200 多行代码,才让这成为可能。
这个菜单系统也是无障碍的。你可以用数字键盘上的“*”把它切换到跟踪选择模式,这应该能让 espeakup 工作,正如人们所期望的那样
这个菜单系统也是无障碍的。你可以用数字键盘上的 `*` 把它切换到跟踪选择模式,这应该能让 espeakup 如预期的工作
archinstall 的未来版本中,它也会支持默认的跟踪模式。
Archinstall 的未来版本中,它也会支持默认的跟踪模式。
在上面的截图中,你可能会注意到,它支持设置语言、键盘布局、内核、音频服务器、用户、网络和其他基本选项。
一旦你选择了硬盘,菜单将增加另一个选项,让你选择一个“磁盘布局”,你可以在其中选择文件系统的类型。
当你选择了硬盘后,菜单将增加另一个选项,让你选择一个“磁盘布局”,你可以在其中选择文件系统的类型。
![][8]
@ -48,7 +50,7 @@ Archinstall 新的菜单系统让安装 Arch Linux 更容易了
![][9]
默认情况下,它会启用一个 swap 分区。不过,你可以根据你的需要进行调整。总的来说,这应该是一个无缝的体验,所有的安装先决条件都以菜单形式呈现。
默认情况下,它会启用一个交换分区。不过,你可以根据你的需要进行调整。总的来说,这应该是一个顺滑的体验,所有的安装先决条件都以菜单形式呈现。
在此感谢我们团队中的 Sreenath是他测试并提供了这些屏幕截图。
@ -56,15 +58,15 @@ Archinstall 新的菜单系统让安装 Arch Linux 更容易了
除了这些变化之外,你还可以期待以下改进:
* 如果你选择 btrfs 作为文件系统BTRFS 压缩选项将被添加为一个选项。
* 如果你选择 btrfs 作为文件系统,会添加一个 BTRFS 压缩选项。
* Archinstall 现在支持同时进行多个网卡配置的手动配置。
* 安装程序可以通过 archinstall.Installer() 跟踪哪些软件包已经安装完毕。
* 安装程序可以通过 `archinstall.Installer()` 跟踪哪些软件包已经安装完毕。
要查看所有的技术变化和错误修复,你可以参考 [GitHub 上的发布说明][11]。
**你可以等待最新的 ISO计划在 5 月 1 日发布),或者从 GitHub 上下载并自己尝试。**
你试过 Arch Linux 上的原安装向导吗?还是说,相较于使用安装程序,你更偏向于自己手动配置一切?请在评论区分享你的想法吧!
你试过 Arch Linux 上的原来的安装向导吗?还是说,相较于使用安装程序,你更偏向于自己手动配置一切?请在评论区分享你的想法吧!
--------------------------------------------------------------------------------
@ -73,7 +75,7 @@ via: https://news.itsfoss.com/archinstall-menu/
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[lkxed](https://github.com/lkxed)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -0,0 +1,48 @@
[#]: subject: "Elon Musks Plan To Open Source The Twitter Algorithm Has Flaws"
[#]: via: "https://www.opensourceforu.com/2022/04/elon-musks-plan-to-open-source-the-twitter-algorithm-has-flaws/"
[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/"
[#]: collector: "lkxed"
[#]: translator: "lkxed"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14540-1.html"
埃隆·马斯克开源推特算法的计划存在缺陷
======
![推特][1]
报道称,在推特确认接受收购请求的几个小时后,埃隆·马斯克就明确表示了他对推特的期望。马斯克在一份新闻稿中罗列了他计划做出的重大改变,包括开源“决定用户在推流中看到什么”的算法。
马斯克希望开源推特的算法,是因为他长期以来一直担心该平台有可能进行政治压制。但老实说,即便开源,也不可能达到他的预期效果。专家们担心,这可能反而带来一连串意想不到的问题。
虽然马斯克对权威深恶痛绝,但是他对算法开源的野心和世界各地立法者的愿望不谋而合。近年来,许多政府都将这一原则作为打击大科技公司的基石。
英国社交媒体监管机构 Ofcom 的首席执行官 Melanie Dawes 曾表示,社交媒体公司应当解释其代码的运作方式。此外,欧盟新近通过的《<ruby>数字服务法案<rt>Digital Services Act</rt></ruby>DSA》于 4 月 23 日获得批准该法案将责成平台提供更多的公开性。2022 年 2 月,美国的民主党参议员提交了《<ruby>算法问责法案<rt>Algorithmic Accountability Act</rt></ruby>AAA》的立法申请。这些法案的目标是加强算法的透明度和监督包括我们在社交媒体上的“<ruby>时间轴<rt>timeline</rt></ruby>”和“<ruby>新闻流<rt>news feed</rt></ruby>”以及我们生活的其他方面。
允许竞争者看到并修改推特的算法,可能意味着有人会偷取源代码,并提供一个改名的版本。互联网的许多部分都运行在开源软件上,其中最著名的就是 OpenSSL这是一个被大量在线使用的安全工具包而它在 2014 年被黑客攻击了。
还有一些已经创建的开源社交网络。Mastodon 是一个微博网络,为回应对 Twitter 主导地位的担忧而创建。它允许用户检查其代码,这些代码可在 GitHub 软件仓库中找到。
然而,阅读一个算法背后的代码,并不总能告诉你它的工作方式,而且对于大部分普通人来说,它也提供不了足够的关于公司组织架构以及开发流程的信息。
Jonathan Gray 是伦敦国王学院/关键基础设施研究的高级讲师,他说:“这有点像只用遗传物质来理解古代生物。是的,它能告诉我们的信息比任何方式都多,但如果说我们因此了解它们的生活方式,那就太夸张了。”
推特同样也不是由单一算法控制的。Catherine Flick 是英国德蒙福特大学/研究计算和社会责任的研究员,她说:“其中一些会决定人们在他们的“时间轴”上看到什么趋势、内容或者推荐关注的人。调节用户“时间轴”上显示哪些信息的算法,将会是人们最感兴趣的。然而,即使如此,如果缺少训练数据,单纯开源算法也没多大用处。”
Cobbe 认为,开源推特算法的危害大于好处。因为计算机代码并没有透露算法是如何开发或评估的:有哪些元素或考虑、在这个过程中的优先级是什么等等。所以开源可能不会使推特的透明度发生重大变化。反而,它可能会带来严重的安全隐患。
--------------------------------------------------------------------------------
via: https://www.opensourceforu.com/2022/04/elon-musks-plan-to-open-source-the-twitter-algorithm-has-flaws/
作者:[Laveesh Kocher][a]
选题:[lkxed][b]
译者:[lkxed](https://github.com/lkxed)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.opensourceforu.com/author/laveesh-kocher/
[b]: https://github.com/lkxed
[1]: https://www.opensourceforu.com/wp-content/uploads/2022/04/twiiter-696x392.jpg

View File

@ -0,0 +1,183 @@
[#]: subject: "How to Remove Snap Packages in Ubuntu Linux"
[#]: via: "https://www.debugpoint.com/2022/04/remove-snap-ubuntu/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lujun9972"
[#]: translator: "hwlife"
[#]: reviewer: "turbokernel, wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14567-1.html"
怎样在 Ubuntu Linux 中移除 Snap 软件包
======
![](https://img.linux.net.cn/data/attachment/album/202205/09/103449pfqp2yp2rpzgp92l.jpg)
> 这是一篇关于在 Ubuntu Linux 系统中如何删除 Snap以得到一个无 Snap 系统的教程。
由 Canonical 开发的 Snap 软件包在一些场景下是有益的。它为终端用户直接提供了轻便且快速的程序更新。不仅如此,它还有其他的好处,比如它打包了所有依赖包,并允许安装同一个应用的多个版本。此外,它运行在沙盒模式,提供了安全和其他方面的好处。
在这些好处中, Snap 技术也有一些地方备受争论。举个例子,几乎所有使用 Snap 软件包的用户都说它的性能较差,包括它的启动时间要比本地 deb 或者 RPM 软件包时间要长。另外,由于它的设计,程序安装的体积巨大,浪费磁盘空间,因为它打包了所有用到的依赖包。
不仅如此由于沙盒的天然属性Snap 程序可能无法访问你的 Linux 桌面的几个部分,除非提供了适当的权限。
这个指南阐述了你如何从 Ubuntu 系统中完全移除 Snap。
这些步骤在 [Ubuntu 22.04 LTS Jammy Jellyfish][1] 中进行了测试。然而,它应该也适用于所有的 Ubuntu 系统版本。
> **警告:这些步骤将会移除 Ubuntu 系统中两个关键的程序:软件商店和 Firefox。尝试这些步骤之前确认你已经对书签和 Firefox 的其它设置做了备份。**
### 在 Ubuntu Linux 移除 Snap 软件包
1、在你的系统中打开一个终端使用以下命令查看已经安装的 Snap 软件包的列表。它显示了 Snap 软件包,比如 Firefox软件商店主题以及其它默认已经安装的核心软件包。
```
snap list
```
![ Ubuntu Snap 包列表][2]
2、按照以下的顺序移除 Snap 软件包。首先移除 Firefox。然后是软件商店和用以上命令看到的你的系统中的其它软件包。
```
sudo snap remove --purge firefox
sudo snap remove --purge snap-store
sudo snap remove --purge gnome-3-38-2004
```
```
sudo snap remove --purge gtk-common-themes
sudo snap remove --purge snapd-desktop-integration
sudo snap remove --purge bare
sudo snap remove --purge core20
sudo snap remove --purge snapd
```
3、最后通过 `apt` 命令移除 Snap 服务。
```
sudo apt remove --autoremove snapd
```
![移除 Snap 包和其它][3]
这还没完,即使你用以上命令移除了 Snap 软件包,但是如果你没有关闭 apt 触发器,`sudo apt update` 命令会再一次将 Snap 安装回来。
4、所以要关闭它我们需要在 `/etc/apt/preferences.d/` 目录下创建一个 apt 设置文件 `nosnap.pref` 来关闭 Snap 服务。
```
sudo gedit /etc/apt/preferences.d/nosnap.pref
```
5、添加以下的命令行并保存该文件。
```
Package: snapd
Pin: release a=*
Pin-Priority: -10
```
![创建设置文件][4]
如果你知道如何使用它,那么这个 apt 设置文件是一个潜在的工具。举个例子,在以上的状态中,`Pin-Priority -10` 意思就是阻止 Snap 软件包的安装。
与这个教程不相关的,举个例子,如果你想给所有发行版代号为 “bulleye” 的软件包超高优先权的话,那么就可以查看这些设置文件。如果你想了解更多,你可以访问 [apt 手册页][5]。
```
Package: *
Pin: release n=bullseye
Pin-Priority: 900
```
6、回到我们的主题一旦你已经保存和关闭以上文件从终端中再次运行以下命令。
```
sudo apt update
```
7、最后从 Ubuntu 中移除 Snap 的步骤全部完成。
### 从 Ubuntu 移除 Snap 后使用 deb 文件安装软件商店和 Firefox
你已经移除了 Firefox 和软件商店,但是你的工作还需要它们。
要安装 apt 版的 GNOME 软件商店,你可以使用以下命令。确保使用 `--install-suggests` 参数。否则,将会再次安装上 Snap 版本的软件包管理器!
```
sudo apt install --install-suggests gnome-software
```
要安装 Firefox通过以下命令使用官方 PPA 仓库。
```
sudo add-apt-repository ppa:mozillateam/ppa
sudo apt update
sudo apt install -t 'o=LP-PPA-mozillateam' firefox
```
![添加 PPA 仓库][7]
![从 PPA 仓库以 deb 文件形式安装 Firefox][8]
一旦你已经安装完 Firefox使用以下命令开启自动更新。要了解更多[访问此页][9]。
```
echo 'Unattended-Upgrade::Allowed-Origins:: "LP-PPA-mozillateam:${distro_codename}";' | sudo tee /etc/apt/apt.conf.d/51unattended-upgrades-firefox
```
最后但同样重要,当运行 `apt` 时,为 Firefox 创建另一个设置文件给予以上 PPA 仓库超高优先权。如果你不这么做,`apt update` 命令会再次安装 Snap 版本 Firefox并把它的“ Snap 朋友们”带回来 😂😂😂。
```
sudo gedit /etc/apt/preferences.d/mozillateamppa
```
最后,添加这些命令行并保存文件。
```
Package: firefox*
Pin: release o=LP-PPA-mozillateam
Pin-Priority: 501
```
完成。
### 在 Ubuntu 系统恢复到 Snap 软件包
如果你改变想法,移除该设置文件,并通过以下命令再次启动安装程序。
```
sudo rm /etc/apt/preferences.d/nosnap.pref
sudo apt update && sudo apt upgrade
sudo snap install snap-store
sudo apt install firefox
```
### 总结
关于在 Ubuntu 下移除 Snap 软件包做个总结,我想说的是这些处理 Snap 软件包的方法实属无奈。主要是这对新用户来说很困难。我希望这个指南能帮助你处理好 Snap 软件包。完结撒花。
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/2022/04/remove-snap-ubuntu/
作者:[Arindam][a]
选题:[lujun9972][b]
译者:[hwlife](https://github.com/hwlife)
校对:[turbokernel](https://github.com/turbokernel), [wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.debugpoint.com/author/admin1/
[b]: https://github.com/lujun9972
[1]: https://www.debugpoint.com/2022/01/ubuntu-22-04-lts/
[2]: https://www.debugpoint.com/wp-content/uploads/2022/04/Snap-list-in-Ubuntu.jpg
[3]: https://www.debugpoint.com/wp-content/uploads/2022/04/remove-snap-and-others-1024x544.jpg
[4]: https://www.debugpoint.com/wp-content/uploads/2022/04/create-a-pref-file.jpg
[5]: https://manpages.ubuntu.com/manpages/focal/man5/apt_preferences.5.html
[6]: https://www.debugpoint.com/2016/07/how-to-install-and-use-snap-packages-in-ubuntu/
[7]: https://www.debugpoint.com/wp-content/uploads/2022/04/Add-the-PPA-1024x550.jpg
[8]: https://www.debugpoint.com/wp-content/uploads/2022/04/Install-Firefox-as-deb-file-from-PPA-1024x548.jpg
[9]: https://www.debugpoint.com/2021/09/remove-firefox-snap-ubuntu/
[10]: https://t.me/debugpoint
[11]: https://twitter.com/DebugPoint
[12]: https://www.youtube.com/c/debugpoint?sub_confirmation=1
[13]: https://facebook.com/DebugPoint

View File

@ -3,15 +3,16 @@
[#]: author: "Jishnu Saurav Mittapalli https://www.opensourceforu.com/author/jishnu-saurav-mittapalli/"
[#]: collector: "lkxed"
[#]: translator: "lkxed"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14535-1.html"
在 Python 中使用机器学习来检测钓鱼链接
======
在网络钓鱼攻击中,用户会收到一封带有误导性链接的邮件或信息,攻击者可以利用它来收集重要数据,比如你的银行卡密码。本文将会给出一个简短的教程,旨在介绍如何检测这种网络钓鱼的企图。
![网络钓鱼攻击][1]
![](https://img.linux.net.cn/data/attachment/album/202205/02/180603k231bbvubv3b23u6.jpg)
通过网络钓鱼攻击,攻击者能够获得一些重要凭证,这些凭证可以用来进入你的银行或其他金融账户。攻击者发送的 URL 看起来与我们日常使用的原始应用程序完全相同。这也是人们经常相信它,并在其中输入个人信息的原因。钓鱼网址可以打开一个网页,它看起来与你的银行的原始登录页面相似。最近,这样的网络钓鱼攻击正变得相当普遍,所以,检测钓鱼链接变得非常重要。因此,我将介绍如何在 Python 中使用机器学习来检查一个链接是误导性的还是真实的,因为它可以帮助我们看到网页代码及其输出。注意,本文将使用 Jupyter Notebook。当然你也可以使用 Google Colab 或 Amazon Sagemaker如果你对这些更熟悉的话。
@ -19,15 +20,14 @@
第一步,我们需要用于训练数据集。你可以从下面的链接中下载数据集。
*真实的链接https://github.com/jishnusaurav/Phishing-attack-PCAP-analysis-using-scapy/blob/master/Phishing-Website-Detection/datasets/legitimate-urls.csv*
*钓鱼链接https://github.com/jishnusaurav/Phishing-attack-PCAP-analysis-using-scapy/blob/master/Phishing-Website-Detection/datasets/phishing-urls.csv*
* 真实的链接https://github.com/jishnusaurav/Phishing-attack-PCAP-analysis-using-scapy/blob/master/Phishing-Website-Detection/datasets/legitimate-urls.csv
* 钓鱼链接https://github.com/jishnusaurav/Phishing-attack-PCAP-analysis-using-scapy/blob/master/Phishing-Website-Detection/datasets/phishing-urls.csv
### 训练机器进行预测
当数据集下载完成,我们需要使用以下几行代码来导入所需的库:
```python
```
import pandas as pd
from sklearn.ensemble import RandomForestClassifier
```
@ -38,7 +38,7 @@ from sklearn.ensemble import RandomForestClassifier
当依赖安装完成,你就可以导入数据集,并将其转换为 `pandas` 数据框架,使用以下几行代码进一步处理:
```python
```
legitimate_urls = pd.read_csv(“/home/jishnusaurav/jupyter/Phishing-Website-Detection/datasets/legitimate-urls.csv”)
phishing_urls = pd.read_csv(“/home/jishnusaurav/jupyter/Phishing-Website-Detection/datasets/phishing-urls.csv”)
```
@ -47,28 +47,28 @@ phishing_urls = pd.read_csv(“/home/jishnusaurav/jupyter/Phishing-Website-Detec
![合并后的数据集的前几行][3]
然后去掉那些我们不需要的列,如<ruby>路径<rt>path</rt></ruby><ruby>协议<rt>protocol</rt></ruby>等,以达到预测的目的:
然后去掉那些我们不需要的列,如路径(`path`)、协议(`protocol`等,以达到预测的目的:
```python
```
urls = urls.drop(urls.columns[[0,3,5]],axis=1)
```
在这之后,我们需要使用以下代码将数据集分成测试和训练两部分:
```python
```
data_train, data_test, labels_train, labels_test = train_test_split(urls_without_labels, labels, test_size=0.30, random_state=110)
```
接着,我们使用 `sklearn` 的随机森林分类器建立一个模型,然后使用 `fit` 函数来训练这个模型。
```python
```
random_forest_classifier = RandomForestClassifier()
random_forest_classifier.fit(data_train,labels_train)
```
完成这些后,我们就可以使用 `predict` 函数来最终预测哪些链接是钓鱼链接。下面这行可用于预测:
```python
```
prediction_label = random_forest_classifier.predict(test_data)
```
@ -81,7 +81,7 @@ via: https://www.opensourceforu.com/2022/04/detect-a-phishing-url-using-machine-
作者:[Jishnu Saurav Mittapalli][a]
选题:[lkxed][b]
译者:[lkxed](https://github.com/lkxed)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -3,23 +3,24 @@
[#]: 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-14533-1.html"
基于 Rust 的 Redox OS 0.7.0 发布:增强硬件支持
======
Unix 风格的 Redox OS 0.7.0 发布了,它此次带来了几项改进,聚焦于在最广泛的硬件上启动。
> Unix 风格的 Redox OS 0.7.0 发布了,它此次带来了几项改进,聚焦于在最广泛的硬件上启动。
![Redox OS][1]
每年的这个时候,我们都会继续观察报道 Ubuntu 和基于它的发行版的新版本,但是今天不一样。
今天,我们要介绍的主角是 Redox OS它专注于稳定性和安全性。我们 [早在 2016 年就报道过一篇文章][2],那时它还处于开发早期阶段(如果你感兴趣的话)。
今天,我们要介绍的主角是 Redox OS它专注于稳定性和安全性。我们 [早在 2016 年就报道过][2],那时它还处于开发早期阶段(如果你感兴趣的话)。
它大致上是基于 Unix 的,但却是一个完整的操作系统。此外,它完全使用 Rust 从零开始编写。Rust 是一个流行的手动管理内存的编程语言。
它大致上类似 Unix,但却是一个完整的操作系统。此外,它完全使用 Rust 从零开始编写。Rust 是一个流行的内存安全的编程语言。
Redox OS 的另一个主要特点是它采用了微内核设计方法。这意味着与 Linux 单片机内核相比,它的体积和使用的基本功能都比较少。
Redox OS 的另一个主要特点是它采用了微内核设计方法。这意味着与 Linux 内核相比,它的体积和使用的基本功能都比较少。
### 版本更新介绍
@ -29,7 +30,7 @@ Redox OS 的另一个主要特点是它采用了微内核设计方法。这意
Redox 附带一个名为 RedoxFS 的自定义文件系统,这个文件系统也与 Linux 兼容。
RedoxFS 目前是一个 Copy-on-Write 文件系统,当硬件加速可用时,支持使用 AES高级加密标准进行透明加密。
RedoxFS 目前是一个<ruby>写时复制<rt>copy-on-Write</rt></ruby>文件系统,当硬件加速功能可用时,支持使用 AES高级加密标准进行透明加密。
#### 重写的引导程序
@ -39,13 +40,13 @@ RedoxFS 目前是一个 Copy-on-Write 文件系统,当硬件加速可用时,
#### 微内核的更新
微内核已经经历了几次修复和更新,以提高性能并带来更好的硬件支持。
微内核已经经历了几次修复和更新,以提高性能并带来更好的硬件支持。
例如,它增加了对 ARMarch64和未来编译器的支持。
例如,它增加了对 ARMaarch64和未来编译器的支持。
内核强制对所有系统路径进行 UTF-8 编码,并使用了 acpid —— 用于电源管理的守护程序。
由于 initfs 被移到了一个单独的文件中,打包也得到了提升。
由于 initfs 被移到了一个单独的文件中,打包性能也得到了提升。
#### 其他特性
@ -68,7 +69,7 @@ via: https://news.itsfoss.com/redox-os-0-7-0-release/
作者:[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/) 荣誉推出

View File

@ -0,0 +1,38 @@
[#]: subject: "Microsoft Joins The Open 3D Foundation For Open Source 3D Development"
[#]: via: "https://www.opensourceforu.com/2022/05/microsoft-joins-the-open-3d-foundation-for-open-source-3d-development-promotion/"
[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/"
[#]: collector: "lkxed"
[#]: translator: "lkxed"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14544-1.html"
微软加入开放 3D 基金会,参与开源 3D 开发
======
![微软][1]
微软已经以首席成员的身份加入了<ruby>开放 3D 基金会<rt>Open 3D Foundation</rt></ruby>O3DF其他首席成员是 Adobe、AWS、华为、英特尔和 Niantic。微软的参与为该项目带来了大量的知识和思想引领这表明了通过行业合作创造一个高保真、功能齐全、不受商业条件限制的开源 3D 引擎是多么的关键。
微软首席集团项目经理 Paul Oliver 将加入 O3DF 管理委员会,这表明他将致力于实现基金会的目标,即确保符合开放 3D 社区保持需求与输入的平衡。基金会的战略方向和对 3D 可视化、仿真计划的管理,是由理事会与股东的创新互动来指导的。
“微软在创意方面的根基很深我们希望帮助所有的创作者无论他们是谁、在哪里、为哪个平台创作”Oliver 如是说,“由 Linux 基金会创建的开放 3D 基金会,是朝着帮助更多世界各地的创作者迈出的美妙一步,我们很高兴能成为其中的一员。”
微软不断致力于使游戏制作民主化,并向全世界的游戏创作者提供其工具和技术。加入开放 3D 基金会也反映出这一点。微软去年通过 GitHub 向所有开发者发布了其游戏开发工具包,并正在通过与 O3DF 的新伙伴关系,扩大其向所有人开放技术的承诺。
O3DF 执行董事,兼 Linux 基金会的游戏和数字媒体部总经理 Royal O'Brien 说:“我们很高兴微软以首席成员的身份加入开放 3D 基金会。有像微软这样杰出的行业资深公司做出贡献,并帮助社区推动 3D 引擎的创新,这对开源社区和使用它的公司都是巨大的好处。”
--------------------------------------------------------------------------------
via: https://www.opensourceforu.com/2022/05/microsoft-joins-the-open-3d-foundation-for-open-source-3d-development-promotion/
作者:[Laveesh Kocher][a]
选题:[lkxed][b]
译者:[lkxed](https://github.com/lkxed)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.opensourceforu.com/author/laveesh-kocher/
[b]: https://github.com/lkxed
[1]: https://www.opensourceforu.com/wp-content/uploads/2022/05/microsoft-696x464.jpg

View File

@ -0,0 +1,108 @@
[#]: subject: "Tools You Can Use for the Security Audit of IoT Devices"
[#]: via: "https://www.opensourceforu.com/2022/05/tools-you-can-use-for-the-security-audit-of-iot-devices/"
[#]: author: "Dr Kumar Gaurav https://www.opensourceforu.com/author/dr-gaurav-kumar/"
[#]: collector: "lkxed"
[#]: translator: "tendertime"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14566-1.html"
物联网安全审计工具集锦
======
数字化转型涉及数据驱动的决策与人工智能AI的结合。重要数据通过物联网IoT设备和智能组件进行传播。由于物联网设备常常处于不安全的环境而且由于缺乏内生安全机制的脆弱性很难免于潜在的网络攻击。以下是一些用于实现安全审计的开源工具可以降低此类攻击风险。
![](https://img.linux.net.cn/data/attachment/album/202205/09/090119h337d3shyoj3ou28.jpg)
网络攻击者和嗅探器可以从物联网设备中获取敏感数据,并利用这些信息对其他相关系统发起攻击。反病毒和计算机安全服务公司卡巴斯基表示,在 2021物联网黑客数量同比增长了四倍多。
在很大程度上,黑客通过使用 Telnet 协议访问物联网网络,该协议为通过互联网与设备或服务器进行通信提供了命令行接口。根据研究报告,超过 58% 的物联网入侵使用各种协议以求实现挖掘加密货币、通过分布式拒绝服务DDoS攻击关闭系统、窃取机密数据的目的。
由于人们在疫情期间居家使用物联网设备的时间增加,安全风险也随之上升。这些物联网组件中的大部分无论是个人用还是商用,都缺乏基本的安全措施。人工智能和边缘计算等新技术也使网络和数据安全形势复杂化。卡巴斯基的一位安全专家 Dan Demeter 表示:智能组件变得流行,攻击的数量也随之上升了。
![Key components in PENIOT][2]
### 物联网组件的安全审计需求
网络攻击一直在演变,商业公司和政府部门都在采用越来越复杂的网络安全设施以防止他们的应用和基础设施免于在线攻击。全球渗透测试市场预计将从 2021 的 16 亿美元增长到 2026 年的 30 亿美元2021 至 2026 年的复合年增长率为 13.8%。
物联网设备的渗透测试是一个热门话题,在这一领域有大量研究。即使采用“设计安全”的方法,渗透对于识别真正的安全危险并采取适当的预防措施也是至关重要的。
物联网部署中需要安全和隐私的关键部分和协议包括:
* <ruby>受限应用协议<rt>Constraint application protocol</rt></ruby>CoAP
* <ruby>低功耗蓝牙<rt>Bluetooth low energy</rt></ruby>BLE
* <ruby>高级消息队列协议<rt>Advanced message queuing protocol</rt></ruby>AMQP
* <ruby>消息队列遥测传输<rt>Message queuing telemetry transport</rt></ruby>MQTT
攻击者有多种可能的入口访问到联网设备。在物联网渗透测试(或安全审计)时,要测试完整的物联网场景和生态。测试内容包括从单个层和嵌入式软件到通信协议和服务器的所有内容。对服务器、在线接口和移动应用的测试并非物联网独有,但至关重要,因为它们涵盖了故障可能性很高的领域。物联网漏洞是电气、嵌入式软件和通信协议测试的重点。
在评估联网设备的安全性时会进行以下测试。这些测试都是使用不同的针对漏洞的高性能渗透测试和安全审计工具进行的:
* 通信端口中的攻击和操纵的测试
* 基于无线电信号捕获和分析的 IoT 嗅探
* 接口和后门测试
* 缓冲区溢出测试
* 密码破解测试
* 调试
* 密码学分析
* 固件操纵测试
* 逆向工程
* 内存转储
![][3]
### 物联网安全审计使用的开源工具
物联网设备在我们的日常生活中变得越来越普遍,比如,智能自行车、健身跟踪器、医疗传感器、智能锁和联动工厂等。所有这些设备和组件都可以使用开源工具来抵御网络攻击,本文将简要介绍其中一些工具。
#### PENIOT
[PENIOT](https://github.com/yakuza8/peniot) 是一种物联网渗透测试工具,使安全审计团队能够通过利用设备的连接来测试和破坏具有各种安全威胁的设备。可以测试主动和被动安全威胁。在确定目标设备和相关信息(或参数)后,可以进行主动安全攻击,例如改变系统资源、重放合法通信单元等。还可以分析被动安全威胁,例如破坏敏感数据的机密性或访问网络流量分析。
#### Objection
[Objective](https://github.com/sensepost/objection) 是一个对物联网环境中使用的安卓和 iOS 应用程序进行详细分析和安全审计的工具。
目前许多智能组件和设备都在使用安卓和 iOS 平台,使用该工具可以通过详细的日志和安全审计报告对这些平台进行分析。
#### Routersploit
[这个](https://github.com/threat9/routersploit) 针对嵌入式设备的开源开发框架具有多个用于渗透测试和安全审计的功能和模块:
* Exploits —— 漏洞评估
* Creds —— 网络服务和证书的测试
* Scanners —— 对目标进行详细的安全审计
* Payloads —— 有效载荷和注入关键点的生成
* Generic —— 执行和测试攻击
#### Wireshark
[Wireshark](https://www.wireshark.org) 是一款功能丰富的、免费的网络协议分析器。MQTT 等多种物联网协议可通过该工具实现有效分析。为了发现弱点,可以根据协议配置安全规则并检查流量。可以使用 `tcpdump` 通过命令行访问网络数据包分析器。此类工具用于检查物联网设备和网络之间交换的数据包。
#### Binwalk
[Binwalk](https://www.kali.org/tools/binwalk) 是一种逆向硬件设计的工具。它是 Kali Linux 的关键组件之一,用于渗透测试、服务器指纹识别、安全审计和取证应用。
#### Firmwalker
[Firmwalker](https://github.com/craigz28/firmwalker) 是一款自由开源的工具,用于搜索和扫描固件文件系统,无论是否被提取或挂载。使用这个工具可以做一个详细的安全审计。
在物联网IoT和万物互联IoE的时代有必要设计并使用高性能工具包进行渗透测试和安全审计。随着物联网设备数量的增加安全风险也在增加。为了物联网和万物互联部署有更高级别的安全和隐私有必要根据最新的协议和动态的流量定制化自由及开源的工具箱和软件包。
--------------------------------------------------------------------------------
via: https://www.opensourceforu.com/2022/05/tools-you-can-use-for-the-security-audit-of-iot-devices/
作者:[Dr Kumar Gaurav][a]
选题:[lkxed][b]
译者:[tendertime](https://github.com/tendertime)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.opensourceforu.com/author/dr-gaurav-kumar/
[b]: https://github.com/lkxed
[1]: https://www.opensourceforu.com/wp-content/uploads/2022/03/Screenshot-2022-05-02-154427-696x422.png
[2]: https://www.opensourceforu.com/wp-content/uploads/2022/03/Figure-1-Key-components-in-PENIOT.jpg
[3]: https://www.opensourceforu.com/wp-content/uploads/2022/03/Screenshot-2022-05-02-153653-590x282.png

View File

@ -0,0 +1,88 @@
[#]: subject: "Ubuntus Unity Desktop Still Lives: Version 7.6 is Available for Testing After 6 Years"
[#]: via: "https://news.itsfoss.com/unity-7-6-testing/"
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
[#]: collector: "lkxed"
[#]: translator: "imgradeone"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14538-1.html"
Ubuntu 的 Unity 桌面还活着:时隔 6 年后7.6 测试版发布
======
> 虽然 Canonical 已经不再维护 Unity 桌面,但 Ubuntu Unity 的开发者承担了这项重任,发布了一项主要更新(已可用于测试)。
![Unity 7.6][1]
怕你兴奋过头了先提醒一下Canonical 并没有回归 Unity 桌面的维护。
得益于 Ubuntu Unity 发行版开发者Rudra Saraswat的不懈努力时隔 6 年,我们终于看到了 Unity 桌面环境的更新。
补充说一下,[Ubuntu Unity][2] 是一款采用 Unity 桌面(而不是 GNOME的社区项目。因此如果你想在 Ubuntu 22.04 LTS 上使用 Unity 桌面,那么毋庸置疑,[Ubuntu Unity][2] 绝对是你的最佳伙伴。
起初,它仅仅提供了经过微调的 Unity 体验,但现在,**Unity 7.6** 的界面得到了一些优化及视觉变更。
下面是你应该了解的东西:
### Unity 7.6:更新了什么?
> **提示**Unity 7.6 是为公共测试而发布的,它不应作为替代其他桌面环境的使用环境。
这不仅仅是面向用户的改进,还有针对开发方面的努力,旨在帮助贡献者,让他们更方便地帮助 Unity7 的开发。
这些改善包括:
#### 用户界面变更
![Unity 桌面][3]
Dash 启动器(应用启动器)与 HUD 现已重新设计,拥有更现代、简洁的视觉。
总的来看,现在的设计看上去更加扁平,但仍旧保留了不错的系统全局模糊效果。
本次引入了一些细微的视觉改进,比如停靠区上的“清空回收站”按钮修改为使用 Nemo而不是 Nautilus以及修复了 Dash 预览中的应用详情与评分。
#### 性能改进
![Unity 桌面][4]
在最新的更新中Unity7 的内存使用量更低同时你也可以注意到Ubuntu Unity 22.04 的内存使用量明显降低到约 700-800 MB。
此外低端显卡模式现在运作得更好Dash 也比以前更快。
#### 其他变化
Unity7 Shell 的源代码已经完全迁移至 [GitLab][5]。用于独立测试的 Unity7 启动器已被修复,同时一些有问题的测试项也已被禁用,改善了构建用时(使其大幅缩短)。
发布说明上说,这些改进将帮助 Unity7 的贡献者。
### 测试 Unity 7.6
你可以按照 [官方测试公告][6] 中提到的方式来编译它,并亲自尝试。你也可以前往其官方网站探索更多。
> **[Unity 7.6][7]**
另一种情况,如果你不想添加测试 PPA 源,你也可以等待 Ubuntu Unity 22.04 的更新。
*你对 Unity 桌面环境的这次更新有什么看法?你喜欢它吗?欢迎在评论区中告诉我你的想法。*
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/unity-7-6-testing/
作者:[Ankush Das][a]
选题:[lkxed][b]
译者:[imgradeone](https://github.com/imgradeone)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/ankush/
[b]: https://github.com/lkxed
[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/unity-7-6-release.jpg
[2]: https://ubuntuunity.org/
[3]: https://news.itsfoss.com/wp-content/uploads/2022/05/unity-7-6.jpg
[4]: https://news.itsfoss.com/wp-content/uploads/2022/05/neofetch-unity-7-6.png
[5]: https://gitlab.com/ubuntu-unity
[6]: https://unity.ubuntuunity.org/blog/unity-7.6/
[7]: https://unity.ubuntuunity.org/

View File

@ -0,0 +1,44 @@
[#]: subject: "Nvidia Begins To Set The Foundation For Future Open And Parallel Coding"
[#]: via: "https://www.opensourceforu.com/2022/05/nvidia-begins-to-set-the-foundation-for-future-open-and-parallel-coding/"
[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/"
[#]: collector: "lkxed"
[#]: translator: "zxcv545"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14565-1.html"
英伟达开始着手为未来的开放和并行编程建立基础
======
![](https://img.linux.net.cn/data/attachment/album/202205/09/080227sdxqcd3rxooc3cq3.jpg)
随着图形处理器在计算机里变得越来越常见,英伟达正在扩大与标准和开源社区的合作,以便于包括先前仅限于该公司开发工具的下游技术。虽然人们在 C++ 和 Fortran 等语言上投入了大量精力,但这些语言被认为在高度并行的计算机上执行代码落后于原生实现的编程语言。
英伟达结合了开放和专有库的 CUDA 并行编程框架影响了许多正在开放和主流化的技术。在 2007 年CUDA 作为一个为程序员开发基于 GPU 的系统的一系列编程工具和框架而推出。然而,随着 GPU 利用率在更多应用程序和领域中的增长CUDA 理念发生了转变。
英伟达因其在 GPU 上的主导地位而广为人知,但 CUDA 是这家以 1 万亿市值为目标的软件和服务供应商重塑品牌的核心。英伟达的长期目标是成为一个全栈提供商,专注于自动驾驶、量子计算、医疗保健、机器人、网络安全和量子计算等特定领域。
英伟达已经在特定领域创建了专用的 CUDA 库,以及企业可以使用的硬件和服务。其 CEO 黄仁勋在最近的 GPU 技术大会上宣布的 “AI 工厂” 概念,最能体现全栈战略。客户可以将应用程序放入英伟达的大型数据中心,从而获得针对特定行业或应用程序需求量身定制的定制 AI 模型。
英伟达可以通过两种方式从 AI 工厂原则中受益:利用 GPU 容量或利用特定领域的 CUDA 库。在英伟达 GPU 上,程序员可以使用 OpenCL 等开源并行编程框架。另一方面CUDA 将为那些愿意投资的人提供额外的最后一英里增长,因为其已调整为与英伟达的 GPU 密切运作。
虽然并行编程在高性能计算中很常见常见,但英伟达的目标是让其成为主流计算的标准。该公司正在协助实现一流工具的标准化,无论品牌、加速器类型或并行编程框架是什么,都可以编写可跨硬件平台移植的并行代码。
一方面,英伟达是 C++ 小组的成员,该小组正在为跨硬件同时执行可移植代码奠定基础。上下文可以是主要执行 IO 的 CPU 线程,也可以是执行高要求计算的 CPU 或 GPU 线程。英伟达特别致力于为 C++ 程序员提供异步和并行的标准语言和基础设施。
第一项工作侧重于内存模型,该模型已合并到 C++ 11 中但当并行性和并发性变得更加普遍时必须对其进行更新。C++ 11 的内存模型强调跨多核 CPU 的并发执行但它缺乏并行编程钩子。C++ 17 标准为更高级别的并行特性奠定了基础但真正的可移植性必须等待未来的标准。C++ 20 是当前标准,而 C++ 23 即将推出。
--------------------------------------------------------------------------------
via: https://www.opensourceforu.com/2022/05/nvidia-begins-to-set-the-foundation-for-future-open-and-parallel-coding/
作者:[Laveesh Kocher][a]
选题:[lkxed][b]
译者:[zxcv545](https://github.com/zxcv545)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.opensourceforu.com/author/laveesh-kocher/
[b]: https://github.com/lkxed
[1]: https://www.opensourceforu.com/wp-content/uploads/2022/05/Nvidia_logo_angled_shutterstock.jpg

View File

@ -0,0 +1,112 @@
[#]: subject: "Firefox 100 Marks 17 Years of Development with Interesting Upgrades"
[#]: via: "https://news.itsfoss.com/firefox-100-release/"
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
[#]: collector: "lkxed"
[#]: translator: "lkxed"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14555-1.html"
Firefox 100 发布:带来诸多有趣更新,纪念 17 年的发展历程
======
> Mozilla Firefox 100 是一个重要的版本,它标志着这个浏览器 17 年的发展,以及多年来所有令人兴奋的功能。
![Firefox 100][1]
Firefox 可以说是最受欢迎的不基于 Chrome 的开源浏览器,它可用于 Linux、Windows 和 Mac。
众所周知,目前,基于 Chrome 的浏览器在市场份额中占主导地位。但你可能不知道的是Firefox 早在谷歌 Chrome 出现之前就已经问世了。
准确地说Firefox 100 的发布标志着,它自 2004 年的发展历程已经有 17 年了。
时间过得好快,一切仿佛就发生在昨天。
### Firefox 100更新内容
![Firefox 100][2]
不管你是否喜欢 Firefox 新的发展计划,你都不得不承认,它多年来引入了众多行业领先的功能/技术,这一点令人印象深刻。
Firefox 100 的发布是一个重要的里程碑。但是,这并不是一次大规模升级。
本文中,我将介绍这个版本的主要改进。
#### “画中画”模式改进
![Firefox 100][3]
现在,在“画中画”模式下观看 YouTube、Prime Video 和 Netflix 上的任何内容Firefox 都支持视频字幕。
你只需要在相应的平台上启用视频字幕,它就会继续出现在“画中画”中。
“画中画”字幕不仅支持主流平台,还支持 Coursera 等使用 WebVTT 格式的网站。
#### 语言检测
为了改善用户体验Firefox 现在可以检测到语言与操作系统偏好不符的情况。
这只会在你安装浏览器后,第一次运行时触发。你可以在系统语言和浏览器默认语言之间进行选择。
#### 滚动条默认不占用屏幕空间
Linux 和 Windows 11 的滚动条默认不会占用你宝贵的屏幕空间。换句话说,当你进行滚动或导航时,滚动条才会做出反应。
![Firefox 100][4]
你可以在设置中改变这一点(针对 Linux 用户)。如果你是在 Windows 上Firefox 的视觉效果会跟随你的系统设置。因此,你需要对 Firefox 浏览器进行调整,以符合你自己的偏好。
#### 控制网站外观
![Firefox 100][5]
对于某些网站,你的浏览器偏好会影响网页的颜色/外观。
为了调整这类网站的体验,你现在可以在设置中设置网站外观偏好,选择浅色/深色、系统或 Firefox 主题。
#### HDR 视频 & 硬件加速的 AV1 视频解码
尽管,对一些用户来说,支持 HDR 视频可能不是什么大事。但我还是要指出,现在 Mac 上的 Firefox 也支持 HDR 了。
截至目前,官方支持仅限于在 macOS 11+ 上浏览 YouTube 网站。当然,你还需要一个支持 HDR 的屏幕。
硬件加速的 AV1 视频解码终于在 Windows 上得到支持,当然,你还得有与之兼容的 GPU包括英特尔 11 代、AMD RDNA 2 和 GeForce 30 系列。除此之外Firefox 在 Windows 上还启用了视频叠加功能,以减少电量使用。
不幸的是,这些并不是针对 Linux 的更新,但应该能帮助跨平台的 Firefox 用户。
#### 其他改进
除了主要的亮点之外,它还包括了以下改进:
* 增加了对多个 Java 线程的分析支持。
* 软重载一个网页将不再导致所有资源的重新验证。
* 有了一个新的链接焦点指示器,它用一个实心的蓝色轮廓取代了旧的点状轮廓。
你可以在 [官方发布说明][6] 中了解更多技术变化。
### 获取 Firefox 100
你可以从它的官网上下载,也可以寻找可用的更新,应该很快就能下载完成。
> **[Mozilla Firefox 100][7]**
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/firefox-100-release/
作者:[Ankush Das][a]
选题:[lkxed][b]
译者:[lkxed](https://github.com/lkxed)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/ankush/
[b]: https://github.com/lkxed
[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/firefox-100-release.jpg
[2]: https://news.itsfoss.com/wp-content/uploads/2022/05/firefox-100-about.jpg
[3]: https://news.itsfoss.com/wp-content/uploads/2022/05/firefox-captions-100.jpg
[4]: https://news.itsfoss.com/wp-content/uploads/2022/05/scrollbars.jpg
[5]: https://news.itsfoss.com/wp-content/uploads/2022/05/firefox-appearance-tweak.jpg
[6]: https://www.mozilla.org/en-US/firefox/100.0/releasenotes/
[7]: https://www.mozilla.org/en-US/firefox/download/

View File

@ -0,0 +1,43 @@
[#]: subject: "Microsofts 3D Movie Maker, First Released In 1995, Is Now Open Source"
[#]: via: "https://www.opensourceforu.com/2022/05/microsofts-3d-movie-maker-first-released-in-1995-is-now-open-source/"
[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/"
[#]: collector: "lkxed"
[#]: translator: "lkxed"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14549-1.html"
微软 1995 年首次发布的 3D Movie Maker 现已开源
======
![Windows Movie Maker 标志][1]
这些年来,微软发布了许多开源工具。今天,它正在翻箱底,让 3D Movie Maker 也对所有人开放。3D Movie Maker 于 1995 年首次推出,它允许你用 3D 人物、道具、背景、文字、声音和特殊效果来创建动画场景。这个版本还包括一个 Argonaut 软件公司构建的 BRender。虽然这是一个积极的举措但请先别太激动事情可没那么容易。
> “这个项目不太可能在现代硬件/软件下构建成功,但你可以先开始编译,并获得部分完整的二进制文件。”
以下是它的部分构建说明:
- 确保本仓库检出到一个名字简短的目录中,最好是靠近驱动器的根路径(即 `C:\3d` 这样)。
- 在构建过程中,你需要 Visual C++ 2.0 的开发工具(可以在安装盘的 `MSVC20BIN` 目录下找到)。有一些源码遵循的是 C++98 之前的规范,因此现代编译器可能不会喜欢它们。
- 从本仓库的根目录下运行 `setvars.bat`。你可以改变这个脚本中的值来改变你的构建目标。
- 查找并安装字体文件(详见 `FONTS.md`)。
- 运行 `nmake` 以开始使用 3D Movie Maker。
这些代码是从微软公司的档案中恢复的,涉及到的第三方软件(如 BRender已获得授权。同时它删除了开发者的身份和别名以便使该软件开源从事原始发布工作的微软现任员工除外他们同意保留自己的名字。你可以在 [这里][2] 下载它。
--------------------------------------------------------------------------------
via: https://www.opensourceforu.com/2022/05/microsofts-3d-movie-maker-first-released-in-1995-is-now-open-source/
作者:[Laveesh Kocher][a]
选题:[lkxed][b]
译者:[lkxed](https://github.com/lkxed)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.opensourceforu.com/author/laveesh-kocher/
[b]: https://github.com/lkxed
[1]: https://www.opensourceforu.com/wp-content/uploads/2022/05/windows-movie-maker-logo-696x392.png
[2]: https://github.com/microsoft/Microsoft-3D-Movie-Maker

View File

@ -0,0 +1,57 @@
[#]: subject: "elementary OS 7 Code Name Revealed. Here are the Details"
[#]: via: "https://www.debugpoint.com/2022/05/elementary-os-7-announcement/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lkxed"
[#]: translator: "lkxed"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14556-1.html"
elementary OS 7 公布了它的代号
======
> 在今天早些时候的一篇博文中,创始人兼首席执行官 Daniella Fore 公布了 elementary OS 7 的发行说明和计划更新。
![](https://img.linux.net.cn/data/attachment/album/202205/07/085713izkxhbarixtkdryg.jpg)
### elementary OS 7 公告
elementary OS 7 的代号是 “Horus”它将基于 [Ubuntu 22.04 LTS][2]。这个版本的开发已经接近尾声,团队正在修复一些涉及窗口管理器和其他领域的关键回归测试问题。
首先功能方面elementary OS 7 得到了来自 **Ubuntu 22.04 LTS 的最新软件包和升级**。此外,**Flatpak 运行时更新、Granite 7、样式表和图标更新** 预计将在这个发行版的第 7 个版本中出现。它将会基于 [Linux 5.15.x 内核][3]。
其次,应用商店中的软件将会获得 **软件自动更新功能** 和新的 **笔记本电脑的电源配置文件选项**。预计电源配置文件将遵循传统的“<ruby>平衡<rt>Balanced</rt></ruby>”、“<ruby>性能<rt>Performance</rt></ruby>”和“<ruby>节能<rt>Power Saver</rt></ruby>”选项,就像其他 Linux 发行版一样。
此外,一个 **新的漂亮的音乐应用程序** 将在这个版本中首次亮相,它重新设计了一些图标,在桌面上的视觉效果也有提升。一些原生的应用商店中的软件已经使用了 GTK4 技术,在 Elementory OS 7 中,它们将会给用户带来流畅的性能体验。
#### 新的升级工具
但这还不是全部。团队还兴奋地宣布,一个 elementary **版本升级工具** 的可用原型已经准备就绪,目前正在测试。因此,在 elementary OS 7 发布后,它将正式亮相,以帮助用户实现从 elementary OS 6 到 7 的迁移。
目前elementary OS 的版本升级是最大的挑战,因为它没有任何官方的升级途径。“版本升级工具” 是一个令人兴奋的消息,它将吸引更多的用户使用这个漂亮的 Linux 发行版。
不过Wayland 迁移仍在计划之中,还没有被优先考虑。当 Wayland 被完整支持后elementary OS 用户将会获得令人兴奋的体验。
### 发布日期?
对于任何一个 elementary OS 发行版用户最关心的问题都是发布日期。嗯发布日期还没有最终确定。elementary OS 7 “Horus” 将在准备好后发布。我乐观的猜测是在今年年底,在 Ubuntu 22.04 的第一个点发布(预计在 2022 年 7 月)之后。
最后,请阅读 elementary OS 7 [官方公告][4],了解更多关于这个版本的信息,以及 elementary OS 6 “Odin”6.1 版本)的许多更新。
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/2022/05/elementary-os-7-announcement/
作者:[Arindam][a]
选题:[lkxed][b]
译者:[lkxed](https://github.com/lkxed)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.debugpoint.com/author/admin1/
[b]: https://github.com/lkxed
[1]: https://www.debugpoint.com/wp-content/uploads/2021/08/elementary-OS-6-ODIN-Desktop-1024x576.jpeg
[2]: https://www.debugpoint.com/2022/01/ubuntu-22-04-lts/
[3]: https://www.debugpoint.com/2021/11/linux-kernel-5-15/
[4]: https://blog.elementary.io/updates-for-april-2022/

View File

@ -0,0 +1,97 @@
[#]: subject: "Tails 5.0 Release is Based on Debian 11 With a New “Kleopatra” Tool"
[#]: via: "https://news.itsfoss.com/tails-5-0-release/"
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
[#]: collector: "lujun9972"
[#]: translator: "lkxed"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14568-1.html"
Tails 5.0 发布:基于 Debian 11附带新的 Kleopatra 工具
======
> Tails 5.0 是一次令人印象深刻的升级,采用了 Debian 11 和一个新的工具,为用户配备了增强的安全和隐私。
![](https://news.itsfoss.com/wp-content/uploads/2022/05/tail-5-0-release.jpg)
Tails 是一个流行的 Linux 发行版,它专注于保护人们免受审查和监视,是 [注重隐私的 Linux 发行版][1] 之一。
你可以在任何地方使用它和 U 盘 来完成工作,而不用担心暴露你的信息。
Tails 5.0 是最新的版本,它基于 Debian 11Bullseye构建。因此你可以期待 Tails 5.0 中具备所有 [Debian 11 的改进][2]。
### Tails 5.0:更新内容
让我们来看看该版本所引入了哪些新功能和软件升级吧!
以下是其中的一些亮点。
#### 增加了 Kleopatra 工具
![][3]
Kleopatra 是 [GnuPG][4] 的一个图形界面,它用于加密文本和文件。在 Tails 5.0 中Kleopatra 取代了 OpenPGP 小程序 和 Seahorse 工具。
Kleopatra 只在一个软件包中就完成了这一切。并且相对而言Kleopatra 的维护更加活跃,问题最少。
#### 默认启用的附加软件
当使用持久化存储时,附加软件功能是默认启用的。
因此,你可以在短时间内快速配置你想要的东西。
#### 对活动概览的改进
![][5]
在 Tails 5.0 中,你可以使用活动概览来访问你的窗口和应用程序。你只需点击屏幕左上角的“<ruby>活动<rt>Activities</rt></ruby>”按钮或按下键盘上的<ruby>超级<rt>Super</rt></ruby>LCTT 译注:在某些键盘上是 WIN 键)即可。
你还可以在同一屏幕中搜索应用程序、文件和文件夹。
#### 软件升级
Tails 5.0 基于 Debian 11因此所有的基本软件都已升级包括
* Tor 浏览器 to 11.0.11
* GNOME 3.38
* MAT to 0.12
* Audacity 2.4.2
* 磁盘工具 3.38
* GIMP 2.10.12
* LibreOffice 7.0
#### 其他改进
除软件升级外,无驱动打印和扫描的硬件支持也得到了更新,以支持新款的打印机/扫描仪。
除此之外,它还有许多修复。你可以在其 [官方发布公告][6] 中查看更多信息。
### 下载 Tails 5.0
你可以在官方网站下载最新的 Tails 5.0 ISO。
> **[Tails 5.0][7]**
注意,如果你已经在使用 Tails请不要执行自动升级。你需要按照 [官方说明][8] 进行手动升级。
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/tails-5-0-release/
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[lkxed](https://github.com/lkxed)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://itsfoss.com/privacy-focused-linux-distributions/
[2]: https://news.itsfoss.com/debian-11-feature/
[3]: https://news.itsfoss.com/wp-content/uploads/2022/05/kleopatra.png
[4]: https://www.gnupg.org/
[5]: https://news.itsfoss.com/wp-content/uploads/2022/05/desktop-tails-5.png
[6]: https://tails.boum.org/news/version_5.0/index.en.html
[7]: https://tails.boum.org/install/index.en.html
[8]: https://tails.boum.org/doc/upgrade/index.en.html#manual

View File

@ -1,111 +0,0 @@
[#]: subject: "Exciting New Features Revealed for KDE Plasma 5.25! Take a Look Here"
[#]: via: "https://news.itsfoss.com/plasma-5-25-features/"
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
[#]: collector: "lujun9972"
[#]: translator: "PeterPan0106"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Exciting New Features Revealed for KDE Plasma 5.25! Take a Look Here
======
[KDE Plasma 5.24][1] was an interesting upgrade with an updated breeze theme and the new overview effect.
Now, the developers have geared up to introduce exciting new features for KDE Plasma 5.25.
### KDE Plasma 5.25: Whats New?
In a blog post by Nate Graham, some of the most intriguing changes were highlighted. Let us take a look at them here.
#### Ability to Selectively Apply the Global Theme
![Credits: Pointiestick Blog / Nate Graham][2]
When you proceed to apply a Global Theme from the system settings, you will be prompted to confirm if you want the theme to be applied everywhere or to certain parts of it.
For instance, you may not want to change the cursors and icons but the window background and application style.
Overall, you get more control when applying the Global Theme to your KDE-powered system.
Impressive work by **Dominic Hayes** for this [merged commit][3].
#### Auto-Generated Accent Based on Current Wallpaper
Having the ability to choose a custom or a preset accent is already good enough.
With KDE Plasma 5.25, they are getting one step ahead by giving the option to generate and select an accent color based on the current wallpaper.
And, it all happens automatically as you change the wallpaper, given that you have the option enabled.
You can find the option to enable it here:
![Credits: Pointiestick Blog / Nate Graham][4]
So, if you want something to match your background, you do not have to tweak around the custom accent colors to get it right. This should make things easier.
A small but mighty addition to the arsenal of new features. All thanks to **Tanbir Jishan** for this [merged commit][5].
#### Tint Color Scheme with Accent Color
For even greater customization to the look/feel, KDE Plasma 5.25 will let you add a tint to your selected accent color.
![Credits: Jan Blackquill][6]
You can enable/disable it if you like the user experience with the tinted theme.
To explore more about this change in the [merged commit][7] by **Jan Blackquill**.
#### Create Desktop Files for Flatpak/Snap Applications
Initially, sandboxed applications like Flatpak and Snap did not have the support for desktop files on KDE.
Thanks to a new **Dynamic launcher** portal (via [merged commit][8] by Harald Sitter). It allows you to create and edit .desktop files for seamless system integration with sandboxed applications.
#### Improvements to Discover
There are some subtle changes to the Discover software center where you can find all the application categories in the sidebar without needing to navigate through categories like “Applications”, “Add-ons”, and “Plasma Add-ons” separately.
KDE Discover Before vs After (Credits: **[Taavi Juursalu][9]**)
Use the cursor to slide through the before/after in the images above.
To explore more about the change, head to its [merged request][10].
#### Other Improvements
There are several other refinements and changes planned for KDE Plasma 5.25. Some of them include:
* Improvements to the performance of KRunner
* Network widget adds details for frequency and BSSID of the Wi-Fi network
You can look at all the bug fixes and technical improvements in [Nates blog post][11].
_Exciting about KDE Plasma 5.25? Well, with these feature additions, I am eagerly awaiting its release. Let me know your thoughts in the comments below._
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/plasma-5-25-features/
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[PeterPan0106](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://news.itsfoss.com/kde-plasma-5-24-lts-release/
[2]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9Ijc3OSIgd2lkdGg9IjEwMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmVyc2lvbj0iMS4xIi8+
[3]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1043
[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9Ijc3OCIgd2lkdGg9IjEwMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmVyc2lvbj0iMS4xIi8+
[5]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1325
[6]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjExNDMiIHdpZHRoPSIxNTU4IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIvPg==
[7]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1620
[8]: https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/commit/d5f958e149705e27bbba9f3bbec659ff5bed1d80
[9]: https://invent.kde.org/taavi
[10]: https://invent.kde.org/plasma/discover/-/merge_requests/234
[11]: https://pointieststick.com/2022/04/22/this-week-in-kde-major-accent-color-and-global-theme-improvements/

View File

@ -1,88 +0,0 @@
[#]: subject: "Why you should choose mindfulness over multitasking"
[#]: via: "https://opensource.com/article/19/4/mindfulness-over-multitasking"
[#]: author: "Sarah Wall https://opensource.com/users/sarahwall"
[#]: collector: "lkxed"
[#]: translator: "lkxed"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Why you should choose mindfulness over multitasking
======
If your brain is sputtering to a halt, you could be suffering from multitasking and decision fatigue.
![14 facts about OpenStack Newton][1]
(Image by: Pixabay. Modified by Opensource.com. CC BY-SA 4.0)
You have your morning coffee in hand, you've just finished your daily scrum, and you sit down at your computer to start your day. Up pops a Slack message. You scan your emails, then bounce back to Slack. You look at your calendar to see when your next meeting is—much to your surprise, it's starting in 15 minutes. You get back to your desk and check your to-do list to see what tasks you can fit in before your next meeting, but one of your co-workers asks for your help to solve a problem. Before you know it, half of your day has disappeared.
Many of my days are spent like this, juggling multiple tasks. There are moments I find myself staring at my computer with my brain at a complete halt. If you, too, find yourself in this situation, it's probably a sign from your brain to take a break. You could be suffering from too much multitasking and decision fatigue.
On average, adults make about [35,000 decisions][2] every day! They can be simple decisions, such as what to eat or what to wear, or decisions that require more thought, such as where to go on your next vacation or which career to pursue. Every day you are faced with a plethora of choices to occupy your mind.
### Mindless multitasking
Not only are you faced with making thousands of decisions each day, but multitasking has also become the norm for busy and in-demand professionals. The problem is, multitasking hurts more than it helps. The more you divide your attention through multitasking, the more your productivity decreases.
In a study, self-described multitaskers were asked to switch back and forth between tasks at a pace that felt natural to them. A control group was asked to do one job at a time in sequence. The multitasking group performed far less effectively. Each time they switched tasks, there was a slowdown because it took time to time recall the details and the steps they'd done so far. This wound up making everything [take roughly 40% longer][3] and led to lower levels of accuracy overall. People who focused on one task at a time spent less time overall and finished all the tasks.
### Choose mindfulness
The mind functions optimally when it can focus on one activity at a time. Choosing mindfulness over multitasking will result in better feelings throughout your day and help you do better work.
"Mindfulness" can be defined as being conscious and aware. It really is about being present in the moment and focusing your attention on what's at hand. There are many advantages to mindfulness in the workplace. The trick is creating boundaries and habits that allow you to give each task your full attention.
Take a proactive approach and create a prioritized plan of the items that must get done each day. This will allow you to make real progress on a few things that are important instead of being reactive. Every item that goes on your to-do list should be discrete, clear, and actionable. Focus on three to five tasks per day.
### 3 ways to take a break during your workday
Don't forget to plan breaks throughout your day. The brain needs a few minutes of rest every hour to recuperate and to avoid burnout. Taking mini-breaks is good for your mental health and [leads to increased productivity][4].
Here are three easy ways to incorporate breaks into your day:
#### 1. Move your body
Take 10 minutes to get out of your chair and go for a short walk. If you're pressed for time, stand up and stretch for two minutes. Changing the position of your body and focusing on the present moment will help relieve the mental tension that has built up in your mind.
#### 2. Laugh more
Take a break to talk with your friends and colleagues at work. Laughter decreases stress hormones and triggers the release of endorphins, the body's natural feel-good chemicals. A little laughter break helps relax your mind and is also good for your soul.
#### 3. Breathe deeply
Reset your mind and body with a two-minute break to breathe deeply into your belly. Deep breathing calms your mind and body, improves oxygen flow, and gives you a natural energy boost.
1. Sit up tall with a straight spine, bring your awareness to your belly, and allow it to soften and relax.
2. Begin with a slow, deep inhalation for a count of three, filling your belly, then rib cage, then upper chest with oxygen.
3. Pause for a second, then exhale from your upper chest, rib cage then belly, drawing your belly in towards your spine at the end.
4. Pause again, then repeat.
### Reset yourself
The next time you find yourself at a standstill or pressuring yourself to finish a task when your mind is not in the flow, try some of the tips above. It's better to take a short break and allow yourself to reset rather than trying to power through. Your body and brain will thank you.
Adapted from [Give Yourself a Break][5] *on BodyMindSpirit* *and* [Mindfulness Over Multitasking][6] on ImageX's blog.
Sarah Wall will present [Mindless multitasking: a dummy's guide to productivity][7], at [DrupalCon][8] in Seattle, April 8-12, 2019.
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/4/mindfulness-over-multitasking
作者:[Sarah Wall][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/sarahwall
[b]: https://github.com/lkxed
[1]: https://opensource.com/sites/default/files/lead-images/life_tree_clouds.png
[2]: https://go.roberts.edu/leadingedge/the-great-choices-of-strategic-leaders
[3]: http://www.apa.org/research/action/multitask.aspx
[4]: https://opensource.com/article/19/3/guide-being-more-productive
[5]: https://body-mind-spirit-coach.com/2019/01/02/give-yourself-a-break/
[6]: https://imagexmedia.com/mindfullness-over-multitasking
[7]: https://events.drupal.org/seattle2019/sessions/mindless-multitasking-dummy%E2%80%99s-guide-productivity
[8]: https://events.drupal.org/seattle2019

View File

@ -1,112 +0,0 @@
[#]: subject: "How I use open source to design my own card games"
[#]: via: "https://opensource.com/article/21/12/open-source-card-game"
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
How I use open source to design my own card games
======
Open source isn't just about software. It's a cultural phenomenon, a
natural fit for tabletop games.
![Deck of playing cards][1]
I love a good game, and I particularly enjoy tabletop games because they have many of the same traits that open source has. When you're playing a card game in real life with friends sitting around a table, you can as a group decide that Jokers are wild. Alternately, you could arbitrarily decide that should a Joker come into play, anyone holding an Ace must discard that Ace. Or when a Queen of Diamonds comes into play, everyone must pass their hand to the player on their right. In other words, you can reprogram the rules on a whim because a game is nothing but a mutually agreed-upon set of conditions. To me, what's even better is that you can invent your own games instead of hacking the rules of somebody else's game. From time to time, I do this as a hobbyist, and because I like to combine my hobbies, I tend to design games with only open source and open culture resources.
First of all, it's important to understand that there are, broadly, two facets of a game: _flavor_ and _mechanics_. The flavor is the story and theme of the game. The mechanics of a game are the rules and the condition of play. The two aren't always completely separate from one another, and there's an elegance to designing a game themed around race cars, for instance, with rules that demand players to perform actions very quickly. However, the flavor and mechanics are just as often treated separately, and it's entirely reasonable to invent a game that _could_ be played with a standard deck of poker cards, but that's themed around space llamas, just for the fun of it.
### Open source artwork
If you've ever gone to a museum of modern art, you've probably found yourself standing in front of a canvas painted solid blue and overheard somebody utter this time-honored phrase: "Heck, I could make that!" But the truth is, artwork is hard work. Making art that's pleasing to the eye takes a lot of thought, time, confidence, and skill, so it makes sense that the art is one of the most difficult things to procure for a game you're designing.
I have a few "hacks" on dealing with this classic snag.
#### 1\. Find common ground
There's free and open art out there, and a lot of it is very good. The problem is that games usually need more than one art piece. If you're designing a card game, you probably need at least four or six distinct elements (assuming your cards follow the foundations laid out by the Tarot deck) and possibly more. If you spend enough time on it, you can find [Creative Commons and Public Domain][2] artwork online on sites like [OpenGameArt.org][3], [FreeSVG.org][4], [ArtStation.com][5], [DeviantArt.com][6], and many others.
If the site you're using doesn't have a Creative Commons search, enter the following words into any search engine, "This work is licensed under a Creative Commons" (the quotes are important, so don't leave those off) and whatever syntax your favorite search engine uses to limit the search to just one site (for example, **site:deviantart.com**).
Once you have a pool of art to choose from, sort the art that you've found by identifying common themes in the artwork. Two pictures of robots by two different people might look nothing alike, but they're still both robots. Provided you have enough robot-themed art, you can structure the flavor of your game around robots.
#### 2\. Commission Creative Commons art
You can hire artists to make custom art for you. I work with artists who use open source paint programs like [Krita][7] and Mypaint, and as part of the contract, I specify that the art must be licensed under a Creative Commons Attribution Share-alike (CC BY-SA) license. I've only ever had one artist decline the offer because of the license restriction, and most are happy for their artwork to have a potentially larger life than just as part of a hobbyist's self-published game.
#### 3\. Make your own
As a trip to the museum of modern art reveals, art is a very flexible term. I've found that as long as I give myself a goal of how many cards or tokens for a game I need to create, I can usually produce something with one of the many graphical creative tools available on Linux. It doesn't have to be anything fancy. Just like modern art, you can paint a card with blue and yellow stripes, another with red and white polka-dots, another with green and purple zig-zags, and nobody but you will ever know that you secretly meant for them to be the lords and ladies of the fairy court, except that you don't know how to draw those. Think about all the simple things you can create in a graphics application, or by tracing photographs of everyday objects, or by remixing classic Poker suits, or Tarot themes, and so on.
### Layout
I use [Inkscape][8], Scribus, or [GIMP][9] for layout, depending on what my assets are and what manner of design I'm after.
For cards, I find that a simple layout is easy to do and look at, solid colors tend to print better than gradients, and intuitive iconography is best.
![layout in Inkscape][10]
(Seth Kenlon, CC BY-SA 4.0)
I did the layout in a single Inkscape file for my latest game, which uses just nine images from three or four different artists on OpenGameArt.com. I design the layout of each card in its own file for games with a more extensive set of art and card variety.
Know your target output before you do any layout for your game assets. If you're going to print your game at home, then do the math and figure out how many cards or tokens or tiles you can fit on your default paper size (US Letter for some, A4 for everybody else). If you're printing with a game printer like [TheGameCrafter][11], download the template files.
![printed cards][12]
(Seth Kenlon, CC BY-SA 4.0)
### Mechanics
Game mechanics are the most important part of a game. They're what makes the game a game. Developing rules for a game doesn't have to be a formal process. You can come up with a game on a whim, or take a game that exists and remix its rules until it's something different, fix a game that just doesn't work for you, or mash two different games together. Start simple, using index cards, standard playing cards, or a Tarot deck to mock up how you think your game will work. You can play early game ideas by yourself, but eventually, getting a friend to help is a great way to introduce surprise glitches and optimizations.
Playtest often. Play your game with a diverse set of players, and listen to their feedback. Your game might inspire many players to invent new rules and ideas, so separate feedback about what's _broken_ from feedback about what _could be different_. You don't have to implement feedback that just iterates your idea, but give careful thoughts to the bug reports.
Once you've decided how you want your rules to work, write them down to make them [short and easy to parse][13]. Your rules don't have to convince players to play the game, you don't have to explain the strategy to them, nor do you need to give permission to players to remix the rules. Just tell the players the sequence of steps they need to take in order to make the game work.
Most importantly, consider making your rules open source. Gaming is all about shared experiences, and that ought to include the rules. A Creative Commons or Open Game License ruleset allows other gamers to iterate, remix, and build upon your work. You never know, somebody might come up with a variant that you enjoy more than your own!
### Open source gaming
Open source isn't just about software. It's a cultural phenomenon, a natural fit for tabletop games. Take a few evenings to experiment with creating a game. If you're new to it, start with something simple, like this blank card activity:
1. Gather up some friends.
2. Give each person a few blank index cards, and tell them to write a rule on each card. The rule can be anything ("If you're wearing something red, you win" or "The first person to stand up wins," and so on.)
3. On your own index cards, write _and_, _but_, _or_, _but not_, _and not_, _except_, and other conditional phrases.
4. Shuffle your deck and deal the cards to all players.
5. Each player may play one card per turn.
6. The goal is to win, but players may play the _and_, _but_, and _or_ cards to modify the conditions of what determines the winner.
It's a fun party game and a nice introduction to thinking like a game designer because it helps you recognize what tends to work as a game mechanic and what doesn't.
And, of course, it's open source.
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/12/open-source-card-game
作者:[Seth Kenlon][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/seth
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rich-smith-unsplash.jpg?itok=uzzS0gRa (Deck of playing cards)
[2]: https://opensource.com/article/20/1/what-creative-commons
[3]: https://opensource.com/article/21/12/opengameart.org/
[4]: http://freesvg.org
[5]: http://artstation.com
[6]: http://deviantart.com
[7]: https://opensource.com/article/21/12/krita-digital-paint
[8]: https://opensource.com/article/21/12/linux-draw-inkscape
[9]: https://opensource.com/content/cheat-sheet-gimp
[10]: https://opensource.com/sites/default/files/inkscape-layout.jpg (Layout in Inkscape)
[11]: https://www.thegamecrafter.com/
[12]: https://opensource.com/sites/default/files/cards-printed_0.jpg (Printed cards)
[13]: https://opensource.com/life/16/11/software-documentation-tabletop-gaming

View File

@ -2,7 +2,7 @@
[#]: via: "https://opensource.com/article/22/2/transparency-open-source-communities"
[#]: author: "Emilio Galeano Gryciuk https://opensource.com/users/egaleano"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: translator: "aREversez"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
@ -99,7 +99,7 @@ via: https://opensource.com/article/22/2/transparency-open-source-communities
作者:[Emilio Galeano Gryciuk][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
译者:[aREversez](https://github.com/aREversez)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -1,169 +0,0 @@
[#]: subject: "10 Reasons to Run Linux in Virtual Machines"
[#]: via: "https://itsfoss.com/why-linux-virtual-machine/"
[#]: author: "Ankush Das https://itsfoss.com/author/ankush/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
10 Reasons to Run Linux in Virtual Machines
======
You can run any operating system as a virtual machine to test things out or for a particular use case.
When it comes to Linux, it is usually a better performer as a virtual machine when compared to other operating systems. Even if you hesitate to install Linux on bare metal, you can try setting up a virtual machine that could run as you would expect on a physical machine.
Of course, we dont rule out the possibility of running Linux distros in VM even when using Linux as your host OS.
Moreover, you get numerous benefits when trying to run Linux on virtual machines. Here, I shall mention all about that.
### Things to Keep in Mind Before Running Linux as a Virtual Machine
It is worth noting that running Linux on a virtual machine may not be a daunting task, but there are a few pointers that you should keep in mind.
Some of them include:
* The virtual machine performance will depend on your host system. If you do not have enough system resources to allocate, the virtual machine experience will not be pleasant.
* Certain features only work well with bare metal (hardware acceleration, graphics drivers, etc.)
* You should not expect intensive disk I/O tasks to work well, like testing games.
* The user experience with Linux virtual machines varies with the program you use. For instance, you can try VMware, VirtualBox, GNOME Boxes, and Hyper-V.
In addition to all these tips, you should also make a list of your requirements before choosing a virtual machine program to run Linux.
### Here Are 10 Benefits of Running Linux on Virtual Machines
While there are perks to using a Linux VM, you should consider the current opportunities available on your host OS. For instance, you may want to [install Linux using WSL on Windows][1] if you do not require a GUI desktop.
Once you are sure that you need a VM, heres why you should proceed with it:
#### 1. Easy Setup
![easy setup linux vm][2]
Compared to the traditional installation process on bare metal, setting up a virtual machine is often easier.
For Ubuntu-based distros, programs like VMware offer an **Easy Install** option where you have to type in the required fields for username and password; the rest will proceed without needing additional inputs. You do not need to select a partition, bootloader, or advanced configurations.
In some cases, you can also use prebuilt images offered by Linux distributions for a specific virtual program, where you need to open it to access the system. Think of it as a portable VM image ready to launch wherever you need it.
For example, you can check out how you can use [VirtualBox to install Arch Linux][3].
You may still need to configure things when installing other distros, but there are options where you need minimal effort.
#### 2. Does Not Affect the Host OS
![isolated linux vm][4]
With a virtual machine, you get the freedom to do anything you want, and it is because you get an isolated system.
Usually, if you do not know what youre doing with a Linux system, you could easily end up with a messed-up configuration.
So, if you set up a VM, you can quickly try whatever you want without worrying about affecting the host OS. In other words, your system will not be impacted by any changes to the VM because its entirely isolated.
Hence, a VM is the best way to test any of your ambitious or destructive changes that you may want to perform on bare metal.
#### 3. Resource Sharing
![sharing resources linux vm][5]
If you have ample free system resources, you can utilize the rest using a Virtual Machine for any other tasks. For instance, if you want a private browsing experience without leaving any traces on your host, a VM can help.
It can be a far-fetched example, but it is just one of the ideas. In that way, you get to use the resources fully without much hassle.
Also, as opposed to a dual-boot scenario, where you need to [install Linux alongside Windows][6] on separate disks or [install Windows after Linux][7], you need dedicated resources locked on to your tasks.
However, with a VM, you can always use Linux without locking up your resources, rather than temporarily sharing them to get your tasks done, which can be more convenient.
#### 4. Multi-Tasking 
![multitasking linux vm][8]
With the help of resource-sharing, you can easily multi-task.
For instance, you need to switch back and forth between a dual-boot setup to access Windows and Linux.
But, with a virtual machine, you can almost eliminate the need for [dual-booting Linux][9] and multi-task with two operating systems seamlessly.
Of course, you need to ensure that you have the required amount of system resources and external hardware (like dual monitors) to effectively use it. Nevertheless, the potential to multi-task increases with a Linux VM in place.
#### 5. Facilitates Software Testing
With virtualization, you get the freedom to test software on Linux distros by instantly creating various situations.
For instance, you can test different software versions simultaneously on multiple Linux VMs. There can be more use-cases, such as testing a software development build, early build of a Linux distro, etc.
#### 6. Great for Development
![development linux vm][10]
When you want to learn to code or just get involved in developing something, you want an environment free from any conflicts and errors.
So, a Linux VM is the perfect place to install new packages from scratch without worrying about conflicts with existing ones. For instance, you can [install and set up Flutter][11] to test things on Ubuntu.
If you mess up the system, you can quickly delete the VM and spin up a new one to learn from your mistakes.
You get a perfect isolated environment for development work and testing with a Linux VM.
#### 7. Learning or Research
Linux is something to explore. While you could use it for basic computing tasks, theres so much more that you can do with it.
You can learn how to customize the user interface, try some [popular desktop environments][12], install [various essential apps][13], and take control of your system without worrying about it.
If anything goes wrong, you create a new Linux VM. Of course, it is not just for general-purpose usage, but aspiring system administrators can also take this opportunity to test what they learn.
#### 8. Easy to Clone or Migrate
Virtual machines, in general, are easy to clone and migrate. With a Linux VM, as long as the virtual program is supported on another system or host OS, you can easily migrate it without any special requirements.
If you need to clone an existing virtual machine for any reason, that is pretty easy too, and it should take a couple of clicks to get it done.
#### 9. Try Variety of Distros
![distros linux vm][14]
Of course, with hundreds of Linux distros available, you can try all kinds of distros by creating a Linux virtual machine.
You may consider this a part of learning/research, but I believe trying out different distros is a massive task if you want to test things out before installing them on your system.
#### 10. Debugging
Whether it is for fun or serious research, debugging is relatively more straightforward in an isolated environment provided by the Linux VM.
You get the freedom to try various troubleshooting methods without thinking about the outcome. Also, you do not need root access to your host OS (if its Linux) to access the system configuration/files in the VM.
### Wrapping Up
If you are not an experienced user or depend on a different host OS, you can benefit from installing Linux using a virtual machine.
A Linux VM should be beneficial for development, learning, experimenting, or any other special use cases.
Have you used Linux on a virtual machine? What do you use it for? Let me know in the comments below.
--------------------------------------------------------------------------------
via: https://itsfoss.com/why-linux-virtual-machine/
作者:[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/install-bash-on-windows/
[2]: https://itsfoss.com/wp-content/uploads/2022/04/easy-setup-linux-vm.jpg
[3]: https://itsfoss.com/install-arch-linux-virtualbox/
[4]: https://itsfoss.com/wp-content/uploads/2022/04/isolated-linux-vm.jpg
[5]: https://itsfoss.com/wp-content/uploads/2022/04/sharing-resources-linux-vm.jpg
[6]: https://itsfoss.com/dual-boot-hdd-ssd/
[7]: https://itsfoss.com/install-windows-after-ubuntu-dual-boot/
[8]: https://itsfoss.com/wp-content/uploads/2022/04/multitasking-linux-vm.jpg
[9]: https://itsfoss.com/dual-boot-fedora-windows/
[10]: https://itsfoss.com/wp-content/uploads/2022/04/development-linux-vm.jpg
[11]: https://itsfoss.com/install-flutter-linux/
[12]: https://itsfoss.com/best-linux-desktop-environments/
[13]: https://itsfoss.com/essential-linux-applications/
[14]: https://itsfoss.com/wp-content/uploads/2022/04/distros-linux-vm.jpg

View File

@ -1,47 +0,0 @@
[#]: subject: "Elon Musks Plan To Open Source The Twitter Algorithm Has Flaws"
[#]: via: "https://www.opensourceforu.com/2022/04/elon-musks-plan-to-open-source-the-twitter-algorithm-has-flaws/"
[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Elon Musks Plan To Open Source The Twitter Algorithm Has Flaws
======
![twiiter][1]
Elon Musk made his aspirations for Twitter obvious just hours after Twitter said it had accepted Elon Musks takeover offer. Musk listed the major changes he intends to make in a press release, including opening up the algorithms that govern what users see in their feed.
Musks desire to open source Twitters algorithms stems from his long-standing concern about the platforms potential for political repression, but its unlikely that doing so will have the desired effect. Experts worry that it may instead bring a slew of unexpected issues.
Although Musk has a deep dislike for authority, his ambition for algorithmic openness coincides with the wishes of legislators all around the world. In recent years, numerous governments have used this principle as a cornerstone of their efforts to combat Big Tech.
Melanie Dawes, the chief executive of Ofcom, the UK regulator of social media, has stated that social media firms would be required to explain how their code operates. In addition, the European Unions newly passed Digital Services Act, which was approved on April 23, would oblige platforms to provide more openness. In February 2022, Democratic senators in the United States submitted legislation to create an Algorithmic Accountability Act. Their goal is to increase transparency and supervision of the algorithms that regulate our timelines and news feeds, as well as other aspects of our lives.
Allowing competitors to see and adapt Twitters algorithm potentially means that someone could just steal the source code and offer a rebranded version. Vast sections of the internet run on open-source software, the most renowned of which is OpenSSL, a security toolkit used by large swaths of the online that was hacked in 2014.
There are also open source social networks that have already been created. Mastodon, a microblogging network created in response to worries about Twitters dominant position, allows users to inspect its code, which is available on the GitHub software repository.
However, reading the code behind an algorithm does not always tell you how it works, and it doesnt provide the typical individual much insight into the corporate structures and processes that go into its development.
“Its a bit like trying to understand ancient creatures with genetic material alone,” says Jonathan Gray, a senior lecturer in critical infrastructure studies at Kings College London. “It tells us more than nothing, but it would be a stretch to say we know about how they live.”
Twitter is likewise not controlled by a single algorithm. “Some of them will determine what people see on their timelines in terms of trends, content, or suggested followers,” says Catherine Flick, a researcher at De Montfort University in the United Kingdom who studies computing and social responsibility. The algorithms that regulate what information shows in users timelines will be the ones that people are most interested in, but even that wont be very useful without the training data.
Cobbe believes that the hazards outweigh the advantages. Because the computer code doesnt reveal how algorithms were developed or evaluated, what elements or considerations went into them, or what was prioritised during the process, open-sourcing it may not make a significant change in Twitters transparency. In the meantime, it may pose severe security hazards.
--------------------------------------------------------------------------------
via: https://www.opensourceforu.com/2022/04/elon-musks-plan-to-open-source-the-twitter-algorithm-has-flaws/
作者:[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/04/twiiter-696x392.jpg

View File

@ -0,0 +1,84 @@
[#]: subject: "How open source leads the way for sustainable technology"
[#]: via: "https://opensource.com/article/22/5/open-source-sustainable-technology"
[#]: author: "Hannah Smith https://opensource.com/users/hanopcan"
[#]: collector: "lkxed"
[#]: translator: "PeterPan0106"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
How open source leads the way for sustainable technology
======
There are huge parallels between the open source way and what our wider society needs to do to achieve a more sustainable future.
![][1]
(Image by: opensource.com)
There's a palpable change in the air regarding sustainability and environmental issues. Concern for the condition of the planet and efforts to do something about it have gone mainstream. To take one example, look at climate-based venture capitalism. The Climate Tech Venture Capital (CTVC) Climate Capital List has [more than doubled][2] in the past two years. The amount of capital pouring in demonstrates a desire and a willingness to solve hard climate challenges.
It's great that people want to take action, and I'm here for it! But I also see a real risk: As people rush to take action or jump on the bandwagon, they may unwittingly participate in greenwashing.
The Wikipedia definition of greenwashing calls it "a form of marketing spin in which green PR and green marketing are deceptively used to persuade the public that an organization's products, aims, and policies are environmentally friendly." In my view, greenwashing happens both intentionally and accidentally. There are a lot of good people out there who want to make a difference but don't yet know much about complex environmental systems or the depth of issues around sustainability.
It's easy to fall into the trap of thinking a simple purchase like offsetting travel or datacenter emissions by planting trees will make something greener. While these efforts are welcome, and planting trees is a viable solution to improving sustainability, they are only a good first step—a scratch on the surface of what needs to happen to make a real difference.
So what can a person, or a community, do to make digital technology genuinely more sustainable?
Sustainability has different meanings to different people. The shortest definition that I like is from the 1987 Bruntland Report, which summarizes it as "meeting the needs of the present without compromising the ability of future generations to meet their needs." Sustainability at its core is prioritizing long-term thinking.
### Sustainability is more than environmental preservation
There are three key interconnected pillars in the definition of sustainability:
1. Environmental
2. Economic / governance
3. Social
Conversations about sustainability are increasingly dominated by the climate crisis—for good reason. The need to reduce the amount of carbon emissions emitted by the richer countries in the world becomes increasingly urgent as we continue to pass irreversible ecological tipping points. But true sustainability is a much more comprehensive set of considerations, as demonstrated by the three pillars.
Carbon emissions are most certainly a part of sustainability. Many people consider emissions only an environmental issue: Just take more carbon out of the air, and everything will be ok. But social issues are just as much a part of sustainability. Who is affected by these carbon emissions? Who stands to bear the greatest impact from changes to our climate? Who has lost their land due to rising sea levels or a reliable water source due to changing weather patterns? That's why you might have heard the phrase "climate justice is social justice."
Thinking only about decarbonization as sustainability can give you carbon tunnel vision. I often think that climate change is a symptom of society getting sustainability wrong on a wider scale. Instead, it is critical to address the root causes that brought about climate change in the first place. Tackling these will make it possible to fix the problems in the long term, while a short-term fix may only push the issue onto another vulnerable community.
The root causes are complex. But if I follow them back to their source, I see that the root causes are driven by dominant Western values and the systems designed to perpetuate those values. And what are those values? For the most part, they are short-term growth and the extraction of profit above all else.
That is why conversations about sustainability that don't include social issues or how economies are designed won't reach true solutions. After all, societies, and the people in positions of power, determine what their own values are—or aren't.
### What can you or I do?
Many in the tech sector are currently grappling with these issues and want to know how to take meaningful action. One common approach is looking at how to optimize the tech they build so that it uses electricity more effectively. Sixty percent of the world's electricity is still generated by burning fossil fuels, despite the increasing capacity for renewable energy generation. Logically, using less electricity means generating fewer carbon emissions.
And yes, that is a meaningful action that anyone can take right now, today. Optimizing the assets sent when someone loads a page to send less data will use less energy. So will optimizing servers to run at different times of the day, for example when there are more renewables online, or deleting old stores of redundant information, such as analytics data or logs.
But consider Jevon's paradox: Making something more efficient often leads to using more of it, not less. When it is easier and more accessible for people to use something, they end up consuming more. In some ways, that is good. Better performing tech is a good thing that helps increase inclusion and accessibility, and that's good for society. But long-term solutions for climate change and sustainability require deeper, more uncomfortable conversations around the relationship between society and technology. What and who is all this technology serving? What behaviors and practices is it accelerating?
It's common to view advancing technology as progress, and some people repeat the mantra that technology will save the world from climate change. A few bright folks will do the hard work, so no one else has to change their ways. The problem is that many communities and ecosystems are already suffering.
For example, the accelerating quest for more data is causing some communities in Chile to have insufficient water to grow their crops. Instead, datacenters are using it. Seventy percent of the pollution caused by mobile phones comes from their manufacture. The raw resources such as lithium and cobalt to make and power mobile devices are usually extracted from a community that has little power to stop the destruction of their land and that certainly does not partake in the profit made. Still, the practice of upgrading your phone every two years has become commonplace.
### Open source leading the way for sustainability
It's time to view the use of digital technology as a precious resource with consequences to both the planet and (often already disadvantaged) communities.
The open source community is already a leading light in helping people to realize there is another way: the open source way. There are huge parallels between the open source way and what our wider society needs to do to achieve a more sustainable future. Being more open and inclusive is a key part of that.
We also need a mindset shift at all levels of society that views digital technology as having growth limits and not as the abundantly cheap and free thing we see today. We need to wisely prioritize its application in society to the things that matter. And above all else, we need to visualize and eradicate the harms from its creation and continued use and share the wealth that is does create equitably with everyone in society, whether they are users of digital tech or not. These things arent going to happen overnight, but they are things we can come together to push towards so that we all enjoy the benefits of digital technology for the long-term, sustainably.
This article is based on a longer presentation. To see the talk in full or view the slides, see the post ["How can we make digital technology more sustainable."][3]
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/5/open-source-sustainable-technology
作者:[Hannah Smith][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://opensource.com/users/hanopcan
[b]: https://github.com/lkxed
[1]: https://opensource.com/sites/default/files/pictures/green-780x400.jpg
[2]: https://climatetechvc.substack.com/p/-a-running-list-of-climate-tech-vcs?s=w
[3]: https://opcan.co.uk/talk/wordfest-live-2022

View File

@ -0,0 +1,84 @@
[#]: subject: "Cloud service providers: How to keep your options open"
[#]: via: "https://opensource.com/article/22/5/cloud-service-providers-open"
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Cloud service providers: How to keep your options open
======
No matter what level of openness your cloud service operates on, you have choices for your own environment.
![Sky with clouds and grass][1]
(Image by Flickr user: theaucitron, CC BY-SA 2.0)
For Linux users, there's a new kind of computer on the market, and it's known as the cloud.
As with the PC sitting on your desk, the laptop in your backpack, and the virtual private server you rent from your favorite web hosting service, you have your choice in vendors for cloud computing. The brand names are different than the hardware brands you've known over the years, but the concept is the same.
To run Linux, you need a computer. To run Linux on the cloud, you need a cloud service provider. And just like the hardware and firmware that ships with your computer, there's a spectrum for how open source your computing stack can be.
As a user of open source, I prefer my computing stack to be as open as possible. After a careful survey of the cloud computing market, I've developed a three-tier view of cloud service providers. Using this system as your guide, you can make intelligent choices about what cloud provider you choose.
### Open stack
A cloud that's fully open is a cloud built on open source technology from the ground up. So much cloud technology is open source, and has been from the beginning, that an open stack isn't all that difficult to accomplish, at least on the technical level. However, there are cloud providers reinventing the wheel in a proprietary way, which makes it easy to stumble into a cloud provider that's mixed a lot of closed source components in with the usual open source tooling.
If you're looking for a truly open cloud, look for a cloud provider providing [OpenStack][2] as its foundation. OpenStack provides the software infrastructure for clouds, including Software-Defined Networking (SDN) through Neutron, object storage through Swift, identity and key management, image services, and much more. Keeping with my hardware computer analogy, OpenStack is the "kernel" that powers the cloud.
I don't mean that literally, of course, but if your cloud provider runs OpenStack, that's reasonably as far down in the stack as you can go. From a user perspective, OpenStack is the reason your cloud exists and has a filesystem, network, and so on.
Sitting on top of OpenStack, there may be a web UI such as Horizon or Skyline, and there may be extra components such as [OpenShift][3] or OKD (not an acronym, but formerly known as OpenShift Origin). All of these are open source, and they help you run containers, which are minimalist Linux images with applications embedded within them.
Because OpenShift and OKD don't require OpenStack, that's the next tier of my cloud-based world view.
### Open platform
You don't always have a choice in which stack your cloud is running. Instead of OpenStack, your cloud might be running Azure, Amazon Web Services (AWS), or something similar.
Those are the "binary blobs" of the cloud world. You have no insight into how or why they work; all you know is that your cloud exists and has a filesystem, a networking stack, and so on.
Just as with desktop computing, you can have an "operating system" running on the box you've been given. Again, I'm not speaking literally, and there's a strong argument that OpenStack itself is essentially an operating system for the cloud. Still, it's usually OpenShift that a cloud user interacts with directly.
OpenShift is an open source "desktop" or workspace in which you can manage containers and pods with Podman and Kubernetes. It lets you run applications on the cloud much as you might launch an app on your laptop.
### Open standards
Last but not least, there are those situations when you have no choice in cloud service providers. You're put on a platform with a proprietary "kernel," a proprietary "operating system," and all that's left for you to influence is what you run inside that environment.
All is not lost.
When you're dealing with open source, you have the ability to construct your own scaffolding. You can choose what components you use inside your containers. You can and should design your working environment around open source tools, because if you do get to change service providers, you can take everything you've built with you.
This might mean implementing something already built into the (non-open) platform you're stuck on. For instance, your cloud provider might entice you with an API management system or continuous integration/continuous delivery (CI/CD) pipeline that's included in their platform "for free," but you know better. When a non-open application is offered as "free," it usually bears a cost in some other form. One cost is that once you start building on top of it, you'll be all the more hesitant to migrate away because you know that you'll have to leave behind everything you built.
Instead of using the closed "features" of your cloud provider, reimplement those services as open source for your own use. Run [Jenkins][4] and [APIMan][5] in containers. Find the problems your cloud provider claims to solve with proprietary code, then use an open source solution to ensure that, when you leave for an open provider, you can migrate the system you've built.
### Open source computing
For too many people, cloud computing is a place where open source is incidental. In reality, open source is as important on the cloud as it is on your personal computer and the servers powering the internet.
Look for open source cloud services.
When you're stuck with something that doesn't provide source code, be the one using open source in your cloud.
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/5/cloud-service-providers-open
作者:[Seth Kenlon][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/seth
[b]: https://github.com/lkxed
[1]: https://opensource.com/sites/default/files/lead-images/bus-cloud.png
[2]: https://opensource.com/resources/what-is-openstack
[3]: https://cloud.redhat.com/?intcmp=7013a000002qLH8AAM
[4]: https://opensource.com/article/19/9/intro-building-cicd-pipelines-jenkins
[5]: https://www.apiman.io/latest/

View File

@ -0,0 +1,130 @@
[#]: subject: "How to Install Classic GNOME Flashback in Ubuntu 22.04 LTS"
[#]: via: "https://www.debugpoint.com/2022/05/gnome-classic-ubuntu-22-04/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
How to Install Classic GNOME Flashback in Ubuntu 22.04 LTS
======
A QUICK GUIDE ON HOW TO INSTALL THE GOOD OLD CLASSIC GNOME FLASHBACK IN
THE LATEST UBUNTU 20.04 LTS.
The [GNOME Flashback][1] (aka classic GNOME) is a fork of the older GNOME 3 shell that uses the layouts and principles of earlier GNOME 2 tech. It is lightning fast and takes very minimal CPU and system resources by design. Hence it is ideal for the older hardware, which goes back in time in decades.
With the release of [Ubuntu 22.04 LTS][2] with modern GNOME 42, it is necessary to look for desktop environment options which consume few system resources.
Moreover, GNOME Flashback is easy to install in the modern Ubuntu Linux, and you can still enjoy Ubuntu performance without worrying much about GNOME 42, GTK4, libadwaita and other stuff.
### Download and Install Classic GNOME Flashback in Ubuntu 22.04 LTS
Follow the below steps to download and install classic GNOME Flashback (Metacity) in Ubuntu 22.04 LTS.
Open a terminal (CTRL+ALT+T) in Ubuntu 22.04 LTS and run the following commands. The installation size is around 61 MB.
```
sudo apt update
```
```
sudo apt install gnome-session-flashback
```
![Install GNOME Classic Flashback Metacity in Ubuntu 22.04 LTS][3]
Finally, after the installation is complete, log out. And while logging back in, use the GNOME Classic in the login option.
![Choose GNOME Classic while logging in][3]
### Features of Classic GNOME Flashback
Firstly, when you log on, you would experience the Legacy GNOME tech, which is proven to be well productive and much faster than todays tech.
At the top, you have the legacy panel with the application menu at the left and the system tray at the right top section of the desktop. The application menu reveals all the installed applications and software shortcuts you can easily navigate through in your workflow.
Moreover, in the right section, the system tray has default widgets such as network, volume controls, date and time and shutdown menu.
![Classic GNOME Flashback Metacity in Ubuntu 22.04 LTS][3]
The bottom panel contains the application list of the open windows and workspace switcher. By default, it gives you four workspaces to use.
Furthermore, you can always change the settings of the top panel to auto-hide, resize, and background colours of the panel.
Other than that, you can add any number of legacy applets available via ALT+Rigth click at the top panel.
![Panel Context Menu][3]
![Add to panel widgets][3]
### Performance of GNOME Classic
Firstly, the disk space footprint is minimal, i.e. it is only 61 MB installation. My test uses around 28% of the memory, and most of it is consumed by someone else. Guess who? Yes, the snap-store aka Ubuntu Software.
So, overall it is very lightweight and has very minimal memory (only 28 MB) and CPU (0.1%) footprint.
![Performance of GNOME Classic in Ubuntu 22.04][3]
Furthermore, suppose you compare this with Ubuntu MATE, which also uses the same tech. In that case, it is lighter than MATE because you do not require any additional MATE apps and their native packages for notifications, themes and other supplemental resources.
### Closing Notes
I hope this guide helps you with the necessary information before you decide to install the GNOME Classic in Ubuntu 22.04 LTS Jammy Jellyfish.
* * *
We bring the latest tech, software news and stuff that matters. Stay in touch via [Telegram][4], [Twitter][5], [YouTube][6], and [Facebook][7] and never miss an update!
#### Share this:
* [Twitter][8]
* [Facebook][9]
* [Print][10]
* [LinkedIn][11]
* [Reddit][12]
* [Telegram][13]
* [WhatsApp][14]
* [Email][15]
*
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/2022/05/gnome-classic-ubuntu-22-04/
作者:[Arindam][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.debugpoint.com/author/admin1/
[b]: https://github.com/lujun9972
[1]: https://wiki.archlinux.org/index.php/GNOME/Flashback
[2]: https://www.debugpoint.com/2022/01/ubuntu-22-04-lts/
[3]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
[4]: https://t.me/debugpoint
[5]: https://twitter.com/DebugPoint
[6]: https://www.youtube.com/c/debugpoint?sub_confirmation=1
[7]: https://facebook.com/DebugPoint
[8]: https://www.debugpoint.com/2022/05/gnome-classic-ubuntu-22-04/?share=twitter (Click to share on Twitter)
[9]: https://www.debugpoint.com/2022/05/gnome-classic-ubuntu-22-04/?share=facebook (Click to share on Facebook)
[10]: tmp.xk2ydzDcLc#print (Click to print)
[11]: https://www.debugpoint.com/2022/05/gnome-classic-ubuntu-22-04/?share=linkedin (Click to share on LinkedIn)
[12]: https://www.debugpoint.com/2022/05/gnome-classic-ubuntu-22-04/?share=reddit (Click to share on Reddit)
[13]: https://www.debugpoint.com/2022/05/gnome-classic-ubuntu-22-04/?share=telegram (Click to share on Telegram)
[14]: https://www.debugpoint.com/2022/05/gnome-classic-ubuntu-22-04/?share=jetpack-whatsapp (Click to share on WhatsApp)
[15]: https://www.debugpoint.com/2022/05/gnome-classic-ubuntu-22-04/?share=email (Click to email this to a friend)

View File

@ -0,0 +1,98 @@
[#]: subject: "Trinity Desktop Environment (TDE) Latest Release Brings PolicyKit Support and Updates"
[#]: via: "https://www.debugpoint.com/2022/05/tde-release-r14-0-12/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Trinity Desktop Environment (TDE) Latest Release Brings PolicyKit Support and Updates
======
TRINITY DESKTOP ENVIRONMENT (TDE) BRINGS THE LATEST APPLICATION UPDATES,
BUG FIXES, AND ENHANCEMENTS TO ITS RELEASE TRINITY R14.0.12.
Trinity Desktop Environment is a Fork of KDE version 3.5 and a continuation of feature updates and bug fixes by a small development team. This independent and standalone desktop project is still alive today for those who believe how excellent the KDE 3 desktop methodology is.
Trinity Desktop Environment release R14.0.12 brings new applications, enhancements and significant bug fixes.
[TDE release R14.0.12][1] is the 12th maintenance release of the R14.0 series built upon its previous iteration released in Oct 2021. This release brings new applications, 10+ enhancements, bug fixes and support for the latest [Ubuntu 22.04 Jammy Jellyfish][2] and other distributions.
![Trinity Desktop Environment TDE release R14.0.12][3]
### Trinity Desktop Environment TDE release R14.0.12
Firstly, TDE R14.0.12 introduces Polkit-agent-tde and Polkit-tqt, which helps with the PolicyKit authentication triggered by the TQt interfaces. That means, when required, the admin password prompt is now invoked via PolicyKit for authentication. Also, a new embeddable lightweight markdown document viewer is introduced in this release.
Secondly, the list of enhancements includes the Konsole applications improvements, support for complex characters and HTML5 in Quanta (web dev editor), and support for Lets Encrypt certificates. Not only that, TDEs overall look is improved in addition to translation updates, and support for Python3 are some of the exciting enhancements in this release.
Moreover, on the building aspect, several packages migrated to the CMake build system while automake build system dropped for others.
Other than that, the application bug fixes include, Kaffeine seeing a fix on the libdvdcss codec detection in its player module, Amarok fixing errors for the latest Ruby programming language, and KMail correcting the email redirection to the default account.
Among all, other notable core bug fixes include a timeout fix in dbus service startup and a system hang fix during the shutdown.
Furthermore, following the other Linux distributions latest releases, TDE R14.0.12 introduces Ubuntu 22.04 LTS Jammy Jellyfish support, dropped support for Debian Jessie and improvements for Gentoo.
All of these changes with some additional updates for developers who build applications for this KDE 3.5 tech can be found in the official changelog of TDE R14.0.12 on this [page][1].
Finally, you should be happy to know that Good ol Trinity Desktop Environment is available for all mainstream Linux Distribution for installation, including Ubuntu, Fedora, Arch Linux, etc. A list of installation instructions is available [here][4].
As always, make sure to check out the official [contribution][5] page to help the dev team with your expertise and capacity.
_Via Release [announcement][1]_
* * *
We bring the latest tech, software news and stuff that matters. Stay in touch via [Telegram][6], [Twitter][7], [YouTube][8], and [Facebook][9] and never miss an update!
#### Share this:
* [Twitter][10]
* [Facebook][11]
* [Print][12]
* [LinkedIn][13]
* [Reddit][14]
* [Telegram][15]
* [WhatsApp][16]
* [Email][17]
*
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/2022/05/tde-release-r14-0-12/
作者:[Arindam][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.debugpoint.com/author/admin1/
[b]: https://github.com/lujun9972
[1]: https://wiki.trinitydesktop.org/Release_Notes_For_R14.0.12
[2]: https://www.debugpoint.com/2022/04/ubuntu-studio-22-04-lts/
[3]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
[4]: https://wiki.trinitydesktop.org/Category:Installation
[5]: https://www.trinitydesktop.org/helpwanted.php
[6]: https://t.me/debugpoint
[7]: https://twitter.com/DebugPoint
[8]: https://www.youtube.com/c/debugpoint?sub_confirmation=1
[9]: https://facebook.com/DebugPoint
[10]: https://www.debugpoint.com/2022/05/tde-release-r14-0-12/?share=twitter (Click to share on Twitter)
[11]: https://www.debugpoint.com/2022/05/tde-release-r14-0-12/?share=facebook (Click to share on Facebook)
[12]: tmp.NZ5pAosxsa#print (Click to print)
[13]: https://www.debugpoint.com/2022/05/tde-release-r14-0-12/?share=linkedin (Click to share on LinkedIn)
[14]: https://www.debugpoint.com/2022/05/tde-release-r14-0-12/?share=reddit (Click to share on Reddit)
[15]: https://www.debugpoint.com/2022/05/tde-release-r14-0-12/?share=telegram (Click to share on Telegram)
[16]: https://www.debugpoint.com/2022/05/tde-release-r14-0-12/?share=jetpack-whatsapp (Click to share on WhatsApp)
[17]: https://www.debugpoint.com/2022/05/tde-release-r14-0-12/?share=email (Click to email this to a friend)

View File

@ -1,77 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (8 tips for the Linux command line)
[#]: via: (https://opensource.com/article/21/1/linux-commands)
[#]: author: (Jim Hall https://opensource.com/users/jim-hall)
8 tips for the Linux command line
======
Take advantage of all of the powers the almighty Linux command line has
to offer.
![Terminal command prompt on orange background][1]
The Linux command line provides a great deal of flexibility. Whether you are managing a server or launching a terminal window on a desktop system, the command line brings with it an extensive toolkit to update files, tweak system performance, and manage processes. The command line is where it's at.
Testifying to the command line's popularity, Opensource.com publishes many excellent articles about how to get the most out of your system. The following were some of Opensource.com's most-read articles about Linux commands in 2020:
### [Make Bash history more useful with these tips][2]
Bash is the default command line shell on most Linux systems. Seth Kenlon wrote this guide to help you with your Bash **history**. Manipulating history is usually less dangerous than it sounds, especially when you're curating it with a purpose in mind. Tell Bash what you want it to remember—or even rewrite history by deleting entries you don't want or need. Use your history sessions as required, and exercise your power over history wisely.
### [How I balance features and performance in my Linux terminal][3]
Ricardo Gerardi is a big fan of command line applications and spends a lot of his time working in a terminal. Ricardo invested some time to make the command line a pleasant environment to work in. Learn how to customize terminal apps, themes, and the prompt to create a feature-rich terminal that's easy on system resources.
### [Drop Bash for the fish shell to get beautiful defaults][4]
Matt Broberg recently let go of the default command line interpreter, Bash, in favor of fish, which proudly markets itself as "a command line shell for the '90s." The fish-themed "friendly interactive shell" creates a more enjoyable experience on the command line. Read Matt's article to learn more about how to get the most out of fish. If you're looking to move away from tinkering with your terminal, focus more on code, and have a more beautiful default shell, give fish a try.
### [10 ways to analyze binary files on Linux][5]
We work with binaries daily, yet we understand so little about them. Linux provides a rich set of tools that makes analyzing binaries a breeze! These simple commands and tools can help you sail through the task of analyzing binary files. Whatever your job role, knowing the basics about these tools will help you understand your Linux system better. Gaurav Kamathe covers some of the most popular Linux tools and commands to manage binaries, including **file**, **nm**, **strings**, and **hexdump**.
### [4 Markdown tools for the Linux command line][6]
When it comes to working with files formatted with Markdown, command line tools rule the roost. They're light, fast, powerful, and flexible, and most of them follow the Unix philosophy of doing one thing well. Scott Nesbitt reviews four command line utilities that can help you work more efficiently with Markdown files.
### [Improve Linux system performance with noatime][7]
Whenever I upgrade Linux on my home computer, I have a list of tasks I usually do. They've become habits over the years: I back up my files, wipe the system, reinstall from scratch, restore my files, then reinstall my favorite extra applications. I also make a few system tweaks. One tweak is **atime**, which is one of the three timestamps on every file on Linux. Turning off **atime** is a small but effective way to improve system performance. Here's what it is and why it matters.
### [Extend the life of your SSD drive with fstrim][8]
Over the past decade, solid-state drives (SSD) have brought about a new way of managing storage. SSDs have benefits like silent and cooler operation and a faster interface spec, compared to their elder spinning ancestors. Of course, new technology brings with it new methods of maintenance and management. Alan Formy-Duval wrote about a new **systemd** service to make your life easier when managing SSDs.
### [5 modern alternatives to essential Linux command line tools][9]
In our daily use of Linux/Unix systems, we use many command line tools to complete our work, and to help us understand and manage our systems better. Over the years, these tools have been modernized and ported to different systems. However, in general, they still follow their original idea, look, and feel. In recent years, the open source community has developed alternative tools that offer additional benefits. Ricardo Gerardi shows us how to gain new benefits by improving old command line tools with these five updated alternatives.
### Wrap up
Use these articles as a springboard to finding your own tips and tricks for the command line. Is there something missing from this list? Comment below, or better yet, submit an article of your own!
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/1/linux-commands
作者:[Jim Hall][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/jim-hall
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/terminal_command_linux_desktop_code.jpg?itok=p5sQ6ODE (Terminal command prompt on orange background)
[2]: https://opensource.com/article/20/6/bash-history-control
[3]: https://opensource.com/article/20/7/performance-linux-terminal
[4]: https://opensource.com/article/20/3/fish-shell
[5]: https://opensource.com/article/20/4/linux-binary-analysis
[6]: https://opensource.com/article/20/3/markdown-apps-linux-command-line
[7]: https://opensource.com/article/20/6/linux-noatime
[8]: https://opensource.com/article/20/2/trim-solid-state-storage-linux
[9]: https://opensource.com/article/20/6/modern-linux-command-line-tools

View File

@ -2,7 +2,7 @@
[#]: via: (https://www.linux.com/news/webassembly-security-now-and-in-the-future/)
[#]: author: (Dan Brown https://training.linuxfoundation.org/announcements/webassembly-security-now-and-in-the-future/)
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: translator: (hanszhao80)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
@ -66,7 +66,7 @@ via: https://www.linux.com/news/webassembly-security-now-and-in-the-future/
作者:[Dan Brown][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
译者:[hanszhao80](https://github.com/hanszhao80)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -1,104 +0,0 @@
[#]: subject: (20 ways to be more productive and respect yourself)
[#]: via: (https://opensource.com/article/21/4/productivity-roundup)
[#]: author: (Jen Wike Huger https://opensource.com/users/jen-wike)
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
20 ways to be more productive and respect yourself
======
Open source tools and more efficient processes can give you an edge over
your to-do list.
![Kanban-style organization action][1]
The need to be productive is ingrained in who we are as human beings on some level. We oftentimes have to do yoga and meditate and breathe deeply in order to consciously slow down our minds and bodies, but when we do it helps us focus and be more productive when the time comes. Instead of constantly moving and doing, we should take periods of thoughtful breaks... or veg out in front of the TV or a sunset. And sleep at night! Then, when we're ready again, we can tackle that to-do list. Rinse and repeat.
Honoring this cycle of moving through active and restful states, our productivity series this year brought to us by author [Kevin Sonney][2] showcases open source tools and more efficient processes while paying attention to healthy practices for incorporating them and respecting the person doing the implementing, you.
### Tools and technology
The software, the apps, and the programs... they are the tools we wield when we're ready to sit down and get stuff done. Here are nine open source tools you should know.
* [Improve your productivity with this lightweight Linux desktop][3]
* [3 plain text note-taking tools][4]
* [How to use KDE's productivity suite, Kontact][5]
* [How Nextcloud is the ultimate open source productivity suite][6]
* [Schedule appointments with an open source alternative to Doodle][7]
* [Use Joplin to find your notes faster][8]
* [Use your Raspberry Pi as a productivity powerhouse][9]
### Processes and practices
#### Email
Despite the criticism, is email still a favorite way for you to get stuff done? Improve on this process even more with these tips:
* [3 email rules to live by in 2021][10]
* [3 steps to achieving Inbox Zero][11]
* [Organize your task list using labels][12]
* [3 tips for automating your email filters][13]
* [3 email mistakes and how to avoid them][14]
#### Calendars
We often need to work with others and ask important questions to get work done and tasks completed, so scheduling meetings is an important part of being productive.
* [Gain control of your calendar with this simple strategy][15]
#### Mind games
Preparing and caring for our mental state while we work is critical to being productive. Kevin shows us how to prioritize, reflect, take care, reduce stress, rest, and focus.  
* [How I prioritize tasks on my to-do list][16]
* [Tips for incorporating self-care into your daily routine][17]
* [Why keeping a journal improves productivity][18]
* [3 stress-free steps to tackling your task list][19]
* [4 tips for preventing notification fatigue][20]
* [Open source tools and tips for staying focused][21]
* [How I de-clutter my digital workspace][22]
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/4/productivity-roundup
作者:[Jen Wike Huger][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/jen-wike
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/kanban_trello_organize_teams_520.png?itok=ObNjCpxt (Kanban-style organization action)
[2]: https://opensource.com/users/ksonney
[3]: https://opensource.com/article/21/1/elementary-linux
[4]: https://opensource.com/article/21/1/plain-text
[5]: https://opensource.com/article/21/1/kde-kontact
[6]: https://opensource.com/article/21/1/nextcloud-productivity
[7]: https://opensource.com/article/21/1/open-source-scheduler
[8]: https://opensource.com/article/21/1/notes-joplin
[9]: https://opensource.com/article/21/1/raspberry-pi-productivity
[10]: https://opensource.com/article/21/1/email-rules
[11]: https://opensource.com/article/21/1/inbox-zero
[12]: https://opensource.com/article/21/1/labels
[13]: https://opensource.com/article/21/1/email-filter
[14]: https://opensource.com/article/21/1/email-mistakes
[15]: https://opensource.com/article/21/1/calendar-time-boxing
[16]: https://opensource.com/article/21/1/prioritize-tasks
[17]: https://opensource.com/article/21/1/self-care
[18]: https://opensource.com/article/21/1/open-source-journal
[19]: https://opensource.com/article/21/1/break-down-tasks
[20]: https://opensource.com/article/21/1/alert-fatigue
[21]: https://opensource.com/article/21/1/stay-focused
[22]: https://opensource.com/article/21/1/declutter-workspace

View File

@ -1,274 +0,0 @@
[#]: subject: (Share files between Linux and Windows computers)
[#]: via: (https://opensource.com/article/21/4/share-files-linux-windows)
[#]: author: (Stephan Avenwedde https://opensource.com/users/hansic99)
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
Share files between Linux and Windows computers
======
Set up cross-platform file sharing with Samba.
![Blue folders flying in the clouds above a city skyline][1]
If you work with different operating systems, it's handy to be able to share files between them. This article explains how to set up file access between Linux ([Fedora 33][2]) and Windows 10 using [Samba][3] and [mount.cifs][4].
Samba is the Linux implementation of the [SMB/CIFS][5] protocol, allowing direct access to shared folders and printers over a network. Mount.cifs is part of the Samba suite and allows you to mount the [CIFS][5] filesystem under Linux.
> **Caution**: These instructions are for sharing files within your private local network or in a virtualized host-only network between a Linux host machine and a virtualized Windows guest. Don't consider this article a guideline for your corporate network, as it doesn't implement the necessary cybersecurity considerations.
### Access Linux from Windows
This section explains how to access a user's Linux home directory from Windows File Explorer.
#### 1\. Install and configure Samba
Start on your Linux system by installing Samba:
```
`dnf install samba`
```
Samba is a system daemon, and its configuration file is located in `/etc/samba/smb.conf`. Its default configuration should work. If not, this minimal configuration should do the job:
```
[global]
        workgroup = SAMBA
        server string = %h server (Samba %v)
        invalid users = root
        security = user
[homes]
        comment = Home Directories
        browseable = no
        valid users = %S
        writable = yes
```
You can find a detailed description of the parameters in the [smb.conf][6] section of the project's website.
#### 2\. Modify LinuxSE
If your Linux distribution is protected by [SELinux][7] (as Fedora is), you have to enable Samba to be able to access the user's home directory:
```
`setsebool -P samba_enable_home_dirs on`
```
Check that the value is set by typing:
```
`getsebool samba_enable_home_dirs`
```
Your output should look like this:
![Sebool][8]
(Stephan Avenwedde, [CC BY-SA 4.0][9])
#### 3\. Enable your user
Samba uses a set of users and passwords that have permission to connect. Add your Linux user to the set by typing:
```
`smbpasswd -a <your-user>`
```
You will be prompted for a password. This is a _completely new_ password; it is not the current password for your account. Enter the password you want to use to log in to Samba.
To get a list of allowed user types:
```
`pdbedit -L -v`
```
Remove a user by typing:
```
`smbpasswd -x <user-name>`
```
#### 4\. Start Samba
Because Samba is a system daemon, you can start it on Fedora with:
```
`systemctl start smb`
```
This starts Samba for the current session. If you want Samba to start automatically on system startup, enter:
```
`systemctl enable smb`
```
On some systems, the Samba daemon is registered as `smbd`.
#### 4\. Configure the firewall
By default, Samba is blocked by your firewall. Allow Samba to access the network permanently by configuring the firewall.
You can do it on the command line with:
```
`firewall-cmd --add-service=samba --permanent`
```
Or you do it graphically with the firewall-config tool:
![firewall-config][10]
(Stephan Avenwedde, [CC BY-SA 4.0][9])
#### 5\. Access Samba from Windows
In Windows, open File Explorer. On the address line, type in two backslashes followed by your Linux machine's address (IP address or hostname):
![Accessing Linux machine from Windows][11]
(Stephan Avenwedde, [CC BY-SA 4.0][9])
You will be prompted for your login information. Type in the username and password combination from step 3. You should now be able to access your home directory on your Linux machine:
![Accessing Linux machine from Windows][12]
(Stephan Avenwedde, [CC BY-SA 4.0][9])
### Access Windows from Linux
The following steps explain how to access a shared Windows folder from Linux. To implement them, you need Administrator rights on your Windows user account.
#### 1\. Enable file sharing
Open the** Network and Sharing Center** either by clicking on the
**Windows Button &gt; Settings &gt; Network &amp; Internet**
or by right-clicking the little monitor icon on the bottom-right of your taskbar:
![Open network and sharing center][13]
(Stephan Avenwedde, [CC BY-SA 4.0][9])
In the window that opens, find the connection you want to use and note its profile. I used **Ethernet 3**, which is tagged as a **Public network**.
> **Caution**: Consider changing your local machine's connection profile to **Private** if your PC is frequently connected to public networks.
Remember your network profile and click on **Change advanced sharing settings**:
![Change advanced sharing settings][14]
(Stephan Avenwedde, [CC BY-SA 4.0][9])
Select the profile that corresponds to your connection and turn on **network discovery** and **file and printer sharing**:
![Network sharing settings][15]
(Stephan Avenwedde, [CC BY-SA 4.0][9])
#### 2\. Define a shared folder
Open the context menu by right-clicking on the folder you want to share, navigate to **Give access to**, and select **Specific people...** :
![Give access][16]
(Stephan Avenwedde, [CC BY-SA 4.0][9])
Check whether your current username is on the list. Click on **Share** to tag this folder as shared:
![Tag as shared][17]
(Stephan Avenwedde, [CC BY-SA 4.0][9])
You can display a list of all shared folders by entering `\\localhost` in File Explorer's address line:
![Shared folders][18]
(Stephan Avenwedde, [CC BY-SA 4.0][9])
![Shared folders][19]
(Stephan Avenwedde, [CC BY-SA 4.0][9])
#### 3\. Mount the shared folder under Linux
Go back to your Linux system, open a command shell, and create a new folder where you want to mount the Windows share:
```
`mkdir ~/WindowsShare`
```
Mounting Windows shares is done with mount.cifs, which should be installed by default. To mount your shared folder temporarily, use:
```
`sudo mount.cifs //<address-of-windows-pc>/MySharedFolder ~/WindowsShare/ -o user=<Windows-user>,uid=$UID`
```
In this command:
* `<address-of-windows-pc>` is the Windows PC's address info (IP or hostname)
* `<Windows-user>`is the user that is allowed to access the shared folder (from step 2)
You will be prompted for your Windows password. Enter it, and you will be able to access the shared folder on Windows with your normal Linux user.
To unmount the shared folder:
```
`sudo umount ~/WindowsShare/`
```
You can also mount a Windows shared folder on system startup. Follow [these steps][20] to configure your system accordingly.
### Summary
This shows how to establish temporary shared folder access that must be renewed after each boot. It is relatively easy to modify this configuration for permanent access. I often switch back and forth between different systems, so I consider it incredibly practical to set up direct file access.
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/4/share-files-linux-windows
作者:[Stephan Avenwedde][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/hansic99
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003499_01_cloud21x_cc.png?itok=5UwC92dO (Blue folders flying in the clouds above a city skyline)
[2]: https://getfedora.org/en/workstation/download/
[3]: https://www.samba.org/
[4]: https://linux.die.net/man/8/mount.cifs
[5]: https://en.wikipedia.org/wiki/Server_Message_Block
[6]: https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html
[7]: https://www.redhat.com/en/topics/linux/what-is-selinux
[8]: https://opensource.com/sites/default/files/uploads/sebool.png (Enabling Samba to enable user directory access)
[9]: https://creativecommons.org/licenses/by-sa/4.0/
[10]: https://opensource.com/sites/default/files/uploads/firewall_configuration.png (firewall-config tool)
[11]: https://opensource.com/sites/default/files/uploads/windows_access_shared_1.png (Accessing Linux machine from Windows)
[12]: https://opensource.com/sites/default/files/uploads/windows_acess_shared_2.png (Accessing Linux machine from Windows)
[13]: https://opensource.com/sites/default/files/uploads/open_network_and_sharing_center.png (Open network and sharing center)
[14]: https://opensource.com/sites/default/files/uploads/network_and_sharing_center_2.png (Change advanced sharing settings)
[15]: https://opensource.com/sites/default/files/uploads/network_sharing.png (Network sharing settings)
[16]: https://opensource.com/sites/default/files/pictures/give_access_to.png (Give access)
[17]: https://opensource.com/sites/default/files/pictures/tag_as_shared.png (Tag as shared)
[18]: https://opensource.com/sites/default/files/uploads/show_shared_folder_1.png (Shared folders)
[19]: https://opensource.com/sites/default/files/uploads/show_shared_folder_2.png (Shared folders)
[20]: https://timlehr.com/auto-mount-samba-cifs-shares-via-fstab-on-linux/

View File

@ -1,182 +0,0 @@
[#]: subject: (Linux package management with dnf)
[#]: via: (https://opensource.com/article/21/6/dnf-linux)
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
Linux package management with dnf
======
Learn how to install packages on Linux with the dnf command, then
download our cheat sheet to keep the right command at your fingertips.
![Package wrapped with brown paper and red bow][1]
Installing an application on a computer system is pretty simple. You copy files from an archive (like a .zip file) onto the target computer in a place the operating system expects there to be applications. Because many of us are accustomed to having fancy installer "wizards" to help us get software on our computers, the process seems like it should be technically more complex than it is.
What _is_ complex, though, is the issue of what makes up an application. What users think of as a single application actually contains code borrowing from software libraries (i.e., `.so` files on Linux, `.dll` files on Windows, and `.dylib` on macOS) scattered throughout an operating system.
So that users don't have to worry about that veritable matrix of interdependent code, Linux uses a **package management system** to track what application needs what library, and which library or application has security or feature updates, and what extra data files were installed with each software title. A package manager is, essentially, an installer wizard. They're easy to use, they provide both graphical interfaces and terminal-based interfaces, and they make your life easier. The better you know your distribution's package manager, the easier your life gets.
### Installing applications on Linux
If you're a casual desktop user who wants to install an application on Linux, then you may be looking for [GNOME Software][2], a desktop application browser.
![Image of the GNOME Software application][3]
It works as you'd expect: You click through its interface until you find an application that seems like it would be useful, and then you click the **Install** button.
Alternately, you can open `.rpm` or `.flatpakref` packages downloaded from the web in GNOME Software for it to install them for you.
If you're inclined toward controlling your computer with typed commands, read on!
### Finding software with dnf
Before you can install an application, you may need to confirm that it exists on your distribution's servers. Usually, searching for the common name of an application with `dnf` suffices. For instance, say you recently read [an article about Cockpit][4] and decide you want to try it. You could search for `cockpit` to verify that your distribution includes it:
```
$ dnf search cockpit
 Last metadata expiration check: 0:01:46 ago on Tue 18 May 2021 19:18:15 NZST.
 ==== Name Exactly Matched: cockpit ====
 cockpit.x86_64 : Web Console for Linux servers
==== Name &amp; Summary Matched: cockpit ==
 cockpit-bridge.x86_64 : Cockpit bridge server-side component
 cockpit-composer.noarch : Composer GUI for use with Cockpit
 [...]
```
There's an exact match. The package listed as a match is called `cockpit.x86_64`, but the `.x86_64` part of the name only denotes the CPU architecture it's compatible with. By default, your system installs packages with matching CPU architectures, so you can ignore that extension. Therefore, you've confirmed that the package you're looking for is indeed called simply `cockpit`.
Now you can confidently install it with `dnf install`. This step requires administrative privileges:
```
`$ sudo dnf install cockpit`
```
More often than not, that's the typical `dnf` workflow: search and install.
Sometimes, however, the results of `dnf search` aren't clear to you, or you want more information about a package than just its common name. There are a few relevant `dnf` subcommands, depending on what information you're after.
### Package metadata
If you feel like your search got you _close_ to the package you want, but you're just not sure yet, it's often helpful to take a look at the package's metadata, such as the project's URL and description. To get this info, use the pleasantly intuitive `dnf info` command:
```
$ dnf info terminator
Available Packages
Name         : terminator
Version      : 1.92
Release      : 2.el8
Architecture : noarch
Size         : 526 k
Source       : terminator-1.92-2.el8.src.rpm
Repository   : epel
Summary      : Store and run multiple GNOME terminals in one window
URL          : <https://github.com/gnome-terminator>
License      : GPLv2
Description  : Multiple GNOME terminals in one window.  This is a project to produce
             : an efficient way of filling a large area of screen space with
             : terminals. This is done by splitting the window into a resizeable
             : grid of terminals. As such, you can  produce a very flexible
             : arrangements of terminals for different tasks.
```
This info dump tells you the version of the available package, which repository registered with your system provides it, the project's website, and a long description of what it does.
### What package provides a file?
Package names don't always match what you're looking for. For instance, suppose you're reading documentation telling you that you must install something called `qmake-qt5`:
```
$ dnf search qmake-qt5
No matches found.
```
The `dnf` database is extensive, so you don't have to restrict yourself to searches for exact matches. You can use the `dnf provides` command to learn whether anything provides what you're looking for as part of some larger package:
```
$ dnf provides qmake-qt5
qt5-qtbase-devel-5.12.5-8.el8.i686 : Development files for qt5-qtbase
Repo        : appstream
Matched from:
Filename    : /usr/bin/qmake-qt5
qt5-qtbase-devel-5.15.2-3.el8.x86_64 : Development files for qt5-qtbase
Repo        : appstream
Matched from:
Filename    : /usr/bin/qmake-qt5
```
This confirms that the application `qmake-qt5` is a part of a package named `qt5-qtbase-devel`. It also tells you that the application gets installed to `/usr/bin`, so you know exactly where to find it once it's installed.
### What files are included in a package?
There are times when I find myself approaching `dnf` from a different angle entirely. Sometimes, I've already confirmed that an application is installed on my system; I just can't figure out how I got it. Other times, I know I have a specific package installed, but I'm not clear on exactly what that package put on my system.
If you ever need to "reverse engineer" a package's payload, you can use the `dnf repoquery` command along with the `--list` option. This looks at the repository's metadata about a package and returns a list of all files provided by that package:
```
$ dnf repoquery --list qt5-qtbase-devel
/usr/bin/fixqt4headers.pl
/usr/bin/moc-qt5
/usr/bin/qdbuscpp2xml-qt5
/usr/bin/qdbusxml2cpp-qt5
/usr/bin/qlalr
/usr/bin/qmake-qt5
/usr/bin/qvkgen
/usr/bin/rcc-qt5
[...]
```
These lists can get long, so it helps to pipe the command through `less` or your favorite pager.
### Removing an application
Should you decide you no longer need an application installed on your system, you can use `dnf remove` to uninstall it, all of the files that were installed as part of its package, and any dependencies that are no longer necessary:
```
`$ dnf remove bigapp`
```
Sometimes, dependencies get installed with one app and are later found useful by some other application you install. In the event that two packages require the same dependency, `dnf remove` does _not_ remove the dependency. It's not unheard of to end up with a stray package here and there after installing and uninstalling lots of applications. About once a year, I perform a `dnf autoremove` to clear out any unused packages:
```
`$ dnf autoremove`
```
This isn't necessary, but it's a housecleaning step that makes me feel better about my computer.
### Getting to know dnf
The more you know about how your package manager works, the easier it is for you to install and query applications when necessary. Even if you're not a regular `dnf` user, it can be useful to know it when you find yourself interfacing with an RPM-based distro.
Having graduated from `yum`, one of my favorite package managers is the `dnf` command. While I don't love all its subcommands, I find it to be one of the more robust package management systems out there. [**Download our `dnf` cheat sheet**][5] to get used to the command, and don't be afraid to try some new tricks with it. Once you get familiar with it, you might find it hard to use anything else.
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/6/dnf-linux
作者:[Seth Kenlon][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/seth
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/brown-package-red-bow.jpg?itok=oxZYQzH- (Package wrapped with brown paper and red bow)
[2]: https://wiki.gnome.org/Apps/Software
[3]: https://opensource.com/sites/default/files/gnome-software.png (The GNOME Software app)
[4]: https://opensource.com/article/20/11/cockpit-server-management
[5]: https://opensource.com/downloads/dnf-cheat-sheet

View File

@ -1,192 +0,0 @@
[#]: subject: (Linux package management with apt)
[#]: via: (https://opensource.com/article/21/6/apt-linux)
[#]: author: (Chris Hermansen https://opensource.com/users/clhermansen)
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
Linux package management with apt
======
Learn how to install packages on Debian-based Linux distros with the apt
command, then download our cheat sheet to keep the right command at your
fingertips.
![bash logo on green background][1]
On Linux, [package managers][2] help you handle updates, uninstalls, troubleshooting, and more for the software on your computer. Seth Kenlon [wrote about `dnf`][3], the command-line package management tool for installing software in RHEL, CentOS, Fedora, Mageia, OpenMandriva, and other Linux distros.
Debian and Debian-based distros such as MX Linux, Deepin, Ubuntu—and distros based on Ubuntu, such as Linux Mint and Pop!_OS—have `apt`, a "similar but different" tool. In this article, I'll follow Seth's examples—but with `apt`—to show you how to use it.
Before I start, I want to mention four `apt`-related tools for installing software:
* [Synaptic][4] is a GTK+ based graphical user interface (GUI) front end for `apt`.
* [Aptitude][5] is an Ncurses-based full-screen command-line front end for `apt`.
* There are `apt-get`, `apt-cache`, and other predecessors of `apt`.
* [Dpkg][6] is the "behind the scenes" package manager `apt` uses to do the heavy lifting.
There are other packaging systems, such as [Flatpak][7] and [Snap][8], that you might run into on Debian and Debian-based systems, but I'm not going to discuss them here. There are also application "stores," such as [GNOME Software][9], that overlap with `apt` and other packaging technologies; again, I'm not going to discuss them here. Finally, there are other Linux distros such as [Arch][10] and [Gentoo][11] that use neither `dnf` nor `apt`, and I'm not going to discuss those here either!
With all the things I'm not going to discuss here, you may be wondering what tiny subset of software `apt` handles. Well, on my Ubuntu 20.04, `apt` gives me access to 69,371 packages, from the `0ad` real-time strategy game of ancient warfare to the `zzuf` transparent application fuzzer. Not bad at all.
### Finding software with apt
The first step in using a package manager such as `apt` is finding a software package of interest. Seth's `dnf` article used the [Cockpit][12] server management application as an example, so I will, too:
```
$ apt search cockpit
Sorting... Done
Full Text Search... Done
389-ds/hirsute,hirsute 1.4.4.11-1 all
  389 Directory Server suite - metapackage
cockpit/hirsute,hirsute 238-1 all
  Web Console for Linux servers
...
$
```
The second package above is the one you're after (it's the line beginning with `cockpit/hirsute`). If you decide you want to install it, enter:
```
`$ sudo apt install cockpit`
```
`apt` will take care of installing Cockpit and all the bits and pieces, or _dependencies_, needed to make it work. Sometimes that's all that's needed; sometimes it's not. It's possible that having a bit more information could be useful in deciding whether you really want to install this application.
### Package metadata
To find out more about a package, use the `apt show` command:
```
$ apt show cockpit
Package: cockpit
Version: 238-1
Priority: optional
Section: universe/admin
Origin: Ubuntu
Maintainer: Ubuntu Developers &lt;[ubuntu-devel-discuss@lists.ubuntu.com][13]&gt;
Original-Maintainer: Utopia Maintenance Team &lt;[pkg-utopia-maintainers@lists.alioth.debian.org][14]&gt;
Bugs: <https://bugs.launchpad.net/ubuntu/+filebug>
Installed-Size: 88.1 kB
Depends: cockpit-bridge (&gt;= 238-1), cockpit-ws (&gt;= 238-1), cockpit-system (&gt;= 238-1)
Recommends: cockpit-storaged (&gt;= 238-1), cockpit-networkmanager (&gt;= 238-1), cockpit-packagekit (&gt;= 238-1)
Suggests: cockpit-doc (&gt;= 238-1), cockpit-pcp (&gt;= 238-1), cockpit-machines (&gt;= 238-1), xdg-utils
Homepage: <https://cockpit-project.org/>
Download-Size: 21.3 kB
APT-Sources: <http://ca.archive.ubuntu.com/ubuntu> hirsute/universe amd64 Packages
Description: Web Console for Linux servers
 The Cockpit Web Console enables users to administer GNU/Linux servers using a
 web browser.
 .
 It offers network configuration, log inspection, diagnostic reports, SELinux
 troubleshooting, interactive command-line sessions, and more.
$
```
In particular, notice the `Description` field, which tells you more about the application. The `Depends` field says what else must be installed, and `Recommends` shows what other—if any—cooperating components are suggested alongside it. The `Homepage` field offers a URL in case you need more info.
### What package provides a file?
Sometimes you don't know the package name, but you know a file that must be in a package. Seth offers as an example the `qmake-qt5` utility. Using `apt search` doesn't find it:
```
$ apt search qmake-qt5
Sorting... Done
Full Text Search... Done
$
```
However, a related command, `apt-file` will explore inside packages:
```
$ apt-file search qmake-qt5
qt5-qmake-bin: /usr/share/man/man1/qmake-qt5.1.gz
$
```
This turns up a man page for `qmake-qt5` that is part of a package called `qt5-qmake-bin`. Note that this package name reverses the `qmake` and `qt5` parts.
### What files are included in a package?
That handy `apt-file` command also tells which files are included in a given package. For example:
```
$ apt-file list cockpit
cockpit: /usr/share/doc/cockpit/TODO.Debian
cockpit: /usr/share/doc/cockpit/changelog.Debian.gz
cockpit: /usr/share/doc/cockpit/copyright
cockpit: /usr/share/man/man1/cockpit.1.gz
cockpit: /usr/share/metainfo/cockpit.appdata.xml
cockpit: /usr/share/pixmaps/cockpit.png
$
```
Note that this is distinct from the info provided by the `apt show` command, which lists the package's dependencies (other packages that must be installed).
### Removing an application
You can also remove packages with `apt`. For example, to remove the `apt-file` application:
```
`$ sudo apt purge apt-file`
```
Note that a superuser must run `apt` to install or remove applications.
Removing a package doesn't automatically remove all the dependencies that `apt` installs along the way. However, it's easy to carry out that little bit of tidying:
```
`$ sudo apt autoremove`
```
### Getting to know apt
As Seth wrote, "the more you know about how your package manager works, the easier it is for you to install and query applications when necessary."
Even if you're not a regular `apt` user, knowing it can be useful when you need to work at the command line while installing or removing packages (for example, on a remote server or when following a how-to published by some helpful soul). You may also need to know a bit about Dkpg (mentioned above); for example, some software creators provide a bare `.pkg` file.
I find the Synaptic package manager to be a really useful tool on my desktop, but I also use `apt` on a handful of servers that I maintain for various purposes.
**[Download our `apt` cheat sheet][15]** to get used to the command and try some new tricks with it. Once you do, you might find it hard to use anything else.
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/6/apt-linux
作者:[Chris Hermansen][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/clhermansen
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/bash_command_line.png?itok=k4z94W2U (bash logo on green background)
[2]: https://opensource.com/article/21/2/linux-package-management
[3]: https://opensource.com/article/21/5/dnf
[4]: https://www.nongnu.org/synaptic/
[5]: https://wiki.debian.org/Aptitude
[6]: https://wiki.debian.org/Teams/Dpkg
[7]: https://flatpak.org/
[8]: https://snapcraft.io/
[9]: https://wiki.gnome.org/Apps/Software
[10]: https://archlinux.org/
[11]: https://www.gentoo.org/
[12]: https://opensource.com/article/20/11/cockpit-server-management
[13]: mailto:ubuntu-devel-discuss@lists.ubuntu.com
[14]: mailto:pkg-utopia-maintainers@lists.alioth.debian.org
[15]: https://opensource.com/downloads/apt-cheat-sheet

View File

@ -0,0 +1,152 @@
[#]: subject: "Tails 5 Review: A Perfect Privacy-Focused Linux"
[#]: via: "https://www.debugpoint.com/2022/05/tails-5-review/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Tails 5 Review: A Perfect Privacy-Focused Linux
======
HERES A QUICK REVIEW OF DEBIAN-BASED TAILS 5, RELEASED A WHILE BACK,
REFRESHING ITS CORE MODULES WITH DEBIAN 11 BULLSEYE.
Before we jump into the review of Tails 5, its worth mentioning what Tails are about. Tails, aka The Amnesic Incognito Live System, is a [privacy-focussed Linux Distribution][1] which uses the Tor network to protect you while browsing the web. Tails are based on Debian stable branch and come with many goodies such as an IRC client, Tor browser, email clients, and messengers to help you roam around on the web anonymously.
![Tails 5 Desktop Running GNOME 3.38][2]
### Tails 5 Review
#### ISO, Installation
Tails are available as a complete installation ISO image with an additional image capable of running from the USB drive itself. If you plan to use Tails, you should first think about your primary purpose for using Tails. And choose the ISO you want.
I would recommend that everyone be ready with a Tails USB stick. Its handy on many occasions. For example, if you want to be anonymous for a short time and travel with public Wi-Fi, you might want to create a bootable Thumb drive to carry.
Both images are around 1.2GB in size and are available for download from the official website.
Installation of Tails is a little different, and you can find the guide [here][3].
#### First Impression
The first-time boot of Tails asks you to confirm the keyboard layout and language and followed by connecting to the Tor network. If you are not familiar with the Tor network, it gives two easy options. The Easier option is recommended for all users as it takes care of connecting to the Tor network with bridge setup, etc. You can also choose the “safer” option if you know what the options mean.
Once you complete the setup, you get a nice and clean GNOME Desktop environment which comes as default with Tails with additional applications. The GNOME version for Tails 5 is GNOME 3.38.6 stable which is the pre-GNOME 40 desktop with the traditional application menu with a vertical dock and workspaces.
You dont need anything fancy desktop while using Tails for some critical work. GNOME 3.38x does just fine and its fast.
![Tails Welcome Screen][2]
![Tails 5 Initial Tor Setup][2]
#### Tor Network and Application Updates
At its core, Tails 5 is based on [Debian 11 Bullseye][4] (which is the current stable version) and [Linux Kernel 5.10][5].
The application list of Tails is mostly curated for privacy oriented work. The Tails application list includes the Tor Browser, Tor Connection Manager, and Onion Circuits Manager. During my test, the Tor network connected properly without any problem.
In addition to that, this release introduces Kleopatra (replaces Seahorse) which is a Certification manager to GnuPG and helps to manage OpenPGP certificates and keys.
One of the essential features of Tails is the persistance storage configuration which is required if you use Tails via a USB stick. Tails 5 imprves the Persistance Storage option to make it more faster and rubust in nature.
Furthermore, the application stack in Tails 5.0 refreshed with their respective stable version according to Debian Bullseye listed below.
* Tor Browser 11.0.11
* GNOME 3.38.6
* MAT 0.12
* Audacity 2.4.2
* GNOME Disks 3.38
* GIMP 2.10.22
* Inkscape 1.0
* LibreOffice 7.0
Tails packages all necessary applications to help with your purpose of anonymity, and those are acihved by its specific applications as listed here.
* Password manager KeePassXC
* Pidgin Internet messenger
* Thunderbird Email Client
* Tor Browser and Connection Manager
* Onion Circuit manager
* Application for configuring Persistance Storage
* GtkHash checks for files
* Root Terminal
A tool called Additional Software that Tails includes; it helps run the different applications from the local media instead of downloading them after each boot.
#### Performance
The performance of Tails is stable and depends on GNOME Desktop. During my test, it behaved well, no major surprises of problems. Overall desktop feel is faster considering it is still GNOME 3.38 version.
So, during the performance test at idle, it was consuming around 4% CPU on average and memory is at 1.6 GB. It may be a little higher for an idle state, but being a privacy-focused distro, background processes, and daemon running contributed to this metric.
Also, the network histroy shows a continuous packaet traction at an idle state which I believe is due to some daemon running continuously.
![Tails 5 Performance shows continuous network ping][2]
### Closing Notes
Privacy is more important than ever today. And Tails is the best Linux distro for privacy-focused people out there. With the solid Debian stable base, GNOME desktop and [robust documentation,][6] Tails is a “go-to” distro for security researchers and advanced users. Moreover, the Tails team did an excellent job with its nicely crafted documentation which takes care of most of the problems you may face while using it. With that said, if you want to try out Tails 5, visit [this page for download][7] and read the installation [guide][3].
A word of caution: While using Tails, try not to visit banks or financial websites or make any transactions requiring 2FA authentication.
* * *
We bring the latest tech, software news and stuff that matters. Stay in touch via [Telegram][8], [Twitter][9], [YouTube][10], and [Facebook][11] and never miss an update!
#### Share this:
* [Twitter][12]
* [Facebook][13]
* [Print][14]
* [LinkedIn][15]
* [Reddit][16]
* [Telegram][17]
* [WhatsApp][18]
* [Email][19]
*
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/2022/05/tails-5-review/
作者:[Arindam][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.debugpoint.com/author/admin1/
[b]: https://github.com/lujun9972
[1]: https://www.debugpoint.com/2022/04/privacy-linux-distributions-2022/
[2]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
[3]: https://tails.boum.org/install/linux/index.en.html
[4]: https://www.debugpoint.com/2021/05/debian-11-features/
[5]: https://www.debugpoint.com/2020/12/linux-kernel-5-10-release-announcement/
[6]: https://tails.boum.org/doc/index.en.html
[7]: https://tails.boum.org/install/index.en.html
[8]: https://t.me/debugpoint
[9]: https://twitter.com/DebugPoint
[10]: https://www.youtube.com/c/debugpoint?sub_confirmation=1
[11]: https://facebook.com/DebugPoint
[12]: https://www.debugpoint.com/2022/05/tails-5-review/?share=twitter (Click to share on Twitter)
[13]: https://www.debugpoint.com/2022/05/tails-5-review/?share=facebook (Click to share on Facebook)
[14]: tmp.L2cjWMplUd#print (Click to print)
[15]: https://www.debugpoint.com/2022/05/tails-5-review/?share=linkedin (Click to share on LinkedIn)
[16]: https://www.debugpoint.com/2022/05/tails-5-review/?share=reddit (Click to share on Reddit)
[17]: https://www.debugpoint.com/2022/05/tails-5-review/?share=telegram (Click to share on Telegram)
[18]: https://www.debugpoint.com/2022/05/tails-5-review/?share=jetpack-whatsapp (Click to share on WhatsApp)
[19]: https://www.debugpoint.com/2022/05/tails-5-review/?share=email (Click to email this to a friend)

View File

@ -1,92 +0,0 @@
[#]: subject: (A new open source operating system for embedded systems)
[#]: via: (https://opensource.com/article/21/7/rt-thread-smart)
[#]: author: (Zhu Tianlong https://opensource.com/users/zhu-tianlong)
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
A new open source operating system for embedded systems
======
RT-Thread Smart is working to open source the world of IoT and edge
computing.
![An intersection of pipes.][1]
There's a growing demand for [embedded operating systems][2], and it's best when the one you build upon is open source. The [RT-Thread][3] project's R&amp;D team has spent three years of research and intensive development to arrive at the project's latest offering: RT-Thread Smart. It is a microkernel operating system aimed primarily at midrange to high-end processors such as RISC-V with a memory management unit (MMU) and provides a competitive software platform for all industries in the embedded space.
### Who needs RT-Thread Smart?
RT-Thread Smart is a professional, high-performance, microkernel operating system for real-time applications. It offers an open source foundation for embedded devices in any market, including security (e.g., internet protocol cameras), industrial control, onboard devices, consumer electronics, and anything else using embedded technology (which is increasingly coming to mean "everything"). It's significant because, unlike traditional IoT operating systems, a microkernel operating system can fill the gap between a traditional real-time operating system (RTOS) and a comparatively large operating system like Linux to achieve the best balance between real-time performance, cost, security, startup speed, and more.
### RT-Thread Smart's architecture
RT-Thread Smart separates a system into kernel mode and user mode by taking advantage of the MMU and system call methods. It then divides the address space for each mode (a 32-bit system provides 4G address space).
![RT-Thread Smart architecture][4]
(RT-Thread, [CC BY-SA 4.0)][5]
The RT-Thread Smart kernel includes the platform's basic functionality and supports customizations. RT-Thread Smart's userspace application environment uses [musl libc][6] to provide [POSIX][7] interface calls and C runtime supports. It also inherits the original RT-Thread ecosystem, using [SCons][8] or other build tools such as [Autotools][9], Makefiles, [CMake][10], and so on to support development, as well as RT-Thread's out-of-the-box online software packages (over 342 at the time of this writing). You can even port Linux applications, such as wget/cURL, BusyBox, OpenSSL, and Simple DirectMedia Layer, to your platform.
The compressed RT-Thread Smart kernel is just 217KB, with a root filesystem of 127KB. Typical memory usage is about 2MB.
Including full support for filesystems, network protocol stacks, and multimedia, it takes only three to five seconds for RT-Thread to finish its startup process. Without running any functional components, RT-Thread Smart requires less than 500ms to start and be ready.
With its integrated Persimmon user interface (UI) component, the time it takes from power-on to a running UI is about one second. In other words, this is a seriously tiny and fast system. Of course, "real time" isn't about startup but how the system performs consistently over time. For RT-Thread, real-time performance is a priority, and the interrupt latency is less than 1 μs, which meets most application cases with the strictest real-time requirements.
### RT-Thread Smart vs. RT-Thread
You might be wondering about the differences between RT-Thread Smart and RT-Thread. Simply put, RT-Thread Smart is an RT-Thread RTOS-based operating system, but it integrates the user-state process. The kernel part of RT-Smart is essentially RT-Thread RTOS; it runs on virtual addresses, joins process management, and uses interprocess communication mechanisms, virtual memory/address space management, ELF loaders, and so on, and it makes all of these features components within RT-Thread RTOS. When the IwP components are disabled, RT-Smart falls back onto RT-Thread RTOS.
Here's a comparison:
| RT-Thread | RT-Thread Smart
---|---|---
Supported chips | Cortex-M/R, RISC-V RV32IMAC (and similar), Cortex-A MPU | MPU with MMU, such as Cortex-A
Compiling | The kernel and application are compiled into an image program. | The kernel and application can be separately compiled and executed.
Memory | Runs on a linear address space (even with MMU) and uses virtual addressing with the physical address | Runs on a 32-bit system with the kernel running on more than 1GB, the user-state process has separate address spaces that are isolated from each other. Peripheral drivers must access peripherals with virtual addresses.
Running errors | When an application fails, the overall system collapses. | When an application fails, it does not affect kernel and other process execution.
Running model | Multiprocess model | Multiprocess model (multithread is supported within the process, and kernel threads are supported by the kernel)
User model | Single-user model | Single-user model
API | RT-Thread API, POSIX PSE52 | RT-Thread API (on kernel and userspace), plus a full POSIX API
Real time | Preemptive hard real-time system | Preemptive hard real-time system
Resource utilization | Very small | Relatively small
Debugging | Generally debugged through the emulator | No emulator required according to the way the software debugs
RT-Thread RTOS is very compact. All applications and subsystems are compiled into the image, and multitasking runs and shares the same address space.
RT-Thread Smart is independent. Systems and applications are separately compiled and executed. Applications have a complete address space and are kept isolated from each other. It also inherits all the great real-time features of RT-Thread and features a POSIX environment.
Similarly, they're both compatible with the RT-Thread API, so applications on RT-Thread RTOS can be smoothly ported to RT-Thread Smart.
### Embed open source
RT-Thread Smart is an open source project, with its code available on [GitHub][11]. You can download the code and its documentation, give it a try, submit comments and feedback, and help spread it to more open source advocates. Embedded systems should belong to their users, and there are too many embedded developers out there who don't realize what's available.
If you're a developer, help hack on RT-Thread Smart! As the RT-Thread project continues to advance, we aim to make the exciting worlds of IoT and edge computing open source.
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/7/rt-thread-smart
作者:[Zhu Tianlong][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/zhu-tianlong
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/LAW-Internet_construction_9401467_520x292_0512_dc.png?itok=RPkPPtDe (An intersection of pipes.)
[2]: https://opensource.com/article/20/6/open-source-rtos
[3]: https://www.rt-thread.io/
[4]: https://opensource.com/sites/default/files/uploads/rt-thread-smart.png (RT-Thread Smart architecture)
[5]: https://creativecommons.org/licenses/by-sa/4.0/legalcode
[6]: https://musl.libc.org/
[7]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains
[8]: https://scons.org/
[9]: https://opensource.com/article/19/7/introduction-gnu-autotools
[10]: https://opensource.com/article/21/5/cmake
[11]: https://github.com/RT-Thread/rt-thread/tree/rt-smart

View File

@ -1,329 +0,0 @@
[#]: subject: "Learn Rust in 2022"
[#]: via: "https://opensource.com/article/22/1/rust-cheat-sheet"
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Learn Rust in 2022
======
If you're going to explore Rust this year, download our free Rust cheat
sheet, so you have a quick reference for the basics.
![Cheat Sheet cover image][1]
Rust is a relatively new programming language, and it's already a popular one [winning over programmers][2] from all industries. Still, it's also a language that builds on everything that's come before. Rust wasn't made in a day, after all, so even though there are concepts in Rust that seem wildly different from what you might have learned from Python, Java, C++, and so on, they all have a foundation in the same CPU and NUMA architecture you've always been (whether you know it or not) interacting with, and so some of what's new in Rust feels somehow familiar.
Now, I'm not a programmer by trade. I'm impatient yet obsessive. If a language doesn't help me get the results I want relatively quickly, I rarely find myself inspired to use it when I need to get something done. Rust tries to bring into balance two conflicting things: The modern computer's need for secure and structured code, and the modern programmer's desire to do less work while attaining more success.
### Install Rust
The [rust-lang.org][3] website has great documentation on installing Rust, but usually, it's as simple as downloading the `sh.rustup.rs` script and running it.
```
$ curl --proto '=https' --tlsv1.2 -sSf <https://sh.rustup.rs>
$ less sh.rustup.sh
$ sh ./sh.rustup.rs
```
### No classes
Rust doesn't have classes and does not use the `class` keyword. Rust does have the `struct` data type, however, its purpose is to serve as a kind of template for a collection of data. So instead of creating a class to represent a virtual object, you can use a struct:
```
struct Penguin {
    genus: String,
    species: String,
    extinct: bool,
    classified: u64,
}
```
You can use this similar to how a class is used. For instance, once a `Penguin` struct is defined, you can create instances of it, and interact with that instance:
```
struct Penguin {
    genus: String,
    species: String,
    extinct: bool,
    classified: u64,
}
fn main() {
    let p = Penguin { genus: "Pygoscelis".to_owned(),
         species: "R adeliæ".to_owned(), 
         extinct: false, 
         classified: 1841 };
    println!("Species: {}", p.species);    
    println!("Genus: {}", p.genus);
    println!("Classified in {}", p.classified);
    if p.extinct == true {
        println!("Sadly this penguin has been made extinct.");
    }
    
}
```
Using the `impl` data type in conjunction with the `struct` data type, you can implement a struct containing functions, and you can add inheritance and other class-like features.
### Functions
Functions in Rust are a lot like functions in other languages. Each one represents a discreet set of tasks that you can call upon when needed. The primary function must be called `main`.
Functions are declared using the `fn` keyword, followed by the function's name and any parameters the function accepts.
```
fn foo() {
  let n = 8;
  println!("Eight is written as {}", n);
}
```
Passing information from one function to another gets done with parameters. For instance, I've already created a `Penguin` class, and I've got an instance of a penguin as `p`, so passing the attributes of `p` from one function to another requires me to specify `p` as an accepted `Penguin` type for its destination function.
```
fn main() {
  let p = Penguin { genus: "Pygoscelis".to_owned(), 
    species: "R adeliæ".to_owned(), 
    extinct: false, classified: 1841 };
  printer(p);
}
fn printer(p: Penguin) {
  println!("Species: {}", p.species);    
  println!("Genus: {}", p.genus);
  println!("Classified in {}", p.classified);
  if p.extinct == true {
      println!("Sadly this penguin has been made extinct.");
  }
}
```
### Variables 
Rust creates immutable variables by default. That means that a variable you create cannot be changed later. This code, humble though it may be, cannot be compiled:
```
fn main() {
 let n = 6;
 let n = 5;
 }
```
However, you can declare a mutable variable with the keyword `mut`, so this code compiles successfully:
```
fn main() {
 let mut n = 6;
 println!("Value is {}", n);
 n = 5;
 println!("Value is {}", n);
}
```
### Compiler 
The Rust compiler, at least in terms of its error messages, is one of the nicest compilers available. When you get something wrong in Rust, the compiler makes a sincere effort to tell you what you did wrong. I've actually learned many nuances of Rust (insofar as I understand any nuance of Rust) just by learning from compiler error messages. Even when an error message is too obscure to learn from directly, it's almost always enough for an internet search to explain.
The easiest way to start a Rust program is to use `cargo`, the Rust package management and build system.
```
$ mkdir myproject
$ cd myproject
$ cargo init 
```
This creates the basic infrastructure for a project, most notably a `main.rs` file in the `src` subdirectory. Open this file and paste in the example code I've generated for this article:
```
struct Penguin {
    genus: String,
    species: String,
    extinct: bool,
    classified: u64,
}
fn main() {
    let p = Penguin { genus: "Pygoscelis".to_owned(), species: "R adeliæ".to_owned(), extinct: false, classified: 1841 };
    printer(p);
    foo();
}
fn printer(p: Penguin) {
    println!("Species: {}", p.species);    
    println!("Genus: {}", p.genus);
    println!("Classified in {}", p.classified);
    if p.extinct == true {
        println!("Sadly this penguin has been made extinct.");
    }
}
fn foo() {
     let mut n = 6;
 println!("Value is {}", n);
 n = 8;
  println!("Eight is written as {}", n);
}
```
To compile, use the `cargo build` command:
```
`$ cargo build`
```
To run your project, execute the binary in the `target` subdirectory, or else just use `cargo run`: 
```
$ cargo run
Species: R adeliæ
Genus: Pygoscelis
Classified in 1841
Value is 6
Eight is written as 8
```
### Crates
Much of the convenience of any language comes from its libraries or modules. In Rust, libraries get distributed and tracked as "crates". The [crates.io][4] website is a good registry of community crates.
To add a crate to your Rust project, list them in the `Cargo.toml` file. For instance, to install a random number function, I use the `rand` crate, with `*` serving as a wildcard to ensure that I get the latest version at compile time:
```
[package]
name = "myproject"
version = "0.1.0"
authors = ["Seth &lt;[seth@opensource.com][5]&gt;"]
edition = "2022"
[dependencies]
rand = "*"
```
Using it in Rust code requires a `use` statement at the top:
```
`use rand::Rng;`
```
Some sample code that creates a random seed and then a random range:
```
fn foo() {
    let mut rng = rand::thread_rng();
    let mut n = rng.gen_range(1..99);
    println!("Value is {}", n);
    n = rng.gen_range(1..99);
    println!("Value is {}", n);
}
```
You can use `cargo run` to run it, which detects the code change and triggers a new build. The build process downloads the `rand` crate and all the crates that it, in turn, depends upon, compiles the code, and then runs it:
```
$ cargo run
Updating crates.io index
Downloaded ppv-lite86 v0.2.16
Downloaded 1 crate (22.2 KB) in 1.40s
 Compiling libc v0.2.112
 Compiling cfg-if v1.0.0
 Compiling ppv-lite86 v0.2.16
 Compiling getrandom v0.2.3
 Compiling rand_core v0.6.3
 Compiling rand_chacha v0.3.1
 Compiling rand v0.8.4
 Compiling rustpenguin v0.1.0 (/home/sek/Demo/rustpenguin)
 Finished dev [unoptimized + debuginfo] target(s) in 13.97s
 Running `target/debug/rustpenguin`
Species: R adeliæ
Genus: Pygoscelis
Classified in 1841
Value is 70
Value is 35
```
### Rust cheat sheet
Rust is a supremely pleasant language. Thanks to its integration with online registries, its helpful compiler, and its almost intuitive syntax, it feels appropriately modern.
Make no mistake, though, it's also a complex language, with strict data types, strongly scoped variables, and many built-in methods. Rust is worth looking at, and if you're going to explore Rust, then you should download our free **[Rust cheat sheet][6]**, so you have a quick reference for the basics. The sooner you get started, the sooner you'll know Rust. And, of course, you should practice often to avoid getting rusty.
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/1/rust-cheat-sheet
作者:[Seth Kenlon][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/seth
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/coverimage_cheat_sheet.png?itok=lYkNKieP (Cheat Sheet cover image)
[2]: https://opensource.com/article/20/5/rust-java
[3]: http://rust-lang.org
[4]: https://crates.io/
[5]: mailto:seth@opensource.com
[6]: https://opensource.com/downloads/rust-cheat-sheet

View File

@ -0,0 +1,155 @@
[#]: subject: "dahliaOS A Unique Linux Distribution Based on Google Fuchsia [First Look]"
[#]: via: "https://www.debugpoint.com/2022/05/dahlia-os-alpha/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
dahliaOS A Unique Linux Distribution Based on Google Fuchsia [First Look]
======
OUR FIRST LOOK AT THE DAHLIAOS ALPHA VERSION, BASED ON GOOGLES FUCHSIA
OPERATING SYSTEM.
The [dahliaOS][1] is a unique distribution and a “fork” of the Google [Fuchsia][2] operating system that runs on mainline Linux Kernel and [Zircon Kernel][3]. The Zircon kernel is a newly designed kernel developed by Google for its own set of projects and devices.
The parent OS Fuchsia is designed to work on any hardware, including car dashboards to PCs. That said, the dahliaOS is a new promising operating system (or should I say a new Linux Distribution?) which brings a new era of desktop computing experience to traditional Linux distributions.
![dahliaOS Alpha Desktop][4]
### dahliaOS First Look (ALPHA)
#### Core Architecture
Its an ALPHA software as of writing this review. So, there are bugs. I would not recommend it for your daily driver or any serious work.
Firstly, the team of dahliaOS managed to run this fork on top of the mainline Linux Kernel ([Kernel 5.17][5] in this alpha version). You still have the option to use the zircon kernel. On top of that, it uses the init system for boot up and other initial functions.
Secondly, dahliaOSs user interface is called Pangolin desktop, which is based on deprecated capybara UI, and it provides a desktop shell.
In addition to those, the Pangolin Shell interacts with X.Org and Flutter. While researching, I found traces of Openbox Window manager; perhaps its also used.
However, the X.Org display server communicates with userspace and the userspace talks to Linux Kernel. The overall architecture is explained below image (credit: dahliaOS team).
![dahlisOS Architecture][4]
#### The Pangolin Desktop
At the first look, its a stunning looking desktop and very fast. The overall look may feel similar to Chrome OS, but there are differences. The primary reason maybe its designed differently and written in Flutter.
The design is pretty standard with a bottom main panel with an application menu at the left, a middle dock and a system tray.
The application menu launches full screen, and its unique. At the top, you get a global search bar which searches your entire desktop and web. In the middle, an icon-based application grid gives you access to all the installed packages in your system. One of the unique aspects of this menu is an additional menu bar that shows the application categories in this fullscreen view.
![Full-screen application view][4]
Finally, a small section shows shortcuts to the power menu, system settings, and user profile at the bottom.
Not only that, the bottom panel does not overlay with the fullscreen application menu; it remains visible.
But thats not all. My favourite is the system tray pop-up menu which summarizes the system state with toggle switches to turn on or off several settings. See for yourself in the below image.
![System Tray][4]
Its a fine work of user interface design that brings all these options together without the feeling of clumsiness.
Moreover, the different search options and a nice workspace view give this desktop an additional advantage.
#### Applications and Settings
Firstly, I want to discuss how well the Settings window is designed. Settings application gives you access to all tweaks for dahliaOS. This responsive application (adapts to the screen size), offers an array of options on the left panel with its details on the right.
![Settings Window][4]
Network, Customizations, Connected devices, and notifications are some of the critical settings that you can find. However, being an alpha copy, some are still under development.
In addition, dahliaOS comes with built-in dark and light mode with an option to change the primary taskbar alignment, coloured title bars with transparency effect (wow) and a settings slider to change the window border radius!
Finally, a file manager, photo viewer, terminal and calculator all developed in Flutter give a different feel if you are an avid Linux user.
![dahliaOS Running Apps][4]
Installing software is a little different as dahliaOS manages all of them via Web App.
#### Installing native apps or Linux packages
I am not sure whether dahliaOS would allow the installation of native Linux packages via apt, Flathub or Snap. But the possibility is there as a future roadmap.
#### Performance
Overall, the performance is speedy, and the resource consumption metric is good. In a virtual machine environment, dahliaOS consumes about 330MB of memory. But CPU is surprisingly little higher in my opinion, which hovers around 10 % to 13% range. The Pangolin desktop consumes most of the resources, followed by the X.Org.
![dahliaOS ALPHA System Performance][4]
Finally, you might feel some strange desktop behaviour related to in-focus and out of focus situations in applications perhaps due to FLutter. Sometimes, the focus is not registered even if you select a window via mouse. It might well be a bug.
### Video of dahliaOS walkthrough Alpha
Heres a quick walkthrough of dahliaOS, which I recorded for our readers to give you some idea before you try.
### Closing Notes
To wrap up, I think it is one of the promising Linux distributions in the making, which takes a different path than traditional forks.
We will keep a close watch on this project and give you updates here.
If you want to learn more, contribute, visit the official website for more [details][6] ([source][7]). Finally, if you are planning to install or try, visit this [page][8].
* * *
We bring the latest tech, software news and stuff that matters. Stay in touch via [Telegram][9], [Twitter][10], [YouTube][11], and [Facebook][12] and never miss an update!
#### Share this:
* [Twitter][13]
* [Facebook][14]
* [Print][15]
* [LinkedIn][16]
* [Reddit][17]
* [Telegram][18]
* [WhatsApp][19]
* [Email][20]
*
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/2022/05/dahlia-os-alpha/
作者:[Arindam][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.debugpoint.com/author/admin1/
[b]: https://github.com/lujun9972
[1]: https://dahliaos.io/
[2]: https://fuchsia.dev/
[3]: https://fuchsia.dev/fuchsia-src/concepts/kernel
[4]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
[5]: https://www.debugpoint.com/2022/03/linux-kernel-5-17/
[6]: https://docs.dahliaos.io/
[7]: https://github.com/dahliaOS/
[8]: https://docs.dahliaos.io/install/efi
[9]: https://t.me/debugpoint
[10]: https://twitter.com/DebugPoint
[11]: https://www.youtube.com/c/debugpoint?sub_confirmation=1
[12]: https://facebook.com/DebugPoint
[13]: https://www.debugpoint.com/2022/05/dahlia-os-alpha/?share=twitter (Click to share on Twitter)
[14]: https://www.debugpoint.com/2022/05/dahlia-os-alpha/?share=facebook (Click to share on Facebook)
[15]: tmp.6E0Ad93KWV#print (Click to print)
[16]: https://www.debugpoint.com/2022/05/dahlia-os-alpha/?share=linkedin (Click to share on LinkedIn)
[17]: https://www.debugpoint.com/2022/05/dahlia-os-alpha/?share=reddit (Click to share on Reddit)
[18]: https://www.debugpoint.com/2022/05/dahlia-os-alpha/?share=telegram (Click to share on Telegram)
[19]: https://www.debugpoint.com/2022/05/dahlia-os-alpha/?share=jetpack-whatsapp (Click to share on WhatsApp)
[20]: https://www.debugpoint.com/2022/05/dahlia-os-alpha/?share=email (Click to email this to a friend)

View File

@ -1,219 +0,0 @@
[#]: subject: "3 steps to start running containers today"
[#]: via: "https://opensource.com/article/22/2/start-running-containers"
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
[#]: collector: "lujun9972"
[#]: translator: "MjSeven"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
3 steps to start running containers today
======
In this tutorial, you will learn how to run two containers in a pod to
host a WordPress site.
![Shipping containers stacked][1]
Whether you're interested in them as part of your job, for future job opportunities, or just out of interest in new technology, containers can seem pretty overwhelming to even an experienced systems administrator. So how do you actually get started with containers? And what's the path from containers to [Kubernetes][2]? Also, why is there a path from one to the other at all? As you might expect, the best place to start is the beginning.
### 1\. Understanding containers
On second thought, starting at the beginning arguably dates back to early BSD and their special chroot jails, so skip ahead to the middle instead.
Not so very long ago, the Linux kernel introduced _cgroups_, which enables you to "tag" processes with something called a _namespace_. When you group processes together into a namespace, those processes act as if nothing outside that namespace exists. It's as if you've put those processes into a sort of container. Of course, the container is virtual, and it exists inside your computer. It runs on the same kernel, RAM, and CPU that the rest of your operating system is running on, but you've contained the processes.
Pre-made containers get distributed with just what's necessary to run the application it contains. With a container engine, like [Podman][3], Docker, or CRI-O, you can run a containerized application without installing it in any traditional sense. Container engines are often cross-platform, so even though containers run Linux, you can launch containers on Linux, macOS, or Windows.
More importantly, you can run more than one container of the same application when there's high demand for it.
Now that you know what a container is. The next step is to run one.
**[ Get the cheat sheet: [Whats the difference between a pod, a cluster, and a container?][4] ]**
### 2\. Run a container
Before running a container, you should have a reason for running a container. You can make up a reason, but it's helpful for that reason to interest you, so you're inspired actually to use the container you run. After all, running a container but never using the application it provides only proves that you're not noticing any failures, but using the container demonstrates that it works.
I recommend WordPress as a start. It's a popular web application that's easy to use, so you can test drive the app once you've got the container running. While you can easily set up a WordPress container, there are many configuration options, which can lead you to discover more container options (like running a database container) and how containers communicate.
I use Podman, which is a friendly, convenient, and daemonless container engine. If you don't have Podman available, you can use the Docker command instead. Both are great open source container engines, and their syntax is identical (just type `docker` instead of `podman`). Because Podman doesn't run a daemon, it requires more setup than Docker, but the ability to run rootless daemonless containers is worth it.
If you're going with Docker, you can skip down to the [WordPress subheading][5]. Otherwise, open a terminal to install and configure Podman:
```
`$ sudo dnf install podman`
```
Containers spawn many processes, and normally only the root user has permission to create thousands of process IDs. Add some extra process IDs to your user by creating a file called `/etc/subuid` and defining a suitably high start UID with a suitable large number of permitted PIDs:
```
`seth:200000:165536`
```
Do the same for your group in a file called `/etc/subgid`. In this example, my primary group is `staff` (it may be `users` for you, or the same as your username, depending on how you've configured your system.)
```
`staff:200000:165536`
```
Finally, confirm that your user is also permitted to manage thousands of namespaces:
```
$ sysctl --all --pattern user_namespaces
user.max_user_namespaces = 28633
```
If your user doesn't have permission to manage at least 28,000 namespaces, increase the number by creating the file `/etc/sysctl.d/userns.conf` and enter:
```
`user.max_user_namespaces=28633`
```
#### Running WordPress as a container
Now, whether you're using Podman or Docker, you can pull a WordPress container from a container registry online and run it. You can do all this with a single Podman command:
```
$ podman run --name mypress \
-p 8080:80 -d wordpress
```
Give Podman a few moments to find the container, copy it from the internet, and start it up.
Start a web browser once you get a terminal prompt back and navigate to `localhost:8080`. WordPress is running, waiting for you to set it up.
![WordPress running in a container][6]
(Seth Kenlon, [CC BY-SA 4.0][7])
It doesn't take long to reach your next hurdle, though. WordPress uses a database to keep track of data, so you need to provide it with a database where it can store its information.
Before continuing, stop and remove the WordPress container:
```
$ podman stop mypress
$ podman rm mypress
```
### 3\. Run containers in a pod
Containers are, by design and, as their name suggests, self-contained. An application running in a container isn't supposed to interact with applications or infrastructure outside of its container. So when one container requires another container to function, one solution is to put those two containers inside a bigger container called a _pod_. A pod ensures that its containers can share important namespaces to communicate with one another.
Create a new pod, providing a name for the pod and which ports you want to be able to access:
```
$ podman pod create \
\--name wp_pod \
\--publish 8080:80
```
Confirm that the pod exists:
```
$ podman pod list
POD ID        NAME     STATUS    INFRA ID      # OF CONTAINERS
100e138a29bd  wp_pod   Created   22ace92df3ef   1
```
#### Add a container to a pod
Now that you have a pod for your interdependent containers, you launch each container by specifying a pod for it to run in.
First, launch a database. You can make up your own credentials as long as you use those same credentials when connecting to the database from WordPress.
```
$ podman run --detach \
\--pod wp_pod \
\--restart=always \
-e MYSQL_ROOT_PASSWORD="badpassword0" \
-e MYSQL_DATABASE="wp_db" \
-e MYSQL_USER="tux" \
-e MYSQL_PASSWORD="badpassword1" \
\--name=wp_db mariadb
```
Next, launch the WordPress container into the same pod:
```
$ podman run --detach \
\--restart=always --pod=wp_pod \
-e WORDPRESS_DB_NAME="wp_db" \
-e WORDPRESS_DB_USER="tux" \
-e WORDPRESS_DB_PASSWORD="badpassword1" \
-e WORDPRESS_DB_HOST="127.0.0.1" \
\--name mypress wordpress
```
Now launch your favorite web browser and navigate to `localhost:8080`.
This time, the setup goes as expected. WordPress connects to the database because you've passed those environment variables while launching the container.
![WordPress setup][8]
(Seth Kenlon, [CC BY-SA 4.0][7])
After you've created a user account, you can log in to see the WordPress dashboard.
![WordPress dashboard running in a container][9]
(Seth Kenlon, [CC BY-SA 4.0][7])
### Next steps
You've created two containers, and you've run them in a pod. You know enough now to run services in containers on your own server. If you want to move to the cloud, containers are, of course, well-suited for that. With tools like Kubernetes and OpenShift, you can automate the process of launching [containers and pods on a cluster][10]. If you're thinking about taking the next step, read [3 ways to get started with Kubernetes][11] by Kevin Casey, and give the Minikube tutorial he mentions a try.
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/2/start-running-containers
作者:[Seth Kenlon][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/seth
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/bus-containers.png?itok=d_4QhZxT (Shipping containers stacked)
[2]: https://opensource.com/tags/kubernetes
[3]: https://www.redhat.com/sysadmin/podman-guides-2020
[4]: https://enterprisersproject.com/cheat-sheet-what-s-difference-between-pod-cluster-and-container
[5]: tmp.1zBHYsK8TH#wp
[6]: https://opensource.com/sites/default/files/uploads/podman-wordpress.jpg (WordPress running in a container)
[7]: https://creativecommons.org/licenses/by-sa/4.0/
[8]: https://opensource.com/sites/default/files/uploads/wordpress-setup.jpg (WordPress setup)
[9]: https://opensource.com/sites/default/files/uploads/wordpress-welcome.jpg (WordPress dashboard running in a container)
[10]: https://enterprisersproject.com/article/2020/9/pod-cluster-container-what-is-difference
[11]: https://enterprisersproject.com/article/2019/11/kubernetes-3-ways-get-started

View File

@ -1,232 +0,0 @@
[#]: subject: "A guide to JVM parameters for Java developers"
[#]: via: "https://opensource.com/article/22/4/jvm-parameters-java-developers"
[#]: author: "Jayashree Huttanagoudar https://opensource.com/users/jayashree-huttanagoudar"
[#]: collector: "lkxed"
[#]: translator: "Veryzzj"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
A guide to JVM parameters for Java developers
======
By understanding and using JVM and JVM parameters, both developers and end users can diagnose failures and improve the performance of a Java application.
![young woman working on a laptop][1]
Image by:
CC BY 3.0 US Mapbox Uncharted ERG
When you write source code, you're writing code for humans to read. Computers can't execute source code until the code is compiled into *machine language*, a generic term referring to any number of languages required by a specific machine. Normally, if you compile code on Linux, it runs on Linux, and if you compile code on Windows, it runs on Windows, and so on. However, Java is different. It doesn't target an actual machine. It targets something called the Java Virtual Machine (JVM), and so it can run on any machine.
Java source code gets compiled into bytecode which is run by a JVM installed on a computer. The JVM is an execution engine, but it's not one you usually interact with directly. It runs quietly, processing Java bytecode. Most people don't need to think or even know about the JVM, but it can be useful to understand how the JVM works so you can debug and optimize Java code. For example:
* In the production environment, you might find a deployed application needs a performance boost.
* If something goes wrong in an application you've written, both the developer and end-user have options to debug the problem.
* Should you want to know the details of the Java Development Kit (JDK) being used to develop or run a Java application, you can get those details by querying the JVM.
In the production environment, you might find a deployed application needs a performance boost.
If something goes wrong in an application you've written, both the developer and end-user have options to debug the problem.
Should you want to know the details of the Java Development Kit (JDK) being used to develop or run a Java application, you can get those details by querying the JVM.
This article introduces some basic JVM parameters to help in these scenarios…
![Jvm parameters][2]
Image by:
(Jayashree Huttanagoudar CC BY-SA 4.0)
### What's the difference between a JVM, JDK, and JRE?
Java has a lot of J-acronyms, including JVM, JDK, and JRE.
* A Java Developer Kit (JDK) is accessed by programmers who need development libraries to use in their code.
* The Java Runtime Environment (JRE) is employed by people who want to run a Java application.
* The Java Virtual Machine (JVM) is the component that runs Java bytecode.
A Java Developer Kit (JDK) is accessed by programmers who need development libraries to use in their code.
The Java Runtime Environment (JRE) is employed by people who want to run a Java application.
The Java Virtual Machine (JVM) is the component that runs Java bytecode.
The JDK contains both a JRE and a JVM, but some Java distributions provide an alternate download containing a JRE (including a JVM).
![JDK][3]
Image by:
(Jayashree Huttanagoudar CC BY-SA 4.0)
Java is open source, so different companies build and distribute JDKs. You can install more than one on your system, which can be helpful when you're working on or using different Java projects, some of which might use an old JDK.
To list the JDKs on your Linux system, you can use the alternatives command:
```
$ alternatives --config java
There are 2 programs that provide java.Selection Command-----------------------------------------------*+ 1 java-11-openjdk.x86_64 (/usr/lib/jvm/java-11-openjdk-11.0.13.0.8-2.fc35.x86_64/bin/java)2 java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.312.b07-2.fc35.x86_64/jre/bin/java)
Enter to keep the current selection[+], or type selection number:
```
To switch between available JDKs, run the command again:
```
$ sudo alternatives --config java
```
Another option is to use [SDKMan][4], which helps you download, update, and manage the JDKs on your system.
### What is JVM tuning?
Tuning a JVM is the process of adjusting JVM parameters to improve the performance of the Java application. It also helps to diagnose application failure.
In general, it's important to consider these points before tuning:
* Cost : Sometimes, improving the hardware running your code can improve an application's performance. That might seem like a "cheat" but consider how much time you're willing to spend tuning the JVM parameters. Sometimes, an application requires more memory to perform as desired, and no amount of software hacking will change that.
* Desired Outcome: Stability is more important than performance in the long run. If your tuning affects the stability, it's probably better to wisely choose your tuning parameters.
* Underlying issues : Sometimes, the issue could be an underlying issue with the host operating system. Before tuning the JVM, ensure that the JVM's platform is working as expected.
* Memory leaks: If you find yourself using Garbage Collection (GC) tuning parameters, there are likely memory leaks that need to get fixed in the application code.
**Cost** : Sometimes, improving the hardware running your code can improve an application's performance. That might seem like a "cheat" but consider how much time you're willing to spend tuning the JVM parameters. Sometimes, an application requires more memory to perform as desired, and no amount of software hacking will change that.
**Desired Outcome**: Stability is more important than performance in the long run. If your tuning affects the stability, it's probably better to wisely choose your tuning parameters.
**Underlying issues** : Sometimes, the issue could be an underlying issue with the host operating system. Before tuning the JVM, ensure that the JVM's platform is working as expected.
**Memory leaks**: If you find yourself using Garbage Collection (GC) tuning parameters, there are likely memory leaks that need to get fixed in the application code.
### Types of JVM Parameters
JVM parameters are grouped under three categories: Standard options, Non-standard, and Advanced.
#### Standard options
All JVM implementations support standard options. Run the 'java' command in a terminal to see a list of standard options.
```
$ java
Usage: java [options] <mainclass> [args...]
        (to execute a class)
   or  java [options] -jar <jarfile> [args...]
        (to execute a jar file)
 where options include:
        -cp <class search path of directories and zip/jar files>
        -classpath <class search path of directories and zip/jar files>
        --class-path <class search path of directories and zip/jar files>
                A : separated list of directories, JAR archives,
                and ZIP archives to search for class files.
        --enable-preview
                allow classes to depend on preview features of this release
To specify an argument for a long option, you can use --<name>=<value> or--<name> <value>.
```
These are all standard options included with any JVM, and you can safely use them as you use any [command-line option][5]. For example, to validate command options for configuration, and create a VM and load a main class without executing the main class, use:
```
$ java --dry-run <classfile>
```
#### Non-standard options
Non-standard options start with `-X`. These are for general purpose use and are specific to a particular implementation of JVM. To list these options:
```
$ java -X-Xbatch disable background compilation-Xbootclasspath/a:<directories and zip/jar files separated by :>
append to end of bootstrap class path-Xinternalversion
displays more detailed JVM version information than the-version option-Xloggc:<file> log GC status to a file with time stamps[...]
```
These extra options are subject to change without notice and are not supported by all JVM implementations.
A JVM built by Microsoft may have different options than one built by Red Hat, and so on.
To get detailed JVM version information, use the following option:
```
$ java -Xinternalversion --version
OpenJDK 64-Bit Server VM (11.0.13+8) for linux-amd64 JRE (11.0.13+8), built on Nov 8 2021 00:00:00 by "mockbuild" with gcc 11.2.1 20210728 (Red Hat 11.2.1-1)
```
To get the property setting use:
```
$ java -XshowSettings:properties --version
```
#### Advanced options
These options are not for casual use and are used for tuning the specific areas of the Hotspot VM. These options are subject to change, and there is no guarantee that all JVM implementations will support it.
These options start with -XX. To list these options, use the following command:
```
$ java -XX:+UnlockDiagnosticVMOptions -XX:+PrintFlagsFinal -version
```
For example, to trace the class loading then use the below command:
```
$ java -XX:+TraceClassLoading Hello
```
The Hello.java has:
```
$ cat Hello. javapublic class Hello {
  public static void main(String[] args) {
    System.out.println("Inside Hello World!");
  }}
```
Another common problem you might face is OOM (Out Of Memory) errors, which can happen without much debug information. To solve such a problem, you might use the debug option -XX:+HeapDumpOnOutOfMemoryError, which creates a .hprof file with debug information.
```
$ cat TestClass. java
import java.util.ArrayList;
import java.util.List;
public class TestClass {
public static void main(String[] args) {
List<Object> list = new ArrayList<Object>();
for (int i = 0; i < 1000; i++) {
list.add(new char[1000000]);
}
}
}
$ Javac TestClass.java
$ java -XX:+HeapDumpOnOutOfMemoryError -Xms10m -Xmx1g TestClass
java.lang.OutOfMemoryError: java heap space
Dumping heap to java_pid444496.hprof ...
Heap dump file created [1018925828 bytes in 1.442 secs]
Exception in thread "main" java.lang.OutOfMemoryError: java heap space
at TestClass.main(TestClass.Java:8)
```
[There are tools][6] to look at this .hprof file to understand what went wrong.
### Conclusion
By understanding and using JVM and JVM parameters, both developers and end users can diagnose failures and improve the performance of a Java application. The next time you're working with Java, take a moment to look at the options available to you.
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/4/jvm-parameters-java-developers
作者:[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/lenovo-thinkpad-laptop-window-focus.png
[2]: https://opensource.com/sites/default/files/2022-03/java-jvm-parameters.jpg
[3]: https://opensource.com/sites/default/files/2022-03/jdk.jpg
[4]: https://opensource.com/%5Bhttps%3A//opensource.com/article/22/3/manage-java-versions-sdkman%5D%28https%3A//opensource.com/article/22/3/manage-java-versions-sdkman%29
[5]: https://opensource.com/%5Bhttps%3A//opensource.com/article/21/8/linux-terminal%5D%28https%3A//opensource.com/article/21/8/linux-terminal%29
[6]: https://opensource.com/%5Bhttps%3A//docs.oracle.com/javase/7/docs/technotes/tools/share/jhat.html%5D%28https%3A//docs.oracle.com/javase/7/docs/technotes/tools/share/jhat.html%29

View File

@ -1,176 +0,0 @@
[#]: subject: "Difference Between Ubuntu 22.04 and Ubuntu 20.04 LTS"
[#]: via: "https://www.debugpoint.com/2022/04/difference-ubuntu-22-04-20-04/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Difference Between Ubuntu 22.04 and Ubuntu 20.04 LTS
======
A LIST OF 10 SIGNIFICANT FEATURE DIFFERENCES BETWEEN UBUNTU 20.04 AND
UBUNTU 22.04 LTS FOR FOLKS TRANSITIONING FROM LTS TO LTS.
If you are a [Ubuntu 20.04 LTS Focal Fossa][1] user and plan to upgrade or install the latest [Ubuntu 22.04 LTS “Jammy Jellyfish”][2], this guide is for you. The primary aspect is there are significant and structural changes between these two LTS versions which is somewhat rare in terms of LTS releases. In one go, a lot changed if you compare both the LTS releases.
So, with that in mind, in this guide, we give you ten pointers that address the fundamental changes from an average user perspective and give you a heads up before you try the new Jammy Jellyfish.
### Ubuntu 22.04 LTS vs Ubuntu 20.04 LTS Feature Difference
#### 1\. Logo, Colors and Plymouth
The first visual change that you notice is the base accent colour of Ubuntu changes to more “Orange” compared to two earlier “brown-orange”. Also, Canonical changed the Ubuntu official logo from this release onwards, and it is visible right from the Plymouth animation while booting. The new logo may look a little strange while you look at it for the first time, but it grows into you, eventually. I feel its a distinct logo in its way.
![New Ubuntu logo and Plymouth][3]
#### 2\. Installation
The default Ubuntu installer did not see any additional changes. We hoped that the new [Flutter based installer][4] would land, but it didnt. With that said, the steps to installation remain the same. The only difference you may notice is the accent colour and cosmetic changes on the dialogue boxes and controls. Functionality wise, there is no change in the installation steps.
![Colour differences between two LTS Versions][5]
#### 3\. Lock and Login Screen, Desktop First look and Wallpaper
Furthermore, the lock and login screen colour gradient changes with more fine and borderless controls for the password box. The apparent difference is the stunning Jammy Jellyfish default wallpaper when you first log in. The desktop “Home” shortcut is renamed as Home than that of your username, and the Trash shortcut now goes to the left dock with a separator in the new Ubuntu 22.04 LTS.
In addition to that, the top bar didnt change much. However, the system tray menu is little organised with more spacing and separators. There are mainly the changes coming from the [GNOME 42][6] changes.
The Calendar menu remained almost the same between both the LTS versions.
![Ubuntu 20.04 Vs Ubuntu 22.04 Login Screen][7]
![Ubuntu 20.04 Vs Ubuntu 22.04 Lock Screen][8]
![Difference between Ubuntu 20.04 and Ubuntu 22.04 default look][9]
#### 4\. Desktop Layouts and GNOME Version Upgrades
The significant difference that users would see visually is the GNOME version change GNOME 3.36 vs the GNOME 42. This is the significant difference that all users migrating to current LTS would face. The Ubuntu 22.04 LTS with GNOME 42 brings a horizontal workspace view alongside the horizontal application view. So, it would be a little weird to feel first time migrating from vertical to horizontal gestures. But you get used to it within a day or two.
If you use touch-based Laptops or screens, then the GNOME 42 gestures would give you some fluid feel with a bit of learning. Heres how the desktop, applications and workspace view looks side by side.
![Activities View Difference Ubuntu 20.04 and 22.04][10]
![Application View Difference Ubuntu 20.04 and 22.04][11]
#### 5\. New Appearance Style with Accent Color
Moreover, one particular change which I would like to highlight here is new settings for light and dark modes. Earlier Ubuntu had three options for desktop looks light, dark and a mixed one Standard. This is completely changed and replaced by the GNOME 42s built-in light and dark mode. In addition to that, a new Accent colour option is introduced (which is not part of vanilla GNOME 42) that enables you to change the colour across the desktop based on a selection of palettes.
However, you can not choose the custom accent colour yet, like KDE Plasma 🥰. Most of these changes come with the recent libadwaita and GTK4 port of GNOME Shell and native applications.
When you apply the dark mode in Ubuntu 22.04 it applies automatically to all the supported applications. This is one of the fundamental differences with the Ubuntu 20.04 LTS.
![Accent Color and other changes][12]
![How Accent colour change impact looks in Ubuntu 22.04 LTS][13]
#### 6\. File Manager
The Files file manager version changes from 3.36.x to 42 in this release. The difference you see is the more compact design, well-defined spacing between controls and texts, and the top bar widgets style, thanks to GTK4 and underlying bug fixes. The address bar in Files is a little different, with a separator between directories, and the hamburger menu is at the end. Although, these minor changes would not impact much, and you may not feel much difference between the two LTS releases.
![Files Difference Ubuntu 20.04 vs 22.04][14]
#### 7\. Screenshot Workflow difference between Ubuntu 22.04 and 20.04
Another notable change that requires a little learning for migrating users is how screenshots are captured. It changes completely. Earlier, you hit print-screen from the keyboard to take a screenshot and save the image file automatically in your Pictures folder. The workflow is different now with GNOME 42s built-in screenshot and screen-recorder tool.
[][15]
SEE ALSO:   Ubuntu Budgie 22.04 LTS - New Features and Release Details
So, when you try to take a screenshot in Ubuntu 22.04 LTS, you see a screen below which gives you all the options, such as a screenshot of an area, an entire desktop or a specific window. Moreover, you have the option to show the cursor in a screenshot or want to record the screen. And when you hit the capture button, the tool saves the image file in the Pictures folder and in your clipboard.
![New Screenshot tool in Ubuntu 22.04 LTS][16]
Overall, an additional step change for your earlier workflow.
You get a new context menu, “Take a screenshot”, on the top bar right-click menu of all the application windows.
![Take Screenshot option in top bar menu][17]
#### 8\. Firefox Web Browser as Snap in Ubuntu 22.04
In addition to the above changes, the Firefox is now a snap version in Ubuntu 22.04 LTS if you compare it with the prior LTS version. The Firefox 97 in Ubuntu 20.04 was a deb package. So, if you are an average user, you may not see much difference.
However, Firefox Snap runs in a sandbox mode, which means users may face trouble while installing GNOME Extensions and may feel slow performance due to Snap in the same hardware used by Ubuntu 20.04 LTS.
I think it would be interesting to see how this significant snap migration of the most used applications of Ubuntu plays out in the coming days.
#### 9\. Difference in Settings Window between Ubuntu 22.04 and 20.04
Furthermore, a new panel is introduced in Settings, i.e. Multitasking. The Multitasking panel gives you options to tweak the hot corners and active screen edges. In addition to that, you can now specify the fixed number of workspace you want with the option to remove the empty workspace automatically. Other than that, if you use multiple displays, you have now options to show workspaces in the primary display or all displays.
![New Multitasking Panel in Settings][18]
#### 10\. Flavours and Application Updates
In addition to the above differences, the Software application changes bring different responsive looks and adapt to any form factor. The Software also brings a more different home page with the arrangement of applications as per categories and editor choice section.
Furthermore, the details page of any software shows essential information in a distinguishable manner with details such as total download size, ratings, safe marker and image carousels.
![GNOME Software Home page difference][19]
![GNOME Software Details page difference][20]
Finally, the under the hood differences between these two releases are spread across the packages, official desktop environment flavours and bug fixes. Heres a quick summary of important packages.
**20.04** | **22.04**
---|---
GCC 10.3 | GCC 11.2
Hplip 3.20.3 | Hplip 3.21.12
LibreOffice 6.4.7 | LibreOffice 7.3.2
[not introduced] | Pipewire 0.3.48
Python3 3.8.2 | Python3 3.10.1
Samba 4.13 | Samba 4.15
Systemd 245.4 | Systemd 249.11
### Summary
To conclude the difference between Ubuntu 20.04 LTS and Ubuntu 22.04, I am compelled to say; that it is one of the biggest LTS releases from Ubuntu in terms of visual and feature changes.
I hope this guide showing the difference between Ubuntu 20.04 LTS and Ubuntu 22.04 gives you and many users a starting point on what to expect on their journey of Ubuntu 22.04 LTS and beyond.
Cheers.
* * *
We bring the latest tech, software news and stuff that matters. Stay in touch via [Telegram][21], [Twitter][22], [YouTube][23], and [Facebook][24] and never miss an update!
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/2022/04/difference-ubuntu-22-04-20-04/
作者:[Arindam][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.debugpoint.com/author/admin1/
[b]: https://github.com/lujun9972
[1]: https://www.debugpoint.com/2021/08/ubuntu-20-04-3-release/
[2]: https://www.debugpoint.com/2022/01/ubuntu-22-04-lts/
[3]: https://www.debugpoint.com/wp-content/uploads/2022/01/New-Ubuntu-logo-and-playmouth.jpg
[4]: https://github.com/canonical/ubuntu-desktop-installer
[5]: https://www.debugpoint.com/wp-content/uploads/2022/04/Colour-differences-between-two-LTS-Versions.jpg
[6]: https://www.debugpoint.com/2022/03/gnome-42-release/
[7]: https://www.debugpoint.com/wp-content/uploads/2022/04/Ubuntu-20.04-Vs-Ubuntu-22.04-Lock-and-Login-Screen-1024x431.jpg
[8]: https://www.debugpoint.com/wp-content/uploads/2022/04/Ubuntu-20.04-Vs-Ubuntu-22.04-Lock-Screen-1024x408.jpg
[9]: https://www.debugpoint.com/wp-content/uploads/2022/04/Difference-between-Ubuntu-20.04-and-Ubuntu-22.04-default-look-1024x421.jpg
[10]: https://www.debugpoint.com/wp-content/uploads/2022/04/Activities-View-Difference-Ubuntu-20.04-and-22.04-1024x425.jpg
[11]: https://www.debugpoint.com/wp-content/uploads/2022/04/Application-View-Difference-Ubuntu-20.04-and-22.04-1024x420.jpg
[12]: https://www.debugpoint.com/wp-content/uploads/2022/04/Accent-Color-and-other-changes-1024x417.jpg
[13]: https://www.debugpoint.com/wp-content/uploads/2022/04/How-Accent-colour-change-impact-looks-in-Ubuntu-22.04-LTS.jpg
[14]: https://www.debugpoint.com/wp-content/uploads/2022/04/Files-Difference-Ubuntu-20.04-vs-22.04-1024x359.jpg
[15]: https://www.debugpoint.com/2022/04/ubuntu-budgie-22-04-lts/
[16]: https://www.debugpoint.com/wp-content/uploads/2022/04/New-Screenshot-tool-in-Ubuntu-22.04-LTS.jpg
[17]: https://www.debugpoint.com/wp-content/uploads/2022/04/Take-Screenshot-option-in-top-bar-menu.jpg
[18]: https://www.debugpoint.com/wp-content/uploads/2022/04/New-Multitasking-Panel-in-Settings.jpg
[19]: https://www.debugpoint.com/wp-content/uploads/2022/04/GNOME-Software-Home-page-difference-1024x416.jpg
[20]: https://www.debugpoint.com/wp-content/uploads/2022/04/GNOME-Software-Details-page-difference-1024x417.jpg
[21]: https://t.me/debugpoint
[22]: https://twitter.com/DebugPoint
[23]: https://www.youtube.com/c/debugpoint?sub_confirmation=1
[24]: https://facebook.com/DebugPoint

View File

@ -1,42 +0,0 @@
[#]: subject: "Bloomberg Open Sources Memray, A Python Memory Profiler"
[#]: via: "https://www.opensourceforu.com/2022/04/bloomberg-open-sources-memray-a-python-memory-profiler/"
[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Bloomberg Open Sources Memray, A Python Memory Profiler
======
![soft][1]
Memray is a memory profiler that was developed at Bloomberg and is now open source. It can track memory allocations in Python code, including native extensions and the Python interpreter itself. Memory profiling is a strong tool for understanding how a program utilises memory and, as a result, detecting memory leaks or determining which areas of the program consume the most memory.
In contrast to sampling memory profilers like py-spy, Memray can track every function call, including calls into C/C++ libraries, and display the call stack in detail. Bloomberg claims that this does not come at the sacrifice of performance, with profiling only slowing down interpreted code by a little amount. However, native code profiling is slower and must be enabled directly.
Memray may generate a variety of reports based on the acquired memory consumption data, including flame graphs, which are valuable for rapidly and precisely identifying the most common code-paths.
According to Yury Selivanov, co-founder and CEO of EgdeDB, the tool gives previously unavailable insights into Python applications. Memray can be used to execute and profile a Python application from the command line:
```python
$ python3 -m memray run -o output.bin my_script.py
$ python3 -m memray flamegraph output.bin
```
Alternatively, you can use pytest-memray to integrate Memray into your test suite. You can also profile all C/C++ calls with the —native command line option, or analyse memory allocation in real time while a programme is executing with the —live command line option. Memray can be installed with python3 -m pip install memray on a Linux x86/64 system.
--------------------------------------------------------------------------------
via: https://www.opensourceforu.com/2022/04/bloomberg-open-sources-memray-a-python-memory-profiler/
作者:[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/04/soft-1-696x363.jpg

View File

@ -1,167 +0,0 @@
[#]: subject: "Hands on With GNOMEs New Text Editor for Linux Users"
[#]: via: "https://itsfoss.com/gnome-text-editor/"
[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/"
[#]: collector: "lujun9972"
[#]: translator: "aREversez"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Hands on With GNOMEs New Text Editor for Linux Users
======
If you are a regular reader here on Its FOSS, you might have read about [GNOMEs plan to replace Gedit with their own text editor][1].
Yes, GNOME has a brand-new text editor and it is called, well, Text Editor.
While Gedit is still the default, this new editor has made an entry with the release of GNOME 42. I am using Ubuntu 22.04 and it is available to install from the repositories.
Not exactly a brand-new [feature of Ubuntu 22.04][2], this new editor is available to install in the latest Ubuntu LTS version and perhaps other distributions using GNOME 42.
Intrigued? Let me share my experience with this new editor and then Ill show you the installation steps.
### Experience with GNOME Text Editor
Built on top of the [controversial libadwaita][3], GNOME Text Editor follows the new design principles set by its development committee. It has a sleek, modern look with rounded corners.
Dont expect anything extraordinary here in terms of features. Its not a replacement of coding focused editors like [Atom or VS Code][4]. This also doesnt mean its as plain and simple as Windows Notepad.
Lets see what it has to offer.
#### Saved sessions
By default, GNOME Text Editor automatically opens the last opened files. This is a neat feature that lets you resume your work.
This behavior can be controlled by the Restore Session option under Preferences.
![][5]
You can also search and open the recently opened files. Clearing the history (as shown in the above image) will clear the recently accessed files.
#### Themes and in-built themes
Like new GNOME applications, it gives you three theming style to choose from: system theme, light theme and dark theme. If you have chosen system theme, the editor will automatically switch between light and dark theme based on the system theme (light or dark) in use.
![System theme option gnome text editor][6]
Apart from that, you can choose between eight available themes (available in dark and light variants) under the preference section.
![Theme options under preference][7]
You can see the changes immediately as you select the themes.
#### Changes and Unsaved file handling
Modified and unsaved files are prominently reflected while you work on them.
![Unsaved files are more prominently marked][8]
Youll obviously be warned if you try to close the editor with modified files.
![][9]
There is no automatic save options here. [Gedit has option for automatically saving files][10] without using any additional plugins.
#### No plugins
Speaking of plugins, there is no such system for the new text Editor yet. Gedit has a decent plugin ecosystems that helps in enhancing the capacity of the editor.
I dont have any concrete information if plugins will be allowed in this editor in the future or not.
#### Syntax highlighting
Syntax highlight is an integral part of text editors these days. GNOME Text Editor promptly highlights syntax for various programming language.
This is usually done based on the extension of the code file. However, I noticed that it also detects and highlights syntax for bash scripts and C/C++ programs even before saving the file.
![Bash scripts. C/C++ code are detected even without file extension][11]
#### Keyboard shortcuts
I love using keyboard shortcuts in my favorite applications. It makes things quicker.
The GNOME Text Editor supports plenty of keyboard shortcuts for all kind of actions. You can find the list of keyboard shortcuts under the hamburger menu (☰) or use the keyboard shortcut Ctrl+?.
![Keyboard shortcuts in GNOME Text Editor][12]
#### Search and replace
Text Editor has pretty decent find and replace feature. You can use set extra parameters like regex search, case-sensitive search or match exact words.
![search replace gnome text editor][13]
#### More features
There are several other features that you may find in Gedit:
* Spell check
* Line numbers
* Automatic indentation
* Space/tab indentation
* Change case
* Text wrapping
#### What it doesnt do?
It is essentially a text editor, so you cannot open doc files in it and thats by design. If you open a doc file, youll see gibberish. The same goes for PDF files.
![][14]
Also, it is not intended for hardcore coding. It cannot replace the likes of VS Code. It is okay for occasional code reading or shell scripting but it doesnt have the features like project folders or running the codes.
### Installing GNOME Text Editor
As stated earlier, it is available with GNOME 42, but not installed by default. In Ubuntu 22.04, it is available in the Universe repository and can be installed with the following command:
```
sudo apt install gnome-text-editor
```
It should be available in other distros with GNOME 42. Please [check the version of desktop environment][15] you are using.
Once installed, you can search and open it in the Activities area. The icon for the new editor is a refreshed version of the Gedit icon.
![][16]
### Conclusion
The good old [Gedit][17] has been a part of GNOME for a long time. There were lack of development a few years ago but the development has resumed again. However, the GNOME team is working on revamping their core applications for GTK 4 and libadwaita.
This new Text Editor looks like a reimplementation of the Gedit with similar interface and feature but a more fluid experience which is more consistent with the new GNOME design.
It wont surprise me that this new editor becomes the default text editor in the coming version of GNOME. It would be interesting to see if a plugin ecosystem is developed for the new editor or not.
--------------------------------------------------------------------------------
via: https://itsfoss.com/gnome-text-editor/
作者:[Abhishek Prakash][a]
选题:[lujun9972][b]
译者:[aREversez](https://github.com/aREversez)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/abhishek/
[b]: https://github.com/lujun9972
[1]: https://news.itsfoss.com/gnome-text-editor-to-replace-gedit/
[2]: https://itsfoss.com/ubuntu-22-04-release-features/
[3]: https://news.itsfoss.com/gnome-libadwaita-library/
[4]: https://itsfoss.com/visual-studio-code-vs-atom/
[5]: https://itsfoss.com/wp-content/uploads/2022/04/restore-session-option-gnome-text-editor-1.png
[6]: https://itsfoss.com/wp-content/uploads/2022/04/system-theme-option-gnome-text-editor-800x560.png
[7]: https://itsfoss.com/wp-content/uploads/2022/04/theme-options-gnome-text-editor.png
[8]: https://itsfoss.com/wp-content/uploads/2022/04/unsaved-file-gnome-text-editor-800x481.png
[9]: https://itsfoss.com/wp-content/uploads/2022/04/save-prompt-gnome-text-editor.png
[10]: https://itsfoss.com/how-to-enable-auto-save-feature-in-gedit/
[11]: https://itsfoss.com/wp-content/uploads/2022/04/syntax-highlight-gnome-text-editor.png
[12]: https://itsfoss.com/wp-content/uploads/2022/04/keyboard-shortcuts-gnome-text-editor-800x637.png
[13]: https://itsfoss.com/wp-content/uploads/2022/04/search-replace-gnome-text-editor-800x477.png
[14]: https://itsfoss.com/wp-content/uploads/2022/04/doc-in-gnome-text-editor-800x485.png
[15]: https://itsfoss.com/find-desktop-environment/
[16]: https://itsfoss.com/wp-content/uploads/2022/04/new-gnome-text-editor.png
[17]: https://wiki.gnome.org/Apps/Gedit

View File

@ -1,230 +0,0 @@
[#]: subject: "How to Remove Snap Packages in Ubuntu Linux"
[#]: via: "https://www.debugpoint.com/2022/04/remove-snap-ubuntu/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
How to Remove Snap Packages in Ubuntu Linux
======
A TUTORIAL ON HOW TO REMOVE SNAP FROM UBUNTU LINUX AND GETTING A
SNAP-FREE SYSTEM.
Snap packages developed by Canonical are beneficial for several use cases. It provides an easy and faster update of applications directly to the end-users. Not only that, it has several other benefits, such as it comes with all dependencies packaged and allows multiple installations of the same applications. Furthermore, it runs in a sandbox mode providing security and other benefits.
Among all these benefits, there are other debatable drawbacks of Snap tech. FOr example, almost every user who used Snap reported its slower performance, including its startup time compared to native deb or RPM packages. In addition, due to its design, the application installation size is huge and costs disk space because it packages all the dependencies.
Not only that, due to its sandbox nature, the Snap apps may not access several areas of your Linux desktop until managed with proper permission.
This guide explains how you can remove the snap from the Ubuntu system altogether.
These steps are tested in [Ubuntu 22.04 LTS Jammy Jellyfish][1]. However, it should work for all applicable Ubuntu versions.
Warning: These steps will remove Software and Firefox, the two critical applications in your Ubuntu system. Make sure you take backups of bookmarks and other Firefox settings before trying these steps.
### Remove Snap Packages in Ubuntu Linux
1. Open a terminal and view the list of Snap packages installed in your system using the below command. It shows the snap packages such as Firefox, Software store, themes and other core packages installed by default.
```
snap list
```
![Snap list in Ubuntu][2]
2. Remove snap packages in the following order. Firstly remove Firefox. Secondly, snap-store and the other packages that you see in the above command output in your system.
```
sudo snap remove --purge firefox
sudo snap remove --purge snap-store
sudo snap remove --purge gnome-3-38-2004
```
```
sudo snap remove --purge gtk-common-themes
sudo snap remove --purge snapd-desktop-integration
sudo snap remove --purge bare
sudo snap remove --purge core20
sudo snap remove --purge snapd
```
3. Finally, remove the snap daemon via apt command.
```
sudo apt remove --autoremove snapd
```
![remove snap and others][3]
Thats not all. Even if you removed the snaps using the above command, the sudo apt update command again brings back the snap if you dont stop the apt trigger.
4. So, to stop that, we need to create an apt preference file in **/etc/apt/preferences.d/** and create a new preference file to stop snap. Create a new file called **nosnap.pref** in /etc/apt/preferences.d/
```
sudo gedit /etc/apt/preferences.d/nosnap.pref
```
5. And add the following lines, then save the file.
```
Package: snapd
Pin: release a=*
Pin-Priority: -10
```
![create a pref file][4]
_The apt preference is a potent tool if you know how to use it. For example, in the above statements, the Pin-Priority -10 means preventing a package from installation._
_Unrelated to this tutorial, for example, if you want to give super high priority to all the packages from distribution code name=bullseye, then one may see these preferences. If you want to learn more, you can visit the [apt man pages][5]._
```
Package: *
Pin: release n=bullseye
Pin-Priority: 900
```
6. Coming back to the topic, once you save and close the above file, run the below again from the terminal.
```
sudo apt update
```
7. Finally, the steps are complete for getting rid of the snap from Ubuntu.
[][6]
SEE ALSO:   How to Install and Use Snap Packages in Ubuntu
### Installing Software and Firefox as deb files after removing Snap from Ubuntu
You removed Firefox and Sofware applications, so you need those for your work.
To install the apt version of the Gnome Software, you can use the following command. Make sure you use the install-suggests. Otherwise, it will install the snap version again!
```
sudo apt install --install-suggests gnome-software
```
And to install firefox, use the official PPA via the below commands.
```
sudo add-apt-repository ppa:mozillateam/ppa
sudo apt update
sudo apt install -t 'o=LP-PPA-mozillateam' firefox
```
![Add the PPA][7]
![Install Firefox as deb file from PPA][8]
Once you have installed the Firefox, enable the automatic update using the below commands. To learn more, [visit thi][9][s page][9].
```
mozillateam:${distro_codename}";' | sudo tee /etc/apt/apt.conf.d/51unattended-upgrades-firefox
```
Last but not the least, create another preference file for Firefox to give super high priority to the above PPA while running apt. If you dont do this, the apt update command again pulls back firefox snap and brings over its “snap friends” 😂😂😂.
```
sudo gedit /etc/apt/preferences.d/mozillateamppa
```
Finally, add these lines and save the file.
```
Package: firefox*
Pin: release o=LP-PPA-mozillateam
Pin-Priority: 501
```
Thats it.
### Revert back to Snap in Ubuntu
If you change your mind, remove the preference file and install the applications again using the below set of commands.
```
sudo rm /etc/apt/preferences.d/nosnap.pref
sudo apt update && sudo apt upgrade
sudo snap install snap-store
sudo apt install firefox
```
### Closing Notes
Wrapping up the tutorial on removing snap in Ubuntu, I would say these are unnecessary efforts to get rid of Snap completely. Mainly these are difficult for new users. I hope this guide helps you to get rid of snap. Cheers.
* * *
We bring the latest tech, software news and stuff that matters. Stay in touch via [Telegram][10], [Twitter][11], [YouTube][12], and [Facebook][13] and never miss an update!
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/2022/04/remove-snap-ubuntu/
作者:[Arindam][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.debugpoint.com/author/admin1/
[b]: https://github.com/lujun9972
[1]: https://www.debugpoint.com/2022/01/ubuntu-22-04-lts/
[2]: https://www.debugpoint.com/wp-content/uploads/2022/04/Snap-list-in-Ubuntu.jpg
[3]: https://www.debugpoint.com/wp-content/uploads/2022/04/remove-snap-and-others-1024x544.jpg
[4]: https://www.debugpoint.com/wp-content/uploads/2022/04/create-a-pref-file.jpg
[5]: https://manpages.ubuntu.com/manpages/focal/man5/apt_preferences.5.html
[6]: https://www.debugpoint.com/2016/07/how-to-install-and-use-snap-packages-in-ubuntu/
[7]: https://www.debugpoint.com/wp-content/uploads/2022/04/Add-the-PPA-1024x550.jpg
[8]: https://www.debugpoint.com/wp-content/uploads/2022/04/Install-Firefox-as-deb-file-from-PPA-1024x548.jpg
[9]: https://www.debugpoint.com/2021/09/remove-firefox-snap-ubuntu/
[10]: https://t.me/debugpoint
[11]: https://twitter.com/DebugPoint
[12]: https://www.youtube.com/c/debugpoint?sub_confirmation=1
[13]: https://facebook.com/DebugPoint

View File

@ -1,168 +0,0 @@
[#]: subject: "How to Install h.264 decoder on Ubuntu Linux"
[#]: via: "https://itsfoss.com/install-h-264-decoder-ubuntu/"
[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
How to Install h.264 decoder on Ubuntu Linux
======
When you start using a [fresh installed Ubuntu system][1] and try to open an MP4 file to play videos, it may show you an error that reads:
_**H.264 (High Profile) decoder is required to play the file, but is not installed.**_
![Ubuntus default video player shows error while playing certain media files][2]
You can perhaps guess whats going on here. Your system doesnt have the required media codecs installed and hence the video player cannot play that video file.
So, whats the solution here? You install the required codec. But how?
Ill discuss three ways about fixing this issue:
1. Install just the required codec: It could work for the given file but some other video files will still complain about missing codecs.
2. Install a wide variety of multimedia codecs at once: It installs codecs as well as some other packages that you might not need like Microsoft Fonts.
3. Install a different video player: Applications like VLC and MPV have better support for codecs by default. You dont need to install them separately for most common video files.
If you take my advice, I suggest going for the second as well as the third method. Why? Youll see in a moment.
### Getting h264 decoder in Ubuntu Linux
I am using Ubuntu Linux here. The first and the third methods should work for other distributions but not the second one as the package mentioned is (usually) exclusive to Ubuntu.
#### Method 1: Install only the required codec (not recommended)
When you see the error, it gives you the option to “Find in Ubuntu Software”. Clicking on that option opens the Software Center and it may (or may not) show some packages that will install the h264 decoder on your system.
![Packages that may offer h264 decoder in Ubuntu software center][3]
The package names may sound similar but you need the GStreamer Multimedia Codecs from the “bad” set. Check the description of the packages.
Alternatively, you can install the package in the terminal using this command:
```
sudo apt install gstreamer1.0-plugins-bad
```
If you are new to the terminal, please note that it will ask for your account password. **Nothing is displayed on the screen while you type the password**. Thats the Linux way. You type the password blindly and press enter.
Once this package is installed, open the file again and see if it works now.
It may work for you but the story doesnt end here. You may have other video files that require some other h264 decoder or some other decoder.
![You may still have trouble with other video decoders][4]
You can try and install more decoders like this:
```
sudo apt install libavcodec-extra gstreamer1.0-plugins-ugly gstreamer1.0-libav
```
However, there is a much more [convenient way of installing media codecs in Ubuntu][5] and Ill show it to you in the next section.
#### Method 2: Install all multimedia codecs (recommended)
Ubuntu provides a meta-package named ubuntu-restricted-extras that consists of most of the common audio and video codecs along with some other packages like the Microsoft fonts.
Install this package and you wont have to worry about the media codecs anymore.
Open the terminal in Ubuntu and type the following command:
```
sudo apt install ubuntu-restricted-extras
```
Since this meta-package contains software from Microsoft, youll have to accept the End User License Agreement (EULA).
![Press tab and hit enter to accept EULA][6]
The next screen may look like the one below. Just press tab and it will highlight the options. When the correct options are highlighted, press enter to confirm your selection.
![Press tab and when it highlights the correct option, press enter to confirm][7]
With the multimedia codecs installed, you should be able to play (almost) all kinds of media files. Your music player can play MP3 files and your video player should be able to play MP4, MKV, and whatnot.
However, this too is not the end of the story, at least for some people.
Why do I say that? Because I have noticed that the default video player in Ubuntu, Totem, often struggles while playing certain kinds of video files. Youll notice that suddenly your system heats up, the fans start blowing and your mouse cursor stop functioning smoothly.
Why? Because Totem is struggling in decoding the video and taking too much processing power.
You can test it by running the top command while playing the video. Look for the process named totem (thats the name of the default video player).
![Ubuntus default video player, Totem, may consume more than necessary CPU power][8]
What can you do now? Your trouble seems to be never ending. Fret not. There are [better video players in Linux][9] and they will help you solve the issue.
#### Method 3: Install a better video player (recommended)
There are many good video players in Linux. I find them better than the default Totem video player.
Personally, I prefer two of the lot: [VLC][10] and [MPV][11].
VLC is a versatile and hugely popular video player. Chances are that you have already used VLC.
MPV Media Player is not that popular but this lightweight application is quite good for playing video files.
Both VLC and MPV players are good at handling media codecs. You dont even need to install media codecs separately with them. Just [install VLC][12] or MPV and you should be able to play various kinds of video files.
Either look for it in the software center:
![MPV player is available in Ubuntu software center][13]
Or [install MPV on Ubuntu][14] using the command line:
```
sudo apt install mpv
```
Now that you have another video player, you should right click on the video files and choose to open with the new video player.
Alternatively, you can [make it the default application][15] for playing video files and use double clicks.
### Did it work for you?
I hope I didnt go into too much detail here. I wanted to explain the various methods and the pros and cons associated with each of them.
Did you manage to get rid of the h264 decoder problem in Ubuntu? Which method did you go for?
--------------------------------------------------------------------------------
via: https://itsfoss.com/install-h-264-decoder-ubuntu/
作者:[Abhishek Prakash][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/abhishek/
[b]: https://github.com/lujun9972
[1]: https://itsfoss.com/install-ubuntu/
[2]: https://itsfoss.com/wp-content/uploads/2022/04/h264-decoder-error-ubuntu-800x241.png
[3]: https://itsfoss.com/wp-content/uploads/2022/04/h264-decoder-ubuntu-software-center-800x532.png
[4]: https://itsfoss.com/wp-content/uploads/2022/04/ac3-decoder-missing-ubuntu-800x251.png
[5]: https://itsfoss.com/install-media-codecs-ubuntu/
[6]: https://itsfoss.com/wp-content/uploads/2020/02/installing_ubuntu_restricted_extras.jpg
[7]: https://itsfoss.com/wp-content/uploads/2020/02/installing_ubuntu_restricted_extras_1.jpg
[8]: https://itsfoss.com/wp-content/uploads/2022/04/totem-consuming-more-cpu-ubuntu-800x454.webp
[9]: https://itsfoss.com/video-players-linux/
[10]: https://www.videolan.org/vlc/
[11]: https://mpv.io/
[12]: https://itsfoss.com/install-latest-vlc/
[13]: https://itsfoss.com/wp-content/uploads/2022/04/mpv-player-ubuntu-software-center-800x346.png
[14]: https://itsfoss.com/mpv-video-player/
[15]: https://itsfoss.com/change-default-applications-ubuntu/

View File

@ -0,0 +1,47 @@
[#]: subject: "Data Profiler: An Open Source Machine Learning Technology For Data Monitoring"
[#]: via: "https://www.opensourceforu.com/2022/05/data-profiler-an-open-source-machine-learning-technology-for-data-monitoring/"
[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Data Profiler: An Open Source Machine Learning Technology For Data Monitoring
======
![Business Network concept, Social Network Concept, Profiling and human behavior analysis by artificial intelligence technology, Futuristic Technology background][1]
The amount of data that firms can manage has increased rapidly since moving to the cloud. This is why Capital One developed Data Profiler, an open source Python package that uses machine learning to assist users in monitoring huge data and detecting sensitive information. Data Profiler provides users with a pre-trained deep learning model for quick detection of sensitive information, as well as components for statistical analysis of the dataset and an API for creating data labelers.
He went on to say that the data labelers deep learning model analyses a datasets unstructured text and then determines what type of data is being represented in that particular dataset.
“Our library has a list of labels of which a subset is considered non-public personally identifiable pieces of information… the data labeler is able to use that deep learning model to identify where that exists in a dataset… and calls out where that exists to that user thats doing the analysis,” Goodsitt explained.
Customers can use Data Profiler in a variety of ways. The library can detect the schema, statistics, and entities from any data, whether it is structured, unstructured, or semi-structured. This flexibility allows models to be changed and allows many models to be run on the same dataset with only a few lines of code.
Goodsitt also talked about how this sensitive data detection methodology might be used to sanitise datasets on a mobile device so that when they leave the customers device, the specific personal information is deleted, guaranteeing that the data is safe no matter where it travels.
The key reasons for Capital Ones decision to open source Data Profiler, according to Nureen DSouza, leader of the Open-Source Program Office, are to promote cooperation with new talent, display the expertise of its data scientists, and give back to the open-source community.
“We can now have others in a similar field contribute to this project and make Data Profiler greater than it is today,” she said, “We thought it would be good to open source because it solves the problem that we are seeing, and we couldnt find another open source project that would.”
Goodsitt also emphasised the advantages of Data Profilers reader feature. This is a single command class that allows customers to point to various sorts of files or even a URL that hosts a dataset, and it will automatically identify and read that dataset for them.
Users can also use Data Profiler to parallelize, batch, or stream profile a dataset so that it does not have to be profiled all at once. This functionality was not easily discoverable before to this release, according to Goodsitt, unless you were doing your own statistical study. Since its debut in 2021, Data Profiler has received 54 forks on GitHub and over 700 stars, according to DSouza, demonstrating how highly this open-source tool is regarded by the community, with no signs of slowing down.
This open source solution will be showcased at PyCon 2022, the Python Conference, which will take place in Salt Lake City from April 27 to May 3. PyCon is returning in person after two years of being a virtual event, with various health and safety requirements in place.
--------------------------------------------------------------------------------
via: https://www.opensourceforu.com/2022/05/data-profiler-an-open-source-machine-learning-technology-for-data-monitoring/
作者:[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/Data-Profiling-1-696x464.jpeg

View File

@ -0,0 +1,66 @@
[#]: subject: "Automate and manage multiple devices with Remote Home Assistant"
[#]: via: "https://opensource.com/article/22/5/remote-home-assistant"
[#]: author: "Kevin Sonney https://opensource.com/users/ksonney"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Automate and manage multiple devices with Remote Home Assistant
======
Link together multiple Home Assistant devices with this centralized control panel.
![Houses in a row][1]
(Image by: [27707][2] via [Pixabay][3], CC0. Modified by Jen Wike Huger.)
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.
There are a lot of guides out there on [Setting Up Home Assistant][4], but what if you have multiple Home Assistant installations (like I do), and want to display and control them all from a single, central Home Assistant?
There is an amazing add-on called Remote Home Assistant ([https://github.com/custom-components/remote_homeassistant][5]) that makes this an absolute breeze. And it really helps me manage and automate things without having to set up any complex software (although I have done this with MQTT in the past — it was a challenge).
![Image of Remote Home Assistant][6]
(Image by: Kevin Sonney, CC BY-SA 40)
The easiest way to set up Remote Home Assistant is to install the [Home Assistant Community Store][7] (HACS) on both HASS installations. HACS is an absolutely massive collection of third-party add-ons for Home Assistant. The instructions are very straight forward, and cover most use cases — including using  Home Assistant OS (which is my central node), and Home Assistant Core (one of my remote nodes). It installs as a new Integration, so you can add it like any other integration. You must be able to log into GitHub for HACS to work, but HACS walks you through that as part of the configuration flow. After it's complete, it loads all the known add-on repositories. To see the status of it, click the new **HACS** option in the navigation menu on the left.
![Image of HACS Main Page][8]
(Image by: Kevin Sonney, CC BY-SA 40)
Select **Integrations** and search for **Remote Home Assistant** when it has completed loading all the store information. Install the add-on with the **Install** button, and restart Home Assistant. When the restart is complete, you have a new custom integration available, which can be added like any other.
On the remote node (“lizardhaus”), you need to [generate a long-lived token][9], and then add the **Remote Home Assistant** integration. Select **Setup as remote node** and that's all you need to do.
On the central node (“homeassistant”), the configuration flow is different. Add the integration as before, but do not create an access token. Select **Add a remote node** and click **Submit**. You are asked for the site name, the address (which can be a name or an IP address), the port, and the access token generated on the remote node. You can enable or disable SSL (and I STRONGLY recommend setting up SSL on the remote if it's exposed to the internet). After it connects, it prompts you for additional information, such as a prefix for the entities from the remote node (I like to include a trailing "_" character), what entities to fetch, and what to include and exclude. You can get events that can be triggered remotely, like turning on and off switches.
![Image of Remote Home Assistant Setup Step 2][10]
(Image by: Kevin Sonney, CC BY-SA 40)
After that, the remote items appear to home assistant like any other item. And you can control them in the same way, as long as you added the correct triggers and entities.
Remote Home Assistant is really useful if you have devices like Bluetooth Low Energy plant sensors that are too far away from the main HASS machine. You can place a Raspberry Pi with HassOS near the plants then use Remote Home Assistant to put them in your central dashboard, and get an alert when they need watering, and so on. Overall, linking together multiple Home Assistant configurations is surprisingly easy, and VERY helpful.
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/5/remote-home-assistant
作者:[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/house_home_colors_live_building.jpg
[2]: https://pixabay.com/en/users/27707-27707/
[3]: https://pixabay.com/en/buildings-houses-cliff-top-home-1008677/
[4]: https://opensource.com/article/20/12/home-assistant
[5]: https://github.com/custom-components/remote_homeassistant
[6]: https://opensource.com/sites/default/files/2022-04/CronyDay03-1.png
[7]: https://hacs.xyz
[8]: https://opensource.com/sites/default/files/2022-04/CronyDay03-2.png
[9]: https://www.atomicha.com/home-assistant-how-to-generate-long-lived-access-token-part-1/
[10]: https://opensource.com/sites/default/files/2022-04/CronyDay03-3_0.png

View File

@ -0,0 +1,223 @@
[#]: subject: "How I use the Bacula GUI for backup and recovery"
[#]: via: "https://opensource.com/article/22/5/baculum-open-source-backup"
[#]: author: "Rob Morrison https://opensource.com/users/robmorrison"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
How I use the Bacula GUI for backup and recovery
======
Baculum is an open source web application for using Bacula's range of backup and restore jobs.
![Text editor on a browser, in blue][1]
Today, when best practices for backup and recovery are more important than ever before, it's good to know that high-end fully open source enterprise backup solutions exist for even the largest organizations. Perhaps the most powerful open source solution in its class is Bacula, a highly scalable software for backup, recovery, and data verification. It is a mature yet still significantly developing project used by MSPs, defense organizations, ISVs, and e-commerce companies worldwide and runs on many different Linux flavors. Bacula has a thriving community, and many Linux enthusiasts use it to provide a strong level of data protection.
With the many severe disruptions that ransomware causes today, it's critical that the client system being backed up is never aware of storage targets and has no credentials for accessing them. This is true in Bacula's case, and in addition:
* Storage and Storage Deamon hosts are dedicated systems, strictly secured, allowing only Bacula-related traffic and admin access and nothing else.
* Bacula's "Director" (core management module) is a dedicated system with the same restrictive access.
Bacula has plenty of additional configuration options to tune backups to user needs. It functions in networks and can back up both remote and local hosts. For first-time users, it can look complex, but fortunately, the Bacula Project also provides the [Baculum][2] web interface to ease administration. Many Linux users are more than happy to rely on Bacula's command-line interface to exploit its considerable range of capabilities, but sometimes it's good to have an effective GUI, too. That's where the open source Baculum comes in.
### Baculum
Baculum's installation process is reasonably simple because its repositories provide binary packages for popular Linux distributions. After installation, you have access to two wizards:
* The Baculum API - a REST API component for working with Bacula data.
* The Baculum Web component - the web interface itself.
The Baculum API is installed on hosts with Bacula components which you manage from the web interface level. Baculum Web is usually one instance that connects all Baculum API hosts and makes it possible to manage all of them. This architecture fits well with the Bacula network architecture because you can manage all Bacula hosts from one interface. It's important to know that the web interface does not store any Bacula-specific configuration from any host but manages them by sending API requests instead. When you modify the interface or run Bacula actions, they are done in real-time. When you click on the save configuration button, the modification is done simultaneously on the targeted hosts.
Below is a sample Bacula and Baculum topology.
![Baculum API][3]
One disadvantage of this approach is that you need to install one Baculum API instance on each Bacula host that you want to manage. If there are many servers to back up, it is possible to automate the installation process using an application-deployment tool like Ansible.
In my case, I have a much simpler topology with only one host managed by Baculum. My topology looks like the one below.
![Baculum web interface topology][4]
You can decide what Bacula resources to share on each Baculum API host. You can set the API hosts to do configuration work, access the Bacula catalog database, run Bacula console commands, or any combination.
After installing the web interface in the Bacula environment, you see a dashboard page like this:
![Baculum dashboard][5]
### Create a backup job
To define a new backup job, go to the job page to see some wizards for creating backup, copy, or migrate jobs using a custom job form. For this demonstration, I chose the **backup job**, which displays the first wizard step:
![New backup job wizard][6]
First, type the new job name and optional description. In the second step, decide what to backup. For this example, I chose a Bacula client and FileSet, which defines the paths to be backed up. Usually, in this window, there aren't any FileSet options to choose from yet, but you can create one with the **Add new fileset** button in the wizard. To define paths, I decided to browse the client filesystem and select paths in the drag and drop browser, as in the image below.
![Select file set][7]
Once the FileSet is ready, the next step is to select where to save the backed-up data for this job. Select a storage location and a volume pool.
![select storage and pool][8]
As with FileSets, you have an option to create a new pool. In this example, I chose an existing volume pool.
In the next step are job-specific options like choosing the job level (full, incremental, differential, etc.), job priority, and a few other settings.
![select job objectives][9]
On the next wizard page, specify when to run this backup job. Backups are usually run periodically, and here you can choose a schedule for this job. If you don't have a schedule, you can create it in this interface:
![Define a schedule][10]
The last wizard step is just a summary of all values selected in the previous steps.
![job summary][11]
Review all the values, and if they look correct, create the new job.
### Run the backup
OK, you have a new backup job. To run the initial backup, you may choose to start it manually using the **Run job** button. There is a useful capability in the **Run job** window to estimate a job before running it. Run this estimation to know in advance how many files and how many bytes will be backed up by this job.
![manually run the job][12]
After running the job, you move to a job view page where you can see backup progress from the client's perspective.
![Job page][13]
You can track job status from three places on the interface:
* The Bacula client (shown above).
* The Bacula director component side.
* The storage daemon perspective.
Here you can see the job progress on the director and storage daemon side:
![job progress][14]
![job progress][15]
The backup job completes.
### Restore data
Of course, you must be able to restore the backed-up data. Baculum provides a **Restore wizard** in the primary sidebar menu. After opening it, you see a backup client selection to which you can restore the data.
![Restore job wizard][16]
Select the client and go to the second step. Here you see all backups from that client. Your backup is at the top, so it is easy to choose. However, if you want to find a past backup, search the backups data grid. There is also an option to find a backup by filename, with or without a path.
![Select backup job][17]
Select the backup and go to file selection on the third restore wizard step. Here, in the file browser, choose directories and files to restore. The browser also has an area to select a specific file version if it exists in other backups.
![Select files to restore][18]
The next wizard step defines the destination where the restore will save the data. By default, the client from which the backup originates is selected, but you can change that to restore to a different host than the original. You can also define an absolute path on the client to restore the data. The media required to complete this restore is displayed. This is very useful for a backup tape device operator to prepare for the restore job. Personally, I use disk media, and my volumes are available for the storage daemon all the time.
![Select restore destination][19]
The next step offers the restore options, such as replacing a policy for existing files on the filesystem or file relocation fields. I keep them untouched and go to the summary step before running the restore.
![Restore job summary][20]
In the restore job—just like in the backup job—you see the running restore job's progress. After completion, there is a summary of the entire process.
![Restore job summary details][21]
That's just about it. The backup and a restore are done. The process may be a little simpler with other tools, but Bacula offers Linux enthusiasts hundreds of very useful options. This limits how much you can simplify the interface, and most users of Bacula don't want that.
### Copy jobs
Besides doing traditional backup and restore jobs, Bacula also provides a few other job types. One of them is **Copy job**, which copies backups between storage devices from one pool of volumes to another. One storage device can be a disk, and another can be a tape or tape library. Copy job reads data from file volumes and sends it to tape devices for saving on magnetic tapes. Bacula users can configure a backup D2D2T strategy (disk-to-disk-to-tape). Source and destination storage can be of different types (disk and tape), but it works just as well when copying backup jobs between the same device types.
Baculum has full support for copy jobs, including configuring copy jobs and ending with restoring data directly from copy jobs. Configure a copy job using the copy job wizard visible in the image below.
![Copy job wizard][22]
After typing the new copy job name, choose the source storage and source volume pool. This is the storage that reads data when the copy job runs.
![Copy job source][23]
The third wizard step specifies how to copy jobs. In other words, you can define the selection criteria used for choosing the backups that will be copied. You can select backups by patterns like:
* Job name
* Client
* Volume
* Smallest volume in the pool
* Oldest volume in the pool
* SQL query
* Copy all uncopied jobs so far from the pool
In this example, I chose a selection by job name.
![Copy job selection][24]
Select the destination storage and pool in the next step. This storage writes backups to the destination pool when you run the copy job.
![Copy job destination][25]
In the penultimate step are a couple of options, such as the maximum number of spawned jobs. You can also set a schedule to run the copy job periodically.
![Copy job options][26]
After saving the wizard, run the copy job in the same place where you started the backup job. You can see the live updated job log output.
![Copy job history][27]
### Wrap up
Done! You have performed a backup job, restored a job, and created a copy job.
There are two Baculum functions that I think many folks will find useful.
First, its simple interface enables the user to administer Bacula from any mobile device. This can be crucial for cases when you are outside the office and somebody from the organization sends a text message like: "Hey! I accidentally deleted an important report file and need it urgently. Are you able to restore it to my computer?" You could do this restore using a mobile phone and the same wizard steps described above.
The second important function is its multi-user interface with several authentication methods (local user, basic authentication, LDAP, etc.). It enables company employees to use Baculum to backup and restore their own resources without requiring access to any other utilities. You can customize the role-based access control interface for each group of users.
Of course, these options are just the tip of the iceberg regarding Bacula's capabilities with Baculum. Baculum really is about being configurable. I hope you can enjoy its benefits and the empowerment it brings you to make your data safer and your life easier!
(Image by: Rob Morrison, CC BY-SA 4.0)
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/5/baculum-open-source-backup
作者:[Rob Morrison][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/robmorrison
[b]: https://github.com/lkxed
[1]: https://opensource.com/sites/default/files/lead-images/browser_blue_text_editor_web.png
[2]: https://baculum.app/
[3]: https://opensource.com/sites/default/files/2022-04/1baculumAPI.png
[4]: https://opensource.com/sites/default/files/2022-04/2baculumwebinterface.png
[5]: https://opensource.com/sites/default/files/2022-04/3dashboard.png
[6]: https://opensource.com/sites/default/files/2022-04/4newBUwizard.png
[7]: https://opensource.com/sites/default/files/2022-04/5FileSet.png
[8]: https://opensource.com/sites/default/files/2022-04/6storage-and-pool.png
[9]: https://opensource.com/sites/default/files/2022-04/7job-directives.png
[10]: https://opensource.com/sites/default/files/2022-04/8schedule.png
[11]: https://opensource.com/sites/default/files/2022-04/9summary.png
[12]: https://opensource.com/sites/default/files/2022-04/10runjob.png
[13]: https://opensource.com/sites/default/files/2022-04/11jobhistory.png
[14]: https://opensource.com/sites/default/files/2022-04/12job-from-daemon.png
[15]: https://opensource.com/sites/default/files/2022-04/13jobstoragedaemon.png
[16]: https://opensource.com/sites/default/files/2022-04/14restorewizard.png
[17]: https://opensource.com/sites/default/files/2022-04/15selectjobtorestore.png
[18]: https://opensource.com/sites/default/files/2022-04/16selectfilestorestore.png
[19]: https://opensource.com/sites/default/files/2022-04/17selectstoragedestination.png
[20]: https://opensource.com/sites/default/files/2022-04/18restoresummary.png
[21]: https://opensource.com/sites/default/files/2022-04/19restorehistory.png
[22]: https://opensource.com/sites/default/files/2022-04/20copyjobwizard.png
[23]: https://opensource.com/sites/default/files/2022-04/21copysource.png
[24]: https://opensource.com/sites/default/files/2022-04/22copy-files.png
[25]: https://opensource.com/sites/default/files/2022-04/23copydestination.png
[26]: https://opensource.com/sites/default/files/2022-04/24copyoptions.png
[27]: https://opensource.com/sites/default/files/2022-04/25copyhistory.png

View File

@ -0,0 +1,282 @@
[#]: subject: "PHP MySQL WHERE Clause"
[#]: via: "https://ostechnix.com/php-mysql-where-clause/"
[#]: author: "Sravan Kumar https://ostechnix.com/author/sravankumar/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
PHP MySQL WHERE Clause
======
How To Select And Filter Data From A MySQL Database Using PHP In XAMPP
In this guide, we will discuss how to select the records from a MySQL database based on specific conditions with the WHERE clause and the SELECT command using PHP in XAMPP stack.
### Prerequisites
Make sure you've created a database and table in XAMPP stack as described in the following guide.
* Create MySQL Database And Table Using PHP In XAMPP
For demonstration purpose, I've created a table named **"sales"** in a MySQL database called **"my_company"** with the below schema and records.
![Database Schema And Records][1]
### Filtering Data From MySQL Table With WHERE Clause Using PHP
The WHERE clause is used to extract only the records that matches a specific condition. The WHERE clause will check the condition by taking an operator followed by a value.
**WHERE Clause Syntax:**
```
SELECT column1,column2,.,column n from table_name WHERE column_name operator value;
```
Where,
* column_name - the column on which condition is applied.
* operator - It is used to check the condition.
* value - It is the string/numeric value compared with each and every column values present in the table.
```
column_name
```
```
operator
```
```
value
```
### Steps
**1.** Specify the servername (E.g. localhost), database username (E.g. `root` ), root user password and the database name (E.g. my_company). Here, my `root` user's password is empty.
**2.** Establish a connection using the `mysqli_connect()` function. It will take servername, username and password as parameters.
**Code:**
```
$connection = mysqli_connect($server_name, $user_name, $password, $database_name);
```
**3.** Specify the SQL Query to select a particular column or all columns' records from the table by a condition. In this step, we can specify the SQL query to select columns from the table into a variable.
For example, I am going to use the database name called **my_company** and I am storing it in a variable named **query**. The table name is **sales** that has three columns.
**Code:**
```
$query = "SELECT column1,…. from sales where column_name operator value";
```
**4.** Store the selected results into a variable called **"final"** using the `mysqli_query()` function. It will take "connection" and "query" as parameters.
**Code:**
```
mysqli_query($connection, $query);
```
**5.** Get the rows one by one from the "final" variable using the `mysqli_num_rows()` function. After that fetch the results by iterating through a **while** loop using `mysqli_fetch_assoc()` function. It will take the "`final` " variable as a parameter.
**Code:**
```
if (mysqli_num_rows($final) > 0) {
//get the output of each row
while($i = mysqli_fetch_assoc($final)) {
echo $i["column1”],…………..;
}
} else {
echo "No results";
}
```
**6.** Finally, close the connection by using the `mysqli_close()` function.
**Code:**
```
mysqli_close($connection);
```
Now, let us write a sample PHP code based on the above steps.
### PHP code To Select Data From MySQL Database Using WHERE Clause
**Example Code 1:**
In this example, we will select all columns from the "sales" table where the **id value is greater than 4** and display the result in a PHP page.
So our operator will be greater than (**">"**) and the value is **4** by specifying the **column_name** as **id**.
Create a new file named `select.php` under the `/htdocs` folder with the following contents in it.
**Heads Up:** If you use Linux, the **htdocs** folder will be under **/opt/lampp/** directory. If you're on Windows, the **htdocs** will be usually in **C:\xampp**\ folder.
```
<?php
//specify the server name and here it is localhost
$server_name = "localhost";
//specify the username - here it is root
$user_name = "root";
//specify the password - it is empty
$password = "";
//specify the database name - "my_company"
$database_name = "my_company";
// Creating the connection by specifying the connection details
$connection = mysqli_connect($server_name, $user_name, $password, $database_name);
//sql query to select particular columns
//select all columns such that id is greater than 4
$query = "SELECT * from sales where id>4";
#get the result
$final = mysqli_query($connection, $query);
if (mysqli_num_rows($final) > 0) {
//get the output of each row
while($i = mysqli_fetch_assoc($final)) {
//get all columns
echo "id: " . $i["id"]. " ----> name: " . $i["name"]." ----> count: " . $i["count"]. "<br>";
}
} else {
echo "No results";
}
//close the connection
mysqli_close($connection);
?>
```
Open your web browser and point it to **http://localhost/select.php** URL. You can see that data is selected where **id is greater than 4** and the result is displayed in the browser window.
![Select Data From MySQL Database Using WHERE Clause][2]
**Example Code 2:**
In this example, we will select all columns from the "sales" table with the name as "Eggs" and display the result in the PHP page.
So our operator will be equal to (**"="**) and the value is "Eggs" by specifying the `column_name` as **name**.
```
<?php
//specify the server name and here it is localhost
$server_name = "localhost";
//specify the username - here it is root
$user_name = "root";
//specify the password - it is empty
$password = "";
//specify the database name
$database_name = "my_company";
// Creating the connection by specifying the connection details
$connection = mysqli_connect($server_name, $user_name, $password, $database_name);
//sql query to select particular columns
//select all columns such that name equals to Eggs
$query = "SELECT * from sales where name ='Eggs'";
#get the result
$final = mysqli_query($connection, $query);
if (mysqli_num_rows($final) > 0) {
//get the output of each row
while($i = mysqli_fetch_assoc($final)) {
//get all columns
echo "id: " . $i["id"]. " ----> name: " . $i["name"]." ----> count: " . $i["count"]. "<br>";
}
} else {
echo "No results";
}
//close the connection
mysqli_close($connection);
?>
```
Open your web browser and point it to **http://localhost/select.php** URL. You can see that data is selected where name ='Eggs' and displayed.
![Select Columns That Contains The Name Eggs][3]
**Example Code 3:**
In this example, we will select all columns from the "sales" table with **count as 45** and display the result in the PHP page.
So our operator will be equal to (**"="**) and the value is 45 by specifying the column_name as **count**.
```
<?php
//specify the server name and here it is localhost
$server_name = "localhost";
//specify the username - here it is root
$user_name = "root";
//specify the password - it is empty
$password = "";
//specify the database name
$database_name = "my_company";
// Creating the connection by specifying the connection details
$connection = mysqli_connect($server_name, $user_name, $password, $database_name);
//sql query to select particular columns
//select all columns such that count is 45
$query = "SELECT * from sales where count =45";
#get the result
$final = mysqli_query($connection, $query);
if (mysqli_num_rows($final) > 0) {
//get the output of each row
while($i = mysqli_fetch_assoc($final)) {
//get all columns
echo "id: " . $i["id"]. " ----> name: " . $i["name"]." ----> count: " . $i["count"]. "<br>";
}
} else {
echo "No results";
}
//close the connection
mysqli_close($connection);
?>
```
Open your web browser and point it to **http://localhost/select.php** URL. You can see that data is selected where **count = 45** and the resulting column is displayed.
![Select Columns That Contains The Count 45][4]
### Conclusion
In this tutorial, we've discussed three different ways to select data from a MySQL database based on particular conditions using PHP with WHERE clause. The first example showed you how to filter the data by using the numeric value "id". The second and third examples explained how to select data by using the string value "name" and the numeric value "count" respectively.
--------------------------------------------------------------------------------
via: https://ostechnix.com/php-mysql-where-clause/
作者:[Sravan 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://ostechnix.com/author/sravankumar/
[b]: https://github.com/lkxed
[1]: https://ostechnix.com/wp-content/uploads/2022/05/Database-Schema-And-Records.png
[2]: https://ostechnix.com/wp-content/uploads/2022/05/Select-Data-From-MySQL-Database-Using-WHERE-Clause.png
[3]: https://ostechnix.com/wp-content/uploads/2022/05/Select-Columns-That-Contains-The-Name-Eggs.png
[4]: https://ostechnix.com/wp-content/uploads/2022/05/Select-Columns-That-Contains-The-Count-45.png

View File

@ -0,0 +1,321 @@
[#]: subject: "Boost the power of C with these open source libraries"
[#]: via: "https://opensource.com/article/22/5/libsoup-gobject-c"
[#]: author: "Joël Krähemann https://opensource.com/users/joel2001k"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Boost the power of C with these open source libraries
======
GObject and libsoup do a lot of work for you, so you can turn your attention to inventing amazing applications in C.
![Why and how to handle exceptions in Python Flask][1]
Image by: Image from Unsplash.com, Creative Commons Zero
The [GLib Object System (GObject)][2] is a library providing a flexible and extensible object-oriented framework for C. In this article, I demonstrate using the 2.4 version of the library.
The GObject libraries extend the ANSI C standard, with typedefs for common types such as:
* gchar: a character type
* guchar: an unsigned character type
* gunichar: a fixed 32 bit width unichar type
* gboolean: a boolean type
* gint8, gint16, gint32, gint64: 8, 16, 32, and 64 bit integers
* guint8, guint16, guint32, guint64: unsigned 8, 16, 32, and 64 bit integers
* gfloat: an IEEE Standard 754 single precision floating point number
* gdouble: an IEEE Standard 754 double precision floating point number
* gpointer: a generic pointer type
### Function pointers
GObject also introduces a type and object system with classes and interfaces. This is possible because the ANSI C language understands function pointers.
To declare a function pointer, you can do this:
```c
void (*my_callback)(gpointer data);
```
But first, you need to assign the `my_callback` variable:
```c
void my_callback_func(gpointer data)
{
  //do something
}
my_callback = my_callback_func;
```
The function pointer `my_callback` can be invoked like this:
```c
gpointer data;
data = g_malloc(512 * sizeof(gint16));
my_callback(data);
```
### Object classes
The GObject base class consists of 2 structs (`GObject` and `GObjectClass` ) which you inherit to implement your very own objects.
You embed GObject and GObjectClass as the first struct field:
```c
struct _MyObject
{
  GObject gobject;
  //your fields
};
struct _MyObjectClass
{
  GObjectClass gobject;
  //your class methods
};
GType my_object_get_type(void);
```
The objects implementation contains fields, which might be exposed as properties. GObject provides a solution to private fields, too. This is actually a struct in the C source file, instead of the header file. The class usually contains function pointers only.
An interface cant be derived from another interface and is implemented as following:
```c
struct _MyInterface
{
  GInterface ginterface;
  //your interface methods
};
```
Properties are accessed by `g_object_get()` and `g_object_set()` function calls. To get a property, you must provide the return location of the specific type. Its recommended that you initialize the return location first:
```c
gchar *str
str = NULL;
g_object_get(gobject,
  "my-name", &str,
  NULL);
```
Or you might want to set the property:
```c
g_object_set(gobject,
  "my-name", "Anderson",
  NULL);
```
### The libsoup HTTP library
The `libsoup` project provides an HTTP client and server library for GNOME. It uses GObjects and the glib main loop to integrate with GNOME applications, and also has a synchronous API for use in command-line tools. First, create a `libsoup` session with an authentication callback specified. You can also make use of cookies.
```c
SoupSession *soup_session;
SoupCookieJar *jar;
soup_session = soup_session_new_with_options(SOUP_SESSION_ADD_FEATURE_BY_TYPE, SOUP_TYPE_AUTH_BASIC,
  SOUP_SESSION_ADD_FEATURE_BY_TYPE, SOUP_TYPE_AUTH_DIGEST,
  NULL);
jar = soup_cookie_jar_text_new("cookies.txt",
  FALSE);    
soup_session_add_feature(soup_session, jar);
g_signal_connect(soup_session, "authenticate",
  G_CALLBACK(my_authenticate_callback), NULL);
```
Then you can create a HTTP GET request like the following:
```c
SoupMessage *msg;
SoupMessageHeaders *response_headers;
SoupMessageBody *response_body;
guint status;
GError *error;
msg = soup_form_request_new("GET",
  "http://127.0.0.1:8080/my-xmlrpc",
  NULL);
status = soup_session_send_message(soup_session,
  msg);
response_headers = NULL;
response_body = NULL;
g_object_get(msg,
  "response-headers", &response_headers,
  "response-body", &response_body,
  NULL);
g_message("status %d", status);
cookie = NULL;
soup_message_headers_iter_init(&iter,
response_headers);
while(soup_message_headers_iter_next(&iter, &name, &value)){    
  g_message("%s: %s", name, value);
}
g_message("%s", response_body->data);
if(status == 200){
  cookie = soup_cookies_from_response(msg);
  while(cookie != NULL){
    char *cookie_name;
    cookie_name = soup_cookie_get_name(cookie->data);
    //parse cookies
    cookie = cookie->next;
  }
}
```
The authentication callback is called as the web server asks for authentication.
Heres a function signature:
```c
#define MY_AUTHENTICATE_LOGIN "my-username"
#define MY_AUTHENTICATE_PASSWORD "my-password"
void my_authenticate_callback(SoupSession *session,
  SoupMessage *msg,
  SoupAuth *auth,
  gboolean retrying,
  gpointer user_data)
{
  g_message("authenticate: ****");
  soup_auth_authenticate(auth,
                         MY_AUTHENTICATE_LOGIN,
                         MY_AUTHENTICATE_PASSWORD);
}
```
### A libsoup server
For basic HTTP authentication to work, you must specify a callback and server context path. Then you add a handler with another callback.
This example listens to any IPv4 address on localhost port 8080:
```c
SoupServer *soup_server;
SoupAuthDomain *auth_domain;
GSocket *ip4_socket;
GSocketAddress *ip4_address;
MyObject *my_object;
GError *error;
soup_server = soup_server_new(NULL);
auth_domain = soup_auth_domain_basic_new(SOUP_AUTH_DOMAIN_REALM, "my-realm",
  SOUP_AUTH_DOMAIN_BASIC_AUTH_CALLBACK, my_xmlrpc_server_auth_callback,
  SOUP_AUTH_DOMAIN_BASIC_AUTH_DATA, my_object,
  SOUP_AUTH_DOMAIN_ADD_PATH, "my-xmlrpc",
  NULL);
soup_server_add_auth_domain(soup_server, auth_domain);
soup_server_add_handler(soup_server,
  "my-xmlrpc",
  my_xmlrpc_server_callback,
  my_object,
  NULL);
ip4_socket = g_socket_new(G_SOCKET_FAMILY_IPV4,
  G_SOCKET_TYPE_STREAM,
  G_SOCKET_PROTOCOL_TCP,
  &error);
ip4_address = g_inet_socket_address_new(g_inet_address_new_any(G_SOCKET_FAMILY_IPV4),
  8080);
error = NULL;
g_socket_bind(ip4_socket,
  ip4_address,
  TRUE,
  &error);
error = NULL;
g_socket_listen(ip4_socket, &error);
error = NULL;
soup_server_listen_socket(soup_server,
  ip4_socket, 0, &error);
```
In this example code, there are two callbacks. One handles authentication, and the other handles the request itself.
Suppose you want a web server to allow a login with the credentials username **my-username** and the password **my-password**, and to set a session cookie with a random unique user ID (UUID) string.
```c
gboolean my_xmlrpc_server_auth_callback(SoupAuthDomain *domain,
  SoupMessage *msg,
  const char *username,
  const char *password,
  MyObject *my_object)
{
  if(username == NULL || password == NULL){
    return(FALSE);
  }
  if(!strcmp(username, "my-username") &&
     !strcmp(password, "my-password")){
    SoupCookie *session_cookie;
    GSList *cookie;
    gchar *security_token;
    cookie = NULL;
    security_token = g_uuid_string_random();
    session_cookie = soup_cookie_new("my-srv-security-token",
      security_token,
      "localhost",
      "my-xmlrpc",
      -1);
     cookie = g_slist_prepend(cookie,
       session_cookie);  
     soup_cookies_to_request(cookie,
       msg);
    return(TRUE);
  }
  return(FALSE);
}
```
A handler for the context path **my-xmlrpc**:
```c
void my_xmlrpc_server_callback(SoupServer *soup_server,
  SoupMessage *msg,
  const char *path,
  GHashTable *query,
  SoupClientContext *client,
  MyObject *my_object)
{
  GSList *cookie;
  cookie = soup_cookies_from_request(msg);
  //check cookies
}
```
### A more powerful C
I hope my examples show how the GObject and libsoup projects give C a very real boost. Libraries like these extend C in a literal sense, and by doing so they make C more approachable. They do a lot of work for you, so you can turn your attention to inventing amazing applications in the simple, direct, and timeless C language.
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/5/libsoup-gobject-c
作者:[Joël Krähemann][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/joel2001k
[b]: https://github.com/lkxed
[1]: https://opensource.com/sites/default/files/lead-images/computer_code_programming_laptop.jpg
[2]: https://docs.gtk.org/gobject/concepts.html

View File

@ -0,0 +1,95 @@
[#]: subject: "Xebian A Blend of Debian and Goodness of Xfce [Review]"
[#]: via: "https://www.debugpoint.com/2022/05/xebian-review-2022/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Xebian A Blend of Debian and Goodness of Xfce [Review]
======
Heres a quick review of the nice and sleek Xebian Linux Distribution.
Xebian is an Xfce desktop environment based Linux distribution based on Debian Unstable (sid) branch. This Linux Distribution brings a basic Xfce desktop with Debian without configuration changes and additional packages. Hence, you get a vanilla experience out of the box without worrying much about installing Debian and Xfce.
With that said, heres a quick review of Xebian if you want to try it out.
### Xebian Review
#### Installation
Debian Installation can be tricky considering a variety of ISO available (mini, free, non-free and all that). After all, it is a truly “Universal Operating System”. But with Xebian, its effortless because it comes with only one 64-bit ISO file, which gives you Debian sid and Xfce. Xebian uses Debians native installer and is fairly straightforward to install this distribution in your physical system or a virtual machine.
During my test, the installation went fine, and no issues were reported. Installation took around 4 minutes.
#### Look and Feel
After installing, you get a nice login screen with Xebian default wallpaper when you first boot the system. The login screen is the standard default Xfce desktop login screen.
![Xebian Logn Screen][1]
First and foremost, the desktop is very lightweight and has a clean look with Xfce. Xebian gives exactly the stock version of Xfce with Debian. So, the only difference is the default wallpaper which looks nice and the default Numix theme (dark). The Adwaita and Gerybird themes are also present for those who like a more legacy look.
Second, the top panel has the Whisker Menu on the right and the standard system tray with volume controls, battery indication, network/Wi-Fi and date/time.
#### Applications
Xebian packages all the Xfce native applications and does not add anything extra. When you install it, you should already have a stable working desktop with the following applications pre-loaded.
* Thunar File Manager
* Ristretto Image Viewer
* Mousepad Text Editor
* Catfish File Search
* XFCE Terminal
* Firefox
* Synaptic Package Manager
* GParted for partitioning
* System Settings
Other than that, if you need any additional applications, you can easily install them using the Synaptic Package Manager. And tweaking the software source is easy with the built-in “Software and Sources” application.
The [Xfce 4.16][2] is the official version which the stable at the moment alongside its native applications. At its core, it is based on Debian Unstable “sid” which features Debian 12 “bookworm” release path as of writing this. And it is based on the latest [Linux Kernel 5.17][3] being a rolling release. The Xfce 4.18 is still far away from getting a final release.
Moreover, if you need a moderate image editor, graphics software and Office suite (such as LibreOffice) you need to install them manually. They are not part of the ISO file.
Now, lets take a look at the performance.
#### Performance of Xebian
Xebian is lightweight and perfect for older hardware, thanks to Debian. I tested the performance in two phases. The ideal phase where I kept the system idle for some time consumes about 710 MB of memory, and the CPU is at, on average 2%. Most of the idle state resources are consumed by the Xfce4-desktop and Xfce Window manager.
Second, I tested it in the heavy usage phase. I tried Xebian with one instance of File Manager, Text editor, terminal, and Firefox web browser in this workload.
With this workload, Xebian consumes 1.2 GB of memory, 2% to 3% CPU on average, depending on the respective application activity.
Moreover, most of the memory and CPU consumed by Firefox obviously, followed by an almost 50% jump in memory consumption of Xfce Window Manager.
Overall, I think it is stable and should work fine in mid-range hardware with a minimum of 4 GB ram.
### Closing Notes
There are very few [Linux distributions][4] that are based on Debian Unstable branch. If you are looking for a specific combination of Xfce and Debian sid, then Xebian is perfect because you get a super solid rolling release from Debian and with Xfce built-in.
Although it says “unstable”, in my experience, Debian “unstable” works well if you keep your system up to date weekly.
Finally, head over to the official website and [download the ISO file][5] if you want to try this distribution.
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/2022/05/xebian-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/wp-content/uploads/2022/05/Xebian-Logn-Screen-1024x578.jpg
[2]: https://www.debugpoint.com/2021/02/xfce-4-16-review/
[3]: https://www.debugpoint.com/2022/03/linux-kernel-5-17/
[4]: https://www.debugpoint.com/category/distributions
[5]: https://xebian.org/download/

View File

@ -0,0 +1,78 @@
[#]: subject: "My favorite open source tool for using crontab"
[#]: via: "https://opensource.com/article/22/5/cron-crontab-ui"
[#]: author: "Kevin Sonney https://opensource.com/users/ksonney"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
My favorite open source tool for using crontab
======
Crontab-ui is a web frontend written in Node.js that helps manage the crontab file.
![Woman using laptop concentrating][1]
(Image by Mapbox Uncharted ERG, [CC-BY 3.0 US][2])
*Automation is a hot topic right now. In my day job as a site reliability engineer (SRE), part of my remit is to automate as many repeating tasks as possible. But how many of 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.*
One of the earliest things I learned about as a fledgling systems administrator was `cron`. Cron is used far and wide to do things like rotate logs, start and stop services, run utility jobs, and more. It is available on almost all Unix and Linux systems, and is something every sysadmin I know uses to help manage services and servers. Cron can run any console application or script automatically, which makes it very, very flexible.
![Image of a Crontab][3]
(Image by: Kevin Sonney, CC BY-SA 4.0)
I have used cron to fetch email, run filtering programs, make sure a service is running, interact with online games like Habitica, and a lot more.
### Using cron the traditional way
To get started with cron, you can simply type `crontab -e` at the command line to open up an editor with the current `crontab` (or “cron table”) file for yourself (if you do this as root, you get the system crontab). This is where the job schedule is kept, along with when to run things. David Both has written [extensively][4] on the format of the file and how to use it, so I'm not going to cover that here. What I am going to say is that for new users, it can be a bit scary, and getting the timing set up is a bit of a pain.
### Introducing crontab-ui
There are some fantastic tools out there to help with this. My favorite is [crontab-ui][5], a web frontend written in Node.js that helps manage the crontab file. To install and start `crontab-ui` for personal use, I used the following commands.
```
# Make a backup
crontab -l > $HOME/crontab-backup
# Install Crontab UI
npm install -g crontab-ui
# Make a local database directory
mkdir $HOME/crontab-ui
# Start crontab-ui
CRON_DB_PATH=$HOME/crontab-ui crontab-ui
```
Once this is done, simply point your web browser at`http://localhost:8000` and you'll get the crontab-ui web interface. The first thing to do is click “Get from Crontab” to load any existing jobs you may have. Then click **Backup** so that you can roll back any changes you make from here on out.
![Image of Crontab-UI][6]
(Image by: Kevin Sonney, CC BY-SA 4.0)
Adding and editing cron jobs is very simple. Add a name, the full command you want to run, and the time (using cron syntax), and save. As a bonus, you can also capture logs, and set up the mailing of job status to your email of choice.
When you're finished, click**Save to Crontab**.
I personally really love the logging feature. With crontab-ui, you can view logs at the click of a button, which is useful when troubleshooting.
One thing I do recommend is to not run crontab-ui all the time, at least not publically. While it does have some basic authentication abilities, it really shouldn't be exposed outside your local machine. I don't need to edit my cron jobs frequently (anymore), so I start and stop it on demand.
Try crontab-ui the next time you need to edit your crontab!
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/5/cron-crontab-ui
作者:[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/lenovo-thinkpad-laptop-concentration-focus-windows-office.png
[2]: https://creativecommons.org/licenses/by/3.0/us/
[3]: https://opensource.com/sites/default/files/2022-04/Day01-1.png
[4]: https://opensource.com/article/17/11/how-use-cron-linux
[5]: https://opensource.com/%5Bhttps%3A//github.com/alseambusher/crontab-ui%5D%28https%3A//github.com/alseambusher/crontab-ui%29
[6]: https://opensource.com/sites/default/files/2022-04/Day01-2.png

View File

@ -0,0 +1,127 @@
[#]: subject: "KDE Plasma 5.25: Top New Features and Release Details"
[#]: via: "https://www.debugpoint.com/2022/05/kde-plasma-5-25"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
KDE Plasma 5.25: Top New Features and Release Details
======
We will give you the feature summary of the KDE Plasma 5.25 desktop environment (upcoming).
KDE Plasma 5.25 is the 27th version of KDE Plasma desktop, not an LTS release. This release is followed by the prior [5.24 LTS][1], released in February. KDE Plasma 5.25 brings several exciting updates on the desktop UI, polished applets, widgets, a good set of gesture updates for touch-based devices and a massive list of bug fixes. Plasma 5.25 is based on Qt 5.15.2 and KDE Frameworks 5.94.
KDE Plasma releases on June 14, 2022, but before that following milestones are to be met:
* Soft feature freeze: May 5, 2022 (Completed)
* Beta: May 19, 2022
* Final release: June 14, 2022
The list of bug fixes and features is around 400+, and its challenging to cover them in a single article. We filtered out in this article some of the essential and visual changes which are more impactful straightaway to the general user base.
### KDE Plasma 5.25 Top New Features
#### Plasma Workspace & Desktop
Perhaps the most important visual change in KDE Plasma 5.25 is accent colour change based on the Wallpaper. As reported earlier, this change gives the final touch to the entire accent colour functionality and makes it complete with dynamic colour, custom colour and pre-sets. The option is available in the Appearance module. ([MR#1325)][2]
![KDE Plasma 5.25 Accent Colour Change Based on the wallpaper][3]
In addition, the accent colour change to the title bar was [also implemented][4] in the Breeze Classic theme and made it more consistent across the desktop.
Another exciting change that KDE Plasma 5.25 brings is an option for Themes to make the Panel float. When selected, the Panel detaches itself from the bottom of the screen with rounded corners and gives a floating feeling. The option is available in the additional settings in Edit Panel mode. Heres how it looks. ([MR#714)][5]
In addition to that, the power profiles menu in the system tray now has [icons][6] with their names in the [tooltip][7].
The login and logout screen see a [small UI change][8] to display avatar and profile name with longer user names.
Also, the spacing between the avatar icon and name with the logout screen action buttons is [increased][9] to give a more consistent look.
A fix was made to the Plasma Desktop to prevent widgets from [retaining position][10]when resolution changes back from fullscreen gaming. The widgets remember their position for respective resolutions.
The plasma Workspace module [reverts][11]to the lock screen behaviour on mouse move, which was removed accidentally earlier.
The Digital Clock “Copy to Clipboard” menu is now [more clean][12] with the removal of duplicate items and separate entries when seconds are enabled.
#### KWin Updates
KWin introduces an [option to hide][13] minimised windows in KDE Plasma 5.25. In addition to that, the desktop grid effect is [completely replaced][14] with the QML Version.
Furthermore, it is now possible to switch between display specific resolutions which are not visible to the operating system in Wayland. The change adds [libxcvt][15] dependency in Kwin, and details of this change can be found [here][16].
With this release, the switching between the dark and light mode is more smooth and animated thanks to this [MR][17], inspired by GNOME. It was not smooth earlier and now looks more professional behaviour.
#### Changes in Discover
The application page of Discover is now complete with [more focused details][18] at the top with Application metadata and images. The spacing of the app name, ratings and developer with the image at the header section with the summary in the middle. And rest at the bottom. Heres a side by side comparison of the earlier version with 5.25.
One tiny yet impactful change in Discover related to Flatpak apps. Discover now [shows][19] a message with an action button to clean Flatpak data for uninstalled apps.
Moreover, Discover now [shows the required permissions][20]of the Flatpak applications before you install them. In addition, if you are planning to install proprietary software, you get a warning message saying the potential consequences of using those (such as Microsoft Teams).
#### Application and Applet Changes
The System Monitor (KSystemStats) shows new [information about your window system][21] whether you are running X11 or Wayland. This should also display on the overview screen of the KSysGuard.
The Open With Dialog of XGD Portal sees a [complete UI rework][22]. The top section label is merged into one single information line for better clarity. Also, the search field is now visible for all modes, and the Show More button is moved up beside Search with better clarity. You can look at the below image (Credit KDE Team) for this change.
The Plasma Applet for NetworkManager now [shows][23] the WiFi frequency connection nection details to help distinguish which frequency you are connected to in the same SSID (same Wi-Fi Router). Its really helpful if both the band have the same Wifi Accent point name and you cannot distinguish between 4G or 5G.
The cuttlefish icon viewer now helps you [open the file path via the file manager][24] directly of the selected icon.
Plasma desktop now gives a [more organised view][25]in “Recent Documents” with the ability to show “non-file” items such as RDP or remote connections.
Moreover, the spell checker module in KRunner now [detects][26] the search language and gives you results.
When you run into an error, the KInfocenter now gives you [more information][27] about the error. The new design gives you what is the error, why it happened, whether you can fix it by yourself and how to report it to the devs. This is a nifty change that has a more significant impact. Heres a side by side view of the change.
### Closing Notes
Along with the above changes, this release improves several gestures for touch devices and a massive list of performance and bug fixes (counting 150+), which will enhance the KDE Plasma 5.25 experience for all of its users.
If you want to give a hand on testing, read the [contribution guide][28], and you can try the [unstable edition of KDE Neon][29] until the BETA release.
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/2022/05/kde-plasma-5-25
作者:[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/2022/03/kde-plasma-5-24-review/
[2]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1325
[3]: https://www.debugpoint.com/wp-content/uploads/2022/05/KDE-Plasma-5.25-Accent-Colour-Change-Based-on-wallpaper-1024x611.jpg
[4]: https://invent.kde.org/plasma/breeze/-/merge_requests/182
[5]: https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/714
[6]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1585
[7]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1668
[8]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1654
[9]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1647
[10]: https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/608
[11]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1707
[12]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1693
[13]: https://invent.kde.org/plasma/kwin/-/merge_requests/2341
[14]: https://invent.kde.org/plasma/kwin/-/merge_requests/2327
[15]: https://gitlab.freedesktop.org/xorg/lib/libxcvt
[16]: https://bugs.kde.org/448398
[17]: https://invent.kde.org/plasma/kwin/-/merge_requests/2088
[18]: https://invent.kde.org/plasma/discover/-/merge_requests/246
[19]: https://invent.kde.org/plasma/discover/-/merge_requests/297
[20]: https://invent.kde.org/plasma/discover/-/merge_requests/282
[21]: https://invent.kde.org/plasma/ksystemstats/-/merge_requests/34
[22]: https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/merge_requests/94
[23]: https://invent.kde.org/plasma/plasma-nm/-/merge_requests/112
[24]: https://invent.kde.org/plasma/plasma-sdk/-/merge_requests/32
[25]: https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/551
[26]: https://invent.kde.org/plasma/kdeplasma-addons/-/merge_requests/122
[27]: https://invent.kde.org/plasma/kinfocenter/-/merge_requests/90
[28]: https://community.kde.org/Get_Involved
[29]: https://neon.kde.org/download

View File

@ -0,0 +1,157 @@
[#]: subject: "PyCaret: Machine Learning Model Development Made Easy"
[#]: via: "https://www.opensourceforu.com/2022/05/pycaret-machine-learning-model-development-made-easy/"
[#]: author: "S Ratan Kumar https://www.opensourceforu.com/author/s-ratan/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
PyCaret: Machine Learning Model Development Made Easy
======
Organisations use low code/no code (LC/NC) apps to construct new information systems swiftly in todays fast-paced digital world. This article introduces PyCaret a low code machine learning library written in Python.
![Featured-image-of-pycaret][1]
PyCaret is a Python version of the Caret (short for Classification And REgression Training) package in the R programming language, and has many benefits.
- **Increased productivity:** PyCaret, being a low code library, makes you more productive. With less time spent coding, you and your team can now focus on business problems.
- **Easy to use:** This simple and easy to use machine learning library will help you to perform end-to-end ML experiments with fewer lines of code.
- **Business ready:** PyCaret is a business-ready solution. It allows you to do prototyping quickly and efficiently from your choice of notebook environment.
You can create a virtual environment in Python and execute the following command to install the PyCaret complete version:
```
pip install pycaret [full]
```
A machine learning practitioner can do classification, regression, clustering, anomaly detection, natural language processing, association rules mining and time series analysis with PyCaret.
### Classification model building with PyCaret
This article explains classification model building with PyCaret by taking the Iris data set from PyCarets data repository.
We will use the Google Colab environment to make things simple and follow the steps mentioned below.
#### Step 1
First, install PyCaret by giving the following command:
```
pip install pycaret
```
#### Step 2
Next, load the data set, as shown in Figure 1:
![Loading the data set][2]
```
from pycaret.datasets import get_data
dataset = get_data(iris) 
(or)
import pandas as pd
dataset = pd.read_csv(/path_to_data/file.csv)
```
#### Step 3
Now set up the PyCaret environment, as shown in Figure 2:
![PyCaret environment setup][3]
```
from pycaret.classification import *
clf1 = setup (data=dataset, target = species)
```
![PyCaret environment setup result][4]
For any type of model building with PyCaret, the environment setup is the most important step. By default, *setup ()* function takes the *data*: Pandas DataFrame and target, which points to the class label variable in the data set. The result of the setup function is shown in Figure 3. The setup function, by default, splits 70 per cent of the data as train set and 30 per cent as test set, and does data preprocessing as shown in Figure 3.
#### Step 4
Next, find the best model, as shown in Figure 4:
![Finding the best model][5]
```
best = compare_models()
```
The *compare_models()*, by default, applies ten-fold cross validation and calculates different performance metrics like accuracy, AUC, recall, precision, F1 score, Kappa and MCC for different classifiers with lesser training times, as shown in Figure 4. By passing the tubro=True to*compare_models()* function we can try all the classifiers.
#### Step 5
Now create the model, as shown in Figure 5:
![Creating the model][6]
```
lda_model=create_model (lda)
```
The Linear Discriminant Analysis classifier is performing well, as shown in Figure 4. So by passing lda to the *create_model()* function, we can fit the model.
#### Step 6
The next step is to fine tune the model, as shown in Figure 6.
![Tuning the model][7]
```
tuned_lda=tune_model(lda_model)
```
Tuning of hyper parameters can improve the model accuracy. The *tune_model()* function improved the Linear Discriminant Analysis model accuracy from 0.9818 to 0.9909, as shown in Figure 7.
![Tuned model details][8]
#### Step 7
The next step is to make predictions, as shown in Figure 8:
![Predictions using the tuned model][9]
```
predictions=predict_model(tuned_lda)
```
The *predict_model()* function is used for making the predictions of the samples present in the test data.
#### Step 8
Now plot the model performance, as shown in Figure 9:
![Evaluating and plotting the model performance — confusion matrix][10]
```
evaluate_model(tuned_lda)
```
The *evaluate_model ()* function is used to develop different performance metrics with minimum effort. You can try them out to see the output.
--------------------------------------------------------------------------------
via: https://www.opensourceforu.com/2022/05/pycaret-machine-learning-model-development-made-easy/
作者:[S Ratan 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.opensourceforu.com/author/s-ratan/
[b]: https://github.com/lkxed
[1]: https://www.opensourceforu.com/wp-content/uploads/2022/03/Featured-image-of-pycaret-696x477.jpg
[2]: https://www.opensourceforu.com/wp-content/uploads/2022/03/Figure-1-loading-the-dataset.jpg
[3]: https://www.opensourceforu.com/wp-content/uploads/2022/03/Figure-2-PyCaret-Environment-Setup.jpg
[4]: https://www.opensourceforu.com/wp-content/uploads/2022/03/Figure-3-PyCaret-Environment-Setup-Result.jpg
[5]: https://www.opensourceforu.com/wp-content/uploads/2022/03/Figure-4-Finding-the-best-model.jpg
[6]: https://www.opensourceforu.com/wp-content/uploads/2022/03/Figure-5-Creating-the-model.jpg
[7]: https://www.opensourceforu.com/wp-content/uploads/2022/03/Figure-6-Tuning-the-model.jpg
[8]: https://www.opensourceforu.com/wp-content/uploads/2022/03/Figure-7Tuned-model-details.jpg
[9]: https://www.opensourceforu.com/wp-content/uploads/2022/03/Figure-8-Predictions-using-tuned-model.jpg
[10]: https://www.opensourceforu.com/wp-content/uploads/2022/03/Figure-9-Evaluating-and-ploting-the-model-performance-Confusion-Matrix.jpg

View File

@ -0,0 +1,40 @@
[#]: subject: "ESI Group Collaborates With ENSAM, Open Sources Its “Inspector” Software"
[#]: via: "https://www.opensourceforu.com/2022/05/esi-group-collaborates-with-ensam-open-sources-its-inspector-software/"
[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/"
[#]: collector: "lkxed"
[#]: translator: "Veryzzj"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
ESI 集团同 ENSAM 合作开源其”Inpsector“软件
======
![software][1]
Inspector 是一个可视化的交互式数据探索软件,能够对海量数据进行分析并提取相关信息,可用于预测性维修、网络安全、控制、机器学习算法分析等。
通过让更多的人使用 Inspector 软件让他们能够合作开发可靠灵活的方案以解决社区的技术问题和特殊需求ESI集团增加了对工业界和学术界的贡献。
作为 ESI 集团 和 ENSAM 之间持续赞助合作和共创伙伴关系的一部分ENSAM巴黎高科国立高等工程技术大学将领导 Inspector 的增长和扩展。通过共同参与建设由新加坡CNRS协调的 Descartes 计划、CREATE-ID 国际研究讲座以及 ESI ENSAM 虚拟工程实验室,双方加强了合作。
这种开源方式有许多好处。首先社区能够以最有效的方式使用该软件科学界能够从根据用户需求定制的新功能以及安全方面的改进中受益。其次ESI 集团希望提供一个从软件中获利机会包括汽车及航空在内的各种行业的客户已经证明了这一软件的可靠性。由于许多利益相关者的参与“Inspector”将持续发展以应对社区需求。
ESI 集团打算将其数据分析软件开源发布得到了一些行业领导者和“Inspector”用户的兴趣和支持。例如CNS。
CNS 的总经理 Stephane Perrin 表示“ESI 集团这一决定证明了集团的先进技术对创新和科学生态系统的贡献。CNS 作为一家网络与安全的专业公司,我们用行动支持 Inspector 的未来。 除了将 Inspector 集成到我们的持续网络审计软件套件中外,不久后我们还将通过我们创新解决方案的业务部门为该软件提供支持。”
--------------------------------------------------------------------------------
via: https://www.opensourceforu.com/2022/05/esi-group-collaborates-with-ensam-open-sources-its-inspector-software/
作者:[Laveesh Kocher][a]
选题:[lkxed][b]
译者:[Veryzzj](https://github.com/Veryzzj)
校对:[校对者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/software-696x371.jpg

View File

@ -0,0 +1,40 @@
[#]: subject: "Open Source Developer Creates First-of-its-Kind Fund To Support Maintainers"
[#]: via: "https://www.opensourceforu.com/2022/05/open-source-developer-creates-first-of-its-kind-fund-to-support-maintainers/"
[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/"
[#]: collector: "lkxed"
[#]: translator: "lkxed"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
开源开发者创建首个支持维护者的基金会
======
![opensourceBETTERimage][1]
Appwrite 是一个为 Web、移动和 flutter 开发者提供的开源“<ruby>后端即服务<rt>Backend-as-a-Service</rt></ruby>BaaS平台。今天它宣布成立开源软件基金OSS 基金会),该基金会将在第一年,向那些为当下数字基础设施奠定基础,却没有得到补偿的开源维护者,提供 5 万美元的资助。
Appwrite 每年的开源基金将用于协助开源开发者、促进技术革新,并为各种开源开发方案创造知名度。每年,它都会对基金数额进行审查,以确保其继续满足社区的需求。目前已经开始接受申请,并且每年都会接受申请。获奖者将由 Appwrite 开发者关系团队选出。了解更多:[https://appwrite.io/oss-fund][2]。
创始人兼 CEO Eldad Fux 说:“我懂这种感受,你在电脑前花费大量时间,把血汗和泪水投入到热爱的事物中,而且这些事物还在使全世界成千上万甚至数百万人受益。我一直就有这个想法:借用 Appwrite 的一些成功经验和投资,来支持其他像我一样的开发者和维护者,以回馈的方式来展望未来。希望我们的贡献能够带来改变。”
在今天的技术环境中,最紧迫的挑战之一就是开源开发者和维护者的长期生存能力。尽管开源软件占比已经达到 70% 到 90%是当下数字文明的基础但许多最重要项目的开发者和维护者仍然没有获得足够报酬或者根本没有报酬。关于如何帮助这些人业界已经有了许多讨论并提出了一系列的解决方案。Appwrite 正在为维护者做一些事,提升他们的工作,并提供经济支持,以换取他们对行业和数字社会的贡献。
Eldad Fux 自身通过为开源软件项目做贡献和参与开源社区开始了他的开发者生涯。Appwrite 最初是一个副业项目,他把它作为一个 BaaS 产品从头打造。目前Fux 通过专注于完全开源的平台和以各种方式回馈社区来支持开源理念,其中就包括了 Appwrite OSS 基金。
EddieHub 的创始人和开发者 Eddie Jaoude 说:“开源为世界上大部分的现代基础设施提供动力,从移动到网络、汽车甚至是地球以外的任务。只有靠社区的慷慨解囊,他们的时间和努力才能持续。如果有更多的公司和组织的支持,这种情况将得到改善,避免社区成员因报酬不足/没有报酬而懈怠。”
--------------------------------------------------------------------------------
via: https://www.opensourceforu.com/2022/05/open-source-developer-creates-first-of-its-kind-fund-to-support-maintainers/
作者:[Laveesh Kocher][a]
选题:[lkxed][b]
译者:[lkxed](https://github.com/lkxed)
校对:[校对者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/04/opensourceBETTERimage-696x392.jpg
[2]: https://appwrite.io/oss-fund

View File

@ -0,0 +1,116 @@
[#]: subject: "Ubuntu MATEs Lead Creates a Nifty Tool to Help Install 3rd Party Deb Packages"
[#]: via: "https://news.itsfoss.com/deb-get-ubuntu/"
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
[#]: collector: "lkxed"
[#]: translator: "lkxed"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Ubuntu MATE 的负责人开发了一个漂亮的工具,专用于安装第三方 deb 包
======
这是一个有趣的工具,它可以替代 apt-get 来安装 Ubuntu 上的第三方 deb 包。它应该能帮为你节省时间!
![deb-get][1]
Ubuntu MATE 的负责人 **Martin Wimpress** 为 Linux 用户带来了另一个有趣的项目。
你可能不知道,这个 Martin 经常开发一些有趣的东西。去年,我们报道了 [Quickemu][2],它通过一个基于 QEMU 的 GUI 工具,帮助用户在 Linux 中创建虚拟机,使这个过程变得简单。
现在,他又带来了一个有趣的 “**deb-get**” 工具,其目标是模仿 “**apt-get**” 对第三方 .deb 包的支持。
让我们来详细了解一下它吧!
### Deb Get使用 CLI 无缝安装第三方 deb 包
当官方软件库中没有你想安装的软件包时(比如 Google Chrome、Vivaldi 等),你必须先 [添加一个 PPA非官方/官方)][3] 或者下载 .deb 文件后 [手动安装][4]。
如果我现在告诉你,你可以直接在终端中安装它们,就好像官方软件库中有它们一样呢?
这就是 deb-get 工具想要做到的事。
通常,当在终端中安装一个软件包时,你会使用下面的命令:
```shell
sudo apt install packagename
```
或者
```shell
sudo apt-get install packagename
```
要使用这个工具,你只需把 `apt-get` 替换为 `deb-get`,其他格式保持不变。就像下面这样:
```shell
sudo deb-get install packagename
```
举个例子,通常,我们 [在 Linux 上安装 Vivaldi][5] 时需要添加 PPA 或下载 .deb 文件。
现在,如果你在系统上配置好了 deb-get 工具(**配置指南在本文末尾**),你就可以使用以下命令轻松地安装 Vivaldi
```shell
sudo deb-get install vivaldi-stable
```
![][6]
另外,类似于 `apt-get upgrade`,你可以使用下面的命令来升级软件包:
```shell
sudo deb-get upgrade
```
**注意:**虽然 deb-get 使安装第三方 .deb 包变得很容易,但它是有限制的,你只能安装它提供的核实列表中的软件。不过,它已经支持许多 [必要的应用程序][7],相信支持的软件包列表很快就会扩大。
你也可以使用下面的命令,检查你 deb-get 可用软件包的列表:
```shell
sudo deb-get list
```
![deb-get][8]
### 在基于 Ubuntu 的发行版上设置 deb-get
deb-get 工具适用于 Ubuntu 22.04 LTS我测试过也应该适用于其他基于 Ubuntu 的发行版。
你可以使用下面的命令来安装它:
```shell
sudo apt install curl && curl -sL https://raw.githubusercontent.com/wimpysworld/deb-get/main/deb-get | sudo -E bash -s install deb-get
```
或者,你可以在它的 [GitHub 发布页面][9] 手动下载它的 deb 包。
要了解更多关于它的信息,以及可用的命令/功能,你可以访问它的 [GitHub 页面][10]。
*你怎么看待 deb-get 试图实现支持第三方软件包的 apt-get你认为它有用吗请在评论区留言发表你的看法吧*
**来源OMG!Ubuntu!**
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/deb-get-ubuntu/
作者:[Ankush Das][a]
选题:[lkxed][b]
译者:[lkxed](https://github.com/lkxed)
校对:[校对者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/deb-get.jpg
[2]: https://itsfoss.com/quickgui/
[3]: https://itsfoss.com/ppa-guide/
[4]: https://itsfoss.com/install-deb-files-ubuntu/
[5]: https://itsfoss.com/install-vivaldi-ubuntu-linux/
[6]: https://news.itsfoss.com/wp-content/uploads/2022/05/deb-get-vivaldi.jpg
[7]: https://itsfoss.com/essential-linux-applications/
[8]: https://news.itsfoss.com/wp-content/uploads/2022/05/deb-get-list.jpg
[9]: https://github.com/wimpysworld/deb-get/releases
[10]: https://github.com/wimpysworld/deb-get

View File

@ -0,0 +1,86 @@
[#]: subject: "Why you should choose mindfulness over multitasking"
[#]: via: "https://opensource.com/article/19/4/mindfulness-over-multitasking"
[#]: author: "Sarah Wall https://opensource.com/users/sarahwall"
[#]: collector: "lkxed"
[#]: translator: "lkxed"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
你为什么应该选择专注而非一心多用
======
如果你有时候会感觉大脑处于停滞状态,那么你可能正在遭受一心多用和决策疲劳。
![][1]
(图源Pixabay经 Opensource.com 修改CC BY-SA 4.0)
想象一下,你刚完成了日常工作,坐在电脑前,手里拿着晨间咖啡,正准备开始新的一天。突然,一条 Slack 消息弹了出来,你扫了一眼邮件,然后切回 Slack。你打开日历看看下一次会议是什么时候令你惊讶的是它 15 分钟后就要开始了!你回到办公桌前,开始检查待办事项,想看看在这短短 15 分钟内还能给自己安排什么任务,但不巧的是,这时你的一个同事请求你帮他解决一个问题。大半天就这样过去了,而你根本没有意识到……
我的许多日子都是这样度过的,不断地多个任务之间徘徊。有些时候,我发现自己盯着电脑,大脑完全停滞。如果你也发现自己处于这种情况,这可能是你的大脑发出的信号,提醒你休息一下。你可能正在遭受一心多用和决策疲劳。
平均而言,成年人每天要做大约 [35000 个决定][2]! 它们可以是简单的决定,如吃什么或穿什么,也可以是需要更多思考的决定,如下一个假期去哪里或从事哪个职业。每天你都面临着大量的选择,它们占据了你的头脑。
### 分散注意力的一心多用
不只有你一个人每天面临着数以千计的决定,事实上,一心多用早已成为忙碌的、工作中的专业人士的常态。问题是,一心多用的伤害比它的帮助更大。你越是为了处理多任务而分散注意力,你的生产力就越是下降。
在一项研究中,自称是一心多用者的人,被要求以他们感觉自然的速度,在各种任务之间来回切换。同时,研究的对照组,被要求按顺序,一次完成一项工作。研究表明,多任务组的效率要低得多。每次他们切换任务时,都会出现速度减慢的情况,因为他们需要时间来回忆到目前为止所做的细节和步骤。这最终 [额外花费了大约 40% 的时间][3],并导致整体准确度降低。每次专注于一项任务的人,总体上花费的时间更少,并且完成了所有的任务。
### 选择专注
当大脑集中在一项活动上时,它的功能是最理想的。选择专注而不是一心多用,将使你在一天中获得更好的感受,并帮助你完成更好的工作。
“专注”可以被定义为有意识和察觉的。它实际上是指活在当下,并将注意力集中于眼前的事情上。在工作场所,专注有很多好处。它的诀窍在于建立边界和习惯,使你能够对每项任务给予充分的关注。
保持积极主动,为每天必须完成的项目排好优先级,并制定一个完成计划。这将使你能够在一些重要的事情上取得真正的进展,而不是被动应付。你的待办事项清单上的每个项目,都应该是独立、明确、可操作的。每天专注于三到五项任务,不要太多。
### 三种在工作日休息的方法
不要忘记把“休息”也放进一天的计划中。大脑每小时需要几分钟的休息,以休养生息,避免倦怠。休息一下对你的心理健康也有好处,最终 [有助于生产力的提高][4]。
这里有三种简单的“休息”方法,请把它们融入到你忙碌的一天中吧!
#### 1、移动身体
花 10 分钟时间,离开你的椅子,站起来走一走。如果你的时间很紧张,可以站起来伸展两分钟。改变身体所处的位置,并专注于当下,将有助于缓解积聚在你心中的精神紧张。
#### 2、多笑
休息一下,与你的朋友和工作中的同事交谈。笑声可以减少压力荷尔蒙,并引发内啡肽的释放,内啡肽是人体天然的的化学物质,它会使人感觉良好。欢声笑语的小憩有助于放松你的头脑,对你的灵魂也有好处。
#### 3、深呼吸
用两分钟的休息时间来重置你的身心,使用腹部深呼吸。它可以使你的身心平静下来,改善氧气流动,并给你带来自然的能量提升。
1. 挺直坐正,将注意力放在腹部,感受它的柔软和放松。
2. 从缓慢的深吸气开始,数三下,让氧气依次充满你的腹部、肋骨和上胸。
3. 停顿一秒钟,然后与深吸气相反,从上胸、肋骨和腹部呼气,最后将腹部拉向脊柱。
4. 再次停顿,然后重复。
### 重置自己
下次当你发现自己处于停滞状态,或是正在强迫状态不佳的自己完成一项任务时,请尝试上面的一些提示。最好是短暂休息一下,重置身心,而不要试图强行完成任务。相信我,你的身体和大脑会感谢你的!
本文改编自《BodyMindSpirit》上的 [让自己休息一下][5] 和 ImageX 的博文 [专注而不是一心多用][6]。
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/4/mindfulness-over-multitasking
作者:[Sarah Wall][a]
选题:[lkxed][b]
译者:[lkxed](https://github.com/lkxed)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/sarahwall
[b]: https://github.com/lkxed
[1]: https://opensource.com/sites/default/files/lead-images/life_tree_clouds.png
[2]: https://go.roberts.edu/leadingedge/the-great-choices-of-strategic-leaders
[3]: http://www.apa.org/research/action/multitask.aspx
[4]: https://opensource.com/article/19/3/guide-being-more-productive
[5]: https://body-mind-spirit-coach.com/2019/01/02/give-yourself-a-break/
[6]: https://imagexmedia.com/mindfullness-over-multitasking
[7]: https://events.drupal.org/seattle2019/sessions/mindless-multitasking-dummy%E2%80%99s-guide-productivity
[8]: https://events.drupal.org/seattle2019

View File

@ -1,104 +0,0 @@
[#]: subject: "Documentation Isnt Just Another Aspect of Open Source Development"
[#]: via: "https://www.opensourceforu.com/2022/04/documentation-isnt-just-another-aspect-of-open-source-development/"
[#]: author: "Harsh Bardhan Mishra https://www.opensourceforu.com/author/harsh-bardhan-mishra/"
[#]: collector: "lkxed"
[#]: translator: "lkxed"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
文档并不是开源项目开发的附属品
======
有些项目长期保持活跃,有些项目却过早消亡 —— 这两者的区别往往在于它们的文档。严谨、聪明的文档可以给你的项目带来它所需要的动力。你应该把文档工作视为一项主要工作,把它与开发相提并论,下面我将说明这么做的理由和正确的做法。
![文档的重要性][1]
经常会有开发者简单地认为他们的代码已经足够“<ruby>自我记录<rt>self-documented</rt></ruby>”了,继而认为额外的文档是没有必要的。这种过度的自信会让项目付出很大的代价。不足或不好的文档会扼杀你的项目。没有适当的文档,用户将无法理解项目的目标以及正确的工作流程。这可能会导致人们对采用你的开源产品产生一些疑虑。
### 撰写文档,从项目第一天就开始
文档不应该是次要的工作,它应该是与代码开发和管理同等的主要任务。在 Community Threads、stack overflow 和 Quora 问答等社区中,文档内容广泛传播,其本身承担了“<ruby>信息源<rt>source of truth</rt></ruby>”的角色。 它应该满足那些想参考一手资料的贡献者的需要,并给工程师提供必要的参考支持。它还应该与股东沟通基本计划。一个好的文档可以确保产品的持续改进和发展。
当发布一个软件产品时,我们不仅要发布代码,还要发布好的文档。这给我们带来了一个最重要的概念,大多数维护着良好文档的开源项目都遵循这个概念 —— “文档即代码”。
### 文档及代码
今天,文档不再被存储为 Microsoft Word 或 PDF 文件。新的需求是版本控制文档,其中所有的文档都是通过版本控制系统添加的,并持续发布。这个概念因 Read the DocsLCTT 译注:一个文档创建、托管和浏览的平台)而流行,现在已经成为大多数文档团队的内容策略的重要组成部分。
像 Bugzilla 和 GitHub Issues 这样的工具可以用来跟踪待处理的文档工作,并从维护者和用户那里获得反馈以验证文档的发布。外部审查可以用来验证文档作品,并持续发布文档。这就保证了除代码外,文档也能不断改进并快速发布。
请记住,如果不遵循任何规范化的实践,每个文档都会不同。这可能会导致一些混乱,使人们难以获取正确的信息。
哪些东西会被归类为混乱呢?当大多数文件都不遵循规范实践时,不一致就会产生,从而导致一个大混乱!那么,如何整理混乱的开源文档呢?
### 整理混乱的开源文档
遵循一个“文档风格指南”是很重要的。风格指南是创建和展示内容的指导方针的集合。无论你是一个独立的作家还是一个大型文档团队的成员,它都有助于在你的文档中保持一致的风格、声音和语气。
有几个流行的风格指南,如红帽风格指南,谷歌文档风格指南,和苹果风格指南。如何选用?首先要从定义你的需求开始。如果你的要求与其他开源项目没有太大区别,你可以遵循一个现成的风格指南,或者你也可以先选一个,然后在它的基础上根据自身需要做一些修改。大多数与语法有关的准则和内容规则可能是通用的,但整体术语可能会有所不同。
你还需要在你的项目中自动采用这些风格指南。为此,你可以使用 Vale它集成了本地的持续集成CI服务该服务能帮助你确保文档严格遵循风格指南。
### 文档类型
* 自述文件:包含基本的安装和使用说明,这也是任何开源文档中最重要的部分之一。它是潜在的用户/开发者与项目之间的第一个连接点。
* 参考指南:可能包括一些基本的参考资料,以便帮助你快速上手,或者是与项目贡献相关的文档。
* 用户文档:是最基本的文档,它描述了项目的使用方式。如果没有任何用户文档,大多数人就会对如何使用该项目感到迷茫。
* 开发文档:旨在支持开发团队在项目中不断取得新的进展。它还应该为内部开发工作提供一个良好的途径,并确保功能被很好地传达给股东。
* 社区内容:包括基本的博客、视频和外部内容,旨在为那些想进一步了解项目的社区成员提供支持。
通过使用风格指南,文件的整体前提将以统一的语言风格传达给用户。但是,这些文件是毕竟由一个技术作家团队准备的,它们的写作风格可能会冲突,因为写作风格是因人而异的。那么,如何才能使文档规范化呢?
### 规范化文档
当涉及到规范化文档时,有许多方法可以采取。第一个方法显然是创建适用于各种角色的预定义模板。这些模板可以用来记录新的功能、识别错误和问题,以及更新变更日志以适应正在增加的新内容。
如果你采用的是基于 Git 的工作流,试着开发一个规范的工作流程来发布你的文档。最规范的工作流是:<ruby>复刻<rt>fork</rt></ruby>发布文档的仓库,在本地分支上添加你的修改,推送这些修改,提出请求并要求对其进行审查。规范化文档的一个好处就是带来更好的反馈和审查过程。
### 反馈和自动审查
规范化使得你能够得到用户的反馈并生成自动的审查,这些反馈可以被考虑用来改进项目和文档。通过这些反馈,你也可以评估所分享的信息对用户是否有意义。像 GitBook 这样的文档平台会提供合适的反馈服务,这有助于验证文档是否有用。
始终寻求主题专家SME对文档的反馈他们可以是股东、开发者、工程师甚至是外部贡献者。你也可以使用自动测试和CI来验证你的文档是否遵循风格指南。
### 文档众包
如果你想开源你的文档最好的方法也许是提供一个快速入门指南。它可以像“CONTRIBUTING.md”那样简单基本上只要说明该如何设置项目并为其作出贡献/单纯使用它即可。
始终开发以用户为中心的文档,它介绍了项目的目标。同时,打造学习课程来帮助新的贡献者。
### 带着目的编写文档
始终带着目的编写文档。它是最基本的写作策略之一,它定义了你编写某个特定文档的理由,而非方式。首先回答以下问题:
* 这个文档的目标是什么?
* 需要传递的信息是什么?
* 你希望用户在这之后采取什么行动?
* 我与读者分享的价值观是什么?
* 我的文档风格是否简洁、一致?
### 定义一致的内容策略
一致的内容策略有助于确保文档工作和项目基础设施的长期愿景。它可以围绕以下两个主要方面:
1. 资源:包括项目文档、案例研究和白皮书、项目架构等
2. 品牌内容:博客和特邀帖子、新闻和社区故事、学习课程等
每个开源项目都应该有适当的文档,以说明它能为用户提供的功能,这样用户就可以选择最合适的解决方案。适当的文档可以传达正确的信息,也可以让其他开发者贡献力量来进一步加强和改进项目。虽然听起来很简单,但只有做对了,文档才能成功。而你的项目,反过来,只有在你的文档是正确的情况下才能成功,所以永远不要低估它的目标或过程!
策划Laveesh Kocher
--------------------------------------------------------------------------------
via: https://www.opensourceforu.com/2022/04/documentation-isnt-just-another-aspect-of-open-source-development/
作者:[Harsh Bardhan Mishra][a]
选题:[lkxed][b]
译者:[lkxed](https://github.com/lkxed)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.opensourceforu.com/author/harsh-bardhan-mishra/
[b]: https://github.com/lkxed
[1]: https://www.opensourceforu.com/wp-content/uploads/2022/03/Importance-of-documentation-696x477.jpg

View File

@ -0,0 +1,72 @@
[#]: subject: "How to make community recognition more inclusive"
[#]: via: "https://opensource.com/article/22/5/inclusive-community-recognition"
[#]: author: "Ray Paik https://opensource.com/users/rpaik"
[#]: collector: "lkxed"
[#]: translator: "PeterPan0106"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
如何使社区认可更加包容
======
抛开具体的工作量,我们认为所有的贡献都弥足珍贵。当所有社区贡献者都能获得家庭般的赞赏时,他们会更倾向于继续为社区添砖加瓦。
![Global citizens unite to improve housing with open design and development][1]
(图源: Opensource.com
给予一个优秀的工作足够的认同和赞赏是我作为一个社区管理员最喜欢的事。我不但有机会能够对贡献者表示感激,同时还能为社区设立一个优秀的榜样。认同和赞赏可以是为了庆祝一个成就,例如有人帮助其他成员加入社区、减少技术债务或者贡献了激动人心的新功能。
但是用来确定贡献量的规则可能会有难以预料的后果。例如某些社区管理员利用如下图所示的图表来表彰贡献过度地强调了pull requests以及对代码库的贡献量。
![A bar graph ranking 15 contributors according the the number of PRs merged in a year, ranging from 250 at the top to 50 at the bottom.][2]
(图源: Ray Paik, CC BY-SA 4.0
![A bar graph ranking 10 contributing organizations by number of contributions, ranging from more than 15 to less than 5][3]
(图源: Ray Paik, CC BY-SA 4.0
使用这样的方法进行表彰会产生三个问题。首先,这样过度聚焦了对代码库的贡献。早年间,开源项目主要吸引开发者参与,所以自然而然许多贡献是围绕代码的。现在,越来越多的非开发者正在积极参与社区项目(例如通过用户组、会议和用户本身生产的内容),他们的大多数贡献在代码库以外的地方。这些贡献将不会出现在诸如*年度合并PR数量*这样的表格上。
其次,过度聚焦贡献指标(指那些易于用数字统计的),最终会演变为更大的数量甚至超越了更好的质量甚至是影响力。在上图的*贡献组织排行榜*中,大型组织因为具有更多的可用人力,相对于小型组织就会有更为显著的优势。通过对大型组织在数量上的表彰将可能导致小型组织感到权利被剥夺了。
最终,尽管本意并非如此,但许多人都会把这些数据看做对个人或组织影响力的排名。
基于此,我们最好避免仅仅通过指标数量来表彰对社区的贡献。
### 令社区表彰更有意义
如何让社区表彰更为包容并且能够覆盖不同的贡献形式呢一些通信频道例如Discord、IRC、mailing list和Slack可以很好的表明一个成员的活跃度及其感兴趣的领域。例如每当我看到一些人热衷于解答问题或者帮助新用户时我会十分开心。这些贡献并不会出现在社区的数据板上但是让这些贡献得到应有的认同和感谢并广为人知是十分重要的。
社区数据板显然是开源社区重要的工具。但对于花费在建设数据板的时间上,我锱铢必较。迟早你会发现,不是所有的东西都可以有清晰的标准进行度量,即便你能够想出规则量化一件事,你也依然会发现这些规则具有局限性。
为了获取更多的关于贡献的信息,我经常会安排社区成员茶话会。这些对话经常能够告诉我他们做出贡献的原因、有多少工作量以及谁同时也参与进来了等等。
当我第一次与他们对话时,我经常听到他们提及找到回馈社区的方法十分重要,而他们也在寻找方法来提供力所能及的帮助。许多人甚至因不能在代码方面做出贡献而感到内疚,而我会向他们强调代码不再是开源唯一重要的东西。有时这些对话能让我有机会接触到同一城市或同一行业的社区成员,或者发现更多共同的兴趣点。维护这些关系将有助于提升归属感。
### 令社区表彰更具影响力
除了寻找更多的活动形式,我们也可以让这些活动以更具影响力的形式呈现。例如在看到优质贡献时及时赞美。一个快速的感谢回复会比一两个月之后的正式感谢更有效。许多人包括我自己,都会强调给予更为正式而合理的表彰和奖励,但我们应当谨记,奖励并非社区成员贡献的主要动力。认可好的工作并努力去接触贡献者会令贡献者感到受重视。
让其他成员参与到认可的过程中也是一个很好的主意。一旦社区达到了一定的规模,便很难事无巨细地知晓一切细节。如果引入一个成员提名机制则会很好地让大家注意到优秀的贡献。如果你的社区拥有十分正式的奖项,例如在年度会议或聚会上颁发的奖项,请让社区成员参与提名和投票。这不仅提供了成员参与进来的平台,也令这些来自成员投票的奖项更有意义。
最后给予认同和感谢也是一个认识成员并加深了解的重要机会。有时候颁奖仿佛在进行交易“你做了X所以我们给你颁发了Y”。多在介绍成员上花些时间将令成员感到更受重视并加强归属感。
### 社区认可令社区更为健康
在提高开源社区的多样性、包容性和归属感方面,我们仍有许多工作亟待改善。更好的社区认可将在其中起着不可或缺的作用。确保所有的贡献都受到重视,让每一位贡献者都感到家庭般氛围和赞赏,将鼓励他们继续为社区贡献。
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/5/inclusive-community-recognition
作者:[Ray Paik][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://opensource.com/users/rpaik
[b]: https://github.com/lkxed
[1]: https://opensource.com/sites/default/files/lead-images/world_hands_diversity.png
[2]: https://opensource.com/sites/default/files/2022-04/annual%20merged%20PRs.png
[3]: https://opensource.com/sites/default/files/2022-04/top%20contributing%20orgs.png

View File

@ -0,0 +1,74 @@
[#]: collector: (lujun9972)
[#]: translator: (FYJNEVERFOLLOWS )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (8 tips for the Linux command line)
[#]: via: (https://opensource.com/article/21/1/linux-commands)
[#]: author: (Jim Hall https://opensource.com/users/jim-hall)
使用 Linux 命令行的 8 个技巧
======
要好好利用无所不能的 Linux 命令行提供的所有功能
![Terminal command prompt on orange background][1]
Linux 命令行是极其灵活的。无论你是管理服务器还是在桌面系统上启动终端窗口,都可以通过命令行无所不包的工具包来更新文件、调整系统性能或者管理进程。命令行里发生的事情是非常有趣的。[https://www.collinsdictionary.com/zh/dictionary/english/where-its-at]
Opensource.com 发布了许多关于如何充分利用系统的优秀文章,证明了命令行的流行。下面是 2020 年 Opensource.com 中关于 Linux 命令阅读量最高的一些文章:
### [使用这些技巧让 Bash history 更加有用][2]
Bash 是大多数 Linux 系统上的默认命令行 Shell。Seth Kenlon 编写了该指南,用于帮助你了解 Bash **history**。修改 Bash history 通常没有听起来那么危险,特别是当你带有目的地修改 Bash history 的时候。告诉 Bash 你希望它记住什么,甚至还可以直接通过删除你不想要或不需要的条目来重写历史。根据需要使用你的历史会话,明智地行使你对历史的权力。
### [如何在 Linux 终端中兼顾特性和性能][3]
Ricardo Gerardi 非常喜欢命令行应用程序他花了很多时间在终端上工作。Ricardo 投入了一些时间,把命令行变成了一个令人愉快的工作环境。你可以通过了解如何自定义终端应用程序、主题和提示符,来创建一个功能丰富、易于使用系统资源的终端。
### [放弃 Bash 转投拥有更优美配置的 Fish][4]
Matt Broberg 最近放弃了默认的命令行解释器 —— Bash转而支持 fish。fish 自豪地宣称自己是“90年代的命令行 shell”。以鱼为主题的“友好的交互式 shell”为命令行创造了更愉快的体验。阅读 Matt 的文章来进一步了解如何充分利用 fish。如果你不想再对你的终端修修补补换一个更漂亮的默认 shell把更多精力放在代码上不妨试一试 fish。
### [分析 Linux 里二进制文件的 10 种方式][5]
我们每天都在和二进制文件打交道但我们对它们的了解甚少。Linux 提供了一组丰富的工具使分析二进制文件变得轻而易举这些简单的命令和工具可以帮助你顺利完成分析二进制文件的任务。无论你的工作角色是什么了解这些工具的基本知识将帮助你更好地了解你的Linux系统。Gaurav Kamathe 介绍了一些最流行的用于管理二进制文件的 Linux 工具和命令,包括 **file**、**nm**、**strings** 和 **hexdump**
### [可用于 Linux 命令行的 4 种 Markdown 工具][6]
当涉及使用 Markdown 格式的文件时,命令行工具占据了主导地位。它们轻巧、快速、强大而又灵活,其中大多数遵循 Unix 把一件事情做好的哲学。Scott Nesbitt 回顾了 4 种命令行实用工具,它们可以帮助你更高效地处理 Markdown 文件。
### [禁用 atime 来提高 Linux 系统性能][7]
每当我在为家里的电脑升级 Linux 时,我都会把我通常要做的任务列出来。这些年来,它们已经成为了习惯:备份文件、还原系统、重新安装、恢复文件,然后重新安装额外的我最喜欢的应用程序。我还会对系统进行了一些调整。其中一个调整就是 **atime**,它是 Linux 里每个文件的三个时间戳之一。关掉 **atime** 是一种简单但有效的提升系统性能的方法。下面是关于 **atime** 的介绍,以及为什么它会有影响。
### [使用 fstrim 延长固态硬盘的寿命][8]
在过去的十年中固态硬盘SSD带来了一种全新的管理存储的方式。相比传统的机械硬盘固态硬盘具有一些优点比如安静、更酷的操作和更快的接口规格。当然新技术带来了新的维护和管理方法。Alan Formy-Duval 写了一个新的 **systemd** 服务让你更容易管理固态硬盘。
### [Linux 命令行工具的 5 种新式替代品][9]
在我们日常使用的 Linux 或 Unix 系统中我们会使用许多命令行工具来完成我们的工作并帮助我们更好地了解和管理我们的系统。多年来这些工具已经现代化并移植到了不同的系统中。然而总的来讲它们仍然保持着最初的想法、外观和感觉。近年来开源社区已经开发出了提供额外好处的替代工具。Ricardo Gerardi 向我们展示了如何通过这 5 种新的替代品改进旧的命令行工具来获得新的好处。
### 总结
把这些文章作为跳板,寻找你自己关于命令行的技巧和花招吧!这份清单里还缺少什么吗?请在下方评论,或者提交一篇你自己的文章!
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/1/linux-commands
作者:[Jim Hall][a]
选题:[lujun9972][b]
译者:[FYJNEVERFOLLOWS](https://github.com/FYJNEVERFOLLOWS)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/jim-hall
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/terminal_command_linux_desktop_code.jpg?itok=p5sQ6ODE (Terminal command prompt on orange background)
[2]: https://opensource.com/article/20/6/bash-history-control
[3]: https://opensource.com/article/20/7/performance-linux-terminal
[4]: https://opensource.com/article/20/3/fish-shell
[5]: https://opensource.com/article/20/4/linux-binary-analysis
[6]: https://opensource.com/article/20/3/markdown-apps-linux-command-line
[7]: https://opensource.com/article/20/6/linux-noatime
[8]: https://opensource.com/article/20/2/trim-solid-state-storage-linux
[9]: https://opensource.com/article/20/6/modern-linux-command-line-tools

View File

@ -1,122 +0,0 @@
[#]: subject: "Crop and resize photos on Linux with Gwenview"
[#]: via: "https://opensource.com/article/22/2/crop-resize-photos-gwenview-kde"
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
[#]: collector: "lujun9972"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
用 Gwenview 在 Linux 上裁剪和调整照片大小
======
Gwenview 是一个优秀的照片编辑器,适合业余摄影师在 Linux KDE 桌面上使用。
![Polaroids and palm trees][1]
一张好的照片可以是一个强大的东西。它从字面意义上表达了你所看到的,但它也讲述了你所经历的。小事也能说明很多问题:你在拍照时选择的角度,某样东西在画面中显得多么大,以及相比之下,那些有意识的选择的缺失。
照片通常并不意味着记录真实发生的事情,相反,它们会成为你(摄影师)如何看待发生的事情的洞察力。
这就是照片编辑如此普遍的原因之一。当你把照片发布到你的在线图片库或社交网络时,你不应该发布一张不能准确表达照片所囊括的感受的照片。但同样的道理,你也不应该为了剪掉在最后时刻将头伸进你的家庭快照的随机人物而成为一个专业的照片合成师。如果你使用的是 KDE你可以使用 Gwenview 这个休闲照片编辑器。
### 在 Linux 上安装 Gwenview
如果你正在运行 KDE Plasma 桌面,你可能已经安装了 Gwenview。如果你没有安装或者你正在使用一个不同的桌面而你想尝试 Gwenview那么你可以用你的软件包管理器安装它。
我建议同时安装 Gwenview 和 Kipi 插件集,它可以将 Gwenview 与几个在线照片服务连接起来,这样你就可以轻松上传照片。在 Fedora、Mageia 和类似发行版上:
```
`$ sudo dnf install gwenview kipi-plugins`
```
在 Debian、Elementary 和类似版本上:
```
`$ sudo apt install gwenview kipi-plugins`
```
### 使用 Gwenview
Gwenview 通常以两种方式之一启动。你可以在 Dolphin 中点击图片文件,并选择在 Gwenview 中打开它,或者你可以启动 Gwenview在文件夹中寻找照片Gwenview 或多或少地充当你的文件管理器。第一种方法是直接的方法,很适合快速方便地预览图片文件。第二种方法是当你浏览大量照片,不确定哪一个版本的照片是“正确的”时,你可能会使用。
无论你如何启动 Gwenview界面和功能都是一样的右边有一个工作区左边有一个面板。
![Gwenview][2]
(Seth Kenlon [CC BY-SA 4.0][3], Photo courtesy [Andrea De Santis][4])
在左边的面板下面,有三个标签。
* 文件夹:显示你电脑上的文件夹的树状视图,以便你可以浏览你的文件,寻找更多的照片。
* 信息:提供关于你目前正在查看的照片的元数据。
* 操作:允许你对当前的照片进行小的修改,如在横向和纵向之间旋转,调整大小,和裁剪。
Gwenview 能察觉文件系统,所以你可以按键盘上的**右**或**左***箭头,查看文件夹中的上一张或下一张照片。
要离开单张照片视图并查看一个文件夹中的所有图片,请点击顶部工具栏中的**浏览**按钮。
![Browsing photos in a folder][5]
Seth Kenlon[CC BY-SA 4.0][3]
你也可以同时拥有两种视图。点击 Gwenview 底部的**缩略图栏**按钮,可以将当前文件夹中的其他图片以电影胶片的形式看到,而当前选择的照片则在主面板中。
![Thumbnail view][6]
Seth Kenlon[CC BY-SA 4.0][3]
### 用 Gwenview 编辑照片
数码照片是很常见的,因此在网上发布或与朋友分享之前,需要对照片进行细微的调整也是同样常见。有非常好的应用可以编辑照片,事实上,其中最好的一个是另一个 KDE 应用,叫做 Krita(你可以在我的[给摄影者的 Krita][7] 文章中阅读我如何使用它来处理照片),但是小的调整不应该需要艺术学位。这正是 Gwenview 所确保的:用一个随意但功能强大的应用进行简单而快速的照片调整,并与你的 Plasma 桌面的其他部分整合。
我们大多数人对照片进行的最常见的调整是:
**旋转**:当你的相机没有提供正确的元数据让你的电脑知道一张照片是要以横向还是纵向观看时,你可以手动修复它。
**镜像**:许多笔记本电脑或面部摄像头模仿镜子,这很有用,因为这是我们习惯于看到自己的方式。但是,它会使写入倒退。**镜像**功能从右到左翻转图像。
**翻转**:在数码相机和笔记本电脑上不太常见,但在手机上,无论你怎么拿手机,屏幕都会翻转,这种用颠倒的设备拍照的现象并不少见。**翻转**功能可将图像旋转 180 度。
**调整大小**:数字图像现在通常具有超高清尺寸,有时这比你需要的要多得多。如果你通过电子邮件发送照片或将其发布在你想要优化加载时间的网页上,你可以将尺寸(和相应的文件大小)缩小到更小的尺寸。
所有这些工具都在**操作**侧面板或**编辑**菜单中可用。 这些操作具有破坏性,因此在你进行更改后,单击**另存为**以保存图像的_副本_。
![Cropping a photo in Gwenview][8]
Seth Kenlon[CC BY-SA 4.0][3],照片由 [Elise Wilcox][9] 提供)
### 分享照片
当你准备好分享照片时,单击顶部工具栏中的**分享**按钮,或转到**插件**菜单并选择**导出**。Gwenview 与 Kipi 插件集成在一起,可以在 [Nextcloud][10]、[Piwigo][11]、普通旧电子邮件以及 Google Drive、Flickr、Dropbox 等服务共享照片。
### Linux 上的照片编辑要点
Gwenview 拥有桌面照片管理器的所有必需品。如果你需要的不仅仅是基本功能,你可以在 Krita 或 [Digikam][12] 中打开一张照片并根据需要进行重大修改。对于其他一切从浏览、排名、标记和小调整Gwenview 都很方便。
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/2/crop-resize-photos-gwenview-kde
作者:[Seth Kenlon][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/seth
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/design_photo_art_polaroids.png?itok=SqPLgWxJ (Polaroids and palm trees)
[2]: https://opensource.com/sites/default/files/kde-gwenview-ui.jpg (Gwenview)
[3]: https://creativecommons.org/licenses/by-sa/4.0/
[4]: http://unsplash.com/@santesson89
[5]: https://opensource.com/sites/default/files/kde-gwenview-browse.jpg (Browsing photos in a folder)
[6]: https://opensource.com/sites/default/files/kde-gwenview-thumbnail.jpg (Thumbnail view)
[7]: https://opensource.com/article/21/12/open-source-photo-editing-krita
[8]: https://opensource.com/sites/default/files/kde-gwenview-crop.jpg (Cropping a photo in Gwenview)
[9]: http://unsplash.com/@elise_outside
[10]: https://opensource.com/article/20/7/nextcloud
[11]: https://opensource.com/alternatives/google-photos
[12]: https://opensource.com/life/16/5/how-use-digikam-photo-management

View File

@ -0,0 +1,197 @@
[#]: subject: "3 steps to start running containers today"
[#]: via: "https://opensource.com/article/22/2/start-running-containers"
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
[#]: collector: "lujun9972"
[#]: translator: "MjSeven"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
当下运行容器的 3 个步骤
======
在本教程中,你将学习如何在一个 pod 中运行两个容器来托管一个 WordPress 站点。
![堆积的运输容器][1]
无论你是将其作为工作的一部分、未来的工作机会或者仅仅是出于对新技术的兴趣,容器对很多人,即使是经验丰富的系统管理员,可能是非常难以应付的。那么如何真正开始使用容器呢?从容器到 [Kubernetes][2] 的成长路径是什么?另外,为什么有不止一条路径?如你所料,最好的起点就是现在。
### 1\. 了解容器
转念一想,从头开始可以追溯到早期 BSD 及其特殊的 chroot 监狱,时间久了还是直接跳到最近发生的事情吧。
不久前Linux 内核引入和 _cgroups_,允许你能够使用 _namespace_ 来“标记”进程。当你将进程组合到一个命名空间时这些进程的行为在命名空间之外好像不存在任何东西就像你把这些进程放入某种容器一样。当然容器是虚拟的它位于计算机内部它和你操作系统的其余进程使用相同的内核、RAM 和 CPU但你已经包含了这些进程。
预制的容器仅包含运行它所包含的应用程序必须的内容。使用容器引擎,如 [Podman][3]、Docker 或 CRI-O你可以运行容器化应用程序而无需像之前一样操作很多配置。容器引擎通常是跨平台的因此即使容器运行在 Linux 上,你也可以在其他 Linux、MacOS 或 Windows 上启动容器。
更重要的是,当需求量很大时,你可以运行同一应用程序的多个容器。
现在你知道了什么是容器,下一步是运行一个容器。
**[ 获取备忘录:[Pod、集群和容器之间有什么区别][4] ]**
### 2\. 运行一个容器
在运行容器之前,你应该有一个想要运行它的理由。你可以编一个,这有助于你对让容器创建过程感兴趣,这样你在运行容器过程中会收到鼓舞。毕竟,运行容器但不使用它提供的应用程序只能证明你没有注意到任何故障,但使用容器证明它可以工作。
我推荐从 WordPress 开始,它是一个很流行的 Web 应用程序,容易使用,所以一旦容器运行,你就可以测试使用它。虽然你可以轻松地配置一个 WordPress 容器,但还是有很多配置选项可以引导你发现更多容器选项(例如运行数据库容器)以及容器如何通信。
我使用 Podman它是一个友好、方便且无守护进程的容器引擎。如果你没有安装 Podman可以改用 Docker 命令。它们都是很棒的开源容器引擎,而且它们的语法是相同的(只需输入 `docker` 而不是 `podman`)。因为 Podman 没有守护进程,所以它需要更多的配置,这种代价是值得的。
如果你使用 Docker可以跳到 [WordPress 容器部分][5],否则,打开终端安装并配置 Podman
```
$ sudo dnf install podman
```
容器会产生许多进程,通常只有 root 用户有权创建数千个进程 ID。创建一个名为 `/etc/subuid` 的文件,定义一个适当的起始 UID 和大量合法的 PID这样就可以为你添加一些额外的进程 ID
```
seth:200000:165536
```
在名为 `/etc/subgid` 的文件中对你的组执行相同的操作。在这个例子中,我的主要组是 `staff`(对你来说可能是 `users`,或者和你的用户名一样,这取决于你的系统)。
```
staff:200000:165536
```
最后,确认你的用户可以管理很多命名空间:
```
$ sysctl --all --pattern user_namespaces
user.max_user_namespaces = 28633
```
如果你的用户无权管理超过 28,000 个命名空间,创建 `/etc/sysctl.d/userns.conf` 文件来增加数量并输入:
```
user.max_user_namespaces=28633
```
#### 运行 WordPress 容器
现在,无论你使用的是 Podman 还是 Docker你都可以从在线容器仓库中下载 WordPress 容器并运行它。你可以使用以下 Podman 命令完成所有这些操作:
```
$ podman run --name mypress \
-p 8080:80 -d wordpress
```
给 Podman 一会来找到容器,从互联网下载它,然后启动。
在收到终端返回提示后启动 Web 浏览器,打开 `localhost:8080`。WordPress 正在运行,等待你进行设置。
![WordPress 容器][6]
(Seth Kenlon, [CC BY-SA 4.0][7])
不过,你很快就会遇到障碍,因为 WordPress 使用数据库来存储数据,因此你需要为其提供一个数据库。
在继续之前,停止并删除 WordPress 容器:
```
$ podman stop mypress
$ podman rm mypress
```
### 3\. 在 pod 中运行容器
容器在设计上是独立的,正如它们的名字所暗示的那样。在容器中运行的应用程序不应该与在容器外的应用程序或基础设置进行交互。因此,当一个容器需要另一个容器才能运行时,一种解决方案是将这两个容器放在一个更大的容器中,称为 _pod_。Pod 确保其容器可以共享重要的命名空间以便相互通信。
创建一个新的 pod为 pod 提供一个名称,以及希望能够访问的端口:
```
$ podman pod create \
\--name wp_pod \
\--publish 8080:80
```
确认 pod 存在:
```
$ podman pod list
POD ID        NAME     STATUS    INFRA ID      # OF CONTAINERS
100e138a29bd  wp_pod   Created   22ace92df3ef   1
```
#### 将容器添加到 pod
现在你已经为相互依赖的容器创建了一个 pod你可以通过指定一个运行的 pod 来启动每个容器。
首先,启动一个数据库容器。你可以创建自己的凭据,只要在 WordPress 连接到数据库时使用相同的凭据。
```
$ podman run --detach \
\--pod wp_pod \
\--restart=always \
-e MYSQL_ROOT_PASSWORD="badpassword0" \
-e MYSQL_DATABASE="wp_db" \
-e MYSQL_USER="tux" \
-e MYSQL_PASSWORD="badpassword1" \
\--name=wp_db mariadb
```
接下来,在同一个 pod 中启动 WordPress 容器:
```
$ podman run --detach \
\--restart=always --pod=wp_pod \
-e WORDPRESS_DB_NAME="wp_db" \
-e WORDPRESS_DB_USER="tux" \
-e WORDPRESS_DB_PASSWORD="badpassword1" \
-e WORDPRESS_DB_HOST="127.0.0.1" \
\--name mypress wordpress
```
现在启动你最喜欢的网络浏览器并打开 `localhost:8080`
这一次设置会正常进行。WordPress 会连接到数据库,因为你在启动容器时传递了这些环境变量。
![WordPress 启动][8]
(Seth Kenlon, [CC BY-SA 4.0][7])
创建用户账户后,你可以登录查看 WordPress 仪表板。
![WordPress dashboard running in a container][9]
(Seth Kenlon, [CC BY-SA 4.0][7])
### 下一步
你已经创建了两个容器,并在一个 pod 中运行了它们。你现在已经了解了如何在自己的服务器上运行容器及服务。如果你想迁移到云,容器非常适合你。使用像 Kubernetes 和 OpenShift 这样的工具,你可以自动化启动[集群上的容器和 pod][10]。如果你正在考虑采取下一步行动,阅读 Kevin Casey 的 [3 个开始使用 Kubernetes 的方法][11],并尝试他提到的 Minikube 教程。
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/2/start-running-containers
作者:[Seth Kenlon][a]
选题:[lujun9972][b]
译者:[MjSeven](https://github.com/MjSeven)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/seth
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/bus-containers.png?itok=d_4QhZxT (Shipping containers stacked)
[2]: https://opensource.com/tags/kubernetes
[3]: https://www.redhat.com/sysadmin/podman-guides-2020
[4]: https://enterprisersproject.com/cheat-sheet-what-s-difference-between-pod-cluster-and-container
[5]: tmp.1zBHYsK8TH#wp
[6]: https://opensource.com/sites/default/files/uploads/podman-wordpress.jpg (WordPress running in a container)
[7]: https://creativecommons.org/licenses/by-sa/4.0/
[8]: https://opensource.com/sites/default/files/uploads/wordpress-setup.jpg (WordPress setup)
[9]: https://opensource.com/sites/default/files/uploads/wordpress-welcome.jpg (WordPress dashboard running in a container)
[10]: https://enterprisersproject.com/article/2020/9/pod-cluster-container-what-is-difference
[11]: https://enterprisersproject.com/article/2019/11/kubernetes-3-ways-get-started

View File

@ -0,0 +1,169 @@
[#]: subject: "Difference Between Ubuntu 22.04 and Ubuntu 20.04 LTS"
[#]: via: "https://www.debugpoint.com/2022/04/difference-ubuntu-22-04-20-04/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lujun9972"
[#]: translator: "PeterPan0106"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Ubuntu 22.04 LTS 与20.04 LTS 的变化
======
以下将为准备从 20.04 LTS 迁移到 22.04 LTS 的用户带来十个最重要的变化。
如果你是一位 [Ubuntu 20.04 LTS Focal Fossa][1] 用户并准备迁移到 [Ubuntu 22.04 LTS “Jammy Jellyfish”][2] 这篇文章将为你提供一些指引。在这两个 LTS 版本之间存在巨大的结构性变化这在LTS分支中一般比较罕见。对比下来不难发现本次更新一次性改变了大量的内容。
了解了这一点之后,本文将针对普通用户关切的方面,支出十个发生根本性变化的特性,并为用户提供一些指引。
### Ubuntu 22.04 LTS 与 Ubuntu 20.04 LTS 特性变化
#### 1\. Logo颜色和 Plymouth
第一个你会注意到的视觉变化便是基调颜色从之前另外两个“棕橙色”变为了“橙色”。 同时 Canonical 将 logo 进行了修改,这一点可以体现在开机时 Plymouth 动画中。新的 logo 乍一看会显得有些怪异,但看久了会比较顺眼,至少我认为这是一个十分与众不同的 logo 。
![New Ubuntu logo and Plymouth][3]
#### 2\. 安装
Ubuntu 的默认安装器并没有显著的变化。我们其实更希望最新的 [基于 Flutter 的安装器][4] 能够最终落地,但并没有发生变化。基于此,整体安装流程并未发生变化。我仅能够观察到确认框和按钮的基调颜色发生了变化。从功能角度而言安装流程并未发生任何变化。
![Colour differences between two LTS Versions][5]
#### 3\. 锁屏与登陆界面、桌面的初始界面以及壁纸
锁屏与登陆界面变得更为精细和无边界化,主要包括密码框以及按钮。初次登录时的布局和壁纸发生了很大的变化。桌面的 “Home” 快捷方式被重命名为“Home”而并非你的用户名但回收站快捷方式则移到了左侧的任务栏中并被隔断与其他任务栏图标隔开了。
除此之外的顶部状态栏并未大改。系统托盘目录则进行了细微的修正,布局更为宽松。这些变化主要来自于 [GNOME 42][6] 的变化。
日历菜单并未发生变化。
![Ubuntu 20.04 Vs Ubuntu 22.04 Login Screen][7]
![Ubuntu 20.04 Vs Ubuntu 22.04 Lock Screen][8]
![Difference between Ubuntu 20.04 and Ubuntu 22.04 default look][9]
#### 4\. 桌面布局和 GNOME 版本升级
一个十分明显的变化就是 GNOME 版本由 GNOME 3.36 升级到了 GNOME 42。这是所有升级用户都会看到的显而易见的升级。 Ubuntu 22.04 LTS 搭载的 GNOME 42 带来了水平的工作区视图以及水平的应用视图。所以迁移之后手势从垂直转变为水平会有一些不习惯,但用一段时间就好了。
如果你的设备是笔记本电脑或触控屏,经过一点学习之后新的 GNOME 42 手势会给你十分顺滑的使用体验。以下是桌面、应用和工作区的对比图。
![Activities View Difference Ubuntu 20.04 and 22.04][10]
![Application View Difference Ubuntu 20.04 and 22.04][11]
#### 5\. 新的基调颜色与显示样式
有一个我非常喜欢的变化是最新的明亮和暗黑主题。早先 Ubuntu 有三个选择,明亮、暗黑和混合(标准)。这在 GNOME 42 中发生了改变因为其本身就带有内建的明亮和暗黑模式。另一方面,一个新的基调颜色选项允许用户在全局进行自定义(这并不是 GNOME 42 的一部分)。
当然你还不能像 KDE Plasma 一样自定义颜色的具体参数,而仅能从预设的几种颜色中进行选择。这些变化大多来自于最近的 libadwaita 和 GTK4 对 GNOME Shell 和本地应用程序的移植。
而当你在 Ubuntu 22.04 LTS 中打开暗黑模式,他会自动应用于所有的支持的应用,这是一个与老版本十分显著的区别。
![Accent Color and other changes][12]
![How Accent colour change impact looks in Ubuntu 22.04 LTS][13]
#### 6\. 文件管理
文件管理器的版本由 3.36.x 升级到了 42。区别是你能看到更为紧凑的设计、在文字和选项之间更为合理的布局以及顶部控制栏的小工具风格这一切都归功于 GTK4 和对已有错误的修正。文件中的地址栏有些不同,目录之间有一个分隔符,而汉堡菜单在最后。当然,这些变化都较为细微,你也不会感受到他们带来太多的影响。
![Files Difference Ubuntu 20.04 vs 22.04][14]
#### 7\. 截图工作流的变化
另一个值得注意并且需要用户进行学习的是截图方式的改变。这一功能被完全重做。早先你按下截图键时,会自动截图并保存到图片文件夹中。现在基于内建于 GNOME 42 的截图工具和录屏工具,这一方式被完全改变。
[][15]
另见: Ubuntu Budgie 22.04 LTS 新特性和发布细节
当你在截图时,你会发现有三个选项,你将可以选择全屏截图或者只截一部分。更重要的你还能选择是否让光标出现在截图中,此外还有录屏功能可选。选择完成之后点击捕捉键,这张图片将在被保存到图片文件夹的同时复制到你的剪切板。
![New Screenshot tool in Ubuntu 22.04 LTS][16]
总体而言,相较于之前多了一个步骤。
在所有应用程序窗口顶部的右键菜单上,增添了一个新的截图键选项。
![Take Screenshot option in top bar menu][17]
#### 8\. 火狐浏览器成为了一个 Snap 程序版本
此外,火狐浏览器在本次更新中变成了一个 Snap 程序版本。而此前在 20.04 LTS 中火狐浏览器以 deb 包形式呈现。所以对于一般用户而言区别不大。
但是火狐浏览器的 Snap 沙箱运行模式使得安装 GNOME 扩展工具时会产生问题,同时在同等硬件条件之下相较于之前的版本会显得更慢。
这个最为常用的应用的 Snap 迁移所带来的后续影响我们拭目以待。
#### 9\. 不同的窗口设置
在设置中出现了一个新的面板,多任务。多任务选项允许你调整触发角以及激活窗口边缘。此外你可以制定工作区的数量,并设置自动删除空的工作区。而针对多屏幕用户,现在可以选择仅在主屏幕上显示工作区或是在所有屏幕上显示工作区。
![New Multitasking Panel in Settings][18]
#### 10\. 主题和应用更新
此外,软件的变化带来了不同的响应外观并能够适应任何形式。应用商店同时带来了新的界面,包含了按照类别分类的软件视图以及编辑之选栏目。
应用详情页面变得更加易读,重要的信息例如总下载大小、评分、安全标记以及应用截图都以更可辨别地方式呈现。
![GNOME Software Home page difference][19]
![GNOME Software Details page difference][20]
最后,这两个版本的核心差异分为软件包、官方桌面环境主题和错误修正上。下面是对重要软件包版本变化的一个对比。
**20.04** | **22.04**
---|---
GCC 10.3 | GCC 11.2
Hplip 3.20.3 | Hplip 3.21.12
LibreOffice 6.4.7 | LibreOffice 7.3.2
[not introduced] | Pipewire 0.3.48
Python3 3.8.2 | Python3 3.10.1
Samba 4.13 | Samba 4.15
Systemd 245.4 | Systemd 249.11
### 总结
总而言之,这是 Ubuntu LTS 分支历次更新中变化最大的一次,不论是从视觉上还是特性角度。
我希望这个指南能够令读者了解两个版本之间的主要区别以及应当预期什么样的使用体验。
祝好
via: https://www.debugpoint.com/2022/04/difference-ubuntu-22-04-20-04/
作者:[Arindam][a]
选题:[lujun9972][b]
译者:[PeterPan0106](https://github.com/PeterPan0106)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.debugpoint.com/author/admin1/
[b]: https://github.com/lujun9972
[1]: https://www.debugpoint.com/2021/08/ubuntu-20-04-3-release/
[2]: https://www.debugpoint.com/2022/01/ubuntu-22-04-lts/
[3]: https://www.debugpoint.com/wp-content/uploads/2022/01/New-Ubuntu-logo-and-playmouth.jpg
[4]: https://github.com/canonical/ubuntu-desktop-installer
[5]: https://www.debugpoint.com/wp-content/uploads/2022/04/Colour-differences-between-two-LTS-Versions.jpg
[6]: https://www.debugpoint.com/2022/03/gnome-42-release/
[7]: https://www.debugpoint.com/wp-content/uploads/2022/04/Ubuntu-20.04-Vs-Ubuntu-22.04-Lock-and-Login-Screen-1024x431.jpg
[8]: https://www.debugpoint.com/wp-content/uploads/2022/04/Ubuntu-20.04-Vs-Ubuntu-22.04-Lock-Screen-1024x408.jpg
[9]: https://www.debugpoint.com/wp-content/uploads/2022/04/Difference-between-Ubuntu-20.04-and-Ubuntu-22.04-default-look-1024x421.jpg
[10]: https://www.debugpoint.com/wp-content/uploads/2022/04/Activities-View-Difference-Ubuntu-20.04-and-22.04-1024x425.jpg
[11]: https://www.debugpoint.com/wp-content/uploads/2022/04/Application-View-Difference-Ubuntu-20.04-and-22.04-1024x420.jpg
[12]: https://www.debugpoint.com/wp-content/uploads/2022/04/Accent-Color-and-other-changes-1024x417.jpg
[13]: https://www.debugpoint.com/wp-content/uploads/2022/04/How-Accent-colour-change-impact-looks-in-Ubuntu-22.04-LTS.jpg
[14]: https://www.debugpoint.com/wp-content/uploads/2022/04/Files-Difference-Ubuntu-20.04-vs-22.04-1024x359.jpg
[15]: https://www.debugpoint.com/2022/04/ubuntu-budgie-22-04-lts/
[16]: https://www.debugpoint.com/wp-content/uploads/2022/04/New-Screenshot-tool-in-Ubuntu-22.04-LTS.jpg
[17]: https://www.debugpoint.com/wp-content/uploads/2022/04/Take-Screenshot-option-in-top-bar-menu.jpg
[18]: https://www.debugpoint.com/wp-content/uploads/2022/04/New-Multitasking-Panel-in-Settings.jpg
[19]: https://www.debugpoint.com/wp-content/uploads/2022/04/GNOME-Software-Home-page-difference-1024x416.jpg
[20]: https://www.debugpoint.com/wp-content/uploads/2022/04/GNOME-Software-Details-page-difference-1024x417.jpg
[21]: https://t.me/debugpoint
[22]: https://twitter.com/DebugPoint
[23]: https://www.youtube.com/c/debugpoint?sub_confirmation=1
[24]: https://facebook.com/DebugPoint

View File

@ -1,123 +0,0 @@
[#]: subject: "5 Less Popular Features that Make Ubuntu 22.04 LTS an Epic Release"
[#]: via: "https://www.debugpoint.com/2022/04/ubuntu-22-04-release-unique-feature/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lujun9972"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
使 Ubuntu 22.04 LTS 成为史诗版本的 5 个不太流行的功能
======
一份关于 Ubuntu 22.04 LTS 的次要特点的列表,这些特点使它成为迄今为止最好的 LTS 版本之一。
Canonical 的最新 LTS 版本 [Ubuntu 代号为 “Jammy Jellyfish”][1] 受到了全球用户的好评。有数百个新的微小功能,也有一些不太流行的功能,没有引起人们的注意。因此,这里有五个独特的 Ubuntu 22.04 版本功能,我们认为这些功能使它成为一个史诗般的版本。
![Ubuntu 22.04 LTS Desktop \(GNOME\)][2]
### Ubuntu 22.04 发布 五个独特的功能
#### 为数据驱动的方案进行了优化
数据分析和处理是当今每个企业的核心。而要做到这一点你需要巨大的计算能力。Ubuntu 22.04 LTS 带来了开箱即用的 [NVIDIA 虚拟 GPUvGPU][3] 驱动支持。这意味着你可以利用 NVIDIA 虚拟 GPU 软件,使你能够在从物理 GPU 服务器共享的虚拟机中使用 GPU 计算能力。
不仅如此,如果你的业务依赖于 SQL ServerUbuntu LTS for Azure 带来了 Ubuntu 中的 SQL Server它由 “Micro$oft” 支持,提供优化的性能和可扩展性。
#### 改进的活动目录集成
此外,许多企业在多个工作站中为整个企业用户部署 Ubuntu。而且部署工作站策略以监测和控制用户访问和各种关键业务控制非常重要。
活动目录实现了基于策略的工作站管理(在 Ubuntu 20.04 中引入),在这个版本中得到了进一步改善。除此之外,这个版本还带来了 [ADsys][4] 客户端,它有助于通过命令行远程管理组策略、权限升级和远程脚本执行。活动目录现在也支持从这个版本开始与高级组策略对象的安装程序集成。
#### 实时内核支持
此外,在 Ubuntu 22.04 LTS 发布期间Canonical 宣布的一个有趣的消息是提供“实时”内核选项现在是测试版。对于电信和其他行业来说一个低延迟的操作系统对于时间敏感的工作是必需的。因此考虑到这一点和渗透到这些领域的愿景Ubuntu 22.04 LTS 带来了一个应用了 PREEMPT_RT 补丁的实时内核构建。它可用于 x86_64 和 AArch64 架构。
然而,[补丁][5]还没有在主线内核中出现,希望它能很快能出现。
#### 最新的应用、软件包和驱动程序
除了上述变化之外,这个版本还带来了大量的软件包和工具链的升级。例如,这个版本带来了基于用途的多种 Linux 内核类型,如 Ubuntu 桌面可以选择使用 [Kernel 5.17][6],而硬件启用的内核仍然是 5.15。
不仅如此Ubuntu Server 的特点是长期支持 [Kernel 5.15][8],而 Ubuntu Cloud 镜像可以选择使用与云供应商合作的更优化的内核。
此外,如果你是 NVIDIA 用户值得一提的是ARM64 上的 NVIDIA 驱动的 Linux 限制模块现在已经可用(在 x86_64 中已经可用)。你可以使用 [ubuntu-drivers][9] 程序来安装和配置 NVIDIA 驱动。
由于核心模块和子系统的存在一个完整的操作系统可以完美无缺地工作。因此考虑到这一点Ubuntu 22.04 LTS 对它们都进行了仔细的升级,以迎合这个很好的版本。以下是简介。
* GCC 11.2.0
* binutils 2.38
* glibc 2.35
* Python 3.10.4
* Perl 5.34.0
* LLVM 14
* golang 1.18
* rustc 1.58
* OpenJDK 11可选使用 OpenJDK 18
* Ruby 3.0
* PHP 8.1.2Apache 2.4.52
* PostgreSQL 14.2
* Django 3.2.12
* MySQL 8.0
* 更新的 NFS 以及 Samba Server
* Systemd 249.11
* OpenSSL 3.0
* qemu 6.2.0
* libvirt 8.0.0
* virt-manager 4.0.0
#### 性能提升
但这还不是全部。由于一些长期等待的更新,你应该体验到更快的 Ubuntu 22.04 Jammy Jellyfish 体验,这些体验最终会在这个版本中出现。
首先GNOME 桌面的[三重缓冲代码]长期悬而未决。当先前的帧缓冲落后时,三重缓冲会自动启用,它在 Intel 和树莓派驱动中产生了更快的桌面性能。不仅如此,代码还监控最后一帧,以便系统不会遇到过量缓冲的情况。
其次,改进的电源管理,在运行时对 AMD 和 NVIDIA 的 GPU 起作用,将帮助笔记本电脑用户。
此外Wayland 现在是大多数系统的默认显示服务器,除了 NVIDIA GPU 硬件默认为 X11。Wayland 为你提供了更快的跨应用的桌面体验,包括网络浏览器。
最后,定制的 GNOME 42 及其[独特功能][11](例如平衡和省电电源配置文件)为重度笔记本电脑用户提供了更多优势。 此外,带有浅色/深色外观的新强调色和选定 GNOME 模块的 GTK4/libadwaita 端口只是这个史诗般的 Ubuntu 22.04 LTS 版本的一个插件。
### 结论
总而言之,我相信这是 Canonical 发布的最好的 LTS 版本之一,就上述所有内容的变化和许多其他方面而言。
我们希望它受到好评并在未来几天保持稳定。
* * *
我们带来最新的技术、软件新闻和重要的东西。通过 [Telegram][12]、[Twitter][13]、[YouTube][14] 和 [Facebook][15] 保持联系,不错过任何更新!
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/2022/04/ubuntu-22-04-release-unique-feature/
作者:[Arindam][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.debugpoint.com/author/admin1/
[b]: https://github.com/lujun9972
[1]: https://www.debugpoint.com/2022/01/ubuntu-22-04-lts/
[2]: https://www.debugpoint.com/wp-content/uploads/2022/04/Ubuntu-22.04-LTS-Desktop-GNOME-1024x580.jpg
[3]: https://docs.nvidia.com/grid/latest/grid-vgpu-release-notes-ubuntu/index.html
[4]: https://github.com/ubuntu/adsys
[5]: https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-stable-rt.git/
[6]: https://www.debugpoint.com/2022/03/linux-kernel-5-17/
[8]: https://www.debugpoint.com/2021/11/linux-kernel-5-15/
[9]: https://launchpad.net/ubuntu/+source/ubuntu-drivers-common
[10]: https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1441
[11]: https://www.debugpoint.com/2022/03/gnome-42-release/
[12]: https://t.me/debugpoint
[13]: https://twitter.com/DebugPoint
[14]: https://www.youtube.com/c/debugpoint?sub_confirmation=1
[15]: https://facebook.com/DebugPoint

View File

@ -0,0 +1,42 @@
[#]: subject: "Bloomberg Open Sources Memray, A Python Memory Profiler"
[#]: via: "https://www.opensourceforu.com/2022/04/bloomberg-open-sources-memray-a-python-memory-profiler/"
[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
彭博社开源 Memray一个 Python 内存分析器
======
![soft][1]
Memray 是一个内存分析器,由彭博社发,现在已经开源。它可以跟踪 Python 代码中的内存分配,包括本地扩展和 Python 解释器本身。内存剖析是了解程序如何利用内存的有力工具,因此可以检测内存泄漏或确定程序中哪些区域消耗的内存最多。
与 py-spy 等抽样内存剖析器相比Memray 可以跟踪每个函数调用,包括对 C/C++ 库的调用,并详细显示调用栈。彭博社称,这并不以牺牲性能为代价,剖析只使解释代码的速度变慢一点。然而,原生代码剖析的速度较慢,因此需要直接启用。
Memray 可以根据获得的内存消耗数据生成各种报告,包括火焰图,这对快速、准确地识别最常见的代码路径很有价值。
据 EgdeDB 的联合创始人兼 CEO Yury Selivanov 称,该工具提供了以前无法获得的对 Python 应用的洞察力。Memray 可以用来从命令行中执行和分析 Python 应用。
```python
$ python3 -m memray run -o output.bin my_script.py
$ python3 -m memray flamegraph output.bin
```
另外,你可以使用 pytest-memray 将 Memray 集成到你的测试套件中。你也可以用 -native 命令行选项对所有的 C/C++ 调用进行剖析,或者用 -live 命令行选项在程序执行过程中实时分析内存分配。Memray 可以在 Linux x86/64 系统上用 python3 -m pip install memray 来安装。
--------------------------------------------------------------------------------
via: https://www.opensourceforu.com/2022/04/bloomberg-open-sources-memray-a-python-memory-profiler/
作者:[Laveesh Kocher][a]
选题:[lkxed][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者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/04/soft-1-696x363.jpg

View File

@ -0,0 +1,167 @@
[#]: subject: "Hands on With GNOMEs New Text Editor for Linux Users"
[#]: via: "https://itsfoss.com/gnome-text-editor/"
[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/"
[#]: collector: "lujun9972"
[#]: translator: "aREversez"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
GNOME 新文本编辑器尝鲜
======
如果你是 It's FOSS 的忠实读者,你可能读过这样一篇文章: [GNOME 计划用自家的文本编辑器取代 Gedit][1]。
没错GNOME 推出了一款全新的文本编辑器,名字就叫做 Text Editor中文译名文本编辑器
尽管 GNOME 桌面的默认文本编辑器还是 Gedit但是新编辑器 Text Editor 已经和 GNOME 42 一起发布了。
也就是说,这款新编辑器可以在 Ubuntu 最新的长期发行版或者其他应用 GNOME 42 的发行版上获取(笔者现在使用的正是 Ubuntu 22.04)。
感兴趣吗?在本文,笔者将分享这款编辑器的使用体验以及安装步骤。
### Text Editor 使用体验
Text Editor 基于 [备受争议的 libadwaita 库][3],遵循着其开发委员会的设计新理念,采用圆角边框,外观优美典雅,颇具现代化特点。
但就功能而言,这款软件并没有什么特别的“过人之处”。毕竟,它并不能取代 [Atom 或者 VS Code][4] 这类专业的代码编辑器。但同时,它也绝不像 Windows 的记事本那样“平平无奇”。
那么,让我们来一睹它的“风采”吧!
#### 会话保存功能
默认情况下Text Editor 会自动打开上次编辑的文件,这一功能可以让你快速继续之前的工作。
你可以通过首选项下的还原会话选项,开启或关闭该功能。
![][5]
你还可以搜索文件记录,打开最近处理的文件。请注意:清除文件记录(见上图 Clear History会清除最近打开的文件列表。
#### Themes and in-built themes 主题与内置主题
Text Editor 与其他新的 GNOME 软件一样,自带三种主题风格:跟随系统、浅色模式和深色模式。如果你选择了跟随系统,编辑器会根据系统主题(浅色或深色)自动变换自身的深浅主题色。
![System theme option gnome text editor][6]
此外,在首选项下还设有八个主题(深浅色模式下主题有所不同),为用户提供了更多的选择。
![Theme options under preference][7]
只需点击选中,主题即可生效。
#### 文件修改以及未保存文件的处理
如果你修改了某个文件但是没能成功保存,在你下次打开 Text Editor 时,它会再次打开该文件并提醒你保存。
![Unsaved files are more prominently marked][8]
不过,在你修改文件后点击关闭窗口时,编辑器会提醒你选择保存修改还是放弃修改。
![][9]
相比之下,[Gedit 有自动保存选项][10],无需插件即可使用,而 Text Editor 没有这一功能。
#### 暂无插件
提到插件不得不承认这款新的编辑器还没有推出插件功能。而另一方面Gedit 有着良好的插件生态,所以它的功能更加强大。
不过我不确定 Text Editor 未来是否会引入支持插件的功能。
#### 代码语法高亮
近年来代码语法高亮可以说是文本编辑器的一个必备功能了。Text Editor 也提供了这一功能,支持各种程序语言语法高亮。
通常来说,语法高亮的前提是代码文件要有对应的后缀名。不过,我发现 Text Editor 甚至可以在文件保存之前就识别出 bash 脚本和 C/C++ 程序,并对其语法标出高亮。
![Bash scripts. C/C++ code are detected even without file extension][11]
#### 快捷键
笔者喜欢在常用软件里使用快捷键,因为这样效率会更高。
Text Editor 的各种操作都支持快捷键。你可以点击软件右上角的三条横线(☰ 符号),看到“快捷键”选项;或者直接敲快捷键 Ctrl+?调出“快捷键”窗口。
![Keyboard shortcuts in Text Editor][12]
#### 查找和替换
Text Editor 有着完善的查找替换功能。它有三种模式可供选择:正则表达式、区分大小写以及匹配精准字符。
![search replace gnome text editor][13]
#### 更多功能
Text Editor 与 Gedit 一样,还具备一些其他功能:
* 拼写检查
* 显示行号
* 自动缩进
* 空格空格和制表位缩进
* 大小写转换
* 自动换行
#### Text Editor 的局限
归根结底Text Editor 依旧是一个文本编辑器,无法也无意用来打开 doc 文件。如果你执意用它要打开 doc 文件你看到的就只有一堆乱码。当然pdf 文件也是如此。
![][14]
此外Text Editor 并不是专门用来写复杂代码的,它无法取代 VS Code 等代码编辑器。如果说偶尔用来读读代码或者写写 shell 脚本,倒也无伤大雅,但是它并不具备管理项目文件夹和运行代码等功能。
### 安装 Text Editor
就像笔者在开头所说Text Editor 已经和 GNOME 42 一起发布了,不过它并不属于默认安装的软件。在 Ubuntu 22.04Universe 仓库里就有 Text Editor你可以通过输入下面的命令进行安装
```
sudo apt install gnome-text-editor
```
其他应用 GNOME 42 的发行版也可以获取 Text Editor请在安装前查看所用系统的[桌面环境版本][15]。
安装完成后,可以点击屏幕左上角的“活动”按钮,查找打开 Text Editor。它的图标与 Gedit 的图标相似,但设计更为新颖。
![][16]
### 总结
[Gedit][17] 是一款非常完善的文本编辑器,也是 GNOME 桌面环境长期以来的预装软件。多年前Gedit 的发展尚且不足,不过后期又迎来了新的发展。然而,如今 GNOME 团队正在努力为 GTK 4 和 libadwaita 改进核心应用程序。
Text Editor 很像 Gedit 的翻版两者有着相似的界面和功能。不过Text Editor 与新版 GNOME 的设计风格更加统一,使用体验也更加流畅。
这款新的编辑器日后很有可能会成为 GNOME 的默认文本编辑器。不过让人感兴趣的是Text Editor 将来是否会拥有自己的插件生态呢?
--------------------------------------------------------------------------------
via: https://itsfoss.com/gnome-text-editor/
作者:[Abhishek Prakash][a]
选题:[lujun9972][b]
译者:[aREversez](https://github.com/aREversez)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/abhishek/
[b]: https://github.com/lujun9972
[1]: https://news.itsfoss.com/gnome-text-editor-to-replace-gedit/
[2]: https://itsfoss.com/ubuntu-22-04-release-features/
[3]: https://news.itsfoss.com/gnome-libadwaita-library/
[4]: https://itsfoss.com/visual-studio-code-vs-atom/
[5]: https://itsfoss.com/wp-content/uploads/2022/04/restore-session-option-gnome-text-editor-1.png
[6]: https://itsfoss.com/wp-content/uploads/2022/04/system-theme-option-gnome-text-editor-800x560.png
[7]: https://itsfoss.com/wp-content/uploads/2022/04/theme-options-gnome-text-editor.png
[8]: https://itsfoss.com/wp-content/uploads/2022/04/unsaved-file-gnome-text-editor-800x481.png
[9]: https://itsfoss.com/wp-content/uploads/2022/04/save-prompt-gnome-text-editor.png
[10]: https://itsfoss.com/how-to-enable-auto-save-feature-in-gedit/
[11]: https://itsfoss.com/wp-content/uploads/2022/04/syntax-highlight-gnome-text-editor.png
[12]: https://itsfoss.com/wp-content/uploads/2022/04/keyboard-shortcuts-gnome-text-editor-800x637.png
[13]: https://itsfoss.com/wp-content/uploads/2022/04/search-replace-gnome-text-editor-800x477.png
[14]: https://itsfoss.com/wp-content/uploads/2022/04/doc-in-gnome-text-editor-800x485.png
[15]: https://itsfoss.com/find-desktop-environment/
[16]: https://itsfoss.com/wp-content/uploads/2022/04/new-gnome-text-editor.png
[17]: https://wiki.gnome.org/Apps/Gedit

View File

@ -0,0 +1,169 @@
[#]: subject: "How to Install h.264 decoder on Ubuntu Linux"
[#]: via: "https://itsfoss.com/install-h-264-decoder-ubuntu/"
[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/"
[#]: collector: "lujun9972"
[#]: translator: "hwlife"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
怎样在 Ubuntu Linux 安装 h.264 解码器
======
当你开始使用 [新安装的 Ubuntu 系统][1] 并尝试打开一个 MP4 文件进行播放时,它可能会显示一个错误,即:
_**播放这个文件要求 H.264 (高端类) 解码器 但是没有安装。**_
![当播放特定媒体文件时Ubuntu 的默认视频播放器会显示错误][2]
你可能会猜到这是怎么了。系统没有安装所需的多媒体解码器阻止了视频播放器不能播放视频文件。
所以,解决方案是什么?安装所需的解码器。怎么做呢?
我将讨论解决这个问题的三种方法:
1. 只安装所需的解码器:它可能会让所需的文件播放但是一些其它格式的文件仍然会处在失去解码器的状态。
2. 一次安装多种多媒体解码器:它会安装解码器之外,还会安装其它你不需要的软件包,类似微软的字体库一样。
3. 安装一个不同的视频播放器:像 VLC 和 MPV 视频播放器默认状态下对解码器有更好的支持。对大多数常规视频文件来说,你不必分别安装它们。
如果你遵从我的建议,我建议你采用第二种和第三种方法。为什么?一会你就知道了。
### 在 Ubuntu Linux 获取 h264 解码器
这里我使用 Ubuntu Linux。第一和第三种方法应该适用于其它发行版但是第二种方法不适用因为所提到的包 (常常) 是 Ubuntu 所独有的。
#### 方法 1: 只安装所需的解码器 (不建议)
当你看到这个错误,它给你一个叫做 “在 Ubuntu 软件中心查找 ” 的选项。点击这个选项打开软件中心,可能显示(或不显示)一些软件包将会在你的系统上安装 h264 解码器。
![在 Ubuntu 软件中心可能提供 h264 解码器软件包][3]
软件包名可能听起来很相似但是需要带有“糟糕”设置的 GStreamer 多媒体解码器。检查软件包的描述。
或者,你可以使用这个命令在终端来安装软件包:
```
sudo apt install gstreamer1.0-plugins-bad
```
如果你对终端不了解,请注意它将要求使用你的账户密码。**当你输入你的密码时,屏幕什么都不显示**。这是 Linux 的方式。你盲输密码然后按回车键。
一旦软件包安装完成,再次打开文件看看是否能够正常播放。
这可能对你有用,但是故事并未结束。你可能有其它格式的一些视频文件要求一些其它的 h264 解码器 或者其它解码器。
![其它的解码器播放视频你可能仍然有问题][4]
你可以像这样尝试安装更多的解码器:
```
sudo apt install libavcodec-extra gstreamer1.0-plugins-ugly gstreamer1.0-libav
```
然而,在 Ubuntu 有一个 [ 安装多媒体解码器更加方便的方法 ][5] 并且在下一节我会展示给你。
#### 方法 2: 安装所有多媒体解码器 (建议)
Ubuntu 系统提供了一个名字叫做 ubuntu-restricted-extras 的原始软件包,由许多常规的音频和视频解码器以及像类似微软字体库那样无用的一些软件包组成。
安装这个软件包你将不用再担心多媒体解码器的问题了。
在 Ubuntu 打开终端并键入以下命令:
```
sudo apt install ubuntu-restricted-extras
```
由于这个原始软件包包含类似微软字库那样用不到的一些多余的软件,你将不得不接受最终用户许可协议 (EULA) 。
![按下 tab 键 然后点击回车接受 EULA 协议][6]
下一屏可能类似以下这样。只按下 tab 键将会高亮显示选项。当正确的选项高亮显示时,按下回车键来确认你的选择。
![当高亮显示你正确的选项时,按下 tab 键,按回车键确认][7]
多媒体解码器安装完成,你应该能够播放 (大多数) 许多中媒体文件。你的音乐播放器能播放 MP3 文件,你的视频播放器能播放 MP4MKV等等格式。
然而,这也不是故事的终点,至少对某些人来说。
为什么我要那样说?因为我已经注意到 Ubuntu 系统下的默认视频播放器Totem在播放某些视频格式文件时常常遇到问题。你会注意到突然你的系统主机发热风扇狂转并且鼠标指针停止运行。
为什么?因为 Totem 播放器在视频解码方面占用了太多的处理器资源。
当你播放视频的时候你可以通过 top 命令 测试以下。查看名称为 totem 这个进程 (那是默认视频播放器的名字)。
![Ubuntu 默认的视频播放器, Totem, 可能消耗过多的必要的 CPU 资源][8]
你现在能够做什么?你的麻烦看起来永无止境,别担心。[在 Linux 上有更好的视频播放器][9] 并且它们能帮助你解决问题。
#### 方法 3: 安装一个更好的视频播放器 (建议)
在 Linux 有很多优秀的视频播放器。我发现它们好于默认的 Totem 视频播放器。
就我个人来说那么多个我只喜欢这两个VLC][10] 和 [MPV][11]。
VLC 是一个多功能且超级流行的额视频播放器。很可能你已经使用过 VLC 。
MPV 媒体播放器不是那么流行但是这个轻量级的程序播放视频文件是再合适不过了。
VLC 和 MPV 播放器都擅长处理多媒体解码器。你甚至不必分开来安装多媒体解码器。只需要 [安装 VLC][12] 或者 MPV ,你就能够播放各种格式的视频文件。
在软件中心也可以找到它:
![在 Ubuntu 软件中心 MPV 可用][13]
或者 使用命令行 [在 Ubuntu 安装 MPV][14]
```
sudo apt install mpv
```
现在你已经有了另一个视频播放器,你应该右键点击视频文件,选择新的视频播放器来打开。
或者,你可以[使其作为默认程序][15] 双击来播放视频文件。
### 对你有用吗?
我在这里没有说太多细节。我想阐述各种方法和它们每个的利弊。
你在 Ubuntu 处理好 h264 解码器的问题了吗?那种方法对你有用?
--------------------------------------------------------------------------------
via: https://itsfoss.com/install-h-264-decoder-ubuntu/
作者:[Abhishek Prakash][a]
选题:[lujun9972][b]
译者:[hwlife](https://github.com/hwlife)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/abhishek/
[b]: https://github.com/lujun9972
[1]: https://itsfoss.com/install-ubuntu/
[2]: https://itsfoss.com/wp-content/uploads/2022/04/h264-decoder-error-ubuntu-800x241.png
[3]: https://itsfoss.com/wp-content/uploads/2022/04/h264-decoder-ubuntu-software-center-800x532.png
[4]: https://itsfoss.com/wp-content/uploads/2022/04/ac3-decoder-missing-ubuntu-800x251.png
[5]: https://itsfoss.com/install-media-codecs-ubuntu/
[6]: https://itsfoss.com/wp-content/uploads/2020/02/installing_ubuntu_restricted_extras.jpg
[7]: https://itsfoss.com/wp-content/uploads/2020/02/installing_ubuntu_restricted_extras_1.jpg
[8]: https://itsfoss.com/wp-content/uploads/2022/04/totem-consuming-more-cpu-ubuntu-800x454.webp
[9]: https://itsfoss.com/video-players-linux/
[10]: https://www.videolan.org/vlc/
[11]: https://mpv.io/
[12]: https://itsfoss.com/install-latest-vlc/
[13]: https://itsfoss.com/wp-content/uploads/2022/04/mpv-player-ubuntu-software-center-800x346.png
[14]: https://itsfoss.com/mpv-video-player/
[15]: https://itsfoss.com/change-default-applications-ubuntu/

View File

@ -0,0 +1,37 @@
[#]: subject: "Package Analysis Examines Packages In Open Source Repositories In Real Time"
[#]: via: "https://www.opensourceforu.com/2022/05/package-analysis-examines-packages-in-open-source-repositories-in-real-time/"
[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
包分析实时检查开源仓库中的包
======
![openssf-logo][1]
开源安全基金会 (OpenSSF) 发布了一个新工具的测试版,它可以对发布到著名开源仓库的所有包进行动态分析。包分析项目试图通过识别和警告用户任何恶意行为来保护开源包,目的是增强对开源软件的信任并加强软件供应链的安全性。
OpenSSF 说:“包分析项目旨在了解开源仓库上可用包的行为和功能:它们访问哪些文件,它们连接到哪些地址,以及它们运行哪些命令?”
该基金会的 Caleb Brown 和 David A. Wheeler 补充说:“该项目还跟踪软件包随时间的行为变化,以确定以前安全的软件何时开始出现可疑行为。”
该程序在为期一个月的测试运行中发现了 200 多个发布到 PyPI 和 NPM 的恶意程序包,其中大多数流氓库依赖于依赖混淆和仿冒攻击。谷歌是 OpenSSF 的成员,它支持包分析计划,强调“在发布包之前审查包以确保用户安全”的重要性。
去年该公司的开源安全团队提出了软件工件的供应链级别SLSA架构以验证软件包的完整性并防止未经授权的更改。这一发展是在开源生态系统越来越多地被武器化用加密货币矿工和数据窃贼等恶意软件攻击开发者的情况下进行的。
--------------------------------------------------------------------------------
via: https://www.opensourceforu.com/2022/05/package-analysis-examines-packages-in-open-source-repositories-in-real-time/
作者:[Laveesh Kocher][a]
选题:[lkxed][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者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/openssf-logo-696x418.jpg

View File

@ -0,0 +1,89 @@
[#]: subject: "How I manage my own virtual network with ZeroTier"
[#]: via: "https://opensource.com/article/22/5/zerotier-network"
[#]: author: "Kevin Sonney https://opensource.com/users/ksonney"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
我如何用 ZeroTier 管理自己的虚拟网络
======
ZeroTier 是一个加密的虚拟网络主干,允许多台机器像在一个网络上一样通信。
![Person drinking a hat drink at the computer][1]
(图片由: [Jonas Leupe][2] 发布于 [Unsplash][3]
*自动化是现在的一个热门话题。在我作为网站可靠性工程师SRE的日常工作中我的部分职责是将尽可能多的重复性任务自动化。但是我们当中有多少人在日常生活、非工作生活中这样做呢 今年,我专注于自动化工作,以便我们可以专注于重要的事情。*
在实现一切自动化的同时我遇到了一些远程站点的困难。我不是一个网络专家所以我开始研究我的选择。在研究了各种虚拟专用网络VPN、硬件端点、防火墙规则以及支持多个远程站点的所有东西后我感到困惑、暴躁并对这一切的复杂性感到沮丧。
然后我发现了 [ZeroTier][4]。ZeroTier 是一个加密的虚拟网络主干,允许多台机器像在一个网络上一样通信。代码全部是开源的,你可以自行托管控制器,或者使用 [ZeroTierOne][5] 服务,有免费或付费计划。我现在使用的是它们的免费计划,它很强大、稳固,而且非常稳定.
因为我使用的是网络服务所以我不打算详细介绍运行控制器和根服务。ZeroTier 在他们的[文档][6]中对如何做到这一点有完整的参考,而且非常好。
在 Web 用户界面中创建了我自己的虚拟网络之后客户端的安装几乎是微不足道的。ZeroTier 有 APT、RPM、FreeBSD 和许多其他平台的软件包,所以让第一个节点上线不需要什么努力。
安装完毕后,客户端就会连接到控制器服务,并为节点生成一个唯一的 ID。在 Linux 上,你使用 `zerotier-cli` 命令来加入一个网络,使用 `zerotier-cli join NETWORKID` 命令:
```
$ sudo zerotier-cli info
200 info 469584783a 1.x.x ONLINE
```
你也可以使用 `zerotier-cli` 来获得连接和可用节点的列表,改变网络设置,并离开网络。
![Image of Setting up a New Node][7]
图片由Kevin SonneyCC BY-SA 4.0
在加入一个网络后你必须批准该节点的访问可以通过网络控制台或调用应用程序编程接口API。这两种方法在 ZeroTier 网站上都有记录。连接两个节点后,无论你身在何处或位于防火墙的哪一侧,你都可以相互连接,就像你们在同一个建筑的同一个网络中。我的主要用例之一是[远程访问我的家庭助理设置][8],而不需要打开防火墙端口或将其暴露在互联网上(关于我的家庭助理设置和相关服务的更多信息,见后文)。
我自己做的一件事是为内部 DNS 设置了一个 [Beta ZeroNDS 服务][9]。这为我管理自己的名称服务或为我所有的私人主机和 IP 地址创建公共记录节省了很多复杂性。我发现说明是非常直接的,并且能够在大约 5 分钟内为我的私人网络建立一个 DNS 服务器。每个客户必须允许 Zerotier 设置 DNS这在 GUI 客户中非常简单。要使它在 Linux 客户端上使用,请使用:
```
$ sudo zerotier-cli setNETWORKID allowDNS=1
```
在你添加和删除主机时,不需要其他更新,它“就能工作”。
```
$ sudo zerotier-cli info
200 info 469584845a 1.x.y ONLINE
$ sudo zerotier-cli join
93afae596398153a 200 join OK
$ sudo zerotier-cli peers
200 peers
<ztaddr> <ver> <role> <lat> <link> <TX> <RX> <path>
61d294b9cb - PLANET 112 DIRECT 7946 2812 50.7.73.34/9993
62f865ae71 - PLANET 264 DIRECT 7946 2681 50.7.76.38/9993
778cde7190 - PLANET 61 DIRECT 2944 2901 103.195.13.66/9993
93afae5963 1.x LEAF 77 DIRECT 2945 2886 35.188.31.177/41848
992fcf1db7 - PLANET RECT 79124 DI47 2813 195. 181.173.159/9993
```
我只提到了它所有功能的表面。ZeroTier 还允许在 ZeroTier 网络之间建立桥接,高级路由规则等。它们甚至有一个 [Terraform provider][10] 和一个[很棒的 Zerotier 文章][11]清单。到今天为止,我正在使用 ZeroTier 连接四个物理站点的机器,其中三个在 NAT 防火墙后面。Zerotier 的设置很简单,而且管理起来几乎完全不费力。
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/5/zerotier-network
作者:[Kevin Sonney][a]
选题:[lkxed][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者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/coffee_tea_laptop_computer_work_desk.png
[2]: https://unsplash.com/@jonasleupe?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
[3]: https://unsplash.com/s/photos/tea-cup-computer?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
[4]: https://github.com/zerotier
[5]: https://www.zerotier.com/pricing
[6]: https://docs.zerotier.com
[7]: https://opensource.com/sites/default/files/2022-04/SecondDay02-2.png
[8]: https://opensource.com/article/22/5/remote-home-assistant
[9]: https://github.com/zerotier/zeronsd
[10]: https://github.com/zerotier/terraform-provider-zerotier
[11]: https://github.com/zerotier/awesome-zerotier

View File

@ -0,0 +1,83 @@
[#]: subject: "Experiment with containers and pods on your own computer"
[#]: via: "https://opensource.com/article/22/5/containers-pods-101-ebook"
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
在自己的电脑上实验容器和 pod
======
通过这个新的可下载指南开始探索容器技术的要领。
![Looking at a map][1]
图片由opensource.com
在电视剧 *Battlestar Galactica* (太空堡垒卡拉狄加)中,这艘名副其实的巨型飞船并没有做什么。它是船员们坚守的庇护所,是战略和协调的中心联络点,也是资源管理的安全场所。然而,卡布里安毒蛇号,一个人的独立太空船,出去对付邪恶的赛昂人和其他太空中的危险。他们也从不只派一两艘毒蛇号出去。他们派了很多。许多冗余的飞船具有基本相同的能力和目的,但由于它们非常灵活和数量众多,它们总是能够处理每周威胁战星的任何问题。
如果你认为你正在感知一个发展中的类比,那么你是对的。 现代“云”又大又笨重,是分布在很远距离的大量基础设施的融合。它具有强大的功能,但如果你将其视为普通计算机,你将浪费它的大部分功能。当你想要处理来自数百万输入源的大量数据时,捆绑你的解决方案(无论是采用应用、网站、数据库、服务器还是其他形式)并发送该解决方案的微小镜像来处理数据集群,实际上是更有效的。当然,这些将是*容器*,它们是云的劳动力。它们是你发送来处理服务请求的小型解决方案工厂,并且由于你可以根据任何给定时间传入的请求生成任意数量的解决方案,因此理论上它们是取之不尽的。
### 家中的容器
如果你没有大量的传入请求需要处理,你可能会想知道容器给你带来什么好处。不过,在个人电脑上使用容器确实有其用途。
#### 容器作为虚拟环境
通过 Podman、LXC 和 Docker 等工具,你可以像以往运行虚拟机一样运行容器。不过,与虚拟机不同,容器不需要模拟固件和硬件的开销。
你可以从公共仓库下载容器镜像,启动一个最小化的 Linux 环境,并将其作为命令或开发的测试场所。例如,假设你想试试你在 Slackware Linux 上构建的一个应用。首先,在仓库中搜索一个合适的镜像:
```
$ podman search slackware
```
然后选择一个镜像,作为你的容器的基础:
```
$ podman run -it --name slackware vbatts/slackware
sh-4.3# grep -i ^NAME\= /etc/os-release
NAME=Slackware
```
### 工作中的容器
当然,容器不只是最小的虚拟机。他们可以为非常具体的需求提供高度具体的解决方案。如果你不熟悉容器,那么对任何新系统管理员最常见的通过仪式之一开始可能会有所帮助:在容器中启动你的第一个 Web 服务器。
首先,获得一个镜像。你可以使用 `podman search` 命令来搜索你喜欢的发行版,或者直接搜索你喜欢的 httpd 服务器。当使用容器时,我倾向于信任我在裸机上信任的相同发行版。
当你你找到一个镜像作为你的容器的基础,你就可以运行你的镜像。然而,正如这个术语所暗示的,容器是*被容器化的*,所以如果你只是启动一个容器,你将无法访问标准的 HTTP 端口。你可以使用 `-p` 选项将一个容器端口映射到一个标准的网络端口:
```
$ podman run -it -p 8080:80 docker.io/fedora/apache:latest
```
现在看看你本地主机上的 8080 端口:
```
$ curl localhost:8080
Apache
```
成功了。
### 了解更多
容器拥有比模仿虚拟机更多的潜力。你可以将它们分组在 pod 中,构建复杂应用的自动部署,启动冗余服务以满足高需求等等。如果你刚刚开始使用容器,你可以[下载我们最新的电子书][2]来学习该技术,甚至学习创建一个 pod以便你可以运行 WordPress 和数据库。
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/5/containers-pods-101-ebook
作者:[Seth Kenlon][a]
选题:[lkxed][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/seth
[b]: https://github.com/lkxed
[1]: https://opensource.com/sites/default/files/lead-images/tips_map_guide_ebook_help_troubleshooting_lightbulb_520.png
[2]: https://opensource.com/downloads/containers-pods-101-ebook