This commit is contained in:
onionstalgia 2023-08-09 21:31:15 +08:00
commit 41f2dc3d6d
106 changed files with 5071 additions and 3936 deletions

View File

@ -0,0 +1,313 @@
[#]: subject: "Perform unit tests using GoogleTest and CTest"
[#]: via: "https://opensource.com/article/22/1/unit-testing-googletest-ctest"
[#]: author: "Stephan Avenwedde https://opensource.com/users/hansic99"
[#]: collector: "lujun9972"
[#]: translator: "toknow-gh"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-16055-1.html"
使用 GoogleTest 和 CTest 进行单元测试
======
> 进行单元测试可以提高代码质量,并且它不会打断你的工作流。
![][0]
本文是 [使用 CMake 和 VSCodium 设置一个构建系统][2] 的后续文章。
在上一篇文章中我介绍了基于 [VSCodium][3] 和 [CMake][4] 配置构建系统。本文我将介绍如何通过 [GoogleTest][5] 和 [CTest][6] 将单元测试集成到这个构建系统中。
首先克隆 [这个仓库][7],用 VSCodium 打开,切换到 `devops_2` 标签。你可以通过点击 `main` 分支符号(红框处),然后选择 `devops_2` 标签(黄框处)来进行切换:
![VSCodium tag][8]
或者你可以通过命令行来切换:
```
$ git checkout tags/devops_2
```
### GoogleTest
GoogleTest 是一个平台无关的开源 C++ 测试框架。单元测试是用来验证单个逻辑单元的行为的。尽管 GoogleTest 并不是专门用于单元测试的,我将用它对 `Generator` 库进行单元测试。
在 GoogleTest 中,测试用例是通过断言宏来定义的。断言可能产生以下结果:
* _成功_: 测试通过。
* _非致命失败_: 测试失败,但测试继续。
* _致命失败_: 测试失败,且测试终止。
致命断言和非致命断言通过不同的宏来区分:
* `ASSERT_*` 致命断言,失败时终止。
* `EXPECT_*` 非致命断言,失败时不终止。
谷歌推荐使用 `EXPECT_*` 宏,因为当测试中包含多个的断言时,它允许继续执行。断言有两个参数:第一个参数是测试分组的名称,第二个参数是测试自己的名称。`Generator` 只定义了 `generate(...)` 函数,所以本文中所有的测试都属于同一个测试组:`GeneratorTest`。
针对 `generate(...)` 函数的测试可以从 [GeneratorTest.cpp][9] 中找到。
#### 引用一致性检查
[generate(...)][10] 函数有一个 [std::stringstream][11] 的引用作为输入参数,并且它也将这个引用作为返回值。第一个测试就是检查输入的引用和返回的引用是否一致。
```
TEST(GeneratorTest, ReferenceCheck){
    const int NumberOfElements = 10;
    std::stringstream buffer;
    EXPECT_EQ(
        std::addressof(buffer),
        std::addressof(Generator::generate(buffer, NumberOfElements))
    );
}
```
在这个测试中我使用 [std::addressof][12] 来获取对象的地址,并用 `EXPECT_EQ` 来比较输入对象和返回对象是否是同一个。
#### 检查元素个数
本测试检查作为输入的 `std::stringstream` 引用中的元素个数与输入参数中指定的个数是否相同。
```
TEST(GeneratorTest, NumberOfElements){
    const int NumberOfElements = 50;
    int nCalcNoElements = 0;
    std::stringstream buffer;
    Generator::generate(buffer, NumberOfElements);
    std::string s_no;
    while(std::getline(buffer, s_no, ' ')) {
        nCalcNoElements++;
    }
    EXPECT_EQ(nCalcNoElements, NumberOfElements);
}
```
#### 乱序重排
本测试检查随机化引擎是否工作正常。如果连续调用两次 `generate` 函数,应该得到的是两个不同的结果。
```
TEST(GeneratorTest, Shuffle){
    const int NumberOfElements = 50;
    std::stringstream buffer_A;
    std::stringstream buffer_B;
    Generator::generate(buffer_A, NumberOfElements);
    Generator::generate(buffer_B, NumberOfElements);
    EXPECT_NE(buffer_A.str(), buffer_B.str());
}
```
#### 求和校验
与前面的测试相比,这是一个大体量的测试。它检查 1 到 n 的数值序列的和与乱序重排后的序列的和是否相等。 `generate(...)` 函数应该生成一个 1 到 n 的乱序的序列,这个序列的和应当是不变的。
```
TEST(GeneratorTest, CheckSum){
    const int NumberOfElements = 50;
    int nChecksum_in = 0;
    int nChecksum_out = 0;
    std::vector<int> vNumbersRef(NumberOfElements); // Input vector
    std::iota(vNumbersRef.begin(), vNumbersRef.end(), 1); // Populate vector
    // Calculate reference checksum
    for(const int n : vNumbersRef){
        nChecksum_in += n;
    }
    std::stringstream buffer;
    Generator::generate(buffer, NumberOfElements);
    std::vector<int> vNumbersGen; // Output vector
    std::string s_no;
    // Read the buffer back back to the output vector
    while(std::getline(buffer, s_no, ' ')) {
        vNumbersGen.push_back(std::stoi(s_no));
    }
    // Calculate output checksum
    for(const int n : vNumbersGen){
        nChecksum_out += n;
    }
    EXPECT_EQ(nChecksum_in, nChecksum_out);
}
```
你可以像对一般 C++ 程序一样调试这些测试。
### CTest
除了嵌入到代码中的测试之外,[CTest][6] 提供了可执行程序的测试方式。简而言之就是通过给可执行程序传入特定的参数,然后用 [正则表达式][13] 对它的输出进行匹配检查。通过这种方式可以很容易检查程序对于不正确的命令行参数的反应。这些测试定义在顶层的 [CMakeLists.txt][14] 文件中。下面我详细介绍 3 个测试用例:
#### 参数正常
如果输入参数是一个正整数,程序应该输出应该是一个数列:
```
add_test(NAME RegularUsage COMMAND Producer 10)
set_tests_properties(RegularUsage
    PROPERTIES PASS_REGULAR_EXPRESSION "^[0-9 ]+"
)
```
#### 没有提供参数
如果没有传入参数,程序应该立即退出并提示错误原因:
```
add_test(NAME NoArg COMMAND Producer)
set_tests_properties(NoArg
    PROPERTIES PASS_REGULAR_EXPRESSION "^Enter the number of elements as argument"
)
```
#### 参数错误
当传入的参数不是整数时,程序应该退出并报错。比如给 `Producer` 传入参数 `ABC`
```
add_test(NAME WrongArg COMMAND Producer ABC)
set_tests_properties(WrongArg
    PROPERTIES PASS_REGULAR_EXPRESSION "^Error: Cannot parse"
)
```
#### 执行测试
可以使用 `ctest -R Usage -VV` 命令来执行测试。这里给 `ctest` 的命令行参数:
* `-R <测试名称>` : 执行单个测试
* `-VV`:打印详细输出
测试执行结果如下:
```
$ ctest -R Usage -VV
UpdatecTest Configuration from :/home/stephan/Documents/cpp_testing sample/build/DartConfiguration.tcl
UpdateCTestConfiguration from :/home/stephan/Documents/cpp_testing sample/build/DartConfiguration.tcl
Test project /home/stephan/Documents/cpp_testing sample/build
Constructing a list of tests
Done constructing a list of tests
Updating test list for fixtures
Added 0 tests to meet fixture requirements
Checking test dependency graph...
Checking test dependency graph end
```
在这里我执行了名为 `Usage` 的测试。
它以无参数的方式调用 `Producer`
```
test 3
    Start 3: Usage
3: Test command: /home/stephan/Documents/cpp testing sample/build/Producer
```
输出不匹配 `[^[0-9]+]` 的正则模式,测试未通过。
```
3: Enter the number of elements as argument
1/1 test #3. Usage ................
Failed Required regular expression not found.
Regex=[^[0-9]+]
0.00 sec round.
0% tests passed, 1 tests failed out of 1
Total Test time (real) =
0.00 sec
The following tests FAILED:
3 - Usage (Failed)
Errors while running CTest
$
```
如果想要执行所有测试(包括那些用 GoogleTest 生成的),切换到 `build` 目录中,然后运行 `ctest` 即可:
![CTest run][15]
在 VSCodium 中可以通过点击信息栏的黄框处来调用 CTest。如果所有测试都通过了你会看到如下输出
![VSCodium][16]
### 使用 Git 钩子进行自动化测试
目前为止,运行测试是开发者需要额外执行的步骤,那些不能通过测试的代码仍然可能被提交和推送到代码仓库中。利用 [Git 钩子][17] 可以自动执行测试,从而防止有瑕疵的代码被提交。
切换到 `.git/hooks` 目录,创建 `pre-commit` 文件,复制粘贴下面的代码:
```
#!/usr/bin/sh
(cd build; ctest --output-on-failure -j6)
```
然后,给文件增加可执行权限:
```
$ chmod +x pre-commit
```
这个脚本会在提交之前调用 CTest 进行测试。如果有测试未通过,提交过程就会被终止:
![Commit failed][18]
只有所有测试都通过了,提交过程才会完成:
![Commit succeeded][19]
这个机制也有一个漏洞:可以通过 `git commit --no-verify` 命令绕过测试。解决办法是配置构建服务器,这能保证只有正常工作的代码才能被提交,但这又是另一个话题了。
### 总结
本文提到的技术实施简单并且能够帮你快速发现代码中的问题。做单元测试可以提高代码质量同时也不会打断你的工作流。GoogleTest 框架提供了丰富的特性以应对各种测试场景,文中我所提到的只是一小部分而已。如果你想进一步了解 GoogleTest我推荐你阅读 [GoogleTest Primer][20]。
*题图MJ/f212ce43-b60b-4005-b70d-8384f2ba5860*
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/1/unit-testing-googletest-ctest
作者:[Stephan Avenwedde][a]
选题:[lujun9972][b]
译者:[toknow-gh](https://github.com/toknow-gh)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/hansic99
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/todo_checklist_team_metrics_report.png?itok=oB5uQbzf (Team checklist and to dos)
[2]: https://linux.cn/article-14249-1.html
[3]: https://vscodium.com/
[4]: https://cmake.org/
[5]: https://github.com/google/googletest
[6]: https://cmake.org/cmake/help/latest/manual/ctest.1.html
[7]: https://github.com/hANSIc99/cpp_testing_sample
[8]: https://opensource.com/sites/default/files/cpp_unit_test_vscodium_tag.png (VSCodium tag)
[9]: https://github.com/hANSIc99/cpp_testing_sample/blob/main/Generator/GeneratorTest.cpp
[10]: https://github.com/hANSIc99/cpp_testing_sample/blob/main/Generator/Generator.cpp
[11]: https://en.cppreference.com/w/cpp/io/basic_stringstream
[12]: https://en.cppreference.com/w/cpp/memory/addressof
[13]: https://en.wikipedia.org/wiki/Regular_expression
[14]: https://github.com/hANSIc99/cpp_testing_sample/blob/main/CMakeLists.txt
[15]: https://opensource.com/sites/default/files/cpp_unit_test_ctest_run.png (CTest run)
[16]: https://opensource.com/sites/default/files/cpp_unit_test_ctest_vscodium.png (VSCodium)
[17]: https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks
[18]: https://opensource.com/sites/default/files/cpp_unit_test_git_hook_commit_failed.png (Commit failed)
[19]: https://opensource.com/sites/default/files/cpp_unit_test_git_hook_commit_succeeded.png (Commit succeeded)
[20]: https://google.github.io/googletest/primer.html
[0]: https://img.linux.net.cn/data/attachment/album/202308/02/111508h0848o0oi03nih3p.jpg

View File

@ -0,0 +1,141 @@
[#]: subject: "Fedora Linux editions part 2: Spins"
[#]: via: "https://fedoramagazine.org/fedora-linux-editions-part-2-spins/"
[#]: author: "Arman Arisman https://fedoramagazine.org/author/armanwu/"
[#]: collector: "lkxed"
[#]: translator: "ChatGPT"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-16058-1.html"
Fedora Linux 的家族(二):定制版
======
![][0]
使用 Linux 的一个好处是可以选择多种不同的桌面环境。Fedora Linux 官方的 Workstation 版本默认使用 GNOME 作为桌面环境,但是你可以通过 Fedora <ruby>定制版<rt>Spin</rt></ruby> 选择另一个桌面环境作为默认环境。本文将更详细地介绍 Fedora Linux 定制版。你可以在我之前的文章《[Fedora Linux 的各种版本][4]》中找到所有 Fedora Linux 变体的概述。
### KDE Plasma 桌面
这个 Fedora Linux 定制版使用 KDE Plasma 作为默认的桌面环境。KDE Plasma 是一个优雅的桌面环境,非常易于定制。因此,你可以根据自己的喜好自由地定制桌面的外观。你可以定制你喜欢的主题,安装所需的小部件,更换图标、字体,根据个人喜好定制面板,并从社区安装各种扩展功能。
Fedora Linux KDE Plasma 桌面预装了许多常用的应用程序。你可以使用 Firefox、Kontact、Telepathy、KTorrent 和 KGet 上网。LibreOffice、Okular、Dolphin 和 Ark 可满足你的办公需求。而针对多媒体需求,该版本提供了 Elisa、Dragon Player、K3B 和 GwenView 等多个应用程序。
![Fedora KDE Plasma Desktop][5]
更多信息请参考以下链接:
> **[Fedora Linux KDE Plasma 桌面][6]**
### XFCE 桌面
这个版本非常适合那些希望在外观定制和性能之间取得平衡的用户。XFCE 本身被设计为快速轻巧,但仍具有吸引人的外观。这个桌面环境逐渐受到老旧设备用户的欢迎。
Fedora Linux XFCE 安装了多种适合日常需求的应用程序,包括 Firefox、Pidgin、Gnumeric、AbiWord、Ristretto、Parole 等。Fedora Linux XFCE 还提供了一个系统设置菜单,让你更轻松地配置 Fedora Linux。
![Fedora XFCE Desktop][7]
更多信息请访问此链接:
> **[Fedora Linux XFCE 桌面][8]**
### LXQT 桌面
这个版本带有一个轻量级的 Qt 桌面环境,专注于现代经典的桌面体验,而不会降低系统性能。这个 Fedora Linux 版本包含基于 Qt5 工具包的应用程序,并采用 Breeze 主题。你可以通过内置的应用程序如 QupZilla、QTerminal、FeatherPad、qpdfview、Dragon Player 等来进行各种日常活动。
![Fedora LXQt Desktop][9]
更多信息请访问此链接:
> **[Fedora Linux LXQT 桌面][10]**
### MATE-Compiz 桌面
Fedora Linux MATE Compiz 桌面是 MATE 和 Compiz Fusion 的组合。MATE 桌面环境使这个 Fedora Linux 版本能够通过优先考虑生产力和性能来发挥最佳效果。同时Compiz Fusion 使用 Emerald 和 GTK+ 主题为系统提供了美观的 3D 外观。这个 Fedora Linux 版本还配备了各种流行的应用程序,如 Firefox、LibreOffice、Parole、FileZilla 等。
![Fedora Mate-Compiz Desktop][11]
更多信息请访问此链接:
> **[Fedora Linux MATE Compiz 桌面][12]**
### Cinnamon 桌面
由于其用户友好的界面Fedora Linux Cinnamon 桌面非常适合那些可能对 Linux 操作系统不太熟悉的用户。你可以轻松理解如何使用这个 Fedora Linux 版本。这个定制版内置了各种准备好供你日常使用的应用程序,如 Firefox、Pidgin、GNOME Terminal、LibreOffice、Thunderbird、Shotwell 等。你可以使用 Cinnamon 设置应用来配置你的操作系统。
![Fedora Cinnamon Desktop][13]
更多信息请访问此链接:
> **[Fedora Linux Cinnamon 桌面][14]**
### LXDE 桌面
Fedora Linux LXDE 桌面拥有一个快速运行的桌面环境但设计旨在保持低资源使用。这个定制版专为低配置硬件设计如上网本、移动设备和旧电脑。Fedora Linux LXDE 配备了轻量级和流行的应用程序,如 Midori、AbiWord、Osmo、Sylpheed 等。
![Fedora LXDE Desktop][15]
更多信息请访问此链接:
> **[Fedora Linux LXDE 桌面][16]**
### SoaS 桌面
SoaS 是 “Sugar on a Stick” 的缩写。Fedora Linux Sugar 桌面是一个面向儿童的学习平台,因此它具有非常简单的界面,易于儿童理解。这里的 “stick” 是指一个随身驱动器或存储“棒”。这意味着这个操作系统体积紧凑,可以完全安装在一个随身 U 盘上。学童可以将他们的操作系统携带在随身 U 盘上这样他们可以在家、学校、图书馆和其他地方轻松使用。Fedora Linux SoaS 拥有各种有趣的儿童学习应用程序,如 Browse、Get Books、Read、Turtle Blocks、Pippy、Paint、Write、Labyrinth、Physic 和 FotoToon。
![Fedora SOAS Desktop][17]
更多信息请访问此链接:
> **[Fedora Linux Sugar 桌面][18]**
### i3 Tiling WM
Fedora Linux 的 i3 Tiling WM 定制版与其他不太相同。这个 Fedora Linux 定制版不使用桌面环境,而只使用窗口管理器。所使用的窗口管理器是 i3它是 Linux 用户中非常受欢迎的平铺式窗口管理器。Fedora i3 定制版适用于那些更注重使用键盘进行交互而非鼠标或触摸板的用户。这个 Fedora Linux 定制版配备了各种应用程序,如 Firefox、NM Applet、brightlight、azote、htop、mousepad 和 Thunar。
![Fedora i3 Tiling WM][19]
更多信息请访问此链接:
> **[Fedora Linux i3 Tiling WM][20]**
### 结论
Fedora Linux 通过 Fedora Linux 定制版提供了大量的桌面环境选择。你只需选择一个 Fedora 定制版,即可享受你选择的桌面环境以及其内置的即用应用程序。你可以在 [https://spins.fedoraproject.org/][21] 找到关于 Fedora 定制版的完整信息。
*题图MJ/6e7ea0c7-ccbe-4664-af60-61345a7c6617*
--------------------------------------------------------------------------------
via: https://fedoramagazine.org/fedora-linux-editions-part-2-spins/
作者:[Arman Arisman][a]
选题:[lkxed][b]
译者ChatGPT
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://fedoramagazine.org/author/armanwu/
[b]: https://github.com/lkxed
[1]: https://fedoramagazine.org/wp-content/uploads/2022/06/FedoraMagz-FedoraEditions-2-Spins-816x345.png
[2]: https://unsplash.com/@fredericp?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
[3]: https://unsplash.com/s/photos/blue-abstract?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
[4]: https://linux.cn/article-15003-1.html
[5]: https://fedoramagazine.org/wp-content/uploads/2022/08/screenshot-kde.jpg
[6]: https://spins.fedoraproject.org/en/kde/
[7]: https://fedoramagazine.org/wp-content/uploads/2022/08/screenshot-xfce.jpg
[8]: https://spins.fedoraproject.org/en/xfce/
[9]: https://fedoramagazine.org/wp-content/uploads/2022/08/screenshot-lxqt.jpg
[10]: https://spins.fedoraproject.org/en/lxqt/
[11]: https://fedoramagazine.org/wp-content/uploads/2022/08/screenshot-matecompiz.jpg
[12]: https://spins.fedoraproject.org/en/mate-compiz/
[13]: https://fedoramagazine.org/wp-content/uploads/2022/08/screenshot-cinnamon.jpg
[14]: https://spins.fedoraproject.org/en/cinnamon/
[15]: https://fedoramagazine.org/wp-content/uploads/2022/08/screenshot-lxde.jpg
[16]: https://spins.fedoraproject.org/en/lxde/
[17]: https://fedoramagazine.org/wp-content/uploads/2022/08/screenshot-soas.jpg
[18]: https://spins.fedoraproject.org/en/soas/
[19]: https://fedoramagazine.org/wp-content/uploads/2022/08/screenshot-i3.jpg
[20]: https://spins.fedoraproject.org/en/i3/
[21]: https://spins.fedoraproject.org/
[0]: https://img.linux.net.cn/data/attachment/album/202308/02/233442w4abj6pjpbfb5t4j.jpg

View File

@ -0,0 +1,64 @@
[#]: subject: "Is your old computer 'obsolete', or is it a Linux opportunity?"
[#]: via: "https://opensource.com/article/22/10/obsolete-computer-linux-opportunity"
[#]: author: "Phil Shapiro https://opensource.com/users/pshapiro"
[#]: collector: "lkxed"
[#]: translator: "wcjjdlhws"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-16061-1.html"
你的旧电脑是 “过时” 了,还是使用 Linux 的机会?
======
![][0]
> 很多时候,老旧的电脑往往被打上 “过时” 的标签。Linux 改变了这一现状。翻新旧电脑,让它重新为需要它的人所用。
你可能经常听到有人说某个电脑、平板电脑或智能手机 “过时了”。当你听到这样的说法时,花一分钟问问自己:“这个人说的是个人观点还是事实?”
很多时候他们的陈述是主观观点。让我解释一下为什么。
当有人说一台电脑 “过时” 时,他们往往是从自己的角度出发的。因此,如果你是一名专业技术人员,一台使用了五年的电脑可能确实已经过时。但对于一个逃离战争或饥荒的难民家庭来说,这台五年前的电脑过时了吗?可能不会。对你来说过时的电脑,对别人来说可能是梦寐以求的电脑。
### 我是如何用 Linux 翻新旧电脑的
我在这方面有些经验。在过去的 25 年里,我一直把老旧电脑带给那些没有电脑的人。我的一名二年级学生,由祖母抚养长大,五年前从斯坦福大学毕业了。另一位学生,我在 2007 年给他送去了一台布满灰尘的 Windows XP 台式机,去年她从耶鲁大学毕业。这两名学生都利用捐赠的电脑实现了自我发展。后一位学生在中学毕业前,打字速度就超过了每分钟 50 个单词。我把捐赠电脑送到她家时,她还在读三年级,当时她的家庭还负担不起网络服务。因此,她有效地利用时间学习触摸打字技巧。我在这个 [YouTube 视频][2] 中记录了她的故事。
我再分享一件连我自己都难以相信的轶事。几年前,我在 eBay 上花 20 美元买了一台戴尔笔记本电脑。这台笔记本电脑是 2002 年的顶级笔记本电脑。我在上面安装了 Linux Mint并添加了一个 USB WiFi 适配器,这台笔记本电脑就这样重生了。我把这个故事记录在 YouTube 视频中,名为 “[我的 20 美元 eBay 笔记本电脑][3]”。
在视频中,你可以看到这台笔记本电脑正在上网。它的速度并不快,但比我们在 20 世纪 90 年代末使用的拨号上网电脑要快得多。我会将其描述为功能正常。有人可以用这台 2002 年的笔记本电脑撰写博士论文。论文读起来就像用昨天发布的电脑写的一样好。这台笔记本电脑应该摆放在公共场所,让人们近距离看到 2002 年的电脑仍然可以使用。眼见为实。这难道不是真理吗?
那么 2008 年、2009 年和 2010 年那些著名的 “上网本” 怎么样?它们肯定已经过时了吧?没那么快了吧!如果你在它们身上安装 32 位 Linux它们就可以使用最新版本的 Chromium 网页浏览器上网冲浪,而 Chromium 浏览器仍然支持 32 位操作系统(不过谷歌 Chrome 浏览器不再支持 32 位操作系统)。使用这些上网本的学生可以观看<ruby>可汗学院<rt>Khan Academy</rt></ruby>的视频,使用<ruby>谷歌文档<rt>Google Docs</rt></ruby>提高写作能力。将这些上网本连接到更大的液晶屏幕上,学生就可以使用 [LibreOffice Draw][4] 或 [Inkscape][5] 这两个我最喜欢的开源图形程序来提高技能。如果你感兴趣,我有一个 [使用 Linux 重振上网本的视频][6]。上网本也非常适合邮寄到海外,比如利比里亚的学校、海地的医院、索马里的食品分发点,或者其他任何捐赠技术可以发挥巨大作用的地方。
你知道翻新的上网本在哪里会受到欢迎吗?在那些向乌克兰难民敞开心扉和家园的社区。他们在尽自己的一份力量,我们也应该尽自己的一份力量。
### 开源让老旧电脑重获新生
许多技术专业人士生活在特权的泡沫中。当他们宣称某项技术 “过时” 时,可能并没有意识到他们把这种观点当作事实所造成的伤害。不了解开源如何让旧电脑重新焕发生机的人,正在宣判这些电脑的死刑。面对这种情况,我不会袖手旁观。你也不应该袖手旁观。
对于宣称电脑过时的人,一个简单的回答是:“有时旧电脑可以重获新生。我听说开源就是一种方法。”
如果你很了解对方,不妨分享本文列出的一些 YouTube 视频链接。如果有机会,请花点时间去见见那些无法获得所需技术的个人或家庭。这次会面将以你意想不到的方式丰富你的生活。
*题图MJ/cfd05206-dae4-4b14-a50c-38f2da342c95*
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/10/obsolete-computer-linux-opportunity
作者:[Phil Shapiro][a]
选题:[lkxed][b]
译者:[wcjjdlhws](https://github.com/wcjjdlhws)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/pshapiro
[b]: https://github.com/lkxed
[1]: https://opensource.com/sites/default/files/lead-images/retro_old_unix_computer.png
[2]: https://www.youtube.com/watch?v=Ao_vOijz14U
[3]: https://www.youtube.com/watch?v=UZiN6nm-PUU
[4]: https://opensource.com/tags/libreoffice
[5]: https://opensource.com/downloads/inkscape-cheat-sheet
[6]: https://www.youtube.com/watch?v=GBYEclpvyGQ
[0]: https://img.linux.net.cn/data/attachment/album/202308/04/093718ftdhh22hn00y9411.jpg

View File

@ -0,0 +1,179 @@
[#]: subject: "Our favorite markup languages for documentation"
[#]: via: "https://opensource.com/article/22/12/markup-languages-documentation"
[#]: author: "Opensource.com https://opensource.com/users/admin"
[#]: collector: "lkxed"
[#]: translator: "ChatGPT"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-16073-1.html"
你喜欢哪种文档标记语言?
======
![][0]
> 文档对于开源软件项目至关重要。我们询问了我们的贡献者,他们在文档编写中最喜欢使用的标记语言是什么。
文档很重要,而易读的文档更重要。在开源软件世界中,文档可以告诉我们如何使用或贡献一个应用程序,就像 [游戏][1] 的规则书一样。
有很多不同类型的文档:
- 教程
- 操作指南
- 参考指南
- 软件架构
- 产品手册
我们向一些贡献者询问了他们的技术文档工作流程,他们更喜欢使用哪种标记语言,以及为什么会选择其中一种。以下是他们的回答。
### AsciiDoc
过去几年中,[Markdown][2] 一直是我的标准语言。但最近我决定尝试一下 [AsciiDoc][3] 。这种语法并不难,我在 Linux 桌面上的 [Gedit][4] 就支持它。我计划暂时坚持使用它一段时间。
—- [Alan Formy-Duval][5]
就低语法标记语言而言,我更喜欢 AsciiDoc。我喜欢它是因为其转换过程一致且可预测没有令人困惑的“口味”变化 。我还喜欢将它输出为 [Docbook][6],这是一种我信任其持久性和灵活性的标记语言,它有大量的语法标记。
但“正确”的选择往往取决于项目已经在使用什么。如果项目使用某种口味的 Markdown我就不会使用 AsciiDoc。嗯公平地说我可能会使用 AsciiDoc然后使用 Pandoc 将其转换为草莓味的 Markdown。
当然,我认为 Markdown 有其应用的时间和场合。我发现它比 AsciiDoc 更易读。AsciiDoc 中的链接是这样:
```
http://example.com [Example website]
```
而 Markdown 中的链接是这样:
```
[Example.com](http://example.com)
```
Markdown 的语法直观,以读取 HTML 的方式呈现信息大多数人都以相同的方式解析此类数据“Example website……哦那是蓝色的文本我将悬停一下以查看它指向哪里……它指向 [example.com][7]”)。
换句话说,当我的受众是人类读者时,我通常会选择 Markdown因为它的语法简单但仍具有足够的语法可以进行转换因此仍然是一种可接受的存储格式。
虽然像 AsciiDoc 这样简洁的语法看起来更令人吃惊,但如果我的受众是要解析文件的计算机,我会选择 AsciiDoc。
—- [Seth Kenlon][8]
### reStructuredText
我是 [代码即文档][9] 的忠实支持者,它将开发者工具融入到内容流程中。这样可以更轻松地进行高效的审查和协作,尤其是如果工程师是贡献者。
作为一个标记语言的行家,我在 O'Reilly 写了整整一本关于 AsciiDoc 的书,还使用 Markdown 在各个平台上发布了上千篇博文。但目前,我转向使用 [reStructuredText][10],并维护一些相关工具。
—— [Lorna Mitchell][11]
不得不提到 reStructuredText。在我大量使用 Python 编程时,它已成为我的首选。它也是 Python 长期以来用于文档源码和代码注释的标准。
与 Markdown 相比,我喜欢它不会受到非标准规范的困扰。话虽如此,当我处理更复杂的文档时,确实还得使用许多 Sphinx 的功能和扩展。
—— [Jeremy Stanley][12]
### HTML
能不用标记语言我就不用。
不过,我发现 HTML 比其他标记语言更易于使用。
—— [Rikard Grossman-Nielsen][13]
对我来说,撰写文档有各种方式。这取决于文档将要放在何处,是作为网站的一部分、软件包的一部分,还是可下载的内容。
对于 [Scribus][14] 来说,其内部文档采用 HTML 格式,因为需要使用内部浏览器来访问。对于网站,可能需要使用维基语言。而对于可下载的内容,可以创建 PDF 或 EPUB 格式。
我倾向于在纯文本编辑器中编写文档。我可能会使用 XHTML以便将这些文件导入到像 Sigil 这样的 EPUB 制作工具中。当然,对于创建 PDF我会使用 Scribus虽然我可能会导入用文本编辑器创建的文本文件。Scribus 具有包含图形并精确控制其布局的优势。
Markdown 从未吸引我,我也从未尝试过 AsciiDoc。
—— [Greg Pittman][15]
我目前正在使用 HTML 撰写大量文档,所以我要为 HTML 代言一下。你可以使用 HTML 创建网站或创建文档。请注意,这两者实际上并不相同 —— 当你创建网站时,大多数设计师关注的是呈现。但是当你编写文档时,技术作者应该专注于内容。
当我用 HTML 撰写文档时,我遵循 HTML 定义的标签和元素,并不关心它的外观。换句话说,我用“未经样式化”的 HTML 编写文档。稍后我总是可以添加样式表。因此,如果我需要强调文本的某一部分(比如警告),或者给单词或短语加重语气,我可能会使用 `<strong>``<em>` 标签,像这样:
```
<p><strong>警告:激光!</strong>不要用你剩下的那只眼睛看向激光。</p>
```
或者在段落中提供一个简短的代码示例,我可能会这样写:
```
<p><code>puts</code> 函数将一些文本输出给用户。</p>
```
要在文档中格式化一段代码块,我使用 `<pre><code>..</code></pre>`,如下所示:
```
void
print_array(int *array, int size)
{
for (int i = 0; i < size; i++) {
printf("array[%d] = %d\n", i, array[i]);
}
}
```
HTML 的好处在于你可以立即在任何 Web 浏览器中查看结果。而你使用未经样式化的 HTML 编写的任何文档都可以通过添加样式表来美化。
—— [Jim Hall][16]
### 意料之外的答案LibreOffice
在上世纪 80/90 年代,当我在 System V Unix、SunOS最后是 Solaris 上工作时,我使用了 `nroff`、`troff` 和最终的 `groff``mm` 宏。你可以了解一下使用 `groff_mm` 的 MM前提是你已经安装了它们
MM 并不是真正的标记语言,但它感觉像是。它是一套非常语义化的 troff 和 groff 宏。它具备标记语言用户所期望的大多数功能,如标题、有序列表等等。
我的第一台 Unix 机器上也安装了 “Writers' Workbench”这对我们组织中需要撰写技术报告但没有特别进行“引人入胜”写作的许多人来说是一个福音。它的一些工具已经进入了 BSD 或 Linux 环境比如样式style、用词检查diction和外观look
我还记得早在上世纪 90 年代初期Solaris 附带了一个标准通用标记语言SGML工具也可能是我们购买了这个工具。我曾经使用它一段时间这可能解释了为什么我不介意手动输入 HTML。
我使用过很多 Markdown我应该说是“哪种 Markdown”因为它有无数种风格和功能级别。正因为如此我并不是 Markdown 的铁杆粉丝。我想,如果我有很多 Markdown 要处理,我可能会尝试使用一些 [CommonMark][17] 的实现,因为它实际上有一个正式的定义。例如,[Pandoc][18] 支持 CommonMark以及其他几种
我开始使用 AsciiDoc相比于 Markdown我更喜欢 AsciiDoc因为它避免了“你使用的是哪个版本”的讨论并提供了许多有用的功能。过去让我对 AsciiDoc 感到困扰的是,有一段时间似乎需要安装 Asciidoctor这是一个我不太想安装的 Ruby 工具链。但是现在,在我所用的 Linux 发行版中有了更多的实现方式。奇怪的是Pandoc 可以输出 AsciiDoc但不支持读取 AsciiDoc。
那些嘲笑我不愿意为 AsciiDoc 安装 Ruby 工具链,却乐意安装 Pandoc 的 Haskell 工具链的人……我听到你们的笑声了。
我羞愧地承认,我现在主要使用 LibreOffice。
——[Chris Hermansen][19]
### 现在就编写文档吧!
文档编写可以通过多种不同的途径来完成,正如这里的作者们展示的那样。对于代码的使用方法,特别是在开源领域,进行文档编写非常重要。这确保其他人能够正确地使用和贡献你的代码。同时,告诉未来的用户你的代码提供了什么也是明智之举。
*题图MJ/9543e029-322d-479f-b609-442abc036b73*
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/12/markup-languages-documentation
作者:[Opensource.com][a]
选题:[lkxed][b]
译者ChatGPT
校对:[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/lkxed
[1]: https://opensource.comttps://opensource.com/life/16/11/software-documentation-tabletop-gaming
[2]: https://opensource.com/article/19/9/introduction-markdown
[3]: https://opensource.com/article/22/8/drop-markdown-asciidoc
[4]: https://opensource.com/%20https%3A//opensource.com/article/20/12/gedit
[5]: https://opensource.com/users/alanfdoss
[6]: https://opensource.com/article/17/9/docboo
[7]: http://example.com/
[8]: https://opensource.com/users/seth
[9]: https://opensource.com/article/22/10/docs-as-code
[10]: https://opensource.com/article/19/11/document-python-sphinx
[11]: https://opensource.com/users/lornajane
[12]: https://opensource.com/users/fungi
[13]: https://opensource.com/users/rikardgn
[14]: https://opensource.com/article/21/12/desktop-publishing-scribus
[15]: https://opensource.com/users/greg-p
[16]: https://opensource.com/users/jim-hall
[17]: https://commonmark.org/
[18]: https://opensource.com/downloads/pandoc-cheat-sheet
[19]: https://opensource.com/users/clhermansen
[0]: https://img.linux.net.cn/data/attachment/album/202308/07/225101z4leseqq9zbhn3hh.jpg

View File

@ -0,0 +1,93 @@
[#]: subject: "Linux Jargon Buster: What is LUKS Encryption?"
[#]: via: "https://itsfoss.com/luks/"
[#]: author: "Bill Dyer https://itsfoss.com/author/bill/"
[#]: collector: "lkxed"
[#]: translator: "ChatGPT"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-16068-1.html"
Linux 黑话解析:什么是 LUKS 加密?
======
![][0]
> LUKS 是 Linux 用户中流行的磁盘加密机制。在这篇术语解析文章中,可以了解更多关于 LUKS 的信息。
计算机安全旨在保护私密信息。有许多方法可以保护系统。一些用户使用简单的用户名/密码登录方案进行基本保护。其他用户可能会通过加密以不同的方式增加额外的保护,如使用 VPN 和磁盘加密。
如果你的计算机上有敏感的客户数据(你可能在经营一家企业),或被视为知识产权的材料,或者你对隐私非常谨慎,你可能要考虑磁盘加密。
磁盘加密的一些好处包括:
- 保护系统免受黑客的攻击
- 防止数据泄露
- 保护你免受潜在的责任问题
磁盘加密软件可以防止台式机硬盘驱动器、便携式 USB 存储设备或笔记本电脑被访问,除非用户输入正确的身份验证数据。如果你的笔记本电脑丢失或被盗,加密会保护磁盘上的数据。
如今,新的 Windows 系统默认配备了 BitLocker 加密。在 Linux 上LUKS 是最常用的磁盘加密方式。
想知道什么是 LUKS我会为你简要介绍这个主题。
### 技术术语
在继续之前需要定义一些术语。LUKS 有很多内容,因此将其拆解为细项将有助于你进一步了解。
<ruby><rt>Volume</rt></ruby>:卷是一个逻辑存储区域,可用于存储数据。在磁盘加密的场景中卷指的是已加密以保护其内容的磁盘部分。
<ruby>参数<rt>Parameters</rt></ruby>:参数是控制加密算法运行方式的设置。参数可能包括所使用的加密算法、密钥大小以及有关如何执行加密的其他详细信息。
<ruby>加密类型<rt>Cipher type</rt></ruby>**:它是指用于加密的数学算法。它指的是用于保护加密卷上数据的具体加密算法。
<rt>密钥大小<rt>Key size</rt></ruby>:密钥大小是衡量加密算法强度的指标:密钥大小越大,加密强度越高。通常以位数表示,例如 128 位加密或 256 位加密。
<ruby>头部<rt>Header</rt></ruby>:头部是加密卷开头的特殊区域,包含有关加密的信息,例如所使用的加密算法和加密密钥。
下一个定义对于新手来说可能有些棘手,但了解它还是很重要的,尤其在处理 LUKS 时,这会非常有用。
<ruby>容器<rt>Container</rt></ruby>:容器是一个特殊的文件,类似于虚拟加密卷。它可以用于存储加密数据,就像加密分区一样。不同之处在于容器是一个文件,可以存储在未加密的分区上,而加密分区是整个磁盘的一部分,已经完全加密。因此,容器是 _充当虚拟加密卷的文件_
### LUKS 是什么以及它能做什么?
LUKS<ruby>[Linux 统一密钥设置][1]<rt>Linux Unified Key Setup</rt></ruby>)是由 Clemens Fruhwirth 在 2004 年创建的磁盘加密规范,最初用于 Linux。它是一种知名的、安全的、高性能的磁盘加密方法基于改进版本的 [cryptsetup][2],使用 [dm-crypt][3] 作为磁盘加密后端。LUKS 也是网络附加存储NAS设备中常用的加密格式。
LUKS 还可以用于创建和运行加密容器。加密容器具有与 LUKS 全盘加密相同的保护级别。LUKS 还提供多种加密算法、多种加密模式和多种哈希函数,有 40 多种可能的组合。
![LUKS 结构示意图][4]
任何文件系统都可以进行加密,包括交换分区。加密卷的开头有一个未加密的头部,它允许存储多达 8 个LUKS1或 32 个LUKS2加密密钥以及诸如密码类型和密钥大小之类的加密参数。
这个头部的存在是 LUKS 和 dm-crypt 的一个重要区别,因为头部允许使用多个不同的密钥短语,并能轻松更改和删除它们。然而,值得提醒的是,如果头部丢失或损坏,设备将无法解密。
LUKS 有两个版本LUKS2 具有更强的头部损坏抗击性,并默认使用 [Argon2][5] 加密算法LUKS1 使用 [PBKDF2][6])。在某些情况下,可以在两个版本之间进行转换,但是 LUKS1 可能不支持某些功能。
### 希望了解更多信息?
希望本文有助于你对 LUKS 和加密有一些了解。关于使用 LUKS 创建和使用加密分区的确切步骤会因个人需求而异,因此我不会在此处涵盖安装和设置方面的内容。
如果你想要一份指南来帮助你设置 LUKS可以在这篇文章中找到一个很好的指南《[使用 LUKS 对 Linux 分区进行基本加密指南][7]》。如果你对此还不熟悉,并且想要尝试使用 LUKS可以在虚拟机或闲置计算机上进行安全学习以了解其工作原理。
*题图MJ/2c6b83e6-4bcb-4ce3-a49f-3cb38caad7d2*
--------------------------------------------------------------------------------
via: https://itsfoss.com/luks/
作者:[Bill Dyer][a]
选题:[lkxed][b]
译者ChatGPT
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/bill/
[b]: https://github.com/lkxed/
[1]: https://en.wikipedia.org/wiki/Linux_Unified_Key_Setup?ref=its-foss
[2]: https://www.tutorialspoint.com/unix_commands/cryptsetup.htm?ref=its-foss
[3]: https://www.kernel.org/doc/html/latest/admin-guide/device-mapper/dm-crypt.html?ref=its-foss
[4]: https://itsfoss.com/content/images/2023/03/luks-schematic-diagram.png
[5]: https://www.argon2.com/?ref=its-foss
[6]: https://en.wikipedia.org/wiki/PBKDF2?ref=its-foss
[7]: https://linuxconfig.org/basic-guide-to-encrypting-linux-partitions-with-luks?ref=its-foss
[0]: https://img.linux.net.cn/data/attachment/album/202308/05/230710ioll6lxm11mrtl8l.jpg

View File

@ -0,0 +1,203 @@
[#]: subject: "Shell Scripting is Still Going Strong"
[#]: via: "https://www.opensourceforu.com/2022/05/shell-scripting-is-still-going-strong/"
[#]: author: "Bipin Patwardhan https://www.opensourceforu.com/author/bipin-patwardhan/"
[#]: collector: "lkxed"
[#]: translator: "ChatGPT"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-16049-1.html"
探索 Shell 脚本的威力
======
> 本文章向你介绍了 Shell 脚本的基础知识以及其在日常生活中的重要性。
![][0]
当我们登录到一个 UNIX/Linux 系统时,我们首先注意到的是闪烁的光标和 `$` 符号之间的空格。这就是 Shell交互界面。多年来它一直是一种无处不在有时甚至是唯一的与计算机交互的界面。在图形用户界面GUI出现和流行之前终端和 Shell 是唯一的机制,可以让计算机按照我们的意图进行操作。乍一看,我们可能会想知道 Shell 的作用,除了将命令传递给底层操作系统以进行执行之外。我们中的大多数人熟悉像 `ls`(用于列出目录内容),`cd`(用于更改当前目录)等命令。通过 Shell我们可以执行这些命令。Shell 理解我们输入的文本 - 将其转换为标记 - 然后在操作系统上执行这些标记。
### 不同的 Shell 变种
最初,终端使用了朴素的 Bourne Shell即 Sh。多年来许多不同的 Shell 变种被开发出来和使用。其中一些流行的包括 C ShellCsh 和 Korn ShellKsh。Sh 在一段时间内不再受欢迎,但通过其最新的化身 —— Bourne Again ShellBash它再次流行起来。
### Shell 实际上是做什么的?
Shell 是操作系统OS和用户之间的直接接口。通过使用命令和应用程序来使用计算机上安装的工具我们可以使计算机按照我们的意愿工作。一些命令是安装在操作系统上的应用程序而某些命令则是直接内置在 Shell 中的。在 Bash 中内置的一些命令包括 `clear`、`cd`、`eval` 和 `exec`,还有 `ls``mkdir` 这样的应用程序。内置在 Shell 中的命令因 Shell 而异。
在本文中,我们将涵盖与 Bash 相关的几个方面。
### 更多关于 Shell 的内容
我们中的大多数人都用过像 `ls`、`cd` 和 `mkdir` 这样的命令。当我们在一个目录上运行 `ls -l` 命令时,该目录中的所有子目录和文件都会在屏幕上列出。如果数量很大,屏幕会滚动。如果终端不支持滚动条(在很多年里都是如此),则无法查看已滚动过的条目。为了克服这个问题,我们使用像 `more``less` 这样的命令。它们允许我们逐页查看输出。通常使用的命令是:
```
ls -l | less
```
在这里 Shell 是在做什么?看起来像是单个命令,实际上是 `ls``less` 两个命令依次执行。管道符(`|`)将这两个程序连接起来,但连接由 Shell 管理。由于有了管道符Shell 连接了这两个程序——它将 `ls` 命令的标准输出连接到 `less` 的标准输入stdin。管道功能使我们能够将任何程序的输出作为另一个程序的输入提供而无需对程序进行任何更改。这是许多 UNIX/Linux 应用程序的理念——保持应用程序简单,然后将许多应用程序组合在一起以实现最终结果,而不是让一个程序做很多事情。
如果需要,我们可以将 `ls` 的输出重定向到文件中,然后使用 `vi` 查看它。为此,我们使用以下命令:
```
ls -l > /tmp/my_file.txt
vi /tmp/my_file.txt
```
在这种情况下,`ls` 的输出被重定向到一个文件中。这由 Shell 进行管理,它理解 `>` 符号表示重定向。它将其后面的标记视为文件。
### 使用 Shell 自动化
结合命令的能力是使用 Shell 命令创建自动化脚本的关键要素之一。在我最近的项目中,我们使用集群模式执行 Python/SparkPySpark应用程序。每个应用程序执行了许多结构化查询语言SQL语句 - SparkSQL。为了跟踪应用程序的进展我们会打印有关正在执行的 SQL 的详细信息。这样可以让我们保留应用程序中正在发生的情况的日志。由于应用程序在集群模式下执行,要查看日志,我们必须使用以下 `yarn` 命令:
```
yarn log applicationId [application_id]
```
在大多数情况下,应用程序生成的日志非常大。因此,我们通常将日志导入到 `less` 中,或将其重定向到一个文件中。我们使用的命令是:
```
yarn log aplicationId [application_id] | less
```
我们的开发团队有 40 人。每个人都必须记住这个命令。为了简化操作,我将这个命令转换成了一个 Bash 脚本。为此,我创建了一个以 `.sh` 为扩展名的文件。在 UNIX 和 Linux 系统上,文件扩展名并不重要。只要文件是可执行的,它就能工作。扩展名在 MS Windows 上有意义。
### 需要记住的重要事项
Shell 是一个解释器。这意味着它会逐行读取程序并执行它。这种方法的限制在于错误(如果有)在事先无法被识别。直到解释器读取和执行它们时,错误才会被识别出来。简而言之,假如我们有一个在前 20 行完美执行,但在第 21 行由于语法错误而失败的 Shell 程序。当脚本在第 21 行失败时Shell 不会回滚/撤销之前的步骤。当发生这样的情况时,我们必须纠正脚本并从第一行开始执行。因此,例如,如果在遇到错误之前删除了几个文件,脚本的执行将停止,而文件将永远消失。
我创建的脚本是:
```
#!/bin/bash
yarn log applicationId 123 | less
```
…其中 123 是应用程序的 ID。
第一行的前两个字符是特殊字符(“释伴”)。它们告诉脚本这是一个可执行文件,并且该行包含要用于执行的程序的名称。脚本的其余行传递给所提到的程序。在这个例子中,我们将执行 Bash。即使包含了第一行我们仍然必须使用以下命令对文件应用执行权限
```
chmod +x my_file.sh
```
在给文件设置了执行权限之后,我们可以如下执行它:
```
./my_file.sh
```
如果我们没有给文件设置执行权限,我们可以使用以下命令执行该脚本:
```
sh ./my_file.sh
```
### 传递参数
你很快就会意识到,这样的脚本很方便,但立即变得无用。每次执行 Python/Spark 应用程序时,都会生成一个新的 ID。因此对于每次运行我们都必须编辑文件并添加新的应用程序 ID。这无疑降低了脚本的可用性。为了提高其可用性我们应该将应用程序 ID 作为参数传递:
```
#!/bin/bash
yarn log -applicationId ${1} | less
```
我们需要这样执行脚本:
```
./show_log.sh 123
```
脚本将执行 `yarn` 命令,获取应用程序的日志并允许我们查看它。
如果我们想将输出重定向到一个文件中怎么办?没问题。我们可以将输出重定向到一个文件而不是发送给 `less`
```
#!/bin/bash
ls l ${1} > ${2}
view ${2}
```
要运行脚本,我们需要提供两个参数,命令变为:
```
./my_file.sh /tmp /tmp/listing.txt
```
当执行时,`$1` 将绑定到 `/tmp``$2` 将绑定到 `/tmp/listing.txt`。对于 Shell参数从一到九命名。这并不意味着我们不能将超过九个参数传递给脚本。我们可以但这是另一篇文章的主题。你会注意到我将参数命名为 `${1}``${2}`,而不是 `$1``$2`。将参数名称封闭在花括号中是一个好习惯,因为它使我们能够无歧义地将参数作为较长变量的一部分组合起来。例如,我们可以要求用户将文件名作为参数,并使用它来形成一个更大的文件名。例如,我们可以将 `$1` 作为参数,创建一个新的文件名为 `${1}_student_names.txt`
### 使脚本更健壮
如果用户忘记提供参数怎么办Shell 允许我们检查这种情况。我们将脚本修改如下:
```
#!/bin/bash
if [ -z "${2}" ]; then
echo "file name not provided"
exit 1
fi
if [ -z "${1}" ]; then
echo "directory name not provided"
exit 1
fi
DIR_NAME=${1}
FILE_NAME=${2}
ls -l ${DIR_NAME} > /tmp/${FILE_NAME}
view /tmp/${FILE_NAME}
```
在这个程序中,我们检查是否传递了正确的参数。如果未传递参数,我们将退出脚本。你会注意到,我以相反的顺序检查参数。如果我们在检查第一个参数存在之前检查第二个参数的存在,如果只传递了一个参数,脚本将进行到下一步。虽然可以按递增顺序检查参数的存在,但我最近意识到,从九到一检查会更好,因为我们可以提供适当的错误消息。你还会注意到,参数已分配给变量。参数一到九是位置参数。将位置参数分配给具名参数可以在出现问题时更容易调试脚本。
### 自动化备份
我自动化的另一个任务是备份。在开发的初期阶段,我们没有使用版本控制系统。但我们需要有一个机制来定期备份。因此,最好的方法是编写一个 Shell 脚本,在执行时将所有代码文件复制到一个单独的目录中,将它们压缩,并使用日期和时间作为后缀来上传到 HDFS。我知道这种方法不如使用版本控制系统那样清晰因为我们存储了完整的文件查找差异仍然需要使用像 `diff` 这样的程序;但它总比没有好。尽管我们最终没有删除代码文件,但团队确实删除了存储助手脚本的 `bin` 目录!!!而且对于这个目录,我没有备份。我别无选择,只能重新创建所有的脚本。
一旦建立了源代码控制系统,我很容易将备份脚本扩展到除了之前上传到 HDFS 的方法之外,还可以将文件上传到版本控制系统。
### 总结
如今,像 Python、Spark、Scala 和 Java 这样的编程语言很受欢迎,因为它们用于开发与人工智能和机器学习相关的应用程序。尽管与 Shell 相比,这些语言更强大,但“不起眼”的 Shell 提供了一个即用即得的平台让我们能够创建辅助脚本来简化我们的日常任务。Shell 是相当强大的尤其是因为我们可以结合操作系统上安装的所有应用程序的功能。正如我在我的项目中发现的那样即使经过了几十年Shell 脚本仍然非常强大。我希望我已经说服你尝试一下了。
### 最后一个例子
Shell 脚本确实非常方便。考虑以下命令:
```
spark3-submit --queue pyspark --conf "spark.yarn.principal=abcd@abcd.com" --conf "spark.yarn.keytab=/keytabs/abcd.keytab" --jars /opt/custom_jars/abcd_1.jar --deploy-mode cluster --master yarn $*
```
我们要求在执行 Python/Spark 应用程序时使用此命令。现在想象一下,这个命令必须每天被一个由 40 个人组成的团队多次使用。大多数人会在记事本中复制这个命令,每次需要使用时,会将其从记事本中复制并粘贴到终端中。如果复制粘贴过程中出现错误怎么办?如果有人错误使用了参数怎么办?我们如何调试使用的是哪个命令?查看历史记录并没有太多帮助。
为了让团队能够简单地执行 Python/Spark 应用程序,我们可以创建一个 Bash Shell 脚本,如下所示:
```
#!/bin/bash
SERVICE_PRINCIPAL=abcd@abcd.com
KEYTAB_PATH=/keytabs/abcd.keytab
MY_JARS=/opt/custom_jars/abcd_1.jar
MAX_RETRIES=128
QUEUE=pyspark
MASTER=yarn
MODE=cluster
spark3-submit --queue ${QUEUE} --conf "spark.yarn.principal=${SERVICE_PRINCIPAL}" --conf "spark.yarn.keytab=${KEYTAB_PATH}" --jars ${MY_JARS} --deploy-mode ${MODE} --master ${MASTER} $*
```
这展示了一个 Shell 脚本的强大之处,让我们的生活变得简单。根据你的需求,你可以尝试更多的命令和脚本,并进一步探索。
*题图MJ/f32880e8-0cdc-4897-8a1c-242c131111bf*
--------------------------------------------------------------------------------
via: https://www.opensourceforu.com/2022/05/shell-scripting-is-still-going-strong/
作者:[Bipin Patwardhan][a]
选题:[lkxed][b]
译者ChatGPT
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.opensourceforu.com/author/bipin-patwardhan/
[b]: https://github.com/lkxed
[1]: https://www.opensourceforu.com/wp-content/uploads/2022/05/Penguin-with-linux-command.jpg
[0]: https://img.linux.net.cn/data/attachment/album/202307/31/070953kv0kdvld33h55uk5.jpg

View File

@ -0,0 +1,93 @@
[#]: subject: "Fedora Linux editions part 1: Official Editions"
[#]: via: "https://fedoramagazine.org/fedora-linux-editions-part-1-official-editions/"
[#]: author: "Arman Arisman https://fedoramagazine.org/author/armanwu/"
[#]: collector: "lkxed"
[#]: translator: "ChatGPT"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-16050-1.html"
Fedora Linux 的家族(一):官方版本
======
![][0]
Fedora Linux 提供了多个变体以满足你的需求。你可以在我之前的文章《[Fedora Linux 的各种版本][4]》中找到所有 Fedora Linux 变体的概述。本文将对 Fedora Linux 官方版本进行更详细的介绍。共有五个 <ruby>版本<rt>Edition</rt></ruby> Fedora Workstation、Fedora Server、Fedora IoT、Fedora CoreOS 和 Fedora Silverblue。Fedora Linux 下载页面目前显示其中三个为 *官方* 版本,另外两个为 *新兴* 版本。本文将涵盖所有五个版本。
### Fedora Workstation
如果你是笔记本电脑或台式计算机用户,则 Fedora Workstation 是适合你的操作系统。Fedora Workstation 非常易于使用。你可以用它满足日常工作、教育、爱好等需求。例如,你可以使用它创建文档,制作演示文稿,上网冲浪,处理图像,编辑视频等等。
这个 Fedora Linux 版本默认使用 GNOME 桌面环境。你可以使用这种环境舒适地工作和进行各种活动。你还可以根据个人喜好自定义 Fedora Workstation 的外观,让你在使用过程中更加舒适。如果你是 Fedora Workstation 的新用户,你可以阅读我之前的文章 [在安装 Fedora Workstation 之后要做的事][5]。通过该文章,你将更容易上手 Fedora Workstation。
更多信息请参阅以下链接:
> **[Fedora Workstation][6]**
### Fedora Server
许多公司需要自己的服务器来支持基础设施。Fedora Server 版操作系统配备了一个强大的基于 Web 的管理界面称为 Cockpit具有现代化的外观。Cockpit 可以让你轻松查看和监控系统性能和状态。
Fedora Server 包含一些开源世界中的最新技术,并得到一个活跃的社区的支持。它非常稳定可靠。然而,并不保证 Fedora 社区中的任何人都能够在你遇到问题时提供帮助。如果你运行的是关键任务的应用程序,并且可能需要技术支持,你可能要考虑使用 [Red Hat Enterprise Linux][7]。
更多信息请访问以下链接:
> **[Fedora Server][9]**
### Fedora IoT
为物联网设备专门设计的操作系统越来越受欢迎。Fedora IoT 就是为了应对这一需求而创建的操作系统。Fedora IoT 是一个不可变操作系统,使用 OSTree 技术来进行原子更新。该操作系统专注于物联网设备的安全性这非常重要。Fedora IoT 支持多种架构。它还配备了一个基于 Web 的配置控制台,因此可以在不需要键盘、鼠标或监视器物理连接到设备的情况下进行远程配置。
更多信息请访问以下链接:
> **[Fedora IoT][10]**
### Fedora CoreOS
Fedora CoreOS 是一个面向容器的操作系统。该操作系统用于在任何环境中安全可靠地运行应用程序。它设计用于集群,但也可以作为独立系统运行。该操作系统与 Linux 容器配置具有高度兼容性。
更多信息请访问以下链接:
> **[Fedora CoreOS][11]**
### Fedora Silverblue
这个版本是 Fedora Workstation 的一个变体界面并没有太大区别。但是Fedora Silverblue 是一个不可变的操作系统,采用以容器为中心的工作流程。这意味着每个安装的副本与同一版本的其他副本完全相同。其目标是使其更加稳定,更少出现错误,并更容易进行测试和开发。
更多信息请访问以下链接:
> **[Fedora Silverblue][12]**
### 结论
Fedora Linux 的每个版本都有不同的目的。多个版本的可用性可以帮助你获得适合你需求的操作系统。本文讨论的 Fedora Linux 版本是在 Fedora Linux 的主要下载页面上提供的操作系统。你可以在 [https://getfedora.org/][13] 找到下载链接和更完整的文档说明。
*题图MJ/90ffba71-aee2-4429-a846-41f06997792c*
--------------------------------------------------------------------------------
via: https://fedoramagazine.org/fedora-linux-editions-part-1-official-editions/
作者:[Arman Arisman][a]
选题:[lkxed][b]
译者ChatGPT
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://fedoramagazine.org/author/armanwu/
[b]: https://github.com/lkxed
[1]: https://fedoramagazine.org/wp-content/uploads/2022/04/FedoraMagz-FedoraEditions-1-Official-816x345.png
[2]: https://unsplash.com/@fredericp?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
[3]: https://unsplash.com/s/photos/blue-abstract?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
[4]: https://fedoramagazine.org/introduce-the-different-fedora-linux-editions/
[5]: https://fedoramagazine.org/things-to-do-after-installing-fedora-34-workstation/
[6]: https://getfedora.org/en/workstation/
[7]: https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux
[8]: https://getfedora.org/en/server/
[9]: https://getfedora.org/en/server/
[10]: https://getfedora.org/en/iot/
[11]: https://getfedora.org/en/coreos?stream=stable
[12]: https://silverblue.fedoraproject.org/
[13]: https://getfedora.org/
[0]: https://img.linux.net.cn/data/attachment/album/202307/31/091317uqdzd48u2nuqdt26.jpg

View File

@ -0,0 +1,265 @@
[#]: subject: "7 Git tips for technical writers"
[#]: via: "https://opensource.com/article/22/11/git-tips-technical-writers"
[#]: author: "Maximilian Kolb https://opensource.com/users/kolb"
[#]: collector: "lkxed"
[#]: translator: "ChatGPT"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-16044-1.html"
专为技术写作人员提供的 7 条 Git 技巧
=====
![][0]
> 跟随这个演示来了解我如何使用 Git 为 Foreman 编写文档。
作为 [ATIX][1] 的技术作家,我的任务包括为 [Foreman][2] 创建和维护存放在 [github.com/theforeman/foreman-documentation][3] 的文档。Git 帮助我跟踪内容的版本,并与开源社区进行协作。它是我存储工作成果、共享和讨论改进的重要工具。我主要使用的工具包括浏览器、用 OpenSSH 连接 Foreman 实例、用 [Vim][4] 编辑源文件,以及使用 Git 进行版本控制。
本文重点介绍在开始使用 Git 和为 Foreman 文档做贡献时经常遇到的挑战。适用于中级 Git 用户。
### 先决条件
- 你已在系统上安装和配置了 Git。你至少需要设置用户名和电子邮件地址。
- 你在 [github.com][5] 上拥有一个帐户。GitHub 本身并不是一个开源项目,但它是许多开源 Git 存储库的托管站点(包括 Foreman 的文档)。
- 你已将 [foreman-documentation][3] 存储库复刻到你自己的账户或组织(例如,`github.com/<My_User_Account>/foreman-documentation`,这里 `<My_User_Account>` 是你的 GitHub 用户名)。有关更多信息,请参阅 Kedar Vijay Kulkarni 的 [Kedar Vijay Kulkarni 的 Git 逐步指南][6]。
- 你已将你的 SSH 公钥添加到 GitHub。这是将你的更改推送到 GitHub 所必需的。有关更多信息,请参阅 Nicole C. Baratta 的《[GitHub 简单指引][7]》。
### 对 Foreman 文档做出贡献
Foreman 是一个开源项目,依靠社区的贡献而发展壮大。该项目欢迎所有人的参与,并且只有一些要求才能做出有意义的贡献。这些要求和惯例在 [README.md][8] 和 [CONTRIBUTING.md][9] 文件中有详细记录。
以下是在处理 Foreman 文档时最常见的一些任务。
#### 我想开始贡献 Foreman 文档
1、从 github.com 克隆存储库:
```
$ git clone git@github.com:theforeman/foreman-documentation.git
$ cd foreman-documentation/
```
2、重命名远程存储库
```
$ git remote rename origin upstream
```
3、可选确保你的本地主分支跟踪 theforeman 组织的 `foreman-documentation` 存储库的 `master` 分支:
```
$ git status
```
这将自动将你置于默认分支(本例中为 `master`)的最新提交上。
4、如果你的账户或组织中尚未有该存储库的 <ruby>复刻<rt>Fork</rt></ruby>,请创建一个。前往 [github.com/theforeman/foreman-documentation][3] 并点击 “<ruby>复刻<rt>Fork</rt></ruby>” 按钮。
5、将你的复刻添加到你的存储库中
```
$ git remote add github git@github.com:<My_User_Account>/foreman-documentation.git
```
你的本地存储库现在有两个远程存储库:`upstream` 和 `github`
#### 我想扩展 Foreman 文档
对于简单的更改比如修正拼写错误你可以直接创建一个拉取请求PR
1、创建一个分支例如 `fix_spelling`。`git switch` 命令用于切换当前所在的分支,`-c` 参数用于创建分支:
```
$ git switch -c fix_spelling
```
2、进行你的更改。
3、添加你的更改并进行提交
```
$ git add guides/common/modules/abc.adoc
$ git commit -m "Fix spelling of existing"
```
良好的 Git 提交消息的重要性无需再强调。提交消息告诉贡献者你做了哪些工作,因为它与代码库的其余部分一起保存,所以它在查看代码时起到历史注释的作用,帮助了解代码的演化过程。有关优秀的 Git 提交消息的更多信息,请参阅由 cbeams 撰写的 《[创建完美的 Git 提交信息的 7 条规则][10]》。
4、可选但建议的操作查看并验证与默认分支的差异。`foreman-documentation` 的默认分支称为 `master`,但其他项目可能有不同的命名(例如 `main`、`dev` 或 `devel`)。
```
$ git diff master
```
5、将分支推送到 GitHub。这将发布你的更改到你的代码库副本
```
$ git push --set-upstream github fix_spelling
```
6、点击终端中 Git 提供的链接来创建一个拉取请求PR
```
remote: Create a pull request for 'fix_spelling' on Github by visiting:
remote: https://github.com/_My_User_Account_/foreman-documentation/pull/new/fix_spelling
```
7、在解释中说明社区*为什么*应该接受你的更改。对于修正拼写错误等简单 PR这并不是必需的但对于重大更改则很重要。
#### 我想将我的分支变基到 master
1、确保你的本地 `master` 分支跟踪的是 [github.com/theforeman/foreman-documentation][3] 的 `master` 分支,而不是你自己命名空间下的 `foreman-documentation`
```
$ git switch master
```
此时应该显示 `Your branch is up to date with 'upstream/master'`,其中 `upstream` 是指向 `github.com/theforeman/foreman-documentation` 的远程存储库的名称。你可以通过运行 `git remote -v` 来查看远程存储库设置情况。
2、从远程获取可能的更改。`git fetch` 命令会从远程下载被跟踪的分支,并且使用 `--all` 选项可以同时更新所有分支。在使用其他分支时这是必要的。`--prune` 选项会删除对已不存在的分支的引用。
```
$ git fetch --all --prune
```
3、将可能的更改从 `upstream/master` 拉取到你的本地 `master` 分支。`git pull` 命令将跟踪的分支上的提交复制到当前分支。这用于将你的本地 `master` 分支“更新”为远程(在本例中为 GitHub`master` 分支的最新状态。
```
$ git pull
```
4、将你的分支 <ruby>变基<rt>rebase</rt></ruby>`master`
```
$ git switch my_branch
$ git rebase -i master
```
#### 我在 master 分支上意外地提交了代码
1、创建一个分支来保存你的工作
```
$ git switch -c my_feature
```
2、切换回 `master` 分支:
```
$ git switch master
```
3、回退 `master` 分支上的最后一次提交:
```
$ git reset --soft HEAD~1
```
4、切换回 `my_feature` 分支并继续工作:
```
$ git switch my_feature
```
#### 我想修改我的提交消息
1、如果你的分支只有一次提交可以使用 `git amend` 来修改你的最后一次提交:
```
$ git commit --amend
```
这假设你没有将其他文件添加到暂存区(即,没有运行过 `git add My_File`,并且没有进行提交)。
2、使用 `--force` 选项将你的 “更改” 推送到 GitHub因为 Git 提交消息是你现有提交的一部分,所以你正在更改分支上的历史记录:
```
$ git push --force
```
#### 我想重新整理单个分支上的多个更改
1、可选但强烈推荐从 GitHub 获取更改。
```
$ git switch master
$ git fetch
$ git pull
```
这确保你将其他更改按照它们被合并到 `master` 中的顺序直接合并到你的分支中。
2、若要重新整理你的工作请对你的分支进行变基并根据需要进行更改。对于将分支变基到 `master`,这意味着你需要更改你的分支上第一个提交的父提交:
```
$ git rebase --interactive master
```
使用你喜欢的编辑器打开变基交互界面,将第一个单词 `pick` 替换为你要修改的提交。
- 使用 `e` 来对你的提交进行实际更改。这会中断你的变基操作!
- 使用 `f` 将一个提交与其父提交合并。
- 使用 `d` 完全删除一个提交。
- 移动行以改变你更改的顺序。
成功进行变基后,你自己的提交将位于 `master` 上最后一个提交的顶部。
#### 我想从其他分支复制一个提交
1、从稳定分支例如名为 `3.3` 的分支)获取提交的 ID请使用 `-n` 选项限制提交数量:
```
$ git log -n 5 3.3
```
2、通过挑选提交来复制更改到你的分支。`-x` 选项将提交的 ID 添加到你的提交消息中。这仅建议在从稳定分支挑选提交时使用:
```
$ git switch My_Branch
$ git cherry-pick -x Commit_ID
```
### 更多技巧
在 ATIX我们运行一个 [GitLab][11] 实例,用于内部共享代码、协作以及自动化测试和构建。对于围绕 Foreman 生态系统的开源社区,我们依赖于 GitHub。
我建议你始终将名为 `origin` 的远程指向你的*内部的*版本控制系统。这样做可以防止在纯粹凭记忆进行 `git push` 时向外部服务泄露信息。
此外,我建议使用固定的命名方案来命名远程。我总是将指向自己的 GitLab 实例的远程命名为 `origin`,将指向开源项目的远程命名为 `upstream`,将指向我在 Github 上的复刻的远程命名为 `github`
对于 `foreman-documentation`,该存储库具有相对较平的历史记录。当处理更复杂结构时,我倾向于以非常可视化的方式思考 Git 存储库,其中节点(提交)指向线上的节点(分支),这些分支可以交织在一起。图形化工具如 `gitk` 或 [Git Cola][12] 可以帮助可视化你的 Git 历史记录。一旦你完全掌握了 Git 的工作原理,如果你更喜欢命令行,可以使用别名。
在进行具有大量预期合并冲突的大型变基之前,我建议创建一个“备份”分支,以便你可以快速查看差异。请注意,要永久删除提交是相当困难的,因此在进行重大更改之前,请在本地 Git 存储库中进行测试。
### Git 对技术文档编写者的帮助
Git 对技术文档编写者来说是一个巨大的帮助。不仅可以使用 Git 对文档进行版本控制,还可以与他人积极地进行协作。
*题图MJ/1fb1dd43-e460-4e76-9ff6-b6ef76570f7e*
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/11/git-tips-technical-writers
作者:[Maximilian Kolb][a]
选题:[lkxed][b]
译者ChatGPT
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/kolb
[b]: https://github.com/lkxed
[1]: https://atix.de/en/
[2]: https://opensource.com/article/17/8/system-management-foreman
[3]: https://github.com/theforeman/foreman-documentation
[4]: https://opensource.com/resources/what-vim
[5]: https://github.com/
[6]: https://opensource.com/article/18/1/step-step-guide-git
[7]: https://opensource.com/life/15/11/short-introduction-github
[8]: https://github.com/theforeman/foreman-documentation/blob/master/guides/README.md#contribution-guidelines
[9]: https://github.com/theforeman/foreman-documentation/blob/master/CONTRIBUTING.md#contributing-to-foreman-documentation
[10]: https://cbea.ms/git-commit/#seven-rules
[11]: https://about.gitlab.com/
[12]: https://opensource.com/article/20/3/git-cola
[0]: https://img.linux.net.cn/data/attachment/album/202307/29/082043e587yilezk45ayin.jpg

View File

@ -3,22 +3,26 @@
[#]: author: "Will Cohen https://opensource.com/users/wcohen"
[#]: collector: "lkxed"
[#]: translator: "jrglinux"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-16033-1.html"
GDB以及其他调试器如何通过调用帧信息来确定函数调用关系
GDB 调试器如何通过调用帧信息来确定函数调用关系
======
在我的[上一篇文章][1]中,我展示了如何使用 debuginfo 在当前指令指针 (IP) 和包含它的函数或行之间进行映射。 该信息对于显示 CPU 当前正在执行的代码很有帮助。 不过,如果能显示更多的有关当前函数调用栈及其正在执行语句的上下文对我们定位问题来说也是十分有助的。
![][0]
例如,将空指针作为参数传递到函数中而导致非法内存访问的问题, 只需查看当前执行函数行即可发现该错误是由尝试通过空指针进行访问而触发的。 但是,若真正知道导致空指针访问的函数调用的完整上下文,便确定该空指针最初是如何传递到该函数中的。 此上下文信息由回溯提供,并允许您确定哪些函数可能对空指针参数负责。
> 从调试器中获取函数调用关系。
在我的 [上一篇文章][1] 中,我展示了如何使用 `debuginfo` 在当前指令指针IP和包含它的函数或行之间进行映射。该信息对于显示 CPU 当前正在执行的代码很有帮助。不过,如果能显示更多的有关当前函数调用栈及其正在执行语句的上下文对我们定位问题来说也是十分有助的。
例如,将空指针作为参数传递到函数中而导致非法内存访问的问题,只需查看当前执行函数行,即可发现该错误是由尝试通过空指针进行访问而触发的。但是,你真正想知道的是导致空指针访问的函数调用的完整上下文,以便确定该空指针最初是如何传递到该函数中的。此上下文信息由回溯提供,可以让你确定哪些函数可能对空指针参数负责。
有一点是肯定的:确定当前活动的函数调用栈不是一项简单的操作。
### 函数激活记录
现代编程语言具有局部变量,并允许函数可以调用自身的递归。 此外,并发程序具有多个线程,这些线程可能同时运行相同的函数。 在这些情况下,局部变量不能存储在全局位置。 对于函数的每次调用,局部变量的位置必须是唯一的。 它的工作原理如下:
现代编程语言具有局部变量,并允许函数可以调用自身的递归。此外,并发程序具有多个线程,这些线程可能同时运行相同的函数。在这些情况下,局部变量不能存储在全局位置。对于函数的每次调用,局部变量的位置必须是唯一的。它的工作原理如下:
- 每次调用函数时,编译器都会生成函数激活记录,以将局部变量存储在唯一位置。
- 为了提高效率,处理器堆栈用于存储函数激活记录。
@ -26,29 +30,29 @@ GDB以及其他调试器如何通过调用帧信息来确定函数调用关系
- 如果该函数调用另一个函数,则新的函数激活记录将放置在现有函数激活记录之上。
- 每次函数返回时,其函数激活记录都会从堆栈中删除。
函数激活记录的创建是由函数中称为序言的代码创建的。 函数激活记录的删除由函数尾声处理。 函数体可以利用堆栈上为其预留的内存来存储临时值和局部变量。
函数激活记录的创建是由函数中称为<ruby>序言<rt>prologue</rt></ruby>的代码创建的。函数激活记录的删除由函数<ruby>尾声<rt>epilogue</rt></ruby>处理。函数体可以利用堆栈上为其预留的内存来存储临时值和局部变量。
函数激活记录的大小可以是可变的。 对于某些函数,不需要空间来存储局部变量。 理想情况下,函数激活记录只需要存储调用_this_函数的函数的返回地址。 对于其他函数,除了返回地址之外,可能还需要大量空间来存储函数的本地数据结构。 帧大小的可变导致编译器使用帧指针来跟踪函数激活帧的开始。函数序言代码具有在为当前函数创建新帧指针之前存储旧帧指针的额外任务,并且函数尾声必须恢复旧帧指针值。
函数激活记录的大小可以是可变的。对于某些函数,不需要空间来存储局部变量。理想情况下,函数激活记录只需要存储调用 _该_ 函数的函数的返回地址。对于其他函数,除了返回地址之外,可能还需要大量空间来存储函数的本地数据结构。帧大小的可变导致编译器使用帧指针来跟踪函数激活帧的开始。函数序言代码具有在为当前函数创建新帧指针之前存储旧帧指针的额外任务,并且函数尾声必须恢复旧帧指针值。
函数激活记录的布局方式、调用函数的返回地址和旧帧指针是相对于当前帧指针的恒定偏移量。 通过旧的帧指针,可以定位堆栈上下一个函数的激活帧。 重复此过程,直到检查完所有功能激活记录为止。
函数激活记录的布局方式、调用函数的返回地址和旧帧指针是相对于当前帧指针的恒定偏移量。通过旧的帧指针,可以定位堆栈上下一个函数的激活帧。重复此过程,直到检查完所有函数激活记录为止。
### 优化复杂性
在代码中使用显式帧指针有几个缺点。 在某些处理器上,可用的寄存器相对较少。 具有显式帧指针会导致使用更多内存操作。 生成的代码速度较慢,因为帧指针必须位于寄存器中。 具有显式帧指针可能会限制编译器可以生成的代码,因为编译器可能不会将函数序言和尾代码与函数体混合。
在代码中使用显式帧指针有几个缺点。在某些处理器上,可用的寄存器相对较少。具有显式帧指针会导致使用更多内存操作。生成的代码速度较慢,因为帧指针必须位于寄存器中。具有显式帧指针可能会限制编译器可以生成的代码,因为编译器可能不会将函数序言和尾代码与函数体混合。
编译器的目标是尽可能生成快速代码,因此编译器通常会从生成的代码中省略帧指针。 正如 [Phoronix 的基准测试][2] 所示,保留帧指针会显着降低性能。 不过省略帧指针也有缺点,查找前一个调用函数的激活帧和返回地址不再是相对于帧指针的简单偏移。
编译器的目标是尽可能生成快速代码,因此编译器通常会从生成的代码中省略帧指针。正如 [Phoronix 的基准测试][2] 所示,保留帧指针会显着降低性能。不过省略帧指针也有缺点,查找前一个调用函数的激活帧和返回地址不再是相对于帧指针的简单偏移。
### 调用帧信息
为了帮助生成函数回溯,编译器包含 DWARF 调用帧信息 (CFI) 来重建帧指针并查找返回地址。 此补充信息存储在执行的 `.eh_frame` 部分中。 与传统的函数和行位置信息的 debuginfo 不同,即使生成的可执行文件没有调试信息,或者调试信息已从文件中删除,`.eh_frame` 部分也位于可执行文件中。 调用帧信息对于 C++ 中的 **throw-catch** 等语言结构的操作至关重要。
为了帮助生成函数回溯,编译器包含 DWARF 调用帧信息CFI来重建帧指针并查找返回地址。此补充信息存储在执行的 `.eh_frame` 部分中。与传统的函数和行位置信息的 `debuginfo` 不同,即使生成的可执行文件没有调试信息,或者调试信息已从文件中删除,`.eh_frame` 部分也位于可执行文件中。 调用帧信息对于 C++ 中的 `throw-catch` 等语言结构的操作至关重要。
CFI 的每个功能都有一个帧描述条目 (FDE)。 作为其步骤之一,回溯生成过程为当前正在检查的激活帧找到适当的 FDE。 将 FDE 视为一张表,每一行代表一个或多个指令,并具有以下列:
CFI 的每个功能都有一个帧描述条目FDE作为其步骤之一,回溯生成过程为当前正在检查的激活帧找到适当的 FDE。将 FDE 视为一张表,每一行代表一个或多个指令,并具有以下列:
- 规范帧地址CFA帧指针指向的位置
- 返回地址
- 有关其他寄存器的信息
FDE 的编码旨在最大限度地减少所需的空间量。 FDE 描述了行之间的变化,而不是完全指定每一行。 为了进一步压缩数据,多个 FDE 共有的起始信息被分解出来并放置在通用信息条目 (CIE) 中。 这使得 FDE 更加紧凑,但也需要更多的工作来计算实际的 CFA 并找到返回地址位置。 该工具必须从未初始化状态启动。 它逐步遍历 CIE 中的条目以获取函数条目的初始状态,然后从 FDE 的第一个条目开始继续处理 FDE并处理操作直到到达覆盖当前正在分析的指令指针的行。
FDE 的编码旨在最大限度地减少所需的空间量。FDE 描述了行之间的变化,而不是完全指定每一行。为了进一步压缩数据,多个 FDE 共有的起始信息被分解出来并放置在通用信息条目CIE中。 这使得 FDE 更加紧凑,但也需要更多的工作来计算实际的 CFA 并找到返回地址位置。该工具必须从未初始化状态启动。它逐步遍历 CIE 中的条目以获取函数条目的初始状态,然后从 FDE 的第一个条目开始继续处理 FDE并处理操作直到到达覆盖当前正在分析的指令指针的行。
### 调用帧信息使用实例
@ -81,7 +85,7 @@ int main (int argc, char *argv[])
$ gcc -O2 -g -o f2c f2c.c
```
`.eh_frame` 部分展示如下:
`.eh_frame` 部分展示如下:
```
$ eu-readelf -S f2c |grep eh_frame
@ -124,11 +128,11 @@ $ objdump -d f2c > f2c.dis
DW_CFA_nop
```
本示例中,不必担心增强或增强数据条目。 由于 x86_64 处理器具有 1 到 15 字节大小的可变长度指令,因此 "代码对齐因子" 设置为 1。在只有 32 位4 字节指令)的处理器上,"代码对齐因子" 设置为 4并且允许对一行状态信息适用的字节数进行更紧凑的编码。 类似地,还有 "数据对齐因子" 来使 CFA 所在位置的调整更加紧凑。 在 x86_64 上,堆栈槽的大小为 8 个字节。
本示例中,不必担心增强或增强数据条目。由于 x86_64 处理器具有 1 到 15 字节大小的可变长度指令,因此 “代码对齐因子” 设置为 1。在只有 32 位4 字节指令)的处理器上,“代码对齐因子” 设置为 4并且允许对一行状态信息适用的字节数进行更紧凑的编码。类似地还有 “数据对齐因子” 来使 CFA 所在位置的调整更加紧凑。在 x86_64 上,堆栈槽的大小为 8 个字节。
虚拟表中保存返回地址的列是 16。这在 CIE 尾部的指令中使用。 有四个 `DW_CFA` 指令。 第一条指令 `DW_CFA_def_cfa` 描述了如果代码具有帧指针如何计算帧指针将指向的规范帧地址CFA。 在这种情况下CFA 是根据 `r7 (rsp)``CFA=rsp+8` 计算的。
虚拟表中保存返回地址的列是 16。这在 CIE 尾部的指令中使用。 有四个 `DW_CFA` 指令。第一条指令 `DW_CFA_def_cfa` 描述了如果代码具有帧指针如何计算帧指针将指向的规范帧地址CFA。 在这种情况下CFA 是根据 `r7 (rsp)``CFA=rsp+8` 计算的。
第二条指令 `DW_CFA_offset` 定义从哪里获取返回地址 `CFA-8` 在这种情况下,返回地址当前由堆栈指针 `(rsp+8)-8` 指向。 CFA 从堆栈返回地址的正上方开始。
第二条指令 `DW_CFA_offset` 定义从哪里获取返回地址 `CFA-8` 。在这种情况下,返回地址当前由堆栈指针 `(rsp+8)-8` 指向。CFA 从堆栈返回地址的正上方开始。
CIE 末尾的 `DW_CFA_nop` 进行填充以保持 DWARF 信息的对齐。 FDE 还可以在末尾添加填充以进行对齐。
@ -143,7 +147,7 @@ CIE 末尾的 `DW_CFA_nop` 进行填充以保持 DWARF 信息的对齐。 FDE
DW_CFA_nop
```
在执行函数中的第一条指令之前CIE 描述调用帧状态。 然而,当处理器执行函数中的指令时,细节将会改变。 首先,指令 `DW_CFA_advance_loc``DW_CFA_def_cfa_offset``main``401060` 处的第一条指令匹配。 这会将堆栈指针向下调整 `0x18`24 个字节)。 CFA 没有改变位置,但堆栈指针改变了,因此 CFA 在 `401064` 处的正确计算是 `rsp+32`。 这就是这段代码中序言指令的范围。 以下是 `main` 中的前几条指令:
在执行函数中的第一条指令之前CIE 描述调用帧状态。然而,当处理器执行函数中的指令时,细节将会改变。 首先,指令 `DW_CFA_advance_loc``DW_CFA_def_cfa_offset``main``401060` 处的第一条指令匹配。 这会将堆栈指针向下调整 `0x18`24 个字节)。 CFA 没有改变位置,但堆栈指针改变了,因此 CFA 在 `401064` 处的正确计算是 `rsp+32`。 这就是这段代码中序言指令的范围。 以下是 `main` 中的前几条指令:
```
0000000000401060 <main>:
@ -151,7 +155,7 @@ CIE 末尾的 `DW_CFA_nop` 进行填充以保持 DWARF 信息的对齐。 FDE
401064: bf 1b 20 40 00 mov $0x40201b,%edi
```
`DW_CFA_advance_loc` 使当前行应用于函数中接下来的 50 个字节的代码,直到 `401096` CFA 位于 `rsp+32`,直到 `401092` 处的堆栈调整指令完成执行。 `DW_CFA_def_cfa_offset` 将 CFA 的计算更新为与函数入口相同。 这是预期之中的,因为 `401096` 处的下一条指令是返回指令 `ret`,并将返回值从堆栈中弹出。
`DW_CFA_advance_loc` 使当前行应用于函数中接下来的 50 个字节的代码,直到 `401096`。CFA 位于 `rsp+32`,直到 `401092` 处的堆栈调整指令完成执行。`DW_CFA_def_cfa_offset` 将 CFA 的计算更新为与函数入口相同。这是预期之中的,因为 `401096` 处的下一条指令是返回指令 `ret`,并将返回值从堆栈中弹出。
```
401090: 31 c0 xor %eax,%eax
@ -196,11 +200,11 @@ CIE 末尾的 `DW_CFA_nop` 进行填充以保持 DWARF 信息的对齐。 FDE
`f2c` 的 FDE 中,函数开头有一个带有 `DW_CFA_advance_loc` 的单字节指令。在高级操作之后,还有两个附加操作。`DW_CFA_def_cfa_offset` 将 CFA 更改为 `%rsp+16``DW_CFA_offset` 表示 `%rbx` 中的初始值现在位于 `CFA-16`(堆栈顶部)。
查看这个 `fc2` 反汇编代码,可以看到 `push` 用于将 `%rbx` 保存到堆栈中。 在代码生成中省略帧指针的优点之一是可以使用 `push``pop` 等紧凑指令在堆栈中存储和检索值。 在这种情况下,保存 `%rbx` 是因为 `%rbx` 用于向 `printf` 函数传递参数(实际上转换为 `puts` 调用),但需要保存传递到函数中的 `f` 初始值以供后面的计算使用。 `4011ae``DW_CFA_advance_loc` 29字节显示了 `pop %rbx` 之后的下一个状态变化,它恢复了 `%rbx` 的原始值。 `DW_CFA_def_cfa_offset` 指出 pop 将 CFA 更改为 `%rsp+8`
查看这个 `fc2` 反汇编代码,可以看到 `push` 用于将 `%rbx` 保存到堆栈中。 在代码生成中省略帧指针的优点之一是可以使用 `push``pop` 等紧凑指令在堆栈中存储和检索值。 在这种情况下,保存 `%rbx` 是因为 `%rbx` 用于向 `printf` 函数传递参数(实际上转换为 `puts` 调用),但需要保存传递到函数中的 `f` 初始值以供后面的计算使用。`4011ae` 的 `DW_CFA_advance_loc` 29字节显示了 `pop %rbx` 之后的下一个状态变化,它恢复了 `%rbx` 的原始值。 `DW_CFA_def_cfa_offset` 指出 pop 将 CFA 更改为 `%rsp+8`
### GDB使用调用帧信息
### GDB 使用调用帧信息
有了 CFI 信息,[GNU 调试器 (GDB)][3] 和其他工具就可以生成准确的回溯。 如果没有 CFI 信息GDB 将很难找到返回地址。 如果在 `f2c.c` 的第 7 行设置断点,可以看到 GDB 使用此信息。 GDB在 `f2c` 函数中的 `pop %rbx` 完成且返回值不在栈顶之前放置了断点。
有了 CFI 信息,[GNU 调试器GDB][3] 和其他工具就可以生成准确的回溯。如果没有 CFI 信息GDB 将很难找到返回地址。如果在 `f2c.c` 的第 7 行设置断点,可以看到 GDB 使用此信息。GDB在 `f2c` 函数中的 `pop %rbx` 完成且返回值不在栈顶之前放置了断点。
GDB 能够展开堆栈,并且作为额外收获还能够获取当前保存在堆栈上的参数 `f`
@ -228,6 +232,8 @@ Breakpoint 1, f2c (f=98) at f2c.c:8
DWARF 调用帧信息为编译器提供了一种灵活的方式来包含用于准确展开堆栈的信息。这使得可以确定当前活动的函数调用。我在本文中提供了简要介绍,但有关 DWARF 如何实现此机制的更多详细信息,请参阅 [DWARF 规范][4]。
*题图MJ/4004d7c7-8407-40bd-8aa8-92404601dba0*
--------------------------------------------------------------------------------
via: https://opensource.com/article/23/3/gdb-debugger-call-frame-active-function-calls
@ -235,7 +241,7 @@ via: https://opensource.com/article/23/3/gdb-debugger-call-frame-active-function
作者:[Will Cohen][a]
选题:[lkxed][b]
译者:[jrglinux](https://github.com/jrglinux)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
@ -245,3 +251,4 @@ via: https://opensource.com/article/23/3/gdb-debugger-call-frame-active-function
[2]: https://www.phoronix.com/review/fedora-frame-pointer
[3]: https://opensource.com/article/21/3/debug-code-gdb
[4]: https://dwarfstd.org/Download.php
[0]: https://img.linux.net.cn/data/attachment/album/202307/26/062542j0picgf1fs6nd8qn.jpg

View File

@ -3,18 +3,20 @@
[#]: author: "Sagar Sharma https://itsfoss.com/author/sagar/"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-16053-1.html"
Linux 终端基础知识 #7:在 Linux 中复制文件和目录
终端基础:在 Linux 中复制文件和目录
======
![][1]
![][0]
> 在终端基础知识系列的这一部分中,学习如何在 Linux 中使用命令行复制文件和目录。
复制文件是你经常执行的最基本但最重要的任务之一。
Linux 有一个专门的 cp 命令用于复制文件和目录(文件夹)。
Linux 有一个专门的 `cp` 命令用于复制文件和目录(文件夹)。
在终端基础知识系列的这一部分中,你将学习在终端中复制文件和文件夹。
@ -37,21 +39,21 @@ Linux 有一个专门的 cp 命令用于复制文件和目录(文件夹)。
要将一个文件复制到另一目录,你所要做的就是遵循给定的命令语法:
```
cp Source_file Destination_directory
cp 源文件 目标目录
```
例如,在这里,我将名为 `Hello.txt` 的文件复制到名为 `Tux` 的目录中:
![copy file to another directory in linux command line][8]
正如你所看到的,文件已成功复制到 Tux 目录中。
正如你所看到的,文件已成功复制到 `Tux` 目录中。
#### 复制文件但重命名
你可以选择在复制文件时重命名该文件。只需为“目标文件”指定一个不同的名称即可。
```
cp Source_file Renamed_file
cp 源文件 改名的文件
```
作为参考,在这里,我将名为 `Hello.txt` 的文件复制到同一目录,并将其重命名为 `Renamed_Hello.txt`
@ -72,16 +74,16 @@ cp File1 File2 File3 FileN Target_directory
![copy multiple files using the cp command in linux][10]
> 📋 当你复制多个文件时,仅使用 cp 命令无法重命名它们。
> 📋 当你复制多个文件时,仅使用 `cp` 命令无法重命名它们。
#### 复制时处理重复文件
默认情况下如果目标目录中存在同名文件cp 命令将覆盖该文件。
默认情况下,如果目标目录中存在同名文件,`cp` 命令将覆盖该文件。
为了避免覆盖,你可以在 cp 命令中使用 `-n` 选项,它不会覆盖现有文件:
```
cp -n Source_File Destination_directory
cp -n 源文件 目标目录
```
例如,在这里,我尝试复制目标目录中已有的两个文件,并使用 `-v` 选项来展示该命令正在执行的操作:
@ -96,10 +98,10 @@ cp -n -v itsFOSS.txt LHB.txt LU.txt ~/Tux
但是,当你想要覆盖某些文件,而某些文件应该保持不变时该怎么办?
好吧,你可以使用 `-i` 选项在交互模式下使用 cp 命令,它每次都会询问你是否应该覆盖该文件:
好吧,你可以使用 `-i` 选项在交互模式下使用 `cp` 命令,它每次都会询问你是否应该覆盖该文件:
```
cp -i Source_file Destination_directory
cp -i 源文件 目标目录
```
![how to use cp command in interactive mode][12]
@ -108,12 +110,12 @@ cp -i Source_file Destination_directory
### 在 Linux 命令行中复制目录
mkdir 命令用于创建新目录rmdir 命令用于删除(空)目录。但没有用于复制目录的 cpdir 命令。
`mkdir` 命令用于创建新目录,`rmdir` 命令用于删除(空)目录。但没有用于复制目录的 `cpdir` 命令。
你必须使用相同的 cp 命令,但使用递归选项 `-r` 将目录及其所有内容复制到另一个位置:
你必须使用相同的 `cp` 命令,但使用递归选项 `-r` 将目录及其所有内容复制到另一个位置:
```
cp -r Source_dir Target_dir
cp -r 源目录 目标目录
```
例如,在这里,我将名为 `IF` 的目录复制到 `LHB`
@ -131,7 +133,7 @@ cp -r Source_dir Target_dir
要仅复制目录的内容,而不复制目录本身,请在源目录名称的末尾附加 `/.`
```
cp -r Source_directory/. Destination_directory
cp -r 源目录/. 目标目录
```
在这里,我想复制名为 `IF` 的目录的内容,其中包含以下三个文件:
@ -146,14 +148,14 @@ cp -r IF/. LHB
![copy the file contents of directory not a directory itself in linux command line][15]
你还可以在此处使用 Source_directory/*
你还可以在此处使用 `源目录/*`
#### 复制多个目录
要复制多个目录,你必须按以下方式执行命令:
```
cp -r Dir1 Dir2 Dir3 DirN Destiniation_directory
cp -r 目录1 目录2 目录3 目录N 目标目录
```
例如,在这里,我将两个名为 `IF``LU` 的目录复制到 `LHB`
@ -167,7 +169,7 @@ cp -r IF LU ~/LHB
当你想要从多个目录复制文件但不复制目录本身时,你可以执行相同的操作:
```
cp -r Dir1/. Dir2/. Dir3/. DirN/. Destination_directory
cp -r 目录1/. 目录2/. 目录3/. 目录N/. 目标目录
```
![copy files from multiple directories but not directories their self using the cp command][17]
@ -178,16 +180,16 @@ cp -r Dir1/. Dir2/. Dir3/. DirN/. Destination_directory
现在,让我们看看你对到目前为止所学到的知识还记得多少。
- 创建一个名为 copy_practice 的目录。
- 将文件 /etc/services 复制到这个新创建的文件夹。
- 在此目录下创建一个名为 secrets 的文件夹,并将文件 /etc/passwd 和 /etc/services 复制到其中。
- 将 copy_practice 中的 services 文件复制到 secrets 文件夹中,但不要覆盖它。
- 将 secrets 文件夹复制到你的主目录。
- 删除 secrets 和 copy_practice 目录。
- 创建一个名为 `copy_practice` 的目录。
- 将文件 `/etc/services` 复制到这个新创建的文件夹。
- 在此目录下创建一个名为 `secrets` 的文件夹,并将文件 `/etc/passwd``/etc/services` 复制到其中。
- 将 `copy_practice` 中的 `services` 文件复制到 `secrets` 文件夹中,但不要覆盖它。
- 将 `secrets` 文件夹复制到你的主目录。
- 删除 `secrets``copy_practice` 目录。
这会给你一些练习。
到目前为止进展顺利。你已经学到了很多东西。在下一章中,你将了解如何使用 mv 命令移动文件和文件夹。
到目前为止进展顺利。你已经学到了很多东西。在下一章中,你将了解如何使用 `mv` 命令移动文件和文件夹。
--------------------------------------------------------------------------------
@ -196,7 +198,7 @@ via: https://itsfoss.com/copy-files-directory-linux/
作者:[Sagar Sharma][a]
选题:[lkxed][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
@ -204,11 +206,11 @@ via: https://itsfoss.com/copy-files-directory-linux/
[b]: https://github.com/lkxed/
[1]: https://itsfoss.com/content/images/2023/03/linux-mega-packt.webp
[2]: https://itsfoss.com/change-directories/
[3]: https://itsfoss.com/make-directories/
[3]: https://linux.cn/article-15595-1.html
[4]: https://itsfoss.com/list-directory-content/
[5]: https://itsfoss.com/create-files/
[5]: https://linux.cn/article-15643-1.html
[6]: https://itsfoss.com/view-file-contents/
[7]: https://itsfoss.com/delete-files-folders-linux/
[7]: https://linux.cn/article-15809-1.html
[8]: https://itsfoss.com/content/images/2023/02/copy-file-to-another-directory-in-linux-command-line.png
[9]: https://itsfoss.com/content/images/2023/02/rename-a-file-while-copying-in-a-same-directory-in-linux-terminal.png
[10]: https://itsfoss.com/content/images/2023/02/copy-multiple-files-using-the-cp-command-in-linux.png
@ -219,3 +221,4 @@ via: https://itsfoss.com/copy-files-directory-linux/
[15]: https://itsfoss.com/content/images/2023/02/copy-the-file-contents-of-directory-not-a-directory-itself-in-linux-command-line.png
[16]: https://itsfoss.com/content/images/2023/02/copy-multiple-directories-using-the-cp-command-in-linux-command-line.png
[17]: https://itsfoss.com/content/images/2023/02/copy-files-from-multiple-directories-but-not-directories-their-self-using-the-cp-command.png
[0]: https://img.linux.net.cn/data/attachment/album/202307/31/220802ozpf3gt9gpj2pp0f.jpg

View File

@ -0,0 +1,317 @@
[#]: subject: "Run a virtual conference using only open source tools"
[#]: via: "https://opensource.com/article/23/4/open-source-tools-virtual-conference"
[#]: author: "Máirín Duffy https://opensource.com/users/mairin"
[#]: collector: "lkxed"
[#]: translator: "ChatGPT"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-16046-1.html"
使用开源工具来举办线上大会
======
![][0]
> 下面是使用开源工具来举办一场线上活动的方法。
在 2023 年 1 月举办了首届 <ruby>[创意自由峰会][2]<rt>Creative Freedom Summit</rt></ruby> 后,[Fedora 设计团队][1] 发现使用开源工具来举办线上大会非常有效。
在本文中,我将分享一些关于这场大会的背景信息,为什么对我们来说使用开源工具来举办大会很重要,以及为实现这一目标我们的团队所使用的具体工具和配置。我还会谈谈哪些工作做的很好,在以及我们 2024 年下一届峰会中需要改进的地方。
### 创意自由峰会
创意自由峰会是 Marie Nordin 在审查了 [Fedora 用户与贡献者年度大会Flock][3] 的演讲提交后提出的一个想法。在 2022 年 8 月的 Flock 大会上,她收到了大量与开源设计和创意相关的演讲提交,远远超出我们能够接受的数量。由于存在许多关于开源设计的优秀想法,她想知道是否有机会举办一个独立的开源创意大会,专门面向在创作中使用开源工具的创意人士。
Marie 在 2022 年秋季向 Fedora 设计团队提出了这个想法,我们开始筹划这个会议,会议于 2023 年 1 月 17 日至 19 日举行。由于这是我们第一次举办这样一场新的会议,我们决定首先基于 Flock 提交的演讲和我们自己的开源创意人士网络,邀请其中一些人士担任演讲嘉宾。几乎每位我们邀请的演讲者都答应演讲,所以我们没有接受其他人的提交。明年我们需要找到更好的解决办法,所以目前我们还没有开源的投稿管理工具可供介绍。
### 在开源大会中使用开源工具
自从最初的大流行封锁以来Fedora 的 Flock 大会一直使用 Hopin 虚拟平台在线举办,尽管 Hopin 不是开源的但对开源工具很友好。Fedora 几年前开始使用 Hopin它确实提供了专业的会议体验包括内置的赞助商展位/博览厅、分会场、大厅聊天对话和管理工具。通过 Hopin 来举办创意自由峰会对我们来说可行,因为作为 Fedora 赞助的活动,我们可以使用 Fedora 的 Hopin 环境。再次强调Hopin 不是开源的。
作为一个长期(约 20 年)的开源贡献者,我可以告诉你,做出这样的决定总是很困难的。如果你的大会专注于开源,使用专有平台来举办你的活动可能会有些奇怪。然而,随着我们社区和活动的规模和复杂性不断增长,开发一个集成的开源会议系统变得更具挑战性。
并不存在正确或错误的答案。在做出这个决定时,你必须权衡很多因素:
- 预算
- 人力资源
- 基础设施
- 技术能力
- 活动的复杂性/正式性/文化
我们没有为这次活动安排任何预算。我们有一支志愿者团队可以投入一些工作时间。我们有 Fedora Matrix 服务器作为可以加入的支持基础设施,并且有一个托管的 WordPress 系统用于网站。我和队友 Madeline Peck 在举办每周的 Fedora 设计团队的 [视频会议][4] 方面具有一定的技术能力和经验。我们希望这次活动是低调、单一会场和非正式的,所以对于一些小故障或瑕疵我们有一定的容忍度。我们对尝试使用开源工具组合也有很大的热情。
现在你了解了我们在做出这个决定时的一些考虑因素,这可能有助于你在为自己的活动做决策时参考。
### 一个开源会议技术栈
以下是会议技术栈的工作方式。
#### 概述
直播组件:
- **直播流**: 我们通过 PeerTube 频道将主舞台和社交活动进行实时直播。会议参与者可以从我们的 PeerTube 频道观看直播。PeerTube 提供了一些注重隐私的分析功能,可以跟踪直播观众和活动后观看次数。
- **直播舞台 + 社交活动房间**: 我们设有一个用于演讲者和主持人的直播舞台,使用 Jitsi 确保只有有权限的人可以上镜。我们额外设有一个 Jitsi 会议室,用于社交活动,允许任何希望参与社交活动的人上镜。
- **后台**: 我们有一个名为“后台”的 Matrix 频道,用于在活动期间与演讲者、主持人和志愿者协调工作。
- **公告和问答**: 我们通过共享的 Etherpad后来转移到 Hackmd.io来管理问答和每日议程。
- **集成和集中化的会议体验**: 使用 Matrix 的 Element 客户端,我们将直播视频和 Etherpad 嵌入到一个公共的 Matrix 频道中,供会议使用。我们根据频道中的参与人数来监控整体会议出席情况。我们在整个会议期间设有实时聊天,并从聊天和嵌入的用于问答的 Etherpad 中接受观众提问。
- **会议网站**: 我们有一个由 Ryan Gorley 设计精美的网站,托管在 WordPress 上,网站提供了基本信息和链接,包括如何参加会议、日期/时间和议程。
活动后组件:
- **活动后调查**: 我们使用开源的 LimeSurvey 系统向参会者发送了一份活动后的调查,以了解他们的参会体验。我在这篇文章中使用了该调查的一些数据。
- **活动后的视频编辑和字幕**: 我们的会议没有实时字幕系统,但在我能做到的情况下,我在频道中即时记录了演讲的笔记,与会者对此表示非常感激。活动后,我们使用了 Kdenlive活动中演讲中展示的工具之一来编辑视频并生成字幕。
- **活动录像**: PeerTube 会自动将直播录像发布到频道,从而使参会者可以看到他们可能错过的演讲的几乎即时录像。
接下来,我将介绍一些细节。
### 使用 PeerTube 进行直播
![创意自由峰会的 PeerTube 频道截图,显示了标志、事件描述和一组视频缩略图][5]
我们在创意自由峰会的直播中使用了由 [LinuxRocks.online][7] 慷慨提供的 [LinuxRocks PeerTube 平台][6]。PeerTube 是一个自由开源的去中心化视频平台,也是 <ruby>联邦宇宙<rt>Fediverse</rt></ruby> 的一部分。
PeerTube 最好的特点之一(我所了解的其他平台所没有的)是,在直播结束后,你会在 PeerTube 上的频道上获得一个几乎即时的重播录像。我们的聊天室用户将这视为该平台的主要优点。如果某位参与者错过了他们非常感兴趣的一个会议他们可以在该演讲结束后的几分钟内观看到它。这不需要志愿者组织团队进行手动干预、上传或协调PeerTube 会自动完成。
以下是使用 PeerTube 进行直播的工作方式:你在频道上创建一个新的直播流,它会给你一个直播流 URL 和一个用于授权流媒体的密钥。这个 URL 和密钥可以反复使用。我们进行配置,使得录像会在直播结束后立即发布到我们创建直播流 URL 的频道上。接下来,在开始直播时将 URL 和密钥复制/粘贴到 Jitsi 中。这意味着你不必为会议期间的每个演讲生成新的 URL 和密钥,组织者管理这些将会带来相当大的工作量。相反,我们可以重复使用相同的 URL 和密钥,将其共享在会议组织者之间的共同文档中(我们每个人都有不同的演讲托管时间段)。团队中任何具有该文档访问权限的人都可以启动直播。
#### 如何生成 PeerTube 中的直播流 URL 和密钥
以下部分逐步介绍了如何在 PeerTube 中生成直播流的 URL 和密钥。
##### 1、创建 PeerTube 上的直播视频
登录到 PeerTube并点击右上角的 “<ruby>发布<rt>Publish</rt></ruby>” 按钮:
![PeerTube 发布按钮的截图][8]
##### 2、设置选项
点击 “<ruby>进行直播<rt>Go live</rt></ruby>” 选项卡(从左数第四个),并设置以下选项:
- <ruby>频道<rt>Channel</rt></ruby>:(你希望直播发布在的频道名称)
- <ruby>隐私<rt>Privacy</rt></ruby>:公开
- 单选按钮:<ruby>普通直播<rt>Normal live</rt></ruby>
然后选择 “<ruby>进行直播<rt>Go live</rt></ruby>” 。 (不用担心,你还不会真正开始直播,还有更多数据需要填写。)
![PeerTube 中的 Go Live 按钮的截图][9]
##### 3. 基本信息(暂时不要点击更新按钮)
首先,在 <ruby>基本信息<rt>Basic info</rt></ruby> 选项卡中填写信息,然后在下一步选择 <ruby>高级设置<rt>Advanced settings</rt></ruby> 选项卡。填写直播流的名称、描述、标签、类别、许可证等。在转码复选框启用后记得发布。
这样一来,一旦直播结束,录制视频将自动发布到你的频道上。
##### 4. 高级设置
你可以上传一个“待机”图像,当观看直播流 URL 并等待开始时,该图像会显示在所有人面前。
![PeerTube 高级设置的截图][10]
这是我们在创意自由峰会上使用的待机图像:
![创意自由峰会横幅的截图][11]
##### 5. 在 PeerTube 上开始直播
选择右下角的 “<ruby>更新<rt>Update” 按钮。直播流将显示如下,直到你从 Jitsi 开始直播:
![在 PeerTube 上开始直播的截图][12]
##### 6. 将直播流的 URL 复制粘贴到 Jitsi
这是 PeerTube 的最后一步。一旦直播流启动,点击视频下方右侧的 “...” 图标:
![复制并粘贴 URL][13]
选择 “<ruby>显示直播信息<rt>Display live information</rt></ruby>”。你将看到如下对话框:
![显示直播信息选项的截图][14]
你需要复制直播的 RTMP URL 和直播流密钥。将它们合并成一个 URL然后将其复制粘贴到 Jitsi。
以下是我测试运行时的这两个文本块示例,可供复制:
- 直播的 RTMP URL`rtmp://peertube.linuxrocks.online:1935/live`
- 直播流密钥:`8b940f96-c46d-46aa-81a0-701de3c43c8f`
你需要将这两个文本块合并,并在它们之间加上 `/`,如下所示:
```
rtmp://peertube.linuxrocks.online:1935/live/8b940f96-c46d-46aa-81a0-701de3c43c8f
```
### Jitsi 的直播舞台 + 社交活动室
我们在我们的 “直播舞台” 上使用了自由开源的托管平台 [Jitsi Meet][15] 视频会议平台。我们在 [https://meet.jit.si][16] 上创建了一个自定义 URL 的 Jitsi 会议室,并只与演讲者和会议组织者共享了该 URL。
我们配置了会议室的等候室(该功能在你加入新创建的会议室后在会议设置中可用),这样演讲者可以在他们的演讲前几分钟加入而不用担心打断前一个演讲。我们的主持人志愿者在前一个会话结束后让他们进入。另一个选项是给会议室添加密码。我们只是配置了一个等候室就行了。在测试时似乎发现,会议室中的管理状态并不是持久的。如果一个管理员离开了会议室,他们似乎会失去管理员状态和设置,比如等候室的设置。我通过让我的电脑保持打开的状态,使 Jitsi 会议室在整个会议期间可用和活动。(在这方面,你的情况可能会有所不同。)
Jitsi 提供了内置的直播选项,你可以将视频服务的 URL 发布到 Jitsi 中,它会将你的视频流式传输到该服务。我们对这种方法有信心,因为这是我们主办和直播每周举行的 [Fedora 设计团队会议][17] 的方式。对于创意自由峰会,我们将我们的 Jitsi 直播舞台(用于演讲者和主持人)连接到 [Linux Rocks PeerTube 上的一个频道][6]。
Jitsi 允许演讲者共享屏幕来展示幻灯片或进行实时演示。
#### 将 Jitsi 直播到 PeerTube
1、加入会议并点击屏幕底部红色挂断按钮旁边的 “...” 图标。
![加入 Jitsi 会议][18]
2、从弹出菜单中选择 “<ruby>开始直播<rt>Start live stream</rt></ruby>”。
![在 Jitsi 中开始直播的截图][19]
3、复制并粘贴 PeerTube 的 URL + 密钥文本
![复制并粘贴直播流密钥的截图][20]
4、倾听 Jitsi 机器人朋友的声音
几秒钟后会出现一个女性声音告诉你“Live streaming is on.”(直播已开启)。一旦听到这个声音,微笑吧!你正在进行直播。
5、停止直播
这将停止你设置的 PeerTube URL 的工作,所以重复这些步骤可以重新启动直播。
#### Jitsi 技巧
##### 通过开关 Jitsi 的流来管理录制
我们在会议中认识到,在演讲之间关闭 Jitsi 的直播流会更好,这样你将在 PeerTube 上针对每个演讲发布一个原始录制文件。第一天我们让它一直运行,因此一些录制中包含了多个演讲的视频,这使得那些试图赶上进度的人使用即时回放功能更困难。他们需要在视频中寻找他们想观看的演讲,或者等待我们在几天或几周后发布编辑过的版本。
#### 避免音频回音
我们在活动期间实时发现的另一个问题是音频回音。这在我们的测试中并没有出现,这完全是我的错(对所有参加的人道歉)。我负责设置 Jitsi/PeerTube 的链接、监控流和协助主持活动。尽管我知道一旦直播开始,我需要关闭所有已打开的 PeerTube 浏览器标签,但我可能打开了比我想象中更多的 PeerTube 标签,或者直播会在我可用于监控聊天的 Element 客户端中自动开始播放。我没有很方便地静音 Element 的方法。在我进行的一些演讲者介绍中,你会注意到我知道在音频回音开始之前大约有 30 秒的时间,因此我做的介绍非常匆忙/急促。
我认为有更简单的方法来避免这种情况:
- 尽量确保主持人/活动主持人不是负责设置/监控流和聊天的同一个人。(根据你每次拥有多少义工人员的情况,这并不总是可能的。)
- 如果可能,使用一台电脑监控流,另一台电脑担任主持人角色。这样,你在用于监控的电脑上只需按一下静音按钮,简化了你在另一个电脑上的主持体验。
这是一件值得提前练习和完善的事情。
### 后台Element
![以下是 Element 中显示的三个聊天室列表的截图Creative Freedom Summit白色徽标、Creative Freedom Summit Backstage黑色徽标和 Creative Freedom Summit Hosts橙色徽标][21]
我们在会议开始前大约一周设置了一个 “后台” 邀请制聊天室,并邀请了所有的演讲者加入。这有助于确保以下几点:
- 我们的演讲者在活动开始之前就加入了 Element/Matrix并有机会在注册遇到任何问题时都可以获得帮助实际上没有人遇到问题
- 在活动开始之前,我们与所有演讲者建立了一个实时的交流渠道,以便我们能够轻松地发送公告和更新。
在活动期间,这个聊天室成为一个有用的地方,用于协调演讲者之间的过渡,提醒日程是否延迟,以及在一个情况下,当我们的演讲者出现紧急情况无法按原定时间发言时,迅速重新安排演讲时间。
我们还为主持人设置了一个房间,但在我们的情况下,它是多余的。我们只是使用后台频道进行协调。我们发现两个频道很容易监控,但三个频道对于方便起见有点太多了。
### 公告和问答Etherpad/Hackmd.io
![这是一个名为 “General information” 的 Etherpad 的截图,其中包含有关创意自由峰会的一些信息][22]
我们在 Element 主频道中设置了一个固定的小部件,提供有关活动的一般信息,包括每日日程安排、行为准则等。我们还为每个演讲设置了一个问答部分,让与会者可以在其中提出问题,主持人会为演讲者朗读这些问题。
在开始的一两天中,我们发现一些与会者在加载 Etherpad 小部件时遇到问题,因此我们改为在频道中固定一个内嵌的 hackmd.io 文档作为小部件,那似乎效果更好一些。我们并不 100% 确定小部件加载问题的具体原因,但我们可以在频道主题中发布一个原始(非内嵌)链接,这样参与者就可以绕过通过小部件访问时可能遇到的任何问题。
### 综合和集中的会议体验
![在左上角是一个视频直播,右上角是一个 hackmd.io 的公告页面,下方是一个活跃的聊天窗口][23]
通过 Fedora 的 Element 服务器使用 Matrix 是参加会议的关键地方。Element 中的 Matrix 聊天室具有小部件系统,可以将网站嵌入到聊天室中,成为体验的一部分。这个功能对于将我们的 Matrix 聊天室作为集中参会的地方非常重要。
我们将 PeerTube 的直播嵌入到了聊天频道中,在上面的截图中左上角可以看到。会议结束后,我们可以分享未编辑的视频回放的播放列表。现在,我们志愿者项目编辑视频的工作已经完成,该频道中有按顺序排列的编辑演讲的播放列表。
如前一节所讨论的,我们在右上角嵌入了一个 hackmd.io 笔记,用于发布当天的日程安排、公告以及一个用于问答的区域。我本来想设置一个 Matrix 机器人来处理问答,但我在运行时遇到了一些困难。不过,这可能是明年一个很酷的项目。
在会议期间,与会者直接在主要聊天窗口下方进行交流,同时与小部件进行互动。
在将 Matrix/Element 聊天室作为在线会议的中心地点时,有几个要考虑的因素,例如:
- 在 Element 桌面客户端或桌面系统的 Web 浏览器上会有最佳体验。但是,你也可以在 Element 移动客户端中查看小部件(尽管一些参与者在发现此功能时遇到了困难,其用户界面不太明显)。其他 Matrix 客户端可能无法查看小部件。
- 如果需要,与会者可以根据自己的喜好自行组合体验。那些不使用 Element 客户端参加会议的用户报告称加入聊天并直接查看 PeerTube 直播 URL 没有问题。我们在频道主题中分享了直播 URL 和 hackmd URL以便那些不想使用 Element 的用户也可以访问。
### 网站
[Ryan Gorley][25] 使用 [WordPress][27] 开发了 [创意自由峰会网站][26]。该网站由 WPengine 托管,是一个单页网站,其中嵌入了来自 sched.org 的会议日程安排。在网站顶部,有一个标题为 “Create. Learn. Connect.” 的屏幕截图,背景是蓝色和紫色的渐变效果。
### 后续活动
#### 后续调查
我们使用开源调查工具 LimeSurvey。在会议结束后的一两周内我们通过 Element 聊天频道和 PeerTube 视频频道向与会者发送了调查,以了解他们对我们活动的看法。活动组织者们继续定期开会。在这些会议的其中一个议题是共同撰写 hackmd.io 文档,以制定调查问题。以下是我们从活动中学到的一些对你计划自己的开源线上会议可能有兴趣的事项:
- 绝大多数与会者(共 70% 的受访者)是通过 Mastodon 和 Twitter 得知本次活动的。
- 33% 的与会者使用 Element 桌面应用程序参加会议30% 使用 Element 聊天 Web 应用程序。因此,大约有 63% 的与会者使用了集成的 Matrix/Element 体验。其他与会者直接在 PeerTube 上观看或在会后观看了回放。
- 35% 的与会者表示他们通过聊天与其他创意人建立了联系,因此如果你的目标是促进人际交流和连接,聊天体验对于活动来说非常重要。
#### 字幕
在活动期间,我们收到了与会者的积极反馈,他们对其他与会者在聊天中实时添加的演讲字幕表示赞赏,并希望能够提供实时字幕以提升可访问性。虽然本文未提及实时字幕的相关软件,但有一些开源解决方案可供选择。其中一个工具是 Live Captions在 Seth Kenlon 撰写的一篇文章《[在 Linux 上的开源视频字幕][28]》中进行了介绍。虽然这个工具主要用于本地观看视频内容的与会者,但我们有可能让会议主持人在 Jitsi 中运行它并与直播共享。其中一种方法是使用开源广播工具 [OBS][29],这样每个观看直播的人都能受益于字幕功能。
在会后编辑视频时,我们发现了内置于我们首选的开源视频编辑软件 [Kdenlive][30] 中的一项功能,它能够自动生成字幕并自动放置到视频中。在 [Kdenlive 手册][31] 中有关于如何使用这个功能的基本说明。Fedora 设计团队成员 Kyle Conway 在协助会后视频编辑时,制作了一份 [详细教程(包括视频指导):如何在 Kdenlive 中自动生成并添加字幕][32]。如果你对这个功能感兴趣,阅读和观看这个教程会非常有帮助。
#### 视频编辑志愿者工作
活动结束后,我们在会议的 Element 频道中召集了一组志愿者,共同进行视频编辑工作,包括添加标题卡、片头/片尾音乐以及进行整体清理。我们自动生成的一些重播录像可能会分为两个文件,或者与其他多个演讲合并在一个文件中,因此需要重新组装或裁剪。
我们使用 [GitLab Epic][33] 来组织这项工作,其中包含常见问题和寻找按技能组织的志愿者的帮助,每个视频工作都附加有相应的议题。我们为每个视频设置了一系列自定义标签,以明确该视频的状态以及需要何种帮助。所有视频的编辑工作都已完成,其中一些视频需要为其在 [创意自由峰会频道][6] 上的描述区域撰写内容。许多视频都有自动生成的字幕,但字幕中可能存在拼写错误和其他常见的自动生成文本错误,还需要进行编辑修正。
![GitLab 上需要编辑帮助的视频清单的截图][34]
我们通过让志愿者从创意自由峰会的 PeerTube 主频道的未编辑录像中下载原始视频来传递这些视频文件(由于文件大小可能相当大)。当志愿者准备好分享编辑好的视频时,我们有一个私人的 PeerTube 账户他们可以将视频上传到该账户。具有主频道账户访问权限的管理员会定期从私人账户中获取视频并将其上传到主账户中。请注意PeerTube 并没有一个多个账户访问同一频道的系统,因此我们不得不进行密码共享,这可能有些令人紧张。我们认为这是一个合理的妥协,可以限制掌握主要密码的人数,同时仍然可以让志愿者提交编辑好的视频而不会太过麻烦。
### 准备尝试一下吗?
我希望这个对于我们如何使用开源工具集来举办创意自由峰会的全面描述能够激发你尝试在你的开源活动中使用这些方法。让我们知道进展如何,并随时联系我们如果你有问题或改进建议!我们的频道链接为:[https://matrix.to/#/#creativefreedom:fedora.im][35]
*题图MJ/cb6a4ea4-95ed-40cb-9e78-85f8676219f2*
--------------------------------------------------------------------------------
via: https://opensource.com/article/23/4/open-source-tools-virtual-conference
作者:[Máirín Duffy][a]
选题:[lkxed][b]
译者ChatGPT
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/mairin
[b]: https://github.com/lkxed/
[1]: https://fedoraproject.org/wiki/Design
[2]: http://creativefreedomsummit.com/
[3]: http://flocktofedora.org/
[4]: https://opensource.com/article/23/3/video-templates-inkscape
[5]: https://opensource.com/sites/default/files/2023-04/homepage.webp
[6]: https://peertube.linuxrocks.online/c/creativefreedom/videos
[7]: https://linuxrocks.online/
[8]: https://opensource.com/sites/default/files/2023-04/publish.png
[9]: https://opensource.com/sites/default/files/2023-04/go-live.png
[10]: https://opensource.com/sites/default/files/2023-04/advdsettings.png
[11]: https://opensource.com/sites/default/files/2023-04/cfsbanner.png
[12]: https://opensource.com/sites/default/files/2023-04/startlivestream.jpg
[13]: https://opensource.com/sites/default/files/2023-04/pasteURL.png
[14]: https://opensource.com/sites/default/files/2023-04/liveinformation.png
[15]: https://meet.jit.si/
[16]: https://meet.jit.si
[17]: https://peertube.linuxrocks.online/c/fedora_design_live/videos
[18]: https://opensource.com/sites/default/files/2023-04/moreactions.png
[19]: https://opensource.com/sites/default/files/2023-04/startlivestream.png
[20]: https://opensource.com/sites/default/files/2023-04/copypastekey.png
[21]: https://opensource.com/sites/default/files/2023-04/backstage.webp
[22]: https://opensource.com/sites/default/files/2023-04/hackmd.webp
[23]: https://opensource.com/sites/default/files/2023-04/integratedexperience.webp
[24]: https://opensource.com/sites/default/files/2023-04/website.webp
[25]: https://mastodon.social/@ryangorley
[26]: https://creativefreedomsummit.com/
[27]: https://wordpress.com/
[28]: https://opensource.com/article/23/2/live-captions-linux
[29]: https://obsproject.com/
[30]: https://kdenlive.org/
[31]: https://docs.kdenlive.org/en/effects_and_compositions/speech_to_text.html
[32]: https://gitlab.com/groups/fedora/design/-/epics/23#video-captioning-and-handoff
[33]: https://gitlab.com/groups/fedora/design/-/epics/23
[34]: https://opensource.com/sites/default/files/2023-04/availablevideos_0.webp
[35]: https://matrix.to/#/#creativefreedom:fedora.im
[36]: https://blog.linuxgrrl.com/2023/04/10/run-an-open-source-powered-virtual-conference/
[0]: https://img.linux.net.cn/data/attachment/album/202307/30/073728saabpgnjtz5ankgb.jpg

View File

@ -3,18 +3,24 @@
[#]: author: "Ahmed Sobeh https://opensource.com/users/ahmed-sobeh"
[#]: collector: "lkxed"
[#]: translator: "wcjjdlhws"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-16037-1.html"
发展中国家面临的三个关键开源挑战
======
当我回国和科技行业或其他行业的人谈起我的工作和我每天参与的话题时,我通常会对[<ruby>开源办公室<rt>Open Source Programs Office (OSPO)</rt></ruby>][1]这个想法感到困惑。一家公司为开源项目做出贡献,却没有明显的直接经济利益,这种概念在文化上很难理解或解释。
![][0]
作为一个土生土长的人,我理解并赞同这个观点。曾几何时,我对开源软件的唯一理解是,它是一种无需付费、无需等待特定问题或附加功能发布即可使用的软件。我可以自己在本地做任何我需要的事情
> 开源在发展中国家面临着许多困难,这些困难使人们对开源的看法以及与开源的联系变得不准确、不贴切
在发展中国家,开放源码面临着许多困难,这些困难使人们对它的看法和联想变得不准确、不贴切。我将在本文中讨论这些问题。
> 编者按:本文作者 Ahmed Sobeh 是 Aiven 开源项目办公室的开源工程经理。他来自埃及,在开源领域有各种经验。本文是他对埃及的开源文化的见解。
当我回国,和科技行业或其他行业的人谈起我的工作和我每天参与的话题时,我通常会对 <ruby>[开源计划办公室][1]<rt>Open Source Programs Office</rt></ruby>OSPO这个想法感到困惑。一家公司在没有明显的直接经济利益的情况下为开源项目做出贡献这种概念在文化上很难理解或解释。
作为一个在发展中国家出生并成长的人,我理解并赞同这个观点。曾几何时,我对开源软件的唯一理解是,它是一种无需付费、无需等待特定问题或附加功能发布即可使用的软件。我可以自己在本地做任何我需要的事情。
在发展中国家,开源面临着许多困难,这些困难使人们对它的看法和相关印象变得不准确和脱节。我将在本文中讨论这些问题。
### 发展中国家的开源挑战
@ -26,25 +32,23 @@
### 社会与文化
科技文化,特别是其中的开源部分,从其所在社会的文化中汲取养分,这已经不是什么秘密了。这就是为什么在当今世界,开源更有可能在世界较发达地区得到维持和维护。
众所周知,科技中的文化,特别是其中的开源部分,源自它所存在的社会文化。这就是为什么在当今世界,开源更有可能在世界较发达地区得到维持和维护。
但是,试想一个完美的社会,一个最适合开代码发展、维持和维护的社会。这个社会的文化是什么样的?其主要特征是什么?
但是,试想一个完美的社会,一个最适合开源发展、维持和维护的社会。这个社会的文化是什么样的?其主要特征是什么?
#### 开放和透明
开源想要发展,社会文化必须尽可能开放和透明。信息必须可以自由公开地获取,这在许多欠发达地区是一个巨大的问题。信息往往是红头文件,普通公民无法获得,更不用说那些试图为开源做出贡献的人了。
**[ 相关阅读[开源项目的全球交流][2] ]**
开源想要发展,社会文化必须尽可能开放和透明。信息必须可以自由公开地获取,这在许多欠发达地区是一个巨大的问题。信息往往受到繁文缛节的制约,普通公民难以获取,更不用说那些试图为开源做出贡献的人了。
#### 自由
“自由”这个词有许多不同的含义与解释。有言论自由、表达自由、选择自由、信仰自由、宗教自由等等。在本文中,我最关心的自由方面是在没有更高权力干预的情况下建立新社区和组织的能力。这是开源的本质。分布式协作模式是一种高效的协作模式,在这种模式下,大型团体在没有强大的中央权力机构指挥的情况下开展合作。这是大多数这些地区面临的另一个重大挑战。新的社区和组织往往会受到质疑、密切监视,不幸的是,在某些情况下,甚至会因为害怕可能出现的新思想或其他原因而遭到起诉并最终被关闭。
“自由”这个词有许多不同的含义与解释。有言论自由、表达自由、选择自由、信仰自由、宗教自由等等。在本文中,我最关心的自由方面是在没有更高层机构干预的情况下建立新社区和组织的能力。这是开源的本质。分布式协作模式是一种高效的协作模式,在这种模式下,大型团体在没有强大的中央权指挥的情况下开展合作。这是大多数这些地区面临的另一个重大挑战。新的社区和组织往往会受到质疑、密切监视,不幸的是,在某些情况下,甚至会因为害怕可能出现的新思想或其他原因而遭到起诉并最终被关闭。
#### 充满活力
充满活力的文化对开源的发展至关重要。准备接受和实行新想法的文化是发展开源最理想的地方。抵制改变和倾向于固守传统方法会阻止社会接受新的技术和方法,这是大部分发展中国家中的主要问题。
这些地区抵制改变背后最重要也是最常见的原因是对未知的恐惧。把对未知的恐惧作为“发展中国家”的问题来讨论是不公平的。这是在哪里都常见问题,甚至在发达国家。但是恐惧背后的一些原因是发展中国家特有的。主要原因有两个,一是对科技行业的能力缺乏信心,二是缺乏责任感。企业和个人都不信任现有软件解决方案的功能,更不用说开源解决方案了。有一种观点认为,开源软件不安全、不可靠。当人们不相信软件开发者的能力时这种担忧会被放大。其次,人们不相信系统会对使用软件或法律冲突中可能出现的错误或问题追究责任。
这些地区抵制改变背后最重要也是最常见的原因是对未知的恐惧。把对未知的恐惧作为“发展中国家”的问题来讨论是不公平的。这是在哪里都常见问题,甚至在发达国家。但是恐惧背后的一些原因是发展中国家特有的。主要原因有两个,一是对科技行业的能力缺乏信心,二是缺乏责任感。企业和个人都不信任现有软件解决方案的功能,更不用说开源解决方案了。有一种观点认为,开源软件不安全、不可靠。当人们不相信软件开发者的能力时这种担忧会被放大。其次,人们不相信系统会对使用软件或法律冲突中可能出现的错误或问题追究责任。
### 资源、基础设施和经济
@ -58,11 +62,11 @@
在这种情况下,如何建立开源社区呢?项目最终只能由少数拥有稳定高速互联网连接和最新设备的特权人士来维护。剩下的将是零星的、偶尔来自他人的贡献,很难被视为一个社区。一旦出现有偿工作的机会,即使是这些人也会消失。我亲眼见过多次这种情况。有人会开始了解一个开源项目,研究特定的堆栈或提高自己的技能,并开始为其做出贡献。但一旦出现了有偿工作的机会,即使是作为第二份工作,他们也会完全放弃开源项目。这是有道理的。任何个人都必须优先考虑自己和家人的生存手段。
这种资源匮乏和对少数特权阶层的依赖,也使其几乎不可能为营销活动、社区建设活动以及最后但并非最不重要的文献本地化尝试提供资金。
这种资源匮乏和对少数特权人群的依赖,也使其几乎不可能为营销活动、社区建设活动以及最后但并非最不重要的文献本地化尝试提供资金。
#### 本地化
英语是互联网语言,但对许多国家来说并非如此。虽然几乎所有的开发人员都会说基本的英语,但并不是每个人都有能力理解文档、架构资源和技术规范,使他们能够有意义地[为开源项目做出贡献][3]。由于没有相应的文档,发展中国家的开发人员很难找到进入开源项目的切入点。为此所需的时间和资源通常会使这些地区的潜在贡献者望而却步。
英语是互联网语言,但对许多国家来说并非如此。虽然几乎所有的开发人员都会说基本的英语,但并不是每个人都有能力理解文档、架构资源和技术规范,使他们能够有意义地 [为开源项目做出贡献][3]。由于没有相应的文档,发展中国家的开发人员很难找到进入开源项目的切入点。为此所需的时间和资源通常会使这些地区的潜在贡献者望而却步。
#### 员工合同
@ -82,10 +86,11 @@
美国和欧洲的科技巨头与发展中地区的政府签订了价值数十亿美元、长达数十年的软件供应协议。一旦有人当选,并决定开始采用开源软件,他们就会发现摆脱这些交易需要付出巨大的代价。
### Open isn't always easy
### 开源并非一帆风顺
这些只是开放源代码在发展中国家面临的一些困难。要改善这种状况,使开源技术的采用和发展变得可行,还有许多工作要做。在今后的文章中,我将深入探讨具体的解决方案,但现在,我想说的是,任何事情都要从个人做起。当我们每个人都 "众筹 "开放文化时,我们生活和工作所在地区的文化也会随之改变。尽你所能,将开放源代码带入你的社区,看看它会带来什么。
这些只是开放源代码在发展中国家面临的一些困难。要改善这种状况,使开源技术的采用和发展变得可行,还有许多工作要做。在今后的文章中,我将深入探讨具体的解决方案,但现在,我想说的是,任何事情都要从个人做起。当我们每个人都 “众包” 开放文化时,我们生活和工作所在地区的文化也会随之改变。尽你所能,将开放源代码带入你的社区,看看它会带来什么。
*题图MJ/e9f5a8be-b0bd-425a-8199-248f5c0abe16*
--------------------------------------------------------------------------------
@ -94,7 +99,7 @@ via: https://opensource.com/article/23/4/challenges-open-source-developing-count
作者:[Ahmed Sobeh][a]
选题:[lkxed][b]
译者:[wcjjdlhws](https://github.com/wcjjdlhws)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
@ -104,3 +109,4 @@ via: https://opensource.com/article/23/4/challenges-open-source-developing-count
[2]: https://opensource.com/article/21/10/global-communication-open-source
[3]: https://opensource.com/article/22/3/contribute-open-source-2022
[4]: https://opensource.com/article/22/11/open-source-weaves-connections-between-countries
[0]: https://img.linux.net.cn/data/attachment/album/202307/27/073634a244fon440y25kug.jpg

View File

@ -3,37 +3,39 @@
[#]: author: "Pradeep Kumar https://www.linuxtechi.com/author/pradeep/"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-16043-1.html"
如何在 Kubernetes 集群中设置动态 NFS 配置
======
在这篇文章中,我们将向你展示如何在 Kubernetes (k8s) 集群中设置动态 nfs 配置。
![][0]
Kubernetes 中的动态 NFS 存储配置允许你按需自动为 Kubernetes 应用配置和管理 NFS网络文件系统卷。它允许创建持久卷 (PV) 和持久卷声明 (PVC),而无需手动干预或预配置存储。
> 在这篇文章中,我们将向你展示如何在 Kubernetesk8s集群中设置动态 NFS 配置。
Kubernetes 中的动态 NFS 存储配置允许你按需自动为 Kubernetes 应用配置和管理 NFS网络文件系统卷。它允许创建持久卷PV和持久卷声明PVC而无需手动干预或预配置存储。
NFS 配置程序负责动态创建 PV 并将其绑定到 PVC。它与 NFS 服务器交互,为每个 PVC 创建目录或卷。
##### 先决条件
### 先决条件
- 预装 Kubernetes 集群
- 具有 Kubernetes 集群管理员权限的普通用户
- 互联网连接
事不宜迟,让我们深入探讨步骤
事不宜迟,让我们深入探讨步骤
### 步骤 1) 准备 NFS 服务器
### 步骤 1准备 NFS 服务器
就我而言,我将在 Kubernetes 主节点 (Ubuntu 22.04) 上安装 NFS 服务器。登录主节点并运行以下命令:
就我而言,我将在 Kubernetes 主节点Ubuntu 22.04上安装 NFS 服务器。登录主节点并运行以下命令:
```
$ sudo apt update
$ sudo apt install nfs-kernel-server -y
```
创建以下文件夹并使用 nfs 共享它:
创建以下文件夹并使用 NFS 共享它:
```
$ sudo mkdir /opt/dynamic-storage
@ -41,7 +43,7 @@ $ sudo chown -R nobody:nogroup /opt/dynamic-storage
$ sudo chmod 777 /opt/dynamic-storage
```
在 /etc/exports 文件中添加以下条目:
`/etc/exports` 文件中添加以下条目:
```
$ sudo vi /etc/exports
@ -62,17 +64,17 @@ $ sudo systemctl status nfs-kernel-server
![NFS-Service-Status-Kubernetes-Master-Ubuntu][1]
在工作节点上,使用以下 apt 命令安装 nfs-common 包。
在工作节点上,使用以下 `apt` 命令安装 `nfs-common` 包。
```
$ sudo apt install nfs-common -y
```
### 步骤 2) 安装和配置 NFS 客户端配置程序
### 步骤 2安装和配置 NFS 客户端配置程序
NFS 子目录外部配置程序在 Kubernetes 集群中部署 NFS 客户端配置程序。配置程序负责动态创建和管理由 NFS 存储支持的持久卷 (PV) 和持久卷声明 (PVC)
NFS 子目录外部配置程序在 Kubernetes 集群中部署 NFS 客户端配置程序。配置程序负责动态创建和管理由 NFS 存储支持的持久卷PV和持久卷声明PVC
因此,要安装 NFS 子目录外部配置程序,首先使用以下命令集安装 helm
因此,要安装 NFS 子目录外部配置程序,首先使用以下命令集安装 `helm`
```
$ curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
@ -80,13 +82,13 @@ $ chmod 700 get_helm.sh
$ ./get_helm.sh
```
运行以下命令来启用 helm 仓库:
运行以下命令来启用 `helm` 仓库:
```
$ helm repo add nfs-subdir-external-provisioner https://kubernetes-sigs.github.io/nfs-subdir-external-provisioner
```
使用以下 helm 命令部署配置程序:
使用以下 `helm` 命令部署配置程序:
```
$ helm install -n nfs-provisioning --create-namespace nfs-subdir-external-provisioner nfs-subdir-external-provisioner/nfs-subdir-external-provisioner --set nfs.server=192.168.1.139 --set nfs.path=/opt/dynamic-storage
@ -94,7 +96,7 @@ $ helm install -n nfs-provisioning --create-namespace nfs-subdir-external-provis
![helm-install-nfs-provisioning-kubernetes-cluster][2]
上面的 helm 命令将自动创建 nfs-provisioning 命名空间,并安装 nfs 配置程序 pod/部署、名称为 (nfs-client) 的存储类,并将创建所需的 rbac。
上面的 `helm` 命令将自动创建 `nfs-provisioning` 命名空间,并安装 NFS 配置程序的容器荚/部署、名称为 `nfs-client` 的存储类,并将创建所需的 rbac。
```
$ kubectl get all -n nfs-provisioning
@ -103,11 +105,11 @@ $ kubectl get sc -n nfs-provisioning
![kubectl-get-all-nfs-provisioning-kubernetes-cluster][3]
完美,上面的输出确认了配置程序 Pod 和存储类已成功创建。
完美,上面的输出确认了配置程序容器荚和存储类已成功创建。
### 步骤 3) 创建持久卷声明 (PVC)
### 步骤 3、创建持久卷声明PVC
让我们创建 PVC 来为你的 Pod 或部署请求存储。PVC 将从 StorageClassnfs-client请求特定数量的存储。
让我们创建 PVC 来为你的容器荚或部署请求存储。PVC 将从存储类 `nfs-client` 请求特定数量的存储:
```
$ vi demo-pvc.yml
@ -129,7 +131,7 @@ spec:
![PVC-Yaml-Dynamic-NFS-Kubernetes][4]
运行以下 kubectl 命令以使用上面创建的 yml 文件创建 pvc
运行以下 `kubectl` 命令以使用上面创建的 YML 文件创建 PVC
```
$ kubectl create -f demo-pvc.yml
@ -143,11 +145,11 @@ $ kubectl get pv,pvc -n nfs-provisioning
![Verify-pv-pvc-dynamic-nfs-kubernetes-cluster][5]
太好了,上面的输出表明 pv 和 pvc 创建成功。
太好了,上面的输出表明 PV 和 PVC 创建成功。
### 步骤 4) 测试并验证动态 NFS 配置
### 步骤 4测试并验证动态 NFS 配置
为了测试和验证动态 nfs 配置,请使用以下 yml 文件启动测试 Pod
为了测试和验证动态 NFS 配置,请使用以下 YML 文件启动测试容器荚
```
$ vi test-pod.yml
@ -177,13 +179,13 @@ spec:
![Pod-Yml-Dynamic-NFS-kubernetes][6]
使用以下 kubectl 命令部署 pod
使用以下 `kubectl` 命令部署容器荚
```
$ kubectl create -f test-pod.yml
```
验证 test-pod 的状态:
验证 `test-pod` 的状态:
```
$ kubectl get pods -n nfs-provisioning
@ -191,7 +193,7 @@ $ kubectl get pods -n nfs-provisioning
![Verify-Test-Pod-Using-NFS-Volume-Kubernetes][7]
登录到 pod 并验证 nfs 卷是否已安装。
登录到容器荚并验证 NFS 卷是否已安装。
```
$ kubectl exec -it test-pod -n nfs-provisioning /bin/sh
@ -199,9 +201,9 @@ $ kubectl exec -it test-pod -n nfs-provisioning /bin/sh
![Access-Dynamic-NFS-Inside-Pod-Kubernetes][8]
太棒了,上面 Pod 的输出确认了动态 NFS 卷已安装且可访问。
太棒了,上面容器荚的输出确认了动态 NFS 卷已安装且可访问。
最后删除 pod 和 PVC查看 pv 是否自动删除。
最后删除容器荚和 PVC查看 PV 是否自动删除。
```
$ kubectl delete -f test-pod.yml
@ -213,6 +215,8 @@ $ kubectl get pv,pvc -n nfs-provisioning
这就是这篇文章的全部内容,希望对你有所帮助。请随时在下面的评论部分发表你的疑问和反馈。
*题图MJ/75dae36f-ff68-4c63-81e8-281e2c239356*
--------------------------------------------------------------------------------
via: https://www.linuxtechi.com/dynamic-nfs-provisioning-kubernetes/
@ -220,7 +224,7 @@ via: https://www.linuxtechi.com/dynamic-nfs-provisioning-kubernetes/
作者:[Pradeep Kumar][a]
选题:[lkxed][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
@ -235,3 +239,4 @@ via: https://www.linuxtechi.com/dynamic-nfs-provisioning-kubernetes/
[7]: https://www.linuxtechi.com/wp-content/uploads/2023/06/Verify-Test-Pod-Using-NFS-Volume-Kubernetes.png
[8]: https://www.linuxtechi.com/wp-content/uploads/2023/06/Access-Dynamic-NFS-Inside-Pod-Kubernetes.png
[9]: https://www.linuxtechi.com/wp-content/uploads/2023/06/Delete-Pod-PVC-Dynamic-NFS.png
[0]: https://img.linux.net.cn/data/attachment/album/202307/28/222834togtruhoeuh3gtr1.jpg

View File

@ -0,0 +1,192 @@
[#]: subject: "Every Year is Someone's Year of Linux Desktop"
[#]: via: "https://news.itsfoss.com/filiming-with-foss-tech/"
[#]: author: "Community https://news.itsfoss.com/author/team/"
[#]: collector: "lkxed"
[#]: translator: "ChatGPT"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-16041-1.html"
每年都是某个人的 “Linux 桌面之年”
======
当我的第一部特别电影获得批准时,我正处于为期两年的 Linux 实验中。我是如何使用(大多数)开源软件技术制作我的电影的呢?
![][0]
我在 2020 年爱上了 Linux。时机不可能更尴尬了。
世界卫生组织宣布我们这一生中的第一次大流行病降临。我刚刚从工作中休假,打算利用这段时间完成硕士学位,并完成我处女作《第一次言辞》的续集。
但作家是一群善变的人。有时我们的注意力可以持续数周,锐利无比。有时,我们的注意力却像金鱼一样短暂。
那时我处在金鱼模式中。
我需要一些东西来逃离我日复一日的生活:醒来,写几个小时,开始学习,完成课程作业,重复。
互联网上的某个地方有人提到,大流行病为人们提供了在日常计算中尝试 Linux 的最佳机会。
立刻,金鱼般的大脑被吸引住了。
这是有充分理由的:
20 年前,我放弃了电影学院,选择攻读计算机科学学士学位。
令我惊讶的是我发现自己喜欢上了大部分课程直到我们学习《Java 编程入门》时,我因此退学了,但这是另外一个故事);《计算机体系结构》、《网络》和《系统管理》模块真的引起了我的兴趣,我发现自己在学校实验室里花更多时间在安装了 Linux 的机器上。
关键是我和 Linux 之间有历史。
而在 2020 年,时机刚刚好。
### 疫情期间的技术爱好者生活
在我退学后的几年里,我远离了计算机引发我内心的那些好奇心。
作为对电影学院的替代,我成为了一名小说家。
我从信息技术转向了市场营销,并花费了 20 多年的时间为平面、电视、广播和数字平台撰写广告文案。
我创办了自己的广告代理公司。
在这 20 年里,我们目睹了社交媒体与互联网变得同义。
到了 2020 年,我决定永远离开广告界,其中很大一部分原因是我对技术的幻想破灭,尤其是对社交媒体的失望,特别是社交媒体以冷漠的方式伤害我们,无论是个人还是整个社会。
虽然我知道社交媒体并不等同于互联网,但在我的脑海中很难将它们分开。作为一个广告人,我也觉得自己在使社交媒体无处不在方面起到了一定的作用。
**拥有自己的 Linux 桌面之年,在整个大流行期间让我保持理智。**
### 2022 年:我首部特别电影
到了 2022 年,我已经在我的笔记本电脑上日常使用 Linux。我还买了一台旧的 ThinkPad T420安装了 Ubuntu Server并开始运行 Plex 和 NextCloud 的实例。
我在 Linux 上感到很自在,几乎将所有的写作工作都从 MS Word 和云存储转移到了 Vim 和 GitHub 上。
就在这时,我接到了一位制片人的电话,批准了我的首部特别电影。
此时我需要做一个决定。在片场剪辑镜头时我需要使用行业标准的非线性编辑器NLE。我对 Adobe Premiere 很熟悉,但我知道没有 Linux 版本。我已经尝试过 Kden Live 和其他几个自由开源软件的替代品,包括内置 NLE 的 Blender但都不太满意。
更重要的是,我担心我的写作流程 —— 完全基于NeoVim 和 Git ——对我的合作作者来说太陌生。
### 你好Windows
此时,我不得不问自己 Linux 是否准备好应对我未来的电影工作。为了回答这个问题,我提醒自己以下几点:
#### Linux 对非技术人员/非程序员来说是开放的(且易于接触)
我已经足够老了,记得当年 Ubuntu Linux 免费向世界上的任何人寄送安装光盘。那时我遇到了一系列我无法解决的硬件问题而且在我主要工具MS Word的高质量替代品方面非常匮乏。
到了 2020 年代Linux 已经变得截然不同。安装过程非常简单,帮助文档非常详尽,还有 Linux 的 YouTube 资源,使过渡变得更加顺利,我所有的硬件都完美地工作,我准备彻底放弃 MS Word。
#### Git 是作家的(秘密)好朋友
自从我第一次理解了 Git 的含义和它的用途以来,我就一直这样认为:不向作家教授 Git 是一种罪过。Linus Torvalds 无意间创造了作家的好朋友。
是的,我知道当 Git 无法正常工作时会有多么令人沮丧,但是将软件工程师处理大型代码库、多人贡献的复杂 Git 工作流程剥离后,你会发现它核心的功能似乎刚好为数字时代的作家量身定制。
与此同时,我和我的合作作者面临两个问题。由于我们位于不同的大陆,我们需要一个满足以下条件的系统:
以一种不会将文件弄得一团糟而无法阅读的方式追踪更改(这样在 MS Word、谷歌文档上进行协作会非常痛苦
以行业标准格式格式化剧本,而无需购买 Final Draft 等剧本撰写软件。
Git 和 GitHub 满足了第一个要求。而专门为剧本撰写创建的标记语法 [Fountain][5] 解决了第二个问题。
#### Linux 和好莱坞
这可能会让很多人感到惊讶,但自上世纪 90 年代以来Linux 已经牢固地融入了好莱坞的后期制作工作流程中。
早在 1998 年《泰坦尼克号》这样具有标志性的电影的后期制作中Linux 就扮演了至关重要的角色。BlackMagic 的 <ruby>[达芬奇调色软件][7]<rt>aVinci Resolve</rt></ruby> 最初是一款在基于 CentOS 或 RHEL 的系统上运行的首选色彩分级工具。
如今,达芬奇调色软件已成为一款功能完备的编辑器,是电影制片人和 YouTuber 们的首选工具。对我们 Linux 用户而言,该公司继续提供其软件的免费版本以供 Fedora 和基于 Debian 的系统使用。对于 Arch 用户AUR 中也提供了一个达芬奇调色软件版本,尽管我没有亲自测试过。具体效果可能因人而异。
### 如何在大部分 FOSS 技术的支持下完成我的电影
让我分享一下我的电影制作工作流程。
#### 前期制作
##### 影片概念说明
我使用 NeoVim 和 Org 模式语法编写了 [影片概念说明][8]。Org 模式对于编写类似报告的文档结构非常有用。[Vim-org][10] 能够轻松将文档导出为 PDF、LaTeX、HTML 和 doc 格式。我喜欢将我的文档保存为开放文件标准,以确保在各种设备间的可移植性,所以我选择了 PDF 格式。下面的截图是电影拍摄前的最终影片概念说明:
![影片概念说明][11]
##### 剧本
我与合作作者商定了一种简单的工作流程。我在一天的时间里向她介绍了 VSCode、Fountain、Git 和 GitHub 的基本知识,之后她就得心应手了。此后的合作过程基本上是无缝的,基于 Git 的工作流程对我们两个人来说几乎成为自然而然的事情。请记住,我们两个人都不具备软件背景。下面的图片显示了 NeoVim 上正在编辑的 Fountain 剧本文件,而右侧的屏幕上是 [Zathura PDF 阅读器][12] 即时渲染的剧本。
![使用自由开源软件技术进行剧本创作][13]
#### 制作
##### 每日镜头回顾
我们在锡哈拉加雨林进行了主要拍摄,这是该国最古老的森林之一。我们在那里待了一个星期。我带上了我的日常使用机(一台运行 Ubuntu Studio 20.04 的 Dell XPS 9750在一天的拍摄结束后使用达芬奇调色软件来回顾当天的镜头。
##### 使用 Rsync 进行备份
负责备份每日镜头素材的工作人员会在主硬盘上进行备份,然后在其他外部存储设备上进行二次备份。由于我也带了我的 ThinkPad 服务器,我使用 [Rsync][14] 自动化进行备份。
#### 后期制作
##### 编辑
尽管我的 XPS 笔记本内部配置足以处理这个项目,但我并不打算在上面进行影片编辑。最初,我是在工作室的一台运行达芬奇调色软件的 Windows 机器上进行编辑的。不幸的是2022 年第二季度,斯里兰卡经济陷入了自由落体,该国已经无法偿还债务。燃料短缺和停电使得我无法前往工作室进行编辑工作,增加了我的困扰。
就在这时,我的调色师建议我们将项目转移到我的笔记本电脑上,这样我就可以在家工作。他多年来一直在 CentOS 上运行达芬奇调色软件,他认为在 Ubuntu 机器上做同样的工作没有问题。为了确保我可以进行快速编辑,他将代理素材转码为 [ProRes 422][15] 720p。
一旦我们克服了这些小问题,编辑本身就是非常稳定和无压力的操作。完成后,我的电影制作人朋友们都在问我一台运行 Linux 的笔记本电脑是如何处理这个项目的。
### 结论:我们到达目的地了吗?
在某个时刻,每个最近转向 Linux 的人都会参与到“Linux 桌面之年”的辩论中。
三年过去了,我的观念发生了变化:从理想主义(大约在 2030 年左右到现实主义永远不会发生再到我目前的立场《Linux 桌面之年》掌握在“技术探索者”的手中。
“技术探索者”被技术所吸引,有时超出主流的范畴。
而作为对社交媒体技术和大型科技公司感到幻灭的人,我正好处于尝试 Linux 桌面的理想状态。
如果以我的经验为例,大多数精通技术的人都可以实现 “Linux 桌面之年”。通过使用其他自由开源软件工具(如 Git、Fountain、Markdown、LaTeX、Org 模式和NeoVim我相信像我这样的小说家和电影制片人类型的人有足够的理由转向 Linux。
当然,如果 Black Magic 没有推出达芬奇调色软件的 Linux 版本,我就不能说这番话,但幸运的是,他们不是 Adobe 或微软。
要让人们接受 Linux 桌面,关键是专有软件的开发者们也要加入进来,承认 Linux 领域有一些用户需要与 Windows 和 Mac 领域同样的工具。如果这种情况发生,我们可能会看到 “Linux 桌面” 从梗成为现实。
> 📋 由斯里兰卡的小说家/电影制片人 [Theena Kumaragurunathan][17] 撰写。他的首部小说已在 [亚马逊 Kindle][18] 上发售,并且他的第一部长片正在筹备发行中。
*题图MJ/1bace6a9-5d11-4cae-921c-18a850b7bff1*
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/filiming-with-foss-tech/
作者:[Theena Kumaragurunathan][a]
选题:[lkxed][b]
译者ChatGPT
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/team/
[b]: https://github.com/lkxed/
[1]: https://news.itsfoss.com/content/images/size/w1304/2023/07/year-of-linux-desktop-1.png
[2]: https://www.amazon.com/First-Utterance-Miragian-Cycles-Book-ebook/dp/B08MBX8GRZ
[3]: https://www.cambridge.org/core/journals/law-and-social-inquiry/article/abs/is-facebook-the-internet-ethnographic-perspectives-on-open-internet-governance-in-brazil/CF7526E09C0E05DCD587DC8E0E01D9C1
[4]: https://news.itsfoss.com/configuring-vim-writing/
[5]: https://fountain.io/
[6]: https://www.linuxjournal.com/article/2494
[7]: https://www.blackmagicdesign.com/products/davinciresolve
[8]: https://www.studiobinder.com/blog/what-is-a-film-treatment-definition/#:~:text=A%20film%20treatment%20is%20a,or%20even%20purchasing%20your%20idea.
[9]: https://orgmode.org/
[10]: https://www.vim.org/scripts/script.php?script_id=3642
[11]: https://news.itsfoss.com/content/images/2023/07/filming-with-foss-tech.jpg
[12]: https://pwmt.org/projects/zathura/
[13]: https://news.itsfoss.com/content/images/size/w2400/2023/07/film-scripting-with-foss.jpg
[14]: https://www.wikiwand.com/en/Rsync
[15]: https://support.apple.com/en-us/HT202410
[16]: https://www.google.com/search?q=year+of+linux+desktop&sourceid=chrome&ie=UTF-8
[17]: https://theena.net/
[18]: https://www.amazon.com/First-Utterance-Miragian-Cycles-Book-ebook/dp/B08MBX8GRZ
[0]: https://img.linux.net.cn/data/attachment/album/202307/28/073821x1krrwlm1081jk8k.jpg

View File

@ -0,0 +1,140 @@
[#]: subject: "How to Install Jupyter Notebook in Debian or Ubuntu Linux"
[#]: via: "https://www.debugpoint.com/install-jupyter-ubuntu/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-16040-1.html"
如何在 Linux 中安装 Jupyter Notebook
======
![][0]
> 如何在 Ubuntu 或 Debian Linux 中安装 Jupyter Notebook 的简单教程。
[Jupyter][1] Notebook 是一款功能强大的基于 Web 的交互式开发工具,可让你创建和共享实时代码、可视化和交互式数据。其笔记本格式结合了代码和文本,使其成为数据探索、分析和协作项目的绝佳选择。
在本教程中,我们将逐步指导你在基于 Ubuntu 或 Debian 的系统上安装 Jupyter Notebook使你能够利用其多功能性并扩展编程能力。
### 安装 pip
在开始之前,请确保你的系统上已安装 `pip`Python 包安装程序)。如果你已经安装了 `pip`,则可以跳过此步骤。否则,请按照以下说明进行安装。你还可以访问 [此页面][2] 获取详细说明。
打开终端窗口(`Ctrl+Alt+T`)并输入以下命令,按回车键:
```
sudo apt updatesudo apt install python3-pip
```
系统可能会提示你输入密码。提供它并等待安装完成。
### 安装 virtualenv
尽管不是强制性的,但建议在 Jupyter Notebook 安装中通过此工具隔离你的工作环境。这可以确保你安装的任何更改或软件包都不会干扰系统的 Python 环境。要设置虚拟环境,请按照以下步骤操作:
在终端中,输入以下命令:
```
sudo apt install python3-virtualenv
```
等待安装完成。完成后,继续下一步。
### 创建虚拟环境
创建虚拟环境是一个简单的过程。以下是专门为 Jupyter Notebook 设置新虚拟环境的方法:
进入到要在其中创建虚拟环境的目录。在终端中运行以下命令:
```
virtualenv my-jupyter-env
```
此命令创建一个名为 `my-jupyter-env` 的新目录,其中将包含虚拟环境文件。
![create jupyter environment][3]
你还可以通过任何文件管理器验证该目录是否在你的主文件夹下创建成功。
![jupyter env folders][4]
输入以下命令激活虚拟环境:
```
source my-jupyter-env/bin/activate
```
你会注意到终端提示符发生变化,表明你现在位于虚拟环境中。
![activate the environment][5]
### 安装 Jupyter Notebook
激活虚拟环境后,你现在可以继续安装 Jupyter Notebook
在终端中,输入以下命令:
```
pip install jupyter
```
此命令会获取必要的包并在虚拟环境中安装 Jupyter Notebook。
![Installing jupyter using pip][6]
### 启动 Jupyter Notebook
安装完成后,你就可以启动 Jupyter Notebook
在终端中,输入以下命令:
```
jupyter notebook
```
执行命令后Jupyter Notebook 将启动,你应该看到类似于以下内容的输出:
![running jupyter notebook in Debian][7]
你的默认 Web 浏览器将打开,显示 Jupyter Notebook 界面。
![Jupyter notebook running in browser][8]
### 关闭并重新启动
如果要关闭 Notebook 服务器,请确保关闭并保存所有笔记。关闭浏览器。然后在终端窗口中按 `CTRL+C`。它会提示你是否要关闭服务器。输入 `Yes` 并按回车键。最后,关闭终端窗口。
要再次重新启动服务器,你需要按上面的描述运行 `virtualenv my-jupyter-env` 等所有命令
### 总结
恭喜! 你已在 Ubuntu 或 Debian 系统上成功安装 Jupyter Notebook。通过执行上述步骤你现在可以利用 Jupyter 的交互式开发环境轻松编写代码、创建可视化并探索数据。
请记住Jupyter Notebook 支持各种编程语言,包括 Python并提供大量插件来进一步扩展其功能。
*题图MJ/e3436c7f-435d-491e-9032-b945730cb000*
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/install-jupyter-ubuntu/
作者:[Arindam][a]
选题:[lkxed][b]
译者:[geekpi](https://github.com/geekpi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.debugpoint.com/author/admin1/
[b]: https://github.com/lkxed/
[1]: https://jupyter.org/
[2]: https://www.debugpoint.com/pip-command-not-found/
[3]: https://www.debugpoint.com/wp-content/uploads/2023/07/create-jupyter-environment.jpg
[4]: https://www.debugpoint.com/wp-content/uploads/2023/07/jupyter-env-folders.jpg
[5]: https://www.debugpoint.com/wp-content/uploads/2023/07/active-the-environment.jpg
[6]: https://www.debugpoint.com/wp-content/uploads/2023/07/Installing-jupyter-using-pip.jpg
[7]: https://www.debugpoint.com/wp-content/uploads/2023/07/running-jupyter-notebook-in-Debian.jpg
[8]: https://www.debugpoint.com/wp-content/uploads/2023/07/Jupyter-notebook-running-in-browser.jpg
[0]: https://img.linux.net.cn/data/attachment/album/202307/28/063430e6lz9elvz4pw55l4.jpg

View File

@ -0,0 +1,154 @@
[#]: subject: "Bash Basics Series #6: Handling String Operations"
[#]: via: "https://itsfoss.com/bash-strings/"
[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-16047-1.html"
Bash 基础知识系列 #6:处理字符串操作
======
![][0]
在大多数编程语言中,你都会找到字符串数据类型。字符串基本上是一组字符。
但 Bash shell 有所不同。字符串没有单独的数据类型。这里一切都是变量。
但这并不意味着你不能像在 C 和其他编程语言中那样处理字符串。
在 Bash Shell 中可以查找子字符串、替换子字符串、连接字符串以及更多字符串操作。
在 Bash 基础知识系列的这一部分中,你将学习基本的字符串操作。
### 在 Bash 中获取字符串长度
让我们从最简单的选项开始。也就是获取字符串的长度。这很简单:
```
${#string}
```
让我们在示例中使用它。
![Example of getting string length in bash][1]
正如你所看到的,第二个示例中有两个单词,但由于它用引号引起来,因此它被视为单个单词。连空格都算作一个字符。
### 在 Bash 中连接字符串
用技术术语来说是字符串 <ruby>连接<rt>concatenation</rt></ruby>,这是 Bash 中最简单的字符串操作之一。
你只需像这样一个接一个地使用字符串变量:
```
str3=$str1$str2
```
还能比这更简单吗?我觉得不能。
让我们看一个例子。这是我的示例脚本,名为 `join.sh`
```
#!/bin/bash
read -p "Enter first string: " str1
read -p "Enter second string: " str2
joined=$str1$str2
echo "The joined string is: $joined"
```
以下是该脚本的运行示例:
![Join two strings in bash][2]
### 在 Bash 中提取子字符串
假设你有一个包含多个字符的大字符串,并且你想要提取其中的一部分。
要提取子字符串,需要指定主字符串、子字符串的起始位置和子字符串的长度,如下所示:
```
${string:$pos:$len}
```
> 💡 和数组一样,字符串中的定位也是从 0 开始。
这是一个例子:
![Extracting substring in bash][3]
即使你指定的子字符串长度大于字符串长度,它也只会到达字符串末尾。
### 替换 Bash 中的子字符串
假设你有一个大字符串,并且你想用另一个字符串替换其中的一部分。
在这种情况下,你可以使用这种语法:
```
${string/substr1/substr2}
```
> ✋ 只有第一次出现的子字符串才会以这种方式替换。如果要替换所有出现的地方,请使用 `${string//substr1/substr2}`
这是一个例子:
![Replace substring in bash][4]
正如你在上面看到的“good” 一词被替换为 “best”。我将替换的字符串保存到同一字符串中以更改原始字符串。
> 💡 如果未找到子字符串,则不会替换任何内容。它不会导致错误。
### 在 Bash 中删除子字符串
我们来谈谈删除子字符串。假设你要删除字符串的一部分。在这种情况下,只需将子字符串提供给主字符串,如下所示:
```
${string/substring}
```
> ✋ 通过这种方式,仅删除第一次出现的子字符串。如果要删除所有出现的内容,请使用 `${string//substr}`
如果找到子字符串,则将从字符串中删除它。
让我们通过一个例子来看看。
![Delete substring in bash][5]
不用说,如果没有找到子字符串,则不会删除它。它不会导致错误。
### 🏋️ 练习时间
现在是你通过简单练习来实践字符串操作的时候了。
**练习 1**:声明一个字符串 “I am all wet”。现在通过用 “set” 替换单词 “wet” 来更改此字符串。
**练习 2**:创建一个字符串,以 `112-123-1234` 格式保存电话号码。现在,你必须删除所有 `-`
这应该会给你一些在 Bash 中使用字符串的不错的练习。在下一章中,你将学习如何在 Bash 中使用 `if-else` 语句。敬请关注。
*题图MJ/aa73b2c9-6d2f-42e2-972d-94fab56d30cc*
--------------------------------------------------------------------------------
via: https://itsfoss.com/bash-strings/
作者:[Abhishek Prakash][a]
选题:[lkxed][b]
译者:[geekpi](https://github.com/geekpi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/abhishek/
[b]: https://github.com/lkxed/
[1]: https://itsfoss.com/content/images/2023/07/bash-string-length-example.png
[2]: https://itsfoss.com/content/images/2023/07/join-strings-bash.png
[3]: https://itsfoss.com/content/images/2023/07/extract-substring-bash.png
[4]: https://itsfoss.com/content/images/2023/07/replace-substring-bash.png
[5]: https://itsfoss.com/content/images/2023/07/bash-delete-substring.png
[0]: https://img.linux.net.cn/data/attachment/album/202307/30/090030gvm6pgutlvzll4zg.jpg

View File

@ -0,0 +1,159 @@
[#]: subject: "Linux Shells: Bash, Zsh, and Fish Explained"
[#]: via: "https://www.debugpoint.com/linux-shells/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lkxed"
[#]: translator: "ChatGPT"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-16038-1.html"
Linux Shell 介绍Bash、Zsh 和 Fish
======
![][0]
> 关于著名的 Linux Shell - Bash、Zsh 和 Fish 的一些注释和特性。
Linux 之所以强大是因为它提供了用于与系统进行交互的多功能的命令行界面。在这中情况下Shell 扮演了用户和 Linux 内核之间的桥梁。本文将探讨三种流行的 Linux Shell - Bash、Zsh 和 Fish并深入了解它们的独特特性和功能。
### 理解 Linux Shell
#### 什么是 Shell
Shell 是一个命令行解释器,允许你通过文本命令与操作系统进行交互。它接收你的输入,处理它,并与 Linux 内核通信以执行所请求的操作。最后,它会给你一个输出。
LCTT 译注“Shell” 一词大约取自其“界面”、“外壳”的含义。)
Shell 在 Linux 中起着至关重要的作用,因为它们使用户能够执行各种任务,从简单的文件导航到复杂的系统管理任务。不同的 Shell 提供各种功能,因此选择适合你工作流程的 Shell 至关重要。
### Bash
[Bash][1],全称 “Bourne Again SHell”是 Linux 发行版中最广泛使用的默认 Shell 之一。它以其简洁和兼容性而闻名,是初学者的优秀选择。
#### Bash 的特点
Bash 具有众多特性,包括:
- 命令历史:使用箭头键轻松访问先前执行的命令。
- `Tab` 键补全:节省时间,让 Bash 为你自动完成文件名和命令。
- 脚本编写:编写和运行 Shell 脚本以自动化重复任务。从这个角度来看,它也是一个程序。
- Bash 在大多数 GNU/Linux 系统中默认安装。
- 配置设置存储在家目录下的 `.bashrc` 文件中。
和其他 Shell 一样Bash 有其优点和缺点。使用 Bash 的一些优势包括广泛的使用性、详尽的文档以及庞大的社区支持。然而Bash 可能缺乏其他 Shell 中存在的一些现代化特性。
![Linux 中的 Bash shell][2]
#### 安装
- 在 Linux 发行版中打开终端。
- 输入 `bash --version` 检查是否已安装 Bash。
- 若尚未安装,使用软件包管理器安装 Bash。例如在 Ubuntu 上,输入 `sudo apt-get install bash`
- 对于 Fedora 和基于 RPM 的 Linux请使用 `sudo dnf install bash`
### Zsh
[Zsh][3],全称 “Z Shell”是一种强大且功能丰富的 Shell深受经验丰富的用户欢迎。它吸取了 Bash 和其他 Shell 的优点,提升了用户体验。
#### Zsh 的优势
Zsh 提供了几个优势,包括:
- 高级自动补全Zsh 在 Bash 的基础上提供了更多上下文感知的建议,超越了简单的 `Tab` 键补全。
- 当你按下 `Tab` 键时Zsh 会显示可能的值以供选择,同时进行自动补全。
- 插件支持:通过社区中提供的各种插件,扩展 Zsh 的功能。
- 这里有一个 [庞大的 Zsh 主题集合][4]。
- 你还可以使用 [Oh My Zsh 脚本][5] 进行广泛的自定义。
![应用 powerlevel10k zsh 主题后的效果][6]
Zsh 的复杂性可能使新手感到不知所措,其丰富的配置选项可能会使初学者感到困惑。
以下是安装 Zsh 的方法:
- 在 Linux 发行版中打开终端。
- 输入 `zsh --version` 检查是否已安装 Zsh。
- 如果尚未安装,请使用软件包管理器安装 Zsh。
- 例如,在 Ubuntu 上,输入 `sudo apt-get install zsh`
- 对于 Fedora 和基于 RPM 的发行版,输入 `sudo dnf install zsh`
### Fish Shell
[Fish][7],全称 “Friendly Interactive SHell”着重于用户友好性和易用性。它拥有现代、直观的界面特别适合新的 Linux 用户。
#### Fish 的独特特性
Fish 的独特之处在于:
- 语法高亮:使用彩色标记文本来区分命令、选项和参数。
- 自动建议Fish 根据你的历史记录和当前输入智能地建议命令。
- Fish 被设计为开箱即用的高效工具。但是,你可以通过创建 `~/.config/fish/config.fish` 文件并添加自定义配置来进一步个性化它。
虽然 Fish 在用户友好性方面表现出色,但其独特的设计可能并不适合所有人。一些高级用户可能会发现某些功能在高级使用方面有所限制。
![Fish Shell][8]
#### Fish Shell 的安装
- 在 Linux 发行版中打开终端。
- 输入 `fish --version` 检查是否已安装 Fish。
- 如果尚未安装,请使用软件包管理器安装 Fish。例如在 Ubuntu 上,输入 `sudo apt-get install fish`
- 对于 Fedora 和其他基于 RPM 的发行版,输入 `sudo dnf install fish`
### Bash、Zsh 和 Fish 的比较
为了帮助你决定哪种 Shell 适合你的需求,让我们从各个方面比较这三个流行选择:
#### 性能与速度
Bash 以其速度和高效性而闻名适用于资源受限的系统。Zsh 虽然稍慢一些,但其广泛的功能和能力弥补了这一点。作为更具交互性的 ShellFish Shell 可能会略微降低性能,但提供了愉快的用户体验。
#### 用户界面和体验
Bash 的界面简单明了,非常适合初学者,而 Zsh 和 Fish 提供了更引人注目和交互式的界面。Zsh 的高级自动补全和 Fish 的语法高亮为用户创造了视觉上的吸引力。
#### 可定制性和插件
Zsh 在可定制性方面表现出色,允许用户对其 Shell 环境进行微调。通过庞大的插件集合Zsh 提供了无与伦比的可扩展性。Fish 则采取了更有主见的方式,专注于开箱即用的可用性,这可能对某些用户有所限制。
### 选择合适的 Shell
选择合适的 Shell 与你的具体需求和经验水平密切相关。
如果你是 Linux 的新手并且更喜欢简单、无花俏的体验Bash 是一个极好的起点。它的易用性和详尽的文档使其非常适合初学者。
对于希望更多掌握控制权并愿意花时间进行定制的经验丰富的用户来说Zsh 强大的功能和插件提供了一个令人兴奋和动态的环境。
如果你对自动化任务和编写复杂的 Shell 脚本感兴趣Bash 在 Linux 生态系统中的广泛应用和全面支持使其成为一个可靠的选择。
### 结论
Bash、Zsh 和 Fish 各有其优势,满足不同用户偏好。如果你刚接触 LinuxBash 的简单性使其成为一个极好的起点。精通用户和那些寻求定制化的用户可能会觉得 Zsh 更吸引人,而 Fish 的用户友好设计则适合寻求直观界面的初学者。最终,选择权在你手中,探索这些 Shell 将带来更高效和愉悦的 Linux 使用体验。
你最喜欢的 Shell 是什么?在下方的评论框中告诉我。
*题图MJ/b6490b57-63bd-4fdd-bd3f-bf6d4aef1c4a*
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/linux-shells/
作者:[Arindam][a]
选题:[lkxed][b]
译者ChatGPT
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.debugpoint.com/author/admin1/
[b]: https://github.com/lkxed/
[1]: https://www.gnu.org/software/bash/
[2]: https://www.debugpoint.com/wp-content/uploads/2023/07/Bash-shell-in-Linux.jpg
[3]: https://www.zsh.org/
[4]: https://github.com/unixorn/awesome-zsh-plugins
[5]: https://www.debugpoint.com/oh-my-zsh-powerlevel10k/
[6]: https://www.debugpoint.com/wp-content/uploads/2022/12/After-applying-settings-in-powerlevel10k-zsh-theme.jpg
[7]: https://fishshell.com/
[8]: https://www.debugpoint.com/wp-content/uploads/2023/07/Fish-Shell.jpg
[9]: https://pixabay.com/users/julesroman-359800/
[0]: https://img.linux.net.cn/data/attachment/album/202307/27/152721rd48wwn7xxfkngdw.jpg

View File

@ -0,0 +1,189 @@
[#]: subject: "Top 5 Privacy Focused Linux Distributions [Compared]"
[#]: via: "https://www.debugpoint.com/privacy-linux-distributions-2022/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lkxed"
[#]: translator: "ChatGPT"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-16034-1.html"
5 个专注于隐私保护的 Linux 发行版
======
![][0]
> 我们在这篇文章中列出了 2023 年排名前 5 的专注于隐私保护的 Linux 发行版,旨在提供给你在选择之前的参考。
随着疫情和远程办公的普及,网络隐私成为一个主要关注点。随着我们越深入数字世界,网络安全和隐私变得对每个人的日常生活都至关重要。几乎每天都会看到 [公共漏洞CVE][1],一个月中也会爆出几个 [零日漏洞][2] 和勒索软件攻击。
幸运的是,与 Windows 相比Linux 通常在设计上就相对安全。此外,如果你在日常工作中使用 Linux 发行版时遵循一些最佳实践,大多数 Linux 发行版也是安全的。
此外,一些特定的 [Linux 发行版][3] 为你的工作和个人使用提供了额外的安全层和工具。例如,如果你想在互联网上实现完全匿名,或者你是网络安全专家,你可能会考虑一些区别于普及的主流 Linux 发行版,如 Ubuntu 或 Fedora 的其他发行版。
以下是提供更好隐私保护和安全性的 5 个 Linux 发行版的列表。
### 2023年度最佳隐私专用 Linux 发行版
#### 1、Tails
<ruby>匿名隐私系统<rt>The Amnesic Incognito Live System</rt></ruby>(简称 Tails是一种基于 Debian 的 Linux 发行版,让你在浏览网页时完全匿名。它主要使用 Tor 网络,通过其网络重定向流量以隐藏你的位置和其他私密信息。此外,它还配备了处理电子邮件、浏览器和其他工具所需的所有必要安全应用程序。
如果你需要一种内置完全隐私功能的 Linux 发行版,请选择 Tails。
![Tails][4]
优点:
- 与 Tor 网络完美集成
- 预配置了 NoScript、HTTPS anywhere 和其他相关插件的浏览器Firefox
- 内置比特币钱包、无线网络审计工具,并配备 Onion Circuits
- <ruby>立付介质<rt>Live medium</rt></ruby>
更多详情:
- 主页:[https://tails.boum.org/][5]
- 发行频率:每年 5 到 6 次发布
- 发行类型Debian稳定版、GNOME、LIVE 图像、仅支持 64 位、x86_64
- 下载:[https://tails.boum.org/install/index.en.html][6]
#### 2、Parrot OS
Parrot OS以前称为 Parrot Security OS也是一种基于 Debian 的 Linux 发行版,主要面向网络安全专业人员和渗透测试人员,为他们提供了一种完整的 Linux 发行版,提供了他们所需的所有工具。
此外,你还可以将其用作日常使用,具有用于数字取证工作的内置沙盒选项。此外,它可以使用其容器化技术连接到其他设备。
![Parrot OS 隐私专用 Linux 发行版][7]
优点:
- 基于 Debian 的立付系统
- 提供多种桌面风格选择
- 运行的应用程序都被隔离在沙盒中
- 非常适合数字取证工作
更多详情:
- 主页:[https://parrotsec.org/][8]
- 发行频率:每年 2 到 3 次发布
- 发行类型Debian测试版、MATE 和 KDE Plasma、LIVE 图像、仅支持 64 位、x86_64
- 下载:[https://parrotsec.org/download/][9]
#### 3、Qubes OS
Qubes OS 是一种基于 Fedora Linux 的独特 Linux 发行版。Qubes 提供多个“虚拟机”被称为“Qubes”用于托管应用程序。该方法有效地将“个人”、“工作”或其他用户定义的工作流程隔离开来。
此外,为了区分不同的“虚拟机”,该发行版为配置文件提供了色彩代码,以便你知道哪个正在运行哪个应用程序。
使用这种方法,如果你在一个“虚拟机”中遭受身份泄露或下载了恶意软件,系统的其他部分都是安全的。这种方法被称为“安全隔离”,非常适合需要在互联网上保护隐私的科技爱好者和普通用户。
![Qubes OS 隐私专用 Linux 发行版][10]
优点:
- 通过独立的“虚拟机”实现“安全隔离”
- 内置沙盒支持
- 提供完全磁盘加密
- 通过色彩代码标记的“Qubes”方便进行工作流程导航
更多详情:
- 主页:[http://qubes-os.org/][11]
- 发行频率:每年 2 到 3 次发布
- 发行类型Fedora、Xfce、桌面版、仅支持 64 位、x86_64
- 下载:[https://www.qubes-os.org/downloads/][12]
#### 4、Kali Linux
Kali Linux 是基于 Debian 测试分支的最受欢迎的渗透测试 Linux 发行版。以印度教女神“卡利”命名,这个 Linux 发行版提供了适用于树莓派和其他设备的 32 位、64 位和 ARM 版本。此外,它搭载了大量的工具,使安全研究人员和网络安全专家能够在其他发行版上拥有优势。
![Kali Linux 隐私专用 Linux 发行版][13]
优点:
- Kali Linux 几乎成为安全研究人员的“行业标准”发行版
- 提供完全磁盘加密
- 支持 i686、x86 和 ARM
- LIVE 系统
- 提供完善的文档,以及用于自定义 Kali Linux 进行特定研究的培训套件
- Kali Linux 提供付费的渗透测试认证课程
更多详情:
- 主页:[http://www.kali.org/][14]
- 发行频率:每年 3 到 4 次发布
- 发行类型Debian测试版、GNOME、KDE Plasma 等等、桌面版和 LIVE 等等、32 位和 64 位、x86_64、i686、ARM
- 下载:[http://www.kali.org/downloads/][15]
#### 5、Whonix Linux
Whonix 是另一种基于 Debian 的独特设计的 Linux 发行版。它作为虚拟机在 VirtualBox 中运行,从而提供了一个不能驻留在磁盘上、在多次重启后不会丢失的操作系统。
此外,其独特的设计提供了一个连接到 Tor 网络的网关组件,以及一个名为“工作站”的第二个组件,负责运行所有用户应用程序。这些用户应用程序连接到网关,为应用程序和用户提供完全匿名性。最后,这种独特的两阶段隔离方法在确保完全隐私的同时,减轻了多种风险。
![Whonix 隐私专用 Linux 发行版][16]
优点:
- 两阶段隔离,分离网络和用户应用程序
- 支持 Tor 网络,提供 Tor 浏览器和即时通讯等应用程序
- 预装了主要应用程序
- 支持 Linux 内核运行时保护
更多详情:
- 主页:[https://www.whonix.org/][17]
- 发行频率:每年发布 1 次
- 发行类型Debian、桌面版、Xfce、64 位、x86_64
- 下载:[https://www.whonix.org/][17]
### 其它
除了上述列表,我们还要提到 Linux Kodachi 和 BlackArch Linux它们与上述发行版本类似。
首先,[Linux Kodachi][18] 也是一个基于 Debian 的发行版,使用 Tor 网络为用户提供隐私保护。它配备了 Xfce 桌面环境并提供仅支持64位的安装程序。
除了 Kodachi还有 [BlackArch Linux][19],它是本列表中唯一基于 Arch Linux 的发行版。它采用了窗口管理器(如 Fluxbox、Openbox而不是桌面环境并提供了 1000 多个适用于渗透测试和安全分析的应用程序。
### 总结
最后,我希望这个 2023 年顶级隐私专注的 Linux 发行版列表能给你保护自己和你在互联网上的隐私提供一个起点。
最后但并非最不重要的是,我要提醒你,如果你将上述发行版与 Tor 网络一起使用,请不要使用这些发行版进行任何银行或金融交易(尤其是那些使用手机验证的多因素身份验证的交易)。因为 Tor 会通过不同的国家路由你的流量,因此最好不要在这些发行版上进行金融工作。
图像来自各个发行版及维基百科。
*题图MJ/0603df83-3221-4a15-9312-011325786414*
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/privacy-linux-distributions-2022/
作者:[Arindam][a]
选题:[lkxed][b]
译者ChatGPT
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.debugpoint.com/author/admin1/
[b]: https://github.com/lkxed/
[1]: https://en.wikipedia.org/wiki/Common_Vulnerabilities_and_Exposures
[2]: https://en.wikipedia.org/wiki/Zero-day_(computing)
[3]: https://www.debugpoint.com/category/distributions
[4]: https://www.debugpoint.com/wp-content/uploads/2022/04/Tails.jpg
[5]: https://tails.boum.org/
[6]: https://tails.boum.org/install/index.en.html
[7]: https://www.debugpoint.com/wp-content/uploads/2022/04/Parrot-OS.jpg
[8]: https://parrotsec.org/
[9]: https://parrotsec.org/download/
[10]: https://www.debugpoint.com/wp-content/uploads/2022/04/Qubes-OS.jpg
[11]: http://qubes-os.org/
[12]: https://www.qubes-os.org/downloads/
[13]: https://www.debugpoint.com/wp-content/uploads/2022/04/Kali-Linux.jpg
[14]: http://www.kali.org/
[15]: http://www.kali.org/downloads/
[16]: https://www.debugpoint.com/wp-content/uploads/2022/04/Whonix.jpg
[17]: https://www.whonix.org/
[18]: https://www.digi77.com/linux-kodachi/
[19]: http://blackarch.org/
[0]: https://img.linux.net.cn/data/attachment/album/202307/26/065805uggn1zamz3ztt11i.jpg

View File

@ -0,0 +1,226 @@
[#]: subject: "What are Exit Codes in Linux?"
[#]: via: "https://itsfoss.com/linux-exit-codes/"
[#]: author: "Pranav Krishna https://itsfoss.com/author/pranav/"
[#]: collector: "lkxed"
[#]: translator: "lxbwolf"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-16059-1.html"
Linux 中退出码的含义
======
![][0]
> 揭开 Linux 中退出码的神秘面纱。了解什么是退出码,以及为什么和如何使用它们。
退出码(退出状态)可以告诉我们最后一次执行的命令的状态。在命令结束以后,我们可以知道命令是成功完成的还是以错误结束的。
**其基本思想是,程序返回退出代码 `0` 时表示执行成功,没有问题。代码 `1``0` 以外的任何代码都被视为不成功。**
退出码除了 0 和 1 外还有很多值,我将在本文介绍它们。
### Linux Shell 中的各种退出码
我们来快速了解一下 Linux Shell 中的主要退出码:
| 退出码 | 解释 |
| :- | :- |
| `0` | 命令成功执行 |
| `1` | 通用错误代码 |
| `2` | 命令(或参数)使用不当 |
| `126` | 权限被拒绝(或)无法执行 |
| `127` | 未找到命令,或 `PATH` 错误 |
| `128+n` | 命令被信号从外部终止,或遇到致命错误 |
| `130` | 通过 `Ctrl+C``SIGINT` 终止_终止代码 2 或键盘中断_ |
| `143` | 通过 `SIGTERM` 终止_默认终止_ |
| `255/*` | 退出码超过了 0-255 的范围因此重新计算LCTT 译注:超过 255 后,用退出码对 256 取模) |
> 📋 `130``SIGINT` 或 `^C`)和 `143``SIGTERM`)等终止信号是非常典型的,它们属于 `128+n` 信号,其中 `n` 代表终止码。
在简单了解了退出码之后,我们来看看它们的用法。
### 获取退出码
前一个命令执行的退出码存储在 [特殊变量][1] `$?` 中。你可以通过运行以下命令来获取:
```
echo $?
```
我们在所有演示中都将使用它来获取退出代码。
请注意,`exit` 命令支持以带着前一条命令相同的退出码退出。
### 退出码 0
退出码 `0` 表示命令执行无误,这是完成命令的理想状态。
例如,我们运行这样一条基本命令
```
neofetch
echo $?
```
![][2]
这个退出码 `0` 表示特定命令已成功执行,仅此而已。让我们再演示几个例子。
你可以尝试 [终止一个进程][3];它也会返回代码 `0`
```
pkill lxappearance
```
![][4]
查看文件内容也会返回退出码 0这**仅**意味着 `cat` 命令执行成功。
### 退出码 1
退出码 `1` 也很常见。它通常表示命令以一般错误结束。
例如,在没有 sudo 权限的情况下使用 [软件包管理器][5],就会返回代码 `1`。在 Arch Linux 中,如果我运行下面的命令:
```
pacman -Sy
```
它会返回 `1` 表示上一条命令运行出错。
![exit code 1 (impermissible operation resulted in this code)][6]
> 📋 如果你在基于 Ubuntu 的发行版中尝试这样做(不使用 `sudo` 执行 `apt update`),运行后会得到错误码 `100`,表示你是在没有权限的情况下运行 `apt`。`100` 不是标准错误码,而是 `apt` 特有的错误码。
虽然这是一般的理解,但我们也可以将其解释为 “不被允许的操作”。
除以 `0` 等操作也会返回错误码 `1`
![Division by zero results in code 1][7]
### 退出码 2
这个退出码出现在当执行的命令有语法错误时。滥用命令参数也会导致此错误。
一般来说,它表示由于使用不当,命令无法执行。
例如,我在一个本应只有一个连字符的选项上添加了两个连字符,那么此时会出现退出码 2。
```
grep --z file.txt
```
![Invalid argument resulted in exit code 2][8]
当权限被拒绝时,比如访问 `/root` 文件夹,就会出现错误码 `2`
![Permission denied gives out code 2][9]
### 退出码 126
126 是一个特殊的退出码,它用于表示命令或脚本因权限错误而未被执行。
当你尝试执行没有执行权限的 Shell 脚本时,就会出现这个错误。
![][10]
请注意该退出码只出现在没有足够权限的脚本或命令的“_执行_”中这与一般的**权限被拒绝**错误不同。
因此,不要把它与你之前看到的退出码为 `2` 的示例混淆。在那个示例中,运行的是 `ls` 命令,权限问题出自它试图执行的目录。而本例中权限问题来自脚本本身。
### 退出码 127
这是另一个常见的退出码。退出码 `127` 指的是“[未找到命令][11]”。它通常发生在执行的命令有错别字或所需的可执行文件不在 `$PATH` 变量中时。
例如,当我尝试执行一个不带路径的脚本时,经常会看到这个错误。
![Script executed without the path gives "command not found" or code 127][12]
当你想运行的可执行文件不在 `$PATH` 变量中时,也会出现退出码 `127`。你可以通过 [在 PATH 变量中添加命令的目录][13] 来纠正这种情况。
当你输入不存在的命令时,也会得到这样的退出码。
![Unmount is not a command, and Screenfetch is not installed, which resulted in code 127][14]
### 退出码 128+n 系列
当应用程序或命令因致命错误而终止或执行失败时,将产生 128 系列退出码(`128+n`),其中 `n` 为信号编号。
`n` 包括所有类型的终止代码,如 `SIGTERM`、`SIGKILL` 等。
#### 退出码 130 或 SIGINT
在通过终止信号 `2` 或按下 `Ctrl+C` 中断进程时,会发出 `SIGINT`(键盘中断信号)。
因为终止信号是 `2`,所以我们得到的退出码是 `130`128+2。下面的视频演示了 `lxappearance` 的中断信号。
![](https:/itsfoss.com/content/media/2023/06/exit_code_128-n-SIGINT-_compressed.mp4)
#### 退出码 137 或 SIGKILL
`SIGKILL`(立即终止信号)表示终止信号 `9`。这是终止应用程序时最不应该使用的方法。
因为终止信号为 `9`,因此我们得到的退出代码为 `137`128+9
![](https://itsfoss.com/content/media/2023/06/exit_code_128-n-SIGKILL-_compressed.mp4)
#### 退出码 143 或 SIGTERM
`SIGTERM` 是进程在未指定参数的情况下被杀死时的默认行为。
`SIGTERM` 的终止信号为 `15`,因此该信号的退出码为 `143`128+15
![](https://itsfoss.com/content/media/2023/06/exit_code_128-n-SIGTERM-_compressed-1.mp4)
还有一些你以前可能不知道的终止信号,它们也有自己类似的退出码。你可以在这里查看它们:
> 📋 请注意,如果进程在启动它的同一会话中终止,这些信号可能不会出现。如果要重现这些信号,请从不同的 shell 终止。
>
> 就个人而言,信号 `128` 是无法重现的。
### 当退出码超过了 255 会怎样?
最新版本的 Bash 甚至保留了超过 255 的原始退出码的值,但一般来说,如果代码超过 255就会被重新计算。
也就是说,代码 `256` 会变成 `0``257` 会变成 `1``383` 会变成 `127`,以此类推。为确保更好的兼容性,请将退出码保持在 `0``255` 之间。
### 结语
希望你对 Linux Shell 中的退出码有所了解。在排查各种问题时,使用它们会非常方便。
如果你要在 Shell 脚本中使用这些代码,请确保你了解每个代码的含义,以便更容易地排除故障。
这就是本文的全部内容。如有遗漏,请在评论区告诉我。
*题图MJ/719ff711-1b9f-4aa9-a82e-980704acbdd8*
--------------------------------------------------------------------------------
via: https://itsfoss.com/linux-exit-codes/
作者:[Pranav Krishna][a]
选题:[lkxed][b]
译者:[lxbwolf](https://github.com/lxbwolf)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/pranav/
[b]: https://github.com/lkxed/
[1]: https://linuxhandbook.com:443/bash-special-variables/
[2]: https://itsfoss.com/content/images/2023/06/exit_code_0.png
[3]: https://itsfoss.com/how-to-find-the-process-id-of-a-program-and-kill-it-quick-tip/
[4]: https://itsfoss.com/content/images/2023/06/exit_code_0.gif
[5]: https://itsfoss.com/package-manager/
[6]: https://itsfoss.com/content/images/2023/06/exit_code_1.png
[7]: https://itsfoss.com/content/images/2023/06/exit_code_1-division_by_0-.png
[8]: https://itsfoss.com/content/images/2023/06/exit_status_2-misusing_arguments--1.png
[9]: https://itsfoss.com/content/images/2023/06/exit_code_2-permission_denied-.png
[10]: https://itsfoss.com/content/images/2023/06/exit_code_126.png
[11]: https://itsfoss.com/bash-command-not-found/
[12]: https://itsfoss.com/content/images/2023/06/exit_code_127.png
[13]: https://itsfoss.com/add-directory-to-path-linux/
[14]: https://itsfoss.com/content/images/2023/06/exit_code_127-command_not_found--1.png
[0]: https://img.linux.net.cn/data/attachment/album/202308/03/154628oloxp7sl6s1z4pbl.jpg

View File

@ -0,0 +1,119 @@
[#]: subject: "How to Access the GRUB Menu in Virtual Machine"
[#]: via: "https://itsfoss.com/access-grub-virtual-machine/"
[#]: author: "Sagar Sharma https://itsfoss.com/author/sagar/"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-16056-1.html"
如何访问虚拟机中的 GRUB 菜单
======
![][0]
> 需要在虚拟机中访问 GRUB 菜单吗?以下是做法。
大多数现代虚拟机都配置为跳过 [GRUB 引导加载程序][1] 以获得无缝体验。
但是,你有时可能需要访问 GRUB 菜单。例如,如果你想切换回旧内核或进入恢复模式以 [重置密码][2]。
> 💡 TLDR重启虚拟机并在再次启动时按住 `Shift` 键。这将为你提供 GRUB 菜单。
在这篇简短的文章中,我将向你展示两种访问虚拟机中运行的 Linux 中的 GRUB 菜单的方法:
- 临时方案(当你需要访问 GRUB 一两次时)
- 永久方案(每次启动时都会显示 GRUB
由于大多数用户不会每天与 GRUB 交互,因此我将从一个临时解决方案开始,你可以无需任何调整即可访问 GRUB。
> 📋 我在此处的教程中使用了 Ubuntu但这些步骤也适用于其他 Linux 发行版。
### 在虚拟机中访问 GRUB 引导加载程序(快速方式)
如果你偶尔想访问 GRUB这应该是最好的方法因为它不需要任何配置。
只需重新启动系统并按住 `shift` 键即可。
就是这样!
你将拥有没有任何时间限制的 GRUB 菜单:
![Accessing grub menu in VM using shift key][3]
很简单的方法。不是吗?
但它仅适用于特定的启动。那么如果你想在每次启动时都进入 GRUB 该怎么办呢? 请参考下面的方法。
### 永久在虚拟机中启用 GRUB 菜单(如果你愿意)
> 🚧 此方法需要在命令行中更改 GRUB 配置文件。请确保你能够轻松地在终端中进行编辑。
如果你需要处理 GRUB 菜单来访问其他操作系统或经常更改 [从旧内核启动][4],那么此方法非常适合你。
要使 GRUB 在每次引导时都可访问,你必须在配置文件中进行更改。
首先,使用以下命令打开 GRUB 配置文件:
```
sudo nano /etc/default/grub
```
在这里,将 `GRUB_TIMEOUT_STYLE=hidden` 更改为 `GRUB_TIMEOUT_STYLE=menu`
![change grub timeout style][5]
接下来,在同一个配置文件中,指定你希望 GRUB 显示的秒数。
我建议 5 秒,因为它似乎在太长和太短之间取得了平衡(是的,非常相关):
```
GRUB_TIMEOUT=5
```
![configure grub timeout in ubuntu][6]
最后,你可以 [保存更改并退出 nano][7] 编辑器。
要激活对配置文件所做的更改,请使用以下命令更新 GRUB
```
sudo update-grub
```
就是这样。重启系统GRUB 应该会显示 5 秒钟。
### 将 GRUB 主题化如何?
大多数 Linux 发行版都会使用 GRUB 引导加载程序,因为它的配置非常简单,而且能完成工作。
但在默认情况下,除了黑色背景和纯文本外,它没什么样式。因此,我们制作了一份指南,教你如何让它看起来更漂亮:
> **[定制 GRUB 以获得更好的体验][7a]**
希望本指南对你有所帮助,如果你有任何疑问,请在评论中告诉我。
*题图MJ/f75daf37-20c2-4bae-8a68-dc6a82ad0d61*
--------------------------------------------------------------------------------
via: https://itsfoss.com/access-grub-virtual-machine/
作者:[Sagar Sharma][a]
选题:[lkxed][b]
译者:[geekpi](https://github.com/geekpi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/sagar/
[b]: https://github.com/lkxed/
[1]: https://itsfoss.com/what-is-grub/
[2]: https://itsfoss.com/how-to-hack-ubuntu-password/
[3]: https://itsfoss.com/content/images/2023/07/access-GRUB-in-Ubuntu-VM.gif
[4]: https://itsfoss.com/boot-older-kernel-default/
[5]: https://itsfoss.com/content/images/2023/07/change-grub-style.webp
[6]: https://itsfoss.com/content/images/2023/07/configure-grub-timeout-in-ubuntu.webp
[7]: https://linuxhandbook.com/nano-save-exit/
[7a]: https://itsfoss.com/customize-grub-linux/
[0]: https://img.linux.net.cn/data/attachment/album/202308/02/112939auzwfwyghswuoq6z.jpg

View File

@ -0,0 +1,176 @@
[#]: subject: "How to Install and Access Kubernetes Dashboard Step-by-Step"
[#]: via: "https://www.linuxtechi.com/how-to-install-kubernetes-dashboard/"
[#]: author: "Pradeep Kumar https://www.linuxtechi.com/author/pradeep/"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-16064-1.html"
分步指南:安装和访问 Kubernetes 仪表板
======
![][0]
Kubernetes 是一个开源容器编排平台,已成为大规模管理容器化应用的首选解决方案。虽然 Kubernetes 提供了强大的命令行工具来管理集群但有时可视化界面可以使监控和管理部署变得更加容易。Kubernetes 仪表板是一个基于 Web 的用户界面,可让你可视化 Kubernetes 集群并与之交互。
在这篇博文中,我们将逐步引导你完成安装和访问 Kubernetes Dashboard 的过程,使你能够简化 Kubernetes 管理任务。
先决条件:
在安装 Kubernetes Dashboard 之前,请确保你有一个正在运行的 Kubernetes 集群并具有必要的管理访问权限。
### 安装 Kubernetes 仪表板
为集群安装 Kubernetes 仪表板的简单方法是通过 Helm Chart。Kubernetes 仪表板现在依赖于 cert-manager 和 nginx-ingress-controller。幸运的是可以使用 Helm Chart 自动安装这些依赖项。但是,如果你已经安装了这些组件,则可以在安装 Chart 时通过设置标志 `set=nginx.enabled=false``set=cert-manager.enabled=false` 来禁用它们的安装。
事不宜迟,让我们进入安装步骤。
#### 1安装 Helm
使用终端或命令提示符访问集群的主节点。如果没有安装,请安装 helm。运行以下命令。
```
$ curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
$ chmod 700 get_helm.sh
$ ./get_helm.sh
```
![][1]
#### 2添加 Kubernetes 仪表板 Helm 仓库
运行以下 `helm` 命令来添加仪表板仓库:
```
$ helm repo add kubernetes-dashboard https://kubernetes.github.io/dashboard/
$ helm repo list
```
![][2]
#### 3安装 Kubernetes 仪表板
要使用 `helm` 安装 Kubernetes 仪表板,请运行以下命令:
```
$ helm upgrade --install kubernetes-dashboard kubernetes-dashboard/kubernetes-dashboard --create-namespace --namespace kubernetes-dashboard
```
![][3]
上面的输出确认仪表板已部署在 `Kubernetes-dashboard` 命名空间中。因此,要访问仪表板,请运行:
```
$ kubectl -n kubernetes-dashboard port-forward svc/kubernetes-dashboard-nginx-controller 8443:443
```
![][4]
现在,打开运行上述命令的系统的 Web 浏览器,输入以下 URL
```
https://localhost:8443
```
![][5]
点击“<ruby>接受风险并继续<rt>Accept the Risk and Continue</rt></ruby>”。
![][6]
正如你在上面看到的,我们需要一个令牌才能登录。因此,让我们在下一步中生成所需的令牌。
#### 4为 Kubernetes 仪表板生成令牌
再打开一个到主节点的 SSH 会话,创建一个服务帐户并使用以下 yaml 文件分配所需的权限:
```
$ vi k8s-dashboard-account.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: admin-user
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: admin-user
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- kind: ServiceAccount
name: admin-user
namespace: kube-system
```
保存并退出文件。
接下来通过运行以下命令创建服务帐户:
```
$ kubectl create -f k8s-dashboard-account.yaml
serviceaccount/admin-user created
clusterrolebinding.rbac.authorization.k8s.io/admin-user created
$
```
现在,为管理员用户生成令牌,运行:
```
$ kubectl -n kube-system create token admin-user
```
![][7]
复制此令牌并返回浏览器,将其粘贴到“<ruby>输入令牌<rt>Enter token</rt></ruby>”字段中,如下所示:
![][8]
点击“<ruby>登录<rt>Login</rt></ruby>”。
#### 5) 访问 Kubernetes 仪表板
当我们点击上面的“登录”时,我们将看到以下仪表板:
![][9]
太好了,你现在已登录 Kubernetes 仪表板。以下是一些需要探索的关键特性和功能:
- 集群概览:获取集群运行状况、资源利用率和运行 Pod 的概览。
- 工作负载:查看和管理你的部署、副本集、有状态集和守护程序集。
- 服务:监控和管理你的服务,包括负载均衡器和外部端点。
- 配置:探索你的配置映射、密钥和持久卷声明。
- 存储:管理持久卷和存储类。
- 命名空间:在命名空间之间切换以查看和管理不同项目或团队的资源。
这就是这篇文章的全部内容,我希望你发现它有用且内容丰富。请在下面的评论部分发表你的疑问和反馈。
*题图MJ/1bd0efb0-d4ee-4c8b-854a-49dbf38c5dd7*
--------------------------------------------------------------------------------
via: https://www.linuxtechi.com/how-to-install-kubernetes-dashboard/
作者:[Pradeep Kumar][a]
选题:[lkxed][b]
译者:[geekpi](https://github.com/geekpi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.linuxtechi.com/author/pradeep/
[b]: https://github.com/lkxed/
[1]: https://www.linuxtechi.com/wp-content/uploads/2023/07/Install-Helm-on-K8s-master-node.png
[2]: https://www.linuxtechi.com/wp-content/uploads/2023/07/Helm-Repo-Kubernetes-Dashboard.png
[3]: https://www.linuxtechi.com/wp-content/uploads/2023/07/Installing-Kubernetes-Dashboard-Using-Helm-Command.png
[4]: https://www.linuxtechi.com/wp-content/uploads/2023/07/Port-Forwarding-Kubernetes-Dashboard-Kubectl-Command.png
[5]: https://www.linuxtechi.com/wp-content/uploads/2023/07/Accept-Risk-SSL-Kubernetes-Dashboard.png
[6]: https://www.linuxtechi.com/wp-content/uploads/2023/07/Token-For-Kubernetes-Dashboard-Login.png
[7]: https://www.linuxtechi.com/wp-content/uploads/2023/07/Generate-Token-K8s-Dashboard-kubectl-Command.png
[8]: https://www.linuxtechi.com/wp-content/uploads/2023/07/Click-Signin-After-entering-token-kubernetes-dashboard.png
[9]: https://www.linuxtechi.com/wp-content/uploads/2023/07/Kubernetes-Dashboard-Overview-Ubuntu.png
[0]: https://img.linux.net.cn/data/attachment/album/202308/05/132420lppzypd5fzvhz1dy.jpg

View File

@ -0,0 +1,127 @@
[#]: subject: "Anytype: An All-in-One Secure Open-Source App for Work and Productivity"
[#]: via: "https://news.itsfoss.com/anytype-open-beta/"
[#]: author: "Sourav Rudra https://news.itsfoss.com/author/sourav/"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-16070-1.html"
Anytype一款用于工作和生产力的一体化安全开源应用
======
> 一款适合所有人的新开源应用。尝试其公开测试版并查看它是否适合你。
![anytype][1]
Anytype 的口号是,“为那些崇尚信任和自主的人提供的一切应用”。它是一款新的**一体化安全开源个人 CRM 应用**,旨在提供一些令人印象深刻的功能。
他们联系我们来报道第一个公开测试版本,我们对此非常感兴趣。
请允许我带你了解一下。
### Anytype概述 ⭐
![a screenshot of the anytype website][2]
Anytype 是一个**本地优先**、**点对点P2P**的**开源**工具,**可用于各种任务**,例如**项目管理**、**存储文档**、**每日笔记**、**管理任务**、**书籍/文章/网站收藏**以及**甚至作为个人 CRM 软件**。
他们还计划以后可以让你管理/创建博客、社区维基和讨论。
本地优先意味着 Anytype **可以在本地运行,无需连接到互联网**,从而实现更好的可靠性、速度,以及最重要的安全性。
> 📋 Anytype 的源码可以在其 [GitHub 页面][3] 上找到。
不过,这**并不意味着它是一个仅限离线使用的工具**。你可以将其配置为通过互联网在多个平台上进行访问。
这之所以成为可能,是因为使用了 **Anysync 协议**,该协议**允许自托管**、**数据可移植性**和**实时 P2P 端到端加密协作**。
Anytype 作为模块化空间构建器和浏览器构建在 Anysync 之上,为用户提供了一套强大的工具来构建空间和基于图形的网站视图。
其背后的公司是一家**位于柏林的初创公司**[其开源理念][4] 似乎相当可靠。
除此之外Anytype 的一些最显著的功能包括:
- 可互操作的空间。
- 无需代码即可构建空间。
- 能够创建公共/私人/共享空间。
- 设备上加密。
- 跨平台。
- 自我托管的能力。
#### 初步印象
我在我的 [Ubuntu 22.04 LTS][5] 上尝试了 Anytype使用体验非常好。
当你首次启动该应用时,你将看到一个“<ruby>加入<rt>Join</rt></ruby>”或“<ruby>登录<rt>Login</rt></ruby>”屏幕。我使用“加入”选项在本地创建一个新帐户。
![a screenshot of anytype's dashboard][6]
之后,设置我的帐户并浏览欢迎屏幕。我被带到了一个**快速启动菜单**,其中有一堆**空间模板**可以开始使用。我选择了其中一个个人项目。
![a screenshot of anytype's quick-start menu][7]
之后,它带我进入“<ruby>我的主页<rt>My Homepage</rt></ruby>”,在这里我可以访问侧边栏菜单和一个包含所有内容概述的页面。
![a screenshot of anytype's my homepage screen][8]
从侧边栏菜单中,我进入“<ruby>我的项目<rt>My Projects</rt></ruby>”页面并选择了其中一个项目。它打开了一个块编辑器,让我可以直观地编辑文本。
> 📋 它还具有用于跟踪多个任务的任务跟踪器。
![a screenshot of an open project in anytype][9]
之后,我测试了“<ruby>我的笔记<rt>My Notes</rt></ruby>”功能。它运行良好,并且符合你对 [笔记应用][10] 的期望。它还具有块编辑器,我在日常工作中对其进行了测试,效果非常好。
我所有的植物都喂饱了,我的猫也浇水了!🤣
![a screenshot of an open note in anytype][11]
最后,我看了一下“<ruby>图表视图<rt>Graph View</rt></ruby>”。我对它的详细程度感到惊讶。Anytype 能够通过这种方式非常有效地说明所有数据点。
![a screenshot of anytype's graph view][12]
那么,总结一下。
我可以看到 Anytype 成为我日常工作流程的一部分。它拥有的工具数量可以帮助管理一个人的日常工作甚至学习习惯。
除此之外,我很高兴 Monica 现在有了一个合适的竞争对手。我迫不及待地想看看 Anytype 对此有何反应。
你可以通过 [ProductHunt 上的公告帖子][13] 进行更深入的研究。
### 📥 获取 Anytype
Anytype 可在 **Linux**、**Windows**、**Mac**、**iOS** 和 **安卓** 上使用。你可以前往[官方网站][14]获取你选择的包。
> **[Anytype][15]**
💬 你会尝试 Anytype 吗? 让我们知道!
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/anytype-open-beta/
作者:[Sourav Rudra][a]
选题:[lkxed][b]
译者:[geekpi](https://github.com/geekpi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/sourav/
[b]: https://github.com/lkxed/
[1]: https://news.itsfoss.com/content/images/size/w1304/2023/07/anytype.png
[2]: https://news.itsfoss.com/content/images/2023/07/Anytype.jpg
[3]: https://github.com/anyproto
[4]: https://blog.anytype.io/our-open-philosophy/
[5]: https://news.itsfoss.com/ubuntu-22-04-release/
[6]: https://news.itsfoss.com/content/images/2023/07/Anytype_1.jpg
[7]: https://news.itsfoss.com/content/images/2023/07/Anytype_2.jpg
[8]: https://news.itsfoss.com/content/images/2023/07/Anytype_3.jpg
[9]: https://news.itsfoss.com/content/images/2023/07/Anytype_4.jpg
[10]: https://itsfoss.com/note-taking-apps-linux/
[11]: https://news.itsfoss.com/content/images/2023/07/Anytype_5.jpg
[12]: https://news.itsfoss.com/content/images/2023/07/Anytype_6.jpg
[13]: https://www.producthunt.com/posts/anytype-2-0
[14]: https://anytype.io/
[15]: https://anytype.io/

View File

@ -0,0 +1,97 @@
[#]: subject: "The systemd Controversy: A Beginner's Guide to Understanding the Debate"
[#]: via: "https://itsfoss.com/systemd-init/"
[#]: author: "Bill Dyer https://itsfoss.com/author/bill/"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-16065-1.html"
systemd初学者如何理解其中的争议
======
![][0]
> 对于什么是 systemd以及为什么它经常成为 Linux 世界争议的焦点,你可能仍然感到困惑。我将尝试用简单的语言来回答。
在 Linux 世界中,很少有争议能像传统的 System V [初始化][1] 系统(通常称为 SysVinit和较新的 [systemd][2] 之间的斗争那样引起如此大的争议。
在这篇文章中,我将简要讨论什么是 systemd、它相对于传统初始化系统有哪些优点和缺点以及为什么它会引起争议。
### 什么是 systemd
systemd 是一个系统和服务管理器,于 2010 年首次推出,用于取代传统的 System V 初始化系统。它旨在提高启动速度并更有效地管理系统服务。如今systemd 是许多流行 Linux 发行版的默认初始化系统,包括 Ubuntu、Fedora 和 Red Hat Enterprise LinuxRHEL
### systemd 是守护进程吗?
尽管名字中带有 “d”但 systemd 并不是一个守护进程。相反,它是一个为 Linux 提供许多系统组件的软件套件。其目标是标准化 Linux 发行版的服务配置和行为。
systemd 的主要组件是一个“系统和服务管理器”,它充当初始化系统来引导用户空间并管理用户进程。它还提供了各种守护程序和实用程序的替代品,从设备和登录管理到网络连接管理和事件记录。
### systemd 的主要特性
systemd 具有许多功能,例如它能够主动并行化操作、方便按需启动守护进程、使用 Linux 控制组监视进程、管理挂载点和自动挂载点,以及实现复杂的基于事务依赖的服务控制逻辑。
此外systemd 支持 SysV 和 LSB 初始化脚本,作为 SysVinit 的替代品。它还提供了一个日志守护进程和用于管理基本系统配置的工具程序。
![systemd on fedora - Courtesy of Wikimedia][3]
### systemd 与 SysVinit争议
SysVinit 与 systemd 争论的核心围绕如何最好地管理基于 Linux 的系统。关注的范围从复杂性和兼容性到管理系统服务的最佳方式,涉及系统管理员和 Linux 爱好者面临的基本问题。
批评者认为 systemd 过于复杂和巨大化,使得故障排除变得更加困难。他们担心单点故障,因为所有服务都由一个守护进程管理,并且担心与 Linux 内核的紧密集成,这可能会限制向其他系统的可移植性。
这就是为什么有些人创建 [脱离 systemd 的发行版][4] 的原因。
然而,支持者称赞 systemd 提供了一种更高效、更现代的系统管理方法,其服务启动的并行性和守护进程的按需启动减少了启动时间并提高了系统响应能力。他们还赞扬其先进的日志记录功能。
尽管存在争议systemd 已成为许多 Linux 发行版的默认初始化系统,系统管理员和开发人员已经开始欣赏它的高级特性和功能。
### systemd 与 SysVinit 的优点和缺点
优点:
| SysVinit 的优点 | systemd 的优点 |
| :- | :- |
| 简单且熟悉 | 提高启动速度 |
| 尊重 Unix 哲学 | 标准化日志系统 |
| 更直接地控制系统服务 | 一致的服务管理方法 |
| 系统成熟稳定 | 与现代 Linux 系统和应用程序的兼容性 |
| 与遗留系统和应用的兼容性 | 来自大型开发者和贡献者社区的积极开发和支持 |
缺点:
| SysVinit 的缺点 | systemd 的缺点 |
| :- | :- |
| 与新的初始化系统相比功能有限 | 复杂性和陡峭的学习曲线 |
| 缺乏对服务并行启动的内置支持 | 有侵入性,可能会破坏与传统 Unix 工具和程序的兼容性 |
| 可能比新的初始化系统效率低,尤其是在大型系统上 | 某些系统可能会出现不稳定和崩溃的情况 |
| 对现代 Linux 系统和应用的有限支持 | 与尚未支持 systemd 的遗留系统和应用的兼容性有限 |
### 总结:个人观点
作为一名来自 UNIX 早期的 Linux 用户,我更倾向于传统的初始化系统。然而,尽管我最初有所抵触,但我已经开始接受 systemd并看到了它的一些好处。每个系统在 Linux 世界中都有自己的位置,了解这两个系统非常重要。
关于 systemd 的争论仍在继续。你对此有何看法?
*题图MJ/efce857c-2d1a-4bf0-a400-8eb60e9f3271*
--------------------------------------------------------------------------------
via: https://itsfoss.com/systemd-init/
作者:[Bill Dyer][a]
选题:[lkxed][b]
译者:[geekpi](https://github.com/geekpi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/bill/
[b]: https://github.com/lkxed/
[1]: https://en.wikipedia.org:443/wiki/Init
[2]: https://systemd.io:443/
[3]: https://itsfoss.com/content/images/2023/07/Systemd-on-fedora.png
[4]: https://itsfoss.com/systemd-free-distros/
[0]: https://img.linux.net.cn/data/attachment/album/202308/05/153836uwjssmq5vlzfqbqj.jpg

View File

@ -0,0 +1,153 @@
[#]: subject: "Mix and Match Terminal With Nautilus File Manager in Linux"
[#]: via: "https://itsfoss.com/terminal-nautilus-combination/"
[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/"
[#]: collector: "lkxed"
[#]: translator: "ChatGPT"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-16071-1.html"
将 Linux 终端与 Nautilus 文件管理器结合起来
======
![][0]
> 这里有一些技巧和调整,通过将终端和文件管理器结合在一起,以节省你的时间。
Nautilus 是 GNOME 桌面环境中的图形化文件浏览器。你可以使用它来访问和管理系统中的文件和文件夹。
尽管并非所有人都喜欢使用终端来管理文件和目录,但你也可以通过终端进行文件和目录管理。
然而,你可能会遇到需要在终端和文件管理器之间切换的情况。
有多种方法可以在 Nautilus 文件管理器和终端之间进行交互。令人惊讶的是,并不是所有的 Linux 用户都知道这些方法。
例如,在 Nautilus 中,右键单击并选择“<ruby>在终端中打开<rt>Open in terminal</rt></ruby>”选项,将在终端中打开当前目录位置。
![在 Linux 中从 Nautilus 文件管理器中打开终端][1]
这只是我在本文中要与你分享的众多示例之一。
### 1、拖放获取绝对路径
如果你将文件夹或文件拖放到终端中,其绝对路径将被粘贴到终端屏幕上。
![将文件或文件夹从 Nautilus 拖放到终端会粘贴该项的绝对路径][2]
当你在文件浏览器中深入目录结构并且不想在终端中键入整个路径时,这样做很有帮助。
### 2、进入目录
这与上面看到的类似。如果你在目录结构中深入进入,并且不想为 [切换到该目录][3] 键入整个路径,这个技巧很有帮助。
在终端中键入 `cd` 命令,然后拖放以进入目录。
![在键入"cd"命令后,通过拖放将目录输入终端][5]
### 3、在编辑器中打开文件
类似地,你可以使用 Nano 或 Vim 编辑器打开文件进行 [编辑][6]。
将文件拖放到 `nano` 命令中以打开它进行编辑。
![在键入"nano"后,将需要编辑的文件拖放到终端][7]
### 4、使用 sudo 权限打开文件进行编辑
与上述相同,但这次你可以使用 `sudo` 权限打开文件进行编辑。
![使用 sudo 权限打开 sources.list 文件进行编辑][8]
### 5、拖放多个文件如果命令支持多个参数
你也可以拖放多个文件以获取它们的绝对路径。这可以与接受多个参数的命令一起使用。
例如,[diff 命令用于检查两个文件之间的差异][9]。输入 `diff`,然后拖放你想要检查差异的文件。
![通过选择文件并将其拖放为 diff 命令参数来检查两个文件的差异][10]
### 6、从文本文件复制粘贴
阅读文档并且需要在终端中运行其中提到的命令?你当然可以 [在终端中复制粘贴][11]。
然而,更快捷的方法是选中文本并将其拖放到终端。
这个技巧也适用于 [GNOME-Sushi][12] 预览。
![使用 GNOME-Sushi 从任何文件的预览中拖放一些文本][13]
### 7、从浏览器中拖放
与上述的文本文件类似,你也可以从浏览器中拖放文本。这有助于在进行教程操作时同时查看教程。
![从互联网拖放代码或网址到终端,无需复制或粘贴][14]
### 8、在 Nautilus 中嵌入终端
无法离开终端?直接将其嵌入到文件管理器中。这样,你无需单独 [打开一个终端][15]。
这里的关键是,如果你在文件浏览器中切换到另一个目录,嵌入的终端会自动切换到相应的目录。
你也可以在 Nautilus 嵌入的终端中执行大部分上述的拖放操作。例如,通过拖放 `.bashrc` 文件并使用 `grep`,在 `.bashrc` 中搜索特定文本。
![通过在嵌入的终端中拖放 .bashrc 文件并使用 grep在 bashrc 中搜索特定文本][16]
### 9、在嵌入的终端之间拖放文件标签
终端和文件管理器都支持选项卡视图。你可以在选项卡之间拖放文件。
例如,要 [检查 ISO 的 shasum 值][17],输入 `shasum` 命令,然后从另一个选项卡中拖放文件,如下所示。
![检查 ISO 的 shasum 值,输入 shasum 命令,然后从另一个选项卡中拖放文件][18]
### 更多关于 Nautilus 和终端的内容
喜欢这些技巧吗?也许你想学习更多类似的技巧。
如果你想更充分地利用 Nautilus 文件管理器,这里有一些技巧供你参考。
> **[调整你的 Nautilus 文件管理器的 13 种办法][18a]**
这里还有一些探索的终端技巧:
> **[19 个你应该掌握的基本但重要的 Linux 终端技巧][18b]**
💬 你是否了解其他将终端和文件管理器结合使用的酷炫技巧?不妨在下方的评论区与我们分享一下!
*题图MJ/ba1ee1c9-07e5-4fc8-bd2c-bde469ce095c*
--------------------------------------------------------------------------------
via: https://itsfoss.com/terminal-nautilus-combination/
作者:[Abhishek Prakash][a]
选题:[lkxed][b]
译者ChatGPT
校对:[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/lkxed/
[1]: https://itsfoss.com/content/images/2023/07/right-click-open-in-terminal.gif
[2]: https://itsfoss.com/content/images/2023/07/copies-absolute-path.gif
[3]: https://itsfoss.com/change-directories/
[4]: https://itsfoss.com/cd-command/
[5]: https://itsfoss.com/content/images/2023/07/enter-a-directory.gif
[6]: https://itsfoss.com/nano-editor-guide/
[7]: https://itsfoss.com/content/images/2023/07/edit-bashrc.gif
[8]: https://itsfoss.com/content/images/2023/07/open-sources.gif
[9]: https://linuxhandbook.com/diff-command/
[10]: https://itsfoss.com/content/images/2023/07/check-diff.gif
[11]: https://itsfoss.com/copy-paste-linux-terminal/
[12]: https://gitlab.gnome.org/GNOME/sushi
[13]: https://itsfoss.com/content/images/2023/07/from-sushi.gif
[14]: https://itsfoss.com/content/images/2023/07/drag-and-drop-code-from-internet.gif
[15]: https://itsfoss.com/open-terminal-ubuntu/
[16]: https://itsfoss.com/content/images/2023/07/embedded-terminal.gif
[17]: https://itsfoss.com/checksum-tools-guide-linux/
[18]: https://itsfoss.com/content/images/2023/07/shasum-final.gif
[18a]: https://itsfoss.com/nautilus-tips-tweaks/
[18b]: https://itsfoss.com/basic-terminal-tips-ubuntu/
[0]: https://img.linux.net.cn/data/attachment/album/202308/07/155713nuulz3b3dolrrqbc.jpg

View File

@ -0,0 +1,222 @@
[#]: subject: "How to Install GitLab on Ubuntu 22.04 | 20.04"
[#]: via: "https://www.linuxtechi.com/how-to-install-gitlab-on-ubuntu/"
[#]: author: "Pradeep Kumar https://www.linuxtechi.com/author/pradeep/"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-16074-1.html"
如何在 Ubuntu 上安装 GitLab
======
![][0]
GitLab 是一个开源平台提供了强大且功能丰富的解决方案用于管理仓库、问题、CI/CD 管道等。如果你是 Ubuntu 22.04 或 20.04 用户,并且想要设置自己的 [GitLab][1] 实例来简化你的 DevOps 工作流程,那么你来对地方了。
本分步指南将引导你完成 Ubuntu 22.04 或 20.04 上 GitLab 的安装过程。GItlab 提供企业版Gitlab EE和社区版Gitlab CE。在这篇文章中我们将介绍社区版。
先决条件:
- 运行 Ubuntu 22.04 或 20.04 且具有 SSH 访问权限的虚拟或专用服务器。
- 静态主机名(`gitlab.linuxtechi.net`
- 具有管理员权限的 Sudo 用户
- 2GB 内存或更多
- 2 个或更多 vCPU
- 互联网连接
### 1、更新系统包
让我们首先更新软件包列表并将任何现有软件包升级到最新版本。
```
$ sudo apt update
$ sudo apt upgrade -y
```
应用更新后重新启动系统。
```
$ sudo reboot
```
### 2、安装依赖项
GitLab 需要一些依赖项才能正常运行。使用以下命令安装它们:
```
$ sudo apt install -y curl openssh-server ca-certificates postfix
```
在 postfix 安装过程中,会出现一个配置窗口。选择 “Internet Site”并输入服务器的主机名作为邮件服务器名称。这将允许 GitLab 发送电子邮件通知。
![][2]
选择 “Internet Site”然后选择 “OK”。
![][3]
检查系统的主机名并选择 “OK”。
### 3、添加 GitLab Apt 存储库
现在,我们将添加 GitLab 仓库,运行以下 `curl` 命令。它将自动检测你的 Ubuntu 版本并相应地设置仓库。
```
$ curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
```
![][4]
### 4、安装 Gitlab
运行以下命令在你的 ubuntu 系统上自动安装和配置 gitlab-ce将服务器的主机名替换为你的设置
```
$ sudo EXTERNAL_URL="http://gitlab.linuxtechi.net" apt install gitlab-ce
```
上述命令成功执行后,我们将得到如下输出。
![][5]
![][6]
上面的输出确认 GitLab 已成功安装。gitlab web 界面的用户名是 root密码存储在 `/etc/gitlab/initial_root_password`
注意:如果你的 ubuntu 系统上启用了操作系统防火墙,那请允许 80 和 443 端口。
```
$ sudo ufw allow http
$ sudo ufw allow https
```
### 5、访问 GitLab Web 界面
安装并配置 GitLab 后,打开 Web 浏览器并输入服务器的 IP 地址或主机名。
```
http://<Server-IP-Address-or-Hostname>
```
- 用户名:`root`
- 密码:从 `/etc/gitlab/initial_root_password` 获取密码
![][7]
点击“<ruby>登录<rt>Sign in</rt></ruby>”。
![][8]
很好,上面确认我们已经成功登录 Gitlab Web 界面。
目前我们的 GitLab 服务器运行在 http80协议上如果你想为你的 GitLab 启用 https请参考以下步骤。
### 6、为 GitLab Web 界面设置 HTTPS
为提高安全性,可使用自签名证书或 Let's Encrypt 为 GitLab 实例配置 HTTPS。Let's Encrypt 只适用于互联网上有 A 记录的公有域。但在本例中,我们使用的是私有域,因此将使用自签名证书来确保 GitLab 的安全。
现在,让我们创建以下文件夹并使用 `openssl` 命令生成自签名证书:
```
$ sudo mkdir -p /etc/gitlab/ssl
$ sudo chmod 755 /etc/gitlab/ssl
```
使用以下 `openssl` 命令生成私钥:
```
$ sudo openssl genrsa -des3 -out /etc/gitlab/ssl/gitlab.linuxtechi.net.key 2048
```
输入密码并记住它。
使用以下命令创建 CSR
```
$ sudo openssl req -new -key /etc/gitlab/ssl/gitlab.linuxtechi.net.key -out /etc/gitlab/ssl/gitlab.linuxtechi.net.csr
```
![][9]
从密钥中删除密码串,依次执行以下命令:
```
$ sudo cp -v /etc/gitlab/ssl/gitlab.linuxtechi.net.{key,original}
$ sudo openssl rsa -in /etc/gitlab/ssl/gitlab.linuxtechi.net.original -out /etc/gitlab/ssl/gitlab.linuxtechi.net.key
$ sudo rm -v /etc/gitlab/ssl/gitlab.linuxtechi.net.original
```
创建证书文件:
```
$ sudo openssl x509 -req -days 1460 -in /etc/gitlab/ssl/gitlab.linuxtechi.net.csr -signkey /etc/gitlab/ssl/gitlab.linuxtechi.net.key -out /etc/gitlab/ssl/gitlab.linuxtechi.net.crt
```
使用下面的 `rm` 命令删除 CSR 文件:
```
$ sudo rm -v /etc/gitlab/ssl/gitlab.linuxtechi.net.csr
```
设置密钥和证书文件的权限:
```
$ sudo chmod 600 /etc/gitlab/ssl/gitlab.linuxtechi.net.key
$ sudo chmod 600 /etc/gitlab/ssl/gitlab.linuxtechi.net.crt
```
Gitlab 服务器的所有重要配置均由文件 `/etc/gitlab/gitlab.rb` 控制,因此编辑此文件,搜索 `external_url` 并添加 `https://gitlab.linuxtechi.net`
```
$ sudo vi /etc/gitlab/gitlab.rb
----------------------------------------------------------
external_url 'https://gitlab.linuxtechi.net'
----------------------------------------------------------
```
保存并退出文件,使用下面的命令重新配置 gitlab以便其 Web 界面可以使用 HTTPS。
```
$ sudo gitlab-ctl reconfigure
```
![][10]
成功执行上述命令后,你的 GitLab 界面应该可以通过 HTTPS 协议访问在我的例子中URL 为:`https://gitlab.linuxtechi.net/`
当你第一次访问它时,它会说你的连接不安全,点击“接受风险并继续”。
![][11]
### 结论
恭喜! 你已在 Ubuntu 22.04 或 20.04 系统上成功安装 GitLab。随着 GitLab 的启动和运行,你现在可以创建仓库,与你的团队协作,并通过 GitLab 令人印象深刻的功能增强你的开发工作流程。享受无缝版本控制、持续集成等,一切尽在你的掌控之中!
*题图MJ/c6a3e27e-fe58-4184-b133-9e9c67224316*
--------------------------------------------------------------------------------
via: https://www.linuxtechi.com/how-to-install-gitlab-on-ubuntu/
作者:[Pradeep Kumar][a]
选题:[lkxed][b]
译者:[geekpi](https://github.com/geekpi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.linuxtechi.com/author/pradeep/
[b]: https://github.com/lkxed/
[1]: https://about.gitlab.com/
[2]: https://www.linuxtechi.com/wp-content/uploads/2018/06/Choose-Internet-Site-Postfix-Gitlab-Installation-Ubuntu.png
[3]: https://www.linuxtechi.com/wp-content/uploads/2018/06/System-Hostname-Postfix-Gitlab-Ubuntu.png
[4]: https://www.linuxtechi.com/wp-content/uploads/2018/06/Add-GitLAb-CE-Apt-Repository-Ubuntu.png
[5]: https://www.linuxtechi.com/wp-content/uploads/2018/06/Apt-Install-Gitlab-ce-Ubuntu.png
[6]: https://www.linuxtechi.com/wp-content/uploads/2018/06/Gitlab-Successful-Installlation-Message-Ubuntu.png
[7]: https://www.linuxtechi.com/wp-content/uploads/2018/06/GitLab-Login-Page-Post-Installation-Ubuntu.png
[8]: https://www.linuxtechi.com/wp-content/uploads/2018/06/GitLab-Web-Interface-Ubuntu.png
[9]: https://www.linuxtechi.com/wp-content/uploads/2018/06/Generate-CSR-Self-Sign-Cert-Gitlab.png
[10]: https://www.linuxtechi.com/wp-content/uploads/2018/06/Gitlab-reconfigured-Ubuntu.png
[11]: https://www.linuxtechi.com/wp-content/uploads/2018/06/Gitlab-Web-Interface-over-Https-Ubuntu.png
[0]: https://img.linux.net.cn/data/attachment/album/202308/08/113049el2dx242c4mwm40k.jpg

View File

@ -0,0 +1,90 @@
[#]: subject: "GNOMEs Ambitious Window Management Overhaul"
[#]: via: "https://debugpointnews.com/gnome-window-management-proposal/"
[#]: author: "arindam https://debugpointnews.com/author/dpicubegmail-com/"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-16076-1.html"
GNOME 雄心勃勃的窗口管理改革
======
![][0]
> 厌倦了窗口混乱和手动调整? GNOME 正在集体讨论一个自动化且用户友好的窗口管理系统。这是你需要了解的情况。
窗口管理是桌面计算的一个重要方面几十年来一直是人们着迷和探索的话题。然而尽管进行了多次尝试仍然没有人能够破解完美的窗口管理解决方案的密码。GNOME 开发人员现在开始致力于彻底改变窗口管理,旨在提高生产力和用户体验。
GNOME 开发人员 Tobias Bernard 发表了一篇 [详细的文章][1],介绍了开发人员如何考虑为未来创新 GNOME 桌面。
### 传统窗口系统的挑战
传统的窗口系统为我们提供了很好的服务,允许应用生成可以手动移动和调整大小的矩形窗口。然而,随着窗口数量和尺寸的增加,问题开始出现。重叠的窗口很快就会变得一团糟,使得在不隐藏其他应用的情况下访问特定应序变得困难。最大化窗口可能会遮挡桌面上的其他所有内容,从而导致混乱和效率低下。
多年来,各种操作系统引入了工作区、任务栏和切换器等解决方法来处理这些问题。然而,窗口管理的核心问题仍未解决。特别是对于儿童和老年人等计算机新手来说,手动排列窗口可能会很麻烦且乏味。
### 引入平铺窗口管理器
平铺窗口管理器提供了防止窗口重叠的替代解决方案。虽然它们在某些情况下运行良好,但也有其局限性。平铺窗口可能会导致效率低下,因为应用通常是针对特定尺寸和纵横比设计的。此外,这些窗口管理器缺乏关于窗口内容和上下文的知识,需要额外的手动调整,并违背了简化工作流程的目的。更不用说记住很多键盘快捷键了。
### GNOME 当前的平铺功能
GNOME 已经在 GNOME 3 系列中尝试了基本的平铺功能。然而,现有的实现有一些局限性。这是一个手动过程,仅支持两个窗口,缺乏复杂布局的可扩展性,并且不会将平铺窗口分组到窗口栈中。
### 窗口管理的新愿景
该团队提出了一种新的窗口管理方法,重点关注符合用户期望和需求的自动化系统。他们的概念涉及窗口的三种潜在布局状态:马赛克、边缘平铺和浮动。
马赛克模式将成为默认行为,根据用户偏好和可用屏幕空间智能定位窗口并调整窗口大小。随着新窗口的打开,现有窗口将进行调整以适应新来者。如果窗口不适合当前布局,它将被放置在自己的工作区中。当屏幕接近布满时,窗口将自动平铺。
用户还可以通过将窗口拖动到现有窗口或空白区域上来手动平铺窗口。该系统提供了灵活性和便利性,使其更容易高效地执行多任务。
![mosaic-open-close (Video credit: GNOME)][2]
![mosaic-maximize (Video credit: GNOME)][3]
![mosaic-vertical-tile (Video credit: GNOME)][4]
![mosaic-tile2 (Video credit: GNOME)][5]
![mosaic-tile3 (Video credit: GNOME)][6]
### 维护用户友好的浮动窗口
虽然平铺提供了多种好处,但 GNOME 开发人员明白,总会有用户更喜欢手动定位窗口的情况。因此,经典的浮动行为仍然适用于这些特定情况,但随着新的马赛克系统的引入,它可能不太常见。
### 利用窗口元数据增强性能
GNOME 旨在优化平铺体验,以从窗口收集有关其内容的更多信息。这包括窗口的最大所需尺寸以及应用最佳运行的理想尺寸范围等详细信息。通过使用这些元数据,系统可以定制窗口布局以满足用户的需求,从而提高整体可用性。
### 展望未来
虽然 GNOME 开发人员对这个新的窗口管理方向感到兴奋,但他们也承认与这种新颖方法相关的风险。他们计划进行用户研究以验证他们的假设并完善交互。尽管没有具体的实施时间表,但该项目可能会跨越多个开发周期,并成为 GNOME 46 或更高版本的一部分。
截至发布此内容时,还没有草案合并请求,你可以参与其中并提供反馈。
参考自 [Tobias 的博客][1]。
*题图MJ/04285b09-a074-4f6f-a32e-ae5af06f1d1f*
--------------------------------------------------------------------------------
via: https://debugpointnews.com/gnome-window-management-proposal/
作者:[arindam][a]
选题:[lkxed][b]
译者:[geekpi](https://github.com/geekpi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://debugpointnews.com/author/dpicubegmail-com/
[b]: https://github.com/lkxed/
[1]: https://blogs.gnome.org/tbernard/2023/07/26/rethinking-window-management/
[2]: https://debugpointnews.com/wp-content/uploads/2023/07/mosaic-open-close.webm
[3]: https://debugpointnews.com/wp-content/uploads/2023/07/mosaic-maximize.webm
[4]: https://debugpointnews.com/wp-content/uploads/2023/07/mosaic-vertical-tile.webm
[5]: https://debugpointnews.com/wp-content/uploads/2023/07/mosaic-tile2.webm
[6]: https://debugpointnews.com/wp-content/uploads/2023/07/mosaic-tile3.webm
[0]: https://img.linux.net.cn/data/attachment/album/202308/09/104949la7f2nqen7qq2ftt.jpg

View File

@ -0,0 +1,281 @@
[#]: subject: "Best Video Editors for Linux in 2023"
[#]: via: "https://www.debugpoint.com/linux-video-editors/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lkxed"
[#]: translator: "ChatGPT"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-16062-1.html"
2023 年最佳 Linux 视频编辑软件
======
![][0]
> 我们列出了最佳的 Linux 视频编辑器选项。请看一下。
视频编辑软件的确可能很昂贵,尤其是像 Adobe Premiere Pro 这样更高级的选项。但好消息是,有很多自由开源的视频编辑器可供选择。这些替代方案提供了出色的功能,而不需要付费。在这里,我们编制了一个由十个这样的免费 Linux 视频编辑器组成的列表,它们可能非常适合你的特定需求:
### 2023 年最佳 Linux 视频编辑器
#### 1、Blender
Blender 是这个列表中功能最强大的视频编辑器之一。值得注意的是,它是自由开源软件,同时也是一个 3D 建模工具。使用 Blender你可以制作令人印象深刻的电影、动画电影、模拟以及进行动作追踪。
其多功能性使其成为许多用户的首选,包括工作室、个人艺术家、专业人士、爱好者、科学家、学生、视觉效果专家、动画师、游戏艺术家、改装者等等。
庞大的全球社区不断支持和丰富这个强大的编辑器,有众多贡献者不断增强其功能和能力。然而,由于它提供了一整套工具,新手可能需要一些时间来有效利用其全部潜能。但一旦掌握了它的功能,你将会对它能释放出无限创意而感到惊讶。
![Blender Video Editor][1]
它的功能列表十分庞大,但以下是一些值得注意的功能:
- 建模
- 雕刻
- 动画与绑定
- <ruby>油笔<rt>Grease Pencil</rt></ruby>
- 渲染
- 模拟
- 视频编辑
- 脚本编写
- 视觉效果
- 用户界面
- 工作流程
> **[下载 Blender][2]**
#### 2、Lightworks
体验 [Lightworks][3],一款多功能的<ruby>免费增值<rt>freemium</rt></ruby>的视频编辑器可帮助你编辑社交媒体视频、4K 质量甚至完整的电影。非凡的是,这款非线性视频编辑器已在好莱坞电影编辑领域打下了自己的烙印,证明了其专业能力。
请记住,尽管免费版提供了丰富的工具和功能,但某些专业功能可能仅在付费版本中提供。
因此无论你是渴望成为社交媒体影响者、专业电影制片人还是喜欢制作高质量视频的人Lightworks 可能成为你在视频编辑世界释放创造力的通行证。
![Lightworks Video Editor][4]
以下是其功能的快速概述:
- 简单直观的用户界面
- 访问出色的免版税音频和视频内容
- 轻松进行时间轴编辑和修剪
- 用于 4K 的低分辨率代理工作流程
- 实时即用的音频和视频特效
- 导出适用于 YouTube/Vimeo、SD/HD 的视频,高达 4K
- 广泛的文件格式支持,包括可变帧率媒体
- 使用高达 32 位 GPU 精度和直方图工具专业地调整序列
> **[下载 Lightworks][5]**
#### 3、Shotcut
介绍一下 [Shotcut][6]这是一款出色的自由开源的视频编辑器能够在各种平台上无缝运行。Shotcut 具备许多功能,为用户带来了很多便利。其中一个突出的特点是其对各种格式的出色支持,让你可以轻松处理各种媒体文件。它的独特之处在于本地时间轴编辑,意味着你可以直接编辑文件,而无需进行耗时的导入操作。
Shotcut 的功能远不止于此;它还支持 Blackmagic Design为你提供专业的输入和预览监控。无论你是内容创作者还是电影制片人能够使用 4K 分辨率进行工作是 Shotcut 提供的巨大优势。你可以轻松使用该编辑器捕捉音频、视频甚至是摄像头画面。
![Shotcut Video Editor][7]
Shotcut 的显著功能包括:
- 支持 4K 分辨率
- 音频、视频和摄像头捕捉
- 广泛的文件格式支持
- 4K 分辨率支持
- 插件
- 音频和视频滤镜
> **[下载 Shotcut][8]**
#### 4、Avidemux
对于初学者或仅作为业余爱好者的视频编辑者来说Avidemux 是一个完美的选择。这款自由开源的视频编辑器专为简单的任务设计,如剪辑、应用滤镜和编码。它拥有用户友好的界面,为刚开始学习编辑的人提供流畅且易于操作的体验。
Avidemux 使用简单并且支持广泛的文件格式确保与各种媒体类型兼容。如果你有一些重复的任务或特定的工作流程Avidemux 的项目和作业队列功能可以帮助你自动化编辑过程。
此外Avidemux 还提供强大的脚本功能,适用于喜欢深入技术细节的用户,可以根据个人喜好自定义和微调编辑任务。
然而需要注意的是Avidemux 可能缺少一些其他专业级视频编辑器中的高级功能和复杂性。然而对于初学者、学习者和业余爱好者来说Avidemux 是一个直观且免费的解决方案,非常适合开始视频编辑之旅,为你的创作努力铺平道路。
![Avidemux Video Editor][9]
> **[下载 Avidemux][10]**
#### 5、HitFilm Express
寻找一个免费且出色的视频编辑器?试试 [HitFilm Express][11]这是一款顶级的免费编辑软件。顾名思义“express” 版本在功能上毫不逊色非常适合初学者、YouTube 创作者和有抱负的电影制作者。有一支专业的开发团队支持,你可以期待无缝而精细的编辑体验。
HitFilm Express 集成了大量功能,让你释放创造力,制作出令人印象深刻的视频。无论你是刚开始视频编辑之旅还是希望提升你的 YouTube 内容,该软件提供了工具和灵活性,让你的想象变为现实。
然而,需要注意的是,目前 HitFilm Express 仅与 Windows 和 Mac 系统兼容。目前还没有 Linux 版本可用。开发团队根据用户群体做出了这个决定,因为在目前情况下,支持 Linux 可能在经济上不可行。LCTT 译注:这个是怎么混进来的!)
![Hitfilm Express Video Editor][12]
> **[下载 HitFilm Express][11]**
#### 6、DaVinci Resolve
DaVinci Resolve 是专业视频编辑的代表,具备精湛处理 8K 编辑的令人印象深刻能力。这款强大的软件跨越多个平台,使得 Linux、Mac 和 Windows 用户都能使用。然而需要了解的是DaVinci Resolve 是专有的商业软件。
凭借其全面的功能和出色的性能DaVinci Resolve 是视频编辑爱好者和行业专业人士的强大选择。该软件提供了附加付费功能的工作室版本,包括许多插件和附加组件,以增强你的编辑能力。
如果你不想花费一分钱就能入门,也不必担心 - DaVinci Resolve 还提供免费版本。对于许多普通用户来说,免费版本已经完全足够满足他们的视频编辑需求。即使是免费版本,凭借其强大的工具和功能,也提供了丰富的选项,可以创建令人惊艳的视频,展现创意的想象力。
![DaVinci Resolve Video Editor][13]
以下是一些主要功能的简介:
- 双时间轴
- 源磁带
- 专用修剪界面
- 智能编辑模式
- 快速回顾
- 变换、变速和稳定
- 快速导出
- 媒体导入
- 便携编辑
- 自定义时间轴设置
- 调整剪辑
- 人脸识别
- 速度加速变速
- 图像稳定
- 关键帧曲线编辑器
- 磁带式音频刮动
- 更快、更智能的编码
> **[下载 DaVinci Resolve][14]**
#### 7、OpenShot
如果你正在寻找一个简单强大、具有用户友好界面的免费视频编辑软件,那么 [OpenShot][15] 是你的不二选择。这款出色的软件以简洁为设计理念确保即使是初次接触视频编辑的人也能轻松上手。OpenShot 的直观设计提供了低学习曲线,适用于各个层次的用户。
最棒的是OpenShot 适用于 Windows、Linux 和 Mac 等各种操作系统。因此,无论你喜欢哪个平台,都可以享受到 OpenShot 视频编辑能力带来的便利和强大功能。
因此如果你正在寻找一个将用户友好功能与强大编辑能力相结合的免费视频编辑软件OpenShot 应该是你的首选。拥抱其简洁性,投入编辑过程,轻松看到你的视频项目焕发生机。
![OpenShot Video Editor][16]
> **[下载 OpenShot 视频编辑器][17]**
#### 8、KDenlive
认识一下 [KDenlive][18],这是一款经过 15 年开发的经验丰富的视频编辑器。作为一款自由开源的应用程序KDenlive 是社区合作和创新力量的典范。它基于 QT 框架构建,在 FFMpeg、frei0r、movie、ladspa 和 sox 等一流框架的支持下,确保了无缝可靠的编辑体验。
KDenlive 面向广泛的用户群体,非常适合想要尝试视频编辑的普通用户。它的独特之处在于考虑周到地包含了高级功能,实现了功能和易用性的完美平衡。你将找到丰富的工具,可以增强你的视频项目,而无需过多学习复杂的技术知识。
使用 KDenlive你可以释放创造力而无需被复杂的过程所困扰。这款编辑器使你能够制作引人入胜的视频而无需掌握过多的技术知识。
以下是一些其功能的概述:
- 多轨视频编辑
- 使用任何音频/视频格式
- 可配置的界面和快捷键
- 使用带有 2D 标题的标题工具
- 多种效果和转场
- 音频和视频范围检测
- 代理编辑
- 自动备份
- 可在界面直接下载在线资源
- 时间轴预览
- 可关键帧化的效果
- 主题界面
![KDenlive Video Editor][19]
> **[下载 KDenlive][20]**
#### 9、Flowblade
“快速、精确、稳定” - 这正是最能概括 [Flowblade][21] 的标语,这是一款非线性视频编辑器,旨在以最高效的方式满足目标用户的需求。通过提供一种无缝快速的编辑体验,保证每个细节的精确性,并为你的创意努力提供稳定的平台,这款编辑器兑现了它的承诺。
Flowblade 在功能方面毫不保留。它配备了一套全面的工具,以促进你的编辑过程。从简化工作流程的编辑工具到平滑排序的时间轴功能,该编辑器应有尽有。
为了进一步提高你的编辑效率Flowblade 包含了一个范围记录,方便你管理剪辑并精确选择所需的片段。此外,它支持代理编辑,这是一个有价值的功能,可在处理高分辨率媒体时优化性能。
以下是一些其功能的概述:
- 编辑工具
- 时间轴功能
- 合成器
- 滤镜
- 范围记录
- 代理编辑
- 批量渲染队列
- G'mic 特效工具
- 音频混音器
- 媒体链接处理
- 标题制作
- 其它功能
- 渲染
- 支持 MLT 视频和音频编解码器
![Flowblade Video Editor][22]
该软件只适用于 Linux 系统,不适用于 Windows 或 Mac。
> **[下载 Flowblade][23]**
#### 10、Olive
介绍一下 [Olive][24],这是一款非常出色的免费非线性视频编辑器,旨在成为高端专业视频编辑软件的全功能替代品。目前 Olive 处于活跃开发阶段,处于 ALPHA 阶段。尽管处于早期阶段,这个编辑器已经引起了广泛关注,并且已经在使用 Olive 进行视频创作的用户中表现出色。
凭借其雄心勃勃的目标和不断壮大的社区Olive 展示出了成为视频编辑领域强大竞争对手的潜力。已经有用户开始使用这个新兴编辑器制作视频,他们的经验展示了它所具备的能力。
![Olive Video Editor][26]
你可以通过下面的链接在 Windows、Linux 和 Mac 上下载。
> **[下载 Olive][27]**
### 总结
在这个汇编中,我们重点介绍了 Linux 上的十大专业视频编辑器,为不同的编辑需求提供了多样化的选择。某些编辑器在熟练使用时甚至可以媲美甚至取代高价专业软件。
例如Blender、KDenlive 和 DaVinci Resolve 是创建专业级视频甚至完整电影的出色选择。每个编辑器都具有独特的优势和功能,使它们成为有抱负的电影制作者和内容创作者的可靠工具。
现在轮到你了!你对这个 Linux 视频编辑器列表有何看法?你还有其他喜欢推荐的编辑器吗?请在评论框中告诉我。
_图片来源各应用程序。_
*题图MJ/9b567ebc-e5ed-4cdc-a023-30bbdfa564e8*
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/linux-video-editors/
作者:[Arindam][a]
选题:[lkxed][b]
译者ChatGPT
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.debugpoint.com/author/admin1/
[b]: https://github.com/lkxed/
[1]: https://www.debugpoint.com/wp-content/uploads/2019/09/Blender-Video-Editor-1024x579.jpg
[2]: https://www.blender.org/download/
[3]: https://www.lwks.com/
[4]: https://www.debugpoint.com/wp-content/uploads/2019/09/Lightworks-Video-Editor-1024x557.jpg
[5]: https://lwks.com/
[6]: https://shotcut.org/
[7]: https://www.debugpoint.com/wp-content/uploads/2019/09/Shotcut-Video-Editor-1024x644.jpg
[8]: https://shotcut.org/download/
[9]: https://www.debugpoint.com/wp-content/uploads/2019/09/Avidemux-Video-Editor.png
[10]: https://avidemux.sourceforge.net/download.html
[11]: https://fxhome.com/hitfilm-express
[12]: https://www.debugpoint.com/wp-content/uploads/2019/09/Hitfilm-Express-Video-Editor-1024x572.jpg
[13]: https://www.debugpoint.com/wp-content/uploads/2019/09/DaVinci-Resolve-Video-Editor.jpg
[14]: https://www.blackmagicdesign.com/in/products/davinciresolve
[15]: https://www.openshot.org/
[16]: https://www.debugpoint.com/wp-content/uploads/2019/09/OpenShot-Video-Editor.jpg
[17]: https://www.debugpoint.com
[18]: https://kdenlive.org/
[19]: https://www.debugpoint.com/wp-content/uploads/2019/09/KDenlive-Video-Editor--1024x579.jpg
[20]: https://kdenlive.org/en/download/
[21]: https://jliljebl.github.io/flowblade/
[22]: https://www.debugpoint.com/wp-content/uploads/2019/09/Flowblade-Video-Editor-1024x579.jpg
[23]: https://jliljebl.github.io/flowblade/download.html
[24]: https://www.olivevideoeditor.org/
[25]: https://www.debugpoint.com/olive-0-2-video-editor-review/
[26]: https://www.debugpoint.com/wp-content/uploads/2019/09/Olive-Video-Editor-1024x576.jpg
[27]: https://www.olivevideoeditor.org/download.php
[0]: https://img.linux.net.cn/data/attachment/album/202308/04/103513emmpins0a8bbfbbo.jpg

View File

@ -1,255 +0,0 @@
[#]: subject: "Linux Mint 21.2 Release Improves The Visual Redesign Further"
[#]: via: "https://news.itsfoss.com/linux-mint-21-2/"
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Linux Mint 21.2 Release Improves The Visual Redesign Further
======
Linux Mint 21.2 is an impressive upgrade!
![linux mint 21.2][1]
Linux Mint 21.1 was packed with visual overhauls to the theme, folder icons, and the overall look and feel of the system.
Now, Linux Mint 21.2 has enhancements on top of the same Ubuntu 22.04 base and [Linux Kernel 5.15][2].
### Linux Mint 21.2: What's New? 😀
![linux mint 21.2 homescreen][3]
With Linux Mint 21.2, some of those changes have been refined along with new GUI overhauls and additions across the board.
Let me mention the key highlights of the release:
- **Cinnamon 5.8, Xfce 4.18, and others**
- **GUI overhaul for the Software Manager**
- **Folder icons and color selection**
- **New****"Styles" to easily tweak appearance**
- **Improved login screen**
> 📋 Linux Mint 21.2 will receive updates until 2027.
#### Desktop Environment Upgrades
The star of the upgrade is **Cinnamon 5.8**, the flagship edition of Linux Mint.
![linux mint 21.1 about][4]
While it includes many improvements, some worth mentioning include gesture support for window management, workspace management, tiling, and media controls. You can find these working on touchpads, tablets, and touchscreens through a new "**Gestures**" option in the system settings.
![linux mint gestures][5]
The notifications and tooltips have also been improved to use the accent color set and look bigger/clearer.
![linux mint 21.2 notification][6]
In addition to the Cinnamon enhancements, you can find Xfce 4.18 with all the goodies. We have a dedicated article on [Xfce 4.18][7] changes if you want to explore more.
And the other variant, with MATE 1.26 desktop, may not be as exciting as other editions, but you still get the fresh mint update.
#### Software Manager Visual Overhaul
The software manager for Linux Mint has always been simple.
This time, the layout has been adjusted for easy access to options and to provide a cleaner user experience. Starting with the **search bar moved to the left side** of the window.
![linux mint 21.2 software manager][8]
The **categories on the main page have been shifted down**, and more information is available (for instance, the applications via Flathub).
It is also **easier to select between the system package and Flatpak** for an app next to the installation option. The option existed nearby the details section previously.
![][9]
Here's a glimpse of what it looked like with Linux Mint 21.1:
![][10]
#### Folder Coloring Gets Better
With Linux Mint 21.1, you can also change the accent color of the folder stripes, which looks like this:
![linux mint 21.1 folders][11]
Now, you are no longer limited to solid colors. You can choose from gradients and solid colors for folders and apply them entirely on the folder icon.
![linux mint 21.2 folder colors][12]
Not to forget, the stripes on the folder icons were dropped. So, it looks much cleaner, in my opinion.
#### Styles to Tweak Theme
With Cinnamon 5.8, a new setting, "**Styles**," was introduced to make it seamless for you to tweak the look and feel of the system.
![linux mint styles][13]
Not to forget, you get more color variants to choose from and an intuitive menu to choose the style.
While this aims to simplify appearance tweaks, you can still head to "Advanced Settings" to access and configure icons and other themes separately.
#### Improved Slick Greeter
The login screen experience gets better with multiple keyboard layout support.
![linux mint slick greeter][14]
You can find more options from the keyboard icon on the login screen. The slick-greeter now supports Wayland sessions and should be better at touchpad detection.
Not to forget, the keyboard navigation has been worked on to let you easily type/edit/view the password in the login area.
#### ⭐ Other Important Changes
Several other subtle changes make the Linux Mint experience "_mintier_". Some of those include:
- Removing monochrome icons and dark theme icons to replace them with symbolic icons for uniform contrast
- Re-aligned title bar buttons
- Security hardening work for Warpinator
- Mint-Y-Legacy was renamed Mint-L
- Full support for HEIF and AVIF image files.
- Updated applications like Blueman and Pix
Explore more technical details on its [official announcement blog post][15]
### Download Linux Mint 21.2 📥
Linux Mint 21.2 ISOs can be found on its [official website][16].
[Linux Mint 21.2][17]
### Upgrade to Linux Mint 21.2 from 21.1 ⏫
If you are already using Linux Mint 21.1, you can upgrade to 21.2 easily.
First, [check your Linux Mint version][18] and ensure that it is 21.1.
```
lsb_release -a
```
Before starting the upgrade, you must ensure your system has installed all the available package updates. For this, run:
```
sudo apt update && sudo apt upgrade -y
```
![][19]
> ✋🏻 Make sure, you have a proper [backup of your system][20], so that you can restore it in the rare case of any update failures.
Once updates are completed, open the ****Update Manager**** application from the system menu.
![][21]
On the update manager, click on Edit menu. Here, you can find the “Upgrade to Mint 21.2” option on the dropdown menu.
![Select Upgrade to Linux Mint 21.2 from the Edit option in Update Manager][22]
This will open the update window and display you tabs like Introduction to update, release notes etc.
![][23]
![][24]
![][25]
You should take care of the “Requirements” tab, as this tab needs you to accept a Risk notification. This is the usual notification. Select the “I Understand” checkbox and press ****Apply.****
![Linux Mint notifies the user about the possible risk in the update process. Accept it by toggling th checkbox and click on Apply button][26]
Also provide the password when asked. This will start the update process. Initially, package information will be downloaded.
![Update Manager downloading the Package information][27]
After that, it will start downloading the required packages. This might take several minutes, depending on your internet connection.
![Update Manager downloading the required packages][28]
Once the package downloading is finished, it will start installing those.
![Update Manager installs the necessary packages][29]
It may download several additional packages too.
![Update Manager will download more packages to update as necessary][30]
Next step is the installation and removal of various packages.
![Update Manager installs and removes packages][31]
Upgrade will be completed after this step, and the system will recommend you to reboot the system.
![Update Manager notifies when the upgrade is completed. It also recommends a reboot for changes to take effect][32]
### Re-enable any repositories
Sometimes, during upgrade, some [external PPA's][33] will be disabled during the upgrade process. In that case, you need to re-enable them, after update. Open system settings and go to "Software Sources" section.
![Open Software Sources from System Settings][34]
From there, click enable any disabled sources.
![Manage third party repositories as required][35]
Now, after enabling the sources, immediately update your system using:
```
sudo apt update
```
That's it. You have successfully upgraded to the latest version of Linux Mint.
Enjoy it :)
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/linux-mint-21-2/
作者:[Ankush Das][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/ankush/
[b]: https://github.com/lkxed/
[1]: https://news.itsfoss.com/content/images/size/w1304/2023/06/linux-mint-21-2-release.jpg
[2]: https://news.itsfoss.com/linux-kernel-5-15-release/
[3]: https://news.itsfoss.com/content/images/2023/06/linux-mint-21-2-home.jpg
[4]: https://news.itsfoss.com/content/images/2023/06/linux-mint-system-info-21-2.jpg
[5]: https://news.itsfoss.com/content/images/2023/06/gestures.png
[6]: https://news.itsfoss.com/content/images/2023/06/shadow_notification.png
[7]: https://news.itsfoss.com/xfce-4-18-release/
[8]: https://news.itsfoss.com/content/images/2023/06/software-manager-linux-mint-21-2.jpg
[9]: https://news.itsfoss.com/content/images/2023/06/software-manager-desc-linux-mint-21-2.jpg
[10]: https://news.itsfoss.com/content/images/2023/06/linux-mint-software-manager.jpg
[11]: https://news.itsfoss.com/content/images/2023/06/linux-mint-21-1-folder-color.jpg
[12]: https://news.itsfoss.com/content/images/2023/06/linux-mint-21-2-folder-color.jpg
[13]: https://news.itsfoss.com/content/images/2023/06/styles.png
[14]: https://news.itsfoss.com/content/images/2023/06/slick1.png
[15]: https://blog.linuxmint.com/?p=4543
[16]: https://linuxmint.com/
[17]: https://linuxmint.com/
[18]: https://itsfoss.com/check-linux-mint-version/
[19]: https://itsfoss.com/content/images/2023/07/01-apt-update-and-apt-upgrade.webp
[20]: https://itsfoss.com/backup-restore-linux-timeshift/
[21]: https://itsfoss.com/content/images/2023/07/02-select-and-open-update-manager-final.png
[22]: https://itsfoss.com/content/images/2023/07/upgrade-to-mint-21-2.png
[23]: https://itsfoss.com/content/images/2023/07/04-Click-next-on-introduction.png
[24]: https://itsfoss.com/content/images/2023/07/05-click-next-on-release-notes.png
[25]: https://itsfoss.com/content/images/2023/07/06-click-next-on-new-features-page.png
[26]: https://itsfoss.com/content/images/2023/07/07-accept-the-risk-notification-and-apply-with-authentication.png
[27]: https://itsfoss.com/content/images/2023/07/08-downloading-apckage-information.webp
[28]: https://itsfoss.com/content/images/2023/07/09-downloading-packages.png
[29]: https://itsfoss.com/content/images/2023/07/10-installing-software.png
[30]: https://itsfoss.com/content/images/2023/07/11-some-more-package-downloads.png
[31]: https://itsfoss.com/content/images/2023/07/12-Installing-and-removing-packages.png
[32]: https://itsfoss.com/content/images/2023/07/13-update-finished-reboot.png
[33]: https://itsfoss.com/ppa-guide/
[34]: https://itsfoss.com/content/images/2023/07/15-post-upgrade-open-system-settings-and-software-sources.png
[35]: https://itsfoss.com/content/images/2023/07/16-post-update-software-sources-ppa-firefox-esr4.png

View File

@ -1,93 +0,0 @@
[#]: subject: "Gyroflow: An Open-Source App to Stabilize Video Footage"
[#]: via: "https://news.itsfoss.com/gyroflow/"
[#]: author: "Sourav Rudra https://news.itsfoss.com/author/sourav/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Gyroflow: An Open-Source App to Stabilize Video Footage
======
A free and open-source app to smoothen your videos with stabilization? Sounds impressive! Let's check it out!
![gyroflow][1]
Have you ever recorded action cam footage that was too shaky to be used? 🤔
Well, then, we have just the right tool for you to stabilize those shaky shots!
Enter, Gyroflow. It's an **open-source**, **cross-platform** app that can stabilize videos using motion data from a camera's onboard gyroscope or accelerometer.
Let's take a look at it.
### Gyroflow: Overview ⭐
![a screenshot of gyroflow][2]
Written primarily using the **Rust programming language** and the **QML user interface markup language**, Gyroflow is a **post-processing video stabilization software** that uses the motion data logged on cameras to do its job.
What makes Gyroflow different from other video editors with stabilization support is that it uses the logged motion data to do the following; It allows for **precise lens calibrations**, and **rolling shutter correction**, with the **ability to tweak the stabilization algorithms** for producing very stable video outputs.
> 📋 Do keep in mind that not all cameras log motion data.
The developers also add that there is a **minimal weight penalty**, and Gyfroflow **will work regardless of the lighting conditions** or how many moving subjects are there in a scene.
Other than that, Gyroflow is equipped with a plethora of cool features; here are some that are worth noting:
- **Real-time preview.**
- **A proper render queue.**
- **Support for Keyframes.**
- **16-bit video processing.**
- **Hardware accelerated video playback.**
- **Support for 10-bit videos; ProRes, DNxHR, 32-bit OpenEXR and Blackmagic RAW.**
- **Native support for gyro data from GoPro, Insta360, Sony, Runcam, Drone black-box, and more.**
#### Initial Impressions
![a screenshot of gyroflow exporting a video][3]
I tried my hand on it with an attempt to stabilize a video, but for some reason, when exporting a video, it **wouldn't use my GPU** (Nvidia GTX 1070ti) and switched to the CPU for completing the render. The default was set to GPU encoding.
![a screenshot of gyroflow after export of a video is complete][4]
The output was more stable than the original video, and the file size could also be adjusted for a smaller storage footprint.
Looking back, I did have the correct GPU drivers installed; your experience can vary with a different GPU. You can report it to them on their GitHub repo linked below if it doesn't work for you.
I suggest you go through the [documentation][5] for Gyroflow to know more.
Gyroflow has a pretty expansive set of features that make it easy to stabilize videos according to one's preference. That makes it a great contender for our list of open-source video editors (for a specific use case).
### 📥 Download Gyroflow
Gyroflow is available for **Linux**, **Windows**, and **macOS**. You can grab the package of your choice from the [official website][6].
[Gyroflow][7]
If you are interested in the source code or want to build it yourself, you can head to its [GitHub repo][8].
_💬 What do you think? Is it an exciting and valuable open-source tool for you?_
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/gyroflow/
作者:[Sourav Rudra][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/sourav/
[b]: https://github.com/lkxed/
[1]: https://news.itsfoss.com/content/images/size/w1304/2023/07/gyroflow.png
[2]: https://news.itsfoss.com/content/images/2023/07/Gyroflow_1.jpg
[3]: https://news.itsfoss.com/content/images/2023/07/Gyroflow_2.jpg
[4]: https://news.itsfoss.com/content/images/2023/07/Gyroflow_3.jpg
[5]: https://docs.gyroflow.xyz:443/
[6]: https://gyroflow.xyz:443/download
[7]: https://gyroflow.xyz:443/download
[8]: https://github.com:443/gyroflow/gyroflow

View File

@ -1,62 +0,0 @@
[#]: subject: "Is your old computer 'obsolete', or is it a Linux opportunity?"
[#]: via: "https://opensource.com/article/22/10/obsolete-computer-linux-opportunity"
[#]: author: "Phil Shapiro https://opensource.com/users/pshapiro"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Is your old computer 'obsolete', or is it a Linux opportunity?
======
Too often older computers are labeled 'obsolete'. Linux changes that. Refurbish an old computer and make it useful again for someone who needs it.
![Old UNIX computer][1]
Image by: Opensource.com
You may often hear someone claim a computer, tablet, or smartphone is "obsolete." When you hear such a statement, take a minute to ask yourself, "Is this person speaking an opinion or a fact?"
Many times, their statement is an opinion. Let me explain why.
When someone declares a computer "obsolete," they often speak from their own point of view. So, if you're a technology professional, a five-year-old computer might indeed be obsolete. But is that same five-year-old computer obsolete to a refugee family fleeing war or famine? Probably not. A computer that is obsolete for you might be a dream computer for someone else.
### How I refurbish old computers with Linux
I have some experience in this field. For the past 25 years, I've been taking older computers to people who don't have them. One of my second grade students, raised by her grandmother, graduated from Stanford University five years ago. Another one of my students, to whom I delivered a dusty Windows XP desktop in 2007, graduated from Yale University last year. Both of these students used donated computers for their own self-advancement. The latter student typed more than 50 words per minute before reaching middle school. Her family could not afford Internet service when I delivered her donated computer to herin third grade. So, she used her time productively to learn touch typing skills. I document her story in [this YouTube video][2].
I'll share another anecdote that is difficult to believe, even for me. A few years ago, I bought a Dell laptop on eBay for $20. This laptop was a top-of-the-line laptop in 2002. I installed Linux Mint on it, added a USB WiFi adapter, and this laptop was reborn. I documented this story in a YouTube video titled, "[My $20 eBay laptop][3]."
In the video, you can see this laptop surfing the web. It's not speedy but is much faster than the dial-up computers we used in the late 1990s. I would describe it as *functional*. Someone could write their doctoral thesis using this 2002 laptop. The thesis would read as well as if it were written using a computer released yesterday. This laptop should be set up somewhere public where people can see up close that a 2002 computer can still be usable. Seeing is believing. Ain't that the truth?
How about those famed "netbooks" from 2008, 2009, and 2010? Surely those are obsolete, right? Not so fast! If you install a 32-bit Linux on them, they can surf the web just fine using the latest version of Chromium web browserwhich still supports 32-bit operating systems. (Google Chrome no longer supports 32-bit operating systems, though.) A student with one of these netbooks could watch Khan Academy videos and develop their writing skills using Google Docs. Hook up one of these netbooks to a larger LCD screen, and the student could develop skills with [LibreOffice Draw][4] or [Inkscape][5], two of my favorite open source graphics programs. If you're interested, I have a [video for reviving netbooks][6] using Linux. Netbooks are also ideal for mailing overseas to a school in Liberia, a hospital in Haiti, a food distribution site in Somalia, or anywhere else where donated technology could make a huge difference.
Do you know where refurbished netbooks would really be welcome? In the communities that have opened their hearts and homes to Ukrainian refugees. They're doing their part, and we ought to be doing ours.
### Open source revives old computers
Many technology professionals live in a bubble of privilege. When they declare a technology "obsolete," they might not realize the harm they are causing by representing this opinion as a fact. People unfamiliar with how open source can revive older computers are sentencing those computers to death. I won't stand idly by when that happens. And you should not, either.
A simple response to a person who declares a computer obsolete is to say, "Sometimes older computers can be revived and put back to use. I've heard that open source is one way of doing that."
If you know the person well, you might want to share links to some of the YouTube videos listed in this article. And when you get a chance, take a moment to meet an individual or family who lacks access to the technology they need. That meeting will enrich your life in ways you would have never imagined.
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/10/obsolete-computer-linux-opportunity
作者:[Phil Shapiro][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/pshapiro
[b]: https://github.com/lkxed
[1]: https://opensource.com/sites/default/files/lead-images/retro_old_unix_computer.png
[2]: https://www.youtube.com/watch?v=Ao_vOijz14U
[3]: https://www.youtube.com/watch?v=UZiN6nm-PUU
[4]: https://opensource.com/tags/libreoffice
[5]: https://opensource.com/downloads/inkscape-cheat-sheet
[6]: https://www.youtube.com/watch?v=GBYEclpvyGQ

View File

@ -2,7 +2,7 @@
[#]: via: "https://opensource.com/article/23/2/gherkin-language-developers"
[#]: author: "David Blackwood https://opensource.com/users/david-blackwood"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "

View File

@ -1,189 +0,0 @@
[#]: subject: "Every Year is Someone's Year of Linux Desktop"
[#]: via: "https://news.itsfoss.com/filiming-with-foss-tech/"
[#]: author: "Community https://news.itsfoss.com/author/team/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Every Year is Someone's Year of Linux Desktop
======
I was in the midst of 2-year long Linux Experiment when my first feature film was green-lit. How did I make my film using (mostly) FOSS tech?
![Year of Linux desktop][1]
I fell in love in 2020. The timing couldn't have been more awkward.
The WHO had declared that the first pandemic of our lifetimes was upon us. I had just taken a sabbatical from work, intending to spend the time finishing a Master's, and the follow-up to my debut novel _[First Utterance][2]_.
But writers are a moody bunch. Sometimes our focus is razor sharp and sustained over weeks. Sometimes, we have the attention span of goldfish.
I was in goldfish mode.
I needed something to escape my daily grind: wake up, write for a few hours, get to study, finish assignments for classes, repeat.
Someone, somewhere on the internet mentioned that the pandemic offered the best opportunity for people to experiment with Linux for their daily computing.
Immediately, the goldfish brain's attention was grabbed.
There was a good reason for this:
20 years earlier, I had forgone film school for a Bachelor's in Computer Science.
To my surprise, I found myself enjoying most of the course (until we arrived at _Introduction to Programming with Java_, causing me to drop out of my undergrad, but that's a whole other story); _computer architecture_, _networking_ and _system administration_ modules had really piqued my interest, and I found myself at the school lab spending more time on the machines that had Linux installed on them.
The point is there was history between Linux and I.
And in 2020, the timing was just right.
### Nerdery in the Time of Corona
In the years after I dropped out of my Computer Science undergrad, I had ventured well away from the many curiosities that computing kindled within me.
In lieu of film school, I became a novelist.
I moved from IT to Marketing, and spent the better part of 20 years writing ad copy for print, TV, radio, and digital platforms.
I started my own advertising agency.
In those 20 years, we saw [social media become synonymous with the internet][3].
By 2020, I had decided to leave advertising for good, and a large portion of that was how disillusioned I had become with technology, particularly social media, and particularly the callous ways in which social media was harming us, as individuals and societies.
And though I know social media isn't the internet, it was still very hard to uncouple it in my mind. Being in advertising, I also felt like I had played a small role in making social media damningly ubiquitous.
**_My Year of Linux Desktop kept me sane through the pandemic._**
### 2022: My First Feature Film
By the time 2022 rolled over, I was daily driving Linux on my laptop. I also had bought myself an old ThinkPad T420, installed Ubuntu Server on it, and began running instances of Plex and NextCloud.
I was comfortable on Linux, having moved almost all [my writing work from MS Word and Cloud-based storage to Vim and GitHub][4].
And that's when I got the call from a producer, greenlighting my first film.
At this point, I had a decision to make. I would be cutting dailies while on set which meant I would need an industry standard Non-Linear Editor (NLE). I was comfortable on Adobe Premiere but knew there was no Linux port. I had already tried Kden Live and a couple of other FOSS alternatives, including Blender (which has a built-in NLE) but was left unsatisfied.
More immediately, I was worried that my writing workflow - which had become completely (Neo)Vim and Git-centric - would be too alien for my co-writer.
### Hello, Windows?!
At this point, I had to ask myself if Linux was ready for my film work ahead. To answer that, I reminded myself of the following:
#### Linux is Open (and Accessible) for Non-Tech/Non-Programmers
I am old enough to have tried Ubuntu Linux way back when they were shipping installation CDs to anyone in the world, for free. Back then, I had a host of hardware problems that I couldn't resolve, and a serious dearth in quality alternatives for my main tool: MS Word.
The Linux of 2020s was vastly different. Installation was a breeze, the help documentation was incredibly exhaustive, Linux YouTube existed making the transition all the more seamless, all my hardware worked flawlessly, and I was ready to abandon MS Word for good.
#### Git is A Writer's (Secret) Best Friend
I have thought this countless times since I first understood what Git was and what it was trying to do: the fact that Git isn't taught to writers is _criminal_. Linus Torvald inadvertently created a writer's best friend.
Yes, I am aware of how frustrating Git can be when it isn't working, but strip away all that complexity in Git workflows that software engineers deal with when grappling with large code bases that have contributions from multiple individuals, and you are left with a core functionality that is seemingly custom-built for writers in the digital age.
Meanwhile, my co-writer and I were faced with two issues. Being in two different continents, we needed a system that checked the following boxes:
Tracked changes in a way that didn't make the file an unreadable mess (which makes collaboration on MS Word, Google Docs an absolute pain)
Format the script in industry standard format without the need to purchase screenwriting software such as Final Draft.
Git and GitHub fit the first requirement. [Fountain][5], a markup syntax created specifically for screenwriting, answered the second question.
#### Linux and Hollywood
It might surprise a lot of people, but Linux has firmly embedded itself into Hollywood post-production workflows since the 90s.
As far back as 1998, Linux was a critical part of the post-production work in as iconic a film as [Titanic][6]. [BlackMagic's DaVinci Resolve][7] began its life as a colour-grading tool of choice, running on CentOS or RHEL-based systems.
Today, DaVinci Resolve is a fully-fledged editor and is the tool of choice for film-makers and YouTubers. Luckily for us Linux users, the company has continued to make its free version of the software available for Fedora and Debian-based systems. Arch users: the AUR has a version of DaVinci Resolve available as well, though I haven't tested it. Your mileage may vary.
### How I Made My Feature Film Using Mostly FOSS Tech
Let me share my filmmaking workflow
#### Pre-Production
##### Film Treatment
I wrote the [film treatment][8] using NeoVim using [Org mode][9] syntax. Orgmode is great for writing report-like document structures. [Vim-org][10] allows for easy export to PDF, LaTeX, HTML and doc formats. I like to keep my documentation in open file standards, ensuring portability across devices so I chose PDF. The screenshot below is the final film treat for the film before principal photography began:
![Film treatment][11]
##### Script
My co-writer and I worked settled on a simple workflow. I gave her a very basic introduction to VSCode, Fountain, Git and GitHub over the course of a day, after which she was up and running. The collaborative process there after was mostly seamless, with the Git based workflow becoming almost natural for both of us. Bear in mind, neither of us are from a software background. The image below is the script in fountain file being edited on NeoVim, while the right screen is [Zathura PDF reader][12] live rendering the script.
![Scripting with FOSS tech][13]
#### Production
##### Reviewing Dailies
Principal photograph was in Sinharaja Rain Forest, one of the most ancient forsests in the country. We were to be there for a week. I took my daily driver (a Dell XPS 9750 running Ubuntu Studio 20.04) to the set and used DaVinci Resolve to review dailies after the end of a day's shoot.
##### Backup using Rsync
The crew responsible for backing up daily footage would back up the material on a master hard disk, before making secondary backups on other external storage. Since I had taken my ThinkPad server along as well, I used that to automate the backing up using [Rsync][14].
#### Post-Production
##### Editing
I wasn't intending to edit the film on my XPS laptop though it certainly had the internals to handle the project. Originally, I was editing in a studio on a Windows machine running DaVinci Resolve. Unfortunately, the second quarter of 2022 saw Sri Lanka's economy free-falling after the country had defaulted on its debt payments. Adding to the misery, both fuel shortages and power cuts meant there was no way I could visit the studio to do the work.
It was at this point that my color-gradist suggested that we move the project to my laptop so I could work from home. He had worked on DaVinci Resolve running on CentOS for years and saw no issue doing the same on an Ubuntu machine. To make extra sure, he transcoded proxy footage to [ProRes 422][15] 720p to ensure that I could edit at speed.
Once we overcame these little hurdles, the editing itself was a very stable and stress-free operation. Once I finished, I had questions from my filmmaker friends on how a laptop running Linux handled the project. The below image is a screenshot running neofetch on that machine.
### Conclusion: Are We There Yet?
At some point, every recent Linux convert will join the _[Year of Linux Desktop][16]_ debate.
Three years into my journey, my thoughts on that have changed: from the idealistic (_sometime around the 2030s_), to the realist (_It's never happening_), to my current position: _The Year of Linux Desktop_ is in the hands of the _Tech-curious_.
The _Tech-curious_ are drawn to technology, sometimes outside the umbrella of the mainstream.
And I, disillusioned from social media technology and giant tech corporations in general, was in the perfect mindspace for experimenting with Linux desktop.
If my experience is anything to go by, the Year of Linux Desktop is within grasp for most tech-savvy people. With the addition of other FOSS tools like Git, Fountain, Markdown, LaTeX, Org Mode, and (Neo)Vim, I believe there is a good case for novelist-filmmakers types like myself to make the jump.
Of course, I wouldn't have been able to say this if Black Magic hadn't made a Linux port of DaVinci Resolve, but fortunately, they aren't Adobe or Microsoft.
For people to embrace Linux Desktop, it is critical that makers of proprietary software also buy-in, acknowledging that there are users in the Linux space who require the same tools as their counterparts in the Windows and Mac lands. If and when that happens, we might just see Linux Desktop graduate from meme to reality.
> 📋 Written by [Theena Kumaragurunathan][17], a novelist / filmmaker based in Sri Lanka. His debut novel is out on [Amazon kindle][18] and his first feature film is currently is finalizing distribution.
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/filiming-with-foss-tech/
作者:[Community][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/team/
[b]: https://github.com/lkxed/
[1]: https://news.itsfoss.com/content/images/size/w1304/2023/07/year-of-linux-desktop-1.png
[2]: https://www.amazon.com/First-Utterance-Miragian-Cycles-Book-ebook/dp/B08MBX8GRZ
[3]: https://www.cambridge.org/core/journals/law-and-social-inquiry/article/abs/is-facebook-the-internet-ethnographic-perspectives-on-open-internet-governance-in-brazil/CF7526E09C0E05DCD587DC8E0E01D9C1
[4]: https://news.itsfoss.com/configuring-vim-writing/
[5]: https://fountain.io/
[6]: https://www.linuxjournal.com/article/2494
[7]: https://www.blackmagicdesign.com/products/davinciresolve
[8]: https://www.studiobinder.com/blog/what-is-a-film-treatment-definition/#:~:text=A%20film%20treatment%20is%20a,or%20even%20purchasing%20your%20idea.
[9]: https://orgmode.org/
[10]: https://www.vim.org/scripts/script.php?script_id=3642
[11]: https://news.itsfoss.com/content/images/2023/07/filming-with-foss-tech.jpg
[12]: https://pwmt.org/projects/zathura/
[13]: https://news.itsfoss.com/content/images/size/w2400/2023/07/film-scripting-with-foss.jpg
[14]: https://www.wikiwand.com/en/Rsync
[15]: https://support.apple.com/en-us/HT202410
[16]: https://www.google.com/search?q=year+of+linux+desktop&sourceid=chrome&ie=UTF-8
[17]: https://theena.net/
[18]: https://www.amazon.com/First-Utterance-Miragian-Cycles-Book-ebook/dp/B08MBX8GRZ

View File

@ -1,371 +0,0 @@
[#]: subject: "Perform unit tests using GoogleTest and CTest"
[#]: via: "https://opensource.com/article/22/1/unit-testing-googletest-ctest"
[#]: author: "Stephan Avenwedde https://opensource.com/users/hansic99"
[#]: collector: "lujun9972"
[#]: translator: "toknow-gh"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Perform unit tests using GoogleTest and CTest
======
Using unit tests will likely improve your code's quality and do so
without disturbing your workflow.
![Team checklist and to dos][1]
This article is a follow-up to my last article [Set up a build system with CMake and VSCodium][2].
In the last article, I showed how to configure a build system based on [VSCodium][3] and [CMake][4]. This article refines this setup by integrating meaningful unit tests using [GoogleTest][5] and [CTest][6].
If not already done, clone the [repository][7], open it in VSCodium and checkout the tag _devops_2_ by clicking on the _main_-branch symbol (red marker) and choosing the branch (yellow marker):
![VSCodium tag][8]
Stephan Avenwedde (CC BY-SA 4.0)
Alternatively, open the command line and type:
```
`$ git checkout tags/devops_2`
```
### GoogleTest
GoogleTest is a platform-independent, open source C++ testing framework. Even though GoogleTest is not meant to be exclusively for unit tests, I will use it to define unit tests for the _Generator_ library. In general, a unit test should verify the behavior of a single, logical unit. The _Generator_ library is one unit, so I'll write some meaningful tests to ensure proper function.
Using GoogleTest, the test cases are defined by assertions macros. Processing an assertion generates one of the following results:
* _Success_: Test passed.
* _Nonfatal failure_: Test failed, but the test function will continue.
* _Fatal failure_: Test failed, and the test function will be aborted.
The assertions macros follow this scheme to distinguish a fatal from a nonfatal failure:
* `ASSERT_*` fatal failure, function is aborted.
* `EXPECT_*` nonfatal failure, function is not aborted.
Google recommends using `EXPECT_*` macros as they allow the test to continue when the tests define multiple assertions. An assertion macro takes two arguments: The first argument is the name of the test group (a freely selectable string), and the second argument is the name of the test itself. The _Generator_ library just defines the function _generate(...)_, therefore the tests in this article belong to the same group: _GeneratorTest_.
The following unit tests for the _generate(...)_ function can be found in [GeneratorTest.cpp][9].
#### Reference check
The [generate(...)][10] function takes a reference to a [std::stringstream][11] as an argument and returns the same reference. So the first test is to check if the passed reference is the same reference which the function returns.
```
TEST(GeneratorTest, ReferenceCheck){
    const int NumberOfElements = 10;
    std::stringstream buffer;
    EXPECT_EQ(
        std::addressof(buffer),
        std::addressof(Generator::generate(buffer, NumberOfElements))
    );
}
```
Here I use [std::addressof][12] to check if the address of the returned object refers to the same object I provided as input.
#### Number of elements
This test checks if the number of elements in the stringstream reference matches the number given as an argument.
```
TEST(GeneratorTest, NumberOfElements){
    const int NumberOfElements = 50;
    int nCalcNoElements = 0;
    std::stringstream buffer;
    Generator::generate(buffer, NumberOfElements);
    std::string s_no;
    while(std::getline(buffer, s_no, ' ')) {
        nCalcNoElements++;
    }
    EXPECT_EQ(nCalcNoElements, NumberOfElements);
}
```
#### Shuffle
This test checks the proper working of the random engine. If I invoke the _generate_ function two times in a row, I expect not to get the same result.
```
TEST(GeneratorTest, Shuffle){
    const int NumberOfElements = 50;
    std::stringstream buffer_A;
    std::stringstream buffer_B;
    Generator::generate(buffer_A, NumberOfElements);
    Generator::generate(buffer_B, NumberOfElements);
    EXPECT_NE(buffer_A.str(), buffer_B.str());
}
```
#### Checksum
This is the largest test. It checks whether the sum of the digits of a numerical series from 1 to _n_ is the same as the sum of the shuffled output series. I expect that the sum matches as the _generate(...)_ function should simply create a shuffled variant of such a series.
```
TEST(GeneratorTest, CheckSum){
    const int NumberOfElements = 50;
    int nChecksum_in = 0;
    int nChecksum_out = 0;
    std::vector&lt;int&gt; vNumbersRef(NumberOfElements); // Input vector
    std::iota(vNumbersRef.begin(), vNumbersRef.end(), 1); // Populate vector
    // Calculate reference checksum
    for(const int n : vNumbersRef){
        nChecksum_in += n;
    }
    std::stringstream buffer;
    Generator::generate(buffer, NumberOfElements);
    std::vector&lt;int&gt; vNumbersGen; // Output vector
    std::string s_no;
    // Read the buffer back back to the output vector
    while(std::getline(buffer, s_no, ' ')) {
        vNumbersGen.push_back(std::stoi(s_no));
    }
    // Calculate output checksum
    for(const int n : vNumbersGen){
        nChecksum_out += n;
    }
    EXPECT_EQ(nChecksum_in, nChecksum_out);
}
```
The above tests can also be debugged like an ordinary C++ application.
### CTest
In addition to the in-code unit test, the [CTest][6] utility lets me define tests that can be performed on executables. In a nutshell, I call the executable with certain arguments and match the output with [regular expressions][13]. This lets me simply check how the executable behaves with incorrect command-line arguments. The tests are defined in the top level [CMakeLists.txt][14]. Here is a closer look at three test cases:
#### Regular usage
If a positive integer is provided as a command-line argument, I expect the executable to produce a series of numbers separated by whitespace:
```
add_test(NAME RegularUsage COMMAND Producer 10)
set_tests_properties(RegularUsage
    PROPERTIES PASS_REGULAR_EXPRESSION "^[0-9 ]+"
)
```
#### No argument
If no argument is provided, the program should exit immediately and display the reason why:
```
add_test(NAME NoArg COMMAND Producer)
set_tests_properties(NoArg
    PROPERTIES PASS_REGULAR_EXPRESSION "^Enter the number of elements as argument"
)
```
#### Wrong argument
Providing an argument that cannot be converted into an integer should also cause an immediate exit with an error message. This test invokes the _Producer_ executable with the command line parameter*"ABC"*:
```
add_test(NAME WrongArg COMMAND Producer ABC)
set_tests_properties(WrongArg
    PROPERTIES PASS_REGULAR_EXPRESSION "^Error: Cannot parse"
)
```
#### Testing the tests
To run a single test and see how it is processed, invoke `ctest` from the command line providing the following arguments:
* Run single tst: `-R <test-name>`
* Enable verbose output: `-VV`
Here is the command `ctest -R Usage -VV:`
```
$ ctest -R Usage -VV
UpdatecTest Configuration from :/home/stephan/Documents/cpp_testing sample/build/DartConfiguration.tcl
UpdateCTestConfiguration from :/home/stephan/Documents/cpp_testing sample/build/DartConfiguration.tcl
Test project /home/stephan/Documents/cpp_testing sample/build
Constructing a list of tests
Done constructing a list of tests
Updating test list for fixtures
Added 0 tests to meet fixture requirements
Checking test dependency graph...
Checking test dependency graph end
```
In this code block, I invoked a test named _Usage_.
This ran the executable with no command-line arguments:
```
test 3
    Start 3: Usage
3: Test command: /home/stephan/Documents/cpp testing sample/build/Producer
```
The test failed because the output didn't match the regular expression `[^[0-9]+]`.
```
3: Enter the number of elements as argument
1/1 test #3. Usage ................
Failed Required regular expression not found.
Regex=[^[0-9]+]
0.00 sec round.
0% tests passed, 1 tests failed out of 1
Total Test time (real) =
0.00 sec
The following tests FAILED:
3 - Usage (Failed)
Errors while running CTest
$
```
To run all tests (including the one defined with GoogleTest), navigate to the _build_ directory and run `ctest`:
![CTest run][15]
Stephan Avenwedde (CC BY-SA 4.0)
Inside VSCodium, click on the area marked yellow in the info bar to invoke CTest. If all tests pass, the following output is displayed:
![VSCodium][16]
Stephan Avenwedde (CC BY-SA 4.0)
### Automate testing with Git Hooks
By now, running the tests is an additional step for the developer. The developer could also commit and push code that doesn't pass the tests. Thanks to [Git Hooks][17], I can implement a mechanism that automatically runs the tests and prevents the developer from accidentally committing faulty code.
Navigate to `.git/hooks`, create an empty file named _pre-commit_, and copy and paste the following code:
```
#!/usr/bin/sh
(cd build; ctest --output-on-failure -j6)
```
After it, make this file executable:
```
`$ chmod +x pre-commit`
```
This script invokes CTest when trying to perform a commit. If a test fails, like in the screenshot below, the commit is aborted:
![Commit failed][18]
Stephan Avenwedde (CC BY-SA 4.0)
If the tests succeed, the commit is processed, and the output looks like this:
![Commit succeeded][19]
Stephan Avenwedde (CC BY-SA 4.0)
The described mechanism is only a soft barrier: A developer could still commit faulty code using `git commit --no-verify`. I can ensure that only working code is pushed by configuring a build server. This topic will be part of a separate article.
### Summary
The techniques mentioned in this article are easy to implement and help you quickly find bugs in your code. Using unit tests will likely improve your code's quality and, as I have shown, do so without disturbing your workflow. The GoogleTest framework provides features for every conceivable scenario; I only used a subset of its functionality. At this point, I also want to mention the [GoogleTest Primer][20], which gives you an overview of the ideas, opportunities, and features of the framework.
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/1/unit-testing-googletest-ctest
作者:[Stephan Avenwedde][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/hansic99
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/todo_checklist_team_metrics_report.png?itok=oB5uQbzf (Team checklist and to dos)
[2]: https://opensource.com/article/22/1/devops-cmake
[3]: https://vscodium.com/
[4]: https://cmake.org/
[5]: https://github.com/google/googletest
[6]: https://cmake.org/cmake/help/latest/manual/ctest.1.html
[7]: https://github.com/hANSIc99/cpp_testing_sample
[8]: https://opensource.com/sites/default/files/cpp_unit_test_vscodium_tag.png (VSCodium tag)
[9]: https://github.com/hANSIc99/cpp_testing_sample/blob/main/Generator/GeneratorTest.cpp
[10]: https://github.com/hANSIc99/cpp_testing_sample/blob/main/Generator/Generator.cpp
[11]: https://en.cppreference.com/w/cpp/io/basic_stringstream
[12]: https://en.cppreference.com/w/cpp/memory/addressof
[13]: https://en.wikipedia.org/wiki/Regular_expression
[14]: https://github.com/hANSIc99/cpp_testing_sample/blob/main/CMakeLists.txt
[15]: https://opensource.com/sites/default/files/cpp_unit_test_ctest_run.png (CTest run)
[16]: https://opensource.com/sites/default/files/cpp_unit_test_ctest_vscodium.png (VSCodium)
[17]: https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks
[18]: https://opensource.com/sites/default/files/cpp_unit_test_git_hook_commit_failed.png (Commit failed)
[19]: https://opensource.com/sites/default/files/cpp_unit_test_git_hook_commit_succeeded.png (Commit succeeded)
[20]: https://google.github.io/googletest/primer.html

View File

@ -2,7 +2,7 @@
[#]: via: "https://opensource.com/article/22/2/setup-ci-pipeline-gitlab"
[#]: author: "Stephan Avenwedde https://opensource.com/users/hansic99"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: translator: "toknow-gh"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "

View File

@ -1,198 +0,0 @@
[#]: subject: "Shell Scripting is Still Going Strong"
[#]: via: "https://www.opensourceforu.com/2022/05/shell-scripting-is-still-going-strong/"
[#]: author: "Bipin Patwardhan https://www.opensourceforu.com/author/bipin-patwardhan/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Shell Scripting is Still Going Strong
======
This article introduces you to the basics of shell scripting and its importance in day-to-day life. A shell script is a command-line interpreter that runs on a UNIX/Linux shell.
![Penguin-with-linux-command][1]
The first thing we notice when we log into a UNIX/Linux system is the blinking cursor next to the $ sign. This is the shell. It has been for many decades the ubiquitous (and many times the only) interface to interact with a computer. Before the advent and popularity of graphical user interfaces (GUIs), the terminal and the shell were the only mechanism to make the computer do what we wanted it to do. At first glance, one may wonder what the shell does other than passing commands to the underlying operating system for execution. Most of us are familiar with commands like ls (for listing contents of a directory), cd (for changing the current directory), and so on. It is through the shell that we can execute these commands. The shell understands the text we type — converts it into tokens — and then executes them on the operating system.
### Flavours
Initially, the terminal started with the humble Bourne shell or sh. Over the years, many shell variants were developed and used. Some of the popular ones are C Shell / csh and Korn Shell / ksh. sh fell out of favour for a few years, but has gained popularity once again through its recent avatar, namely bash / Bourne Again Shell.
### What does the shell actually do?
The shell is the immediate interface between the operating system (OS) and the user. We make the computer do what we want, by using commands and applications supported by the tools installed on the computer we are using. Some commands are applications installed on the operating system, while some are built into the shell itself. Some of the commands built into bash are clear, cd, eval, and exec, to name a few, while commands like ls, and mkdir are applications. The commands built into the shell vary as per the shell.
In this article, we cover a few aspects related to bash.
### More about the shell
Most of us have used commands like ls, cd, and mkdir. When we run the ls -l command on a directory, all the directories and files in that directory are listed on the screen. If the number is large, the screen scrolls. If the terminal does not support scroll bars (as was the case for many years), there is no way to look at the entries that have scrolled past. To help overcome this, we use commands like more and less. These allow us to view the output on a page-by-page basis. The command typically used is:
```
ls -l | less
```
What is the shell doing here? What looks like a single command is actually two commands executing one after the other, ls and less. The pipe (|) connects the two programs, but the connection is managed by the shell. Because of the pipe character, the shell connects the two programs it connects the standard output of the ls command and connects it to the standard input or standard in or stdin of less. The pipe feature allows us to take the output of any program and provide it as the input to another program without us having to do any changes to the programs. This is the philosophy of many UNIX/Linux applications — keep the applications simple and then combine many applications together to achieve the end result, rather than having one program do many things.
If needed, we can redirect the output of ls to a file and then view it using vi. For this, we use the command:
```
ls -l > /tmp/my_file.txt
vi /tmp/my_file.txt
```
In this case, the output of ls is being redirected to a file. This is managed by the shell, which understands the > symbol to mean redirection. It treats the token that follows as a file.
### Automation using shell
This ability to combine commands is one of the key elements for the creation of automation scripts using shell commands. In my most recent project, we were executing Python/Spark (PySpark) applications using cluster mode. Each application executed many structured query language (SQL) statements SparkSQL. To keep track of application progress, we were printing details about the SQL being executed. This allowed us to maintain a log of what was happening in the application. As the applications were executed in cluster mode, to view the log, we had to use the yarn command as follows:
```
yarn log applicationId [application_id]
```
In most cases, the log produced by an application was very large. So we typically piped the log to less or redirected it to a file. The command we used was:
```
yarn log aplicationId [application_id] | less
```
Our development team had a strength of 40 people. Each one had to remember this command. To make it simpler, I converted this command into a bash script. For this, I created a file with a .sh extension. On UNIX and Linux systems, file extension does not matter. As long as the file is an executable, it will work. Extensions have significance on MS Windows.
### Important thing to remember
The shell is an interpreter. This means that it will read the program line by line and execute it. The limitation of this approach is that errors (if any) are not identified upfront. Errors are not identified till they are read and executed by the interpreter. In short, we can have a shell program that will execute perfectly for the first 20 lines and then fail due to a syntax error on line 21. When the script fails at line 21, the shell does not unroll/undo the previous steps. When such a thing occurs, we have to correct the script and start execution from the first line. Thus, as an example, if we have deleted a few files before encountering an error, execution of the shell script will stop, but the files are gone forever.
The script I created was:
```
#!/bin/bash
yarn log applicationId 123 | less
```
…where 123 was the application ID.
The first two characters of the first line are magic characters. They tell the script that this is an executable file and the line contains the name of the program to be used for execution. The remaining lines of the script are passed to the program mentioned. In this case, we are going to execute bash. Even after including the first line, we have to apply execute permissions to the file using:
```
chmod +x my_file.sh
```
After giving execute permissions to the file, we can execute it as:
```
./my_file.sh
```
If we do not give execute permissions to the file, we can execute the script as:
```
sh ./my_file.sh
```
### Passing parameters
You will realise quickly that such a script is handy, but becomes useless immediately. Each time we execute the Python/Spark application, a new ID is generated. Hence, for each run, we have to edit the file and add the new application ID. This definitely reduces the usability of the script. To be useful, we should be passing the application ID as a parameter:
```
#!/bin/bash
yarn log -applicationId ${1} | less
```
We need to execute the script as:
```
./show_log.sh 123
```
The script will execute the yarn command, fetch the log for the application and allow us to view it.
What if we want to redirect the output to a file? Not a problem. Instead of sending the output to less, we can redirect it to a file:
```
#!/bin/bash
ls l ${1} > ${2}
view ${2}
```
To run the script, we have to provide two parameters, and the command becomes:
```
./my_file.sh /tmp /tmp/listing.txt
```
When executed, $1 will bind to /tmp and $2 will bind to /tmp/listing.txt. For the shell, the parameters are named from one to nine. This does not mean we cannot pass more than nine parameters to a script. We can, but that is the topic of another article. You will note that I have mentioned the parameters as ${1} and ${2} instead of $1 and $2. It is a good practice to enclose the name of the parameter in curly brackets as it allows us to unambiguously combine the parameters as part of a longer variable. For example, we can ask the user to provide file name as a parameter and then use that to form a larger file name. As an example, we can take $1 as the parameter and create a new file name as ${1}_student_names.txt.
### Making the script robust
What if the user forgets to provide parameters? The shell allows us to check for such conditions. We modify the script as below:
```
#!/bin/bash
if [ -z “${2}” ]; then
echo “file name not provided”
exit 1
fi
if [ -z “${1}” ]; then
echo “directory name not provided”
exit 1
fi
DIR_NAME=${1}
FILE_NAME=${2}
ls -l ${DIR_NAME} > /tmp/${FILE_NAME}
view /tmp/${FILE_NAME}
```
In this program, we check if the proper parameters are passed. We exit the script if parameters are not passed. You will note that I am checking the parameters in reverse order. If we check for the presence of the first parameter before checking the presence of the second parameter, the script will pass to the next step if only one parameter is passed. While the presence of parameters can be checked in ascending order, I recently realised that it might be better to check from nine to one, as we can provide proper error messages. You will also note that the parameters have been assigned to variables. The parameters one to nine are positional parameters. Assigning positional parameters to named parameters makes it easy to debug the script in case of issues.
### Automating backup
Another task that I automated was that of taking a backup. During development, in the initial days, we did not have a version control system in place. But we needed to have a mechanism to take regular backups. So the best method was to write a shell script that, when executed, copied all the code files into a separate directory, zipped them and then uploaded them to HDFS, using the date and time as the suffix. I know that this method is not as clean as having a version control system, as we store complete files and finding differences still needs the use of a program like diff; however, it is better than nothing. While we did not end up deleting the code files, the team did end up deleting the bin directory where the helper scripts were stored!!! And for this directory I did not have a backup. I had no choice but to re-create all the scripts.
Once the source code control system was in place, I easily extended the backup script to upload the files to the version control system in addition to the previous method uploading to HDFS.
### Summing up
These days, programming languages like Python, Spark, Scala, and Java are in vogue as they are used to develop applications related to artificial intelligence and machine learning. While these languages are far more powerful when compared to shells, the humble shell provides a ready platform that allows us to create helper scripts that ease our day-to-day tasks. The shell is quite powerful, more so because we can combine the powers of all the applications installed on the OS. As I found out in my project, even after many decades, shell scripting is still going strong. I hope I have convinced you to give it a try.
### One for the road
Shell scripts can be very handy. Consider the following command:
```
spark3-submit --queue pyspark --conf “spark.yarn.principal= abcd@abcd.com --conf “spark.yarn.keytab=/keytabs/abcd.keytab --jars /opt/custom_jars/abcd_1.jar --deploy-mode cluster --master yarn $*
```
We were expected to use this command while executing a Python/Spark application. Now imagine this command has to be used multiple times a day, by a team of 40 people. Most of us will copy this command in Notepad++, and each time we need to use it, we will copy it from Notepad++ and paste it on the terminal. What if there is an error during copy paste? What if someone uses the parameters incorrectly? How do we debug which command was used? Looking at history does not help much.
To make it simple for the team to get on with the task of Python/Spark application execution, we can create a bash shell script as follows:
```
#!/bin/bash
SERVICE_PRINCIPAL=abcd@abcd.com
KEYTAB_PATH=/keytabs/abcd.keytab
MY_JARS=/opt/custom_jars/abcd_1.jar
MAX_RETRIES=128
QUEUE=pyspark
MASTER=yarn
MODE=cluster
spark3-submit --queue ${QUEUE} --conf “spark.yarn.principal=${SERVICE_PRINCIPAL} --conf “spark.yarn.keytab=${KEYTAB_PATH} --jars ${MY_JARS} --deploy-mode ${MODE} --master ${MASTER} $*
```
This demonstrates how powerful a shell script can be and make our life easy. You can try more commands and scripts as per your requirement and explore further.
--------------------------------------------------------------------------------
via: https://www.opensourceforu.com/2022/05/shell-scripting-is-still-going-strong/
作者:[Bipin Patwardhan][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.opensourceforu.com/author/bipin-patwardhan/
[b]: https://github.com/lkxed
[1]: https://www.opensourceforu.com/wp-content/uploads/2022/05/Penguin-with-linux-command.jpg

View File

@ -1,81 +0,0 @@
[#]: subject: "Fedora Linux editions part 1: Official Editions"
[#]: via: "https://fedoramagazine.org/fedora-linux-editions-part-1-official-editions/"
[#]: author: "Arman Arisman https://fedoramagazine.org/author/armanwu/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Fedora Linux editions part 1: Official Editions
======
![Fedora Linux editions part 1 Official Editions][1]
Photo by [Frédéric Perez][2] on [Unsplash][3]
Fedora Linux provides several variants to meet your needs. You can find an overview of all the Fedora Linux variants in my previous article [Introduce the different Fedora Linux editions][4]. This article will go into a little more detail about the Fedora Linux official editions. There are five *editions* — Fedora Workstation, Fedora Server, Fedora IoT, Fedora CoreOS, and Fedora Silverblue. The Fedora Linux download page currently shows that three of these are *official* editions and the remaining two are *emerging* editions. This article will cover all five editions.
### Fedora Workstation
If you are a laptop or desktop computer user, then Fedora Workstation is the right operating system for you. Fedora workstation is very easy to use. You can use this for daily needs such as work, education, hobbies, and more. For example, you can use it to create documents, make presentations, surf the internet, manipulate images, edit videos, and many other things.
This Fedora Linux edition comes with the GNOME Desktop Environment by default. You can work and do activities comfortably using this appearance concept. You can also customize the appearance of this Fedora Workstation according to your preferences, so you will be more comfortable using it. If you are a new Fedora Workstation user, you can read my previous article [Things to do after installing Fedora 34 Workstation][5]. Through the article, you will find it easier to start with Fedora Workstation.
More information is available at this link: [https://getfedora.org/en/workstation/][6]
### Fedora Server
Many companies require their own servers to support their infrastructure. The Fedora Server edition operating system comes with a powerful web-based management interface called Cockpit that has a modern look. Cockpit enables you to easily view and monitor system performance and status.
Fedora Server includes some of the latest technology in the open source world and it is backed by an active community. It is very stable and reliable. However, there is no *guarantee* that anyone from the Fedora community will be available or able to help if you encounter problems. If you are running mission critical applications and you might require technical support, you might want to consider [Red Hat Enterprise Linux][7] instead.
More information is available at this link: [https://getfedora.org/en][8][/server/][9]
### Fedora IoT
Operating systems designed specifically for IoT devices have become popular. Fedora IoT is an operating system created in response to this. Fedora IoT is an immutable operating system that uses OSTree Technology with atomic updates. This operating system focuses on security which is very important for IoT devices. Fedora IoT has support for multiple architectures. It also comes with a web-based configuration console so that it can be configured remotely without requiring that a keyboard, mouse or monitor be physically connected to the device.
More information is available at this link: [https://getfedora.org/en/iot/][10]
### Fedora CoreOS
Fedora CoreOS is a container-focused operating system. This operating system is used to run applications safely and reliably in any environment. It is designed for clusters but can also be run as a standalone system. This operating system has high compatibility with Linux Container configurations.
More information is available at this link: [https://getfedora.org/en/coreos/][11]
### Fedora Silverblue
This edition is a variant of Fedora Workstation with an interface that is not much different. However, the difference is that Fedora Silverblue is an immutable operating system with a container-centric workflow. This means that each installation is exactly the same as another installation of the same version. The goal is to make it more stable, less prone to bugs, and easier to test and develop.
More information is available at this link: [https://silverblue.fedoraproject.org/][12]
### Conclusion
Each edition of Fedora Linux has a different purpose. The availability of several editions can help you to get an operating system that suits your needs. The Fedora Linux editions discussed in this article are the operating systems available on the main download page for Fedora Linux. You can find download links and more complete documentation at [https://getfedora.org/][13].
--------------------------------------------------------------------------------
via: https://fedoramagazine.org/fedora-linux-editions-part-1-official-editions/
作者:[Arman Arisman][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://fedoramagazine.org/author/armanwu/
[b]: https://github.com/lkxed
[1]: https://fedoramagazine.org/wp-content/uploads/2022/04/FedoraMagz-FedoraEditions-1-Official-816x345.png
[2]: https://unsplash.com/@fredericp?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
[3]: https://unsplash.com/s/photos/blue-abstract?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
[4]: https://fedoramagazine.org/introduce-the-different-fedora-linux-editions/
[5]: https://fedoramagazine.org/things-to-do-after-installing-fedora-34-workstation/
[6]: https://getfedora.org/en/workstation/
[7]: https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux
[8]: https://getfedora.org/en/server/
[9]: https://getfedora.org/en/server/
[10]: https://getfedora.org/en/iot/
[11]: https://getfedora.org/en/coreos?stream=stable
[12]: https://silverblue.fedoraproject.org/
[13]: https://getfedora.org/

View File

@ -1,123 +0,0 @@
[#]: subject: "Fedora Linux editions part 2: Spins"
[#]: via: "https://fedoramagazine.org/fedora-linux-editions-part-2-spins/"
[#]: author: "Arman Arisman https://fedoramagazine.org/author/armanwu/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Fedora Linux editions part 2: Spins
======
![Fedora Linux editions part 2 Spins][1]
Photo by [Frédéric Perez][2] on [Unsplash][3]
One of the nice things about using Linux is the wide choice of desktop environments. Fedora Linux official Worksation edition comes with GNOME as default desktop environment, but you can choose another desktop environment as default via Fedora Spins. This article will go into a little more detail about the Fedora Linux Spins. You can find an overview of all the Fedora Linux variants in my previous article [Introduce the different Fedora Linux editions][4].
### KDE Plasma Desktop
This Fedora Linux comes with KDE Plasma as the default desktop environment. KDE Plasma is an elegant desktop environment that is very easy to customize. Therefore, you can freely and easily change the appearance of your desktop as you wish. You can customize your favorite themes, install the widgets you want, change icons, change fonts, customize panels according to your preferences, and install various extensions from the community.
Fedora Linux KDE Plasma Desktop is installed with a variety of ready-to-use applications. Youre ready to go online with Firefox, Kontact, Telepathy, KTorrent, and KGet. LibreOffice, Okular, Dolphic, and Ark are ready to use for your office needs. Your multimedia needs will be met with several applications such as Elisa, Dragon Player, K3B, and GwenView.
![Fedora KDE Plasma Desktop][5]
More information is available at this link: [https://spins.fedoraproject.org/en/kde/][6]
### XFCE Desktop
This version is perfect for those who want a balance between ease of customizing appearance and performance. XFCE itself is made to be fast and light, but still has an attractive appearance. This desktop environment is becoming popular for those with older devices.
Fedora Linux XFCE is installed with various applications that suit your daily needs. These applications are Firefox, Pidgin, Gnumeric, AbiWord, Ristretto, Parole, etc. Fedora Linux XFCE also already has a System Settings menu to make it easier for you to configure your Fedora Linux.
![Fedora XFCE Desktop][7]
More information is available at this link: [https://spins.fedoraproject.org/en/xfce/][8]
### LXQT Desktop
This spin comes with a lightweight Qt desktop environment, and focuses on modern classic desktops without slowing down the system. This version of Fedora Linux includes applications based on the Qt5 toolkit and is Breeze themed. You will be ready to carry out various daily activities with built-in applications, such as QupZilla, QTerminal, FeatherPad, qpdfview, Dragon Player, etc.
![Fedora LXQt Desktop][9]
More information is available at this link: [https://spins.fedoraproject.org/en/lxqt/][10]
### MATE-Compiz Desktop
Fedora Linux MATE Compiz Desktop is a combination of MATE and Compiz Fusion. MATE desktop allows this version of Fedora Linux to work optimally by prioritizing productivity and performance. At the same time Compiz Fusion provides a beautiful 3D look with Emerald and GTK + themes. This Fedora Linux is also equipped with various popular applications, such as Firefox, LibreOffice, Parole, FileZilla, etc.
![Fedora Mate-Compiz Desktop][11]
More information is available at this link: [https://spins.fedoraproject.org/en/mate-compiz/][12]
### Cinnamon Desktop
Because of its user-friendly interface, Fedora Linux Cinnamon Desktop is perfect for those who may be new to the Linux operating system. You can easily understand how to use this version of Fedora Linux. This spin has built-in applications that are ready to use for your daily needs, such as Firefox, Pidgin, GNOME Terminal, LibreOffice, Thunderbird, Shotwell, etc. You can use Cinnamon Settings to configure your operating system.
![Fedora Cinnamon Desktop][13]
More information is available at this link: [https://spins.fedoraproject.org/en/cinnamon/][14]
### LXDE Desktop
Fedora Linux LXDE Desktop has a desktop environment that performs fast but is designed to keep resource usage low. This spin is designed for low-spec hardware, such as netbooks, mobile devices, and older computers. Fedora Linux LXDE has lightweight and popular applications, such as Midori, AbiWord, Osmo, Sylpheed, etc.
![Fedora LXDE Desktop][15]
More information is available at this link: [https://spins.fedoraproject.org/en/lxde/][16]
### SoaS Desktop
SoaS stands for Sugar on a Stick. Fedora Linux Sugar Desktop is a learning platform for children, so it has a very simple interface that is easy for children to understand. The word “stick” in this context refers to a thumb drive or memory “stick”. This means this OS has a compact size and can be completely installed on a thumb drive. Schoolchildren can carry their OS on a thumb drive, so they can use it easily at home, school, library, and elsewhere. Fedora Linux SoaS has a variety of interesting learning applications for children, such as Browse, Get Books, Read, Turtle Blocks, Pippy, Paint, Write, Labyrinth, Physic, and FotoToon.
![Fedora SOAS Desktop][17]
More information is available at this link: [https://spins.fedoraproject.org/en/soas/][18]
### i3 Tiling WM
The i3 Tiling WM spin of Fedora Linux is a bit different from the others. This Fedora Linux spin does not use a desktop environment, but only uses a window manager. The window manager used is i3, which is a very popular tiling window manager among Linux users. Fedora i3 Spin is intended for those who focus on interacting using a keyboard rather than pointing devices, such as a mouse or touchpad. This spin of Fedora Linux is equipped with various applications, such as Firefox, NM Applet, brightlight, azote, htop, mousepad, and Thunar.
![Fedora i3 Tiling WM][19]
More information is available at this link: [https://spins.fedoraproject.org/en/i3/][20]
### Conclusion
Fedora Linux provides a large selection of desktop environments through Fedora Linux Spins. You can simply choose one of the Fedora Spins, and immediately enjoy Fedora Linux with the desktop environment of your choice along with its ready-to-use built-in applications. You can find complete information about Fedora Spins at [https://spins.fedoraproject.org/][21].
--------------------------------------------------------------------------------
via: https://fedoramagazine.org/fedora-linux-editions-part-2-spins/
作者:[Arman Arisman][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://fedoramagazine.org/author/armanwu/
[b]: https://github.com/lkxed
[1]: https://fedoramagazine.org/wp-content/uploads/2022/06/FedoraMagz-FedoraEditions-2-Spins-816x345.png
[2]: https://unsplash.com/@fredericp?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
[3]: https://unsplash.com/s/photos/blue-abstract?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
[4]: https://fedoramagazine.org/introduce-the-different-fedora-linux-editions/
[5]: https://fedoramagazine.org/wp-content/uploads/2022/08/screenshot-kde.jpg
[6]: https://spins.fedoraproject.org/en/kde/
[7]: https://fedoramagazine.org/wp-content/uploads/2022/08/screenshot-xfce.jpg
[8]: https://spins.fedoraproject.org/en/xfce/
[9]: https://fedoramagazine.org/wp-content/uploads/2022/08/screenshot-lxqt.jpg
[10]: https://spins.fedoraproject.org/en/lxqt/
[11]: https://fedoramagazine.org/wp-content/uploads/2022/08/screenshot-matecompiz.jpg
[12]: https://spins.fedoraproject.org/en/mate-compiz/
[13]: https://fedoramagazine.org/wp-content/uploads/2022/08/screenshot-cinnamon.jpg
[14]: https://spins.fedoraproject.org/en/cinnamon/
[15]: https://fedoramagazine.org/wp-content/uploads/2022/08/screenshot-lxde.jpg
[16]: https://spins.fedoraproject.org/en/lxde/
[17]: https://fedoramagazine.org/wp-content/uploads/2022/08/screenshot-soas.jpg
[18]: https://spins.fedoraproject.org/en/soas/
[19]: https://fedoramagazine.org/wp-content/uploads/2022/08/screenshot-i3.jpg
[20]: https://spins.fedoraproject.org/en/i3/
[21]: https://spins.fedoraproject.org/

View File

@ -1,131 +0,0 @@
[#]: subject: "7 Git tips for technical writers"
[#]: via: "https://opensource.com/article/22/11/git-tips-technical-writers"
[#]: author: "Maximilian Kolb https://opensource.com/users/kolb"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
7 Git tips for technical writers
======
As a technical writer working for [ATIX][1], my tasks include creating and maintaining documentation for [Foreman][2] at [github.com/theforeman/foreman-documentation][3]. Git helps me track versions of content, and to collaborate with the open source community. It's an integral part of storing the results of my work, sharing it, and discussing improvements. My main tools include my browser, OpenSSH to connect to Foreman instances, [Vim][4] to edit source files, and Git to version content.
This article focuses on recurring challenges when taking the first steps with Git and contributing to Foreman documentation. This is meant for intermediate Git users.
### Prerequisites
- You have installed and configured Git on your system. You must at least set your user name and email address.
- You have an account on [github.com][5]. GitHub isn't an open source project itself, but it's the site where many open source Git repositories are stored (including Foreman's documentation.)
- You have forked the [foreman-documentation][3] repository into your own account or organization (for example, _github.com/__My_User_Account__/foreman-documentation_. For more information, see [A step-by-step guide to Git][6] by Kedar Vijay Kulkarni.
- You have added your SSH public key to GitHub. This is necessary to push your changes to GitHub. For more information, see [A short introduction to GitHub][7] by Nicole C. Baratta.
### Contributing to Foreman documentation
Foreman is an open source project and thrives on community contributions. The project welcomes everyone and there are only a few requirements to make meaningful contributions. Requirements and conventions are documented in the [README.md][8] and [CONTRIBUTING.md][9] files.
Here are some of the most frequent tasks when working on Foreman documentation.
### I want to start working on Foreman documentation
- Clone the repository from github.com:`$ git clone git@github.com:theforeman/foreman-documentation.git
$ cd foreman-documentation/`
- Rename the remote:`$ git remote rename origin upstream`
- Optional: Ensure that your local master branch is tracking the master branch from the **foreman-documentation** repository from the **theforeman** organization:`$ git status`This automatically starts you on the latest commit of the default branch, which in this case is **master**.
- If you do not have a fork of the repository in your own account or organization already, create one.Go to [github.com/theforeman/foreman-documentation][3] and click **Fork**.
- Add your fork to your repository.`$ git remote add github git@github.com:_My_User_Account_/foreman-documentation.git`Your local repository now has two remotes: `upstream` and `github`.
### I want to extend the Foreman documentation
For simple changes such as fixing a spelling mistake, you can create a pull request (PR) directly.
- Create a branch named, for example, `fix_spelling`. The `git switch` command changes the currently checked out branch, and `-c` creates the branch:`$ git switch -c fix_spelling`
- Make your change.
- Add your change and commit:`$ git add guides/common/modules/abc.adoc
$ git commit -m "Fix spelling of existing"`I cannot emphasise the importance of good Git commit messages enough. A commit message tells contributors what you have done, and because it's preserved along with the rest of the codebase, it serves as a historical footnote when someone's looking back through code to determine what's happened over its lifespan. For more information on great git commit messages, see [The seven rules of a great Git commit message][10] by cbeams.
- Optional but recommended: View and verify the diff to the default branch. The default branch for **foreman-documentation** is called `master`, but other projects may name theirs differently (for example, `main`, `dev`, or `devel`.)`$ git diff master`
- Push your branch to Github. This publishes your change to your copy of the codebase.`$ git push --set-upstream github fix_spelling`
- Click on the link provided by Git in your terminal to create a pull request (PR).`remote: Create a pull request for 'fix_spelling' on Github by visiting:
remote:      https://github.com/_My_User_Account_/foreman-documentation/pull/new/fix_spelling`
- Add an explanation on _why_ the community should accept your change. This isn't necessary for a trivial PR, such as fixing a spelling mistake, but for major changes it's important.
### I want to rebase my branch to master.
- Ensure your local master branch tracks the master branch from [github.com/theforeman/foreman-documentation][3], not **foreman-documentation** in your own namespace:`$ git switch master`This should read `Your branch is up to date with 'upstream/master'`, with `upstream` being the name of your remote repository pointing to `github.com/theforeman/foreman-documentation`. You can review your remotes by running `git remote -v`.
- Fetch possible changes from your remote. The `git fetch` command downloads the tracked branch from your remote, and the `--all` option updates all branches simultaneously. This is necessary when working with additional branches. The `--prune` option removes references to branches that no longer exist.`$ git fetch --all --prune`
- Pull possible changes from `upstream/master` into your local `master` branch. The `git pull` command copies commits from the branch you're tracking into your current branch. This is used to "update" your local `master` branch to the latest state of the `master` branch in your remote (Github, in this case.)`$ git pull`
- Rebase your branch to "master".`$ git switch my_branch
$ git rebase -i master`
### I have accidentally committed to master
- Create a branch to save your work:`$ git switch -c my_feature`
- Switch back to the `master` branch:`$ git switch master`
- Drop the last commit on `master`:`$ git reset --soft HEAD~1`
- Switch back to `my_feature` branch and continue working:`$ git switch my_feature`
### I want to reword my commit message
- If you only have one commit on your branch, use `git amend` to change your last commit:`$ git commit --amend`This assumes that you don't have any other files added to your staging area (that is, you did not run `git add My_File` without also committing it.)
- Push your "change" to Github, using the `--force` option because the Git commit message is part of your existing commit, so you're changing the history on your branch.`$ git push --force`
### I want to restructure multiple changes on a single branch
- Use **e** to make actual changes to your commit. This interrupts your rebase!
- Use **f** to combine a commit with its parent.
- Use **d** to completely remove the commit from your branch.
- Move the lines to change the order of your changes.After successfully rebasing, your own commits are on top of the last commit from `master`.
- Optional but strongly recommended: Fetch changes from Github.`$ git switch master
$ git fetch
$ git pull`This ensures that you directly incorporate any other changes into your branch in the order they've been merged to `master`.
- To restructure your work, rebase your branch and make changes as necessary. Rebasing to `master` means changing the parent commit of your first commit on your branch:`$ git rebase --interactive master`Replace the first word `pick` to modify the commit.
### I want to copy a commit from another branch
- Get the commit ID from a stable branch (for example, a branch named `3.3`), using the `-n` option to limit the number of commits.`$ git log -n 5 3.3`
- Replicate changes by cherry-picking commits to your branch. The `-x` option adds the commit ID to your commit message. This is only recommended when cherry-picking commits from a stable branch.`$ git switch My_Branch
$ git cherry-pick -x Commit_ID`
### More tips
At ATIX, we run a [GitLab][11] instance to share code, collaborate, and automate tests and builds internally. With the open source community surrounding the Foreman ecosystem, we rely on Github.
I recommend that you always point the remote named `origin` in any Git repository to your _internal_ version control system. This prevents leaking information to external services when doing a `git push` based on pure muscle memory.
Additionally, I recommend using a fixed naming scheme for remotes. I always name the remote pointing to my own GitLab instance `origin`, the open source project `upstream`, and my fork on Github `github`.
For `foreman-documentation`, the repository has a relatively flat history. When working with a more complex structure, I tend to think of Git repositories in a very visual way with nodes (commits) pointing to nodes on lines (branches) that potentially intertwine. Graphical tools such as `gitk` or [Git Cola][12] can help visualize your Git history. Once you have fully grasped how Git works, you can move on to aliases, if you prefer the command line.
Before a big rebase with a lot of expected merge conflicts, I recommend creating a "backup" branch that you can quickly view diffs against. Note that it's pretty hard to irreversibly delete commits, so play around in your local Git repository before making big changes.
### Git for tech writers
Git is a tremendous help for technical writers. Not only can you use Git to version your own content, but you can actively collaborate with others.
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/11/git-tips-technical-writers
作者:[Maximilian Kolb][a]
选题:[lkxed][b]
译者:[Donkey-Hao](https://github.com/Donkey-Hao)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/kolb
[b]: https://github.com/lkxed
[1]: https://atix.de/en/
[2]: https://opensource.com/article/17/8/system-management-foreman
[3]: https://github.com/theforeman/foreman-documentation
[4]: https://opensource.com/resources/what-vim
[5]: https://github.com/
[6]: https://opensource.com/article/18/1/step-step-guide-git
[7]: https://opensource.com/life/15/11/short-introduction-github
[8]: https://github.com/theforeman/foreman-documentation/blob/master/guides/README.md#contribution-guidelines
[9]: https://github.com/theforeman/foreman-documentation/blob/master/CONTRIBUTING.md#contributing-to-foreman-documentation
[10]: https://cbea.ms/git-commit/#seven-rules
[11]: https://about.gitlab.com/
[12]: https://opensource.com/article/20/3/git-cola

View File

@ -1,173 +0,0 @@
[#]: subject: "Our favorite markup languages for documentation"
[#]: via: "https://opensource.com/article/22/12/markup-languages-documentation"
[#]: author: "Opensource.com https://opensource.com/users/admin"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Our favorite markup languages for documentation
======
Documentation is important for so many reasons. Readable documentation is even more so. In the world of open source software, documentation is how to use or contribute to an application. It's like the rulebook for a [game][1].
There are many different types of documentation:
- Tutorials
- How-to guides
- Reference guides
- Software architecture
- Product manuals
We asked some of the Opensource.com contributors about their technical documentation workflow, which markup language they preferred, and why they might use one over the other. Here's what they had to say.
### AsciiDoc
For the past several years, [Markdown][2] has been my standard language. But recently I decided to give [AsciiDoc][3] a try. The syntax is not difficult and [Gedit][4] on my Linux desktop supports it. I plan to stick with it for a while.
—- [Alan Formy-Duval][5]
In terms of low-syntax markup, I prefer AsciiDoc. I like it because its conversion process is consistent and predictable, with no surprise "flavor" variations to confuse things. I also love that it outputs to [Docbook][6], which is a markup-heavy syntax that I trust for longevity and flexibility.
But the "right" choice tends to be what a project is already using. I wouldn't write in AsciiDoc if a project uses Strawberry-flavored Markdown. Well, to be fair, I might write in AsciiDoc and then convert it to Strawberry-flavored Markdown with Pandoc.
I do think there is a time and place for Markdown. I do find it more readable than AsciiDoc. Links in AsciiDoc:
```
http://example.com[Example website]
```
Links in Markdown:
```
[Example.com](http://example.com)
```
The Markdown syntax is intuitive, delivering the information in the same way that I think most of us parse the same data when reading HTML ("Example website…oh, that's blue text, I'll roll over it to see where it goes…it goes to [example.com][7]").
In other words, when my audience is a human reader, I do often choose Markdown because its syntax is subtle but it's got enough of a syntax to make conversion possible, so it's still an OK storage format.
AsciiDoc, as minimal as it is, just looks scarier.
If my audience is a computer that's going to parse a file, I choose AsciiDoc.
—- [Seth Kenlon][8]
### reStructuredText
I'm a big fan of [docs as code][9] and how it brings developer tools into the content workflows. It makes it easier to have efficient reviews and collaboration, especially if engineers are contributors.
I'm also a bit of a markup connoisseur, having written whole books in AsciiDoc for O'Reilly, a lot of Markdown for various platforms, including a thousand posts on my blog. Currently, I'm a [reStructuredText][10] convert and maintain some of the tooling in that space.
—- [Lorna Mitchell][11]
Obligatory mention of reStructuredText. That's my go-to these days as I do a lot of Python programming. It's also been Python's standard for documentation source and code comments for ages.
I like that it doesn't suffer quite so much from the proliferation of nonstandards that Markdown does. That said, I do use a lot of Sphinx features and extensions when working on more complex documentation.
—- [Jeremy Stanley][12]
### HTML
I rarely use markup languages if I don't have to.
I find HTML easier to use than other markup languages though.
—- [Rikard Grossman-Nielsen][13]
For me, there are various ways to make documentation. It depends on where the documentation is going to be whether on a website, as part of the software package, or something downloadable.
For [Scribus][14], the internal documentation is in HTML, since an internal browser is used to access it. On a website, you might need to use a Wiki language. For something downloadable you might create a PDF or an EPUB.
I tend to write the documentation in a plain text editor. I might use XHTML, so that I can then import these files into an EPUB maker like Sigil. And, of course, Scribus is my go-to app for making a PDF, though I would probably be importing a text file created with a text editor. Scribus has the advantage of including and precisely controlling placement of graphics.
Markdown has never caught on with me, and I've never tried AsciiDoc.
—- [Greg Pittman][15]
I'm writing a lot of documentation in HTML right now, so I'll put in a plug for HTML. You can use HTML to create websites, or to create documentation. Note that the two are not really the same — when you're creating websites, most designers are concerned about presentation. But when you're writing documentation, tech writers should focus on content.
When I write documentation in HTML, I stick to the tags and elements defined by HTML, and I don't worry about how it will look. In other words, I write documentation in "unstyled" HTML. I can always add a stylesheet later. So if I need to make some part of the text stronger (such as a warning) or add emphasis to a word or phrase, I might use the `<strong>` and `<em>` tags, like this:
```
<p><strong>Warning: Lasers!</strong> Do <em>not</em> look into laser with remaining eye.</p>
```
Or to provide a short code sample within the body of a paragraph, I might write:
```
<p>The <code>puts</code> function prints some text to the user.</p>
```
To format a block of code in a document, I use `<pre><code>..</code></pre>` like this:
```
void
print_array(int *array, int size)
  {
  for (int i = 0; i < size; i++) {
  printf("array[%d] = %d\n", i, array[i]);
  }}
```
The great thing about HTML is you can immediately view the results with any web browser. And any documentation you write in unstyled HTML can be made prettier later by adding a stylesheet.
—- [Jim Hall][16]
### Unexpected: LibreOffice
Back in the 80s and 90s when I worked in System V Unix, SunOS, and eventually Solaris, I used the mm macros with `nroff,``troff` and finally `groff`. Read about MM using groff_mm (provided you have them installed.)
MM isn't really a markup language, but it feels like one. It is a very semantic set of troff and groff macros. It has most things markup language users would expect—headings, numbered lists, and so on.
My first Unix machine also had Writers' Workbench available on it, which was a boon for many in our organization who had to write technical reports but didn't particularly write in an "engaging manner". A few of its tools have made it to either BSD or Linux—style, diction, and look.
I also recall a standard generalized markup language (SGML) tool that came with, or perhaps we bought for, Solaris in the very early 90s. I used this for awhile, which may explain why I don't mind typing in my own HTML.
I've used Markdown a fair bit, but having said that, I should also be saying "which Markdown", because there are endless flavors and levels of features. I'm not a huge fan of Markdown because of that. I guess if I had a lot of Markdown to do I would probably try to gravitate toward some implementation of [CommonMark][17] because it actually has a formal definition. For example, [Pandoc][18] supports CommonMark (as well as several others).
I started using AsciiDoc, which I much prefer to Markdown as it avoids the "which version are you using" conversation and provides many useful things. What has slowed me down in the past with respect to AsciiDoc is that for some time it seemed to require installing Asciidoctor—a Ruby toolchain which I was not anxious to install. But these days there are more implementations at least in my Linux distro. Curiously, Pandoc emits AsciiDoc but does not read it.
Those of you laughing at me for not wanting a Ruby toolchain for AsciiDoc but being satisfied with a Haskell toolchain for Pandoc… I hear you.
I blush to admit that I mostly use LibreOffice these days.
—- [Chris Hermansen][19]
### Document now!
Documentation can be achieved through many different avenues, as the writers here have demonstrated. It's important to document how to use your code, especially in open source. This ensures that other people can use and contribute to your code properly. It's also wise to tell future users what your code is providing.
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/12/markup-languages-documentation
作者:[Opensource.com][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/admin
[b]: https://github.com/lkxed
[1]: https://opensource.comttps://opensource.com/life/16/11/software-documentation-tabletop-gaming
[2]: https://opensource.com/article/19/9/introduction-markdown
[3]: https://opensource.com/article/22/8/drop-markdown-asciidoc
[4]: https://opensource.com/%20https%3A//opensource.com/article/20/12/gedit
[5]: https://opensource.com/users/alanfdoss
[6]: https://opensource.com/article/17/9/docboo
[7]: http://example.com/
[8]: https://opensource.com/users/seth
[9]: https://opensource.com/article/22/10/docs-as-code
[10]: https://opensource.com/article/19/11/document-python-sphinx
[11]: https://opensource.com/users/lornajane
[12]: https://opensource.com/users/fungi
[13]: https://opensource.com/users/rikardgn
[14]: https://opensource.com/article/21/12/desktop-publishing-scribus
[15]: https://opensource.com/users/greg-p
[16]: https://opensource.com/users/jim-hall
[17]: https://commonmark.org/
[18]: https://opensource.com/downloads/pandoc-cheat-sheet
[19]: https://opensource.com/users/clhermansen

View File

@ -0,0 +1,96 @@
[#]: subject: "Fedora Linux editions part 3: Labs"
[#]: via: "https://fedoramagazine.org/fedora-linux-editions-part-3-labs/"
[#]: author: "Arman Arisman https://fedoramagazine.org/author/armanwu/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Fedora Linux editions part 3: Labs
======
Everyone uses their computer in different ways, according to their needs. You may work as a designer, so you need various design software on your computer. Or maybe youre a gamer, so you need an operating system that supports the games you like. Sometimes we dont have enough time to prepare an operating system that supports our needs. Fedora Linux Lab editions are here for you for that reason. Fedora Labs is a selection of curated bundles of purpose-driven software and content curated and maintained by members of the Fedora Community. This article will go into a little more detail about the Fedora Linux Lab editions.
You can find an overview of all the Fedora Linux variants in my previous article [Introduce the different Fedora Linux editions][1].
## Astronomy
Fedora Astronomy is made for both amateur and professional astronomers. You can do various activities related to astronomy with this Fedora Linux. Some of the applications in Fedora Astronomy are Astropy, Kstars, Celestia, Virtualplanet, Astromatic, etc. Fedora Astronomy comes with KDE Plasma as its default desktop environment.
Details about the applications included and the download link are available at this link: [https://labs.fedoraproject.org/en/astronomy/][2]
## Comp Neuro
Fedora Comp Neuro was created by the NeuroFedora Team to support computational neuroscience. Some of the applications included in Fedora Linux are Neuron, Brian, Genesis, SciPy, Moose, NeuroML, NetPyNE, etc. Those applications can support your work, such as modeling software, analysis tools, and general productivity tools.
Details about the applications included and the download link are available at this link: [https://labs.fedoraproject.org/en/comp-neuro/][3]
## Design Suite
This Fedora Linux is for you if you are a designer. You will get a complete Fedora Linux with various tools for designing, such as GIMP, Inkscape, Blender, Darktable, Krita, Pitivi, etc. You are ready to create various creative works with those tools, such as web page designs, posters, flyers, 3D models, videos, and animations. This Fedora Design Suite is created by designers, for designers.
Details about the applications included and the download link are available at this link: [https://labs.fedoraproject.org/en/design-suite/][4]
## Games
Playing games is fun, and you can do it with Fedora Games. This Fedora Linux is comes with various game genres, such as first-person shooters, real-time and turn-based strategy games, and puzzle games. Some of the games on Fedora Linux are Extreme Tux Racer, Wesnoth, Hedgewars, Colossus, BZFlag, Freeciv, Warzone 2011, MegaGlest, and Fillets.
Details about the applications included and the download link are available at this link: [https://labs.fedoraproject.org/en/games/][5]
## Jams
Almost everyone likes music. Some of you may be a musician or music producer. Or maybe you are someone who likes to play with audio. Then this Fedora Jam is for you, as it comes with JACK, ALSA, PulseAudio, and various support for audio and music. Some of the default applications from Fedora Jam are Ardor, Qtractor, Hydrogen, MuseScore, TuxGuitar, SooperLooper, etc.
Details about the applications included and the download link are available at this link: [https://labs.fedoraproject.org/en/jam/][6]
## Python Classroom
Fedora Python Classroom will make your work related to Python easier, especially if you are a Python developer, teacher, or instructor. Fedora Python Classroom is supported by various important stuff pre-installed. Some of the default applications on Fedora Linux are IPython, Jypyter Notebook, git, tox, Python 3 IDLE, etc. Fedora Python Classroom has 3 variants, namely you can run it graphically with GNOME, or with Vagrant or Docker containers.
Details about the applications included and the download link are available at this link: [https://labs.fedoraproject.org/en/python-classroom/][7]
## Security Lab
Fedora Security Lab is Fedora Linux for security testers and developers. Xfce comes as a default desktop environment with customizations to suit the needs of security auditing, forensics, system rescue, etc. This Fedora Linux provides several applications that are installed by default to support your work in the security field, such as Etherape, Ettercap, Medusa, Nmap, Scap-workbench, Skipfish, Sqlninja, Wireshark, and Yersinia.
Details about the applications included and the download link are available at this link: [https://labs.fedoraproject.org/en/security/][8]
## Robotics Suite
Fedora Robotic Suite is Fedora Linux with a wide variety of free and open robotics software packages. This Fedora Linux is suitable for professionals or hobbyists related to robotics. Some of the default applications are Player, SimSpark, Fawkes, Gazebo, Stage, PCL, Arduino, Eclipse, and MRPT.
Details about the applications included and the download link are available at this link: [https://labs.fedoraproject.org/en/robotics/][9]
## Scientific
Your scientific and numerical work will become easier with Fedora Scientific. This Fedora Linux features a variety of useful open source scientific and numerical tools. KDE Plasma is the default desktop environment along with various applications that will support your work, such as IPython, Pandas, Gnuplot, Matplotlib, R, Maxima, LaTeX, GNU Octave, and GNU Scientific Library.
Details about the applications included and the download link are available at this link: [https://labs.fedoraproject.org/en/scientific/][10]
## Conclusion
You have many choices of Fedora Linux to suit your work or hobby. Fedora Labs makes that easy. You dont need to do a lot of configuration from scratch because Fedora Labs will do it for you. You can find complete information about Fedora Labs at [https://labs.fedoraproject.org/][11].
--------------------------------------------------------------------------------
via: https://fedoramagazine.org/fedora-linux-editions-part-3-labs/
作者:[Arman Arisman][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
[a]: https://fedoramagazine.org/author/armanwu/
[b]: https://github.com/lkxed/
[1]: https://fedoramagazine.org/introduce-the-different-fedora-linux-editions/
[2]: https://labs.fedoraproject.org/en/astronomy/
[3]: https://labs.fedoraproject.org/en/comp-neuro/
[4]: https://labs.fedoraproject.org/en/design-suite/
[5]: https://labs.fedoraproject.org/en/games/
[6]: https://labs.fedoraproject.org/en/jam/
[7]: https://labs.fedoraproject.org/en/python-classroom/
[8]: https://labs.fedoraproject.org/en/security/
[9]: https://labs.fedoraproject.org/en/robotics/
[10]: https://labs.fedoraproject.org/en/scientific/
[11]: https://labs.fedoraproject.org/

View File

@ -1,86 +0,0 @@
[#]: subject: "Linux Jargon Buster: What is LUKS Encryption?"
[#]: via: "https://itsfoss.com/luks/"
[#]: author: "Bill Dyer https://itsfoss.com/author/bill/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Linux Jargon Buster: What is LUKS Encryption?
======
Computer security methods are designed to keep private things, well, private. There are many ways to secure a system. Some users use a simple username/password login scheme for basic protection. Other users may use extra protection through encryption in various ways like using VPN and disk encryption.
If you have sensitive client data on your machine (you might be running a business) or material deemed intellectual property or you are privacy cautious, you may want to consider disk encryption.
Some benefits of disk encryption are:
- Secure your system from hackers
- Prevent data leaks
- Protect you from potential liability issues
Disk encryption software prevents a desktop hard disk drive, a portable USB storage device, or laptop, from accessing unless the user inputs the correct authentication data. If your laptop is ever lost or stolen, encryption protects the data on the disk.
These days, new Windows-powered systems come with BitLocker encryption by default. On Linux, LUKS is the most popular way of employing disk encryption.
Wondering what is LUKS? I'll brief you on the topic.
### Technical jargons
Before going further, some terms should be defined. There is a lot to LUKS so it will help to break things down, especially if you're beginning to look into this.
**Volume**: A volume is a logical storage area that can be used to store data. In the context of disk encryption, a volume refers to a portion of a disk that has been encrypted to protect its contents.
**Parameters**: Parameters are settings that control how an encryption algorithm works. Parameters might include the encryption algorithm used, the key size, and other details about how the encryption should be performed.
**Cipher type**: A cipher is a mathematical algorithm used for encryption It refers to the specific encryption algorithm that is being used to protect the data on an encrypted volume.
**Key size**: The key size is a measure of the strength of an encryption algorithm: the larger the key size, the stronger the encryption. It is often expressed in bits, such as 128-bit encryption or 256-bit encryption.
**Header**: The header is a special area at the beginning of an encrypted volume that contains information about the encryption, such as the encryption algorithm used and the encryption keys.
The next definition can be tricky to a newcomer, but it's worth knowing about, especially when dealing with LUKS; it's quite handy.
**Container**: A container is a special file that acts like a virtual encrypted volume. It can be used to store encrypted data, just like an encrypted partition. The difference is that a container is a file that can be stored on an unencrypted partition, while an encrypted partition is a portion of a disk that has been encrypted as a whole. A container, then, is a file _that acts as a virtual encrypted volume_.
### What Is LUKS and What Can It Do?
[Linux Unified Key Setup - LUKS][1] is a disk encryption specification created by Clemens Fruhwirth in 2004 and was originally intended for Linux. It is a well-known, secure, and high-performance disk encryption method based on an enhanced version of [cryptsetup][2], using [dm-crypt][3] as the disk encryption backend. LUKS is also a popular encryption format in Network Attached Storage (NAS) devices.
LUKS can also be used to create and run encrypted containers. Encrypted containers feature the same level of protection as LUKS full-disk encryption. LUKS also offers multiple encryption algorithms, several modes of encryption, and several hash functions - a little over 40 possible combinations.
![LUKS schematic diagram][4]
Any filesystem can be encrypted, including the swap partition. There is an unencrypted header at the beginning of an encrypted volume, which allows up to 8 (LUKS1) or 32 (LUKS2) encryption keys to be stored along with encryption parameters such as cipher type and key size.
The existence of this header is a major difference between LUKS and dm-crypt, since the header allows multiple different passphrases to be used, with the ability to change and remove them easily. It is worth a reminder, however, that if the header is lost or corrupted, the device will no longer be decryptable.
There are two versions of LUKS, with LUKS2 having features such as greater resistance to header corruption, and the use of [Argon2][5] encryption algorithm by default (LUKS1 uses [PBKDF2][6]). Conversion between both versions of LUKS is possible in certain situations, but some features may not be available with LUKS1.
### Where Can I Learn More?
I am hopeful that this short article is a help in understanding a little about LUKS and encryption. The exact steps for creating and using an encrypted partition with LUKS varies, depending on an individual's specific needs, so I will not cover installation and setup here.
If you want a guide to lead you though setting up LUKS, an excellent guide can be found in this article: [Basic Guide To Encrypting Linux Partitions With LUKS][7]. If you're new at this, and you want to try out LUKS, safe learning can be done on a virtual machine or a spare computer to get a feel for how it works.
--------------------------------------------------------------------------------
via: https://itsfoss.com/luks/
作者:[Bill Dyer][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/bill/
[b]: https://github.com/lkxed/
[1]: https://en.wikipedia.org/wiki/Linux_Unified_Key_Setup?ref=its-foss
[2]: https://www.tutorialspoint.com/unix_commands/cryptsetup.htm?ref=its-foss
[3]: https://www.kernel.org/doc/html/latest/admin-guide/device-mapper/dm-crypt.html?ref=its-foss
[4]: https://itsfoss.com/content/images/2023/03/luks-schematic-diagram.png
[5]: https://www.argon2.com/?ref=its-foss
[6]: https://en.wikipedia.org/wiki/PBKDF2?ref=its-foss
[7]: https://linuxconfig.org/basic-guide-to-encrypting-linux-partitions-with-luks?ref=its-foss

View File

@ -1,104 +0,0 @@
[#]: subject: "3 reasons my Linux team uses Penpot"
[#]: via: "https://opensource.com/article/23/3/linux-penpot"
[#]: author: "Emma Kidney https://opensource.com/users/ekidney"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
3 reasons my Linux team uses Penpot
======
Working with Fedora exposes you to a lot of different open source software. A major Fedora website revamp started over a year ago, with the goal of improving design aesthetics, creating a style guide, planning the website strategy, and choosing the tech stack for delivering the Fedora Linux offerings website. From a design perspective, the team needed a tool to create mock-ups, a place to hold the asset libraries, and something suitable to hand off to developers once complete.
### Choosing Penpot
Figma is a popular interface designing tool recommended by many, but it wasn't deemed suitable because the company had recently imposed restrictions on their free plan. This concern arose before Adobe acquired Figma, so the decision not to use it was even more significant in retrospect!
The team looked into Penpot and found that it matched everyone's requirements. Penpot is the first open source design and prototyping platform for cross-domain teams. A team within Kaleidos creates Penpot. Kaleidos is a technology company started in 2011 that fully focuses on open source projects.
There are three ways the Fedora Websites and Apps team uses Penpot:
- Wireframes and mock-ups
- UX testing and feedback
- Collabloration
I expand on these uses below. While the example discusses the Fedora Project, Penpot offers benefits to any open source community.
### 1. Wireframes and mock-ups
Drafting webpage designs is the primary way our team uses Penpot. Drafting enables quick collaboration and lessens communication issues between contributors. Developers and designers can collaborate freely and in the same space.
Community feedback is important. It can be a bit difficult to share mock-ups properly. Penpot is web-based and easily accessible on any platform. When entering **View Mode** on a prototype, the tool generates a shareable link. You can also modify the permissions or destroy the link if you no longer want it shared.
![Creating a shareable link and editing permissions on Penpot.][1]
### 2. UX testing and feedback
This revamp works closely with the Fedora community. By running usability testing sessions on prototypes and sharing design progress, we use Penpot to keep the community involved every step of the way.
### 3. Collaboration
During the revamp, our development and design teams used Penpot to generate ideas, organize meetings, and test new concepts visually.
Our teams used Penpot as a whiteboard in early planning sessions and enabled the developers to contribute ideas asynchronously while engaging in the discussion. This method reduced stress, made sure everyone's ideas could be heard, helped us see patterns, and mediated disagreements for a good compromise. Penpot helped create a sense of understanding between everyone.
The team used Penpot as a source of assets. Uses can store elements and other content in an asset library so that one can use them repeatedly. Penpot stores components, graphics, typographies, color palettes, and more.
![An example of an asset library within Penpot.][2]
Sharing these libraries enables the whole team to access them. This can be helpful when working with a team that regularly accesses the same source files. If a new member joins, all assets they need to start building mock-ups for the project would be readily available. Users can export these assets directly from the Penpot file.
![Exporting selected assets in a Penpot file.][3]
Developers can view the prototype in full on any browser. This capability makes building the website easier as you can code side by side with the prototype. If a designer is working on the file at the same time, changes they make can be seen by refreshing in **View Mode** or in real-time if in the actual file.
![An editor with code and the Penpot interface.][4]
### Open source values
Penpot aligns with the Fedora Project's "Four Foundations" of Freedom, Friends, Features, and First. As you review these values, consider how the tool might align with your own open source initiative.
#### Freedom
We choose open source and free alternatives to proprietary code and content and limit the effects of proprietary code on and within the Project. Penpot is the first open source design and prototyping platform. Penpot is web-based, independent of operating systems, and works with open web standards. This ensures compatibility with web browsers and external applications like Inkscape.
#### Friends
My community consists of people from all walks of life working together to advance free software. Penpot's mission is similar. Its goal is to provide an open source and open standards tool to bring collaboration between designers and developers to the next level. Using Penpot has allowed for a smooth handoff to developers and has allowed us to work productively together. There's no back-and-forth looking for files or assets, as everything they need is in the Penpot file.
#### Features
Fedora cares about excellent software. Its feature development is always done openly and transparently, and it encourages participation. Anyone can start working on any issue or as part of any team that interests them. Penpot shares this ethos. Anyone can collaborate! The code and a contributor guide are available on the project's Git repository.
#### First
Fedora adopts a strategy of advancing free software through consistent forward momentum. This approach usually follows a "release early, release often" workflow. Penpot also updates frequently. It publishes a Dev Diary blog to the community, highlighting the work that has been done. It states on its website, "We also have this sense of urgency, we need to act fast, there's too much at stake."
### Wrap up
The project is coming close to completion, with the first deadline aligning with the release of Fedora Linux 38. Penpot has proven to be a valuable tool and is expanding the resources available to Open Source Design enthusiasts. With the platform celebrating its official launch recently, it's exciting to see what's next.
Penpot has changed the way the our team works. What can it do for your organization and community?
This article has been adapted from the talk: _Mock-ups and Motions—How the Fedora Design Team uses Penpot_ by Ashlyn Knox and Emma Kidney, given at the Creative Freedom Summit. A recording of the talk is available to [watch on PeerTube][5].
--------------------------------------------------------------------------------
via: https://opensource.com/article/23/3/linux-penpot
作者:[Emma Kidney][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/ekidney
[b]: https://github.com/lkxed/
[1]: https://opensource.com/sites/default/files/2023-03/permissions.webp
[2]: https://opensource.com/sites/default/files/2023-03/asset-library.webp
[3]: https://opensource.com/sites/default/files/2023-03/exporting.webp
[4]: https://opensource.com/sites/default/files/2023-03/coding.webp
[5]: https://peertube.linuxrocks.online/w/5H22PH66kYwiTKcKR1p2kJ

View File

@ -1,312 +0,0 @@
[#]: subject: "Run a virtual conference using only open source tools"
[#]: via: "https://opensource.com/article/23/4/open-source-tools-virtual-conference"
[#]: author: "Máirín Duffy https://opensource.com/users/mairin"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Run a virtual conference using only open source tools
======
[The Fedora Design Team][1] discovered that using open source tools to run a virtual conference can be quite effective by hosting the first [Creative Freedom Summit][2] in January 2023.
In this article, I'll share some background on the conference, why using open source tools to run it was important to us, and the specific tools and configurations our team used to make it all work. I'll also talk about what worked well and what will need improvement at our next summit in 2024.
### What is Creative Freedom Summit?
The Creative Freedom Summit was an idea Marie Nordin came up with after reviewing talk submissions for [Flock, the annual Fedora users and contributors conference][3]. She received many talk submissions for the August 2022 Flock relating to design and creativity in open source—far more than we could possibly accept. With so many great ideas for open source design-related talks out there, she wondered if there would be space for a separate open source creativity conference focused on creatives who use open source tools to produce their work.
Marie brought this idea to the Fedora Design Team in the fall of 2022, and we started planning the conference, which took place January 17-19, 2023. Since it was our first time running a new conference like this, we decided to start with invited speakers based on some of the Flock submissions and our own personal network of open source creatives. Almost every speaker we asked gave a talk, so we didn't have room to accept submissions. We will need to figure out this next year, so we don't have an open source CFP (Call for Papers) management tool for that to tell you about yet.
### Using open source for open source conferences
Since the initial COVID pandemic lockdowns, Fedora's Flock conference has been run virtually using Hopin, an online conference platform that isn't open source but is friendly to open source tools. Fedora started using it some years ago, and it definitely provides a professional conference feel, with a built-in sponsor booth/expo hall, tracks, hallway chat conversations, and moderation tools. Running the Creative Freedom Summit using Hopin was an option for us because, as a Fedora-sponsored event, we could access Fedora's Hopin setup. Again, Hopin is not open source.
Now, as a long-term (~20 years) open source contributor, I can tell you that this kind of decision is always tough. If your conference focuses on open source, using a proprietary platform to host your event feels a little strange. However, as the scale and complexity of our communities and events have grown, the ability to produce an integrated open source conference system has become more challenging.
There is no right or wrong answer. You have to weigh a lot of things when making this decision:
- Budget
- People power
- Infrastructure
- Technical capability
- Complexity/formality/culture of the event
We didn't have any budget for this event. We did have a team of volunteers who could put some work hours into it. We had the Fedora Matrix Server as a piece of supported infrastructure we could bring into the mix and access to a hosted WordPress system for the website. Teammate Madeline Peck and I had the technical capability/experience of running the live, weekly Fedora Design Team [video calls][4] using PeerTube. We wanted the event to be low-key, single-track, and informal, so we had some tolerance for glitches or rough edges. We also all had a lot of passion for trying an open source stack.
Now you know a little about our considerations when making this decision, which might help when making decisions for your event.
### An open source conference stack
Here is how the conference tech stack worked.
#### Overview
**Live components**
- **Livestream**: We streamed the stage and the social events to a PeerTube channel. Conference attendees could watch the stream live from our PeerTube channel. PeerTube includes some privacy-minded analytics to track the number of livestream viewers and post-event views.
- **Live stage + social event room**: We had one live stage for speakers and hosts using Jitsi, ensuring only those with permission could be on camera. We had an additional Jitsi meeting room for social events that allowed anyone who wanted to participate in the social event to go on camera.
- **Backstage**: We had a "Backstage" Matrix channel to coordinate with speakers, hosts, and volunteers in one place while the event was going on.
- **Announcements and Q&A**: We managed Q&A and the daily schedule for the conference via a shared Etherpad (which we later moved to Hackmd.io).
- **Integrated and centralized conference experience**: Using Matrix's Element client, we embedded the livestream video and an Etherpad into a public Matrix room for the conference. We used attendance in the channel to monitor overall conference attendance. We had a live chat throughout the conference and took questions from audience members from the chat and the embedded Q&A Etherpad.
- **Conference website**: We had a beautifully-designed website created by Ryan Gorley hosted on WordPress, which had the basic information and links for how to join the conference, the dates/times, and the schedule.
#### Post-event components
- **Post-event survey**: We used the open source LimeSurvey system to send out a post-event survey to see how things went for attendees. I use some of the data from that survey in this article.
- **Post-event video editing and captioning**: We didn't have a live captioning system for the conference, but as I was able, I typed live notes from talks into the channel, which attendees greatly appreciated. Post-event, we used Kdenlive (one of the tools featured in talks at the event) to edit the videos and generate captions.
- **Event recordings**: PeerTube automagically posts livestream recordings to channels, making nearly instant recordings available for attendees for talks they may have missed.
I'll cover some details next.
### Livestream with PeerTube
![Screenshot showing the Creative Freedom Summit PeerTube channel, with the logo, a description of the event, and a set of video thumbnails][5]
We used the [LinuxRocks PeerTube platform][6] generously hosted by [LinuxRocks.online][7] for the Creative Freedom Summit's livestream. PeerTube is a free and open source decentralized video platform that is also part of the Fediverse.
One of the best features of PeerTube (that other platforms I am aware of don't have) is that after your livestream ends, you get a near-instant replay recording posted to your channel on PeerTube. Users in our chatroom cited this as a major advantage of the platform. If an attendee missed a session they were really interested in, they could watch it within minutes of that talk's end. It took no manual intervention, uploading, or coordination on the part of the volunteer organizing team to make this happen; PeerTube automated it for us.
Here is how livestreaming with PeerTube works: You create a new livestream on your channel, and it gives you a livestreaming URL + a key to authorize streaming to the URL. This URL + key can be reused over and over. We configured it so that the recording would be posted to the channel where we created the livestreaming URL as soon as a livestream ended. Next, copy/paste this into Jitsi when you start the livestream. This means that you don't have to generate a new URL + key for each talk during the conference—the overhead of managing that for organizers would have been pretty significant. Instead, we could reuse the same URL + key shared in a common document among conference organizers (we each had different shifts hosting talks). Anyone on the team with access to that document could start the livestream.
#### How to generate the livestream URL + key in PeerTube
The following section covers generating the livestream URL + key in PeerTube, step-by-step.
**1. Create stream video on PeerTube**
Log into PeerTube, and click the **Publish** button in the upper right corner:
![Screenshot of the PeerTube Publish button][8]
**2. Set options**
Click on the **Go live** tab (fourth from the left) and set the following options:
- Channel: (The channel name you want the livestream to publish on)
- Privacy: Public
- Radio buttons: Normal live
Then, select **Go Live**. (Don't worry, you won't really be going live quite yet, there is more data to fill in.)
![Screenshot of the Go Live button in PeerTube][9]
**3. Basic info (don't click update yet)**
First, fill out the **Basic Info** tab, then choose the **Advanced Settings** tab in the next step. Fill out the name of the livestream, description, add tags, categories, license, etc. Remember to publish after the transcoding checkbox is turned on.
This ensures once your livestream ends, the recording will automatically post to your channel.
**4. Advanced settings**
You can upload a "standby" image that appears while everyone is watching the stream URL and waiting for things to start.
![Screenshot of PeerTube Advanced Settings][10]
This is the standby image we used for the Creative Freedom Summit:
![Screenshot of the Creative Freedom Summit banner][11]
**5. Start livestream on PeerTube**
Select the **Update** button in the lower right corner. The stream will appear like this—it's in a holding pattern until you start streaming from Jitsi:
![Screenshot of starting the live stream on PeerTube][12]
**6. Copy/paste the livestream URL for Jitsi**
This is the final step in PeerTube. Once the livestream is up, click on the **…** icon under the video and towards the right:
![Copy and paste the URL][13]
Select **Display live information**. You'll get a dialog like this:
![Screenshot of Display live information option][14]
You must copy both the live RTMP URL and the livestream key. Combine them into one URL and then copy/paste that into Jitsi.
The following are examples from my test run of these two text blocks to copy:
- Live RTMP Url: **rtmp://peertube.linuxrocks.online:1935/live**
- Livestream key: **8b940f96-c46d-46aa-81a0-701de3c43c8f**
What you'll need to paste into Jitsi is these two text blocks combined with a **/** between them, like so:
**rtmp://peertube.linuxrocks.online:1935/live/8b940f96-c46d-46aa-81a0-701de3c43c8f**
### Live stage + social event room: Jitsi
We used the free and open source hosted [Jitsi Meet][15] video conferencing platform for our "live stage." We created a Jitsi meeting room with a custom URL at **[https://meet.jit.si][16]** and only shared this URL with speakers and meeting organizers.
We configured the meeting with a lobby (this feature is available in meeting settings once you join your newly-created meeting room) so speakers could join a few minutes before their talk without fear of interrupting the presentation before theirs. (Our host volunteers let them in when the previous session finished.) Another option is to add a password to the room. We got by just by having a lobby configured. It did seem, upon testing, that the moderation status in the room wasn't persistent. If a moderator left the room, they appeared to lose moderator status and settings, such as the lobby setup. I kept the Jitsi room available and active for the entire conference by leaving it open on my computer. (Your mileage may vary on this aspect.)
Jitsi has a built-in livestreaming option, where you can post a URL to a video service, and it will stream your video to that service. We had confidence in this approach because it is how we host and livestream weekly [Fedora Design Team meetings][17]. For the Creative Freedom Summit, we connected our Jitsi Live Stage (for speakers and hosts) to [a channel on the Linux Rocks PeerTube][6].
Jitsi lets speakers share their screens to drive their own slides or live demos.
### Livestreaming Jitsi to PeerTube
1. Join the meeting and click the **…** icon next to the red hangup button at the bottom of the screen.
![Join the Jitsi meeting][18]
2. Select **Start live stream** from the pop-up menu.
![Screenshot of starting the live stream in Jitsi][19]
3. Copy/paste the PeerTube URL + key text
![Screenshot of copying and pasting the livestream key][20]
4. Listen for your Jitsi Robot friend
A feminine voice will come on in a few seconds to tell you, "Live streaming is on." Once she sounds, smile! You're livestreaming.
5. Stop the livestream
This stops the PeerTube URL you set up from working, so repeat these steps to start things back up.
#### Jitsi tips
**Managing Recordings by turning the Jitsi stream on and off**
We learned during the conference that it is better to turn the Jitsi stream off between talks so that you will have one raw recording file per talk posted to PeerTube. We let it run as long as it would the first day, so some recordings have multiple presentations in the same video, which made using the instant replay function harder for folks trying to catch up. They needed to seek inside the video to find the talk they wanted to watch or wait for us to post the edited version days or weeks later.
**Preventing audio feedback**
Another issue we figured out live during the event that didn't crop up during our tests was audio feedback loops. These were entirely my fault (sorry to everyone who attended). I was setting up the Jitsi/PeerTube links, monitoring the streams, and helping host and emcee the event. Even though I knew that once we went live, I needed to mute any PeerTube browser tabs I had open, I either had more PeerTube tabs open than I thought and missed one, or the livestream would autostart in my Element client (which I had available to monitor the chat). I didn't have an easy way to mute Element. In some of the speaker introductions I made, you'll see that I knew I had about 30 seconds before the audio feedback would start, so I gave very rushed/hurried intros.
I think there are simpler ways to avoid this situation:
- Try to ensure your host/emcee is not also the person setting up/monitoring the streams and chat. (Not always possible, depending on how many volunteers you have at any given time.)
- If possible, monitor the streams on one computer and emcee from another. This way, you have one mute button to hit on the computer you're using for monitoring, and it simplifies your hosting experience on the other.
This is something worth practicing and refining ahead of time.
### Backstage: Element
![A screenshot showing three chat room listings in Element: Creative Freedom Summit with a white logo, Creative Freedom Summit Backstage with a black logo, and Creative Freedom Summit Hosts with an orange logo][21]
We set up a "Backstage" invite-only chat room a week or so before the conference started and invited all our speakers to it. This helped us ensure a couple of things:
- Our speakers were onboarded to Element/Matrix well before the event's start and had the opportunity to get help signing up if they had any issues (nobody did).
- We started a live communication channel with all speakers before the event so that we could send announcements/updates pretty easily.
The channel served as a useful place during the event to coordinate transitions between speakers, give heads up about whether the schedule was running late, and in one instance, quickly reschedule a talk when one of our speakers had an emergency and couldn't make their original scheduled time.
We also set up a room for hosts, but in our case, it was extraneous. We just used the backstage channel to coordinate. We found two channels were easy to monitor, but three were too many to be convenient.
### Announcements and Q&A: Etherpad/Hackmd.io
![Screenshot of an etherpad titled "General information" that has some info about the Creative Freedom Summit][22]
We set up a pinned widget in our main Element channel with general information about the event, including the daily schedule, code of conduct, etc. We also had a section per talk of the day for attendees to drop questions for Q&A, which the host read out loud for the speaker.
We found over the first day or two that some attendees were having issues with the Etherpad widget not loading, so we switched to an embedded hackmd.io document pinned to the channel as a widget, and that seemed to work a little better. We're not 100% sure what was going on with the widget loading issues, but we were able to post a link to the raw (non-embedded) link in the channel topic, so folks could get around any problems accessing it via the widget.
### Integrated and centralized conference experience
![A video feed is in the upper left corner, a hackmd.io announcement page in the upper right, and an active chat below.][23]
Matrix via Fedora's Element server was the single key place to go to attend the conference. Matrix chat rooms in Element have a widget system that allows you to embed websites into the chat room as part of the experience. That functionality was important for having our Matrix chat room serve as the central place to attend.
We embedded the PeerTube livestream into the channel—you can see it in the screenshot above in the upper left. Once the conference was over, we could share a playlist of the unedited video replays playlist. Now that our volunteer project for editing the videos is complete, the channel has the playlist of edited talks in order.
As discussed in the previous section, we embedded a hackmd.io note in the upper right corner to post the day's schedule, post announcements, and an area for Q&A right in the pad. I had wanted to set up a Matrix bot to handle Q&A, but I struggled to get one running. It might make for a cool project for next year, though.
Conversations during the conference occurred right in the main chat under these widgets.
There are a couple of considerations to make when using a Matrix/Element chat room as the central place for an online conference, such as:
- The optimal experience will be in the Element desktop client or a web browser on a desktop system. However, you can view the widgets in the Element mobile client (although some attendees struggled to discover this, the UI is less-than-obvious). Other Matrix clients may not be able to view the widgets.
- Attendees can easily DIY their own experience piecemeal if desired. Users not using the Element client to attend the conference reported no issues joining in on the chat and viewing the PeerTube livestream URL directly. We shared the livestream URL and the hackmd URL in the channel topic, making it accessible to folks who preferred not to run Element.
### Website
![Screenshot showing the top of creativefreedomsummit.com, with the headline "Create. Learn. Connect." against a blue and purple gradient background.][24]
[Ryan Gorley][25] developed the [Creative Freedom Summit website][26] using [WordPress][27]. It is hosted by WPengine and is a one-pager with the conference schedule embedded from sched.org.
### Post-event
#### Post-event survey
We used the open source survey tool LimeSurvey. We sent it out within a week or two to attendees via the Element Chat channel and our PeerTube video channel to learn more about how we handled the event. The event organizers continue to meet regularly. One topic we focus on during these post-event meetings is developing the questions for the survey in a shared hackmd.io document. The following are some things we learned from the event that might be of interest to you in planning your own open source powered online conference:
- By far, most event attendees learned about the event from Mastodon and Twitter (together, covering 70% of respondents).
- 33% of attendees used the Element desktop app to attend, and 30% used the Element Chat web app. So roughly 63% of attendees used the integrated Matrix/Element experience. The rest watched directly on PeerTube or viewed replays after.
- 35% of attendees indicated they made connections with other creatives at the event via the chat, so the chat experience is pretty important to events if part of your goal is enabling networking and connections.
#### Captioning
During the event, we received positive feedback from participants who appreciated when another attendee live-captioned the talk in the chat and wished out loud for live captioning for better accessibility. While the stack outlined here did not include live captioning, there are open source solutions for it. One such tool is Live Captions, and Seth Kenlon covered it in an opensource.com article, [Open source video captioning on Linux][28]. While this tool is meant for the attendee consuming the video content locally, we could potentially have a conference host running it and sharing it to the livestream in Jitsi. One way to do this is using the open source broadcasting tool [OBS][29] so everyone watching the livestream could benefit from the captions.
While editing the videos post-event, we discovered a tool built into [Kdenlive][30], our open source video editor of choice, that generates and automatically places subtitles in the videos. There are basic instructions on how to do this in the [Kdenlive manual][31]. Fedora Design Team member Kyle Conway, who helped with the post-event video editing, put together a [comprehensive tutorial (including video instruction) on automatically generating and adding subtitles to videos in Kdenlive][32]. It is well worth the read and watch if you are interested in this feature.
#### Video editing volunteer effort
When the event was over, we rallied a group of volunteers from the conference Element channel to work together on editing the videos, including title cards and intro/outro music, and general cleanup. Some of our automatic replay recordings were split across two files or combined in one file with multiple other talks and needed to be reassembled or cropped down.
We used a [GitLab epic to organize the work][33], with an FAQ and call for volunteer help organized by skillset, with issues attached for each video needed. We had a series of custom labels we would set on each video so it was clear what state the video was in and what kind of help was needed. All the videos have been edited, and some need content written for their description area on the [Creative Freedom Summit channel][6]. Many have auto-generated subtitles that have not been edited for spelling mistakes and other corrections common with auto-generated text.
![Screenshot of the list of videos needing editing help in GitLab][34]
We passed the videos around—the files could be quite large—by having volunteers download the raw video from the unedited recording on the main PeerTube channel for the Creative Freedom Summit. When they had an edited video ready to share, we had a private PeerTube account where they could upload it. Admins with access to the main channel's account periodically grabbed videos from the private account and uploaded them to the main account. Note that PeerTube doesn't have a system where multiple accounts have access to the same channel, so we had to engage in a bit of password sharing, which can be nerve-wracking. We felt this was a reasonable compromise to limit how many people had the main password but still enable volunteers to submit edited videos without too much hassle.
### Ready to give it a try?
I hope this comprehensive description of how we ran the Creative Freedom Summit conference using an open source stack of tools inspires you to try it for your open source event. Let us know how it goes, and feel free to reach out if you have questions or suggestions for improvement! Our channel is at: [https://matrix.to/#/#creativefreedom:fedora.im][35]
_This article is adapted from [Run an open source-powered virtual conference][36] and is republished with permission._
--------------------------------------------------------------------------------
via: https://opensource.com/article/23/4/open-source-tools-virtual-conference
作者:[Máirín Duffy][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/mairin
[b]: https://github.com/lkxed/
[1]: https://fedoraproject.org/wiki/Design
[2]: http://creativefreedomsummit.com/
[3]: http://flocktofedora.org/
[4]: https://opensource.com/article/23/3/video-templates-inkscape
[5]: https://opensource.com/sites/default/files/2023-04/homepage.webp
[6]: https://peertube.linuxrocks.online/c/creativefreedom/videos
[7]: https://linuxrocks.online/
[8]: https://opensource.com/sites/default/files/2023-04/publish.png
[9]: https://opensource.com/sites/default/files/2023-04/go-live.png
[10]: https://opensource.com/sites/default/files/2023-04/advdsettings.png
[11]: https://opensource.com/sites/default/files/2023-04/cfsbanner.png
[12]: https://opensource.com/sites/default/files/2023-04/startlivestream.jpg
[13]: https://opensource.com/sites/default/files/2023-04/pasteURL.png
[14]: https://opensource.com/sites/default/files/2023-04/liveinformation.png
[15]: https://meet.jit.si/
[16]: https://meet.jit.si
[17]: https://peertube.linuxrocks.online/c/fedora_design_live/videos
[18]: https://opensource.com/sites/default/files/2023-04/moreactions.png
[19]: https://opensource.com/sites/default/files/2023-04/startlivestream.png
[20]: https://opensource.com/sites/default/files/2023-04/copypastekey.png
[21]: https://opensource.com/sites/default/files/2023-04/backstage.webp
[22]: https://opensource.com/sites/default/files/2023-04/hackmd.webp
[23]: https://opensource.com/sites/default/files/2023-04/integratedexperience.webp
[24]: https://opensource.com/sites/default/files/2023-04/website.webp
[25]: https://mastodon.social/@ryangorley
[26]: https://creativefreedomsummit.com/
[27]: https://wordpress.com/
[28]: https://opensource.com/article/23/2/live-captions-linux
[29]: https://obsproject.com/
[30]: https://kdenlive.org/
[31]: https://docs.kdenlive.org/en/effects_and_compositions/speech_to_text.html
[32]: https://gitlab.com/groups/fedora/design/-/epics/23#video-captioning-and-handoff
[33]: https://gitlab.com/groups/fedora/design/-/epics/23
[34]: https://opensource.com/sites/default/files/2023-04/availablevideos_0.webp
[35]: https://matrix.to/#/#creativefreedom:fedora.im
[36]: https://blog.linuxgrrl.com/2023/04/10/run-an-open-source-powered-virtual-conference/

View File

@ -1,220 +0,0 @@
[#]: subject: "What are Exit Codes in Linux?"
[#]: via: "https://itsfoss.com/linux-exit-codes/"
[#]: author: "Pranav Krishna https://itsfoss.com/author/pranav/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
What are Exit Codes in Linux?
======
An exit code or exit status tells us about the status of the last executed command. Whether the command was completed successfully or ended with an error. This is obtained after the command terminates.
**The basic ideology is that programs return the exit code `0` to indicate that it executed successfully without issues. Code `1` or anything other than 0 is considered unsuccessful.**
There are many more exit codes other than 0 and 1, which I'll cover in this article.
### Various exit codes in Linux shell
Let us take a quick look at the prominent exit codes in the Linux shell:
| Exit code | Meaning of the code |
| :- | :- |
| `0` | Command executed with no errors |
| `1` | Code for generic errors |
| `2` | Incorrect command (or argument) usage |
| `126` | Permission denied (or) unable to execute |
| `127` | Command not found, or PATH error |
| `128+n` | Command terminated externally by passing signals, or it encountered a fatal error |
| `130` | Termination by Ctrl+C or SIGINT (_termination code 2 or keyboard interrupt_) |
| `143` | Termination by SIGTERM (_default termination_) |
| `255/*` | Exit code exceeded the range 0-255, hence wrapped up |
> 📋 The termination signals like `130` (SIGINT or `^C`) and `143` (SIGTERM) are prominent, which are just `128+n` signals with `n` standing for the termination code.
Now that you are briefly familiar with the exit codes let's see about their usage.
### Retrieving the exit code
The exit code of the previously executed command is stored in the [special variable][1] `$?`. You can retrieve the exit status by running:
```
echo $?
```
This will be used in all our demonstrations to retrieve the exit code.
Note that the _exit_ command supports carrying the same exit code of the previous command executed.
### Exit code 0
Exit code `0` means that the command is executed without errors. This is ideally the best case for the completion of commands.
For example, let us run a basic command like this
```
neofetch
echo $?
```
![][2]
This exit code `0` means that the particular command was executed successfully, nothing more or less. Let us demonstrate some more examples.
You may try [killing a process][3]; it will also return the code `0`.
```
pkill lxappearance
```
![][4]
Viewing a file's contents will also return an exit code 0, which implies **only** that the 'cat' command executed successfully.
### Exit code 1
Exit code `1` is also a common one. It generally means the command terminated with a generic error.
For example, using the [package manager][5] without sudo permissions results in code 1. In Arch Linux, if I try this:
```
pacman -Sy
```
It will give me exist code as 1 meaning the last command resulted in error.
![exit code 1 (impermissible operation resulted in this code)][6]
> 📋 If you try this in Ubuntu-based distros (`apt update`without sudo), you get 100 as an error code for running 'apt' without permissions. This is not a standardized error code, but one specific to apt.
While this is a general understanding, we can also interpret this as "operation impermissible".
Operations like dividing by zero also result in code 1.
![Division by zero results in code 1][7]
### Exit code 2
This exit code is given out when the command executed has a syntax error. Misusing the arguments of commands also results in this error.
It generally suggests that the command could not execute due to incorrect usage.
For example, I added two hyphens to an option that's supposed to have one hyphen. Code 2 was given out.
```
grep --z file.txt
```
![Invalid argument resulted in exit code 2][8]
When permission is denied, like accessing the /root folder, you get error code 2.
![Permission denied gives out code 2][9]
### Exit code 126
126 is a peculiar exit code since it is used to indicate a command or script was not executed due to a permission error.
This error can be found when you try executing a shell script without giving execution permissions.
![][10]
Note that this exit code appears only for the '_execution_' of scripts/commands without sufficient permissions, which is different from a generic Permission Denied error.
So, on't confuse it with the previous example you saw with exit code 2. There, ls command ran and the permission issue came with the directory it was trying to execute. Here, the permission issues came from the script itself.
### Exit code 127
This is another common one. Exit code 127 refers to "[command not found][11]". It usually occurs when there's a typo in the command executed or the required executable is not in the $PATH variable.
For example, I often see this error when I try executing a script without its path.
![Script executed without the path gives "command not found" or code 127][12]
Or when the executable file you're trying to run, is not listed in the `$PATH` variable. You can rectify this by [adding the parent directory to the PATH variable][13].
You'll also get this exit code when you type commands that do not exist.
![Unmount is not a command, and Screenfetch is not installed, which resulted in code 127][14]
### Exit code series 128+n
When an application or command is terminated or its execution fails due to a fatal error, the adjacent code to 128 is produced (128+n), where n is the signal number.
This includes all types of termination codes, like `SIGTERM`, `SIGKILL`, etc that apply to the value 'n' here.
#### Code 130 or SIGINT
`SIGINT` or **Sig**nal for Keyboard **Int**errupt is induced by interrupting the process by termination signal 2, or by Ctrl+C.
Since the termination signal is 2, we get a code 130 (128+2). Here's a video demonstrating the interrupt signal for `lxappearance`.
<video src="https:/itsfoss.com/content/media/2023/06/exit_code_128-n-SIGINT-_compressed.mp4">
#### Code 137 or SIGKILL
The `SIGKILL` termination **sig**nal that **kill**s the process instantly has a termination signal 9. This is the last method one should use while terminating an application.
The exit code thrown is 137 since the termination signal is 9 (128+9).
<video src="https://itsfoss.com/content/media/2023/06/exit_code_128-n-SIGKILL-_compressed.mp4">
#### Code 143 or SIGTERM
`SIGTERM` or **Sig**nal to **Term**inate is the default behavior when a process is killed without specifying arguments.
The termination code for SIGTERM is 15, hence this signal gets an exit code of 143 (128+15).
<video src="https://itsfoss.com/content/media/2023/06/exit_code_128-n-SIGTERM-_compressed-1.mp4">
There are other termination signals that you may not have known before; they too have their own exit codes similar to these. You can check them out here:
> 📋 Note that these signals may not appear if terminated from the same session from which the process was started. If you're reproducing these, terminate from a different shell.On a personal note, signal 128 was impossible to reproduce.
### What if the code exceeds 255?
Recent versions of Bash retain the original exit code value even beyond 255, but generally, if the code exceeds 255, then it is wrapped up.
That is, code 256 becomes '0', 257 becomes '1', 383 becomes '127', and so on and so forth. To ensure better compatibility, keep the exit codes between 0 and 255.
### Wrapping up
I hope you learned something about the exit codes in the Linux shell. Using them can come in handy for troubleshooting various issues.
If you are using these codes in a shell script, make sure you understand the meaning of each code in order to make it easier for troubleshooting.
In case you need a reference, check out the Bash series here:
That's all about the article. Feel free to let me know in the comments section if I have missed anything.
--------------------------------------------------------------------------------
via: https://itsfoss.com/linux-exit-codes/
作者:[Pranav Krishna][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/pranav/
[b]: https://github.com/lkxed/
[1]: https://linuxhandbook.com:443/bash-special-variables/
[2]: https://itsfoss.com/content/images/2023/06/exit_code_0.png
[3]: https://itsfoss.com/how-to-find-the-process-id-of-a-program-and-kill-it-quick-tip/
[4]: https://itsfoss.com/content/images/2023/06/exit_code_0.gif
[5]: https://itsfoss.com/package-manager/
[6]: https://itsfoss.com/content/images/2023/06/exit_code_1.png
[7]: https://itsfoss.com/content/images/2023/06/exit_code_1-division_by_0-.png
[8]: https://itsfoss.com/content/images/2023/06/exit_status_2-misusing_arguments--1.png
[9]: https://itsfoss.com/content/images/2023/06/exit_code_2-permission_denied-.png
[10]: https://itsfoss.com/content/images/2023/06/exit_code_126.png
[11]: https://itsfoss.com/bash-command-not-found/
[12]: https://itsfoss.com/content/images/2023/06/exit_code_127.png
[13]: https://itsfoss.com/add-directory-to-path-linux/
[14]: https://itsfoss.com/content/images/2023/06/exit_code_127-command_not_found--1.png
[def]: ttps://itsfoss.com/content/media/2023/06/exit_code_128-n-SIGINT-_compressed.mp

View File

@ -1,109 +0,0 @@
[#]: subject: "How to Access the GRUB Menu in Virtual Machine"
[#]: via: "https://itsfoss.com/access-grub-virtual-machine/"
[#]: author: "Sagar Sharma https://itsfoss.com/author/sagar/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
How to Access the GRUB Menu in Virtual Machine
======
Most modern VMs are configured to skip the [GRUB bootloader][1] for a seamless experience.
However, you might need to access the GRUB menu at times. For example, if you want to switch back to the older kernel or get into recovery mode for [resetting the password][2].
> 💡 Reboot your VM and keep the Shift key pressed when it is booting up again. This should give you the GRUB menu.
In this quick article, I will be showing you two ways to access the GRUB menu in Linux running in a virtual machine:
- A temporary solution (when you have to access GRUB once or twice)
- A permanent solution (will show GRUB at every boot)
As most of the users are not going to interact with the grub on a daily basis, I will start with a temporary solution in which you can access the grub without any tweaks.
> 📋 I have used Ubuntu in the tutorial here but the steps should be valid for other Linux distributions as well.
### Access the GRUB bootloader in VM (Quick way)
If you want to access the GRUB occasionally, this is supposed to be the best way as it does not require any configuration.
Just reboot your system and keep the `shift` key pressed.
That's it!
You will have your grub menu without any time limit:
![Accessing grub menu in VM using shift key][3]
Pretty simple way. Isn't it?
But it will work for that specific boot only. So what if you want to have the grub on every boot? Refer to the given method.
### Enable Grub menu in virtual machines permanently (if you want to)
> 🚧 This method requires changing Grub config file in the command line. Please ensure that you are comfortable doing the edits in the terminal.
If you have to deal with the grub menu to access the other operating systems or change[boot from the older kernels][4] often, this method is just for you.
To make the grub accessible at every boot, you must make changes in the configuration file.
First, open the grub config file using the following command:
```
sudo nano /etc/default/grub
```
Here, change the `GRUB_TIMEOUT_STYLE=hidden` to the `GRUB_TIMEOUT_STYLE=menu`:
![change grub timeout style][5]
Next, in the same config file, specify for how many seconds you want the grub to be displayed.
I would recommend 5 seconds as it seems to balance between not too long and short (yep, quite relatable):
```
GRUB_TIMEOUT=5
```
![configure grub timeout in ubuntu][6]
And finally, you can [save the changes and exit from the nano][7] text editor.
To activate the changes you made to the config file, update the grub using the following command:
```
sudo update-grub
```
That's it. Reboot your system and the grub should be there for 5 seconds.
### How about theming GRUB?
You will get the grub bootloader in most of the Linux distros as it is quite simple to configure and gets the job done.
But by default, it's nothing apart from the black background and plain text. So we made a guide on how you can make it look dope:
I hope you will find this guide helpful and if you have any queries, let me know in the comments.
--------------------------------------------------------------------------------
via: https://itsfoss.com/access-grub-virtual-machine/
作者:[Sagar Sharma][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/sagar/
[b]: https://github.com/lkxed/
[1]: https://itsfoss.com/what-is-grub/
[2]: https://itsfoss.com/how-to-hack-ubuntu-password/
[3]: https://itsfoss.com/content/images/2023/07/access-GRUB-in-Ubuntu-VM.gif
[4]: https://itsfoss.com/boot-older-kernel-default/
[5]: https://itsfoss.com/content/images/2023/07/change-grub-style.webp
[6]: https://itsfoss.com/content/images/2023/07/configure-grub-timeout-in-ubuntu.webp
[7]: https://linuxhandbook.com/nano-save-exit/

View File

@ -0,0 +1,77 @@
[#]: subject: "Fedora Linux editions part 4: Alt Downloads"
[#]: via: "https://fedoramagazine.org/fedora-linux-editions-part-4-alt-downloads/"
[#]: author: "Arman Arisman https://fedoramagazine.org/author/armanwu/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Fedora Linux editions part 4: Alt Downloads
======
Fedora Alt Downloads is a remarkable resource provided by the Fedora Project, offering alternative distribution options for users seeking specific requirements or unique use cases. This article will delve into the diverse selection of Fedora Alt Downloads, highlighting their significance and how they cater to different needs within the Fedora community. You can find an overview of all the Fedora Linux variants in my previous article [Introduce the different Fedora Linux editions][1].
## Network Installer
The Fedora Network Installer is an efficient and flexible tool for installing Fedora Linux. This is Fedoras online installer. Unlike the baked-in Live images that the main editions use, this installer allows you to customize which software packages will be installed at installation time. However, because the packages to be installed are not baked into this installer image, network access will be required at installation time to download the selected packages.
Dont confuse this with network booting which is a method of initiating an operating system or operating system installer from a small [Preboot Execution Environment][2]. (Though it is possible for that sort of [bootloader][3] to [chain-load][4] Fedoras network installer.)
## Torrent Downlods
Fedora Torrent Downloads utilize the BitTorrent protocol, which is a peer-to-peer file sharing protocol. Instead of relying on a central server for downloads, BitTorrent enables users to download Fedora Linux images from multiple sources simultaneously. This decentralized approach enhances download speeds and reduces strain on individual servers, resulting in a faster and more reliable download experience. Fedora Torrent Downloads offer a fast, reliable, and community-driven method for obtaining Fedora Linux images. By harnessing the power of the BitTorrent protocol, Fedora leverages the collective bandwidth and resources of users worldwide, resulting in faster downloads and improved reliability.
Details are available at this link: [https://torrent.fedoraproject.org/][5]
## Alternate Architectures
Fedora Alternate Architectures is an initiative by the Fedora Project that aims to expand the compatibility of the Fedora Linux operating systems by offering a range of architecture options. In addition to the standard x86_64 architecture, Fedora Alternate Architectures provides support for alternative architectures, including ARM AArch64, Power, and s390x. This initiative allows you to select the architecture that best suits their hardware requirements, enabling Fedora Linux to run on a diverse range of devices and systems. Whether you have a Raspberry Pi, a server with Power processors, or other specialized hardware, Fedora Alternate Architectures ensures that you have a tailored Fedora Linux experience that meets your specific needs.
Details are available at this link: [https://alt.fedoraproject.org/alt/][6]
## Fedora Cloud
After I wrote my initial post in this series that introduced the main Fedora Linux editions, [Fedora Cloud was restored to full edition status][7]. There are still some links to the Fedora Cloud images on the Fedora Alt Downloads page. But they will be removed soon. The correct place to get the latest Fedora Cloud images is now [https://fedoraproject.org/cloud/download/][8].
Fedora Cloud images are a collection of images provided by the Fedora Project for use in cloud environments. Fedora Cloud images are specifically designed to run applications in the cloud with efficiency and optimal performance. By using Fedora Cloud images, you can quickly deploy and run applications in the cloud without the need to spend time configuring the operating system from scratch. Fedora Cloud images also provide flexibility in terms of scalability, allowing you to easily adjust the size and capacity of resources according to the needs of your applications.
## Testing Images
Fedora Testing Images are a collection of specialized system images designed for testing and contributing to the development of Fedora Linux. These images allow you to test the latest features, explore the recent changes in Fedora Linux, and report any issues encountered. By using Fedora Testing Images, you can actively participate in the development of Fedora Linux by providing valuable feedback and contributions.
Your participation in testing and contributing to Fedora Testing Images plays a vital role in maintaining and improving the quality and reliability of Fedora Linux. By reporting issues, testing software, and providing feedback, you can assist Fedora developers in fixing bugs, enhancing performance, and identifying areas for further improvement and development. Fedora Testing Images provide an easy and secure way for you to engage directly in the development of Fedora Linux, strengthening the community and resulting in a better and more reliable operating system for all Fedora users.
## Rawhide
Fedora Rawhide is the development branch of the Fedora Linux operating system. It provides a continuously evolving and cutting-edge version of the Fedora Linux OS. It serves as a testing ground for new features, enhancements, and software updates that are targeted for inclusion in future stable releases of Fedora Linux. Fedora Rawhide offers early access to the latest software packages, allowing users to stay at the forefront of technology and contribute to the testing and refinement of Fedora Linux.
Using Fedora Rawhide comes with both benefits and considerations. On one hand, it provides a platform for early adopters, developers, and contributors to test and provide feedback on upcoming features and changes. This helps identify and address issues before they are included in stable releases. On the other hand, since Fedora Rawhide is constantly under development, it may encounter bugs, instability, and compatibility issues. Therefore, it is recommended only for experienced users who are comfortable with troubleshooting and actively contributing to the Fedora community.
Details are available at this link: [https://docs.fedoraproject.org/en-US/releases/rawhide/][9]
## Conclusion
Fedora Alt Downloads provides an impressive array of alternative distributions, catering to diverse needs within the Fedora community. Whether its through Fedora Spins, Fedora Labs, Fedora Remixes, Fedora Silverblue, or ARM editions, users can find specialized distributions that suit their requirements, preferences, and use cases. This versatility and community-driven approach makes Fedora Alt Downloads a valuable resource for Fedora Linux enthusiasts, fostering innovation, and customization within the Fedora ecosystem. You can find complete information about Fedora Alt Downloads at [https://alt.fedoraproject.org/][10]
--------------------------------------------------------------------------------
via: https://fedoramagazine.org/fedora-linux-editions-part-4-alt-downloads/
作者:[Arman Arisman][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
[a]: https://fedoramagazine.org/author/armanwu/
[b]: https://github.com/lkxed/
[1]: https://fedoramagazine.org/introduce-the-different-fedora-linux-editions/
[2]: https://en.wikipedia.org/wiki/Preboot_Execution_Environment
[3]: https://en.wikipedia.org/wiki/Bootloader
[4]: https://en.wikipedia.org/wiki/Chain_loading
[5]: https://torrent.fedoraproject.org/
[6]: https://alt.fedoraproject.org/alt/
[7]: https://fedoraproject.org/wiki/Changes/RestoreCloudEdition
[8]: https://fedoraproject.org/cloud/download/
[9]: https://docs.fedoraproject.org/en-US/releases/rawhide/
[10]: https://alt.fedoraproject.org/

View File

@ -1,135 +0,0 @@
[#]: subject: "How to Install Jupyter Notebook in Debian or Ubuntu Linux"
[#]: via: "https://www.debugpoint.com/install-jupyter-ubuntu/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
How to Install Jupyter Notebook in Debian or Ubuntu Linux
======
**A simple tutorial on how to install Jupyter Notebook in Ubuntu or Debian Linux.**
[Jupyter][1] Notebook is a powerful web-based interactive dev tool which allows you to create and share live code, visualizations, and interactive data. Its notebook format combines code and text, making it an excellent choice for data exploration, analysis, and collaborative projects.
In this tutorial, we will guide you through the step-by-step process of installing Jupyter Notebook on Ubuntu or Debian -based systems, enabling you to harness its versatility and extend your programming capabilities.
### Install pip
Before we begin, ensure that pip, the Python package installer, is installed on your system. If you already have pip installed, you can skip this step. Otherwise, follow these instructions to install it. You can also visit [this page][2] for detailed instructions.
Open a terminal window (Ctrl+Alt+T) and type the following command; press Enter:
```
sudo apt updatesudo apt install python3-pip
```
You may be prompted to enter your password. Provide it and wait for the installation to complete.
### Install virtualenv
Although not mandatory, it is recommended to isolate your work environment via this tool in the Jupyter Notebook installation. This ensures that any changes or packages you install will not interfere with your systems Python environment. To set up a virtual env, follow the below steps:
In the terminal, enter the following command:
```
sudo apt install python3-virtualenv
```
Wait for the installation to finish. Once complete, proceed to the next step.
### Create a virtual environment
Creating a virtual environment is a straightforward process. Heres how you can set up a new virtual environment specifically for Jupyter Notebook:
Navigate to the directory where you want to create the virtual environment. Run the following command in the terminal:
```
virtualenv my-jupyter-env
```
This command creates a new directory called “my-jupyter-env”, which will contain the virtual environment files.
![create jupyter environment][3]
You can also verify that the directory is created under your home folder via any file manager.
![jupyter env folders][4]
Activate the virtual environment by entering the following:
```
source my-jupyter-env/bin/activate
```
You will notice that your terminal prompt changes to indicate that you are now inside the virtual environment.
![activate the environment][5]
### Install Jupyter Notebook
With the virtual environment activated, you can now proceed to install Jupyter Notebook:
In the terminal, type the following command:
```
pip install jupyter
```
This command fetches the necessary packages and installs Jupyter Notebook in your virtual environment.
![Installing jupyter using pip][6]
### Launch Jupyter Notebook
Once the installation is complete, you are ready to launch Jupyter Notebook:
In the terminal, type the following command:
```
jupyter notebook
```
After executing the command, Jupyter Notebook will start, and you should see an output similar to this:
![running jupyter notebook in Debian][7]
Your default web browser will open, displaying the Jupyter Notebook interface.
![Jupyter notebook running in browser][8]
### Shutting down and restart
If you want to shutdown the Notebook server, make sure to close and save all notebooks. Close the browser. Then press “CTRL+C” in the terminal window. It will prompt you whether you want to shutdown the server. Type Yes and hit enter. And finally, close the terminal window.
To restart the server again, you need run all the commands from “virtualenv my-jupyter-env” as described above.
### Conclusion
Congratulations! You have successfully installed Jupyter Notebook on your Ubuntu or Debian system. By following the above steps, you can now take advantage of Jupyters interactive development environment to write code, create visualizations, and explore data effortlessly.
Remember, Jupyter Notebook supports various programming languages, including Python and offers a vast list of plugins to extend its functionality further.
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/install-jupyter-ubuntu/
作者:[Arindam][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.debugpoint.com/author/admin1/
[b]: https://github.com/lkxed/
[1]: https://jupyter.org/
[2]: https://www.debugpoint.com/pip-command-not-found/
[3]: https://www.debugpoint.com/wp-content/uploads/2023/07/create-jupyter-environment.jpg
[4]: https://www.debugpoint.com/wp-content/uploads/2023/07/jupyter-env-folders.jpg
[5]: https://www.debugpoint.com/wp-content/uploads/2023/07/active-the-environment.jpg
[6]: https://www.debugpoint.com/wp-content/uploads/2023/07/Installing-jupyter-using-pip.jpg
[7]: https://www.debugpoint.com/wp-content/uploads/2023/07/running-jupyter-notebook-in-Debian.jpg
[8]: https://www.debugpoint.com/wp-content/uploads/2023/07/Jupyter-notebook-running-in-browser.jpg

View File

@ -1,149 +0,0 @@
[#]: subject: "Bash Basics Series #6: Handling String Operations"
[#]: via: "https://itsfoss.com/bash-strings/"
[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Bash Basics Series #6: Handling String Operations
======
In most programming languages, you'll find a string data type. A string is basically a group of characters.
Bash shell is different though. There is no separate data type for strings. Everything is a variable here.
But that doesn't mean that you cannot deal with strings in the same way you do in C and other programming languages.
Finding substrings, replacing substrings, joining strings and many more string operations are possible in Bash shell.
In this part of the Bash Basics Series, you'll learn the basic string manipulations.
### Get string length in bash
Let's start with the simplest option. Which is to get the length of a string. It's quite simple:
```
${#string}
```
Let's use it in an example.
![Example of getting string length in bash][1]
As you can see, the second example had two words in it but since it was in quotes, it was treated as a single word. Even the space is counted as a character.
### Join strings in bash
The technical term is concatenation of strings, one of the simplest possible string operations in bash.
You just have to use the string variables one after another like this:
```
str3=$str1$str2
```
Can it go any simpler than this? I don't think so.
Let's see it with an example. Here is my example script named `join.sh`:
```
#!/bin/bash
read -p "Enter first string: " str1
read -p "Enter second string: " str2
joined=$str1$str2
echo "The joined string is: $joined"
```
Here's a sample run of this script:
![Join two strings in bash][2]
### Extract substring in bash
Let's say you have a big string with several characters and you want to extract part of it.
To extract a substring, you need to specify the main string, the starting position of the substring and the length of the substring in the following manner:
```
${string:$pos:$len}
```
> 💡Like arrays, positioning in strings also start at 0.
Here's an example:
![Extracting substring in bash][3]
Even if you specify the substring length greater than the string length, it will only go till the end of the string.
### Replace substring in bash
Let's say you have a big string and you want to replace part of it with another string.
In that case, you use this kind of syntax:
```
${string/substr1/substr2}
```
> ✋ Only the first occurrence of a substring is replaced this way. If you want to replace all occurrences, use`${string//substr1/substr2}`
Here's an example:
![Replace substring in bash][4]
As you can see above, the word good was replaced with best. I saved the replaced string to the same string to change the original.
> 💡 If the substring is not found, nothing is replaced. It won't result in an error.
### Delete substring in bash
Let's talk about removing substrings. Let's say you want to remove part of a string. In that case, just provide the substring to the main string like this:
```
${string/substring}
```
> ✋ Only the first occurrence of a substring is deleted this way. If you want to delete all occurrences, use`${string//substr}`
If the substring is found, it will be deleted from the string.
Let's see this with an example.
![Delete substring in bash][5]
This goes without saying that if the substring is not found, it is not deleted. It won't result in an error.
### 🏋️ Exercise time
It's time for you to practice string manipulation with simple exercises.
**Exercise 1**: Declare a string 'I am all wet'. Now change this string by replacing the word wet with set.
**Exercise 2**: Create a string that saves phone numbers in the following format `112-123-1234`. Now, you have to delete all `-`.
That should give you some decent practice with strings in bash. In the next chapter, you'll learn about using if-else statements in bash. Stay tuned.
--------------------------------------------------------------------------------
via: https://itsfoss.com/bash-strings/
作者:[Abhishek Prakash][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/abhishek/
[b]: https://github.com/lkxed/
[1]: https://itsfoss.com/content/images/2023/07/bash-string-length-example.png
[2]: https://itsfoss.com/content/images/2023/07/join-strings-bash.png
[3]: https://itsfoss.com/content/images/2023/07/extract-substring-bash.png
[4]: https://itsfoss.com/content/images/2023/07/replace-substring-bash.png
[5]: https://itsfoss.com/content/images/2023/07/bash-delete-substring.png

View File

@ -1,143 +0,0 @@
[#]: subject: "How to Install and Access Kubernetes Dashboard Step-by-Step"
[#]: via: "https://www.linuxtechi.com/how-to-install-kubernetes-dashboard/"
[#]: author: "Pradeep Kumar https://www.linuxtechi.com/author/pradeep/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
How to Install and Access Kubernetes Dashboard Step-by-Step
======
Kubernetes, an open-source container orchestration platform, has become the go-to solution for managing containerized applications at scale. While Kubernetes provides powerful command-line tools for managing clusters, sometimes a visual interface can make monitoring and managing your deployments even easier. Kubernetes Dashboard is a web-based user interface that allows you to visualize and interact with your Kubernetes clusters.
In this blog post, we will walk you through the process of installing and accessing Kubernetes Dashboard step-by-step, empowering you to streamline your Kubernetes management tasks.
##### Prerequisites
Before installing Kubernetes Dashboard, ensure that you have a running Kubernetes cluster and have the necessary administrative access.
### Installing Kubernetes Dashboard
The easy way to install Kubernetes dashboard for your cluster is via helm chart. Kubernetes Dashboard now has a dependency on cert-manager and nginx-ingress-controller. Fortunately, these dependencies can be automatically installed using the Helm chart. However, if you already have these components installed, you can disable their installation by setting the flags set=nginx.enabled=false and set=cert-manager.enabled=false when installing the chart.
Without any further delay, lets jump into installation steps,
##### 1 ) Install Helm
Access your clusters master node using a terminal or command prompt. Install helm if not installed. Run the following commands.
```
$ curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
$ chmod 700 get_helm.sh
$ ./get_helm.sh
```
##### 2) Add Kubernetes Dashboard Helm Repository
Run following helm command to add dashboard repository,
```
$ helm repo add kubernetes-dashboard https://kubernetes.github.io/dashboard/
$ helm repo list
```
##### 3) Install Kubernetes Dashboard
To install Kubernetes dashboard using helm, run following command,
```
$ helm upgrade --install kubernetes-dashboard kubernetes-dashboard/kubernetes-dashboard --create-namespace --namespace kubernetes-dashboard
```
Output above confirms dashboard has been deployed in Kubernetes-dashboard namespace. So, in order to access dashboard, run
```
$ kubectl -n kubernetes-dashboard port-forward svc/kubernetes-dashboard-nginx-controller 8443:443
```
Now, open the web browser of system on which you have run above command, type following url
https://localhost:8443
Click on “Accept the Risk and Continue”
As you can see above, we need a token to login. So, lets generate the required token in the next step.
##### 4)  Generate Token for Kubernetes Dashboard
Open one more ssh session to master node and create a service account and assign required permissions using following yaml file,
```
$ vi k8s-dashboard-account.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
  name: admin-user
  namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: admin-user
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: cluster-admin
subjects:
- kind: ServiceAccount
  name: admin-user
  namespace: kube-system
```
save and exit the file
Next create service account by running following command
```
$ kubectl create -f k8s-dashboard-account.yaml
serviceaccount/admin-user created
clusterrolebinding.rbac.authorization.k8s.io/admin-user created
$
```
Now, generate the token for admin-user, run
```
$ kubectl -n kube-system  create token admin-user
```
Copy this token and head back to browser, paste it on “Enter Token” field as shown below,
Click on “Sign in”
##### 5) Access Kubernetes Dashboard
When we click on “Sign in” in above then we will get the following dashboard,
Great, you are now logged in to the Kubernetes Dashboard. Here are a few key features and functionalities to explore:
- Cluster Overview: Gain an overview of your clusters health, resource utilization, and running pods.
- Workloads: View and manage your deployments, replica sets, stateful sets, and daemon sets.
- Services: Monitor and manage your services, including load balancers and external endpoints.
- Configurations: Explore your config maps, secrets, and persistent volume claims.
- Storage: Manage persistent volumes and storage classes.
- Namespaces: Switch between namespaces to view and manage resources across different projects or teams.
Thats all from this post, I hope you have found it useful and informative. Kindly do post your queries and feedback in below comments section.
--------------------------------------------------------------------------------
via: https://www.linuxtechi.com/how-to-install-kubernetes-dashboard/
作者:[Pradeep Kumar][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.linuxtechi.com/author/pradeep/
[b]: https://github.com/lkxed/

View File

@ -1,127 +0,0 @@
[#]: subject: "Anytype: An All-in-One Secure Open-Source App for Work and Productivity"
[#]: via: "https://news.itsfoss.com/anytype-open-beta/"
[#]: author: "Sourav Rudra https://news.itsfoss.com/author/sourav/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Anytype: An All-in-One Secure Open-Source App for Work and Productivity
======
A new open-source app with specialties for everyone. Try its open beta release and check if it is for you.
![anytype][1]
“The everything app for those who celebrate trust & autonomy”. The tagline of Anytype, a new **all-in-one secure open-source personal CRM app** that aims to deliver some pretty impressive features.
They reached out to us to cover the first open beta release, and we were pretty intrigued.
Allow me to take you through it.
### Anytype: Overview ⭐
![a screenshot of the anytype website][2]
Anytype is a **local-first**, **peer-2-peer (P2P)**, **open-source** tool that **can be used for a variety of tasks** such as **project management**, **storing documents**, **taking daily notes**, **managing tasks**, **collections of books/articles/websites,** and **even as a personal CRM software**.
They also plan to allow you to manage/create blogs, community wikis, and discussions in the future.
What it means to be local-first, is that Anytype **can run locally without the need to connect to the internet**, resulting in better reliability, speed, and most important of all, security.
> 📋 The source code for Anytype can be found on its [GitHub page][3].
Though, that **doesn't mean that it's an offline-only tool**. You can configure it for access via the internet over multiple platforms.
This was made possible due to using the **Anysync protocol** that **allows for self-hosting**, **data portability,** and **real-time P2P end-to-end encryption collaboration**.
Anytype is built on top of Anysync as a modular space builder and browser, providing users with a robust set of tools for building spaces, and graph-based views of websites.
The company behind it is a **Berlin-based startup**, and [its open-source philosophy][4] seems pretty solid.
Other than that, some of the most notable features of Anytype include:
- **Interoperable Spaces.**
- **Build spaces without code.**
- **Ability to create Public/Private/Shared spaces.**
- **On-device encryption.**
- **Cross-platform.**
- **Ability to self-host.**
#### Initial Impressions
I tried Anytype on my [Ubuntu 22.04 LTS][5] setup, and the usage experience was pretty neat.
When you first launch the app, you will be shown a screen to either 'Join', or 'Login'. I used the 'Join' option to create a new account locally.
![a screenshot of anytype's dashboard][6]
After, setting up my account and going through the welcome screen. I was taken to a **quick-start menu**, where there were a bunch of **space templates** to get started. I chose the personal project one.
![a screenshot of anytype's quick-start menu][7]
After that, it took me into '**My Homepage**', where I had access to the sidebar menu and a page with an overview of all the content.
![a screenshot of anytype's my homepage screen][8]
From the sidebar menu, I went into the '**My Projects**' screen and selected one of the projects. It brought up a block editor that allowed me to edit the text intuitively.
> 📋 It also features a task tracker for tracking multiple tasks.
![a screenshot of an open project in anytype][9]
After that, I tested out the '**My Notes**' feature. It worked well and is what you would expect from a [note-taking app][10]. It also features the block editor, I tested it out with my daily routine, and it worked quite well.
All my plants are now fed, and my cats are watered! 🤣
![a screenshot of an open note in anytype][11]
And finally, I took a look at the '**Graph-view'**. I was taken aback by the level of detail it had. Anytype was able to illustrate all the data points very effectively this way.
![a screenshot of anytype's graph view][12]
So, wrapping up.
I can see Anytype being a part of my daily workflow; the number of tools it has can be helpful in managing one's daily work or even study routine.
Other than that, I am glad Monica now has a proper competitor; I can't wait to see how Anytype fares against that.
You may go through the [announcement post on ProductHunt][13] to dive deeper.
### 📥 Get Anytype
Anytype is available on **Linux**, **Windows**, **Mac**, **iOS**, and **Android**. You can head to the [official website][14] to grab the package of your choice.
[Anytype][15]
_💬 Will you be giving Anytype a try? Let us know!_
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/anytype-open-beta/
作者:[Sourav Rudra][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/sourav/
[b]: https://github.com/lkxed/
[1]: https://news.itsfoss.com/content/images/size/w1304/2023/07/anytype.png
[2]: https://news.itsfoss.com/content/images/2023/07/Anytype.jpg
[3]: https://github.com/anyproto
[4]: https://blog.anytype.io/our-open-philosophy/
[5]: https://news.itsfoss.com/ubuntu-22-04-release/
[6]: https://news.itsfoss.com/content/images/2023/07/Anytype_1.jpg
[7]: https://news.itsfoss.com/content/images/2023/07/Anytype_2.jpg
[8]: https://news.itsfoss.com/content/images/2023/07/Anytype_3.jpg
[9]: https://news.itsfoss.com/content/images/2023/07/Anytype_4.jpg
[10]: https://itsfoss.com/note-taking-apps-linux/
[11]: https://news.itsfoss.com/content/images/2023/07/Anytype_5.jpg
[12]: https://news.itsfoss.com/content/images/2023/07/Anytype_6.jpg
[13]: https://www.producthunt.com/posts/anytype-2-0
[14]: https://anytype.io/
[15]: https://anytype.io/

View File

@ -1,90 +0,0 @@
[#]: subject: "The systemd Controversy: A Beginner's Guide to Understanding the Debate"
[#]: via: "https://itsfoss.com/systemd-init/"
[#]: author: "Bill Dyer https://itsfoss.com/author/bill/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
The systemd Controversy: A Beginner's Guide to Understanding the Debate
======
In the world of Linux, few debates have stirred as much controversy as the battle between the traditional System V [init][1] system, often known as SysVinit, and the newer [`systemd`][2].
In this article, I'll briefly discuss what systemd is, what advantages and disadvantages it has over the traditional init systems and why it is controversial.
### What is systemd?
systemd is a system and service manager, first introduced in 2010 to replace the traditional System V init system. It was designed to improve boot-up speeds and manage system services more efficiently. Today, `systemd` is the default `init` system for many popular Linux distributions, including Ubuntu, Fedora, and Red Hat Enterprise Linux.
### Is systemd a Daemon?
Despite the name, `systemd` is not a daemon. Instead, it's a software suite that provides a number of system components for Linux. Its goal: to standardize service configuration and behavior across Linux distributions.
The main component of `systemd` is a "system and service manager", which serves as an `init` system to bootstrap user space and manage user processes. It also offers replacements for various daemons and utilities, from device and login management to network connection management and event logging.
### Key Features of systemd
`systemd` has many features, such as its ability to aggressively parallelize operations, facilitate the on-demand launching of daemons, monitor processes using Linux control groups, manage mount and automount points, and implement a sophisticated transactional dependency-based service control logic.
Additionally, `systemd` supports SysV and LSB init scripts, serving as a substitute for SysVinit. It also offers a logging daemon and utilities for managing essential system configurations.
![systemd on fedora - Courtesy of Wikimedia][3]
### systemd Vs SysVinit: The Controversy
The heart of the init vs systemd debate revolves around how best to manage Linux-based systems. Concerns range from complexity and compatibility to the optimal way to manage system services, touching on foundational questions facing system administrators and Linux enthusiasts.
Critics argue that `systemd` is too complex and monolithic, making it harder to troubleshoot. They worry about a single point of failure, as all services are managed by one daemon, and voice concerns about tight integration with the Linux kernel, which could limit portability to other systems.
That's the reason why some people created [distributions free from systemd][4].
Proponents, however, praise `systemd` for providing a more efficient and modern approach to system management, with its parallelization of service startup and on-demand starting of daemons reducing boot times and improving system responsiveness. They also commend its advanced logging capabilities.
Despite the controversy, `systemd` has become the default `init` system for many Linux distributions, and system administrators and developers have come to appreciate its advanced features and capabilities.
### Positives and Negatives of systemd Vs SysVinit
**Positives**
| Positives of SysVinit | Positives of systemd |
| :- | :- |
| Simplicity and familiarity | Improved boot-up speed |
| Respect for Unix philosophy | Standardized logging system |
| More direct control over system services | Consistent approach to service management |
| Mature and stable system | Compatibility with modern Linux systems and applications |
| Compatibility with legacy systems and applications | Active development and support from a large community of developers and contributors |
**Negatives**
| Negatives of SysVinit | Negatives of systemd |
| :- | :- |
| Limited functionality compared to newer `init` systems | Complexity and steep learning curve |
| Lack of built-in support for parallel startup of services | Invasive nature and potential for breaking compatibility with traditional Unix tools and utilities |
| Can be less efficient than newer `init` systems, especially on large systems | Potential for instability and crashes on some systems |
| Limited support for modern Linux systems and applications | Limited compatibility with legacy systems and applications that have not been updated to work with `systemd` |
### Conclusion: A Personal Perspective
As a Linux user hailing from the older days of UNIX, my preference leans toward the traditional `init` system. However, I've come to accept `systemd`, seeing some of its benefits despite my initial resistance. Each system has its own place in the Linux world, and it's important to understand both.
The `systemd` debate continues. What is your take on it?
--------------------------------------------------------------------------------
via: https://itsfoss.com/systemd-init/
作者:[Bill Dyer][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/bill/
[b]: https://github.com/lkxed/
[1]: https://en.wikipedia.org:443/wiki/Init
[2]: https://systemd.io:443/
[3]: https://itsfoss.com/content/images/2023/07/Systemd-on-fedora.png
[4]: https://itsfoss.com/systemd-free-distros/

View File

@ -1,154 +0,0 @@
[#]: subject: "Linux Shells: Bash, Zsh, and Fish Explained"
[#]: via: "https://www.debugpoint.com/linux-shells/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Linux Shells: Bash, Zsh, and Fish Explained
======
**A few notes and features of famous Linux shells Bash, Zsh and Fish.**
Linux is powerful because of its versatile command line interface to interact with the system. Central to this experience are the shells, which act as the bridge between users and the Linux kernel. This article will explore three popular Linux shells Bash, Zsh, and Fish and delve into their unique features and capabilities.
### Understanding Linux Shells
#### What is a Shell?
A shell is a command-line interpreter that allows you to interact with the OS through textual commands. It takes your input, processes it, and communicates with the Linux kernel to execute the requested actions. Finally, it gives you an output.
Shells play a crucial role in Linux because they enable users to perform various tasks, from simple file navigation to complex system administration tasks. Different shells offer various features, making it essential to choose the right one for your workflow.
### Bash
[Bash][1], short for “Bourne Again SHell,” is one of the most widely used and default shells in Linux distributions. It is known for its simplicity and compatibility, making it an excellent choice for beginners.
#### Features of Bash
Bash comes with a plethora of features, including:
- Command History: Easily access previously executed commands with the arrow keys.
- Tab Completion: Save time by letting Bash complete filenames and commands for you.
- Scripting: Write and run shell scripts to automate repetitive tasks. In that way, its also a program as well.
- Bash is installed in most of the GNU/Linux systems by default.
- Configuration settings are stored in `.bashrc` at your home directory.
Like any shell, Bash has its pros and cons. Some advantages of using Bash include its ubiquity, extensive documentation, and vast community support. However, Bash may lack some modern features found in other shells.
![Bash shell in Linux][2]
#### Installation
- Open the terminal in your Linux distribution.
- Check if Bash is already installed by typing: `bash --version`.
- If not installed, use your package manager to install Bash. For example, on Ubuntu, type: `sudo apt-get install bash`.
- For Fedora and RPM-based Linux use `sudo dnf install bash`
### Zsh
[Zsh][3], short for “Z Shell,” is a robust, feature-rich shell popular among experienced users. It takes the best from Bash and other shells, enhancing the user experience.
#### Advantages of Zsh
Zsh offers several advantages, such as:
- Advanced Auto-Completion: Zsh goes beyond Bashs tab completion, providing more context-aware suggestions.
- When you press the tab, Zsh also shows you possible values alongside the auto-completion.
- Plugin Support: Extend Zshs functionality through various plugins available in the community.
- Heres a list of a [vast collection of Zsh themes][4].
- You can also enjoy extensive customizations using [Oh My Zsh script][5].
![After applying settings in powerlevel10k zsh theme][6]
Zshs complexity may overwhelm newcomers, and its extensive configuration options might confuse beginners.
Heres how to install it.
- Open the terminal in your Linux distribution.
- Check if Zsh is installed by typing: zsh version.
- If not installed, use your package manager to install Zsh.
- For example, on Ubuntu, type: `sudo apt-get install zsh`.
- For Fedora and RPM-based distributions, type: `sudo dnf install zsh`.
### Fish Shell
[Fish][7], the “Friendly Interactive SHell,” focuses on user-friendliness and discoverability. It has a modern, straightforward interface that appeals to new Linux users.
#### Unique Features of Fish
Fish stands out with its:
- Syntax Highlighting: Use colour-coded text to distinguish between commands, options, and arguments.
- Autosuggestions: Fish intelligently suggests commands based on your history and current input.
- Fish is designed to work efficiently out of the box. However, you can personalize it further by creating the `~/.config/fish/config.fish` file and adding custom configurations.
While Fish excels in user-friendliness, its unique approach might not suit everyone. Some power users might find certain features limiting for advanced use.
![Fish Shell][8]
#### Fish Shell Installation
- Open the terminal in your Linux distribution.
- Check if Fish is installed by typing: `fish --version`.
- If not installed, use your package manager to install Fish. For example, on Ubuntu, type: `sudo apt-get install fish`.
- For Fedora and other RPM-based distributions type: `sudo dnf install fish`.
### Comparison of Bash, Zsh, and Fish
To help you decide which shell fits your needs, lets compare these three popular choices in various aspects:
#### Performance and Speed
Bash is known for its speed and efficiency, making it an excellent choice for resource-constrained systems. Zsh, while slightly slower, makes up for it with its extensive features and capabilities. Being more interactive, Fish shell might have a slight performance overhead but provides a delightful user experience.
#### User Interface and Experience
Bashs interface is simple and straightforward, ideal for beginners, while Zsh and Fish offer more eye-catching and interactive interfaces. Zshs advanced auto-completion and Fishs syntax highlighting create a visually appealing experience.
#### Customizability and Plugins
Zsh shines in customizability, allowing users to fine-tune their shell environment. With a vast collection of plugins, Zsh offers unparalleled extensibility. Fish takes a more opinionated approach, focusing on out-of-the-box usability, which might be limiting for some users.
### Choosing the Right Shell
The choice of the right shell largely depends on your specific needs and level of experience.
Bash is an excellent starting point if you are new to Linux and prefer a straightforward, no-frills experience. Its ease of use and extensive documentation make it beginner-friendly.
For experienced users who want more control and are willing to invest time in customization, Zshs powerful features and plugins offer an exciting and dynamic environment.
If youre interested in automating tasks and writing complex shell scripts, Bashs wide adoption and extensive support in the Linux ecosystem make it a reliable choice.
### Conclusion
Bash, Zsh, and Fish each have their strengths and cater to different user preferences. If youre new to Linux, Bashs simplicity makes it an excellent starting point. Power users and those seeking customization may find Zsh more appealing, while Fishs user-friendly design suits beginners looking for an intuitive interface. Ultimately, the choice is yours, and exploring these shells will lead to a more efficient and enjoyable Linux experience.
What is your favourite Shell? Let me know in the comment box below.
_Feature Image by [julia roman][9] from Pixabay._
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/linux-shells/
作者:[Arindam][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.debugpoint.com/author/admin1/
[b]: https://github.com/lkxed/
[1]: https://www.gnu.org/software/bash/
[2]: https://www.debugpoint.com/wp-content/uploads/2023/07/Bash-shell-in-Linux.jpg
[3]: https://www.zsh.org/
[4]: https://github.com/unixorn/awesome-zsh-plugins
[5]: https://www.debugpoint.com/oh-my-zsh-powerlevel10k/
[6]: https://www.debugpoint.com/wp-content/uploads/2022/12/After-applying-settings-in-powerlevel10k-zsh-theme.jpg
[7]: https://fishshell.com/
[8]: https://www.debugpoint.com/wp-content/uploads/2023/07/Fish-Shell.jpg
[9]: https://pixabay.com/users/julesroman-359800/

View File

@ -1,139 +0,0 @@
[#]: subject: "Mix and Match Terminal With Nautilus File Manager in Linux"
[#]: via: "https://itsfoss.com/terminal-nautilus-combination/"
[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Mix and Match Terminal With Nautilus File Manager in Linux
======
Nautilus is the graphical file browser in the GNOME desktop. You use it for accessing and managing files and folders on your system.
You can also manage files and directories from the terminal though not everyone prefers that.
However, you may encounter situations where you have to switch between the terminal and file manager.
There are various ways to interact between the Nautilus file manager and terminal. Surprisingly, not many Linux users know about them.
**_For example, in Nautilus, right-click and choose 'Open in terminal' option and you'll open the current directory location in the terminal._**
![Open terminal from Nautilus file manager in Linux][1]
That's just one of the many examples I am going to share with you in this article.
### 1. Drag and drop to get the absolute path
If you drag and drop a folder or a file to a terminal, its absolute path will be pasted on the terminal screen.
![Dragging and Dropping a File or Folder from Nautilus to Terminal will paste tha absolute path of that item][2]
This helps when you are deep inside the directory structure in the file browser and don't want to type the entire path in the terminal.
### 2. Enter a directory
It's similar to what you saw above. If you are deep inside the directory structure and don't want to type the entire path for [switching to the directory][3], this trick helps.
Type the [cd command][4] in the terminal and then drag and drop to enter into the directory.
![Enter to a directory by Drag and Drop that directory to the terminal after a "cd" command][5]
### 3. Open a file in editor
Similarly, you can open a file for [editing with Nano][6] or Vim editor.
Drag and drop a file to `nano` command to open it for editing.
![After typing "nano", drag and drop the file you need to edit to the terminal][7]
### 4. Open a file for editing with sudo
Same as above but this time, you open the file for editing with sudo access.
![Open the sources list file in nano with sudo privileges.][8]
### 5. Drag multiple files, if the command supports multiple arguments
You can also drag and drop multiple files to get their absolute paths. This can be used with commands that accept more than one argument.
For example, the [diff command checks the difference between two files][9]. Enter `diff` and then drag and drop the files you want to check for differences.
![Check the difference in two files by selecting both files and then drag and drop them as diff command arguments][10]
### 6. Copy and paste from text files
Reading a document and have to run a command mentioned in it? You can of course [copy paste in the terminal][11].
However, a quicker way is to select the text and drag and drop it to the terminal.
This trick works with [GNOME-Sushi][12] preview as well.
![Drag and Drop some text from any file from its overview using GNOME-Sushi][13]
### 7. Drag and drop from browser
Like the text files above, you can also drag and drop text from browsers. This helps in following tutorials while doing it at the same time.
![Drag and Drop codes or URLs from internet to the terminal without copy or paste][14]
### 8. Embed terminal in Nautilus
Can't live without the terminal? Embed it directly in the file manager. This way you don't have to [open a terminal][15] separately.
The thing here is that if you switch to another directory in the file browser, it automatically switches the directly in the embedded terminal also.
You can perform most of the above-mentioned drag and drop operations in the Nautilus embedded terminal also. For example, search for a specific text in bashrc, by dropping the `.bashrc` file and using grep.
![Search for a specific text in bashrc, by dropping the .bashrc file in the embedded terminal and using grep][16]
### 9. Drag files between tabs of the embedded terminal
Both terminal and file manager supports the tabbed view. You can drag and drop files from one tab to another.
For example, to [check the shasum][17] value for an ISO, enter shasum command, then, drag and drop the file from another tab, as shown below.
![Check the shasum value for an ISO, enter shasum command, then, drag and drop the file from another tab][18]
### More on Nautilus and terminal
Liked these tips? Maybe you would want to learn more such tips.
If you want to get more out of the Nautilus file manager, here are a few tips for you.
Here are some terminal tips to explore.
💬 _Do you know any other such cool tip that combines the terminal and the file manager? Why not share it with us in the comment section below?_
--------------------------------------------------------------------------------
via: https://itsfoss.com/terminal-nautilus-combination/
作者:[Abhishek Prakash][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/abhishek/
[b]: https://github.com/lkxed/
[1]: https://itsfoss.com/content/images/2023/07/right-click-open-in-terminal.gif
[2]: https://itsfoss.com/content/images/2023/07/copies-absolute-path.gif
[3]: https://itsfoss.com/change-directories/
[4]: https://itsfoss.com/cd-command/
[5]: https://itsfoss.com/content/images/2023/07/enter-a-directory.gif
[6]: https://itsfoss.com/nano-editor-guide/
[7]: https://itsfoss.com/content/images/2023/07/edit-bashrc.gif
[8]: https://itsfoss.com/content/images/2023/07/open-sources.gif
[9]: https://linuxhandbook.com/diff-command/
[10]: https://itsfoss.com/content/images/2023/07/check-diff.gif
[11]: https://itsfoss.com/copy-paste-linux-terminal/
[12]: https://gitlab.gnome.org/GNOME/sushi
[13]: https://itsfoss.com/content/images/2023/07/from-sushi.gif
[14]: https://itsfoss.com/content/images/2023/07/drag-and-drop-code-from-internet.gif
[15]: https://itsfoss.com/open-terminal-ubuntu/
[16]: https://itsfoss.com/content/images/2023/07/embedded-terminal.gif
[17]: https://itsfoss.com/checksum-tools-guide-linux/
[18]: https://itsfoss.com/content/images/2023/07/shasum-final.gif

View File

@ -2,7 +2,7 @@
[#]: via: "https://itsfoss.com/gedit-themes/"
[#]: author: "Sreenath https://itsfoss.com/author/sreenath/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
@ -201,4 +201,4 @@ via: https://itsfoss.com/gedit-themes/
[30]: https://itsfoss.com/content/images/2023/07/Plastic-code-wrap.png
[31]: https://itsfoss.com/content/images/2023/07/slate.png
[32]: https://itsfoss.com/content/images/2023/07/Vibrant-fun.png
[33]: https://github.com:443/topics/gedit-theme
[33]: https://github.com:443/topics/gedit-theme

View File

@ -1,198 +0,0 @@
[#]: subject: "10 Lightweight Linux Distributions for your Old Hardware in 2023"
[#]: via: "https://www.debugpoint.com/lightweight-linux-distributions-2022/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
10 Lightweight Linux Distributions for your Old Hardware in 2023
======
**We highlight a list of 10 lightweight Linux Distributions ideal for your older PC in 2023. We give you their features and what makes them perfect for reviving older hardware.**
We believe that you should not throw away any hardware, especially PC and its components. Ideally, well-designed software should always run on any hardware. There are many [Linux Distributions][1] specifically designed for older hardware and PCs. And you can quickly revive them with the help of these Linux operating systems. In this post, we highlight ten such Linux Distributions which are lightweight and old hardware friendly in 2023.
### 10 Lightweight Linux Distributions 2023
#### 1. Linux Lite
The first lightweight Linux Distribution we feature in this list for 2023 is Linux Lite. Linux Lite is a continually developed and improved Linux Distribution based on Ubuntu and Debian. This decade-old Linux Distribution is perfect for your older hardware which needs a friendly and well-designed distro. The team markets this distro as an ideal starting point for Windows users who ends up with not supported hardware with Windows. The primary advantages of this distro are well customized and nice-looking Xfce desktop with an Ubuntu base, the latest Kernel and, of course, a 32-bit ISO image.
![Linux Lite - Lightweight Linux Distributions][2]
Advantages of Linux Lite:
- Ubuntu-based
- Customized Xfce desktop
- Native applications
- 32-bit support
- Active development
- Minimum system requirement < 1 GB RAM
[Download Linux Lite][3]
#### 2. Puppy Linux
The second distro that we feature in this list is Puppy Linux. Puppy Linux is a little different than traditional distros out there. It is designed to run from RAM without needing to install it in a physical system. If appropriately configured, you can save the sessions, plus it continues to work well even if you remove the bootable medium.
![Puppy Linux - one of the best lightweight Linux Distribution][4]
This Linux distro is binary compatible with Ubuntu LTS versions; the latest version is based on Ubuntu 20.04 LTS. Since Ubuntu dropped the 32-bit support, the newest version dropped the 32-bit version.
Puppy Linux use cases are perfect for older computers, Netbooks, and hardware with less than 1GB of RAM. At the core, it is run by superfast JWM (Jows Window Manager), Puppy Package Manager that supports .deb, .rpm and its native PET packages.
Overall, its a perfect and well-designed Linux Distribution for older hardware, hands down.
Features:
- Based on the Ubuntu LTS Version
- It can run on low-end Netbooks
- Works directly from RAM even after removing the bootable media
- Unique package manager Puppy Package Manager
- Powered by JWM
#### 3. BunsenLabs Linux
The third lightweight Linux distro in this list is BunsenLabs Linux, a successor of the Crunchbang project. The BunsenLabs Linux is based on the Debian Stable branch, bringing modern applications to your low-end system. This distro provides a 32-bit version image for low-end systems and a standard 64-bit system for your regular hardware. At the core, BunsenLabds is powered by a pre-configured OpenBox window manager with a stunning tint2 panel, pre-configured Conky and jgmenu.
![BunsenLabs Linux -Lightweight Linux Distribution][5]
This is a well-designed, superfast, stable and nice-looking distribution for older systems.
Feature summary:
- Based on Debian Stable branch
- Openbox window manager with tint2 panel, conky and jgmenu
- It provides a 32-bit installer
- Help and support are available via official forums
[Download BunsenLabs Linux][6]
#### 4. Lubuntu
Lubuntu is famous for being a lightweight Linux Distribution. It is an official Ubuntu Linux flavour that features the lightweight LxQt desktop environment. Lubuntu gives you modern Ubuntu Linux packages and technology while it features the LxQt for your low-end hardware. Although it might require some extra system resources compared to other distros in this list, it is still a go-to Linux distro for older hardware.
![Lubuntu - Lightweight Linux Distribution][7]
If you need a moderately lighter Linux Distribution which is stable and works out of the box, then choose Lubuntu.
[Download Lubuntu][8]
#### 5. Absolute Linux
The fifth lightweight Linux distribution is Absolute Linux, based on Slackware Linux. This distro packages all necessary day-to-day applications in its installer image so that you get a complete distro out of the box. Absolute Linux features the IceWM and ROX Desktop, which gives you ultimate speed while using it on your older hardware. It is systemd-free, which offers an extra advantage over other distributions.
![Absolute Linux - Lightweight Linux Distributions][9]
Feature Summary:
- Based on Slackware
- Systemd-free
- Packages necessary software
- Powered by IceWM and package manager Slapt-get
[Download Absolute Linux][10]
#### 6. antiX Linux
Yet another lightweight Linux distribution we want to highlight is antiX Linux. The antiX Linux is based on Debian stable branch and has several attractive features. At its core, it uses IceWM, Fluxbox, and ROX Desktop options, giving you an excellent and fast desktop experience. It is entirely systemd-free and uses sysVinit and runit system. The antiX Linux also gives you a 32-bit installer and has four variants Full, Core, Base and net catering to different use cases.
![antiX Linux - Lightweight Linux Distributions][11]
Features:
- Based on Debian stable
- It provides a 32-bit installer
- Systemd free
- Powered by IceWM and other window manager flavours
[Download antiX Linux][12]
#### 7. LXLE
The LXLE Linux is a spin of the Lubuntu LTS series with an LXDE desktop instead of an LXQt desktop. The choice of applications, installer and other features makes it a perfect distro for older hardware. It is ideal for reviving your old system with a stable Ubuntu-LTS base and a fast LXDE desktop environment.
![LXLE Linux - Lightweight Linux Distributions][13]
However, in my personal opinion, I feel LXQt is a little faster than LXDE. Well, that feedback might be relative and can be different for you. There are not many Linux distributions today, which give you an LXDE flavour. Hence it is one of the unique and lightweight Linux distributions for your daily use.
[Download LXLE][14]
#### 8. Porteus Linux
The Porteus Linux is a remix of Slackware Linux that features the old KDE 4.0+ desktop environment (before the KDE Plasma series). This superfast Linux distribution is perfect for your antique hardware because it is based on bleeding-edge Slackware and gives you a 32-bit version. This distro can run from Live USB or a CD, or any bootable media and comes with just 300 MB of installer size.
If you love the old KDE (like me!) and Slackware simplicity, this is a perfect distro for you, even your new hardware.
![Porteus Linux][15]
[Download Porteus Linux][16]
#### 9. Q4OS
Q4OS is a unique Linux Distribution in this list. It targets the older Windows systems, which have become obsolete today. Many older PCs used to run Windows XP and Windows 7. They no longer work well with Windows and some modern Linux Distributions because the modern and updated OS requires much more computing power and resources.
Q4OS targets those use cases and gives you a well-designed Linux Distribution with features such as a 32-bit installer, Windows installer, Trinity Desktop environments, pre-made Windows themes, etc.
![Q4OS - KDE Plasma Edition][17]
[Download Q4OS][18]
#### 10. MX Linux
The final Linux Distribution in this list is the famous MX Linux, which has made its features and uniqueness in recent times. However, I doubted whether I would list MX Linux as lightweight. Because in my opinion, it is a medium-weight Linux Distribution if you consider its KDE Plasma flavour.
![MX Linux][19]
However, it has some features which make it a perfect candidate for lightweight Linux distributions. MX Linux is based on the Debian Stable branch and created with antiX components. It features its own MX Linux native applications for your additional workflow. You get KDE Plasma, Xfce and Fluxbox as desktop options.
[Download MX Linux][20]
### Summary & Conclusion
If you look closely, most of the lightweight Linux distribution we listed here is based on Debian Linux. It is truly the “Universal Operating System”. Modern Linux Desktop Environments like GNOME 40+, and KDE Plasma with Systemd init systems are no longer compatible with older hardware. Also, as technology progresses, more software complexity is introduced, requiring higher-end systems.
That said, I hope you get some idea about which lightweight Linux distributions to choose for your old laptop or PC from this list. Each of them serves different tastes and needs with one goal: to revive your older systems. So, take your pick.
Cheers.
_This article,_ Top Ten Lightweight Linux Distributions, _is filed under the [Top Ten List][21]._
_Some image credit: Respective Linux Distributions_
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/lightweight-linux-distributions-2022/
作者:[Arindam][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.debugpoint.com/author/admin1/
[b]: https://github.com/lkxed/
[1]: https://www.debugpoint.com/category/distributions
[2]: https://www.debugpoint.com/wp-content/uploads/2022/03/Linux-Lite.jpg
[3]: http://www.linuxliteos.com/
[4]: https://www.debugpoint.com/wp-content/uploads/2022/03/Puppy-Linux-one-of-the-best-lightweight-Linux-Distribution-in-2022.jpg
[5]: https://www.debugpoint.com/wp-content/uploads/2022/03/BunsenLabs-Linux.jpg
[6]: https://www.bunsenlabs.org/
[7]: https://www.debugpoint.com/wp-content/uploads/2022/03/Lubuntu.jpg
[8]: https://lubuntu.me/
[9]: https://www.debugpoint.com/wp-content/uploads/2022/03/Absolute-Linux.jpg
[10]: https://www.absolutelinux.org/
[11]: https://www.debugpoint.com/wp-content/uploads/2022/03/antiX-Linux.jpg
[12]: https://antixlinux.com/
[13]: https://www.debugpoint.com/wp-content/uploads/2022/03/LXLE-Linux.jpg
[14]: http://www.lxle.net/
[15]: https://www.debugpoint.com/wp-content/uploads/2022/03/Porteus-Linux.jpg
[16]: http://www.porteus.org/
[17]: https://www.debugpoint.com/wp-content/uploads/2022/03/Q4OS-KDE-Plasma-Edition.jpg
[18]: https://q4os.org/
[19]: https://www.debugpoint.com/wp-content/uploads/2022/03/MX-Linux-1.jpg
[20]: https://mxlinux.org/
[21]: https://www.debugpoint.com/tag/top-10-list

Some files were not shown because too many files have changed in this diff Show More