This commit is contained in:
Xingyu Wang 2022-03-20 07:58:38 +08:00
commit 4ddd8fdda1
82 changed files with 8856 additions and 3442 deletions

View File

@ -0,0 +1,140 @@
[#]: collector: (lujun9972)
[#]: translator: (wxy)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-14356-1.html)
[#]: subject: (Why I switched from Mac to Linux)
[#]: via: (https://opensource.com/article/20/3/mac-linux)
[#]: author: (Lee Tusman https://opensource.com/users/leeto)
我为什么从 Mac 转到 Linux
======
> 25 年后,我转到了 Linux简直不能更爽了。以下是我的经历。
![](https://img.linux.net.cn/data/attachment/album/202203/14/093159h433g7j2ytz4g4xz.jpg)
1994 年,我的家人买了一台 Macintosh Performa 475 作为家用电脑。我在学校时曾使用过 Macintosh SE 电脑,并通过《[Mavis Beacon 教你打字][2]》学会了打字,所以我成为 Mac 用户已经超过 25 年了。早在上世纪 90 年代中期,我就被 Mac 的易用性所吸引。它不是以 DOS 命令提示符开始的;它打开的是一个友好的桌面。它很有趣。尽管 Macintosh 的软件比 PC 少得多,但我认为 Mac 的生态系统更好,就凭着 KidPix 和 Hypercard我仍然认为它们是无与伦比的、最直观的 _创意工厂_
即便如此,我仍然感觉到,与 Windows 相比Mac 只是个弟弟。我曾觉得这个公司或许有一天会消失。但几十年后的今天,苹果已经成为一个庞然大物,一个价值万亿美元的公司。但随着发展,它发生了重大变化。有些变化是为了更好的发展,比如更好的稳定性,更简单的硬件选择,更高的安全性,以及更多的可访问性选项。其他的变化让我恼火 —— 不是一下子,而是慢慢地不满意。最重要的是,我对苹果的封闭生态系统感到厌烦 —— 没有 iPhoto 就很难访问照片;必须使用 iTunes即使我不想使用苹果商店的生态系统也得强制捆绑。
随着时间的推移,我发现自己主要是在终端上工作。我使用 iTerm2 和 [Homebrew][3] 软件包管理器。虽然我不能让我所有的 Linux 软件都工作但大部分软件都工作了。我认为我拥有两个世界中最好的东西macOS 的图形操作系统和用户界面,以及快速打开终端会话的能力。
后来,我开始使用通过 Raspbian 启动的树莓派电脑。我还收集了一些从大学的垃圾堆中抢救出来的非常旧的笔记本电脑,因此,出于需要,我决定尝试各种 Linux 发行版。虽然它们都没有成为我的主用机器,但我开始真正喜欢使用 Linux。我开始考虑尝试运行 Linux 发行版作为我的日常用机,但我认为 Macbook 的舒适性和便利性,特别是硬件的尺寸和重量,在非 Mac 笔记本电脑中很难找到。
### 是时候进行转换了?
大约两年前,我开始在工作中使用一台戴尔电脑。那是一台较大的笔记本电脑,集成了 GPU可以双启动 Linux 和 Windows。我用它来进行游戏开发、3D 建模、一些机器学习,以及用 C# 和 Java 进行基本编程。我曾考虑把它作为我的主用机器,但我喜欢我的 Macbook Air 的便携性,所以也继续使用它。
去年秋天,我开始注意到我的 Air 运行时很热,而且风扇开得越来越频繁。我的主用机器开始显得垂垂老矣。多年来,我使用 Mac 的终端来访问类 Unix 的 Darwin 操作系统,我在终端和网页浏览器之间切换的时间越来越多。是时候进行转换了吗?
我开始探索一个类似 Macbook 的 Linux 笔记本电脑的可能性。在做了一些研究、阅读测评和留言板之后,我选择了长期以来备受赞誉的戴尔 XPS 13 开发者版 7390选择了第十代 i7。我选择它是因为我喜欢 Macbook尤其是超薄的 Macbook Air的感觉而对 XPS 13 的评论表明它似乎是类似的笔记本电脑,对其触控板和键盘的评价也真的很好。
最重要的是,它装载了 Ubuntu。虽然买一台电脑擦掉它然后安装一个新的 Linux 发行版是很容易的,但我被这种配合得当的操作系统和硬件所吸引,而且它允许我们进行大量的定制,就像我们在 Linux 中了解而喜爱的一样。因此,当有促销活动时,我毅然决然地购买了它。
### 每天运行 Linux 是什么感觉
如今,我使用 XPS 13 已经有三个月了,我的双启动的 Linux 工作笔记本也有两年了。起初,我以为我会花更多的时间寻找一个更像 Mac 的替代桌面环境或窗口管理器,比如 [Enlightenment][4]。我试过几个,但我不得不说,我喜欢开箱即用的 [GNOME][5] 的简单性。首先,它是精简的;没有太多的 GUI 元素会吸引你的注意力。事实上,它很直观,这份 [概览][6] 只需要几分钟就能看完。 
我可以通过应用程序仪表盘或按网格排布的按钮访问我的应用程序,从而进入应用程序视图。要访问我的文件系统,我点击仪表盘上的“文件”图标。要打开 GNOME 终端,我输入 `Ctrl+Alt+T` 或者直接按下 `Alt+Tab` 来在打开的应用程序和打开的终端之间切换。定义你自己的 [自定义热键快捷方式][7] 也很容易。
除此以外,没有太多要说的。与 Mac 的桌面不同,没有那么多的东西会让人迷失,这意味着让我从工作或我想运行的应用程序中分心的东西更少。我没有看到我在 Mac 上浏览窗口的那么多选项,也不必在导航时花费那么多时间。在 Linux 中,只有文件、应用程序和终端。
我安装了 [i3 平铺式窗口管理器][8] 来做一个测试。我在配置上遇到了一些问题,因为我是用 [德沃夏克键盘][9] 键入的,而 i3 并不适应另一种键盘配置。我想,如果再努力一点,我可以在 i3 中找出一个新的键盘映射,但我主要想找的是简单的平铺功能。
我看了 GNOME 的平铺功能,并感到非常惊喜。你按下 `Super` 键(对我来说,就是有 Windows 标志的那个键 —— 我应该用贴纸盖住它!),然后按一个修饰键。例如,按 `Super + ←` 将你当前的窗口移动到屏幕左侧的贴片上。`Super + →` 移动到右半边。`Super + ↑` 使当前窗口最大化。`Super + ↓` 则恢复到之前的大小。你可以用 `Alt+Tab` 在应用程序窗口之间移动。这些都是默认行为,可以在键盘设置中自定义。
插上耳机或连接到 HDMI 的工作方式与你预期的一样。有时,我打开声音设置,在 HDMI 声音输出或我的外部音频线之间进行切换,就像我在 Mac 或 PC 上那样。触控板的反应很灵敏,我没有注意到与 Macbook 的有什么不同。当我插入一个三键鼠标时,它可以立即工作,即使是用我的蓝牙鼠标和键盘。
#### 软件
我在几分钟内安装了 Atom、VLC、Keybase、Brave 浏览器、Krita、Blender 和 Thunderbird。我在终端用 Apt 软件包管理器安装了其他软件(和平常一样),它比 macOS 的 Homebrew 软件包管理器提供了更多软件包。
#### 音乐
我有许多种听音乐的选择。我使用 Spotify 和 [PyRadio][10] 来串流播放音乐。[Rhythmbox][11] 在 Ubuntu 上是默认安装的;这个简单的音乐播放器可以立即启动,而且毫不臃肿。只需点击菜单,选择“添加音乐”,然后导航到一个音乐目录(它会递归搜索)。你也可以轻松地串流播客或在线广播。
#### 文本和 PDF
我倾向于在带有一些插件的 [Neovim][12] 中用 Markdown 写作,然后用 Pandoc 将我的文档转换为任何最终需要的格式。对于一个带有预览功能的漂亮的 Markdown 编辑器,我下载了 [Ghostwriter][13],一个最集中注意力的写作应用程序。
如果有人给我发了一个微软 Word 文档,我可以用默认的 LibreOffice Writer 应用程序打开它。
偶尔,我也要签署一份文件。用 macOS 的“预览”应用程序和我的 PNG 格式的签名,这很容易,我需要一个 Linux 的对应工具。我发现默认的 PDF 查看器应用程序没有我需要的注释工具。LibreOffice 绘图程序是可以接受的,但不是特别容易使用,而且它偶尔会崩溃。做了一些研究后,我安装了 [Xournal][14],它有我需要的简单的注释工具,可以添加日期、文字和我的签名,而且与 Mac 的预览程序相当。它完全能满足我的需要。
#### 从我的手机中导入图片
我有一个 iPhone。为了把我的图片从手机上拿下来有很多方法可以同步和访问你的文件。如果你有一个不同的手机你的过程可能是不同的。下面是我的方法
1. 用 `sudo apt install gvfs-backends` 来安装 `gvfs-backends`,它是 GNOME 虚拟文件系统的一部分。
2. 获取你的手机的序列号。将你的手机插入你的电脑,在你的 iPhone 上点击“信任”。在你电脑的终端输入:
```
lsusb -v 2> /dev/null | grep -e "Apple Inc" -A 2
```
(感谢 Stack Oveflow 用户 [complistic][15] 提供的这个代码技巧)。
3. 现在打开你的文件系统。
- 按 `Ctrl+L` 打开一个位置并输入:`afc://<你的序列号>`,(请替换 `<你的序列号>`)来打开并导航到你的 DCIM 文件夹。我的照片和视频在 DCIM 文件夹的五个子文件夹内,而不是在照片文件夹内。从这里你可以手动将它们移到你的电脑上。
- 挂载手机文件系统后,你也可以在终端中通过以下方式导航到你的文件:
```
cd /run/user/1001/gvfs/afc:host=<你的序列号>
```
#### 图形、照片、建模和游戏引擎
我是一名教育工作者,教授各种新媒体课程。我的许多同事和学生都订阅了价格昂贵的专有的 Adobe Creative Suite。我喜欢让我的学生知道他们还有其他选择。
对于绘图和图形编辑,我使用 [Krita][16]。这绝对是我的 Photoshop 替代品。对于插图工作,还有 [Inkscape][17] 和 Scribus 的出版软件。对于自动编辑,我使用命令行 [ImageMagick][18] 程序,它已经预装在 Ubuntu 中。
为了管理我的图像,我使用简单的 [Shotwell][19] 应用程序。
对于 3D 建模,我使用并教授开源的 [Blender][20] 软件。在我的学校,我们教 [Unity 3d][21],它有 Linux 版本。它运行良好,但我一直想试试 [Godot][22],一个开源的替代品。
#### 开发
我的 XPS 13 安装了 Chrome 和 Chromium。我还添加了 Firefox 和 [Brave][23] 浏览器。所有都和你在 Mac 或 PC 上习惯的一样。大多数时候,我在 Atom 中进行开发工作,有时在 Visual Studio Code 中进行,这两种软件都很容易安装在 Linux 上。Vim 已经预装在终端,而我首选的终端文本编辑器 Neovim也很容易安装。
几周后,我开始尝试其他终端。我目前最喜欢的是 Enlightenment 基金会的 Terminology。首先它允许你在终端中 [查看图片][24],这在 Mac 的终端中是很难做到的。
### 留在这里
我看不出自己会转回 Mac 作为我的日用电脑。现在,当我使用 Mac 时,我注意到超多的选项和运行一个应用程序或浏览某个地方所需的额外步骤。我还注意到它的运行速度有点慢,或许这只是我个人的感受?
现在我已经转到了一个开源的生态系统和 Linux我很高兴没有必要再转回去。
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/3/mac-linux
作者:[Lee Tusman][a]
选题:[lujun9972][b]
译者:[wxy](https://github.com/wxy)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/leeto
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/code_computer_development_programming.png?itok=4OM29-82
[2]: https://en.wikipedia.org/wiki/Mavis_Beacon_Teaches_Typing
[3]: https://brew.sh/
[4]: https://www.enlightenment.org/
[5]: https://opensource.com/downloads/cheat-sheet-gnome-3
[6]: https://help.gnome.org/users/gnome-help/stable/shell-introduction.html.en
[7]: https://docs.fedoraproject.org/en-US/quick-docs/proc_setting-key-shortcut/
[8]: https://opensource.com/article/18/9/i3-window-manager-cheat-sheet
[9]: https://en.wikipedia.org/wiki/Dvorak_keyboard_layout
[10]: https://opensource.com/article/19/11/pyradio
[11]: https://wiki.gnome.org/Apps/Rhythmbox
[12]: https://neovim.io/
[13]: https://wereturtle.github.io/ghostwriter/
[14]: http://xournal.sourceforge.net/
[15]: https://stackoverflow.com/questions/19032162/is-there-a-way-since-ios-7s-release-to-get-the-udid-without-using-itunes-on-a/21522291#21522291
[16]: https://opensource.com/article/19/4/design-posters
[17]: https://opensource.com/article/19/1/inkscape-cheat-sheet
[18]: https://opensource.com/article/17/8/imagemagick
[19]: https://gitlab.gnome.org/GNOME/shotwell/
[20]: https://opensource.com/article/18/4/5-best-blender-video-tutorials-beginners
[21]: https://unity.com/
[22]: https://opensource.com/article/17/12/get-started-developing-games-godot
[23]: https://brave.com/
[24]: https://www.enlightenment.org/about-terminology.md

View File

@ -0,0 +1,255 @@
[#]: collector: (lujun9972)
[#]: translator: (wxy)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-14319-1.html)
[#]: subject: (Secure your containers with SELinux)
[#]: via: (https://opensource.com/article/20/11/selinux-containers)
[#]: author: (Mike Calizo https://opensource.com/users/mcalizo)
用 SELinux 保护你的容器
======
> 黑掉你的系统,了解为什么配置 SELinux 作为你的第一道容器防线是很重要的。
![](https://img.linux.net.cn/data/attachment/album/202203/02/093614t53cfb857841qzzk.jpg)
当有些事情在你的 Linux 环境中不能正常工作时,最简单的方法就是禁用<ruby>安全增强型 Linux<rt>Security-Enhanced Linux</rt></ruby>[SELinux][2])。而当它突然可以工作了,你就会忘记了禁用这件事 —— 这是一个常见的陷阱,意味着你已经失去了一个非常强大的安全工具。
随着容器、微服务和分布式架构的兴起,威胁也在上升。这是由于一个老的、众所周知的问题:速度。容器的优势在于它们能让你快速行动,做更多的事情,并迅速改变。这意味着容器的采用已经飞速发展,但它所提供的速度也意味着你会遇到更多的问题和漏洞。当你越来越快地做更多的事情时,这自然会发生。
### 如何减轻威胁
正如孙子所说,“不战而屈人之兵”。当涉及到容器的基本防御时,这句话真的很有共鸣。为了避免问题(战斗),确保你的容器主机是安全的,你可以使用 SELinux 作为你的第一道防线。
SELinux 是一个开源项目,于 2000 年发布2003 年集成到 Linux 内核中。根据 [红帽公司的解释][3]“SELinux 是 [Linux 系统][4] 的一个安全架构允许管理员对谁可以访问系统有更多的控制。它最初是由美国国家安全局NSA开发的是使用 Linux 安全模块LSM对 [Linux 内核][5] 的一系列补丁。”
### 开始吧
当你想到容器时,首先想到的可能是 [Docker][6]。Docker 在 2013 年出现后掀起了一场容器采用革命。它是容器爆炸性流行的主要原因之一,但如上所述,大量采用增加了用户对安全风险的脆弱性。
在你用 SELinux 保护你的 Docker 容器之前,你需要设置一些东西。
#### 前置条件
* 安装并配置了 CentOS 8/RHEL 8。
* 安装并配置好 Docker CE
* 创建两个账户root 和 非 root 用户(下面的例子中是 `mcalizo`)。
如果你需要在你的 RHEL 8/CentOS 8 服务器上设置 Docker你可以按照这些 [说明][7]。如果你运行的是 RHEL 8你需要在开始之前删除预装的 Podman 和 runc 包。
首先,确保 SELinux 被启用:
```
[mcalizo@Rhel82 ~]$ sestatus
SELinux status:                 enabled
SELinuxfs mount:                /sys/fs/selinux
SELinux root directory:         /etc/selinux
Loaded policy name:             targeted
Current mode:                   enforcing
Mode from config file:          enforcing
Policy MLS status:              enabled
Policy deny_unknown status:     allowed
Memory protection checking:     actual (secure)
Max kernel policy version:      31
[mcalizo@Rhel82 ~]$
```
然后,验证你的操作系统版本和 Docker 正在运行。以 root 身份登录并运行:
```
[root@rhel82 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux release 8.2 (Ootpa)
[root@rhel82 ~]#
[root@rhel82 ~]# systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
Active: active (running) since Wed 2020-10-28 19:10:14 EDT; 15s ago
Docs: https://docs.docker.com
Main PID: 30768 (dockerd)
Tasks: 8
Memory: 39.0M
CGroup: /system.slice/docker.service
└─30768 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
Oct 28 19:10:13 rhel82.home.labs.com dockerd[30768]: time="2020-10-28T19:10:13.889602941-04:00" level=error msg=">
Oct 28 19:10:13 rhel82.home.labs.com dockerd[30768]: time="2020-10-28T19:10:13.903413613-04:00" level=warning msg>
Oct 28 19:10:13 rhel82.home.labs.com dockerd[30768]: time="2020-10-28T19:10:13.903427451-04:00" level=warning msg>
Oct 28 19:10:13 rhel82.home.labs.com dockerd[30768]: time="2020-10-28T19:10:13.903538271-04:00" level=info msg="L>
Oct 28 19:10:14 rhel82.home.labs.com dockerd[30768]: time="2020-10-28T19:10:14.132060506-04:00" level=info msg="D>
Oct 28 19:10:14 rhel82.home.labs.com dockerd[30768]: time="2020-10-28T19:10:14.308943088-04:00" level=info msg="L>
Oct 28 19:10:14 rhel82.home.labs.com dockerd[30768]: time="2020-10-28T19:10:14.319438549-04:00" level=info msg="D>
Oct 28 19:10:14 rhel82.home.labs.com dockerd[30768]: time="2020-10-28T19:10:14.319570298-04:00" level=info msg="D>
Oct 28 19:10:14 rhel82.home.labs.com dockerd[30768]: time="2020-10-28T19:10:14.333419209-04:00" level=info msg="A>
Oct 28 19:10:14 rhel82.home.labs.com systemd[1]: Started Docker Application Container Engine
```
检查你的 Docker 版本:
```
[root@rhel82 ~]# docker --version
Docker version 19.03.13, build 4484c46d9d
```
### 黑掉主机
了解一个问题的最好方法之一就是去体验它。因此,我将告诉你,如果你的安全设置不当,向 Docker 主机注入恶意代码是多么容易。
为了能够在 Docker 主机上做坏事,“恶意”的非 root 用户(本教程中为 `mcalizo`)必须是可以实例化 Docker 容器的组的成员。
首先,确认 `mcalizo` 用户属于哪个组:
```
[root@Rhel82 ~]# groups mcalizo
mcalizo : mcalizo
```
输出显示,`mcalizo` 只属于它自己的组。这意味着 `mcalizo` 不能实例化 Docker 容器,如果它试图这样做,将会得到这个错误:
```
[mcalizo@Rhel82 ~]$ docker run -it --rm centos:latest /bin/sh
docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.40/containers/create: dial unix /var/run/docker.sock: connect: permission denied.
See 'docker run --help'.
```
要允许 `mcalizo` 实例化容器,将用户加入 `docker` 组:
```
[root@Rhel82 ~]# usermod -G docker -a mcalizo
[root@Rhel82 ~]# groups mcalizo
mcalizo : mcalizo docker
```
接下来,部署一个 `fedora:latest` 的容器,并登录到实例化的容器中去探索它:
```
[mcalizo@Rhel82 ~]$ docker run -it --rm fedora:latest /bin/sh
Unable to find image 'fedora:latest' locally
latest: Pulling from library/fedora
ee7e89337106: Pull complete
Digest: sha256:b9ec86d36fca7b1d3de39cd7c258e8d90c377d312c21a7748071ce49069b8db4
Status: Downloaded newer image for fedora:latest
sh-5.0# cat /etc/redhat-release
Fedora release 33 (Thirty Three)
```
当你登录到新创建的容器时,你可以看到你是以 root 身份自动登录的:
```
sh-5.0# whoami
root
sh-5.0#
```
作为 `root` 用户,你可以在这个容器中做任何事情,这意味着你可以利用容器主机,做很多破坏。因为你可以实例化一个容器,即使你不属于主机的 sudoers 账户,你也可以对主机做一些事情。
退出你刚刚创建的容器,并创建一个新的容器来演示这个漏洞:
```
[mcalizo@Rhel82 ~]$ docker run -it --rm -v /:/exploit fedora:latest /bin/bash
[root@131043f2e306 /]#
```
[-v 选项][8] 将 Docker 主机的 `/` 目录挂载到 `/exploit` 目录下的容器:
```
[root@131043f2e306 /]#ls exploit/
bin  boot  dev  etc  home  lib  lib64  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var
```
因为它已被挂载,你可以在 Docker 主机上做任何事情。例如,你可以删除文件、编辑特定的配置来破害系统,甚至安装木马程序或其他恶意软件来窃取重要信息。
### 为什么会发生这种情况?
你可能想知道,既然 SELinux 处于强制模式,为什么会出现这种情况?深入挖掘 SELinux看看哪里出了问题。
验证 SELinux 是否有一个 [Docker 上下文][9]
```
[mcalizo@Rhel82 ~]$ ps -eZ | grep docker
system_u:system_r:container_runtime_t:s0 30768 ? 00:00:04 dockerd
[mcalizo@Rhel82 ~]$
```
正如预期的那样,它确实有。这意味着 SELinux 管理着 Docker 守护进程。检查 Docker 守护进程,看看 SELinux 是否默认启用:
```
[mcalizo@Rhel82 ~]$ docker info | grep Security -A3
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 4.18.0-193.el8.x86_64
```
Docker 守护进程中的 SELinux 在默认情况下是 **不启用** 的。 这就是问题所在!要解决这个问题,按 [文档][10] 说明,通过更新或创建文件 `/etc/docker/daemon.json` 来启用 SELinux 来控制和管理 Docker你必须有 root 权限才能这样做):
```
[root@Rhel82 ~]# cat /etc/docker/daemon.json
{
  "selinux-enabled": true
}
[root@Rhel82 ~]#
[root@Rhel82 ~]# systemctl restart docker
```
在创建或更新该文件并重启 Docker 后,你应该看到 Docker 守护进程中启用了 SELinux 支持:
```
[root@Rhel82 ~]# systemctl restart docker
[mcalizo@Rhel82 root]$ docker info | grep Security -A3
 Security Options:
  seccomp
   Profile: default
  selinux
[mcalizo@Rhel82 root]$
```
虽然仍然可以在你的 Docker 容器上挂载 Docker 主机中的特定文件系统,但不再允许更新或访问该文件:
```
[mcalizo@Rhel82 root]$ docker run -it --rm -v /:/exploit fedora:latest /bin/bash
[root@ecb5836da1f6 /]# touch /exploit/etc/shadow.sh
touch: cannot touch '/exploit/etc/shadow.sh': Permission denied
[root@ecb5836da1f6 /]#
```
### 了解更多
你在容器世界中的第一道防线取决于你对容器主机的操作系统的设置有多强。有许多方法可以实现 Linux 的安全性,包括市场上可供选择的方案,以增强你的安全态势。
SELinux 是一个额外的安全层,默认情况下内置于 [Linux 发行版][11] 中。为了借助它保护你的系统不被破坏,请确保 SELinux 保持开启状态。
如果你想了解更多,请参阅:
* [如何在 CentOS 8 / RH 上安装 Docker CE][7]
* [Docker 安全速查表][12]
* [dockerd 文档][10]
* [卷的使用文档][8]
* [什么是 SELinux][3]
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/11/selinux-containers
作者:[Mike Calizo][a]
选题:[lujun9972][b]
译者:[wxy](https://github.com/wxy)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/mcalizo
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/EDU_UnspokenBlockers_1110_A.png?itok=x8A9mqVA (Three closed doors)
[2]: https://en.wikipedia.org/wiki/Security-Enhanced_Linux
[3]: https://www.redhat.com/en/topics/linux/what-is-selinux
[4]: https://www.redhat.com/en/topics/linux/what-is-linux
[5]: https://www.redhat.com/en/topics/linux/what-is-the-linux-kernel
[6]: https://opensource.com/resources/what-docker
[7]: https://www.linuxtechi.com/install-docker-ce-centos-8-rhel-8/
[8]: https://docs.docker.com/storage/volumes/
[9]: https://docs.docker.com/engine/reference/commandline/context/
[10]: https://docs.docker.com/engine/reference/commandline/dockerd/
[11]: https://www.redhat.com/en/topics/linux/whats-the-best-linux-distro-for-you
[12]: https://cheatsheetseries.owasp.org/cheatsheets/Docker_Security_Cheat_Sheet.html

View File

@ -0,0 +1,104 @@
[#]: collector: (lujun9972)
[#]: translator: (sthwhl)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-14334-1.html)
[#]: subject: (Why everyone should try using Linux)
[#]: via: (https://opensource.com/article/21/2/try-linux)
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
为什么每个人都可以试试 Linux
======
> 如果你对 Linux 有着充满好奇,那开源社区可以让你轻松上手 Linux。
![](https://img.linux.net.cn/data/attachment/album/202203/07/091531g2rex2ne073xeler.jpg)
如今,人们有更多的理由喜欢 Linux。在这里我会分享使用 Linux 的 21 个不同的理由。我们来讨论讨论,为什么每个人都可以尝试一下 Linux。
Linux 对外行人来说,好像是一个神秘的东西。每当人们说起 Linux就觉得它是计算机管理员或者系统管理员使用的但也在讨论在笔记本电脑和手机上使用 Linux。技术网站上列出了 [你需要知道][2] 的 [十大 Linux 命令][3],但也有很多人在讨论 [Linux 桌面(不止一个)是多么令人激动][4]。
那么, Linux 到底是干嘛的呢?
Linux 对可用性的支持是它众多重要特性之一。如果你对 Linux 有着充满好奇,那开源社区可以让你轻松上手 Linux。
### 先尝试 Linux 应用
无论是从 Windows 换到 Linux、还是在 Windows 和 Mac 之间横跳,亦或是从 Mac 换到 Linux要想改变一个人的计算机操作系统的使用习惯是一件很难的事。虽然这件事很少会去讨论不过现在的电脑是一个比较个性化的东西每个人都习惯于自己电脑当前的使用习惯他们往往不愿意去做太大的变化。对我来说就算在工作电脑跟个人电脑中来回切换两者都运行相同的操作系统也需要我调整我的心理和肌肉习惯仅仅是因为两个电脑针对不同的活动场景进行了优化。尽管我被附近的人称为“很了解计算机的家伙”我也这么认为。但如果我不得不更换我常用的操作系统我会觉得自己的生产力跟舒适感将在一两周内直线下降。不过这还是比较表层的虽然我知道怎么用其他的操作系统但是我需要时间去形成新的直觉跟习惯需要记住在新系统中一些不起眼的配置选项的位置还得知道要怎么使用新的功能。
出于这个原因,我经常告诉那些对 Linux 感到新奇的人,学习 Linux 的第一步就是要去使用 Linux 的应用。实际上Linux 上专用的应用程序不多,主要是因为 Linux 的大多数应用程序是开源的,因此热衷于在所有平台之间移植。在 Linux 上的很多应用程序,可以在你目前的非 Linux 的平台上去尝试。把替换你默认的应用程序作为一个目标,不管是出于习惯还是方便,都要用开源的等价物。
### 应用替换
这个练习的目的是通过你最终要运行的应用软件,来实现向 Linux 的软过渡。一旦你习惯了一套新的应用程序,那么在 Linux 系统上,除了系统设置和文件管理外,就没有其他什么要适应的了。
如果你还不确定哪个是自己常用的应用,只需看看你的最近使用的应用程序列表(如果你的系统上没有最近使用应用的列表,那还等啥,赶紧换成 Linux 系统吧)。一旦你确定了必须使用的应用程序,可以看看我们的 [应用替代方案][5] 页面,了解许多被视为与流行的专有应用程序等效的常用开源应用程序。
### 获取 Linux
不是所有的开源软件都能移植到其他平台,并从在 Linux 上运行而受益。如果你想最终切换到 Linux那就得完成这个过渡。幸运的是要安装 Linux 就像下载它一样简单,几乎就像是另一个开源程序一样。
通常Linux 的安装镜像提供了实时模式跟安装模式两种模式,这意味着你可以从 Linux 介质启动,并且在实时模式下运行使用,而无需将系统安装到计算机。这是了解操作系统的好方法,但因为只是一种临时体验,所以启动后不会保留数据。但是,有些发行版,如 [Porteus Linux][6],是专门为在 USB 上运行而设计的,这样你的个人数据就能保存。我在钥匙串上挂了一个 Porteus 的 U 盘所以我无论在哪里我都有一个可以启动的Linux 系统。
![Porteus Live Linux 发行版本][7]
### “最好的” Linux
一旦你决定开始安装 Linux 系统,你会发现有很多 Linux 发行版都是免费的。如果你之前用的操作系统版本只有一两个选择(例如,家庭版或商业版),那么你会对 Linux 操作系统有这么多发行版感到困惑。不过实际情况没这么复杂。Linux 就是 Linux它的下载和安装的不同“流派”没有什么太大的不同。像 [Fedora][8]、 [Debian][9]、[Linux Mint][10] 和 [Elementary][11] 这些大牌的系统厂商都提供了同样的体验,只是在重点略有不同。
* Fedora 以软件更新迭代快而出名
* Linux Mint 可以轻松安装缺失的驱动程序
* Debian 因能提供长期的支持而受欢迎,因而更新是相对缓慢,但是可靠性很高
* Elementary 提供了精美的桌面体验和几个定制的特殊应用程序
总而言之所谓最好的“Linux 系统”,即是最适合你的 Linux 系统。而最适合你的 Linux就是在你尝试过后发现你所有的计算机功能仍然能按预期工作的 Linux。
### 获取驱动程序
大多数的驱动程序已经被捆绑在 Linux 的内核中了或者作为内核模块特别是在使用一到两年前的计算机零件和外围设备时常常如此。对于已经上市一段时间的设备Linux 程序员有机会去开发驱动程序或者将公司的驱动程序集成到系统里。我曾不止一次让人惊讶,只需将 Wacom 图形输入板、游戏控制器、打印机或扫描仪连接到我的 Linux 计算机中,不需要下载安装驱动程序,而且几乎不用配置,可以立即使用。
专有操作系统在处理设备驱动程序方面有两种策略。要么是限制用户在操作系统中使用的设备,要么是付费给公司,让他们编写驱动程序并与设备一起提供。第一种方法有种让人不适的限制性,但是大多数人(可悲的)习惯了某些设备只能在某些平台上运行的想法。而后一种方法,被认为是一种奢侈,但在实践中,这种方法太过于依赖程序员。旧货店有很多计算机外围设备,虽然它们设备状况良好,但却基本上报废了。因为设备制造商已经不再维护此设备在现代系统运行所需要的驱动程序了。
对于 Linux 来说,驱动程序要么由制造设备的厂商来开发,要么是由 Linux 的程序员来开发。这就可能会导致,某些驱动程序集成到操作系统的时间会被延迟(例如,新的设备可能要在发布后六个月才能在 Linux 系统上运行),但它有一个明显的优势,即长期支持。
如果你发现有一个驱动程序还没有进入发行版,那你可以等几个月再试一次,有可能是驱动程序已经集成到了系统的镜像里了,或者可以到不同的发行版中找找有没有你要的驱动程序。
### 为 Linux 付费
通过购买预装 Linux 的 PC 或者经过 Linux 认证的 PC可以避免所有的选择和关于兼容性的担忧。一些供应商提供预装 Linux 的计算机,如所有的 [System76][12] 和部分 [Lenovo][13] 型号。此外,所有的 Lenovo 型号都有 [Linux 兼容性认证][14]。
这是迄今为止尝试使用 Linux 最简单的方法。
### 迈向 Linux
这是一个挑战,浏览自己电脑上安装的每个应用程序,并找到潜在的对应开源替代程序。选择一个你经常使用但不是每天都用的应用程序,在下次要用的时候换成开源的应用程序。花点时间学习新的应用程序,直到能够将它作为你的新的默认程序,或者直到你确定需要尝试一个新的选择。
随着你使用的开源产品越多,你就越准备好进入激动人心的 Linux 世界。最后,你会用上 Linux 桌面还有你最喜欢的开源应用程序。
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/2/try-linux
作者:[Seth Kenlon][a]
选题:[lujun9972][b]
译者:[sthwhl](https://github.com/sthwhl)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/seth
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_women_computing_3.png?itok=qw2A18BM (Woman sitting in front of her computer)
[2]: https://opensource.com/article/19/12/linux-commands
[3]: https://opensource.com/article/18/4/10-commands-new-linux-users
[4]: https://opensource.com/article/20/5/linux-desktops
[5]: https://opensource.com/alternatives
[6]: http://porteus.org
[7]: https://opensource.com/sites/default/files/porteus5.png
[8]: http://getfedora.org
[9]: http://debian.org
[10]: http://linuxmint.com
[11]: http://elementary.io
[12]: http://system76.com
[13]: http://lenovo.com
[14]: https://forums.lenovo.com/t5/Linux-Operating-Systems/ct-p/lx_en

View File

@ -0,0 +1,69 @@
[#]: subject: (5 commands to level-up your Git game)
[#]: via: (https://opensource.com/article/21/4/git-commands)
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
[#]: collector: (lujun9972)
[#]: translator: (lkxed)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-14364-1.html)
五个提升你的 Git 水平的命令
======
> 将这些命令加入到你的工作流中,使 Git 发挥更大的作用。
![](https://img.linux.net.cn/data/attachment/album/202203/17/110616vti9hhsiiq4misra.jpg)
如果你经常使用 Git你可能会知道它非常有名。它可能是最受欢迎的版本控制方案它被一些 [最大的软件项目][2] 用来 [跟踪文件变更][3]。Git 提供了 [健壮的界面][4] 来审阅代码、把实验性的变更合并到已经存在的文件中。得益于 [Git 钩子][5],它以灵活性而闻名。同时,也因为它的强大,它给人们留下了一个“复杂”的印象。
Git 有诸多特性,你不必全部使用,但是如果你正在深入研究 Git 的 <ruby>子命令<rt>subcommands</rt></ruby>,我这里倒是有几个,或许你会觉得有用。
### 1、找到变更
如果你已经熟悉 Git 的基本指令(`fetch`、`add`、`commit`、`push`、`log` 等等),但是希望学习更多,那么从 Git 的检索子命令开始是一个简单安全的选择。检索你的 Git 仓库(你的 _工作树_)并不会做出任何更改,它只是一个报告机制。你不会像使用 `git checkout` 一样承担数据完整性的风险,你只是在向 Git 请求仓库的当前状态和历史记录而已。
[git whatchanged][6] 命令(几乎本身就是一个助记符)可以查看哪些文件在某个<ruby>提交<rt>commit</rt></ruby>中有变更、分别做了什么变更。它是一个简单的、用户友好的命令,因为它把 `show`、`diff-tree` 和 `log` 这三个命令的最佳功能整合到了一个好记的命令中。
### 2、使用 git stash 管理变更
你越多地使用 Git你就会使用 Git 越多。这就是说,一旦你习惯了 Git 的强大功能,你就会更频繁地使用它。有时,你正在处理一大堆文件,忽然意识到了有更紧急的任务要做。这时,在 [git stash][7] 的帮助下,你就可以把所有正在进行的工作收集起来,然后安全地<ruby>暂存<rt>stash</rt></ruby>它们。当你的工作空间变得整洁有序,你就可以把注意力放到别的任务上,晚些时候再把暂存的文件重新加载到工作树里,继续之前的工作。
### 3、使用 git worktree 来得到链接的副本
`git stash` 不够用的时候Git 还提供了强大的 [git worktree][8] 命令。有了它,你可以新建一个 _链接的_ 仓库<ruby>副本<rt>clone</rt></ruby>,组成一个新分支,把 `HEAD` 设置到任意一个提交上,然后基于这个分支开始你的新工作。在这个链接的副本里,你可以进行和主副本完全不同的任务。这是一个避免意外的变更影响当前工作的好办法。当你完成了你的新工作,你可以把新分支推送到远程仓库;也可以把当前的变更归档,晚些时候再处理;还可以从别的工作树中获取它们的变更。无论选择哪一种,你的工作空间之间都会保持相互隔离,任一空间中的变更都不会影响其他空间中的变更,直到你准备好了要合并它们。
### 4、使用 git cherry-pick 来选择合并
这可能听起来很反直觉,但是,你的 Git 水平越高,你可能遇到的合并冲突就会越多。这是因为合并冲突不一定是错误的标志,而是活跃的标志。在学习 Git 中,适应合并时的冲突,并学会如何解决它们是非常重要的。通常的方式或许够用,但是有时候你会需要更加灵活地进行合并,这时候就该 [git cherry-pick][9] 出场了。遴选操作允许你选择部分合并提交,这样一来你就不需要因为一些细微的不协调而拒绝整个合并请求了。
### 5、使用 Git 来管理 $HOME
使用 Git 来管理你的主目录从来没有这么简单过,这都要归功于 Git 可以自由选择管理对象的能力,这是一个在多台计算机之间保持同步的现实可行的选项。但是,想要让它工作顺利,你必须非常明智且谨慎才行。如果你想要了解更多,点击阅读我写的关于 [使用 Git 来管理 $HOME][10] 的小技巧。
### 更好地使用 Git
Git 是一个强大的版本控制系统,你使用得越熟练,就可以越轻松地借助它来完成复杂的任务。今天就尝试一些新的 Git 命令吧,欢迎在评论区分享你最喜欢的 Git 命令。
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/4/git-commands
作者:[Seth Kenlon][a]
选题:[lujun9972][b]
译者:[lkxed](https://github.com/lkxed)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/seth
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/lenovo-thinkpad-laptop-concentration-focus-windows-office.png?itok=-8E2ihcF (Woman using laptop concentrating)
[2]: https://opensource.com/article/19/10/how-gnome-uses-git
[3]: https://opensource.com/article/18/2/how-clone-modify-add-delete-git-files
[4]: https://opensource.com/article/18/5/git-branching
[5]: https://opensource.com/life/16/8/how-construct-your-own-git-server-part-6
[6]: https://opensource.com/article/21/3/git-whatchanged
[7]: https://opensource.com/article/21/3/git-stash
[8]: https://opensource.com/article/21/3/git-worktree
[9]: https://opensource.com/article/21/3/reasons-use-cherry-picking
[10]: https://opensource.com/article/21/3/git-your-home

View File

@ -0,0 +1,97 @@
[#]: subject: "How to Completely Uninstall Google Chrome From Ubuntu"
[#]: via: "https://itsfoss.com/uninstall-chrome-from-ubuntu/"
[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/"
[#]: collector: "lujun9972"
[#]: translator: "lkxed"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14368-1.html"
如何从 Ubuntu 中彻底卸载 Google Chrome
======
现在,你已经成功地 [在 Ubuntu 上安装 Google Chrome][1]。毕竟,它是世界上最受欢迎的网页浏览器了。
但是,你可能会不喜欢 Google 的产品,因为它们对用户的信息进行追踪和数据挖掘。你决定选择 [Ubuntu 上的其他网页浏览器][2],并且它或许是一个 [非 Chromium 核心的浏览器][3]。
既然你已经不再使用 [Google Chrome][4] 了,那么,把它从 Ubuntu 系统中移除是一个明智的选择。
如何才能做到这一点呢?我来告诉你具体的步骤。
### 从 Ubuntu 中完全移除 Google Chrome
![Illustration for removing Google Chrome from Ubuntu][5]
你可能使用了图形界面的方式安装 Google Chrome但不幸的是你得使用命令行的方式来移除它除非你选择 [使用 Synaptic 软件包管理器][6]。
使用命令行来做这件事也不是很难。首先,按下 [键盘上的 Ctrl+Alt+T 快捷键来打开一个终端][7]。
在终端中输入下面的命令:
```
sudo apt purge google-chrome-stable
```
此时它会向你索要一个密码,这个密码是你的用户账户密码,也就是你用来登录 Ubuntu 系统的密码。
当你输入密码的时候,屏幕上什么也不会显示。这是 Linux 系统的正常行为。继续输入密码,完成后按下回车键。
此时它会让你确认是否删除 Google Chrome输入 `Y` 来确认,或者直接按下回车键也行。
![Removing Google Chrome for Ubuntu][8]
这个操作会从你的 Ubuntu Linux 系统中移除 Google Chrome同时也会移除大多数相关的系统文件。
但是,你的个人设置文件仍然保留在用户主目录中。它包含了 Cookie、会话、书签和其他与你的账户相关的 Chrome 设置信息。当你下次安装 Google Chrome 时,这些文件可以被 Chrome 再次使用。
![Google Chrome leftover settings in Ubuntu][9]
如果你想要彻底地移除 Google Chrome你可能会想要把这些文件也移除掉。那么下面是你需要做的
切换到 `.config` 目录。 **注意 config 前面有个点**`,这是 [Linux 隐藏文件和目录的方式][10]。
```
cd ~/.config
```
然后移除 `google-chrome` 目录:
```
rm -rf google-chrome
```
![Removing the leftover Google Chrome settings from Ubuntu][11]
你也可以仅使用一个命令 `rm -rf ~/.config/google-chrome` 来删除它。因为本教程面向的对象是完完全全的初学者,所以我把这个命令拆分为以上两个步骤来完成,这样可以减少由于拼写问题造成的可能错误。
> 小技巧
>
> 想要你的终端和截图里看起来一样漂亮吗?试试这些 [终端定制小技巧][12]。
我希望这篇快速的入门技巧可以帮助你在 Ubuntu 上摆脱 Google Chrome。
--------------------------------------------------------------------------------
via: https://itsfoss.com/uninstall-chrome-from-ubuntu/
作者:[Abhishek Prakash][a]
选题:[lujun9972][b]
译者:[lkxed](https://github.com/lkxed)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/abhishek/
[b]: https://github.com/lujun9972
[1]: https://itsfoss.com/install-chrome-ubuntu/
[2]: https://itsfoss.com/best-browsers-ubuntu-linux/
[3]: https://itsfoss.com/open-source-browsers-linux/
[4]: https://www.google.com/chrome/index.html
[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/09/removing-google-chrome-ubuntu.png?resize=800%2C450&ssl=1
[6]: https://itsfoss.com/synaptic-package-manager/
[7]: https://itsfoss.com/open-terminal-ubuntu/
[8]: https://itsfoss.com/wp-content/uploads/2021/09/remove-google-chrome-ubuntu.webp
[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/09/google-chrome-ubuntu-leftover-settings.png?resize=800%2C518&ssl=1
[10]: https://itsfoss.com/hide-folders-and-show-hidden-files-in-ubuntu-beginner-trick/
[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/09/remove-google-chrome-leftover-settings-from-Ubuntu.png?resize=800%2C277&ssl=1
[12]: https://itsfoss.com/customize-linux-terminal/

View File

@ -0,0 +1,273 @@
[#]: subject: "How I migrated a WordPress website to a new host"
[#]: via: "https://opensource.com/article/21/9/migrate-wordpress"
[#]: author: "David Both https://opensource.com/users/dboth"
[#]: collector: "lujun9972"
[#]: translator: "lxbwolf"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14371-1.html"
如何把 WordPress 网站迁移到新主机
======
> 使用这个简单的方法来迁移一个网站以及管理防火墙配置。
![(https://img.linux.net.cn/data/attachment/album/202203/19/124316krzvxcr4ff2kr2ji.jpg)]
你有过把一个 WordPress 网站迁移到一台新主机上的需求吗?我曾经迁移过好多次,迁移过程相当简单。当然,的的市场时候我都不会用通用的推荐方法,这次也不例外 —— 我用更简单的方法,这才是我推荐的方法。
这个迁移方法没有破坏性,因此如果出于某些原因你需要还原到原来的服务器上,很容易可以实现。
### 一个 WordPress 网站的组成部分
运行一个基于 [WordPress][2] 的网站有三个重要组成部分WordPress 本身,一个 web 服务器,如 [Apache][3](我正在用),以及 [MariaDB][4]。MariaDB 是 MySQL 的一个分支,功能相似。
业界有大量的 Web 服务器,由于我使用了 Apache 很长时间,因此我推荐用 Apache。你可能需要把 Apache 的配置方法改成你用的 Web 服务器的方法。
### 初始配置
我使用一台 Linux 主机作为防火墙和网络路由。在我的网络中 Web 服务器是另一台主机。我的内部网络使用的是 C 类私有网络地址范围,按 <ruby>[无类别域间路由][5]<rt>Classless Internet Domain Routing</rt></ruby>CIDR方式简单地记作 192.168.0.0/24。
对于防火墙,相比于更复杂的 `firewalld`,我更喜欢用非常简单的 [IPTables][6]。这份防火墙配置中的一行会把 80 端口HTTP接收到的包发送给 Web 服务器。在 `/etc/sysconfig/iptables` 文件中,你可以在注释中看到,我添加了规则,把其他入站服务器连接转发到同一台服务器上合适的端口。
```
# Reroute ports for inbound connections to the appropriate web/email/etc server.
# HTTPD goes to 192.168.0.75
-A PREROUTING -d 45.20.209.41/255.255.255.248 -p tcp -m tcp --dport 80 \
  -j DNAT --to-destination 192.168.0.75:80
```
我使用<ruby>命名虚拟主机<rt>named virtual host</rt></ruby>来配置原来的 Apache Web 服务器,因为我在这个 HTTPD 实例上运行着多个网站。使用命名虚拟主机配置是个不错的方法,因为(像我一样)未来你可能会在运行其他的网站,这个方法可以使其变得容易。
`/etc/httpd/conf/httpd.conf` 中需要迁移的虚拟主机的网站相关部分请参考下面代码。这个片段中不涉及到 IP 地址的修改,因此在新服务器上使用时不需要修改。
```
<VirtualHost *:80>
ServerName www.website1.org
ServerAlias server.org
DocumentRoot "/var/website1/html"
ErrorLog "logs/error_log"
ServerAdmin me@website1.org
<Directory "/var/website1/html">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
</VirtualHost>
```
在迁移之前,你需要在 `httpd.conf` 的最顶端附近找到 `Listen` 声明并修改成类似下面这样。这个地址是服务器的真实私有 IP 地址,不是公开 IP 地址。
```
Listen 192.168.0.75:80
```
你需要修改新主机上 `Listen` 的 IP 地址。
### 前期工作
准备工作分为以下三步:
* 安装服务
* 配置防火墙
* 配置 web 服务器
#### 安装 Apache 和 MariaDB
如果你的新服务器上还没有 Apache 和 MariaDB那么就安装它们。WordPress 的安装不是必要的。
```
dnf -y install httpd mariadb
```
#### 新服务器防火墙配置
确认下新服务器上的防火墙允许访问 80 端口。你_每台_电脑上都有一个防火墙对吗大部分现代发行版使用的初始化配置包含的防火墙会阻止所有进来的网络流量以此来提高安全等级。
下面片段的第一行内容可能已经在你的 IPTables 或其他基于防火墙的网络过滤器中存在了。它标识已经被识别为来自可接受来源的入站包,并绕过后面的其它 INPUT 过滤规则,这样可以节省时间和 CPU 周期。片段中最后一行标识并放行 80 端口新进来的请求到 HTTPD 的连接。
```
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
<删节>
# HTTP
-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
```
下面的示例 `/etc/sysconfig/iptables` 文件是 IPTables 最少规则的例子,可以允许 SSH端口 22和 HTTPD端口 80连接。
```
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
# SSHD
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
# HTTP
-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
# Final disposition for unmatched packets
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
```
在新服务器主机上我需要做的就是在 `/etc/sysconfig/iptables` 文件的防火墙规则里添加上面片段的最后一行,然后重新加载修改后的规则集。
```
iptables-restore /etc/sysconfig/iptables
```
大部分基于红帽的发行版本,如 Fedora使用的是 `firewalld`。我发现对于它的适用场景(如家用、小到中型企业)而言,它过于复杂,因此我不用它。我建议你参照 [firewalld 网页][9] 来向 `firewalld` 添加入站端口 80。
你的防火墙及其配置可能跟这个有些差异,但最终的目的是允许新 Web 服务器 80 端口接收 HTTPD 连接。
#### HTTPD 配置
`/etc/httpd/conf/httpd.conf` 文件中配置 HTTPD。像下面一样在 `Listen` 片段中设置 IP 地址。我的新 Web 服务器 IP 地址是 `192.168.0.125`
```
Listen 192.168.0.125:80
```
复制(对应要迁移的网站的) `VirtualHost` 片段,粘贴到新服务器上 `httpd.conf` 文件的末尾。
### 迁移过程
只有两组数据需要迁移到新服务器 —— 数据库本身和网站目录结构。把两个目录打包成 `tar` 文档。
```
cd /var ; tar -cvf /tmp/website.tar website1/
cd /var/lib ; tar -cvf /tmp/database.tar mysql/
```
把两个 tar 文件复制到新服务器。我通常会把这类文件放到 `/tmp` 下,这个目录就是用来做这种事的。在新服务器上运行下面的命令,把 tar 文档解压到正确的目录。
```
cd /var ; tar -xvf /tmp/website.tar
cd /var/lib ; tar -xvf /tmp/database.tar
```
WordPress 的所有文件都在 `/var/website1` 下,因此不需要在新服务器上安装它。新服务器上不需要执行 WordPress 安装过程。
这个目录就是需要迁移到新服务器上的全部内容。
最后一步是启动(或重启)`mysqld` 和 `httpd` 服务守护进程。WrodPress 不是一个服务,因此不使用守护进程的方式来启动。
```
systemctl start mysqld ; systemctl start httpd
```
启动之后,你应该检查下这些服务的状态。
```
systemctl status mysqld
● mariadb.service - MariaDB 10.5 database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
Active: active (running) since Sat 2021-08-21 14:03:44 EDT; 4 days ago
Docs: man:mariadbd(8)
https://mariadb.com/kb/en/library/systemd/
Process: 251783 ExecStartPre=/usr/libexec/mariadb-check-socket (code=exited, status=0/SUCCESS)
Process: 251805 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir mariadb.service (code=exited, status=0/SUCCESS)
Process: 251856 ExecStartPost=/usr/libexec/mariadb-check-upgrade (code=exited, status=0/SUCCESS)
Main PID: 251841 (mariadbd)
Status: "Taking your SQL requests now..."
Tasks: 15 (limit: 19003)
Memory: 131.8M
CPU: 1min 31.793s
CGroup: /system.slice/mariadb.service
└─251841 /usr/libexec/mariadbd --basedir=/usr
Aug 21 14:03:43 simba.stmarks-ral.org systemd[1]: Starting MariaDB 10.5 database server...
Aug 21 14:03:43 simba.stmarks-ral.org mariadb-prepare-db-dir[251805]: Database MariaDB is probably initialized in /var/lib/mysql already, n>
Aug 21 14:03:43 simba.stmarks-ral.org mariadb-prepare-db-dir[251805]: If this is not the case, make sure the /var/lib/mysql is empty before>
Aug 21 14:03:44 simba.stmarks-ral.org mariadbd[251841]: 2021-08-21 14:03:44 0 [Note] /usr/libexec/mariadbd (mysqld 10.5.11-MariaDB) startin>
Aug 21 14:03:44 simba.stmarks-ral.org systemd[1]: Started MariaDB 10.5 database server.
systemctl status httpd
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Drop-In: /usr/lib/systemd/system/httpd.service.d
└─php-fpm.conf
Active: active (running) since Sat 2021-08-21 14:08:39 EDT; 4 days ago
Docs: man:httpd.service(8)
Main PID: 252458 (httpd)
Status: "Total requests: 10340; Idle/Busy workers 100/0;Requests/sec: 0.0294; Bytes served/sec: 616 B/sec"
Tasks: 278 (limit: 19003)
Memory: 44.7M
CPU: 2min 31.603s
CGroup: /system.slice/httpd.service
├─252458 /usr/sbin/httpd -DFOREGROUND
├─252459 /usr/sbin/httpd -DFOREGROUND
├─252460 /usr/sbin/httpd -DFOREGROUND
├─252461 /usr/sbin/httpd -DFOREGROUND
├─252462 /usr/sbin/httpd -DFOREGROUND
└─252676 /usr/sbin/httpd -DFOREGROUND
Aug 21 14:08:39 simba.stmarks-ral.org systemd[1]: Starting The Apache HTTP Server...
Aug 21 14:08:39 simba.stmarks-ral.org httpd[252458]: AH00112: Warning: DocumentRoot [/var/teststmarks-ral/html] does not exist
Aug 21 14:08:39 simba.stmarks-ral.org httpd[252458]: Server configured, listening on: port 80
Aug 21 14:08:39 simba.stmarks-ral.org systemd[1]: Started The Apache HTTP Server.
```
### 最终的修改
现在所需的服务都已经运行了,你可以把 `/etc/sysconfig/iptables` 文件中 HTTDP 的防火墙规则改成下面的样子:
```
-A PREROUTING -d 45.20.209.41/255.255.255.248 -p tcp -m tcp --dport 80 \
  -j DNAT --to-destination 192.168.0.125:80
```
然后重新加载设置的 IPTables 规则。
```
iptables-restore /etc/sysconfig/iptables
```
由于防火墙规则是在防火墙主机上,因此不需要把外部 DNS 入口改成指向新服务器。如果你使用的是内部 DNS 服务器,那么你需要把 IP 地址改成内部 DNS 数据库里的 A 记录。如果你没有用内部 DNS 服务器,那么请确保主机 `/etc/hosts` 文件里新服务器地址设置得没有问题。
### 测试和清理
请确保对新配置进行测试。首先,停止旧服务器上的 `mysqld``httpd` 服务。然后通过浏览器访问网站。如果一切符合预期,那么你可以关掉旧服务器上的 `mysqld``httpd`。如果有失败,你可以把 IPTables 的路由规则改回去到旧服务器上,直到问题解决。
之后我把 MySQL 和 HTTPD 从旧服务器上删除了,这样来确保它们不会意外地被启动。
### 总结
就是这么简单。不需要执行数据库导出和导入的过程,因为 `mysql` 目录下所有需要的东西都已经复制过去了。需要执行导出/导入过程的场景是有网站自己的数据库之外的数据库MariaDB 实例上还有其他网站,而你不想把这些网站复制到新服务器上。
迁移旧服务器上的其他网站也很容易。其他网站依赖的所有数据库都已经随着 MariaDB 的迁移被转移到了新服务器上。你只需要把 `/var/website` 目录迁移到新服务器,添加合适的虚拟主机片段,然后重启 HTTPD。
我遵循这个过程把很多个网站从一个服务器迁移到另一个服务器,每次都没有问题。
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/9/migrate-wordpress
作者:[David Both][a]
选题:[lujun9972][b]
译者:[lxbwolf](https://github.com/lxbwolf)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/dboth
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_blue_text_editor_web.png?itok=lcf-m6N7 "Text editor on a browser, in blue"
[2]: https://wordpress.org/
[3]: https://opensource.com/article/18/2/how-configure-apache-web-server
[4]: https://mariadb.org/
[5]: https://opensource.com/article/16/12/cidr-network-notation-configuration-linux
[6]: https://en.wikipedia.org/wiki/Iptables
[7]: http://www.website1.org
[8]: mailto:me@website1.org
[9]: https://firewalld.org/documentation/howto/open-a-port-or-service.html

View File

@ -0,0 +1,206 @@
[#]: subject: "How to Install and Use Latte Dock on Ubuntu and Other Linux Distributions"
[#]: via: "https://itsfoss.com/install-use-latte-dock-ubuntu/"
[#]: author: "Pratham Patel https://itsfoss.com/author/pratham/"
[#]: collector: "lujun9972"
[#]: translator: "wxy"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14340-1.html"
如何安装和使用 Latte Dock
======
![](https://img.linux.net.cn/data/attachment/album/202203/09/091040v3n0vlxvt9a0zokx.jpg)
你知道什么是“<ruby>停靠区<rt>Dock</rt></ruby>” 吧,它通常是你的应用程序“停靠”的底栏,以便快速访问。
![][1]
许多发行版和桌面环境都提供了某种停靠实现。如果你的发行版没有“<ruby>停靠区<rt>Dock</rt></ruby>或者你想尝试一些新的停靠应用Latte Dock 是一个不错的选择。它类似于 macOS 上的停靠区,每次你用鼠标悬停在任何停靠对象上时,都会有一个的抛物线动画。
在本教程中,我将告诉你如何在 Ubuntu 上安装 Latte Dock。我还会展示一些关于使用和定制 Latte Dock 的事情。
### 在 Ubuntu 上安装 Latte Dock
[Latte Dock][2] 是一个流行的应用程序,可以从大多数 Linux 发行版的官方软件库中获得。也就是说你可以使用你的发行版的软件中心或软件包管理器来安装 Latte dock。
![Latte 可以从软件中心获得][3]
在 Ubuntu 和其他基于 Ubuntu 的发行版,如 elementary OS、Linux Mint、Pop!_OS、Zorin OS 上,使用 `apt` 命令:
```
sudo apt install latte-dock
```
这就行了!现在你已经在 Ubuntu 上安装了 Latte Dock。
#### 停用 Ubuntu 自带的停靠区(针对 Ubuntu 用户)
在你启动你闪亮的新停靠区之前,我建议你禁用 Ubuntu 默认提供的停靠区。这里有一个 [关于如何禁用 Ubuntu 的停靠区的指南][4]。
要禁用停靠区,请在你的终端输入以下内容:
```
gnome-extensions disable ubuntu-dock@ubuntu.com
```
如果你最终改变了主意,你可以用以下命令再次启用 Ubuntu 停靠区:
```
gnome-extensions enable ubuntu-dock@ubuntu.com
```
> 注意:
>
> 这不能禁用 Pop!_OS 20.04 LTS 上的默认停靠区(尽管它在桌面上默认是隐藏的;只在活动概览中可见)。在使用 COSMIC 桌面环境/扩展的 Pop!_OS 上,你可以通过“<ruby>设置<rt>Settings</rt></ruby>”应用中的“<ruby>桌面<rt>Desktop</rt></tuby> -> <ruby>停靠区<rt>Dock</rt></ruby>”来禁用或启用停靠区。
### 开始使用 Latte Dock
我在教程中使用的是 Pop!_OS但这些步骤适用于任何 Linux 发行版。
一旦安装完毕,你会在你的应用程序抽屉里发现一个 Latte Dock 的启动器图标。你可以在这里访问它,或者按 `Super` 键(通常是 `Windows` 键;如果你有 Mac 键盘,则按 `Command` 键)键 + `A`
从这里打开 Latte Dock
![应用抽屉里高亮显示的 Latte dock][5]
酷!现在你的桌面上已经打开了 Latte Dock。
![桌面上的 Latte Dock 屏幕截图][6]
#### 启用 Latte Dock 的自动启动功能
随着 Latte Dock 的打开,以及 Ubuntu 自带停靠区的禁用,如果你现在重启,那么下次你的电脑开机时就不会有任何停靠区了。
让我们现在就来解决这个问题。
在停靠区上点击右键。点击“<ruby>布局<rt>Layouts</rt></ruby>”子菜单下的“<ruby>配置<rt>Configure</rt></ruby>”选项。
![通过进入“布局” -> “配置” 启动设置面板窗口][7]
现在,在“<ruby>偏好<rt>Preferences</rt></ruby>”选项卡下,确保“<ruby>在启动时启用自动启动<rt>Enable autostart during startup</rt></ruby>”复选框被选中。
![启用启动时自动启动复选框][8]
### 定制你的停靠区
如果你安装了任何 KDE 的产品,定制应该是永无止境的。如果 Latte Dock 不允许定制,那就奇怪了。幸运的是,情况并非如此。
你可以做各种各样的事情来定制 Latte Dock。增加它的大小使它更透明或半透明为它设计主题等等。
#### 将应用程序固定在停靠区上
要把你的应用程序固定在 Latte Dock 上,打开该应用程序,右键点击在你停靠区中的应用程序图标。现在点击“<ruby>固定启动器<rt></rt>Pin Launcher</ruby>”。完成了!你的应用程序现在已经被固定到了停靠区上。
![右击正在运行的应用程序并选择钉住启动器选项][9]
你可以通过点击和拖动移动它到左边或右边来改变它在停靠区中的位置。
#### 搜索和安装 Latte Dock 主题
通过右击停靠区打开 Latte Dock 的“<ruby>设置<rt>Settings</rt></ruby>”窗口,点击“<ruby>布局<rt>Layout</rt></ruby>”子菜单下的“<ruby>配置<rt>Configure</rt></ruby>”选项。
你可能已经安装了一些主题(呃...布局)。从已安装的选项列表中选择它,然后点击右侧的切换按钮。
![改变 Latte Dock 的主题][10]
你也可以通过点击“<ruby>下载<rt>Download</rt></ruby>”按钮来下载更多的主题。它应该向你显示一个可用的主题列表,以供安装。
![Latte Dock 插件安装窗口][11]
#### 改变停靠区的外观和行为
正如我前面提到的,在 KDE 产品中有大量的定制选项。
让我们来试试。
右键点击停靠区,点击 “<ruby>停靠区设置<rt>Dock Settings</rt></ruby>”。
![通过右键点击停靠区进入 Latte Dock 设置][12]
在这里,你会得到各种类型的可以切换的选项。想把停靠区移到显示器的左侧吗?你可以通过“<ruby>位置<rt> Location</rt></ruby>”子菜单下提供的选项来实现。
![Dock 设置和定制窗口][13]
如果你觉得可用的选项有任何限制,请拨动右上角的“<ruby>高级<rt>Advanced</rt></ruby>”开关。
![现在可以看到带有高级选项的停靠区设置和定制窗口][14]
现在看起来真是太棒了!
试着切换每个可用的开关。你可以延迟隐藏停靠区。你可以把它放在显示器的一个边缘,把它放在该边缘的中心、左边或右边。你可以做到这一切。
想修饰启动、悬停等效果?在“<ruby>效果<rt>Effects</rt></ruby>”选项卡下有更多的调整选项等待着你。
### 从你的系统中删除 Latte Dock
你安装了 Latte Dock并对其进行了定制但觉得它不是你想要的东西。而你现在正在寻找删除 Latte Dock 的方法。很好,我帮你。
你可以使用 `apt` 软件包管理器删除 Latte Dock。用下面的命令来做
```
sudo apt autoremove --purge latte-dock
```
![][15]
`--purge` 标志将删除 Latte Dock 在系统目录中的任何配置文件,除了 `~/.config`
#### 仅供高级用户使用:删除用户特定的遗留文件
这不是强制性的,但如果你想删除通常放在 `$HOME/.config`(即 `~/.config`)目录中的用户配置文件。[使用 find 命令][16] 来定位 Latte Dock 的配置文件:
```
find ~/.config -iname "latte*"
```
![][17]
你可以安全地从你的 `~/.config` 目录中删除这些目录和配置文件。
#### 对于 Ubuntu 用户:重新启用 Ubuntu 停靠区
不要忘了启用 Ubuntu 的停靠区。如果你不记得了,再次启用停靠区的命令在下面:
```
gnome-extensions enable ubuntu-dock@ubuntu.com
```
### 总结
Latte Dock 是一个来自 KDE 社区的令人惊艳的停靠区 ( ͡° ͜ʖ ͡°)
它提供了大量的主题(布局)、外观和自定义选项,以及一些漂亮的效果。如果你正在考虑定制你的桌面外观和感觉,它肯定是你应该寻找的东西。
如果你最终喜欢上了 Latte Dock 并开始每天使用它,请在评论中告诉我。如果你不喜欢 Latte Dock也请发表评论让我知道原因。
--------------------------------------------------------------------------------
via: https://itsfoss.com/install-use-latte-dock-ubuntu/
作者:[Pratham Patel][a]
选题:[lujun9972][b]
译者:[wxy](https://github.com/wxy)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/pratham/
[b]: https://github.com/lujun9972
[1]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/latte-dock.webp?resize=800%2C167&ssl=1
[2]: https://invent.kde.org/plasma/latte-dock
[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/latte-ubuntu-software-center.png?resize=800%2C384&ssl=1
[4]: https://itsfoss.com/disable-ubuntu-dock/
[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/02_latte_in_drawer.webp?resize=800%2C450&ssl=1
[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/03_latte_dock_launched.webp?resize=800%2C450&ssl=1
[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/configure-latte-dock.png?resize=800%2C392&ssl=1
[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/enable_autostart_latte_dock.webp?resize=800%2C433&ssl=1
[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/pin-app-latte-dock.webp?resize=800%2C334&ssl=1
[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/change-themes-latte-dock.webp?resize=800%2C393&ssl=1
[11]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/08_download_layouts.webp?resize=800%2C450&ssl=1
[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/latte_dock_settings.webp?resize=799%2C246&ssl=1
[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/11_customization_options.webp?resize=800%2C450&ssl=1
[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/12_customization_options_advanced.webp?resize=800%2C450&ssl=1
[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/15_apt_get_remove.webp?resize=800%2C450&ssl=1
[16]: https://linuxhandbook.com/find-command-examples/
[17]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/13_find_configs.webp?resize=800%2C450&ssl=1

View File

@ -0,0 +1,351 @@
[#]: subject: "Vanilla Vim is fun"
[#]: via: "https://opensource.com/article/21/12/vanilla-vim-config"
[#]: author: "Lukáš Zapletal https://opensource.com/users/lzap"
[#]: collector: "lujun9972"
[#]: translator: "wxy"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14326-1.html"
简简单单的 Vim 就很好
======
> 这就是我如何从 35 个 Vim 插件降到只有 6 个的原因。
![](https://img.linux.net.cn/data/attachment/album/202203/04/161603q6mmr6q7kkkd2yky.jpg)
当你用 `—clean` 选项启动 Vim 时,它以 “素” 模式展示 Vim。没有插件、没有配置一切回到了最初。多年来我收集了一堆配置语句其中一些可以追溯到 MS-DOS 或 Windows 3.1 时期。我是这样打算的:从头开始,只用 Fedora 35 中可用的插件,找到一个好的配置起点。我可以在一周的编码生活中生存下来吗?我会找到答案的!
规则是这样的:尽可能少的配置语句,并且只使用 Fedora 35+ 中的插件。顺便说一下,如果你不是 Fedora 用户,也请继续阅读。你可以随时从你的操作系统软件包管理器手动安装或者使用 Vim 插件管理器安装这些插件。
在我开始之前,有一个大问题需要解决:用 Vim 还是 NeovimVim 的一个复刻)。好吧,这由你决定。这篇文章中的所有内容应该对两者都适用。然而,我只用 Vim 测试过。当你登录到一个只有 `vi` 可用的服务器时,所有的这些技能都会派上用场。它可以是一个旧的 UNIX 系统、一个安装了最少的软件以提高安全性的 Linux 服务器、一个容器中的交互式 shell或者一个空间宝贵的嵌入式系统。
闲话少说,下面是我提炼出来的使用 Vim 进行编码的绝对最低限度的东西:
```
# dnf install --allowerasing vim-default-editor \
        vim-enhanced \
        vim-ctrlp \
        vim-airline \
        vim-trailing-whitespace \
        vim-fugitive \
        vim-ale \
        ctags
```
不要担心 `—allowerasing` 选项。在确认之前,只需查看一下安装的东西。这个选项的作用是告诉软件包管理器把现有的 `nano-default-editor` 包替换为 `vim-default-editor`。这是一个小软件包,它在 shell 配置文件中将 `EDITOR` 环境变量设置为 `vim`,如果你想默认使用 Vim例如`git` 一起使用),这是必须的。这是专门针对 Fedora 的。你不需要在其他发行版或操作系统上这样做,只要确保你的 `EDITOR` shell 变量被正确设置就行。
### 概览
简单介绍一下我认为好的、干净的插件集:
* **CtrlP**:尽可能小的模糊查找插件(纯 vimscript
* **Fugitive**:一个 git 的必备工具
* **Trailing-whitespace**:显示并修复(删除)尾部的空格
* **Airline**:一个改进的状态行(纯 vimscript
* **Ale**:在你打字时高亮显示错别字或语法错误
* **Ctags**:不是 Vim 插件,但却是一个非常需要的工具
还有其他的模糊查找插件,如 command-t 或我最喜欢的 `fzf.vim`(非常快)。问题是,`fzf.vim` 不在 Fedora 中而我想要尽可能少的配置。CtrlP 就可以了,而且配置它更容易,因为它不需要什么依赖。
如果让我选择一个绝对最小的配置,那就是:
```
# cat ~/.vimrc
let mapleader=","
let maplocalleader="_"
filetype plugin indent on
let g:ctrlp_map = '<leader><leader>'
let g:ctrlp_user_command = ['.git/', 'git --git-dir=%s/.git ls-files -oc --exclude-standard']
set exrc
set secure
```
但这可能太极端了,所以这里是一个稍大的配置,下面是我的详细解释:
```
" vim: nowrap sw=2 sts=2 ts=2 et:
" leaders
let mapleader=","
let maplocalleader="_"
" filetype and intent
filetype plugin indent on
" incompatible plugins
if has('syntax') && has('eval')
packadd! matchit
end
" be SSD friendly (can be dangerous!)
"set directory=/tmp
" move backups away from projects
set backupdir=~/.vimbackup
" fuzzy searching
let g:ctrlp_map = '<leader><leader>'
let g:ctrlp_user_command = ['.git/', 'git --git-dir=%s/.git ls-files -oc --exclude-standard']
nnoremap <leader>b :CtrlPBuffer<cr>
nnoremap <leader>t :CtrlPTag<cr>
nnoremap <leader>f :CtrlPBufTag<cr>
nnoremap <leader>q :CtrlPQuickfix<cr>
nnoremap <leader>m :CtrlPMRU<cr>
" buffers and quickfix
function! ToggleQuickFix()
if empty(filter(getwininfo(), 'v:val.quickfix'))
copen
else
cclose
endif
endfunction
nnoremap <leader>w :call ToggleQuickFix()<cr>
nnoremap <leader>d :bd<cr>
" searching ang grepping
nnoremap <leader>g :copen<cr>:Ggrep!<SPACE>
nnoremap K :Ggrep "\b<C-R><C-W>\b"<cr>:cw<cr>
nnoremap <leader>s :set hlsearch! hlsearch?<cr>
" ctags generation
nnoremap <leader>c :!ctags -R .<cr><cr>
" per-project configs
set exrc
set secure
```
### 使用逗号作为引导键
我喜欢把我的 `引导键` 映射成逗号 `,`,而不是默认的反斜杠 `\`。当你的手处于书写位置时,它是 Vim 中最接近的自由键。另外,这个键在大多数键盘布局中都是一样的,而 `\` 在每个型号或布局都不一样。我很少使用 `本地引导键`,但下划线 `_` 看起来很合适。
延伸阅读:
* 参见 [Vim 参考手册][2] 中的 `:help map-which-keys`
* 参见 [Vim Tips Wiki][3] 中的 Vim 中未使用的键。
### 文件类型和关闭语法高亮
接下来是非常重要的 `filetype` 命令。看Vim 自带“内置电池”8.2 版本包含 644 种语言的语法高亮251 个文件类型定义(`ftplugins`),以及 138 种语言的缩进规则。然而,缩进在默认情况下是不启用的,也许是为了给所有人提供一个一致的编辑体验。我喜欢启用它。
一个简单的技巧:如果你正在编辑一个非常大的文件,并且 Vim 感觉很慢,你可能想禁用语法高亮来加快速度。只要输入 `:syn off` 命令即可。
延伸阅读:
* 参见 [Vim 参考手册][4] 中的 `:help filetype`
* 参见 [Vim 参考手册][5] 中的 `:help syntax`
* 参见 [Vim 参考手册][6] 中的 `:help indent`
### Matchit 插件
Vim 甚至额外带有使得一些功能不兼容的插件,其中一个相当有用。它就是 `matchit` 插件,它使按下 `%` 键可以在某些语言中查找匹配的括号。通常情况下,你可以找到一个块的开始或结束(开始和结束括号)或 HTML 匹配标签及类似的。
延伸阅读:
* 参见 [Vim 参考手册][7] 中的 `:help matchit`
### 交换文件
我想从我的旧配置中保留的许多设置之一是使用 `/tmp` 进行交换,并在我的家目录的一个单独目录中创建备份,你需要用 `mkdir ~/.vimbackup` 来创建这个目录。重要的是要明白当你开始编辑时Vim 会创建一个名为 “交换文件” 的副本,所有未保存的工作都会保存在这个文件中。所以即使停电了,你的交换文件也包含了大部分未保存的工作。我更喜欢使用 `tmpfs`,因为我所有的笔记本电脑和服务器都有 UPS 保护,而且我经常保存。另外,大多数情况下,你会使用到交换文件是当你的 SSH 连接丢失而不是由于停电时。对于大文件来说,交换文件可能相当大,我很珍视我的固态硬盘,所以我决定这样做。如果你不确定,可以删除这句话,使用 `/var/tmp`,这样更安全。
延伸阅读;
* 参见 [Vim 参考手册][8] 中的 `:help swap-file`
### 模糊寻找插件
现在,模糊查找是一个我不能没有的插件。在服务器上当你每天需要打开 20 个文件时,使用 `:Ex``:e``:tabe` 等命令打开文件是没问题的。而当编码时我通常需要打开数百个文件。正如我所说CtrlP 很好地完成了这项工作。它很小,没有依赖性,纯 Vim。它用 `Ctrl + P` 组合键打开,这对我来说有点奇怪。我知道一些著名的编辑器(我记得是 VSCode使用这个组合键。问题是这已经是很重要的 Vim 绑定键,我不想覆盖它。所以对我来说,赢家是 `引导键 + 引导键`(逗号按两次)。
`ctrlp_user_command` 只是改变了 CtrlP 获取文件列表的方式。它不使用内置的递归文件列表glob而是使用 `git ls-files`,这通常更好,因为它忽略了 `.gitignore` 中的东西,所以像 `node_modules` 或其他可能拖慢列表的不相关目录不会受到影响。
使用 `引导键` + `B`/`T`/`F`/`Q`/`M` 来打开缓冲区、标签、当前文件的标签、快速修复缓冲区和最近使用的文件的列表,非常有用。具体来说,一旦你用 `ctags` 生成了标签列表,这基本上就是数百种编程语言的“去……定义处”,而且不需要插件!这都是 Vim 内置的。现在澄清一下,当我说输入 `引导键 + B` 时,是指按下逗号,然后按 `B` 键,而不是像用 `Control``Shift` 那样一起按。
延伸阅读:
* 参见 [Vim 参考手册][9] 中的 `:help Explore`
* 参见 [ctrlp.vim GitHub][10]。
### 缓冲区管理
虽然现在 Vim 支持标签,但缓冲区管理是掌握 Vim 的一个重要技能。我通常会有很多缓冲区,我需要经常做 `:bdelete`。那么,`引导键 + D` 似乎是一个不错的选择,可以更快地完成这个任务。我也喜欢关闭 Quickfix 窗口,所以也有 `引导键 + W` 的组合键,我在浏览搜索结果时经常使用这个功能。
延伸阅读:
* 参见 [Vim 参考手册][11] 中的 `:help buffer-hidden`
### Ggrep 和 fugitive 插件
说到搜索,它和打开文件一样重要。我希望能够对代码库进行检索。为此,有一个来自 fugitive 插件的很棒的 `:Ggrep` 命令,它使用 `git grep`,忽略了垃圾文件,只搜索 Git 中的内容。由于 `Shift + K` 是 Vim 中的一个自由键,它非常适用于自动检索光标位置的词语。最后,能够使用 `引导键 + G` 输入任意的搜索模式也很好。注意,这将打开一个叫做 Quickfix 的窗口,你可以在这里浏览结果、查看下一个/上一个/最后一个/第一个出现的地方,等等。这个窗口也用于编译器或其他工具的输出,所以要熟悉它。如果你对此感到陌生,我建议进一步阅读文档。
延伸阅读:
* 参见 [Vim 参考手册][12] 中的 `:help quickfix`
* 参见 [vim-fugitive GitHub][13]。
### 用 fugitive 进行搜索、检索
顺便说一下,用 `/` 键搜索是智能和大小写敏感的这意味着如果所有的搜索字符都是小写的Vim 的搜索会忽略大小写。默认情况下,它会高亮显示结果,我觉得我已经敲了无数次的 `:noh`(来关闭高亮显示)。这就是为什么我有 `引导键 + S` 来切换高亮显示。我建议以后也多读读手册中关于搜索的内容。
接下来是搜索、检索。fugitive 插件已经为你提供了。使用命令 `:Ggrep pattern` 来进行 `git grep`,结果会进入 Quickfix 窗口。然后简单地使用快速修复命令(`:cn`、`:cp` 等等)浏览结果,或者简单地使用 `:CtrlPQuickfix``引导键 + Q`来直观地滚动它们。CtrlP 的快速修复整合的酷炫之处是,你可以通过输入以匹配文件名或内容来进一步在搜索结果中搜索。
延伸阅读:
* 参见 [Vim 参考手册][14] 中的 `:help grep`
* 参见 [Vim 参考手册][15] 中的 `:help noh`
* 参见 [vim-fugitive GitHub][13] 。
### Ctags
`引导键 + C` 可以生成一个 ctags 文件以便更好地导航这在处理一个新的代码库或做一个有很多跳转的较长的编码任务时很有用。ctags 支持数百种语言,而 Vim 可以利用所有这些知识来导航。后面会有更多关于如何配置它的内容。注意我已经讨论过 `引导键 + T` 来打开所有标签的模糊搜索,记得吗?这两个是非常相同的。
延伸阅读:
* 参见 [Vim 参考手册][16] 中的 `:help ctags`
* 参见 [Universal Ctags 网站][17]。
### 按键映射
能够通过在项目目录下创建一个 `.vimrc` 文件来覆盖该项目中的任何设置是一个好主意。只要把它放在(全局的) `.gitignore` 中,以确保你不需要在每个项目中编辑成千上万的 `.gitignore` 文件。这样的一个项目的 `.vimrc` 可以是这样的(对于使用 GNU Makefile 的 C/C++ 项目):
```
" coding style
set tabstop=4
set softtabstop=4
set shiftwidth=4
set noexpandtab
" include and autocomplete path
let &path.="/usr/local/include"
" function keys to build and run the project
nnoremap <F9> :wall!<cr>:make!<cr><cr>
nnoremap <F10> :!LD_LIBRARY_PATH=/usr/local/lib ./project<cr><cr>
```
正如你所看到的,我通常将 `F2``F10` 等键映射到编译、运行、测试和类似的操作。用 `F9` 来调用 `make`,听起来不错。还记得 MS-DOS 上的蓝色 Borland IDE 吗?
如前所述,在全局范围内忽略 `.vimrc` 和(由 `ctags` 生成的)`tags` 是个好主意,所以不需要每次都更新 `.gitignore`
```
# git config --global core.excludesfile ~/.gitignore
# cat ~/.gitignore
/.vimrc
/tags
/TAGS
```
在我的个人配置中还有几条只与那些非美国键盘布局的人有关我用捷克语。我需要用“死键”来输入许多字符LCTT 译注:“死键”是一种通过将变音符号与后面的字母结合起来打出重音字符的方法。这种方法在历史上被用于机械打字机),这根本不可能,我宁愿输入命令而不是按那些难以按下的组合键。这里有一个解决问题的办法:
```
" CTRL-] is hard on my keyboard layout
map <C-K> <C-]>
" CTRL-^ is hard on my keyboard layout
nnoremap <F1> :b#<cr>
nnoremap <F2> :bp<cr>
nnoremap <F3> :bn<cr>
" I hate entering Ex mode by accident
map Q <Nop>
```
延伸阅读:
* 参见 [Vim 参考手册][18] 中的 `:help map`
功能键在 Vim 中都是自由的,除了 `F1`,它被绑定在帮助上。我不需要帮助,并不是说我已经会对 Vim 了如指掌,并不是。但如果需要的话,我可以简单地输入 `:help`。而 `F1` 是一个关键的键,离 `Esc` 键如此之近。我喜欢将它用于缓冲区交换(`:b#`),将 `F2`/`F3` 用作下一个/上一个。你越是与缓冲区打交道,你就越需要这个。如果你没有使用过 `Ctrl + ^`,我建议你要习惯于它。哦,你有没有丑陋地输入 `:visual` 进入过 Ex 模式?许多初学者都不知道如何从该模式下退出 Vim。对我来说这就是打扰因为我很少使用它。
现在,熟悉 `ctags` 是成功使用 Vim 的一个关键因素。这个工具支持数百种语言,它不小心就为你不想创建标签的文件创建它,因此我建议忽略典型的垃圾目录:
```
# cat ~/.ctags.d/local.ctags
--recurse=yes
--exclude=.git
--exclude=build/
--exclude=.svn
--exclude=vendor/*
--exclude=node_modules/*
--exclude=public/webpack/*
--exclude=db/*
--exclude=log/*
--exclude=test/*
--exclude=tests/*
--exclude=\*.min.\*
--exclude=\*.swp
--exclude=\*.bak
--exclude=\*.pyc
--exclude=\*.class
--exclude=\*.cache
```
### Airline 插件
我一定不能忘记 Vim 的 Airline 插件。在 Fedora 的两个插件中,这个插件很轻量级,不需要外部依赖,而且可以开箱即用我所有的字体。你可以定制它,而且还有主题之类的东西。我只是碰巧喜欢它的默认设置。
我必须提到,有两个主要的 Ctags 项目Exuberant Ctags 和 Universal Ctags。后者是一个更现代的复刻。如果你的发行版有就用它。如果你在 Fedora 35+ 上,你应该知道你现在用的是 Universal Ctags。
### 总结
作为总结,我的建议是这样的。尽量保持你的 Vim 配置流畅和干净。这将在未来得到回报。在我转换到新配置之后,我不得不重新学习“写入并退出”的命令,因为我总是不小心把它打成 `:Wq`,而我在旧的配置里有一个“小技巧”,让它实际上按我的意思工作。好吧,这个可能真的很有用,并能入选,我希望你能明白我的意思:
```
:command Wq wq
:command WQ wq
```
最后的一个快速技巧是:你可能需要经常改变你的默认 Vim 配置,来找到我在这里向你介绍的和你自己口味之间的舒适区。使用下面的别名,这样你就不需要一直搜索历史。相信我,当一个 Vim 用户在命令历史里搜索 “vim” 时,找不到什么是相关的内容:
```
alias vim-vimrc='vim ~/.vimrc'
```
就是这些了。也许这可以帮助你在没有大量插件的情况下在 Vim 的丰富世界遨游。“简简单单” 的 Vim 也很不错!
要尝试你刚刚读到的内容,请安装软件包并检出这些配置:
```
test -f ~/.vimrc && mv ~/.vimrc ~/.vimrc.backup
curl -s https://raw.githubusercontent.com/lzap/vim-lzap/master/.vimrc -o ~/.vimrc
mkdir ~/.vimbackup
```
特别感谢 Marc Deop 和 [Melanie Corr][19] 对本文的审阅。
### 更新
我已经在这种配置下生存下来了!我唯一的纠结是 CtrlP 插件的结果顺序不同。文件的模糊算法与 `fzf.vim` 插件不同,所以我以前用各种搜索词能找到的文件现在找不到了。我最后安装了 Fedora 的 fzf 包以获得更相关的文件搜索,它附带了一个 vim 函数 `FZF`,可以绑定到引导键组合上。请看我的 [GitHub 仓库][20] 中更新后的配置文件。一路走来,我学到了很多东西。有一些键的绑定我已经忘记了,这要感谢许多插件。
这篇文章最初发表在 [作者的网站][21] 上,经许可后重新发表。
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/12/vanilla-vim-config
作者:[Lukáš Zapletal][a]
选题:[lujun9972][b]
译者:[wxy](https://github.com/wxy)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/lzap
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/coffee_tea_laptop_computer_work_desk.png?itok=D5yMx_Dr (Person drinking a hot drink at the computer)
[2]: https://vimhelp.org/map.txt.html#map-which-keys
[3]: https://vim.fandom.com/wiki/Unused_keys
[4]: https://vimhelp.org/filetype.txt.html
[5]: https://vimhelp.org/syntax.txt.html
[6]: https://vimhelp.org/indent.txt.html
[7]: https://vimhelp.org/usr_05.txt.html#matchit-install
[8]: https://vimhelp.org/recover.txt.html#swap-file
[9]: https://vimhelp.org/pi_netrw.txt.html#netrw-explore
[10]: https://github.com/kien/ctrlp.vim
[11]: https://vimhelp.org/windows.txt.html#buffer-hidden
[12]: https://vimhelp.org/quickfix.txt.html
[13]: https://github.com/tpope/vim-fugitive
[14]: https://vimhelp.org/quickfix.txt.html#grep
[15]: https://vimhelp.org/pattern.txt.html#noh
[16]: https://vimhelp.org/tagsrch.txt.html
[17]: https://ctags.io
[18]: https://vimhelp.org/map.txt.html
[19]: https://opensource.com/users/melanie-corr
[20]: https://github.com/lzap
[21]: https://lukas.zapletalovi.com/2021/11/a-sane-vim-configuration-for-fedora.html

View File

@ -0,0 +1,87 @@
[#]: subject: "13 examples of how DevOps facilitated transformation in 2021"
[#]: via: "https://opensource.com/article/22/1/devops-transformation"
[#]: author: "Will Kelly https://opensource.com/users/willkelly"
[#]: collector: "lujun9972"
[#]: translator: "CN-QUAN "
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14323-1.html"
2021 总结DevOps 促进转型的 13 个例子
======
> 2021 年,我们的顶级 DevOps 文章聚焦于工具、最佳实践和最关键的部分:转型。
![](https://img.linux.net.cn/data/attachment/album/202203/03/112426i6am9jokk88z9n89.jpg)
2021 年对于 DevOps 来说是激动人心的一年,开发团队不断适应远程和混合工作模式。这一年最受欢迎的 DevOps 文章展示了我们的社区如何关注工具、创新、最佳实践和转型。
### DevOps 工具和创新
该行业的工具仍然是读者的首选读物。[Nimisha Mukherjee][2] 是红帽的一名工程经理,她编写了 [面向开发人员的 13 个开源工具][3]。她将工具分为“内环”和“外环”两个部分“内环”是开发人员最常见的任务“外环”是开发人员的代码通过持续集成和交付CI/CD部署到生产环境的地方。
我们的读者对实现 DevOps 工具链的兴趣也很高。首次投稿的 [Tereza Denkova][4] 是一家 IT 专业服务公司 Accedia 的营销助理,他撰写了 [如何实现 DevOps 工具链][5],并将其与创新紧密联系在一起。
### DevOps 实践
[Daniel Oh][6] 是我们的主要支持者,也是一位多产的内容创作者,他写了 [2021 年需要关注的 3 个无服务器策略][7],概述了当今无服务器应用程序开发和部署方法是如何加速采用 DevApps 实践的。
[Evan “Hippy” Satis][8] 在他的文章 [解决 CI/CD 中的存储库阻抗不匹配][9] 中提供了调整部署映像和描述符的策略。他是红帽公司的高级顾问,他在文章中采用的有条不紊的方法证明了他的行业经验。另外,请参阅他的文章 [在 shell 中处理模块化和动态配置文件][10]。
在我的文章 [DevOps 文档指南][11] 中,我提出了让文档成为 DevOps 讨论的一部分的理由。我从读者那里得到了一些有见地的评论,因此我正在为未来的一篇文章跟进这些评论。
### DevOps 转型
我们有时不相信 DevOps 能够适应组织需求。理解其他形式的运维的潜在影响是非常必要的,这些运维可能在现在或将来补充或增强 DevOps。[Bryant Son][12],一个自称是<ruby>章鱼猫<rt>Octocat</rt></ruby>的人,在 [GitOps 和 DevOps 有何不同?][13] 中提出 GitOps 是 DevOps 的进化形式。
[Mike Calizo][14] 是新西兰奥克兰的一位红帽公司解决方案架构师,他撰写了 [如何成功采用 DevSecOps][15]。本文将介绍他作为解决方案架构师的经验。他解释了在你迁移到 DevSecOps 的过程中可能会遇到的一些安全挑战。
我写了一系列关于 DevOps 到 DevSecOps 转型的文章。它们是:
* [启动从 DevOps 到 DevSecOps 的转型][16]
* [开始 DevSecOps 转型的 3 个阶段][17]
* [遵循 DevSecOps 成熟度模型][18]
* [DevSecOps 转型的另外 3 个阶段][19]
* [使 DevSecOps 的采用成为团队努力的 4 个步骤][20]
### 2022 年和 DevOps 的未来
看到 DevOps 的文章登上了 2021 年最受欢迎的名单,说明 DevOps 将迎来一个更加有趣的 2022 年,因为组织正在继续掌握他们的工具,改进他们的战略,并继续他们的 [数字化转型][21],以便在不断变化的市场中有效地竞争。
感谢所有阅读我们的 DevOps 文章、喜欢这些文章,并通过网站和社交媒体给我们发送评论的人。
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/1/devops-transformation
作者:[Will Kelly][a]
选题:[lujun9972][b]
译者:[CN-QUAN](https://github.com/CN-QUAN)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/willkelly
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/gears_devops_learn_troubleshooting_lightbulb_tips_520.png?itok=HcN38NOk (Tips and gears turning)
[2]: https://opensource.com/users/nimisha
[3]: https://opensource.com/article/21/6/open-source-developer-tools
[4]: https://opensource.com/users/tereza-denkova
[5]: https://opensource.com/article/21/1/devops-tool-chain
[6]: https://opensource.com/users/daniel-oh
[7]: https://opensource.com/article/21/1/devapps-strategies
[8]: https://opensource.com/users/hippyod
[9]: https://opensource.com/article/21/8/impedance-mismatch-cicd
[10]: https://opensource.com/article/21/5/processing-configuration-files-shell
[11]: https://opensource.com/article/21/3/devops-documentation
[12]: https://opensource.com/users/brson
[13]: http://opensource.com/article/21/3/gitops
[14]: https://opensource.com/users/mcalizo
[15]: https://opensource.com/article/21/2/devsecops
[16]: http://opensource.com/article/21/10/devops-to-devsecops
[17]: https://opensource.com/article/21/10/first-phases-devsecops-transformation
[18]: https://opensource.com/article/21/10/devsecops-maturity-model
[19]: https://opensource.com/article/21/10/last-phases-devsecops-transformation
[20]: https://opensource.com/article/21/10/devsecops-team-effort
[21]: https://enterprisersproject.com/what-is-digital-transformation

View File

@ -0,0 +1,146 @@
[#]: subject: "What you need to know about fuzz testing and Go"
[#]: via: "https://opensource.com/article/22/1/native-go-fuzz-testing"
[#]: author: "Gaurav Kamathe https://opensource.com/users/gkamathe"
[#]: collector: "lujun9972"
[#]: translator: "lxbwolf"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14367-1.html"
你需要了解的 Go 中的模糊测试
======
> Go 团队接受了新增对模糊测试的支持的提议。
![](https://img.linux.net.cn/data/attachment/album/202203/18/103123drbhbozibvt0vtib.jpg)
[Go][2] 的应用越来越广泛。现在它是云原生软件、容器软件、命令行工具和数据库等等的首选语言。Go 很早之前就已经有了内建的 [对测试的支持][3]。这使得写测试代码和运行都相当简单。
### 什么是模糊测试?
<ruby>模糊测试<rt>fuzz testing</rt></ruby>fuzzing是指向你的软件输入非预期的数据。理想情况下这种测试会让你的应用程序崩溃或有非预期的表现。抛开最终的结果从程序对非预期的输入数据的处理结果中你可以得到很多信息这样你就可以增加一些合适的错误处理。
任何一个软件都有对不同来源的输入或数据的接收说明,软件会对这些数据进行处理并返回适当的结果。软件开发后,测试工程师团队对其进行测试,找出软件中的错误,给出测试报告,并(由开发者)修复。通常测试的目的是验证软件的行为是否符合预期。测试又可以细分为不同的类型,如功能测试、集成测试、性能测试等等。每种测试方法关注软件功能的某一个方面,以便发现错误或者提升可靠性或性能。
模糊测试在这一测试过程上更进一步,尝试向软件程序输入一些“无效”或“随机”的数据。这种输入是故意的,期望得到的结果就是程序崩溃或输出异常,这样就可以暴露程序中的错误以便由开发者来修复它们。与其他测试类似,很少需要手动进行模糊测试,业界有大量的模糊测试工具可以将这个过程自动化。
### Go 中的软件测试
举个例子,假如你想测试 `add.go` 中的 `Add()` 函数,你可以在 `add_test.go` 中导入 `testing` 包并把测试体写在以 `TestXXX()` 开头的函数内。
考虑如下代码:
```
func Add(num1, num2 int) int {
}
```
`add_test.go` 文件中,你可能有如下测试代码:
```
import "testing"
func TestAdd(t *testing.T) {
}
```
运行测试:
```
$ go test
```
### 新增对模糊测试的支持
Go 团队已经接受了 [新增对模糊测试的支持的提议][4],以进一步推动这项工作。这涉及到新增一个 `testing.F` 类型,在 `_test.go` 文件中新增 `FuzzXXX()` 函数,在 Go 工具中会新增一个 `-fuzz` 选项来执行这些测试。
`add_test.go` 文件中:
```
func FuzzAdd(f *testing.F) {
}
```
执行以下代码:
```
$ go test -fuzz
```
在本文编写时,这个 [功能还是试验性的][5],但是应该会在 1.18 发布版本中包含。LCTT 译注:[Go 1.18][14] 刚刚发布,已经包含了对模糊测试的支持)目前很多功能如 `-keepfuzzing`、`-race` 等也还没有支持。Go 团队最近发布了一篇 [模糊测试教程][6],值得读一下。
### 安装 gotip 来获取最新的功能
如果你极度渴望在正式发布之前尝试这些功能,你可以使用 `gotip` 来测试即将正式发布的 Go 功能并反馈给他们。你可以使用下面的命令来安装 `gotip`。安装之后,你可以用 `gotip` 程序代替以前的 `go` 程序来编译和运行程序。
```
$ go install golang.org/dl/gotip@latest
$ gotip download
$ gotip version
go version devel go1.18-f009910 Thu Jan 6 16:22:21 2022 +0000 linux/amd64
```
### 社区对于模糊测试的观点
软件社区中经常会讨论模糊测试不同的人对模糊测试有不同的看法。有些人认为这是一种有用的技术可以找到错误尤其是在安全方面。然而考虑到模糊测试所需要的资源CPU、内存有人就认为这是一种浪费而他们更愿意用其他的测试方法。即使在 Go 团队内部,意见也不统一。我们可以看到 Go 的联合创始人 Rob Pike 对模糊测试的使用和在 Go 中的实现是持轻微的怀疑态度的。
> ..._虽然模糊测试有助于发现某类错误但是它会占用大量的 CPU 和存储资源,并且效益成本比率也不明确。我担心为了写模糊测试浪费精力,或者 git 仓库中充斥大量无用的测试数据_
>
> ~[Rob Pike][7]
然而Go 安全团队的另一个成员Filo Sottile似乎对 Go 新增支持模糊测试很乐观,举了很多例子来支持,也希望模糊测试能成为开发过程中的一部分。
> _我想说模糊测试可以发现极端情况下的错误。这是我们作为安全团队对其感兴趣的原因在极端情况下发现的错误可以避免在生产环境中成为弱点。_
>
> _我们希望模糊测试能成为开发的一部分 —— 不只是构建或安全方面 —— 而是整个开发过程:它能提升相关代码的质量..._
>
> ~[Filo Sottile][8]
### 现实中的模糊测试
对我而言模糊测试在发现错误以及让系统变得更安全和更有弹性方面似乎非常有效。举个例子Linux 内核也会使用名为 [syzkaller][9] 的工具进行模糊测试,这个工具已经发现了 [大量][10] 错误。
[AFL][11] 也是比较流行的模糊测试工具,用来测试 C/C++ 写的程序。
之前也有对 Go 程序进行模糊测试的观点,其中之一就是 Filo 在 GitHub 评论中提到的 [go-fuzz][12]。
> _go-fuzz 的记录提供了相当惊人的证据,证明模糊处理能很好地找到人类没有发现的错误。根据我的经验,我们只需要消耗一点点 CPU 的时间就可以得到极端情况下非常高效的测试结果。_
### 为什么在 Go 中新增对模糊测试的原生支持
如果我们的需求是对 Go 程序进行模糊测试,之前的工具像 `go-fuzz` 就可以完成,那么为什么要在这种语言中增加原生支持呢?[Go 模糊测试设计草案][13] 中说明了这样做的一些根本原因。设计的思路是让开发过程更简单,因为前面说的工具增加了开发者的工作量,还有功能缺失。如果你没有接触过模糊测试,那么我建议你读一下设计草案文档。
> 开发者可以使用诸如 `go-fuzz``fzgo`(基于 `go-fuzz`)来解决某些需求。然而,已有的每种解决方案都需要在典型的 Go 测试上做更多的事,而且还缺少关键的功能。相比于其他的 Go 测试(如基准测试和单元测试),模糊测试不应该比它们复杂,功能也不应该比它们少。已有的解决方案增加了额外的开销,比如自定义命令行工具。
### 模糊测试工具
在大家期望 Go 语言新增功能的列表中,模糊测试是其中很受欢迎的一项。虽然现在还是试验性的,但在将要到来的发布版本中会变得更强大。这给了我们足够的时间去尝试它以及探索它的使用场景。我们不应该把它视为一种开销,如果使用得当它会是一种发现错误非常高效的测试工具。使用 Go 的团队应该推动它的使用,开发者可以写简单的模糊测试,测试团队去慢慢扩展以此来使用它全部的能力。
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/1/native-go-fuzz-testing
作者:[Gaurav Kamathe][a]
选题:[lujun9972][b]
译者:[lxbwolf](https://github.com/lxbwolf)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/gkamathe
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/laptop_screen_desk_work_chat_text.png?itok=UXqIDRDD "Person using a laptop"
[2]: https://go.dev/
[3]: https://pkg.go.dev/testing
[4]: https://github.com/golang/go/issues/44551
[5]: https://go.dev/blog/fuzz-beta
[6]: https://go.dev/doc/tutorial/fuzz
[7]: https://github.com/golang/go/issues/44551#issuecomment-784584785
[8]: https://github.com/golang/go/issues/44551#issuecomment-784655571
[9]: https://github.com/google/syzkaller
[10]: https://github.com/google/syzkaller/blob/master/docs/linux/found_bugs.md
[11]: https://github.com/google/AFL
[12]: https://github.com/dvyukov/go-fuzz
[13]: https://go.googlesource.com/proposal/+/master/design/draft-fuzzing.md
[14]: https://go.dev/blog/go1.18

View File

@ -3,74 +3,66 @@
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
[#]: collector: "lujun9972"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14322-1.html"
在 KDE 中添加、切换、删除和管理 Linux 用户
======
在一台电脑上维护独立的用户是一种奢侈,也是保护你自己和你关心的人的数据安全的一个好方法。
![people in different locations who are part of the same team][1]
> 在一台电脑上维护独立的用户是一种奢侈,也是保护你自己和你关心的人的数据安全的一个好方法。
![](https://img.linux.net.cn/data/attachment/album/202203/03/104151iwevek3xzcr1113u.jpg)
在一个家庭中共享一台电脑通常是一件很随意的事情。当你需要电脑时,你拿起它并开始使用它。这在理论上很简单,而且大部分情况下是有效的。也就是说,直到你不小心拿起公用电脑,不小心把你的服务器的正常运行时间的截图发到你伴侣的烹饪博客上。然后,就到了建立独立用户帐户的时候了。
从一开始Linux 就是一个多用户系统。它的设计是把每个用户只要他们登录都当作一个独特的人有一个属于他们自己的桌面一个独特的网络浏览器配置文件访问他们自己的文档和文件等等。KDE Plasma 桌面做了很多工作,使得从一个帐户切换到另一个帐户很容易,但首先你必须为每个你期望使用电脑的人设置一个用户帐户。你也可以为客人设置一个特殊的帐户(我称这个帐户为 **guest**)。
从一开始Linux 就是一个多用户系统。它的设计是把每个用户只要他们登录都当作一个独特的人有一个属于他们自己的桌面一个独特的网络浏览器配置文件访问他们自己的文档和文件等等。KDE Plasma 桌面做了很多工作,使得从一个帐户切换到另一个帐户很容易,但首先你必须为每个你期望使用电脑的人设置一个用户帐户。你也可以为客人设置一个特殊的帐户(我称这个帐户为 `guest`)。
### 在 KDE 中添加用户
在 Linux 上有不同的方法来添加用户。一种方法是系统管理员式的[使用终端][2]。当你有很多用户需要添加时,这是非常有效的,所以你想把这个过程自动化或者只是减少鼠标点击的次数。
在 Linux 上有不同的方法来添加用户。一种方法是系统管理员式的 [使用终端][2]。当你有很多用户需要添加时,这是非常有效的,所以你想把这个过程自动化或者只是减少鼠标点击的次数。
不过在 Plasma 桌面上,你可以用**用户**程序来添加用户。**用户**实际上是**系统设置**中的一个控制面板,但你可以从你的应用菜单中启动它,就像它是一个独立的应用。
不过在 Plasma 桌面上,你可以用<ruby>用户<rt>Users</rt></ruby>程序来添加用户。<ruby>用户<rt>Users</rt></ruby>实际上是<ruby>系统设置<rt>System Settings</rt></ruby>中的一个控制面板,但你可以从你的应用菜单中启动它,就像它是一个独立的应用。
![Users in KDE System Settings][3]
Seth Kenlon[CC BY-SA 4.0][4]
要添加一个用户,点击窗口底部的**添加新用户**按钮。
要添加一个用户,点击窗口底部的<ruby>添加新用户<rt>Add New User</rt></ruby>按钮。
![Adding a user in KDE][5]
Seth Kenlon[CC BY-SA 4.0][4]
给新用户一个<ruby>名字<rt>Name</rt></ruby>和一个<ruby>用户名<rt>Username</rt></ruby>。这些可能是相同的,但意图是他们的名字是他们的姓名,而他们的用户名是他们用于使用的入口。例如,我的名字是 “Seth Kenlon”而我的用户名是 `seth`
给新用户一个名字和一个用户名。这些可能是同一件事,但意图是他们的名字是他们的名,而他们的用户名是他们用于使用的入口。 例如,我的名字是 “Seth Kenlon”而我的用户名是 `seth`
将新用户指定为标准用户或管理员。标准用户只对自己的环境有完全的控制权。他们可以[安装 Flatpaks][6] 并将数据保存到他们的主目录,但他们不能影响机器上的其他用户。这是有用户帐户的好处之一。我不怀疑我允许使用我的电脑的任何人打算删除对我很重要的数据,但意外还是发生了。通过为我自己和我的伴侣创建一个单独的用户帐户,我在保护我们每个人的数据,我也在保护我们每个人,避免意外地移动一个文件或误放对另一个人很重要的数据。
将新用户指定为<ruby>标准用户<rt>Standard</rt></ruby><ruby>管理员<rt>Administraor</rt></ruby>。标准用户只对自己的环境有完全的控制权。他们可以 [安装 Flatpak][6] 并将数据保存到他们的主目录,但他们不能影响机器上的其他用户。这是有用户帐户的好处之一。我不会认为我允许使用我的电脑的任何人打算删除对我很重要的数据,但意外还是发生了。通过为我自己和我的伴侣创建一个单独的用户帐户,我在保护我们每个人的数据,我也在保护我们每个人,避免意外地移动一个文件或误放对另一个人很重要的数据。
管理员可以进行全系统的更改。我通常在我的电脑上为自己保留这个角色,我也希望我的伴侣在她自己的电脑上为自己保留这个角色。然而,在工作中,这个角色属于 IT 部门。
为用户创建一个密码。登录后,新用户可以改变他们的密码。
为用户创建一个<ruby>密码<rt>Password</rt></ruby>,并重复<ruby>确认<rt>Confirm</rt></ruby>。登录后,新用户可以改变他们的密码。
要完成用户创建,请点击**创建**按钮。
要完成用户创建,请点击<ruby>创建<rt>Create</rt></ruby>按钮。
### 切换用户
在桌面有两种不同的方式来切换用户。你可以注销,然后让另一个用户登录,或者你可以从应用菜单的**电源/会话**类别中选择**切换用户**
在桌面有两种不同的方式来切换用户。你可以注销,然后让另一个用户登录,或者你可以从应用菜单的<ruby>电源/会话<rt>Power / Sessions</rt></ruby>子菜单中选择<ruby>切换用户<rt>Switch user</rt></ruby>
![Switching users in KDE][7]
Seth Kenlon[CC BY-SA 4.0][4]
当一个新用户登录时,你的桌面会被“冻结”或暂停,而另一个用户的新桌面会被调出来。你所有的窗口都保持开放。你甚至可以在游戏中切换用户(如果你正在战斗中,你应该先暂停一下),当你切换回来时,你可以从你离开的地方继续。更好的是,你的所有进程也会继续运行。所以你可以在渲染视频或编译代码时切换用户,当你切换回来时,你的视频已经完成了渲染,或者你的代码已经完成了编译(只要有足够的时间)。
当一个新用户登录时,你的当前桌面会被“冻结”或暂停,而另一个用户的新桌面会被调出来。你所有的窗口都保持打开。你甚至可以在游戏中切换用户(如果你正在战斗中,你应该先暂停一下),当你切换回来时,你可以从你离开的地方继续。更好的是,你的所有进程也会继续运行。所以你可以在渲染视频或编译代码时切换用户,当你切换回来时,你的视频已经完成了渲染,或者你的代码已经完成了编译(只要有足够的时间)。
![Login][8]
Seth Kenlon[CC BY-SA 4.0][4]
### 删除用户
当我有客人时,我经常在他们的逗留期间创建一个客人帐户,当他们离开后,我就删除这个帐户。
你可以通过删除一个用户的用户帐户来从你的电脑中删除该用户。这将删除他们的所有数据,所以要确保你要删除的用户已经把他们需要的东西从机器上迁移掉了!
**删除用户**按钮位于**用户**控制面板中的每个用户帐户,也就是你最初创建用户的地方。
<ruby>删除用户<rt>Delete User</rt></ruby>按钮位于<ruby>用户<rt>Users</rt></ruby>控制面板中的每个用户帐户下,也就是你最初创建用户的地方。
![Deleting a user][9]
Seth Kenlon[CC BY-SA 4.0][4]
### Linux 用户管理
在计算机上维护独立的用户是一种奢侈,也是保护你自己的数据和你关心的人的数据安全的好方法。它允许每个用户都是独一无二的,并使桌面成为他们自己的。在 Linux 中,这很容易,而且不受干扰,因此可以为朋友、房客和家人创建用户。
在计算机上维护独立的用户是一种奢侈,也是保护你自己的数据和你关心的人的数据安全的好方法。它允许每个用户都是独一无二的,并使桌面成为他们自己的。在 Linux 中,这很容易,而且没什么影响,因此可以为朋友、房客和家人创建用户。
--------------------------------------------------------------------------------
@ -79,7 +71,7 @@ via: https://opensource.com/article/22/2/manage-linux-users-kde
作者:[Seth Kenlon][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -0,0 +1,151 @@
[#]: subject: "6 Reasons to Try Nitrux OS"
[#]: via: "https://news.itsfoss.com/reasons-to-try-nitrux-os/"
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
[#]: collector: "lujun9972"
[#]: translator: "aREversez"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14359-1.html"
尝试 Nitrux 系统的六大理由
======
> Nitrux OS 是一个基于 Debian 的有趣的 Linux 发行版。还没有试过吗?我认为你应该试试。
![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/nitrux-os-try.jpg?w=1200&ssl=1)
Nitrux 系统也许算不上 Linux 的主流发行版本之一,但它绝对是一款极其独特的产品。
2019 年,我们 [采访了 Nitrux 的创始人 Uri Herrera][1],了解到 Herrera 等人开发这款系统的初衷:超越传统的 Linux 发行版。
自那之后,过了许久,我们终于迎来了 [Nitrux 2.0 版本][2]。
不要忘了Nitrux 在去年 [放弃基于 Ubuntu而选择了 Debian][3]。
考虑到自 Nitrux 发行以来的数年间,也发生了许多变化,你应该尝试一下这款系统。
这里,我要分享一些体验 [Nitrux 系统][4] 的理由:
### 1、Nitrux 不再基于 Ubuntu
![][5]
人们一般都会推荐基于 Ubuntu 的 Linux 发行版本,来满足日常所需。
当然,在我们 [为新手推荐的 Linux 系统][6] 中,也主要是许多基于 Ubuntu 的版本,但是请不要误会。
我们之所以推荐基于 Ubuntu 的发行版本,唯一的理由在于它们简单易用,支持大量的商业软件。
所以,如果你不是刚开始使用 Linux 系统,同时也想尝试既能让你耳目一新,又不至于使你感到陌生,而且十分稳定的发行版,基于 Debian 的 Nirtux 是一个不错的选择。
你完全不需要在短期内迅速了解这款系统,就可以得心应手地使用终端来完成各项工作。
感兴趣的话,可以参考我们的文章 [Debian vs Ubuntu][7],了解更多。
### 2、专注 AppImage
![][5a]
[AppImage][8] 是一个通用的打包系统,这种软件包不需要任何依赖。你不需要在 Linux 上安装任何软件包管理器或者依赖包,就可以直接运行 AppImage 应用。
AppImage 旨在打造便携、高效的软件包系统,省去安装的步骤,与 Windows 系统的便携版软件非常相似。
Nitrux 操作系统专注 AppImage 应用软件,为你带来流畅的用户体验。
NX 软件中心是一个 GUI 程序,用户可以通过使用 Mauikit该软件中心的 UI 框架),安装、管理 AppImage 应用程序。
### 3、基于 KDE 桌面环境的发行版
![][5b]
Nitrux 操作系统是 [搭载 KDE 桌面环境中最好的 Linux 发行版][9] 之一。 如果你不喜欢 GNOME 或者其他开箱即用的桌面环境DEKDE 会是一个不错的选择。
也许你还不知道, 相较于其他桌面环境,[KDE 可以在很多方面进行定制][10]。
因此,在 KDE 桌面环境下,你可以毫不费力地打造自己的个性化桌面。
### 4、独特的用户体验
![][11]
Nitrux 的用户体验结合了最好的 KDE 桌面环境与 Qt 技术,并对这些进行了调整,为你带来全新的用户体验。
虽然在使用 Nitrux 操作系统时,你不会觉得十分陌生,但是还是会感到有些许的不同。
即使你没有对 Nitrux 系统做任何自定义的设置,开箱即用的体验也足以让它成为 [最优雅的发行版][12] 之一。
### 5、Maui Shell
![][11a]
[Maui Shell][13] 是 Nitrux 用户体验的亮点之一。近来Maui Shell 得到了进一步的完善,将这些呈现在了桌面端和移动端的融合界面上。
尽管 Maui Shell 目前还不成熟,但是外观看起来十分大气简约,就像 [System76 将要推出基于 Rust 的桌面环境][14] 一样令人兴奋。
这也是我们推荐尝试 Nitrux 操作系统最重要的原因之一。时间会证明Nitrux 系统是否将会开启桌面体验的全新时代。
### 6、Xanmod 内核
![][5c]
[Xanmod 内核][15] 是一个定制的主线 Linux 内核版本,对性能进行了适当的调整,附加了一些其他功能。有了它,你的桌面体验一定能得到大幅提升。
自 2.0 版本起Nitrux 操作系统选用 Xanmod 作为默认内核,为用户提供“升级版”的桌面体验。
当然你也可以选择其他 Linux 内核,比如 Liquorix 和 Libre各擅胜场。
如果你不喜欢 Xanmod也可以选择长期支持版的主线内核。在 Nitrux 操作系统上,你完全可以无缝切换使用不同的内核。
- [Nitrux OS][4]
### 总结
诚然,从主流发行版转到像 Nitrux 这样的操作系统,需要考虑各种风险。
但是,**我建议你好好考虑一番:**
Nitrux 这样的发行版热衷于按照他们的愿景来改进事情。
尽管背后没有强大的企业和财力支撑,他们依然可以开发出这款令人惊艳的发行版、开发出 [Maui 项目][16],以及别开生面的 Maui shell。
所以,我认为,我们也应该以己所能,尽己之力,支持这些优秀的发行版。
不过话说回来,每一款 Linux 发行版都会或多或少地存在一些问题。当你试用一款新的发行版时,你需要给它点儿时间,在最终将它作为日常使用的操作系统之前,慢慢地去适应它。
换言之,我推荐你在业余时间试用 Nitrux 操作系统,或者直接装个虚拟机来一探究竟。
我很关注大家对这篇文章的看法,请在下方评论留言。
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/reasons-to-try-nitrux-os/
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[aREversez](https://github.com/aREversez)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://itsfoss.com/nitrux-linux/
[2]: https://news.itsfoss.com/nitrux-2-0-release/
[3]: https://news.itsfoss.com/nitrux-linux-debian/
[4]: https://nxos.org/
[5]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/not-ubuntu-illustration.png?w=1000&ssl=1
[6]: https://itsfoss.com/best-linux-beginners/
[7]: https://linux.cn/article-13746-1.html
[5a]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/appimage-illustration.png?w=1000&ssl=1
[8]: https://itsfoss.com/use-appimage-linux/
[5b]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/kde-illustration.png?w=1000&ssl=1
[9]: https://itsfoss.com/best-kde-distributions/
[10]: https://itsfoss.com/kde-customization/
[11]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/nitrux-2-visual.png?resize=1568%2C882&ssl=1
[12]: https://itsfoss.com/beautiful-linux-distributions/
[11a]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/maui-shell.png?w=1200&ssl=1
[13]: https://news.itsfoss.com/maui-shell-unveiled/
[14]: https://news.itsfoss.com/system76-cosmic-panel/
[5c]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/xanmod-kernel-illustration.png?w=1000&ssl=1
[15]: https://xanmod.org/
[16]: https://mauikit.org

View File

@ -0,0 +1,101 @@
[#]: subject: "Listen to your favorite music on Linux with Juk"
[#]: via: "https://opensource.com/article/22/2/listen-music-linux-juk-kde"
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
[#]: collector: "lujun9972"
[#]: translator: "geekpi"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14329-1.html"
用 Juk 在 Linux 上听你喜欢的音乐
======
> Juk 是 Linux 上的 KDE Plasma 桌面的默认开源音乐播放器。
![](https://img.linux.net.cn/data/attachment/album/202203/05/180154hu1nse2p2crv5q1r.jpg)
KDE 项目不只是提供了一个著名的桌面,它还产生了很多软件,从 [视频编辑][2]、[摄影][3] 和 [插图][4] 工具,到图形计算器、电子邮件和办公工作。这些都是生产力工具,但 KDE 也适合于放松。它有游戏和媒体播放器,而我使用的音乐播放器是 [Juk][5]。
### 在 Linux 上安装 Juk
只要你的 Linux 发行版提供 KDE 软件包,你就可以用你的包管理器安装 Juk。
在 Fedora、Mageia 和类似发行版上:
```
$ sudo dnf install juk
```
在 Elementary、Linux Mint 和其他基于 Debian 的发行版上:
```
$ sudo apt install juk
```
### 使用 Juk
当你第一次启动 Juk 时,你会被问到你想用什么目录作为你的音乐集的来源。选择你希望 Juk 寻找音乐的文件夹,并可选择排除你希望 Juk 忽略的任何子目录。
![Adding music to Juk][6]
取决于你有多少音乐Juk 可能需要一些时间来解析文件系统和元数据。当它完成后,通常的 Juk 窗口就会出现,你所有的音乐都在一个叫做“<ruby>收藏列表<rt>Collection List</rt></ruby>”的中央收藏列表中。
![Juk music player][8]
在顶部的搜索栏中,你可以在任何领域搜索任何字符串。双击歌曲,开始播放。
Juk 默认为连续播放,这意味着在它播放完你的选择后,它会继续播放收藏列表中的下一首歌曲,即使你已经将你的列表过滤到只有一首歌曲。这使音乐总是会不断播放,就像一个真正的点唱机。
就我个人而言,我更喜欢听完整的专辑,中间有足够的休息时间去厨房喝咖啡,所以我使用播放列表。
### Juk 中的播放列表
Juk 中的播放列表可以包含你收藏列表中的任何内容。Juk 会在播放列表中播放一次,然后停止。
要创建一个播放列表,在左边的播放列表栏中点击右键,在出现的上下文菜单中选择 “<ruby>新建<rt>New</rt></ruby>”。你可以创建一个空的播放列表,或者从你硬盘上的特定文件夹中创建一个播放列表。
![Creating a new playlist][9]
### 自动播放列表
你还可以创建一个与特定搜索绑定的特殊播放列表,这对那些你经常购买并添加到你的收藏中的艺术家很有用。有了搜索播放列表,他们的新音乐就会被添加到他们的播放列表中,而无需你的手动干预。
### 打标签
让我们面对现实吧音乐播放器是一堆一堆的出现而且它们大多都做同样的事情。然而Juk 增加了一个重要的功能。它让你有能力修改元数据标签。
![Metadata editor][10]
很多音乐的标签是不一致的、不完整的,或者根本就没有,所以当你发现它们出现在播放队列中时,能够纠正它们是一种奢侈。
它还有一个标签猜测器的功能,它试图解析文件名,并对歌曲进行相应的标记。
### 明显的选择
当你在 KDE 上寻找一个音乐播放器时Juk 是一个简单而明显的选择。当然,还有很多其他非常好的选择,正如我们的常驻发烧友 [Chris Hermansen][11] 在他的 [3 个开源音乐播放器][12] 文章中详细介绍的那样但有时你只是想使用你最容易想到的东西。Juk 既能直观地使用,又能出色地完成它的任务。它是多么幸运啊,成为 KDE Plasma 桌面上的默认播放器。
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/2/listen-music-linux-juk-kde
作者:[Seth Kenlon][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/seth
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/c-d-x-pdx_a_82obo-unsplash.jpg?itok=2txWDP31 (Headphones on a yellow backdrop)
[2]: https://opensource.com/article/21/12/kdenlive-linux-creative-app
[3]: https://opensource.com/life/16/5/how-use-digikam-photo-management
[4]: https://opensource.com/article/21/12/krita-digital-paint
[5]: https://juk.kde.org/
[6]: https://opensource.com/sites/default/files/juk-import.jpg (Adding music to Juk)
[7]: https://creativecommons.org/licenses/by-sa/4.0/
[8]: https://opensource.com/sites/default/files/juk-player.jpg (Juk music player)
[9]: https://opensource.com/sites/default/files/juk-playlist-new.jpg (Creating a new playlist)
[10]: https://opensource.com/sites/default/files/juk-tagger.png (Metadata editor)
[11]: https://opensource.com/users/clhermansen
[12]: https://opensource.com/article/17/1/open-source-music-players

View File

@ -3,27 +3,33 @@
[#]: author: "Ankush Das https://itsfoss.com/author/ankush/"
[#]: collector: "lujun9972"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14320-1.html"
KDE 与 GNOME什么是 Linux 桌面的终极选择?
======
说到Linux桌面环境是个大问题。
![](https://img.linux.net.cn/data/attachment/album/202203/02/160920u0pqhbfqdob7kt22.jpg)
说到 Linux<ruby>桌面环境<rt>desktop environment</rt></ruby>DE是个大问题。
桌面环境构成了图形用户界面GUI以及你在 Linux 发行版上得到的一组应用。
你可以通过我们的[解释什么是桌面环境的文章][1]了解。
你可以通过我们的 [解释什么是桌面环境的文章][1] 了解。
选择一个好的桌面环境可以帮助你提高生产力、工作流程、易用性和整体体验。
而且,在[最佳桌面环境][2]中KDE 和 GNOME 特别受欢迎。在这里,我打算强调关键的区别,以帮助你做出决定。
在 [最佳桌面环境][2] 中KDE Plasma 和 GNOME 特别受欢迎。在这里,我打算强调其中的关键区别,以帮助你做出决定。
> 注意KDE 是整个社区的人在其名下开发的各种项目。其中桌面环境的名字是 Plasma。在这里我们将 Plasma 桌面与 GNOME 进行比较。然而,为了简单起见,我们倾向于使用 “KDE” 而不是 “Plasma”。
### 用户界面:功能与外观
用户界面通常涉及到布局类型、图标、主题、小工具和 GUI 的其他组件。
#### KDE
KDE 的目标是提供一个传统的桌面布局,让大多数 Windows 用户感到舒适。
![][3]
@ -36,9 +42,11 @@ KDE 的目标是提供一个传统的桌面布局,让大多数 Windows 用户
而且KDE 以其一致的外观和感觉而闻名,即使多年来有许多改进。
另一方面GNOME 提供了一种独特的桌面体验。如果你正在寻找一个不同的和现代的用户界面设计GNOME 应该很适合你。
#### GNOME
关于现代标准,图标/主题/壁纸可能看起来更好。对偏好有取舍但在我看来GNOME 看起来更有吸引力。
另一方面GNOME 提供了一种独特的桌面体验。如果你正在寻找一个不同的、现代的用户界面设计GNOME 应该很适合你。
其图标/主题/壁纸可能看起来更符合现代标准。偏好有所侧重但在我看来GNOME 看起来更有吸引力。
![][5]
@ -48,75 +56,87 @@ KDE 的目标是提供一个传统的桌面布局,让大多数 Windows 用户
对一些人来说,没有任务栏可能看起来更干净,但这取决于你的喜好。
请注意,与 KDE 相比UI 可能没有那么多功能丰富。例如,系统托盘中的部件提供了比 GNOME 上的小程序更多的选项。
请注意,与 KDE 相比UI 可能没有那么多功能,也没那么丰富。例如,系统托盘中的部件提供了比 GNOME 上的小程序更多的选项。
![GNOME 41][6]
![][6]
因此,在 UI 方面KDE与GNOME并没有明显的赢家而是取决于你对功能或现代外观的要求。
因此,在 UI 方面KDE GNOME 并没有明显的赢家,而是取决于你对功能或现代外观的要求。
### 应用生态
使用KDE你可以获得[无数的实用程序][7]。
#### KDE
你可能会被 KDE 提供给 KDE 的应用所淹没。
使用 KDE你可以获得 [无数的实用程序][7]。
你可能会被 KDE 提供给 KDE 上使用的应用所淹没。
![][8]
除此以外,整个 KDE 社区都一直忙于为这个武器库添加新的应用和工具。
不止如此,整个 KDE 社区都一直忙于为这个武器库添加新的应用和工具。
它们中许多在现有的应用中脱颖而出,如 Krita、Kdenlive、Kate Editor 等等。
它们中许多在现有的应用中脱颖而出,如 Krita、Kdenlive、Kate 编辑器等等。
GNOME 默认也具有[众多的应用][9]。虽然对于大多数用户来说,这可能是一个足够的列表,但与 KDE 相比,它在目录上有所不足。
#### GNOME
GNOME 默认也具有 [众多的应用][9]。虽然对于大多数用户来说,这可能是一个足够的列表,但与 KDE 相比,它在目录上有所不足。
![][10]
我发现自己并没有使用 GNOME 的很多应用。
我发现自己并没有使用过很多来自 GNOME 的应用。
而且,值得注意的是,与 GNOME 的默认应用相比,桌面环境自带的 KDE 应用得到了更快的改进。
而且,值得注意的是,与 GNOME 的默认应用相比,KDE 桌面环境自带的应用得到了更快的改进。
与 GNOME 应用程序相比,考虑到 KDE 的开发更新,这只是个人观察。 但是,这可能会随着时间而改变。
这是与 GNOME 应用程序相比的 KDE 的开发更新频度,不过这只是个人观察,这可能会随着时间而改变。
### 什么是最好的定制?
如果你想修补和控制用户体验KDE 是一个很好的选择。
#### KDE
不要相信我的话。你可以按照我们的 [KDE 定制指南][11]了解可用选项。
如果你想改造和控制用户体验KDE 是一个很好的选择。
不要光听我说,你可以按照我们的 [KDE 定制指南][11] 了解可用选项。
![][12]
不仅仅是定制的能力,你还可以得到很多开箱即用的控制,用于改变主题、颜色、工作区效果、窗口管理等等,而不需要任何特定的应用程序/扩展。
对于一些人来说,如果你想坚持使用原版的体验,无论如何,选项的可用性可能不会产生什么影响
对于一些人来说,如果你想坚持使用原版的体验,这么多的选项也不会产生什么影响,不用担心
至于 GNOME你并没有得到很多开箱即用的控制。相反你将不得不依靠 GNOME Tweaks 或扩展来做一些改变。但是,是的,你可以在很大程度上自定义体验。
#### GNOME
至于 GNOME你没有那么多开箱即用的控制。相反你必须得依靠 GNOME “优化”或一些扩展来改变。但是,是的,你可以在很大程度上自定义体验。
![][13]
另外,请注意,在写这篇文章的时候,[GNOME 42][14] 还没有作为一个稳定版本。所以,你可以期待一个系统级的深色模式的实现,以及一些外观/感觉上的改进。
另外,请注意,在写这篇文章的时候,[GNOME 42][14] 还没有成为稳定版本。所以,你可以期待一个系统级的深色模式的实现,以及一些外观/感觉上的改进。
当然,这不是一个公平的比较,考虑到两者都提供不同的 GUI 元素和布局。然而对于想要更多控制和定制选项的用户来说KDE 会被选择。
GNOME 适合于不想要很多选项的用户。如果你喜欢 GNOME 提供的东西,并且愿意用额外的努力来定制体验,你也可以这么做。
#### 额外的能力KDE 与 GNOME
### 额外的能力KDE 与 GNOME
如前所述GNOME 提供了[扩展功能以增加更多的功能][15]到你当前的配置。
#### GNOME
你可以前往 [GNOME 的 shell 扩展网站][16]来探索各种选择,或者看看我们的[最佳 gnome 扩展列表][17]。
如前所述GNOME 提供了给你当前的配置 [增加更多的功能的扩展功能][15]。
你可以前往 [GNOME 的 shell 扩展网站][16] 来探索各种选择,或者看看我们的 [最佳 GNMOE 扩展列表][17]。
![][18]
GNOME 扩展让你可以轻松地做很多事情,比如使用自动移动窗口切换器自动启动应用的工作区。
GNOME 扩展让你可以轻松地做很多事情,比如使用自动移动窗口切换器来自动化应用启动的工作区。
有各种各样的扩展来改善你的工作流程,使事情变得简单。
然而,这些扩展取决于 GNOME shell 的版本。此外由于从一个版本到另一个版本的激进变化GNOME 扩展可能在未来的版本中停止工作。
#### KDE
另一方面KDE 也提供了一个充满附加组件、小工具和应用附加组件的袋子。
![][19]
不像 GNOME 从浏览器中添加扩展的不方便的方式(使用另一个浏览器扩展),你可以使用发现软件中心直接访问 KDE 的附加组件。
不像 GNOME 从浏览器中添加扩展的那种不方便的方式(使用另一个浏览器扩展),你可以使用发现软件中心直接访问 KDE 的附加组件。
![][20]
@ -126,15 +146,19 @@ GNOME 扩展让你可以轻松地做很多事情,比如使用自动移动窗
总的来说你可以在两者上扩展功能但如果你想有更多的选择KDE 更有优势。
#### 无障碍选项
### 无障碍选项
#### KDE
虽然 KDE 在几个方面做得很好,但增强桌面无障碍的可用能力非常有限(比如没有开箱即用的屏幕阅读器)。
![][21]
有一种可能是,开发者正在用 Orca Screen Reader 应用测试读屏器的功能,即桌面的听力/视觉辅助工具,但在 KDE Plasma 5.24中,它不够实用。
有一种可能是,开发者正在用 Orca 屏幕阅读器应用来测试其功能,比如桌面的听力/视觉辅助,但在 KDE Plasma 5.24 中,它不够实用。
正如我们的一位读者所指出的KDE 在安装前后都不能说话。所以,这对他们来说不是一个选择。
正如我们的一位读者所指出的KDE 在安装前后都不能“说话”。所以,这对他们来说不是一个选择。
#### GNOME
然而GNOME 做得更好,它有读屏器、视觉提醒、屏幕键盘、声音键、点击辅助等。
@ -142,15 +166,15 @@ GNOME 扩展让你可以轻松地做很多事情,比如使用自动移动窗
所以如果一个用户依赖无障碍选项来使用桌面GNOME 应该是个选择。
#### KDE 比 GNOME 更快?
### KDE 比 GNOME 更快?
拥有一个能在可用系统资源下有效工作的桌面环境是很重要的。如果你想进行多任务处理,而又没有极端的配置来支持的话,这一点就显得无比重要。
拥有一个能在可用系统资源下有效工作的桌面环境是很重要的。如果你想进行多任务处理,而又没有超好的配置来支持的话,这一点就显得无比重要。
KDE 通常被认为比其他大多数桌面环境要快,因为它对资源的占用很轻。
然而为了给你一个参考我创建了两个虚拟机Fedora 35 和 KDE Neon 用户版),在你继续尝试之前提供一些想法。
两个虚拟机的设置都共享一个类似的资源配置分配了两个核心和8GB内存,下面是我们的情况:
两个虚拟机的设置都使用类似的资源配置,分配了两个核心和 8GB 内存,下面是我们的情况:
![Resource usage on GNOME 41 \(Fedora 35\)][23]
@ -162,54 +186,53 @@ KDE 通常被认为比其他大多数桌面环境要快,因为它对资源的
即使在截图程序运行的情况下,它消耗的资源也较少。
如果这还不能说服你,过去也有许多报告,比如 [Jason的报告][25],提到 KDE 是比 XFCE 更轻的桌面环境。
如果这还不能说服你,过去也有许多报告,比如 [Jason 的报告][25],提到 KDE 是比 XFCE 更轻的桌面环境。
### 可用的发行版GNOME 与 KDE
大多数流行的发行版都将 GNOME 作为默认或唯一的桌面环境。Fedora、Ubuntu 和 Pop!\_OS 是流行的例子。
你应该能找到许多有独的 GNOME 版本的发行版。
你应该能找到许多有独的 GNOME 版本的发行版。
至于 KDE你可以尝试探索我们的[基于 KDE 的发行版][26]列表,或者寻找像 Kubuntu 这样的选择。你可能不会发现 KDE 是大多数主流发行版的默认选择,但你应该发现几乎所有的东西都有 KDE 的变体。
至于 KDE你可以尝试了解一下我们的 [基于 KDE 的发行版][26] 列表,或者寻找像 Kubuntu 这样的选择。在大多数主流发行版中,你可能不会发现 KDE 是默认选择的发行版,但你应该发现几乎所有的发行版都有 KDE 的变体。
### 那么,你应该选择什么来定义你的桌面体验?
对桌面环境的选择给了你想要的桌面体验。
对桌面环境的选择给了你想要的桌面体验。
如果你想要简单、性能和众多的选项/工具KDE 应该是一个常青的选择。
如果你想要一个现代的/更干净的外观并且不介意不同的布局或用户体验GNOME 可以成为一个不错的补充。
虽然 GNOME 可能无法给你同样多的控制但你仍然可以用它做很多事情。Pop!\_OS 给了你一个将 GNOME 作为桌面环境的例子,并在其上添加扩展/功能,使其成为一个光鲜的桌面发行版。
虽然 GNOME 可能无法给你同样多的控制但你仍然可以用它做很多事情。Pop!\_OS 是一个例子,它将 GNOME 作为桌面环境,并在其上添加扩展/功能,使其成为一个光鲜的桌面发行版。
所以,你需要评估什么对你的用户体验更重要。
**我的看法**:我会选择 GNOME 而不是 KDE以获得独特/完美的桌面体验。
_你会选择什么?请在下面的评论区告诉我你的想法。_
你会选择什么?请在下面的评论区告诉我你的想法。
### 常见问题:如果你还在为做出选择而感到困惑
看完比较后,你可能会有一些问题,所以我想解决一些潜在的问题:
**1\. 为什么 KDE 不流行**
**1为什么 KDE 不流行**
KDE 可以说是继 GNOME 之后第二受欢迎的桌面环境。然而,它并不是主流发行版和 Ubuntu、Pop!\_OS、Fedora 等流行选项的默认选择;因此,你可以看到身边都是 GNOME。
**2\. GNOME 比 KDE 更稳定吗?**
**2GNOME 比 KDE 更稳定吗?**
这两个桌面环境都是由一个有经验的开发者团队建立的,并定期进行修复和改进。
这两个桌面环境都是由有经验的开发者团队建立的,并定期进行修复和改进。
到目前为止GNOME 已经有多次彻底的改变。所以从这个角度来说KDE 可以被认为是一个更一致和稳定的体验。
到目前为止GNOME 已经有多次彻底的改变。所以从这个角度来说KDE 可以被认为是更一致和稳定的体验。
**3\. KDE 是否比 GNOME 更快?**
**3KDE 是否比 GNOME 更快?**
虽然我们已经在文章中试图解决这个问题,但应该注意的是,性能取决于你做什么和可用的系统资源。
对于一些用户来说,最少的资源消耗可能是一个很大的胜利。而对某些人来说,随着可用资源的增加,差异也会逐渐消失。
**4\. KDE 比 GNOME 好吗?**
**4KDE 比 GNOME 好吗?**
KDE 具有更多的应用、自定义选项和额外的功能。然而,对于那些不希望获得任何此类选项的用户来说,它可能会让人感到不知所措。
@ -224,7 +247,7 @@ via: https://itsfoss.com/kde-vs-gnome/
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -0,0 +1,64 @@
[#]: subject: "How to screen share with the Linux KDE Plasma Desktop"
[#]: via: "https://opensource.com/article/22/2/screen-share-linux-kde"
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
[#]: collector: "lujun9972"
[#]: translator: "geekpi"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14332-1.html"
如何在 KDE Plasma 桌面进行屏幕共享
======
> krfb 和 krdc 的组合是使远程 Linux 支持变得无挫折感的宝贵工具。
![](https://img.linux.net.cn/data/attachment/album/202203/06/102407oi1sz113151dd5bw.jpg)
如果你曾经做过专业的或出于家庭义务的远程支持在待命支持时解决问题只是第二步更重要的是可见用户屏幕上的实际内容。有多少次你描述了复杂的桌面任务后来才发现你的用户甚至还没有打开他们的电脑支持是重要的但挫折感是真实的对于需要支持的人和慷慨地试图提供支持的人来说这都是一种共同的经历。我相信作为学习新技能的一种方式人们自己执行任务是很重要的但也有一种说法是观察专家应该如何做。这就是屏幕共享的作用KDE Plasma 桌面已经内置了它。
### 网络安全
Plasma 桌面使用点对点的邀请模式进行屏幕共享。用户启动一个应用启动一个虚拟网络连接VNC服务器这时支持人员就可以远程查看甚至控制计算机。如果这听起来像是潜在的不安全那是因为它可能就是但有防火墙的干预。如果你是一个与你不在同一网络上的人的支持人员那么你必须在屏幕共享工作之前建立一个从你的网络到你的用户的网络的安全通道。理想情况下你会在紧急情况发生前完成这项工作。
1. [配置用户的路由器][2],将 VNC 端口(默认为 5900但你可以使用任何你喜欢的端口路由到他们的计算机。
2. [在用户的本地防火墙中打开一个服务][3],允许 VNC 流量(在你在第一步中指定的端口)。
### 远程邀请
为了启动屏幕共享会话,用户必须启动 **krfb**(表示 “KDE remote frame buffer”应用。这将启动一个 VNC 服务器,并创建一个临时密码。
![krfb][4]
**krfb** 使用的默认端口是 5900但如果你需要可以在 **krfb** 设置中改变。不过,这可能是你想提前做的事情,这样你就可以避免向你的用户解释如何改变协议的端口。
### 查看和控制
当这个窗口打开时,你可以使用你喜欢的 VNC 客户端通过 VNC 登录。KDE 有 **krdc**(表示 “KDE remote desktop client”应用。在支持的计算机上启动它并向它提供目标 IP 地址。当你被提示输入密码时,输入你正在连接的 **krfb** 会话中显示的密码。
![Screen sharing with krdc][6]
连接上后,你就可以看到你用户的屏幕,你可以在他们遵循你的指示时引导他们。如果他们在遵循你的指示方面有困难,那么你可以控制他们的鼠标,并演示如何做某事。默认情况下,**krfb**(即他们正在运行的应用)在将控制权交给你之前会征求他们的同意。
### 帮助进行中
能够看到你的用户所看到的东西可以加速故障排除,减少支持电话双方的挫折感。只要你事先为你的支持设置好网络,**krfb** 和 **krdc** 的组合对于指导新用户完成 Linux 桌面发现之旅的 Linux 专业人士来说是很有价值的工具。
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/2/screen-share-linux-kde
作者:[Seth Kenlon][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/seth
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/laptop_screen_desk_work_chat_text.png?itok=UXqIDRDD (Person using a laptop)
[2]: https://opensource.com/article/20/9/firewall
[3]: https://opensource.com/article/19/7/make-linux-stronger-firewalls
[4]: https://opensource.com/sites/default/files/kde-krfb.jpg (krfb)
[5]: https://creativecommons.org/licenses/by-sa/4.0/
[6]: https://opensource.com/sites/default/files/kde-krdc-session.jpg (Screen sharing with krdc)

View File

@ -0,0 +1,262 @@
[#]: subject: "12 Simple Tools to Protect Your Privacy"
[#]: via: "https://itsfoss.com/privacy-tools/"
[#]: author: "Ankush Das https://itsfoss.com/author/ankush/"
[#]: collector: "lujun9972"
[#]: translator: "aREversez"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14337-1.html"
12 款简单好用的保护隐私的软件
======
![](https://img.linux.net.cn/data/attachment/album/202203/08/114751t43jbqlfcic3w348.jpg)
数据是最宝贵的一项资产。
无论影响好坏,数据收集技术都会一直存在。现实生活中,人们进行分析、研究以及学习,都需要各种各样的数据。
当然,数据收集也会带来风险,比如不法机构会收集用户的浏览数据(或网络活动)。
匿名数据收集等技术虽然在不断发展,但在隐私保护这方面可能做的并不是十分完善。
不过先别担心,保护好自己的隐私并不是件难事。
一些简单好用的软件可以在不影响用户体验的前提下,增强用户的隐私保护。更重要的是,搞明白这些软件,你根本不需要着急花大把的时间。
本文将会推荐一些简单的软件,可以轻松保护你的网络隐私。
### 一些增强隐私保护的基本工具
保护数据安全最有效的办法就是,关注你使用频率最高的产品。
担心数据安全是必要的,但不能顾此失彼,忘记产品最基本的用途。
比如,你使用一款去中心化的社交软件,但是你的亲朋好友都不去用它,他们大多时候还是使用 WhatsApp。那么你的这种做法就没有任何意义。
因此,我们在这里列出了一些不用付出特别的努力就能轻松试用的软件,并将它们归为以下几类:
* 网页浏览器
* 虚拟专用网络
* 搜索引擎
* 社交软件
* 操作系统
* 密码管理
### 关注隐私保护的开源网页浏览器
从办理银行业务到访问社交媒体,网页浏览器能帮你做各种事情。
如果你选择了一款提供优质安全服务以及强大隐私保护功能的网页浏览器,你几乎就可以高枕无忧了。
在我们推荐的 [最好的网页浏览器][7] 之中,(重点关注隐私的)包括:
#### 1、Tor 浏览器
![][8]
[Tor 浏览器][10] 是一款自由开源的网页浏览器,提供了强大的隐私保护功能。它是火狐浏览器的定制版本。
Tor 浏览器借助 [Tor 网络][9] 连接,通过多个节点来传递你的网络请求,以隐藏 IP 地址和位置信息。
在 Tor 浏览器上浏览网页,几乎没有人可以追踪到你。
然而Tor 浏览器的浏览体验可能稍差一些它的响应速度极慢。所以如果你不介意这一点Tor 浏览器绝对是你的不二之选。
#### 2、Firefox
![][11]
可以说,[Firefox][15] 是最优秀的 [开源浏览器][12]。也难怪 [我会一次又一次地回归 Firefox][13]。
Firefox 浏览器不仅内置最强大的隐私保护功能,而且还经常引入新的行业标准,以确保用户安全地浏览网页。
你可以在 Firefox 上安装一些 [最好的开源插件][14],然后自行配置,更好地保护自己的隐私。
#### 3、Brave
![][16]
[Brave][18] 是 Linux 系统上最好的浏览器之一,用户体验清新简洁,外观与 Chrome 有些相似。
Brave 凭借其强大的跟踪保护功能,以及开箱即用的自动运行的跟踪拦截器,一直以来都是 Linux 用户的最佳选择。
请阅读我们的文章:《[Brave vs. Firefox你的私人网络体验的终极浏览器选择][17]》,进一步了解 Brave 的优点与缺陷。
### 保护隐私的虚拟专用网络
无论你使用的是电脑还是手机,虚拟专用网络都可以全程保护你的网络连接。
它还可以隐藏你真实的 IP 地址与位置,让你轻松浏览受限制的内容。
[专注隐私保护的虚拟专用网络服务][19] 有很多,这里我们推荐以下几款:
#### 1、ProtonVPN
![][20]
[ProtonVPN][21] 是一款强大的隐私保护服务,提供桌面版和移动版的开源客户端。
你可以免费使用这款软件也可以选择付费享受恶意软件拦截以及跟踪保护等功能。ProtonVPN 还可以与 ProtonMail 一起付费订阅。
#### 2、Mullvad
![][22]
[Mullvad][23] 也提供了开源的客户端。有趣的是,它不需要你使用邮箱注册。
你只需生成一个用户 ID然后就可以使用加密货币或信用卡购买服务。
### 使用保护隐私的搜索引擎,确保网络活动的安全
网上浏览信息会透露你的身份和工作。
不法组织可能会利用你的搜索内容,对你实施欺诈。
所以,能够保护隐私的搜索引擎就显得十分重要了。我推荐以下两款:
#### 1、DuckDuckGo
![][24]
[DuckDuckGo][26] 是最流行的 [保护隐私的搜索引擎][25]之一,它声明不会记录用户的任何浏览数据。
一直以来DuckDuckGo 也在不断提升自身的搜索结果质量,所以一般情况下你都可以搜索到想要的内容。
#### 2、Startpage
![][27]
[Startpage][28] 是一款很有趣的搜索引擎,外观和谷歌搜索相似,搜索结果也与谷歌搜索同步。不过,它不会收集你的信息。
如果你想要获取和谷歌搜索最相似的搜索结果,并且还希望可以使用隐私保护功能,那么你可以试试 Startpage。
### 使用安全的社交软件,保护聊天隐私
无论是政府还是软件本身,如果你不想别人在未经同意下获取你的聊天记录,你需要使用具有隐私保护功能的社交软件。
尽管大多数用户选择信赖 WhatsApp但是它并不是最有效的隐私保护解决方案。当然Facebook Messenger就更不用考虑了。
这里我推荐一些 [能够代替 WhatsApp 的社交软件][29]
#### 1、Signal
![][30]
[Signal][32] 是一款开源的社交软件,支持端对端加密,[可安装在 Linux 桌面上][31]。
它也有一些隐私保护功能,可以保证聊天对话的安全。
#### 2、Threema
![][33]
[Threema][34] 是一款付费软件,内置 Signal 的全部核心功能,无需手机号码即可登录使用。
这款软件也提供了办公版本。如果你的亲朋好友愿意一次性花费 3 美元购买一款软件那么Threema 是一个不错的选择。
### 选用安全的操作系统,为隐私保护打好基础
可以理解,为了满足个人需求,你 [选择了 Windows而没有选择 Linux][35]。
但是,如果你为了保护隐私,想换个系统,可以考虑下面这些 [安全的 Linux 发行版][36]。
#### 1、Linux Mint
![][37]
[Linux Mint][39] 可以满足日常所需,是一款非常出色的 Linux 发行版。它基于 Ubuntu追求青出于蓝胜于蓝[希望在一些方面做得更好][38]
Linux Mint 通过关注用户的选择以及常规的安全升级,确保操作系统的安全。
#### 2、Qubes OS
![][40]
[Qubes OS][41] 专注安全和隐私问题。对新手来说,使用起来可能比较困难。
不过,如果你想尝试体验一下最安全、最强大的隐私保护操作系统,那你一定要试试 Qubes OS。
### 选择可靠的密码管理器,保护账号安全
如果不法分子可以轻易获取你的账户信息,那么就算你准备再多的隐私措施,也无济于事。
因此,你必须设置更强大、更复杂的密码。此外,要想做到这些,必须先有密码管理器。
在 [Linux 上最好的密码管理器][42] 之中,我建议使用下面这个:
#### 1、Bitwarden
![][43]
[Bitwarden][44] 是一款开源的密码管理器,全部的主要功能均可免费使用。
解锁这款软件的高级功能,每年只需花费 10 美元。
### 总结
专注隐私保护的软件有很多,数不胜数。
但是,很多都只是打着“隐私保护”的幌子,实际上不过是营销噱头;还有一些则根本无法使用。
所以,坚持使用那些自己用过的、适合自己的软件,才是比较好的选择。
以上软件你喜欢哪些?最喜欢的又是哪一款呢?请在下方评论留言。
--------------------------------------------------------------------------------
via: https://itsfoss.com/privacy-tools/
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[aREversez](https://github.com/aREversez)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: tmp.ETCQ3mkg7S#web
[2]: tmp.ETCQ3mkg7S#vpn
[3]: tmp.ETCQ3mkg7S#search
[4]: tmp.ETCQ3mkg7S#message
[5]: tmp.ETCQ3mkg7S#os
[6]: tmp.ETCQ3mkg7S#pwm
[7]: https://itsfoss.com/best-browsers-ubuntu-linux/
[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/tor-browser.png?resize=800%2C514&ssl=1
[9]: https://itsfoss.com/tor-guide/
[10]: https://www.torproject.org/download/
[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/08/firefox-proton.png?resize=800%2C450&ssl=1
[12]: https://itsfoss.com/open-source-browsers-linux/
[13]: https://news.itsfoss.com/why-mozilla-firefox/
[14]: https://itsfoss.com/best-firefox-add-ons/
[15]: https://www.mozilla.org/en-US/firefox/new/
[16]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/brave-tab-management.png?resize=800%2C523&ssl=1
[17]: https://linux.cn/article-13736-1.html
[18]: https://brave.com/
[19]: https://itsfoss.com/best-vpn-linux/
[20]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/07/protonvpn-ui.png?resize=789%2C800&ssl=1
[21]: https://itsfoss.com/recommends/protonvpn/
[22]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/mullvad-vpn.png?resize=800%2C460&ssl=1
[23]: https://mullvad.net/en/
[24]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/duckduckgo-light-v.png?resize=800%2C418&ssl=1
[25]: https://itsfoss.com/privacy-search-engines/
[26]: https://duckduckgo.com/
[27]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/02/startpage-screenshot.jpg?resize=800%2C395&ssl=1
[28]: https://startpage.com/
[29]: https://itsfoss.com/private-whatsapp-alternatives/
[30]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/01/signal-messenger-new.jpg?resize=800%2C450&ssl=1
[31]: https://itsfoss.com/install-signal-ubuntu/
[32]: https://signal.org/en/
[33]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/01/threema.jpg?resize=800%2C450&ssl=1
[34]: https://threema.ch/en
[35]: https://itsfoss.com/linux-better-than-windows/
[36]: https://itsfoss.com/privacy-focused-linux-distributions/
[37]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/linux-mint-20-3-screenshot.png?resize=800%2C449&ssl=1
[38]: https://itsfoss.com/linux-mint-vs-ubuntu/
[39]: https://linuxmint.com/
[40]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/03/qubes-os.jpg?resize=800%2C450&ssl=1
[41]: https://www.qubes-os.org/
[42]: https://itsfoss.com/password-managers-linux/
[43]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/bitwarden-firefox-extension.png?resize=800%2C500&ssl=1
[44]: https://bitwarden.com/

View File

@ -0,0 +1,92 @@
[#]: subject: "Math is fun with this Linux graphing calculator"
[#]: via: "https://opensource.com/article/22/2/kalgebra-linux-calculator"
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
[#]: collector: "lujun9972"
[#]: translator: "geekpi"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14343-1.html"
这个 Linux 图形计算器让数学很有趣
======
> 就像你在高中时最喜欢的图形计算器一样KAlgebra 是科学计算器的同时还有 2D 绘图仪等功能。
![](https://img.linux.net.cn/data/attachment/album/202203/10/094459uyvi79oza97iwwkp.jpg)
如果你在高中时期一直盯着 TI-80 系列计算器但后来就在也没动过它那么你有时可能会渴望重温那些激动人心的代数和微积分岁月。Linux KDE 项目中的某个人一定也有这种感觉,因为有个 KDE 框架库 Analitza 提供了相关的语法和小部件,使你能够使用 K 系列应用(如图形计算器 KAlgebra执行高级数学函数。
### 在 Linux 上安装 KAlgebra
在 Linux 上,你可以从软件仓库安装 KAlgebra。例如在 Fedora、Mageia 和类似设备上:
```
$ sudo dnf install kalgebra
```
在 Elementary、Linux Mint 和其他基于 Debian 的发行版上:
```
$ sudo apt install kalgebra
```
或者,你可以 [以 flatpak 安装它][2]。
### Linux 计算器
KAlgebra 与学校中使用的许多著名图形计算器一样,既是科学计算器又是 2D 绘图仪。但与我曾经使用过的任何图形计算器不同,它也是一个 3D 绘图仪。但在进入 3D 空间之前,先从一些基本语法开始。
在 KAlgebra 中表示方程时,你必须对数学符号进行一些小的翻译,因为它们通常是手写的,需要了解它们在计算机上的表示方式。例如,要将华氏度转换为摄氏度,公式为:(5÷9) × (n-32),其中 n 是华氏度。这通常是方程和数学函数的表达方式:它们使用 ÷ 和 × 之类的特殊符号以及 n 之类的变量,然后它们确定哪个变量代表什么样的值。你不一定知道每个特殊数学符号的含义,但只要你知道特殊符号具有特定含义,那么你就可以查找它。在温度转换示例中,符号很常见,因此你可能已经知道 ÷ 表示除法,× 表示乘法。
在 KAlgebra 中,与大多数编程语言一样,除法由正斜杠表示,乘法由星号表示,因此转换 70 华氏度的等式为 `(5/9)*(70-32)`
KAlgebra 中还有用于常见数学运算的特殊功能,当你在 KAlgebra 中输入任何字母时,工具提示会为可用的函数提供潜在的自动补全功能。在 KAlgerbra 中编写温度转换方程的另一种方法是使用 `times` 函数:`times(5/9, 70-32)`。
当你完成数学问题时,已确定的变量会列在计算器的右栏中,包括 `ans` 值,该值会根据已完成方程的答案进行更新。那么理论上,你应该能够反转转换并从 `ans` 得出华氏温度。
![Temperature conversion in KAlgebra][3]
### 图形计算器
数字很有趣,但当它们被用来绘制形状时,它们才真正变得有趣。图形上二维空间的可视化是所有学科发展的一项重要技能,其中最重要的是计算机编程。
要在图形上画一条线你必须设置一个水平值x 轴或一个垂直值y 轴),或者两者都设置。在常见的数学符号中,一条有效的直线方程就是 `x=5`。这会在图形的 0 原点上方 5 点处生成一条水平直线。然而,在 KAlgebra 中,你必须明确表示你只想用符号 `x->5` 来设置 x 值。
![A line in KAlgebra][5]
除此之外,绘图与其他地方一样简单。你可以编写复杂的方程式,并且可以使用特殊函数,例如 `sin`
![Sin wave and an s-curve][6]
### Linux 上的 3D 图
当你进入 3D 图形选项卡时,你可能已经很好地理解了 KAlgebra 的语法,并且也超出了我的数学知识。我从电子学和合成中学到了关于笛卡尔图的所有知识,所以我对 3D 图最有趣的事情是将正弦波可视化为 3D 对象:
![Sine waves in space][7]
3D 图表和 2D 图表(除了一维)之间的区别在于 3D 图表中只能有一个图,因此请明智地选择方程式。
### 数学可以有趣吗?
事实证明,是的,数学可以很有趣,答案就是一个很好的图形计算器。当我一直在通过数学课来弥补过去一些相当糟糕的数学成绩时,我想要是能使用计算器就好了。我发现 KAlgebra 是一个非常有用的工具,不仅可以解决任意问题,还可以理解方程的语法,以及函数的目的。无论你的数学成绩如何,请拿出你的 KAlgebra 计算器,运行一些数字。这真是非常有趣。
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/2/kalgebra-linux-calculator
作者:[Seth Kenlon][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/seth
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/kalgebra-header.jpg?itok=BVm5kMq2
[2]: https://opensource.com/article/21/11/install-flatpak-linux
[3]: https://opensource.com/sites/default/files/kalgebra-temperature_0.jpg (Temperature conversion in KAlgebra)
[4]: https://creativecommons.org/licenses/by-sa/4.0/
[5]: https://opensource.com/sites/default/files/kalgebra-line-x.jpg (A line in KAlgebra)
[6]: https://opensource.com/sites/default/files/kalgebra-sin.jpg (Sin wave and an s-curve)
[7]: https://opensource.com/sites/default/files/kalgebra-sin-3d.jpg (Sine waves in space)

View File

@ -0,0 +1,72 @@
[#]: subject: "A visual map of a Kubernetes deployment"
[#]: via: "https://opensource.com/article/22/3/visual-map-kubernetes-deployment"
[#]: author: "Nived Velayudhan https://opensource.com/users/nivedv"
[#]: collector: "lujun9972"
[#]: translator: "wxy"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14317-1.html"
Kubernetes 部署的可视化地图
======
> 通过查看创建一个吊舱或一个部署时的 10 个步骤,可以更好地了解 Kubernetes。
![](https://img.linux.net.cn/data/attachment/album/202203/01/095801szxq9lx5prdqkb5y.jpg)
当你在 Kubernetes 上使用容器时,你经常把应用程序组合在一个<ruby>吊舱<rt>pod</rt></ruby>中。当你把一个容器或一个吊舱发布到生产环境中时,它被称为一个<ruby>部署<rt>deployment</rt></ruby>。如果你每天甚至每周都在使用 Kubernetes你可能已经这样做过几百次了但你有没有想过当你创建一个吊舱或一个部署时到底会发生什么
我发现在高层次上了解事件链条是有帮助的。当然,你不一定要理解它。即使你不知道为什么,它仍然在工作。我不打算列出每一件发生的小事,但我的目标是涵盖所有重要的事情。
这里有一张 Kubernetes 不同组件如何互动的视觉地图。
![吊舱链条][2]
你可能注意到,在上图中,我没有包括 etcd。API 服务器是唯一能够直接与 etcd 对话的组件,而且只有它能够对 etcd 进行修改。因此,你可以认为 etcd 在这张图中存在于隐藏的API 服务器后面。 
另外,我在这里只讲到了两个主要的控制器(<ruby>部署控制器<rt>Deployment controller</rt></ruby><ruby>复制集控制器<rt>ReplicaSet controller</rt></ruby>)。其他的控制器的工作方式类似。
下面的步骤描述了当你执行 `kubectl create` 命令时会发生什么。
### 步骤 1 ###
当你使用 `kubectl create` 命令时,一个 HTTP POST 请求被发送到 API 服务器其中包含部署清单。API 服务器将其存储在 etcd 数据存储中,并返回一个响应给 `kubectl`
### 步骤 2 和 3 ###
API 服务器有一个观察机制,所有观察它的客户都会得到通知。客户端通过打开与 API 服务器的 HTTP 连接来观察变化API 服务器会流式地发出通知。其中一个客户端是部署控制器。部署控制器检测到一个<ruby>部署<rt>Deployment</rt></ruby>对象,它用部署的当前规格创建一个<ruby>复制集<rt>ReplicaSet</rt></ruby>。该资源被送回 API 服务器,并存储在 etcd 数据存储中。
### 步骤 4 和 5 ###
与上一步类似,所有观察者都会收到关于 API 服务器中的变化的通知。这一次,复制集控制器会接收这一变化。该控制器了解所需的副本数量和对象规格中定义的吊舱选择器,创建吊舱资源,并将这些信息送回 API 服务器,存储在 etcd 数据存储中。
### 步骤 6 和 7 ###
Kubernetes 现在拥有运行吊舱所需的所有信息,但吊舱应该在哪个节点上运行?<ruby>调度器<rt>Scheduler</rt></ruby>观察那些还没有分配到节点的吊舱,并开始对所有节点进行过滤和排序,以选择最佳节点来运行吊舱。一旦节点被选中,该信息将被添加到吊舱规格中。而且它被送回 API 服务器并存储在 etcd 数据存储中。
### 步骤 8、9 和 10 ###
到目前为止的所有步骤都发生在<ruby>控制平面<rt>control plane</rt></ruby>本身。<ruby>工作节点<rt>worker node</rt></ruby>还没有做任何工作。不过,吊舱的创建并不是由控制平面处理的。相反,在所有节点上运行的 `kubelet` 服务观察 API 服务器中的吊舱规格,以确定它是否需要创建任何吊舱。在调度器选择的节点上运行的 kubelet 服务获得吊舱规格,并指示工作节点上的容器运行时创建容器。这时就会下载一个容器镜像(如果它还不存在的话),容器就会实际开始运行。
### 理解 Kubernetes 的部署
对这个一般流程的理解可以帮助你理解 Kubernetes 中的许多事件。考虑一下 Kubernetes 中的<ruby>守护进程集<rt>DaemonSet</rt></ruby><ruby>状态集<rt>StatefulSet</rt></ruby>。除了使用不同的控制器外,吊舱的创建过程是一样的。
课后作业:如果部署被修改为有三个应用程序的副本,导致创建吊舱的事件链条会是什么样子?你可以参考图表或列出的步骤,但你肯定有你需要弄清楚的知识。知识就是力量,你现在有了了解 Kubernetes 的一个重要组成部分。
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/3/visual-map-kubernetes-deployment
作者:[Nived Velayudhan][a]
选题:[lujun9972][b]
译者:[wxy](https://github.com/wxy)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/nivedv
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/containers_modules_networking_hardware_parts.png?itok=rPpVj92- (Parts, modules, containers for software)
[2]: https://opensource.com/sites/default/files/uploads/pod-chain_0.png (Pod chain)
[3]: https://creativecommons.org/licenses/by-sa/4.0/

View File

@ -0,0 +1,163 @@
[#]: subject: "Fedora 36 Release Date and New Features"
[#]: via: "https://news.itsfoss.com/fedora-36-release-date-features/"
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
[#]: collector: "lujun9972"
[#]: translator: "wxy"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14316-1.html"
Fedora 36 发布时间表和新功能
======
> Fedora 36 很快就要发布了,预期会有哪些功能呢?还有,它准备什么时候发布?
![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/fedora-36-release.jpg?w=1200&ssl=1)
Fedora 36 是 [今年最值得期待的发布][1] 之一。
虽然我们期待每一个重要的发布,但去年,[Fedora 35][2] 以 GNOME 41 和一个新的 KDE 流派Kinoite让人期待它带来一些令人兴奋的变化。
别着急;如果你等不及要看到 Fedora 36我将重点指出有关该版本的基本细节。
### Fedora 36 发布日期
按照官方的时间表Fedora 36 测试版的早期发布日期是 **2022 年 3 月 15 日**。而且Fedora 36 测试版的延迟发布日期(万一延迟)是 **2022 年 3 月 22 日**
一旦公开测试完成,最终的发布日期可望在 **2022 年 4 月 19 日**。如果出现延迟,发布日期将被推至 **2022 年 4 月 26 日**
你还应该注意Fedora Linux 34 将在 **2022 年 5 月 17 日** 走到其生命的终点。
![][3]
你现在可以尝试用每夜构建版来下载 Fedora 36链接在本文底部但是距离测试版发布还有几周时间你应该等等。
### Fedora 36 功能
![][4]
像往常一样Fedora 36 拥有最新的 GNOME 以及其他的补充和改进。
主要的亮点包括:
#### 1、GNOME 42
[GNOME 42][5] 是一次令人兴奋的升级,有各种视觉和功能的变化。
它还包括性能和视觉上的调整及其他改进。如果你没了解过 [GNOME 41 增加的功能][6],你也应该看看。
当然,你可以预期在 Fedora 36 中找到所有这些变化。在这里,我将重点指出那些 Fedora 36 中的细节(如果你没有用上 GNOME 42
### 2、全系统的深色模式
![][7]
Fedora 36 享有从 GNOME 42 引入的全系统深色模式。
虽然在其他 Linux 发行版上有深色模式的实现,但 GNOME 42 帮助 Fedora 36 成为桌面用户的一个有吸引力的选择。
深色模式完美地融合在一起,给人一种干净的 GNOME 体验。
### 3、新壁纸
如果没有一张新的壁纸,其他的改进听起来都很乏味。
所以Fedora 设计团队在 Fedora 36 中带来了一张制作精美的壁纸,这是一张风景插图,看起来很不错。
![][8]
默认的壁纸有日间/夜间的变体。正如你所注意到的上面的白天的壁纸,下面是晚上的艺术作品。
![][8a]
两者看起来都很奇妙,对眼睛也很舒畅。
### 4、Linux 内核 5.17
众所周知Fedora 36 提供最新的 Linux 内核版本。截至目前,它正在运行即将发布的 Linux 内核 5.17 的候选版本。
随着 Fedora 36 的最终发布,你应该看到 Linux 内核 5.17 的稳定版本。
### 5、深色/浅色壁纸
除了 Fedora 36 的新默认壁纸之外,它还具有与 GNOME 42 一起引入的深色/浅色模式壁纸集。
![][9]
截至目前,在测试 Fedora 36 工作站(预发布版本)时,我只能找到其中一张壁纸,而不是 GNOME 42 中的整个系列。
所以,你也许可以期待在 Fedora 36 测试版中增加更多的内容。
你可以从外观上选择壁纸及其可用的深色/浅色变体。
### 6、屏幕截图用户界面和本地屏幕录制
GNOME 42 引入的新的屏幕截图用户界面是一个奇妙的补充。另外,只需切换一下,你就可以开始录制你的屏幕了!
![][10]
你可以看到 Fedora 36 的这个功能,工作得非常好。
### 7、桌面环境更新
由于显而易见的原因,你应该在 Fedora 36 看到提供的最新的桌面环境。
最基本的应该是 GNOME 42、[KDE Plasma 5.24][11] 和 Xfce 4.16。
除此之外LXQt 也已经更新到 1.0.0。
### 8、重要的技术变化
除了视觉上的变化和 Linux 内核的升级Fedora 36 还有各种技术改进。
其中一些值得一提的包括:
* 将系统的 openJDK 包从 Java 11 更新为 Java 17。
* 引入了即将推出的 Golang 1.18 版本。
* 将各种语言的字体切换为 Noto 字体作为默认字体,以确保文本渲染的一致性。
* 今后自动升级时排除推荐软件包的行为(如果你没有安装它们)。
* GNU 工具链更新至 gcc 12 和 glibc 2.35。
* 修复某些情况下的升级性问题。
* 默认的 Wayland 会话与 NVIDIA 专有驱动程序。
* 更新 PHP 栈到最新的 8.1.x。
* RPM 数据库将被重新定位到 `/usr` 目录,目前它在 `/var`
关于更多的技术细节,你可以参考 [官方变更集][12]。如果你想下载预发布版本,你可以从下面的链接抓取 ISO。
- [Fedora 36预发布][13]。
### 总结
Fedora 36 将会是一个令人激动的版本。
当它发布时,我很期待在 Fedora 36 工作站上尝试 Wayland 会话与 NVIDIA 专有驱动程序。
你对这个版本有什么期待?请在下面的评论中告诉我。
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/fedora-36-release-date-features/
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[wxy](https://github.com/wxy)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://news.itsfoss.com/linux-distro-releases-2022/
[2]: https://news.itsfoss.com/fedora-35-release/
[3]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/fedora-36-screen.jpg?w=1200&ssl=1
[4]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/fedora-36-pre-neofetch.png?w=1008&ssl=1
[5]: https://news.itsfoss.com/gnome-42-features/
[6]: https://news.itsfoss.com/gnome-41-release/
[7]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/fedora-36-dark-mode.jpg?resize=1568%2C740&ssl=1
[8]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/f36-01-day.jpg?w=1200&ssl=1
[8a]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/f36-02-night.jpg?w=1200&ssl=1
[9]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/fedora-36-pre-wallpapers.jpg?w=1126&ssl=1
[10]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/fedora-36-screenshot-tool.jpg?w=738&ssl=1
[11]: https://news.itsfoss.com/kde-plasma-5-24-lts-release/
[12]: https://fedoraproject.org/wiki/Releases/36/ChangeSet
[13]: https://kojipkgs.fedoraproject.org/compose/branched/latest-Fedora-36/compose/Workstation/x86_64/iso/

View File

@ -0,0 +1,86 @@
[#]: subject: "Put sticky notes on your Linux KDE desktop"
[#]: via: "https://opensource.com/article/22/2/sticky-notes-linux-kde"
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
[#]: collector: "lujun9972"
[#]: translator: "geekpi"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14346-1.html"
在你的 Linux KDE 桌面上粘贴便签
======
> 使用 Kontact 套件的功能 KNotes 温和地提醒你自己的日常任务。
![](https://img.linux.net.cn/data/attachment/album/202203/11/083349wujq4dbh6ccqb5kq.jpg)
我记得我第一次参加一个“不算会议的”会议,起初这是一个混乱的活动,有很多社交和个人项目的分享,但它逐渐凝聚成一个主要是自发组织的技术活动。这一切并没有用魔法,而用的是便签。人们在那些彩色的粘性记事贴上写下演讲和演示的想法,并将它们贴在共同的墙上,其他人将类似的想法分组,最终每个人都知道聚集在哪里讨论特定的话题。这是一件美好而令人满意的见证,它让我对便签有了新的认识。所以我很高兴最近发现 KDE Plasma 桌面有了数字便签,而且在很多方面它们甚至比实体的更有用。该应用叫做 KNotes如果你有随意的想法想记下来那么你可能想在自己的 Linux 桌面贴上它。
### 安装 KNotes
KNotes 是 Kontact 套件的一部分,这是 KDE 的个人信息管理器PIM。如果你正在运行 Plasma 桌面,那么你可能已经安装了 KNotes。如果没有你可以从包管理器安装它
```
$ sudo dnf install kontact
```
在基于 Debian 的发行版上,使用 `apt` 命令而不是 `dnf`
### Linux 桌面上的 KNotes
尽管 KNotes 是 Kontact 的一部分,但它也是一个可以在后台运行的独立应用,随时可以在你需要时生成空白便签。从你的应用菜单启动 KNotes它会将自身最小化到你的系统托盘。它的图标是一个黄色的小方块因为在便签在现实生活中变得丰富多彩之前它们往往都是黄色的。
要创建新便签,请右键单击系统托盘中的 KNote 图标并选择 “<ruby>新便签<rt>New Note</rt></ruby>”。第一次创建便签时,系统会提示你选择保存的位置。选择本地 KNotes 数据库文件(它由 Kontact 管理,因此你不会直接与该文件交互)并默认使用此位置。之后就不会再收到这种提示。
你的桌面上会出现一个新便签,你可以自己在其中输入。
![Start using KNotes][2]
就这么简单。至少它可以像这种老式的纸质便签一样。但这些是数字版的 KDE KNotes因此你可以做的不仅仅是记下一些提醒文本给自己。
### 更改便签颜色
当一堆黄色便签开始混合在一起,你可以对便签进行颜色编码。右键单击便签的标题栏(带有日期和时间的部分),然后从出现的上下文菜单中选择 “<ruby>首选项<rt>Preferences</rt></ruby>”。在该窗口中,你可以更改标题和正文字体和字体大小,然后选择 “<ruby>显示设置<rt>Display Settings</rt></ruby>” 选项卡以更改便签纸和字体的颜色。
![KNotes with added color][4]
### 发送便签
以前自己写便签的时候,经常会在 [Emacs][5] 的暂存缓冲区中给自己写一些提醒。有更好的方法来管理 [Emacs 中的便签][6],但是我将便签内容记下后,之后心不在焉地关闭而没保存的习惯很难改掉。
有了 KNotes便签会自动保存到 Kontact因此你不必担心需要记着它们。更好的是它们是数字的因此你可以将它们发送给自己的其他设备。你可以通过电子邮件将便签发送给自己也可以通过网络将它们发送到另一台计算机。只需右键单击便签的标题栏你就可以选择“<ruby>电子邮件<rt>Email</rt></ruby>”或“<ruby>发送<rt>Send</rt></ruby>”。
要从一个到另一个 KDE Plasma 桌面以 KNotes 方式接收便签,你必须在接收机器上授予 KNotes 接收便签的权限。要允许传入便签,请右键单击系统托盘中的 KNotes 图标并选择 “<ruby>配置 Knotes<rt>Configure KNotes</rt></ruby>”。
![Configure KNotes][7]
### 设置闹钟
至少对我来说,写便签通常是因为我答应了某人的事情,通常是在短期内,比如一天结束之前。随着我的工作和打开越来越多的窗口,贴在桌面上的便签往往会被掩盖,所以 KNotes 允许你为真正重要的便签设置闹钟,这一点特别有用。
要为便签设置闹钟,请右键单击便签的标题栏并选择 “<ruby>设置闹钟<rt>Set alarm</rt></ruby>”。
### 在 Linux 上做便签
便笺是记录日常任务的简单而有趣的方法。它们不是对每个人都“有效”,也不是我跟踪每天要做的事情的唯一手段,但它们是很好的选择,而且在一天结束时,在删除已完成的便签前将它们移到“已完成”那一堆,没有什么比这更令人心满意足的了。试一试吧,这是个可能能坚持下去的习惯。
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/2/sticky-notes-linux-kde
作者:[Seth Kenlon][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/seth
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/wfh_work_home_laptop_work.png?itok=VFwToeMy (Working from home at a laptop)
[2]: https://opensource.com/sites/default/files/knote-yellow.jpg (Start using KNotes)
[3]: https://creativecommons.org/licenses/by-sa/4.0/
[4]: https://opensource.com/sites/default/files/knote-color.jpg (KNotes with added color)
[5]: https://opensource.com/downloads/emacs-cheat-sheet
[6]: https://opensource.com/article/18/7/emacs-modes-note-taking
[7]: https://opensource.com/sites/default/files/knotes-preferences.jpg (Configure KNotes)

View File

@ -0,0 +1,103 @@
[#]: subject: "4 Vim features to use to improve productivity"
[#]: via: "https://opensource.com/article/22/3/vim-features-productivity"
[#]: author: "Hunter Coleman https://opensource.com/users/hunterc"
[#]: collector: "lujun9972"
[#]: translator: "geekpi"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14325-1.html"
4 个用于提高生产力的 Vim 功能
======
> Vim 有很多技巧,即使是用过它很多年的人仍然可以学习新东西。
![](https://img.linux.net.cn/data/attachment/album/202203/04/102118tgy1i7albn6ndiri.jpg)
Vim 总在那里。Vim 是当今最流行的文本编辑器之一。这在很大程度上是因为它随处可见。当你通过 SSH 连接到另一个系统时,你可能找不到 [Emacs][2]、[Nano][3] 或 [VSCodium][4]但你可以放心Vim 就在那里。
在本文中,我介绍了一些你可以用 Vim 做的中级事情,以加快你的工作流程并通常让你的一天更轻松。本文假设你以前使用过 Vim已经了解编辑器的基础知识并希望将你的 Vim 技能提高一个档次。Vim 充满了有用的技巧,没有人真正掌握它,但本文中的五个技巧可以提高你的技能,并希望让你更加爱上最受欢迎和喜爱的文本编辑器之一。
### Vim 书签
Vim 提供了一种在文本中添加书签的简单方法。假设你正在编辑一个大文件,并且当前的编辑会话要求你在文件中不同位置的两段文本之间来回跳转。
首先,你输入 `m`(用于标记)为当前位置设置一个书签,然后为其命名。例如,如果我正在编辑的文件中有一个名称列表,我想稍后再跳回,我可以使用 `mn`n 表示名称)为文件的该部分添加书签。
稍后,在编辑文件的另一部分并希望跳回该名称列表时,我有两个选项。我可以输入 \``n`(反引号 n转到书签的位置或者我可以键入 `'n`(单引号 n转到书签所在行的开头。
当我不再需要书签时,我可以使用 `:delmarks n` 将其删除。`:marks` 会显示我所有的书签。
请注意,我使用小写字母来命名我的书签。这是故意的。你可以使用小写字母作为本地书签,使用大写字母来使书签在多个文件中具有全局性。
### Vim 用户定义的缩写
如果你正在处理的文本有一个长词或短语多次出现那么每次都完整地输入它会很快变得烦人。幸运的是Vim 提供了一种创建缩写的简单方法。
要将 `Acme Painted Fake Roadways, Inc.` 的用户定义缩写设置为 `apfr` 你需要输入 `:ab apfr Acme Painted Fake Roadways, Inc.`。现在当在编辑模式时,当你在输入 `apfr` 后面更上空格,就会变成 `Acme Painted Fake Roadways, Inc.`
当你关闭 Vim 会话时,你使用 `:ab` 设置的任何缩写都会丢失。如果你想在此之前取消设置缩写,你可输入 `:una apfr`
### Vim 自动补全
许多人没有意识到 Vim 带有自动补全功能。如果你在文件中输入以前使用过的长词,这是一个方便的工具。
假设你正在撰写一篇文章,多次使用 `Antarctica` 一词。使用一次后,下次你可以只输入前几个字母。例如,你输入 `Ant` 然后按下 `Ctrl+P`。 Vim 要么补全单词(如果只有一个选项),要么为你提供可以用箭头键选择的单词列表,继续输入以进一步缩小搜索范围并使用 `Tab` 键选择单词。
### Vim 范围选择
使用 Vim你可以轻松地对文件中的一系列行执行操作。你可以通过起始行号、逗号和结束行号包括来指示范围。除了文字行号之外你还可以使用句点`.`)表示当前行,使用美元符号 `$` 表示文件缓冲区中的最后一行,以及使用百分号(`%`)表示整个文件。
这里举几个例子来说明。
如果要删除第 2 到 10 行,请输入(在命令模式下):
```
:2,10d
```
要删除从第 25 行到文件末尾的每一行:
```
:25,$d
```
你可以使用以下命令删除每一行:
```
:%d
```
要将第 5 到 10 行复制(或转移)到第 15 行之后:
```
:5,10t 15
```
要将第 5 行到第 10 行移动到第 15 行之后(而不是复制):
```
:5,10m 15
```
### Vim 提高生产力
我希望这篇文章教会了你一些关于 Vim 文本编辑器的新知识。 Vim 有很多技巧,即使是使用了多年的人仍然可以学习新事物。总有一些新的和有用的东西可以学习。
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/3/vim-features-productivity
作者:[Hunter Coleman][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/hunterc
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/laptop_screen_desk_work_chat_text.png?itok=UXqIDRDD (Person using a laptop)
[2]: https://opensource.com/article/20/3/getting-started-emacs
[3]: https://opensource.com/article/20/12/gnu-nano
[4]: https://opensource.com/article/20/6/open-source-alternatives-vs-code

View File

@ -0,0 +1,146 @@
[#]: subject: "How to use httpx, a web client for Python"
[#]: via: "https://opensource.com/article/22/3/python-httpx"
[#]: author: "Moshe Zadka https://opensource.com/users/moshez"
[#]: collector: "lujun9972"
[#]: translator: "geekpi"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14353-1.html"
httpx一个 Python Web 客户端
======
> Python 的 httpx 包是一个用于 HTTP 交互的一个优秀且灵活的模块。
![](https://img.linux.net.cn/data/attachment/album/202203/13/102042hmtif0i7g3fg0ir0.jpg)
Python 的 `httpx` 包是一个复杂的 Web 客户端。当你安装它后,你就可以用它来从网站上获取数据。像往常一样,安装它的最简单方法是使用 `pip` 工具:
```
$ python -m pip install httpx --user
```
要使用它,把它导入到 Python 脚本中,然后使用 `.get` 函数从一个 web 地址获取数据:
```
import httpx
result = httpx.get("https://httpbin.org/get?hello=world")
result.json()["args"]
```
下面是这个简单脚本的输出:
```
{'hello': 'world'}
```
### HTTP 响应
默认情况下,`httpx` 不会在非 200 状态下引发错误。
试试这个代码:
```
result = httpx.get("https://httpbin.org/status/404")
result
```
结果是:
```
<Response [404 NOT FOUND]>
```
可以明确地返回一个响应。添加这个异常处理:
```
try:
result.raise_for_status()
except Exception as exc:
print("woops", exc)
```
下面是结果:
```
woops Client error '404 NOT FOUND' for url 'https://httpbin.org/status/404'
For more information check: https://httpstatuses.com/404
```
### 自定义客户端
除了最简单的脚本之外,使用一个自定义的客户端是有意义的。除了不错的性能改进,比如连接池,这也是一个配置客户端的好地方。
例如, 你可以设置一个自定义的基本 URL
```
client = httpx.Client(base_url="https://httpbin.org")
result = client.get("/get?source=custom-client")
result.json()["args"]
```
输出示例:
```
{'source': 'custom-client'}
```
这对用客户端与一个特定的服务器对话的典型场景很有用。例如,使用 `base_url``auth`,你可以为认证的客户端建立一个漂亮的抽象:
```
client = httpx.Client(
base_url="https://httpbin.org",
auth=("good_person", "secret_password"),
)
result = client.get("/basic-auth/good_person/secret_password")
result.json()
```
输出:
```
{'authenticated': True, 'user': 'good_person'}
```
你可以用它来做一件更棒的事情,就是在顶层的 “主” 函数中构建客户端,然后把它传递给其他函数。这可以让其他函数使用客户端,并让它们与连接到本地 WSGI 应用的客户端进行单元测试。
```
def get_user_name(client):
result = client.get("/basic-auth/good_person/secret_password")
return result.json()["user"]
get_user_name(client)
'good_person'
def application(environ, start_response):
start_response('200 OK', [('Content-Type', 'application/json')])
return [b'{"user": "pretty_good_person"}']
fake_client = httpx.Client(app=application, base_url="https://fake-server")
get_user_name(fake_client)
```
输出:
```
'pretty_good_person'
```
### 尝试 httpx
请访问 [python-httpx.org][2] 了解更多信息、文档和教程。我发现它是一个与 HTTP 交互的优秀而灵活的模块。试一试,看看它能为你做什么。
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/3/python-httpx
作者:[Moshe Zadka][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/moshez
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_web_internet_website.png?itok=g5B_Bw62 (Digital creative of a browser on the internet)
[2]: https://www.python-httpx.org/

View File

@ -0,0 +1,71 @@
[#]: subject: "9 resources to help you contribute to open source in 2022"
[#]: via: "https://opensource.com/article/22/3/contribute-open-source-2022"
[#]: author: "Opensource.com https://opensource.com/users/admin"
[#]: collector: "lujun9972"
[#]: translator: "geekpi"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14372-1.html"
2021 总结:如何为开源做出贡献
======
> 你准备好推进你的开源之旅了吗?这里有一些如何给开源做贡献的提示和教程。
![](https://img.linux.net.cn/data/attachment/album/202203/19/145149b9uvnnrkfnuzm7uf.jpg)
在 2022 年,开源正变得越来越家喻户晓。但多年来,开源一直被称为企业 IT 领域中潦倒的弱势群体。开源已经以某种形式或方式存在了 [几十年][2],但甚至直到 20 世纪 90 年代末,它才正式有了自己的 [名字][3]。你可能一直都在使用开源技术但却不知道。事实上你目前正在阅读的网站LCTT 译注:指 opensource.com )就是在开源的内容管理系统 [Drupal][4] 上运行的。你的汽车、笔记本电脑、智能手表和电子游戏很可能是 [由 Linux][5] 这个开源操作系统支持的。
红帽公司的年度《[企业开源状况][6]》在最近发布了其中包含了大量的见解对任何在开源技术领域发展的人都有帮助。首先77% 的 IT 领导对企业开源的看法比一年前更积极82% 的 IT 领导更可能选择对开源社区有贡献的供应商。这意味着,参与开源比以往任何时候都更重要。现在是推进你的开源之旅的时候了,无论你在哪里。这里有一些资源可以帮助你踏上这条路。
### 为什么要为开源做贡献?
* 《[是什么激励了开源软件的贡献者?][7]》新的研究发现人们贡献的原因自 21 世纪初以来已经改变。
* 《[现在为开源做贡献的 3 个理由][8]》现在,比以往任何时候都更加是为开源做贡献的理想时机。
* 《[为开源做贡献时的 7 个成功策略][9]》一位作者在为开源项目做贡献的经验帮助她在技术领域找到了她梦想的工作。
### 为开源做出你的第一次贡献
* 《[8 种非编码的方式为开源做贡献][10]》无论你是程序员新手,还是经验丰富的老手,或者根本不是工程师,在编码之外还有很多方式为开源项目做贡献。
* 《[为 Slack 的开源替代方案做贡献的 6 种方式][11]》加入成千上万为 Mattermost 这个开源消息平台贡献代码、翻译、文档等的人。
* 《[任何人都可以为开放实践图书馆做出贡献的 7 种方式][12]》为开放实践图书馆做出贡献是参与全球从业者社区的一种有趣方式,这些从业者都愿意分享他们的知识并改进他们自己的工作方式。
* 《[如果你有一份全职工作,如何为 Kubernetes 做贡献][13]》你可以在业余时间从事最大的开源项目之一的内部工作。
### 鼓励他人为开源做贡献
* 《[为什么你的开源项目需要的不仅仅是程序员][14]》仅仅是开发人员并不能创造出满足各种需求的长保质期的开源项目,是时候欢迎更多的角色和人才了。
* 《[开源贡献者加入的 10 个技巧][15]》让新的贡献者感到自己在社区中受到欢迎,对项目的未来至关重要,因此,在加入时投入时间和注意力是很重要的。
### 分享你对开源贡献的建议
当涉及到参与开源社区时,有无限的可能性。在这里,我们的目标是庆祝社区的不同观点和背景,其中包括你。你的独特故事激励着全球各地的人们参与到开源中来。来吧,[把你的文章想法发给我们][16]
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/3/contribute-open-source-2022
作者:[Opensource.com][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/admin
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/wfh_work_home_laptop_work.png?itok=VFwToeMy (Working from home at a laptop)
[2]: https://www.redhat.com/en/topics/open-source/what-is-open-source#the-history-of-open-source?intcmp=7013a000002qLH8AAM
[3]: https://opensource.com/article/18/2/coining-term-open-source-software
[4]: https://opensource.com/tags/drupal
[5]: https://opensource.com/article/19/8/everyday-tech-runs-linux
[6]: https://www.redhat.com/en/enterprise-open-source-report/2022?intcmp=7013a000002qLH8AAM
[7]: https://opensource.com/article/21/4/motivates-open-source-contributors
[8]: https://opensource.com/article/20/6/why-contribute-open-source
[9]: https://opensource.com/article/22/1/open-source-contributions-career
[10]: https://opensource.com/life/16/1/8-ways-contribute-open-source-without-writing-code
[11]: https://opensource.com/article/20/7/mattermost
[12]: https://opensource.com/article/21/10/open-practice-library
[13]: https://opensource.com/article/19/11/how-contribute-kubernetes
[14]: https://opensource.com/article/20/9/open-source-role-diversity
[15]: https://opensource.com/article/19/12/open-source-contributors
[16]: https://linux.cn/article-14335-1.html

View File

@ -0,0 +1,93 @@
[#]: subject: "Epic Games Store Now Works on Steam Deck"
[#]: via: "https://news.itsfoss.com/epic-games-steam-deck/"
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
[#]: collector: "lujun9972"
[#]: translator: "zd200572"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14374-1.html"
Epic 游戏商店现在可在 Steam Deck 上使用啦
======
> 现在可以在 Steam Deck 上运行 Epic 游戏商店了,几乎无懈可击! 但是,它是非官方的。
![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/run-epicgames-on-steam-deck-now.png?w=1200&ssl=1)
Steam Deck 在加强对 Linux 平台的游戏支持方面做出了有力推动。
它运行在 **Steam OS 3.0**(基于 Arch并具有 KDE Plasma 桌面环境。感谢 Valve它没有锁定平台并让用户在上面进行试验。
尽管不是每个人都可以拿到它,但这是一款令人兴奋的硬件,可以挑战任天堂 Switch 掌机。
它可能还不支持所有的流行游戏(比如《命运 2》、《堡垒之夜》但它在几个 3A 级大作和独立游戏上取得了不错的进展。你可以到官方的 [Deck 认证][1] 页面查看有关支持游戏的最新信息。
现在,更令人激动的是,事实证明 Steam Deck 也可以使用 [Epic 游戏商店][2]**非官方的**)来运行游戏。但是,怎样运行呢,让我们来一探究竟。
### 通过 Heroic 游戏启动器使用 Epic 游戏商店
是的,这就是 [去年][4] 制作的 [Heroic 游戏启动器][3], 并且已知它可以运行在 Linux 桌面上。
另外,(据 [GamingOnLinux][5])感谢 Liam Dawe他和各位开发者协调成功地在 Steam Deck 上测试运行了 Heroic 游戏启动器(及 [Heroic Bash 启动器][6])。
[![][7]](https://youtu.be/89Dw3I6NJX4)
补充一句,**Heroic Bash 启动器** 是一个为所有已安装的 Heroic 游戏创建启动脚本(.sh 文件)的工具,它允许你直接从终端或者游戏前端/启动器启动游戏,而不必打开 Heroic。
故事的发生是这样的(根据我与 Heroic Bash 启动器开发者的简短交谈):
最初,在 Steam Deck 上实验运行 Epic 游戏商店时Steam 控制器无法工作,因为 Epic 游戏商店是使用 Steam 客户端以一个“非 Steam 游戏”运行的。
所以Heroic Bash 启动器的开发者,[Rishabh Moharir][8](也是这里的一位作者)建议使用他的工具,按照他 [GitHub 上的维基指南][9] 来试试。
Heroic Bash 启动器可以在 Linux 桌面上与 Epic 游戏商店配合使用。所以,这值得一试!
然后,幸运地,它工作了。
### 在 Steam Deck 上安装 Epic 游戏商店
首先,你需要在 Steam Deck 上使用可用的 AppImage 文件在**桌面模式**下安装 **Heroic 游戏启动器**
完成后,你需要登录并下载你选择的游戏。
接下来,你需要下载最新的 [legendary][10] 二进制文件,并在启动器设置中将其设置为替代的 legendary 二进制文件。
你需要在启动器的游戏设置中配置并设置兼容层为 Proton 7.0。
这时,你需要下载最新的 [Heroic Bash 启动器二进制文件][11],然后运行它。
最后,你必须根据这个 [GitHub 上的官方维基指南][9],把游戏添加到 Steam 中(以便在 Steam Deck 的界面中找到它)。
总之,“手工爱好者”们肯定需要花好大一会儿才能使其工作。另外,如果你仍然困惑,你可以在 [维基][12] 上找到包含详细信息的同样的一套步骤和细节,这是 Heroic 游戏启动器团队整理的(或者参考上面的视频)。
对我来说,这听起来可行,应该不会超越大多数 Steam Deck 用户的能力。不幸的是,我无法在印度买到 Steam Deck目前
至于 Steam Deck 上的 Epic 游戏商店的未来,我们只能抱以最好的期望。
你试过 Steam Deck 吗?在下面的评论区让我知道你的看法。
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/epic-games-steam-deck/
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[zd200572](https://github.com/zd200572)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://www.steamdeck.com/en/verified
[2]: https://www.epicgames.com/store/en-US/
[3]: https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher
[4]: https://news.itsfoss.com/heroic-games-launcher/
[5]: https://www.gamingonlinux.com/2022/03/heroic-games-launcher-now-works-nicely-on-steam-deck/
[6]: https://github.com/redromnon/HeroicBashLauncher
[7]: https://i0.wp.com/i.ytimg.com/vi/UvuGAQDagWE/hqdefault.jpg?w=780&ssl=1
[8]: https://news.itsfoss.com/author/rishabh/
[9]: https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/wiki/Adding-Games-to-Steam-on-Linux
[10]: https://github.com/derrod/legendary/releases/
[11]: https://github.com/redromnon/HeroicBashLauncher/releases/
[12]: https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/wiki/SteamDeck---Running-Epic-Games

View File

@ -0,0 +1,177 @@
[#]: subject: "I Tested The New Maui Shell On My Linux Phone. Heres What I Found!"
[#]: via: "https://news.itsfoss.com/tested-maui-shell/"
[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/"
[#]: collector: "lujun9972"
[#]: translator: "wxy"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14331-1.html"
在 Linux 手机上测试了新的 Maui Shell 后我发现……
======
> 我在 PinePhone 上测试了 Maui Shell结果有好有坏。如果你想冒险尝鲜一下可以按照这个说明进行试验
![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/maui-shell.png?w=1200&ssl=1)
就在一个多月前,我们写了 [Maui Shell 初窥][1]。它是由 Nitrux Linux 团队开发的,我对它流畅的视觉效果,特别是它的融合功能印象深刻。
同时,我结束了 [我一年的 PinePhone 日用实验][2],这意味着它可以再次自由地进行实验。结果,我很快就自己安装了 Maui Shell花了不少时间来测试它。
下面是我的发现!
### 关于 Maui Shell 开发状态的简短说明
在我们开始之前我想指出Maui Shell 仍处于早期开发阶段。因此,我一般不会提到我注意到的 bug而是将重点放在它的更基本的方面。
不过,对于更大的、更耗时的问题例外,所以请记住这一点。
说完了这些,让我们开始测试吧!
### 手机上的 Maui Shell
![][3]
安装完之后,我就看到了 Maui Shell 的(现在熟悉的)桌面上。随即,非常明显的是,它的缩放比例完全错误,这使得它很难使用。
幸运的是Maui 项目的 Telegram 群组的人提供了极大帮助,我没用了一个小时就成功地修复了缩放比例(感谢 @wachidadinugroho)。
现在好了,我开始测试。
#### 其性能堪比糖浆流动
如果你读过我的 PinePhone 点评你可能记得把它的性能比作糖蜜滴落的速度。不幸的是Maui Shell 将这一点提升到了一个全新的高度。即使是最基本的互动,如打开快速控制菜单,也要花上五秒钟的时间!
不幸的是,我的水平还不足以判断这种缓慢的原因,但它很有可能是由软件渲染造成的。如果你不清楚,“软件渲染”是指图形不在 GPU 上渲染,而是在效率和优化程度都更低的 CPU 上(利用软件来)渲染。
我考虑的另一个可能的罪魁祸首是糟糕的优化(毕竟它还处在早期阶段)。如果是这样的话,那么在未来的几个月里,极有可能在为 Maui Shell 的第一个稳定版本做准备的过程中修复这个问题。
然而,正如我之前所说的,对我的早期看法要多加注意。
#### 有望实现的用户体验
![][4]
与几乎所有的移动 UI 一样Maui Shell 在触摸屏上使用起来简单而直观。然而,它也结合了许多桌面元素,这对提高用户体验有很大的作用。
例如,从屏幕顶部向下滑动会出现一个快速设置菜单,类似于在安卓和 iOS 上发现的那些。
然而,可以单独点击顶部通知栏的不同部分,会只显示相关的设置,类似于许多桌面环境面板和任务栏上的各种小程序。
现在,让我们前往 **窗口管理**
对于窗口管理Maui Shell 团队显然从 GNOME 和 iOS 中获得了一些灵感,从屏幕底部向上滑动会显示一个类似 GNOME 的所有运行中的应用程序的概览。我发现这非常直观和简单,老实说,我很惊讶以前没有这样操作过!
最后,托盘也是 Maui Shell 在手机上的一个重要方面。它在默认情况下自动隐藏,可以通过从屏幕底部向上轻扫来访问。从这里,它显示了所有正在运行的应用程序的图标,以及一个打开应用程序启动器的按钮。
说到应用启动器,它与 iOS 14 及更高版本中的应用库非常相似。每个应用都被分类,只需轻点几下就能轻松找到并启动。
总的来说,其实用性有点独特,而且值得探究。而且,这种特性也延伸到了应用程序,它们是用 Mauikit 和 Kirigami 制作的。
我认为 Maui Shell 团队把基本的东西做得很完美。
#### 应用程序超棒
![][5]
任何用 Mauikit 构建的东西都能与 Maui Shell 完美整合。到目前为止,最大的 Mauikit 应用程序集来自 Maui Shell 的开发方 Maui 项目。其中一些包括:
* Index
* Nota
* Station
* VVave
* Pix
* Clip
* Buho
* Shelf
* Communicator
所有这些应用都能在移动和桌面设备上完美运行,并将桌面级应用带到手机上。我对 [Index][6] 特别满意,它是一个有趣而实用的手机文件管理器。
![Maui Index app][7]
除了 Mauikit 应用外Kirigami 应用也很好用。因此,在桌面和移动设备上都有一个非常适合 Maui Shell 的庞大的应用程序库。
### 其他观点
除了这些观察之外,还有一些小问题我想提一下:
* 不幸的是,现在似乎还没有虚拟键盘。我通过使用 USB-C 连接的键盘来规避这个问题,但这并不意味着不能把它作为手机使用。
* 我还发现了几个缩放的问题,我无法解决这些问题。这些问题包括应用程序的缩放比例远远超过 Maui Shell 本身,以及根本没有缩放比例。这也许是由于我的错误造成的,但我觉得不能指望一般的用户能够钻研晦涩的 Qt 专用环境变量。
### 自己测试 Maui Shell
如果所有这些问题都不影响你,那么你可以使用下面的说明在 PinePhone 上测试 Maui Shell。需要注意的是这些都是针对 PinePhone 的,但也可以根据其他需要进行修改:
* 下载 [Arch Linux ARM][8] 并刷入到 SD 卡上
* 用 SD 卡启动,并连接一个外部键盘
* 使用凭证 `alarm`/`123456` 登录
* 现在使用 `nmtui` 连接到 Wi-Fi并使用 `sudo pacman -Syu` 更新软件包列表
* 运行以下命令(这些命令将需要很长的时间来运行):
```
sudo pacman -S base-devel
git clone https://aur.archlinux.org/packages/maui-shell-git
git clone https://aur.archlinux.org/packages/mauikit-git
cd mauikit-git
makepkg -Asi
cd ..
cd maui-shell-git
makepkg -Asi
```
* 使用 [nano][9] 创建一个启动脚本:
```
cd
nano start.sh
```
输入如下内容:
```
#!/bin/sh
# in case it's not detected
# or you wish to override
#
# export QT_QPA_EGLFS_PHYSICAL_WIDTH=480
# export QT_QPA_EGLFS_PHYSICAL_HEIGHT=270
export QT_QPA_PLATFORM=eglfs
export QT_AUTO_SCREEN_SCALE_FACTOR=0
export QT_SCALE_FACTOR=2
cask -r -plugin libinput
```
* 使脚本可执行:`chmod +x start.sh`。
现在,可以用 `./start.sh` 启动 Maui Shell 了。
就这样!
你对 Maui Shell 有什么看法?你认为它的融合功能有用吗?请在下面的评论中告诉我们!
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/tested-maui-shell/
作者:[Jacob Crume][a]
选题:[lujun9972][b]
译者:[wxy](https://github.com/wxy)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/jacob/
[b]: https://github.com/lujun9972
[1]: https://linux.cn/article-14136-1.html
[2]: https://linux.cn/article-14235-1.html
[3]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/maui-shell-phone.jpg?resize=1568%2C645&ssl=1
[4]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/maui-shell-phone-edited.jpg?w=445&ssl=1
[5]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/Maui-Apps-edited.png?w=902&ssl=1
[6]: https://mauikit.org/apps/index/
[7]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/maui-index-app.png?w=1200&ssl=1
[8]: https://github.com/dreemurrs-embedded/Pine64-Arch/releases
[9]: https://news.itsfoss.com/gnu-nano-6-0-released/

View File

@ -0,0 +1,260 @@
[#]: subject: "Vim vs Nano: What Should You Choose?"
[#]: via: "https://itsfoss.com/vim-vs-nano/"
[#]: author: "Pratham Patel https://itsfoss.com/author/pratham/"
[#]: collector: "lujun9972"
[#]: translator: "wxy"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14328-1.html"
Vim 与 nano你应该选择哪个
======
我们需要利用文本编辑器来做笔记、写程序,或者编辑系统配置文件来完成一些事情。
不管你用来做什么,你的 Linux 发行版已经预装了文本编辑器。
你很可能会注意到一些 [最好的现代文本编辑器][1],如 Gedit、Geany、Kate 等,它们已经预装在你的 Linux 发行版中。然而,这些都是基于 GUI 的程序。
如果你想通过终端访问文本编辑器怎么办?你应该发现它也内置在你的 Linux 发行版中了。
![][2]
Vim 和 nano 是最流行的 [CLI 文本编辑器][3] 之二。
但是,是什么让它们如此受欢迎?你应该选择哪个作为你的文本编辑器?让我指出一下 Vim 和 nano 的区别,以帮助你决定。
### 1、基于终端的编辑器介绍
nano 和 Vim 都提供了大部分的基本功能。虽然 nano 在大多数 Linux 发行版上是内置的,但你必须手动安装 Vim。
为了比较这两者,让我给你简单介绍一下这两者。
#### Vim
![][4]
Vim 是 “Vi” 文本编辑器的改进版,开发于 1991 年。Vim 是 “<ruby>Vi 改进版<rt>Vi IMproved</rt></ruby>” 的意思。
Vi 是一个基于终端的文本编辑器,最初于 1976 年为 Unix 操作系统而开发。Vim 是它的一个具有现代功能的增强版。
考虑到它的各种功能可以帮助编辑程序文件,它也被称为“程序员的文本编辑器”。虽然它提供了一些高级功能,但你也可以用来编辑纯文本文件。
#### GNU nano
![][5]
GNU nano我们在文章中称它为 “nano”是一个简单的基于终端的文本编辑器其灵感来自于 Pico —— 这个基于 Unix 的文本编辑器是华盛顿大学 1989 年开发的 Pine 电子邮件套件的一部分。
Pico 文本编辑器没有 GPL许可证这使得它很难被纳入 Linux 发行版。
因此nano 被开发出来作为它的自由软件替代品。nano 编辑器最初被称为 “tip”然后在 Richard Stallman 宣布它成为正式的 GNU 程序之前重新命名为 nano。
这个编辑器的亮点是它的易用性和极小的学习曲线。你不一定需要成为程序员才能使用 nano。
### 2、功能差异
下面是 Vim 和 nano 的主要功能差异:
#### Vim 的主要特点
* 多级撤销
* 语法高亮
* 命令行编辑
* 文件名补完
* 多窗口和缓冲区
* 折叠
* 会话
* 支持宏
#### nano 的主要特点
* 打开多个文件
* 逐行滚动
* 撤销/重做
* 语法着色
* 行号
请注意一般来说Vim 提供了更高级的功能。然而,它们都提供了编辑系统配置文件、编程和文本编辑等基本功能。
### 3、用作文本编辑器
在 Vim 或 nano 中打开一个文件很简单,只要输入你想使用的编辑器的名字,然后再输入文件的路径。路径可以是文件的绝对路径,也可以是文件的相对路径。
```
vim Documents/text.txt
```
```
nano Documents/text.txt
```
但是,除了用作文本编辑器访问或打开一个文件之外,还有很多功能,对吗?
如果你想快速比较一下,这里有一些基于我的使用情况的比较点:
Vim
* 模式驱动的编辑器
* 在开始时有巨大的学习曲线
* 会话恢复
* 语法高亮/着色
* 提供高级功能
nano
* 易于使用(经常使用的功能及其组合键列在底部)
* 不存在学习曲线
* 旨在进行快速编辑
nano 和 Vim 的主要区别在于,它们的目标受众非常不同。
#### Vim
Vim 是一个模式驱动的编辑器。这意味着字母、数字和标点符号键在按下时都要做一件独特的事情,而不是在屏幕上打出一个字符。
这些模式包括:
* 正常模式
* 视觉模式
* 插入模式
* 命令行命令
* 命令行编辑
默认情况下,当你启动 Vim 时,它以 **正常** 模式打开。每个键都有其独特的功能,不会立即开始输入所按下的字符。
不管什么模式,如果你愿意,你也可以 [把 Vim 配置成一个写作工具][6]。
要知道更多关于这些有趣的事情,你可以参考我们关于 [基本 Vim 命令][7] 以及 [Vim 技巧和窍门][8] 的文章。
![当你启动 Vim无参数时的终端屏幕][9]
在正常模式下,按特定的键会移动你的光标。
例如,如果你按下 `l`(小写字母 L它将把光标向右移动一个字符`h` 键将把光标向左移动一个字符。
如果你想把光标向下移动一行,你就按 `j` 键,如果要把光标向上移动一行,你应该按 `k` 键。
在正常模式下 `l`、`k`、`j`、`h` 是导航键。虽然你可以用方向键来移动,但这样做更有效率。
这些是 Vim 中的基本导航键。
接下来最常用的键是 `w`、`b`、`e`
* 按 `w` 键可将光标移到下一个词。如果它已经在一个词的开头,它就会移动到下一个词的开头。
* 按 `b` 键,光标会移到左边的词的开头。
* 而 `e` 键,则将光标移到右边的词的末尾。
你甚至可以用这些键混合数字(作为前缀)。例如,按 `6w` 可以将光标向前(向右)移动六个词。
如果你想进入一个模式,你必须按类似的组合键:
* `i` 为插入模式
* `CTRL+C` 回到正常模式
* `:wq` 写入文件并关闭窗口。
最后,我们已经 [列出了退出 Vim 的多种方法][10],如果你想了解一下的话。
这只是冰山一角。要学习更多关于 Vim 的知识,你可以使用`vimtutor` 命令,它可以给你提供大多数基本命令的信息,如删除、编辑、保存文件等。
![][11]
#### GNU nano
nano 有一个基本的交互界面,在窗口的底部给你提供关键信息。
要想有个初步的了解,你可以参考我们的 [nano 编辑器指南][12]。
![Terminal screen when you launch nano \(without arguments\)] [13]
你不需要参考手册页或任何文档来执行基本操作。这就是为什么与 Vim 相比nano 被认为是用户友好的。
尽管如此nano 中使用的一些术语仍然是“旧术语”,一个例子是 “<ruby>写出<rt>Write Out</rt></ruby>”、“<ruby>在哪里<rt>Where Is</rt></ruby>”短语,而不是分别用“<ruby>保存<rt>Save</rt></ruby>”和“<ruby>查找<rt>Find</rt></ruby>”。
但是,这并不是什么大问题。
虽然很容易习惯,但它与使用记事本或 GeditGUI 程序)并不完全相同。
例如,在大多数现代编辑器中,执行剪切操作的组合键通常是 `Ctrl + X`,但在 nano 中,它是 `Ctrl + K`
符号 `^` 是用来表示将 `Ctrl` 键作为修饰键使用,并与旁边的键组合使用。
你还可以找到像 `Ctrl + F`(将光标向前移动)、`Ctrl + B`(将光标向后移动)这样的组合键。一些快捷键包括:
* `Ctrl + X` 退出
* `Ctrl + O` 写入(或保存为)
* `Alt + U` 撤销上一个动作
* `Ctrl + ←` 向后退一个字
* `Ctrl + →` 向前进一个字
你可以看看 [GNU nano 的官方速查表][14] 来学习更多的快捷键。
总的来说nano 是一个更适合初学者的编辑器,当你只想偶尔编辑一个文件时,它可以简单地让你完成。
### 4、学习曲线
考虑到上面的所有信息,你一定已经意识到 Vim 与你所习惯的传统文本编辑器不同。
这是真的,这就是为什么 Vim 在学习的初始阶段会显得很艰难。
然而,对于高级用户来说,使用宏、自动补完等高级能力很重要,可以节省时间。
因此如果你是一个程序员或者碰巧经常编辑许多文件Vim 的学习曲线可能是富有成效的。
另一方面nano 提供了极小的学习曲线,而且感觉比基于图形用户界面的文本编辑器如 Gedit 或 Notepad 更让你熟悉。
### 哪个是最适合你的?
Vim 和 nano 都是合格的基于终端的文本编辑器。但是,当涉及到你如何与上述编辑器互动和使用时,它们有很大的不同。
Vim 很灵活,可以适应各种工作流程,前提是你已经习惯了它的工作方式。
相比之下nano 工作起来很简单,可以帮助你编辑任何你想要的东西。
如果你还不确定,我建议先开始使用 nano。而且如果你认为你需要更快地完成工作并且想要更多的功能那么就换成 Vim。
### 常见的问题
继续,让我来谈谈几个问题,这将有助于你获得一个良好的开端。
**Vim 比 nano 好吗?**
从技术上讲,是的。但是,如果你不需要它提供的所有功能,使用起来可能会感到力不从心。
**程序员是否使用 Vim**
系统管理员和程序员喜欢 Vim 的高级功能。所以,是的,他们倾向于使用它。
**nano 是否更受欢迎?**
可以说是的。nano 是一个基于终端的编辑器,被大多数用户使用。此外,它还内置在大多数 Linux 发行版中。
因此,它在用户中普遍受欢迎,而 Vim 仍然是一个为特定人群服务的编辑器。
--------------------------------------------------------------------------------
via: https://itsfoss.com/vim-vs-nano/
作者:[Pratham Patel][a]
选题:[lujun9972][b]
译者:[wxy](https://github.com/wxy)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/pratham/
[b]: https://github.com/lujun9972
[1]: https://itsfoss.com/best-modern-open-source-code-editors-for-linux/
[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/vim-vs-nano.png?resize=800%2C450&ssl=1
[3]: https://itsfoss.com/command-line-text-editors-linux/
[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/07/vim-screenshot.jpg?resize=800%2C520&ssl=1
[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/07/nano-editor-screenshot.jpg?resize=800%2C524&ssl=1
[6]: https://news.itsfoss.com/configuring-vim-writing/
[7]: https://linuxhandbook.com/basic-vim-commands/
[8]: https://itsfoss.com/pro-vim-tips/
[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/01_vim_interface.webp?resize=800%2C430&ssl=1
[10]: https://itsfoss.com/how-to-exit-vim/
[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/vimtutor.png?resize=777%2C519&ssl=1
[12]: https://itsfoss.com/nano-editor-guide/
[13]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/03_nano_interface.webp?resize=800%2C430&ssl=1
[14]: https://www.nano-editor.org/dist/latest/cheatsheet.html

View File

@ -0,0 +1,99 @@
[#]: subject: "Budgie 10.6 is Here as its First Release Under the New Organization"
[#]: via: "https://news.itsfoss.com/budgie-10-6-release/"
[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/"
[#]: collector: "lujun9972"
[#]: translator: "wxy"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14349-1.html"
有了新家的 Budgie 发布了第一个新版本
=======
> 在一个新组织的管理下, Budgie 10.6 发布在一个新的仓库,进行了一些令人印象深刻的改进。
![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/budgie-10-6-release.png?w=1200&ssl=1)
早在今年一月份Solus 的前联合负责人 Joshua Strobl 在离开 Solus 后去 SerpentOS 工作的传闻成为了新闻头条。
你可以在我们的 [原始报道][1] 中阅读更多关于它的内容。
然而,他仍然想为 Budgie 桌面环境工作,所以他(在一个新的仓库中)复刻了这个项目,并成立了 Buddies Of Budgie 组织。三个月后,这个组织变化后的第一个版本已经到来,我们将在这里看看它。
### Budgie 10.6 的新变化
![][2]
鉴于这是自上述组织结构调整后的第一个版本,它的功能变化相当少。尽管如此,这里有一个关于新内容的总体总结:
* 完善的主题设计
* 新的通知系统
* 代码重新格式化
在最新更新的公告中Joshua 还提到:
> Budgie 10.6 旨在弥合 Budgie 传统的“下游”消费者和开发组织本身之间的鸿沟,使像 Ubuntu Budgie 这样的下游能够更密切地参与到它的开发当中。
>
> 作为我们的核心支柱之一即成为一个平台而不是一个产品Budgie 10.6 和未来的 Budgie 版本的目标是提供一个宏观世界,或一组最小的紧密耦合的组件,并将生态系统的其余部分留给下游消费者的决策和价值观,无论它是发行版还是终端用户。
所以,如果你担心 Budgie 桌面环境在分裂后的发展,这应该能让你放心了。
#### 主题改进
![][3]
看起来,这个版本的主题改进基本上是为了提高一致性,做一些细节的改变,以获得现代的外观。
例如,边框圆角已经应用于一些桌面元素,统一的间距,统一的小工具的颜色方案,以及对 GTK 主题支持的其他改进。
从我对这个版本的亲身体验来看,这些变化是细微的,但也能让人感受到,而且确实感觉到它们使 Budgie 更能与 GNOME 和 KDE 等桌面相提并论。
#### 新的通知系统
虽然不是很明显,但 Budgie 现在已经有了一个新的通知系统。其最大的影响是它现在已经从位于屏幕右侧的面板 Raven 中移出。
因此,其他 Budgie 组件现在可以使用新的通知系统。一个提到的例子是“解锁未来在图标任务列表中支持通知徽章的能力”。
同样,虽然此变化很小,但确实打开了未来的可能性,希望我们能在未来的版本中看到这些带来的变化。
#### 其他改进措施
Budgie 10.6 一些其他的变化包括:
* 使用制表符而不是空格,对一些代码进行了常规的重新格式化。
* 重新引入对 GNOME 40 的支持,以启用 Ubuntu LTS 支持。
* 将 GNOME 控制中心重新命名为 Budgie 控制中心。
* 修复了扩大 Raven 缩略图导致 Raven 本身调整大小的问题。
如果你想了解更多,你可以在 [GitHub][4] 上找到发布公告,以获得完整的新功能列表。
- [Budgie 10.6][5]
### 获得 Budgie 10.6
如果你想获得 Budgie 10.6,最好是先等待你的发行版将其打包。如果你使用的是 Arch这可能需要不到一周的时间而 Ubuntu 及其衍生版本则需要更长时间。
对于那些喜欢冒险的人来说,你也可以尝试编译它,但如果你愿意尝试,你可能已经知道如何做了。
总的来说Budgie 10.6 看起来是一个值得关注的版本,特别是考虑到其重大的组织变化。
你对 Budgie 10.6 的变化有什么看法?请在下面的评论中告诉我们吧!
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/budgie-10-6-release/
作者:[Jacob Crume][a]
选题:[lujun9972][b]
译者:[wxy](https://github.com/wxy)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/jacob/
[b]: https://github.com/lujun9972
[1]: https://news.itsfoss.com/solus-co-lead-resign-budgie-serpent/
[2]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/budgie-10.61.png?resize=1568%2C882&ssl=1
[3]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/budgie-10.6-theming.jpg?w=1159&ssl=1
[4]: https://github.com/BuddiesOfBudgie/budgie-desktop/releases/tag/v10.6
[5]: https://github.com/BuddiesOfBudgie/budgie-desktop/releases/

View File

@ -0,0 +1,105 @@
[#]: subject: "Coolero: Open-Source App to Monitor and Control Cooling Devices"
[#]: via: "https://itsfoss.com/coolero/"
[#]: author: "Ankush Das https://itsfoss.com/author/ankush/"
[#]: collector: "lujun9972"
[#]: translator: "geekpi"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14350-1.html"
Coolero监测和控制冷却设备的开源应用
======
> 正在寻找一个 GUI 程序来管理 Linux 上的 AIO 和其他冷却设备么?让我们来了解一下 Coolero以获得一些帮助。
![](https://img.linux.net.cn/data/attachment/album/202203/12/092109g9stmnmmmnootown.jpg)
说到 Linux我们无法从 NZXT、Corsair、MSI、ASUS 等品牌那里获得官方软件支持来管理 PC 上的硬件组件。
虽然有开源的驱动/工具可以使事情顺利进行但在具有图形用户界面GUI的程序中它仍然是一项正在进行的工作。例如[配置游戏鼠标][1] 或 [在 Linux 上设置 Razer 设备][1]。
幸运的是,这些年来情况有所改善,现在可以在 Linux 上管理/调整各种最新的外围设备和组件。
其中一个改进就是有了一个开源的 GUI 程序来管理和监控冷却设备,即 Coolero。
**注意:** 该程序正在积极开发中,并慢慢向其第一个主要版本发展。
### Coolero轻松地管理你的水冷
![][2]
当我去年升级我的电脑时,我对我的 AIOAll-in-One水冷Corsair Hydro 100i Pro XT缺乏软件支持感到恼火。
这不仅仅是控制 RGB 灯光(为了美观),而且我找不到一个方便的方法(使用 GUI 程序)来平衡风扇配置。
现在,有了 [Coolero][3] 就可以做到了。Coolero 是一个使用 [liquidctl][4] 和其他一些库来控制冷却设备的前端,主要包括 AIO、风扇集线器/控制器,还有 PSU 和一些 RGB 照明支持。
它支持一系列的水冷和一些 PSU。你可以在其 GitLab 页面上获得所有支持设备的细节。请注意,对一些冷却器的支持仍然是试验性的,而且你还不能让你的 Kraken Z 上的 LCD 屏幕与它一起工作。
让我强调一下主要的特点。
### Coolero 的特点
![][5]
现在有无数的冷却设备。但是Coolero 支持一些流行的选项和它的变体来控制基本功能:
* 系统概览图
* CPU 温度/负载
* GPU 温度/负载
* 支持多个设备,以及同一设备的多个版本。
* 能够使用该图表定制风扇配置文件。
* 提供了几个预设的风扇配置文件。
* 能够调整 RGB 照明配置文件。
* 保存配置文件并在启动时应用它。
用户界面简单易懂,易于使用。你可以与图表互动以启用/禁用对特定组件的监控。
你所连接的 AIO 或控制器应该作为单独的组件出现在界面上,使你很容易控制它们。
![][6]
你会有两种类型的功能,控制风扇和灯光(如果有的话)。我使用风扇图表来定制我的 AIO 上的风扇配置文件。
根据我的简单测试,它与 Corsair AIO 工作很好。你可以用它来尝试 NZXT 冷却器、PSU、控制器和智能设备或集线器
### 在 Linux 中安装 Coolero
Coolero 以 AppImage、Flatpak通过 [Flathub][7])的形式提供,或者你可以从源代码中构建它。
如果你是 Linux 的新手,你可能想参考我们的 [AppImage 指南][8] 和 [Flatpak 帮助资源][9]。
要探索更多关于它的信息,请前往下面链接的 GitLab 页面。
- [Coolero][3]
### 总结
如果你有 AIO、集线器和控制器需要按照你的要求进行调整那么 Coolero 是一个令人兴奋的项目,值得关注。
虽然你可以尝试使用一些命令行工具,但这并不是实现你的 PC 中的组件的基本控制的最方便的方法。
你试过了吗?你用什么来管理你的 Linux 系统上的 AIO 或冷却器?请在下面的评论中告诉我你的想法。
--------------------------------------------------------------------------------
via: https://itsfoss.com/coolero/
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://itsfoss.com/set-up-razer-devices-linux/
[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/coolero-ui-home.png?resize=800%2C468&ssl=1
[3]: https://gitlab.com/codifryed/coolero
[4]: https://github.com/liquidctl/liquidctl
[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/coolero-fan-settings.png?resize=800%2C443&ssl=1
[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/coolero-fan.png?resize=800%2C443&ssl=1
[7]: https://flathub.org/apps/details/org.coolero.Coolero
[8]: https://itsfoss.com/appimagepool/
[9]: https://itsfoss.com/flatpak-guide/

View File

@ -0,0 +1,113 @@
[#]: subject: "Changing Linux System Language (Locales) From Command Line on Ubuntu and Debian Based Distros"
[#]: via: "https://itsfoss.com/change-locales-linux/"
[#]: author: "Marco Carmona https://itsfoss.com/author/marco/"
[#]: collector: "lujun9972"
[#]: translator: "geekpi"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14355-1.html"
在 Ubuntu 上通过命令行改变 Linux 系统语言
======
![](https://img.linux.net.cn/data/attachment/album/202203/13/223937s17qtqz931grud89.jpg)
> 这是一个快速教程,展示了在 Ubuntu 和其他 Linux 发行版上从命令行改变语言的步骤。
事实上,我一直在写西班牙语的文章。如果你没有访问过它并且/或你是一个讲西班牙语的人,请访问 [It's FOSS en Español][1] 并查看所有西班牙语的 Linux 内容。
你可能想知道我为什么要和你分享这件事,这是因为这篇文章以这个新页面为例。
在新安装 [你喜欢的 Linux 发行版][2] 时,系统会要求你选择一种主语言。有些人,比如说我,后来会考虑把这个语言改成新的,尽管这并不频繁。
你看,我必须同时用西班牙语和英语进行截屏。这就成了一个问题,因为我只有一台电脑,而更换用户对我来说不是一个快速的解决方案。
这就是为什么我想和你分享这个快速技巧,我将告诉你如何在终端中用两行简单的文字改变你的主系统语言。
让我们开始吧!
### 从终端改变 Linux 系统语言
假设你想把你的主语言从英语改为西班牙语。
确认你将哪种语言设置为默认语言(主语言)。为此,让我们使用 `locale` 命令。
```
locale
```
你应该看到像这样的东西:
```
team@itsfoss:~$ locale
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
```
在这里你可以看到主语言是英语。现在要改变它,请按以下方式使用 `dpkg` 命令:
```
sudo dpkg-reconfigure locales
```
当你运行之前的命令,你应该在终端看到下面的页面:
![sudo dpkg reconfigure locales][3]
在这里,你应该**使用向上和向下的箭头移动**直到你到达所需的语言。在我的例子中,我想要西班牙语,更具体地说,是墨西哥西班牙语,因为我是墨西哥人。
不是所有的语言都有这个选项,但如果你的语言有,请选择 [UTF-8][4]。
找到你的语言后,**按空格键来标记**,然后**回车**。
![Selecting your language][5]
最后,在最后一个窗口中,通过使用箭头键移动到该语言并按下**回车键**,选择该新语言作为你的默认语言。
![Setting new language as default][6]
完成后,你应该在你的终端看到这样的信息:
```
Generating locales (this might take a while)...
en_US.UTF-8... done
es_MX.UTF-8... done
Generation complete.
```
这就完成了!现在你能够直接从终端改变你的默认语言,次数不限。
如果你对这个话题有任何疑问,请在评论区告诉我们。
--------------------------------------------------------------------------------
via: https://itsfoss.com/change-locales-linux/
作者:[Marco Carmona][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/marco/
[b]: https://github.com/lujun9972
[1]: https://es.itsfoss.com/
[2]: https://itsfoss.com/best-linux-beginners/
[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/sudo_dpkg-reconfigure_locales.png?resize=1090%2C690&ssl=1
[4]: https://en.wikipedia.org/wiki/UTF-8
[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/Selecting_your_language.png?resize=800%2C506&ssl=1
[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/Setting_new_language_as_default-1.png?resize=800%2C506&ssl=1

View File

@ -0,0 +1,73 @@
[#]: subject: "Good News! Apex Legends Now Officially Works on Steam Deck and Linux"
[#]: via: "https://news.itsfoss.com/apex-legends-steam-deck-verified/"
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
[#]: collector: "lujun9972"
[#]: translator: "wxy"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14347-1.html"
《Apex 英雄》正式可在 Steam Deck 和 Linux 上运行
======
> 《Apex 英雄》现已通过 Steam Deck 验证,这使其成为支持 Linux 的顶级多人游戏之一。
![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/apex-legends-steam-verified.png?w=1200&ssl=1)
<ruby>Apex 英雄<rt>Apex Legends</rt></ruby>》是最受欢迎的多人游戏之一,我们都在急切地等待它能在 Linux 上运行。
特别是,在它 [宣布正式支持 Linux 的 Easy Anti-Cheat 和 BattleEye][1] 之后。
然而,官方一直并没有宣布支持该游戏,直到刚刚。
它似乎已经被添加到 Valve 的 Steam Deck 验证游戏列表中,这事最初是由 [GamingOnLinux][2] 发现的。
你可以在 [官方 Steam Deck 验证页][3] 上自己检查,或者通过 [SteamDB][4] 发现这一变化。
### 在 Linux 上玩《Apex 英雄》已成为现实
![][5]
随着 Steam Deck 的验证状态,可以说我们现在有了在 Linux 上运行的顶级多人射击游戏之一。
如果你不知道的话《Apex 英雄》目前是 Steam 上排名前十的游戏之一,它在 PC 上有大量的玩家。
![][6]
因此,如果你因为缺乏多人游戏支持而不愿意在桌面上尝试 Linux现在你可以考虑了。
如果你仍然犹豫,你或许可以看看我 [推荐用 Linux 玩游戏][7] 的观点以了解更多信息Linux 的多人游戏和反作弊支持已经有所改善,但文章的大部分内容仍然有效!)。
而且,如果你已经有一个 Steam Deck 游戏机,你现在就可以安装这个游戏并玩起来了。
注意,如果你是在 Linux 桌面上尝试,你可能要在 Steam 上启用 Proton 支持,并选择“<ruby>实验性 Proton 支持<rt>Proton Experimental</rt></ruby>”。
当然,还有许多其他游戏,如《<ruby>彩虹六号:围攻<rt>Rainbow Six Siege</rt></ruby>》,也应该支持 Steam Deck 或一般的 Linux 系统。现在有了 Linux 上的《Apex 英雄》,其他的多人游戏作品可能会重新考虑为 Steam Deck 或 Proton 测试他们的游戏。
这里有一段 Liam Dawe 的视频,展示了运行在 Steam Deck 上的《Apex 英雄》:
[![][8]](https://youtu.be/roK0SUhP9Ro)
你试过在 Linux 桌面或 Steam Deck 上运行《Apex 英雄》吗?请在下面的评论中告诉我你的看法。
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/apex-legends-steam-deck-verified/
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[wxy](https://github.com/wxy)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://news.itsfoss.com/easy-anti-cheat-linux/
[2]: https://www.gamingonlinux.com/2022/03/apex-legends-gets-steam-deck-verified/
[3]: https://www.steamdeck.com/en/verified
[4]: https://steamdb.info/app/1172470/history/?changeid=14171059
[5]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/steam-deck-verified-apex-legends.jpg?w=1321&ssl=1
[6]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/steam-top-games.png?w=1022&ssl=1
[7]: https://news.itsfoss.com/linux-for-gaming-opinion/
[8]: https://i0.wp.com/i.ytimg.com/vi/roK0SUhP9Ro/hqdefault.jpg?w=780&ssl=1

View File

@ -0,0 +1,143 @@
[#]: subject: "Nitrux 2.0 Review: Stunning Distro with a Few Rough Edges"
[#]: via: "https://www.debugpoint.com/2022/03/nitrux-2-0-review/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lujun9972"
[#]: translator: "wxy"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14344-1.html"
Nitrux 2.0:令人惊艳的发行版
======
> 以下是对 Nitrux 2.0 在性能稳定性方面的点评,以及我们对是否可以将其用作日常使用的看法。
![](https://img.linux.net.cn/data/attachment/album/202203/10/114302tr0a27l77t2plp4p.jpg)
[Nitrux Linux][2] 是基于 Debian 的,其特点是采用了修改版的 KDE Plasma 桌面,它被称为 NX 桌面。这个独特的 Linux 发行版带来了它自己的一套 Nitrux 应用程序,它们建立在 Maui 套件和 Qt 上。Nitrux 是没有 systemd 的,它使用 OpenRC 作为初始化系统。凭借所有这些独特的功能和令人惊叹的外观,它是当今最好的 Linux 发行版之一。
Nitrux 团队在 2022 年 2 月发布了它的主要版本 2.0,最近又发布了第一个小版本。因此,我们觉得现在是对这个漂亮的桌面进行评价的好时机。
![Nitrux 2.0 应用程序视图][3]
### Nitrux 2.0 点评
#### 安装
Nitrux 使用了一个修改版的 Calamares 安装程序。该操作系统的 ISO 包含<ruby>临场<rt>live</rt></ruby>桌面,在此你可以访问安装操作系统的快捷方式。启动选项包括更多的选项,包括 `nomodset` 内核启动选项。
在虚拟机测试中,安装很顺利,但在实际的硬件中却失败了,因为我的 NVIDIA 340 有点老。因此,如果你打算安装较新的硬件,应该没有问题。
#### 第一印象和桌面
在外观方面Nitrux 可以说是与当今所有外观优秀的发行版不相上下比如深度、Cutefish OS。它们都为用户和 Nitrux 操作系统带来了开箱即用的定制功能。但 Nitrux 的优势在于 KDE Plasma、Plasmoid、Kvuntum 主题与基于 Maui 套件组件的奇妙组合。
当你第一眼看到它的时候,它看起来很好,而且有良好的组织性,底部预配置了 Latte Dock、友好而干净的顶部栏。
它基于 KDE Plasma你可以轻松地改变外观和感觉并通过设置在深色和浅色模式之间切换。默认字体 Fire Sans 使它成为一个整体设计完美的桌面。
这个版本采用了 KDE Plasma 5.24+KDE 框架 5.91 和 xanmod 版的 Linux 内核 5.16。
到目前为止,我的第一印象没有任何槽点。
#### 登录和 Shell
不久前,该团队 [引入][4] 了 Maui Shell这是一个以 Cask 为特色的融合性桌面,即 Shell 层。这是这个体验式 Shell 的第一个版本,用户通过登录窗口就可以看到。
但唯一困扰我的是Cask仍然是实验性的被定为默认登录会话。那些知道的人会把它改成 Plasma但那些不知道的人会有些吃惊
![使用 Cask 的登录会话][5]
#### 应用程序
Nitrux 使用 AppImage 格式来发布应用程序。大多数预装的应用程序都是 AppImage。而且在通知方面它们与整个桌面很好地结合在一起。Nitrux 也会检测你的下载文件夹中外部下载的 AppImage 进行安装。
默认情况下,它预装了以下本地 [Maui 应用程序][6]
* Index 文件管理器
* Station 终端
* Pix 图像浏览器
* Nota 文本编辑器
* Nitro 分享
* NX 软件中心
Firefox 和 LibreOffice 也预装了,以满足基本需求。你可以根据你的工作流程需要,通过 NX 软件中心安装其他应用程序。
关于 Firefox 和更新 Nitrux 的一点提醒。有一些报告说 Firefox 在进行基本系统更新后被删除。在你点击升级之前,请确保你通过终端用 `apt get —upgradable` 检查文件的变化。
#### 性能和资源消耗
因为我无法把它安装在我的物理机上。因此,下面提到的性能指标是在 [virt-manager][8] 虚拟管理器下测量的。
在空闲状态下,它使用大约 1GB 的内存CPU 在 9% 到 10%。KWin 窗口管理器和 Latte Dock 在底部消耗了大部分的资源。
![Nitrux 2.0 系统在空闲状态下的性能][9]
现在是时候通过一些繁重的工作负载来运行它了。这包括一个文本编辑器、LibreOffice、文件管理器、图像查看器和 Firefox 的五个标签,其中一个标签正在播放一个 YouTube 视频。
你可以在下面的图片中看到资源使用的峰值。在这种状态下,它使用了接近 2GB 的内存CPU 为 26%。和往常一样Firefox 浏览器消耗了大部分资源。
![Nitrux 2.0 系统在繁重工作状态下的性能][10]
我想说的是从性能上来说它的表现还算可以。因为开箱即用的定制版Latte Dock 和 Kvuntum 主题确实占用了一些资源。而这个指标在空闲和重载状态下要高于基本的 KDE Plasma。
#### 一些有问题的地方
不幸的是在我的测试过程中Nitrux 2.0 有几个小问题:
* 在我的 i3+SSD+4gb+NVIDIA+Broadcom 的旧系统中尝试安装了一个小时后 - 我无法让 Calamares 安装程序开始安装。
* 在<ruby>临场<rt>live</rt></ruby>会话中没有检测到 Wi-Fi。然而到目前为止我在这个设备上测试的所有发行版都能检测到它。
* KWin 在临场会话开始时崩溃了。
* 由于网络连接的原因Calamares 安装程序的“下一步”按钮被禁用。这对我来说有点奇怪。
* 而最小的安装 ISO 也给出了 [plymouth failed to start #17][11] 的错误。
然后我在 [这里][12] 找到了已知问题部分,其中提到了一些问题。我确信这与 xanmod 版的 Linux 内核 5.16 有关。主线内核本来是没有问题的。
在虚拟机环境中,实验性的 Maui Shell 是不能使用的。点击和触摸操作大多不工作。但考虑到这是一个测试版本,这是可以理解的。
我觉得 Calamares 安装程序的错误需要在下一个版本之前进行更多的测试。
### 下载 Nitrux 2.0 +
你可以从以下链接下载最新版本:
- [下载 Nitrux][13]
### 结束语
如果你喜欢 KDE Plasma并且不想在定制上花费太多精力你可以选择 Nitrux 2.0。另外,许多用户喜欢类似于 Debian 的稳定性,而不要 systemd。那么对他们来说这是一个完美的选择。
但因为有一些错误,我不会向超小白的新用户推荐这个发行版。如果你对 Linux 有一定的了解,并且知道如何用命令行解决一些小问题,那么它就很适合你。你可以使用 Nitrux 2.0 作为你的日常系统。只是要谨慎对待 Debian 的不稳定软件包,这些软件包在更新后偶尔会出现问题。
加油!
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/2022/03/nitrux-2-0-review/
作者:[Arindam][a]
选题:[lujun9972][b]
译者:[wxy](https://github.com/wxy)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.debugpoint.com/author/admin1/
[b]: https://github.com/lujun9972
[1]: https://www.debugpoint.com/wp-content/uploads/2022/03/Nitrux-2.0-Desktop-1024x581.jpg
[2]: https://nxos.org/
[3]: https://www.debugpoint.com/wp-content/uploads/2022/03/Nitrux-2.0-Application-View-1024x580.jpg
[4]: https://www.debugpoint.com/2022/01/maui-shell-first-look-1/
[5]: https://www.debugpoint.com/wp-content/uploads/2022/03/Login-sessions-with-Cask.jpg
[6]: https://www.debugpoint.com/2022/03/top-nitrux-maui-applications/
[7]: https://www.debugpoint.com/2021/05/archcraft-os-review/
[8]: https://www.debugpoint.com/2020/11/virt-manager/
[9]: https://www.debugpoint.com/wp-content/uploads/2022/03/Nitrux-2.0-system-performance-in-idle-state.jpg
[10]: https://www.debugpoint.com/wp-content/uploads/2022/03/Nitrux-2.0-system-performance-in-heavy-workload-state.jpg
[11]: https://github.com/Nitrux/nitrux-bug-tracker/issues/17
[12]: https://nxos.org/known-issues/known-issues-nitrux-2-0-1/
[13]: https://nxos.org/download/standard/
[14]: https://t.me/debugpoint
[15]: https://twitter.com/DebugPoint
[16]: https://www.youtube.com/c/debugpoint?sub_confirmation=1
[17]: https://facebook.com/DebugPoint

View File

@ -0,0 +1,229 @@
[#]: subject: "How to use undocumented web APIs"
[#]: via: "https://jvns.ca/blog/2022/03/10/how-to-use-undocumented-web-apis/"
[#]: author: "Julia Evans https://jvns.ca/"
[#]: collector: "lujun9972"
[#]: translator: "lxbwolf"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14358-1.html"
如何调用没有文档说明的 Web API
======
![](https://img.linux.net.cn/data/attachment/album/202203/15/103119ab6yoika09og669a.jpg)
大家好!几天前我写了篇 [小型的个人程序][1] 的文章,里面提到了调用没有文档说明的“秘密” API 很有意思,你需要从你的浏览器中把 cookie 复制出来才能访问。
有些读者问如何实现,因此我打算详细描述下,其实过程很简单。我们还会谈谈在调用没有文档说明的 API 时,可能会遇到的错误和道德问题。
我们用谷歌 Hangouts 举例。我之所以选择它,并不是因为这个例子最有用(我认为官方的 API 更实用),而是因为在这个场景中更有用的网站很多是小网站,而小网站的 API 一旦被滥用,受到的伤害会更大。因此我们使用谷歌 Hangouts因为我 100% 肯定谷歌论坛可以抵御这种试探行为。
我们现在开始!
### 第一步:打开开发者工具,找一个 JSON 响应
我浏览了 <https://hangouts.google.com>,在 Firefox 的开发者工具中打开“<ruby>网络<rt>Network</rt></ruby>”标签,找到一个 JSON 响应。你也可以使用 Chrome 的开发者工具。
打开之后界面如下图:
![][2]
找到其中一条 “<ruby>类型<rt>Type</rt></ruby>” 列显示为 `json` 的请求。
为了找一条感兴趣的请求,我找了好一会儿,突然我找到一条 “people” 的端点,看起来是返回我们的联系人信息。听起来很有意思,我们来看一下。
### 第二步:复制为 cURL
下一步,我在感兴趣的请求上右键,点击 “<rt>复制<rt>Copy</rt></ruby>” -> “<ruby>复制为 cURL<rt>Copy as cURL</rt></ruby>”。
然后我把 `curl` 命令粘贴到终端并运行。下面是运行结果:
```
$ curl 'https://people-pa.clients6.google.com/v2/people/?key=REDACTED' -X POST ........ (省略了大量请求标头)
Warning: Binary output can mess up your terminal. Use "--output -" to tell
Warning: curl to output it to your terminal anyway, or consider "--output
Warning: <FILE>" to save to a file.
```
你可能会想 —— 很奇怪,“二进制的输出在你的终端上无法正常显示” 是什么错误?原因是,浏览器默认情况下发给服务器的请求头中有 `Accept-Encoding: gzip, deflate` 参数,会把输出结果进行压缩。
我们可以通过管道把输出传递给 `gunzip` 来解压,但是我们发现不带这个参数进行请求会更简单。因此我们去掉一些不相关的请求头。
### 第三步:去掉不相关的请求头
下面是我从浏览器获得的完整 `curl` 命令。有很多行!我用反斜杠(`\`)把请求分开,这样每个请求头占一行,看起来更清晰:
```
curl 'https://people-pa.clients6.google.com/v2/people/?key=REDACTED' \
-X POST \
-H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:96.0) Gecko/20100101 Firefox/96.0' \
-H 'Accept: */*' \
-H 'Accept-Language: en' \
-H 'Accept-Encoding: gzip, deflate' \
-H 'X-HTTP-Method-Override: GET' \
-H 'Authorization: SAPISIDHASH REDACTED' \
-H 'Cookie: REDACTED'
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'X-Goog-AuthUser: 0' \
-H 'Origin: https://hangouts.google.com' \
-H 'Connection: keep-alive' \
-H 'Referer: https://hangouts.google.com/' \
-H 'Sec-Fetch-Dest: empty' \
-H 'Sec-Fetch-Mode: cors' \
-H 'Sec-Fetch-Site: same-site' \
-H 'Sec-GPC: 1' \
-H 'DNT: 1' \
-H 'Pragma: no-cache' \
-H 'Cache-Control: no-cache' \
-H 'TE: trailers' \
--data-raw 'personId=101777723309&personId=1175339043204&personId=1115266537043&personId=116731406166&extensionSet.extensionNames=HANGOUTS_ADDITIONAL_DATA&extensionSet.extensionNames=HANGOUTS_OFF_NETWORK_GAIA_GET&extensionSet.extensionNames=HANGOUTS_PHONE_DATA&includedProfileStates=ADMIN_BLOCKED&includedProfileStates=DELETED&includedProfileStates=PRIVATE_PROFILE&mergedPersonSourceOptions.includeAffinity=CHAT_AUTOCOMPLETE&coreIdParams.useRealtimeNotificationExpandedAcls=true&requestMask.includeField.paths=person.email&requestMask.includeField.paths=person.gender&requestMask.includeField.paths=person.in_app_reachability&requestMask.includeField.paths=person.metadata&requestMask.includeField.paths=person.name&requestMask.includeField.paths=person.phone&requestMask.includeField.paths=person.photo&requestMask.includeField.paths=person.read_only_profile_info&requestMask.includeField.paths=person.organization&requestMask.includeField.paths=person.location&requestMask.includeField.paths=person.cover_photo&requestMask.includeContainer=PROFILE&requestMask.includeContainer=DOMAIN_PROFILE&requestMask.includeContainer=CONTACT&key=REDACTED'
```
第一眼看起来内容有很多,但是现在你不需要考虑每一行是什么意思。你只需要把不相关的行删掉就可以了。
我通常通过删掉某行查看是否有错误来验证该行是不是可以删除 —— 只要请求没有错误就一直删请求头。通常情况下,你可以删掉 `Accept*`、`Referer`、`Sec-*`、`DNT`、`User-Agent` 和缓存相关的头。
在这个例子中,我把请求删成下面的样子:
```
curl 'https://people-pa.clients6.google.com/v2/people/?key=REDACTED' \
-X POST \
-H 'Authorization: SAPISIDHASH REDACTED' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Origin: https://hangouts.google.com' \
-H 'Cookie: REDACTED'\
--data-raw 'personId=101777723309&personId=1175339043204&personId=1115266537043&personId=116731406166&extensionSet.extensionNames=HANGOUTS_ADDITIONAL_DATA&extensionSet.extensionNames=HANGOUTS_OFF_NETWORK_GAIA_GET&extensionSet.extensionNames=HANGOUTS_PHONE_DATA&includedProfileStates=ADMIN_BLOCKED&includedProfileStates=DELETED&includedProfileStates=PRIVATE_PROFILE&mergedPersonSourceOptions.includeAffinity=CHAT_AUTOCOMPLETE&coreIdParams.useRealtimeNotificationExpandedAcls=true&requestMask.includeField.paths=person.email&requestMask.includeField.paths=person.gender&requestMask.includeField.paths=person.in_app_reachability&requestMask.includeField.paths=person.metadata&requestMask.includeField.paths=person.name&requestMask.includeField.paths=person.phone&requestMask.includeField.paths=person.photo&requestMask.includeField.paths=person.read_only_profile_info&requestMask.includeField.paths=person.organization&requestMask.includeField.paths=person.location&requestMask.includeField.paths=person.cover_photo&requestMask.includeContainer=PROFILE&requestMask.includeContainer=DOMAIN_PROFILE&requestMask.includeContainer=CONTACT&key=REDACTED'
```
这样我只需要 4 个请求头:`Authorization`、`Content-Type`、`Origin` 和 `Cookie`。这样容易管理得多。
### 第四步:在 Python 中发请求
现在我们知道了我们需要哪些请求头,我们可以把 `curl` 命令翻译进 Python 程序!这部分是相当机械化的过程,目标仅仅是用 Python 发送与 cUrl 相同的数据。
下面是代码实例。我们使用 Python 的 `requests` 包实现了与前面 `curl` 命令相同的功能。我把整个长请求分解成了元组的数组,以便看起来更简洁。
```
import requests
import urllib
data = [
('personId','101777723'), # I redacted these IDs a bit too
('personId','117533904'),
('personId','111526653'),
('personId','116731406'),
('extensionSet.extensionNames','HANGOUTS_ADDITIONAL_DATA'),
('extensionSet.extensionNames','HANGOUTS_OFF_NETWORK_GAIA_GET'),
('extensionSet.extensionNames','HANGOUTS_PHONE_DATA'),
('includedProfileStates','ADMIN_BLOCKED'),
('includedProfileStates','DELETED'),
('includedProfileStates','PRIVATE_PROFILE'),
('mergedPersonSourceOptions.includeAffinity','CHAT_AUTOCOMPLETE'),
('coreIdParams.useRealtimeNotificationExpandedAcls','true'),
('requestMask.includeField.paths','person.email'),
('requestMask.includeField.paths','person.gender'),
('requestMask.includeField.paths','person.in_app_reachability'),
('requestMask.includeField.paths','person.metadata'),
('requestMask.includeField.paths','person.name'),
('requestMask.includeField.paths','person.phone'),
('requestMask.includeField.paths','person.photo'),
('requestMask.includeField.paths','person.read_only_profile_info'),
('requestMask.includeField.paths','person.organization'),
('requestMask.includeField.paths','person.location'),
('requestMask.includeField.paths','person.cover_photo'),
('requestMask.includeContainer','PROFILE'),
('requestMask.includeContainer','DOMAIN_PROFILE'),
('requestMask.includeContainer','CONTACT'),
('key','REDACTED')
]
response = requests.post('https://people-pa.clients6.google.com/v2/people/?key=REDACTED',
headers={
'X-HTTP-Method-Override': 'GET',
'Authorization': 'SAPISIDHASH REDACTED',
'Content-Type': 'application/x-www-form-urlencoded',
'Origin': 'https://hangouts.google.com',
'Cookie': 'REDACTED',
},
data=urllib.parse.urlencode(data),
)
print(response.text)
```
我执行这个程序后正常运行 —— 输出了一堆 JSON 数据!太棒了!
你会注意到有些地方我用 `REDACTED` 代替了,因为如果我把原始数据列出来你就可以用我的账号来访问谷歌论坛了,这就很不好了。
### 运行结束!
现在我可以随意修改 Python 程序,比如传入不同的参数,或解析结果等。
我不打算用它来做其他有意思的事了,因为我压根对这个 API 没兴趣,我只是用它来阐述请求 API 的过程。
但是你确实可以对返回的一堆 JSON 做一些处理。
### curlconverter 看起来很强大
有人评论说可以使用 <https://curlconverter.com/> 自动把 curl 转换成 Python和一些其他的语言这看起来很神奇 —— 我都是手动转的。我在这个例子里使用了它,看起来一切正常。
### 追踪 API 的处理过程并不容易
我不打算夸大追踪 API 处理过程的难度 —— API 的处理过程并不明显!我也不知道传给这个谷歌论坛 API 的一堆参数都是做什么的!
但是有一些参数看起来很直观,比如 `requestMask.includeField.paths=person.email` 可能表示“包含每个人的邮件地址”。因此我只关心我能看懂的参数,不关心看不懂的。
### (理论上)适用于所有场景
可能有人质疑 —— 这个方法适用于所有场景吗?
答案是肯定的 —— 浏览器不是魔法!浏览器发送给你的服务器的所有信息都是 HTTP 请求。因此如果我复制了浏览器发送的所有的 HTTP 请求头,那么后端就会认为请求是从我的浏览器发出的,而不是用 Python 程序发出的。
当然,我们去掉了一些浏览器发送的请求头,因此理论上后端是可以识别出来请求是从浏览器还是 Python 程序发出的,但是它们通常不会检查。
这里有一些对读者的告诫 —— 一些谷歌服务的后端会通过令人难以理解(对我来说是)方式跟前端通信,因此即使理论上你可以模拟前端的请求,但实际上可能行不通。可能会遭受更多攻击的大型 API 会有更多的保护措施。
我们已经知道了如何调用没有文档说明的 API。现在我们再来聊聊可能遇到的问题。
### 问题 1会话 cookie 过期
一个大问题是我用我的谷歌会话 cookie 作为身份认证,因此当我的浏览器会话过期后,这个脚本就不能用了。
这意味着这种方式不能长久使用(我宁愿调一个真正的 API但是如果我只是要一次性快速抓取一小组数据那么可以使用它。
### 问题 2滥用
如果我正在请求一个小网站,那么我的 Python 脚本可能会把服务打垮,因为请求数超出了它们的处理能力。因此我请求时尽量谨慎,尽量不过快地发送大量请求。
这尤其重要,因为没有官方 API 的网站往往是些小网站且没有足够的资源。
很明显在这个例子中这不是问题 —— 我认为在写这篇文章的过程我一共向谷歌论坛的后端发送了 20 次请求,他们肯定可以处理。
如果你用自己的账号身份过度访问这个 API 并导致了故障,那么你的账号可能会被暂时封禁(情理之中)。
我只下载我自己的数据或公共的数据 —— 我的目的不是寻找网站的弱点。
### 请记住所有人都可以访问你没有文档说明的 API
我认为本文最重要的信息并不是如何使用其他人没有文档说明的 API。虽然很有趣但是也有一些限制而且我也不会经常这么做。
更重要的一点是,任何人都可以这么访问你后端的 API每个人都有开发者工具和网络标签查看你传到后端的参数、修改它们都很容易。
因此如果一个人通过修改某些参数来获取其他用户的信息,这不值得提倡。我认为提供公开 API 的大部分开发者们都知道,但是我之所以再提一次,是因为每个初学者都应该了解。: )
--------------------------------------------------------------------------------
via: https://jvns.ca/blog/2022/03/10/how-to-use-undocumented-web-apis/
作者:[Julia Evans][a]
选题:[lujun9972][b]
译者:[lxbwolf](https://github.com/lxbwolf)
校对:[wxy
](https://github.com/wxy
)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://jvns.ca/
[b]: https://github.com/lujun9972
[1]: https://jvns.ca/blog/2022/03/08/tiny-programs/
[2]: https://jvns.ca/images/network-tab.png

View File

@ -0,0 +1,120 @@
[#]: subject: "KDE Plasma 5.24 Review. A Crafted Desktop to Dominate the Linux World"
[#]: via: "https://www.debugpoint.com/2022/03/kde-plasma-5-24-review/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lujun9972"
[#]: translator: "wxy"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14352-1.html"
KDE Plasma 5.24:精心制作的主宰 Linux 世界的桌面
======
> 是时候对前段时间发布的 KDE Plasma 5.24 桌面进行一次简单的回顾和点评了。
KDE 团队用他们完美的 KDE Plasma 5.24 再次做到了。一个在效率、新功能、性能、稳定性和一切方面都非常完美的版本为所有用户带来了一个优秀的桌面环境。
KDE Plasma 5.24 是 Plasma 的第 26 个版本也是长期支持LTS版本它将为 Kubuntu 22.04 LTS Jammy Jellyfish 添彩。这意味着你、我和全世界成千上万的用户将使用这个版本两年或更长的时间。你可以想象这个版本是多么重要。
不多说了,让我们去快速点评一下 KDE Plasma 5.24。
![KDE Plasma 5.24 桌面](https://img.linux.net.cn/data/attachment/album/202203/12/202450k5x811c83661w3ix.jpg)
### KDE Plasma 5.24 点评
#### 安装
我在 Fedora 上使用 [KDE Plasma 5.24][2] 已经有一段时间了。这次是直接从 [KDE Plasma 5.23][3] 升级而来。在升级过程中,一切都很顺利。所有的用户配置的设置都保持不变,只有默认的壁纸在升级后被改变了。所以,数据或启动加载出现问题是几乎不可能的。
我在一个实体系统中安装了 KDE Plasma 5.24 和 KDE Neon 用户版以进一步测试。在一个 4GB 内存的英特尔 i3 系统中,安装很顺利,大约花了 8 分钟。
这个测试系统上还有另一个操作系统,所以安装程序完美地检测到了所有的操作系统并正确地更新了 GRUB。
#### 新功能、外观和可用性
Plasma 5.24 看起来很震撼。第一次启动后呈现出一个干净的桌面,具有经典的外观和极其漂亮的壁纸。默认的 Breeze Light 主题加上新的边框和装饰,对每个用户来说几乎是完美的。如果你很好奇,想给你的 Plasma 换一个不同的外观,那么所有的设置,如重点颜色之类的都在那里。你不需要通过什么秘籍或命令行来改变外观。
新设计的概览屏幕给你一种 GNOME 的氛围,但在 KDE 环境下,当你设置好它时,它就会变得非常棒。
![KDE Plasma 概览效果][4]
在我的测试中我尝试了蓝牙、Wi-Fi 和打印(安装 HPLIP 后)—— 都很顺利。没有磕磕绊绊也不需要命令行一切都开箱即用。KDE Plasma 的通知区应该可以让你访问所有必要的选项,你很少需要访问系统设置对话框。
![蓝牙设置很简单][5]
电池使用情况尚可,我认为在我的测试硬件上,自 Plasma 5.23 以来电池使用情况略有改善。我把测试机保持在待机状态Plasma 很轻松就唤醒了,没有任何问题。我知道有些 Linux 发行版在睡眠后无法唤醒,导致你得在 TTY 里重启或启动 X 会话。
#### 稳定性和性能
不管你是一个 Plasma 的新用户还是长期用户Plasma 5.24 都会让你有宾至如归的感觉;一切都准备好了,没有错误,等待你的行动和工作流程。
在我的测试期间中,我没有遇到任何错误。因此,我 [快速翻阅][7] 了 KDE 官方论坛,看看在发布后的一个月内报告了多少种问题以及有多少问题。不多,实际上只有寥寥两位数。而且报告的问题大多与高端显示器和网络有关,我觉得这与特定的专业硬件有关。
但总的来说,如今它是一个构建良好且经过测试的桌面。
在过去的几个版本中KDE Plasma 在任何硬件上的性能都是完美的。而这个版本也证明了这一点。
在空闲阶段KDE Plasma 5.24 消耗了 614MB 的内存CPU 使用率为 2%。
![KDE Plasma 5.24 在闲置模式下的性能][8]
我通过 Firefox 运行了五个标签,并播放了 Youtube。同时用一个文件管理器、文本编辑器、图片浏览器、系统设置和“发现”包管理器的实例来测试重载下的性能。这个用例使用了 1.29GB 的内存,而 CPU 平均在 6% 到 7%。
显然Firefox 消耗了大部分的系统资源。
![KDE Plasma 5.24 在重度工作负载模式下][9]
我必须说,这是一个了不起的性能指标。
所以,有了这个版本,就有了一个完美的 Plasma 桌面。
#### 如何获得 KDE Plasma 5.24
KDE Plasma 5.24 现在可以在 KDE Neon 用户版,和通过 Backports PPA 在 Fedora 35 和 Kubuntu 21.10 上使用。如果你想重新安装,你可以从 [这里][10] 下载它。
如果你使用的是 Fedora 35 和 Kubuntu 21.10,请按照这些指南来获得这个版本。
- [在 Fedora 上升级 Plasma][11]
- [如何在 Kubuntu 21.10 中安装 KDE Plasma 5.24][12]
### 结束语
我为我们的网站点评测试过许多 Linux 发行版和桌面环境。没有哪个能在各个方面接近 KDE Plasma。我知道 GNOME 设计得很好而且还有其他的小亮点但是当你需要一个省心的系统而且几乎所有的自定义选项都开箱即用时KDE Plasma 几十年来一直是赢家。
有的时候,为了让系统能在短时间内运行起来而无需太多折腾,我只有安装 KDE Plasma 才行。因为到最后,它肯定能工作,所有的选项都可以供你使用。
我认为运行 KDE Plasma 的 Kubuntu/Fedora 和 Linux Mint 是当今世界上最好的几个发行版,毫无疑问。
作为对本篇 KDE Plasma 5.24 点评的总结我必须得承认KDE Plasma 5.24 LTS 是该团队的一个本垒打。我们很高兴 KDE 的存在,并将在未来的日子里占据主导地位。
加油!
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/2022/03/kde-plasma-5-24-review/
作者:[Arindam][a]
选题:[lujun9972][b]
译者:[wxy](https://github.com/wxy)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.debugpoint.com/author/admin1/
[b]: https://github.com/lujun9972
[1]: https://www.debugpoint.com/wp-content/uploads/2022/02/KDE-Plasma-5.4-Desktop-1024x576.jpg
[2]: https://www.debugpoint.com/2022/01/kde-plasma-5-24/
[3]: https://www.debugpoint.com/2021/08/kde-plasma-5-23/
[4]: https://www.debugpoint.com/wp-content/uploads/2021/11/KDE-Plasma-Overview-Effect-1-1024x434.jpg
[5]: https://www.debugpoint.com/wp-content/uploads/2022/03/Easy-Bluetooth-Setup.jpg
[6]: https://www.debugpoint.com/2021/05/archcraft-os-review/
[7]: https://forum.kde.org/search.php?keywords=5.24&terms=all&author=&tags=&sv=0&sc=1&sf=all&sr=posts&sk=t&sd=d&st=30&ch=300&t=0&submit=Search
[8]: https://www.debugpoint.com/wp-content/uploads/2022/03/KDE-Plasma-5.24-Performance-in-Idle-Mode.jpg
[9]: https://www.debugpoint.com/wp-content/uploads/2022/03/KDE-Plasma-5.24-in-Heavy-Workload-Mode.jpg
[10]: https://neon.kde.org/download
[11]: https://www.debugpoint.com/2022/02/upgrade-kde-plasma-5-24/
[12]: https://www.debugpoint.com/wp-admin/post.php?post=9018&action=edit
[13]: https://t.me/debugpoint
[14]: https://twitter.com/DebugPoint
[15]: https://www.youtube.com/c/debugpoint?sub_confirmation=1
[16]: https://facebook.com/DebugPoint

View File

@ -0,0 +1,71 @@
[#]: subject: "Zorin OS 16.1 Brings Much Needed Stability and Improvements"
[#]: via: "https://www.debugpoint.com/2022/03/zorin-os-16-1-release/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lujun9972"
[#]: translator: "geekpi"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14365-1.html"
Zorin OS 16.1 带来了急需的稳定性和改进措施
======
> Zorin OS 16.1 带来了安全补丁、新软件,团队的目标是打造更好的发行版。
Zorin OS 之所以受欢迎,是因为它为 Windows 用户的 Linux 之旅提供了一个完美的起点。由于其简单的设计、优雅的软件包选择和开箱即用的 Windows 外观,它是当今所有用户欢迎和追捧的 Linux 发行版之一。
自 [Zorin OS 16][1] 以来,经过近两个月的时间,这第一个小版本现在可以供已经在运行 16.0 版本的用户下载和升级了。
![Zorin OS 16.1 Desktop][2]
### Zorin OS 16.1 - 新内容
Zorin OS 16.1 为你的系统带来了最新安全补丁,包括 LibreOffice 7.3 办公套件和一些更新的软件包。
如果你刚买了一台新的笔记本电脑或安装了一个新的游戏工作站Zorin OS 16.1 还支持索尼的 PlayStation 5 Dual Sense 游戏控制器和苹果的魔术鼠标 2。此外你还得到了对英特尔第 12 代处理器和英伟达 RTX 3050 显卡的出色支持。
此外由于最新的软件包Zorin 开发人员承诺对汽车 Wi-Fi 和打印机有更好的支持。
下面是这个小版本的更新包和应用的快速总结。
* 基于 Ubuntu 20.04.3 LTS
* Zorin 桌面,基于 GNOME 3.38.4
* LibreOffice 7.3
* Firefox 98
* Linux Kernel 5.13
* GIMP 2.10.18
* Evolution 邮件客户端
如果你想深入了解这些变化,完整的细节可以在[这里][3]找到。
那么,在哪里下载?
### 下载
在你点击下载之前,你应该知道它有一个“专业”版本,带有额外的主题和开箱即用的设置,价值 39 美元,而“核心”版本是完全免费下载的。你可以在下载页面阅读“专业版”和“核心版”的比较。
在我看来,核心版应该足够了,如果你有足够的经验,你可以改变设置,使其成为专业版。因此,我们推荐核心版用于一般用途。
- [下载 Zorin OS 16.1][5]
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/2022/03/zorin-os-16-1-release/
作者:[Arindam][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.debugpoint.com/author/admin1/
[b]: https://github.com/lujun9972
[1]: https://www.debugpoint.com/2021/12/zorin-os-16-lite-review-xfce/
[2]: https://www.debugpoint.com/wp-content/uploads/2022/03/Zorin-OS-16.1-Desktop-1024x575.jpg
[3]: https://blog.zorin.com/2022/03/10/zorin-os-16-1-released-support-for-ukraine/
[5]: https://zorin.com/os/download/
[6]: https://t.me/debugpoint
[7]: https://twitter.com/DebugPoint
[8]: https://www.youtube.com/c/debugpoint?sub_confirmation=1
[9]: https://facebook.com/DebugPoint

View File

@ -0,0 +1,83 @@
[#]: subject: "Ubuntu has a Weird Looking New Logo"
[#]: via: "https://news.itsfoss.com/ubuntu-new-logo/"
[#]: author: "Abhishek https://news.itsfoss.com/author/root/"
[#]: collector: "lujun9972"
[#]: translator: "lkxed"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14370-1.html"
Ubuntu 有了一个“怪怪的”新标志
======
> Ubuntu 已经重新设计了它的标志。不是每个人都会喜欢它。
![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/ubuntu-unveils-new-logo.png?w=1200&ssl=1)
Ubuntu 的标志包含了多个元素。对粉丝来说,橙色和紫色是 Ubuntu 的特征。
除此之外Ubuntu 的标志上还写有 “ubuntu” 的字样,以及一个橙色的图案。
![Ubuntus old logo][1]
这个橙色的“<ruby>朋友圈<rt>circle of friends</rt></ruby>”图案是 Ubuntu 的身份标识,它象征着:自由、协作、精确和可靠。
这个图案实际上是三个朋友或团队成员“搭在一起”的一个俯视图。你可能在体育运动中见到过这样的画面。
![Image courtesy: Unsplash][2]
### Ubuntu 有了一个全新的标志
但这个图案正在发生变化。[OMG! Ubuntu][3] 报道说Canonical 重新设计了标志的元素、文字和这个“朋友圈”的图案。
在旧的标志中,“朋友圈”图案在粗体 “ubuntu” 文字的右上角。
新的标志改变了这一点。“朋友圈”图案经过重新设计看起来更平滑而且被放置在一个橙色的矩形里。文字也有变化现在使用了更细的字体。“Ubuntu” 中的 “U” 现在是大写的了。
有趣的是,新标志不再包含注册商标符号 “®” 了。
![][4]
Ubuntu 在官方博文中提到了关于新设计的 [这些变化][5]
> 虽然(在设计上)和之前的朋友圈图案保持相对延续性很重要,但是更新后的版本更精简、更专注、更成熟。现在他们的头部在圆圈里,彼此面对,连接也更加直接,这看起来更合理一些。
你可以在这个视频中看到新标志的动画:
[![][6]](https://img.linux.net.cn/static/video/Ubuntu%20new%20logo%20animation-9DHUyz54flA.mp4)
这个新标志将会出现在 Ubuntu 22.04 发行版中。
### 这不是首次重新设计标志
这并不是 Ubuntu 第一次重新设计它的标志。早在 Ubuntu 项目于 2004 年初创时,“朋友圈”图案有三种颜色:黄色、红色和橙色。在 2010 年的时候,它被重新设计,“搭在一起的人” 变成了白色,他们被一个橙色的圆圈围绕着。
![Image courtesy: OMG! Ubuntu][7]
### 你喜欢这个新标志吗?
这次的新设计距离上一次已经过了 13 年。这个新“朋友圈”图案看起来还不错,但我还是觉得这个矩形背景有点怪怪的。
你怎么看?你喜欢 Ubuntu 的新标志吗,还是说更喜欢以前的那个呢?请在下方评论区分享你的观点吧!
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/ubuntu-new-logo/
作者:[Abhishek][a]
选题:[lujun9972][b]
译者:[lkxed](https://github.com/lkxed)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/root/
[b]: https://github.com/lujun9972
[1]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/ubuntu-old-logo.png?w=1294&ssl=1
[2]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/huddle.jpg?w=800&ssl=1
[3]: https://www.omgubuntu.co.uk/2022/03/ubuntu-has-a-brand-new-logo
[4]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/new-ubuntu-logo.png?w=780&ssl=1
[5]: https://ubuntu.com/blog/a-new-look-for-the-circle-of-friends
[6]: https://i0.wp.com/i.ytimg.com/vi/9DHUyz54flA/hqdefault.jpg?w=780&ssl=1
[6a]: https://youtu.be/9DHUyz54flA
[7]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/ubuntu-logo-comparison.jpg?w=1200&ssl=1

View File

@ -0,0 +1,103 @@
[#]: subject: "Rocket.Chat and Nextcloud Team up to Offer a Powerful Open-Source Alternative to Office 365, Slack, and Others"
[#]: via: "https://news.itsfoss.com/rocket-chat-nextcloud-collaboration/"
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Rocket.Chat and Nextcloud Team up to Offer a Powerful Open-Source Alternative to Office 365, Slack, and Others
======
**Warning**: Trying to access array offset on value of type null in **/srv/users/itsfoss/apps/newitsfoss/public/wp-includes/class-wp-block-supports.php** on line **94**
**Warning**: Trying to access array offset on value of type null in **/srv/users/itsfoss/apps/newitsfoss/public/wp-includes/class-wp-block-supports.php** on line **96**
Rocket.Chat is one of the [best open-source slack alternatives][1] and Nextcloud is an all-in-one collaboration platform.
And, they are pretty impressive.
This is why we use [Rocket.Chat][2] for our internal communication and [Nextcloud][3] to manage tasks/documents. Both of them are incredibly useful for what they are capable of.
And, now, it looks like Rocket.Chat and Nextcloud are taking things up a notch by developing a native API integration.
But, what would it do? Let us find out.
### Partnering to Provide a More Powerful Open-Source Platform
![][4]
The primary objective of joining forces is to integrate their existing technologies, offering the best of both worlds.
As far as I am aware, we do not have a full-fledged open-source alternative to Microsoft 365.
Of course, you can combine various open-source technologies and choose to use them as a replacement for Microsoft 365.
But do we want an open-source solution that can replace Microsoft 365 minus the hassles?
**Yes.**
Thats what makes Rocket.Chats collaboration with Nextcloud exciting.
Nextclouds CEO shared his thoughts on this collaboration in the [press release][5]:
> _In a post-pandemic world, solutions like Office 365, Dropbox, and Slack will become more popular. This means that all of our data, communication, and digital lives will be in the hands of some big corporations without control, privacy and with this huge vendor lock-in_
**Frank Karlitschek, Founder and CEO at Nextcloud GmbH**
To add to his thoughts, Rocket.Chats CEO also mentioned the following:
> _This new interaction between Nextcloud and Rocket.Chat puts us one step closer to building the ultimate open-source alternative to MS 365, giving back privacy and data sovereignty to the users._
_Gabriel Engel, Founder, and CEO at Rocket.Chat_
So, we should expect a powerful open-source platform tailored for privacy and security-focused users, with both interesting platforms collaborating.
### New Features for Nextcloud Users
With the integration, Nextcloud customers will be able to access Rocket.Chats features to improve the effectiveness of communication and collaboration.
Some of the new features include:
* Expand collaboration capabilities using Rocket.Chats federation and bridges into Slack and Microsoft Teams.
* Easily collaborate on projects and documents using Rocket.Chats chat right in Nextcloud.
* Use a single productivity platform that integrates with other tools including Nexcloud and keeps all communications and notifications in one place.
* Leverage more advanced user governance features, access levels, and role-based permissions.
* Easily map even the most complex organizational structure into groups, teams, and discussions.
* Securely collaborate and communicate with anyone via the worlds leading social media channels such as Whatsapp, Messenger, Twitter, Instagram, Telegram, and others.
* Turn their chats into productivity tools using integrations with various HR tools, CRM solutions, ticketing systems, project management solutions, and developer tools to build powerful workflows.
* Get access to more services using [Rocket.Chats marketplace of apps][6]
* Ensure full governance of all their communications using message audits, flexible retention policies, powerful engagement analytics and dashboards, and more
* Send advanced message formatting like code snippets, formula syntax, message threads, and more
The Rocket.Chat app is now available in the [Nextcloud marketplace][7]. However, it is still a work in progress, and not ready for production yet.
You should be able to use the new features once the development completes soon enough (mostly, next month). As of now, we do not have any information on any new features being added to Rocket.Chat. Hopefully, there will be something on that with the final release.
_What are your expectations from this partnership? Do you think Rocket.Chats integration with Nextcloud can be an attractive replacement to Office 365, Slack, and Dropbox combined?_
Let me know what you think in the comments down below.
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/rocket-chat-nextcloud-collaboration/
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://itsfoss.com/open-source-slack-alternative/
[2]: https://itsfoss.com/rocket-chat/
[3]: https://itsfoss.com/nextcloud/
[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ1MiIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
[5]: https://rocket.chat/press-releases/rocket-chat-and-nextcloud
[6]: https://rocket.chat/marketplace
[7]: https://apps.nextcloud.com/apps/rocketchat_nextcloud

View File

@ -1,107 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (sthwhl)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Why everyone should try using Linux)
[#]: via: (https://opensource.com/article/21/2/try-linux)
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
Why everyone should try using Linux
======
If you're curious about Linux, the open source community makes sure it's
easy to try.
![Woman sitting in front of her computer][1]
In 2021, there are more reasons why people love Linux than ever before. In this series, I'll share 21 different reasons to use Linux. Let's explore why anyone can try Linux.
Linux can seem mysterious to the uninitiated. People talk about Linux like it's something only meant for computer programmers or sysadmins, yet people also talk about running Linux on laptops or mobile devices. Tech sites list the [top 10 Linux commands][2] you [need to know][3], and yet there's just as much talk about [how exciting the Linux desktops (plural!) are][4].
So what's Linux all about, really?
Well, one of the many important things about Linux is its dedication to availability. If you're curious about Linux, the open source community makes sure it's easy to try.
### Try Linux without trying Linux
It doesn't matter whether you're switching from Windows to Linux, Windows to Mac (or Mac to Windows), or from Mac to Linux: Changing your computing style is hard. It's not often discussed, but modern computing is a strangely personal thing. Everyone gets comfortable with their own computer, and they tend to dislike big changes. Just shifting back and forth between my work computer and my personal computer (both of which run the same OS) requires mental and muscle adjustment for me, simply because the two are "optimized" for different kinds of activities. Even though I inevitably end up being referred to just as "the guy who knows computers" in my local communities (and I do like to think that I do), were I forced to change the OS I use, my sense of productivity and enjoyment would plummet for a week or two. The thing is, it's mostly superficial. I know how to use other operating systems, but I'd need time to establish new instincts and habits. I'd need a chance to remember where some of the small configuration options are located in a new OS, and I'd have to discover new features to capitalize upon.
For this reason, I often tell people who are curious about Linux that the first step is to use Linux _applications_. There aren't actually that many applications exclusive to Linux, largely because most apps on Linux are open source and are therefore eagerly ported between all platforms. But there are lots of applications commonly found on Linux that you can also try on your current non-Linux platform. Make it a goal to replace the applications you default to, either by force of habit or convenience, with open source equivalents.
### Replacing apps
The end goal of this exercise is to make a soft transition to Linux by way of the applications you'll eventually be running. Once you're used to a new set of applications, there's not much left to get used to on Linux, aside from system settings and file management.
If you're not sure what applications you use the most, just take a look at your **Recent Applications** menu (if your OS doesn't have a Recent Applications menu, then it might be time to switch to Linux). Once you've identified your must-have applications, take a look at our [Application Alternatives][5] page to learn about many of the common open source apps considered equivalents to popular proprietary ones.
### Getting Linux
Not all open source applications get ported to all platforms, and many ultimately benefit from running on Linux. Eventually, if you're keen to switch to Linux, it pays to complete the transition. Luckily, getting Linux is as easy as downloading it, almost as if it were just another open source app.
Usually, a Linux installation image features a Live mode and an Installation mode. That means you can boot from a Linux drive and use it in Live mode without actually installing it to your computer. This is a great way to get a hint of what the OS is like, but it's only a temporary experience because data isn't retained between boots. However, there are distributions, like [Porteus Linux][6], specially designed for running exclusively off of a USB thumb drive so that your personal data is retained. I keep a Porteus drive on my keychain, so no matter where I am, I have a bootable Linux image with me.
![Porteus Live Linux distribution][7]
The Porteus Live Linux distribution desktop.
### The best Linux
Once you've decided to install Linux, you'll find plenty of distributions available for the low cost of $0. If you're used to having only one or two choices in an operating system (for instance, a Home Edition and a Business Edition), then you probably find the idea of several different _distributions_ of Linux confusing. It seems more complicated than it actually is, though. Linux is Linux, and it rarely makes much of a difference whose "flavor" you download and install. The big names, like [Fedora][8], [Debian][9], [Linux Mint][10], and [Elementary][11], all deliver the same experience with a slightly unique emphasis.
* Fedora is famous for being first to update its software
* Linux Mint provides easy options to install missing drivers
* Debian is well known for its long-term support, so updates are slow, but reliability is high
* Elementary provides a beautiful desktop experience and several special, custom-built applications
Ultimately, the "best" Linux is the Linux that works best for you. I mean that literally: The best Linux for you is the Linux you try and find that all your computer features still work as expected.
### Getting drivers
Most drivers are already bundled in the Linux kernel (or as a kernel module). This is especially true when you're dealing with parts and peripherals a year or two old. With equipment that's been on the market for a while, Linux programmers have had the chance to develop drivers or integrate drivers from companies into the system. I've surprised more than just a few people by just attaching a Wacom graphics tablet, or a game controller, or a printer or scanner, to my Linux computer and immediately start using it, with no driver download, no installation, and little to no configuration.
Proprietary operating systems have two strategies for dealing with device drivers. They either restrict what devices you're supposed to use with the OS, or they pay companies to write and ship drivers along with the devices. The first method is uncomfortably restrictive, but most people are (sadly) acclimated to the idea that some devices only work on some platforms. The latter method is considered a luxury, but in practice, it also has the disadvantage of being dependent upon the driver programmer. There are plenty of computer peripherals in thrift stores in perfect condition but essentially dead because the manufacturer no longer maintains the drivers the devices require to function with modern systems.
For Linux, drivers are developed either by the manufacturer or by Linux programmers. This can cause some driver integration to be delayed (for instance, a new device might not work on Linux until six months after release), but it has the distinct advantage of long-term support.
Should you find that there's a driver that hasn't made its way into a distribution yet. You can wait a few months and try again in hopes that a driver has been integrated into the installer image, or you can just try a different distribution to see whether the driver is there.
### Paying for Linux
You can avoid all the choices and any concern about compatibility by buying a PC already loaded with Linux or a PC certified for Linux. Several vendors are offering Linux pre-installed, including all [System76][12] computers, and select [Lenovo][13] models. Additionally, all Lenovo models are [Certified for Linux][14] compatibility.
This is by far the easiest way to try Linux.
### Working toward Linux
Here's a challenge for you. Go through each application you have installed, and find a potential open source replacement. Select an application you use frequently, but not daily, and the next time you're about to use it, launch the open source one instead. Take the time you need to learn the new application until you're either able to adopt it as your new default or until you determine that you need to try a different option.
The more open source products you use, the more you'll be ready to launch into the exciting world of Linux. And eventually, you'll be running the Linux desktop, along with your favorite open source apps.
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/2/try-linux
作者:[Seth Kenlon][a]
选题:[lujun9972][b]
译者:[sthwhl](https://github.com/sthwhl)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/seth
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_women_computing_3.png?itok=qw2A18BM (Woman sitting in front of her computer)
[2]: https://opensource.com/article/19/12/linux-commands
[3]: https://opensource.com/article/18/4/10-commands-new-linux-users
[4]: https://opensource.com/article/20/5/linux-desktops
[5]: https://opensource.com/alternatives
[6]: http://porteus.org
[7]: https://opensource.com/sites/default/files/porteus5.png
[8]: http://getfedora.org
[9]: http://debian.org
[10]: http://linuxmint.com
[11]: http://elementary.io
[12]: http://system76.com
[13]: http://lenovo.com
[14]: https://forums.lenovo.com/t5/Linux-Operating-Systems/ct-p/lx_en

View File

@ -2,7 +2,7 @@
[#]: via: "https://news.itsfoss.com/mozilla-meta-facebook/"
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: translator: "sthwhl"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
@ -99,7 +99,7 @@ via: https://news.itsfoss.com/mozilla-meta-facebook/
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
译者:[sthwhl](https://github.com/sthwhl)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -1,143 +0,0 @@
[#]: subject: "6 Reasons to Try Nitrux OS"
[#]: via: "https://news.itsfoss.com/reasons-to-try-nitrux-os/"
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
6 Reasons to Try Nitrux OS
======
Nitrux OS may not be one of the mainstream Linux distributions, but it is surely one of the unique offerings.
We have also [interviewed its creator Uri Herrera][1] in 2019 to learn how they initially aimed to go beyond the traditional Linux distributions.
And, since then, weve come a long way to its recent [Nitrux 2.0 release][2].
Not to forget, they also [ditched Ubuntu as its base in favor of Debian][3], last year.
So, considering a lot has happened, and its been around for a few years now. Should you give it a try?
Here, I highlight some reasons to try [Nitrux OS][4]:
### 1\. It Isnt Ubuntu-based
![][5]
Most Linux distributions recommended for everyday use are based on Ubuntu.
Of course, our [recommendations for beginners][6] also include mostly Ubuntu Linux, but dont let that fool you.
The only reason we recommend Ubuntu-based distros is its an easy-to-use distro with direct support for a lot of commercial software products.
So, if you are not entirely new to Linux, and want to try something refreshing, stable but familiar, Nitrux OS as a Debian-based distro can be a good fit.
You can work your way through the terminal without a steep learning curve, whenever needed.
If you are curious, refer to our [comparison between Debian and Ubuntu][7] to learn more.
### 2\. Focus on AppImages
![][5]
[AppImage][8] is a universal packaging system that does not depend on anything. You do not need a package manager, or any dependencies on your distro, to make it work.
It aims to be portable, efficient and does not need any setup/installation. Just like portable Windows executables.
And, Nitrux OS focuses on using AppImage applications to give you a seamless app experience.
The NX Software Center is a GUI to manage and install AppImage applications built using MauiKit (its UI framework).
### 3\. A KDE-Based Distro
![][5]
Nitrux OS is one of the [best Linux distributions featuring KDE.][9] If you dislike using GNOME or any other desktop environment (DE) out-of-the-box, KDE is a nice alternative to try.
In case you didnt know, [KDE can be customized in many ways][10] compared to other DEs.
So, if you want to personalize your desktop with the widest range of options, KDE lets you do that without much effort.
### 4\. Unique User Experience
![][11]
Nitrux UX combines the best of KDE, and Qt technologies along with its tweaks to give you a refreshing user experience.
While it does not feel completely alien, your workflow will feel a bit different when using Nitrux OX.
Even without any customizations from your side, the out-of-the-box experience is solid enough to count it as one of the [most beautiful distributions][12].
### 5\. Maui Shell
![][11]
[Maui Shell][13] is a key highlight of Nitruxs user experience. Recently, it has managed to put some promising work presenting a convergent interface for both desktop and mobiles/tablets.
While it hasnt matured enough, it already looks pretty. And, as exciting as [System76s upcoming Rust-based desktop environment][14].
It can be one of the most important reasons to try Nitrux OS to see it unfold a new era of the desktop experience, who knows?
### 6\. Xanmod Kernel
![][5]
[Xanmod Kernel][15] is a customized version of the mainline Linux Kernel with performance tweaks and additional features. This should help you improve the desktop experience.
Starting with Nitrux 2.0, Xanmod Kernel will be the default Linux Kernel to provide you with an enhanced desktop experience.
You also get the option to choose other Linux Kernels like Liquorix and Libre, each of their benefits.
Or, you can also choose to go with mainline LTS Linux Kernel, if you do not prefer Xanmod. So, youve complete freedom and the ability to seamlessly choose a different kernel if you want to ditch the default.
[Nitrux OS][4]
### Wrapping Up
It is important to consider all the risks when switching from a mainstream distribution to options like Nitrux OS.
But, **Id like you to give this a thought:**
Distributions like Nitrux OS passionately try to improve things as per their vision.
Even without corporate backing or massive funds to help them, they have been able to develop this amazing distribution, developed [Maui project][16], and the interesting Maui shell.
So, I think we should try our best to support them in any way we can.
That being said, every Linux distribution comes with its share of issues. Whenever you take a leap with a new distro, you might want to give it some time before getting comfortable with it as your daily driver.
So, I would suggest trying it in your spare time or setting up a virtual machine to test things out.
_I__d be curious if you like/hate the experience. Let me know your thoughts after trying it out in the comments below._
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/reasons-to-try-nitrux-os/
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://itsfoss.com/nitrux-linux/
[2]: https://news.itsfoss.com/nitrux-2-0-release/
[3]: https://news.itsfoss.com/nitrux-linux-debian/
[4]: https://nxos.org/
[5]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ2OCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
[6]: https://itsfoss.com/best-linux-beginners/
[7]: https://itsfoss.com/debian-vs-ubuntu/
[8]: https://itsfoss.com/use-appimage-linux/
[9]: https://itsfoss.com/best-kde-distributions/
[10]: https://itsfoss.com/kde-customization/
[11]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQzOSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
[12]: https://itsfoss.com/beautiful-linux-distributions/
[13]: https://news.itsfoss.com/maui-shell-unveiled/
[14]: https://news.itsfoss.com/system76-cosmic-panel/
[15]: https://xanmod.org/
[16]: https://mauikit.org

View File

@ -0,0 +1,174 @@
[#]: subject: "5 Things to Know When Someone Says Linux is Tough"
[#]: via: "https://news.itsfoss.com/things-to-know-linux-is-tough/"
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
5 Things to Know When Someone Says Linux is Tough
======
Linux is the least popular desktop operating system (OS) when considering Windows, macOS, and Linux as our only choices.
Linux powers most of the servers, but that is not the case for consumer desktops/laptops.
To make things worse, many assume that Linux is tough from other experiences, even without giving it a try.
But, is it? If yes, what exactly do people refer to as tough?
### Is Linux Tough to Learn?
Unlike Windows and macOS, several things are fundamentally different for Linux (here, Linux distributions).
Yes, Linux distributions offer [advantages over Windows][1] and [macOS][2] with all the differences accounted for.
Moreover, you can perform almost all the essential tasks on a Linux desktop. In some cases, Linux operating system offers a similar user interface to Windows/macOS, making things convenient.
**Dont believe me?** Check out some [Windows-like Linux distributions][3].
So, what do users find challenging?
Here, I will discuss the points that new users generally find difficult, which should help you realize that Linux is not as tough as you thought.
### 1\. Software Installation and Package Management
![][4]
There are different methods to install the software (or a package) for Linux.
You can install it from the software center or the terminal, or download the package from the official source to install it manually.
Or, you can even [compile it from the source][5].
Unlike Windows/macOS, it is not just about executables (EXE) or **dmg** files.
Depending on the type of Linux distribution, the package support changes. For instance, you can [install DEB files on Ubuntu][6].
And, if you use Fedora as your desktop OS, you will have to [install RPM files][7].
To make things simpler, [Flatpak packa][8][g][8][es][8] and Snaps came into existence. If you find a Flatpak package or Snap version of an app available, you can install it on any Linux distribution.
However, you might need to [set up the support for Flatpak][9] and [Snap][10] if your Linux distribution does not have it by default.
So, you will have to understand that due to the diversity of Linux distributions, there are various installation methods and packages available. As long as you know the supported packages and the installation methods, it should be easy.
### 2\. The Terminal Panic
![][4]
With Windows/macOS, you may not need to launch the terminal or the command prompt often.
Yes, a few troubleshooting solutions need access to the command line. But, not as often compared to Linux.
With Linux, even when using [some of the best Linux distributions][11], you will often need to access the terminal and type some commands for tasks like:
* Refreshing the repository list
* Removing a software not installed via software center
* Adding a repository to install software
Technically, you do not have to learn any complex commands, but knowing a few of them to quickly uninstall a package, install a flatpak app, and so on can come in handy.
Typically, you will have the commands/instructions from the official site of any app you attempt to install. In some cases, when setting out to troubleshoot, you will find the exact command to type in from the community forums.
So, you do not need to “remember” anything, and a quick search on the internet should help you with it.
However, this can be overwhelming to some users, so they do not make an effort and avoid trying Linux on their computer.
Eventually, they lose interest in exploring anything else related to Linux.
### 3\. Installing Graphics Drivers
![][4]
While macOS does not bother with third-party graphics support, it does not support proper virtualization (especially ARM) and gaming. So, we shall exclude that and focus on Windows.
Both Windows and Linux support gaming/virtualization. And, you need to install graphic drivers to make these things work, if not just for watching streams/videos.
With Windows, you need to download the respective driver for your graphics card and get it installed. You do not encounter issues with the first-time installation for the most part.
However, for Linux, the latest graphic driver version does not always work (especially NVIDIA). So, it is not as simple as downloading from the official website and installing it.
If your Linux distribution features a driver manager (like Linux Mint), it makes things easy.
If not, you might have to look for an ISO file for the OS you like with supported graphic drivers included.
Overall, installing graphics drivers is not a big deal if you are using a mainstream Linux distribution, but if you choose a different distribution, you may have to research before you install it on bare metal.
### 4\. Software Support
You do not find support for all Windows/macOS applications on Linux.
If the service offers cross-platform support, chances are it supports Linux distributions like Ubuntu, Fedora, and Arch. Otherwise, you will have to search for alternatives.
So, the lack of software availability makes Linux an incredibly unsatisfying experience.
However, we have an extensive [list of essential applications][12] that can give you a head start.
Unfortunately, not everyone is aware of it. And some users remain reluctant to try an alternative.
### 5\. Tweaking Peripherals and Components
![][4]
It is not just about the usability and apps available. It is also about the ability to manage and tweak hardware devices connected to your computer.
Linux does not have official software support from various hardware brands like Razer, Corsair, ASUS, etc.
So, when users realize that they cannot manage their RGB lighting, fan profiles, and cooling devices as conveniently as they expected, Linux is out of their wishlist.
However, you should know that there are tools that already help with it, things like:
* [Configuring a gaming mouse][13]
* [Tweaking a razer peripheral][14]
* [Controlling and monitoring cooling devices][15]
Yes, it may not be official, but it works with a wide range of peripherals and components. So, if the lack of official support for peripherals and component monitoring stopped you from trying Linux, now you can give it a try with these solutions!
### Wrapping Up
For starters, I think these are the most common things that prevent users from trying Linux and end up declaring it as the most challenging operating system.
You will have to keep in mind that trying a different operating system always comes with new challenges and a learning curve.
Linux as a desktop operating system is easier than ever before. Linux distributions like **Ubuntu, Pop!_OS, Linux Mint, Linux Lite**, and many more have made it possible for new users to feel right at home.
Even with all the improvements, it can be overwhelming for some users, which is why we wanted you to know that it is not as problematic as you originally assumed.
_If you have a friend who still has not tried Linux for the reasons mentioned above, I recommend you to share this along and help them know better to make an informed choice._
_Let me know your thoughts in the comments below._
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/things-to-know-linux-is-tough/
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://itsfoss.com/linux-better-than-windows/
[2]: https://itsfoss.com/linux-vs-mac/
[3]: https://itsfoss.com/windows-like-linux-distributions/
[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ2OCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
[5]: https://itsfoss.com/install-software-from-source-code/
[6]: https://itsfoss.com/install-deb-files-ubuntu/
[7]: https://itsfoss.com/install-rpm-files-fedora/
[8]: https://itsfoss.com/what-is-flatpak/
[9]: https://itsfoss.com/flatpak-guide/
[10]: https://itsfoss.com/use-snap-packages-ubuntu-16-04/
[11]: https://itsfoss.com/best-linux-distributions/
[12]: https://itsfoss.com/essential-linux-applications/
[13]: https://itsfoss.com/piper-configure-gaming-mouse-linux/
[14]: https://itsfoss.com/set-up-razer-devices-linux/
[15]: https://itsfoss.com/coolero/

View File

@ -0,0 +1,93 @@
[#]: subject: "Whats the Fuss About GNOMEs Libadwaita Library in Linux World?"
[#]: via: "https://news.itsfoss.com/gnome-libadwaita-library/"
[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Whats the Fuss About GNOMEs Libadwaita Library in Linux World?
======
Back in March 2020, the GNOME project announced a new library called Libadwaita. This promised to fix numerous fundamental issues with GTK, the library GNOME uses to build its desktop environment.
Unfortunately, this announcement also resulted in some significant community backlash. While this hasnt really slowed the adoption of Libadwaita, it seems that some users are now starting to boycott GNOME because of it.
But what impact does Libadwaita have in the real world? And how does this differ for users and developers?
### Main Features Of Libadwaita
While it was originally meant to be a solution to the many GNOME-specific libraries developers needed to use, it has since grow into much more. As Adrian Plazas said in his [blog][1]:
> GNOME needs a blessed library implementing its HIG (Human Interface Guidelines) rapidly, developed in collaboration with its design team.
>
> […]
>
> To solve both GTKs need of independence and GNOMEs need to move faster, we are creating the libadwaita project. This new libadwaita library intends to extend that concept by being the missing code part of Adwaita. The library will be implemented as a direct GTK 4 continuation and replacement of libhandy, and it will be developed by libhandys current developers.
Adrian Plazas
Basically, Libadwaita is meant to be a GNOME-specific version of GTK4, with the GNOME project in complete control of the look and feel of apps. However, it also incorporates a number of other features:
* Adaptive widgets so that apps can work on both desktops, laptops, tablets, and smartphones (like the PinePhone)
* New Adwaita version, following the latest trends in UI design
* Built-in styles for buttons and other widgets
* Built-in in-app notifications
* Improved and more customizable animations
* Speed and fluidity improvements
While all these features are awesome, a select few have divided the community, mostly between developers and users. As someone who has made a number of small little projects with Libadwaita and GTK3 (without Libadwaita), as well as a GNOME user, I want to talk about the different perspectives of different people.
### User Perspective
![][2]
Unfortunately, Libadwaita has been met by immense backlash by some GNOME users. This all stems from one key change in Libadwaita: The inability to theme it. This is because the Adwaita theme is built right into Libadwaita, meaning that it would need to be recompiled every time the theme was changed.
This is a fundamental aspect of Libadwaita, for better or for worse. As a result, some users have decided that this is an attempt by GNOME to lock down their app ecosystem.
However, this does not mean that Libadwaita is dead in the water. From the very beginning, the GNOME developers have been adamant that a theming API would come soon, and it looks like this will happen.
While this wouldnt solve the issue of incompatibility of existing GTK and GNOME themes, it would solve some more fundamental issues. As has been said numerous times, the CSS theming that GTK currently users is much more of a band-aid fix to the problem of theming than a permanent solution. And, as with many open-source projects, this band-aid fix has been built upon to the extent now that there is very little chance of going back.
Libadwaita would go some steps to fixing this, but at the cost of the existing app ecosystem. With all this hate, however, developers continue to implement it. Why might this be?
### Developer Perspective
![][2]
As you saw in the feature list before, there are a huge number of features that help developers tremendously. For me, this has been the ability to create convergent apps, and the sole reason I use Libadwaita.
Unfortunately, as with almost every new GNOME library, there is minimal language-specific documentation available. This is instead replaced with a much more generic, automatically-generated documentation system.
While this is better than nothing, it is still quite lacklustre, especially considering the incredible community of developers GNOME has.
### A Better Solution?
Now, I hope that I have explained everyones position on Libadwaita, except mine. To be honest, I actually quite enjoy developing with it, even with all its teething problems. Unfortunately, I am also a huge fan of theming, and have found Libadwaita apps quite jarring compared to everything else.
However, I think there is a solution. As I said before, Libadwaita was created in response to the faster development pace GNOME needed. However, couldnt this be achieved through a branch from GTK 4?
This would allow GTK to inherit all the exciting features in Libadwaita, as well as allowing a more unified approach to GNOME libraries. As I said before in [my Flutter article][3], I believe that desktop Linux is too fragmented, and this extends to GTK.
What do you think about Libadwaita? Do you support it, or are you going to be boycotting GNOME? Please, I would love to hear your opinions in the comments below!
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/gnome-libadwaita-library/
作者:[Jacob Crume][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/jacob/
[b]: https://github.com/lujun9972
[1]: https://aplazas.pages.gitlab.gnome.org/blog/blog/2021/03/31/introducing-libadwaita.html
[2]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQzOSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
[3]: https://news.itsfoss.com/no-flutter-on-linux-desktop/

View File

@ -1,68 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Why I switched from Mac to Linux)
[#]: via: (https://opensource.com/article/20/3/mac-linux)
[#]: author: (Lee Tusman https://opensource.com/users/leeto)
Why I switched from Mac to Linux
======
After 25 years, Lee made the switch to Linux and couldn't be happier.
Here's what he uses.
![Code going into a computer.][1]
In 1994, my family bought a Macintosh Performa 475 as a home computer. I had used Macintosh SE computers in school and learned to type with [Mavis Beacon Teaches Typing][2], so I've been a Mac user for well over 25 years. Back in the mid-1990s, I was attracted to its ease of use. It didn't start with a DOS command prompt; it opened to a friendly desktop. It was playful. And even though there was a lot less software for Macintosh than PCs, I thought the Mac ecosystem was better, just on the strength of KidPix and Hypercard, which I still think of as the unsurpassed, most intuitive _creative stack_.
Even so, I still had the feeling that Mac was an underdog compared to Windows. I remember thinking the company could disappear one day. Flash-forward decades later, and Apple is a behemoth, a trillion-dollar company. But as it evolved, it changed significantly. Some changes have been for the better, such as better stabilization, simpler hardware choices, increased security, and more accessibility options. Other changes annoyed me—not all at once, but slowly. Most significantly, I am annoyed by Apple's closed ecosystem—the difficulty of accessing photos without iPhoto; the necessity of using iTunes; and the enforced bundling of the Apple store ecosystem even when I don't want to use it.
Over time, I found myself working largely in the terminal. I used iTerm2 and the [Homebrew][3] package manager. I couldn't get all my Linux software to work, but much of it did. I thought I had the best of both worlds: the macOS graphical operating system and user interface alongside the ability to jump into a quick terminal session.
Later, I began using Raspberry Pi computers booting Raspbian. I also collected a number of very old laptops rescued from the trash at universities, so, by necessity, I decided to try out various Linux distros. While none of them became my main machine, I started to really enjoy using Linux. I began to consider what it would be like to try running a Linux distro as my daily driver, but I thought the Macbook's comfort and ease, especially the hardware's size and weight, would be hard to find in a non-Mac laptop.
## Time to make the switch?
About two years ago, I began using a Dell for work. It was a larger laptop with an integrated GPU, and dual-booted Linux and Windows. I used it for game development, 3D modeling, some machine learning, and basic programming in C# and Java. I considered making it my primary machine, but I loved the portability of my Macbook Air, and continued to use that as well.
Last fall, I started to notice my Air was running hot, and the fan was coming on more often. My primary machine was starting to show its age. For years, I used the Mac's terminal to access Darwin's Unix-like operating system, and I was spending more and more time bouncing between the terminal and my web browser. Was it time to make the switch?
I began exploring the possibilities for a Macbook-like Linux laptop. After doing some research, reading reviews and message boards, I went with the long-celebrated Dell XPS 13 Developer Edition 7390, opting for the 10th Generation i7. I chose it because I love the feel of the Macbook (and especially the slim Macbook Air), and reviews of the XPS 13 suggested it seemed it was similar, with really positive reviews of the trackpad and keyboard.
Most importantly, it came loaded with Ubuntu. While it's easy enough to get a PC, wipe it, and install a new Linux distro, I was attracted to the cohesive operating system and hardware, but one that allowed a lot of the customization we know and love in Linux. So when there was a sale, I took the plunge and purchased it.
## What it's like to run Linux daily
I've been using the XPS 13 for three months and my dual-booted Linux work laptop for two years. At first, I thought I'd want to spend more time finding an alternate desktop environment or window manager that was more Mac-like, such as [Enlightenment][4]. I tried several, but I have to say, I like the simplicity of running [GNOME][5] out of the box. For one thing, it's minimal; there's not much GUI to get caught up in. In fact, it's intuitive and the [overview][6] takes only a couple minutes to read. 
I can access my applications through the application dash bar or a grid button to get to the application view. To access my file system, I click on the **Files** icon in the dash. To open the GNOME terminal, I type **Ctrl+Alt+T** or just **Alt+Tab** to switch between an open application and an open terminal. It's also easy to define your own [custom hotkey shortcuts][7].
Beyond this, there's not much else to say. Unlike the Mac's desktop, there's not a lot to get lost in, which means there's less to distract me from my work or the applications I want to run. I didn't realize all the options or how much time I spent navigating windows on my Mac. In Linux, there are just files, applications, and the terminal.
I installed the [i3 tiling window manager][8] to do a test run. I had a few issues configuring it because I type in [Dvorak][9], and i3 doesn't adapt to the alternate keyboard configuration. I think with more effort, I could figure out a new keyboard mapping in i3, but the main thing I was looking for was simple tiling.
I looked up GNOME's tiling capabilities and was pleasantly surprised. You press the **Super** key (for me, it's the key with the Windows logo—which I should cover with a sticker!) and then a modifier key. For example, pressing **Super+Left** moves your current window to a tile on the left side of the screen. **Super+Right** moves to the right half. **Super+Up** maximizes the current window. **Super+Down** reverts to the previous size. You can move between app windows with **Alt+Tab**. This is all default behavior and can be customized in the Keyboard settings.
Plugging in headphones or connecting to HDMI works the way you expect. Sometimes, I open the Sound settings to switch between the HDMI sound output or my external audio cable, just as I would on a Mac or PC. The trackpad is responsive, and I haven't noticed any difference from the Macbook's. When I plug in a three-button mouse, it works instantly, even with my Bluetooth mouse and keyboard.
### Software
I installed Atom, VLC, Keybase, Brave Browser, Krita, Blender, and Thunderbird in a matter of minutes. I installed other software with the Apt package manager in the terminal (as normal), which offers many more packages than the Homebrew package manager for macOS.
### Music
I have a variety of options for listening to music. I use Spotify and [PyRadio][10] to stream music. [Rhythmbox][11] is installed by default on Ubuntu; the simple music player launches instantly and without any bloat. Simply click on the menu, choose **Add Music**, and navigate to a directory of audio tracks (it searches recursively). You can also stream podcasts or online radio easily.
### Text and PDFs
I tend to write in Markdown in [Neovim][12] with some plugins, then convert my document using Pandoc to whatever final format is needed. For a nice Markdown editor with preview, I downloaded [Ghostwriter][13], a minimal-focus writing application.
If someone sends me a Microsoft Word document, I can open it using the default LibreOffice Writer application.
Occasionally, I have to sign a document. This is easy with macOS's Preview application and my signature in PNG format, and I needed a Linux equivalent. I found that the default PDF viewer app didn't have the annotation tools I needed. The LibreOffice Draw program was acceptable but not particularly easy to use, and it occasionally crashed. Based on some research, I installed [Xournal][14], which has the simple annotation tools I need to add dates, text, and my signature and is fairly comparable to Mac's Preview app. It works exactly as needed.
### Importing images from my phone
I have an iPhone. To get my images off the phone, there are a number of methods to sync and access your files. If you have a different phone, your process may be different. Here's my method:
1. Install gvfs-backends with **sudo apt install gvfs-backends**, which is part of the GNO

View File

@ -1,275 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Secure your containers with SELinux)
[#]: via: (https://opensource.com/article/20/11/selinux-containers)
[#]: author: (Mike Calizo https://opensource.com/users/mcalizo)
Secure your containers with SELinux
======
Hack your system to understand why it's important to configure SELinux
to be your first line of container defense.
![Three closed doors][1]
When things aren't working correctly in your Linux environment, the easiest thing to do is disable Security-Enhanced Linux ([SELinux][2]). Things suddenly begin to work, and you forget about it—but this is a common pitfall that means you've lost a very powerful security tool.
Threats are rising alongside the rise of containers, microservices, and distributed architecture. This is due to an old, well-known issue: velocity. The advantage of containers is that they enable you to move fast, do more, and change quickly. This means container adoption has gone off the roof, but the speed it affords also means you will encounter more issues and vulnerabilities. This happens naturally when you're doing more things faster and quicker.
### How to mitigate threats
As Sun Tzu said, "The wise warrior avoids the battle." This quote really resonates when it comes to containers' basic defense. To avoid problems (battles), make sure that your container host is secure and that you can use SELinux as your first line of defense.
SELinux is an open source project released in 2000 and integrated into the Linux kernel in 2003. According to [Red Hat's explainer][3], "SELinux is a security architecture for [Linux systems][4] that allows administrators to have more control over who can access the system. It was originally developed by the United States National Security Agency (NSA) as a series of patches to the [Linux kernel][5] using Linux Security Modules (LSM)."
### Get started
When you think about containers, the first thing that probably comes into mind is [Docker][6]. Docker started a container adoption revolution after it emerged in 2013. It is one of the main reasons that containers exploded in popularity, but as mentioned above, the high level of adoption increased users' vulnerability to security risks.
Before you can secure your Docker containers with SELinux, you need to set some things up.
#### Prerequisites:
* CentOS 8/RHEL 8 installed and configured
* Docker CE installed and configured
* Two accounts created: root and non-root (`mcalizo` in the examples below)
If you need to set up Docker on your RHEL 8/CentOS 8 server, you can follow these [instructions][7]. If you're running RHEL 8, you need to remove the pre-installed Podman and runc packages before beginning.
First, make sure SELinux is enabled:
```
[mcalizo@Rhel82 ~]$ sestatus
SELinux status:                 enabled
SELinuxfs mount:                /sys/fs/selinux
SELinux root directory:         /etc/selinux
Loaded policy name:             targeted
Current mode:                   enforcing
Mode from config file:          enforcing
Policy MLS status:              enabled
Policy deny_unknown status:     allowed
Memory protection checking:     actual (secure)
Max kernel policy version:      31
[mcalizo@Rhel82 ~]$
```
Then, verify your OS version and that Docker is running. Log in as root and run:
```
[root@rhel82 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux release 8.2 (Ootpa)
[root@rhel82 ~]#
[root@rhel82 ~]# systemctl status docker
● docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
   Active: active (running) since Wed 2020-10-28 19:10:14 EDT; 15s ago
     Docs: <https://docs.docker.com>
 Main PID: 30768 (dockerd)
    Tasks: 8
   Memory: 39.0M
   CGroup: /system.slice/docker.service
           └─30768 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
Oct 28 19:10:13 rhel82.home.labs.com dockerd[30768]: time="2020-10-28T19:10:13.889602941-04:00" level=error msg="&gt;
Oct 28 19:10:13 rhel82.home.labs.com dockerd[30768]: time="2020-10-28T19:10:13.903413613-04:00" level=warning msg&gt;
Oct 28 19:10:13 rhel82.home.labs.com dockerd[30768]: time="2020-10-28T19:10:13.903427451-04:00" level=warning msg&gt;
Oct 28 19:10:13 rhel82.home.labs.com dockerd[30768]: time="2020-10-28T19:10:13.903538271-04:00" level=info msg="L&gt;
Oct 28 19:10:14 rhel82.home.labs.com dockerd[30768]: time="2020-10-28T19:10:14.132060506-04:00" level=info msg="D&gt;
Oct 28 19:10:14 rhel82.home.labs.com dockerd[30768]: time="2020-10-28T19:10:14.308943088-04:00" level=info msg="L&gt;
Oct 28 19:10:14 rhel82.home.labs.com dockerd[30768]: time="2020-10-28T19:10:14.319438549-04:00" level=info msg="D&gt;
Oct 28 19:10:14 rhel82.home.labs.com dockerd[30768]: time="2020-10-28T19:10:14.319570298-04:00" level=info msg="D&gt;
Oct 28 19:10:14 rhel82.home.labs.com dockerd[30768]: time="2020-10-28T19:10:14.333419209-04:00" level=info msg="A&gt;
Oct 28 19:10:14 rhel82.home.labs.com systemd[1]: Started Docker Application Container Engine
```
Check your Docker version:
```
[root@rhel82 ~]# docker --version
Docker version 19.03.13, build 4484c46d9d
```
### Hack your host
One of the best ways to understand a problem is to experience it. So, I'll show you how easy it is to inject malicious code into a Docker host if your security is not set up properly.
To be able to do something bad on the Docker host, the malicious non-root user (`mcalizo` in this tutorial) must be part of the group that can instantiate Docker containers.
First, confirm what group the `mcalizo` user belongs to:
```
[root@Rhel82 ~]# groups mcalizo
mcalizo : mcalizo
```
The output shows that `mcalizo` belongs only to its own group. This means `mcalizo` can't instantiate Docker containers and will get this error if it tries:
```
[mcalizo@Rhel82 ~]$ docker run -it --rm centos:latest /bin/sh
docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.40/containers/create: dial unix /var/run/docker.sock: connect: permission denied.
See 'docker run --help'.
```
To allow `mcalizo` to instantiate the container, add the user to the `docker` group:
```
[root@Rhel82 ~]# usermod -G docker -a mcalizo
[root@Rhel82 ~]# groups mcalizo
mcalizo : mcalizo docker
```
Next, deploy a `fedora:latest` container and log into the instantiated container to explore it:
```
[mcalizo@Rhel82 ~]$ docker run -it --rm fedora:latest /bin/sh
Unable to find image 'fedora:latest' locally
latest: Pulling from library/fedora
ee7e89337106: Pull complete
Digest: sha256:b9ec86d36fca7b1d3de39cd7c258e8d90c377d312c21a7748071ce49069b8db4
Status: Downloaded newer image for fedora:latest
sh-5.0# cat /etc/redhat-release
Fedora release 33 (Thirty Three)
```
While you're logged into the newly created container, you can see you are automatically logged in as root:
```
sh-5.0# whoami
root
sh-5.0#
```
As `root` user, you can do anything in this container, which means you can exploit the container host and do a lot of damage. Because you can instantiate a container, you can do things to the host even if you are not part of the host's sudoers account.
Exit the container you just created, and create a new container to demonstrate the exploit:
```
[mcalizo@Rhel82 ~]$ docker run -it --rm -v /:/exploit fedora:latest /bin/bash
[root@131043f2e306 /]#
```
The [-v option][8] mounts the Docker host's `/` directory to the container under the `/exploit` directory:
```
[root@131043f2e306 /]#ls exploit/
bin  boot  dev  etc  home  lib  lib64  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var
```
Because it is mounted, you can do _anything_ on the Docker host. For example, you can delete files, edit specific configurations to harm the system, or even install a Trojan horse application or other malware to steal important information.
### Why does this happen?
You may be wondering why this is possible since SELinux is in enforcing mode. Dig deeper into SELinux to see where things went wrong.
Verify that SELinux has a [Docker context][9]:
```
[mcalizo@Rhel82 ~]$ ps -eZ | grep docker
system_u:system_r:container_runtime_t:s0 30768 ? 00:00:04 dockerd
[mcalizo@Rhel82 ~]$
```
As expected, it does. This means SELinux manages the Docker daemon. Inspect the Docker daemon to see if SELinux is enabled by default:
```
[mcalizo@Rhel82 ~]$ docker info | grep Security -A3
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 4.18.0-193.el8.x86_64
```
SELinux is _not_ enabled by default. This is the problem! To fix it, enable SELinux to control and manage Docker by updating or creating the file `/etc/docker/daemon.json` as [documented here][10] (you must have root access to do this):
```
[root@Rhel82 ~]# cat /etc/docker/daemon.json
{
  "selinux-enabled": true
}
[root@Rhel82 ~]#
[root@Rhel82 ~]# systemctl restart docker
```
After creating or updating the file and restarting Docker, you should see that SELinux support is enabled in the Docker daemon:
```
[root@Rhel82 ~]# systemctl restart docker
[mcalizo@Rhel82 root]$ docker info | grep Security -A3
 Security Options:
  seccomp
   Profile: default
  selinux
[mcalizo@Rhel82 root]$
```
While it's still possible to mount a specific filesystem in your Docker host on your Docker container, updating or accessing the file is no longer allowed:
```
[mcalizo@Rhel82 root]$ docker run -it --rm -v /:/exploit fedora:latest /bin/bash
[root@ecb5836da1f6 /]# touch /exploit/etc/shadow.sh
touch: cannot touch '/exploit/etc/shadow.sh': Permission denied
[root@ecb5836da1f6 /]#
```
### Learn more
Your first line of defense in the container world depends on how strongly you set up your container hosts' operating system. There are numerous ways to implement Linux security, including options available on the market to augment your security posture.
SELinux is an additional layer of security that is built into [Linux distributions][11] by default. To take advantage of it and protect your system against compromise, make sure SELinux remains on.
If you want to learn more, see:
* [How to install Docker CE on CentOS 8 / RH][7]
* [Docker security cheat sheet][12]
* [dockerd documentation][10]
* [Use volumes documentation][8]
* [What is SELinux?][3]
Few things in the Linux world evoke a strong reaction like SELinux , the security enhancement for...
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/11/selinux-containers
作者:[Mike Calizo][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/mcalizo
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/EDU_UnspokenBlockers_1110_A.png?itok=x8A9mqVA (Three closed doors)
[2]: https://en.wikipedia.org/wiki/Security-Enhanced_Linux
[3]: https://www.redhat.com/en/topics/linux/what-is-selinux
[4]: https://www.redhat.com/en/topics/linux/what-is-linux
[5]: https://www.redhat.com/en/topics/linux/what-is-the-linux-kernel
[6]: https://opensource.com/resources/what-docker
[7]: https://www.linuxtechi.com/install-docker-ce-centos-8-rhel-8/
[8]: https://docs.docker.com/storage/volumes/
[9]: https://docs.docker.com/engine/reference/commandline/context/
[10]: https://docs.docker.com/engine/reference/commandline/dockerd/
[11]: https://www.redhat.com/en/topics/linux/whats-the-best-linux-distro-for-you
[12]: https://cheatsheetseries.owasp.org/cheatsheets/Docker_Security_Cheat_Sheet.html

View File

@ -1,5 +1,5 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: translator: (amagicbowboy)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )

View File

@ -1,286 +0,0 @@
[#]: subject: (Use awk to calculate letter frequency)
[#]: via: (https://opensource.com/article/21/4/gawk-letter-game)
[#]: author: (Jim Hall https://opensource.com/users/jim-hall)
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
Use awk to calculate letter frequency
======
Write an awk script to determine the most (and least) common letters in
a set of words.
![Typewriter keys in multicolor][1]
I recently started writing a game where you build words using letter tiles. To create the game, I needed to know the frequency of letters across regular words in the English language, so I could present a useful set of letter tiles. Letter frequency is discussed in various places, including [on Wikipedia][2], but I wanted to calculate the letter frequency myself.
Linux provides a list of words in the `/usr/share/dict/words` file, so I already have a list of likely words to use. The `words` file contains lots of words that I want, but a few that I don't. I wanted a list of all words that weren't compound words (no hyphens or spaces) or proper nouns (no uppercase letters). To get that list, I can run the `grep` command to pull out only the lines that consist solely of lowercase letters:
```
`$ grep  '^[a-z]*$' /usr/share/dict/words`
```
This regular expression asks `grep` to match patterns that are only lowercase letters. The characters `^` and `$` in the pattern represent the start and end of the line, respectively. The `[a-z]` grouping will match only the lowercase letters **a** to **z**.
Here's a quick sample of the output:
```
$ grep  '^[a-z]*$' /usr/share/dict/words | head
a
aa
aaa
aah
aahed
aahing
aahs
aal
aalii
aaliis
```
And yes, those are all valid words. For example, "aahed" is the past tense exclamation of "aah," as in relaxation. And an "aalii" is a bushy tropical shrub.
Now I just need to write a `gawk` script to do the work of counting the letters in each word, and then print the relative frequency of each letter it finds.
### Counting letters
One way to count letters in `gawk` is to iterate through each character in each input line and count occurrences of each letter **a** to **z**. The `substr` function will return a substring of a given length, such as a single letter, from a larger string. For example, this code example will evaluate each character `c` from the input:
```
{
    len = length($0); for (i = 1; i &lt;= len; i++) {
        c = substr($0, i, 1);
    }
}
```
If I start with a global string `LETTERS` that contains the alphabet, I can use the `index` function to find the location of a single letter in the alphabet. I'll expand the `gawk` code example to evaluate only the letters **a** to **z** in the input:
```
BEGIN { LETTERS = "abcdefghijklmnopqrstuvwxyz" }
 
{
    len = length($0); for (i = 1; i &lt;= len; i++) {
        c = substr($0, i, 1);
        ltr = index(LETTERS, c);
    }
}
```
Note that the index function returns the first occurrence of the letter from the `LETTERS` string, starting with 1 at the first letter, or zero if not found. If I have an array that is 26 elements long, I can use the array to count the occurrences of each letter. I'll add this to my code example to increment (using `++`) the count for each letter as it appears in the input:
```
BEGIN { LETTERS = "abcdefghijklmnopqrstuvwxyz" }
 
{
    len = length($0); for (i = 1; i &lt;= len; i++) {
        c = substr($0, i, 1);
        ltr = index(LETTERS, c);
 
        if (ltr &gt; 0) {
            ++count[ltr];
        }
    }
}
```
### Printing relative frequency
After the `gawk` script counts all the letters, I want to print the frequency of each letter it finds. I am not interested in the total number of each letter from the input, but rather the _relative frequency_ of each letter. The relative frequency scales the counts so that the letter with the fewest occurrences (such as the letter **q**) is set to 1, and other letters are relative to that.
I'll start with the count for the letter **a**, then compare that value to the counts for each of the other letters **b** to **z**:
```
END {
    min = count[1]; for (ltr = 2; ltr &lt;= 26; ltr++) {
        if (count[ltr] &lt; min) {
            min = count[ltr];
        }
    }
}
```
At the end of that loop, the variable `min` contains the minimum count for any letter. I can use that to provide a scale for the counts to print the relative frequency of each letter. For example, if the letter with the lowest occurrence is **q**, then `min` will be equal to the **q** count.
Then I loop through each letter and print it with its relative frequency. I divide each count by `min` to print the relative frequency, which means the letter with the lowest count will be printed with a relative frequency of 1. If another letter appears twice as often as the lowest count, that letter will have a relative frequency of 2. I'm only interested in integer values here, so 2.1 and 2.9 are the same as 2 for my purposes:
```
END {
    min = count[1]; for (ltr = 2; ltr &lt;= 26; ltr++) {
        if (count[ltr] &lt; min) {
            min = count[ltr];
        }
    }
 
    for (ltr = 1; ltr &lt;= 26; ltr++) {
        print substr(LETTERS, ltr, 1), int(count[ltr] / min);
    }
}
```
### Putting it all together
Now I have a `gawk` script that can count the relative frequency of letters in its input:
```
#!/usr/bin/gawk -f
 
# only count a-z, ignore A-Z and any other characters
 
BEGIN { LETTERS = "abcdefghijklmnopqrstuvwxyz" }
 
{
    len = length($0); for (i = 1; i &lt;= len; i++) {
        c = substr($0, i, 1);
        ltr = index(LETTERS, c);
 
        if (ltr &gt; 0) {
            ++count[ltr];
        }
    }
}
 
# print relative frequency of each letter
   
END {
    min = count[1]; for (ltr = 2; ltr &lt;= 26; ltr++) {
        if (count[ltr] &lt; min) {
            min = count[ltr];
        }
    }
 
    for (ltr = 1; ltr &lt;= 26; ltr++) {
        print substr(LETTERS, ltr, 1), int(count[ltr] / min);
    }
}
```
I'll save that to a file called `letter-freq.awk` so that I can use it more easily from the command line.
If you prefer, you can also use `chmod +x` to make the file executable on its own. The `#!/usr/bin/gawk -f` on the first line means Linux will run it as a script using the `/usr/bin/gawk` program. And because the `gawk` command line uses `-f` to indicate which file it should use as a script, you need that hanging `-f` so that executing `letter-freq.awk` at the shell will be properly interpreted as running `/usr/bin/gawk -f letter-freq.awk` instead.
I can test the script with a few simple inputs. For example, if I feed the alphabet into my `gawk` script, each letter should have a relative frequency of 1:
```
$ echo abcdefghijklmnopqrstuvwxyz | gawk -f letter-freq.awk
a 1
b 1
c 1
d 1
e 1
f 1
g 1
h 1
i 1
j 1
k 1
l 1
m 1
n 1
o 1
p 1
q 1
r 1
s 1
t 1
u 1
v 1
w 1
x 1
y 1
z 1
```
Repeating that example but adding an extra instance of the letter **e** will print the letter **e** with a relative frequency of 2 and every other letter as 1:
```
$ echo abcdeefghijklmnopqrstuvwxyz | gawk -f letter-freq.awk
a 1
b 1
c 1
d 1
e 2
f 1
g 1
h 1
i 1
j 1
k 1
l 1
m 1
n 1
o 1
p 1
q 1
r 1
s 1
t 1
u 1
v 1
w 1
x 1
y 1
z 1
```
And now I can take the big step! I'll use the `grep` command with the `/usr/share/dict/words` file and identify the letter frequency for all words spelled entirely with lowercase letters:
```
$ grep  '^[a-z]*$' /usr/share/dict/words | gawk -f letter-freq.awk
a 53
b 12
c 28
d 21
e 72
f 7
g 15
h 17
i 58
j 1
k 5
l 36
m 19
n 47
o 47
p 21
q 1
r 46
s 48
t 44
u 25
v 6
w 4
x 1
y 13
z 2
```
Of all the lowercase words in the `/usr/share/dict/words` file, the letters **j**, **q**, and **x** occur least frequently. The letter **z** is also pretty rare. Not surprisingly, the letter **e** is the most frequently used.
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/4/gawk-letter-game
作者:[Jim Hall][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/jim-hall
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc-docdish-typewriterkeys-3.png?itok=NyBwMdK_ (Typewriter keys in multicolor)
[2]: https://en.wikipedia.org/wiki/Letter_frequency

View File

@ -1,67 +0,0 @@
[#]: subject: (5 commands to level-up your Git game)
[#]: via: (https://opensource.com/article/21/4/git-commands)
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
5 commands to level-up your Git game
======
Get more use out of Git by adding these commands to your repertoire.
![Business woman on laptop sitting in front of window][1]
If you use Git regularly, you might be aware that it has several reputations. It's probably the most popular version-control solution and is used by some of the [biggest software projects][2] around to [keep track of changes][3] to files. It provides a [robust interface][4] to review and incorporate experimental changes into existing documents. It's well-known for its flexibility, thanks to [Git hooks][5]. And partly because of its great power, it has earned its reputation for being complex.
You don't have to use all of Git's many features, but if you're looking to delve deeper into Git's subcommands, here are some that you might find useful.
### 1\. Finding out what changed
If you're familiar with Git's basics (`fetch`, `add`, `commit`, `push`, `log`, and so on) but you want to learn more, Git subcommands that query are a great, safe place to start. Querying your Git repository (your _work tree_) doesn't make any changes; it's only a reporting mechanism. You're not risking the integrity of your Git checkout; you're only asking Git about its status and history.
The [git whatchanged][6] command (almost a mnemonic itself) is an easy way to see what changed in a commit. A remarkably user-friendly command, it squashes the best features of `show` and `diff-tree` and `log` into one easy-to-remember command.
### 2\. Managing changes with git stash
The more you use Git, the more you use Git. That is, once you've become comfortable with the power of Git, the more often you use its powerful features. Sometimes, you may find yourself in the middle of working with a batch of files when you realize some other task is more urgent. With [git stash][7], you can gather up all the pieces of your work in progress and stash them away for safekeeping. With your workspace decluttered, you can turn your attention to some other task and then reapply stashed files to your work tree later to resume work.
### 3\. Making a linked copy with git worktree
When `git stash` isn't enough, Git also provides the powerful [git worktree][8] command. With it, you can create a new but _linked_ clone of your repository, forming a new branch and setting `HEAD` to whatever commit you want to base your new work on. In this linked clone, you can work on a task unrelated to what your primary clone is focused on. It's a good way to keep your work in progress safe from unintended changes. When you're finished with your new work tree, you can push your new branch to a remote, bundle the changes into an archive for later, or just fetch the changes from your other tree. Whatever you decide, your workspaces are kept separate, and the changes in one don't have to affect changes in the other until you are ready to merge.
### 4\. Selecting merges with git cherry-pick
It may seem counterintuitive, but the better at Git you get, the more merge conflicts you're likely to encounter. That's because merge conflicts aren't necessarily signs of errors but signs of activity. Getting comfortable with merge conflicts and how to resolve them is an important step in learning Git. The usual methods work well, but sometimes you need greater flexibility in how you merge, and for that, there's [git cherry-pick][9]. Cherry-picking merges allows you to be selective in what parts of commits you merge, so you never have to reject a merge request based on a trivial incongruity.
### 5\. Managing $HOME with Git
Managing your home directory with Git has never been easier, and thanks to Git's ability to be selective in what it manages, it's a realistic option for keeping your computers in sync. To work well, though, you must do it judiciously. To get started, read my tips on [managing $HOME with Git][10].
### Getting better at Git
Git is a powerful version-control system, and the more comfortable you become with it, the easier it becomes to use it for complex tasks. Try some new Git commands today, and share your favorites in the comments.
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/4/git-commands
作者:[Seth Kenlon][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/seth
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/lenovo-thinkpad-laptop-concentration-focus-windows-office.png?itok=-8E2ihcF (Woman using laptop concentrating)
[2]: https://opensource.com/article/19/10/how-gnome-uses-git
[3]: https://opensource.com/article/18/2/how-clone-modify-add-delete-git-files
[4]: https://opensource.com/article/18/5/git-branching
[5]: https://opensource.com/life/16/8/how-construct-your-own-git-server-part-6
[6]: https://opensource.com/article/21/3/git-whatchanged
[7]: https://opensource.com/article/21/3/git-stash
[8]: https://opensource.com/article/21/3/git-worktree
[9]: https://opensource.com/article/21/3/reasons-use-cherry-picking
[10]: https://opensource.com/article/21/3/git-your-home

View File

@ -1,207 +0,0 @@
[#]: subject: "Solve the repository impedance mismatch in CI/CD"
[#]: via: "https://opensource.com/article/21/8/impedance-mismatch-cicd"
[#]: author: "Evan "Hippy" Slatis https://opensource.com/users/hippyod"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Solve the repository impedance mismatch in CI/CD
======
Aligning deployment images and descriptors can be difficult, but here
are few strategies to streamline the process.
![Tips and gears turning][1]
An _impedance mismatch_ in software architecture happens when there's a set of conceptual and technical difficulties between two components. It's actually a term borrowed from electrical engineering, where the impedance of electrical input and output must match for the circuit to work.
In software development, an impedance mismatch exists between images stored in an image repository and its deployment descriptors stored in the SCM. How do you know whether the deployment descriptors stored in the SCM are actually meant for the image in question? The two repositories don't track the data they hold the same way, so matching an image (an immutable binary stored individually in an image repository) to its specific deployment descriptors (text files stored as a series of changes in Git) isn't straightforward.
**NOTE**: This article assumes at least a passing familiarity with the following concepts:
* Source Control Management (SCM) systems and branching
* Docker/OCI-compliant images and containers
* Container Orchestration Platforms (COP) such as Kubernetes
* Continuous Integration/Continuous Delivery (CI/CD)
* Software development lifecycle (SDLC) environments
### Impedance mismatch: SCM and image repositories
To fully understand where this becomes a problem, consider a set of basic Software Development LifeCycle (SDLC) environments typically used in any given project; for example, dev, test, and prod (or release) environments.
The dev environment does not suffer from an impedance mismatch. Best practices, which today include using CI/CD, dictate that the latest commit to your development branch should reflect what's deployed in the development environment. So, given a typical, successful CI/CD development workflow:
1. A commit is made to the development branch in the SCM
2. The commit triggers an image build
3. The new, distinct image is pushed to the image repository and tagged as being in dev
4. The image is deployed to the dev environment in a Container Orchestration Platform (COP) with the latest deployment descriptors pulled from the SCM
In other words, the latest image is always matched to the latest deployment descriptors in the development environment. Rolling back to a previous build isn't an issue, either, because that implies rolling back the SCM, too.
Eventually, though, development progresses to the point where more formal testing needs to occur, so an image—which implicitly relates to a specific commit in the SCM—is promoted to a test environment. Again, assuming a successful build, this isn't much of a problem because the image promoted from development should reflect the latest in the development branch:
1. The latest deployment to development is approved for promotion, and the promotion process is triggered
2. The latest development image tagged as being in test
3. The image is pulled and deployed to the test environment using the latest deployment descriptors pulled from the SCM
So far, so good, right? But what happens in either of the following scenarios?
**Scenario A**. The image is promoted to the next downstream environment, e.g., user acceptance testing (UAT) or even a production environment.
**Scenario B**. A breaking bug is discovered in the test environment, and the image needs to be rolled back to a known good image.
In either scenario, it's not as if development has stopped, which means one or more commits to the development branch may have occurred, which in turn means it's possible the latest deployment descriptors have changed, and the latest image isn't the same as what was previously deployed in test. Changes to the deployment descriptors may or may not apply to older versions of an image, but they certainly can't be trusted. If they have changed, they certainly aren't the same deployment descriptors you've been testing with up to now with the image you want to deploy.
And that's the crux of the problem: I**f the image being deployed isn't the latest from the image repository, how do you identify which deployment descriptors in the SCM apply specifically to the image being deployed?** The short answer is, you can't. The two repositories have an impedance mismatch. The longer answer is that you can, but you have to work for it, which will be the subject of the rest of this article. Note that the following isn't necessarily the only solution to this problem, but it has been put into production and proven to work for dozens of projects that, in turn, have been built and deployed in production for more than a year now.
### Binaries and deployment descriptors
A common artifact produced from building source code is a Docker or OCI-compliant image, and that image will typically be deployed to a Container Orchestration Platform (COP) such as Kubernetes. Deploying to a COP requires deployment descriptors defining how the image is to be deployed and run as a container, e.g., [Kubernetes Deployments][2] or [CronJobs][3]. It is because of the fundamental difference between what an image is and its deployment descriptors where the impedance mismatch manifests itself. For this discussion, think of images as immutable binaries stored in an image repository. Any change in the source code does not change the image but rather replaces it with a distinct, new image.
By contrast, deployment descriptors are text files and thus can be considered source code and mutable. If best practices are being followed, then the deployment descriptors are stored in SCM, and all changes are committed there first to be properly tracked.
### Solving the impedance mismatch
The first part of the proposed solution is to ensure that a method exists of matching the image in the image repository to the source commit in the SCM, which holds the deployment descriptors. The most straightforward solution is to tag the image with its source commit hash. This will keep different versions of the image separate, easily identifiable, and provide enough information to find the correct deployment descriptors so that the image can be properly deployed in the COP.
Reviewing the scenarios above again:
**Scenario A**. _Promoting an image from one downstream environment to the next_: When the image is promoted from test to UAT, the image's tag tells us from which source commit in the SCM to pull the deployment descriptors.
**Scenario B**. _When an image needs to be rolled back in a downstream environment_: Whichever image we choose to roll back to will also tell us from which source commit in the SCM to pull the correct deployment descriptors.
In each case, it doesn't matter how many development branch commits and builds have taken place since a particular image has been deployed in test since every image that's been promoted can find the exact deployment descriptors it was originally deployed with.
This isn't a complete solution to the impedance mismatch, however. Consider two additional scenarios:
**Scenario C**. In a load testing environment, different deployment descriptors are tried at various times to see how a particular build performs.
**Scenario D**. An image is promoted to a downstream environment, and there's an error in the deployment descriptors for that environment.
In each of these scenarios, changes need to be made to the deployment descriptors, but right now all we have is a source commit hash. Remember that best practices require all source code changes to be committed back to SCM first. The commit at that hash is immutable by itself, so a better solution than just tracking the initial source commit hash is clearly needed.
The solution here is a new branch created at the original source commit hash. This will be dubbed a **Deployment Branch**. Every time an image is promoted to a downstream test or release environment, you should create a new Deployment Branch **from the head of the previous SDLC environment's Deployment Branch**.
This will allow the same image to be deployed differently and repeatedly within each SDLC environment and also pick up any changes discovered or applied for that image in each subsequent environment.
**NOTE:** How changes applied in one environment's deployment descriptors are applied to the next, whether by tools that enable sharing values such as Helm Charts or by manually cutting and pasting across directories, is beyond the scope of this article.
So, when an image is promoted from one SDLC environment to the next:
1. A Deployment Branch is created
1. If the image is being promoted from the dev environment, the branch is created from the source commit hash that built the image
2. Otherwise, _the Deployment Branch is created from the head of the current Deployment Branch_
2. The image is deployed into the next SDLC environment using the deployment descriptors from the newly created Deployment Branch for that environment
![deployment branching tree][4]
Figure 1: Deployment branches
1. Development branch
2. First downstream environment's Deployment Branch with a single commit
3. Second downstream environment's Deployment Branch with a single commit
Revisiting Scenarios C and D from above with Deployment Branches as a solution:
**Scenario C**. Change the deployment descriptors for an image deployed to a downstream SDLC environment
**Scenario D**. Fix an error in the deployment descriptors for a particular SDLC environment
In each scenario, the workflow is as follows:
1. Commit the changes to the deployment descriptors to the Deployment Branch for the SLDC environment and image
2. Redeploy the image into the SLDC environment using the deployment descriptors at the head of the Deployment Branch
Thus, Deployment Branches fully resolve the impedance mismatch between image repositories storing a single, immutable image representing a unique build and SCM repositories storing mutable deployment descriptors for one more downstream SDLC environments.
### Practical considerations
While this seems like a workable solution, it also opens up several new practical questions for developers and operations resources alike, such as:
A. Where should deployment descriptors be kept as source to best facilitate Deployment Branch management, i.e., in the same or a different SCM repository than the source that built the image?
Up until now, we've avoided speaking about which repository the deployment descriptors should reside. Without going into too much detail, we recommend putting the deployment descriptors for all SDLC environments into the same SCM repository as the image source. As Deployment Branches are created, the source for the images will follow and act as an easy-to-find reference for what is actually running in the container being deployed.
As mentioned above, images will be associated with the original source commit via their tag. Finding the reference for the source at a particular commit in a separate repository would add a level of difficulty to developers, even with tooling, which is unnecessary by keeping everything in a single repository.
B. Should the source code that built the image be modified on a Deployment Branch?
Short answer: **NEVER**.
Longer answer: No, because images should never be built from Deployment Branches. They're built from development branches. Changing the source that defines an image in a Deployment Branch will destroy the record of what built the image being deployed and doesn't actually modify the functionality of the image. This could also become an issue when comparing two Deployment Branches from different versions. It might give a false positive for differences in functionality between them (a small but additional benefit to using Deployment Branches).
C. Why an image tag? Couldn't image labels be used?
Tags are easily readable and searchable for images stored in a repository. Reading and searching for labels with a particular value over a group of images requires pulling the manifest for each image, which adds complexity and reduces performance. Also, tagging images for different versions is still necessary for historical record and finding different versions, so using the source commit hash is the easiest solution that guarantees uniqueness while also containing instantly useful information.
D. What is the most practical way to create Deployment Branches?
The first three rules of DevOps are _automate_, _automate_, _automate_.
Relying on resources to enforce best practices uniformly is hit and miss at best, so when implementing a CI/CD pipeline for image promotion, rollback, etc., incorporate automated Deployment Branching into the script.
E. Any suggestions for a naming convention for Deployment Branches?
&lt;_**deployment-branch-identifier**_&gt;-&lt;_**env**_&gt;-&lt;_**src-commit-hash**_&gt;
* _**deployment-branch-identifier:**_ A unique string used by every Deployment Branch to identify it as a Deployment Branch; e.g. 'deployment' or 'deploy'
* _**env:**_ The SDLC environment the Deployment Branch pertains to; e.g. 'qa', 'stg', or' prod' for the test, staging, and production environments, respectively
* _**src-commit-hash:**_ The source code commit hash that holds the original code that built the image being deployed, which allows developers to easily find the original commit that created the image while ensuring the branch name is unique
For example, _**deployment-qa-asdf78s**_ or _**deployment-stg-asdf78s**_ for Deployment Branches promoted to the QA and STG environments, respectively.
F. How do you tell which version of the image is running in the environment?
Our suggestion is to [label][5] all your deployment resources with the latest Deployment Branch commit hash and the source commit hash. These two unique identifiers will allow developers and operations personnel to find everything that was deployed and from where. It also makes cleanup of resources trivial using those selectors on deployments of different versions, e.g., on rollback or roll forward operations.
G. When is it appropriate to merge changes from Deployment Branches back into the development branch?
It's completely up to the development team on what makes sense.
If you're making changes for load testing purposes just to see what will break your application, for example, then those changes may not be the best thing to merge back into the development branch. On the other hand, if you find and fix an error or tune a deployment in a downstream environment, merging the Deployment Branch changes back into the development branch makes sense.
H. Is there a working example of Deployment Branching to test with first?
[el-CICD][6] has been successfully using this strategy for a year and a half in production for more than a hundred projects across all SDLC downstream environments, including managing deployments to production. If you have access to an [OKD][7], Red Hat OpenShift lab cluster, or [Red Hat CodeReady Containers][8], you can download the [latest el-CICD version][9] and run through the [tutorial][10] to see how and when Deployment Branches are created and used.
### Wrap up
Using the working example above would be a good exercise to help you better understand the issues surrounding impedance mismatches in development processes. Maintaining alignment between images and deployment descriptors is a critical part of successfully managing deployments.
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/8/impedance-mismatch-cicd
作者:[Evan "Hippy" Slatis][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/hippyod
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/gears_devops_learn_troubleshooting_lightbulb_tips_520.png?itok=HcN38NOk (Tips and gears turning)
[2]: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/
[3]: https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/
[4]: https://opensource.com/sites/default/files/picture1.png
[5]: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
[6]: https://github.com/elcicd
[7]: https://www.okd.io/
[8]: https://cloud.redhat.com/openshift/create/local
[9]: https://github.com/elcicd/el-CICD-RELEASES
[10]: https://github.com/elcicd/el-CICD-docs/blob/master/tutorial.md

View File

@ -1,97 +0,0 @@
[#]: subject: "How to Completely Uninstall Google Chrome From Ubuntu"
[#]: via: "https://itsfoss.com/uninstall-chrome-from-ubuntu/"
[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
How to Completely Uninstall Google Chrome From Ubuntu
======
So, you managed to [install Google Chrome on Ubuntu][1]. It is the most popular web browser in the world, after all.
But perhaps you dislike Google products for the heavy tracking and data mining they employ on its users. You decided to opt for [other web browsers on Ubuntu][2], perhaps a [non-Chromium browser][3].
Now that you are no longer using it, it would be wise to remove [Google Chrome][4] from Ubuntu.
How to do that? Let me show you the steps.
### Remove Google Chrome completely from Ubuntu
![Illustration for removing Google Chrome from Ubuntu][5]
You probably installed Google Chrome graphically. Unfortunately, youll have to resort to command line for removing it, unless you opt to [use Synaptic Package Manager][6].
It is not too difficult. Press the [Ctrl+Alt+T keyboard shortcut in Ubuntu to open a terminal][7].
Type the following command in the terminal:
```
sudo apt purge google-chrome-stable
```
It asks for a password. It is your user accounts password, the one which you use to log in to your Ubuntu system.
When you type the password, nothing is displayed on the screen. This is normal behavior in Linux. Just type the password blindly and press enter.
It will ask you to confirm the removal of Google Chrome by entering Y or simply pressing the enter key.
![Removing Google Chrome for Ubuntu][8]
This will remove Google Chrome from your Ubuntu Linux system along with most of the system files.
However, the personal setting files remain in your home directory. This includes things like cookie sessions, bookmarks and other Chrome related settings for your user account. If you install Google Chrome again, the same files could be used by Chrome again.
![Google Chrome leftover settings in Ubuntu][9]
If you want to completely uninstall Google Chrome, you may want to remove these files as well. Heres what you should do.
Change to the .config directory. _**Mind the dot before config**_. Thats the [way to hide files and folders in Linux][10].
```
cd ~/.config
```
And now remove the google-chrome directory:
```
rm -rf google-chrome
```
![Removing the leftover Google Chrome settings from Ubuntu][11]
You could have also used rm -rf ~/.config/google-chrome to delete it in one single command. Since this tutorial is focused on absolute beginners, I made it in two steps to reduce the error margin because of a typo.
Tip
Want to make your terminal look beautiful like the ones in the screenshot? Use these [terminal customization tips][12].
I hope this quick beginner tip helped you to get rid of Google Chrome from Ubuntu Linux.
--------------------------------------------------------------------------------
via: https://itsfoss.com/uninstall-chrome-from-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-chrome-ubuntu/
[2]: https://itsfoss.com/best-browsers-ubuntu-linux/
[3]: https://itsfoss.com/open-source-browsers-linux/
[4]: https://www.google.com/chrome/index.html
[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/09/removing-google-chrome-ubuntu.png?resize=800%2C450&ssl=1
[6]: https://itsfoss.com/synaptic-package-manager/
[7]: https://itsfoss.com/open-terminal-ubuntu/
[8]: https://itsfoss.com/wp-content/uploads/2021/09/remove-google-chrome-ubuntu.webp
[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/09/google-chrome-ubuntu-leftover-settings.png?resize=800%2C518&ssl=1
[10]: https://itsfoss.com/hide-folders-and-show-hidden-files-in-ubuntu-beginner-trick/
[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/09/remove-google-chrome-leftover-settings-from-Ubuntu.png?resize=800%2C277&ssl=1
[12]: https://itsfoss.com/customize-linux-terminal/

View File

@ -1,288 +0,0 @@
[#]: subject: "How I migrated a WordPress website to a new host"
[#]: via: "https://opensource.com/article/21/9/migrate-wordpress"
[#]: author: "David Both https://opensource.com/users/dboth"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
How I migrated a WordPress website to a new host
======
Use this simple approach to migrate a website and manage firewall
configurations.
![Text editor on a browser, in blue][1]
Have you ever needed to migrate a WordPress website to a new host? I have done it several times and found the process to be quite easy. Of course, I don't use the recommended methods for doing most things, and this is no exceptionI use the easy way, and that is what I recommend.
This migration is non-destructive, so it is simple to revert to the original server if that should be necessary for any reason.
### Components of a WordPress website
Three main components are required to run a website based on [WordPress][2]: WordPress itself, a webserver such as [Apache][3] (which I use), and the [MariaDB][4]. MariaDB is a fork of MySQL and is functionally equivalent.
There are plenty of webservers out there, but I prefer Apache because I have used it for so long. You may need to adapt the Apache configuration I use here to whatever webserver you are using.
### The original setup
I use one Linux host as a firewall and router for my network. The webserver is a different host inside my network. My internal network uses what used to be called a class C private network address range, but which is simply referred to as 192.168.0.0/24 in the [Classless Internet Domain Routing (CIDR)][5] methodology.
For the firewall, I use the very simple [IPTables][6], which I prefer over the much more complex `firewalld`. One line in this firewall configuration sends incoming packets on port 80 (HTTP) to the webserver. As you can see by the comments, I placed rules to forward other inbound server connections to the same server on their appropriate ports in the `/etc/sysconfig/iptables` file.
```
# Reroute ports for inbound connections to the appropriate web/email/etc server.
# HTTPD goes to 192.168.0.75
-A PREROUTING -d 45.20.209.41/255.255.255.248 -p tcp -m tcp --dport 80 \
  -j DNAT --to-destination 192.168.0.75:80
```
I set up my original Apache webserver using named virtual hosts because I served multiple websites from this one HTTPD instance. It is always a good idea to use the named virtual host configuration approach because, like me, you may decide to host additional sites later, and this process makes that easier to do.
The virtual host stanza for the website to be moved in `/etc/httpd/conf/httpd.conf` looks like the one below. There are no IP addresses in this stanza, so it needs no changes for use on the new server.
```
&lt;VirtualHost *:80&gt;
   ServerName [www.website1.org][7]
   ServerAlias server.org
DocumentRoot "/var/website1/html"
   ErrorLog "logs/error_log"
   ServerAdmin [me@website1.org][8]
 
&lt;Directory "/var/website1/html"&gt;
      Options Indexes FollowSymLinks
 
AllowOverride None
      Require all granted
 
&lt;/Directory&gt;
&lt;/VirtualHost&gt;
```
The `Listen` directive near the top of the `httpd.conf` file looks like this before the migration. This is the actual IP private address of the server and not the public IP address.
```
`Listen 192.168.0.75:80`
```
You need to change the `Listen` IP address on the new host.
### Preparation
The preparation can be accomplished with three steps:
* Install the services.
* Configure the firewall.
* Configure the webserver.
#### Install Apache and MariaDB
Install Apache and MariaDB if they are not already on your new server. It is not necessary to install WordPress.
```
`dnf -y install httpd mariadb`
```
#### New server firewall configuration
Ensure that the firewall on the new server allows port 80. You do have a firewall on _all_ of your computers, right? Most modern distributions use an initial setup that includes a firewall that blocks all incoming traffic to ensure a higher level of security.
The first line in the snippet below may already be part of your IPTables or other netfilter-based firewall. It identifies inbound packets that have already been recognized as coming from an acceptable source and bypasses additional INPUT filter rules, thus saving time and CPU cycles. The last line in the snippet identifies new incoming connections to HTTPD on port 80 and accepts them.
```
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
&lt;snip&gt;
# HTTP
-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
```
The following sample `/etc/sysconfig/iptables` file is an example of a minimal set of IPTables rules that allow incoming connections on SSH (port 22) and HTTPD (port 80) .
```
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
# SSHD
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
# HTTP
-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
# Final disposition for unmatched packets
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
```
All I needed on my new server host was to add the last line in the snippet above to my firewall rules in the `/etc/sysconfig/iptables` file and then reload the revised ruleset.
```
`iptables-restore /etc/sysconfig/iptables`
```
Most current Red Hat-based distributions, such as Fedora, use `firewalld`. I don't use it because I find it far more complex than it needs to be for use cases such as home or small to medium businesses. To add inbound port 80 to `firewalld`, I suggest you refer to the [firewalld web page][9].
Your firewall and its configuration details might differ from these, but the objective is to allow incoming connections to HTTPD on port 80 of the new web server.
#### HTTPD configuration
Configure HTTPD in the `/etc/httpd/conf/httpd.conf` file. Set the IP address in the Listen stanza as shown below. The IP address of my new web server is 192.168.0.125.
```
`Listen 192.168.0.125:80`
```
Copy the VirtualHost stanza for the website being moved and paste it at the end of the `httpd.conf` file of the new server.
### The move
Only two sets of data need to be moved to the new server—the database itself and the website directory structure. Create `tar` archives of the two directories.
```
cd /var ; tar -cvf /tmp/website.tar website1/
cd /var/lib ; tar -cvf /tmp/database.tar mysql/
```
Copy those tarballs to the new server. I usually store files like this in `/tmp`, which is what it is for. Run the following commands on the new server to extract the files from the tar archives into the correct directories.
```
cd /var ; tar -xvf /tmp/website.tar
cd /var/lib ; tar -xvf /tmp/database.tar
```
All WordPress files are contained in the `/var/website1`, so they do not need to be installed on the new server. The WordPress installation procedure does not need to be performed on the new server.
This directory is all that needs to be moved to the new server.
The last step before making the switch is to start (or restart) the `mysqld` and `httpd` service daemons. WordPress is not a service, so it is not started as a daemon.
```
`systemctl start mysqld ; systemctl start httpd`
```
You should check the status of these services after starting them.
```
systemctl status mysqld
● mariadb.service - MariaDB 10.5 database server
    Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
    Active: active (running) since Sat 2021-08-21 14:03:44 EDT; 4 days ago
        Docs: man:mariadbd(8)
<https://mariadb.com/kb/en/library/systemd/>
   Process: 251783 ExecStartPre=/usr/libexec/mariadb-check-socket (code=exited, status=0/SUCCESS)
   Process: 251805 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir mariadb.service (code=exited, status=0/SUCCESS)
   Process: 251856 ExecStartPost=/usr/libexec/mariadb-check-upgrade (code=exited, status=0/SUCCESS)
 Main PID: 251841 (mariadbd)
      Status: "Taking your SQL requests now..."
      Tasks: 15 (limit: 19003)
    Memory: 131.8M
        CPU: 1min 31.793s
    CGroup: /system.slice/mariadb.service
└─251841 /usr/libexec/mariadbd --basedir=/usr
Aug 21 14:03:43 simba.stmarks-ral.org systemd[1]: Starting MariaDB 10.5 database server...
Aug 21 14:03:43 simba.stmarks-ral.org mariadb-prepare-db-dir[251805]: Database MariaDB is probably initialized in /var/lib/mysql already, n&gt;
Aug 21 14:03:43 simba.stmarks-ral.org mariadb-prepare-db-dir[251805]: If this is not the case, make sure the /var/lib/mysql is empty before&gt;
Aug 21 14:03:44 simba.stmarks-ral.org mariadbd[251841]: 2021-08-21 14:03:44 0 [Note] /usr/libexec/mariadbd (mysqld 10.5.11-MariaDB) startin&gt;
Aug 21 14:03:44 simba.stmarks-ral.org systemd[1]: Started MariaDB 10.5 database server.
systemctl status httpd
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
   Drop-In: /usr/lib/systemd/system/httpd.service.d
└─php-fpm.conf
      Active: active (running) since Sat 2021-08-21 14:08:39 EDT; 4 days ago
        Docs: man:httpd.service(8)
   Main PID: 252458 (httpd)
      Status: "Total requests: 10340; Idle/Busy workers 100/0;Requests/sec: 0.0294; Bytes served/sec: 616 B/sec"
        Tasks: 278 (limit: 19003)
      Memory: 44.7M
        CPU: 2min 31.603s
   CGroup: /system.slice/httpd.service
├─252458 /usr/sbin/httpd -DFOREGROUND
├─252459 /usr/sbin/httpd -DFOREGROUND
├─252460 /usr/sbin/httpd -DFOREGROUND
├─252461 /usr/sbin/httpd -DFOREGROUND
├─252462 /usr/sbin/httpd -DFOREGROUND
└─252676 /usr/sbin/httpd -DFOREGROUND
Aug 21 14:08:39 simba.stmarks-ral.org systemd[1]: Starting The Apache HTTP Server...
Aug 21 14:08:39 simba.stmarks-ral.org httpd[252458]: AH00112: Warning: DocumentRoot [/var/teststmarks-ral/html] does not exist
Aug 21 14:08:39 simba.stmarks-ral.org httpd[252458]: Server configured, listening on: port 80
Aug 21 14:08:39 simba.stmarks-ral.org systemd[1]: Started The Apache HTTP Server.
```
### Making the final switch
Now that the required services are up and running, you can change the firewall rule for HTTPD to the following in the `/etc/sysconfig/iptables` file.
```
-A PREROUTING -d 45.20.209.41/255.255.255.248 -p tcp -m tcp --dport 80 \
  -j DNAT --to-destination 192.168.0.125:80
```
Then reload the IPTables rule set.
```
`iptables-restore /etc/sysconfig/iptables`
```
Because of the firewall rules in the firewall host, it is not necessary to change the external DNS entries to point to the new server. If you use an internal DNS server, you will need to make the IP address change to that A record in your internal DNS database. If you don't use an internal DNS server, be sure to set the correct address for your new server in the `/etc/hosts` files of your host computers.
### Testing and cleanup
Be sure to test your new setup. First, turn off the `mysqld` and `httpd` services on the old server. Then access the website with a browser. If everything works as it should, you can disable `mysqld` and `httpd` on the old server. If there is a failure, you can change the IPTables routing rule back to the old server until the problem is fixed.
I then removed both MySQL and HTTPD from the old server to ensure that they cannot be started accidentally.
### Conclusion
It really is that simple. There is no need to perform export or import procedures on the database because everything necessary is copied over in the `mysql` directory. The only reason you might want to deal with the export/import procedure is if there are databases other than those for the website or sites in the same instance of the MariaDB that you don't want copied to the new server.
Migrating the rest of the websites served by the old server is easy too. All of the databases required for the additional sites have already been moved over with MariaDB. It is only necessary to move the `/var/website` directories to the new server, add the appropriate virtual host stanzas, and restart HTTPD.
I have used this procedure multiple times for migrating a website from one server to another, and it always works well.
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/9/migrate-wordpress
作者:[David Both][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/dboth
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_blue_text_editor_web.png?itok=lcf-m6N7 (Text editor on a browser, in blue)
[2]: https://wordpress.org/
[3]: https://opensource.com/article/18/2/how-configure-apache-web-server
[4]: https://mariadb.org/
[5]: https://opensource.com/article/16/12/cidr-network-notation-configuration-linux
[6]: https://en.wikipedia.org/wiki/Iptables
[7]: http://www.website1.org
[8]: mailto:me@website1.org
[9]: https://firewalld.org/documentation/howto/open-a-port-or-service.html

View File

@ -1,216 +0,0 @@
[#]: subject: "How to Install and Use Latte Dock on Ubuntu and Other Linux Distributions"
[#]: via: "https://itsfoss.com/install-use-latte-dock-ubuntu/"
[#]: author: "Pratham Patel https://itsfoss.com/author/pratham/"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
How to Install and Use Latte Dock on Ubuntu and Other Linux Distributions
======
You know what docks are, right? It is usually the bottom bar where your applications are docked for quick access.
![][1]
Many distributions and desktop environments provide some sort of docking implementation. If your distribution does not have a Dock or if you want to experiment with some other Dock applications, Latte dock is a good choice. It is similar to the dock on macOS with a **parabolic animation every time you hover over any dock object** with your mouse.
In this tutorial, Ill show you how to install Latte Dock on Ubuntu. Ill also show some a few things about using and customizing Latte Dock.
### Install Latte Dock on Ubuntu
[Latte dock][2] is a popular application and available from the official repository of most Linux distributions. This means that you can use your distributions software center or package manager to install Latte dock.
![Latte is available from the software center][3]
On Ubuntu and other distributions that are based on Ubuntu such as elementary OS, Linux Mint, Pop!_OS, Zorin OS, use the apt command:
```
sudo apt install latte-dock
```
Done! You now have Latte Dock installed on Ubuntu.
#### Disable Ubuntu dock (for Ubuntu users)
Before you start your shiny new dock, I advise that you disable the dock that ships with Ubuntu by default. Here is a [guide on how to disable the dock on Ubuntu][4].
To disable the dock, type this in your terminal
```
gnome-extensions disable [email protected]
```
If you end up changing your mind, you can enable the Ubuntu dock again with the following command
```
gnome-extensions enable [email protected]
```
NOTE
The default dock on Pop!_OS 20.04 LTS can not be disabled (although, it is hidden by default on the desktop; only visible in the activities overview). On Pop!_OS with the COSMIC DE/Extension, you can disable or enable the dock by going in the Settings app, under Desktop -&gt; Dock.
### Start using Latte Dock
I am using Pop!_OS in the tutorial but the steps are applicable to any Linux distribution.
Once installed, you will find a launcher icon for Latte Dock in your Applications Drawer. You can either access it through the dock or press the Super (usually the Windows key; or Command key if you have a Mac keyboard) Key + A.
Open Latte Dock from here.
![Latte dock highlighted in the app drawer][5]
Cool! You now have Latte Dock open on your desktop.
![Screenshot of Latte Dock on the desktop][6]
#### Enable autostart for Latte Dock
With Latte Dock now open and Ubuntu Dock disabled, if you reboot now, you will not have any dock next time your computer turns on.
Lets fix that right now.
Perform a right click on the dock. Click on the Configure option under the Layouts sub menu.
![Launching the Settings panel window by going in Layouts > Configure][7]
Now, under the Preferences tab, make sure that the “Enable autostart during startup” checkbox is checked.
![Enable autostart during startup checkbox enabled][8]
### Customize your dock
If you install any KDE product, customization is expected to be endless. It would be odd if Latte Dock wouldnt allow customization. Fortunately, that is not the case.
You can do a wide variety of things to customize Latte Dock. Increase its size, make it more transparent or translucent, theme it, and much more.
#### Pinning apps to the dock
To pin your application to the Latte Dock, open said application and right click on the application icon that is in your dock. Now click on Pin Launcher. Done! Your application is now pinned to the dock.
![Right click the running app and select Pin Launcher option][9]
You can change its position in the dock by moving it to the left or right with the click and drag movement.
#### Search and install themes for Latte Dock
Open the Latte Docks Settings window by right clicking on the dock, clicking on the Configure option under the Layout sub menu.
You may already a few themes (err… layout) installed. Select it from the list of installed options and click on the Switch button on the right side.
![change themes latte dock][10]
You may also download more themes by clicking the Download button. It should show you a list of available themes for installation.
![Latte Dock Add On Installer window][11]
#### Change dock appearance and behavior
As I mentioned earlier, there are a huge amount of customization options in KDE products.
Lets play with some, shall we?
Right click on the dock and click on “Dock Settings”
![Access Latte Dock settings by right clicking the dock][12]
Here, you will get all types of options to toggle. Want to move dock to the left side of your monitor? You can do that with the options provided under the Location sub menu.
![The Dock settings and customization window][13]
If you feel limited in any way regarding the available options, toggle the switch at the top right corner that says Advanced.
![The Dock settings and customization window with advanced options now visible][14]
Now THAT is awesome!
Try playing with every available toggle. You can hide the dock after a delay. You can place it to an edge of your monitor, place it to the center of that edge, to the left or right. You can do that all.
Want to tinker with launch, hover etc effects? More options to tinker with await for you under the Effects tab.
### Remove Latte Dock from your system
You installed Latte Dock, customized it but felt it was not what you were looking for. And, now you are looking to remove Latte Dock. Thats fine. I got you.
You can remove Latte Dock using the apt package manager. Do that with the following command:
```
sudo apt autoremove --purge latte-dock
```
![][15]
The purge flag will remove any configuration files that Latte Dock had in the system directories except for ~/.config.
#### For advanced users only: removing user specific leftover files
This is not mandatory but if you want to remove the user config files that are usually placed in your $HOME/.config (AKA ~/.config) directory. [Use find command][16] to locate Latte Docks config files.
```
find ~/.config -iname "latte*"
```
![][17]
You can safely remove these directory and config files from your `~/.config` directory.
#### For Ubuntu users: Re-enable the Ubuntu dock
Dont forget to enable the stock Ubuntu dock. In case you dont remember, the command to enable the dock again is down below:
```
gnome-extensions enable [email protected]
```
### Conclusion
Latte Dock is an amazing dock from the KDE kommunity ( ͡° ͜ʖ ͡°)
It offers a lot of theme-ing (layout), appearance, customization options along with some nice effects. It is certainly something that you should look for, if you are thinking of customizing your stock desktop look and feel.
If you end up loving Latte Dock and start using it every day, do let me know in the comments. And, if in any case you dont like Latte Dock, let me know why, with a comment.
--------------------------------------------------------------------------------
via: https://itsfoss.com/install-use-latte-dock-ubuntu/
作者:[Pratham Patel][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/pratham/
[b]: https://github.com/lujun9972
[1]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/latte-dock.webp?resize=800%2C167&ssl=1
[2]: https://invent.kde.org/plasma/latte-dock
[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/latte-ubuntu-software-center.png?resize=800%2C384&ssl=1
[4]: https://itsfoss.com/disable-ubuntu-dock/
[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/02_latte_in_drawer.webp?resize=800%2C450&ssl=1
[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/03_latte_dock_launched.webp?resize=800%2C450&ssl=1
[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/configure-latte-dock.png?resize=800%2C392&ssl=1
[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/enable_autostart_latte_dock.webp?resize=800%2C433&ssl=1
[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/pin-app-latte-dock.webp?resize=800%2C334&ssl=1
[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/change-themes-latte-dock.webp?resize=800%2C393&ssl=1
[11]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/08_download_layouts.webp?resize=800%2C450&ssl=1
[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/latte_dock_settings.webp?resize=799%2C246&ssl=1
[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/11_customization_options.webp?resize=800%2C450&ssl=1
[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/12_customization_options_advanced.webp?resize=800%2C450&ssl=1
[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/15_apt_get_remove.webp?resize=800%2C450&ssl=1
[16]: https://linuxhandbook.com/find-command-examples/
[17]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/13_find_configs.webp?resize=800%2C450&ssl=1

View File

@ -1,414 +0,0 @@
[#]: subject: "Vanilla Vim is fun"
[#]: via: "https://opensource.com/article/21/12/vanilla-vim-config"
[#]: author: "Lukáš Zapletal https://opensource.com/users/lzap"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Vanilla Vim is fun
======
Here's how I dropped from 35 Vim plugins to just six.
![Person drinking a hot drink at the computer][1]
When you start Vim with the `--clean` option, it shows up in "vanilla" mode. No plugins, no configuration, just back to the roots. I have collected a ton of configuration statements over the years, some of them dating from MS-DOS or Windows 3.1. Here is the deal: I will start from scratch to find a good starting-point configuration with just the plugins available in Fedora 35. Will I survive a week of coding? I'll find out!
Here are the rules: Minimum possible configuration statements and only plugins which ship with Fedora 35+. By the way, if you are not a Fedora user, continue reading. You can always install these plugins from your OS package manager manually or using a Vim plugin manager.
Before I start, there's the elephant in the room: Vim or Neovim (fork of Vim) question. Well, this is up to you. Everything that is in this article should work for both. However, I only tested with Vim. All the skills will come in handy when you log on to a server where only `vi` is available. It can be either an old UNIX system, a Linux server with minimum software installed for better security, an interactive shell in a container, or an embedded system where space is precious.
Without further ado, here is what I distilled to the absolute bare minimum to be effective with Vim for coding:
```
# dnf install --allowerasing vim-default-editor \
        vim-enhanced \
        vim-ctrlp \
        vim-airline \
        vim-trailing-whitespace \
        vim-fugitive \
        vim-ale \
        ctags
```
Do not worry about the `--allowerasing` option. Just review the installation transaction before confirming. This option is there to tell the package manager to replace the existing package `nano-default-editor` with `vim-default-editor`. It is a small package that drops shell configuration files to set the EDITOR environment variable to `vim`, and this is a must-have if you want to use Vim (for example, with git). This is a special thing for Fedora. You will not need to do this on other distributions or OSes—just make sure your EDITOR shell variable is correctly set.
### Overview
A quick overview of what I consider a good and clean plugin set:
* **CtrlP**: Smallest possible fuzzy-finder plugin (pure vimscript)
* **Fugitive**: A must-have tool for git
* **Trailing-whitespace**: Shows and fixes, well, trailing whitespace
* **Airline**: An improved status line (pure vimscript)
* **Ale**: Highlights typos or syntax errors as you type
* **Ctags**: Not a Vim plugin but a very much needed tool
There are other fuzzy-finder plugins like command-t or my favorite (very fast) `fzf.vim`. The thing is, `fzf.vim` is not in Fedora, and I want the smallest possible configuration. CtrlP will do just fine, and it is much easier to configure as it requires nothing.
If I were to choose an absolute minimum configuration it would be:
```
# cat ~/.vimrc
let mapleader=","
let maplocalleader="_"
filetype plugin indent on
let g:ctrlp_map = '&lt;leader&gt;&lt;leader&gt;'
let g:ctrlp_user_command = ['.git/', 'git --git-dir=%s/.git ls-files -oc --exclude-standard']
set exrc
set secure
```
But that is probably too extreme, so here is a slightly bigger configuration with my detailed explanation below:
```
" vim: nowrap sw=2 sts=2 ts=2 et:
" leaders
let mapleader=","
let maplocalleader="_"
" filetype and intent
filetype plugin indent on
" incompatible plugins
if has('syntax') &amp;&amp; has('eval')
  packadd! matchit
end
" be SSD friendly (can be dangerous!)
"set directory=/tmp
" move backups away from projects
set backupdir=~/.vimbackup
" fuzzy searching
let g:ctrlp_map = '&lt;leader&gt;&lt;leader&gt;'
let g:ctrlp_user_command = ['.git/', 'git --git-dir=%s/.git ls-files -oc --exclude-standard']
nnoremap &lt;leader&gt;b :CtrlPBuffer&lt;cr&gt;
nnoremap &lt;leader&gt;t :CtrlPTag&lt;cr&gt;
nnoremap &lt;leader&gt;f :CtrlPBufTag&lt;cr&gt;
nnoremap &lt;leader&gt;q :CtrlPQuickfix&lt;cr&gt;
nnoremap &lt;leader&gt;m :CtrlPMRU&lt;cr&gt;
" buffers and quickfix
function! ToggleQuickFix()
  if empty(filter(getwininfo(), 'v:val.quickfix'))
    copen
  else
    cclose
  endif
endfunction
nnoremap &lt;leader&gt;w :call ToggleQuickFix()&lt;cr&gt;
nnoremap &lt;leader&gt;d :bd&lt;cr&gt;
" searching ang grepping
nnoremap &lt;leader&gt;g :copen&lt;cr&gt;:Ggrep!&lt;SPACE&gt;
nnoremap K :Ggrep "\b&lt;C-R&gt;&lt;C-W&gt;\b"&lt;cr&gt;:cw&lt;cr&gt;
nnoremap &lt;leader&gt;s :set hlsearch! hlsearch?&lt;cr&gt;
" ctags generation
nnoremap &lt;leader&gt;c :!ctags -R .&lt;cr&gt;&lt;cr&gt;
" per-project configs
set exrc
set secure
```
### Using a comma for leader key
I like having my leader key mapped to a comma instead of the default backslash. It is the closest free key in Vim when your hands are in writing position. Also, this key is the same in most keyboard layouts while `\` varies per model or layout. I rarely use a local leader but underscore looks like a good fit.
Further reading:
* See `:help map-which-keys` in the [Vim Reference Manual][2]
* See the unused keys in Vim on the [Vim Tips Wiki][3]
### Filetype and syntax off
Next up is the very important `filetype` command. See, Vim comes with "batteries included," version 8.2 contains syntax highlighting for 644 languages, 251 filetype definitions (`ftplugins`), and indentation rules for 138 languages. However, indentation is not enabled by default, perhaps to deliver a consistent editing experience for all. I like to enable it.
A quick tip: If you are editing a very large file and Vim feels slow, you may want to disable syntax highlighting to speed things up. Just the type `:syn off` command.
Further reading:
* See `:help filetype` in the [Vim Reference Manual][4]
* See `:help syntax` in the [Vim Reference Manual][5]
* See `:help indent` in the [Vim Reference Manual][6]
### Matchit plugin
Vim even comes with some extra plugins, which makes some features incompatible, one of these is quite useful. It is the `matchit` plugin that makes `%` key find matching parens to work with some languages. Typically, you can find the beginning or end of a block (begin and end) or HTML matching tags and similar.
Further reading:
* See `:help matchit` in the [Vim Reference Manual][7]
### Swap file
One of the many settings I want to keep from my old config is using `/tmp` for swap and creating backups in a separate directory in my home, which you need to create with `mkdir ~/.vimbackup`. It is important to understand that Vim creates a copy called "swap file" when you start editing, and all the unsaved work gets saved in this file. So even if there is a power outage, your swap contains most of the unsaved work. I prefer using `tmpfs` as all my laptops and servers are protected with UPS, and I save often. Also, most of the time, you use swap files when your SSH connection is lost rather than due to a power outage. Swap files can be quite big for large files and I value my SSD, so I am making the decision here. If you are unsure, remove this statement to use `/var/tmp`, which is safer.
Further reading:
* See `:help swap-file` in the [Vim Reference Manual][8]
### Fuzzy-finder plugin
Now, the fuzzy finder is a plugin I cannot live without. Opening files using commands like `:Ex` or `:e` or `:tabe` is okay on a server when you need to open like 20 files a day. When coding, I usually need to open hundreds of them. As I said, CtrlP does the job nicely. It is small, with no dependencies—pure Vim. It opens with the **Ctrl**+**P** combination, which is a bit weird to me. I know that some famous editors use it (VSCode, I think). The thing is, these are already important Vim keybindings that I do not want to override. So the winner for me is **leader**+**leader** (comma pressed twice).
The `ctrlp_user_command` just changes how CtrlP is getting the file list. Instead of the built-in recursive file lister (glob) it uses `git ls-files` which is usually better as it ignores things from `.gitignore`, so things like `node_modules` or other irrelevant directories that can slow down the listing are not in the way.
**Leader**+**B**/**T**/**F**/**Q**/**M** to open a list of buffers, tags, tags from the current file, quick fix buffer, and most recently used files is very useful. Specifically, once you generated a `taglist` with `ctags`, this is essentially "Go To Definition" for hundreds of programming languages—no plugins needed! This is all built-in in Vim. Now to put things straight, when I type **leader**+**B**, it means pressing comma and then pressing **B** key, not together like with **Control** or **Shift**.
Further reading:
* See `:help Explore` in the [Vim Reference Manual][9]
* See the [ctrlp.vim GitHub][10]
### Buffer management
Although Vim supports tabs these days, buffer management is an important skill for mastering Vim. I usually end up with too many buffers and I need to do `:bdelete` way too often. Well, **leader**+**D** seems like a good option to do that faster. I also like to close the Quickfix window, so there is the **leader**+**W** combination for that too. I use this very often when browsing search results.
Further reading:
* See `:help buffer-hidden` in the [Vim Reference Manual][11]
### Ggrep and the fugitive plugin
Speaking about searching, it is as important as opening files. I want to be able to grep the codebase. For that, there is the awesome `:Ggrep` command from the fugitive plugin, which uses git grep, which ignores junk files and only searches what's in git. Since **Shift**+**K** is a free key in Vim, it is a great fit for automatically grepping the term under the cursor. And finally, being able to enter arbitrary search patterns using **leader**+**G** is also nice. Note this opens a window called the Quickfix window where you can navigate the results, go to next occurrence, previous, last, first, and more. The same window is used for output from compilators or other tools, so get familiar with it. I suggest further reading in the documentation if this is new to you.
Further reading:
* See `:help quickfix` in the [Vim Reference Manual][12]
* See the [vim-fugitive GitHub][13]
### Searching and grepping with fugitive
By the way, searching with `/` key is smart and sensitive, meaning if all characters are lower case, Vim searches ignoring case. By default, it highlights results, and I think I typed `:noh` (turn of highlighting) about a million times. That's why I have **leader**+**S** to toggle this. I suggest reading more about searching in the manual later on too.
Searching and grepping are next. The fugitive plugin has you covered. Use the command `:Ggrep pattern` to do a git grep, and results will go into the Quickfix window. Then simply navigate through the results using quick fix commands (`:cn`, `:cp`, and such) or simply use `:CtrlPQuickfix` (or **leader**+**Q**) to scroll them visually. What is cool about the CtrlP quick fix integration is that you can further search the results by typing to match filenames or content if it makes sense—searching the search results.
Further reading:
* See `:help grep` in the [Vim Reference Manual][14]
* See `:help noh` in the [Vim Reference Manual][15]
* See the [vim-fugitive GitHub][13]
### Ctags
**Leader**+**C** to generate a `ctags` file for better navigation is useful when dealing with a new codebase or doing a longer coding session with lots of jumps around. Ctags supports hundreds of languages, and Vim can use all this knowledge to navigate it. More about how to configure it later. Note I already discussed **leader**+**T** to open fuzzy search for all tags, remember? It is the very same thing.
Further reading:
* See `:help ctags` in the [Vim Reference Manual][16]
* See the [Universal Ctags website][17]
### Key mapping
Being able to override any other setting in projects by creating a `.vimrc` file in a project directory is a good idea. Just put it in the (global) `.gitignore` to ensure you don't need to edit thousands of git ignore files in each project. Such a project `.vimrc` could be something like (for C/C++ project with GNU Makefile):
```
" coding style
set tabstop=4
set softtabstop=4
set shiftwidth=4
set noexpandtab
" include and autocomplete path
let &amp;path.="/usr/local/include"
" function keys to build and run the project
nnoremap &lt;F9&gt; :wall!&lt;cr&gt;:make!&lt;cr&gt;&lt;cr&gt;
nnoremap &lt;F10&gt; :!LD_LIBRARY_PATH=/usr/local/lib ./project&lt;cr&gt;&lt;cr&gt;
```
As you can see, I typically map **F2**-**F10** keys to compile, run, test, and similar actions. Using **F9** for calling `make` sounds about right. Remember the blue Borland IDE from MS-DOS?
As mentioned earlier, it is a good idea to ignore both `.vimrc` and `tags` (generated by `ctags`) globally so there is no need to update every each `.gitignore`:
```
# git config --global core.excludesfile ~/.gitignore
# cat ~/.gitignore
/.vimrc
/tags
/TAGS
```
A few more statements in my personal config are only relevant for those with non-US keyboard layouts (I am on Czech). I need to use dead keys for many characters, and it is simply not possible, and I'd rather type the command instead of doing those hard-to-reach combinations. Here is a solution to the problem:
```
" CTRL-] is hard on my keyboard layout
map &lt;C-K&gt; &lt;C-]&gt;
" CTRL-^ is hard on my keyboard layout
nnoremap &lt;F1&gt; :b#&lt;cr&gt;
nnoremap &lt;F2&gt; :bp&lt;cr&gt;
nnoremap &lt;F3&gt; :bn&lt;cr&gt;
" I hate entering Ex mode by accident
map Q &lt;Nop&gt;
```
Further reading:
* See `:help map` in the [Vim Reference Manual][18]
Function keys are all free in Vim, except **F1**, which is bound to help. I don't need help, not that I would already know everything about Vim. Not at all. But I can simply type `:help` if needed. And **F1** is a crucial key, so close to the **Esc** key. I like to use buffer swapping (`:b#`) for that and **F2**-**F3** for next/previous. The more you work with buffers, the more you will need this. If you haven't used **Ctrl**+**^**, I suggest getting used to it. Oh, have you ever entered the Ex mode with the ugly type `:visual`? Many beginners had no idea how to quit Vim from that mode. For me, it is just disturbing as I rarely use it.
Now, getting familiar with `ctags` is a key thing to be successful with Vim. This tool supports hundreds of languages and it can easily create tags for files you do not want to create, therefore I suggest ignoring typical junk directories:
```
# cat ~/.ctags.d/local.ctags
\--recurse=yes
\--exclude=.git
\--exclude=build/
\--exclude=.svn
\--exclude=vendor/*
\--exclude=node_modules/*
\--exclude=public/webpack/*
\--exclude=db/*
\--exclude=log/*
\--exclude=test/*
\--exclude=tests/*
\--exclude=\\*.min.\\*
\--exclude=\\*.swp
\--exclude=\\*.bak
\--exclude=\\*.pyc
\--exclude=\\*.class
\--exclude=\\*.cache
```
### Airline plugin
I must not forget about the Vim airline plugin. Out of the two in Fedora, this one is light, no external dependencies are needed, and it works out of the box with all my fonts. You can customize it, and there are themes and such things. I just happen to like the default setting.
I must mention that there are two main `ctag` projects: Exuberant Ctags and Universal Ctags. The latter is a more modern fork. If your distribution has it, use that. If you are on Fedora 35+, you need to know that you are now on Universal Ctags.
### Wrap up
As I wrap it up, here is what I suggest. Try to keep your Vim configuration slick and clean. It will pay off in the future. After I switched, I had to re-learn the "write and quit" commands because I was typing it as `:Wq` accidentally all the time, and I had a "hack" in the old configuration that actually did what I meant. Okay, this one might be actually useful and make the cut—I hope you get what I mean:
```
:command Wq wq
:command WQ wq
```
Here is a final quick tip: You may need to change your default Vim configuration a lot while finding the sweet spot of what I presented you here and your own taste. Use the following alias, so you don't need to search the history all the time. Trust me, when a Vim user searches history for "vim," nothing is relevant:
```
`alias vim-vimrc='vim ~/.vimrc'`
```
There you have it. Maybe this can help you navigate through the rich world of Vim without a ton of plugins. _Vanilla_ Vim is fun!
To try out what you just read, install the packages and check out the config:
```
test -f ~/.vimrc &amp;&amp; mv ~/.vimrc ~/.vimrc.backup
curl -s <https://raw.githubusercontent.com/lzap/vim-lzap/master/.vimrc> -o ~/.vimrc
mkdir ~/.vimbackup
```
Special thanks to Marc Deop and [Melanie Corr][19] for reviewing this article.
* * *
**Update:**
I've survived! The only struggle I had was the different order of results from the CtrlP plugin. The fuzzy algorithm for files is different from the `fzf.vim` plugin, so files that I used to find using various search terms do not work now. I ended up installing the fzf package from Fedora, which ships with a vim function FZF that can be bound to the leader combination for a more relevant file search. See the updated configuration file in my [GitHub repository][20]. I've learned a lot along the way. There are keybinding which I've already forgotten thanks to many plugins.
* * *
_This article originally appeared on the [author's website][21] and is republished with permission._
Vim offers great benefits to writers, regardless of whether they are technically minded or not.
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/12/vanilla-vim-config
作者:[Lukáš Zapletal][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/lzap
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/coffee_tea_laptop_computer_work_desk.png?itok=D5yMx_Dr (Person drinking a hot drink at the computer)
[2]: https://vimhelp.org/map.txt.html#map-which-keys
[3]: https://vim.fandom.com/wiki/Unused_keys
[4]: https://vimhelp.org/filetype.txt.html
[5]: https://vimhelp.org/syntax.txt.html
[6]: https://vimhelp.org/indent.txt.html
[7]: https://vimhelp.org/usr_05.txt.html#matchit-install
[8]: https://vimhelp.org/recover.txt.html#swap-file
[9]: https://vimhelp.org/pi_netrw.txt.html#netrw-explore
[10]: https://github.com/kien/ctrlp.vim
[11]: https://vimhelp.org/windows.txt.html#buffer-hidden
[12]: https://vimhelp.org/quickfix.txt.html
[13]: https://github.com/tpope/vim-fugitive
[14]: https://vimhelp.org/quickfix.txt.html#grep
[15]: https://vimhelp.org/pattern.txt.html#noh
[16]: https://vimhelp.org/tagsrch.txt.html
[17]: https://ctags.io
[18]: https://vimhelp.org/map.txt.html
[19]: https://opensource.com/users/melanie-corr
[20]: https://github.com/lzap
[21]: https://lukas.zapletalovi.com/2021/11/a-sane-vim-configuration-for-fedora.html

View File

@ -1,87 +0,0 @@
[#]: subject: "13 examples of how DevOps facilitated transformation in 2021"
[#]: via: "https://opensource.com/article/22/1/devops-transformation"
[#]: author: "Will Kelly https://opensource.com/users/willkelly"
[#]: collector: "lujun9972"
[#]: translator: "CN-QUAN "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
13 examples of how DevOps facilitated transformation in 2021
======
In 2021, Opensource.com's top DevOps articles focused on tools, best
practices, and the most crucial part: transformation.
![Tips and gears turning][1]
2021 has been an exciting year for DevOps as teams continue to adjust to remote and hybrid working models. The DevOps articles that made our most-read list this year show how our community focuses on tools, innovation, best practices, and transformation.
### DevOps tools and innovation
Tools of the trade continue to rank as a top read for Opensource.com readers. [Nimisha Mukherjee][2], an engineering manager with Red Hat, wrote [13 open source tools for developers][3]. She breaks tools down by _Inner loop_, the most common tasks developers do, and _Outer loop_, where the developers' code goes through continuous integration and delivery (CI/CD) for deployment to production.
Implementing a DevOps toolchain also ranked high on our reader's interests. A first-time contributor, [Tereza Denkova][4], Marketing Associate at Accedia, an IT professional services company, wrote [How to implement a DevOps toolchain][5] and eloquently tied it to innovation.
### DevOps practices
[Daniel Oh][6], a major champion for Opensource.com and a prolific content creator in his own right, wrote [3 serverless strategies to look for in 2021][7], giving an overview of how serverless application development and deployment approaches are accelerating the adoption of DevApps practices today.
[Evan "Hippy" Slatis][8] offers strategies for aligning deployment images and descriptors in his article [Solve the repository impedance mismatch in CI/CD][9]. He's a senior consultant for Red Hat, and the methodical approach he takes in his article testifies to his industry experience. Also, check out his article entitled [Processing modular and dynamic configuration files in shell][10].
In my article [A DevOps guide to documentation][11], I made a case for documentation to become part of the DevOps discussion. I got some insightful comments from readers that I'm in the process of following up on for a future article.
### DevOps transformation
We sometimes don't give DevOps credit for its ability to adapt to organizational needs. It's essential to understand the potential impact of other forms of Ops that may supplement or augment DevOps now or in the future. [Bryant Son][12], a self-described Octocat, makes the case that GitOps is an evolved form of DevOps in [GitOps vs. DevOps: What's the difference?][13]
[Mike Calizo][14], a Red Hat solutions architect based in Auckland, New Zealand, wrote [How to adopt DevSecOps successfully][15]. His experience as a solutions architect shines through in this article. He explains some of the adoption and security challenges you might face in your move to DevSecOps.
I wrote a series of articles about DevOps to DevSecOps transformation that made the list. Here they are:
* [Launching a DevOps to DevSecOps transformation][16]
* [3 phases to start a DevSecOps transformation][17]
* [Following a DevSecOps maturity model][18]
* [3 more phases of DevSecOps transformation][19]
* [4 steps to make DevSecOps adoption a team effort][20]
### 2022 and the future of DevOps
Seeing the DevOps articles that made the most-read list for 2021 speaks to an even more interesting 2022 for DevOps as organizations continue to master their tools, improve their strategies, and continue their [digital transformation][21] to compete effectively in an ever-changing marketplace.
Thank you to everyone who read our DevOps articles, liked them, and sent us comments via the site and social media.
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/1/devops-transformation
作者:[Will Kelly][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/willkelly
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/gears_devops_learn_troubleshooting_lightbulb_tips_520.png?itok=HcN38NOk (Tips and gears turning)
[2]: https://opensource.com/users/nimisha
[3]: https://opensource.com/article/21/6/open-source-developer-tools
[4]: https://opensource.com/users/tereza-denkova
[5]: https://opensource.com/article/21/1/devops-tool-chain
[6]: https://opensource.com/users/daniel-oh
[7]: https://opensource.com/article/21/1/devapps-strategies
[8]: https://opensource.com/users/hippyod
[9]: https://opensource.com/article/21/8/impedance-mismatch-cicd
[10]: https://opensource.com/article/21/5/processing-configuration-files-shell
[11]: https://opensource.com/article/21/3/devops-documentation
[12]: https://opensource.com/users/brson
[13]: http://opensource.com/article/21/3/gitops
[14]: https://opensource.com/users/mcalizo
[15]: https://opensource.com/article/21/2/devsecops
[16]: http://opensource.com/article/21/10/devops-to-devsecops
[17]: https://opensource.com/article/21/10/first-phases-devsecops-transformation
[18]: https://opensource.com/article/21/10/devsecops-maturity-model
[19]: https://opensource.com/article/21/10/last-phases-devsecops-transformation
[20]: https://opensource.com/article/21/10/devsecops-team-effort
[21]: https://enterprisersproject.com/what-is-digital-transformation

View File

@ -1,163 +0,0 @@
[#]: subject: "What you need to know about fuzz testing and Go"
[#]: via: "https://opensource.com/article/22/1/native-go-fuzz-testing"
[#]: author: "Gaurav Kamathe https://opensource.com/users/gkamathe"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
What you need to know about fuzz testing and Go
======
The Go team has accepted a proposal to add fuzz testing support to the
language.
![Person using a laptop][1]
The usage of [Go][2] is growing rapidly. It is now the preferred language for writing cloud-native software, container software, command-line tools, databases, and more. Go has had built-in [support for testing][3] for quite some time now. It makes writing tests and running them using the Go tool relatively easy.
### What is fuzz testing?
Fuzzing, sometimes also called fuzz testing, is the practice of giving unexpected input to your software. Ideally, this test causes your application to crash, or behave in unexpected ways. Regardless of what happens, you can learn a lot from how your code reacts to data it wasn't programmed to accept, and you can add appropriate error handling.
Any given software program consists of instructions that accept input or data from various sources, then it processes this data and generates appropriate output. As software gets developed, a team of test engineers tests this software to find bugs in the software that can then be reported and fixed. Often, the intent is to see if the software behaves as expected. Testing can further get divided into multiple areas, such as functional testing, integration testing, performance testing, and more. Each focuses on a specific aspect of the software functionality to find bugs or improve reliability or performance.
Fuzzing takes this testing process a step further and tries to provide "invalid" or "random" data to the software program. This is intentional, and the expectation is that the program should crash or behave unexpectedly to uncover bugs in the program so the developers can fix them. Like testing, doing this manually doesn't scale, so many fuzzing tools have been written to automate this process.
### Software testing in Go
As an example to test `Add()` function within `add.go`, you could write tests within `add_test.go` by importing the "testing" package and adding the test functionality within a function starting with `TestXXX()`.
Given this code:
```
func Add(num1, num2 int) int {
}
```
In a file called `add_test.go`, you might have this code for testing:
```
import "testing"
func TestAdd(t *testing.T) {
}
```
Run the test:
```
`$ go test`
```
### Addition of fuzz testing support
The Go team has accepted a [proposal to add fuzz testing support][4] to the language to further this effort. This involves adding a new `testing.F` type, the addition of `FuzzXXX()` functions within the `_test.go` files, and to run these tests with the `-fuzz` option is being added to the Go tool.
In a file called `add_test.go`:
```
func FuzzAdd(f *testing.F) {
}
```
Run the code:
```
`$ go test -fuzz`
```
This [feature is experimental][5] at the time of writing, but it should be included in the 1.18 release. Also, many features like `-keepfuzzing` and `-race` are not supported at the moment. The Go team has recently published [a tutorial on fuzzing][6], which is well worth a read.
### Get the latest features with gotip installation
If you are enthusiastic and wish to try out the feature before the official release, you can utilize `gotip`, which allows you to test upcoming Go features and provide feedback. To install `gotip`, you can use the commands below. After installation, you can use the `gotip` utility to compile and run the program instead of the usual `go` utility.
```
$ go install golang.org/dl/gotip@latest
$ gotip download
$ gotip version
go version devel go1.18-f009910 Thu Jan 6 16:22:21 2022 +0000 linux/amd64
$
```
### Fuzzing opinions in the community
Fuzzing is often a point of discussion among the software community, and we find people on both ends of the spectrum. Some consider it a useful technique to find bugs, especially on the security front. Whereas given the required resources (CPU/memory) for fuzzing, some consider it a waste or prefer other techniques over it. This is even evident in the Go team as well. We can see Go co-founder Rob Pike being slightly skeptical about the uses of fuzzing and its implementation in Go.
> _... Although fuzzing is good at finding certain classes of bugs, it is very expensive in CPU and storage, and cost/benefit ratio remains unclear. I worry about wasting energy and filling up git repos with testdata noise..._
>
> _~_[Rob Pike][7]
However, another member of the Go security team, Filo Sottile, seems quite optimistic about the addition of fuzz support to Go, also backing it up with some examples and wants it to be a part of the development process.
> *I like to say that fuzzing finds bugs at the margin. It's why we are interested in it as the security team: bugs caught at the margin are ones that don't make it into production to become vulnerabilities. *
>
> _We want fuzzing to be part of the development—not build or security—process: make a change to the relevant code…_
>
> _~_[Filo Sottile][8]
### Real-world fuzzing
To me, fuzzing seems quite effective at findings bugs and making systems more secure and resilient. To give an example, even the Linux kernel is fuzz tested using a tool called [syzkaller][9], and it has uncovered a [variety of bugs][10].
[AFL][11]** **is another popular fuzzer, used to fuzz programs written in C/C++.
There were options available for fuzzing Go programs as well in the past, one of them being [go-fuzz][12] which Filo mentions in his GitHub comments
> _The track record of go-fuzz provides pretty amazing evidence that fuzzing is good at finding bugs that humans had not found. In my experience, just a few CPU minutes of fuzzing can be extremely effective at the margin_
### Why add native fuzzing support in Go
If the requirement is to fuzz Go programs and existing tools like `go-fuzz` could do it, why add native fuzzing support to the language? The [Go fuzzing design draft][13] provides some rationale for doing so. The idea was to bring simplicity to the process as using the above tools adds more work for the developer and has many missing features. If you are new to fuzzing, I recommend reading the design draft document.
> Developers could use tools like go-fuzz or fzgo (built on top of go-fuzz) to solve some of their needs. However, each existing solution involves more work than typical Go testing and is missing crucial features. Fuzz testing shouldn't be any more complicated or less feature-complete than other types of Go testing (like benchmarking or unit testing). Existing solutions add extra overhead, such as custom command-line tools,
### Fuzz tooling
Fuzzing is a welcome addition to the Go language's long list of desired features. Although experimental for now, it's expected to become robust in upcoming releases. This gives sufficient time to try it out and explore its use cases. Rather than seeing it as an overhead, it should be seen as an effective testing tool to uncover hidden bugs if used correctly. Teams using Go should encourage its use, starting with developers writing small fuzz tests and testing teams extending it further to utilize its potential fully.
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/1/native-go-fuzz-testing
作者:[Gaurav Kamathe][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/gkamathe
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/laptop_screen_desk_work_chat_text.png?itok=UXqIDRDD (Person using a laptop)
[2]: https://go.dev/
[3]: https://pkg.go.dev/testing
[4]: https://github.com/golang/go/issues/44551
[5]: https://go.dev/blog/fuzz-beta
[6]: https://go.dev/doc/tutorial/fuzz
[7]: https://github.com/golang/go/issues/44551#issuecomment-784584785
[8]: https://github.com/golang/go/issues/44551#issuecomment-784655571
[9]: https://github.com/google/syzkaller
[10]: https://github.com/google/syzkaller/blob/master/docs/linux/found_bugs.md
[11]: https://github.com/google/AFL
[12]: https://github.com/dvyukov/go-fuzz
[13]: https://go.googlesource.com/proposal/+/master/design/draft-fuzzing.md

View File

@ -1,111 +0,0 @@
[#]: subject: "Listen to your favorite music on Linux with Juk"
[#]: via: "https://opensource.com/article/22/2/listen-music-linux-juk-kde"
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Listen to your favorite music on Linux with Juk
======
Juk is the default open source music player for the KDE Plasma Desktop
on Linux. Create playlists, use tagging, and play your favorite tunes on
Linux.
![Headphones on a yellow backdrop][1]
The KDE project doesn't just provide a famous desktop, it generates a lot of software, from tools for [video editng][2], [photography][3], and [illustration][4], to graphing calculators, email, and office work. Those are all productivity tools, but KDE is also good for relaxing. It has games and media players, and the music player I use is known simply as [Juk][5].
### Install Juk on Linux
As long as your Linux distribution offers KDE packages, you can install Juk using your package manager.
On Fedora, Mageia, and similar:
```
`$ sudo dnf install juk`
```
On Elementary, Linux Mint, and other Debian-based distributions:
```
`$ sudo apt install juk`
```
### Using Juk
When you first launch Juk, you're asked what directory or directories you want to use as the source of your music collection. Select the folders you want Juk to look in for music, and optionally exclude any subdirectories you want Juk to ignore.
![Adding music to Juk][6]
(Seth Kenlon, [CC BY-SA 4.0][7])
Depending on how much music you have, it may take a few moments for Juk to parse the filesystem and metadata. Once it has, the usual Juk window appears with all of your music in a central collection called **Collection List**.
![Juk music player][8]
(Seth Kenlon, [CC BY-SA 4.0][7])
In the top search bar, you can search for any string in any field. Double-click on the song to begin playback.
Juk defaults to continuous play, meaning that after it's finished playing your selection, it proceeds to the next song in the Collection List, even if you've filtered your list down to just one song. This keeps the music going no matter what, like a true Jukebox.
Personally, I prefer to listen to complete albums, with just enough of a break in between to meander into the kitchen to top off my coffee, so I use playlists.
### Playlists in Juk
A playlist in Juk can contain anything in your Collection List. Juk plays through the playlist once, and then stops.
To create a playlist, right-click in the left playlist column and select **New** from the contextual menu that appears. You can create an empty playlist or a playlist from a specific folder on your hard drive.
![Creating a new playlist][9]
(Seth Kenlon, [CC BY-SA 4.0][7])
### Automatic playlists
You can also create a special playlist bound to a specific search, which is useful for artists whose music you frequently purchase and add to your collection. With a search playlist, their new music gets added to their playlist without your manual intervention.
### Tagging
Let's face it, music players are pretty easy to come by, and they mostly all do the same thing. Juk, however, adds an important feature. It gives you the ability to modify metadata tags.
![Metadata editor][10]
(Seth Kenlon, [CC BY-SA 4.0][7])
A lot of music is tagged inconsistently, incompletely, or not at all, so it's a luxury to be able to correct them as you discover them when they come up in the play queue.
There's also a tag guesser feature, which tries to parse filenames and tag songs accordingly.
### The obvious choice
Juk is the easy and obvious choice when you're looking for a music player on KDE. There are, of course, lots of other very good choices, as Opensource.com's resident audiophile [Chris Hermansen][11] details in his [3 open source music players][12] article, but sometimes you just want to use whatever comes easiest to you. Juk is both intuitive to use and excellent at what it does. How lucky it is that it's the default player on the KDE Plasma Desktop.
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/2/listen-music-linux-juk-kde
作者:[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/c-d-x-pdx_a_82obo-unsplash.jpg?itok=2txWDP31 (Headphones on a yellow backdrop)
[2]: https://opensource.com/article/21/12/kdenlive-linux-creative-app
[3]: https://opensource.com/life/16/5/how-use-digikam-photo-management
[4]: https://opensource.com/article/21/12/krita-digital-paint
[5]: https://juk.kde.org/
[6]: https://opensource.com/sites/default/files/juk-import.jpg (Adding music to Juk)
[7]: https://creativecommons.org/licenses/by-sa/4.0/
[8]: https://opensource.com/sites/default/files/juk-player.jpg (Juk music player)
[9]: https://opensource.com/sites/default/files/juk-playlist-new.jpg (Creating a new playlist)
[10]: https://opensource.com/sites/default/files/juk-tagger.png (Metadata editor)
[11]: https://opensource.com/users/clhermansen
[12]: https://opensource.com/article/17/1/open-source-music-players

View File

@ -2,7 +2,7 @@
[#]: via: "https://opensource.com/article/22/2/scan-documents-skanlite-linux-kde"
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "

View File

@ -1,69 +0,0 @@
[#]: subject: "How to screen share with the Linux KDE Plasma Desktop"
[#]: via: "https://opensource.com/article/22/2/screen-share-linux-kde"
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
[#]: collector: "lujun9972"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
How to screen share with the Linux KDE Plasma Desktop
======
The combination of krfb and krdc are valuable tools for making remote
Linux support frustration-free.
![Person using a laptop][1]
If you've ever done remote support professionally or out of familial obligation, then you've been on a call where solving problems are only secondary to the impossible task of visualizing what's actually on your user's screen. How many times have you described complex desktop tasks only to later realize that your user hasn't even turned their computer on yet? Support is important, but the frustration is real, and it's a shared experience for both the people in need of support and the people who graciously try to provide it. I believe it's important for people to perform tasks themselves as a way to learn a new skill, but there's also an argument for observing the way it's meant to be done by an expert. That's what screen sharing is for, and the KDE Plasma Desktop has it built-in.
### Network safety
The Plasma Desktop uses a point-to-point invitation model for screen sharing. The user launches an application, which starts a Virtual Network Connection (VNC) server, at which point the support person is able to view and even control the computer remotely. If it sounds like this is potentially unsafe, that's because it can be, but for the intervention of firewalls. If you're the support person for somebody who's not on the same network as you, then you must set up a safe pathway from your network to your user's network before screen sharing can work. Ideally, you would do this before emergency strikes:
1. [Configure the user's router][2] to route the VNC port (5900 by default, but you can use any port you like) to their computer.
2. [Open a service in the user's local firewall][3] to permit VNC traffic (on the port you specified in the first step).
### Remote invitation
To start a screen sharing session, the user must start the **krfb** (that stands for _KDE remote frame buffer_) application. This starts a VNC server, and creates a temporary password.
![krfb][4]
(Seth Kenlon, [CC BY-SA 4.0][5])
The default port **krfb** uses is 5900, but you can change that if you need to in **krfb** settings. This is something you probably would want to do in advance, however, so you can avoid trying to explain to your user how to change a protocol's port.
### Viewing and controlling
While this window is open, you can log in over VNC using your favorite VNC client. KDE includes the **krdc** (that stands for _KDE remote desktop client_) application. On the support computer, launch it and provide it with the destination IP address. When you're prompted for a password, enter the one showing in the **krfb** session you're connecting to.
![Screen sharing with krdc][6]
(Seth Kenlon, [CC BY-SA 4.0][5])
Once you've connected, you can view your user's screen, and you can guide them as they follow your instructions. If they're having trouble following your directions, then you can take control of their mouse and demonstrate how something is done. By default, **krfb** (that's the application _they're_ running) asks them for permission before relinquishing control to you.
### Help is on the way
Having the ability to see what your user sees can speed up troubleshooting and lessen frustration on both sides of a support call. Provided that you set up the network for your support in advance, the combination of **krfb** and **krdc** are valuable tools for the Linux professional guiding new users through their journey of Linux desktop discovery.
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/2/screen-share-linux-kde
作者:[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/laptop_screen_desk_work_chat_text.png?itok=UXqIDRDD (Person using a laptop)
[2]: https://opensource.com/article/20/9/firewall
[3]: https://opensource.com/article/19/7/make-linux-stronger-firewalls
[4]: https://opensource.com/sites/default/files/kde-krfb.jpg (krfb)
[5]: https://creativecommons.org/licenses/by-sa/4.0/
[6]: https://opensource.com/sites/default/files/kde-krdc-session.jpg (Screen sharing with krdc)

View File

@ -2,7 +2,7 @@
[#]: via: "https://opensource.com/article/22/2/casual-gaming-linux-kde"
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: translator: "perfiffer"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "

View File

@ -1,286 +0,0 @@
[#]: subject: "12 Simple Tools to Protect Your Privacy"
[#]: via: "https://itsfoss.com/privacy-tools/"
[#]: author: "Ankush Das https://itsfoss.com/author/ankush/"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
12 Simple Tools to Protect Your Privacy
======
Data is one of the most valuable assets available.
For better or worse, data collection techniques arent going anywhere. To be practical, we need all sorts of data to analyze, study, and learn about things.
Of course, it also brings in the risk of exploiting the data collected, such as malicious agencies getting hold of your browsing data (or internet activity).
While data collection methods have improved over time (like anonymous collection practices), they may not be entirely privacy-friendly.
Fret not, you do not need to be an expert to protect your privacy.
There are some simple tools to enhance your privacy, without compromising the user experience. And, the best thing—you do not need to waste time to research these options like theres no tomorrow.
Here, I highlight such simple tools to guard your online privacy easily.
### **Basic Tools to Step Up Your Online Privacy**
The best way to protect your data is to focus on the options that you interact with the most.
While you have to right to be paranoid, you shouldnt forget the practical use-cases.
For instance, it is useless to opt for a decentralized messenger that none of your friends/family uses and end up using WhatsApp most of the time.
Hence, we list some of the options that you can easily try without making any special efforts, categorizing them as:
* [Web Browser][1]
* [VPN Services][2]
* [Search Engines][3]
* [Messengers][4]
* [Operating System][5]
* [Password Manager][6]
### Open-Source Web Browsers for Privacy
From banking to social media access, the web browser helps you. 
If you choose a web browser that offer good security and solid privacy features, you end up with a few things to worry about.
Among our [top choices for web browsers][7], some recommendations include:
#### 1\. Tor Browser
![][8]
Tor Browser is a free and open-source browser with solid privacy features. It is a customized version of Firefox.
It utilizes the [Tor network][9] for connection, routing your internet requests through multiple points, hiding your IP address and location.
When you browse a website/service through the Tor Browser, it is almost impossible to trace you back.
However, the browsing experience can be incredibly slow. So, if you are ready for the trade-off, Tor Browser can be the perfect pick.
[Tor Browser][10]
#### 2\. Firefox
![][11]
Firefox is arguably the most impressive [open-source browser][12]. No wonder [I keep coming back to it][13].
It includes some of the best privacy protection features and often introduces new industry standards to secure your web experience.
You can install some of the [best open-source add-ons][14] and customize the options to further enhance privacy protections. 
[Firefox][15]
#### 3\. Brave
![][16]
Brave is one of the best browsers available for Linux. It offers a clean user experience and resembles a bit like Chrome.
Starting from its tracking protection, and aggressive tracker blocking out-of-the-box, Brave can be a solid option.
You can learn more about its advantages and trade-offs in our [Brave vs Firefox comparison][17] article.
[Brave][18]
### VPN Services to Enhance Privacy
A VPN (Virtual Private Network) helps secure your internet connection overall, whether you are using a computer or a smartphone.
It also hides your original IP address, location, and unblocks access to any restricted and censored content.
While there are a lot of [privacy-focused VPN services][19], we list a few here:
#### 1\. ProtonVPN
![][20]
[ProtonVPN][21] is an impressive privacy-centric service with open-source applications for desktop and mobile.
You can use it for free, but you need to upgrade the subscription to get access to features like malware blocking and tracker protection. It also offers bundled subscription plans with ProtonMail.
[ProtonVPN][21]
#### 2\. Mullvad
![][22]
Mullvad also offers an open-source client and is an interesting VPN service that needs no email address to sign up.
All you have to do is generate a user ID, and make payment for the subscription using cryptocurrency/credit card.
[Mullvad VPN][23]
### Private Search Engines to Keep Your Internet Activity Safe
What you search on the web, tells a lot about you and your work.
The data on your search activity can be exploited by malicious parties to easily lure you into a scam.
So, a privacy-friendly search engine should help you get there. I prefer using these two options:
#### 1\. DuckDuckGo
![][24]
DuckDuckGo is one of the most popular [private search engines][25] that claim not to record any of your browsing data.
Over time, DuckDuckGo has also improved its search result quality, so you should get what youre looking for most of the time.
[DuckDuckGo][26]
#### 2\. Startpage
![][27]
Startpage is an interesting alternative that resembles the look of Google search and utilizes the same results, but without collecting your data.
If you want search results closest to Google and still want to have a number of privacy features, Startpage can be an option.
[Startpage][28]
### Secure Messenger to Protect Your Conversations
Whether its the government or the app itself, if you want no one to access your conversations except the intended recipient, private messengers should help.
While most of the users swear by WhatsApp, it is not the most privacy-friendly solution. And, yes, Facebook Messenger is not even an option to consider.
Here are some of the [best WhatsApp alternatives][29]:
#### 1\. Signal
![][30]
Signal is an open-source messenger that supports end-to-end encryption and [can be installed on your Linux desktop][31].
It also features several privacy features to keep the conversations safe.
[Signal][32]
#### 2\. Threema
![][33]
Threema is a paid application that features all the essentials from Signal without requiring your phone number.
It also offers a separate version for work. Threema can be a good pick if your friends/family are willing to purchase the app with a one-time fee of about $3.
[Threema][34]
### Choose a Secure Operating System to Build the Foundation
It is understandable if you cannot [choose Linux over Windows][35] as per your requirements.
However, if you want to make the switch, to get complete privacy, here are some options among the [list of secure Linux distributions][36] available.
#### 1\. Linux Mint
![][37]
Linux Mint is a fantastic Linux distribution for everyday usage. It manages to do a [few things better than Ubuntu][38] while being based on it.
It focuses on user choices and regular security updates to keep the operating system safe.
[Linux Mint][39]
#### 2\. Qubes OS
![][40]
Qubes OS is a security-focused distro that can be overwhelming for beginners.
However, if you want to take the adventure of using one of the most secure/private OS, Qubes OS is a must-try.
[Qubes OS][41]
### Password Manager to Secure Accounts
No amount of privacy measures will do any good if an attacker can easily access any of your online accounts.
So, you must generate stronger and more complex passwords. And, without a password manager, it is tough to do that.
Among the [best password managers for Linux][42], Ill suggest using this:
#### 1\. Bitwarden
![][43]
An open-source password manager that offers all the essential features for free.
If you want to unlock its premium features, it would cost you just $10 a year.
[Bitwarden][44]
### Wrapping Up
Theres no end to the number of privacy-focused options available.
After all, a major chunk of those just use “privacy” as a marketing gimmick or end up being unusable for end-users.
So, it is better to stick with some tried and tested services to use what works best for you.
What do you prefer to use among the tools listed? Do you have a favorite? Share your thoughts in the comments below.
--------------------------------------------------------------------------------
via: https://itsfoss.com/privacy-tools/
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: tmp.ETCQ3mkg7S#web
[2]: tmp.ETCQ3mkg7S#vpn
[3]: tmp.ETCQ3mkg7S#search
[4]: tmp.ETCQ3mkg7S#message
[5]: tmp.ETCQ3mkg7S#os
[6]: tmp.ETCQ3mkg7S#pwm
[7]: https://itsfoss.com/best-browsers-ubuntu-linux/
[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/tor-browser.png?resize=800%2C514&ssl=1
[9]: https://itsfoss.com/tor-guide/
[10]: https://www.torproject.org/download/
[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/08/firefox-proton.png?resize=800%2C450&ssl=1
[12]: https://itsfoss.com/open-source-browsers-linux/
[13]: https://news.itsfoss.com/why-mozilla-firefox/
[14]: https://itsfoss.com/best-firefox-add-ons/
[15]: https://www.mozilla.org/en-US/firefox/new/
[16]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/brave-tab-management.png?resize=800%2C523&ssl=1
[17]: https://itsfoss.com/brave-vs-firefox/
[18]: https://brave.com/
[19]: https://itsfoss.com/best-vpn-linux/
[20]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/07/protonvpn-ui.png?resize=789%2C800&ssl=1
[21]: https://itsfoss.com/recommends/protonvpn/
[22]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/mullvad-vpn.png?resize=800%2C460&ssl=1
[23]: https://mullvad.net/en/
[24]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/duckduckgo-light-v.png?resize=800%2C418&ssl=1
[25]: https://itsfoss.com/privacy-search-engines/
[26]: https://duckduckgo.com/
[27]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/02/startpage-screenshot.jpg?resize=800%2C395&ssl=1
[28]: https://startpage.com/
[29]: https://itsfoss.com/private-whatsapp-alternatives/
[30]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/01/signal-messenger-new.jpg?resize=800%2C450&ssl=1
[31]: https://itsfoss.com/install-signal-ubuntu/
[32]: https://signal.org/en/
[33]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/01/threema.jpg?resize=800%2C450&ssl=1
[34]: https://threema.ch/en
[35]: https://itsfoss.com/linux-better-than-windows/
[36]: https://itsfoss.com/privacy-focused-linux-distributions/
[37]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/linux-mint-20-3-screenshot.png?resize=800%2C449&ssl=1
[38]: https://itsfoss.com/linux-mint-vs-ubuntu/
[39]: https://linuxmint.com/
[40]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/03/qubes-os.jpg?resize=800%2C450&ssl=1
[41]: https://www.qubes-os.org/
[42]: https://itsfoss.com/password-managers-linux/
[43]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/bitwarden-firefox-extension.png?resize=800%2C500&ssl=1
[44]: https://bitwarden.com/

View File

@ -1,101 +0,0 @@
[#]: subject: "Math is fun with this Linux graphing calculator"
[#]: via: "https://opensource.com/article/22/2/kalgebra-linux-calculator"
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Math is fun with this Linux graphing calculator
======
Like your favorite graphing calculator from high school, KAlgebra is
both a scientific calculator and a 2D plotter plus more features.
![sin\(00.4x^2\) + .002y^2][1]
If you spent your high school years gazing at TI-80 series calculators but lost track of the device somewhere along the way, then you might sometimes yearn to relive those thrilling years of algebra and calculus. Somebody on the Linux KDE project must have felt that way, too, because one of the KDE Framework libraries, Analitza, provides syntax and widgets to enable you to perform advanced math functions with K apps like the graphing calculator KAlgebra.
### Install KAlgebra on Linux
On Linux, you can install KAlgebra from your software repository. For example, on Fedora, Mageia, and similar:
```
`$ sudo dnf install kalgebra`
```
On Elementary, Linux Mint, and other Debian-based distributions:
```
`$ sudo apt install kalgebra`
```
Alternately, you can [install it as a flatpak][2].
### Linux calculator
KAlgebra is, like many of the famous graphing calculators used in schools, both a scientific calculator and a 2D plotter. Unlike any of the graphing calculators I've ever used, it's also a 3D plotter. But before rushing into 3D space, start with some basic syntax.
When representing an equation in KAlgebra, you must do some minor translation of math symbols as they're often written by hand to how they're represented on a computer. For instance, to convert Fahrenheit degrees to Celsius, the equation is: (5÷9) × (n-32), where _n_ is Fahrenheit. This is generally how equations and mathematical functions are expressed: they use special symbols like ÷ and × as well as variables like n, and then they identify what variable represents what kind of value. You may or may not know the meaning of every special math symbol, but as long as you know that a special symbol has a specific meaning, then you can look it up. In the temperature conversion example, the symbols are pretty common, so you probably already know that ÷ represents division and × represents multiplication.
In KAlgebra, as in most programming languages, division is represented by a forward slash and multiplication by an asterisk, so the equation to, for example, convert 70° Fahrenheit is `(5/9)*(70-32)`.
There are also special functions for common math operations in KAlgebra, and when you type any letter into KAlgebra, a tooltip provides potential auto-completion for available functions. Another way to write the equation for temperature conversion in KAlgerbra is to use the _times_ function: `times(5/9, 70-32)`.
As you complete math problems, established variables are listed in the right column of the calculator, including the `ans` value, which is updated with the answer to the completed equation. In theory, then, you should be able to reverse the conversion and derive a Fahrenheit temperature from _ans_.
![Temperature conversion in KAlgebra][3]
(Seth Kenlon, [CC BY-SA 4.0][4])
### Graphing calculator
Numbers are fun, but they really get fun when they're used to draw shapes. The visualization of 2D space on a graph is an important skill to develop for all kinds of disciplines, not the least of which is computer programming.
To draw a line on a graph, you must set a horizontal value (the x-axis) or a vertical value (the y-axis) or both. A valid equation for a straight line in common mathematical notation is just `x=5`. This produces a straight horizontal line 5 points above the 0 origin point of the graph. However, in KAlgebra you must make it explicit that you want to set just the x value with the notation `x->5`.
![A line in KAlgebra][5]
(Seth Kenlon, [CC BY-SA 4.0][4])
Other than that, graphing is as straightforward as it is elsewhere. You can write complex equations, and you can use special functions, like `sin`.
![Sin wave and an s-curve][6]
(Seth Kenlon, [CC BY-SA 4.0][4])
### 3D graph on Linux
By the time you get to the 3D graph tab, you likely have a good understanding of the syntax of KAlgebra, and you've also exceeded my mathematical knowledge. I learned everything I know about cartesian graphs from electronics and synthesis, so the most fun I've had with the 3D graph is visualizing a sine wave as a 3D object:
![Sine waves in space][7]
(Seth Kenlon, [CC BY-SA 4.0][4])
The difference between the 3D graph and the 2D graph (aside from 1 dimension) is that you can only have one plot in the 3D graph, so choose your equations wisely.
### Can math be fun?
It turns out that yes, math can be fun, and the answer is a good graphing calculator. As I've been working my way through math lessons to make up for some pretty dismal math grades in my past, I find myself wishing that calculators had been encouraged. I'm finding KAlgebra to be a very useful tool for not only solving arbitrary problems, but also for understanding the syntax of equations, and the purpose of functions. Whatever your relationship with mathematics, take out your KAlgebra calculator and run some numbers. It's actually really fun.
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/2/kalgebra-linux-calculator
作者:[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/kalgebra-header.jpg?itok=BVm5kMq2 (sin(00.4x^2) + .002y^2)
[2]: https://opensource.com/article/21/11/install-flatpak-linux
[3]: https://opensource.com/sites/default/files/kalgebra-temperature_0.jpg (Temperature conversion in KAlgebra)
[4]: https://creativecommons.org/licenses/by-sa/4.0/
[5]: https://opensource.com/sites/default/files/kalgebra-line-x.jpg (A line in KAlgebra)
[6]: https://opensource.com/sites/default/files/kalgebra-sin.jpg (Sin wave and an s-curve)
[7]: https://opensource.com/sites/default/files/kalgebra-sin-3d.jpg (Sine waves in space)

View File

@ -1,63 +0,0 @@
[#]: subject: "A visual map of a Kubernetes deployment"
[#]: via: "https://opensource.com/article/22/3/visual-map-kubernetes-deployment"
[#]: author: "Nived Velayudhan https://opensource.com/users/nivedv"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
A visual map of a Kubernetes deployment
======
Gain a better understanding of Kubernetes by looking at the 10 steps
that take place when you create a pod or a deployment.
![Parts, modules, containers for software][1]
When you work with containers on Kubernetes, you often group applications together in a pod. When you launch a container or a pod into production, it's called a _deployment_. If you're using Kubernetes daily or even just weekly, you've probably done it hundreds of times, but have you thought about what exactly happens when you create a pod or a deployment?
I find it helpful to have an understanding of the chain of events on a high level. You don't have to understand it, of course. It still works even when you don't know why. I don't intend to list each and every little thing that happens, but I aim to cover all of the important ones.
Here's a visual map of how the different components of Kubernetes interact:
![Pod chain][2]
(Nived Velayudhan and Seth Kenlon, [CC BY-SA 4.0][3])
You may notice in the diagram above that I haven't included etcd. The API server is the only component that can directly talk to etcd, and only it can make changes to it. So you can assume that etcd exists (hidden) behind the API server in this diagram. 
Also, I'm talking about only two main controllers (Deployment and ReplicaSet) here. Others would also work similarly.
The steps below describe what happens when you execute the `kubectl create` command:
**Step 1:** When you use the `kubectl create` command, an HTTP POST request gets sent to the API server, which contains the deployment manifest. The API server stores this in the etcd data store and returns a response to the kubectl.
**Steps 2 and 3:** The API server has a watch mechanism and all the clients watching this get notified. A client watches for changes by opening an HTTP connection to the API server, which streams notifications. One of those clients is the Deployment controller. The Deployment controller detects a Deployment object, and it creates a ReplicaSet with the current specification of the Deployment. This resource gets sent back to the API server, which stores it in the etcd datastore.
**Steps 4 and 5:** Similar to the previous step, all watchers get notified about the change made in the API server—this time the ReplicaSet Controller picks up the change. The controller understands the desired replica counts and the pod selectors defined in the object specification, creates the pod resources, and sends this information back to the API server, storing it in the etcd datastore.
**Steps 6 and 7:** Kubernetes now has all the information it needs to run the pod, but which node should the pods run on? The scheduler watches for pods that don't have a node assigned to them yet, and starts its process of filtering and ranking all nodes to choose the best node to run the pod on. Once the node is selected, that information gets added to the pod specification. And it gets sent back to the API server and stored in the etcd datastore.
**Steps 8, 9, and 10:** All the steps until now occur in the control plane itself. The worker node has yet to do any work. The pod's creation isn't handled by the control plane, though. Instead, the kubelet service running on all the nodes watches for the pod specification in the API server to determine whether it needs to create any pods. The kubelet service running on the node selected by the scheduler gets the pod specification and instructs the container runtime in the worker node to create the container. This is when a container image gets downloaded (if it's not already present) and the container actually starts running.
### Understanding Kubernetes deployments
Gaining an understanding of this general flow can help you understand many events in Kubernetes. Consider a DemonSet or StatefulSet in Kubernetes. Apart from using different controllers, the pod creation process remains the same.
Ask yourself this: If the deployment gets modified to have three replicas of an app, what would the chain of events that lead to the creation of the pods look like? You can refer to the diagram or the listed steps, but you definitely have the knowledge you need to figure it out. Knowledge is power, and you now have an important component for understanding Kubernetes.
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/3/visual-map-kubernetes-deployment
作者:[Nived Velayudhan][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/nivedv
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/containers_modules_networking_hardware_parts.png?itok=rPpVj92- (Parts, modules, containers for software)
[2]: https://opensource.com/sites/default/files/uploads/pod-chain_0.png (Pod chain)
[3]: https://creativecommons.org/licenses/by-sa/4.0/

View File

@ -1,92 +0,0 @@
[#]: subject: "Put sticky notes on your Linux KDE desktop"
[#]: via: "https://opensource.com/article/22/2/sticky-notes-linux-kde"
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Put sticky notes on your Linux KDE desktop
======
Use KNotes, a feature of the Kontact suite, to gently remind yourself of
your daily tasks.
![Working from home at a laptop][1]
I remember the first time I went to an "un" conference. It was a chaotic event at first, with lots of socializing and sharing of personal projects, but it gradually coalesced into a mostly self-organized technical event. It didn't happen with magic, but with sticky notes. People wrote ideas for talks and presentations on those colorful adhesive notepads, and stuck them to a common wall, and other people grouped similar ideas into clusters, and eventually everyone knew where to congregate to discuss specific topics. It was a beautiful and satisfying thing to witness, and it gave me a new respect for sticky notes. So I was happy to recently discover that the KDE Plasma Desktop has digital sticky notes, and in many ways they're even more useful than the physical ones. The application is called KNotes, and if you have random ideas that you feel like jotting down, it's probably something you want to consider for your own Linux desktop.
### Install KNotes
KNotes is part of the Kontact suite, which is the personal information manager (PIM) for KDE. If you're running the Plasma Desktop, then you probably already have KNotes installed. If not, you can install it from your package manager:
```
`$ sudo dnf install kontact`
```
On a Debian-based distribution, use the `apt` command instead of `dnf`.
### KNotes on the Linux desktop
Even though KNotes is part of Kontact, it's also a stand-alone application that can run in the background, ready to produce a blank note whenever you need one. Launch KNotes from your application menu, and it minimizes itself to your system tray. Its icon is a small yellow square, because before sticky notes got colorful in real life they tended to all be yellow.
To create a new note, right-click the KNote icon in your system tray and select **New Note**. The first time you create a note, you're prompted to choose a destination for the saved note. Select the local KNotes database file (it's managed by Kontact, so you won't interact with that file directly) and enable the selection to use this location by default. From then on, you won't be prompted again.
A new note appears on your desktop, and you can type yourself a note.
![Start using KNotes][2]
(Seth Kenlon, [CC BY-SA 4.0][3])
It's as simple as that. Or at least, it would be, were these old-fashioned physical notes. But these are digital KDE KNotes, so you can do a lot more than just jot down some reminder text to yourself.
### Changing note colors
A bunch of yellow notes start to blend together, but you can color-code notes. Right-click on the title bar of the note (the part with the date and time) and select **Preferences** from the contextual menu that appears. In the **Preferences** window, you can change the title and body font and font size, and then select the **Display Settings** tab to change the note and font colors.
![KNotes with added color][4]
(Seth Kenlon, [CC BY-SA 4.0][3])
### Sending notes
When I used to write myself notes, I often jotted reminders to myself in the scratch buffer of [Emacs][5]. There are better ways to manage [notes in Emacs][6], but my habit of jotting notes down in places that I was destined to be absent-mindedly close later, without saving, was difficult to break.
With KNotes, the notes are automatically saved to Kontact, so you don't have to worry about keeping track of them. Better still, they're digital, so you can send them to yourself on other devices. You can email notes to yourself, or you can send them to another computer over your network. All it takes is a right-click on the title bar of a note, and you can select **Email** or **Send**.
To receive notes as KNotes from one KDE Plasma Desktop to another, you must give KNotes permission on the recipient machine to accept notes. To allow incoming notes, right-click on the KNotes icon in the system tray and select **Configure KNotes**.
![Configure KNotes][7]
(Seth Kenlon, [CC BY-SA 4.0][3])
### Setting alarms
At least for me, notes usually happen because I've promised someone something in the short term, often by the end of the day. Notes stuck to my desktop do tend to get covered up as I work and open more and more windows, so it's especially helpful that KNotes allow you to set alarms for the really important ones.
To set an alarm for a note, right-click on the note's title bar and select **Set alarm**.
### Take notes on Linux
Sticky notes are easy and fun ways to keep track of daily tasks. They don't "work" for everyone, and they aren't my only means of tracking things I mean to do each day, but they're great options to have, and there's nothing more satisfying than moving a completed note into the "done" pile before deleting them all at the end of the day. Give it a try, it's a habit that just might stick.
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/2/sticky-notes-linux-kde
作者:[Seth Kenlon][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/seth
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/wfh_work_home_laptop_work.png?itok=VFwToeMy (Working from home at a laptop)
[2]: https://opensource.com/sites/default/files/knote-yellow.jpg (Start using KNotes)
[3]: https://creativecommons.org/licenses/by-sa/4.0/
[4]: https://opensource.com/sites/default/files/knote-color.jpg (KNotes with added color)
[5]: https://opensource.com/downloads/emacs-cheat-sheet
[6]: https://opensource.com/article/18/7/emacs-modes-note-taking
[7]: https://opensource.com/sites/default/files/knotes-preferences.jpg (Configure KNotes)

View File

@ -0,0 +1,268 @@
[#]: subject: "Boost your home network with DNS caching on the edge"
[#]: via: "https://opensource.com/article/22/3/dns-caching-edge"
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Boost your home network with DNS caching on the edge
======
Create your own edge by running a DNS caching service on your home or
business network.
![Mesh networking connected dots][1]
If you've been hearing a lot of talk about "the cloud" over the past several years, then you may also have heard rumblings about something called "the edge."
The term _edge computing_ reflects the recognition that the cloud has boundaries. To reach those boundaries, your data has to connect with one of the physical datacenters powering the cloud. Getting data from a user's computer to a cluster of servers might be quick in some settings, but it depends heavily on geographic location and network infrastructure. The cloud itself can be as fast and powerful as possible, but it can't do much to offset the time required for the roundtrip your data has to make.
**[ What's the latest in edge? See [Red Hat's news roundup][2] from Mobile World Congress 2022. ]**
The answer is to use the edge of the boundaries of regional networks and the cloud. When initial services or computation happen on servers at the edge, it speeds up a user's interactions with the cloud.
By the same principle, you can create your own edge by running some services on your home server to minimize roundtrip lag times. Don't let the special terminology intimidate you. Edge computing can be as simple as an IoT device or running a server connected to [federated services][3].
One particularly useful and easy change you can make to your home or business network to give it a boost is running a DNS caching service.
### What is DNS?
The Domain Name System (DNS) is what enables us to translate the IP addresses of servers, whether they're in the cloud or just across town, to friendly website names like `opensource.com`.
Behind every domain name is a number—names are simply a convenience for humans, who are more likely to remember a few words than a string of numerals. When you type `example.com` into a web browser, your web browser silently sends a request over port 53 to a DNS server to cross-reference the name `example.com` with its registry, then sends back the last known IP address assigned to that name.
That's one roundtrip from your computer to the internet.
Armed with the correct number, your web browser makes a second request, this time with the number instead of the name, directly to your destination.
That's another roundtrip.
To make matters worse, your computer (depending on your configuration) may also be sending requests to DNS servers for named devices on your local network.
You can cut out all of this extra traffic by using a local cache. With a DNS caching service running on your network, once any one device on your network obtains a number assigned to a website, that number is stored locally, so no request from your network need ask for that number again.
As a bonus, running your own DNS caching server also enables you to block ads and generally take control of how any device on your network interacts with some of the low-level technologies of the internet.
### Install Dnsmasq on Linux
Install Dnsmasq using your package manager.
On Fedora, CentOS, Mageia, and similar:
```
$ sudo dnf install dnsmasq dnsmasq-utils
```
On Debian and Debian-based systems, use `apt` instead of `dnf`.
### Configure Dnsmasq
There are many options in Dnsmasq's default configuration file.
It's located at `/etc/dnsmasq.conf` by default, and it's well commented, so you can read through it and choose what you prefer for your network.
Here are some of the options I like.
Keep your local domains local:
```
# Never forward plain names (without a dot or domain part)
domain-needed
# Never forward addresses in the non-routed address spaces
bogus-priv
```
Ignore content from common ad sites. This syntax replaces the string between the first forward-slashes with the trailing address:
```
# replace ad site domain names with an IP with no ads
address=/double-click.net/127.0.0.1
```
Set the cache size. The default suggestion is 150, but I've never felt that 150 websites sounded like enough.
```
# Set the cachesize here
cache-size=1500
```
### Finding resolv.conf
On most Linux systems, the systemd `resolved` service manages the `/etc/resolv.conf` file, which governs what DNS nameservers your computer contacts for name to IP address resolution.
You can disable `resolved` and run `dnsmasq` alone, or you can run them both, pointing `dnsmasq` to its own resolver file.
To disable `resolved`:
```
`$ sudo systemctl disable --now systemd-resolved`
```
Alternately, to run them both:
```
$ cat &lt;&lt; EOF &gt;&gt; /etc/resolvmasq.conf
# my network name
domain home.local
# local hosts
enterprise 10.0.170.1
yorktown 10.0.170.4
# nameservers
nameserver 208.67.222.222
nameserver 208.67.220.220
EOF
```
In this example, `home.local` is a domain name I give, either over Dynamic Host Configuration Protocol (DHCP) or locally, to all devices on my network. The computers `enterprise` and `yorktown` are my home servers, and by listing them here along with their local IP addresses, I can contact them by name through `dnsmasq`. Finally, the `nameserver` entries point to known good nameservers on the internet. You can use the nameservers listed here, or you can use nameservers provided to you by your ISP or any public nameserver you prefer.
In your `dnsmasq.conf` file, set the `resolv-file` value to `resolvmasq.conf`:
```
resolv-file=/etc/resolvmasq.conf
```
### Start dnsmasq
Some distributions may have already started `dnsmasq` automatically upon installation. Others let you start it yourself when you're ready. Either way, you can use systemd to start the service:
```
$ sudo systemd enable --now dnsmasq
```
Test it with the `dig` command.
When you first contact a server, the query time might be anywhere from 50 to 500 milliseconds (hopefully not more than that):
```
$ dig example.com | grep Query\ time
;; Query time: 56 msec
```
The next time you try it, however, the query time is drastically reduced:
```
$ dig example.com | grep Query\ time
;; Query time: 0 msec
```
Much better!
### Enable dnsmasq for your whole network
Dnsmasq is a useful tool on one device, but it's even better when you let all the devices on your network benefit.
Here's how you open the `dnsmasq` service up to your whole local network:
#### 1\. Get the IP address of the server running the `dnsmasq` service
On the computer running `dnsmasq`, get the local IP address:
```
$ dig example.com | grep Query\ time
;; Query time: 0 msec
```
In this example, the IP address of the Raspberry Pi I'm running `dnsmasq` on is 10.0.170.170. Because this Pi is now an important part of my network infrastructure, I have its address statically assigned by my DHCP router. Were I to allow it to get a dynamic IP address, it _probably_ would not change (DHCP is designed to be helpful that way) but if it did then my whole network would miss out on the benefit of `dnsmasq`.
#### 2\. Modify the server's firewall to allow traffic on port 53
Open a port in your server's firewall using [firewall-cmd][4] so it allows DNS requests and sends responses.
```
$ sudo firewall-cmd --add-service dns --permanent
```
#### 3\. Add the IP address of the server to the `nameserver` entry of your home router
Knowing that my local DNS server's address is 10.0.170.170 (remember that it's almost certainly different on your own network), I can add it as the primary nameserver in my home router.
There are many routers out there, and there's no singular interface.
However, the task is the same, and the workflow is usually relatively similar from model to model.
In my [Turris Omnia router][5], the advanced interface allows DNS forwarding, which sends DNS requests to a server of my choosing.
Entering `10.0.170.170` (the IP of my `dnsmasq` server) here forces all DNS traffic to be routed through Dnsmasq for caching and resolution.
![Screenshot of fields for DNS server settings for Turris Omnia router][6]
(Seth Kenlon, [CC BY-SA 4.0][7])
 
In my TP-Link router, on the other hand, DNS settings are configured in the DHCP panel.
 
![Advanced DNS settings for tp-link router][8]
(Seth Kenlon, [CC BY-SA 4.0][7])
It may take some exploration, so don't be afraid to look around in your router's interface for DNS server settings. When you find it, enter your Dnsmasq server address and then save the changes.
Some models require the router to reboot when changes are made.
All devices on your network inherit settings from the router, so now all DNS traffic passing from a device to the internet gets passed through your Dnsmasq server.
### Close to the edge
As more and more websites get added to your server's DNS cache, DNS traffic will have to go farther than your local Dnsmasq server less and less often.
The principle of computing locally and quickly whenever possible drives edge computing. You can imagine how important it is, just by going through this exercise, that technologies use strategic geographic locations to speed up internet interactions.
Whether you're working on edge computing at home, at work, or as a cloud architect, the edge is an important component of the cloud, and it's one you can use to your advantage.
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/3/dns-caching-edge
作者:[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/mesh_networking_dots_connected.png?itok=ovINTRR3 (Mesh networking connected dots)
[2]: https://www.redhat.com/en/blog/red-hat-telecommunications-news?intcmp=7013a000002qLH8AAM
[3]: https://opensource.com/article/17/4/guide-to-mastodon
[4]: https://opensource.com/article/20/2/firewall-cheat-sheet
[5]: https://opensource.com/article/22/1/turris-omnia-open-source-router
[6]: https://opensource.com/sites/default/files/uploads/turris-dns.jpeg (Turris Omnia)
[7]: https://creativecommons.org/licenses/by-sa/4.0/
[8]: https://opensource.com/sites/default/files/uploads/tplink-dns.jpeg (tp-link)

View File

@ -1,150 +0,0 @@
[#]: subject: "Experience the Stunning Cutefish Desktop in Arch Linux"
[#]: via: "https://www.debugpoint.com/2022/02/cutefish-arch-linux-install/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Experience the Stunning Cutefish Desktop in Arch Linux
======
NOW YOU CAN EXPERIENCE THE CUTEFISH DESKTOP IN VANILLA ARCH LINUX. THIS
ARTICLE OUTLINES THE STEPS TO INSTALL THE CUTEFISH DESKTOP ENVIRONMENT
IN ARCH LINUX SYSTEMS.
![Cutefish Desktop in Arch Linux][1]
### Cutefish Desktop
A while back, [we reviewed CutefishOS][2], which features the awesome looking Cutefish desktop, which has received a positive reaction and reaches from the readers of our portal. So, we thought this was a perfect time if you want to do some experiments with this desktop in your favourite Arch Linux. Why not?
Before you jump on to the installation part, here are some nuggets about Cutefish Desktop.
Cutefish Desktop is part of [Cutefish OS][3], a new Linux distribution under development. This Debian based Linux distribution features the incredible looking, lightweight Cutefish Desktop.
The Cutefish Desktop is written on Qt Quick, QML, C++ and KDE Framework for its inner workings. This modern desktop environment uses KWin and SDDM for window and display management.
Cutefish Desktop brings a complete macOS inspired to look for your Linux desktop out-of-the-box. That means you get stunning icons, wallpapers, a global menu, a top bar with nice notification popups and a bottom dock.
You can read a detailed review in our complete [write up here][2].
### Install Cutefish Desktop in Arch Linux
#### Install base Arch System
This guide assumes that you have a base Arch Linux installed in your system before trying these steps. Or, you can try if you have any Arch-based Linux distributions installed as well. Just be careful about the display management in those cases.
You can refer to our guide for Arch Linux installation if you are new to Arch.
* [How to install Arch Linux using archinstall (recommended)][4]
* [How to install Arch Linux (basic guide)][5]
#### Install Cutefish Desktop
The Arch Linux community repository contains the Cutefish group, which have all the component required for this desktop to run. It includes core packages, native applications and additional tools as mentioned below.
At the terminal prompt of your Arch Linux system, run the below command to install all the Cutefish Desktop packages.
```
pacman -S cutefish
```
![A base Arch Linux prompt][6]
![Install Cutefish in Arch Linux][7]
Next, we need to install Xorg and display manager SDDM via the below command. Be careful if you install Cutefish desktop in an Arch install with other desktop environments such as GNOME, KDE Plasma or Xfce. Because you already have a display manager and Xorg installed. So, you can easily skip this step.
```
pacman -S xorg sddm
```
After the above commands are complete, enable the display manager via systemctl.
```
systemctl enable sddm
```
Thats all you need to install Cutefish desktop as bare metal level. Once done, reboot the system, and you should see Cutefish Desktop as below after logging in.
[][8]
SEE ALSO:   How to Install GNOME Desktop in Arch Linux [Complete Guide]
The base install requires additional customization because its not as close as Cutefish OS.
### Post Install Configuration
Although Cutefish group in Arch repo includes its native apps, such as Calculator and file manager, the desktop lacks basic applications that you need to install separately to make it a fully functional and productive desktop.
I recommend installing the following essential apps using the below command for your base installation. You can skip this step or choose any other applications/combinations of your choice.
* Firefox web browser
* Kwrite text editor
* Fonts (ttf-freefont)
* VLC media player
* Gwenview Image viewer
* GIMP Image Editor
* LibreOffice
* Transmission
```
pacman -S firefox ttf-freefont kwrite vlc gwenview gimp libreoffice-still transmission-qt
```
After installation, open the Settings and change the font of your choice. The default font was courier, which looks terrible on the desktop itself.
Reboot the system once you complete all the customizations as per your choice. And enjoy Cutefish desktop in Arch Linux.
![The Stunning Login Lock Screen of Cutefish Desktop][9]
### Closing Notes
This desktop is under development, so you would not find many settings items as of writing this. For example, there is no way to change resolutions, hiding dock and other options. That said, you can still use this with additional applications for your use. If you want to experiment, you can go ahead and try.
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!
##### Also Read
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/2022/02/cutefish-arch-linux-install/
作者:[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/wp-content/uploads/2022/02/Cutefish-Desktop-in-Arch-Linux-1024x575.jpg
[2]: https://www.debugpoint.com/2021/11/cutefish-os-review-2021/
[3]: https://en.cutefishos.com/
[4]: https://www.debugpoint.com/2022/01/archinstall-guide/
[5]: https://www.debugpoint.com/2020/11/install-arch-linux/
[6]: https://www.debugpoint.com/wp-content/uploads/2022/02/A-base-Arch-Linux-prompt.jpg
[7]: https://www.debugpoint.com/wp-content/uploads/2022/02/Install-Cutefish-in-Arch-Linux.jpg
[8]: https://www.debugpoint.com/2020/12/gnome-arch-linux-install/
[9]: https://www.debugpoint.com/wp-content/uploads/2022/02/The-Stunning-Login-Lock-Screen-of-Cutefish-Desktop-1024x576.jpg
[10]: https://t.me/debugpoint
[11]: https://twitter.com/DebugPoint
[12]: https://www.youtube.com/c/debugpoint?sub_confirmation=1
[13]: https://facebook.com/DebugPoint

View File

@ -0,0 +1,137 @@
[#]: subject: "Get started with Carbonio, an open source collaboration platform"
[#]: via: "https://opensource.com/article/22/3/open-source-collaboration-carbonio"
[#]: author: "Arman Khosravi https://opensource.com/users/arman-khosravi"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Get started with Carbonio, an open source collaboration platform
======
Carbonio empowers teams to work efficiently and closely together,
regardless of distance, timezone, or work preferences.
![Working on a team, busy worklife][1]
In recent years, interest in using open source collaboration platforms to enhance business productivity increased. Proprietary software has managed to overwhelm customers with a maze of licensing requirements and pay-to-play features that many companies don't want to manage. On the other hand, open source offers alternatives that give companies the liberty of choice and allow new businesses to enter existing markets easier with more control over upfront costs.
There are many choices in open source when selecting collaborative suites. My favorite is the AGPL-licensed Community Edition of Carbonio by Zextras (you may know Zextras from their complementary components for Zimbra Open Source).
### Carbonio Community Edition
In January 2022, Zexras introduced an open source email server and collaboration platform called Carbonio Community Edition (Carbonio CE). It comes with a powerful web client to organize emails, calendars, attachments, and personal files. It also has collaboration features like collaborative editing, group chats, and video meetings, all integrated into the web client.
![Carbonio CE][2]
(Zextras, [CC BY-SA 4.0][3])
In this article, I describe Carbonio CE's components and what I think distinguishes each one from similar products.
### Carbonio CE server
Carbonio CE, at its core, is an email server with dedicated anti-spam and antivirus. System administrators can use different tools to deploy on-premises servers, customize a white label login page, and manage storage, quotas, and mailboxes.
#### Admin console
Carbonio CE has an admin console to facilitate various administrative tasks divided into four categories:
* **Monitor:** Get information about server status, running services, and statistics.
* **Account:** Manage accounts, aliases, and mailing lists.
* **Settings:** Manage global settings, domains, class of service, and certificates.
* **Search:** Perform an advanced search on the entire email server.
### Carbonio CE web client
Carbonio CE comes with a modern web client with a minimal look and feel, but it's full of features. Carbonio CE's web client integrates all the necessary tools users need during a typical workday in a unified platform. The goal is to have a product to improve productivity by minimizing common distractions such as frequent context switching.
#### Email, calendar, contacts, and search
Like many email clients, Carbonio CE provides users with different tools to manage emails, including tags, folders, filters, and more. One of the most valuable (but lesser-seen) features is shared inboxes, folders, and item sharing between users. This is particularly useful for office employees who send many emails to project collaborators or any group of users daily.
Another valuable feature of Carbonio CE is having multiple tabs for composing and previewing emails. It helps users access different resources without changing tabs while writing an email.
![Carbonio email][4]
(Zextras, [CC BY-SA 4.0][3])
Calendars and event management tools are often the starting points of daily workplace procedures. In Carbonio CE, all components (emails, attachments, meeting rooms, personal files, and contacts) work together in a way that users can easily: 
* Create events
* Schedule meetings
* Find attendees' free hours
* Add descriptions
* Attach files directly from an integrated file manager
* Send invitations to all attendees automatically by email 
Moreover, the interface supports drag-and-drop functionalities to facilitate event management.
![Carbonio calendar][5]
(Zextras, [CC BY-SA 4.0][3])
When it comes to contact management, a handy feature in Carbonio CE is that users can manage multiple address books while sharing each between specific users. Shared address books help create different lists of users for various projects, teams, or sectors. Users can quickly select the corresponding address books for sending emails to specific groups instead of inserting users one by one. The same goes for sending files, scheduling meetings, and creating calendar events.
Search system and indexing in Carbonio CE include all the components. Therefore, a search query covers email, contacts, events, attachments, and documents. Search within email bodies is also a neat feature, especially for office employees. You also find other functions—advanced filters and complex queries using logical operators.
#### Chats and video meetings
Carbonio CE provides users with a full-featured communication system integrated into the webmail. It includes individual chats, group conversations, video meetings, screen sharing, and file-sharing capabilities.
![Carbonio chat][6]
(Zextras, [CC BY-SA 4.0][3])
#### File management with collaborative editing
Another feature is professional collaborative editing for modifying documents with several teammates in real time. It comes with file management to easily organize, modify, and share files with other users. It works perfectly with webmail, so users can easily save attachments into their files or attach personal documents directly into an email or a chat message.
![Carbonio files][7]
(Zextras, [CC BY-SA 4.0][3])
### Carbonio CE mobile clients
Carbonio CE has three free mobile apps that support Android and iOS devices:
* **Mail:** A mobile client for email, calendars, and contacts.
* **Chats:** An instant messaging app for individual or group conversations, including video meetings.
* **Files:** A file manager to access personal files on a Carbonio CE platform.
![Carbonio CE UI][8]
(Zextras, [CC BY-SA 4.0][3])
### Try Carbonio
Carbonio has all the features you need and expect from collaborative software and tries its best to empower teams to work efficiently and closely together, regardless of distance, timezone, or work preferences. It's open source, easy to set up, and intuitive to use.
Zextras has been working on open source email servers and collaboration platforms for 20 years and believes in the unmatched potential of open source principles to achieve high-quality software that gives users more flexibility. This is why all [contributions to Carbonio Community Edition][9] are valued, whether you're helping with documentation, localization, or software development to add new features to the platform.
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/3/open-source-collaboration-carbonio
作者:[Arman Khosravi][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/arman-khosravi
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/team_dev_email_chat_video_work_wfm_desk_520.png?itok=6YtME4Hj (Working on a team, busy worklife)
[2]: https://opensource.com/sites/default/files/pictures/carbonio_ce.png (Carbonio CE)
[3]: https://creativecommons.org/licenses/by-sa/4.0/
[4]: https://opensource.com/sites/default/files/uploads/ui_1.png (Carbonio email)
[5]: https://opensource.com/sites/default/files/uploads/ui_2.png (Carbonio calendar)
[6]: https://opensource.com/sites/default/files/uploads/ui_3.png (Carbonio chat)
[7]: https://opensource.com/sites/default/files/uploads/ui_4.png (Carbonio files)
[8]: https://opensource.com/sites/default/files/pictures/ui_5.png (Carbonio CE UI)
[9]: https://www.zextras.com/carbonio-ce-contribute/

View File

@ -0,0 +1,123 @@
[#]: subject: "Nautilus File Manager Looks Amazing with GTK4 and Libadwaita A Deep Dive"
[#]: via: "https://www.debugpoint.com/2022/03/gnome-files-43/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Nautilus File Manager Looks Amazing with GTK4 and Libadwaita A Deep Dive
======
WE TEST-DRIVE THE DEVELOPMENT VERSION OF GNOME FILES VERSION 43 AND GIVE
YOU DETAILS ABOUT ITS LOOKS, FEATURES AND PERFORMANCE.
GNOME Files (formerly Nautilus) is perhaps the most used desktop application today in GNOME eco-space. And it never received much of an overhaul since its first release while the rest of the GNOME applications and the desktop itself moved to a newer tech stack.
Everything changes now. The GNOME developers are adopting GTK4 and libadwaita for the entire desktop and Files.
GNOME Files version 43, which would release with GNOME 43 release later in 2022, would be impressive. The much-needed [rework][1] brings native dark mode, great UI with nice libadwaita touch and GTK4 performance boost.
### GNOME Files 43
We installed the development Flatpak version of GNOME Files 43, and heres what we found.
At first glance, you should notice the nice UI touch thanks to Libadwaita. The close button is nice and round, while the address bar, selection highlighter, and entire Files window are all properly spaced with rounded corners.
The border highlighters are not present for all the components.
Heres a quick comparison of the light and dark modes for versions 43 (left) and 42 (right).
![GNOME Files 43 and 42 Light Mode Comparison][2]
![GNOME Files 43 and 42 Dark Mode Comparison][3]
The address bar folder separator remains the same. However, the fonts are a little polished. The address bar context menu changed. The option is gone; instead, you get **Open in Other application** menu item. A new option, **Create Link**, is introduced. I think many users will miss the Open in Terminal option.
![New option in address bar menu][4]
Another significant change you should notice in the two main toolbar menus a) view button and the b) main hamburger menu. Those context menu items show the keyboard shortcuts along with menu items. This makes them look a little more prominent as well.
![The Hamburger menu now have keyboard shortcuts][5]
The folders context menu now has a little up arrow pointing to the folder from where it popped up. The right-click context menu for a folder is well organized with groups. For example, the opening actions are grouped while cut, copy, paste are distinctively separate with a horizontal bar in the context menu.
![Context Menu for folder changes][6]
I also noticed a new option, “Paste into the folder”, which is nice.
The Nautilus Search remains almost the same as Files 42, except you can search by Created date/time in Files 43.
However, I noticed one exciting change. The application name for file association in the context menu is removed. For example, if you try to open a text document today in Files 42, it shows the application name associated with it in the context menu. In Files 43, it just shows “Open”. This change, I feel, was unnecessary. It was better earlier.
![A subtle change in context menu for file association][7]
So, thats the overall changes I found in the new GTK4 version of this application. But it looks nice? Isnt it. Moreover, if you are coming straight from Ubuntu 20.04 LTS, which contains Files 3.38, then perhaps your experience would be a “wow”. Most of the sections changed if you compare Files 43 with Files 3.38. It would be quite an experience for those users.
[][8]
SEE ALSO:   Access Google Drive and Sync Calendar in Ubuntu 16.04 using Nautilus
You should remember version 43 is still in development so that things may change in the coming days in the final shipment.
### Wish List
If I compare various Linux file managers, others have far more options than GNOME Files today.
I agree.
For example, Nemo or Dolphin the two best file managers outsmart Files in various ways. To compare the features, GNOME Files doesnt have some popular features
* Dual-pane or split view
* Opening a root folder from the context menu is difficult
* An up arrow for folder browsing
* No option to create a new file (text, spreadsheet, etc.) from the context menu
* More Sorting and Searching Functions
We hope these features come to GNOME Files soon.
### When it will be available
As stated above, this version of GNOME Files will be available with GNOME 43. Hence, you should have it on Ubuntu 22.10 during the October 2022 cycle and Fedora 37 later this year from the Linux Distribution schedule perspective.
Unfortunately, [Ubuntu 22.04 LTS][9] (Jammy Jellyfish) and [GNOME 42][10] with [Fedora 36][11] would not have GNOME Files 43. The primary reason is the schedule mismatch, and it is one of the complex applications to port to GTK4 and test thoroughly. However, most of the above stated internal features would still be available with Files 42. But it may lack the nice UI changes and theme.
That said, I believe the popular file manager looks nice, and users should be thrilled to use it when it releases. Let me know your opinion about the new changes in GNOME Files 43 below in the comment box.
Cheers.
* * *
We bring the latest tech, software news and stuff that matters. Stay in touch via [Telegram][12], [Twitter][13], [YouTube][14], and [Facebook][15] and never miss an update!
##### Also Read
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/2022/03/gnome-files-43/
作者:[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://gitlab.gnome.org/GNOME/nautilus
[2]: https://www.debugpoint.com/wp-content/uploads/2022/03/GNOME-Files-43-and-42-Light-Mode-Comparison-1024x502.jpg
[3]: https://www.debugpoint.com/wp-content/uploads/2022/03/GNOME-Files-43-and-42-Dark-Mode-Comparison-1024x493.jpg
[4]: https://www.debugpoint.com/wp-content/uploads/2022/03/New-option-in-address-bar-menu-1024x267.jpg
[5]: https://www.debugpoint.com/wp-content/uploads/2022/03/The-Hamburger-menu-now-have-keyboard-shortcuts-1024x331.jpg
[6]: https://www.debugpoint.com/wp-content/uploads/2022/03/Context-Menu-for-folder-changes-1024x560.jpg
[7]: https://www.debugpoint.com/wp-content/uploads/2022/03/A-subtle-change-in-context-menu-for-file-association-1024x524.jpg
[8]: https://www.debugpoint.com/2016/05/access-google-drive-and-sync-calendar-in-ubuntu-16-04-using-nautilus/
[9]: https://www.debugpoint.com/2022/01/ubuntu-22-04-lts/
[10]: https://www.debugpoint.com/2021/12/gnome-42/
[11]: https://www.debugpoint.com/2022/02/fedora-36/
[12]: https://t.me/debugpoint
[13]: https://twitter.com/DebugPoint
[14]: https://www.youtube.com/c/debugpoint?sub_confirmation=1
[15]: https://facebook.com/DebugPoint

View File

@ -0,0 +1,287 @@
[#]: subject: "Ubuntu vs Arch: Which Linux Distro is better?"
[#]: via: "https://itsfoss.com/ubuntu-vs-arch/"
[#]: author: "Ankush Das https://itsfoss.com/author/ankush/"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Ubuntu vs Arch: Which Linux Distro is better?
======
Ubuntu and Arch Linux offer entirely different desktop experiences. 
It is often tough to choose one of them as your daily driver, especially when you cannot ignore the [benefits of Arch Linux][1] and Ubuntu.
They are both incredible choices for what they are. But, how do you choose what is best between these two?
Here, I highlight various differences between Ubuntu and Arch Linux that can help you decide.
![][2]
### 1\. Targeted Users
Arch Linux aims to provide a **Do-It-Yourself (DIY)** experience to tinkerers looking to customize various elements of their Linux system.
Things like building packages to customizing the desktop, everything counts. 
The out-of-the-box experience depends on the user who [installs and sets up Arch Linux][3]. Hence, it can easily cater to users looking for different packages, desktop environments, and more.
On the other hand, Ubuntu targets users who want a **hassle-free pre-configured setup** for their Linux system.
These users want essential tools installed, ensuring it all works as it is supposed to. In other words, the user gets an ideal desktop experience without worrying about setting it up.
Ubuntu does not want users to put more effort into improving their experience. Instead, they present it as they think would suit most users.
### 2\. Installation
Undoubtedly, Ubuntu provides a more straightforward installation method, given that you get a GUI to help install it to your desktop.
![][4]
You can even [install a GUI on the Ubuntu server][5] if you want.
With Arch Linux, you will have to rely on the terminal (or the command-line) to complete the installation.
![][6]
Fortunately, [Arch Linux now has a guided installer][7], which makes it easier to follow through installing Arch Linux via the terminal.
![][8]
Still, Ubuntu takes the lead with the convenience.
### 3\. Desktop Experience
![][9]
Ubuntu is tailored to **provide convenience** to its users. To achieve that, Canonical provides a customized GNOME desktop environment experience to make things easy.
While you may not get the same level of customization that KDE Plasma provides, you still have plenty of options, to begin with. If you are curious, you may check out our [KDE vs GNOME comparison][10] for more details.
Ubuntu also takes regular user experience feedback from its users and tries its best to offer the best workflow/productivity.
Arch Linux focuses **more on functionality**, and other technical aspects, over the desktop user experience. The end-user experience entirely depends on how you set things up when installing Arch Linux on your system.
You will have to rely on what the desktop environment offers out-of-the-box; there are no custom-made improvements for you. If you want something different, you will have to tweak things to make it happen.
![Arch Linux with GNOME][11]
However, the ability to opt for KDE Plasma, GNOME, or any [other desktop environment][12] can give you some advantages as per your preferences.
Not only that, but you can also choose window tiling managers when installing Arch Linux.
Overall, with Ubuntu, you get a particular type of desktop experience offered to every user, with little to no ability to customize it.
But, Arch Linux gives you the **freedom to define how you want the desktop experience**. Note that this might be a good thing for experienced Linux users. But, if you are new to Linux, this can be overwhelming.
### 4\. File System
Most users do not need to worry about the file system used by their Linux distribution.
Hence, Ubuntu sticks with **ext4** for its file system, a robust file system with all the essentials needed for a modern computing experience.
However, if you want to choose a different file system for various benefits over the most-commonly used **ext4**, Arch Linux can come in handy.
![][13]
You can choose between btrfs, ext4, xfs, and f2fs. The benefits of these file systems are beyond the scope of this article, but make sure that you know what you are doing if selecting anything else over **ext4**.
### 5\. App Ecosystem
Ubuntu offers support for a wide range of applications. Undoubtedly, this is why [most of the popular Linux distributions][14] are based on Ubuntu.
![][15]
And, keeping its popularity in mind, various tools primarily support Ubuntu among other Linux distributions.
Not just the choices of apps/packages, but it is also effortless to install packages available for Ubuntu. You can install packages through its official repositories, use PPAs, or its software center (with Snap integration).
While it does not have [Flatpak][16] built-in, you can [set it up to install apps from Flathub][17].
Arch Linux also gets you access to countless applications through its official repositories.
However, some app developers may not officially support Arch Linux compared to Ubuntu.
Additionally, you will notice that you need to utilize [pacman to install/manage packages][18]. The GUI to install/manage applications will depend on the desktop environment you select to install.
![][19]
For instance, you can access GNOMEs software center if you install GNOME. And, Discover for KDE Plasma.
You will have no Snap or Flatpak integration built-in, so you must set it up as required.
To get access to more packages, you can use [AUR][20]. Note that it features community-builds for packages and may not be officially recommended for everything.
![][21]
Despite that, it is often considered a strong point for Arch Linux because the number of packages offered overall could be more extensive than what Ubuntu features.
You can use some [AUR helpers][22] to improve the experience.
Overall, if you want a single portal to easily manage/install software, Ubuntu
### 6\. Minimal vs Bloat Experience
This is purely based on preferences. Just because Arch Linux lets you control everything when you set it up, you can choose to install a minimum number of packages.
In contrast, Ubuntu comes pre-installed with several utilities. For some, Ubuntu can come in handy for the presence of valuable tools.
![][23]
Of course, you can uninstall packages that you do not need.
However, some users might find it unnecessary (or bloat).
So, you will need to decide if you want the necessary tools pre-installed (Ubuntu) or prefer a distro that lets you install only the tools you need (Arch) without any bloat.
### 7\. Freedom to Choose vs Restrictions
![Arch Linux \(Neofetch\)][24]
As I mentioned, Arch Linux lets you control everything; it gives you plenty of freedom to customize your experience.
Not just limited to the desktop environment or tiling window managers, but more.
For instance, you can select the preferred audio server between PulseAudio and pipewire.
You can also choose a specific Linux Kernel, like a hardened version for additional security, a zen variant for an enhanced experience, or the LTS version of the Linux Kernel.
In contrast, Ubuntu sticks to the Linux Kernel, which has been thoroughly tested and uses PulseAudio as audio server by default (at the time of writing this).
Ultimately, what you want will influence whats best for you.
### 8\. Community Support
Ubuntu, with its vast user base offers massive community support. There are numerous forums/portals to guide Ubuntu users and help troubleshoot issues.
![itsfoss community][25]
You can also ask around the forums (including our [Its FOSS community][26]), to get quick help.
Arch Linux does not offer that kind of community support, given its userbase. However, the Arch Linux wiki provides excellent documentation on almost everything to compensate for that.
![arch wiki][27]
[Arch Linux wiki][28] is probably one of the most extensive documentation if you want to explore yourself.
### 9\. Release Schedule
Ubuntu offers a [Long-Term Support version][29] that receives minor updates for five years or more (for enterprises).
![][30]
It also provides non-LTS versions that receive updates for about nine months while having a new release available every six months. The non-LTS version suits users who want the latest updates/packages, with potentially significant changes with every upgrade.
The LTS version is better suited for users who do not want experience-breaking changes with every update.
For more information, you can explore our resource on [Ubuntus release cycles and end of life][31].
Arch Linux does not bother with any of these; instead, it relies on a [rolling-release schedule][32]. You receive updates as they come, whether its minor/major.
![][33]
This ensures that you are using the latest and greatest packages all the time. This can sometimes be a good thing, but it can be inconvenient for some users when it breaks something.
### 10\. Hardware Compatibility
![][34]
Ubuntu is a popular distribution aimed at desktops. So, it is tested for compatibility with a range of hardware before releasing a version.
So, it is safe to say that **Ubuntu offers good hardware compatibility out of the box**.
In the case of Arch Linux, it does not get tested as extensively as Ubuntu. So, it may/may not work with the hardware you have.
However, just because it features the latest and greatest Linux Kernel packages, it could prove to work better than Ubuntu in some cases.
If you are confused about the compatibility of your hardware, I would suggest asking around to make sure that there are no known issues with the system you want to run Arch Linux.
With Ubuntu, everything works unless you have bleeding-edge tech.
### 11\. Stability
If you do not need your distro to fail or encounter an error, **Ubuntu should be a better choice**.
In the case of Arch Linux, the answer is not straightforward, and it can work well or go down with an update.
Arch Linux is not inherently stable, and you need to maintain it yourself to ensure that nothing breaks with customization and updates.
### Final Thoughts: What Should You Pick?
Keeping stability, compatibility, app ecosystem, and the learning curve in mind, Ubuntu is perfectly suitable for anyone who wants to get things done on their computer instead of tweaking the experience.
Arch Linux comes on top for users looking to customize their desktop experience to suit their workflow and choose to have some of the latest and greatest stuff.
Arch Linux can be an exciting experience if you are looking for an adventure, but overwhelming for some compared to Ubuntu.
So, considering all that, **what do you think you will choose?** Let me know your thoughts in the comments below.
### Frequently Asked Questions: If You Still Havent Picked One
Some of you still might have questions to come up with a conclusion, heres an FAQ to address that:
**Is Arch Better than Ubuntu?**
Yes, and no. Arch Linux is technically better, but you also need to think about its stability, app ecosystem, and the learning curve to maintain it. So, you need to re-evaluate the answer to this question based on your preferences.
**Which is faster, Ubuntu or Arch?**
Arch Linux, with a minimal installation setup. But, the answer will change as per your configuration.
Note that Ubuntu is not noticeably slower, but just because it includes more packages out of the box, some might find it bloated.
**Should I switch to Arch Linux from Ubuntu?**
If you want to tweak your experience, and want the latest/greatest packages all the time without worrying about stability, Arch Linux is your friend.
If you think that you just need the essentials to carry out the tasks on your PC, Ubuntu should suffice.
--------------------------------------------------------------------------------
via: https://itsfoss.com/ubuntu-vs-arch/
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://itsfoss.com/why-arch-linux/
[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/ubuntu-vs-arch.jpg?resize=800%2C450&ssl=1
[3]: https://itsfoss.com/install-arch-linux/
[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/09/try-ubuntu-install-ubuntu.jpeg?resize=800%2C530&ssl=1
[5]: https://itsfoss.com/install-gui-ubuntu-server/
[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/arch-linux-boot-menu-install.png?resize=635%2C481&ssl=1
[7]: https://news.itsfoss.com/arch-new-guided-installer/
[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/arch-install-terminal.png?resize=800%2C279&ssl=1
[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/ubuntu-20-04-ux.jpg?resize=800%2C407&ssl=1
[10]: https://itsfoss.com/kde-vs-gnome/
[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/arch-linux-gnome.png?resize=732%2C413&ssl=1
[12]: https://itsfoss.com/what-is-desktop-environment/
[13]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/arch-linux-filesystem.png?resize=800%2C149&ssl=1
[14]: https://itsfoss.com/best-linux-distributions/
[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/ubuntu-software-center.png?resize=800%2C574&ssl=1
[16]: https://itsfoss.com/what-is-flatpak/
[17]: https://itsfoss.com/flatpak-guide/
[18]: https://itsfoss.com/pacman-command/
[19]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/arch-install-terminal-software.png?resize=763%2C431&ssl=1
[20]: https://itsfoss.com/aur-arch-linux/
[21]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/09/sky-aur-install.png?resize=800%2C560&ssl=1
[22]: https://itsfoss.com/best-aur-helpers/
[23]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/ubuntu-utilities.png?resize=800%2C520&ssl=1
[24]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/arch-linux-neofetch.png?resize=800%2C533&ssl=1
[25]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/itsfoss-community.jpg?resize=800%2C580&ssl=1
[26]: https://itsfoss.community/
[27]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/arch-wiki.png?resize=800%2C332&ssl=1
[28]: https://wiki.archlinux.org/
[29]: https://itsfoss.com/long-term-support-lts/
[30]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/ubuntu-info.png?resize=800%2C595&ssl=1
[31]: https://itsfoss.com/end-of-life-ubuntu/
[32]: https://itsfoss.com/rolling-release/
[33]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/arch-info.png?resize=800%2C573&ssl=1
[34]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/hardware-compatibility-illustration.png?resize=800%2C450&ssl=1

View File

@ -0,0 +1,337 @@
[#]: subject: "10 Awesome Apps to Improve Your GNOME Desktop Experience [Part 5]"
[#]: via: "https://www.debugpoint.com/2022/03/best-gnome-apps-part-5/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
10 Awesome Apps to Improve Your GNOME Desktop Experience [Part 5]
======
HERE, WE SHOWCASE THE NEXT SET OF 10 GNOME APPS THAT WILL SUPERCHARGE
YOUR PRODUCTIVITY WHILE USING GNOME DESKTOP.
At debugpoint.com, we showcase some cool and helpful GNOME apps over a five-part series. The main reason is to raise awareness about the rich GNOME ecosystems with these awesome apps. And it also helps the developers as our readers give these awesome GNOME apps much-needed recognition.
This post is the final part, i.e. part 5 of the awesome GNOME app series. In this part 5, we will showcase ten applications.
If you missed the last parts, you can read the other parts of this series via the below links.
* [Part 1][1]
* [Part 2][2]
* [Part 3][3]
* [Part 4][4]
In this article, we covered the following list of awesome GNOME Apps.
* [Podcasts podcasts client][5]
* [Tootle Mastodon client][6]
* [Tangram Web App Browser][7]
* [Wike Wikipedia browser for desktop][8]
* [Devhelp API Search for developers][9]
* [Lorem Random text generator][10]
* [Rnote Whiteboard drawing app][11]
* [Frogr Flickr Client][12]
* [GTG Personal task and to-do manager][13]
* [Recipes Cooking guide][14]
### 10 Awesome GNOME Apps
#### Podcasts podcast client
We all love Podcasts, and its still going strong. Podcasts are native GNOME applications that cover all of your podcast needs. Armed with nice and clean UI, Podcasts offers you unique features such as remembering where you stopped listening to start over where you left off. Also, this application can integrate with popular podcast services such as iTunes, Soundcloud, etc.
Heres a quick summary of the features:
* Nice and clean user interface UI
* Play, update and complete management of your podcasts from UI
* Well, integration with GNOME Desktop such as notifications.
* Bookmark your listening to start listening over again
* Support of RSS/Atop for podcasting service via Soundcloud and iTunes
* Import option via OPML files
![Podcasts App][15]
You need to [Setup Flatpak][16] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover).
[Install Podcast][17]
* [Home page][18]
* [Source code][19]
#### Tootle Mastodon client
The next app we would like to feature is Tootle a Mastodon client for the GNOME desktop. Mastodon is a decentralized, microblogging platform gaining momentum considering privacy and other modern matters. So, that said, Tootle is an excellent little utility for accessing Mastodon and helps you to “Toot” (like “Tweet” for Twitter) contents of your choice.
This application well integrates with the GNOME desktop and comes with a Flatpak build for installation.
![Tootle][20]
You need to [Setup Flatpak][16] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover).
[Install Tootle][21]
* [Home page][22]
* [Source code][23]
#### Tangram Web app browser
This application is one of my favourites. And I am sure it would be for you as well. Tangram is a browser for Web Apps. Web Apps behaves as desktop apps for your favourite websites. So, using Tangram, you can manage your multiple web applications together with its unique vertical tab browser.
Each of the tabs is persistent and independent. That means, for example, you can open multiple Google accounts together in separate tabs without worrying about login conflicts or expiry. You can also group the type of web apps using this application. Suppose you would like to group all messager applications such as WhatsApp, Facebook Meeesagner &amp; Telegram. In that case, you can do that quickly, and its easier for you to monitor and be productive.
If used and appropriately configured, Tangram can reduce digital notification overhead in your mobile, save time and eventually help you focus more.
![Tangram][24]
You need to [Setup Flatpak][16] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover).
[Install Tangram][25]
* [Home page][26]
* [Source code][27]
#### Wike Wikipedia Browser
We all love Wikipedia. There is a GNOME native application to browse Wikipedia, right from your desktop if I tell you. The apps name is Wike, and it comes with the below set of features.
* Open multiple articles in tabs
* Multiple languages
* Search suggestions
* List of recent articles
* Simple bookmarks management
* Text search in articles
* Article table of contents
* View article in other languages
* GNOME Shell search integration
* Light, dark and sepia themes
I am sure you can get the most out of Wikipedia for your research, knowledge gathering, or work with the above features.
![Wike an awesome GNOME app][28]
You need to [Setup Flatpak][16] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover).
[Install Wike][29]
* [Home page][30]
* [Source code][30]
#### Devhelp API Browser
The next app we would like to highlight is Devhelp. As its name says, this desktop application is created to help developers give them offline access to API documentation. Yes, you read it right. If installed locally, you can browse API documentation without internet connections. A perfect app for developers who travels frequently and may not have internet connections available on the go.
By default, it comes with GTK-doc, i.e. GTK documentation are available as per the installations. However, you can configure it for other development languages provided; you have the API documentation HTML and *.devhelp2 index file is generated.
[][31]
SEE ALSO:   Top 10 KDE Plasma Hidden Feature That You Didn't Know About
A fantastic tool, I must say.
![Devhelp][32]
You need to [Setup Flatpak][16] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover).
[Install devhelp][33]
* [Home page][34]
* [Source code][35]
#### Lorem Random Text Generator
We often need placeholder text for various needs. And for that, the famous “Lorem Ipsum” text is widely used. It is mainly used by web developers, documentation writers or specific applications where you need to put some text to demonstrate a specific font size, colour or some functionalities.
This GNOME app, named Lorem, does just that. Based on your input, it can generate blocks of text that you can easily copy and use for your work.
![Lorem][36]
You need to [Setup Flatpak][16] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover).
[Install Lorem][37]
* [Home page][38]
* [Source code][39]
#### Rnote Whiteboard Tool
Rnote is an excellent application for taking handwritten notes via touch devices. This application is vector image-based and helps to draw annotate pictures and PDFs. It brings native .rnote file format with import/export options for png, jpeg, SVG and PDF.
One of the cool features of Rnote is that it supports [Xournal++ file format][40] support which makes it a must-have tool.
![Rnote Whiteboard Application for Linux based on GTK4 and Rust][41]
You need to [Setup Flatpak][16] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover).
[Install Rnote][42]
* [Source code][43]
#### Frogr Flickr Client
If you still love and use the image hosting platform Flickr, then Frogr is the tool you need. Frogr is a Flickr desktop client that helps you manage your Flickr account. Using this GNOME application, you can easily upload photos directly to your account, add tags, modify descriptions, add geolocation data and many such actions. You can also manage multiple Flickr accounts using this utility.
It is a perfect application for those whose workflow deals with heavy photo management and doesnt want to deal with web browsers.
![Frogr][44]
You need to [Setup Flatpak][16] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover).
[Install Frogr][45]
* [Home page][46]
* [Source code][47]
#### GTG Getting Things GNOME: To do manager
Are you procrastinating too much or having trouble finishing small to larger tasks in your day to day life. Then this next application is perfect for you. GTG, aka Getting Things Gnome, is one of the best personal tasks and to-do managers and organizers for GNOME Desktop. It is inspired by the [Getting Things Done methodology][48] and brings more features to manage your time while accomplishing tasks perfectly.
GTG user interface is neat with flexibility that helps you create and manage tasks with tagging, dependencies, colour codes, search, and many search features. If you have not tried this app yet, you should check it out.
![GTG][49]
You need to [Setup Flatpak][16] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover).
[Install GTG][50]
* [Home page][51]
* [Documentation][52]
#### Recipes Cooking helper
And the final application in this list has something to do with cooking. Everyone (who cooks regularly) deals with the question “what should I cook today?” Right. To help those poor GNOME chefs, GNOME has an app called Recipes.
Right from its user interface, you can discover what to cook today, tomorrow or even the rest of the week! You can search and explore types of recipes such as Vegan, Nut-free recipes etc. The featured Chef section is one of its best features while exploring mouth-watering recipes from fellow GNOME users.
Interested? Heres how to install it.
![Recipes][53]
You need to [Setup Flatpak][16] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover).
[Install Recipes][54]
* [Home page][55]
* [Source code][56]
### Closing Notes
This concludes part 5 and the GNOME Apps series. I hope you get to know many unknown GNOME Apps you are planning to use in the future or already using it. Also, I hope the developers of these apps get well-deserved attention via debugpoint.com readers and inspire them to create more such applications for the future.
If you missed the previous stories, you could read them here.
[Part 1][1] [Part 2][2] [Part 3][3] [Part 4][4]
And finally, do let me know your comments, suggestions, or anything in the comment box below. And stay tuned for the next series on a different topic.
Cheers.
_Some image credit: GNOME and respective developers_
* * *
We bring the latest tech, software news and stuff that matters. Stay in touch via [Telegram][57], [Twitter][58], [YouTube][59], and [Facebook][60] and never miss an update!
##### Also Read
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/2022/03/best-gnome-apps-part-5/
作者:[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/12/best-gnome-apps-part-1/
[2]: https://www.debugpoint.com/2021/12/best-gnome-apps-part-2/
[3]: https://www.debugpoint.com/2022/01/best-gnome-apps-part-3/
[4]: https://www.debugpoint.com/2022/02/best-gnome-apps-part-4/
[5]: tmp.LpD9K2ZERp#podcasts
[6]: tmp.LpD9K2ZERp#tootle
[7]: tmp.LpD9K2ZERp#tangram
[8]: tmp.LpD9K2ZERp#wike
[9]: tmp.LpD9K2ZERp#devhelp
[10]: tmp.LpD9K2ZERp#lorem
[11]: tmp.LpD9K2ZERp#rnote
[12]: tmp.LpD9K2ZERp#frogr
[13]: tmp.LpD9K2ZERp#gtg
[14]: tmp.LpD9K2ZERp#recipes
[15]: https://www.debugpoint.com/wp-content/uploads/2022/03/Podcasts-App-1024x579.jpg
[16]: https://flatpak.org/setup/
[17]: https://dl.flathub.org/repo/appstream/org.gnome.Podcasts.flatpakref
[18]: https://wiki.gnome.org/Apps/Podcasts
[19]: https://gitlab.gnome.org/World/podcasts
[20]: https://www.debugpoint.com/wp-content/uploads/2022/03/Tootle.jpg
[21]: https://dl.flathub.org/repo/appstream/com.github.bleakgrey.tootle.flatpakref
[22]: https://apps.gnome.org/app/com.github.bleakgrey.tootle/
[23]: https://github.com/bleakgrey/tootle
[24]: https://www.debugpoint.com/wp-content/uploads/2022/03/Tangram-1024x573.jpg
[25]: https://dl.flathub.org/repo/appstream/re.sonny.Tangram.flatpakref
[26]: https://apps.gnome.org/app/re.sonny.Tangram/
[27]: https://github.com/sonnyp/Tangram
[28]: https://www.debugpoint.com/wp-content/uploads/2022/03/Wike-an-awesome-GNOME-app.jpg
[29]: https://dl.flathub.org/repo/appstream/com.github.hugolabe.Wike.flatpakref
[30]: https://hugolabe.github.io/Wike/
[31]: https://www.debugpoint.com/2021/12/kde-plasma-hidden-feature/
[32]: https://www.debugpoint.com/wp-content/uploads/2022/03/Devhelp-1024x574.jpg
[33]: https://dl.flathub.org/repo/appstream/org.gnome.Devhelp.flatpakref
[34]: https://apps.gnome.org/app/org.gnome.Devhelp/
[35]: https://gitlab.gnome.org/GNOME/devhelp
[36]: https://www.debugpoint.com/wp-content/uploads/2022/03/Lorem.jpg
[37]: https://dl.flathub.org/repo/appstream/org.gnome.design.Lorem.flatpakref
[38]: https://apps.gnome.org/app/org.gnome.design.Lorem/
[39]: https://gitlab.gnome.org/World/design/lorem
[40]: https://www.debugpoint.com/2022/02/top-whiteboard-applications-linux/
[41]: https://www.debugpoint.com/wp-content/uploads/2022/02/Rnote-Whiteboard-Application-for-Linux-based-on-GTK4-and-Rust-1024x576.jpg
[42]: https://dl.flathub.org/repo/appstream/com.github.flxzt.rnote.flatpakref
[43]: https://github.com/flxzt/rnote
[44]: https://www.debugpoint.com/wp-content/uploads/2022/03/Frogr.jpg
[45]: https://flathub.org/repo/appstream/org.gnome.frogr.flatpakref
[46]: https://wiki.gnome.org/Apps/Frogr
[47]: https://gitlab.gnome.org/GNOME/frogr
[48]: https://en.wikipedia.org/wiki/Getting_Things_Done
[49]: https://www.debugpoint.com/wp-content/uploads/2022/03/GTG-1024x669.jpg
[50]: https://dl.flathub.org/repo/appstream/org.gnome.GTG.flatpakref
[51]: https://wiki.gnome.org/Apps/GTG
[52]: https://fortintam.com/gtg/user_manual/
[53]: https://www.debugpoint.com/wp-content/uploads/2022/03/Recepies.jpg
[54]: https://gitlab.gnome.org/GNOME/recipes/raw/master/flatpak/gnome-recipes.flatpakref
[55]: https://wiki.gnome.org/Apps/Recipes
[56]: https://gitlab.gnome.org/GNOME/recipes/
[57]: https://t.me/debugpoint
[58]: https://twitter.com/DebugPoint
[59]: https://www.youtube.com/c/debugpoint?sub_confirmation=1
[60]: https://facebook.com/DebugPoint

View File

@ -0,0 +1,160 @@
[#]: subject: "Using FileZilla for Connecting to SFTP Server Via GUI"
[#]: via: "https://itsfoss.com/filezilla-ubuntu/"
[#]: author: "Pratham Patel https://itsfoss.com/author/pratham/"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Using FileZilla for Connecting to SFTP Server Via GUI
======
If you ask the geeky sysadmins, they will swear by [rsync or scp commands for transferring files between remote server and local system][1].
However, those are command line methods and not everyone feels comfortable.
Thankfully, there are some GUI tools available that let you transfer files to or from the remote servers.
[FileZilla][2] is a popular, cross-platform, open-source tool for this purpose. It supports transferring file using FTP over TLS or SSL (FTPS) and also FTP over SSH (SFTP) along with old FTP protocol.
Let me show how to install FileZilla on Linux and then use it for file transfer.
So, lets get started!
### Installing FileZilla on Ubuntu and other Linux distributions
You can get the source code tarball but it is always recommended to use your distribution provided package. Since it is a popular software, it should be available in the software repository of most Linux distributions (if not all). _**Please use your distributions software center and package manager**_.
On Ubuntu, you can install it from the software center:
![FileZilla is available in the Ubuntu Software Center][3]
You can also use the command line method to install it.
```
sudo apt install filezilla
```
If you see the [package not found error][4], you should [enable the Universe repository][5].
Once installed, go to the menu (by pressing the windows key), type FileZilla and start it.
![Start FileZilla from the system menu][6]
### Using FileZilla
When you first run FileZilla, youll see an interface like the picture below.
![Screenshot of FileZilla running][7]
The left side pane shows the files and directory from your local system. The right side pane is empty for now. When you connect to a remote server, the files from your remote system will be displayed there.
Before I show you that, let me share a few details on understanding the important aspects of FileZilla interface.
#### Understaing the FileZilla interface
The image below give you an overview of the different sections of the window layout of FileZilla.
![FileZilla Window Layout | image credit][8]
The GUI is split in 6 different zones/window layout. Let me briefly explain them to you.
**1\. Toolbar:** It has a variety of options like opening the Site Manager, refreshing local and/or remote directory file and folder lists, start processing current queue of files to be transferred, stop all transfers and discard files from queue, etc.
**2\. The Quick connect bar:** As its name suggests, allows you to quickly connect to a remote site without specifying many details about it except the host, username, password and port.
**3\. The Message log:** It shows you a log, regardless if the connection was successful or not. The errors are in red, normal messages are in white, and commands are in blue.
**4 &amp; 5\. The Local pane and remote panes**: Both are very similar except for the fact that the Local pane shows contents of a local directory and a context menu has options for uploading files. Whereas, the remote pane shows contents of a remote directory and has options for downloading files from a remote directory to your local storage.
**6\. Transfer queue**: Lastly, the Transfer queue pane shows the status of items being transferred, their transfer speeds, items in queue and the file transfer history (limited to current instance
#### Connecting to a SFTP server using FileZilla
_**You need to know the username, password and the IP address of the remote server. The remote server should also be configured to accept connections with the provided details. You also need to have correct access settings in the destination folder.**_
To add a new SFTP connection, you need to open the site manager. There are two ways to open it.
There is a “Site Manager” item under the “Files” menu option on the menu bar. Or, you can click on the “Site manager” icon on the toolbar.
![the Site Manager button on the toolbar][9]
Once the Site Manager dialog pops up, click on the “New site” button and [optionally] rename the new site that is added to the entry. I have called mine “test8”.
![screenshot of the Site Manager][10]
To the right, under the General tab, ensure that the protocol used is appropriate to what the server administer has set for you. In my case, I set up a SFTP server (FTP over SSH) so I will proceed by choosing the option “SFTP SSH File Transfer Protocol”.
The next field is for the IP address of the remote server.
If you do not mention the port number, FileZilla will assume that the port number to be used is the default SSH port 22.
There are a few options for the “Logon Type” drop-down. In the Normal logon method, you provide the username and password.
The Key file authentication method is useful for you if you have a pair of public and private keys set up to authenticate your SSH connection for the user.
Once you have filled all the appropriate details for the remote server and authentication, click on the “Connect” button positioned at the bottom to connect to the site. Do not worry, the new site you just established a connection to, will be saved in compliance to the “Logon Type”.
![Remote pane being populated after a successful connection][11]
If you see a status message as “Connected to &lt;host IP address&gt;” and the most recent status message as “Directory listing of “/” was successful”, you have successfully connected to the remote SFTP server (FTP using the SSH protocol).
Another indicator of a successful SFTP connection is that the remote directory pane gets populated when a connection is successfully established.
#### Sending files to remote system
You must **make sure to be in the directories where you have to transfer the file**. Transferring files is as simple as **double-clicking on the file** without explicitly specifying the target location.
If you click on a file from the left pane, it immediately gets transferred (or added to the queue if there are pending transfers) to the directory visible in the right pane.
The same goes from transferring files from right to left, i.e., from remote server to local. **This is why it is important to be in the correct locations in both local and remote systems**.
Alternatively, you can right-click on the file(s) and upload them (or add them to the upload queue). The destination is always the directory displayed in FileZilla interface.
![Transfer queue pane showing the local file name, remote destination, transfer speed and an ETA][12]
There isnt much difference in either way of uploading files except for convenience and timing.
#### Downloading files from remote system
Just like uploading files, you get two options when transferring file from a remote server to local storage, but instead of “Upload” it is “Download”.
Downloading a file will download that file in the local directory that you currently have open in the Local directory pane.
You will notice a consistent behavior in downloading and uploading files, except for the sender and receiver. The file transfers will be in done in parallel unless the number of connections is restricted.
### Conclusion
Awesome! With the basics covered, you should be able to transfer files to and from your computer to your server. I hope you learnt something new :)
If you have any queries, please ask them in the [Its FOSS community forums][13]. If you felt this was helpful to you, do let me know with a comment down below!
--------------------------------------------------------------------------------
via: https://itsfoss.com/filezilla-ubuntu/
作者:[Pratham Patel][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/pratham/
[b]: https://github.com/lujun9972
[1]: https://linuxhandbook.com/transfer-files-ssh/
[2]: https://filezilla-project.org/
[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/filezilla-ubuntu-software-center.png?resize=751%2C382&ssl=1
[4]: https://itsfoss.com/unable-to-locate-package-error-ubuntu/
[5]: https://itsfoss.com/ubuntu-repositories/
[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/filezilla-ubuntu.png?resize=763%2C224&ssl=1
[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/01_filezilla.webp?resize=800%2C431&ssl=1
[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/02_filezilla_layout.webp?resize=800%2C504&ssl=1
[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/03_site_manager_annotated.webp?resize=386%2C170&ssl=1
[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/04_site_manager.webp?resize=800%2C577&ssl=1
[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/05_successful_connection.webp?resize=800%2C431&ssl=1
[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/07_transfer_pane_populated-1.webp?resize=800%2C431&ssl=1
[13]: https://itsfoss.community/

View File

@ -0,0 +1,204 @@
[#]: subject: "Top Nitrux Applications (Maui) Everyone Should Try"
[#]: via: "https://www.debugpoint.com/2022/03/top-nitrux-maui-applications/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Top Nitrux Applications (Maui) Everyone Should Try
======
THIS ARTICLE SHOWCASES SOME OF THE EXCELLENT MAUI NATIVE APPLICATIONS
THAT COME AS DEFAULT IN NITRUX OS LINUX DISTRIBUTION.
### What is Maui Apps and Nitrux OS
[Nitrux][1] is a Linux Distribution and a complete operating system based on Debian with the power NX Desktop, which uses KDE Plasma and Mauikit components. It is one of the beautiful Linux distributions today, giving you the best looks and performance.
Nitrux is powered by its native [Maui applications][2], specifically designed to work in Nitrux and all form factor devices a proper form of convergence. That means these Maui applications can run on mobile devices running KDE Plasma mobile OS and desktop Linux while their functionality remains the same.
Some of these applications can run in Android OS as well.
This article would like to showcase the following Maui applications installed as default in Nitrux OS.
### Top Nitrix Applications based on Maui Components
#### Index File Manager
Perhaps the most used app in Nitrux OS is the [Index][3], its default file manager. The Index File Manager looks slightly different from traditional file managers in Linux, such as Dolphin or Nautilus.
The user interface is neat and clean. The icons are menu options are well organized and visually expressive. It supports advanced features such as split view open in terminal options. The sidebar is a little different with its icon-based grid options, and there is an option to auto-hide the sidebar.
I would not detail usual features that are apparent, such as zoom in/out or view modes. They are similar to the other popular file managers in the Linux ecosystem.
Some of the unique features I must highlight here. The built-in Terminal option is one of the best features to quickly check certain items or do some basic processing if you wish while browsing the file system.
Another feature I like in this File manager is the preview option of the files. You can preview images, text files, videos and PDFs without opening them.
![Index file manager showing split view and terminal][4]
Finally, a unique feature that I believe none of the other File managers currently have is the overview section. The overview section gives you an excellent summary of your file system, with favourites, image thumbnails and search options. This gives you quick access to your files, and you dont need to always go to the usual directory browsing mode.
![Index File Manager overview screen][5]
#### Nota Text Editor
The [Nota][6] is a general-purpose and straightforward text editor. The user interface is clean and concise. That helps you do your development work or allows you to take any quick notes in a much faster way.
Thanks to the Maui kit, the terminal window option is built-in. If you wish to open a terminal and do some essential work during any workflow, you can do that without leaving the text editor window.
Other features that make it a most desirable text editors are
* Syntax highlighting
* Plugin Support
* Go to the Line number option
* Share and Favorite option
* Autosave
* Supports dark and light themes
This text editor reminds me of the great Gedit, which is [not a default editor anymore][7] in GNOME. Gedit [has all the features][8] of this text editor via plugins.
![Nota Text Editor][9]
#### Vvave Music organizer
The next Nitrux OS app we would like to feature here in this list is [Vvave][10]. This is a music player with full music management features. It can discover music in your local system, network, or cloud services such as Nextcloud.
Although it is a music player, its primary purpose is music management. You can create playlists, tag your music files and so on. The user interface has several views with album arts, search features and album only views.
![Vvave Music player and organizer][11]
#### Clip Video Player
The [Clip][12] is the convergence video player for desktop and mobile phones that supports the Maui kit. It is a simple video player that supports limited hardware decoding, playing from internet streaming services. The Clip video player is based on the MPV video player. All the usual features of a video player are supported in Clip.
[][13]
SEE ALSO:   10 Necessary Apps to Improve Your GNOME Desktop Experience [Part 4]
##### Quick features of Clip
* Local, network and internet streaming playback (limited)
* Hardware decoding
* Tagging of videos for management
* Subtitles support
* Based on the MPV video player
![Clip Video Player][14]
#### Station Terminal
The [Station][15] is a terminal application and my favourite Nitrux application based on the Maui kit. Thanks to the default convergence support, this terminal application can work well in Plasma-based mobile phones.
It brings a friendly default colour theme and supports split views, tabs, and keyboard shortcuts for touch-based devices.
Station also supports a distraction-free work environment, where you can hide the top bar to make it a more productive terminal.
![Station Terminal application][16]
#### Shelf Document Viewer
The [Shelf][17] is the default document viewer for Nitrux OS and operating systems that support the Maui kit. It can read and helps you to annotate documents of several types. Most of the major file types are supported, such as PDF, ODT, etc.
One of the unique features of this application is that you can browse the document pages in horizontal mode as well, other than the usual vertical mode. A nice feature is helpful for users using touch-based devices.
The annotation feature allows you to annotate with pen, highlighter and eraser in PDF and other documents and save them.
![Shelf Document Viewer][18]
#### Pix
The final application in this list is [Pix][19], an essential image viewer that supports all types of image formats. The Pix helps you browse the collection of images and tag them for quick discovery.
You can view the image metadata and basic image edition as well. The image editing features to support the below functionalities
* Changing brightness, contrast, saturation, exposure
* Supports layers
* Cropping and rotating
However, you can not annotate with arrows or add any texts into the image.
![Pix Image Viewer][20]
### Installing these Maui applications
All these applications come pre-loaded in Nitrux Linux distribution. However, if you like to install these in Ubuntu or Fedora-based systems, you can go ahead and use the AppImage standalone executables from the below link. After download, make the file executable and run.
Note: If you are using Android mobile phones, you can also find the official .apk files in the same path mentioned below!
Maui application | download path for AppImage and .apk
---|---
Index File Manager | <https://download.kde.org/stable/maui/index/>
Nota Text Editor | <https://download.kde.org/stable/maui/nota/>
Vvave Music organizer | <https://download.kde.org/stable/maui/vvave/>
Clip Video Player | <https://download.kde.org/stable/maui/clip/>
Station Terminal | <https://download.kde.org/stable/maui/station/>
Shelf Document Viewer | <https://download.kde.org/stable/maui/shelf/>
Pix | <https://download.kde.org/stable/maui/pix/>
You can open any of the paths. Then go to the latest version folder and download the AppImage or .apk file as per your need. A sample guide is present below.
![Download Nitrux Maui application appimage and apk files][21]
### Closing Notes
I feel most of the above Nitrux or Maui applications have the same set of essential features such as tagging and other items. The reason is all of them are based on Maui technology. But thats fine because all these apps perfectly support convergence and can work on your desktop, tabs and Plasma-based mobile phones.
Thanks to Maui and KDE technology, I feel the apps look friendly with built-in dark mode supports and features.
So, what is your favourite application on this list? Let me know in the comment box down below.
Cheers.
_Some image credits Maui, Nitrux team._
* * *
We bring the latest tech, software news and stuff that matters. Stay in touch via [Telegram][22], [Twitter][23], [YouTube][24], and [Facebook][25] and never miss an update!
##### Also Read
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/2022/03/top-nitrux-maui-applications/
作者:[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://nxos.org/
[2]: https://mauikit.org/apps/
[3]: https://invent.kde.org/maui/index-fm
[4]: https://www.debugpoint.com/wp-content/uploads/2022/03/Index-file-manager-showing-split-view-and-terminal-1024x540.jpg
[5]: https://www.debugpoint.com/wp-content/uploads/2022/03/Index-File-Manager-overview-screen-1024x599.jpg
[6]: https://mauikit.org/apps/nota/
[7]: https://www.debugpoint.com/2021/12/gnome-text-editor/
[8]: https://www.debugpoint.com/2021/04/gedit-features/
[9]: https://www.debugpoint.com/wp-content/uploads/2022/03/Nota-Text-Editor-1024x680.jpg
[10]: https://mauikit.org/apps/vvave/
[11]: https://www.debugpoint.com/wp-content/uploads/2022/03/Vvave-Music-player-and-organizer.jpg
[12]: https://mauikit.org/apps/clip/
[13]: https://www.debugpoint.com/2022/02/best-gnome-apps-part-4/
[14]: https://www.debugpoint.com/wp-content/uploads/2022/03/Clip-Video-Player.jpg
[15]: https://mauikit.org/apps/station/
[16]: https://www.debugpoint.com/wp-content/uploads/2022/03/Station-Terminal-application.jpg
[17]: https://mauikit.org/apps/shelf/
[18]: https://www.debugpoint.com/wp-content/uploads/2022/03/Shelf-Document-Viewer.jpg
[19]: https://mauikit.org/apps/pix/
[20]: https://www.debugpoint.com/wp-content/uploads/2022/03/Pix-Image-Viewer.jpg
[21]: https://www.debugpoint.com/wp-content/uploads/2022/03/Downlaod-Nitrux-Maui-application-appimage-and-apk-files-1024x584.jpg
[22]: https://t.me/debugpoint
[23]: https://twitter.com/DebugPoint
[24]: https://www.youtube.com/c/debugpoint?sub_confirmation=1
[25]: https://facebook.com/DebugPoint

View File

@ -0,0 +1,219 @@
[#]: subject: "Best 5 Alternatives to Microsoft Office [Compared]"
[#]: via: "https://www.debugpoint.com/2022/03/best-alternatives-microsoft-office-2022/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lujun9972"
[#]: translator: "aREversez"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Best 5 Alternatives to Microsoft Office [Compared]
======
HERE WE GIVE YOU THE FIVE BEST ALTERNATIVES TO MICROSOFT OFFICE. WE
COMPARE THEM BASED ON FEATURES, ARE EASY TO USE AND PROVIDE YOU GUIDE TO
CHOOSE THE ONE YOU NEED.
I think we all agree that Microsoft Office is one of the best software developed by Mircosoft. It has a presence almost everywhere in the entire world in nearly every business. It is a fine piece of software that evolved over a couple of past decades.
And obviously, it doesnt have a Linux native installer and comes with a significant price. If you are a business owner or a personal user, the current Microsoft Office 365 subscription pricing is a little higher. And not everyone can afford that price bucket for a longer time.
Then what are the alternatives? You can try other options that relatively get the job done for most users or businesses.
This article gives you the five best alternatives to Microsoft Office.
### Best Alternatives to Microsoft Office
### LibreOffice
![LibreOffice][1]
The first alternative we highlight here is [LibreOffice][2]. The Document Foundation develops and manages the entire LibreOffice free and open-source office suite, available for Linux, macOS and Windows.
It comes with a spreadsheet ([Calc][3]), word processor (Writer), presentation (Impress), drawing (Draw) and a database program (Base).
This project is actively developed, and compatibility with Microsoft Office documents is improved in every release iteration. If appropriately used, LibreOffice can effectively do all the work that a Mircosoft office program does. A massive set of documentation and communities can help you adopt LibreOffice in no time.
If you are a small or a large corporation, you dont need to pay for the software itself. But paid deployment and support is also available at minimal cost if you require them for your critical work.
However, LibreOffice does not come with an Outlook-like email program. This might be one of the minor drawbacks, but you can access emails from web browsers today for all email service providers.
* [Home page][2]
* [For Business][4]
* [Download for general-purpose personal use][5]
* [Help and Documentation][6]
* [Official support forum][7]
* * *
### Google Docs
![Google Docs][8]
The search engine giant Google provides a complete web-based Office suite (aka [Google Docs][9]) with its own Docs (document processor), Sheets (spreadsheet program) and Slides (presentation) for free users.
You can access and create documents in your Google Drive account by default for free and access them from anywhere in the world. The office components provide well-designed web-based toolbars, advanced options, spell check, Voice to Text feature (only in Chrome), encryption and cloud access. Google also offers mobile apps for iOS and Android to access your documents and edit them on the go.
One of the best features of Google Docs is templates. With the power of pre-built templates, you can start professional-grade documents in time. The collaboration option gives you more control when sharing and deploying documents with a Google account-based authentication and authorization mechanism for a wider audience.
If you need more from Google Docs, you may opt for Google Workspace with a very minimal price compared to costly Microsoft Office. The Google Workspace is a complete and integrated solution that gives you Google Forms to collect data and integrate into your docs and Sheets, website builder Google Sites, Google Calendar and more storage options to keep your document.
* [Home page][9]
* [Documentation][10]
### OnlyOffice
![OnlyOffice][11]
[OnlyOffice][12] (styled as ONLYOFFICE) is a free and open-source complete Office productivity suite that contains text editor, spreadsheet program, presentation tool for you and your office work. It supports advanced features such as real-time collaboration with proper tracking changes for your shared documents, fillable forms and many such features.
This powerful office suite looks better with its Office 365 type ribbons which helps to adopt this program quickly. OnlyOffice has better Microsoft Office compatibility with .docx .xlsx and .pptx file formats which are easy for you and your organization to share documents.
[][13]
SEE ALSO:   10 Best Apps to Improve Your GNOME Experience [Part 1]
Its worth mentioning that OnlyOffice provides an Enterprise office suite,, aka “ONLYOFFICE Workspace, ” a paid product with additional features and instant support. This enterprise suite is perfect for those with a tight budget on office products but needs near compatibility with Office 365.
The ONLYOFFICE Workspace comes with an Email client, CRM product, Project Management tool and an integrated calendar. Although everything works well, you face some issues with spell checking, print preview, page size and some bugs. But you should not worry as the team is receptive, and you can report issues in GitHub and get help.
* [Home page][12]
* [Download][14]
* [Documentation and help][15]
### Softmaker Free Office
![FreeOffice][16]
The [FreeOffice][17] is another option if you are looking for Microsoft Office alternatives. This office suite was developed by SoftMaker and is arguably one of the choices that you may have. The FreeOffice brings TextMaker (like Word), PlanMaker (like Excel), Presentations and a comparison utility. The user interfaces as two options. The modern Ribbon option makes it a desirable product due to its popularity. It also has a traditional Legacy user interface with a menu and toolbar with a considerable fanbase.
The SoftMaker FreeOffice provides a specific user interface and features in touch-based devices. The Microsoft Office document format compatibility is well established to get the most done.
However, you may have little trouble working with Open Document Format files, whose support is limited.
This is a closed source product.
* [Home page][17]
* [Download][18]
* [Documentation and help][19]
### WPS Office
![WPS Office][20]
Remember Kingston Office? Well, its now renamed and repackaged as WPS Office, which is the acronym for ord, **P**resentation and **S**preadsheets. Today, the WPS Office is one of the oldest office suites with more than three decades of development and releases. It is a fully-featured office suite available for all platforms and mobile devices.
Some of the unique features of WPS Office are its real-time collaboration in its core programs which helps you work in a team in a shared document. The office suite comes with 100,000+ templates which allows you to create professional-grade documents and presentations.
The WPS Office comes with the standard edition, free to download and use but limited in features.
If you need additional features such as PDF editing, Cloud support, collaborations and enterprise support, then you can opt for the WPS Premium of WPS Business option with a price.
Its important to mention that this is a closed source program and may contain Ads. Also its developed by a Chinese company.
* [Home page][21]
* [Documentation][22]
* [Download][23]
### Comparison
Heres a quick comparison of the above free Microsoft office alternatives based on features and other details.
Product | Price | Source Type | Pros | Cons
---|---|---|---|---
LibreOffice | Free | Open source | Free and cross platform
Multi language support
Complete support of ODF files
Best compatibility support of Microsoft Office
Very active deleopment | No email and project management suite
The database program depends on Java
Google Docs | Free | Close source | Free and cross platform
Well documented support
Access documents via cloud anywhere
Complete Mobile device support | Requires internet connection
Little slow due to web based tool
No native desktop executable available
OnlyOffice | Free (basic product) | Open source | The user interface almost similar to Microsoft Office
Better support and compatibility with Microsoft Office files
Cloud integration, and plugin support
Cross platform | May face problems with some basic features.
Cloud integrations are not compatible with EU due to GDPR
The web app version is slow
FreeOffice | Free (basic product) | Close source | Free and lightweight compared to LibreOffice.
Touchscreen support
Good Microsoft Office compatibility
Cross platform | Free version only have document, spreadsheet and presentation.
Additional prodcuts needs purchase
Open Document Format support is limited
Not open source product
WPS Office | Free | Close source | Good Microsoft office compatibility
Cross platform product
Tabbed interface
Multi language support | Not open source product
Developed by a Chinese company
May contain ads
### Our Recommendation
Leaving aside all the pros and cons, if you cannot choose which of the Office suite is best for you, I would recommend going ahead with LibreOffice always. Because LibreOffice and TDF has a good vision, active development and worldwide community support. LibreOffice has a considerable knowledge base about tips tutorials on the helpful web. And you can easily automate tasks with Basic or Python Macro.
### Closing Notes
I hope this guide helps you choose the best alternatives for Microsoft Office for your personal or business usage. Genuinely speaking, none of the above office products come close in comparison to Microsoft Office in true sense. Not everyone or every business is able to pay hefty subscription fee every month for Microsoft Office. For those, I believe some of these options can be a good starting point.
_Some image credits: Respective product owner_
* * *
We bring the latest tech, software news and stuff that matters. Stay in touch via [Telegram][24], [Twitter][25], [YouTube][26], and [Facebook][27] and never miss an update!
##### Also Read
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/2022/03/best-alternatives-microsoft-office-2022/
作者:[Arindam][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/aREversez)
校对:[校对者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/wp-content/uploads/2022/03/LibreOffice-1024x535.jpg
[2]: https://www.libreoffice.org/discover/libreoffice/
[3]: https://www.debugpoint.com/category/libreoffice/libreoffice-calc/
[4]: https://www.libreoffice.org/download/libreoffice-in-business/
[5]: https://www.libreoffice.org/download/download/
[6]: https://help.libreoffice.org/latest/en-US/text/shared/05/new_help.html
[7]: https://ask.libreoffice.org/
[8]: https://www.debugpoint.com/wp-content/uploads/2022/03/Google-Docs.jpg
[9]: https://www.google.com/docs/about/
[10]: https://support.google.com/docs/?hl=en#topic=1382883
[11]: https://www.debugpoint.com/wp-content/uploads/2022/03/OnlyOffice.jpg
[12]: https://www.onlyoffice.com/
[13]: https://www.debugpoint.com/2021/12/best-gnome-apps-part-1/
[14]: https://www.onlyoffice.com/desktop.aspx
[15]: https://forum.onlyoffice.com/
[16]: https://www.debugpoint.com/wp-content/uploads/2022/03/FreeOffice.jpg
[17]: https://www.freeoffice.com/en/
[18]: https://www.freeoffice.com/en/download/applications
[19]: https://forum.softmaker.com/
[20]: https://www.debugpoint.com/wp-content/uploads/2022/03/WPS-Office-1024x499.jpg
[21]: https://www.wps.com/
[22]: https://www.wps.com/academy/
[23]: https://www.wps.com/download/
[24]: https://t.me/debugpoint
[25]: https://twitter.com/DebugPoint
[26]: https://www.youtube.com/c/debugpoint?sub_confirmation=1
[27]: https://facebook.com/DebugPoint

View File

@ -0,0 +1,112 @@
[#]: subject: "Gitter: A Cross-Platform Open Source Community Platform for Developers"
[#]: via: "https://itsfoss.com/gitter/"
[#]: author: "Ankush Das https://itsfoss.com/author/ankush/"
[#]: collector: "lujun9972"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Gitter: A Cross-Platform Open Source Community Platform for Developers
======
**Brief:** _A cross-platform open-source solution tailored for developers. You can build or join existing communities to collaborate and interact._
Almost every online user is aware of Slack, Rocket.Chat, Trello, [Nextcloud][1], and a few other solutions to communicate and collaborate for work.
We also have a [list of open-source Slack alternatives][2] if you prefer FOSS for collaboration in your team.
But, as a software developer, what if you stumble upon a community of developers?
Unlike the communities on Reddit or any other social media, you get access to an open-source platform where developers meet and collaborate on important open-source projects. Wouldnt that be exciting for social collaboration and interaction between fellow developers?
![][3]
Gitter (now a part of [Element][4], also a collaboration/chat app) aims to do just that. It is a community platform powered by open-source technologies ([Matrix][5] protocol).
### Gitter: Community of Developers Connected Using Open-Source Tech
Gitter is an exciting chat and networking platform that helps build or join existing communities. It is available for Linux, macOS, and Windows.
![][6]
It is tailored particularly for the developers to collaborate/join communities for their respective languages/projects like CSS, JavaScript, Bootstrap, NodeJS, and many more.
You can also create your community easily without setting up any invitation services.
![][7]
The key highlight of the platform is that the community is entirely open and indexable by search engines. You are not locked down by any pricing plans for the history of conversations in the community, all you need to check is the archives.
And, there are a lot more features that you get with Gitter.
### Features of Gitter
While Gitter is originally tailored for developers in mind, you can use it to build any kind of community if you think the features suit your requirements.
![][8]
* Powered by a decentralized Matrix network.
* Communities available to join publicly.
* Ability to restrict your community to selected users.
* Dark mode theme.
* Access archives to easily locate past conversations.
* Ability to export messages/room information.
* Add users from your network (For instance, if you use Twitter to log in, you get the option to invite users from Twitter to your community)
* Several integrations available (GitHub, Bitbucket, Trello, GitLab, Docker Hub, Discourse, etc.)
* Supports GitHub flavoured Markdown.
* Create additional rooms under the same community to keep things organized.
* Easily share/embed the link of chat room.
* Thread system to keep the conversations clutter-free.
* Ability to delete/report messages.
Overall, Gitter provides a variety of functionalities suitable for different communities.
And, with the integrations available through GitHub, GitLab, and several others, it makes a perfect collaboration option for developers and teams.
![][9]
### Install Gitter.im in Linux
Primarily, the developers focus on the web app. So, if you want to avoid installing anything on your Linux desktop, head to [Gitter.im][10] and sign up/sign in to get started.
If you want it as a desktop app, you can download the DEB package from its official website or opt for the [Snap package][11] and [Flatpak][12] available.
I tried the Flatpak package in my brief test, and it worked well on Ubuntu 20.04 LTS. You can try the Flatpak/Snap on any of your favorite Linux distributions.
You can also use it on your mobile devices. Unfortunately, the official Gitter apps are no longer maintained. But, you can use the Element app to sign in to the rooms/communities, considering both are powered by the same decentralized network (i.e., Matrix).
To know more about it, explore the [GitLab page][13] or head to its website.
[Gitter][10]
_Have you tried Gitter? What do you think about it? Is it suitable for you as a developer? What do you use it for? Let us know your thoughts in the comments below._
--------------------------------------------------------------------------------
via: https://itsfoss.com/gitter/
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://itsfoss.com/nextcloud/
[2]: https://itsfoss.com/open-source-slack-alternative/
[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/gitter-dark-mode.png?resize=800%2C536&ssl=1
[4]: https://itsfoss.com/element/
[5]: https://matrix.org/
[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/gitter-light-mode.png?resize=800%2C536&ssl=1
[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/gitter-communities.png?resize=800%2C398&ssl=1
[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/gitter-add-friends.png?resize=800%2C468&ssl=1
[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/gitter-integrations.png?resize=800%2C597&ssl=1
[10]: https://gitter.im/
[11]: https://snapcraft.io/gitter-desktop
[12]: https://flathub.org/apps/details/im.gitter.Gitter
[13]: https://gitlab.com/gitterHQ/desktop

View File

@ -0,0 +1,209 @@
[#]: subject: "Top 10 Most Beautiful Linux Distributions [Featured]"
[#]: via: "https://www.debugpoint.com/2022/03/beautiful-linux-distributions-2022/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Top 10 Most Beautiful Linux Distributions [Featured]
======
WE GIVE YOU THE TOP 10 BEAUTIFUL LINUX DISTRIBUTIONS OF 2022. THEY ARE A
VISUAL TREAT TO YOUR EYES WHILE BEING A ROBUST OPERATING SYSTEM.
The most fantastic thing about [Linux Distributions][1] is you can customize them to any extent to satisfy your visual needs. Whether based on Ubuntu or Fedora, you have all the tools you need to customize a Linux desktop.
But, there are many Linux Distributions that looks stunning without any customization. The developers have made them so that you can experience the visual treat right after installation without any additional effort on customization.
Hence, we compiled a list of the most beautiful Linux distributions you can try right now and give your PC a visual makeover.
### Most Beautiful Linux Distributions of 2022
#### 1\. Zorin OS
The first Linux Distribution which we would like to feature is Zorin OS. The Zorin OS is a beautiful Linux distribution that uses Zorin Desktop based on GNOME. It is perfect for newcomers who wants a nice desktop but are also productive at the same time.
One of the unique features that Zorin OS brings is its ability to transform its look to make it like any other operating system. That means the taskbar, application menu, and the Dock can change with just one click option from its Layout settings, and this gives you the utmost flexibility and out of the box experience while using ZorinOS.
[Read more about Zorin OS][2]
![Zorin OS 16 Desktop][3]
#### 2\. Elementary OS
The elementaryOS is one of the most beautiful Linux distributions today based on Ubuntu Long Term Support (LTS) release. This Linux Distribution uses the stunning Pantheon Desktop environment whose look and feel is inspired by macOS.
The elementary OS is perfect for those coming from macOS to the Linux world as they would find many things familiar, such as gestures and window decorations.
However, you may not find many customization options available in elementary OS settings. You may need to depend on external script commands to make further customization. However, the default looks are beautiful and serve their purpose for the majority of the users.
The most significant advantage of elementary OS is its curated app store. The App Store provides you with all categories of applications specially designed for the elementary OS, which looks and works great.
[Read more about elementaryOS][4]
![elementary OS 6 ODIN Desktop][5]
#### 3\. Deepin OS
The third distribution which we would like to highlight is Deepin OS. The Deepin OS is based on Debian and was created by Deepin Technology Co from China. It uses its own Deepin Desktop Environment based on Qt. The Deepin desktop looks incredible with its widgets, colour schemes, window decorations, wallpapers that give you an out of the box visual treat.
With its well-polished visual components, you may think that it looks almost similar to macOS. And thanks to the Debian “stable” branch, Deepin OS is the perfect choice if you want an excellent looking Linux distribution with stability.
Why is Deepin OS beautiful?
* _Awesome Qt-based Deepin Desktop_
* _Native widgets and dark theme support_
* _Several options to customize the Dock_
* _Transparency, Window effects, CursDockheme, Icon Theme support_
* _Accent Color_
[Read more about Deepin OS][6]
![Deepin 20 Desktop][7]
#### 4\. Cutefish OS
The fourth Linux Distribution which we feature here is [CutefishOS][8]. This Debian and Ubuntu-based Linux distribution feature a natively developed Cutefish desktop. This Linux Distribution is currently under development. But due to its looks, its already making waves across the users base.
Under the hood, CutefishOS is built upon Qt and KDE Framework. This efficient Linux Distribution with Cutefish desktop features the global menu feature at the top bar out of the box.
The customization options are still being worked on as its currently under development. But with the latest release, you get the native dark mode, accent colour, animation effects, dock position (left, right, bottom), among other options.
If you want to experiment with a nice desktop that looks completely different, you may go ahead. Also, you may go over the complete review and tutorials of this desktop presented below.
[Cutefish OS Review][9]
![Cutefish OS][10]
#### 5\. Manjaro KDE Plasma
The Manjaro Linux KDE Edition is one of the best looking Linux distributions today. Based on Arch Linux, Manjaro KDE Edition features the stock KDE Plasma desktop environment with some additional tweaks and widgets. The green colour palette of Manjaro gives you a fresh look and feel. You can customize further with built-in KDE tools and settings and change icons and themes from KDE Stores.
The Manjar KDE Edition is a perfect combination of performance and beauty with the power of Arch Linux. And it is an ideal starting point for the new Arch Linux users.
[Read more about Manjaro KDE Desktop][11]
![Manjaro KDE Plasma][12]
#### 6\. Garuda Linux
The famous Garduda Linux is the 6th OS on this list. Garuda Linux is based on Arch Linux and brings a beautiful desktop for you. It features all major desktop environments with custom-designed icon themes and colour palettes. This operating system uses Zen Kernel, optimized for performance in your hardware.
[][13]
SEE ALSO:   10 Things to Do After Installing Fedora 33
The look and feel are stunning in Garuda Linux. The macOS style looks that you get out of the box. The combination of neon icon theme, lovely colour palette, blur and Transparency with the global menu is perfect for its own.
One of the primary advantages of Garuda is it provides you with the choice of all desktop environments KDE Plasma, GNOME, Xfce, LXQt, MATE and others.
[Read more about Garuda Linux][14]
![Garuda Linux][15]
#### 7\. Linux Mint Cinnamon Edition
We all love Linux Mint because of its simplicity, elegance and stability. It is one of the widely used and famous Linux distributions today. And perhaps the most used Linux distribution after Ubuntu. However, it is not that fancy looking if you compare this with other Linux Distributions here in this list.
But the default Cinnamon desktop looks clean and perfect if you like the legacy user interface, which looks fantastic.
The Linux Mint Cinnamon edition is perfect for all users, especially new users of Linux or even you are migrating from Windows. The default looks and feels with Mints green colour pallette look refreshing.
If you are unable to decide an eye candy Linux distribution with stability, choose the Linux Mint Cinnamon edition without a doubt.
[Read more about Linux Mint][16]
![Linux Mint 20 Cinnamon Edition Desktop][17]
#### 8\. Nitrux OS
[Nitrux Linux][18] is based on Debian, which features a modified version of KDE Plasma desktop called NX Desktop. This unique Linux distribution brings its own set of Nitrux applications built upon Maui kit and Qt. Nitrux is systemd-free and uses OpenRC as an init system. With all these unique features and stunning looks, it is one of the best Linux distributions today.
Nitrux OS default look is perfectly designed with modified KDE Plasma desktop with Kvantum theme engine, icon theme, colour palette and cursor theme. The team behind Nitrux OS also brings a separate desktop called Maui Shell, a beautiful convergent desktop that adapts itself based on screen size.
If you need a KDE Plasma desktop with out of the box modification with stability, then go for Nitrux OS. You wont be disappointed.
[Read more about Nitrux OS][18]
![Nitrux 2.0 + Desktop][19]
#### 9\. Ubuntu Kylin
The Ubuntu Kylin is an official Ubuntu flavour designed explicitly for the Chinese people who use a simplified Chinese script. However, it supports another language as well.
This modified Ubuntu flavour uses Ubuntu Kaylin User Interface (aka UKUI). The UKUI desktop is created using Qt to support MATE Desktop components.
Ubuntu Kylin looks elegant, and it would remind you of a combination of GNOME and KDE Plasma in terms of looks and design.
It features a nicely designed icon set, bottom taskbar, nice application view, app switcher, rounded corner, and more These features are carefully crafted.
[Read more about Ubuntu Kylin][20]
![Ubuntu Kylin Desktop][21]
#### 10\. Pop OS
The Pop OS is developed by System76, which manufactures computer hardware. This Ubuntu-based Linux Distribution comes pre-installed in all the System6 hardware. However, you can separately download and install it from its official repository in your system.
The Pop OS features the default GNOME desktop with additional tweaks and configurations. This desktop features the pre-GNOME 40 era desktop with several extensions and tweaks pre-configured. For example, you get a bottom dock that can be configured to move around in the desktop, a launcher to launch applications, rounded corners and many such features. This desktop also features auto tiling and optimized keyboard navigation to make you more productive.
The look and feel are clean and beautifully designed with a colour palette, built-in dark mode, rounded corners in the application window, and icon theme.
[Read more about Pop OS][22]
![Pop OS 21.10 Desktop][23]
### Closing Notes
I hope this list of beautiful Linux distributions of 2022 helps you decide which one you want for your desktop or laptop. Because these are already configured to look beautiful, they are powerful.
Take your pick and start your Linux journey.
* * *
We bring the latest tech, software news and stuff that matters. Stay in touch via [Telegram][24], [Twitter][25], [YouTube][26], and [Facebook][27] and never miss an update!
##### Also Read
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/2022/03/beautiful-linux-distributions-2022/
作者:[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/category/distributions
[2]: https://zorin.com
[3]: https://www.debugpoint.com/wp-content/uploads/2021/08/Zorin-OS-16-Desktop-1024x576.jpg
[4]: https://elementary.io/
[5]: https://www.debugpoint.com/wp-content/uploads/2021/08/elementary-OS-6-ODIN-Desktop-1024x576.jpg
[6]: https://www.deepin.org/en/
[7]: https://www.debugpoint.com/wp-content/uploads/2020/09/Deepin-20-Desktop-1024x568.jpg
[8]: https://en.cutefishos.com/
[9]: https://www.debugpoint.com/2021/11/cutefish-os-review-2021/
[10]: https://www.debugpoint.com/wp-content/uploads/2021/11/Cutefish-OS-1024x581.jpg
[11]: https://manjaro.org/downloads/official/kde/
[12]: https://www.debugpoint.com/wp-content/uploads/2022/03/Manjaro-KDE-Plasma-1024x576.jpg
[13]: https://www.debugpoint.com/2020/10/10-things-to-do-fedora-33-after-install/
[14]: https://garudalinux.org/
[15]: https://www.debugpoint.com/wp-content/uploads/2022/03/Garuda-Linux-1024x577.jpg
[16]: https://linuxmint.com/
[17]: https://www.debugpoint.com/wp-content/uploads/2020/07/Linux-Mint-20-Cinnamon-Edition-Desktop-1024x763.png
[18]: https://nxos.org/
[19]: https://www.debugpoint.com/wp-content/uploads/2022/03/Nitrux-2.0-Desktop-1024x581.jpg
[20]: https://www.ubuntukylin.com
[21]: https://www.debugpoint.com/wp-content/uploads/2022/03/Ubuntu-Kylin-Desktop-1024x574.jpg
[22]: https://pop.system76.com/
[23]: https://www.debugpoint.com/wp-content/uploads/2021/12/Pop-OS-21.10-Desktop-1024x579.jpg
[24]: https://t.me/debugpoint
[25]: https://twitter.com/DebugPoint
[26]: https://www.youtube.com/c/debugpoint?sub_confirmation=1
[27]: https://facebook.com/DebugPoint

View File

@ -0,0 +1,165 @@
[#]: subject: "XeroLinux: A Beautiful Arch-based Linux With Excellent Customizability by Default"
[#]: via: "https://itsfoss.com/xerolinux/"
[#]: author: "Ankush Das https://itsfoss.com/author/ankush/"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
XeroLinux: A Beautiful Arch-based Linux With Excellent Customizability by Default
======
Arch Linux is a popular option for Linux users who want more control over their operating system.
While many experienced users customize the Arch Linux experience to provide some of the best user experiences (in terms of its UI), it could be challenging for new Linux users.
If you are not aware of the specifics about Arch Linux, you might want to read out [Ubuntu vs Arch Linux comparison][1] article.
However, some [Arch-based distros][2] aim to offer a more accessible experience without taking the control away.
**XeroLinux** is one of the options that we recently came across.
### XeroLinux: Yet Another Arch-Based Distribution
![][3]
[XeroLinux][4] is a personal project by Steve, a.k.a. [TechXero][5] to offer an “eye-candy” version of Arch Linux.
Note that this is a passion project and not a mainstream distro backed by a big team of contributors (yet). You should try it on a VM or a test machine before replacing it on your primary system.
Here, we feature XeroLinux with a quick review for its pleasant out-of-the-box experience and a few more exciting things.
### **Ease of Installation**
XeroLinux uses [Calamares installer][6] to let you easily install the Linux distribution without needing to rely on the terminal or the [guided Arch installer][7].
While the installation experience is similar to popular Linux distros, you get the ability to select graphics drivers, specific Linux kernels, and tools as you proceed.
![][8]
You get to install System76s power management driver and enable support for Nvidia Optimus Manager to switch graphics for your Laptop. Interesting!
You also get to choose password managers, themes, browsers, and a wide range of different packages at the time of installation, which should make things convenient.
Considering you get all the essential options in the form of a selection, you do not have a lot to worry about post-installation.
![][9]
Once you select whats required, simply restart and start using the desktop.
### **User Experience**
The out-of-the-box experience with XeroLinux is impressive. The overall look and feel of the desktop include many new functional additions like the widgets to show CPU usage, network speed, and more.
It also supports the global menu, making the application window look cleaner and offering a comfortable experience for macOS users to switch to Linux.
![][10]
With all the pre-installed applications, you can easily install new software, uninstall existing tools and perform various operations.
It features both pamac and [Synaptic package manager][11] (available to select during installation). So, you get access to loads of software utilities that you can easily install through either of them.
Other offerings include two file managers (Dolphin and Thunar), Yakuake terminal, Spectacle screenshot, KWrite, Konsole, and other KDE tools in its primary KDE edition.
If you do not prefer the Yakuake terminal emulator, refer to our [list of terminal emulators][12] to find alternatives to it.
![][13]
Not to forget, you get a customized lock screen (or login screen) that looks pretty good!
![][14]
When you boot into the system, you will also notice a **XeroLinux configuration tool**. It lets you perform some essential tasks quickly, like checking for NVIDIA card, installing KVM/QEMU, disabling autostart, installing KDE window tiling, and some other configurations, as shown below.
![][15]
### **Customizability**
XeroLinux features the KDE desktop environment in its main edition. So, naturally, you get endless customization options.
It would be best to refer to our [KDE customization guide][16] to get help with it.
In addition to that, you get to see the [Latte Dock][17], which you can customize and tweak as you like.
![][18]
There are several options to customize the dock; make sure you carefully tweak the settings before things look weird.
![][19]
Moreover, you get the [Kvantum Manager][20] that can help you install external themes.
If that wasnt enough, the developer also makes a few Rice/Themes and Grub themes available that you can find listed on the [official site][4] or the [GitHub repo][21].
In other words, there are some scripts made available by the developer that can help you get a makeover but do note that it is better to customize things yourself so that nothing else breaks.
### **Desktop Environment Options**
The primary edition features KDE, but you also have another XFCE variant if you want to give it a try.
The XFCE edition is tailored for older systems (or if you need to save up system resources).
It did offer a GNOME edition initially, but it dropped support for it due to issues with extensions breaking, with every update. You might want to go through our [KDE Plasma vs GNOME][22] article to know the differences if youre curious about the desktop environments.
### **Performance**
Considering it features the latest available [Linux Kernel 5.16][23], it should work fine with a variety of hardware configurations.
However, I havent tested it on bare metal. As per my experience with it as a virtual machine, it worked well without any peculiar issues.
Heres what the resource usage looks like on its KDE edition:
![][24]
You may notice lower resource usage when using its XFCE variant.
### Should You Try XeroLinux?
I enjoyed the look and feel that I got with XeroLinux.
Not just limited to that, you also get several package choices and the ability to choose the best of Linux right at the time of installation.
[Try XeroLinux][4]
If you know what you need at the time of installation, it should be an attractive Arch-based Linux distribution for you.
Have you tried XeroLinux yet? Let me know your thoughts in the comments below.
--------------------------------------------------------------------------------
via: https://itsfoss.com/xerolinux/
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://itsfoss.com/ubuntu-vs-arch/
[2]: https://itsfoss.com/arch-based-linux-distros/
[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/xerolinux-home.jpg?resize=800%2C450&ssl=1
[4]: https://xerolinux.xyz/
[5]: https://twitter.com/TechXero
[6]: https://calamares.io/
[7]: https://itsfoss.com/install-arch-linux-virtualbox/
[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/xerolinux-install-1.png?resize=800%2C555&ssl=1
[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/xerolinux-install.png?resize=800%2C555&ssl=1
[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/xerolinux-ui.jpg?resize=800%2C398&ssl=1
[11]: https://itsfoss.com/synaptic-package-manager/
[12]: https://itsfoss.com/linux-terminal-emulators/
[13]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/xerolinux-utilities.jpg?resize=800%2C652&ssl=1
[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/xerolinux-lockscreen.jpg?resize=800%2C546&ssl=1
[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/xerolinux-configuration-tool.jpg?resize=800%2C480&ssl=1
[16]: https://itsfoss.com/kde-customization/
[17]: https://github.com/KDE/latte-dock
[18]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/xerolinux-latte-dock.png?resize=800%2C134&ssl=1
[19]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/xerolinux-latte-dock-options.jpg?resize=800%2C570&ssl=1
[20]: https://store.kde.org/p/1005410/
[21]: https://github.com/xerolinux/xero-layan-git
[22]: https://itsfoss.com/kde-vs-gnome/
[23]: https://news.itsfoss.com/linux-kernel-5-16/
[24]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/xerolinux-resource.png?resize=800%2C468&ssl=1

View File

@ -0,0 +1,202 @@
[#]: subject: "Customize GNOME Desktop in Ubuntu with a Clean Look"
[#]: via: "https://www.debugpoint.com/2022/03/customize-gnome-clean-look-2022-1/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Customize GNOME Desktop in Ubuntu with a Clean Look
======
THIS TUTORIAL GIVES YOU SOME EASY STEPS TO CUSTOMIZE GNOME DESKTOP WITH
A CLEAN LOOK WITH MINIMAL EFFORT. HERES HOW.
If you are bored with the usual look of your favourite GNOME Desktop, then you are on the right page. Lets install some themes icons and do some tweaks to uplift your desktop. We will transform this below desktop (GNOME 40.5 with Ubuntu 21.10).
![Ubuntu Desktop with GNOME Before Customization][1]
This customization session will use the great-looking Colloid GTK theme, Mkos-Big-Sur icons, a cool cursor theme with additional extensions, and Conky.
### Customize GNOME Desktop and uplift it with a Clean Look
#### Installation
* First, setup the GNOME Shell Extenstion by running the following command from the terminal.
```
sudo apt install chrome-gnome-shell
```
* Then [open this page][2] and add the plugin to your browser (Chrome/Firefox) for GNOME Extension.
![Add Browser Add-on for GNOME Shell Extension][3]
* Install the Extensions Flatpak application which you may need to change settings of GNOME Extensions.
[Install Extensions App][4]
* After that, install GNOME Tweaks tool using the following command from the terminal. We will use this utility to change the Themes and other settings.
```
sudo apt install gnome-tweaks
```
* Download the Colloid GTK Theme from the below link. After download extract the files. Then copy the extracted folder to ~/.themes in your home directory. If the folder doesnt exists, create it. After you done this, open a terminal and run the `install.sh` file.
[Download Colloid GTK Theme][5]
* Download the Mkos-Big-Sur icon theme from the below link. Once it is downloaded, extract the files and copy the parent folder to ~/.icons in your home directory.
[Download Icon theme][6]
* Download the below cursor theme and follow the same steps as above. Copy the extracted folder to the ~/.icons directory. Then open a terminal and run the `install.sh` file.
[Download Cursor Theme][7]
Now, its time to install Conky and some extensions that would eventually give your GNOME Desktop a clean look. To install Conky and a Conky manager, open the terminal prompt and run the below commands.
```
sudo apt install conky
```
```
sudo add-apt-repository ppa:tomtomtom/conky-manager
sudo apt update && sudo apt install conky-manager2
```
Now, open each of the below links for the extensions and install them in sequence. To install, open the page and click on the ON/OFF toggle switch (see below image). It would ask for your admin password and permission to install.
* [Move Clock][8]
* [Dash to Dock][9]
* [Tray Icons][10]
* [Arc Menu][11]
* [User Themes][12]
![GNOME Extension Page][13]
#### Configurations
After you complete the above steps, its time to do some basic configurations. You may see some of the changes already in force when you installed the GNOME Extensions above. For example, the clock should already be shifted to the right side when installing the Move Clock extension above.
[][14]
SEE ALSO:   Give Your Ubuntu a New Look Using Paper Theme
* Open the Tweaks tool (search from the application menu) and go to Apperance.
* Change the Application theme to **Colloid Dark**, Cursors as **Vimix Cursors**, Icons as **Mkos-big-sur** and Shell Theme as **Colloid Dark**. If you want, you can choose the light theme and different option.
![Apply Themes][15]
* Open the Extenstion application and go to the Arch Menu Settings.
* Change the menu layout to `Alternative Menu Layout > Raven`.
* Change the application menu button to some icons you prefer. For this guide, I have downloaded a GNOME icon from [here][16]. And applied it via Arc Menu `Settings > Button Appearance > Browse Icon`. And it should look like this.
![Arch Menu Raven][17]
* Open Dash to Dock settings from the Extension application. In the Appearance tab, change the below items:
* Enable Shrink the dash
* Customize windows counter indicator = Dashes
* Enable Customize Dash color
* Customize Opacity = Fixed
* Opacity to 12%
* In the position and size tab, change the Dock position to bottom and Icon size limit to 39px.
* You can start Conky if you like and download a nice wallpaper which goes with Colloid theme. For this demonstration I have [chosen a nice grey-ish wallpaper][18] which looks stunning with the dark theme.
### Result
After all the configuration, and if all goes well, your desktop should look like this.
![GNOME Customization in Ubuntu with a simple look-1][19]
![GNOME Customization in Ubuntu with a simple look-2][20]
![GNOME Customization in Ubuntu with a simple look-3][21]
You can play around with different variants of this theme with several combinations of settings. And create a look that suits you better.
I hope this guide helps you transform your GNOME desktop with a clean look. Let me know in the comments down below if you like this setup.
* * *
We bring the latest tech, software news and stuff that matters. Stay in touch via [Telegram][22], [Twitter][23], [YouTube][24], and [Facebook][25] and never miss an update!
##### Also Read
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/2022/03/customize-gnome-clean-look-2022-1/
作者:[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/wp-content/uploads/2022/03/Ubuntu-Desktop-with-GNOME-Before-Customization-1024x582.jpg
[2]: https://extensions.gnome.org/
[3]: https://www.debugpoint.com/wp-content/uploads/2022/03/Add-Browser-Add-on-for-GNOME-Shell-Extension.jpg
[4]: https://dl.flathub.org/repo/appstream/org.gnome.Extensions.flatpakref
[5]: https://github.com/vinceliuice/Colloid-gtk-theme/archive/refs/heads/main.zip
[6]: https://github.com/zayronxio/Mkos-Big-Sur/archive/refs/heads/master.zip
[7]: https://github.com/vinceliuice/Vimix-cursors
[8]: https://extensions.gnome.org/extension/2/move-clock/
[9]: https://extensions.gnome.org/extension/307/dash-to-dock/
[10]: https://extensions.gnome.org/extension/2890/tray-icons-reloaded/
[11]: https://extensions.gnome.org/extension/3628/arcmenu/
[12]: https://extensions.gnome.org/extension/19/user-themes/
[13]: https://www.debugpoint.com/wp-content/uploads/2018/05/GNOME-Extension-Page.png
[14]: https://www.debugpoint.com/2018/09/give-your-ubuntu-a-new-look-using-paper-theme/
[15]: https://www.debugpoint.com/wp-content/uploads/2022/03/Apply-Themes.jpg
[16]: https://icons.iconarchive.com/icons/tatice/operating-systems/32/Gnome-icon.png
[17]: https://www.debugpoint.com/wp-content/uploads/2022/03/Arch-Menu-Raven.jpg
[18]: https://i.redd.it/1ttvv79apo851.png
[19]: https://www.debugpoint.com/wp-content/uploads/2022/03/GNOME-Customization-in-Ubuntu-with-a-simple-look-1-1024x579.jpg
[20]: https://www.debugpoint.com/wp-content/uploads/2022/03/GNOME-Customization-in-Ubuntu-with-a-simple-look-2-1024x580.jpg
[21]: https://www.debugpoint.com/wp-content/uploads/2022/03/GNOME-Customization-in-Ubuntu-with-a-simple-look-3-1024x576.jpg
[22]: https://t.me/debugpoint
[23]: https://twitter.com/DebugPoint
[24]: https://www.youtube.com/c/debugpoint?sub_confirmation=1
[25]: https://facebook.com/DebugPoint

View File

@ -0,0 +1,59 @@
[#]: subject: "The C4C Linux Distro Rises from the Grave"
[#]: via: "https://news.itsfoss.com/c4c-linux-distro-revived/"
[#]: author: "John Paul https://news.itsfoss.com/author/john/"
[#]: collector: "lujun9972"
[#]: translator: "lkxed"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
死而复生的 C4C Linux 发行版
======
当我刚开始在 Its FOSS 上写作时,我写过一篇名为 [基督徒的 Linux 发行版][1] 的文章,距离现在已经有 6 个年头了,让我们来速览一下这个项目在 6 年的时间里都有哪些变化吧。
### 名字变了,性质也变了
当我们第一次碰到 [Computers4Christians][2],他们是一个通过安装 Linux 系统来翻新旧电脑,并把它们捐赠给当地社区的基督教组织。他们大约捐赠了 1000 台翻新的旧电脑。这个组织基于 Lubuntu 定制了自己的 Linux 版本,名字叫 "Computers4Christians Linux Project"。
今天Computers4Christians 已经不再捐赠翻新的旧电脑了。取而代之的是,这三个开发者正在专注于开发重命名的 [C4C Ubuntu][3]。
当我问他们为什么决定要继续开发这个发行版时,他们回答说:
> 我们希望引导那些不信奉上帝的人与耶稣·基督建立真正的联系,并借此发展一些信徒。所有人都可以,在几乎任何电脑上,下载、运行 live 镜像或者安装我们的 Linux 发行版。C4C Ubuntu 用户可以通过多个版本的圣经、基督教教义、每日奉献、基督教视频和游戏等方式聆听上帝的教诲。我们祈祷每一次的下载、运行和安装 C4C Ubuntu 镜像,都能帮助用户走向基督,或是更接近上帝。“面对软弱的人,我就做软弱的人,为要得软弱的人。向什么样的人,我就做什么样的人。无论如何,总要救这些人。“ —— 哥林多前书 9:22网络
### C4C Ubuntu 中都有什么?
当前版本的 C4C Ubuntu 基于最新的 Ubuntu LTS (20.04) 构建。它使用 Xfce 桌面环境代替了 GNOME 桌面环境。我问他们为什么决定基于 Ubuntu 而不是 Lubuntu。开发者 Eric Bradshaw 告诉我说,他们之所以切换到 Ubuntu是因为 Lubuntu 的 LXQt 桌面环境有缺陷,而且它在旧电脑上表现不佳。
以下是 C4C Ubuntu 预装的内容:
* 主要的常用软件Catfish、FileZilla、GIMP、Gnash、GnuCash、Gufw、LibreOffice、OpenJDK Java 11、Pidgin、Pinta、Synaptic、Thunderbird 和 VLC。
* 与基督教或圣经相关的软件和媒体12 个使徒问答和记忆游戏、圣经、圣经桌面版、8 个圣经知识游戏、10 个圣经经文迷宫探索游戏、Diatheke、117 个 Flash 圣经游戏、24 个有趣的圣经故事、Verse、Wide Margin、西福斯圣经指南、新信徒和门徒的阅读材料以及基督教视频。
* 圣经Audio Bible (WEB)、AKJV、ASV、BBE、ERV、KJV、NHEB 和 WEB。评论MHC、NETnotesfree、Personal 和 TFG。每日奉献DBD 和 SME。字典MLStrong、Robinson、StrongsGreek 和 StrongsHebrew。通用书籍MollColossions 和 Pilgram。地图ABSMaps、eBibleTeacherMaps、EpiphanyMaps、HistMidEast、KretzmannMaps、NETMaps、SmithBibleAtlas 和 SonLightFreeMaps。
* 我们的背景图片包括 150 张不同的“<ruby>上帝的创造<rt>God's creation</rt></ruby>”,提供高清、标准和宽屏等尺寸大小。我们还提供快捷方式或启动器,你可以在“基督教”子菜单中找到它们,点击即可直达 37 个在线的基督教视频集、音乐视频集和 YouTube 频道。
* 预装的 Firefox 上有数百个手工挑选和分类的书签,不管你是要学习 Linux 还是要了解上帝,你都可以找到相关书签。有一个叫 “FoxFilter” 的家长控制扩展可以帮助过滤掉网页上不适当的内容,用户如果觉得有用,可以订阅它。
* C4C Ubuntu 团队引入了 [GNU Gnash 的 snap 包][4],它是一个 Flash 播放器。有了它,用户就可以玩预装的 Flash 圣经游戏了。
如果你想要尝试 C4C Ubuntu你可以在 [这里][5] 找到下载链接。这个网站有很多关于他们的历史版本信息。同时,开发团队也在不断更新这个网站。
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/c4c-linux-distro-revived/
作者:[John Paul][a]
选题:[lujun9972][b]
译者:[lkxed](https://github.com/lkxed)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/john/
[b]: https://github.com/lujun9972
[1]: https://itsfoss.com/computers-christians-linux/
[2]: https://computers4christians.org/
[3]: https://computers4christians.org/C4C.html
[4]: https://snapcraft.io/gnash-raymii
[5]: https://computers4christians.org/Download.html

View File

@ -0,0 +1,284 @@
[#]: subject: (Use awk to calculate letter frequency)
[#]: via: (https://opensource.com/article/21/4/gawk-letter-game)
[#]: author: (Jim Hall https://opensource.com/users/jim-hall)
[#]: collector: (lujun9972)
[#]: translator: (lkxed)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
使用 awk 统计字母频率
======
编写一个 awk 脚本来找到一组单词中出现次数最多(和最少)的单词。
![Typewriter keys in multicolor][1]
近一段时间,我开始编写一个小游戏,在这个小游戏里,玩家使用一个个字母块来组成单词。编写这个游戏之前,我需要先知道常见英文单词中每个字母的使用频率,这样一来,我就可以找到一组更有用的字母块。字母频次统计在很多地方都有相关讨论,包括在 [维基百科][2] 上,但我还是想要自己来实现。
Linux 系统在 `/usr/share/dict/words` 文件中提供了一个单词列表,所以我已经有了一个现成的单词列表。然而,尽管这个 `words` 文件包含了很多我想要的单词,却也包含了一些我不想要的。我想要的单词首先不能是复合词(即不包含连接符和空格的单词),也不能是专有名词(即不包含大写字母单词)。为了得到这个结果,我可以运行 `grep` 命令来取出只由小写字母组成的行:
```
`$ grep  '^[a-z]*$' /usr/share/dict/words`
```
这个正则表达式的作用是让 `grep` 去匹配仅包含小写字母的行。表达式中的字符 `^``$` 分别代表了这一行的开始和结束。`[a-z]` 分组仅匹配小写字母 **a****z**
下面是一个输出示例:
```
$ grep  '^[a-z]*$' /usr/share/dict/words | head
a
aa
aaa
aah
aahed
aahing
aahs
aal
aalii
aaliis
```
没错,这些都是合法的单词。比如,"aahed" 是 "aah," 的过去式,表示在放松时的感叹,而 "aalii" 是一种浓密的热带灌木。
现在我只需要编写一个 `gawk` 脚本来统计出单词中各个字母出现的次数,然后打印出每个字母的相对频率。
### 字母计数
一种使用 `gawk` 来统计字母个数的方式是,遍历每行输入中的每一个字符,然后对 **a****z** 之间的每个字母进行计数。`substr` 函数会返回一个给定长度的子串,它可以只包含一个字符,也可以是更长的字符串。比如,下面的示例代码能够取到输入中的每一个字符 `c`
```
{
    len = length($0); for (i = 1; i &lt;= len; i++) {
        c = substr($0, i, 1);
    }
}
```
如果使用一个全局字符串变量 `LETTERS` 来存储字母表,我就可以借助 `index` 函数来找到某个字符在字母表中的位置。我将扩展 `gawk` 代码示例,让它在输入数据中只取范围在 **a****z** 的字母:
```
BEGIN { LETTERS = "abcdefghijklmnopqrstuvwxyz" }
 
{
    len = length($0); for (i = 1; i &lt;= len; i++) {
        c = substr($0, i, 1);
        ltr = index(LETTERS, c);
    }
}
```
需要注意的是,`index` 函数将返回字母在 `LETTERS` 字符串中首次出现的位置,第一个位置返回 1如果没有找到则返回 0。如果我有一个大小为 26 的数组,我就可以利用这个数组来统计每个字母出现的次数。我将在下面的示例代码中添加这个功能,每当一个字母出现在输入中,我就让它对应的数组元素值增加 1使用 `++`
```
BEGIN { LETTERS = "abcdefghijklmnopqrstuvwxyz" }
 
{
    len = length($0); for (i = 1; i &lt;= len; i++) {
        c = substr($0, i, 1);
        ltr = index(LETTERS, c);
 
        if (ltr &gt; 0) {
            ++count[ltr];
        }
    }
}
```
### 打印相对频率
`gawk` 脚本统计完所有的字母后,我希望它能输出每个字母的频率。毕竟,我对输入中各个字母的个数没有兴趣,我更关心它们的 _相对频率_
我将先统计字母 **a** 的个数,然后把它和剩余 **b****z** 字母的个数比较:
```
END {
    min = count[1]; for (ltr = 2; ltr &lt;= 26; ltr++) {
        if (count[ltr] &lt; min) {
            min = count[ltr];
        }
    }
}
```
在循环的最后,变量 `min` 会等于最少的出现次数,我可以把它为基准,为字母的个数设定一个参照值,然后计算打印出每个字母的相对频率。比如,如果出现次数最少的字母是 **q**,那么 `min` 就会等于 **q** 的出现次数。
接下来,我会遍历每个字母,打印出它和它的相对频率。我通过把每个字母的个数都除以 `min` 的方式来计算出它的相对频率,这意味着出现次数最少的字母的相对频率是 1。如果另一个字母出现的次数恰好是最少次数的两倍那么这个字母的相对频率就是 2。我只关心整数所以 2.1 和 2.9 对我来说是一样的(都是 2
```
END {
    min = count[1]; for (ltr = 2; ltr &lt;= 26; ltr++) {
        if (count[ltr] &lt; min) {
            min = count[ltr];
        }
    }
 
    for (ltr = 1; ltr &lt;= 26; ltr++) {
        print substr(LETTERS, ltr, 1), int(count[ltr] / min);
    }
}
```
### 最后的完整程序
现在,我已经有了一个能够统计输入中各个字母的相对频率的 `gawk` 脚本:
```
#!/usr/bin/gawk -f
 
# 只统计 a-z 的字符,忽略 A-Z 和其他的字符
 
BEGIN { LETTERS = "abcdefghijklmnopqrstuvwxyz" }
 
{
    len = length($0); for (i = 1; i &lt;= len; i++) {
        c = substr($0, i, 1);
        ltr = index(LETTERS, c);
 
        if (ltr &gt; 0) {
            ++count[ltr];
        }
    }
}
 
# 打印每个字符的相对频率
   
END {
    min = count[1]; for (ltr = 2; ltr &lt;= 26; ltr++) {
        if (count[ltr] &lt; min) {
            min = count[ltr];
        }
    }
 
    for (ltr = 1; ltr &lt;= 26; ltr++) {
        print substr(LETTERS, ltr, 1), int(count[ltr] / min);
    }
}
```
我将把这段程序保存到名为 `letter-freq.awk` 的文件中,这样一来,我就可以在命令行中更方便地使用它。
如果你愿意的话,你也可以使用 `chmod +x` 命令把这个文件设为可独立执行。第一行中的 `#!/usr/bin/gawk -f` 表示 Linux 会使用 `/usr/bin/gawk` 把这个文件当作一个脚本来运行。由于 `gawk` 命令行使用 `-f` 来指定它要运行的脚本文件名,你需要在末尾加上 `-f`。如此一来,当你在 shell 中执行 `letter-freq.awk`,它会被解释为 `/usr/bin/gawk -f letter-freq.awk`
接下来我将用几个简单的输入来测试这个脚本。比如,如果我给我的 `gawk` 脚本输入整个字母表,每个字母的相对频率都应该是 1
```
$ echo abcdefghijklmnopqrstuvwxyz | gawk -f letter-freq.awk
a 1
b 1
c 1
d 1
e 1
f 1
g 1
h 1
i 1
j 1
k 1
l 1
m 1
n 1
o 1
p 1
q 1
r 1
s 1
t 1
u 1
v 1
w 1
x 1
y 1
z 1
```
还是使用上述例子,只不过这次我在输入中添加了一个字母 **e**,此时的输出结果中,**e** 的相对频率会是 2而其他字母的相对频率仍然会是 1
```
$ echo abcdeefghijklmnopqrstuvwxyz | gawk -f letter-freq.awk
a 1
b 1
c 1
d 1
e 2
f 1
g 1
h 1
i 1
j 1
k 1
l 1
m 1
n 1
o 1
p 1
q 1
r 1
s 1
t 1
u 1
v 1
w 1
x 1
y 1
z 1
```
现在我可以跨出最大的一步了!我将使用 `grep` 命令和 `/usr/share/dict/words` 文件,统计所有仅由小写字母组成的单词中,各个字母的相对使用频率:
```
$ grep  '^[a-z]*$' /usr/share/dict/words | gawk -f letter-freq.awk
a 53
b 12
c 28
d 21
e 72
f 7
g 15
h 17
i 58
j 1
k 5
l 36
m 19
n 47
o 47
p 21
q 1
r 46
s 48
t 44
u 25
v 6
w 4
x 1
y 13
z 2
```
`/usr/share/dict/words` 文件的所有小写单词中,字母 **j**、**q** 和 **x** 出现的相对频率最低,字母 **z** 也使用得很少。不出意料,字母 **e** 是使用频率最高的。
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/4/gawk-letter-game
作者:[Jim Hall][a]
选题:[lujun9972][b]
译者:[lkxed](https://github.com/lkxed)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/jim-hall
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc-docdish-typewriterkeys-3.png?itok=NyBwMdK_ (Typewriter keys in multicolor)
[2]: https://en.wikipedia.org/wiki/Letter_frequency

View File

@ -2,82 +2,82 @@
[#]: via: (https://opensource.com/article/21/7/parsing-config-files-java)
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: translator: (lkxed)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
Parsing config files with Java
使用 Java 解析 XML 文件
======
Implement persistent settings when you're writing software in Java.
在你使用 Java 编写软件时实现持久化配置。
![Person drinking a hot drink at the computer][1]
When you write an application, you often want users to be able to configure how they interact with it and how it interacts with their system. These are commonly called "preferences" or "settings," and they're stored in "preference files" or "configuration files," or just "configs." There are many different formats for config files, including INI, JSON, YAML, and XML, and every language parses these languages differently. This article discusses some of the ways you can implement persistent settings when you're writing software in the [Java programming language][2].
当你编写一个应用时,你通常都会希望用户能够定制化他们和应用交互的方式,以及应用与系统进行交互的方式。这种方式通常被称为 “偏好” 或者 “设置”,它们被保存在一个 “偏好文件” 或者 “配置文件” 中,有时也直接简称为 “配置”。配置文件可以有很多种格式,包括 INI、JSON、YAML 和 XML。每一种编程语言解析这些格式的方式都不同。本文主要讨论当你在使用 [Java 编程语言][2] 来编写软件时,实现持久化配置的方式。
### Choose a format
### 选择一个格式
Writing configuration files is surprisingly flexible. I've kept configuration options in a simple comma-delimited text file, and I've kept options in highly detailed YAML or XML. The most important thing about configuration files is that they are consistent and predictable. This makes it easy for you to write code that can quickly and easily extract data from the configuration file, as well as save and update options when the user decides to make a change.
编写配置文件是一件相当复杂的事情。我曾经试过把配置项使用逗号分隔保存在一个文本文件里,也试过把配置项保存在非常详细的 YAML 和 XML 中。对于配置文件来说,最重要是要有一致性和规律性,它们使你可以简单快速地编写代码,从配置文件中解析出数据;同时,当用户决定要做出修改时,很方便地保存和更新配置。
There are [several popular formats for configuration files][3]. Java has libraries for most of the common configuration formats, but in this article, I'll use the XML format. For some projects, you might choose to use XML for its inherent ability to provide lots of metadata about the data it contains, while for others, you may choose to avoid it due to its verbosity. Java makes working with XML relatively easy because it includes robust XML libraries by default.
目前有 [几种流行的配置文件格式][3]。对于大多数常见的配置文件格式Java 都有对应的<ruby><rt>libraries</rt></ruby>。在本文中,我将使用 XML 格式。对于一些项目,你可能会选择使用 XML因为它的一个突出特点是能够为包含的数据提供大量相关的元数据而在另外一些项目中你可能会因为 XML 的冗长而不选择它。在 Java 中使用 XML 是非常容易的,因为它默认包含了许多健壮的 XML 库。
### XML basics
### XML 基础
XML is a big topic. Just one of the books I own about XML is over 700 pages. Fortunately, using XML doesn't require in-depth knowledge of all its many features. Like HTML, XML is a hierarchical markup language with opening and closing tags, which may contain zero or more data. Here's a sample snippet of XML:
讨论 XML 可是一个大话题。我有一本关于 XML 的书,它有超过 700 页的内容。幸运的是,使用 XML 并不需要非常了解它的诸多特性。就像 HTML 一样XML 是一个带有开始和结束标记的分层标记语言,每一个标记(标签)内可以包含零个或更多数据。下面是一个 XML 的简单示例片段:
```
&lt;xml&gt;
  &lt;node&gt;
    &lt;element&gt;Penguin&lt;/element&gt;
  &lt;/node&gt;
&lt;/xml&gt;
```xml
<xml>
  <node>
    <element>Penguin</element>
  </node>
</xml>
```
In this rather self-descriptive example, here are the terms that XML parsers use:
在这个 <ruby>自我描述的<rt>self-descriptive</rt></ruby> 例子中XML 解析器使用了以下几个概念:
* **Document:** The `<xml>` tag opens a _document_, and the `</xml>` tag closes it.
* **Node:** The `<node>` tag is a _node_.
* **Element:** The `<element>Penguin</element>`, from the first `<` to the last `>`, is an _element_.
* **Content:** In the `<element>` element, the string `Penguin` is the _content_.
* **<ruby>文档<rt>Document</rt><ruby>**`<xml>` 标签标志着一个 _文档_ 的开始,`</xml>` 标签标志着这个文档的结束。
* **<ruby>节点<rt>Node</rt></ruby>**`<node>` 标签代表了一个 _节点_
* **<ruby>元素<rt>Element</rt></ruby>**`<element>Penguin</element>` 中,从开头的 `<` 到最后的 `>` 表示了一个 _元素_
* **<ruby>内容<rt>Content</rt></ruby>** 在 `<element>` 元素里,字符串 `Penguin` 就是 _内容_
Believe it or not, that's all you need to know about XML to be able to write and parse it.
不管你信不信,只要了解了以上几个概念,你就可以开始编写、解析 XML 文件了。
### Create a sample config file
### 创建一个示例配置文件
A minimal example of a config file is all you need to learn how to parse XML. Imagine a config file tracking some display properties of a GUI window:
要学习如何解析 XML 文件,只需要一个极简的示例文件就够了。假设现在有一个配置文件,里面保存的是关于一个图形界面窗口的属性:
```
&lt;xml&gt;
  &lt;window&gt;
    &lt;theme&gt;Dark&lt;/theme&gt;
    &lt;fullscreen&gt;0&lt;/fullscreen&gt;
    &lt;icons&gt;Tango&lt;/icons&gt;
&lt;/window&gt;
&lt;/xml&gt;
```xml
<xml>
  <window>
    <theme>Dark</theme>
    <fullscreen>0</fullscreen>
    <icons>Tango</icons>
</window>
</xml>
```
Create a directory called `~/.config/DemoXMLParser`:
创建一个名为 `~/.config/DemoXMLParser` 的目录:
```
`$ mkdir ~/.config/DemoXMLParser`
```shell
$ mkdir ~/.config/DemoXMLParser
```
On Linux, the `~/.config` directory is the default configuration file location, as defined by the [Freedesktop][4] specification. If you're on an operating system that doesn't follow Freedesktop standards, you can still use this location, but you may have to create all the directories yourself.
在 Linux 中,`~/.config` 目录是存放配置文件的默认位置,这是在 [自由桌面工作组][4] 的规范中定义的。如果你正在使用一个不遵守 <ruby>自由桌面工作组<rt>Freedesktop</rt><ruby> 标准的操作系统,你也仍然可以使用这个目录,只不过你需要自己创建这些目录了。
Copy and paste the sample configuration XML into a file and save it as `~/.config/DemoXMLParser/myconfig.xml`.
复制 XML 的示例配置文件,粘贴并保存为 `~/.config/DemoXMLParser/myconfig.xml` 文件。
### Parse XML with Java
### 使用 Java 解析 XML
If you're new to Java, start by reading my [7 tips for new Java developers][5] article. Once you're relatively comfortable with Java, open your favorite integrated development environment (IDE) and create a new project. I call mine **myConfigParser**.
如果你是 Java 的初学者,你可以先阅读我写的 [面向 Java 入门开发者的 7 个小技巧][5]。一旦你对 Java 比较熟悉了打开你最喜爱的集成开发工具IDE创建一个新工程。我会把我的新工程命名为 **myConfigParser**
Without worrying too much about imports and error catching initially, you can instantiate a parser using the standard Java extensions found in the `javax` and `java.io` libraries. If you're using an IDE, you'll be prompted to import the appropriate libraries; otherwise, you can find a full list of libraries in the complete version of this code later in this article.
刚开始先不要太关注依赖导入和异常捕获这些,你可以先尝试用 `javax``java.io` 包里的标准 Java 扩展来实例化一个解析器。如果你使用了 IDE它会提示你导入合适的依赖。如果没有你也可以在文章稍后的部分找到完整的代码里面就有完整的依赖列表。
```
```java
Path configPath = Paths.get([System][6].getProperty("user.home"), ".config", "DemoXMLParser");
[File][7] configFile = new [File][7](configPath.toString(), "myconfig.xml");
@ -91,23 +91,22 @@ doc = builder.parse(configFile);
doc.getDocumentElement().normalize();
```
This example code uses the `java.nio.Paths` library to locate the user's home directory, adding the default configuration location to the path. Then it defines the configuration file to be parsed as a File object using the `java.io.File` library.
这段示例代码使用了 `java.nio.Paths` 类来找到用户的主目录,然后在拼接上默认配置文件的路径。接着,它用 `java.io.File` 类来把配置文件定义为一个 `File` 对象。
Next, it uses the `javax.xml.parsers.DocumentBuilder` and `javax.xml.parsers.DocumentBuilderFactory` libraries to create an internal document builder so that the Java program can ingest and parse XML data.
紧接着,它使用了 `javax.xml.parsers.DocumentBuilder``javax.xml.parsers.DocumentBuilderFactory` 这两个类来创建一个内部的文档构造器,这样 Java 程序就可以导入并解析 XML 数据了。
Finally, Java builds a document called `doc` and loads the `configFile` file into it. Using `org.w3c.dom` libraries, it normalizes the ingested XML data.
最后Java 创建一个叫 `doc` 的文档对象,并且把 `configFile` 文件加载到这个对象里。通过使用 `org.w3c.dom` 包,它读取并规范化了 XML 数据。
That's essentially it. Technically, you're done parsing the data. But parsed data isn't of much use to you if you can't access it, so write some queries to extract important values from your configuration.
基本上就是这样啦。理论上来讲,你已经完成了数据解析的工作。可是,如果你不能够访问数据的话,数据解析也没有多少用处嘛。所以,就让我们再来写一些查询,从你的配置中读取重要的属性值吧。
### Accessing XML values with Java
### 使用 Java 访问 XML 的值
Getting data from your ingested XML document is a matter of referencing a specific node and then "walking" through the elements it contains. It's common to use a series of loops to iterate through elements in nodes, but I'll keep that to a minimum here, just to keep the code easy to read:
从你已经读取的 XML 文档中获取数据,其实就是要先找到一个特定的节点,然后遍历它包含的所有元素。通常我们会使用多个循环语句来遍历节点中的元素,但是为了保持代码可读性,我会尽可能少地使用循环语句:
```
```java
NodeList nodes = doc.getElementsByTagName("window");
for (int i = 0; i &lt; nodes.getLength(); i++) {
for (int i = 0; i < nodes.getLength(); i++) {
 Node mynode = nodes.item(i);
 System.out.println("Property = " + mynode.getNodeName());
       
@ -121,16 +120,16 @@ for (int i = 0; i &lt; nodes.getLength(); i++) {
}
```
This sample code creates a `NodeList` object called `nodes` using the `org.w3c.dom.NodeList;` library. This object contains any child node with a name that matches the string `window`, which is the only node in the sample config file created in this article.
这段示例代码使用了 `org.w3c.dom.NodeList` 类,创建了一个名为 `nodes``NodeList` 对象。这个对象包含了所有名字匹配字符串 `window` 的子节点,实际上这样的节点只有一个,因为本文的示例配置文件中只配置了一个。
Next, it creates a for-loop to iterate over the `nodes` list, taking each node in order of appearance and processing it with an if-then loop. The if-then loop creates an `Element` object called `myelement` that contains all elements within the current node. You can query the elements using methods like `getChildNodes`, `getElementById`, and others, as [documented][9] by the project.
紧接着,它使用了一个 for 循环来遍历 `nodes` 列表。具体过程是:根据节点出现的顺序逐个取出,然后交给一个 `if-then` 子句处理。这个 `if-then` 子句创建了一个名为 `myelement``Element` 对象,其中包含了当前节点下的所有元素。你可以使用例如 `getChildNodes``getElementById` 方法来查询这些元素,项目中还 [记录了][9] 其他查询方法。
In this example, the elements are essentially the configuration keys. The values are stored as the content of the element, which you can extract with the `.getTextContent` method.
在这个示例中,每个元素就是配置的键。而配置的值储存在元素的内容中,你可以使用 `.getTextContent` 方法来提取出配置的值。
Run the code either in your IDE or as a binary:
在你的 IDE 中运行代码(或者运行编译后的二进制文件):
```
```java
$ java ./DemoXMLParser.java
Property = window
Theme = Dark
@ -138,10 +137,10 @@ Fullscreen = 0
Icon set = Tango
```
Here's the full code:
下面是完整的代码示例:
```
```java
package myConfigParser;
import java.io.File;
@ -187,7 +186,7 @@ public class ConfigParser {
        doc.getDocumentElement().normalize();
       
        NodeList nodes = doc.getElementsByTagName("window");
        for (int i = 0; i &lt; nodes.getLength(); i++) {
        for (int i = 0; i < nodes.getLength(); i++) {
           Node mynode = nodes.item(i);
           [System][6].out.println("Property = " + mynode.getNodeName());
           
@ -203,22 +202,22 @@ public class ConfigParser {
} //close class
```
### Updating XML with Java
### 使用 Java 更新 XML
From time to time, a user is going to change a preference. The `org.w3c.dom` libraries can update the contents of an XML element; you only have to select the XML element the same way you did when reading it. Instead of using the `.getTextContent` method, you use the `.setTextContent` method:
用户时不时地会改变某个偏好项,这时候 `org.w3c.dom` 库就可以帮助你更新某个 XML 元素的内容。你只需要选择这个 XML 元素,就像你读取它时那样。不过,此时你不再使用 `.getTextContent` 方法,而是使用 `.setTextContent` 方法。
```
```java
updatePref = myelement.getElementsByTagName("fullscreen").item(0);
updatePref.setTextContent("1");
[System][6].out.println("Updated fullscreen to " + myelement.getElementsByTagName("fullscreen").item(0).getTextContent());  
```
This changes the XML document in your application's memory, but it doesn't write the data back to the drive. Using a combination of `javax` and `w3c` libraries, you can place your ingested XML back into your configuration file:
这么做会改变应用程序内存中的 XML 文档,但是还没有把数据写回到磁盘上。配合使用 `javax``w3c` 库,你就可以把读取到的 XML 内容写回到配置文件中。
```
```java
TransformerFactory transformerFactory = TransformerFactory.newInstance();
Transformer xtransform;
@ -230,12 +229,12 @@ StreamResult streamResult = new StreamResult(configFile);
xtransform.transform(mydom, streamResult);
```
This silently overwrites the previous configuration file with transformed data.
这么做会没有警告地写入转换后的数据,并覆盖掉之前的配置。
Here's the full code, complete with the updater:
下面是完整的代码,包括更新 XML 的操作:
```
```java
package myConfigParser;
import java.io.File;
@ -289,7 +288,7 @@ public class ConfigParser {
        Node updatePref = null;
//        NodeList nodes = doc.getChildNodes();
        NodeList nodes = doc.getElementsByTagName("window");
        for (int i = 0; i &lt; nodes.getLength(); i++) {
        for (int i = 0; i < nodes.getLength(); i++) {
           Node mynode = nodes.item(i);
           [System][6].out.println("Property = " + mynode.getNodeName());
           
@ -325,11 +324,11 @@ public class ConfigParser {
} //close class
```
### Keep configuration trouble-free
### 如何保证配置不出问题
Configuration can be a deceptively simple routine. You might start with a simple plain text config format while your application has only a few configurable features, but as you introduce more options, reading or writing incorrect data can cause unexpected behavior from your application. One way to help keep your configuration process safe from failure is to use a strict format like XML and to lean on your programming language's built-in features to handle the complexity.
编写配置文件看上去是一个还挺简单的任务。一开始,你可能会用一个简单的文本格式,因为你的应用程序只要寥寥几个配置项而已。但是,随着你引入了更多的配置项,读取或者写入错误的数据可能会给你的应用程序带来意料之外的错误。一种帮助你保持配置过程安全、不出错的方法,就是使用类似 XML 的规范格式,然后依靠你用的编程语言的内置功能来处理这些复杂的事情。
I like using Java and XML for this very reason. When I try to read the wrong configuration value, Java lets me know, often because the node my code claims to want to read doesn't exist in the XML path I expect. XML's highly structured format helps me keep my code reliable, and that benefits both the users and the developer.
这也正是我喜欢使用 Java 和 XML 的原因。每当我试图读取错误的配置值时Java 就会提醒我。通常呢,这是由于我在代码中试图获取的节点,并不存在于我期望的 XML 路径中。XML 这种高度结构化的格式帮助了代码保持可靠性,这对用户和开发者来说都是有好处的。
--------------------------------------------------------------------------------
@ -337,7 +336,7 @@ via: https://opensource.com/article/21/7/parsing-config-files-java
作者:[Seth Kenlon][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
译者:[lkxed](https://github.com/lkxed)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -0,0 +1,206 @@
[#]: subject: "Solve the repository impedance mismatch in CI/CD"
[#]: via: "https://opensource.com/article/21/8/impedance-mismatch-cicd"
[#]: author: "Evan "Hippy" Slatis https://opensource.com/users/hippyod"
[#]: collector: "lujun9972"
[#]: translator: "lxbwolf"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
解决 CI/CD 中的仓库阻抗失配
======
对齐部署镜像和描述符是很困难的,但是某些策略可以使整个过程更高效。
![Tips and gears turning][1]
在软件架构中当两个组件之间有某些概念性或技术上的差异时会出现_阻抗失配_。这个术语其实是从电子工程中借用的表示正常环路中输入和输出的电子阻抗必须要匹配。
在软件开发中存储在镜像仓库中的镜像与存储在源码控制管理系统译者注SCMSource Code Management中它的部署描述符之间存在阻抗失配。你如何确定存储在 SCM 中的部署描述符表示的是正确的镜像两个仓库追踪数据的方式并不一致因此匹配镜像在镜像仓库中独立存储的不可修改的二进制和它的部署描述符Git 中以文本文件形式存储的一系列修改记录)并不那么直观。
**注意**:本文假定读者已经熟悉以下概念:
* 源码控制管理SCM系统和分支
* docker/符合 OCI 标准的镜像和容器
* <ruby>容器编排系统<rt>Container Orchestration Platforms</rt></ruby>COP如 Kubernetes
* <ruby>持续集成/持续交付<rt>Continuous Integration/Continuous Delivery</rt></ruby>CI/CD
* <ruby>软件开发生命周期<rt>Software development lifecycle</rt></ruby>SDLC环境
### 阻抗失配SCM 与镜像仓库
为了更好地理解阻抗失配在什么场景下会成为问题请考虑任意项目中的软件开发生命周期环境SDLC如开发、测试或发布环境。
测试环境不会有阻抗失配。现在使用 CI/CD 的最佳实践中开发分支的最新提交都会对应开发环境中的最新部署。因此,一个典型的、成功的 CI/CD 开发流程如下:
1. 向 SCM 的开发分支提交新的修改
2. 新提交触发一次镜像构建
3. 新生成的镜像被推送到镜像仓库,标记为开发中
4. 镜像被部署到容器编排系统中的开发环境,该镜像的部署描述符也更新为从 SCM 拉取的最新描述符。
换句话说,开发环境中最新的镜像永远与最新的部署描述符匹配。回滚到前一个构建的版本也不是问题,因为 SCM 也会跟着回滚。
最终,随着开发流程继续推进,需要进行更多正式的测试,因此某个镜像 —— 镜像对应着 SCM 中的某次提交 —— 被推到测试环境。如果是一次成功的构建,那么不会有大问题,因为从开发环境推过来的镜像应该会与开发分支的最新提交相对应。
1. 开发环境的最新部署被允许入库,触发入库过程
2. 最新部署的镜像被标记为测试中
3. 镜像在测试环境中被拉取和部署,(该镜像)对应从 SCM 拉取的最新部署描述符
到目前为止,一切都没有问题,对吗?如果出现下面的场景,会有什么问题?
**场景 A**. 镜像被推到下游环境,如<ruby>用户验收测试<rt>user acceptance testing </rt></ruby>UAT或者是生产环境。
**场景 B**. 测试环境中发现了一个破坏性的 bug镜像需要回滚到某个确定正常的版本。
在任一场景中,开发过程并没有停止,即开发分支上游新的提交,而这意味着最新的部署描述符已经发生了变化,最新的镜像与之前部署在测试环境中的镜像不一致。对部署描述符的修改可能会也可能不会对之前版本的镜像起作用,但是它们一定是不可信任的。如果它们有了变化,那么它们就一定与目前为止你测试过的想要部署的镜像的部署描述符不一致。
问题的关键是:**如果部署的镜像不是镜像库中的最新版本,你怎么确定与部署的镜像相对应的是 SCM 中的哪个部署描述符?**一言以蔽之,无法确定。两个库直接有阻抗失配。如果要详细阐述下,那么是有方法可以解决的,但是你需要做很多工作,这部分内容就是文章接下来的主题了。请注意,下面的方案并不是解决问题的唯一办法,但是已经投入到生产环境并已经对很多项目起了作用,而且已经被构建并部署到生产环境中运行了超过一年。
### 二进制与部署描述符
源码通常被构建成一个 docker 镜像或符合 OCI 标准的镜像该镜像通常被部署到一个容器编排平台COP如Kubernetes。部署到 COP 需要部署描述符定义镜像被如何部署以及作为容器运行,如 [Kubernetes 部署][2] 或 [CronJobs][3]。这是因为在镜像和它的部署描述符之间有本质差异,在这里可以看到阻抗失配。在这次讨论中,我们认为镜像是存储在镜像仓库中不可修改的二进制。对源码的任何修改都不会修改镜像,而是用另一个新的镜像去替换它。
相比之下,部署描述符是文本文件,因而可以被认为是源码且可修改。如果遵循最佳实践,那么部署描述符是被存储在 SCM所有修改都会提交而这很容易回溯。
### 解决阻抗失配
建议的解决方案的第一部分,就是提供一个能匹配镜像仓库中的镜像与对保存部署描述符的 SCM 做的代码提交的方法。最直接的解决方案就是对镜像打上源码提交哈希的标签。这个方法可以使不同版本的镜像相互独立、容易分辨,并且在查找正确的部署描述符时可以提供足够的信息,以便镜像更好地部署到 COP。
再回顾下上面的场景:
**场景 A**. _镜像被推到下游环境_ 当镜像被从测试环境推到 UAT 环境时,我们可以从标签中知道应该从 SCM 的哪一次源码提交拉取部署描述符。
**场景 B**. _当一个镜像需要在某一环节中回滚_:无论我们选择回滚到那个镜像版本,我们都可以知道从 SCM 的哪一次源码提交拉取部署描述符
在每个案例中,无论在某个镜像被部署到测试环境后开发分支有多少次提交和构建,对于每一次升级的镜像,我们都可以找到它当初部署时对应的部署描述符。
然而,这并不是阻抗失配的完整解决方案。再考虑两个场景:
**场景 C**. 在负载测试环境中,会尝试对不同的部署描述符进行多次部署,以此来验证某一次构建的表现。
**场景 D**. 一个镜像被推送到下游环境,在该环境中部署描述符有一个错误。
在上面的所有场景中,我们都需要修改部署描述符,但是目前为止我们只有一个源码提交哈希。请记住,最佳实践要求我们所有对源码的修改都要先提交到 SCM。某次提交的哈希本身是无法修改的因此我们需要一个比仅仅追踪原来的源码提交哈希更好地解决方案。
解决方案是基于原来的源码提交哈希新建一个分支。我们把这个分支称为**部署分支**。每当一个镜像被推到下游测试或发布环境时,你应该**基于前一个 SDLC 环境的部署分支的最新提交**创建一个新的部署分支。
这样同一个镜像可以重复多次部署到不同的 SDLC 环境,在后面每个环境中可以感知前面发现的改动或对镜像做的修改。
**注意:**在某个环境中做的修改是如何影响下一个环境的,是用可以共享数据的工具(如 Helm Charts还是手动剪切、粘贴到其他目录都不在本文讨论的范围内。
因此,当一个镜像被从一个 SDLC 环境中推到下一环境时:
1. 创建一个部署分支
1. 如果镜像是从开发环境中推过来的,那么部署分支就基于构建这个镜像的源码提交哈希创建
2. 否则_部署分支基于当前部署分支的最新提交创建_
2. 镜像被部署到下一个 SDLC 环境,使用的部署描述符是该环境中新创建的部署分支的部署描述符
![deployment branching tree][4]
图 1部署分支
1. 部署分支
2. 下游环境的第一个部署分支,只有一次提交
3. 下游环境的第二个部署分支,只有一次提交
有了部署分支这个解决方案,再回顾下上面的场景 C 和场景 D
**场景 C**. 修改已经部署到下游 SDLC 环境中的镜像的部署描述符
**场景 D**. 修复某个 SDLC 环境中部署描述符的错误
两个场景中,工作流如下:
1. 把对部署描述符做的修改提交到 SLDC 环境和镜像对应的部署分支
2. 通过部署分支最新提交对应的部署描述符把镜像重新部署到 SLDC 环境
这样,部署分支彻底解决了(存储着代表一次独一无二的构建的单一的、不可修改的镜像的)镜像仓库与(存储着对应一个或多个 SDLC 环境的可修改的部署描述符的SCM 仓库之间的阻抗失配。
### 实践中的思考
这看起来像是行得通的解决方案,但同时它也为开发者和运维人员带来了新的实践中的问题,比如:
A. 为了更好地管理部署分支,部署描述符作为资源应该保存在哪里,是否要与构建镜像的源码保存在同一个 SCM 仓库?
到目前为止,我们都在避免声明应该把部署描述符放在哪个仓库里。在还没有太多细节需要处理时,我们推荐把所有 SDLC 环境的部署描述符与镜像源码放在同一个 SCM 仓库。当部署分支创建后,镜像的源码可以作为方便找到部署的容器中运行的镜像的引用来使用。
上面提到过,可以通过镜像的标签来关联镜像与原始的源码提交。在一个单独的仓库中查找某次提交的源码的引用会给开发者带来更大的困难(即便借助工具),这就是没有必要把所有资源都分开存储的原因。
B. 应该在部署分支上修改构建镜像的源码吗?
简答:**不应该**。
详细阐述:不应该,因为永远不要在部署分支上构建镜像,它们是在开发分支上构建的。修改部署分支上定义一个镜像的源码会破坏被部署的镜像的构建记录,而且这些修改并不会对镜像的功能生效。在对比两个部署分支的版本时这也会成为问题。这可能会导致两个版本的功能差异有错误的测试结果(这是使用部署分支的一个很小的额外好处)。
C. 为什么使用镜像 taglabel 不可以吗?
通过 tag 可以在仓库中很容易地查找镜像,可读性也很好。在一组镜像中读取和查找 label 的值需要拉取所有镜像的 manifest而这会增加复杂度、降低性能。而且考虑到历史记录的追踪和不同版本的查找对不同版本的镜像添加 tag 也很有必要,因此使用源码提交哈希是保证唯一性以及保存能即时生效的有用信息的最简单的解决方案。
D. 创建部署分支的最佳实践是怎样的?
DevOps 最重要的三个原则:自动化,自动化,自动化。
依赖资源来持续地强迫遵循最佳实践,充其量只是碰运气,因此在实现镜像的升级、回滚等 CI/CD 流水线时,把自动化部署分支写到脚本里。
E. 对部署分支的命名规范有建议吗?
&lt;_**部署分支标识**_&gt;-&lt;_**环境**_&gt;-&lt;_**源码提交哈希**_&gt;
* _**部署分支标识:**_ 所有部署分支范围内唯一的字符串;如 “deployment” 或 “deploy”
* _**环境:**_ 部署分支适用的 SDLC 环境;如 “qa”测试环境、 “stg”预生产环境、 或 “prod”生产环境
* _**源码提交哈希:**_ 源码提交哈希中包含原来构建被部署的镜像的源码,开发者可以通过它很容易地查找到创建镜像的原始提交,同时也能保证分支名唯一。
例如, _**deployment-qa-asdf78s**_ 表示推到 QA 环境的部署分支, _**deployment-stg-asdf78s**_ 表示推到 STG 环境的部署分支。
F. 你怎么识别环境中运行的哪个镜像版本?
我们的建议是把最新的部署分支提交哈希和源码提交哈希添加到 [label][5] 中。开发者和运维人员可以通过这两个独一无二的标识符查找的部署的所有东西及其来源。在诸如执行回滚或前滚操作时,使用那些不同版本的部署的选择器也能清理资源碎片。
G. 什么时候应该把部署分支的修改合并回开发分支?
这完全取决于开发团队。
如果你修改的目的是为了做负载测试,只是想验证什么情况会让程序崩溃,那么这些修改不应该被合并回开发分支。另一方面,如果你发现和修复了一个错误,或者对下游环境的部署做了调整,那么久应该把部署分支的修改合并回开发分支。
H. 有现成的部署分支示例让我们试水吗?
[el-CICD][6] 已经在生产上使用这个策略持续一年半应用到超过一百个项目了,覆盖所有的 SDLC 环境,包括管理生产环境的部署。如果你可以访问 [OKD][7]、Red Hat OpenShift lab cluster 或 [Red Hat CodeReady Containers][8],你可以下载[el-CICD 的最新版本][9],参照[教程][10]来学习部署分支是何时以怎样的方式创建和使用的。
### 结语
通过实践上面的例子可以帮助你更好的理解开发过程中阻抗失配相关的问题。对齐镜像和部署描述符是成功管理部署的关键部分。
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/8/impedance-mismatch-cicd
作者:[Evan "Hippy" Slatis][a]
选题:[lujun9972][b]
译者:[lxbwolf](https://github.com/lxbwolf)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/hippyod
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/gears_devops_learn_troubleshooting_lightbulb_tips_520.png?itok=HcN38NOk "Tips and gears turning"
[2]: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/
[3]: https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/
[4]: https://opensource.com/sites/default/files/picture1.png
[5]: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
[6]: https://github.com/elcicd
[7]: https://www.okd.io/
[8]: https://cloud.redhat.com/openshift/create/local
[9]: https://github.com/elcicd/el-CICD-RELEASES
[10]: https://github.com/elcicd/el-CICD-docs/blob/master/tutorial.md

View File

@ -0,0 +1,141 @@
[#]: subject: "Experience the Stunning Cutefish Desktop in Arch Linux"
[#]: via: "https://www.debugpoint.com/2022/02/cutefish-arch-linux-install/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lujun9972"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
体验 Arch Linux 中令人惊叹的 Cutefish 桌面
======
现在你可以在 Arch Linux 中体验 Cutefish桌 面了。本文概述了在 Arch Linux 系统中安装 Cutefish 桌面环境的步骤。
![Cutefish Desktop in Arch Linux][1]
### Cutefish 桌面
前一阵子,[我们评论了 CutefishOS][2],它的特点是看起来非常棒的 Cutefish 桌面,它得到了我们门户网站的读者的积极反应和关注。因此,我们认为这是一个完美的时机,如果你想在你最喜欢的 Arch Linux 中用这个桌面做一些实验。为什么不呢?
在你进入安装部分之前,这里有一些关于 Cutefish Desktop 的小知识。
Cutefish Desktop 是 [Cutefish OS][3] 的一部分,这是一个正在开发的新的 Linux 发行版。这个基于 Debian 的 Linux 发行版具有令人难以置信的外观、轻量级的 Cutefish 桌面。
Cutefish 桌面是以 Qt Quick、QML、C++ 和 KDE 框架为基础编写的内部工作。这个现代的桌面环境使用 KWin 和 SDDM 进行窗口和显示管理。
Cutefish 桌面带来了一个完整的 macOS启发你寻找开箱即用的 Linux 桌面。 这意味着你可以获得令人惊叹的图标、壁纸、全局菜单、带有漂亮通知弹出窗口的顶部栏和底部 dock。
你可在[这里]阅读详细的评论。
### 在 Arch Linux 中安装 Cutefish 桌面
#### 安装基础 Arch 系统
本指南假设在尝试这些步骤之前,你的系统中已经安装了基本的 Arch Linux。或者如果你也安装了任何基于 Arch 的 Linux 发行版,你也可以尝试。只是在这些情况下要注意显示管理的问题。
如果你是 Arch 的新手,你可以参考我们的 Arch Linux 安装指南。
* [如何使用 archinstall 安装 Arch Linux推荐][4]
* [如何安装 Arch Linux基本指南][5
#### 安装 Cutefish 桌面
Arch Linux 社区仓库包含 Cutefish 组,其中有该桌面运行所需的所有组件。它包括核心软件包、原生应用和下面提到的附加工具。
在你的 Arch Linux 系统的终端提示下,运行下面的命令来安装所有 Cutefish Desktop 软件包。
```
pacman -S cutefish
```
![A base Arch Linux prompt][6]
![Install Cutefish in Arch Linux][7]
接下来,我们需要通过下面的命令安装 Xorg 和显示管理器 SDDM。如果你将 Cutefish 桌面安装在安装有其他桌面环境的 Arch Linux 中,如 GNOME、KDE Plasma 或 Xfce那么请注意。因为你已经安装了一个显示管理器和 Xorg。所以你可以轻松跳过这一步。
```
pacman -S xorg sddm
```
上述命令完成后,通过 systemctl 启用显示管理器。
```
systemctl enable sddm
```
这就是裸机安装 Cutefish 桌面的全部内容。完成后,重启系统,登录后你应该看到 Cutefish 桌面如下。
基础安装需要额外的定制,因为它不像 Cutefish OS 那样接近。
### 安装后的配置
尽管 Arch 仓库中的 Cutefish 组包含了它的原生应用,如计算器和文件管理器,但桌面缺乏基本的应用,你需要单独安装这些应用来使它成为一个功能齐全的高效桌面。
我建议使用下面的命令来安装以下基本的应用。你可以跳过这一步,或者选择任何其他的应用/组合。
* Firefox 网络浏览器
* Kwrite 文本编辑器
* Fontsttf-freefont
* VLC 媒体播放器
* Gwenview 图像查看器
* GIMP 图像编辑器
* LibreOffice
* Transmission
```
pacman -S firefox ttf-freefont kwrite vlc gwenview gimp libreoffice-still transmission-qt
```
安装后,打开设置,改变你选择的字体。默认字体是 courier它在桌面上看起来很糟糕。
按照你的选择完成所有的定制后,重启系统。然后享受 Arch Linux 中的 Cutefish 桌面。
![The Stunning Login Lock Screen of Cutefish Desktop][9]
### 结束语
这个桌面正在开发中,所以在写这篇文章时,你不会发现很多设置项目。例如,没有办法改变分辨率、隐藏 Dock 和其他选项。这就是说,你仍然可以用额外的应用来使用它,供你使用。如果你想做实验,你可以去试试。
干杯。
* * *
我们带来最新的科技、软件新闻和重要的东西。通过 [Telegram][10]、[Twitter][11]、[YouTube][12] 和 [Facebook][13] 保持联系,永远不会错过任何更新!
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/2022/02/cutefish-arch-linux-install/
作者:[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/wp-content/uploads/2022/02/Cutefish-Desktop-in-Arch-Linux-1024x575.jpg
[2]: https://www.debugpoint.com/2021/11/cutefish-os-review-2021/
[3]: https://en.cutefishos.com/
[4]: https://www.debugpoint.com/2022/01/archinstall-guide/
[5]: https://www.debugpoint.com/2020/11/install-arch-linux/
[6]: https://www.debugpoint.com/wp-content/uploads/2022/02/A-base-Arch-Linux-prompt.jpg
[7]: https://www.debugpoint.com/wp-content/uploads/2022/02/Install-Cutefish-in-Arch-Linux.jpg
[9]: https://www.debugpoint.com/wp-content/uploads/2022/02/The-Stunning-Login-Lock-Screen-of-Cutefish-Desktop-1024x576.jpg
[10]: https://t.me/debugpoint
[11]: https://twitter.com/DebugPoint
[12]: https://www.youtube.com/c/debugpoint?sub_confirmation=1
[13]: https://facebook.com/DebugPoint

View File

@ -0,0 +1,271 @@
[#]: subject: "Creating and initializing maps in Groovy vs Java"
[#]: via: "https://opensource.com/article/22/3/maps-groovy-vs-java"
[#]: author: "Chris Hermansen https://opensource.com/users/clhermansen"
[#]: collector: "lujun9972"
[#]: translator: "lkxed"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
在 Groovy 和 Java 中创建并初始化 Map 的不同
======
Java 和 Groovy 中的 Map 都是非常通用的,它允许<ruby>关键字<rt>key</rt></ruby><ruby><rt>value</rt></ruby>为任意类型,只要继承了 Object 类即可。
![Business woman on laptop sitting in front of window][1]
我最近在探索 Java 与 Groovy 在 [创建并初始化<ruby>列表<rt>List</rt></ruby>][2] 和 [在运行时构建<ruby>列表<rt>List</rt></ruby>][3] 放面的一些差异。我观察到就实现这些功能而言Groovy 的简洁和 Java 的繁复形成了鲜明对比。
在这篇文章中,我将实现在 Java 和 Groovy 中创建并初始化 Map。Map 为开发支持根据 _关键字_ 检索的结构提供了可能,如果找到了这样一个关键字,它就会返回对应的 _值_。今天,很多编程语言都实现了 Map其中包括 Java 和 Groovy也包括了 Python它将 Map 称为<ruby>字典<rt>dict</rt></ruby>、Perl、awk 以及许多其他语言。另一个经常被用来描述 Map 的术语是 _<ruby>关联数组<rt>associative arrays</rt></ruby>_,你可以在 [这篇维基百科文章][4] 中了解更多。Java 和 Groovy 中的 Map 都是非常通用的,它允许<ruby>关键字<rt>key</rt></ruby><ruby><rt>value</rt></ruby>为任意类型,只要继承了 Object 类即可。
### 安装 Java 和 Groovy
Groovy 基于 Java因此你需要先安装 Java。你的 Linux 发行版的仓库中可能有最近的比较好的 Java 版本。或者,你也可以在根据上面链接中的指示来安装 Groovy。对于 Linux 用户来说,[SDKMan][5] 是一个不错的代替选项,你可以使用它来获取多个 Java 和 Groovy 版本,以及许多其他的相关工具。在这篇文章中,我使用的 SDK 发行版是:
* Java: version 11.0.12-open of OpenJDK 11;
* Groovy: version 3.0.8.
### 言归正传
Java 提供了非常多的方式来实例化和初始化 Map并且从 Java 9 之后,一些新的方式也添加了进来。其中最明显的方式就是使用 `java.util.Map.of()` 这个静态方法,下面介绍如何使用它:
```
var m1 = [Map][6].of(
    "AF", "Afghanistan",
    "AX", "Åland Islands",
    "AL", "Albania",
    "DZ", "Algeria",
    "AS", "American Samoa",
    "AD", "Andorra",
    "AO", "Angola",
    "AI", "Anguilla",
    "AQ", "Antarctica");
[System][7].out.println("m1 = " + m1);
[System][7].out.println("m1 is an instance of " + m1.getClass());
```
事实证明,在此种情况下,`Map.of()` 有两个重要的限制。其一,这样创建出来的 Map 实例是<ruby>不可变的<rt>immutable</rt></ruby>。其二,你最多只能提供 20 个参数,用来表示 10 个<ruby>键值对<rt>key-value pairs</rt></ruby>
你可以尝试着添加第 10 对和第 11 对,比方说 "AG", "Antigua and Barbuda" 和 "AR", "Argentina",然后观察会发生什么。你将发现 Java 编译器尝试寻找一个支持 11 个键值对的 `Map.of()` 方法。
快速查看 [java.util.Map 类的文档][8],你就会找到上述第二个限制的原因,以及解决这个难题的一种方式:
```
var m2 = [Map][6].ofEntries(
    [Map][6].entry("AF", "Afghanistan"),
    [Map][6].entry("AX", "Åland Islands"),
    [Map][6].entry("AL", "Albania"),
    [Map][6].entry("DZ", "Algeria"),
    [Map][6].entry("AS", "American Samoa"),
    [Map][6].entry("AD", "Andorra"),
    [Map][6].entry("AO", "Angola"),
    [Map][6].entry("AI", "Anguilla"),
    [Map][6].entry("AQ", "Antarctica"),
    [Map][6].entry("AG", "Antigua and Barbuda"),
    [Map][6].entry("AR", "Argentina"),
    [Map][6].entry("AM", "Armenia"),
    [Map][6].entry("AW", "Aruba"),
    [Map][6].entry("AU", "Australia"),
    [Map][6].entry("AT", "Austria"),
    [Map][6].entry("AZ", "Azerbaijan"),
    [Map][6].entry("BS", "Bahamas"),
    [Map][6].entry("BH", "Bahrain"),
    [Map][6].entry("BD", "Bangladesh"),
    [Map][6].entry("BB", "Barbados")
);
       
[System][7].out.println("m2 = " + m2);
[System][7].out.println("m2 is an instance of " + m2.getClass());
```
这就是一个比较好的解决方式,前提是我不在随后的代码里改变使用 `Map.ofEntries()` 创建并初始化的 Map 内容。注意,我在上面使用了 `Map.ofEntries()` 来代替 `Map.of()`
然而,假设我想要创建并初始化一个非空的 Map随后往这个 Map 中添加数据,我需要这样做:
```
var m3 = new HashMap&lt;[String][9],String&gt;([Map][6].ofEntries(
    [Map][6].entry("AF", "Afghanistan"),
    [Map][6].entry("AX", "Åland Islands"),
    [Map][6].entry("AL", "Albania"),
    [Map][6].entry("DZ", "Algeria"),
    [Map][6].entry("AS", "American Samoa"),
    [Map][6].entry("AD", "Andorra"),
    [Map][6].entry("AO", "Angola"),
    [Map][6].entry("AI", "Anguilla"),
    [Map][6].entry("AQ", "Antarctica"),
    [Map][6].entry("AG", "Antigua and Barbuda"),
    [Map][6].entry("AR", "Argentina"),
    [Map][6].entry("AM", "Armenia"),
    [Map][6].entry("AW", "Aruba"),
    [Map][6].entry("AU", "Australia"),
    [Map][6].entry("AT", "Austria"),
    [Map][6].entry("AZ", "Azerbaijan"),
    [Map][6].entry("BS", "Bahamas"),
    [Map][6].entry("BH", "Bahrain"),
    [Map][6].entry("BD", "Bangladesh"),
    [Map][6].entry("BB", "Barbados")
));
[System][7].out.println("m3 = " + m3);
[System][7].out.println("m3 is an instance of " + m3.getClass());
m3.put("BY", "Belarus");
[System][7].out.println("BY: " + m3.get("BY"));
```
这里,我把使用 `Map.ofEntries()` 创建出来的不可变 Map 作为 `HashMap` 的一个构造参数,以此创建了该 Map 的一个<ruby>可变拷贝<rt>mutable copy</rt></ruby>,之后我就可以修改它 —— 比如使用 `put()` 方法。
让我们来看看上述过程如何用 Groovy 来实现:
```
def m1 = [
    "AF": "Afghanistan",
    "AX": "Åland Islands",
    "AL": "Albania",
    "DZ": "Algeria",
    "AS": "American Samoa",
    "AD": "Andorra",
    "AO": "Angola",
    "AI": "Anguilla",
    "AQ": "Antarctica",
    "AG": "Antigua and Barbuda",
    "AR": "Argentina",
    "AM": "Armenia",
    "AW": "Aruba",
    "AU": "Australia",
    "AT": "Austria",
    "AZ": "Azerbaijan",
    "BS": "Bahamas",
    "BH": "Bahrain",
    "BD": "Bangladesh",
    "BB": "Barbados"]
println "m1 = $m1"
println "m1 is an instance of ${m1.getClass()}"
m1["BY"] = "Belarus"
println "m1 = $m1"
```
只看一眼,你就会发现 Groovy 使用了 `def` 关键字而不是 `var` —— 尽管在<ruby>最近模型<rt>late-model</rt><ruby>的 Groovyversion 3+)中,使用 `var` 关键字也是可行的。
你还会发现,你是通过在括号里添加了一个键值对列表来创建一个 Map 的。不仅如此,这样创建的列表对象还非常有用,这里有几个原因。其一,它是可变的;其二,它是一个 `LinkedHashMap` 的实例,内部维持了数据的插入顺序。所以,当你运行 Java 版本的代码并打印出变量 `m3`,你会看到:
```
`m3 = {BB=Barbados, BD=Bangladesh, AD=Andorra, AF=Afghanistan, AG=Antigua and Barbuda, BH=Bahrain, AI=Anguilla, AL=Albania, AM=Armenia, AO=Angola, AQ=Antarctica, BS=Bahamas, AR=Argentina, AS=American Samoa, AT=Austria, AU=Australia, DZ=Algeria, AW=Aruba, AX=Åland Islands, AZ=Azerbaijan}`
```
而当你运行 Groovy 版本的代码,你会看到:
```
`m1 = [AF:Afghanistan, AX:Åland Islands, AL:Albania, DZ:Algeria, AS:American Samoa, AD:Andorra, AO:Angola, AI:Anguilla, AQ:Antarctica, AG:Antigua and Barbuda, AR:Argentina, AM:Armenia, AW:Aruba, AU:Australia, AT:Austria, AZ:Azerbaijan, BS:Bahamas, BH:Bahrain, BD:Bangladesh, BB:Barbados]`
```
再一次,你将看到 Groovy 是如何简化事情的。这样的语法非常直观,有点像 Python 里的字典,并且,即使你有一个超过 10 个键值对的初始列表,你也不需要去记住各种必要的<ruby>复杂方式<rt>contortions</rt></ruby>
```
`m1[“BY”] = “Belarus”`
```
而在 Java 中,你需要这样做:
```
`m1.put(“BY”, “Belarus”)`
```
还有,这个 Map 默认是可变的这么做的利弊很难评判还是得取决于你的需求是什么。我个人觉得Java 在这种情况下的 “默认不可变” 机制,最让我困扰的地方是,它没有一个类似于 `Map.mutableOfMutableEntries()` 的方法。这迫使一些刚学会如何声明和初始化一个 Map 的程序员,不得不转念去思考该如何把他们手中不可变的 Map转换为可变的。同时我也想问创建一个不可变的对象然后再舍弃它这样真的好吗
另一个值得考虑的事情是Groovy 使用方括号代替 Java 中的 `put()``get()` 方法来进行关键字查找。因此你可以这样写:
```
`m1[“ZZ”] = m1[“BY”]`
```
而不需要这样写:
```
`m1.put(“ZZ”,m1.get(“BY”))`
```
有时候,就像使用某个类的实例变量一样来使用 Map 中的关键字和值是一个好办法。设想你现在有一堆想要设置的属性,在 Groovy 中,它们看起来就像下面这样:
```
def properties = [
      verbose: true,
      debug: false,
      logging: false]
```
然后,你可以改变其中的某个属性,就像下面这样:
```
`properties.verbose = false`
```
之所以这样能工作,是因为,只要关键字符合特定的规则,你就可以省略引号,然后直接用点操作符来代替方括号。尽管这个功能非常有用,也非常好用,它也同时也意味着,如果你要把一个变量作为一个 Map 的关键字来使用,你就必须把这个变量包裹在圆括号里,就像下面这样:
```
`def myMap = [(k1): v1, (k2): v2]`
```
是时候告诉勤奋的读者 Groovy 是一门为编写脚本而量身定制的语言了。Map 通常是脚本中的关键元素,它为脚本提供了<ruby>查找表<rt>lookup tables</rt></ruby>,并且通常起到了作为内存数据库的作用。我在这里使用的例子是 ISO 3166 规定的两个字母的国家代码和国家名称。对在世界上各个国家的互联网使用者来说,这些代码是很熟悉的。此外,假设我们要编写一个从日志文件中查找互联网主机名,并借此来了解用户的地理位置分布的脚本工具,那么这些代码会是十分有用的部分。
### Groovy 相关资源
[Apache Groovy 网站][10] 上有非常多的文档。另一个很棒的 Groovy 资源是 [Mr. Haki][11]。[Baeldung 网站][12] 提供了大量 Java 和 Groovy 的有用教程。学习 Groovy 还有一个很棒的原因,那就是可以接着学习 [Grails][13],后者是一个优秀的、高效率的全栈 Web 框架。它基于许多优秀组件构建而成,比如有 Hibernate、Spring Boot 和 Micronaut 等。
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/3/maps-groovy-vs-java
作者:[Chris Hermansen][a]
选题:[lujun9972][b]
译者:[lkxed](https://github.com/lkxed)
校对:[校对者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/lenovo-thinkpad-laptop-concentration-focus-windows-office.png?itok=-8E2ihcF (Woman using laptop concentrating)
[2]: https://opensource.com/article/22/1/creating-lists-groovy-java
[3]: https://opensource.com/article/22/2/accumulating-lists-groovy-vs-java
[4]: https://en.wikipedia.org/wiki/Associative_array
[5]: https://sdkman.io/
[6]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+map
[7]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+system
[8]: https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html
[9]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+string
[10]: https://groovy-lang.org/
[11]: https://blog.mrhaki.com/
[12]: https://www.baeldung.com/
[13]: https://grails.org/

View File

@ -0,0 +1,171 @@
[#]: subject: "Using Homebrew Package Manager on Fedora Linux"
[#]: via: "https://fedoramagazine.org/using-homebrew-package-manager-on-fedora-linux/"
[#]: author: "Mehdi Haghgoo https://fedoramagazine.org/author/powergame/"
[#]: collector: "lujun9972"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
在 Fedora Linux 上使用 Homebrew 包管理器
======
![][1]
### 简介
Homebrew 是一个 macOS 的包管理器,用于在 macOS 上安装 UNIX 工具。但是,它也可以在 Linux和 Windows WSL上使用。它是用 Ruby 编写的并提供主机系统macOS 或 Linux可能不提供的软件包因此它在操作系统包管理器之外提供了一个辅助的包管理器。此外它只向其前缀/home/linuxbrew/.linuxbrew 或 \~/.linuxbrew安装软件包作为非 root 用户,它不会污染系统路径。这个包管理器在 Fedora Linux 上也适用。在这篇文章中,我将尝试告诉你 Homebrew 与 Fedora Linux 包管理器 _dnf_ 有什么不同,为什么你可能想在 Fedora Linux 上安装和使用它,以及如何安装。
##### 警告
你应该经常检查你在系统上安装的软件包和二进制文件。Homebrew 包通常在专门前缀的路径以非 sudoer 用户运行,因此它们不太可能造成破坏或错误配置。然而,做所有的安装都要自己承担风险。作者和 Fedora 社区不对任何可能直接或间接因遵循这篇文章而造成的损失负责。
### Homebrew 如何工作
Homebrew 在背后使用 Ruby 和 Git。它使用特殊的 Ruby 脚本从源代码构建软件,这些脚本被称为 formula看起来像这样使用 wget 包作为例子):
```
class Wget < Formula
homepage "https://www.gnu.org/software/wget/"
url "https://ftp.gnu.org/gnu/wget/wget-1.15.tar.gz"
sha256 "52126be8cf1bddd7536886e74c053ad7d0ed2aa89b4b630f76785bac21695fcd"
def install
system "./configure", "--prefix=#{prefix}"
system "make", "install"
end
end
```
### Homebrew与 _dnf_ 有何不同
Homebrew 是一个包管理器,提供了许多 UNIX 软件工具和包的最新版本,例如 ffmpeg、composer、minikube 等。当你想安装一些由于某种原因在 Fedora Linux _rpm_ 仓库中没有的软件包时,它就会证明很有用。所以,它并不能取代 _dnf_
### 安装 Homebrew
在开始安装 Homebrew 之前,确保你已经安装了 glibc 和 gcc。这些工具可以在 Fedora 上通过以下方式安装:
```
sudo dnf groupinstall "Development Tools"
```
然后,通过在终端运行以下命令来安装 Homebrew
```
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```
在安装过程中,你会被提示输入你的 sudo 密码。另外,你可以选择 Homebrew 的安装前缀,但默认的前缀就可以了。在安装过程中,你将成为 Homebrew 前缀的所有者,这样你就不必输入 sudo 密码来安装软件包。安装将需要数分钟。完成后,运行以下命令,将 brew 添加到你的PATH中
```
echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> ~/.bash_profile
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
```
### 安装和检查软件包
要在 Homebrew 上使用 formula 安装一个软件包,只需运行:
```
brew install <formula>
```
&lt;formula&gt; 替换为你要安装的 formula 的名称。例如,要安装 Minikube只需运行
```
brew install minikube
```
你也可以用以下方式搜索 formula
```
brew search <formula>
```
要获得一个 formula 的信息,请运行:
```
brew info <formula>
```
另外,你可以用以下命令查看所有已安装的 formula
```
brew list
```
### 卸载软件包
要从你的 Homebrew 前缀中卸载一个软件包,请运行:
```
brew uninstall <formula>
```
### 升级软件包
要升级一个用 Homebrew 安装的特定软件包,请运行:
```
brew upgrade <formula>
```
要更新 Homebrew 和所有已安装的 Formula 到最新版本,请运行:
```
brew update
```
### 总结
Homebrew 是一个简单的包管理器,可以与 _dnf_ 一起成为有用的工具(两者完全没有关系)。尽量坚持使用 Fedora 的本地 _dnf_ 包管理器,以避免软件冲突。然而,如果你在 Fedora Linux 软件库中没有找到某个软件,那么你也许可以用 Homebrew 找到并安装它。请看 [Formula 列表][2]了解有哪些可用的软件。另外Fedora Linux 上的 Homebrew 还不支持图形化应用(在 Homebrew 术语中称为 casks。至少我在安装任何 GUI 应用时没有任何运气。
### 参考资料和进一步阅读
要了解更多关于 Homebrew 的信息,请查看以下资源:
* Homebrew 主页:<https://brew.sh>
* Homebrew 文档:<https://docs.brew.sh>
* 维基百科 Homebrew 页面:<https://en.wikipedia.org/wiki/Homebrew_(package_manager)>
--------------------------------------------------------------------------------
via: https://fedoramagazine.org/using-homebrew-package-manager-on-fedora-linux/
作者:[Mehdi Haghgoo][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://fedoramagazine.org/author/powergame/
[b]: https://github.com/lujun9972
[1]: https://fedoramagazine.org/wp-content/uploads/2022/03/homebrew_sized-up-816x346.png
[2]: https://formulae.brew.sh/formula/

View File

@ -0,0 +1,160 @@
[#]: subject: "Piwigo: An Open-Source Google Photos Alternative That You Can Self-Host"
[#]: via: "https://itsfoss.com/piwigo/"
[#]: author: "Ankush Das https://itsfoss.com/author/ankush/"
[#]: collector: "lujun9972"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Piwigo一个你可以自行托管的开源谷歌照片替代品
======
**简介:** _如果你正在远离谷歌照片Piwigo 是一个令人印象深刻的开源替代方案能够自我托管。让我们来探讨一下它的更多信息。_
谷歌照片是备份你的照片和视频的最流行的选择之一。
考虑到它是大多数安卓手机的默认选择,使用谷歌照片管理照片/视频是一种无缝体验。
但是,如果你想从它那里转移到一些开源的、对隐私更友好的东西怎么办?不仅仅是谷歌照片,还有专有的照片托管平台。
请看看 Piwigo一个开源的[照片管理软件][1]来帮助你。
### Piwigo你可以自行托管的开源照片库
![][2]
[Piwigo][3] 是一个开源解决方案,帮助管理你的照片和视频。
你可以选择自己托管,控制你的数据,或者选择云托管(**数据存储在法国,有备份**)。
如果你感到好奇,该公司起源于法国。
不仅仅是针对个人Piwigo 也为组织和团队量身定做。
如果你担心使用谷歌照片或类似服务上传时的隐私政策Piwigo 可以成为一个出色的替代品。
Piwigo 提供了一系列的功能和细粒度的控制来管理你的照片。
### Piwigo 的功能
![][4]
虽然它是主流服务的一个可行的替代品,但它为个人和组织提供了先进的功能。
一些功能包括:
* 通过云托管(\*.piwigo.com获得你的专用子域
* 能够批量下载
* 创建相册
* 选择照片来分配现有的相册集
* 通过链接分享照片
* 用公共和私人模式进行访问管理
* 能够对用户进行分组,以管理你的相册或照片(对组织/团队来说很有效)。
* 基本分析,以跟踪你的使用情况和使用的存储空间
* 支持向相册/照片添加标签
* 支持深色模式
* 能够编辑照片的元数据
* 过滤器,以快速找到照片/相册
* 支持 JPG/JPEG、PNG 和 GIF 文件(针对个人)
* 支持所有文件类型(仅适用于企业使用)
* 为个人用户提供无限的存储空间
* 支持自定义域名(即使是云托管选项)。
* 插件可扩展功能
* 支持主题
* 移动支持(安卓和 iOS
除了上述功能外,你还可以获得额外的选项,以改善用户管理和 Piwigo 的整体用户体验。
![][5]
我使用其针对个人的云托管选项(**有 30 天的试用期**)对其进行了快速测试。让我分享我的一些见解,以帮助你在尝试之前了解它们。
### 使用 Piwigo 来管理照片
当你注册一个账户时,你可以指定你的自定义子域。
例如,我把我的测试账户放在 **ankushsoul.piwigo.com**
![][6]
任何人都可以通过在他们的浏览器中输入上述 URL 来访问我公开分享的照片/相册。
所以,最好是尽可能保持子域的名称独一无二。在这两种情况下,你也可以将相册/照片限制给登录的用户(或你自己),其他人即使知道你的子域,也无法访问你的照片。
![][7]
你可以前往它的仪表板,检查你的存储使用情况和整体活动情况。
它有两个激活的插件,一个用于内部功能,另一个默认用于打击垃圾信息。
![][8]
你会发现有很多插件可以加强批量管理,启用管理员信息,激活相册的评论,在你的相册上添加到期时间,限制下载,以及访问一些令人兴奋的功能。
如果你花点时间浏览一下现有的插件选择,以评估它们与谷歌照片相比能有多大用处,那将是最好的。
当然,你在任何主流的云照片托管服务中都得不到这种控制。
所以,这很值得探索。
![][9]
对于现有的其他功能,你可以管理多个用户,控制访问,发送通知(通过电子邮件),还可以进行一些维护活动。
总的来说,用户体验是相当好的。它可能没有提供最现代的用户界面,但它可以工作,而且很容易管理。
**注意**:考虑到 Play Store 上的应用没有收到任何最新的更新,移动体验(在 Android 上)可能并不令人满意。然而,你可以在他们的 GitHub 上找到最新版本的 APK 文件。
###开始使用 Piwigo
我认为 Piwigo 非常适合各类人使用,从想组织照片的人,到想合作/分享图片的用户,都可以使用。
如果你选择自我托管,你应该查看它的[文档][10]和探索 [GitHub 页面][11]。
考虑到你独自管理它,你将需要适当地维护实例,并对你的数据进行备份。
如果你选择[云托管选项][12](作为个人),定价从每年 **39 欧元**开始,不限图片文件上传,如果你订阅 3 年,价格会更便宜。
![][13]
个人计划没有提到具体的存储限制(无限)。因此,可以说你不应该有任何问题,除非你开始滥用该服务。
鉴于你在该服务中得到的控制权,大多数用户会更愿意使用云托管服务,而放弃像谷歌照片这样的服务。
企业/组织的定价计划将是昂贵的(每月)。然而,它支持企业的所有文件类型。
[Piwigo][3]
_你认为像 Piwigo 这样的谷歌照片的自行托管替代品如何你试过吗云主机选项是主流选项的可行替代品吗_
_请在下面的评论中告诉我你的想法。_
--------------------------------------------------------------------------------
via: https://itsfoss.com/piwigo/
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://itsfoss.com/linux-photo-management-software/
[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/piwigo-feature.jpg?resize=800%2C424&ssl=1
[3]: https://piwigo.com/
[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/piwigo-album-edit.png?resize=800%2C451&ssl=1
[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/piwigo-upload.png?resize=800%2C665&ssl=1
[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/piwigo-sign-up.png?resize=800%2C646&ssl=1
[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/piwigo-dashboard.png?resize=800%2C435&ssl=1
[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/piwigo-plugins.png?resize=800%2C499&ssl=1
[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/piwigo-config.png?resize=800%2C632&ssl=1
[10]: https://piwigo.org/doc/doku.php
[11]: https://github.com/Piwigo
[12]: https://piwigo.com/pricing
[13]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/piwigo-pricing.png?resize=800%2C509&ssl=1