mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-03-03 01:10:13 +08:00
Merge remote-tracking branch 'LCTT/master'
This commit is contained in:
commit
8f56bfcaa1
@ -1,8 +1,8 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (wxy)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-12109-1.html)
|
||||
[#]: subject: (Take back your dotfiles with Chezmoi)
|
||||
[#]: via: (https://fedoramagazine.org/take-back-your-dotfiles-with-chezmoi/)
|
||||
[#]: author: (Ryan Walter https://fedoramagazine.org/author/rwaltr/)
|
||||
@ -10,19 +10,19 @@
|
||||
用 Chezmoi 取回你的点文件
|
||||
======
|
||||
|
||||
![][1]
|
||||

|
||||
|
||||
在 Linux 中,点文件是隐藏的文本文件,用于存储从 Bash、Git 到 i3 或 VSCode 等更复杂的许多应用程序的配置设置。
|
||||
在 Linux 中,点文件是隐藏的文本文件,从 Bash、Git 到 i3 或 VSCode 等更复杂的许多应用程序,都用它存储配置设置。
|
||||
|
||||
这些文件大多数都放在 `~/.config` 目录中或用户主目录中。编辑这些文件使你可以自定义也许没有提供设置菜单的应用程序,并且它们可以跨设备甚至是跨其他 Linux 发行版移植。但是,Linux 发烧友社区中讨论的一个话题是如何管理这些点文件以及如何共享它们。
|
||||
这些文件大多数都放在 `~/.config` 目录中或用户主目录中。编辑这些文件使你可以自定义也许没有提供设置菜单的应用程序,并且它们可以跨设备甚至是跨其它 Linux 发行版移植。但是,整个 Linux 发烧友社区的讨论焦点是如何管理这些点文件以及如何共享它们。
|
||||
|
||||
我们将展示一个名为 [Chezmoi][2] 的工具,该工具与其他工具略有不同。
|
||||
我们将展示一个名为 [Chezmoi][2] 的工具,该工具与其它工具略有不同。
|
||||
|
||||
### 点文件管理的历史
|
||||
|
||||
如果你在 [GitHub 上搜索“dotfile”][3],那么你将看到有超过 10 万个存储库在解决一个目标:将人们的点文件存储在可共享且可重复的领地中。但是,除了都在使用 Git 之外,它们存储文件的方式各有不同。
|
||||
如果你在 [GitHub 上搜索“dotfiles”][3],那么你将看到有超过 10 万个存储库在解决一个目标:将人们的点文件存储在可共享且可重复的领地中。但是,除了都在使用 Git 之外,它们存储文件的方式各有不同。
|
||||
|
||||
虽然 Git 解决了代码管理问题,也将其转换为配置文件管理,但它并没有解决如何区分发行版、角色(例如家用计算机与工作计算机)、机密管理以及按设备配置的问题。
|
||||
虽然 Git 解决了代码管理问题,也将其转换为配置文件管理,但它并没有解决如何区分发行版、角色(例如家用计算机与工作计算机)、机密信息管理以及按设备配置的问题。
|
||||
|
||||
因此,许多用户决定制定自己的解决方案,多年来,社区已经做出了许多成果。本文将简要介绍已有的一些解决方案。
|
||||
|
||||
@ -38,27 +38,27 @@ $ podman run --rm -it fedora
|
||||
|
||||
#### 安装问题
|
||||
|
||||
如果将点文件存储在 Git 存储库中,你肯定希望可以使更改轻松地自动应用到主目录之中,乍一看,最简单的方法是使用符号链接,例如 `ln -s ~/.dotfies/bashrc ~/.bashrc`。这将使你的更改在更新存储库时立即就绪。
|
||||
如果将点文件存储在 Git 存储库中,你肯定希望可以让更改轻松地自动应用到主目录之中,乍一看,最简单的方法是使用符号链接,例如 `ln -s ~/.dotfies/bashrc ~/.bashrc`。这可以使你的更改在更新存储库时立即就绪。
|
||||
|
||||
符号链接的问题在于管理符号链接可能很麻烦。Stow 和 [RCM(在 Fedora 杂志上介绍过)][4]可以帮助你管理这些,但是这些并不是非常舒服的解决方案。下载后,需要对私有文件进行适当的修改和设置访问模式。如果你在一个系统上修改了点文件,然后将存储库下载到另一个系统,则可能会发生冲突并需要进行故障排除。
|
||||
符号链接的问题在于管理符号链接可能很麻烦。Stow 和 [RCM][4](在 Fedora 杂志上介绍过)可以帮助你管理这些,但是这些并不是非常舒服的解决方案。下载后,需要对私有文件进行适当的修改和设置访问模式。如果你在一个系统上修改了点文件,然后将存储库下载到另一个系统,则可能会发生冲突并需要进行故障排除。
|
||||
|
||||
解决此问题的另一种方法是编写自己的安装脚本。这是最灵活的选项,但要权衡需要花费更多时间来构建自定义解决方案是否值得。
|
||||
解决此问题的另一种方法是编写自己的安装脚本。这是最灵活的选项,但要权衡花费更多时间来构建自定义解决方案是否值得。
|
||||
|
||||
#### 机密问题
|
||||
#### 机密信息问题
|
||||
|
||||
Git 旨在跟踪更改。如果你在 Git 存储库中存储密码或 API 密钥之类的机密信息,则会比较麻烦,并且需要重写 Git 历史记录以删除该机密信息。如果你的存储库是公开的,那么如果其他人下载了你的存储库,你的机密信息将不再保密。仅这个问题就会阻止许多人与公共世界共享其 dotfile。
|
||||
Git 旨在跟踪更改。如果你在 Git 存储库中存储密码或 API 密钥之类的机密信息,则会比较麻烦,并且需要重写 Git 历史记录以删除该机密信息。如果你的存储库是公开的,那么如果其他人下载了你的存储库,你的机密信息将不再保密。仅这个问题就会阻止许多人与公共世界共享其点文件。
|
||||
|
||||
#### 多设备配置问题
|
||||
|
||||
问题不在于将配置拉到多个设备,而是当你有多个需要不同配置的设备时的问题。大多数人通过使用不同的文件夹或使用不同的复刻来处理此问题。这使得难以在不同设备和角色集之间共享配置。
|
||||
问题不在于如何将配置拉到多个设备,而是当你有多个需要不同配置的设备的问题。大多数人通过使用不同的文件夹或使用不同的<ruby>复刻<rt>fork</rt></ruby>来处理此问题。这使得难以在不同设备和角色集之间共享配置。
|
||||
|
||||
### Chezmoi 是如何干的
|
||||
|
||||
Chezmoi 是一种考虑了以上问题的用于管理点文件的工具,它不会盲目地从存储库复制或符号链接文件。 Chezmoi 更像是模板引擎,可以根据系统变量、模板、机密管理器和 Chezmoi 自己的配置文件来生成你的点文件。
|
||||
Chezmoi 是一种考虑了以上问题的用于管理点文件的工具,它不会盲目地从存储库复制或符号链接文件。 Chezmoi 更像是模板引擎,可以根据系统变量、模板、机密信息管理器和 Chezmoi 自己的配置文件来生成你的点文件。
|
||||
|
||||
#### Chezmoi 入门
|
||||
|
||||
目前,Chezmoi 不在 Fedora 的默认软件库中。你可以使用以下命令下载 Chezmoi 的当前版本。
|
||||
目前,Chezmoi 并不在 Fedora 的默认软件库中。你可以使用以下命令下载 Chezmoi 的当前版本。
|
||||
|
||||
```
|
||||
$ sudo dnf install https://github.com/twpayne/chezmoi/releases/download/v1.7.17/chezmoi-1.7.17-x86_64.rpm
|
||||
@ -72,7 +72,7 @@ $ sudo dnf install https://github.com/twpayne/chezmoi/releases/download/v1.7.17/
|
||||
$ chezmoi init
|
||||
```
|
||||
|
||||
它将在 `~/.local/share/chezmoi/` 中创建你的新存储库。你可以使用以下命令轻松地切换该目录:
|
||||
它将在 `~/.local/share/chezmoi/` 中创建你的新存储库。你可以使用以下命令轻松地切换到该目录:
|
||||
|
||||
```
|
||||
$ chezmoi cd
|
||||
@ -86,7 +86,7 @@ chezmoi add ~/.bashrc
|
||||
|
||||
这将你的 `.bashrc` 文件添加到 chezmoi 存储库。
|
||||
|
||||
注意:如果你的 `.bashrc` 文件实际上是一个符号链接,则需要添加 `-f` 标志以跟随它并读取实际文件的内容。
|
||||
注意:如果你的 `.bashrc` 文件实际上是一个符号链接,则需要添加 `-f` 标志以跟随它来读取实际文件的内容。
|
||||
|
||||
现在,你可以使用以下命令编辑该文件:
|
||||
|
||||
@ -106,7 +106,7 @@ Chezmoi 使用特殊的前缀来跟踪隐藏文件和私有文件,以解决 Gi
|
||||
$ chezmoi cd
|
||||
```
|
||||
|
||||
**请注意,标记为私有的文件实际上并不是私有的,它们仍会以纯文本格式保存在你的 Git 存储库中。稍后会解释更多。**
|
||||
**请注意,标记为私有的文件实际上并不是私有的,它们仍会以纯文本格式保存在你的 Git 存储库中。稍后会进一步解释。**
|
||||
|
||||
你可以使用以下方法应用任何更改:
|
||||
|
||||
@ -144,7 +144,7 @@ $ chezmoi edit-config
|
||||
name = "Fedora Mcdora"
|
||||
```
|
||||
|
||||
保存文件,然后再次运行 `chezmoi data`。你将在底部看到你的电子邮件和姓名现已添加。现在,你可以将这些与 Chezmoi 的模板一起使用。运行:
|
||||
保存文件,然后再次运行 `chezmoi data`。你将在底部看到你的电子邮件和姓名已经添加成功。现在,你可以将这些与 Chezmoi 的模板一起使用。运行:
|
||||
|
||||
```
|
||||
$ chezmoi add -T --autotemplate ~/.gitconfig
|
||||
@ -166,7 +166,7 @@ $ chezmoi add -T --autotemplate ~/.gitconfig
|
||||
$ chezmoi edit ~/.gitconfig
|
||||
```
|
||||
|
||||
然后使用
|
||||
然后使用:
|
||||
|
||||
```
|
||||
$ chezmoi cat ~/.gitconfig
|
||||
@ -176,17 +176,17 @@ $ chezmoi cat ~/.gitconfig
|
||||
|
||||
```
|
||||
[root@a6e273a8d010 ~]# chezmoi cat ~/.gitconfig
|
||||
[user]
|
||||
email = "fedorauser@example.com"
|
||||
name = "Fedora Mcdora"
|
||||
[root@a6e273a8d010 ~]#
|
||||
[user]
|
||||
email = "fedorauser@example.com"
|
||||
name = "Fedora Mcdora"
|
||||
[root@a6e273a8d010 ~]#
|
||||
```
|
||||
|
||||
它将在我们的 Chezmoi 配置中生成一个充满变量的文件。你也可以使用变量执行简单的逻辑语句。一个例子是:
|
||||
|
||||
```
|
||||
{{- if eq .chezmoi.hostname "fsteel" }}
|
||||
# this will only be included if the host name is equal to "fsteel"
|
||||
# 如果主机名为 "fsteel" 才包括此部分
|
||||
{{- end }}
|
||||
```
|
||||
|
||||
@ -224,7 +224,7 @@ $ chezmoi doctor
|
||||
[root@a6e273a8d010 ~]#
|
||||
```
|
||||
|
||||
您可以使用这些客户端,也可以使用[通用客户端][6],也可以使用系统的[密钥环][7]。
|
||||
你可以使用这些客户端,也可以使用[通用客户端][6],也可以使用系统的[密钥环][7]。
|
||||
|
||||
对于 GPG,你需要使用以下命令将以下内容添加到配置中:
|
||||
|
||||
@ -243,9 +243,9 @@ $ chezmoi edit-config
|
||||
$ chezmoi add --encrypt
|
||||
```
|
||||
|
||||
来添加任何文件,这些文件将在你的源存储库中加密,并且不会以纯文本格式公开。Chezmoi 会在申请时自动将其解密。
|
||||
来添加任何文件,这些文件将在你的源存储库中加密,并且不会以纯文本格式公开。Chezmoi 会在应用时自动将其解密。
|
||||
|
||||
我们也可以在模板中使用它们。例如,存储在 [Pass(已在 Fedora 杂志上介绍)][8]中的机密令牌。继续,生成你的机密信息。
|
||||
我们也可以在模板中使用它们。例如,存储在 [Pass][8](已在 Fedora 杂志上介绍)中的机密令牌。继续,生成你的机密信息。
|
||||
|
||||
在此示例中,它称为 `githubtoken`:
|
||||
|
||||
@ -291,7 +291,7 @@ via: https://fedoramagazine.org/take-back-your-dotfiles-with-chezmoi/
|
||||
作者:[Ryan Walter][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[wxy](https://github.com/wxy)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
@ -1,24 +1,24 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-12111-1.html)
|
||||
[#]: subject: (Bitwarden: A Free & Open Source Password Manager)
|
||||
[#]: via: (https://itsfoss.com/bitwarden/)
|
||||
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
|
||||
|
||||
Bitwarden:一个免费的开源密码管理器
|
||||
Bitwarden:一个自由开源的密码管理器
|
||||
======
|
||||
|
||||
_ **简述:** Bitwarden 是流行的开源密码管理器。 在这里,我们来看看它提供了什么。
|
||||
> Bitwarden 是流行的开源密码管理器。在这里,我们来看看它提供了什么。
|
||||
|
||||
![][1]
|
||||
|
||||
[Bitwarden][2] 是一个免费的开源密码管理器。 你可能还记得,我们之前将它列为 [Linux 中的最佳密码管理器][3]之一。
|
||||
[Bitwarden][2] 是一个自由开源的密码管理器。你可能还记得,我们之前将它列为 [Linux 中的最佳密码管理器][3]之一。
|
||||
|
||||
就个人而言,几个月来我一直在多个设备上使用 Bitwarden 作为我的密码管理器。 因此,在本文中,我将说明它提供的功能以及我的使用经验。
|
||||
就个人而言,几个月来我一直在多个设备上使用 Bitwarden 作为我的密码管理器。因此,在本文中,我将说明它提供的功能以及我的使用经验。
|
||||
|
||||
**注意:** _ 如果你对服务的安全性有疑问,请查看其官方安全性[常见问题页面][4]。
|
||||
**注意:** 如果你对服务的安全性有疑问,请查看其官方安全性[常见问题页面][4]。
|
||||
|
||||
### Bitwarden 密码管理器的特性
|
||||
|
||||
@ -32,7 +32,7 @@ _ **简述:** Bitwarden 是流行的开源密码管理器。 在这里,我
|
||||
* 适用于团队(企业)和个人
|
||||
* 开源
|
||||
* 支持自托管
|
||||
* 能够作为身份验证器应用(像 Google 身份验证器)
|
||||
* 能够作为身份验证器应用(如 Google 身份验证器)
|
||||
* 跨平台支持(安卓、iOS、Linux、Windows 和 macOS)
|
||||
* 提供浏览器扩展(Firefox,、Chrome、Opera、Edge、Safari)
|
||||
* 提供命令行工具
|
||||
@ -42,12 +42,9 @@ _ **简述:** Bitwarden 是流行的开源密码管理器。 在这里,我
|
||||
* 自动填充密码
|
||||
* 两步身份验证
|
||||
|
||||
|
||||
|
||||
|
||||
从技术上讲,Bitwarden 使用完全免费。然而,它也提供了一些付费计划(个人付费和商务付费计划)。
|
||||
|
||||
通过高级计划,你可以与更多用户共享密码、获取 API 访问权限(业务使用)以及更多此类高级功能。
|
||||
通过付费计划,你可以与更多用户共享密码、获取 API 访问权限(业务使用)以及更多此类高级功能。
|
||||
|
||||
以下是定价(在编写本文时):
|
||||
|
||||
@ -59,11 +56,11 @@ _ **简述:** Bitwarden 是流行的开源密码管理器。 在这里,我
|
||||
|
||||
![][8]
|
||||
|
||||
很容易将 Bitwarden 安装到你的 Linux 系统上,因为它提供了一个 .**AppImage** 文件。如果你还不知道[如何使用 AppImage][9] 文件,你可以参考我们的指南。
|
||||
很容易将 Bitwarden 安装到你的 Linux 系统上,因为它提供了一个 .AppImage 文件。如果你还不知道[如何使用 AppImage][9] 文件,你可以参考我们的指南。
|
||||
|
||||
如果你不喜欢使用 AppImage , 你可以选择 [snap 包][10]或在其[官方下载页面][11]上下载 **.deb** 或者 **.rpm** 文件。你还可以查看其 [GitHub 页面][12]了解更多信息。
|
||||
如果你不喜欢使用 AppImage,你可以选择 [snap 包][10]或在其[官方下载页面][11]上下载 .deb 或者 .rpm 文件。你还可以查看其 [GitHub 页面][12]了解更多信息。
|
||||
|
||||
[Download Bitwarden][2]
|
||||
- [下载 Bitwarden][2]
|
||||
|
||||
如果你对使用桌面应用不感兴趣,也可以使用浏览器扩展。
|
||||
|
||||
@ -73,9 +70,9 @@ _ **简述:** Bitwarden 是流行的开源密码管理器。 在这里,我
|
||||
|
||||
所以,在我发现 Bitwarden 后就决定使用它。
|
||||
|
||||
首先,我从 LastPass 导出我的数据,并导入到 Bitwarden 没有困难。在此过程中我没有丢失任何数据。
|
||||
首先,我从 LastPass 导出我的数据,并导入到 Bitwarden 没有遇到困难。在此过程中我没有丢失任何数据。
|
||||
|
||||
除了桌面应用,我一直在使用 Bitwarden 的火狐插件,和 Android 应用。使用六个多月后,我没有遇到任何问题。所以,如果你愿意试试看,我一定会给它好评!
|
||||
除了桌面应用,我一直在使用 Bitwarden 的火狐插件和 Android 应用。使用六个多月后,我没有遇到任何问题。所以,如果你愿意试试看,我一定会给它好评!
|
||||
|
||||
### 总结
|
||||
|
||||
@ -83,7 +80,7 @@ _ **简述:** Bitwarden 是流行的开源密码管理器。 在这里,我
|
||||
|
||||
你可以免费入门,但如果可以,请购买 **10 美元/年**的高级计划来支持这个开源项目。
|
||||
|
||||
如果你正在寻找更多选择,你也可以查看我们的 [Linux 中 5 个最佳密码管理器][5]。
|
||||
如果你正在寻找更多选择,你也可以查看我们的 [Linux 中 5 个最佳密码管理器][3]。
|
||||
|
||||
你试过 Bitwarden 了吗?如果没有,请试试看!此外,你最喜欢的密码管理器是什么?让我在下面的评论中知道!
|
||||
|
||||
@ -94,7 +91,7 @@ via: https://itsfoss.com/bitwarden/
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
@ -102,7 +99,7 @@ via: https://itsfoss.com/bitwarden/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/bitwarden-screenshot.jpg?ssl=1
|
||||
[2]: https://bitwarden.com/
|
||||
[3]: https://itsfoss.com/password-managers-linux/
|
||||
[3]: https://linux.cn/article-11531-1.html
|
||||
[4]: https://help.bitwarden.com/security/
|
||||
[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/bitwarden-dark-mode.jpg?ssl=1
|
||||
[6]: https://itsfoss.com/password-generators-linux/
|
@ -0,0 +1,82 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (How World of Warcraft introduced me to Linux)
|
||||
[#]: via: (https://opensource.com/article/20/4/wow-linux)
|
||||
[#]: author: (Luke Rawlins, RHCE https://opensource.com/users/sudoluke)
|
||||
|
||||
How World of Warcraft introduced me to Linux
|
||||
======
|
||||
One Linux sysadmin traces his journey from video-gaming car mechanic to
|
||||
a new career in IT.
|
||||
![Gaming with penguin pawns][1]
|
||||
|
||||
The story behind my career with [Linux][2] is a bit unusual. It starts back in 2005; I was working as an auto mechanic at a Nissan dealership in Toledo, Ohio. I had never used a computer for anything other than checking email, browsing the web, and playing World of Warcraft.
|
||||
|
||||
I had never heard of Linux, I didn't know the term "open source," I probably couldn't even have walked you through how to copy a file from one place to another, and I certainly never thought that I would eventually find myself working in IT or running a website.
|
||||
|
||||
### The "Blue Screen of Death" that changed my life
|
||||
|
||||
I mentioned that I liked to play World of Warcraft (I still do, you can find me on my Mage "Elodinn—Twisting Nether" most of the time). This game was a huge hit in the early 2000s, and it consumed an enormous amount of my time (truth be told, probably a little too much of my time).
|
||||
|
||||
You can imagine my horror one evening when I boot up my PC to be greeted by a blue screen with lots of cryptic messages, including "A problem has been detected…" Hmm weird, maybe I'll just unplug it and plug it back in—that works around the shop sometimes. No such luck, the same message comes up. Over and over, to no avail.
|
||||
|
||||
### How do you fix this?
|
||||
|
||||
So I called a friend and explained the problem. [Big blue screen][3]. Lots of little white letters. I'm going to miss the raid!
|
||||
|
||||
He wasn't sure but said something about drivers, or maybe a hardware problem. I ended up calling around to a few computer repair shops to see if they could fix it. They all said the same thing after I read the message on the screen, and explained the problem to them. "I really can't be sure over the phone, but it sounds like the motherboard is bad. It's going to be $95 for diagnostics and I should be able to get it back to you in about a week."
|
||||
|
||||
There was no way I was going to pay $95 for a diagnostic on an old crappy computer just to be told that either I needed a new one, or that the repair was going to be even more money on top of the diagnostic fee. So I thought to myself, if I can fix a car, then I can definitely fix this little computer. It was broken anyway; what was the worst that could happen? I end up breaking it more and need a new one? I was already in that situation.
|
||||
|
||||
So I spent the next couple of days at work doing some research on computer parts, in between cars. I found out that replacing the motherboard meant that I was probably going to need a new processor. I found a motherboard/processor combo on Newegg for a decent price that I was fairly confident would work on my computer. Great!
|
||||
|
||||
I ordered the parts, and a few days later, after printing out a few instructions, I had swapped out the motherboard and replaced it with my new hardware from Newegg. I was incredibly proud of my new found skills and naturally assumed that I was some kind of elite hacker. That is, until I started the computer up.
|
||||
|
||||
I don't know if you know this, but Windows XP didn't like it when you replaced a lot of parts in your computer. I didn't know it at the time either, but now I had spent probably $150 because I didn't want to pay $95 for a diagnostic, and my computer was still broken.
|
||||
|
||||
### The deep dark web has all the answers
|
||||
|
||||
The next day, once again, I'm using all my breaks to research what went wrong. Pretty quickly I realized that my problem was tied to the fact that I needed a new Windows license. I also realized that there was no way I was going to purchase the software. I'd get a new computer before I purchased a new Windows license. But I wasn't quite ready to give up yet.
|
||||
|
||||
One click leads to another, and I end up on a computer repair forum with someone complaining about a similar problem. All the replies are basically the same—buy a Windows license or buy a new PC—but one. Near the bottom of the forum, some unknown hero of the internet says, "You can always give Ubuntu a try." and leaves it at that.
|
||||
|
||||
"What's Ubuntu?" I said to myself, "and how on earth do you even pronounce that word?"
|
||||
|
||||
Anyway, after some more intensive searching, I found out that Ubuntu is a free operating system that is widely considered to be one of the most user-friendly Linux distributions (whatever that is) that you can get. What's more, I found a book that included an installation CD available at the Barnes and Noble bookstore that I passed on my way home from work. Why not give Ubuntu a try? After all, the computer was already broken, and the book was only $18.99.
|
||||
|
||||
### This story is already too long
|
||||
|
||||
I wish I still had that book. I think I sold it with a box full of old books at a garage sale when we moved a few years ago. I wanted to share my Linux story because it's different than many of the other stories I read about. I was not a college graduate at the time, I didn't learn to code as a child, and I am not an exceptionally intelligent person. I was, at best, an average student, a recently separated Marine, and I assumed that fixing computers couldn't be much different from fixing cars. At the end of the day, you're still just swapping out different parts, right? Different tools, different parts, same job—no problem.
|
||||
|
||||
Along the way I ran into a lot of problems, the first one was the discovery that after all that work, I still couldn't play World of Warcraft. Eventually, I discovered WineHQ and Open Office, and all the incredible things that have come out of the open-source world. That mysterious blue screen and my World of Warcraft obsession redirected the course of my entire working life, for the better. That's an odd thing to admit, but it's probably true.
|
||||
|
||||
### How does the story end?
|
||||
|
||||
Well, it's not over, and I still have a lot to learn. After some frustrating trial and error, I did eventually learn how to install World of Warcraft using Wine. I missed a few weeks in the game, but I didn't lose my raid spot in the guild, and all things considered, I was no worse for the wear. At the time, I was playing a Druid, and everyone always had room for a healer when it came time to battle Ragnaros, the Fire Lord!
|
||||
|
||||
Up to this point, however, my little computer repair project has turned into a wonderful career as a Linux systems administrator, a bachelor's degree, a whole bunch of IT certifications, including the Red Hat Certified Engineer certification, and a [blog][4] that I use as my way of giving back to the community that has given me so much.
|
||||
|
||||
So, if you are like me, a person who is at best moderately intelligent, persistent, incredibly cheap, and not afraid to break a few things, go ahead and try out Linux the next time your computer breaks.
|
||||
|
||||
I'm excited. I mean really excited. Excited to the point that I can hardly think. I'm talking six-...
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/4/wow-linux
|
||||
|
||||
作者:[Luke Rawlins, RHCE][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/sudoluke
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/gaming_grid_penguin.png?itok=7Fv83mHR (Gaming with penguin pawns)
|
||||
[2]: https://opensource.com/resources/linux
|
||||
[3]: https://en.wikipedia.org/wiki/Blue_screen_of_death
|
||||
[4]: https://sudoedit.com
|
@ -1,146 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (robsean)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Installing Kali Linux on VirtualBox: Quickest & Safest Way)
|
||||
[#]: via: (https://itsfoss.com/install-kali-linux-virtualbox/)
|
||||
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
|
||||
|
||||
Installing Kali Linux on VirtualBox: Quickest & Safest Way
|
||||
======
|
||||
|
||||
_**This tutorial shows you how to install Kali Linux on Virtual Box in Windows and Linux in the quickest way possible.**_
|
||||
|
||||
[Kali Linux][1] is one of the [best Linux distributions for hacking][2] and security enthusiasts.
|
||||
|
||||
Since it deals with a sensitive topic like hacking, it’s like a double-edged sword. We have discussed it in the detailed Kali Linux review in the past so I am not going to bore you with the same stuff again.
|
||||
|
||||
While you can install Kali Linux by replacing the existing operating system, using it via a virtual machine would be a better and safer option.
|
||||
|
||||
With Virtual Box, you can use Kali Linux as a regular application in your Windows/Linux system. It’s almost the same as running VLC or a game in your system.
|
||||
|
||||
Using Kali Linux in a virtual machine is also safe. Whatever you do inside Kali Linux will NOT impact your ‘host system’ (i.e. your original Windows or Linux operating system). Your actual operating system will be untouched and your data in the host system will be safe.
|
||||
|
||||
![][3]
|
||||
|
||||
### How to install Kali Linux on VirtualBox
|
||||
|
||||
I’ll be using [VirtualBox][4] here. It is a wonderful open source virtualization solution for just about anyone (professional or personal use). It’s available free of cost.
|
||||
|
||||
In this tutorial, we will talk about Kali Linux in particular but you can install almost any other OS whose ISO file exists or a pre-built virtual machine save file is available.
|
||||
|
||||
**Note:** _The same steps apply for Windows/Linux running VirtualBox._
|
||||
|
||||
As I already mentioned, you can have either Windows or Linux installed as your host. But, in this case, I have Windows 10 installed (don’t hate me!) where I try to install Kali Linux in VirtualBox step by step.
|
||||
|
||||
And, the best part is – even if you happen to use a Linux distro as your primary OS, the same steps will be applicable!
|
||||
|
||||
Wondering, how? Let’s see…
|
||||
|
||||
[Subscribe to Our YouTube Channel for More Linux Videos][5]
|
||||
|
||||
### Step by Step Guide to install Kali Linux on VirtualBox
|
||||
|
||||
_We are going to use a custom Kali Linux image made for VirtualBox specifically. You can also download the ISO file for Kali Linux and create a new virtual machine – but why do that when you have an easy alternative?_
|
||||
|
||||
#### 1\. Download and install VirtualBox
|
||||
|
||||
The first thing you need to do is to download and install VirtualBox from Oracle’s official website.
|
||||
|
||||
[Download VirtualBox][6]
|
||||
|
||||
Once you download the installer, just double click on it to install VirtualBox. It’s the same for [installing VirtualBox on Ubuntu][7]/Fedora Linux as well.
|
||||
|
||||
#### 2\. Download ready-to-use virtual image of Kali Linux
|
||||
|
||||
After installing it successfully, head to [Offensive Security’s download page][8] to download the VM image for VirtualBox. If you change your mind to utilize [VMware][9], that is available too.
|
||||
|
||||
![][10]
|
||||
|
||||
As you can see the file size is well over 3 GB, you should either use the torrent option or download it using a [download manager][11].
|
||||
|
||||
[Kali Linux Virtual Image][8]
|
||||
|
||||
#### 3\. Install Kali Linux on Virtual Box
|
||||
|
||||
Once you have installed VirtualBox and downloaded the Kali Linux image, you just need to import it to VirtualBox in order to make it work.
|
||||
|
||||
Here’s how to import the VirtualBox image for Kali Linux:
|
||||
|
||||
**Step 1** : Launch VirtualBox. You will notice an **Import** button – click on it
|
||||
|
||||
![Click on Import button][12]
|
||||
|
||||
**Step 2:** Next, browse the file you just downloaded and choose it to be imported (as you can see in the image below). The file name should start with ‘kali linux‘ and end with . **ova** extension.
|
||||
|
||||
![Importing Kali Linux image][13]
|
||||
|
||||
**S** Once selected, proceed by clicking on **Next**.
|
||||
|
||||
**Step 3** : Now, you will be shown the settings for the virtual machine you are about to import. So, you can customize them or not – that is your choice. It is okay if you go with the default settings.
|
||||
|
||||
You need to select a path where you have sufficient storage available. I would never recommend the **C:** drive on Windows.
|
||||
|
||||
![Import hard drives as VDI][14]
|
||||
|
||||
Here, the hard drives as VDI refer to virtually mount the hard drives by allocating the storage space set.
|
||||
|
||||
After you are done with the settings, hit **Import** and wait for a while.
|
||||
|
||||
**Step 4:** You will now see it listed. So, just hit **Start** to launch it.
|
||||
|
||||
You might get an error at first for USB port 2.0 controller support, you can disable it to resolve it or just follow the on-screen instruction of installing an additional package to fix it. And, you are done!
|
||||
|
||||
![Kali Linux running in VirtualBox][15]
|
||||
|
||||
The default username in Kali Linux is root and the default password is toor. You should be able to login to the system with it.
|
||||
|
||||
Do note that you should [update Kali Linux][16] before trying to install a new applications or trying to hack your neighbor’s WiFi.
|
||||
|
||||
I hope this guide helps you easily install Kali Linux on Virtual Box. Of course, Kali Linux has a lot of useful tools in it for penetration testing – good luck with that!
|
||||
|
||||
**Tip** : Both Kali Linux and Ubuntu are Debian-based. If you face any issues or error with Kali Linux, you may follow the tutorials intended for Ubuntu or Debian on the internet.
|
||||
|
||||
### Bonus: Free Kali Linux Guide Book
|
||||
|
||||
If you are just starting with Kali Linux, it will be a good idea to know how to use Kali Linux.
|
||||
|
||||
Offensive Security, the company behind Kali Linux, has created a guide book that explains the basics of Linux, basics of Kali Linux, configuration, setups. It also has a few chapters on penetration testing and security tools.
|
||||
|
||||
Basically, it has everything you need to get started with Kali Linux. And the best thing is that the book is available to download for free.
|
||||
|
||||
[Download Kali Linux Revealed for FREE][17]
|
||||
|
||||
Let us know in the comments below if you face an issue or simply share your experience with Kali Linux on VirtualBox.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/install-kali-linux-virtualbox/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/ankush/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.kali.org/
|
||||
[2]: https://itsfoss.com/linux-hacking-penetration-testing/
|
||||
[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/02/kali-linux-virtual-box.png?resize=800%2C450&ssl=1
|
||||
[4]: https://www.virtualbox.org/
|
||||
[5]: https://www.youtube.com/c/itsfoss?sub_confirmation=1
|
||||
[6]: https://www.virtualbox.org/wiki/Downloads
|
||||
[7]: https://itsfoss.com/install-virtualbox-ubuntu/
|
||||
[8]: https://www.offensive-security.com/kali-linux-vm-vmware-virtualbox-image-download/
|
||||
[9]: https://itsfoss.com/install-vmware-player-ubuntu-1310/
|
||||
[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/02/kali-linux-virtual-box-image.jpg?resize=800%2C347&ssl=1
|
||||
[11]: https://itsfoss.com/4-best-download-managers-for-linux/
|
||||
[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/02/vmbox-import-kali-linux.jpg?ssl=1
|
||||
[13]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/02/vmbox-linux-next.jpg?ssl=1
|
||||
[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/02/vmbox-kali-linux-settings.jpg?ssl=1
|
||||
[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/02/kali-linux-on-windows-virtualbox.jpg?resize=800%2C429&ssl=1
|
||||
[16]: https://linuxhandbook.com/update-kali-linux/
|
||||
[17]: https://kali.training/downloads/Kali-Linux-Revealed-1st-edition.pdf
|
@ -1,5 +1,5 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: translator: (robsean)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
@ -1,5 +1,5 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: translator: (robsean)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
@ -1,5 +1,5 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: translator: (lxbwolf)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
@ -1,84 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (New Linux Distribution UbuntuDDE Brings The Beautiful Deepin Desktop to Ubuntu)
|
||||
[#]: via: (https://itsfoss.com/ubuntudde/)
|
||||
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
||||
|
||||
New Linux Distribution UbuntuDDE Brings The Beautiful Deepin Desktop to Ubuntu
|
||||
======
|
||||
|
||||
Deepin is a beautiful desktop environment with an intuitive UI. UbuntuDDE project combines the power of Ubuntu and the beauty of Deepin.
|
||||
|
||||
[Deepin Desktop Environment][1] (DDE) is a beautiful desktop environment created by the developers of [Deepin Linux][2]. Initially, Deepin Linux was based on [Ubuntu][3] but later they switched to [Debian][4].
|
||||
|
||||
![Deepin Desktop Environment in Ubuntu][5]
|
||||
|
||||
One major problem with Deepin Linux is its slow servers. A regular system takes hours to download for the fact that they have all their servers in China and these servers are unfortunately extremely slow.
|
||||
|
||||
If you want to use Deepin desktop, nothing stops you from installing it on your regular Ubuntu system. [UbuntuDDE][6] is trying to make it simpler by providing you an out of the box Deepin desktop experience on top of Ubuntu. This saves you time and effort in installing and configuring Deepin on Ubuntu.
|
||||
|
||||
![Screenshot of UbuntuDDE][7]
|
||||
|
||||
### Ubuntu DDE: Power of Ubuntu and beauty of Deepin desktop
|
||||
|
||||
Please note that UbuntuDDE is not an official flavor of Ubuntu. UbuntuDDE developers are not associated with the Ubuntu team. UbuntuDDE is currently a Remix distribution and is aiming for getting recognized as Ubuntu’s official flavor in future releases.
|
||||
|
||||
UbuntuDDE developers are helped by Alan Pope of Ubuntu’s Snapcraft team and teams of Ubuntu Budgie and [Ubuntu Cinnamon][8] and a few other developers.
|
||||
|
||||
In a conversation with It’s FOSS, its lead developer Arun highlighted that the important aspect of this project is to regularly maintain the DDE packages for Ubuntu and help users enjoy the full taste of DDE (Deepin Desktop Environment).
|
||||
|
||||
![Ubuntu Deepin Edition login screen][9]
|
||||
|
||||
Arun also mentioned that this Ubuntu Deepin remix project started first by maintaining and packaging the packages to the latest release from the upstream i.e. Deepin Repository. Then, it eventually got spin with Ubuntu 20.04 focal resulting in an image file that everyone can install without the hassle to install regular Ubuntu first and then the Deepin Desktop. UbuntuDDE is not just the combo of DDE and Ubuntu but also the fusion of selective packages and design changes by the UbuntuDDE Team.
|
||||
|
||||
![UbuntuDDE screenshot][10]
|
||||
|
||||
Unlike Deepin Linux, UbuntuDDE doesn’t use Deepin Appstore. It uses Ubuntu Software Center instead. This should be a good news if you are spooked by the [spyware labeling of Wuhan-based Deepin Linux][11].
|
||||
|
||||
### Download UbuntuDDE 20.04 Beta
|
||||
|
||||
UbuntuDDE is aiming to release its first official stable release with Ubuntu 20.04. Like [other Ubuntu flavors][12], UbuntuDDE 20.04 beta is also available for you to download and try.
|
||||
|
||||
Warning!
|
||||
|
||||
A word of warning. UbuntuDDE is a novice project under development. Please don’t use it on your main system. If you want to try it, use it in virtual machine or on a spare system.
|
||||
|
||||
[Download Ubuntu 20.04 DDE Beta][13]
|
||||
|
||||
![Installing UbuntuDDE][14]
|
||||
|
||||
Since it is essentially Ubuntu, installing UbuntuDDE is the same as installing Ubuntu. You may refer to this tutorial showing [how to install Ubuntu inside VirtualBox][15].
|
||||
|
||||
I know you may think ‘not another Ubuntu’ or ‘it’s just Deepin on Ubuntu that anyone can do’ and you do have a point. But I also know there is a small segment of users who like projects like UbuntuDDE that makes thing easier for them. I mean that’s how many Ubuntu flavor came into existence. What do you think?
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/ubuntudde/
|
||||
|
||||
作者:[Abhishek Prakash][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/abhishek/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.deepin.org/en/dde/
|
||||
[2]: https://www.deepin.org/en/
|
||||
[3]: https://ubuntu.com/
|
||||
[4]: https://www.debian.org/
|
||||
[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-deepin-edition-screenshot.jpg?ssl=1
|
||||
[6]: https://ubuntudde.com/
|
||||
[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-deepin-edition-screenshot-1.jpg?ssl=1
|
||||
[8]: https://itsfoss.com/ubuntu-cinnamon/
|
||||
[9]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-deepin-edition-screenshot-5.jpg?ssl=1
|
||||
[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-deepin-edition-screenshot-2.jpg?ssl=1
|
||||
[11]: https://www.deepin.org/en/2018/04/14/linux-deepin-is-not-spyware/
|
||||
[12]: https://itsfoss.com/which-ubuntu-install/
|
||||
[13]: https://ubuntudde.com/download/
|
||||
[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-deepin-edition-screenshot-4.jpg?ssl=1
|
||||
[15]: https://itsfoss.com/install-linux-in-virtualbox/
|
@ -1,5 +1,5 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: translator: (bingzxy)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
@ -7,6 +7,7 @@
|
||||
[#]: via: (https://opensource.com/article/20/4/linux-story)
|
||||
[#]: author: (James Farrell https://opensource.com/users/jamesf)
|
||||
|
||||
bingzxy is translating
|
||||
My Linux Story: From 8-bit enthusiast to Unix sysadmin
|
||||
======
|
||||
How my early interest in computers got me hooked on a career as a
|
||||
|
@ -1,111 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Here’s How to Find Out Which Desktop Environment You are Using)
|
||||
[#]: via: (https://itsfoss.com/find-desktop-environment/)
|
||||
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
||||
|
||||
Here’s How to Find Out Which Desktop Environment You are Using
|
||||
======
|
||||
|
||||
If you are a new Linux user and seeking help in one of the Linux forums, you may be asked this question:
|
||||
|
||||
_**“Which desktop environment are you using?”**_
|
||||
|
||||
You have an idea about what a desktop environment is but how do you know which one are you using? I’ll tell you how to find it out. I’ll show the command line method first because that is applicable to [all kind of Linux distributions][1]. I’ll also show the graphical way of getting this information.
|
||||
|
||||
### Check which desktop environment you are using
|
||||
|
||||
![][2]
|
||||
|
||||
You can [use the echo command in Linux][3] to display the value of XDG_CURRENT_DESKTOP variable in the terminal.
|
||||
|
||||
Open the terminal and copy paste this command:
|
||||
|
||||
```
|
||||
echo $XDG_CURRENT_DESKTOP
|
||||
```
|
||||
|
||||
For example, it shows that I am using [GNOME desktop][4] in [Ubuntu 20.04][5]:
|
||||
|
||||
```
|
||||
[email protected]:~$ echo $XDG_CURRENT_DESKTOP
|
||||
ubuntu:GNOME
|
||||
```
|
||||
|
||||
While this command quickly tells you which desktop environment is being used, it doesn’t give any other information.
|
||||
|
||||
Knowing the version of desktop environment (also called DE) could be important in some cases. Each new version of a software brings new features or removes some. [GNOME 3.36][6] introduces a ‘Do Not Disturb’ option to toggle off all the desktop notifications.
|
||||
|
||||
Suppose you read about this new Do Not Disturb feature. You verify that you are using GNOME and yet you don’t see this option in your GNOME desktop. If you could check the GNOME desktop version you have installed on your system, that could make things clear for you.
|
||||
|
||||
I’ll show you the commands to check the desktop environment’s version first because you can use it in any Linux, running desktop environment.
|
||||
|
||||
### How to get desktop environment version
|
||||
|
||||
Unlike getting the name of desktop environment. getting its version number is not straightforward because there is no standard command or environment variable that could give this information.
|
||||
|
||||
One way to get the desktop environment information in Linux is by using a tool like [Screenfetch][7]. This [command line tool displays the logo of your Linux distribution in ascii format][8] along with a few basic system information. Desktop environment version is one of them.
|
||||
|
||||
In Ubuntu based distributions, you can install Screenfetch by [enabling Universe repository][9] and then using this command:
|
||||
|
||||
```
|
||||
sudo apt install screenfetch
|
||||
```
|
||||
|
||||
For other Linux distributions, please use your system’s package manager to install this program.
|
||||
|
||||
Once installed, simply type screenfetch in the terminal and it should show the desktop environment version along with other system information.
|
||||
|
||||
![Check Desktop Environment Version][10]
|
||||
|
||||
As you can see in the above image, my system is using GNOME 3.36.1 (basically GNOME 3.36). You can also [check the Linux kernel version][11] and other details here.
|
||||
|
||||
Please keep in mind that it is not necessary that Screenfetch will display the desktop environment version. I checked its source code and it has lots of if-else code to get the version information from a number of sources and parameters in various desktop environments. If it can find nothing on version, it just displays the DE name.
|
||||
|
||||
### Using GUI to check desktop environment version
|
||||
|
||||
Almost all desktop environments provide basic system details in their Settings-About section.
|
||||
|
||||
The one major problem is that most DEs look different and thus I cannot show the exact steps for each of them. I am going to show it for GNOME and I let you discover it in your desktop.
|
||||
|
||||
So, search for Settings in the menu (press Windows key and search):
|
||||
|
||||
![Search for Settings application][12]
|
||||
|
||||
In here, go to the bottom to find the About section. Click on it and you should have the desktop environment along with its version.
|
||||
|
||||
![Check Desktop Environment in Ubuntu][13]
|
||||
|
||||
As you can see, it shows that my system is using GNOME 3.36.
|
||||
|
||||
I hope you find this quick beginner tip useful. If you have questions or suggestions, please leave a comment below.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/find-desktop-environment/
|
||||
|
||||
作者:[Abhishek Prakash][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/abhishek/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://itsfoss.com/what-is-linux/
|
||||
[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/check-desktop-environment.jpg?ssl=1
|
||||
[3]: https://linuxhandbook.com/echo-command/
|
||||
[4]: https://www.gnome.org/
|
||||
[5]: https://itsfoss.com/ubuntu-20-04-release-features/
|
||||
[6]: https://itsfoss.com/gnome-3-36-release/
|
||||
[7]: https://github.com/KittyKatt/screenFetch
|
||||
[8]: https://itsfoss.com/display-linux-logo-in-ascii/
|
||||
[9]: https://itsfoss.com/ubuntu-repositories/
|
||||
[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/check-desktop-environment-version.jpg?ssl=1
|
||||
[11]: https://itsfoss.com/find-which-kernel-version-is-running-in-ubuntu/
|
||||
[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/08/applications_menu_settings.jpg?ssl=1
|
||||
[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/check-desktop-environment-ubuntu.jpg?ssl=1
|
@ -1,136 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (wxy)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (How I'm using AI to translate 'wash your hands' in 500 languages)
|
||||
[#]: via: (https://opensource.com/article/20/4/ai-translation)
|
||||
[#]: author: (Daniel Whitenack https://opensource.com/users/datadan)
|
||||
|
||||
How I'm using AI to translate 'wash your hands' in 500 languages
|
||||
======
|
||||
By using both human and machine-generated translations, key health
|
||||
phrases can be translated into local languages spoken all over the
|
||||
world.
|
||||
![Two diverse hands holding a globe][1]
|
||||
|
||||
You might not know, but there are currently [7,117 languages spoken in the world][2]. Not dialects, but living languages! However, much of the world's digital media is available in only a couple dozen languages, and translation platforms like Google Translate only support around 100 languages. This reality means that there are billions of people around the world that are marginalized due to a lack of timely access to information. The current coronavirus (COVID-19) pandemic has made this painfully clear, and it has stressed the need for immediate, rapid translation of health-related phrases (like "wash your hands" or "keep your distance") into the long tail of languages.
|
||||
|
||||
To this end, I applied state-of-the-art AI techniques to construct something close to the phrase "wash your hands" in 544 languages and counting (my GPUs are still running). Multilingual Unsupervised and Supervised Embeddings (MUSE) methods are used to train cross-lingual word embeddings between each of 544 languages and English. These embeddings then allow for the extraction of a phrase similar to the target phrase from existing documents.
|
||||
|
||||
I performed this work in collaboration with my colleagues at SIL International, who have gathered even more human translations of the phrase. The combination of these human translations and some of my machine translations can be searched on [this Ethnologue guide page][3] (machine-generated phrases are indicated with a little robot icon), and more translations will be added as they are generated/gathered.
|
||||
|
||||
### Leveraging existing corpora
|
||||
|
||||
SIL International has done linguistic work in over 2000 languages and is currently managing over 1600 language projects. Thus, as I approached this particular problem, I knew that we had likely already translated the phrase "wash your hands" and/or similar phrases many times into hundreds of languages, and that guess paid off in spades. I was able to quickly gather documents (mostly completed shell book templates, educational materials, and Bibles) from our archives in over 900 languages. Each of these documents has an English parallel, which necessarily includes the phrase "wash your hands" and/or similar phrases like "wash your face." Moreover, each of these documents is very high quality and translated and checked in cooperation with the local language communities.
|
||||
|
||||
That is quite the multilingual data set. However, there are two problems to overcome. First, this data included thousands of samples for most languages, which is in contrast to the millions used to train machine translation models. Second, even if the documents include the phrase "wash your hands" in the target language, we don't know the exact location of the phrase within the surrounding text.
|
||||
|
||||
We could certainly exploit some of the latest tricks in [machine translation for low resource languages][4], but it would take some time to tune automated methods for rapidly adapting translation models in each language pair. Moreover, many of the languages we are targeting have no existing baseline with which we could compare evaluation metrics, e.g., [BLEU score][5]. Given the pressing concerns about the Coronavirus pandemic, we wanted to move a bit faster than that (although we plan to return to this problem in the future).
|
||||
|
||||
I opted to try and construct the phrase "wash your hands" by finding the phrase itself or components of the phrase (like "wash your" or "your hands") in existing documents. To find these, I trained cross-lingual embedding for each {English, Target Language} pair using [Multilingual Unsupervised and Supervised Embedding (MUSE)][6] from Facebook Research. MUSE takes monolingual word embeddings as input (I used [_fasttext_][7] to generate these) and learns a mapping from the English to the target embedding space using adversarial methods. The output of this process is cross-lingual word embeddings.
|
||||
|
||||
![Using fasttext along with MUSE to perform cross-language embedding][8]
|
||||
|
||||
Once the cross-lingual embeddings are generated, we can get to finding the phrase components in the target language documents. As it turns out, the phrase "wash your face" was most clearly used throughout the documents along with instances of "hands," "wash your," etc. in isolation. For each of the languages, I search through n-grams in areas where I expected the phrase to appear (based on its usage in the English parallel). N-grams were vectorized using the cross-lingual embedding and compared with vectorized versions of the English phrases using various distance metrics. The n-grams that were "closest" to the English phrases in the embedding space were determined to be the target language matches.
|
||||
|
||||
Finally, component phrases matching their English counterparts were combined to generate the phrase "wash your hands" in the target language. This combination utilizes the cross-lingual embedding again to make sure that the components are combined in an appropriate manner. For example, if we matched the phrase "wash your feet" in the target language, the n-gram corresponding to "feet" must be replaced with the n-gram corresponding to "hands." Here's an example for Belize Kriol English:
|
||||
|
||||
![][9]
|
||||
|
||||
There were, of course, some assumptions that were made during this matching process, and it is entirely possible that this procedure does not produce grammatically correct predictions. For example, I assumed that in most languages, the word for "hands" and the word for "feet" are both one token long (with tokens being separated by spaces and punctuation). This is certainly not always the case. This could create a bad word salad something like "and wash the and hand you" or similar. Hopefully, we can overcome some of these limitations and extend the system in the future, but, for now, we chose to reinforce the idea with graphics.
|
||||
|
||||
We adapted the World Health Organization's hand washing instructions into a template PNG image. We then took our translated and generated phrases and rendered them into the hand washing image using a combination of Bash and Go scripts. In this way, the idea of proper hand washing is emphasized in both text and imagery (just in case our generated translations are awkward).
|
||||
|
||||
![][10]
|
||||
|
||||
### Results
|
||||
|
||||
Thus far, I've been able to train cross-lingual embeddings for 544 languages. I used the above-discussed method to try and construct "wash your hands" for all of these languages. Because I don't have aligned data for many of the language pairs, I used separate holdout documents also containing components of "wash your hands" to help validate the tokens in the constructed phrase. This gives us some confidence in the translations that we publicly release (at least that they contain information indicating washing and/or hands). In addition, I compared the method with language pairs that are also supported by Google Translate and/or have available human translations. Here's a sample of the translations with language stats from [the Ethnologue][11]:
|
||||
|
||||
#### Language: Italian [ita]
|
||||
|
||||
Location: Italy
|
||||
Population: 68,000,000
|
||||
Our system: "làvati la mani"
|
||||
Google Translate: "Lavati le mani"
|
||||
|
||||
#### Language: Bulgarian [bul]
|
||||
|
||||
Location: Bulgaria
|
||||
Population: 8,000,000
|
||||
Our system: "умий ръцете"
|
||||
Google Translate: "Измий си ръцете"
|
||||
|
||||
#### Language: Dutch [nld]
|
||||
|
||||
Location: Netherlands
|
||||
Population: 24,000,000
|
||||
Our system: "wast uw handen"
|
||||
Google Translate: "Was je handen"
|
||||
|
||||
#### Language: Pijin [pis]
|
||||
|
||||
Location: Solomon Islands
|
||||
Population: 550,000
|
||||
Our system: "wasim han"
|
||||
Google Translate: Not supported
|
||||
|
||||
#### Language: Tikar [tik]
|
||||
|
||||
Location: Cameroon
|
||||
Population: 110,000
|
||||
Our system: "ɓɔsi fyàʼ"
|
||||
Google Translate: Not supported
|
||||
|
||||
#### Language: Waffa [waj]
|
||||
|
||||
Location: Papua New Guinea
|
||||
Population: 1,300
|
||||
Our system: "yaakuuvaitana nnikiiyauvaa fini"
|
||||
Google Translate: Not supported
|
||||
|
||||
The constructed phrases are similar to reference translations or appear to be alternative ways of saying "wash your hands." For example, in Bulgarian, I predict "умий ръцете," and Google Translate predicts "Измий си ръцете." However, if I back-translate my prediction using Google Translate, I still get "wash your hands." There is some uncertainty where I can't compare to reference translations (e.g., Pijin [pis] from the Solomon Islands) or human-annotated spans, but I can still validate that the word for wash (wasim) and the word for hands (han) are used in other reference documents that are necessarily talking about washing, or hands, respectively. About 15% of the translations could be validated using this method, and I hope to validate more as I gather reference dictionaries.
|
||||
|
||||
Note, I used at most about 7,000 sentences in each language to get the above translations, even for high-resource languages like Italian. I also did not rely on aligned sentences between the language pairs. Despite this very data-scarce, unsupervised scenario, I was still able to obtain phrases similar to that of Google Translate for languages supported by both systems. This demonstrates the potential utility of this sort of "hybrid" approach (unsupervised alignment of word embeddings + rule-based matching) for translating short phrases into languages where very little data exists.
|
||||
|
||||
Note—I'm definitely not saying that this is a solution to the problem of information spread about Coronavirus and other health-related issues. There are still a lot of things to explore and formally evaluate here, and we are working on that. In many cases, this approach won't be able to help construct important informational material in hundreds of languages. However, I think that we should all be trying to develop creative solutions to problems related to the current crisis. Maybe this is one piece of a very large puzzle.
|
||||
|
||||
You can view the complete list of validated translations plus human translations on [this Ethnologue guide page][3]. In addition, a more thorough description and analysis of the system in paper form is forthcoming. We welcome feedback from the public on the translations to help fine-tune the system and, most of all, to make sure that health information gets out to marginalized language communities around the world.
|
||||
|
||||
### Create your own hand washing posters
|
||||
|
||||
We have open sourced [the code used to render complex scripts and generate the hand washing posters][12]. This methodology should be able to handle almost all languages and scripts. You can add your own translation of "wash your hands" to a poster to help spread the word or tailor the translations for your own local context. Be sure to share your generated posters on social media with the hashtag #WashYourHands.
|
||||
|
||||
### Develop your AI skills
|
||||
|
||||
There are so many exciting AI problems out there that can make a huge impact in the world. If you want to solve problems like the one above with AI or if you think your business might need to start leveraging AI for other things (supply chain optimization, recommendation, customer service automation, etc.), don't miss the [_AI Classroom_ training event this May][13]. _AI Classroom_ is an immersive, three-day virtual training event for anyone with at least some programming experience and foundational understanding of mathematics. The training provides a practical baseline for realistic AI development using Python and open source frameworks like TensorFlow and PyTorch. After completing the course, participants will have the confidence to start developing and deploying their own AI solutions.
|
||||
|
||||
_This article was republished with permission from <https://datadan.io/blog/wash-your-hands>_
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/4/ai-translation
|
||||
|
||||
作者:[Daniel Whitenack][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/datadan
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/world_hands_diversity.png?itok=zm4EDxgE (Two diverse hands holding a globe)
|
||||
[2]: https://www.ethnologue.com/guides/how-many-languages
|
||||
[3]: https://www.ethnologue.com/guides/health
|
||||
[4]: https://datadan.io/blog/resources-for-low-resource-machine-translation
|
||||
[5]: https://en.wikipedia.org/wiki/BLEU
|
||||
[6]: https://github.com/facebookresearch/MUSE
|
||||
[7]: https://fasttext.cc/
|
||||
[8]: https://opensource.com/sites/default/files/uploads/ai-language-translation-wash-your-hands-opensourcedotcom.gif (Using fasttext along with MUSE to perform cross-language embedding)
|
||||
[9]: https://opensource.com/sites/default/files/uploads/ai-language-translation-wash-your-hands-opensourcedotcom2.gif
|
||||
[10]: https://opensource.com/sites/default/files/uploads/ai-language-translation-wash-your-hands-opensourcedotcom3.gif
|
||||
[11]: https://www.ethnologue.com/
|
||||
[12]: https://github.com/sil-ai/wash-your-hands
|
||||
[13]: https://datadan.io/
|
@ -0,0 +1,254 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (9 open source CSS frameworks for frontend web development)
|
||||
[#]: via: (https://opensource.com/article/20/4/open-source-css-frameworks)
|
||||
[#]: author: (Bryant Son https://opensource.com/users/brson)
|
||||
|
||||
9 open source CSS frameworks for frontend web development
|
||||
======
|
||||
Explore open source CSS frameworks and find the right one for your
|
||||
project.
|
||||
![Digital creative of a browser on the internet][1]
|
||||
|
||||
When most people think about web development, HTML or JavaScript usually come to mind. They usually forget about the technology that has far more impact on the ability to enjoy a website: [cascading style sheets (CSS)][2]. CSS is both one of the most important and the most often forgotten parts of any webpage, even though it's one of the three cornerstone technologies of the World Wide Web, according to Wikipedia.
|
||||
|
||||
This article explores nine popular, powerful, and open source frameworks that make CSS development straightforward for building beautiful website frontends.
|
||||
|
||||
Name | What It Is | License
|
||||
---|---|---
|
||||
[Bootstrap][3] | The most popular CSS framework; by Twitter | MIT
|
||||
[PatternFly][4] | Open source framework; by Red Hat | MIT
|
||||
[Material Components for the web][5] | Open source framework; by Google | MIT
|
||||
[Pure][6] | Open source framework; by Yahoo | BSD
|
||||
[Foundation][7] | Frontend framework; by Zurb Foundation | MIT
|
||||
[Bulma][8] | Modern CSS framework based on Flexbox | MIT
|
||||
[Skeleton][9] | Lightweight CSS framework | MIT
|
||||
[Materialize][10] | CSS framework based on Material Design | MIT
|
||||
[Bootflat][11] | Open source Flat UI kit based on Bootstrap 3.3.0 | MIT
|
||||
|
||||
|
||||
|
||||
If you prefer to follow along as I explore this live, you can watch my video.
|
||||
|
||||
### Bootstrap
|
||||
|
||||
[Bootstrap][12] is easily the most popular CSS framework, and it is the one that started all frontend web design. Developed by Twitter, Bootstrap offers usability, functionality, and extensibility.
|
||||
|
||||
![Bootstrap homepage][13]
|
||||
|
||||
Bootstrap also offers plenty of [examples][14] to get you started.
|
||||
|
||||
![Bootstrap examples][15]
|
||||
|
||||
With Bootstrap, you can stitch together different components and layouts to create an interesting page design. It also offers plenty of detailed documentation.
|
||||
|
||||
![Bootstrap documentation][16]
|
||||
|
||||
Bootstrap's [GitHub][3] repository lists more than 19,000 commits and 1,100 contributors. It is based on the MIT License, so (as with all of the frameworks on this list) you can jump in and contribute as well.
|
||||
|
||||
![Bootstrap GitHub][17]
|
||||
|
||||
### PatternFly
|
||||
|
||||
[PatternFly][18] is an open source (under the MIT License) CSS framework by Red Hat. PatternFly takes a different approach than Bootstrap: While Bootstrap is meant for anyone interested in creating a beautiful website, PatternFly is primarily focused on enterprise application developers and provides components, such as bars, charts, and navigations, that are very appealing for creating powerful, metrics-driven dashboards. In fact, Red Hat uses this CSS framework for the design of its products, such as OpenShift.
|
||||
|
||||
![PatternFly homepage][19]
|
||||
|
||||
In addition to static HTML, PatternFly also supports the ReactJS framework, a popular JavaScript framework developed by Facebook.
|
||||
|
||||
![PatternFly ReactJS support][20]
|
||||
|
||||
PatternFly has many advanced components, such as bars, charts, [modals][21], and layouts, that are suitable for enterprise-level applications.
|
||||
|
||||
![PatternFly chart component][22]
|
||||
|
||||
PatternFly's [GitHub][4] page lists more than 1,050 commits and 44 contributors. PatternFly is getting a lot of attention, and you are more than welcome to contribute.
|
||||
|
||||
![PatternFly GitHub][23]
|
||||
|
||||
### Material Components for the web
|
||||
|
||||
With its highly successful Android platform, Google set its own standard design guidelines with a concept called [Material Design][24]. The Material Design standards are intended to be reflected across all Google products, and they are also available to the general public and open source under the MIT License.
|
||||
|
||||
![Material Design homepage][25]
|
||||
|
||||
Material Design has a number of [Components][26], "interactive building blocks for creating a user interface." These buttons, cards, backdrops, and more can be used to create any type of user interface for a website or mobile application.
|
||||
|
||||
![Material Components webpage][27]
|
||||
|
||||
The maintainers provide thorough documentation for different platforms.
|
||||
|
||||
![Material Design documentation][28]
|
||||
|
||||
There are also step-by-step tutorials with exercises for accomplishing different goals.
|
||||
|
||||
![Material Design tutorial][29]
|
||||
|
||||
The Material Components GitHub page hosts repos for different platforms, including [Material Components for the web (MDC Web)][5] for website development. MDC Web has more than 5,700 commits and 349 contributors.
|
||||
|
||||
![MDC Web GitHub][30]
|
||||
|
||||
### Pure
|
||||
|
||||
Bootstrap, Patternfly, and MDC Web are very powerful CSS frameworks, yet they can be quite heavy and complex. If you want a lightweight CSS framework that it is closer to coding CSS yourself yet helps you build a nice web page, try [Pure.css][31]. Pure is a lightweight CSS framework with a minimal footprint. It was developed by Yahoo and is open source under the BSD License.
|
||||
|
||||
![Pure.css homepage][32]
|
||||
|
||||
Despite its small size, Pure offers plenty of the components necessary to build a good-looking webpage.
|
||||
|
||||
![Pure.css components][33]
|
||||
|
||||
Pure's [GitHub][6] page shows more than 565 commits and 59 contributors.
|
||||
|
||||
![Pure.css GitHub][34]
|
||||
|
||||
### Foundation
|
||||
|
||||
[Foundation][35] claims to be the most advanced responsive frontend framework in the world. It provides advanced features and tutorials for building professional websites.
|
||||
|
||||
![Foundation homepage][36]
|
||||
|
||||
The framework is [used][37] by many companies, organizations, and even politicians, and it has plenty of documentation available.
|
||||
|
||||
![Foundation documentation][38]
|
||||
|
||||
Foundation's [GitHub][7] page shows nearly 17,000 commits and 1,000 contributors. Like most of the other frameworks on this list, it's available under the MIT License.
|
||||
|
||||
![Foundation GitHub][39]
|
||||
|
||||
### Bulma
|
||||
|
||||
[Bulma][40] is an open source framework based on Flexbox and available under the MIT License. Bulma is a pretty lightweight framework, as it requires only one CSS file.
|
||||
|
||||
![Bulma homepage][41]
|
||||
|
||||
Bulma has clean and simple docs that make it easy to choose the topics you want to explore. It also has a number of web components you can just pick up and use in your design.
|
||||
|
||||
![Bulma documentation][42]
|
||||
|
||||
Bulma's [GitHub][8] page lists more than 1,400 commits and 300 contributors.
|
||||
|
||||
![Bulma GitHub][43]
|
||||
|
||||
### Skeleton
|
||||
|
||||
If even Pure is too heavy for you, there is an even lighter-weight framework called [Skeleton][44]. The Skeleton library is only about 400 lines long, and the framework provides only the essential components to start your CSS framework journey.
|
||||
|
||||
![Skeleton homepage][45]
|
||||
|
||||
Despite its simplicity, Skeleton offers detailed docs to help you get started right away.
|
||||
|
||||
![Skeleton documentation][46]
|
||||
|
||||
Skeleton's [GitHub][9] lists 167 commits and 22 contributors. However, it's not the most active project; its last update was in 2014, so it may need some maintenance before using it. Since it is released under the MIT License, feel free to do that yourself.
|
||||
|
||||
![Skeleton GitHub][47]
|
||||
|
||||
### Materialize
|
||||
|
||||
[Materialize][48] is a responsive frontend framework based on Google's Material Design with additional themes and components developed by Materialize's contributors.
|
||||
|
||||
![Materialize homepage][49]
|
||||
|
||||
Materialize's documentation page is comprehensive and pretty easy to follow. Its components page includes buttons, cards, navigations, and more.
|
||||
|
||||
![Materialize documentation][50]
|
||||
|
||||
Materialize is an open source project under the MIT License, and its [GitHub][10] lists more than 3,800 commits and 250 contributors.
|
||||
|
||||
![Materialize GitHub][51]
|
||||
|
||||
### Bootflat
|
||||
|
||||
[Bootflat][52] is an open source CSS framework derived from Twitter's Bootstrap. Compared to Bootstrap, Bootflat is simpler, with lighter-weight framework components.
|
||||
|
||||
![Bootflat homepage][53]
|
||||
|
||||
Bootflat's [documentation][54] almost seems inspired by IKEA—it shows an image of each component without much text.
|
||||
|
||||
![Bootflat docs][55]
|
||||
|
||||
Bootflat is available under the MIT License, and its [GitHub][11] page includes 159 commits and eight contributors, as of this writing.
|
||||
|
||||
![Bootflat GitHub][56]
|
||||
|
||||
### Which CSS framework should you choose?
|
||||
|
||||
You have many options for open source CSS frameworks, depending on how feature-rich or simple you want the tooling to be. Like all technology decisions, there is no single right answer for everything or everyone; there is only the right choice for the given time and the given project.
|
||||
|
||||
Give a few of these a spin and see which one you want to use in your next project. Also, did I miss any interesting open source CSS frameworks? Please share your feedback and ideas in the comments below.
|
||||
|
||||
Which frontend framework should you pick for your next web app? Pam Selle will address this...
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/4/open-source-css-frameworks
|
||||
|
||||
作者:[Bryant Son][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/brson
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_web_internet_website.png?itok=g5B_Bw62 (Digital creative of a browser on the internet)
|
||||
[2]: https://en.wikipedia.org/wiki/Cascading_Style_Sheets
|
||||
[3]: https://github.com/twbs/bootstrap
|
||||
[4]: https://github.com/patternfly/patternfly
|
||||
[5]: https://github.com/material-components/material-components-web
|
||||
[6]: https://github.com/pure-css/pure
|
||||
[7]: https://github.com/foundation/foundation-sites
|
||||
[8]: https://github.com/jgthms/bulma
|
||||
[9]: https://github.com/dhg/Skeleton
|
||||
[10]: https://github.com/Dogfalo/materialize
|
||||
[11]: https://github.com/bootflat/bootflat.github.io
|
||||
[12]: https://getbootstrap.com
|
||||
[13]: https://opensource.com/sites/default/files/uploads/2_bootstrapscreenshot.jpg (Bootstrap homepage)
|
||||
[14]: https://getbootstrap.com/docs/4.4/examples/
|
||||
[15]: https://opensource.com/sites/default/files/uploads/3_bootstrapsamples.jpg (Bootstrap examples)
|
||||
[16]: https://opensource.com/sites/default/files/uploads/4_bootstrapdocs.jpg (Bootstrap documentation)
|
||||
[17]: https://opensource.com/sites/default/files/uploads/5_bootstrapgithub.jpg (Bootstrap GitHub)
|
||||
[18]: https://www.patternfly.org
|
||||
[19]: https://opensource.com/sites/default/files/uploads/6_patternflyhomepage.jpg (PatternFly homepage)
|
||||
[20]: https://opensource.com/sites/default/files/uploads/7_patternflyreactjs.jpg (PatternFly ReactJS support)
|
||||
[21]: https://en.wikipedia.org/wiki/Modal_window
|
||||
[22]: https://opensource.com/sites/default/files/uploads/8_patternflycomponents.jpg (PatternFly chart component)
|
||||
[23]: https://opensource.com/sites/default/files/uploads/9_patternflygithub.jpg (PatternFly GitHub)
|
||||
[24]: https://material.io
|
||||
[25]: https://opensource.com/sites/default/files/uploads/10_materialhome.jpg (Material Design homepage)
|
||||
[26]: https://material.io/components/
|
||||
[27]: https://opensource.com/sites/default/files/uploads/11_materialcomponents.jpg (Material Components webpage)
|
||||
[28]: https://opensource.com/sites/default/files/uploads/12_materialdocs.jpg (Material Design documentation)
|
||||
[29]: https://opensource.com/sites/default/files/uploads/13_materialtutorial.jpg (Material Design tutorial)
|
||||
[30]: https://opensource.com/sites/default/files/uploads/15_materialgithub.jpg (MDC Web GitHub)
|
||||
[31]: https://purecss.io
|
||||
[32]: https://opensource.com/sites/default/files/uploads/16_purehome.jpg (Pure.css homepage)
|
||||
[33]: https://opensource.com/sites/default/files/uploads/17_purecomponents.jpg (Pure.css components)
|
||||
[34]: https://opensource.com/sites/default/files/uploads/18_puregithub.jpg (Pure.css GitHub)
|
||||
[35]: https://get.foundation
|
||||
[36]: https://opensource.com/sites/default/files/uploads/19_foundationhome.jpg (Foundation homepage)
|
||||
[37]: https://zurb.com/responsive
|
||||
[38]: https://opensource.com/sites/default/files/uploads/21_foundationdocs.jpg (Foundation documentation)
|
||||
[39]: https://opensource.com/sites/default/files/uploads/22_foundationgithub.jpg (Foundation GitHub)
|
||||
[40]: https://bulma.io
|
||||
[41]: https://opensource.com/sites/default/files/uploads/23_bulmahome.jpg (Bulma homepage)
|
||||
[42]: https://opensource.com/sites/default/files/uploads/24_bulmadoc.jpg (Bulma documentation)
|
||||
[43]: https://opensource.com/sites/default/files/uploads/25_bulmagithub.jpg (Bulma GitHub)
|
||||
[44]: http://getskeleton.com
|
||||
[45]: https://opensource.com/sites/default/files/uploads/26_skeletonhome.jpg (Skeleton homepage)
|
||||
[46]: https://opensource.com/sites/default/files/uploads/27_skeletondocs.jpg (Skeleton documentation)
|
||||
[47]: https://opensource.com/sites/default/files/uploads/28_skeletongithub.jpg (Skeleton GitHub)
|
||||
[48]: https://materializecss.com
|
||||
[49]: https://opensource.com/sites/default/files/uploads/29_materializehome.jpg (Materialize homepage)
|
||||
[50]: https://opensource.com/sites/default/files/uploads/30_materializedocs.jpg (Materialize documentation)
|
||||
[51]: https://opensource.com/sites/default/files/uploads/31_materializegithub.jpg (Materialize GitHub)
|
||||
[52]: http://bootflat.github.io
|
||||
[53]: https://opensource.com/sites/default/files/uploads/32_bootflathome.jpg (Bootflat homepage)
|
||||
[54]: http://bootflat.github.io/documentation.html
|
||||
[55]: https://opensource.com/sites/default/files/uploads/33_bootflatdocs.jpg (Bootflat docs)
|
||||
[56]: https://opensource.com/sites/default/files/uploads/34_bootflatgithub.jpg (Bootflat GitHub)
|
@ -0,0 +1,75 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (A handy utility for creating Raspberry Pi SD card images)
|
||||
[#]: via: (https://opensource.com/article/20/4/raspberry-pi-imager-mac)
|
||||
[#]: author: (James Farrell https://opensource.com/users/jamesf)
|
||||
|
||||
A handy utility for creating Raspberry Pi SD card images
|
||||
======
|
||||
Getting started with Raspberry Pi Imager on a Mac.
|
||||
![Raspberries with pi symbol overlay][1]
|
||||
|
||||
There are many ways to buy a Raspberry Pi, and depending on who you buy it from, it may or may not come with an operating system already installed on it. Getting an OS onto a Raspberry Pi is a matter of "flashing" an SD card with an OS image. To make this as easy as possible, the [Raspberry Pi Foundation][2] has introduced a Raspberry Pi Imager application, and you can download it for all major platforms. Here's a quick intro to this helpful new utility.
|
||||
|
||||
### Install the Imager
|
||||
|
||||
You can find the Raspberry Pi Imager over at the usual [Raspberry Pi Downloads][3] page. Versions exist for Mac, Ubuntu, and Windows. I will download and demonstrate the Mac version.
|
||||
|
||||
Installation on Mac consists of the usual DMG image that mounts to your desktop, and then a typical installer window appears:
|
||||
|
||||
![Raspberry Pi Imager installer][4]
|
||||
|
||||
Simply drag the cute raspberry icon to the Application folder, and you are done. Invoke that from Launchpad, and you are presented with a series of simple buttons and menus to choose from. It really cannot be simpler than this:
|
||||
|
||||
![Raspberry Pi Imager home screen][5]
|
||||
|
||||
### Images and options available
|
||||
|
||||
The default options contain a variety of images for various Raspberry Pi models. Raspbian is the top choice with two available options for smaller "Lite" and fatter "Full" versions available. The LibreELEC Kodi entertainment system is available in various model-specific builds. Ubuntu 18 and 19 have 32-bit and 64-bit builds available for different Pi models. There is an RPi 4 EEPROM recovery utility and a function to format your card using FAT32. Finally, a generic image installer option is available that I will try out a little later. Pretty handy for a simple and compact utility.
|
||||
|
||||
### Install some images
|
||||
|
||||
I had a 16g micro SD card that I decided to play with. I selected the default Raspbian image, chose my attached USB/SD device, and pressed WRITE. Here is a brief demo:
|
||||
|
||||
![Raspberry Pi Imager demo][6]
|
||||
|
||||
I didn't post the entire sequence there. I believe it downloaded the image as it was writing and took a few minutes on my wireless connection to finish. The process goes through a write and then a verify cycle before it is finished. When it was done, I ejected the device, popped the card into my RPi 3, and was treated to the usual graphical Raspbian setup wizard and desktop environment.
|
||||
|
||||
That wasn't quite enough for me; I get plenty of Linux on a daily basis and was looking for a little more today. I went back to the [Raspberry Pi Downloads][3] page and pulled down the RISC OS image. This process was nearly as easy. Download the RISCOSPi.5.24.zip file, extract it, and find the ro524-1875M.img file. From the Operating System button, I selected the Use Custom option and selected the desired image file. The process was pretty much the same; the only real difference being I had to hunt around my Downloads directory and select an image. Once the file was finished writing, back into the Pi 3, and RISC OS was ready to go.
|
||||
|
||||
### Gripes on USB C
|
||||
|
||||
This is just a silly aside, but how many of you are a bit frustrated with the total inconvenience of USB C these days? I'm using a MacBook Pro, which only has USB C ports, and I am subject to a never-ending swap of adapters to get things done. Take a look at this:
|
||||
|
||||
![USB C adapter][7]
|
||||
|
||||
Yes, that is a USB C to USB A adapter, then a USB to SD card reader, and an SD to micro SD adapter inside. I probably could have found something online to simplify this, but these are the parts I had on hand to support my family's myriad Mac, Windows, and Linux hosts. Enough about that, but I hope you got a chuckle from that insanity.
|
||||
|
||||
### Summary
|
||||
|
||||
The new Raspberry Pi Imager is a simple and effective tool for getting off the ground quickly with Raspberry Pi images. [BalenaEtcher][8] is a similar tool for imaging your removable devices, but this new Raspberry Pi Imager makes the process of common RPi OS installations (like Raspbian) a bit easier by eliminating the steps to fetch those common images.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/4/raspberry-pi-imager-mac
|
||||
|
||||
作者:[James Farrell][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/jamesf
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/life-raspberrypi_0.png?itok=Kczz87J2 (Raspberries with pi symbol overlay)
|
||||
[2]: https://www.raspberrypi.org/
|
||||
[3]: https://www.raspberrypi.org/downloads/
|
||||
[4]: https://opensource.com/sites/default/files/uploads/install_1.png (Raspberry Pi Imager installer)
|
||||
[5]: https://opensource.com/sites/default/files/uploads/screen_2_0.png (Raspberry Pi Imager home screen)
|
||||
[6]: https://opensource.com/sites/default/files/uploads/demo_3.gif (Raspberry Pi Imager demo)
|
||||
[7]: https://opensource.com/sites/default/files/uploads/adapter_4.png (USB C adapter)
|
||||
[8]: https://www.balena.io/etcher/
|
@ -1,5 +1,5 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
159
sources/tech/20200413 How to install Python on Linux.md
Normal file
159
sources/tech/20200413 How to install Python on Linux.md
Normal file
@ -0,0 +1,159 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (How to install Python on Linux)
|
||||
[#]: via: (https://opensource.com/article/20/4/install-python-linux)
|
||||
[#]: author: (Vijay Singh Khatri https://opensource.com/users/vijaytechnicalauthor)
|
||||
|
||||
How to install Python on Linux
|
||||
======
|
||||
Step-by-step instructions for installing the latest Python instead of
|
||||
(or alongside) an older version on Linux.
|
||||
![OpenStack source code \(Python\) in VIM][1]
|
||||
|
||||
[Python][2] is now the [most popular][3], most used programming language. Python's simple syntax and low learning curve make it the ultimate choice for beginners as well as professional developers. Python is also a very versatile programming language. It's used nearly everywhere—from web development to artificial intelligence—really anywhere other than mobile development.
|
||||
|
||||
If you're using Python, there's a good chance you're a developer (or want to become one), and Linux is a great platform for creating software. But when you're working with Python every day, you sometimes want to stay up to date with the very latest version. You may not want to replace the default install of Python on your system just to test drive the latest one, so this article explains how to install the latest version of Python 3 on Linux without replacing the version provided by your distribution.
|
||||
|
||||
Use the **python --version terminal** command to check whether Python is already installed and, if so, which version you have. If Python is not installed on your Linux system, or you want to install an updated version, follow the steps below.
|
||||
|
||||
### Step-by-step installation instructions
|
||||
|
||||
#### **Step 1:** First, install development packages required to build Python.
|
||||
|
||||
#### On Debian:
|
||||
|
||||
|
||||
```
|
||||
$ sudo apt update
|
||||
$ sudo apt install build-essential zlib1g-dev \
|
||||
libncurses5-dev libgdbm-dev libnss3-dev \
|
||||
libssl-dev libreadline-dev libffi-dev curl
|
||||
```
|
||||
|
||||
#### On Fedora:
|
||||
|
||||
|
||||
```
|
||||
`$ sudo dnf groupinstall development`
|
||||
```
|
||||
|
||||
#### Step 2: Download the stable latest release of Python 3
|
||||
|
||||
Visit the [official Python website][4] and download the latest version of Python 3. After the download is complete, you hav a **.tar.xz** archive file (a "tarball") containing the source code of Python.
|
||||
|
||||
#### Step 3: Extract the tarball
|
||||
|
||||
Once the download is complete, extract the tarball by either using the extractor application of your choice or the [Linux **tar** command][5], for example:
|
||||
|
||||
|
||||
```
|
||||
`$ tar -xf Python-3.?.?.tar.xz`
|
||||
```
|
||||
|
||||
#### Step 4: Configure the script
|
||||
|
||||
Once the Python tarball has been extracted, navigate to the configure script and execute it in your Linux terminal with:
|
||||
|
||||
|
||||
```
|
||||
$ cd Python-3.*
|
||||
./configure
|
||||
```
|
||||
|
||||
The configuration may take some time. Wait until it is successfully finishes before proceeding.
|
||||
|
||||
#### Step 5: Start the build process
|
||||
|
||||
If you already have a version of Python installed on your system and you want to install the new version alongside it, use this command:
|
||||
|
||||
|
||||
```
|
||||
`$ sudo make altinstall`
|
||||
```
|
||||
|
||||
The build process may take some time.
|
||||
|
||||
If you want to replace your current version of Python with this new version, you should uninstall your current Python package using your package manager (such as **apt** or **dnf**) and then install:
|
||||
|
||||
|
||||
```
|
||||
`$ sudo make install`
|
||||
```
|
||||
|
||||
However, it's generally preferable to install software as a package (such as a **.deb** or **.rpm** file) so your system can track and update it for you. Because this article assumes the latest Python isn't yet packaged yet, though, you probably don't have that option. In that case, you can either install Python with **altinstall** as suggested, or rebuild an existing Python package using the latest source code. That's an advanced topic and specific to your distribution, so it's out of scope for this article.
|
||||
|
||||
#### Step 6: Verify the installation
|
||||
|
||||
If you haven't encountered any errors, the latest Python is now installed on your Linux system. To verify it, write one of these commands in your terminal:
|
||||
|
||||
|
||||
```
|
||||
`python3 --version`
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
|
||||
```
|
||||
`python --version`
|
||||
```
|
||||
|
||||
If the output says **Python 3.x**, Python 3 has been successfully installed.
|
||||
|
||||
### Create a virtual environment (optional)
|
||||
|
||||
Python provides a package known as **venv** (virtual environment), which helps you isolate a program directory or package from other ones.
|
||||
|
||||
To create a virtual environment, enter the following in the Python terminal (in this example, assume the version of Python you've installed is in the **3.8** series):
|
||||
|
||||
|
||||
```
|
||||
`python3.8 -m venv example`
|
||||
```
|
||||
|
||||
This command creates a new directory (which I've named **example**), with some subdirectories.
|
||||
|
||||
To activate the virtual environment, enter:
|
||||
|
||||
|
||||
```
|
||||
$ source example/bin/activate
|
||||
(example) $
|
||||
```
|
||||
|
||||
Notice that your terminal prompt (**$**) is now preceeded by an environment name.
|
||||
|
||||
To deactivate the virtual environment, use the **deactivate** command:
|
||||
|
||||
|
||||
```
|
||||
`(example) $ deactivate`
|
||||
```
|
||||
|
||||
### Conclusion
|
||||
|
||||
Python is a fun language that's developed and improved frequently. Getting familiar with new features is easy, once you understand how to install the latest release without interfering with the stable version provided from your distribution.
|
||||
|
||||
If you have any feedback or questions, please leave them in the comments.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/4/install-python-linux
|
||||
|
||||
作者:[Vijay Singh Khatri][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/vijaytechnicalauthor
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/openstack_python_vim_1.jpg?itok=lHQK5zpm (OpenStack source code (Python) in VIM)
|
||||
[2]: https://www.python.org/
|
||||
[3]: http://pypl.github.io/PYPL.html
|
||||
[4]: http://python.org
|
||||
[5]: https://opensource.com/article/17/7/how-unzip-targz-file
|
166
sources/tech/20200414 How I containerize a build system.md
Normal file
166
sources/tech/20200414 How I containerize a build system.md
Normal file
@ -0,0 +1,166 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (How I containerize a build system)
|
||||
[#]: via: (https://opensource.com/article/20/4/how-containerize-build-system)
|
||||
[#]: author: (Ravi Chandran https://opensource.com/users/ravichandran)
|
||||
|
||||
How I containerize a build system
|
||||
======
|
||||
Building a repeatable structure to deliver applications as containers
|
||||
can be complicated. Here is one way to do it effectively.
|
||||
![Containers on a ship on the ocean][1]
|
||||
|
||||
A build system is comprised of the tools and processes used to transition from source code to a running application. This transition also involves changing the code's audience from the software developer to the end user, whether the end user is a colleague in operations or a deployment system.
|
||||
|
||||
After creating a few build systems using containers, I think I have a decent, repeatable approach that's worth sharing. These build systems were used for generating loadable software images for embedded hardware and compiling machine learning algorithms, but the approach is abstract enough to be used in any container-based build system.
|
||||
|
||||
This approach is about creating or organizing the build system in a way that makes it easy to use and maintain. It's not about the tricks needed to deal with containerizing any particular software compilers or tools. It applies to the common use case of software developers building software to hand off a maintainable image to other technical users (whether they are sysadmins, DevOps engineers, or some other title). The build system is abstracted away from the end users so that they can focus on the software.
|
||||
|
||||
### Why containerize a build system?
|
||||
|
||||
Creating a repeatable, container-based build system can provide a number of benefits to a software team:
|
||||
|
||||
* **Focus:** I want to focus on writing my application. When I call a tool to "build," I want the toolset to deliver a ready-to-use binary. I don't want to spend time troubleshooting the build system. In fact, I'd rather not know or care about the build system.
|
||||
* **Identical build behavior:** Whatever the use case, I want to ensure that the entire team uses the same versions of the toolset and gets the same results when building. Otherwise, I am constantly dealing with the case of "it works on my PC but not yours." Using the same toolset version and getting identical output for a given input source file set is critical in a team project.
|
||||
* **Easy setup and future migration:** Even if a detailed set of instructions is given to everyone to install a toolset for a project, chances are someone will get it wrong. Or there could be issues due to how each person has customized their Linux environment. This can be further compounded by the use of different Linux distributions across the team (or other operating systems). The issues can get uglier quickly when it comes time for moving to the next version of the toolset. Using containers and the guidelines in this article will make migration to newer versions much easier.
|
||||
|
||||
|
||||
|
||||
Containerizing the build systems that I use on my projects has certainly been valuable in my experience, as it has alleviated the problems above. I tend to use Docker for my container tooling, but there can still be issues due to the installation and network configuration being unique environment to environment, especially if you work in a corporate environment involving some complex proxy settings. But at least now I have fewer build system problems to deal with.
|
||||
|
||||
### Walking through a containerized build system
|
||||
|
||||
I created a [tutorial repository][2] you can clone and examine at a later time or follow along through this article. I'll be walking through all the files in the repository. The build system is deliberately trivial (it runs **gcc**) to keep the focus on the build system architecture.
|
||||
|
||||
### Build system requirements
|
||||
|
||||
Two key aspects that I think are desirable in a build system are:
|
||||
|
||||
* **Standard build invocation:** I want to be able to build code by pointing to some work directory whose path is **/path/to/workdir**. I want to invoke the build as: [code]`./build.sh /path/to/workdir`[/code] To keep the example architecture simple (for the sake of explanation), I'll assume that the output is also generated somewhere within **/path/to/workdir**. (Otherwise, it would increase the number of volumes exposed to the container, which is not difficult, but more cumbersome to explain.)
|
||||
* **Custom build invocation via shell:** Sometimes, the toolset needs to be used in unforeseen ways. In addition to the standard **build.sh** to invoke the toolset, some of these could be added as options to **build.sh**, if needed. But I always want to be able to get to a shell where I can invoke toolset commands directly. In this trivial example, say I sometimes want to try out different **gcc** optimization options to see the effects. To achieve this, I want to invoke: [code]`./shell.sh /path/to/workdir`[/code] This should get me to a Bash shell inside the container with access to the toolset and to my **workdir**, so I can experiment as I please with the toolset.
|
||||
|
||||
|
||||
|
||||
### Build system architecture
|
||||
|
||||
To comply with the basic requirements above, here is how I architect the build system:
|
||||
|
||||
![Container build system architecture][3]
|
||||
|
||||
At the bottom, the **workdir** represents any software source code that needs to be built by the software developer end users. Typically, this **workdir** will be a source-code repository. The end users can manipulate this source code repository in any way they want before invoking a build. For example, if they're using **git** for version control, they could **git checkout** the feature branch they are working on and add or modify files. This keeps the build system independent of the **workdir**.
|
||||
|
||||
The three blocks at the top collectively represent the containerized build system. The left-most (yellow) block at the top represents the scripts (**build.sh** and **shell.sh**) that the end user will use to interact with the build system.
|
||||
|
||||
In the middle (the red block) is the Dockerfile and the associated script **build_docker_image.sh**. The development operations people (me, in this case) will typically execute this script and generate the container image. (In fact, I'll execute this many, many times until I get everything working right, but that's another story.) And then I would distribute the image to the end users, such as through a container trusted registry. The end users will need this image. In addition, they will clone the build system repository (i.e., one that is equivalent to the [tutorial repository][2]).
|
||||
|
||||
The **run_build.sh** script on the right is executed inside the container when the end user invokes either **build.sh** or **shell.sh**. I'll explain these scripts in detail next. The key here is that the end user does not need to know anything about the red or blue blocks or how a container works in order to use any of this.
|
||||
|
||||
### Build system details
|
||||
|
||||
The tutorial repository's file structure maps to this architecture. I've used this prototype structure for relatively complex build systems, so its simplicity is not a limitation in any way. Below, I've listed the tree structure of the relevant files from the repository. The **dockerize-tutorial** folder could be replaced with any other name corresponding to a build system. From within this folder, I invoke either **build.sh** or **shell.sh** with the one argument that is the path to the **workdir**.
|
||||
|
||||
|
||||
```
|
||||
dockerize-tutorial/
|
||||
├── build.sh
|
||||
├── shell.sh
|
||||
└── swbuilder
|
||||
├── build_docker_image.sh
|
||||
├── install_swbuilder.dockerfile
|
||||
└── scripts
|
||||
└── run_build.sh
|
||||
```
|
||||
|
||||
Note that I've deliberately excluded the **example_workdir** above, which you'll find in the tutorial repository. Actual source code would typically reside in a separate repository and not be part of the build tool repository; I included it in this repository, so I didn't have to deal with two repositories in the tutorial.
|
||||
|
||||
Doing the tutorial is not necessary if you're only interested in the concepts, as I'll explain all the files. But if you want to follow along (and have Docker installed), first build the container image **swbuilder:v1** with:
|
||||
|
||||
|
||||
```
|
||||
cd dockerize-tutorial/swbuilder/
|
||||
./build_docker_image.sh
|
||||
docker image ls # resulting image will be swbuilder:v1
|
||||
```
|
||||
|
||||
Then invoke **build.sh** as:
|
||||
|
||||
|
||||
```
|
||||
cd dockerize-tutorial
|
||||
./build.sh ~/repos/dockerize-tutorial/example_workdir
|
||||
```
|
||||
|
||||
The code for [build.sh][4] is below. This script instantiates a container from the container image **swbuilder:v1**. It performs two volume mappings: one from the **example_workdir** folder to a volume inside the container at path **/workdir**, and the second from **dockerize-tutorial/swbuilder/scripts** outside the container to **/scripts** inside the container.
|
||||
|
||||
|
||||
```
|
||||
docker container run \
|
||||
--volume $(pwd)/swbuilder/scripts:/scripts \
|
||||
--volume $1:/workdir \
|
||||
--user $(id -u ${USER}):$(id -g ${USER}) \
|
||||
--rm -it --name build_swbuilder swbuilder:v1 \
|
||||
build
|
||||
```
|
||||
|
||||
In addition, the **build.sh** also invokes the container to run with your username (and group, which the tutorial assumes to be the same) so that you will not have issues with file permissions when accessing the generated build output.
|
||||
|
||||
Note that [**shell.sh**][5] is identical except for two things: **build.sh** creates a container named **build_swbuilder** while **shell.sh** creates one named **shell_swbuilder**. This is so that there are no conflicts if either script is invoked while the other one is running.
|
||||
|
||||
The other key difference between the two scripts is the last argument: **build.sh** passes in the argument **build** while **shell.sh** passes in the argument **shell**. If you look at the [Dockerfile][6] that is used to create the container image, the last line contains the following **ENTRYPOINT**. This means that the **docker container run** invocation above will result in executing the **run_build.sh** script with either **build** or **shell** as the sole input argument.
|
||||
|
||||
|
||||
```
|
||||
# run bash script and process the input command
|
||||
ENTRYPOINT [ "/bin/bash", "/scripts/run_build.sh"]
|
||||
```
|
||||
|
||||
[**run_build.sh**][7] uses this input argument to either start the Bash shell or invoke **gcc** to perform the build of the trivial **helloworld.c** project. A real build system would typically invoke a Makefile and not run **gcc** directly.
|
||||
|
||||
|
||||
```
|
||||
cd /workdir
|
||||
|
||||
if [ $1 = "shell" ]; then
|
||||
echo "Starting Bash Shell"
|
||||
/bin/bash
|
||||
elif [ $1 = "build" ]; then
|
||||
echo "Performing SW Build"
|
||||
gcc helloworld.c -o helloworld -Wall
|
||||
fi
|
||||
```
|
||||
|
||||
You could certainly pass more than one argument if your use case demands it. For the build systems I've dealt with, the build is usually for a given project with a specific **make** invocation. In the case of a build system where the build invocation is complex, you can have **run_build.sh** call a specific script inside **workdir** that the end user has to write.
|
||||
|
||||
### A note about the scripts folder
|
||||
|
||||
You may be wondering why the **scripts** folder is located deep in the tree structure rather than at the top level of the repository. Either approach would work, but I didn't want to encourage the end user to poke around and change things there. Placing it deeper is a way to make it more difficult to poke around. Also, I could have added a **.dockerignore** file to ignore the **scripts** folder, as it doesn't need to be part of the container context. But since it's tiny, I didn't bother.
|
||||
|
||||
### Simple yet flexible
|
||||
|
||||
While the approach is simple, I've used it for a few rather different build systems and found it to be quite flexible. The aspects that are going to be relatively stable (e.g., a given toolset that changes only a few times a year) are fixed inside the container image. The aspects that are more fluid are kept outside the container image as scripts. This allows me to easily modify how the toolset is invoked by updating the script and pushing the changes to the build system repository. All the user needs to do is to pull the changes to their local build system repository, which is typically quite fast (unlike updating a Docker image). The structure lends itself to having as many volumes and scripts as are needed while abstracting the complexity away from the end user.
|
||||
|
||||
How will you need to modify your application to optimize it for a containerized environment?
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/4/how-containerize-build-system
|
||||
|
||||
作者:[Ravi Chandran][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/ravichandran
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/containers_2015-3-osdc-lead.png?itok=O6aivM_W (Containers on a ship on the ocean)
|
||||
[2]: https://github.com/ravi-chandran/dockerize-tutorial
|
||||
[3]: https://opensource.com/sites/default/files/uploads/build_sys_arch.jpg (Container build system architecture)
|
||||
[4]: https://github.com/ravi-chandran/dockerize-tutorial/blob/master/build.sh
|
||||
[5]: https://github.com/ravi-chandran/dockerize-tutorial/blob/master/shell.sh
|
||||
[6]: https://github.com/ravi-chandran/dockerize-tutorial/blob/master/swbuilder/install_swbuilder.dockerfile
|
||||
[7]: https://github.com/ravi-chandran/dockerize-tutorial/blob/master/swbuilder/scripts/run_build.sh
|
@ -0,0 +1,139 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (How young people can help fight COVID-19 with code)
|
||||
[#]: via: (https://opensource.com/article/20/4/covid19-hackathon)
|
||||
[#]: author: (Melissa Sasi https://opensource.com/users/mesassi)
|
||||
|
||||
How young people can help fight COVID-19 with code
|
||||
======
|
||||
Youth developers are invited to submit ideas by April 15 to counter the
|
||||
educational, informational, social, and health challenges uncovered by
|
||||
the COVID-19 pandemic.
|
||||
![woman on laptop sitting at the window][1]
|
||||
|
||||
More than 91% of students around the world are impacted by school closures due to COVID-19, and most governments have temporarily closed academic institutions. That's nearly [1.6 billion young people in 188 countries][2]. Also, most of the learning platforms available online today aren't practical, engaging, or interactive, and lack true virtual collaboration.
|
||||
|
||||
This big and wicked challenge got me thinking about how these circumstances are impacting my children, their friends, and my passions of empowering youth, fostering tech entrepreneurship, and inspiring under-represented communities to find their purpose through building digital skills. These all came together in [CodeTheCurve][3], "a global, virtual hackathon for students, educators, teachers, and the research community to build tech skills, entrepreneurial spirit, and professional competencies to build digital creativity and cooperation to mobilize the world."
|
||||
|
||||
We hope you'll want to participate, but you need to act fast: the deadline to submit proposals is April 15.
|
||||
|
||||
### My story
|
||||
|
||||
The passions mentioned above stem from a deeply personal journey: My children and I are victims of parental kidnapping, and access to the internet and digital literacy are my pathways to being a mother from afar. My children, Zahra (age 13), Zahran (15), and Youmna (18), are safe and healthy, and we are frequently connected. They're living the same life youth all over the world are living these days, trying to social distance and remain in good health while figuring out this school thing (or lack thereof)—only one of my children has access to formal virtual learning during to COVID-19 school closures. The other two, without school-driven online learning options, tend to stay up all night playing Fortnight and making TikTok videos.
|
||||
|
||||
I have always been passionate about digital inclusion and empowering the world through computer science, and the effects of COVID-19 have increased my desire to make a difference. About four years ago, I created a non-profit organization, [MentorNations][4], to inspire youth and the world via technology. My non-profit has taught tens of thousands of young people in 12 countries to code. In my work at IBM as a developer advocate, I focus on empowering early-stage entrepreneurs, developers, and students with access to tech skills, professional development, and entrepreneurial thinking. My major focus areas include inspiring students to discover their career potential in enterprise computing while recognizing that we are all ANDs and not ORs.
|
||||
|
||||
Teaching the next generation about the power of collaboration, teamwork, problem-solving, and critical thinking that happen through open source code and principles empowers them to be creators and innovators who focus on solving relevant and real-world problems.
|
||||
|
||||
Looking through the lens of my children, my non-profit work, my roles within a variety of United Nations Task Forces, and my position as IEEE Chair over the Digital Skills Working Group, I wondered, _**what can I do to make a difference with open source technology?**_ So I reached out to my network, and the world responded in a much bigger way than I had ever imagined.
|
||||
|
||||
### CodeTheCurve
|
||||
|
||||
In response, we launched UNESCO's [CodeTheCurve][3] hackathon in collaboration with 14 partners, including UN EQUALS, SAP, iHackOnline, Angel Hack, Internet Society, and YPO. Participants are invited to bring their open source ideas to combat the current and future environment and challenges relating to COVID-19. This initiative is centered around youth empowerment, gender inclusion, and making the world a better place for our communities, including for people we may not directly encounter daily.
|
||||
|
||||
CodeTheCurve is for anyone above the age of 16. To ensure gender, age, and experience diversity, teams must include a developer or data scientist (early-stage chops are fine); at least one person under the age of 25; and at least one male and one female. The 40 teams selected to participate in CodeTheCurve will have access to more than 80 business and technical mentors (experts!) from around the world to help turn their ideas into reality.
|
||||
|
||||
My vision for this hackathon is to train young talent; enable them with free, online resources and access to real people with real answers; and encourage the creation of real-world problem solving in real-time. The results of the hackathon, I hope, will be open source utilities and information that can be used, in some way, to combat COVID-19.
|
||||
|
||||
#### Week-long learning, bootcamp, and hacking experience
|
||||
|
||||
CodeTheCurve is a three-day virtual hackathon experience guided by expert business and technical mentors. Before the hackathon proper, participants begin with two days of self-paced, online learning from content curated by CodeTheCurve collaborators, followed by a two-day, instructor-led learning journey where the 40 selected teams will collaborate in virtual breakout rooms with activity kits, hands-on computing resources in machine learning, and expert-guided plenary sessions.
|
||||
|
||||
#### CodeTheCurve hackathon themes
|
||||
|
||||
CodeTheCurve includes three themes:
|
||||
|
||||
* Education
|
||||
* Information and data management
|
||||
* Current and post-COVID-19 health and social issues
|
||||
|
||||
|
||||
|
||||
#### Professional development, entrepreneurship, and hands-on open source skills
|
||||
|
||||
The 40 teams will be empowered with expert-guided, engaging activities, including the following skill-building opportunities:
|
||||
|
||||
* **Hand-on tech skills**
|
||||
* Using Jupyter Notebooks for data science
|
||||
* Data protection, privacy, security, and encryption
|
||||
* Machine learning and artificial intelligence
|
||||
* Architectural diagrams and frameworks
|
||||
* Technical roadmaps
|
||||
* **Professional development**
|
||||
* Design thinking
|
||||
* Personal branding
|
||||
* Communication skills
|
||||
* How not to feel like an imposter
|
||||
* Conflict resolution
|
||||
* Working in global, virtual teams
|
||||
* Media literacy
|
||||
* Ethics in machine learning and artificial intelligence
|
||||
* **Entrepreneurship**
|
||||
* Problem statements
|
||||
* Mission and vision statements
|
||||
* Value propositions
|
||||
* Audience and target markets
|
||||
* Business model canvassing
|
||||
* Pitch decks
|
||||
* Pitch practice
|
||||
|
||||
|
||||
|
||||
### April 15: CodeTheCurve deadline
|
||||
|
||||
Did I mention that the initial application deadline is April 15? Here's the full timeline:
|
||||
|
||||
* Video submission deadline: **April 15**
|
||||
* 40 selected teams announced: **April 20**
|
||||
* Learning resources for pre-collaboration: **April 20-21**
|
||||
* Instructor-led learning: **April 22-23**
|
||||
* Hacking: **April 24-26**
|
||||
* CodeTheCurve winners announced: **April 30**
|
||||
|
||||
|
||||
|
||||
#### Prizes. Prizes. Prizes.
|
||||
|
||||
Prizes include free access to [IBM LinuxONE Community Cloud][5] for one year, free training courses from SAP, four pitch opportunities at IBM and SAP events, free access to enterprise-grade IBM Z and its machine learning suite for six months, and one-on-one technical and business mentorship for a full year with industry experts.
|
||||
|
||||
### How to apply
|
||||
|
||||
Interested in applying? Know someone who should apply? Simply [submit a video][6] of your **amazing** open source idea, the problem you're trying to solve, and who you expect to reach.
|
||||
|
||||
If you'd like to learn more, here are some other articles about CodeTheCurve:
|
||||
|
||||
* [UN News CodeTheCurve article][7]
|
||||
* [UNESCO CodeTheCurve blog][8]
|
||||
* [Forbes CodeTheCurve article][9]
|
||||
* [IBM CodeTheCurve blog][10]
|
||||
|
||||
|
||||
|
||||
I cannot wait to see all the amazing open source ideas the world brings our way!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/4/covid19-hackathon
|
||||
|
||||
作者:[Melissa Sasi][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/mesassi
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/lenovo-thinkpad-laptop-window-focus.png?itok=g0xPm2kD (young woman working on a laptop)
|
||||
[2]: https://en.unesco.org/covid19/educationresponse
|
||||
[3]: https://www.codethecurve.org/
|
||||
[4]: https://mentornations.org/
|
||||
[5]: https://developer.ibm.com/linuxone/
|
||||
[6]: http://ibm.biz/codethecurve-apply
|
||||
[7]: https://news.un.org/en/story/2020/04/1061142
|
||||
[8]: http://ibm.biz/unesco-pr
|
||||
[9]: https://www.forbes.com/sites/danielnewman/2020/04/10/digital-transformation-for-good-shines-as-we-fight-covid-19/#78d51a4c4946
|
||||
[10]: http://ibm.biz/codethecurve
|
@ -0,0 +1,196 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Try this Kubernetes HTTP router and reverse proxy)
|
||||
[#]: via: (https://opensource.com/article/20/4/http-kubernetes-skipper)
|
||||
[#]: author: (Sandor Szücs https://opensource.com/users/sszuecs)
|
||||
|
||||
Try this Kubernetes HTTP router and reverse proxy
|
||||
======
|
||||
Skipper is designed to handle large numbers of HTTP route definitions,
|
||||
beyond what you would want to manage in Nginx or Apache.
|
||||
![Traffic circle with arrows pointing which way to go][1]
|
||||
|
||||
Skipper is an open source HTTP router and reverse proxy for service composition. As its [GitHub page][2] states, it's designed to handle large amounts of dynamically configured HTTP route definitions (>600,000 routes) with detailed lookup conditions and flexible augmentation of the request flow with filters. It can be used out of the box or extended with custom lookup, filter logic, and configuration sources.
|
||||
|
||||
### Proxies
|
||||
|
||||
When some people think of a proxy, they imagine a webpage that serves as a gateway to an intranet or a suspicious-looking webpage designed to unblock social media sites on a school or work network. A forward proxy is one that operators of desktop infrastructure use to save internet bandwidth, enforce parental controls, or limit social media access. Another kind of proxy is one in which an individual user navigates to a page, provides credentials, and is then forwarded to a protected intranet resource. The inverse of that kind of proxy is the reverse proxy, which accepts all traffic and forwards it to a specific resource, like a server or container. That's the kind of work Skipper does for infrastructure.
|
||||
|
||||
When I read [Matt Klein's post][3] on modern network load balancing and proxying, I realized that we, as [Skipper][4] maintainers, should explain more features and details about why and how you can leverage HTTP proxies. In this article, I will treat the terminology "HTTP (reverse) proxy" and "HTTP router" as the same.
|
||||
|
||||
### HTTP routing
|
||||
|
||||
According to [Wikipedia][5]: "Routing is the process of selecting a path for traffic in a network." This definition refers to routing at [OSI layer 3][6], most commonly based on [IP][7] with routing protocols like [BGP][8] or [OSPF][9]. Since this article isn't about one of those, I will try to explain what HTTP routers are about. But first, I want to introduce Skipper, an [OSI layer 7][10] HTTP router library written in [Go][11] and a core component of retailer [Zalando][12]'s e-commerce shop and the [Kubernetes][13] Ingress infrastructure.
|
||||
|
||||
At Zalando, we use Skipper as a [Kubernetes Ingress][14] controller to support our users with visibility, reliability, security, and additional features to offload common applications.
|
||||
|
||||
Any organization running HTTP services, often in a microservice architecture, needs to route HTTP requests to the right applications. HTTP routers route based on information provided by the HTTP request. For example, the following shows an HTTP/1.1 request.
|
||||
|
||||
|
||||
```
|
||||
GET /details HTTP/1.1
|
||||
Host: [www.zalando.de][15]
|
||||
User-Agent: curl/7.49.0
|
||||
Accept: */*
|
||||
Authorization: Bearer <token>
|
||||
...
|
||||
```
|
||||
|
||||
We can route based on the method **GET**, the path **/details**, the **Host** header [**www.zalando.de**][16], or any arbitrary part of the request.
|
||||
|
||||
One common problem an application owner faces is splitting an API into multiple applications, so you need to split the responsibility of a component into subcomponents. Another common task is to support refactoring; maybe you have rewritten one part of your app, and you want to deploy it separately now.
|
||||
|
||||
For example, imagine you you have a store that has a list of products and their details, and you need to split it into _shop_ and _product_ backend applications. At **/**, your shop shows the list of products, and at **/details**, it shows product details, such as color, size, sustainability, and price.
|
||||
|
||||
![Figure 1: shop][17]
|
||||
|
||||
You need to split the responsibility of the product detail into its own application, such that **/** stays in the _shop_ application and **/details** is refactored to the _product_ application.
|
||||
|
||||
![Figure 2: product and shop][18]
|
||||
|
||||
To make sure an HTTP proxy finds the right backend for an incoming request, it uses a routing table to check the destination to make sure it's correct.
|
||||
|
||||
### Routing tables
|
||||
|
||||
In Skipper, the routing table is created by pulling information generated by [dataclients][19] from different sources. One source can be a [routes file][20], similar to what you may see in more popular HTTP servers, like Apache or Nginx.
|
||||
|
||||
Depending on the size of your organization—or better, the number of backend applications—the routing table can grow quite large. Skipper implements the routing table as a tree that can scale beyond 600,000 routes (far more than you'd want to manage in an Nginx or Apache config).
|
||||
|
||||
Following along with the example application above, Table 1 shows the routing table from [Figure 2][21]. The store **/** should be routed to **shop,** and the **/detail** routed to the **product** application.
|
||||
|
||||
path | app
|
||||
---|---
|
||||
/ | shop
|
||||
/detail | product
|
||||
|
||||
Table 1: Routing table
|
||||
|
||||
The available dataclients in Skipper fetch routes from different sources and what a route consists of.
|
||||
|
||||
### Dataclient
|
||||
|
||||
The routing configuration in Skipper's routes file [dataclient][22] is similar to what you might know from HTTP proxies in Nginx or Apache. In Skipper, a routes file specifies all routes in [eskip][23] syntax, as shown in Figure 3.
|
||||
|
||||
|
||||
```
|
||||
r1: P1() && P2() && .. && PN()
|
||||
-> f1()
|
||||
-> f2()
|
||||
...
|
||||
-> fN()
|
||||
-> <backend>;
|
||||
r2: ...
|
||||
...
|
||||
```
|
||||
|
||||
Figure 3: Routes file in eskip
|
||||
|
||||
In the above:
|
||||
|
||||
* **r1, r2, ...** are unique routeIDs.
|
||||
* **P1, P2,..,PN** are predicates that define the matching.
|
||||
* **f1, f2,..,fN** are filters that are applied after the route was selected. Filters can change the request and response.
|
||||
* Finally, the Skipper backend is defined. This can be a single URL, a list of load-balanced URLs, and others for special cases such as [direct response][24].
|
||||
|
||||
|
||||
|
||||
The [routes string][25] is another dataclient that is handy for tests. For example, if you need a pseudo backend for your demo that replies a green background with HTML, you could use:
|
||||
|
||||
|
||||
```
|
||||
$ skipper -routes-string='*
|
||||
-> inlineContent(
|
||||
"<html><body style=\"background-color: green;\"></body></html>"
|
||||
)'
|
||||
```
|
||||
|
||||
Skipper's most popular dataclient, by far, is the Kubernetes dataclient, which is used to fetch information from a [Kubernetes API server][26] and create a routing table from [Skipper Ingress][27] resources and the [RouteGroup][28] custom resource definition (CRD).
|
||||
|
||||
To summarize the above, dataclients fetch information from different providers to build Skipper's routing table. Table 1 shows a routing table for the shop/description example, and Skipper uses predicates to select the route to process the request.
|
||||
|
||||
### Predicates
|
||||
|
||||
In Skipper, an incoming request is matched to [predicates][29] of all the routes to find the best matching route for an incoming request. Predicates are functions that match based on the incoming request. In the example from Figure 2 and Table 1, Skipper would have a routing table similar to Figure 4:
|
||||
|
||||
|
||||
```
|
||||
shop: Path("/")
|
||||
-> "<https://shop.zalando>";
|
||||
product: Path("/detail")
|
||||
-> "<https://product.zalando>";
|
||||
```
|
||||
|
||||
Figure 4: Skipper routing table
|
||||
|
||||
This means HTTP requests with a path **/** would be matched by the **Path("/")** predicate, such that Skipper will execute the shop route. Requests with a path **/detail** would be matched by **Path("/detail")** and routed to the product application.
|
||||
|
||||
In general, routing behavior can be changed by predicates. There are a lot of predicates you can choose from. For example, **Method("POST")** will be true only if a POST request would be passed. A route with more predicates is considered more specific. Also, a route with more predicates has more weight in the route selection than one that has less.
|
||||
|
||||
Special cases are **Path()** and **PathSubtree()**, which is matched first in a tree and reduces the number of routes, which are scanned as a list. For example, the tree structure shown in Figure 5 helps to scale the number of routes to more than 600,000 in one of Zalando's production setups.
|
||||
|
||||
![Skipper tree example][30]
|
||||
|
||||
### Filters
|
||||
|
||||
After a route is selected, the request [filters][31] are applied. Filters work on request or response; they can change the incoming request to the backend, and they can change the response to the client.
|
||||
|
||||
For example, **setRequestHeader("Foo", "bar")** sets the HTTP header **"Foo"** to the value **"bar"**, such that the backend sees this header in the request.
|
||||
|
||||
The response filter **responseCookie("keks", "val", 3600)** sets a Cookie named **"keks"** in the response to the caller, which might be a browser in this case. The cookie would have the value **"val"** and is valid for one hour.
|
||||
|
||||
One filter that works on request and response is **enableAccessLog(40, 5)**. This would do access logs for all responses from the backend with status codes 40x or 5xx.
|
||||
|
||||
As you can see from the examples, filters can change the request or the response or just do some work based on it. Another filter example is **auth filters** or **ratelimits**. These would stop requests from passing to the backend if the request should not be allowed to pass. For example, to serve static content from a directory called **/var/www**, you can use the filter **static("/var/www")**.
|
||||
|
||||
### Learn more
|
||||
|
||||
This article provided a basic overview of Skipper and its capabilities. For more information, consult [Skipper's documentation][32], and please share your questions or feedback in the comments.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/4/http-kubernetes-skipper
|
||||
|
||||
作者:[Sandor Szücs][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/sszuecs
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/LAW-patent_reform_520x292_10136657_1012_dc.png?itok=Cd2PmDWf (Traffic circle with arrows pointing which way to go)
|
||||
[2]: https://github.com/zalando/skipper
|
||||
[3]: https://blog.envoyproxy.io/introduction-to-modern-network-load-balancing-and-proxying-a57f6ff80236
|
||||
[4]: https://opensource.zalando.com/skipper
|
||||
[5]: https://en.wikipedia.org/wiki/Routing
|
||||
[6]: https://en.wikipedia.org/wiki/OSI_model#Layer_3:_Network_Layer
|
||||
[7]: https://en.wikipedia.org/wiki/Internet_Protocol
|
||||
[8]: https://en.wikipedia.org/wiki/Border_Gateway_Protocol
|
||||
[9]: https://en.wikipedia.org/wiki/Open_Shortest_Path_First
|
||||
[10]: https://en.wikipedia.org/wiki/OSI_model#Layer_7:_Application_Layer
|
||||
[11]: https://golang.org/
|
||||
[12]: https://en.zalando.de/
|
||||
[13]: https://kubernetes.io
|
||||
[14]: https://kubernetes.io/docs/concepts/services-networking/ingress/
|
||||
[15]: http://www.zalando.de
|
||||
[16]: https://en.zalando.de/?_rfl=de
|
||||
[17]: https://opensource.com/sites/default/files/uploads/skipper_1_shop.png (Figure 1: shop)
|
||||
[18]: https://opensource.com/sites/default/files/uploads/skipper_2_product-shop.png (Figure 2: product and shop)
|
||||
[19]: https://opensource.zalando.com/skipper/reference/backends/
|
||||
[20]: https://opensource.zalando.com/skipper/data-clients/eskip-file/
|
||||
[21]: tmp.ftM58r5YpM#fig2
|
||||
[22]: https://opensource.zalando.com/skipper/tutorials/development/#dataclients
|
||||
[23]: https://godoc.org/github.com/zalando/skipper/eskip
|
||||
[24]: https://opensource.zalando.com/skipper/reference/backends/#shunt-backend
|
||||
[25]: https://opensource.zalando.com/skipper/data-clients/route-string/
|
||||
[26]: https://kubernetes.io/docs/concepts/overview/components/#kube-apiserver
|
||||
[27]: https://opensource.zalando.com/skipper/kubernetes/ingress-usage/
|
||||
[28]: https://opensource.zalando.com/skipper/kubernetes/routegroups/
|
||||
[29]: https://opensource.zalando.com/skipper/reference/predicates/
|
||||
[30]: https://opensource.com/sites/default/files/uploads/skipper_5_tree.png (Skipper tree example)
|
||||
[31]: https://opensource.zalando.com/skipper/reference/filters/
|
||||
[32]: https://opensource.zalando.com/skipper/
|
@ -0,0 +1,89 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (How to Open Files and Folders as Administrator in Nautilus File Manager in Linux)
|
||||
[#]: via: (https://itsfoss.com/open-nautilus-as-administrator/)
|
||||
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
||||
|
||||
How to Open Files and Folders as Administrator in Nautilus File Manager in Linux
|
||||
======
|
||||
|
||||
_**Learn to add an “Open as Administrator” option in the right click context menu in Nautilus file manager in Ubuntu and other Linux distributions.**_
|
||||
|
||||
If you want to open or edit a file as root, you can always do that in the terminal. I know a few people don’t feel too comfortable with the command line.
|
||||
|
||||
The desktop Linux often provides ways to avoid the command line for terminal-fearing people.
|
||||
|
||||
If you are in a situation where you have to access a folder as root or edit a file with root privilege, you can do that graphically in [Nautilus file manager][1].
|
||||
|
||||
A neat Nautilus hack allows you to open a files and folders as administrator i.e. root. Let me show you how.
|
||||
|
||||
**Recommended Read:**
|
||||
|
||||
![][2]
|
||||
|
||||
#### [Root User in Ubuntu: Important Things You Should Know][3]
|
||||
|
||||
Root user is essential to any Linux distribution. Learn why Ubuntu locks the root user and how can you use it in this Ubuntu beginner series.
|
||||
|
||||
### Add ‘open as administrator’ option in right click context menu in Nautilus file manager
|
||||
|
||||
_**A word of warning! Please don’t go around opening and editing random files as root as you might mess up with wrong files and end up with a broken system. Use it only in the cases where it is required.**_
|
||||
|
||||
I am showing the installation steps for Ubuntu. You can change it as per your distribution’s package manager.
|
||||
|
||||
You’ll have to use terminal (even if you don’t like it) for installing the Nautilus plugin. Please [make sure that you have the universe repository enabled][4]:
|
||||
|
||||
```
|
||||
sudo apt install nautilus-admin
|
||||
```
|
||||
|
||||
Close and open Nautilus file manager again to see the changes in effect.
|
||||
|
||||
![Right clock to see the “Open as Administrator” option][5]
|
||||
|
||||
You can also edit files as root the same way. Just select the file, right click on it and choose the “Edit as Administrator” option.
|
||||
|
||||
![Edit Files As Root Ubuntu][6]
|
||||
|
||||
In both cases, you’ll be prompted to enter your account’s password:
|
||||
|
||||
![You need to enter your password, of course][7]
|
||||
|
||||
That’s pretty much it. You can enjoy the comfort of GUI.
|
||||
|
||||
In case you don’t want to run Nautilus as root anymore, you can remove this plugin. It’s always good to remove additional things you installed but you don’t use anymore.
|
||||
|
||||
In the terminal (yes, again), use the following command to remove the Nautilus plugin.
|
||||
|
||||
```
|
||||
sudo apt remove nautilus-admin
|
||||
```
|
||||
|
||||
By the way, if you are using [Ubuntu MATE][8], you can use caja-admin, instead of nautilus-admin. Other file managers may or may not provide such a feature.
|
||||
|
||||
I hope you find this quick tip helpful. Questions and suggestions are always welcome.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/open-nautilus-as-administrator/
|
||||
|
||||
作者:[Abhishek Prakash][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/abhishek/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://wiki.gnome.org/Apps/Files
|
||||
[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/01/root_user_ubuntu.png?fit=800%2C450&ssl=1
|
||||
[3]: https://itsfoss.com/root-user-ubuntu/
|
||||
[4]: https://itsfoss.com/ubuntu-repositories/
|
||||
[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/open-folder-as-administrator-ubuntu.jpg?ssl=1
|
||||
[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/edit-files-as-root-ubuntu.jpg?ssl=1
|
||||
[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/authentication-pop-up-ubuntu.png?ssl=1
|
||||
[8]: https://ubuntu-mate.org/
|
@ -0,0 +1,146 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (robsean)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Installing Kali Linux on VirtualBox: Quickest & Safest Way)
|
||||
[#]: via: (https://itsfoss.com/install-kali-linux-virtualbox/)
|
||||
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
|
||||
|
||||
在 VirtualBox 上安装 Kali Linux : 最快速和最安全的方法
|
||||
======
|
||||
|
||||
_**这篇教程向你展示如何以最快的方式在 Windows 和 Linux 中的 Virtual Box 虚拟机上安装 Kali Linux 。**_
|
||||
|
||||
[Kali Linux][1] 是 [最适合黑客攻击和安全爱好者的 Linux 发行版][2] 之一。
|
||||
|
||||
因为它涉及一个像黑客之类的敏感话题,就像一把双刃剑。我们过去在详细的 Kali Linux 评论中讨论过,所以我不会使用同样的东西来烦你。
|
||||
|
||||
尽管你可以通过以替换现有的操作系统的形式安装 Kali Linux 。但是通过一台虚拟机来使用它可能会是更好更安全的选择。
|
||||
|
||||
使用 Virtual Box ,你可以在 Windows/Linux 系统中将 Kail Linux 作为常规应用程序使用。它几乎与在系统中运行 VLC 或游戏是一样的。
|
||||
|
||||
在一台虚拟机中使用 Kali Linux 是安全的。不管你在 Kali Linux 做什么都不会影响你的 ‘宿主系统’ (例如,你的原始的 Windows 或 Linux 操作系统)。你的实际操作系统将不会受到影响,并且在你的宿主系统中数据也将是安全的。
|
||||
|
||||
![][3]
|
||||
|
||||
### 如何在 VirtualBox 中安装 Kali Linux
|
||||
|
||||
在这里我将使用 [VirtualBox][4] 。它是一个非常好的开源虚拟化解决方案,几乎适合于任何人(专业使用或个人使用)。它是免费提供的。
|
||||
|
||||
在这篇文章中,我们将特别讨论 Kali Linux ,但是你也可以安装其它任何存在的 ISO 文件,或者一个可用的预先构建的虚拟机保存文件。
|
||||
|
||||
**注意:** _同样的步骤也适用于运行 VirtualBox 的 Windows/Linux 。_
|
||||
|
||||
如上所述,你可以安装 Windows 或 Linux 作为你的宿主系统。但是,在我已安装 Windows 10 的情况下(别仇恨我!),我将尝试在 VirtualBox 中一步一步地安装 Kali Linux 。
|
||||
|
||||
并且,最好的部分是,– 即使你碰巧使用一个 Linux 发行版作为你的主要操作系统,也将使用同样的步骤!
|
||||
|
||||
很疑惑,如何做?让我们来看看…
|
||||
|
||||
[更多 Linux 视频,订阅我们的 YouTube 频道][5]
|
||||
|
||||
### 图解在 VirtualBox 上安装 Kali Linux
|
||||
|
||||
_我们将使用专门为 VirtualBox 定制的 Kali Linux 镜像。你也可以下载 Kali Linux 的 ISO 文件,并创建一个新的虚拟机 – 但是为什么当你有一个简单的选择时还这样做呢?_
|
||||
|
||||
#### 1\. 下载和安装 VirtualBox
|
||||
|
||||
第一件要做的事是从甲骨文的官方网站下载和安装 VirtualBox 。
|
||||
|
||||
[下载VirtualBox][6]
|
||||
|
||||
在你下载安装器后,只需要双击它来安装 VirtualBox 。在 [Ubuntu][7] / Fedora Linux 安装 VirtualBox 也是一样的。
|
||||
|
||||
#### 2\. 下载 Kali Linux 的即时可用的虚拟镜像
|
||||
|
||||
在安装成功后,前往 [攻击性安全的下载页面][8] 来下载适用于 VirtualBox 的虚拟机镜像。如果您改变主意使用 [VMware][9] ,那也是可行的。
|
||||
|
||||
![][10]
|
||||
|
||||
如你所见,文件大小大约 3 GB ,你应该使用一个 torrent 选项,或者使用一个 [下载管理器][11] 来下载它。
|
||||
|
||||
[Kali Linux 虚拟镜像][8]
|
||||
|
||||
#### 3\. 在 Virtual Box 上安装 Kali Linux
|
||||
|
||||
在你安装 VirtualBox 和下载 Kali Linux 镜像后,你只需要导入它到 VirtualBox 中以便使它工作。
|
||||
|
||||
这里是如何导入 Kali Linux 的 VirtualBox 镜像:
|
||||
|
||||
**步骤 1** : 启动 VirtualBox 。你将注意到一个 **导入** 按钮 – 在它上面鼠标左键单击
|
||||
|
||||
![在 导入 按钮上鼠标左键单击][12]
|
||||
|
||||
**步骤 2:** 接下来,浏览到你更改下载的文件,并选择它来导入 (如你在下面的图像中所见)。文件名称一个以 'kali linux' 开始并以 . **ova** 拓展名结束。
|
||||
|
||||
![导入 Kali Linux 镜像][13]
|
||||
|
||||
在选择后,通过在 **接下来** 上鼠标左键单击以继续。
|
||||
|
||||
**步骤 3** : 现在,将向你显示将要导入虚拟机的设置。所以,你可以自定义它们或者不自定义它们 – 这取决于你的选择。如果你使用默认设置也是可以的。
|
||||
|
||||
你需要选择一个有足够可用存储空间的路径。在 Windows 上,我从不建议使用 **C:** 盘。
|
||||
|
||||
![导入硬盘驱动器为 VDI][14]
|
||||
|
||||
在这里,硬盘驱动器如同 VDI 一样通过分配存储器空间集来虚拟挂载硬盘驱动器。
|
||||
|
||||
在你完成设置后,单击 **导入** 并等待一段时间。
|
||||
|
||||
**步骤 4:** 你现在将看到它的列表。所以,只需点击 **开始** 来启动它。
|
||||
|
||||
在最开始的时候,你可能会得到一个 USB 2.0 端口控制器的错误,你可以禁用它来解决问题,或者只需按照屏幕上的指南来安装一个附加软件包修复问题。与此同时,你完成所有工作!
|
||||
|
||||
![Kali Linux 运行在 VirtualBox 中][15]
|
||||
|
||||
在 Kali Linux 中默认用户名是 root ,默认密码是 toor 。你可以使用用户名和密码来登录到系统中。
|
||||
|
||||
请注意,在尝试安装一个新的应用程序或尝试侵入你邻居家的 WiFi 之前,你应该 [更新Kali Linux][16] 。
|
||||
|
||||
我希望这篇指南能帮助您在 Virtual Box 上很容易地安装 Kali Linux 。当然,Kali Linux 有很多有用的渗透测试工具 – 祝你好运!
|
||||
|
||||
**提示** : Kali Linux 和 Ubuntu 都是基于 Debian 的,如果你在使用 Kali Linux 时遇到一些问题或错误,你可以按照互联网上的 Ubuntu 和 Debian 的教程解决。
|
||||
|
||||
### 额外的好处: 免费的 Kali Linux 指南书
|
||||
|
||||
如果你刚刚开始使用 Kali Linux, 那么知晓如何使用Kali Linux 将是一个好主意。
|
||||
|
||||
Kali Linux 背后的公司 Offensive Security 创建了一本解释 Linux 基础知识,Kali Linux 基础知识,配置和设置的指南书,也有一些关于渗透测试和安全工具的章节。
|
||||
|
||||
基本上,它拥有你开始使用 Kali Linux 所需的一切东西。最好的事情是这本书可以免费下载。
|
||||
|
||||
[免费下载 Kali Linux 解密][17]
|
||||
|
||||
如果你遇到问题或只是想分项在 VirtualBox 使用 Kali Linux 的经验,请在下面的评论中告诉我们。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/install-kali-linux-virtualbox/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[robsean](https://github.com/robsean)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/ankush/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.kali.org/
|
||||
[2]: https://itsfoss.com/linux-hacking-penetration-testing/
|
||||
[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/02/kali-linux-virtual-box.png?resize=800%2C450&ssl=1
|
||||
[4]: https://www.virtualbox.org/
|
||||
[5]: https://www.youtube.com/c/itsfoss?sub_confirmation=1
|
||||
[6]: https://www.virtualbox.org/wiki/Downloads
|
||||
[7]: https://itsfoss.com/install-virtualbox-ubuntu/
|
||||
[8]: https://www.offensive-security.com/kali-linux-vm-vmware-virtualbox-image-download/
|
||||
[9]: https://itsfoss.com/install-vmware-player-ubuntu-1310/
|
||||
[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/02/kali-linux-virtual-box-image.jpg?resize=800%2C347&ssl=1
|
||||
[11]: https://itsfoss.com/4-best-download-managers-for-linux/
|
||||
[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/02/vmbox-import-kali-linux.jpg?ssl=1
|
||||
[13]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/02/vmbox-linux-next.jpg?ssl=1
|
||||
[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/02/vmbox-kali-linux-settings.jpg?ssl=1
|
||||
[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/02/kali-linux-on-windows-virtualbox.jpg?resize=800%2C429&ssl=1
|
||||
[16]: https://linuxhandbook.com/update-kali-linux/
|
||||
[17]: https://kali.training/downloads/Kali-Linux-Revealed-1st-edition.pdf
|
@ -0,0 +1,84 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (New Linux Distribution UbuntuDDE Brings The Beautiful Deepin Desktop to Ubuntu)
|
||||
[#]: via: (https://itsfoss.com/ubuntudde/)
|
||||
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
||||
|
||||
新的 Linux 发行版 UbuntuDDE 将漂亮的 Deepin 桌面带到 Ubuntu
|
||||
======
|
||||
|
||||
Deepin 是有直观 UI 的漂亮桌面环境。UbuntuDDE 项目结合了 Ubuntu 的强大和 Deepin 之美。
|
||||
|
||||
[Deepin 桌面环境][1](DDE)是由 [Deepin Linux][2] 的开发人员创建的漂亮桌面环境。最初,Deepin Linux 基于 [Ubuntu][3],但后来他们切换到了 [Debian][4]。
|
||||
|
||||
![Deepin Desktop Environment in Ubuntu][5]
|
||||
|
||||
Deepin Linux 的一个主要问题是服务器速度较慢。常规系统需要花几个小时才能下载,因为它们的所有服务器都在中国,而且这些服务器非常慢。
|
||||
|
||||
如果你想使用 Deepin 桌面,那没有什么可以阻止你将其安装在常规 Ubuntu 系统上。[UbuntuDDE][6] 试图通过在 Ubuntu 之上为你提供开箱即用的 Deepin 桌面体验来使其更简单。这样可以节省你在 Ubuntu 上安装和配置 Deepin 的时间和精力。
|
||||
|
||||
![Screenshot of UbuntuDDE][7]
|
||||
|
||||
### Ubuntu DDE:Ubuntu 的强大和 Deepin 桌面的漂亮
|
||||
|
||||
请注意,UbuntuDDE 不是 Ubuntu 的官方变种。UbuntuDDE 的开发人员与 Ubuntu 团队无关。UbuntuDDE 目前一个混合发行版,其目标是在未来的发行版中被公认为 Ubuntu 的官方变种。
|
||||
|
||||
UbuntuDDE 开发人员得到了 Ubuntu Snapcraft 团队的 Alan Pope 以及 Ubuntu Budgie 团队和 [Ubuntu Cinnamon][8] 团队以及其他开发者的帮助。
|
||||
|
||||
在与 FOSS 的对话中,其主要开发人员 Arun 强调说,该项目的重要方面是定期维护 Ubuntu 的 DDE 软件包,并帮助用户享受 DDE(深度桌面环境)的全部乐趣。
|
||||
|
||||
![Ubuntu Deepin Edition login screen][9]
|
||||
|
||||
Arun 还提到,这个 Ubuntu Deepin 混合项目首先是维护和打包来自上游(即 Deepin 仓库)的最新版本。然后,它最终与 Ubuntu 20.04 focal 结合,生成了一个镜像文件,每个人都可以安装,而不必麻烦地先安装常规的 Ubuntu,然后再安装 Deepin Desktop。UbuntuDDE 不仅是 DDE 和 Ubuntu 的组合,而且还是 UbuntuDDE 团队软件包选择和设计变更的融合。
|
||||
|
||||
![UbuntuDDE screenshot][10]
|
||||
|
||||
与 Deepin Linux 不同,UbuntuDDE 不使用 Deepin Appstore。它改用 Ubuntu 软件中心。如果你对[基于武汉的 Deepin Linux 的间谍软件标签][11]感到不满意,这将是一个好消息。
|
||||
|
||||
### 下载 UbuntuDDE 20.04 Beta
|
||||
|
||||
UbuntuDDE 的目标是与 Ubuntu 20.04 一起发布第一个正式的稳定版本。像[其他 Ubuntu 变种][12]一样,UbuntuDDE 20.04 beta 也可供你下载并尝试。
|
||||
|
||||
警告!
|
||||
|
||||
一句话警告。 UbuntuDDE 是正在开发的新手项目。请不要在你的主系统上使用它。如果要尝试,请在虚拟机或备用系统中使用它。
|
||||
|
||||
[Download Ubuntu 20.04 DDE Beta][13]
|
||||
|
||||
![Installing UbuntuDDE][14]
|
||||
|
||||
由于本质上是 Ubuntu,因此安装 UbuntuDDE 与安装 Ubuntu 相同。你可以参考本教程,其中展示了[如何在 VirtualBox 内安装 Ubuntu][15]。
|
||||
|
||||
我知道你可能会认为这“不是另一个 Ubuntu” 或者“只是 Ubuntu 上的 Deepin,任何人都可以做”。但是我也知道有一小部分用户喜欢像 UbuntuDDE 这样的项目,这对他们来说使事情变得容易。我的意思是有许多 Ubuntu 变种出现了。你怎么看?
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/ubuntudde/
|
||||
|
||||
作者:[Abhishek Prakash][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/abhishek/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.deepin.org/en/dde/
|
||||
[2]: https://www.deepin.org/en/
|
||||
[3]: https://ubuntu.com/
|
||||
[4]: https://www.debian.org/
|
||||
[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-deepin-edition-screenshot.jpg?ssl=1
|
||||
[6]: https://ubuntudde.com/
|
||||
[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-deepin-edition-screenshot-1.jpg?ssl=1
|
||||
[8]: https://itsfoss.com/ubuntu-cinnamon/
|
||||
[9]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-deepin-edition-screenshot-5.jpg?ssl=1
|
||||
[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-deepin-edition-screenshot-2.jpg?ssl=1
|
||||
[11]: https://www.deepin.org/en/2018/04/14/linux-deepin-is-not-spyware/
|
||||
[12]: https://itsfoss.com/which-ubuntu-install/
|
||||
[13]: https://ubuntudde.com/download/
|
||||
[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-deepin-edition-screenshot-4.jpg?ssl=1
|
||||
[15]: https://itsfoss.com/install-linux-in-virtualbox/
|
@ -0,0 +1,111 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Here’s How to Find Out Which Desktop Environment You are Using)
|
||||
[#]: via: (https://itsfoss.com/find-desktop-environment/)
|
||||
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
||||
|
||||
这是找出你所使用的桌面环境的方法
|
||||
======
|
||||
|
||||
如果你是 Linux 新用户,并在一个 Linux 论坛中寻求帮助,那么你可能会被问以下问题:
|
||||
|
||||
_**“你使用的是哪个桌面环境?”**_
|
||||
|
||||
你知道什么是桌面环境,但你如何知道你使用的是哪一个?我会告诉你如何找到它。我将首先展示命令行方法,因为这适用于[各种 Linux 发行版][1]。我还将展示如何通过图形方式获得。
|
||||
|
||||
### 检查你使用的是哪个桌面环境
|
||||
|
||||
![][2]
|
||||
|
||||
你可以[在 Linux 中使用 echo 命令][3]在终端中显示 XDG_CURRENT_DESKTOP 变量的值。
|
||||
|
||||
打开终端并复制粘贴此命令:
|
||||
|
||||
```
|
||||
echo $XDG_CURRENT_DESKTOP
|
||||
```
|
||||
|
||||
例如,这表明我在 [Ubuntu 20.04][5] 中使用了 [GNOME 桌面][4]:
|
||||
|
||||
```
|
||||
[email protected]:~$ echo $XDG_CURRENT_DESKTOP
|
||||
ubuntu:GNOME
|
||||
```
|
||||
|
||||
尽管此命令可以快速告诉你正在使用哪个桌面环境,但它不会提供任何其他信息。
|
||||
|
||||
在某些情况下,了解桌面环境版本(也称为 DE)可能很重要。软件的每个新版本都会带来新功能或删除某些功能。[GNOME 3.36][6] 引入了“请勿打扰”选项,以关闭所有桌面通知。
|
||||
|
||||
假设你了解了此新的“请勿打扰”功能。你确认自己正在使用 GNOME,但是在 GNOME 桌面上看不到此选项。如果你可以检查系统上已安装的 GNOME 桌面版本,那么这会很清楚。
|
||||
|
||||
我将先向你展示命令检查桌面环境版本,因为你可以在任何运行桌面环境的 Linux 中使用它。
|
||||
|
||||
### 如何获取桌面环境版本
|
||||
|
||||
与获取桌面环境的名称不同。获取其版本号并不直接,因为它没有标准的命令或环境变量可以提供此信息。
|
||||
|
||||
在 Linux 中获取桌面环境信息的一种方法是使用 [Screenfetch][7] 之类的工具。此[命令行工具以 ascii 格式显示 Linux 发行版的 logo][8] 以及一些基本的系统信息。桌面环境版本就是其中之一。
|
||||
|
||||
在基于 Ubuntu 的发行版中,你可以通过[启用 Universe 仓库][9]安装 Screenfetch,然后使用以下命令:
|
||||
|
||||
```
|
||||
sudo apt install screenfetch
|
||||
```
|
||||
|
||||
对于其他 Linux 发行版,请使用系统的软件包管理器来安装此程序。
|
||||
|
||||
安装后,只需在终端中输入 screenfetch 即可,它应该显示桌面环境版本以及其他系统信息。
|
||||
|
||||
![Check Desktop Environment Version][10]
|
||||
|
||||
如上图所示,我的系统使用 GNOME 3.36.1(基本版本是 GNOME 3.36)。你也可以这样[检查 Linux 内核版本][11]和其他详细信息。
|
||||
|
||||
请记住,Screenfetch 不一定显示桌面环境版本。我查看了它的源码,它有许多 if-else 代码,可以从各种桌面环境中的许多源和参数获取版本信息。如果找不到任何版本,那么仅显示桌面环境名称。
|
||||
|
||||
### 使用 GUI 检查桌面环境版本
|
||||
|
||||
几乎所有桌面环境在其 “Settings-About” 部分中都提供了基本的系统详细信息。
|
||||
|
||||
一个主要问题是,大多数桌面环境看起来都不同,因此我无法展示每个桌面环境的确切步骤。我将展示 GNOME 的,让你在桌面上发现它。
|
||||
|
||||
在菜单中搜索 “Settings”(按 Windows 键并搜索):
|
||||
|
||||
![Search for Settings application][12]
|
||||
|
||||
在这里,找到底部的 “About” 部分。单击它,你应该就能看到桌面环境及其版本。
|
||||
|
||||
![Check Desktop Environment in Ubuntu][13]
|
||||
|
||||
如你所见,这表明我的系统正在使用 GNOME 3.36。
|
||||
|
||||
我希望这个快速入门技巧对你有所帮助。如果你有任何疑问或建议,请在下面发表评论。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/find-desktop-environment/
|
||||
|
||||
作者:[Abhishek Prakash][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/abhishek/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://itsfoss.com/what-is-linux/
|
||||
[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/check-desktop-environment.jpg?ssl=1
|
||||
[3]: https://linuxhandbook.com/echo-command/
|
||||
[4]: https://www.gnome.org/
|
||||
[5]: https://itsfoss.com/ubuntu-20-04-release-features/
|
||||
[6]: https://itsfoss.com/gnome-3-36-release/
|
||||
[7]: https://github.com/KittyKatt/screenFetch
|
||||
[8]: https://itsfoss.com/display-linux-logo-in-ascii/
|
||||
[9]: https://itsfoss.com/ubuntu-repositories/
|
||||
[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/check-desktop-environment-version.jpg?ssl=1
|
||||
[11]: https://itsfoss.com/find-which-kernel-version-is-running-in-ubuntu/
|
||||
[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/08/applications_menu_settings.jpg?ssl=1
|
||||
[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/check-desktop-environment-ubuntu.jpg?ssl=1
|
@ -0,0 +1,137 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (wxy)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (How I'm using AI to translate 'wash your hands' in 500 languages)
|
||||
[#]: via: (https://opensource.com/article/20/4/ai-translation)
|
||||
[#]: author: (Daniel Whitenack https://opensource.com/users/datadan)
|
||||
|
||||
我是如何用 AI 把 “请洗手”翻译成 500 种语言的?
|
||||
======
|
||||
|
||||
> 通过使用人类和机器生成的翻译,可以将关键的健康短语翻译成世界各地的当地语言。
|
||||
|
||||
![Two diverse hands holding a globe][1]
|
||||
|
||||
你可能不知道,目前世界上有 [7117 种语言][2],不是方言,而是在用的语言! 然而,世界上大部分的数字媒体只采用几十种语言,而像谷歌翻译这样的翻译平台只支持 100 种左右的语言。这样的现实意味着,由于缺乏及时获取信息的机会,全世界有数十亿人被边缘化。当前的冠状病毒(COVID-19)大流行已经让人痛苦地意识到了这一点,凸显了将健康相关的短语(如“<ruby>请洗手<rt>wash your hands</rt></ruby>”或“保持距离”等)即时、快速翻译成小众语言的必要性。
|
||||
|
||||
为此,我应用了最先进的AI技术,用 544 种语言构建出了与“请洗手”相近的短语并进行了统计(我的 GPU 还在运行)。<ruby>多语言无监督和监督嵌入<rt>Multilingual Unsupervised and Supervised Embeddings</rt></ruby>(MUSE)方法被用来训练这 544 种语言和英语之间的跨语言单词嵌入。然后,这些嵌入方法可以从现有文档中提取出与目标短语相似的短语。
|
||||
|
||||
我与 SIL 国际公司的同事们合作完成了这项工作,他们收集了该短语的更多的人工翻译结果。这些人工翻译结果和我的一些机器翻译结果的组合可以在[这个民族语指南页面][3]上搜索到(机器生成的短语用一个小的机器人图标表示),更多的翻译将在生成/收集到的时候加入。
|
||||
|
||||
### 利用现有的语料库
|
||||
|
||||
SIL 国际公司已经完成了 2000 多种语言的语言工作,目前管理着 1600 多个语言项目。因此,当我解决这个特殊的问题时,我知道我们很可能已经多次将“请洗手”和/或类似的短语翻译成了数百种语言,而这一猜测得到了回报。我很快就从我们的档案库中收集到了超过 900 种语言的文件(主要是完成的贝壳书模板、教材和圣经)。这些文件中的每一份文件都有一个英文的对应语,其中必然包括“请洗手”和/或类似“请洗脸”这样的短语。此外,这些文件的质量都很高,并与当地语言社区合作进行了翻译和检查。
|
||||
|
||||
这是相当多语言的数据集。然而,有两个问题需要克服。首先,这个数据包含了大多数语言的数千种样本,这与训练机器翻译模型所使用的数百万个样本形成了鲜明对比。其次,即使文档中包含目标语言中的“请洗手”这个短语,我们也不知道这个短语在周围文本中的确切位置。
|
||||
|
||||
我们当然可以利用[低资源语言的机器翻译][4]中的一些最新技巧,但要在每一对语言中快速调整翻译模型的自动化方法,还需要一些时间。此外,我们所针对的许多语言都没有现成的可以与之比较评估指标的基线,例如[BLEU 评分][5]。考虑到对冠状病毒大流行的迫切担忧,我们希望比这更快一点(尽管我们计划在将来再来解决这个问题)。
|
||||
|
||||
我选择通过在现有的文档中寻找短语本身或短语的组件(如“请洗”或“你的手”)来尝试构建“请洗手”这个短语。为了找到这些成分,我使用 Facebook Research 的 [多语言无监督和监督嵌入(MUSE)][6]对每个 {英语、目标语言} 对进行<ruby>跨语言<rt>cross-lingual</rt></ruby>嵌入训练。MUSE 以<ruby>单语言<rt>monolingual</rt></ruby>的单词嵌入作为输入(我使用 [fasttext][7] 来生成这些词),并使用对抗性方法学习从英语到目标嵌入空间的映射。这个过程的输出是<ruby>跨语言<rt>cross-lingual</rt></ruby>的单词嵌入。
|
||||
|
||||
![Using fasttext along with MUSE to perform cross-language embedding][8]
|
||||
|
||||
一旦产生了跨语言嵌入,我们就可以开始在目标语言文档中寻找短语成分。结果发现,整个文档中清楚地使用了“请洗脸”这个短语以及单独的“手”、“请洗”等词。对于每一种语言,我都通过 n-grams 搜索我预期该短语会出现的地方(根据其在英语平行语中的用法)。使用跨语言嵌入法对 n-grams 进行了矢量化,并使用各种距离指标与英语短语的矢量化版本进行了比较。在嵌入空间中,与英文短语“最接近”的 n-grams 被确定为目标语言匹配。
|
||||
|
||||
最后,将与英语对应的成分短语进行组合,生成目标语言中的“请洗手”短语。这种组合方式再次利用跨语言嵌入,确保组件短语的组合方式合适。例如,如果我们在目标语言中匹配“请洗脚”这个短语,就必须将“脚”对应的 n-gram 替换成“手”对应的 n-gram。下面是<ruby>伯利兹·克里奥尔<rt>Belize Kriol</rt></ruby>英语的一个例子:
|
||||
|
||||
![][9]
|
||||
|
||||
当然,在这个匹配过程中,有一些假设,这个过程完全有可能不能产生语法上正确的预测。例如,我假设在大多数语言中,“手”的单词和“脚”的单词都是一个字元长的(字元由空格和标点符号隔开)。当然,情况肯定不一定是这样。这可能会造成类似于“和洗的和手你”或类似的不好的词条。希望我们可以克服其中的一些局限性,并在未来扩展这个系统,但是,现在,我们选择用图形来强化这个想法。
|
||||
|
||||
我们将世界卫生组织的洗手说明改编成了一个 PNG 图片模板。然后,我们把我们翻译和生成的短语,用 Bash 和 Go 脚本的组合将其渲染到洗手图像中。这样,在文字和图像中都强调了正确洗手的理念(只是为了防止我们生成的翻译有问题)。
|
||||
|
||||
|
||||
![][10]
|
||||
|
||||
### 结果
|
||||
|
||||
到目前为止,我已经能够训练出 544 种语言的跨语言嵌入。我使用上述讨论过的方法尝试为所有这些语言构建“请洗手”这个短语。因为我没有许多语言对的对齐数据,所以我使用了同样包含“请洗手”成分的单独的保留文档来帮助验证构造短语中的字元。这让我们对公开发布的翻译版本有了一些信心(至少它们包含了表示“洗”和/或“手”的信息)。此外,我还将该方法与谷歌翻译支持的和/或有可用的人工翻译的语言对进行了比较。以下是来自 [Ethnologue][11] 带有语言统计的翻译样本。
|
||||
|
||||
**语言:意大利语 [Ita]**
|
||||
|
||||
- 地点:意大利
|
||||
- 人口: 68,000,000
|
||||
- 我们的系统: làvati la mani
|
||||
- 谷歌翻译: Lavati le mani
|
||||
|
||||
**语言:保加利亚语 [bul]**
|
||||
|
||||
- 地点:保加利亚
|
||||
- 人口:8,000,000
|
||||
- 我们的系统:умий ръцете
|
||||
- 谷歌翻译:Измий си ръцете
|
||||
|
||||
**语言: 荷兰语 [nld]**
|
||||
|
||||
- 地点:荷兰
|
||||
- 人口:24,000,000,000
|
||||
- 我们的系统:wast uw handen
|
||||
- 谷歌翻译:Was je handen
|
||||
|
||||
**语言: Pijin [pis]**
|
||||
|
||||
- 地点:所罗门群岛
|
||||
- 人口: 550,000
|
||||
- 我们的系统:wasim han
|
||||
- 谷歌翻译:不支持
|
||||
|
||||
**语言:Tikar [tik]**
|
||||
|
||||
- 地点:喀麦隆
|
||||
- 人口:110,000
|
||||
- 我们的系统:ɓɔsi fyàʼ
|
||||
- 谷歌翻译:不支持
|
||||
|
||||
**语言:Waffa [waj]**
|
||||
|
||||
- 地点:巴布亚新几内亚
|
||||
- 人口:1,300
|
||||
- 我们的系统:yaakuuvaitana nnikiiyauvaa fini
|
||||
- 谷歌翻译:不支持
|
||||
|
||||
构建的短语类似于参考翻译,或者似乎是“请洗手”的另一种说法。例如,在保加利亚语中,我预测为“умий ръцете”,而谷歌翻译预测为“Измий си ръцете”。然而,如果我用谷歌翻译回译我的预测,我还是会得到“请洗手”。有一些不确定的地方,我无法与参考译文(例如,所罗门群岛的 Pijin [pis])或人类注释的跨度进行比较,但我仍然可以验证“洗”(wasim)和“手”(han)分别用在其他必定是谈论洗或手的参考文件中。大约有 15% 的译文可以用这个方法验证,我希望在收集参考文献字典的过程中,能验证更多的译文。
|
||||
|
||||
请注意,我最多使用了每种语言中大约 7000 个句子来得到上述译文,即使是意大利语这样的高资源语言也是如此。我也没有依赖语言对之间的对齐句子。尽管在这种数据非常稀缺、无监督的情况下,但对于两个系统都支持的语言,我仍然能够获得类似于谷歌翻译的短语。这证明了这种“混合”方法(无监督的单词嵌入+基于规则的匹配)在将短语翻译成数据非常少的语言中的潜在用途。
|
||||
|
||||
注意:我绝对不是说这是解决冠状病毒和其他健康相关的信息传播问题的解决方案。这里仍有很多东西需要探索和正式评估,我们正在为此努力。在很多情况下,这种方法无法帮助构建数百种语言的重要信息资料。但是,我认为,我们都应该尝试着为当前危机的相关问题制定创造性的解决方案。也许这只是一个非常大的拼图中的一块。
|
||||
|
||||
你可以在[这个民族语言指南][3]上查看经过验证的译文加上人工翻译的完整列表。此外,我们即将以论文的形式对这一系统进行更深入的描述和分析。我们欢迎公众对翻译进行反馈,以帮助系统进行微调,最重要的是,确保将健康信息传递给世界各地的边缘化语言社区。
|
||||
|
||||
### 制作自己的洗手海报
|
||||
|
||||
我们已经开源了[用于渲染复合的脚本和生成洗手海报的代码][12]。这种方法应该能够处理几乎所有的语言和脚本。你可以在海报中添加你自己的“请洗手”的翻译,以帮助传播,或者根据自己的本地语境进行翻译。请务必在社交媒体上以 #WashYourHands 为标签分享你生成的海报。
|
||||
|
||||
### 培养你的 AI 技能
|
||||
|
||||
有很多令人兴奋的 AI 问题,可以给世界带来巨大的影响。如果你想用人工智能解决像上面提到的问题,或者你认为你的企业可能需要开始利用人工智能来做其他事情(供应链优化、推荐、客户服务自动化等),那么不要错过今年 5 月的[AI 课堂培训活动][13]。*AI 课堂*是一个沉浸式的、为期三天的虚拟培训活动,适合至少有一定编程经验和数学基础知识的人参加。该培训提供了使用 Python 和开源框架(如 TensorFlow 和 PyTorch)进行现实的 AI 开发的实用基础知识。完成课程后,学员将有信心开始开发和部署自己的 AI 解决方案。
|
||||
|
||||
本文经许可转载自 https://datadan.io/blog/wash-your-hands
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/4/ai-translation
|
||||
|
||||
作者:[Daniel Whitenack][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[wxy](https://github.com/wxy)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/datadan
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/world_hands_diversity.png?itok=zm4EDxgE (Two diverse hands holding a globe)
|
||||
[2]: https://www.ethnologue.com/guides/how-many-languages
|
||||
[3]: https://www.ethnologue.com/guides/health
|
||||
[4]: https://datadan.io/blog/resources-for-low-resource-machine-translation
|
||||
[5]: https://en.wikipedia.org/wiki/BLEU
|
||||
[6]: https://github.com/facebookresearch/MUSE
|
||||
[7]: https://fasttext.cc/
|
||||
[8]: https://opensource.com/sites/default/files/uploads/ai-language-translation-wash-your-hands-opensourcedotcom.gif (Using fasttext along with MUSE to perform cross-language embedding)
|
||||
[9]: https://opensource.com/sites/default/files/uploads/ai-language-translation-wash-your-hands-opensourcedotcom2.gif
|
||||
[10]: https://opensource.com/sites/default/files/uploads/ai-language-translation-wash-your-hands-opensourcedotcom3.gif
|
||||
[11]: https://www.ethnologue.com/
|
||||
[12]: https://github.com/sil-ai/wash-your-hands
|
||||
[13]: https://datadan.io/
|
Loading…
Reference in New Issue
Block a user