From c65cba5b8db89928c2ce6b829bcbed9a9e5a4b73 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 5 May 2020 22:36:16 +0800 Subject: [PATCH 01/13] PRF @robsean --- ...re SFTP Server with Chroot in Debian 10.md | 84 ++++++++++--------- 1 file changed, 43 insertions(+), 41 deletions(-) diff --git a/translated/tech/20190915 How to Configure SFTP Server with Chroot in Debian 10.md b/translated/tech/20190915 How to Configure SFTP Server with Chroot in Debian 10.md index a30b6ee817..4fe8afb9a2 100644 --- a/translated/tech/20190915 How to Configure SFTP Server with Chroot in Debian 10.md +++ b/translated/tech/20190915 How to Configure SFTP Server with Chroot in Debian 10.md @@ -7,61 +7,63 @@ [#]: via: (https://www.linuxtechi.com/configure-sftp-chroot-debian10/) [#]: author: (Pradeep Kumar https://www.linuxtechi.com/author/pradeep/) -如何在 Debian 10 中使用 Chroot 配置 SFTP 服务 +如何在 Debian 10 中配置 Chroot 环境的 SFTP 服务 ====== -**SFTP** 代表安全文件传输协议 / SSH 文件传输协议,它是最常用的一个方法,用于通过ssh将文件从本地系统安全地传输到远程服务器,反之亦然。sftp 的主要优点是,除 ‘**openssh-server**’ 之外,我们不需要安装任何额外的软件包,在大多数的 Linux 发行版中,‘openssh-server’ 软件包是默认安装的一部分。sftp 的另外一个好处是,我们可以允许用户使用 sftp ,而不允许使用 ssh 。 +SFTP 意思是“安全文件传输协议Secure File Transfer Protocol” 或 “SSH 文件传输协议SSH File Transfer Protocol”,它是最常用的用于通过 `ssh` 将文件从本地系统安全地传输到远程服务器的方法,反之亦然。`sftp` 的主要优点是,除 `openssh-server` 之外,我们不需要安装任何额外的软件包,在大多数的 Linux 发行版中,`openssh-server` 软件包是默认安装的一部分。`sftp` 的另外一个好处是,我们可以允许用户使用 `sftp` ,而不允许使用 `ssh` 。 -[![配置-sftp-debian10][1]][2] - -当前 Debian 10 ,代号‘Buster’,已经发布,在这篇文章中,我们将演示如何在 Debian 10 系统中使用 Chroot ‘Jail’ 类似的环境配置 sftp 。在这里,Chroot Jail 类似环境意味着,用户不能超出各自的 home 目录,或者用户不能从各自的 home 目录更改目录。下面实验的详细情况: - - * OS = Debian 10 - * IP 地址 = 192.168.56.151 +![](https://img.linux.net.cn/data/attachment/album/202005/05/223518ip4mbdi4nggbdtgu.jpg) +当前发布的 Debian 10 代号为 ‘Buster’,在这篇文章中,我们将演示如何在 Debian 10 系统中在 “监狱式的” Chroot 环境中配置 `sftp`。在这里,Chroot 监狱式环境意味着,用户不能超出各自的家目录,或者用户不能从各自的家目录更改目录。下面实验的详细情况: +* OS = Debian 10 +* IP 地址 = 192.168.56.151 让我们跳转到 SFTP 配置步骤, -### 步骤:1) 为 sftp 使用 groupadd 命令创建一个组 +### 步骤 1、使用 groupadd 命令给 sftp 创建一个组 -打开终端,使用下面的 groupadd 命令创建一个名为的“**sftp_users**”组, +打开终端,使用下面的 `groupadd` 命令创建一个名为的 `sftp_users` 组: ``` root@linuxtechi:~# groupadd sftp_users ``` -### 步骤:2) 添加用户到组 ‘sftp_users’ 并设置权限 +### 步骤 2、添加用户到组 sftp_users 并设置权限 -假设你想创建新的用户,并且想添加该用户到 ‘sftp_users’ 组中,那么运行下面的命令, +假设你想创建新的用户,并且想添加该用户到 `sftp_users` 组中,那么运行下面的命令, -**语法:** # useradd -m -G sftp_users +**语法:** -让我们假设用户名是 ’Jonathan’ +``` +# useradd -m -G sftp_users <用户名> +``` + +让我们假设用户名是 `jonathan`: ``` root@linuxtechi:~# useradd -m -G sftp_users jonathan ``` -使用下面的 chpasswd 命令设置密码, +使用下面的 `chpasswd` 命令设置密码: ``` -root@linuxtechi:~# echo "jonathan:" | chpasswd +root@linuxtechi:~# echo "jonathan:<输入密码>" | chpasswd ``` -假设你想添加现有的用户到 ‘sftp_users’ 组中,那么运行下面的 usermod 命令,让我们假设已经存在的用户名称是 ‘chris’ +假设你想添加现有的用户到 `sftp_users` 组中,那么运行下面的 `usermod` 命令,让我们假设已经存在的用户名称是 `chris`: ``` root@linuxtechi:~# usermod -G sftp_users chris ``` -现在设置用户所需的权限, +现在设置用户所需的权限: ``` root@linuxtechi:~# chown root /home/jonathan /home/chris/ ``` -在各用户的 home 目录中都创建一个上传目录,并设置正确地所有权, +在各用户的家目录中都创建一个上传目录,并设置正确地所有权: ``` root@linuxtechi:~# mkdir /home/jonathan/upload @@ -72,14 +74,14 @@ root@linuxtechi:~# chown chris /home/chris/upload **注意:** 像 Jonathan 和 Chris 之类的用户可以从他们的本地系统上传文件和目录。 -### 步骤:3) 编辑 sftp 配置文件 (/etc/ssh/sshd_config) +### 步骤 3、编辑 sftp 配置文件 /etc/ssh/sshd_config -正如我们已经陈述的,sftp 操作是通过 ssh 完成的,所以它的配置文件是 “**/etc/ssh/sshd_config**“, 在做任何更改前,我建议首先备份文件,然后再编辑该文件,接下来添加下面的内容, +正如我们已经陈述的,`sftp` 操作是通过 `ssh` 完成的,所以它的配置文件是 `/etc/ssh/sshd_config`,在做任何更改前,我建议首先备份文件,然后再编辑该文件,接下来添加下面的内容: ``` root@linuxtechi:~# cp /etc/ssh/sshd_config /etc/ssh/sshd_config-org root@linuxtechi:~# vim /etc/ssh/sshd_config -……… +...... #Subsystem sftp /usr/lib/openssh/sftp-server Subsystem sftp internal-sftp @@ -88,28 +90,28 @@ Match Group sftp_users AllowTcpForwarding no ChrootDirectory %h ForceCommand internal-sftp -………… +...... ``` 保存并退出文件。 -为使上述更改生效,使用下面的 systemctl 命令来重新启动 ssh 服务 +为使上述更改生效,使用下面的 `systemctl` 命令来重新启动 `ssh` 服务: ``` root@linuxtechi:~# systemctl restart sshd ``` -在上面的 ‘sshd_config’ 文件中,我们已经注释掉了以 “Subsystem”开头的行,并添加了新的条目 “Subsystem sftp internal-sftp” 和新的行,像, +在上面的 `sshd_config` 文件中,我们已经注释掉了以 `Subsystem` 开头的行,并添加了新的条目 `Subsystem sftp internal-sftp` 和新的行。而 -“**Match Group sftp_users”** –> 它意味着如果用户是 ‘sftp_users’ 组中的一员,那么将应用下面提到的规则到这个条目。 +`Match Group sftp_users` –> 它意味着如果用户是 `sftp_users` 组中的一员,那么将应用下面提到的规则到这个条目。 -“**ChrootDierctory %h**” –> 它意味着用户只能在他们自己各自的 home 目录中更改目录,而不能超出他们各自的 home 目录。或者换句话说,我们可以说用户是不允许更改目录的。他们将在他们的目录中获得 jai 类似环境,并且不能访问其他用户的目录和系统的目录。 +`ChrootDierctory %h` –> 它意味着用户只能在他们自己各自的家目录中更改目录,而不能超出他们各自的家目录。或者换句话说,我们可以说用户是不允许更改目录的。他们将在他们的目录中获得监狱一样的环境,并且不能访问其他用户的目录和系统的目录。 -“**ForceCommand internal-sftp**” –> 它意味着用户仅被限制到 sftp 命令。 +`ForceCommand internal-sftp` –> 它意味着用户仅被限制到只能使用 `sftp` 命令。 -### 步骤:4) 测试和验证 sftp +### 步骤 4、测试和验证 sftp -登录到你的 sftp 服务器的同一个网络上的任何其它的 Linux 系统,然后通过我们在 ‘sftp_users’ 组中映射的用户来尝试 ssh sftp 服务。 +登录到你的 `sftp` 服务器的同一个网络上的任何其它的 Linux 系统,然后通过我们放入 `sftp_users` 组中的用户来尝试 ssh 和 sftp 服务。 ``` [root@linuxtechi ~]# ssh root@linuxtechi @@ -121,7 +123,7 @@ Write failed: Broken pipe [root@linuxtechi ~]# ``` -以上操作证实用户不允许 SSH ,现在使用下面的命令尝试 sftp , +以上操作证实用户不允许 `ssh` ,现在使用下面的命令尝试 `sftp`: ``` [root@linuxtechi ~]# sftp root@linuxtechi @@ -133,7 +135,7 @@ drwxr-xr-x 2 root 1001 4096 Sep 14 07:52 debian10-pkgs drwxr-xr-x 2 1001 1002 4096 Sep 14 08:29 upload ``` -让我们使用 sftp ‘**get**‘ 命令来尝试下载一个文件 +让我们使用 sftp 的 `get` 命令来尝试下载一个文件: ``` sftp> get devops-actions.txt @@ -147,9 +149,9 @@ Couldn't stat remote file: No such file or directory sftp> ``` -上面的输出证实我们能从我们的 sftp 服务器下载文件到本地机器,除此之外,我们也必需测试用户不能更改目录。 +上面的输出证实我们能从我们的 sftp 服务器下载文件到本地机器,除此之外,我们也必须测试用户不能更改目录。 -让我们在 **upload**”目录下尝试上传一个文件, +让我们在 `upload` 目录下尝试上传一个文件: ``` sftp> cd upload/ @@ -163,17 +165,17 @@ sftp> 这证实我们已经成功地从我们的本地系统上传一个文件到 sftp 服务中。 -现在使用 winscp 工具来测试 SFTP 服务,输入 sftp 服务器 ip 地址和用户的凭证, +现在使用 winscp 工具来测试 sftp 服务,输入 sftp 服务器 IP 地址和用户的凭证: -[![Winscp-sftp-debian10][1]][3] +![][3] -在 Login 上单击,然后尝试下载和上传文件 +在 “Login” 上单击,然后尝试下载和上传文件: -[![下载-文件-winscp-debian10-sftp][1]][4] +![][4] -现在,在 upload 文件夹中尝试上传文件, +现在,在 `upload` 文件夹中尝试上传文件: -[![使用-winscp-Debian10-sftp-上传-文件][1]][5] +![][5] 上面的窗口证实上传是完好地工作的,这就是这篇文章的全部。如果这些步骤能帮助你在 Debian 10 中使用 chroot 环境配置 SFTP 服务器s,那么请分享你的反馈和评论。 @@ -184,7 +186,7 @@ via: https://www.linuxtechi.com/configure-sftp-chroot-debian10/ 作者:[Pradeep Kumar][a] 选题:[lujun9972][b] 译者:[robsean](https://github.com/robsean) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From f2866dc8c6d1f412e0ca0c7324089a85e7a96e69 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 5 May 2020 22:39:46 +0800 Subject: [PATCH 02/13] PUB @robsean https://linux.cn/article-12186-1.html --- ...How to Configure SFTP Server with Chroot in Debian 10.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename {translated/tech => published}/20190915 How to Configure SFTP Server with Chroot in Debian 10.md (98%) diff --git a/translated/tech/20190915 How to Configure SFTP Server with Chroot in Debian 10.md b/published/20190915 How to Configure SFTP Server with Chroot in Debian 10.md similarity index 98% rename from translated/tech/20190915 How to Configure SFTP Server with Chroot in Debian 10.md rename to published/20190915 How to Configure SFTP Server with Chroot in Debian 10.md index 4fe8afb9a2..51a75f3521 100644 --- a/translated/tech/20190915 How to Configure SFTP Server with Chroot in Debian 10.md +++ b/published/20190915 How to Configure SFTP Server with Chroot in Debian 10.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (robsean) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12186-1.html) [#]: subject: (How to Configure SFTP Server with Chroot in Debian 10) [#]: via: (https://www.linuxtechi.com/configure-sftp-chroot-debian10/) [#]: author: (Pradeep Kumar https://www.linuxtechi.com/author/pradeep/) From 06b002218761300f5686e3c1a766ae099b216df2 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 5 May 2020 23:21:47 +0800 Subject: [PATCH 03/13] PRF @wxy --- ...0 ways to analyze binary files on Linux.md | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/translated/tech/20200430 10 ways to analyze binary files on Linux.md b/translated/tech/20200430 10 ways to analyze binary files on Linux.md index 80577dfbcf..c5dbfc6f61 100644 --- a/translated/tech/20200430 10 ways to analyze binary files on Linux.md +++ b/translated/tech/20200430 10 ways to analyze binary files on Linux.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (10 ways to analyze binary files on Linux) @@ -12,11 +12,11 @@ > 这些简单的命令和工具可以帮助你轻松完成分析二进制文件的任务。 -![Tux with binary code background][1] +![](https://img.linux.net.cn/data/attachment/album/202005/05/232115nn0oduodo4oztv0a.jpg) “这个世界上有 10 种人:懂二进制的人和不懂二进制的人。” -我们每天都在与二进制文件打交道,但我们对二进制文件却知之甚少。我所说的二进制,是指你每天运行的可执行文件,从你的命令行工具到成熟的应用程序都是。 +我们每天都在与二进制文件打交道,但我们对二进制文件却知之甚少。我所说的二进制,是指你每天运行的可执行文件,从命令行工具到成熟的应用程序都是。 Linux 提供了一套丰富的工具,让分析二进制文件变得轻而易举。无论你的工作角色是什么,如果你在 Linux 上工作,了解这些工具的基本知识将帮助你更好地理解你的系统。 @@ -26,7 +26,7 @@ Linux 提供了一套丰富的工具,让分析二进制文件变得轻而易 它的作用:帮助确定文件类型。 -这将是你进行二进制分析的出发点。我们每天都在与文件打交道。并非所有的文件都是可执行类型,除此之外还有各种各样的文件类型。在你开始之前,你需要了解要分析的文件类型。它是二进制文件、库文件、ASCII 文本文件、视频文件、图片文件、PDF、数据文件等等。 +这将是你进行二进制分析的起点。我们每天都在与文件打交道,并非所有的文件都是可执行类型,除此之外还有各种各样的文件类型。在你开始之前,你需要了解要分析的文件类型。是二进制文件、库文件、ASCII 文本文件、视频文件、图片文件、PDF、数据文件等文件吗? `file` 命令将帮助你确定你所处理的文件类型。 @@ -66,11 +66,11 @@ $ ### ltrace -它的作用:一个库调用跟踪器。 +它的作用:库调用跟踪器。 我们现在知道如何使用 `ldd` 命令找到一个可执行程序所依赖的库。然而,一个库可以包含数百个函数。在这几百个函数中,哪些是我们的二进制程序正在使用的实际函数? -`ltrace` 命令可以显示在运行时从库中调用的所有函数。在下面的例子中,你可以看到被调用的函数名称,以及传递给该函数的参数。你也可以在输出的最右边看到这些函数返回的内容。 +`ltrace` 命令可以显示运行时从库中调用的所有函数。在下面的例子中,你可以看到被调用的函数名称,以及传递给该函数的参数。你也可以在输出的最右边看到这些函数返回的内容。 ``` $ ltrace ls @@ -95,7 +95,7 @@ $ 它的作用:以 ASCII、十进制、十六进制或八进制显示文件内容。 -通常情况下,当你用一个应用程序打开一个文件,而它不知道如何处理该文件时,就会出现这种情况。尝试用 `vim` 打开一个可执行文件或视频文件,你会看到的只是屏幕上抛出的乱码。 +通常情况下,当你用一个应用程序打开一个文件,而它不知道如何处理该文件时,就会出现这种情况。尝试用 `vim` 打开一个可执行文件或视频文件,你屏幕上会看到的只是抛出的乱码。 在 `hexdump` 中打开未知文件,可以帮助你看到文件的具体内容。你也可以选择使用一些命令行选项来查看用 ASCII 表示的文件数据。这可能会帮助你了解到它是什么类型的文件。 @@ -132,7 +132,7 @@ $ strings /bin/ls ELF(可执行和可链接文件格式Executable and Linkable File Format)是可执行文件或二进制文件的主流格式,不仅是 Linux 系统,也是各种 UNIX 系统的主流文件格式。如果你已经使用了像 `file` 命令这样的工具,它告诉你文件是 ELF 格式,那么下一步就是使用 `readelf` 命令和它的各种选项来进一步分析文件。 -在使用 `readelf` 命令时,有一个实际的 ELF 规范的参考是非常有用的。你可以在[这里][2]找到规范。  +在使用 `readelf` 命令时,有一份实际的 ELF 规范的参考是非常有用的。你可以在[这里][2]找到该规范。  ``` $ readelf -h /bin/ls @@ -163,9 +163,9 @@ $ 它的作用:从对象文件中显示信息。 -二进制文件是通过你编写源码的创建的,这些源码会通过一个叫做编译器的工具进行编译。这个编译器会生成相当于源代码的机器语言指令,然后由 CPU 执行,以执行特定的任务。这些机器语言代码可以通过被称为汇编语言的助记词来解读。汇编语言是一组指令,它可以帮助你理解由程序所进行并最终在 CPU 上执行的操作。 +二进制文件是通过你编写的源码创建的,这些源码会通过一个叫做编译器的工具进行编译。这个编译器会生成相对于源代码的机器语言指令,然后由 CPU 执行特定的任务。这些机器语言代码可以通过被称为汇编语言的助记词来解读。汇编语言是一组指令,它可以帮助你理解由程序所进行并最终在 CPU 上执行的操作。 -`objdump` 实用程序读取二进制或可执行文件,并将汇编语言指令转储到屏幕上。汇编语言知识对于理解 `objdump` 命令的输出是至关重要的。 +`objdump` 实用程序读取二进制或可执行文件,并将汇编语言指令转储到屏幕上。汇编语言知识对于理解 `objdump` 命令的输出至关重要。 请记住:汇编语言是特定于体系结构的。 @@ -174,7 +174,6 @@ $ objdump -d /bin/ls | head /bin/ls: file format elf64-x86-64 - Disassembly of section .init: 0000000000402150 <_init@@Base>: @@ -219,7 +218,7 @@ $ 它的作用:列出对象文件中的符号。 -如果你所使用的二进制文件没有被剥离,`nm` 命令将为你提供在编译过程中嵌入到二进制文件中的有价值的信息。`nm` 可以帮助你从二进制文件中识别变量和函数。你可以想象一下,如果你无法访问二进制文件的源代码,这将是多么有用。 +如果你所使用的二进制文件没有被剥离,`nm` 命令将为你提供在编译过程中嵌入到二进制文件中的有价值的信息。`nm` 可以帮助你从二进制文件中识别变量和函数。你可以想象一下,如果你无法访问二进制文件的源代码时,这将是多么有用。 为了展示 `nm`,我们快速编写了一个小程序,用 `-g` 选项编译,我们会看到这个二进制文件没有被剥离。 @@ -264,7 +263,7 @@ $ 分析这些路径的唯一方法是在运行时环境,在任何给定的位置停止或暂停程序,并能够分析信息,然后再往下执行。 -这就是调试器的作用,在 Linux 上,`gdb` 就是调试器的事实标准。它可以帮助你加载程序,在特定的地方设置断点,分析内存和 CPU 的寄存器,还有更多的功能。它是对上面提到的其他工具的补充,可以让你做更多的运行时分析。 +这就是调试器的作用,在 Linux 上,`gdb` 就是调试器的事实标准。它可以帮助你加载程序,在特定的地方设置断点,分析内存和 CPU 的寄存器,以及更多的功能。它是对上面提到的其他工具的补充,可以让你做更多的运行时分析。 有一点需要注意的是,一旦你使用 `gdb` 加载一个程序,你会看到它自己的 `(gdb)` 提示符。所有进一步的命令都将在这个 `gdb` 命令提示符中运行,直到你退出。 @@ -290,7 +289,8 @@ Missing separate debuginfos, use: debuginfo-install glibc-2.17-260.el7_6.6.x86_6 Continuing. Hello world![Inferior 1 (process 29620) exited normally] (gdb) q -$``` +$ +``` ### 结语 @@ -303,7 +303,7 @@ via: https://opensource.com/article/20/4/linux-binary-analysis 作者:[Gaurav Kamathe][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/) 荣誉推出 From 2fc33688b14ace7d116b6ce18319b1c4820f600b Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 5 May 2020 23:22:14 +0800 Subject: [PATCH 04/13] PUB @wxy https://linux.cn/article-12187-1.html --- .../20200430 10 ways to analyze binary files on Linux.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20200430 10 ways to analyze binary files on Linux.md (99%) diff --git a/translated/tech/20200430 10 ways to analyze binary files on Linux.md b/published/20200430 10 ways to analyze binary files on Linux.md similarity index 99% rename from translated/tech/20200430 10 ways to analyze binary files on Linux.md rename to published/20200430 10 ways to analyze binary files on Linux.md index c5dbfc6f61..35fedf607a 100644 --- a/translated/tech/20200430 10 ways to analyze binary files on Linux.md +++ b/published/20200430 10 ways to analyze binary files on Linux.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12187-1.html) [#]: subject: (10 ways to analyze binary files on Linux) [#]: via: (https://opensource.com/article/20/4/linux-binary-analysis) [#]: author: (Gaurav Kamathe https://opensource.com/users/gkamathe) From 56e24096621276c48184a8f01b1bbb0a3ec65973 Mon Sep 17 00:00:00 2001 From: "Xiaobin.Liu" Date: Tue, 5 May 2020 23:45:17 +0800 Subject: [PATCH 05/13] APL --- .../20200505 Browse the Peer-to-peer Web With Beaker Browser.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20200505 Browse the Peer-to-peer Web With Beaker Browser.md b/sources/tech/20200505 Browse the Peer-to-peer Web With Beaker Browser.md index 82129f00a5..319b8a18c5 100644 --- a/sources/tech/20200505 Browse the Peer-to-peer Web With Beaker Browser.md +++ b/sources/tech/20200505 Browse the Peer-to-peer Web With Beaker Browser.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (lxbwolf) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 0bb37bb6aec7a6661c022baa6fa47a9bae504636 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 6 May 2020 00:54:57 +0800 Subject: [PATCH 06/13] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200506=20Three=20?= =?UTF-8?q?Methods=20to=20Check=20Uptime=20of=20MySQL/MariaDB=20Database?= =?UTF-8?q?=20Server=20on=20Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200506 Three Methods to Check Uptime of MySQL-MariaDB Database Server on Linux.md --- ... MySQL-MariaDB Database Server on Linux.md | 143 ++++++++++++++++++ 1 file changed, 143 insertions(+) create mode 100644 sources/tech/20200506 Three Methods to Check Uptime of MySQL-MariaDB Database Server on Linux.md diff --git a/sources/tech/20200506 Three Methods to Check Uptime of MySQL-MariaDB Database Server on Linux.md b/sources/tech/20200506 Three Methods to Check Uptime of MySQL-MariaDB Database Server on Linux.md new file mode 100644 index 0000000000..be88629967 --- /dev/null +++ b/sources/tech/20200506 Three Methods to Check Uptime of MySQL-MariaDB Database Server on Linux.md @@ -0,0 +1,143 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Three Methods to Check Uptime of MySQL/MariaDB Database Server on Linux) +[#]: via: (https://www.2daygeek.com/check-mysql-mariadb-database-server-uptime-linux/) +[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) + +Three Methods to Check Uptime of MySQL/MariaDB Database Server on Linux +====== + +We all know the purpose of the uptime command in Linux. + +This is used to check the **[uptime of the Linux system][1]** and how long the system runs without restarting. + +The Linux admin job is to keep the system up and running. + +If you want to check how long other services like **[Apache][2]**, MySQL, MariaDB, sftp, etc., are running on Linux, how do you do that? + +Each service has their own command to check the uptime of service. + +But you can also use other commands for this purpose. + +### Method-1: How to Check the Uptime of a MySQL/MariaDB Database Server on Linux Using the ps Command + +The **[ps command][3]** stands for process status. This is one of the most basic commands that shows the system running processes with details. + +To do so, you first need to find the PID of **[MySQL][4]**/MariaDB using the **[pidof command][5]**. + +``` +# pidof mysqld | cut -d" " -f1 + +2412 +``` + +Once you have the MySQL/[**MariaDB**][6] PID, use the “etime” option with the ps command and get the uptime. + + * **etime:** elapsed time since the process was started, in the form of [[DD-]hh:]mm:ss. + + + +``` +# ps -p 2412 -o etime + + ELAPSED +2-08:49:30 +``` + +Alternatively, use the “lstart” option with the ps command to get the uptime of a given PID. + +``` +# ps -p 2412 -o lstart + + STARTED +Sat May 2 03:02:15 2020 +``` + +The MySQL/MariaDB process has been running for 2 days, 03 hours, 02 minutes and 15 seconds. + +### Method-2: How to Check the Uptime of a MySQL/MariaDB Database Server on Linux Using the Systemctl Command + +The **[systemctl command][7]** is used to control the systemd system and service manager. + +systemd is a new init system and system manager, that was adopted by most of Linux distributions now over the traditional SysVinit manager. + +``` +# systemctl status mariadb +or +# systemctl status mysql + +● mariadb.service - MariaDB 10.1.44 database server + Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled) + Drop-In: /etc/systemd/system/mariadb.service.d + └─migrated-from-my.cnf-settings.conf + Active: active (running) since Sat 2020-05-02 03:02:18 UTC; 2 days ago + Docs: man:mysqld(8) + https://mariadb.com/kb/en/library/systemd/ + Process: 2448 ExecStartPost=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS) + Process: 2388 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=/usr/bin/galera_recovery; [ $? -eq 0 ] && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS) + Process: 2386 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS) + Main PID: 2412 (mysqld) + Status: "Taking your SQL requests now…" + CGroup: /system.slice/mariadb.service + └─2412 /usr/sbin/mysqld + +May 03 21:41:26 ns2.2daygeek.com mysqld[2412]: 2020-05-03 21:41:26 140328136861440 [Warning] Host name '1.1.1.1' could not be resolved: … not known +May 04 02:00:46 ns2.2daygeek.com mysqld[2412]: 2020-05-04 2:00:46 140328436418304 [Warning] IP address '1.1.1.1' has been resolved to the host name '2…ss itself. +May 04 03:01:31 ns2.2daygeek.com mysqld[2412]: 2020-05-04 3:01:31 140328436111104 [Warning] IP address '1.1.1.1' could not be resolved: Temporary fai…resolution +May 04 04:03:06 ns2.2daygeek.com mysqld[2412]: 2020-05-04 4:03:06 140328136861440 [Warning] IP address '1.1.1.1' could not be resolved: Name or ser… not known +May 04 07:23:54 ns2.2daygeek.com mysqld[2412]: 2020-05-04 7:23:54 140328435189504 [Warning] IP address '1.1.1.1' could not be resolved: Name or service not known +May 04 08:03:31 ns2.2daygeek.com mysqld[2412]: 2020-05-04 8:03:31 140328436418304 [Warning] IP address '1.1.1.1' could not be resolved: Name or service not known +May 04 08:25:56 ns2.2daygeek.com mysqld[2412]: 2020-05-04 8:25:56 140328135325440 [Warning] IP address '1.1.1.1' could not be resolved: Name or service not known +Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable. +Hint: Some lines were ellipsized, use -l to show in full. +``` + +### Method-3: How to Check the Uptime of a MySQL/MariaDB Database Server on Linux Using the MySQLAdmin Command + +**[MySQLAdmin][8]** is a command-line utility for MySQL Server that is installed when installing the MySQL package. + +The MySQLAdmin client allows you to perform some basic administrative functions on the MySQL server. + +It is used to create a database, drop a database, set a root password, change the root password, check MySQL status, verify MySQL functionality, monitor mysql processes, and verify the configuration of the server. + +``` +# mysqladmin -u root -pPassword version + +mysqladmin Ver 8.42 Distrib 5.7.27, for Linux on x86_64 +Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. + +Oracle is a registered trademark of Oracle Corporation and/or its +affiliates. Other names may be trademarks of their respective +owners. + +Server version 5.7.27 +Protocol version 10 +Connection Localhost via UNIX socket +UNIX socket /var/lib/mysql/mysql.sock +Uptime: 1 day 10 hours 44 min 13 sec +``` + +-------------------------------------------------------------------------------- + +via: https://www.2daygeek.com/check-mysql-mariadb-database-server-uptime-linux/ + +作者:[Magesh Maruthamuthu][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.2daygeek.com/author/magesh/ +[b]: https://github.com/lujun9972 +[1]: https://www.2daygeek.com/linux-system-server-uptime-check/ +[2]: https://www.2daygeek.com/check-find-apache-httpd-web-server-uptime-linux/ +[3]: https://www.2daygeek.com/linux-ps-command-find-running-process-monitoring/ +[4]: https://www.2daygeek.com/category/mysql/ +[5]: https://www.2daygeek.com/check-find-parent-process-id-pid-ppid-linux/ +[6]: https://www.2daygeek.com/category/mariadb/ +[7]: https://www.2daygeek.com/sysvinit-vs-systemd-cheatsheet-systemctl-command-usage/ +[8]: https://www.2daygeek.com/linux-mysqladmin-command-administrate-mysql-mariadb-server/ From fa8df9c7325af368c5190b99fc02e19f09f2c868 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 6 May 2020 01:16:16 +0800 Subject: [PATCH 07/13] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200506=20After=20?= =?UTF-8?q?More=20Than=203=20Years,=20Inkscape=201.0=20is=20Finally=20Here?= =?UTF-8?q?=20With=20Tons=20of=20Feature=20Improvements?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200506 After More Than 3 Years, Inkscape 1.0 is Finally Here With Tons of Feature Improvements.md --- ... Here With Tons of Feature Improvements.md | 115 ++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 sources/tech/20200506 After More Than 3 Years, Inkscape 1.0 is Finally Here With Tons of Feature Improvements.md diff --git a/sources/tech/20200506 After More Than 3 Years, Inkscape 1.0 is Finally Here With Tons of Feature Improvements.md b/sources/tech/20200506 After More Than 3 Years, Inkscape 1.0 is Finally Here With Tons of Feature Improvements.md new file mode 100644 index 0000000000..b036d7a56a --- /dev/null +++ b/sources/tech/20200506 After More Than 3 Years, Inkscape 1.0 is Finally Here With Tons of Feature Improvements.md @@ -0,0 +1,115 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (After More Than 3 Years, Inkscape 1.0 is Finally Here With Tons of Feature Improvements) +[#]: via: (https://itsfoss.com/inkscape-1-release/) +[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) + +After More Than 3 Years, Inkscape 1.0 is Finally Here With Tons of Feature Improvements +====== + +Even though I’m not an expert, it is safe to say that Inkscape is one of the [best vector graphics editors][1]. + +Not just limited to the reason that it is free and open-source software – but it is indeed a useful application for digital artists creating something on it. + +The last release (version 0.92) was about 3 years ago. And, now, finally, [Inkscape announced its 1.0 release][2] – with a bunch of new features, additions, and improvements. + +### Inkscape 1.0: What’s New? + +![Inkscape 1.0][3] + +Here, let me highlight the important key changes that you need to know about Inkscape 1.0 release: + +#### First native macOS application + +It’s always good to have a proper cross-platform support for amazing tools like Inkscape. And, with the latest release, a native macOS application has been made available as well. + +Do note that the macOS app is still a **preview** version and has room for a lot of improvements. However, with a better system integration without needing [XQuartz][4], it should be a promising progress for macOS users. + +#### Performance Improvements + +Any kind of application/tool benefits from a significant performance boost. And, so does Inkscape. + +With its 1.0 release, they mention that you will be able to notice the smoother performance when using Inkscape for all the creative work you do. + +Except on macOS (which is still a “preview” version), Inkscape should run just fine on Linux and Windows. + +#### Improved UI and HiDPI Support + +![][5] + +In their release notes, they’ve mentioned: + +> A major milestone was achieved in enabling Inkscape to use a more recent version of the software used to build the editor’s user interface (namely GTK+3). Users with HiDPI (high resolution) screens can thank teamwork that took place during the 2018 Boston Hackfest for setting the updated-GTK wheels in motion. + +So, starting from GTK +3 user interface to the HiDPI support for high-resolution screens, it is a wonderful upgrade. + +Not to forget, you get more customization options to tweak the look and feel as well. + +#### New Feature Additions + +![][6] + +On paper, the list of new features sounds good. Depending on your expertise and what you prefer, the latest additions should come in handy. + +Here’s an overview of the new features: + + * New and improved Live Path Effect (LPE) features + * A new searchable LPE selection dialog + * Freestyle drawing users can now mirror and rotate the canvas + * The new PowerPencil mode of the Pencil tool provides pressure-dependent width and it is finally possible to create closed paths. + * New path effects that will appeal to the artistic user include Offset, PowerClip, and PowerMask LPEs. + * Ability to create a duplicate guide, aligning grids to the page, the Measure tool’s path length indicator, and the inverted Y-axis. + * Ability to export PDFs with clickable links and metadata + * New palettes and mesh gradients that work in the web browser + + + +While I’ve tried to compile the list of the key features added to this release, you can get all the nitty gritty details in their [release notes][7]. + +#### Other Important Changes + +Along with all the major changes, Inkscape 1.0 now supports Python 3. And, with that going forward, you might notice some extensions that don’t work with the latest version. + +So, if your work depends on the workflow of your extensions, I suggest you to take a closer look at their [release notes][7] to get all the technical details. + +### Download & Install Inkscape 1.0 on Linux + +Inkscape 1.0 is available in AppImage and Snap format for Linux. You can download it from Inkscape’s website. + +[Download Inkscape 1.0 for Linux][8] + +If you aren’t aware, you can check [how to use AppImage file on Linux][9] to get started. You may also refer to [this Snap guide][10]. + +Ubuntu users can find the snap version of Inskcape 1.0 in the Ubuntu Software Center. + +I used the AppImage file on [Pop OS 20.04][11] and it worked just fine to get started. You can test drive all the features in detail to see how it works out for you. + +Have you tried it yet? Let me know your thoughts in the comments below. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/inkscape-1-release/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/vector-graphics-editors-linux/ +[2]: https://inkscape.org/news/2020/05/04/introducing-inkscape-10/ +[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/05/inkscape-1-0.jpg?ssl=1 +[4]: https://en.wikipedia.org/wiki/XQuartz +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/05/inkscape-ui-customization.jpg?ssl=1 +[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/05/inkscape-live-path-effects.jpg?ssl=1 +[7]: https://wiki.inkscape.org/wiki/index.php/Release_notes/1.0 +[8]: https://inkscape.org/release/1.0/gnulinux/ +[9]: https://itsfoss.com/use-appimage-linux/ +[10]: https://itsfoss.com/install-snap-linux/ +[11]: https://itsfoss.com/pop-os-20-04-review/ From 73f3fbc0b669c5f0b41702b3c47ee465a5588d9a Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 6 May 2020 01:17:47 +0800 Subject: [PATCH 08/13] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200505=2011=20Dev?= =?UTF-8?q?Ops=20lessons=20from=20My=20Little=20Pony?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200505 11 DevOps lessons from My Little Pony.md --- ...5 11 DevOps lessons from My Little Pony.md | 96 +++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 sources/tech/20200505 11 DevOps lessons from My Little Pony.md diff --git a/sources/tech/20200505 11 DevOps lessons from My Little Pony.md b/sources/tech/20200505 11 DevOps lessons from My Little Pony.md new file mode 100644 index 0000000000..f550f871a1 --- /dev/null +++ b/sources/tech/20200505 11 DevOps lessons from My Little Pony.md @@ -0,0 +1,96 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (11 DevOps lessons from My Little Pony) +[#]: via: (https://opensource.com/article/20/5/devops-lessons) +[#]: author: (Moshe Zadka https://opensource.com/users/moshez) + +11 DevOps lessons from My Little Pony +====== +What you never thought you could learn about DevOps for Twilight Sparkle +and her friends. +![My Little Pony][1] + +In 2010, the My Little Pony franchise was rebooted with the animated show _My Little Pony: Friendship is Magic_. The combination of accessibility to children with the sophisticated themes the show tackled garnered a following that cut across ages. I was swept up in the wave and discovered there is a lot to learn about DevOps from the show. + +### Discovering technical debt + +The show begins with Twilight Sparkle reading obscure documentation, only to realize that Equestria, where the show is set, is due to suffer a calamity. Though someone named Nightmare Moon has been imprisoned for a thousand years, there is a prophecy she will return. + +#### Lesson 1: Technical debt matters. + +Nightmare Moon is a perfect stand-in for technical debt. Document it. Pay attention to the signs of risk no matter how infrequently they occur. Have a plan to resolve it. + +Twilight Sparkle goes to her manager with the news, only to be told that it is not a current priority. She is sent to Ponyville to prepare for the coming celebration, instead. + +#### Lesson 2: Communication with management is key. + +Twilight Sparkle communicated her priority (the risk of technical debt) but did not convince her management that it was more important than the celebration (of the next release or a new customer). + +We all need to make clear what the business case is for resolving critical issues. It is also not straightforward to explain technical debt in business terms. If management does not agree on the severity, find new ways to communicate the risk, and team up with others who speak that language. + +### When technical debt becomes an outage + +As the prophecy has foreseen, Nightmare Moon returns and declares eternal night. (In this DevOps story, this marks the beginning of a catastrophic outage.) Twilight quickly understands that she cannot resolve the issue by herself, and she recruits the ponies who will become, with her, the "Mane Six." They each stand for a different element of harmony—Applejack stands for Honesty, Fluttershy for Kindness, Pinkie Pie for Laughter, Rarity for Generosity, Rainbow Dash for Loyalty, and Twilight Sparkle herself for Magic. This team-building is full of lessons: + +#### Lesson 3: Few are the issues that can be resolved by one person. + +When facing an outage, reach out to other people with complementary skills who can help you. It is best if they are different than you: different backgrounds leads to differing perspectives, and that can lead to better problem-solving. + +#### Lesson 4: When resolving an outage, honest communication is key. + +Throughout the struggle against the eternal night, the Mane Six have to speak openly and honestly about what's not working. Their [blameless communication][2] is part of problem-solving. + +#### Lesson 5: When resolving an outage, kindness to yourself and to others is crucial. + +Though tempers flare hot in the land of Equestria, we all benefit from coming back to working together. + +#### Lesson 6: Laughter is important. + +Even when everything comes crashing down, remember to take a break, drink a glass of water, and take a deep breath. Stressing out does not help anything. + +#### Lesson 7: Be generous. + +Even if you are not on-call right now, if your help is needed to resolve a problem, help out as you hope your colleagues will do for you. + +#### Lesson 8: Be loyal. + +An outage is not a time to settle rivalries between teams. Focus on how to collaborate and resolve the outage as a team. + +#### Lesson 9: Though people skills are important, you have to understand the technology on a deep level. + +Keep your skills sharp. Expertise is not only the ability to learn; it is knowing when that information is needed. Part of being an expert is practice. + +### Growing into a culture of continual improvement + +After the issue is resolved, Princess Celestia realizes that the Mane Six are crucial to the long-term survival of Equestria, and tells Twilight Sparkle to stay in Ponyville and keep researching the magic of friendship. + +#### Lesson 10: After an outage is resolved, conduct a review, take concrete lessons, and act on them. + +I could go on, episode by episode, detailing lessons relevant for DevOps, but I will wrap up with one of my favorite ones. In the "Winter Wrap-Up" episode, all the ponies in Ponyville help in preparing for the spring. As per tradition, they do not use magic, leaving Twilight Sparkle to wonder how she can contribute. Eventually, she realizes that she can help by making a checklist to make sure everything is done in the right order. + +#### Lesson 11: When automation is impossible or inadvisable, write a solid checklist, and follow it. Do not depend on your memory. + +Twilight Sparkle and the Mane Six overcome great obstacles as a team, and now have a system to improve as a team. + +### A story of DevOps + +This story reflects how many organizations slowly adopt DevOps. The transition from recognizing a fear of technical debt toward addressing it is not simple. With courageous leadership, teamwork, and a willingness to improve, all organizations can come out on the other side with a similar story to Twilight Sparkle and her friends. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/5/devops-lessons + +作者:[Moshe Zadka][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/moshez +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/my-little-pony.jpg?itok=X-rwAGuE (My Little Pony) +[2]: https://opensource.com/article/19/4/psychology-behind-blameless-retrospective From a0e4f624b4db19d7fde9a83a4a8ccc29bca27ec6 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 6 May 2020 01:18:47 +0800 Subject: [PATCH 09/13] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200505=208=20open?= =?UTF-8?q?=20source=20video=20games=20to=20play?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200505 8 open source video games to play.md --- ...00505 8 open source video games to play.md | 116 ++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 sources/tech/20200505 8 open source video games to play.md diff --git a/sources/tech/20200505 8 open source video games to play.md b/sources/tech/20200505 8 open source video games to play.md new file mode 100644 index 0000000000..ac0577d96b --- /dev/null +++ b/sources/tech/20200505 8 open source video games to play.md @@ -0,0 +1,116 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (8 open source video games to play) +[#]: via: (https://opensource.com/article/20/5/open-source-fps-games) +[#]: author: (Aman Gaur https://opensource.com/users/amangaur) + +8 open source video games to play +====== +These games are fun and free to play, a way to connect with friends, and +an opportunity to make an old favorite even better. +![Gaming on a grid with penguin pawns][1] + +Video games are a big business. That's great for the industry's longevity—not to mention for all the people working in programming and graphics. But it can take a lot of work, time, and money to keep up with all the latest gaming crazes. If you feel like playing a few quick rounds of a video game without investing in a new console or game franchise, then you'll be happy to know that there are plenty of open source combat games you can download, play, share, and even modify (if you're inclined to programming) for free. + +First-person shooters (FPS) are one of the most popular categories of video games. They are centered around the perspective of the protagonist (the player), and they often offer weapon-based advancement. As you get better at the game, you survive longer, you get better weapons, and you increase your power. FPS games have a distinct look and feel, which is reflected in the category's name: players see everything—their weapons and the game world—in first person, as if they're looking through their player character's eyes. + +If you want to give one a try, check out the following eight great open source FPS games. + +### Xonotic + +![Xonotic][2] + +[Xonotic][3] is a fast-paced, arena-based FPS game. It is a popular game in the open source world. One reason could be the fact that it has never been a mainstream game. It offers a variety of weapons and enemies that are thrown right at you mercilessly from the start. Demanding quick action and response, it is an experience that will keep you on the edge of your seats. The game is available under the GPLv3+ license. + +### Wolfenstein Enemy Territory + +![Wolfenstein Enemy Territory][4] + +Wolfenstein has been a major franchise in gaming for many years. If you are a fan of gore and glory, then you've probably already heard of this game (if not, you'll love it once you try it). [Wolfenstein Enemy Territory][5] is an early iteration of the popular World War II game. It became free to play in 2003, and its [source code][6] is provided under the GPLv3. To play, however, you must own the game data (or recreate it yourself) separately (which remains under its original EULA). + +### Doom + +![Doom][7] + +[Doom][8] is a wildly popular game that was also an early example of games on Linux—way back in 2004. There are many iterations of the game, many of which have been released as open source. The game is about acquiring a teleportation device that's been captured by demons, so the violence, while gory, is low on realism. The source code for the game was provided under the GPL, but many versions require that you own the game for the game assets. There are dozens of ports and adaptations, including [Freedoom][9] (with free assets), [Dhewm3][10], [RBDoom-3-BFG][11], and many more. Try a few and pick your favorite! + +### Smokin' Guns + +![Smokin' Guns][12] + +If you're a fan of the Old West and six-shooters, this FPS is for you. From cowboys to gunslingers and with a captivating background score, [Smokin' Guns][13] has it all. It's a semi-realistic simulation of the old spaghetti western. On your way through the game, you face multiple enemies and get multiple weapons, so there's always the promise of excitement and danger around the corner. The game is free and open source under the terms of the GPLv2. + +### Nexuiz + +![Nexuiz][14] + +[Nexuiz][15] (classic) is another great FPS that's free to play on multiple platforms. The game is based on the Quake engine and has been made open source under the GNU GPLv2. The game offers multiple modes, including online, LAN party, and bot training. The game features sophisticated weapons and fast action. It's brutal and exciting, with an objective: kill as many opponents as possible before they get you. + +Note that the open source version of Nexuiz is not the same as the version built on CryEngine3 that is sold on Steam. + +### .kkrieger + +![kkrieger][16] + +[.Kkrieger][17] was developed in 2004 by .theprodukkt, a German demogroup. The game was developed using an unreleased (at the time) engine known as Werkkzeug. This game might feel a little slow to many, but it still offers an intense experience. The approaching enemies are slow, but their sheer number makes it confusing to know which one to take down first. It's an onslaught, and you have to shoot through layers of enemies before you reach the final boss. It was released in a rather raw form on [GitHub][18] by its creators under a BSD license with some public domain components. + +### Warsow + +![Warsow][19] + +If you've ever played Borderlands 2, then imagine [Warsow][20] as an arena-style Borderlands. The game is built on a modernized Quake II engine, and its plot takes a simple approach: Kill as many opponents as possible. The team with the most number of kills wins. Despite its simplicity, it features amazing weaponry and lots of great trick moves, like circle jumping, bunny hopping, double jumping, ramp sliding, and so on. It makes for an engaging multiplayer session, and it's been recognized by multiple online leagues as a worthy game for their competitions. Get the source code from [GitHub][21] or install the game from your software repository. + +### World of Padman + +![World of Padman][22] + +[The World of Padman][23] may be the last game on this list, but it's one of the most unique. Designed by PadWorld Entertainment, World of Padman takes a different twist graphically and introduces you to quirky and whimsical characters in a colorful (albeit cartoonishly violent) world. It's based on the ioquake3 engine, and its unique style and uproarious gameplay have earned it a featured place in multiple gaming magazines. You can download the source code from [GitHub][24]. + +### Give one a shot + +A game that becomes open source can act as a template for something great, whether it's a wholly open source version of an old classic, a remix of a beloved game, or an entirely new platform built on an old reliable engine. + +Open source gaming is important for many reasons: it provides users with a fun diversion, a way to connect with friends, and an opportunity for programmers and designers to hack within an existing framework. If titles like Doom weren't made open source, a little bit of video game history would be lost. Instead, it endures and has the opportunity to grow even more. + +Try an open source game, and watch your six. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/5/open-source-fps-games + +作者:[Aman Gaur][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/amangaur +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/game_pawn_grid_linux.png?itok=4gERzRkg (Gaming on a grid with penguin pawns) +[2]: https://opensource.com/sites/default/files/uploads/xonotic.jpg (Xonotic) +[3]: https://www.xonotic.org/download/ +[4]: https://opensource.com/sites/default/files/uploads/wolfensteinenemyterritory.jpg (Wolfenstein Enemy Territory) +[5]: https://www.splashdamage.com/games/wolfenstein-enemy-territory/ +[6]: https://github.com/id-Software/Enemy-Territory +[7]: https://opensource.com/sites/default/files/uploads/doom.jpg (Doom) +[8]: https://github.com/id-Software/DOOM +[9]: https://freedoom.github.io/ +[10]: https://dhewm3.org/ +[11]: https://github.com/RobertBeckebans/RBDOOM-3-BFG/ +[12]: https://opensource.com/sites/default/files/uploads/smokinguns.jpg (Smokin' Guns) +[13]: https://www.smokin-guns.org/downloads +[14]: https://opensource.com/sites/default/files/uploads/nexuiz.jpg (Nexuiz) +[15]: https://sourceforge.net/projects/nexuiz/ +[16]: https://opensource.com/sites/default/files/uploads/kkrieger.jpg (kkrieger) +[17]: https://web.archive.org/web/20120204065621/http://www.theprodukkt.com/kkrieger +[18]: https://github.com/farbrausch/fr_public +[19]: https://opensource.com/sites/default/files/uploads/warsow.jpg (Warsow) +[20]: https://www.warsow.net/download +[21]: https://github.com/Warsow +[22]: https://opensource.com/sites/default/files/uploads/padman.jpg (World of Padman) +[23]: https://worldofpadman.net/en/ +[24]: https://github.com/PadWorld-Entertainment From 20388ad705e6854d78dd86f496f84b9d6b4e80c2 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 6 May 2020 01:19:38 +0800 Subject: [PATCH 10/13] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200505=20Analyzin?= =?UTF-8?q?g=20data=20science=20code=20with=20R=20and=20Emacs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200505 Analyzing data science code with R and Emacs.md --- ...zing data science code with R and Emacs.md | 133 ++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 sources/tech/20200505 Analyzing data science code with R and Emacs.md diff --git a/sources/tech/20200505 Analyzing data science code with R and Emacs.md b/sources/tech/20200505 Analyzing data science code with R and Emacs.md new file mode 100644 index 0000000000..ebcfadbe92 --- /dev/null +++ b/sources/tech/20200505 Analyzing data science code with R and Emacs.md @@ -0,0 +1,133 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Analyzing data science code with R and Emacs) +[#]: via: (https://opensource.com/article/20/5/r-emacs-data-science) +[#]: author: (Peter Prevos https://opensource.com/users/danderzei) + +Analyzing data science code with R and Emacs +====== +Emacs' versatility and extensibility bring the editor's full power into +play for writing data science code. +![metrics and data shown on a computer screen][1] + +Way back in 2012, _Harvard Business Review_ published an article that proclaimed "data scientist" to be the [sexiest job][2] of the 21st century. Interest in data science has exploded since then. Many great open source projects, such as [Python][3] and the [R language][4] for statistical computing, have facilitated the rapid developments in how we analyze data. + +I started my career using pencil and paper and moved to spreadsheets. Now the R language is my weapon of choice when I need to create value from data. Emacs is another one of my favorite tools. This article briefly explains how to use the [Emacs Speaks Statistics][5] (ESS) package to get started with developing R projects in this venerable editor. + +The vast majority of R developers use the [RStudio][6] IDE to manage their projects. RStudio is a powerful open source editor with specialized functionality to develop data science projects. RStudio is a great integrated development environment (IDE), but its editing functions are limited. + +Using Emacs to write data science code means that you have access to the full power of this extensible editor. I prefer using Emacs for my data science projects because I can do many other tasks within the same application, leveraging the multifunctionality of this venerable editor. If you are just getting started with Emacs, then please first read Seth Kenlon's [Emacs getting started][7] article. + +### Setting up Emacs for R + +Emacs is an almost infinitely extensible text editor, which unfortunately means that many things don't work the way you want them to out of the box. Before you can write and execute R scripts, you need to install some packages and configure them. The ESS package provides an interface between Emacs and R. Other packages, such as [Company][8] and [highlight-parentheses][9] help with completion and balancing parentheses. + +Emacs uses a version of Lisp for configuration. The lines of [Emacs Lisp][10] code below install the required extensions and define a minimal configuration to get you started. These lines were tested for GNU Emacs version 26.3. + +Copy these lines and save them in a file named **init.el** in your **.emacs.d** folder. This is the folder that Emacs uses to store configurations, including the [init file][11]. If you already have an init file, then you can append these lines to your config. This minimal configuration is enough to get you started. + + +``` +;; Elisp file for R coding with Emacs + +;; Add MELPA repository and initialise the package manager +(require 'package) +(add-to-list 'package-archives +             '("melpa" . "")) +(package-initialize) + +;; Install use-package,in case it does not exist yet +;; The use-package software will install all other packages as required +(unless (package-installed-p 'use-package) +  (package-refresh-contents) +  (package-install 'use-package)) + +;; ESS configurationEmacs Speaks Statistics +(use-package ess +  :ensure t +) + +;; Auto completion +(use-package company +  :ensure t +  :config +  (setq company-idle-delay 0) +  (setq company-minimum-prefix-length 2) +  (global-company-mode t) +) + +; Parentheses +(use-package highlight-parentheses +  :ensure t +  :config +  (progn +    (highlight-parentheses-mode) +    (global-highlight-parentheses-mode)) +  ) +``` + +### Using the R console + +To start an R console session, press **M-x R** and hit **Enter** (**M** is the Emacs way to denote the **Alt** or **Command** key). ESS will ask you to nominate a working directory, which defaults to the folder of the current buffer. You can use more than one console in the same Emacs session by repeating the R command. + +Emacs opens a new buffer for your new R console. You can also use the **Up** and **Down** arrow keys to go to previous lines and re-run them. Use the **Ctrl** and **Up/Down** arrow keys to recycle old commands. + +The Company ("complete anything") package manages autocompletion in both the console and R scripts. When entering a function, the mini-buffer at the bottom of the screen shows the relevant parameters. When the autocompletion dropdown menu appears, you can press **F1** to view the chosen option's Help file before you select it. + +The [highlight-parentheses][9] package does what its name suggests. Several other Emacs packages are available to help you balance parentheses and other structural elements in your code. + +### Writing R scripts + +Emacs recognizes R mode for any buffer with a **.R** extension (the file extension is case-sensitive). Open or create a new file with the **C-x C-f** shortcut and type the path and file name. You can start writing your code and use all of the powerful editing techniques that Emacs provides. + +Several functions are available to evaluate the code. You can evaluate each line separately with **C-<return>**, while **C-c C-c** will evaluate a contiguous region. Keying **C-c C-b** will evaluate the whole buffer. + +When you evaluate some code, Emacs will use any running console or ask you to open a new console to run the code. + +The output of any plotting functions appears in a window outside of Emacs. If you prefer to view the output within Emacs, then you need to save the output to disk and open the resulting file in a separate buffer. + +![Literate programming in Org mode, the ESS buffer, and graphics output.][12] + +Literate programming in Org mode, the ESS buffer, and graphics output. + +### Advanced use + +This article provides a brief introduction to using R in Emacs. Many parameters can be fine-tuned to make Emacs behave according to your preferences, but it would take too much space to cover them here. The [ESS manual][13] describes these in detail. You can also extend functionality with additional packages. + +Org mode can integrate R code, providing a productive platform for literate programming. If you prefer to use RMarkdown, the [Polymode][14] package has you covered. + +Emacs has various packages to make your editing experience more efficient. The best part of using Emacs to write R code is that the program is more than just an IDE; it is a malleable computer system that you can configure to match your favorite workflow. + +Learning how to configure Emacs can be daunting. The best way to learn quickly is to copy ideas from people who share their configurations. Miles McBain manages a [list of Emacs configurations][15] that could be useful if you want to explore using the R language in Emacs further. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/5/r-emacs-data-science + +作者:[Peter Prevos][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/danderzei +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/metrics_data_dashboard_system_computer_analytics.png?itok=oxAeIEI- (metrics and data shown on a computer screen) +[2]: https://hbr.org/2012/10/data-scientist-the-sexiest-job-of-the-21st-century +[3]: https://www.python.org/ +[4]: https://www.r-project.org/ +[5]: https://ess.r-project.org/ +[6]: https://opensource.com/article/18/2/getting-started-RStudio-IDE +[7]: https://opensource.com/article/20/3/getting-started-emacs +[8]: https://company-mode.github.io/ +[9]: https://github.com/tsdh/highlight-parentheses.el +[10]: https://en.wikipedia.org/wiki/Emacs_Lisp +[11]: https://www.gnu.org/software/emacs/manual/html_node/emacs/Init-File.html +[12]: https://opensource.com/sites/default/files/uploads/r-ess-screenshot.jpg (Literate programming in Org mode, the ESS buffer, and graphics output.) +[13]: https://ess.r-project.org/index.php?Section=documentation&subSection=manuals +[14]: https://github.com/polymode/polymode +[15]: https://github.com/MilesMcBain/esscss From bbb7192034188dc2b21697981518e40fc3701d04 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Wed, 6 May 2020 08:22:48 +0800 Subject: [PATCH 11/13] Rename sources/tech/20200506 After More Than 3 Years, Inkscape 1.0 is Finally Here With Tons of Feature Improvements.md to sources/news/20200506 After More Than 3 Years, Inkscape 1.0 is Finally Here With Tons of Feature Improvements.md --- ...scape 1.0 is Finally Here With Tons of Feature Improvements.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => news}/20200506 After More Than 3 Years, Inkscape 1.0 is Finally Here With Tons of Feature Improvements.md (100%) diff --git a/sources/tech/20200506 After More Than 3 Years, Inkscape 1.0 is Finally Here With Tons of Feature Improvements.md b/sources/news/20200506 After More Than 3 Years, Inkscape 1.0 is Finally Here With Tons of Feature Improvements.md similarity index 100% rename from sources/tech/20200506 After More Than 3 Years, Inkscape 1.0 is Finally Here With Tons of Feature Improvements.md rename to sources/news/20200506 After More Than 3 Years, Inkscape 1.0 is Finally Here With Tons of Feature Improvements.md From 1a966c068ded416f55cdfc4bd145d11dcfb4cf5f Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Wed, 6 May 2020 08:25:33 +0800 Subject: [PATCH 12/13] Rename sources/tech/20200505 11 DevOps lessons from My Little Pony.md to sources/talk/20200505 11 DevOps lessons from My Little Pony.md --- .../20200505 11 DevOps lessons from My Little Pony.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => talk}/20200505 11 DevOps lessons from My Little Pony.md (100%) diff --git a/sources/tech/20200505 11 DevOps lessons from My Little Pony.md b/sources/talk/20200505 11 DevOps lessons from My Little Pony.md similarity index 100% rename from sources/tech/20200505 11 DevOps lessons from My Little Pony.md rename to sources/talk/20200505 11 DevOps lessons from My Little Pony.md From 40bb59f0f21f43ea281031b80bc42dc2edffc89c Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 6 May 2020 08:35:34 +0800 Subject: [PATCH 13/13] translated --- ...and Folders on Desktop Screen in Ubuntu.md | 100 ------------------ ...and Folders on Desktop Screen in Ubuntu.md | 100 ++++++++++++++++++ 2 files changed, 100 insertions(+), 100 deletions(-) delete mode 100644 sources/tech/20200428 Using Files and Folders on Desktop Screen in Ubuntu.md create mode 100644 translated/tech/20200428 Using Files and Folders on Desktop Screen in Ubuntu.md diff --git a/sources/tech/20200428 Using Files and Folders on Desktop Screen in Ubuntu.md b/sources/tech/20200428 Using Files and Folders on Desktop Screen in Ubuntu.md deleted file mode 100644 index 32eeaa9c95..0000000000 --- a/sources/tech/20200428 Using Files and Folders on Desktop Screen in Ubuntu.md +++ /dev/null @@ -1,100 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Using Files and Folders on Desktop Screen in Ubuntu) -[#]: via: (https://itsfoss.com/add-files-on-desktop-ubuntu/) -[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) - -Using Files and Folders on Desktop Screen in Ubuntu -====== - -_**This beginner tutorial discusses a few difficulties you may face while adding files and folders on the desktop screen on Ubuntu.**_ - -I know a few people who are habitual of putting all the important/frequently used files on the desktop screen for quick access. - -![][1] - -I am not a fan of a cluttered desktop screen but I can imagine that it might actually be helpful to some people. - -For the past few releases, it has been difficult to add files on the desktop screen in Ubuntu’s default GNOME desktop. It’s not really Ubuntu’s fault. - -The [GNOME][2] developers thinks that there is no place for icons and files on the desktop screen. There is no need of putting files on the desktop when you can easily search for it in the menu. And that’s part true. - -This is why the newer version of [GNOME’s File Manager Nautilus][3] doesn’t support icons and files on the desktop very well. - -That said, it’s not impossible to add files and folders on the desktop. Let me show you how you can still use it. - -### Adding files and folders on the desktop screen in Ubuntu - -![][4] - -I am using Ubuntu 20.04 in this tutorial. The steps may or may not vary for other Ubuntu versions. - -#### Add the files and folders to the “Desktop folder” - -If you open the file manager, you should see an entry called Desktop in the left sidebar or in the folders list. This folder represents your desktop screen (in a way). - -![Desktop folder can be used to add files to the desktop screen][5] - -Anything you add to this folder will be reflected on the desktop screen. - -![Anything added to the Desktop folder will be reflected on the desktop screen][6] - -If you delete files from this ‘Desktop folder’, it will be removed from the desktop screen as well. - -#### Drag and drop files to desktop screen doesn’t work - -Now, if you try to drag and drop files from the file manager on the desktop, it won’t work. It’s not a bug, it’s a feature that irks a lot of people. - -A workaround would be to open two instances of the file manager. Open Desktop folder in one of them and then drag and drop files to this folder and they will be added on the desktop. - -I know that’s not ideal but you don’t have a lot of choices here. - -#### You cannot use Ctrl+C and Ctrl+V to copy-paste on the desktop, use the right click menu - -To add salt to injury, you cannot use Ctrl+V the famous keyboard shortcut to paste files on the desktop screen. - -But you can still use the right click context menu and select Paste from there to put the copied files on the desktop. You can even create new folders this way. - -![Right click menu can be used for copy-pasting files to desktop][7] - -Does it make sense? Not to me but that’s how it is in Ubuntu 20.04. - -#### You cannot delete files and folder using the Delete key, use the right click menu again - -What’s worse is that you cannot use the delete key or shift delete key to remove files from the desktop screen. But you can still right click on the files or folders and select “Move to trash” to delete the file. - -![Delete files from desktop using right click][8] - -Alright, so now you know that at least there is a way to add files on the desktop with some restrictions. But it doesn’t end here unfortunately. - -You cannot search for files with their names on the desktop screen. Normally, if you start typing ‘abc’, files starting with ‘abc’ are highlighted. You don’t get it here. - -I don’t know why so many restrictions have been put on adding files on the desktop. Thankfully, I don’t use it a lot otherwise I have been way too frustrated. - -If interested, you may read about [adding application shortcut on the desktop in Ubuntu][9] as well. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/add-files-on-desktop-ubuntu/ - -作者:[Abhishek Prakash][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/abhishek/ -[b]: https://github.com/lujun9972 -[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/files-on-desktop-ubuntu.jpg?ssl=1 -[2]: https://www.gnome.org/ -[3]: https://wiki.gnome.org/Apps/Files -[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/adding-files-desktop-ubuntu.png?ssl=1 -[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/desktop-folder-ubuntu.png?ssl=1 -[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/adding-files-desktop-screen-ubuntu.jpg?ssl=1 -[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/adding-new-files-ubuntu-desktop.jpg?ssl=1 -[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/delete-files-from-desktop-ubuntu.jpg?ssl=1 -[9]: https://itsfoss.com/ubuntu-desktop-shortcut/ diff --git a/translated/tech/20200428 Using Files and Folders on Desktop Screen in Ubuntu.md b/translated/tech/20200428 Using Files and Folders on Desktop Screen in Ubuntu.md new file mode 100644 index 0000000000..984bb4dedb --- /dev/null +++ b/translated/tech/20200428 Using Files and Folders on Desktop Screen in Ubuntu.md @@ -0,0 +1,100 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Using Files and Folders on Desktop Screen in Ubuntu) +[#]: via: (https://itsfoss.com/add-files-on-desktop-ubuntu/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) + +在 Ubuntu 桌面中使用文件和文件夹 +====== + +_**此初学者教程讨论了 在Ubuntu 桌面上添加文件和文件夹时可能遇到的一些困难。**_ + +我认识一些习惯将所有重要/常用文件放在桌面上以便快速访问的人。 + +![][1] + +我不喜欢杂乱的桌面,但是我可以想象它实际上可能对某些人有所帮助。 + +在过去的几个版本中,很难在 Ubuntu 的默认 GNOME 桌面上添加文件。这并不是 Ubuntu 的错。 + +[GNOME][2] 的开发者认为,桌面上没有图标和文件的位置。当你可以在菜单中轻松搜索文件时,无需将文件放在桌面上。这部分是事实。 + +这就是为什么 [GNOME 的文件管理器 Nautilus][3]的较新版本不能很好地支持桌面上的图标和文件的原因。 + +也就是说,在桌面上添加文件和文件夹并非没有可能。让我告诉你如何做。 + +### 在 Ubuntu 的桌面上添加文件和文件夹 + +![][4] + +我在本教程中使用的是 Ubuntu 20.04。对于其他 Ubuntu 版本,步骤可能会有所不同。 + +#### 将文件和文件夹添加到“桌面文件夹” + +如果打开文件管理器,你应该在左侧边栏或文件夹列表中看到一个名为“桌面”的条目。此文件夹(以某种方式)代表你的桌面。 + +![Desktop folder can be used to add files to the desktop screen][5] + +你添加到此文件夹的所有内容都会反应在桌面上。 + +![Anything added to the Desktop folder will be reflected on the desktop screen][6] + +如果你从“桌面文件夹”中删除文件,那么文件也会从桌面中删除。 + +#### 将文件拖放到桌面不起作用 + +现在,如果你尝试在桌面上从文件管理器拖放文件,它会不起使用。这不是一个 bug,它是一个使很多人恼火的功能。 + +一种临时方案是打开两个文件管理器。在其中一个打开“桌面”文件夹,然后将文件拖放到该文件夹​​中,它们将被添加到桌面上。 + +我知道这并不理想,但是你没有太多选择。 + +#### 你不能使用 Ctrl+C 和 Ctrl+V 在桌面上复制粘贴,请使用右键单击菜单 + +更恼人的是,你不能使用 Ctrl+V(著名的键盘快捷键)将文件粘贴到桌面上。 + +但是,你仍然可以使用右键单击,然后选择“粘贴”,将文件复制到桌面上。你甚至可以通过这种方式创建新文件夹。 + +![Right click menu can be used for copy-pasting files to desktop][7] + +是否有意义?对我来说不是,但这就是 Ubuntu 20.04 的方式。 + +#### 你无法使用 Delete 键删除文件和文件夹,请再次使用右键菜单 + +更糟糕的是,你无法使用 Delete 键或 Shift+Delete 键从桌面上删除文件。但是你仍然可以右键单击文件或文件夹,然后选择“移至回收站”来删除文件。 + +![Delete files from desktop using right click][8] + +好了,你现在知道至少有一种方法可以在桌面上添加文件,但有一些限制。不幸的是,这还没有结束。 + +你无法在桌面上用名称搜索文件。通常,如果你开始输入 “abc”,那么以 “abc” 开头的文件会高亮显示。你并不明白。 + +我不知道为什么在桌面上添加文件受到了如此多的限制。值得庆幸的是,我不会经常使用它,否则我会感到非常沮丧。 + +如果有兴趣,你也可以阅读[在 Ubuntu 桌面上添加应用快捷方式][9]这篇文章。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/add-files-on-desktop-ubuntu/ + +作者:[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://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/files-on-desktop-ubuntu.jpg?ssl=1 +[2]: https://www.gnome.org/ +[3]: https://wiki.gnome.org/Apps/Files +[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/adding-files-desktop-ubuntu.png?ssl=1 +[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/desktop-folder-ubuntu.png?ssl=1 +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/adding-files-desktop-screen-ubuntu.jpg?ssl=1 +[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/adding-new-files-ubuntu-desktop.jpg?ssl=1 +[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/delete-files-from-desktop-ubuntu.jpg?ssl=1 +[9]: https://itsfoss.com/ubuntu-desktop-shortcut/