Merge pull request #34 from LCTT/master

更新 20200326
This commit is contained in:
FSSlc 2020-03-26 13:54:08 +08:00 committed by GitHub
commit 7296ab8553
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
174 changed files with 19315 additions and 4901 deletions

View File

@ -1,8 +1,8 @@
[#]: collector: (lujun9972)
[#]: translator: (lujun9972)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-11949-1.html)
[#]: subject: (Fun and Games in Emacs)
[#]: via: (https://www.masteringemacs.org/article/fun-games-in-emacs)
[#]: author: (Mickey Petersen https://www.masteringemacs.org/about)
@ -78,9 +78,9 @@ Emacs 中汉诺塔的实现可以追溯到 20 世纪 80 年代中期——确实
我喜欢 `fortune` 命令。每当我启动一个新 shell 时,这些与文学片段、谜语相结合的刻薄、无益、常常带有讽刺意味的“建议”就会点亮我的一天。
令人困惑的是Emacs 中有两个包或多或少地做着类似的事情:`fortune` 和 `cookie1`。前者主要用于在电子邮件签名中添加幸运饼干消息,而后者只是一个简单的 fortune 格式阅读器。
令人困惑的是Emacs 中有两个包或多或少地做着类似的事情:`fortune` 和 `cookie`。前者主要用于在电子邮件签名中添加幸运饼干消息,而后者只是一个简单的 fortune 格式阅读器。
不管怎样,使用 Emacs 的 `cookie1` 包前,你首先需要通过 `customize-option RET cookie RET` 来自定义变量 `cookie-file` 告诉它从哪找到 fortune 文件。
不管怎样,使用 Emacs 的 `cookie` 包前,你首先需要通过 `customize-option RET cookie RET` 来自定义变量 `cookie-file` 告诉它从哪找到 fortune 文件。
如果你的操作系统是 Ubuntu那么你先安装 `fortune` 软件包,然后就能在 `/usr/share/games/fortune/` 目录中找到这些文件了。

View File

@ -0,0 +1,71 @@
探索自由而开放的 Web 字体
======
> 谷歌字体和开放字体库中的免费 Web 字体已经改变了游戏规则,但仅在有限的范围内。
![](https://img.linux.net.cn/data/attachment/album/202003/08/174910xoklikblgkkbooib.jpg)
毫无疑问,近些年来互联网的面貌已经被开源字体所改变。早在 2010 年之前,你在 Web 浏览器上几乎只能看到微软制作的通常“Web 安全”的[核心字体][1]。但这一年2010正好是好几轮技术革新开始的见证之年<ruby>[Web 开放字体格式][2]<rt>Web Open Font Format</rt></ruby>WOFF的引入为通过 HTTP 有效地传输字体文件提供了一个开放的标准,以及像[谷歌字体][3]和<ruby>[开放字体库][4]<rt>Open Font Library</rt></ruby>这样的 Web 字体服务的推出,使得 Web 内容发布者可以在开源许可证之下免费使用海量的字体库。
这些事件对 Web 排版的积极影响再夸大都不过分。但是要将 Web 开放字体的成功与整个开源排版等同起来,并得到结论——挑战已经远离了我们,困难悉数被解决了——却很容易。然而事实并非如此,如果你很关注字体,那么好消息是你有好多机会参与到对这些字体的改进工作当中去。
对新手来说,至关重要的是必须要意识到谷歌字体和开放字体库提供了专用的服务(为网页提供字体),而没有为其他使用情况制定字体解决方案。这不是服务方面的缺点,这只是意味着我们必须去开发其它的解决方案。
需要解决的问题还非常多。可能最明显的例子就是给 Linux 桌面计算机的其他软件安装字体所遇到的尴尬情况。你可以通过任何一种服务下载任何一种 Web 字体,但是你得到的只是一个最普通的压缩包文件,里面有一些 TTF 或 OTF 二进制文件和一个普通文本文件的许可证。接下来会发生什么完完全全需要你去猜。
大部分用户很快学会了“正确”的步骤就是手动地复制这些字体二进制文件到他们硬盘里几个特殊文件夹里的某一个里。但是这样做只能使这个文件对操作系统可见。它并不能为用户体验带来什么提升。再强调一遍,这不是 Web 字体服务的缺陷,相反它佐证了对于关于服务到哪里停止和需要在其他方面做更多工作的观点。
在用户视角来说,一个巨大的提升可能就是在“只是下载”这个阶段,操作系统或者桌面环境变得更智能。系统或桌面环境不仅会把字体文件安装到正确的位置上,更重要的是,当用户选择要在一个项目中使用的字体时,它会自己添加用户所需要的重要的元数据。
这些附加信息包含的内容与它如何呈现给用户与另一个挑战有关:与其它操作系统相比,在 Linux 环境管理一个字体库显然不那么令人满意。字体管理器总是时不时的出现一下(例如 [GTK+ 字体管理器][5],这是最近的一个例子),但是它们很少变得流行起来。我一直在思考一大堆这些软件让人失望的方面。一个核心的原因是它们把自己局限于只展示内嵌在二进制字体文件内的信息:基本字符集的覆盖、粗细/宽度和斜率的设定,内置的许可证和版权说明等等。
但是除了这些内嵌数据中的内容,在选择字体的过程中还涉及很多决策。严肃的字体用户,像信息设计者、杂志文章作者,或者书籍美工设计者,他们的字体选择是根据每一份文件的要求和需求做出的。这当然包含了许可证信息,但它还包含了更多,像关于设计师和厂商的信息、潮流风格的趋势,或者字体在使用中的细节。
举个例子,如果你的文档包含了英语和阿拉伯文,你多半想要拉丁文和阿拉伯文的字体由同时熟悉这两种<ruby>字母系统<rt>script</rt></ruby>的设计师所设计。否则,你将浪费一大堆时间来微调字体大小和行间距来使两种字母系统良好地结合在一起。你可能从经验中学到,某些设计师或字体厂商比其他人更善于多种字母系统设计。或许和你职业相关的是今天的时尚杂志几乎无一例外的采用 “[Didone][6]”风格的字体,“[Didone][6]”是指一种两百多年前最先被 [Firmin Didot][7] 和 [Giambattista Bodoni][8] 设计出来的超高反差的字体风格。这种字体恰好就是现在的潮流。
但是像 Didone、Didot 或 Bodoni 这些术语都不可能会出现在二进制文件的内置数据当中,你也不容易判断拉丁文和阿拉伯文是否相得益彰或其它关于字体的历史背景。这些信息有可能出现在补充的材料中,类似某种字形样本或字体文件中,如果这些东西存在的话。
<ruby>字形样本<rt>specimen</rt></ruby>是一份设计好的文档(一般是 PDF它展示了这种字体的使用情况而且包括了背景信息。字形样本经常在挑选字体时充当市场营销和外观样例的双重角色。一份精心设计的样本展示了字体在实际应用中的情况和在自动生成的字符表中所不能体现的风格。字形样本文件也有可能包含了一些其他重要信息比如怎样激活字体的 OpenType 特性、提供的数学表达式或古体字,或者它在支持的多种语言上的风格变化。在字体管理应用程序中向用户提供此类材料,对于帮助用户找到适合其项目需求的字体将大有帮助。
当然如果我们希望一个字体管理软件能够处理文件和样本问题我们也必须仔细观察一下各种发行版提供的字体包所随附的内容。Linux 的用户刚开始只有自动安装的那几种字体,并且发行版存储库提供的包是大部分用户除了下载通用的压缩包档案之外的唯一字体来源。这些包往往非常的“简陋”。商业字体总的来说都包含了样本、文档,还有其他的支持项目,然而开源字体往往没有这些配套文件。
也有一些优秀的开放字体提供了高质量的样本和文档(例如 [SIL Gentium][9] 和 [Bungee][10] 是两种差异明显但是都有效的方案),但是它们几乎不涉足下游的打包工作链。我们显然可以做的更好一些。
要在系统的字体交互方面提供更丰富的用户体验上面还存在一些技术问题。一方面,[AppStream][11] 的元数据标准定义了一些字体文件特有的参数,但是到现在为止,这些参数没有包含样本、设计师/厂商和其他相关细节的任何信息。另外一个例子,[SPDX][13]<ruby>软件包数据交换<rt>Software Package Data Exchange</rt></ruby>)格式也没有包含太多用于分发字体的软件许可证(及许可证变体)。
最后,就像任何一个唱片爱好者都会告诉你的,一个不允许你编辑和完善你的 MP3 曲库中的 ID3 信息的音乐播放器很快就会变得令人失望LCTT 译注ID3 信息是 MP3 文件头部的元信息,用于存储歌曲信息)。你想要处理标签里的错误、想要添加注释和专辑封面之类的信息,本质上,这就是完善你的音乐库。同样,你可能也想要让你的本地字体库也保持在一个方便使用的状态。
但是改动字体文件的内置数据一直有所忌讳,因为字体往往是被内置或附加到其他文件里的。如果你随意改变了字体二进制文件中的字段,然后将其与你的演示文稿一起重新分发,那么下载这些演示文稿的任何人最终都会得到错误的元数据,但这个错误不是他们自己造成的。所以任何一个要改善字体管理体验的人都要想明白如何从策略上解决对内置或外置的字体元数据的重复修改。
除了技术角度之外,丰富的字体管理经验也是一项设计挑战。就像我在前面说的一样,有几种开放字体也带了良好的样本和精心编写的文档。但是更多的字体包这两者都没有,还有大量的更老的字体包已经没有人维护了。这很可能意味着大部分开放字体包想要获得样本和证明文件的唯一办法就是让社区去创建它们。
也许这是一个很高的要求。但是开源设计社区现在比以往任何时候都要庞大,它是整个自由开源软件运动中的一个高度活跃的组成部分。所以谁知道呢,也许明年这个时候会发现,在 Linux 桌面系统查找、下载和使用字体会变成一种完全不同的体验。
在这一连串关于现代 Linux 用户的文字设计上的挑战的思考中包含了打包、文档设计,甚至有可能需要在桌面环境加入不少新的软件部分。此外还有其他一系列的东西也需要考虑。其共通性就是在 Web 字体服务不可及的地方,事情就会变得更加困难。
从我的视角来看,最好的消息是现在比起以前有更多的人对这个话题感兴趣。我认为我们要感谢像谷歌字体和开放字体库这样的 Web 字体服务巨头让开放字体得到了更高的关注。
--------------------------------------------------------------------------------
via: https://opensource.com/article/18/3/webfonts
作者:[Nathan Willis][a]
译者:[Fisherman110](https://github.com/Fisherman110)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:https://opensource.com/users/n8willis
[1]:https://en.wikipedia.org/wiki/Core_fonts_for_the_Web
[2]:https://en.wikipedia.org/wiki/Web_Open_Font_Format
[3]:https://fonts.google.com/
[4]:https://fontlibrary.org/
[5]:https://fontmanager.github.io/
[6]:https://en.wikipedia.org/wiki/Didone_(typography)
[7]:https://en.wikipedia.org/wiki/Firmin_Didot
[8]:https://en.wikipedia.org/wiki/Giambattista_Bodoni
[9]:https://software.sil.org/gentium/
[10]:https://djr.com/bungee/
[11]:https://www.freedesktop.org/wiki/Distributions/AppStream/
[12]:https://www.freedesktop.org/software/appstream/docs/sect-Metadata-Fonts.html
[13]:https://spdx.org/

View File

@ -0,0 +1,109 @@
你所不知道的用 less 查看文件的高级用法
======
> 使用 less 文件查看器的一些技巧。
![](https://img.linux.net.cn/data/attachment/album/202003/16/152826assmtybsohopo4b7.png)
最近,我正在拜读 Scott Nesbitt 的文章《[在 Linux 命令行中使用 less 来查看文本文件][1]》,并受到了一些启发,所以我想分享一些使用 `less` 命令的技巧。
### LESS 环境变量
如果你定义了环境变量 `LESS`(例如在 `.bashrc` 中),那么 `less` 会将其视为一个选项列表,就像在命令行中传递给它一样。
我这样定义:
```
LESS='-C -M -I -j 10 -# 4'
```
它的意思是:
* `-C` 通过不从底部滚动来加快全屏打印速度。
* `-M` 在最后一行(状态行)显示更多信息。你可以使用 `-PM` 来自定义显示的信息,但我通常只用 `-M`
* `-I` 忽略搜索中的大小写。
* `-j 10` 在终端的第 10 行而不是第一行显示搜索结果。这样,每次按 `n` 或(`N` 跳到下一个(或上一个)匹配项时,就会有 10 条上下文。
* `-# 4` 当按下向右或向左的箭头时,会向右或向左跳四个字符。默认情况时跳转半个屏幕,我觉得太多了。一般来说,`less` 似乎(至少部分)是按最初开发它时的环境优化的,那时使用慢速调制解调器和低带宽的互联网连接,所以跳过半个屏幕是有意义的。
### PAGER 环境变量
许多程序使用在 `PAGER` 环境变量中的命令来显示信息。因此,你可以在 `.bashrc` 中设置 `PAGER=less`,然后让程序运行 `less`。查看手册页(`man 7 environ`)中是否有其它此类变量。
### -S
`-S` 告诉 `less` 将长行切断而不是将它们换行。除非我在(或我要)查看文件,否则我很少需要这样做。幸运的是,你可以在 `less` 中输入所有命令行选项,就像它们是键盘命令一样。因此,如果我想在文件已经打开的情况下隔断长行,我可以简单地输入 `-S`LCTT 译注:注意大写 `S` ,并按回车)
这是我经常使用的一个例子:
```
su - postgres
export PAGER=less  # 因为我不用在所有的机器上编辑 postgres 的 .bashrc
psql
```
有时当我查看一个 `SELECT` 命令的输出非常宽时,我会输入 `-S` 以便将其格式化的漂亮一些。如果当我按下右箭头想查看更多内容时它跳得太远(因为我没有设置 `-#`),则可以输入 `-#8`,那么每次按下右箭头都会向右移动八个字符。
有时在多次输入 `-S` 之后,我会退出 psql 并设置环境变量后再次运行它:
```
export LESS=-S
```
### F
命令 `F` 可以使 `less``tail -f` 一样工作,等待更多的数据被添加到文件后再显示它们。与 `tail -f` 相比,它的一个优点是,高亮显示搜索匹配仍然有效。因此,你可以输入 `less /var/log/logfile`,搜索某些内容时,它将高亮显示所有出现的内容(除非你使用了 `-g`),然后按下 `F` 键,当更多数据写入到日志时,`less` 将显示它并高亮新的匹配项。
按下 `F` 后,可以按 `Ctrl+C` 来停止其查找新数据(这不会干掉它),这样你可以返回文件查看旧内容,搜索其它内容等,然后再次按 `F` 键来查看更多新数据。
### 搜索
搜索使用系统的正则表达式库,这通常意味着你可以使用扩展正则表达式。特别是,搜索 `one|two|three` 可以找到并高亮所有的 one、two 或 three。
我经常使用的另一种模式是 `.*someting.*`,特别是对于一些很长的日志行(例如,跨越多个终端宽度的行),它会高亮整行。这种模式使查看一行的起始和结束位置变得更加容易。我还会结合其它内容,例如 `.*one thing.*|.*another thing.*`,或者使用 `key: .*|.*marker.*` 来查看 `key` 的内容。例如,一个日志文件中包含一些字典/哈希的转储。它会高亮相关的标记行,这样我就看到上下文了,甚至,如果我知道这个值被引号引起来的话,就可以:
```
key: '[^']*'|.*marker.*
```
`less` 会保留你的搜索项的历史纪录,并将其保存到磁盘中以备将来调用。当你按下 `/``?` 时,可以使用向上或向下箭头浏览历史记录(以及进行基本的行编辑)。
在撰写本文时,我无意间看了下 `less` 手册页,发现了一个非常有用的功能:使用 `&!pattern` 跳过无关的行。例如,当我在 `/var/log/messages` 中寻找内容时,经常会一个个迭代使用以下命令:
```
cat /var/log/messages | egrep -v 'systemd: Started Session' | less
cat /var/log/messages | egrep -v 'systemd: Started Session|systemd: Starting Session' | less
cat /var/log/messages | egrep -v 'systemd: Started Session|systemd: Starting Session|User Slice' | less
cat /var/log/messages | egrep -v 'systemd: Started Session|systemd: Starting Session|User Slice|dbus' | less
cat /var/log/messages | egrep -v 'systemd: Started Session|systemd: Starting Session|User Slice|dbus|PackageKit Daemon' | less
```
但是现在我知道如何在 `less` 中做同样的事情。例如,我可以输入 `&!systemd: Started Session`,然后想要隐藏 `systemd: Starting Session`,所以我输入 `&!`,并使用向上箭头从历史记录中获得上一次搜索的结果。然后我接着输入 `|systemd: Starting Session` 并按下回车,继续以相同的方式添加更多条目,直到我过滤掉足够多的条目,看到更有趣的内容。
### =
命令 `=` 显示有关文件和位置的更多信息,甚至比 `-M` 更多。如果文件非常大,计算 `=` 花费的时间太长,可以按下 `Ctrl+C`,它将停止尝试计算。
如果你正在查看的内容来自管道而不是文件,则 `=`(和 `-M`)不会显示未知内容,包括文件中的行数和字节数。要查看这些数据,如果你知道管道命令将很快结束,则可以使用 `G` 跳到最后,然后 `less` 将开始显示这些信息。
如果按下 `G` 并且写入管道的命令花费的时间比预期的长,你可以按下 `Ctrl+C`,该命令将被终止。即使你没有按 `G``Ctrl+C` 键也会杀死它。因此,如果你不想终止命令,请不要意外按下 `Ctrl+C`。出于这个原因,如果命令执行了某些操作(不仅是显示信息),通常更安全的做法是将其输出写入文件并在单独的终端中查看文件,而不是使用管道。
### 为什么你需要 less
`less` 是一个非常强大的程序,与该领域中较新的竞争者(例如 `most``moar`)不同,你可能会在几乎所有的系统上找到它,就像 `vi` 一样。因此,即使你使用 GUI 查看器或编辑器,花一些时间浏览 `less` 手册页也是值得的,至少可以了解一下它的用处。这样,当你需要做一些已有的功能可能提供的工作时,就会知道如何要搜索手册页或互联网来找到所需的内容。
有关更多信息,访问 [less 主页][2]。该网站有一个不错的常见问题解答,其中包含更多提示和技巧。
--------------------------------------------------------------------------------
via: https://opensource.com/article/18/5/advanced-use-less-text-file-viewer
作者:[Yedidyah Bar David][a]
选题:[lujun9972](https://github.com/lujun9972)
译者:[MjSeven](https://github.com/MjSeven)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:https://opensource.com/users/didib
[1]:http://opensource.com/article/18/4/using-less-view-text-files-command-line
[2]:http://www.greenwoodsoftware.com/less/

View File

@ -1,8 +1,8 @@
[#]: collector: (lujun9972)
[#]: translator: (wxy)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-11953-1.html)
[#]: subject: (Troubleshooting hardware problems in Linux)
[#]: via: (https://opensource.com/article/18/12/troubleshooting-hardware-problems-linux)
[#]: author: (Daniel Oh https://opensource.com/users/daniel-oh)
@ -12,11 +12,11 @@ Linux 硬件故障排除指南
> 了解是什么原因导致你的 Linux 硬件发生故障,以便你可以将其恢复并快速运行。
![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003499_01_other11x_cc.png?itok=I_kCDYj0)
![](https://img.linux.net.cn/data/attachment/album/202003/03/101312zcazy02wl2g8uhy1.jpg)
[Linux 服务器][1]在物理机、虚拟化、私有云、公共云和混合云等许多不同种类的基础设施中运行着关键的业务应用程序。对于 Linux 系统管理员来说,了解如何管理 Linux 硬件基础设施(包括与 [网络][2]、存储、Linux 容器相关的软件定义功能)和 Linux 服务器上的多种工具非常重要。
[Linux 服务器][1]在物理机、虚拟化、私有云、公共云和混合云等许多不同种类的基础设施中运行着关键的业务应用程序。对于 Linux 系统管理员来说,了解如何管理 Linux 硬件基础设施(包括与 [网络][2]、存储、Linux 容器相关的软件定义功能)和 Linux 服务器上的多种工具非常重要。
在 Linux 上进行故障排除和解决与硬件相关的问题可能需要一些时间。即使是经验丰富的系统管理员,有时也会花费数小时来解决神秘的硬件和软件差异。
在 Linux 上进行排除和解决与硬件相关的问题可能需要一些时间。即使是经验丰富的系统管理员,有时也会花费数小时来解决神秘的硬件和软件差异。
以下提示可以使你更快、更轻松地对 Linux 中的硬件进行故障排除。许多不同的事情都可能导致 Linux 硬件出现问题。在开始诊断它们之前,明智的做法是了解最常见的问题以及最有可能找到问题的地方。
@ -54,7 +54,7 @@ xvdb    202:16   0  20G  0 disk
....
```
### 深入到个日志当中
### 深入到个日志当中
使用 `dmesg` 可以找出内核最新消息中的错误和警告。例如,这是 `dmesg | more` 命令的输出:
@ -93,7 +93,7 @@ Dec  1 13:21:33 bastion dnsmasq[30201]: using nameserver 127.0.0.1#53 for domai
### 分析网络功能
你可能有成千上万的云原生应用程序在一个复杂的网络环境中为业务提供服务其中可能包括虚拟化、多云和混合云。这意味着,作为故障排除的一部分,你应该分析网络连接是否正常工作。弄清 Linux 服务器中网络功能的有用命令包括:`ip addr`、`traceroute`、`nslookup`、`dig` 和 `ping` 等。例如,这是 `ip addr show` 命令的输出:
你可能有成千上万的云原生应用程序在一个复杂的网络环境中为业务提供服务其中可能包括虚拟化、多云和混合云。这意味着,作为故障排除的一部分,你应该分析网络连接是否正常工作。弄清 Linux 服务器中网络功能的有用命令包括:`ip addr`、`traceroute`、`nslookup`、`dig` 和 `ping` 等。例如,这是 `ip addr show` 命令的输出:
```
# ip addr show
@ -129,7 +129,7 @@ via: https://opensource.com/article/18/12/troubleshooting-hardware-problems-linu
作者:[Daniel Oh][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/) 荣誉推出

View File

@ -0,0 +1,98 @@
[#]: collector: (lujun9972)
[#]: translator: (MFGJT)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-11978-1.html)
[#]: subject: (9 ways to save the planet)
[#]: via: (https://opensource.com/article/19/4/save-planet)
[#]: author: (Jen Wike Huger https://opensource.com/users/jen-wike/users/alanfdoss/users/jmpearce)
九种用开源拯救地球的方法
======
> 这些主意都用到了有关的开源技巧。
![](https://img.linux.net.cn/data/attachment/album/202003/10/004034vbl5qb5lbij66zil.jpg)
人们可以做些什么来拯救地球?这个问题可能会让人感到压抑,因为有时我们感觉个人可以做的贡献太少了。但是作为地球公民,我们从来不是一个人。所以,我向我们的作家社区征集了一些开源软件或硬件可以帮助改变现状的方法。以下是他们的回复。
### 九种利用开源的方法来拯救地球的方式
#### 1、在你的终端禁用闪烁的光标
这听起来可能有点傻,但是那个无关紧要的闪烁的光标可能导致[每小时两瓦特的额外电力开销][2]。如果要禁用光标闪烁,可以通过更改终端设置:<ruby>编辑<rt>Edit</rt></ruby> > <ruby>偏好设置<rt>Preferences</rt></ruby> > <ruby>光标<rt>Cursor</rt></ruby> > <ruby>光标闪烁<rt>Cursor blinking</rt></ruby> > <ruby>禁用<rt>Disabled</rt></ruby>
*由 Mars Toktonaliev 推荐*
#### 2、减少有关动物产品和加工食物的消费
这样做的一种方法是在你的手机中添加这些开源的 AppDaily Dozen、OpenFoodFacts、OpenVegeMap 和 Food Restrictions。这些 App 可以帮助你准备一份健康的素食饮食计划,为你找到素食主义者和严格素食主义者可以就餐的餐厅,还可以帮助你把你的饮食需求告诉别人,即使他们不和你讲同一种语言。如果想要了解更多有关这些的 App 的信息,你可以阅读《[4 款“吃草”的开源应用][3]》。
*由 Joshua Allen Holm 推荐*
#### 3、让旧电脑重焕新生
怎么做?当然是用 Linux。通过给那些自己得不到新电脑的人创造一台新电脑来传递爱心同时也可以避免让这台电脑进到垃圾填埋场。可以在 [The Asian Penguins][4] 看看我们是怎么做的。
*由 Stu Keroff 推荐*
#### 4、在你不使用设备时关闭它们
你可以使用带有主插座和控制插座的“智能插座板”。把你的电脑连接到主插座上,这样的话当你打开电脑时所有你连接到控制插座上的设备如显示器,打印机等也都会打开。一个更简单的、技术含量更低的方法是使用一个带有计时器的插座板。我在家里就是用的这个。你可以用计时器上的开关设定一个定时开关电源的时间表。这样可以在没有人在家时自动关闭网络打印机。或者以我的用了六年的笔记本电脑为例,我通过一个交替使用外接电源(插座打开)和使用电脑电池(插座关闭)的电源计划延长了电脑电池的寿命。
*由 Jim Hall 推荐*
#### 5、减少供暖通风系统HVAC的使用
在夏天,透过窗户的阳光可以为室内提供很多热量。使用 Home Assistant 可以[基于一天中的时间的][6],甚至是基于太阳高度角[自动调节][5]窗帘和遮阳棚。
*由 Michael Hrivnak 推荐*
#### 6、出门就把恒温器关闭或调低
如果你的家用恒温器具有“离开”功能,你很容易忘记在出门时启用它。借助自动化,任何连接到网络的恒温器都可以在你不在家时自动节省能量。[Stataway][7] 就是一个这样项目。它通过调用你的手机的 GPS 坐标来决定是将你的恒温器设置为“在家”还是“离开”。
*由 Michael Hrivnak 推荐*
#### 7、为未来储蓄算力
我有一个主意:创建一个可以读取可选的能量阵列(如风能或太阳能)的输出的脚本。这个脚本应该将计算集群中的服务器从睡眠模式更改为激活模式,直到过量的电能(超出可以储存的部分)被用尽。然后在高产能时段使用这些过量的电能来进行需要大量计算的项目,比如渲染。这个过程本质应该是免费的,因为使用的能量无法被储存起来挪作它用。我相信现有的监控、能量管理和服务器阵列工具一定可以实现这个功能。那么剩下的只是一些整合上的问题,就可以让整个系统工作起来。
*由 Terry Hancock 推荐*
#### 8、关掉你的灯
根据<ruby>[人工夜空亮度图集][8]<rt>World Atlas of Artificial Night Sky Brightness</rt></ruby>的说法,光污染影响了全世界超过 80% 的人口。这一结论在 2016 年(遵循 CC-NC 4.0 协议)发表在公开访问的期刊《<ruby>科学进展<rt>Science Advances</rt></ruby>》上。关闭外部照明是一个可以使野生生物、人类健康受益并让我们享受夜晚的天空的快速途径,而且可以减少能量消耗。访问 [darksky.org][9] 来查看更多减少外部照明影响的方法。
*由 Michael Hrivnak 推荐*
#### 9、减少你的 CPU 数量
就我个人而言,我记得我以前有很多在地下室运行的电脑作为我的 IT 游乐场/实验室。我现在对于能源消耗更加注意了,所以确实大大地减少了我的 CPU 数量。我现在更喜欢利用虚拟机、区域和容器等技术。另外,我很高兴有小型电脑和 SoC 电脑这种东西,比如树莓派,因为我可以用一台这样的电脑做很多事情,比如运行一个 DNS 或者 Web 服务器,而无需使整个屋子变热并积累昂贵的电费账单。
P.S. 这些电脑都运行于 Linux、FreeBSD或者 Raspbian 系统!
*由 Alan Formy-Duvall 推荐*
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/4/save-planet
作者:[Jen Wike Huger][a]
选题:[lujun9972][b]
译者:[MFGJT](https://github.com/MFGJT)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/jen-wike/users/alanfdoss/users/jmpearce
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/pixelated-world.png?itok=fHjM6m53
[2]: https://www.redhat.com/archives/fedora-devel-list/2009-January/msg02406.html
[3]: https://linux.cn/article-10926-1.html
[4]: https://opensource.com/article/19/2/asian-penguins-close-digital-divide
[5]: https://www.home-assistant.io/docs/automation/trigger/#sun-trigger
[6]: https://www.home-assistant.io/components/cover/
[7]: https://github.com/mhrivnak/stataway
[8]: http://advances.sciencemag.org/content/2/6/e1600377
[9]: http://darksky.org/

View File

@ -0,0 +1,288 @@
[#]: collector: "lujun9972"
[#]: translator: "way-ww"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-12027-1.html"
[#]: subject: "How To Enable Or Disable SSH Access For A Particular User Or Group In Linux?"
[#]: via: "https://www.2daygeek.com/allow-deny-enable-disable-ssh-access-user-group-in-linux/"
[#]: author: "2daygeek http://www.2daygeek.com/author/2daygeek/"
如何在 Linux 上为特定的用户或用户组启用或禁用 SSH
======
![](https://img.linux.net.cn/data/attachment/album/202003/23/105915r1azn34i82sp48ca.jpg)
由于你的公司标准规定,你可能只能允许部分人访问 Linux 系统。或者你可能只能够允许几个用户组中的用户访问 Linux 系统。那么如何实现这样的要求呢?最好的方法是什么呢?如何使用一个简单的方法去实现呢?
是的,我们会有很多种方法去实现它。但是我们应该使用简单轻松的方法。为了简单轻松的完成目的,我们可以通过对 `/etc/ssh/sshd_config` 文件做必要的修改来实现。在这篇文章中我们将会向你展示实现要求的详细步骤。
为什么我们要这样做呢?是出于安全的原因。你可以访问[这个链接][1]来获取更多关于 openSSH 的使用方法。
### 什么是 SSH
openssh 全称为 OpenBSD Secure Shell。Secure Shellssh是一个自由开源的网络工具它能让我们在一个不安全的网络中通过使用 Secure ShellSSH协议来安全访问远程主机。
它采用了客户端-服务器架构C/S拥有用户身份认证、加密、在计算机和隧道之间传输文件等功能。
我们也可以用 `telnet``rcp` 等传统工具来完成,但是这些工具都不安全,因为它们在执行任何动作时都会使用明文来传输密码。
### 如何在 Linux 中允许用户使用 SSH
通过以下内容,我们可以为指定的用户或用户列表启用 `ssh` 访问。如果你想要允许多个用户,那么你可以在添加用户时在同一行中用空格来隔开他们。
为了达到目的只需要将下面的值追加到 `/etc/ssh/sshd_config` 文件中去。 在这个例子中, 我们将会允许用户 `user3` 使用 ssh。
```
# echo "AllowUsers user3" >> /etc/ssh/sshd_config
```
你可以运行下列命令再次检查是否添加成功。
```
# cat /etc/ssh/sshd_config | grep -i allowusers
AllowUsers user3
```
这样就行了, 现在只需要重启 `ssh` 服务和见证奇迹了。(下面这两条命令效果相同, 请根据你的服务管理方式选择一条执行即可)
```
# systemctl restart sshd
# service restart sshd
```
接下来很简单,只需打开一个新的终端或者会话尝试用不同的用户身份访问 Linux 系统。是的,这里 `user2` 用户是不被允许使用 SSH 登录的并且会得到如下所示的错误信息。
```
# ssh user2@192.168.1.4
user2@192.168.1.4's password:
Permission denied, please try again.
```
输出:
```
Mar 29 02:00:35 CentOS7 sshd[4900]: User user2 from 192.168.1.6 not allowed because not listed in AllowUsers
Mar 29 02:00:35 CentOS7 sshd[4900]: input_userauth_request: invalid user user2 [preauth]
Mar 29 02:00:40 CentOS7 unix_chkpwd[4902]: password check failed for user (user2)
Mar 29 02:00:40 CentOS7 sshd[4900]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=192.168.1.6 user=user2
Mar 29 02:00:43 CentOS7 sshd[4900]: Failed password for invalid user user2 from 192.168.1.6 port 42568 ssh2
```
与此同时用户 `user3` 被允许登入系统因为他在被允许的用户列表中。
```
# ssh user3@192.168.1.4
user3@192.168.1.4's password:
[user3@CentOS7 ~]$
```
输出:
```
Mar 29 02:01:13 CentOS7 sshd[4939]: Accepted password for user3 from 192.168.1.6 port 42590 ssh2
Mar 29 02:01:13 CentOS7 sshd[4939]: pam_unix(sshd:session): session opened for user user3 by (uid=0)
```
### 如何在 Linux 中阻止用户使用 SSH
通过以下内容,我们可以配置指定的用户或用户列表禁用 `ssh`。如果你想要禁用多个用户,那么你可以在添加用户时在同一行中用空格来隔开他们。
为了达到目的只需要将以下值追加到 `/etc/ssh/sshd_config` 文件中去。 在这个例子中, 我们将禁用用户 `user1` 使用 `ssh`
```
# echo "DenyUsers user1" >> /etc/ssh/sshd_config
```
你可以运行下列命令再次检查是否添加成功。
```
# cat /etc/ssh/sshd_config | grep -i denyusers
DenyUsers user1
```
这样就行了, 现在只需要重启 `ssh` 服务和见证奇迹了。
```
# systemctl restart sshd
# service restart sshd
```
接下来很简单,只需打开一个新的终端或者会话,尝试使用被禁用的用户身份被访问 Linux 系统。是的,这里 `user1` 用户在禁用名单中。所以,当你尝试登录时,你将会得到如下所示的错误信息。
```
# ssh user1@192.168.1.4
user1@192.168.1.4's password:
Permission denied, please try again.
```
输出:
```
Mar 29 01:53:42 CentOS7 sshd[4753]: User user1 from 192.168.1.6 not allowed because listed in DenyUsers
Mar 29 01:53:42 CentOS7 sshd[4753]: input_userauth_request: invalid user user1 [preauth]
Mar 29 01:53:46 CentOS7 unix_chkpwd[4755]: password check failed for user (user1)
Mar 29 01:53:46 CentOS7 sshd[4753]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=192.168.1.6 user=user1
Mar 29 01:53:48 CentOS7 sshd[4753]: Failed password for invalid user user1 from 192.168.1.6 port 42522 ssh2
```
### 如何在 Linux 中允许用户组使用 SSH?
通过以下内容,我们可以允许一个指定的组或多个组使用 `ssh`
如果你想要允许多个组使用 `ssh` 那么你在添加用户组时需要在同一行中使用空格来隔开他们。
为了达到目的只需将以下值追加到 `/etc/ssh/sshd_config` 文件中去。在这个例子中,我们将允许 `2g-admin` 组使用 ssh。
```
# echo "AllowGroups 2g-admin" >> /etc/ssh/sshd_config
```
你可以运行下列命令再次检查是否添加成功。
```
# cat /etc/ssh/sshd_config | grep -i allowgroups
AllowGroups 2g-admin
```
运行下列命令查看属于该用户组的用户有哪些。
```
# getent group 2g-admin
2g-admin:x:1005:user1,user2,user3
```
这样就行了, 现在只需要重启 `ssh` 服务和见证奇迹了。
```
# systemctl restart sshd
# service restart sshd
```
是的, `user1` 被允许登入系统因为用户 `user1` 属于 `2g-admin` 组。
```
# ssh user1@192.168.1.4
user1@192.168.1.4's password:
[user1@CentOS7 ~]$
```
输出:
```
Mar 29 02:10:21 CentOS7 sshd[5165]: Accepted password for user1 from 192.168.1.6 port 42640 ssh2
Mar 29 02:10:22 CentOS7 sshd[5165]: pam_unix(sshd:session): session opened for user user1 by (uid=0)
```
是的, `user2` 被允许登入系统因为用户 `user2` 同样属于 `2g-admin` 组。
```
# ssh user2@192.168.1.4
user2@192.168.1.4's password:
[user2@CentOS7 ~]$
```
输出:
```
Mar 29 02:10:38 CentOS7 sshd[5225]: Accepted password for user2 from 192.168.1.6 port 42642 ssh2
Mar 29 02:10:38 CentOS7 sshd[5225]: pam_unix(sshd:session): session opened for user user2 by (uid=0)
```
当你尝试使用其他不在被允许的组中的用户去登入系统时, 你将会得到如下所示的错误信息。
```
# ssh ladmin@192.168.1.4
ladmin@192.168.1.4's password:
Permission denied, please try again.
```
输出:
```
Mar 29 02:12:36 CentOS7 sshd[5306]: User ladmin from 192.168.1.6 not allowed because none of user's groups are listed in AllowGroups
Mar 29 02:12:36 CentOS7 sshd[5306]: input_userauth_request: invalid user ladmin [preauth]
Mar 29 02:12:56 CentOS7 unix_chkpwd[5310]: password check failed for user (ladmin)
Mar 29 02:12:56 CentOS7 sshd[5306]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=192.168.1.6 user=ladmin
Mar 29 02:12:58 CentOS7 sshd[5306]: Failed password for invalid user ladmin from 192.168.1.6 port 42674 ssh2
```
### 如何在 Linux 中阻止用户组使用 SSH
通过以下内容,我们可以禁用指定的组或多个组使用 `ssh`
如果你想要禁用多个用户组使用 `ssh`,那么你需要在添加用户组时在同一行中使用空格来隔开他们。
为了达到目的只需要将下面的值追加到 `/etc/ssh/sshd_config` 文件中去。
```
# echo "DenyGroups 2g-admin" >> /etc/ssh/sshd_config
```
你可以运行下列命令再次检查是否添加成功。
```
# # cat /etc/ssh/sshd_config | grep -i denygroups
DenyGroups 2g-admin
# getent group 2g-admin
2g-admin:x:1005:user1,user2,user3
```
这样就行了, 现在只需要重启 `ssh` 服务和见证奇迹了。
```
# systemctl restart sshd
# service restart sshd
```
是的 `user1` 不被允许登入系统,因为他是 `2g-admin` 用户组中的一员。他属于被禁用 `ssh` 的组中。
```
# ssh user1@192.168.1.4
user1@192.168.1.4's password:
Permission denied, please try again.
```
输出:
```
Mar 29 02:17:32 CentOS7 sshd[5400]: User user1 from 192.168.1.6 not allowed because a group is listed in DenyGroups
Mar 29 02:17:32 CentOS7 sshd[5400]: input_userauth_request: invalid user user1 [preauth]
Mar 29 02:17:38 CentOS7 unix_chkpwd[5402]: password check failed for user (user1)
Mar 29 02:17:38 CentOS7 sshd[5400]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=192.168.1.6 user=user1
Mar 29 02:17:41 CentOS7 sshd[5400]: Failed password for invalid user user1 from 192.168.1.6 port 42710 ssh2
```
除了 `2g-admin` 用户组之外的用户都可以使用 ssh 登入系统。 例如,`ladmin` 等用户就允许登入系统。
```
# ssh ladmin@192.168.1.4
ladmin@192.168.1.4's password:
[ladmin@CentOS7 ~]$
```
输出:
```
Mar 29 02:19:13 CentOS7 sshd[5432]: Accepted password for ladmin from 192.168.1.6 port 42716 ssh2
Mar 29 02:19:13 CentOS7 sshd[5432]: pam_unix(sshd:session): session opened for user ladmin by (uid=0)
```
--------------------------------------------------------------------------------
via: https://www.2daygeek.com/allow-deny-enable-disable-ssh-access-user-group-in-linux/
作者:[2daygeek][a]
选题:[lujun9972][b]
译者:[way-ww](https://github.com/way-ww)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: http://www.2daygeek.com/author/2daygeek/
[b]: https://github.com/lujun9972
[1]: https://www.2daygeek.com/category/ssh-tutorials/

View File

@ -0,0 +1,224 @@
[#]: collector: (lujun9972)
[#]: translator: (mengxinayan)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12000-1.html)
[#]: subject: (How to structure a multi-file C program: Part 2)
[#]: via: (https://opensource.com/article/19/7/structure-multi-file-c-part-2)
[#]: author: (Erik O'Shaughnessy https://opensource.com/users/jnyjny)
如何组织构建多文件 C 语言程序(二)
======
> 我将在本系列的第二篇中深入研究由多个文件组成的 C 程序的结构。
![](https://img.linux.net.cn/data/attachment/album/202003/16/122928i6qheufnh24jq2qf.jpg)
在[第一篇][2]中,我设计了一个名为[喵呜喵呜][3]的多文件 C 程序,该程序实现了一个玩具[编解码器][4]。我也提到了程序设计中的 Unix 哲学,即在一开始创建多个空文件,并建立一个好的结构。最后,我创建了一个 `Makefile` 文件夹并阐述了它的作用。在本文中将另一个方向展开:现在我将介绍简单但具有指导性的喵呜喵呜编解码器的实现。
当读过我的《[如何写一个好的 C 语言 main 函数][5]》后,你会觉得喵呜喵呜编解码器的 `main.c` 文件的结构很熟悉,其主体结构如下:
```
/* main.c - 喵呜喵呜流式编解码器 */
/* 00 系统包含文件 */
/* 01 项目包含文件 */
/* 02 外部声明 */
/* 03 定义 */
/* 04 类型定义 */
/* 05 全局变量声明(不要用)*/
/* 06 附加的函数原型 */
   
int main(int argc, char *argv[])
{
  /* 07 变量声明 */
  /* 08 检查 argv[0] 以查看该程序是被如何调用的 */
  /* 09 处理来自用户的命令行选项 */
  /* 10 做点有用的事情 */
}
   
/* 11 其它辅助函数 */
```
### 包含项目头文件
位于第二部分中的 `/* 01 项目包含文件 */` 的源代码如下:
```
/* main.c - 喵呜喵呜流式编解码器 */
...
/* 01 项目包含文件 */
#include "main.h"
#include "mmecode.h"
#include "mmdecode.h"
```
`#include` 是 C 语言的预处理命令,它会将该文件名的文件内容拷贝到当前文件中。如果程序员在头文件名称周围使用双引号(`""`),编译器将会在当前目录寻找该文件。如果文件被尖括号包围(`<>`),编译器将在一组预定义的目录中查找该文件。
[main.h][6] 文件中包含了 [main.c][7] 文件中用到的定义和类型定义。我喜欢尽可能多将声明放在头文件里,以便我在我的程序的其他位置使用这些定义。
头文件 [mmencode.h][8] 和 [mmdecode.h][9] 几乎相同,因此我以 `mmencode.h` 为例来分析。
```
/* mmencode.h - 喵呜喵呜流编解码器 */
 
#ifndef _MMENCODE_H
#define _MMENCODE_H
#include <stdio.h>
int mm_encode(FILE *src, FILE *dst);
#endif /* _MMENCODE_H */
```
`#ifdef`、`#define`、`#endif` 指令统称为 “防护” 指令。其可以防止 C 编译器在一个文件中多次包含同一文件。如果编译器在一个文件中发现多个定义/原型/声明,它将会产生警告。因此这些防护措施是必要的。
在这些防护内部,只有两个东西:`#include` 指令和函数原型声明。我在这里包含了 `stdio.h` 头文件,以便于能在函数原型中使用 `FILE` 定义。函数原型也可以被包含在其他 C 文件中,以便于在文件的命名空间中创建它。你可以将每个文件视为一个独立的命名空间,其中的变量和函数不能被另一个文件中的函数或者变量使用。
编写头文件很复杂,并且在大型项目中很难管理它。不要忘记使用防护。
### 喵呜喵呜编码的最终实现
该程序的功能是按照字节进行 `MeowMeow` 字符串的编解码,事实上这是该项目中最简单的部分。截止目前我所做的工作便是支持允许在适当的位置调用此函数:解析命令行,确定要使用的操作,并打开将要操作的文件。下面的循环是编码的过程:
```
/* mmencode.c - 喵呜喵呜流式编解码器 */
...
while (!feof(src)) {
if (!fgets(buf, sizeof(buf), src))
break;
for(i=0; i<strlen(buf); i++) {
lo = (buf[i] & 0x000f);
hi = (buf[i] & 0x00f0) >> 4;
fputs(tbl[hi], dst);
fputs(tbl[lo], dst);
}
}
```
简单的说,当文件中还有数据块时( `feof(3)` ),该循环读取(`feof(3)` )文件中的一个数据块。然后将读入的内容的每个字节分成两个 `hi``lo`<ruby>半字节<rt>nibble</rt></ruby>。半字节是半个字节,即 4 个位。这里的奥妙之处在于可以用 4 个位来编码 16 个值。我将 `hi``lo` 用作 16 个字符串查找表 `tbl` 的索引,表中包含了用半字节编码的 `MeowMeow` 字符串。这些字符串使用 `fputs(3)` 函数写入目标 `FILE` 流,然后我们继续处理缓存区的下一个字节。
该表使用 [table.h][14] 中的宏定义进行初始化,在没有特殊原因(比如:要展示包含了另一个项目的本地头文件)时,我喜欢使用宏来进行初始化。我将在未来的文章中进一步探讨原因。
### 喵呜喵呜解码的实现
我承认在开始工作前花了一些时间。解码的循环与编码类似:读取 `MeowMeow` 字符串到缓冲区,将编码从字符串转换为字节
```
 /* mmdecode.c - 喵呜喵呜流式编解码器 */
 ...
 int mm_decode(FILE *src, FILE *dst)
 {
   if (!src || !dst) {
     errno = EINVAL;
     return -1;
   }
   return stupid_decode(src, dst);
 }
```
这不符合你的期望吗?
在这里,我通过外部公开的 `mm_decode()` 函数公开了 `stupid_decode()` 函数细节。我上面所说的“外部”是指在这个文件之外。因为 `stupid_decode()` 函数不在该头文件中,因此无法在其他文件中调用它。
当我们想发布一个可靠的公共接口时,有时候会这样做,但是我们还没有完全使用函数解决问题。在本例中,我编写了一个 I/O 密集型函数,该函数每次从源中读取 8 个字节,然后解码获得 1 个字节写入目标流中。较好的实现是一次处理多于 8 个字节的缓冲区。更好的实现还可以通过缓冲区输出字节,进而减少目标流中单字节的写入次数。
```
/* mmdecode.c - 喵呜喵呜流式编解码器 */
...
int stupid_decode(FILE *src, FILE *dst)
{
char buf[9];
decoded_byte_t byte;
int i;
while (!feof(src)) {
if (!fgets(buf, sizeof(buf), src))
break;
byte.field.f0 = isupper(buf[0]);
byte.field.f1 = isupper(buf[1]);
byte.field.f2 = isupper(buf[2]);
byte.field.f3 = isupper(buf[3]);
byte.field.f4 = isupper(buf[4]);
byte.field.f5 = isupper(buf[5]);
byte.field.f6 = isupper(buf[6]);
byte.field.f7 = isupper(buf[7]);
fputc(byte.value, dst);
}
return 0;
}
```
我并没有使用编码器中使用的位移方法,而是创建了一个名为 `decoded_byte_t` 的自定义数据结构。
```
/* mmdecode.c - 喵呜喵呜流式编解码器 */
...
typedef struct {
 unsigned char f7:1;
 unsigned char f6:1;
 unsigned char f5:1;
 unsigned char f4:1;
 unsigned char f3:1;
 unsigned char f2:1;
 unsigned char f1:1;
 unsigned char f0:1;
} fields_t;
 
typedef union {
 fields_t      field;
 unsigned char value;
} decoded_byte_t;
```
初次看到代码时可能会感到有点儿复杂,但不要放弃。`decoded_byte_t` 被定义为 `fields_t``unsigned char`**联合**。可以将联合中的命名成员看作同一内存区域的别名。在这种情况下,`value` 和 `field` 指向相同的 8 位内存区域。将 `field.f0` 设置为 `1` 也将会设置 `value` 中的最低有效位。
虽然 `unsigned char` 并不神秘,但是对 `fields_t` 的类型定义(`typedef`)也许看起来有些陌生。现代 C 编译器允许程序员在结构体中指定单个位字段的值。字段所在的类型是一个无符号整数类型,并在成员标识符后紧跟一个冒号和一个整数,该整数指定了位字段的长度。
这种数据结构使得按字段名称访问字节中的每个位变得简单,并可以通过联合中的 `value` 字段访问组合后的值。我们依赖编译器生成正确的移位指令来访问字段,这可以在调试时为你节省不少时间。
最后,因为 `stupid_decode()` 函数一次仅从源 `FILE` 流中读取 8 个字节,所以它效率并不高。通常我们尝试最小化读写次数,以提高性能和降低调用系统调用的开销。请记住:少量的读取/写入大的块比大量的读取/写入小的块好得多。
### 总结
用 C 语言编写一个多文件程序需要程序员要比只是是一个 `main.c` 做更多的规划。但是当你添加功能或者重构时,只需要多花费一点儿努力便可以节省大量时间以及避免让你头痛的问题。
回顾一下,我更喜欢这样做:多个文件,每个文件仅有简单功能;通过头文件公开那些文件中的小部分功能;把数字常量和字符串常量保存在头文件中;使用 `Makefile` 而不是 Bash 脚本来自动化处理事务;使用 `main()` 函数来处理命令行参数解析并作为程序主要功能的框架。
我知道我只是蜻蜓点水般介绍了这个简单的程序,并且我很高兴知道哪些事情对你有所帮助,以及哪些主题需要详细的解释。请在评论中分享你的想法,让我知道。
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/7/structure-multi-file-c-part-2
作者:[Erik O'Shaughnessy][a]
选题:[lujun9972][b]
译者:[萌新阿岩](https://github.com/mengxinayan)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/jnyjny
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/file_system.jpg?itok=pzCrX1Kc (4 manilla folders, yellow, green, purple, blue)
[2]: https://linux.cn/article-11935-1.html
[3]: https://github.com/jnyjny/MeowMeow.git
[4]: https://en.wikipedia.org/wiki/Codec
[5]: https://linux.cn/article-10949-1.html
[6]: https://github.com/JnyJny/meowmeow/blob/master/main.h
[7]: https://github.com/JnyJny/meowmeow/blob/master/main.c
[8]: https://github.com/JnyJny/meowmeow/blob/master/mmencode.h
[9]: https://github.com/JnyJny/meowmeow/blob/master/mmdecode.h
[10]: http://www.opengroup.org/onlinepubs/009695399/functions/feof.html
[11]: http://www.opengroup.org/onlinepubs/009695399/functions/fgets.html
[12]: http://www.opengroup.org/onlinepubs/009695399/functions/strlen.html
[13]: http://www.opengroup.org/onlinepubs/009695399/functions/fputs.html
[14]: https://github.com/JnyJny/meowmeow/blob/master/table.h
[15]: http://www.opengroup.org/onlinepubs/009695399/functions/isupper.html
[16]: http://www.opengroup.org/onlinepubs/009695399/functions/fputc.html

View File

@ -0,0 +1,215 @@
[#]: collector: (lujun9972)
[#]: translator: (caiichenr)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-11986-1.html)
[#]: subject: (Building a non-breaking breakpoint for Python debugging)
[#]: via: (https://opensource.com/article/19/8/debug-python)
[#]: author: (Liran Haimovitch https://opensource.com/users/liranhaimovitch)
在 Python 调试过程中设置不中断的断点
======
> 你对如何让调试器变得更快产生过兴趣吗?本文将分享我们在为 Python 构建调试器时得到的一些经验。
![](https://img.linux.net.cn/data/attachment/album/202003/12/104433hq3qx2k81w1wamwm.jpg)
整段故事讲的是我们在 [Rookout][2] 公司的团队为 Python 调试器开发不中断断点的经历,以及开发过程中得到的经验。我将在本月于旧金山举办的 [PyBay 2019][3] 上介绍有关 Python 调试过程的更多细节,但现在就让我们立刻开始这段故事。
### Python 调试器的心脏sys.set_trace
在诸多可选的 Python 调试器中,使用最广泛的三个是:
* pdb它是 Python 标准库的一部分
* PyDev它是内嵌在 Eclipse 和 Pycharm 等 IDE 中的调试器
* ipdb它是 IPython 的调试器
Python 调试器的选择虽多,但它们几乎都基于同一个函数:`sys.settrace`。 值得一提的是, [sys.settrace][4] 可能也是 Python 标准库中最复杂的函数。
![set_trace Python 2 docs page][5]
简单来讲,`settrace` 的作用是为解释器注册一个跟踪函数,它在下列四种情形发生时被调用:
* 函数调用
* 语句执行
* 函数返回
* 异常抛出
一个简单的跟踪函数看上去大概是这样:
```
def simple_tracer(frame, event, arg):
  co = frame.f_code
  func_name = co.co_name
  line_no = frame.f_lineno
  print("{e} {f} {l}".format(
e=event, f=func_name, l=line_no))
  return simple_tracer
```
在分析函数时我们首先关注的是参数和返回值,该跟踪函数的参数分别是:
* `frame`,当前堆栈帧,它是包含当前函数执行时解释器里完整状态的对象
* `event`,事件,它是一个值可能为 `call`、`line`、`return` 或 `exception` 的字符串
* `arg`,参数,它的取值基于 `event` 的类型,是一个可选项
该跟踪函数的返回值是它自身,这是由于解释器需要持续跟踪两类跟踪函数:
* **全局跟踪函数(每线程)**:该跟踪函数由当前线程调用 `sys.settrace` 来设置,并在解释器创建一个新的堆栈帧时被调用(即代码中发生函数调用时)。虽然没有现成的方式来为不同的线程设置跟踪函数,但你可以调用 `threading.settrace` 来为所有新创建的 `threading` 模块线程设置跟踪函数。
* **局部跟踪函数(每一帧)**:解释器将该跟踪函数的值设置为全局跟踪函数创建帧时的返回值。同样也没有现成的方法能够在帧被创建时自动设置局部跟踪函数。
该机制的目的是让调试器对被跟踪的帧有更精确的把握,以减少对性能的影响。
### 简单三步构建调试器 (我们最初的设想)
仅仅依靠上文提到的内容用自制的跟踪函数来构建一个真正的调试器似乎有些不切实际。幸运的是Python 的标准调试器 pdb 是基于 Bdb 构建的,后者是 Python 标准库中专门用于构建调试器的基类。
基于 Bdb 的简易断点调试器看上去是这样的:
```
import bdb
import inspect
class Debugger(bdb.Bdb):
  def __init__(self):
      Bdb.__init__(self)
      self.breakpoints = dict()
      self.set_trace()
def set_breakpoint(self, filename, lineno, method):
  self.set_break(filename, lineno)
  try :
      self.breakpoints[(filename, lineno)].add(method)
  except KeyError:
      self.breakpoints[(filename, lineno)] = [method]
def user_line(self, frame):
  if not self.break_here(frame):
      return
  # Get filename and lineno from frame
  (filename, lineno, _, _, _) = inspect.getframeinfo(frame)
  methods = self.breakpoints[(filename, lineno)]
  for method in methods:
      method(frame)
```
这个调试器类的全部构成是:
1. 继承 `Bdb`,定义一个简单的构造函数来初始化基类,并开始跟踪。
2. 添加 `set_breakpoint` 方法,它使用 `Bdb` 来设置断点,并跟踪这些断点。
3. 重载 `Bdb` 在当前用户行调用的 `user_line` 方法,该方法一定被一个断点调用,之后获取该断点的源位置,并调用已注册的断点。
### 这个简易的 Bdb 调试器效率如何呢?
Rookout 的目标是在生产级性能的使用场景下提供接近普通调试器的使用体验。那么,让我们来看看先前构建出来的简易调试器表现的如何。
为了衡量调试器的整体性能开销,我们使用如下两个简单的函数来进行测试,它们分别在不同的情景下执行了 1600 万次。请注意,在所有情景下断点都不会被执行。
```
def empty_method():
   pass
def simple_method():
   a = 1
   b = 2
   c = 3
   d = 4
   e = 5
   f = 6
   g = 7
   h = 8
   i = 9
   j = 10
```
在使用调试器的情况下需要大量的时间才能完成测试。糟糕的结果指明了,这个简陋 `Bdb` 调试器的性能还远不足以在生产环境中使用。
![First Bdb debugger results][6]
### 对调试器进行优化
降低调试器的额外开销主要有三种方法:
1. **尽可能的限制局部跟踪**:由于每一行代码都可能包含大量事件,局部跟踪比全局跟踪的开销要大得多。
2. **优化 `call` 事件并尽快将控制权还给解释器**:在 `call` 事件发生时调试器的主要工作是判断是否需要对该事件进行跟踪。
3. **优化 `line` 事件并尽快将控制权还给解释器**:在 `line` 事件发生时调试器的主要工作是判断我们在此处是否需要设置一个断点。
于是我们复刻了 `Bdb` 项目,精简特征、简化代码,针对使用场景进行优化。这些工作虽然得到了一些效果,但仍无法满足我们的需求。因此我们又继续进行了其它的尝试,将代码优化并迁移至 `.pyx` 使用 [Cython][7] 进行编译,可惜结果(如下图所示)依旧不够理想。最终,我们在深入了解 CPython 源码之后意识到,让跟踪过程快到满足生产需求是不可能的。
![Second Bdb debugger results][8]
### 放弃 Bdb 转而尝试字节码操作
熬过先前对标准调试方法进行的试验-失败-再试验循环所带来的失望,我们将目光转向另一种选择:字节码操作。
Python 解释器的工作主要分为两个阶段:
1. **将 Python 源码编译成 Python 字节码**:这种(对人类而言)不可读的格式专为执行的效率而优化,它们通常缓存在我们熟知的 `.pyc` 文件当中。
2. **遍历 解释器循环中的字节码** 在这一步中解释器会逐条的执行指令。
我们选择的模式是:使用**字节码操作**来设置没有全局额外开销的**不中断断点**。这种方式的实现首先需要在内存中的字节码里找到我们感兴趣的部分,然后在该部分的相关机器指令前插入一个函数调用。如此一来,解释器无需任何额外的工作即可实现我们的不中断断点。
这种方法并不依靠魔法来实现,让我们简要地举个例子。
首先定义一个简单的函数:
```
def multiply(a, b):
   result = a * b
   return result
```
在 [inspect][9] 模块(其包含了许多实用的单元)的文档里,我们得知可以通过访问 `multiply.func_code.co_code` 来获取函数的字节码:
```
'|\x00\x00|\x01\x00\x14}\x02\x00|\x02\x00S'
```
使用 Python 标准库中的 [dis][10] 模块可以翻译这些不可读的字符串。调用 `dis.dis(multiply.func_code.co_code)` 之后,我们就可以得到:
```
  4          0 LOAD_FAST               0 (a)
             3 LOAD_FAST               1 (b)
             6 BINARY_MULTIPLY    
             7 STORE_FAST              2 (result)
  5         10 LOAD_FAST               2 (result)
            13 RETURN_VALUE      
```
与直截了当的解决方案相比,这种方法让我们更靠近发生在调试器背后的事情。可惜 Python 并没有提供在解释器中修改函数字节码的方法。我们可以对函数对象进行重写,不过那样做的效率满足不了大多数实际的调试场景。最后我们不得不采用一种迂回的方式来使用原生拓展才能完成这一任务。
### 总结
在构建一个新工具时,总会学到许多事情的工作原理。这种刨根问底的过程能够使你的思路跳出桎梏,从而得到意料之外的解决方案。
在 Rookout 团队中构建不中断断点的这段时间里,我学到了许多有关编译器、调试器、服务器框架、并发模型等等领域的知识。如果你希望更深入的了解字节码操作,谷歌的开源项目 [cloud-debug-python][11] 为编辑字节码提供了一些工具。
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/8/debug-python
作者:[Liran Haimovitch][a]
选题:[lujun9972][b]
译者:[caiichenr](https://github.com/caiichenr)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/liranhaimovitch
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/python_jungle_lead.jpeg?itok=pFKKEvT- (Real python in the graphic jungle)
[2]: https://rookout.com/
[3]: https://pybay.com/
[4]: https://docs.python.org/3/library/sys.html#sys.settrace
[5]: https://opensource.com/sites/default/files/uploads/python2docs.png (set_trace Python 2 docs page)
[6]: https://opensource.com/sites/default/files/uploads/debuggerresults1.png (First Bdb debugger results)
[7]: https://cython.org/
[8]: https://opensource.com/sites/default/files/uploads/debuggerresults2.png (Second Bdb debugger results)
[9]: https://docs.python.org/2/library/inspect.html
[10]: https://docs.python.org/2/library/dis.html
[11]: https://github.com/GoogleCloudPlatform/cloud-debug-python
[12]: https://pybay.com/speaker/liran-haimovitch/
[13]: https://ti.to/sf-python/pybay2019/discount/OpenSource35

View File

@ -0,0 +1,104 @@
[#]: collector: (lujun9972)
[#]: translator: (cycoe)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-11994-1.html)
[#]: subject: (Debugging in Emacs: The Grand Unified Debugger)
[#]: via: (https://opensourceforu.com/2019/09/debugging-in-emacs-the-grand-unified-debugger/)
[#]: author: (Vineeth Kartha https://opensourceforu.com/author/vineeth-kartha/)
Emacs 调试秘籍之 GUD 调试器
======
![][2]
> 本文简短地对 Emacs 的调试工具 GUD 的特性进行了探索。
如果你是一个 C 或 C++ 开发者,你很可能已经使用过 GDBGNU 调试器),毫无疑问,它是现今最强大、最无可匹敌的调试器之一。它唯一的缺点就是它基于命令行,虽然仍能提供许多强大的功能,但有时也会具有一些局限性。这也就是为什么聪明的人们开始追求整合了编辑器和调试器的<ruby>图形化<rt> GUI </rt></ruby><ruby>集成开发环境<rt>Integrated Development Environment</rt></ruby>。仍有些开发者坚信使用鼠标会降低工作效率,在 GUI 上用鼠标点~点~点~是来自恶魔的诱惑。
因为 Emacs 是现今最酷的文本编辑器之一,我将为你展示如何在不碰鼠标且不离开 Emacs 的情况下,实现写代码、编译代码、调试代码的过程。
GUDLCTT 译注:全称<ruby>大统一调试器<rt>Grand Unified Debugger</rt></ruby>,鉴于其缩写形式更为人熟知,以下全文将使用缩写替代此全称)是 Emacs 下的一个<ruby>模式<rt>mode</rt></ruby>,用于在 Emacs 中运行 GDB。它向 GDB 提供了 Emacs 的所有特性,使用户无需离开编辑器就可以对代码进行调试。
### 使用 GUD 的前期准备
如果你正在使用一个 Linux 机器,很可能你已经安装了 GDB 和 gcc接下来就是要确保已经安装了 Emacs。以下的内容我将假设读者熟悉 GDB 并且至少用它做过基本的调试。如果你未曾接触过 GDB你可以做个快速入门这些资料在网上随处可得。
对于那些 Emacs 新手,我将向你介绍一些基本术语。纵览整篇文章,你将看到诸如 `C-c M-x` 等快捷键。此处 `C` 代表 `Ctrl` 键,`M` 代表 `Alt` 键。`C-c` 代表 `Ctrl` 键和 `c` 键被同时按下。如果你看到 `C-c c`,它代表同时按下 `Ctrl` 键和 `c` 键,释放后紧接着按下 `c` 键。在 Emacs 中,编辑文本的主要区域被称为<ruby>主缓冲区<rt>main buffer</rt></ruby>,而在 Emacs 窗口下方用于输入命令的区域被称为<ruby>迷你缓冲区<rt>mini buffer</rt></ruby>
启动 Emacs并按下 `C-x C-f` 来创建一个新文件。Emacs 将提示你输入一个文件名,此处让我们将文件命名为 `buggyFactorial.cpp`。一旦文件打开,输入如下代码:
```
#include<iostream>
#include <assert.h>
int factorial(int num) {
int product = 1;
while(num--) {
product *= num;
}
return product;
}
int main() {
int result = factorial(5);
assert(result == 120);
}
```
使用 `C-x C-s` 快捷键保存文件。文件保存完毕,是时候进行编译了。按下 `M-x`,在弹出的<ruby>提示符<rt>prompt</rt></ruby>后输入 `compile` 并点击回车。然后在提示符后,将内容替换为 `g++ -g buggyFactorial.cpp` 并再次点击回车。
![图 1: Emacs 迷你缓冲区中编译命令][3]
这将在 Emacs 中开启另一个缓冲区,显示编译的状态。如果你的代码输入没有错误,你将预期得到如图 2 所示的缓冲区。
![图 2: 编译状态][4]
要想隐藏编译缓冲区,首先确保你的光标在编译缓冲区中(你可以不使用鼠标,而是通过 `C-x o` 快捷键将光标从一个缓冲区移动到另一个),然后按下 `C-x 0`。下一步就是运行代码,并观察是否运行良好。按下 `M-!` 快捷键并在迷你缓冲区的提示符后面输入 `./a.out`
![图 3: 代码在迷你缓冲区中的输出][5]
你可以看到迷你缓冲区中显示断言失败。很明显代码中有错误,因为 5 的阶乘是 120。那么让我们现在开始调试吧。
### 使用 GUD 调式代码
现在,我们的代码已经编译完成,是时候看看到底哪里出错了。按下 `M-x` 快捷键并在提示符后输入 `gdb`。在接下来的提示符后,输入 `gdb -i=mi a.out`。如果一切顺利GDB 会在 Emacs 缓冲区中启动,你会看到如图 4 所示的窗口。
![图 4: Emacs 中的 GDB 缓冲区][6]
`gdb` 提示符后,输入 `break main` 来设置断点,并输入 `r` 来运行程序。程序会开始运行并停在 `main()` 函数处。
一旦 GDB 到达了 `main` 处设置的断点,就会弹出一个新的缓冲区显示你正在调试的代码。注意左侧的红点,正是你设置断点的位置,同时会有一个小的标志提示你当前代码运行到了哪一行。当前,该标志就在断点处(如图 5
![图 5: GDB 与代码显示在两个分离的窗口][7]
为了调试 `factorial` 函数,我们需要单步运行。想要达到此目的,你可以在 GBD 提示符使用 GDB 命令 `step`,或者使用 Emacs 快捷键 `C-c C-s`。还有其它一些快捷键,但我更喜欢 GDB 命令。因此我将在本文的后续部分使用它们。
单步运行时让我们注意一下局部变量中的阶乘值。参考图 6 来设置在 Emacs 帧中显示局部变量值。
![图 6: 在 Emacs 中使用独立帧显示局部变量][8]
在 GDB 提示符中进行单步运行并观察局部变量值的变化。在循环的第一次迭代中,我们发现了一个问题。此处乘法的结果应该是 5 而不是 4。
本文到这里也差不多结束了,读者可以自行探索发现 GUD 模式这片新大陆。GDB 中的所有命令都可以在 GUD 模式中运行。我将此代码的修复留给读者作为一个练习。看看你在调试的过程中,可以做哪一些定制化,来使你的工作流更加简单和高效。
--------------------------------------------------------------------------------
via: https://opensourceforu.com/2019/09/debugging-in-emacs-the-grand-unified-debugger/
作者:[Vineeth Kartha][a]
选题:[lujun9972][b]
译者:[cycoe](https://github.com/cycoe)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensourceforu.com/author/vineeth-kartha/
[b]: https://github.com/lujun9972
[1]: https://i0.wp.com/opensourceforu.com/wp-content/uploads/2019/09/Screenshot-from-2019-09-25-15-39-46.png?ssl=1
[2]: https://i0.wp.com/opensourceforu.com/wp-content/uploads/2019/09/Screenshot-from-2019-09-25-15-39-46.png?ssl=1
[3]: https://i1.wp.com/opensourceforu.com/wp-content/uploads/2019/09/Figure_1.png?ssl=1
[4]: https://i2.wp.com/opensourceforu.com/wp-content/uploads/2019/09/Figure_2.png?ssl=1
[5]: https://i0.wp.com/opensourceforu.com/wp-content/uploads/2019/09/Figure_3.png?ssl=1
[6]: https://i0.wp.com/opensourceforu.com/wp-content/uploads/2019/09/Figure_4.png?ssl=1
[7]: https://i1.wp.com/opensourceforu.com/wp-content/uploads/2019/09/Figure_5.png?ssl=1
[8]: https://i1.wp.com/opensourceforu.com/wp-content/uploads/2019/09/Figure_6.png?ssl=1

View File

@ -0,0 +1,60 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-11981-1.html)
[#]: subject: (Calculator N+ is an open source scientific calculator for your smartphone)
[#]: via: (https://opensource.com/article/19/11/calculator-n-mobile)
[#]: author: (Ricardo Berlasso https://opensource.com/users/rgb-es)
Calculator N+:一款智能手机上的开源科学计算器
======
> 这个 Android 应用可在掌中计算许多高级数学函数。
![](https://img.linux.net.cn/data/attachment/album/202003/10/113543hlb5xu7b5e17ba90.jpg)
移动电话每天都在变得越来越强大,因此毫不奇怪它们可以击败不太久前的大多数计算机。这也意味着移动手机上的工具每天都在变得越来越强大。
之前,我写过一篇 [两款 Linux 桌面端可用的科学计算器][2],我接着将介绍 [Calculator N+][3],这是一款很棒的适用于 Android 设备的计算机代数系统CAS应用采用 GPL v3.0 许可证下。
Calculator N+ 被认为是“适用于 Android 的强大计算器”,但这是一个谦虚的说法。它不仅可以以任意精度工作,还可以显示根数和分数等*很多*功能。
寻找多项式根?可以。分解因数?可以。导数、积分和极限?可以。数论(模算术、组合学、素因数分解)?可以。
你还可以求解方程系统、简化表达式(包括三角函数)、转换单位,只要你想到的,它都能做!
![Calculator N+ graphical interface][4]
其结果以 LaTeX 输出。左上方的菜单提供了许多强大的功能,只需触摸一下即可使用。同样在该菜单中,你将找到该应用所有功能的帮助文件。在屏幕的右上角,你可以在精确表示法和十进制表示法之间切换。最后,点击屏幕底部的蓝色栏,即可访问应用中的所有函数库。不过要小心!如果你不是数学家、物理学家或工程师,那么这么长的列表会看上去很吓人。
所有这些功能都来自 [Symja 库][5],这是另一个出色的 GPL 3 项目。
这两个项目都处于积极开发中并且每个版本都在不断完善。特别是Calculator N+ 的 v3.4.6 在用户界面UI品质方面取得了重大飞跃。虽然还是存在一些不够好的地方但是要在智能手机的小巧的用户界面中发挥如此强大的功能是一项艰巨的任务我认为应用开发人员正在很好地解决其剩余的问题。对他们表示敬意
如果你是老师、学生或在理工科领域工作,请试试 Calculator N+。它是免费、无广告、开源的,并可以满足你所有的数学需求。(当然,除了数学考试期间,为防止作弊绝对不允许使用智能手机。)
可以在 [Google Play 商店][6]找到 Calculator N+,也可以使用 GitHub 页面上的说明[从源代码构建][7]。
如果你知道用于科学或工程的其他有用的开源应用,请在评论中告知我们。
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/11/calculator-n-mobile
作者:[Ricardo Berlasso][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/rgb-es
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/calculator_money_currency_financial_tool.jpg?itok=2QMa1y8c (scientific calculator)
[2]: https://linux.cn/article-9643-1.html
[3]: https://github.com/tranleduy2000/ncalc
[4]: https://opensource.com/sites/default/files/uploads/calculatornplus_sqrt-frac.png (Calculator N+ graphical interface)
[5]: https://github.com/axkr/symja_android_library
[6]: https://play.google.com/store/apps/details?id=com.duy.calculator.free
[7]: https://github.com/tranleduy2000/ncalc/blob/master/README.md

View File

@ -0,0 +1,99 @@
[#]: collector: "lujun9972"
[#]: translator: "messon007"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-12035-1.html"
[#]: subject: "10 articles to learn Linux your way"
[#]: via: "https://opensource.com/article/19/12/learn-linux"
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
10 篇关于 Linux 的好文章
=======
> 2019 年对于 Linux 来说是个好年份,让我们一起来回顾一下这十篇关于 Linux 的好文章。
![](https://img.linux.net.cn/data/attachment/album/202003/25/115447rrjfuufccumf0oz6.jpg)
2019 年对于 Linux 来说是个好年份,显然这里的 “Linux” 一词有更多含义: 内核? 桌面? 或是生态? 在此次回顾年度 Linux 好文中,我在选择十大好文时有意采取了更开放的视角。下面就是十大好文(无先后次序之分)。
### 《Linux 权限入门指南》
Bryant Son 的《[Linux 权限入门指南][2]》向新用户介绍了文件权限的概念,通过图形和图表的方式来说明每个要点。通常很难以视觉的方式来解释纯粹基于文本的概念,而本文则对可视方式学习的人非常友好。 Bryant 在讲述时也很专注主题。关于文件权限的任何阐述都可能引出几个相关主题(例如所有权和访问控制列表等),但是本文致力于解释一件事并很好地解释它。
### 《为什么我从 Mac 换到了 Linux》
Matthew Broberg 在《[为什么我从 Mac 换到了 Linux][3]》中清楚而客观的介绍了他从 MacOS 切换到 Linux 的经历。通常切换平台是很困难的,因此记录决定切换的背后考虑非常重要。我认为 Matt 的文章带有几个目的,但对我来说最重要的两个目的是:通过解答他的问题并提供潜在的解决方案,他请 Linux 社区的人们来支持他;这对于其他正在考虑采用 Linux 的人来说是一个很好的参考。
### 《在 Linux 上定位 WiFi 速度慢的问题》
《[在 Linux 上定位 WiFi 速度慢的问题][4]》这篇文章中David Clinton 对每个人都可能遇到的问题进行了分析,并提供了怎么样一步步解决的思路。这是“偶然的 Linux”技巧的一个很好的例子但它不仅可以帮助经常遇到问题的人而且可以向非 Linux 用户展示如何在其他平台上进行问题定位。
### 《一个非技术人员对 GNOME 项目使用 GitLab 的感受》
Molly de Blanc 所写的《[一个非技术人员对 GNOME 项目使用 GitLab 的感受][5]》深层次地揭示了开源界的一个典范GNOME 桌面如何使用开源界的另一个典范Git进行开发。听到一个开放源代码项目对于任何需要做的事情默认为开放源代码解决方案这总是让我感到振奋。无论如何这种情况并不常见然而对于 GNOME 来说,这是项目本身的重要且受欢迎的部分。
### 《详解 Linux 中的虚拟文件系统》
Alison Chaiken 在《[详解 Linux 中的虚拟文件系统][6]》中巧妙地解释了对许多用户来说都很难理解的东西。理解文件系统是什么、虚拟文件系统和真实的文件系统是一回事,但从定义上讲,*虚拟的*其实并不是真正的文件系统。Linux 以一种普通用户也能从中受益的方式提供了它们Alison 的文章以一种易于理解的方式对其进行了阐述。另外Alison 在文章的后半部分更深入地介绍了如何使用 `bcc` 脚本查看她刚刚讲的虚拟文件系统的相关内容。
### 《理解文件路径并学会使用它们》
我认为《[理解文件路径并学会使用它们][7]》很重要,因为这是大多数用户(在任何平台上)似乎都没有学过的概念。这是一个奇怪的现象,因为现在比以往任何时候,人们都越来越多地看到*文件路徑*:几乎所有的互联网网址都包含一个文件路径,该路径告诉你你在域中的确切位置。我常常在想为什么计算机教育不是从互联网开始的,互联网是目前最熟悉的应用程序,并且可以说是使用最频繁的超级计算机,完全可以用它来解释我们每天使用的设备。(我想如果这些设备运行 Linux 会有所帮助,但是我们正在努力。)
### 《Linux 下的进程间通信:共享存储》
Marty Kalin 的《[Linux 下的进程间通信:共享存储][8]》从 Linux 的开发者视角解释了 IPC 以及如何在代码中使用它。虽然我只是列入了这篇文章,不过它实际上是一个三篇文章的系列,而它是同类文章中阐述的最好的。很少有文档能够解释 Linux 怎样处理 IPC更不用说 IPC 是什么,为什么它很重要,或者在编程时该如何使用它。通常这是你在大学读书时关注的话题。现在,你可以在这里阅读所有内容。
### 《在 Linux 上用 strace 来理解系统调用》
Gaurav Kamathe 的《[在 Linux 上用 strace 来理解系统调用][9]》具有很强的技术性,我希望我所见过的有关 `strace` 的每次会议演讲都是如此。这是对一个复杂但非常有用的命令的清晰演示。令我惊讶的是,我读了本文才发现自己一直使用的命令不是这个命令,而是 `ltrace`(可以用来查看命令调用了哪些函数)。本文包含了丰富的信息,是开发人员和测试人员的快捷参考手册。
### 《Linux 桌面发展旅程》
Jim Hall 的《[Linux 桌面发展旅程][10]》是对 Linux 桌面历史的一次视觉之旅。从 [TWM][11] 开始,经历了 [FVWM][12]、[GNOME][13]、[KDE][14] 等薪火相传。如果你是 Linux 的新手,那么这将是一个出自那个年代的人的有趣的历史课(有截图可以证明这一点)。如果你已经使用 Linux 多年,那么这肯定会唤醒你的记忆。最后,可以肯定的是:仍然可以找到 20 年前屏幕快照的人都是神一样的数据档案管理员。
### 《用 Linux 创建你自己的视频流服务器》
Aaron J. Prisk 的 《[用 Linux 创建你自己的视频流服务器][15]》消除了大多数人对我们视为理所当然的服务的误解。由于 YouTube 和 Twitch 之类服务的存在,许多人认为这是向世界广播视频的唯一方式。当然,人们过去常常以为 Windows 和 Mac 是计算机的唯一入口值得庆幸的是最终证明这是严重的误解。在本文中Aaron 建立了一个视频流服务器,甚至还顺便讨论了一下 [OBS][16],以便你可以创建视频。这是一个有趣的周末项目还是新职业的开始?你自己决定。
### 《塑造 Linux 历史的 10 个时刻》
Alan Formy-Duval 撰写的《[塑造 Linux 历史的 10 个时刻][17]》试图完成一项艰巨的任务,即从 Linux 的历史中选出 10 件有代表性的事情。当然,这是很难的,因为有如此多重要的时刻,所以我想看看 Alan 是如何通过自己的经历来选择它。例如,什么时候开始意识到 Linux 必然可以发展下去?—— 当 Alan 意识到他维护的所有系统都在运行 Linux 时。用这种方式来解释历史是很美的,因为每个人的重要时刻都会有所不同。 关于 Linux 没有权威性列表,关于 Linux 的文章也没有,关于开源也没有。你可以创建你自己的列表,也可以使你自己成为列表的一部分。
LCTT 译注:这里推荐了 11 篇,我数了好几遍,没眼花……)
### 你想从何学起?
你还想知道 Linux 的什么内容?请在评论区告诉我们或来文讲述你的 Linux 经验。
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/12/learn-linux
作者:[Seth Kenlon][a]
选题:[lujun9972][b]
译者:[messon007](https://github.com/messon007)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/seth
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_Penguin_Image_520x292_12324207_0714_mm_v1a.png?itok=p7cWyQv9 "Penguins gathered together in the Artic"
[2]: https://linux.cn/article-11056-1.html
[3]: https://linux.cn/article-11586-1.html
[4]: http://opensource.com/article/19/4/troubleshooting-wifi-linux
[5]: https://linux.cn/article-11806-1.html
[6]: https://linux.cn/article-10884-1.html
[7]: https://opensource.com/article/19/8/understanding-file-paths-linux
[8]: https://linux.cn/article-10826-1.html
[9]: https://linux.cn/article-11545-1.html
[10]: https://opensource.com/article/19/8/how-linux-desktop-grown
[11]: https://github.com/freedesktop/twm
[12]: http://www.fvwm.org/
[13]: http://gnome.org
[14]: http://kde.org
[15]: https://opensource.com/article/19/1/basic-live-video-streaming-server
[16]: https://opensource.com/life/15/12/real-time-linux-video-editing-with-obs-studio
[17]: https://opensource.com/article/19/4/top-moments-linux-history
[18]: https://opensource.com/how-submit-article

View File

@ -0,0 +1,63 @@
[#]: collector: (lujun9972)
[#]: translator: (caiichenr)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-11999-1.html)
[#]: subject: (Prioritizing simplicity in your Python code)
[#]: via: (https://opensource.com/article/19/12/zen-python-simplicity-complexity)
[#]: author: (Moshe Zadka https://opensource.com/users/moshez)
简单是 Python 编程的第一要则
======
> 本文是 Python 之禅特别系列的第二篇,我们将要关注其中第三与第四条原则:简单与复杂。
![](https://img.linux.net.cn/data/attachment/album/202003/15/124150t4wf3wwgdrijx6xx.jpg)
> "Il semble que la perfection soit atteinte non quand il n'y a plus rien à ajouter, mais quand il n'y plus rien à retrancher."
>
> "It seems that perfection is finally attained not when there is no longer anything to add, but when there is no longer anything to take away."
>
> “完美并非无可增,而是不可减。”
>
> —Antoine de Saint-Exupéry, [Terre des Hommes][2], 1939
编程时最常有的考量是与复杂性的斗争,只想写出让旁人无从下手的繁杂代码,对每个程序员来讲都算不上难事。倘若未能触及代码的简繁取舍,那么 《[Python 之禅][3]》 就有了一角残缺。
### <ruby>简单胜过复杂<rt>Simple is better than complex</rt></ruby>
尚有选择余地时应该选简单的方案。Python 少有*不可为*之事这意味着设计出巴洛克风格LCTT 译注:即夸张和不理性)的程序只为解决浅显的问题不仅有可能,甚至很简单。
正因如此,编程时应当谨记,代码的简单性是最易丢失,却最难复得的。
这意味着,在可以选用函数来表达时不要去引入额外的类;避免使用强力的第三方库往往有助于你针对迫切的问题场景设计更妥当的简短函数。不过其根本的意图,旨在让你减少对将来的盘算,而去着重解决手头的问题。
以简单和优美作为指导原则的代码相比那些想要囊括将来一切变数的,在日后要容易修改得多。
### <ruby>复杂胜过错综复杂<rt>Complex is better than complicated</rt></ruby>
把握用词的精确含义对于理解这条令人费解的原则是至关重要的。形容某事<ruby>复杂<rt>complex</rt></ruby>,是说它由许多部分组成,着重组成成分之多;而形容某事<ruby>错综复杂<rt>complicated</rt></ruby>,则是指其包含着差异巨大、难以预料的行为,强调的是各组成部分之间的杂乱联系。
解决困难问题时,往往没有可行的简单方案。此时,最 Python 化的策略是“<ruby>自底向上<rt>bottom-up</rt></ruby>”地构建出简单的工具,之后将其组合用以解决该问题。
这正是<ruby>对象组合<rt>object composition</rt></ruby>这类技术的闪耀之处,它避免了错综复杂的继承体系,转而由独立的对象把一些方法调用传递给别的独立对象。这些对象都能独立地测试与部署,最终却可以组成一体。
“自底建造” 的另一例即是<ruby>[单分派泛函数][4]<rt>singledispatch</rt></ruby>的使用,抛弃了错综复杂的对象之后,我们得到是简单、几乎无行为的对象以及独立的行为。
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/12/zen-python-simplicity-complexity
作者:[Moshe Zadka][a]
选题:[lujun9972][b]
译者:[caiichenr](https://github.com/caiichenr)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/moshez
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/read_book_guide_tutorial_teacher_student_apaper.png?itok=_GOufk6N (Person reading a book and digital copy)
[2]: https://en.wikipedia.org/wiki/Wind,_Sand_and_Stars
[3]: https://www.python.org/dev/peps/pep-0020/
[4]: https://opensource.com/article/19/5/python-singledispatch

View File

@ -0,0 +1,87 @@
[#]: collector: (lujun9972)
[#]: translator: (wxy)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12011-1.html)
[#]: subject: (10 Linux command tutorials for beginners and experts)
[#]: via: (https://opensource.com/article/19/12/linux-commands)
[#]: author: (Moshe Zadka https://opensource.com/users/moshez)
10 篇对初学者和专家都有用的 Linux 命令教程
======
> 在这有关 Linux 命令的十大文章中,了解如何使 Linux 发挥所需的作用。
![](https://img.linux.net.cn/data/attachment/album/202003/19/095932xc64xw7cwqlolale.jpg)
**很好地**使用 Linux 意味着了解有哪些命令以及它们可以为你执行的功能。
### 《在 Linux 命令行下使用“原力”》
<ruby>原力<rt>force</rt></ruby>有光明的一面和黑暗的一面。正确理解这个对于真正掌握它至关重要。Alan Formy-Duval 在他的文章《[在 Linux 命令行下使用“原力”][2]》中,解释了一些流行的、有时是危险的命令的 `-f` 选项(也称为 `--force`)。
### 《Linux useradd 命令介绍》
共享帐户是一个坏主意。相反,请使用典型的 `useradd` 命令为不同的人(甚至是不同的角色)分配单独的帐户。作为其经典的 Linux 管理基础系列的一部分Alan Formy-Duval 提供了《[Linux useradd 命令介绍][3]》,并且像往常一样,他用**朴实明白的语言**对其进行了解释,以便新老管理员都可以理解。
### 《用 Linux 命令显示硬件信息》
机器**里面**是什么?有时不使用螺丝刀检查硬件很有用。无论是你正在使用的计算机,还是在商店购买前进行测试的计算机、或者是正在尝试维修的计算机,在《[用 Linux 命令显示硬件信息][4]》中Howard Fosdick 提供了或流行或晦涩难懂的命令,以帮助你深入了解计算机的硬件信息。
### 《如何在 Linux 上使用 gocryptfs 加密文件》
从社会保险号到个人信件再到亲人,我们的文件中包含了许多私人数据。在《[如何在 Linux 上使用 gocryptfs 加密文件][5]》中Brian "Bex" Exelbierd 解释了如何保持**隐私*的私密性。此外,他展示了一种加密文件的方式,这种方式对你现有的工作流程几乎没有影响。这不是复杂的 PGP 风格的密钥管理和后台密钥代理的难题,这是快速、无缝和安全的文件加密。
### 《如何使用 rsync 的高级用法进行大型备份》
在新的一年中许多人会下定决心要更加努力地进行备份。Alan Formy-Duval 早在几年前就已经做出了解决方案,因为在《[如何使用 rsync 的高级用法进行大型备份][6]》中,他表现出对文件同步命令的极其熟悉。你可能不会马上记住所有语法,但其思路是读取和处理选项、构造备份命令,然后使其自动化。这是使用 `rsync` 的明智方法,也是可靠地执行备份的**唯一**方法。
### 《在 Linux 命令行使用 more 查看文本文件》
在 Scott Nesbitt 的文章《[在 Linux 命令行使用 more 查看文本文件][7]》中,古老而良好的默认分页器 `more` 引起了人们的关注。许多人安装和使用 `less`,因为它比 `more` 更灵活。但是,随着越来越多的系统在新出现的容器中实现,有时甚至不存在像 `less``most` 之类的新颖的豪华工具。了解和使用`more` 很简单,这是常见的默认设置,并且是生产系统最后的调试工具。
### 《关于 sudo 你可能不知道的》
`sudo` 命令因其过失而闻名。人们知道 `sudo` 一词,我们大多数人认为我们知道它的作用。我们的观点是正确的,但是正如 Peter Czanik 在他的文章《[关于 sudo 你可能不知道的][8]》中所揭示的那样,该命令所包含的不仅仅是“<ruby>西蒙说的<rt>Simon says</rt></ruby>LCTT 译注:国外的一个儿童游戏)。就像这个经典的童年游戏一样,`sudo` 命令功能强大,也容易犯愚蠢的错误 —— 有更多的可能产生可怕都后果,而这是你绝不想遇上的事情!
### 《怎样用 Bash 编程:语法和工具》
如果你是 Linux、BSD 或 Mac以及近来的 Windows用户你也许使用过交互式 Bash shell。它是快速的、一次性命令的绝佳 shell这就是为什么这么多 Linux 用户喜欢将其用作主要用户界面的原因。但是Bash 不仅仅是个命令提示符。它也是一种编程语言,如果你已经在使用 Bash 命令,那么自动化的道路从未如此简单过。在 David Both 的出色作品《[怎样用 Bash 编程:语法和工具][9]》中对其进行全面了解。
### 《精通 Linux 的 ls 命令》
`ls` 命令是那些两个字母的命令之一。单字母命令是针对慢速终端的优化因为慢速终端的输入的每个字母都会导致明显的延迟而这对于懒惰的打字员来说也是不错的奖励。一如既往地Seth Kenlon 清晰实用地解释了你可以怎样《[精通 Linux 的 ls 命令][10]》。最重要的是,在“一切都是文件”的系统中,列出文件至关重要。
### 《Linux cat 命令入门》
`cat` 命令con*cat*enate 的缩写)看似简单。无论是使用它来快速查看文件的内容还是将内容通过管道传输到另一个命令,你都可能没有充分利用 `cat` 的功能。Alan Formy-Duval 的《[Linux cat 命令入门][11]》提供了一些新思路,可以使你没有打开文件的感觉就可以看到文件内容。另外,了解各种有关 `zcat` 的知识,这样你就可以无需解压缩就可以得到压缩文件的内容!这是一件小而简单的事情,但是**这**是使 Linux 很棒的原因。
### 继续旅程
不要让这些关于 Linux 命令的 10 篇最佳文章成为你的旅程终点。关于 Linux 及其多才多艺的提示符,还有更多值得去发现,因此,请继续关注以获取更多知识。而且,如果你想让我们介绍一个 Linux 命令,请在评论中告诉我们。
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/12/linux-commands
作者:[Moshe Zadka][a]
选题:[lujun9972][b]
译者:[wxy](https://github.com/wxy)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/moshez
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/car-penguin-drive-linux-yellow.png?itok=twWGlYAc (Penguin driving a car with a yellow background)
[2]: https://linux.cn/article-10881-1.html
[3]: https://linux.cn/article-11756-1.html
[4]: https://linux.cn/article-11422-1.html
[5]: https://opensource.com/article/19/8/how-encrypt-files-gocryptfs
[6]: https://linux.cn/article-10865-1.html
[7]: https://linux.cn/article-10531-1.html
[8]: https://linux.cn/article-11595-1.html
[9]: https://linux.cn/article-11552-1.html
[10]: https://linux.cn/article-11159-1.html
[11]: https://opensource.com/article/19/2/getting-started-cat-command
[12]: https://opensource.com/how-submit-article

View File

@ -1,103 +1,103 @@
[#]: collector: (lujun9972)
[#]: translator: (lxbwolf)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: translator: (geekpi)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-11997-1.html)
[#]: subject: (How to setup a DNS server with bind)
[#]: via: (https://fedoramagazine.org/how-to-setup-a-dns-server-with-bind/)
[#]: author: (Curt Warfield https://fedoramagazine.org/author/rcurtiswarfield/)
How to setup a DNS server with bind
简明指南:使用 bind 设置 DNS 服务器
======
![][1]
The Domain Name System, or DNS, as its more commonly known, translates or converts domain names into the IP addresses associated with that domain. DNS is the reason you are able to find your favorite website by name instead of typing an IP address into your browser. This guide shows you how to configure a Master DNS system and one client.
<ruby>域名系统<rt>Domain Name System</rt></ruby>,我们更通常称为 DNS 的系统,可以将域名翻译或转换为与该域关联的 IP 地址。DNS 是能够让你通过名称找到自己喜欢的网站而不是在浏览器中输入 IP 地址的原因。本指南将向你展示如何配置一个主 DNS 系统以及客户端。
Here are system details for the example used in this article:
以下是本文示例中使用的系统细节:
```
dns01.fedora.local (192.168.1.160 ) - Master DNS server
client.fedora.local (192.168.1.136 ) - Client
dns01.fedora.local 192.168.1.160- 主 DNS 服务器
client.fedora.local 192.168.1.136- 客户端
```
### DNS server configuration
### DNS 服务器配置
Install the bind packages using sudo:
使用 `sudo` 安装 bind 包:
```
$ sudo dnf install bind bind-utils -y
```
The _/etc/named.conf_ configuration file is provided by the _bind_ package to allow you to configure the DNS server.
bind 包提供了 `/etc/named.conf` 配置文件,来供你配置 DNS 服务器。
Edit the _/etc/named.conf_ file:
编辑 `/etc/named.conf` 文件:
```
sudo vi /etc/named.conf
```
Look for the following line:
查找以下行:
```
listen-on port 53 { 127.0.0.1; };
```
Add the IP address of your Master DNS server as follows:
添加主 DNS 服务器的 IP 地址,如下所示:
```
listen-on port 53 { 127.0.0.1; 192.168.1.160; };
```
Look for the next line:
查找以下行:
```
allow-query { localhost; };
```
Add your local network range. The example system uses IP addresses in the 192.168.1.X range. This is specified as follows:
添加本地网络范围。该示例系统使用的 IP 地址在 192.168.1.X 的范围内。指定如下:
```
allow-query { localhost; 192.168.1.0/24; };
```
Specify a forward and reverse zone. Zone files are simply text files that have the DNS information, such as IP addresses and host-names, on your system. The forward zone file makes it possible for the translation of a host-name to its IP address. The reverse zone file does the opposite. It allows a remote system to translate an IP address to the host name.
指定转发和反向区域。<ruby>区域文件<rt>Zone file</rt></ruby>就是具有系统上 DNS 信息(例如 IP 地址和主机名)的文本文件。<ruby>转发区域文件<rt>forward zone file</rt></ruby>使得将主机名转换为 IP 地址成为可能。<ruby>反向区域文件<rt>reverse zone file</rt></ruby>则相反。它允许远程系统将 IP 地址转换为主机名。
Look for the following line at the bottom of the /etc/named.conf file:
`/etc/named.conf` 文件的底部查找以下行:
```
include "/etc/named.rfc1912.zones";
```
Here, youll specify the zone file information _**directly above that line**_ as follows:
在此处,你将在**该行的正上方**指定区域文件信息,如下所示:
```
zone "dns01.fedora.local" IN {
type master;
file "forward.fedora.local";
allow-update { none; };
type master;
file "forward.fedora.local";
allow-update { none; };
};
zone "1.168.192.in-addr.arpa" IN {
type master;
file "reverse.fedora.local";
allow-update { none; };
type master;
file "reverse.fedora.local";
allow-update { none; };
};
```
The _forward.fedora.local_ and the file _reverse.fedora.local_ are just the names of the zone files you will be creating. They can be called anything you like.
`forward.fedora.local``reverse.fedora.local` 文件是要创建的区域文件的名称。它们可以是任意名字。
Save and exit.
保存并退出。
#### Create the zone files
#### 创建区域文件
Create the forward and reverse zone files you specified in the /etc/named.conf file:
创建你在 `/etc/named.conf` 文件中指定的转发和反向区域文件:
```
$ sudo vi /var/named/forward.fedora.local
```
Add the following lines:
添加以下行:
```
$TTL 86400
@ -114,13 +114,13 @@ dns01 IN A 192.168.1.160
client IN A 192.168.1.136
```
Everything in _**bold**_ is specific to your environment. Save the file and exit. Next, edit the _reverse.fedora.local_ file:
所有**粗体**LCTT 译注:本译文中无法呈现粗体)内容都特定于你的环境。保存文件并退出。接下来,编辑 `reverse.fedora.local` 文件:
```
$ sudo vi /var/named/reverse.fedora.local
```
Add the following lines:
添加以下行:
```
$TTL 86400
@ -139,9 +139,9 @@ client IN A 192.168.1.136
136 IN PTR client.fedora.local.
```
Everything in _**bold**_ is also specific to your environment. Save the file and exit.
所有**粗体**LCTT 译注:本译文中无法呈现粗体)内容都特定于你的环境。保存文件并退出。
Youll also need to configure SELinux and add the correct ownership for the configuration files.
你还需要配置 SELinux 并为配置文件添加正确的所有权。
```
sudo chgrp named -R /var/named
@ -150,22 +150,22 @@ sudo restorecon -rv /var/named
sudo restorecon /etc/named.conf
```
Configure the firewall:
配置防火墙:
```
sudo firewall-cmd --add-service=dns --perm
sudo firewall-cmd --reload
```
#### Check the configuration for any syntax errors
#### 检查配置是否存在语法错误
```
sudo named-checkconf /etc/named.conf
```
Your configuration is valid if no output or errors are returned.
如果没有输出或返回错误,那么你的配置有效。
Check the forward and reverse zone files.
检查转发和反向区域文件。
```
$ sudo named-checkzone forward.fedora.local /var/named/forward.fedora.local
@ -173,7 +173,7 @@ $ sudo named-checkzone forward.fedora.local /var/named/forward.fedora.local
$ sudo named-checkzone reverse.fedora.local /var/named/reverse.fedora.local
```
You should see a response of OK:
你应该看到 “OK” 的响应:
```
zone forward.fedora.local/IN: loaded serial 2011071001
@ -183,50 +183,50 @@ zone reverse.fedora.local/IN: loaded serial 2011071001
OK
```
#### Enable and start the DNS service
#### 启用并启动 DNS 服务
```
$ sudo systemctl enable named
$ sudo systemctl start named
```
#### Configuring the resolv.conf file
#### 配置 resolv.conf 文件
Edit the _/etc/resolv.conf_ file:
编辑 `/etc/resolv.conf` 文件:
```
$ sudo vi /etc/resolv.conf
```
Look for your current name server line or lines. On the example system, a cable modem/router is serving as the name server and so it currently looks like this:
查找你当前的 `nameserver` 行。在示例系统上,使用调制解调器/路由器充当名称服务器,因此当前看起来像这样:
```
nameserver 192.168.1.1
```
This needs to be changed to the IP address of the Master DNS server:
这需要更改为主 DNS 服务器的 IP 地址:
```
nameserver 192.168.1.160
```
Save your changes and exit.
保存更改并退出。
Unfortunately there is one caveat to be aware of. NetworkManager overwrites the _/etc/resolv.conf_ file if the system is rebooted or networking gets restarted. This means you will lose all of the changes that you made.
不幸的是需要注意一点。如果系统重启或网络重启,那么 NetworkManager 会覆盖 `/etc/resolv.conf` 文件。这意味着你将丢失所做的所有更改。
To prevent this from happening, make _/etc/resolv.conf_ immutable:
为了防止这种情况发生,请将 `/etc/resolv.conf` 设为不可变:
```
$ sudo chattr +i /etc/resolv.conf
```
If you want to set it back and allow it to be overwritten again:
如果要重新设置,就需要允许其再次被覆盖:
```
$ sudo chattr -i /etc/resolv.conf
```
#### Testing the DNS server
#### 测试 DNS 服务器
```
$ dig fedoramagazine.org
@ -266,27 +266,27 @@ $ dig fedoramagazine.org
;; MSG SIZE rcvd: 266
```
There are a few things to look at to verify that the DNS server is working correctly. Obviously getting the results back are important, but that by itself doesnt mean the DNS server is actually doing the work.
需要检查几件事以验证 DNS 服务器是否正常运行。显然,取得结果很重要,但这本身并不意味着 DNS 服务器实际上正常工作。
The QUERY, ANSWER, and AUTHORITY fields at the top should show non-zero as it in does in our example:
顶部的 `QUERY`、`ANSWER` 和 `AUTHORITY` 字段应显示为非零,如我们的示例所示:
```
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 3, ADDITIONAL: 6
```
And the SERVER field should have the IP address of your DNS server:
并且 `SERVER` 字段应有你的 DNS 服务器的 IP 地址:
```
;; SERVER: 192.168.1.160#53(192.168.1.160)
```
In case this is the first time youve run the _dig_ command, notice how it took 830 milliseconds for the query to complete:
如果这是你第一次运行 `dig` 命令,请注意完成查询要花费 830 毫秒的时间:
```
;; Query time: 830 msec
```
If you run it again, the query will run much quicker:
如果再次运行它,查询将会更快:
```
$ dig fedoramagazine.org
@ -297,37 +297,37 @@ $ dig fedoramagazine.org
;; SERVER: 192.168.1.160#53(192.168.1.160)
```
### Client configuration
### 客户端配置
The client configuration will be a lot simpler.
客户端配置将简单得多。
Install the bind utilities:
安装 bind 程序:
```
$ sudo dnf install bind-utils -y
```
Edit the /etc/resolv.conf file and configure the Master DNS as the only name server:
编辑 `/etc/resolv.conf` 文件,并将主 DNS 配置为唯一的名称服务器:
```
$ sudo vi /etc/resolv.conf
```
This is how it should look:
它看起来像这样:
```
nameserver 192.168.1.160
```
Save your changes and exit. Then, make the _/etc/resolv.conf_ file immutable to prevent it from be overwritten and going back to its default settings:
保存更改并退出。然后,使 `/etc/resolv.conf` 文件不可变,防止其被覆盖并变回默认设置:
```
$ sudo chattr +i /etc/resolv.conf
```
#### Testing the client
#### 测试客户端
You should get the same results as you did from the DNS server:
你应该获得与 DNS 服务器相同的结果:
```
$ dig fedoramagazine.org
@ -367,9 +367,9 @@ $ dig fedoramagazine.org
;; MSG SIZE rcvd: 266
```
Make sure the SERVER output has the IP Address of your DNS server.
确保 `SERVER` 输出的是你 DNS 服务器的 IP 地址。
Your DNS server is now ready to use and all requests from the client should be going through your DNS server now!
你的 DNS 服务器设置完成了,现在所有来自客户端的请求都会经过你的 DNS 服务器了!
--------------------------------------------------------------------------------
@ -377,8 +377,8 @@ via: https://fedoramagazine.org/how-to-setup-a-dns-server-with-bind/
作者:[Curt Warfield][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
译者:[geekpi](https://github.com/geekpi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -1,8 +1,8 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-11960-1.html)
[#]: subject: (Syncthing: Open Source P2P File Syncing Tool)
[#]: via: (https://itsfoss.com/syncthing/)
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
@ -10,11 +10,11 @@
Syncthing开源 P2P 文件同步工具
======
_ **简介:Syncthing 是一个开源的 P2P 文件同步工具,可用于在多个设备(包括 Android 手机)之间同步文件。** _
> Syncthing 是一个开源的 P2P 文件同步工具,可用于在多个设备(包括 Android 手机)之间同步文件。
通常,我们有 [MEGA][1] 或 Dropbox 之类的云同步解决方案,以便在云上备份我们的文件,同时更易于共享。
![](https://img.linux.net.cn/data/attachment/album/202003/05/094211oy2dosttvoaseovk.jpg)
但是,如果要跨多个设备同步文件而不将其存储在云中怎么办?
通常,我们有 [MEGA][1] 或 Dropbox 之类的云同步解决方案,以便在云上备份我们的文件,同时更易于共享。但是,如果要跨多个设备同步文件而不将其存储在云中怎么办?
这就是 [Syncthing][2] 派上用场的地方了。
@ -22,7 +22,7 @@ _ **简介Syncthing 是一个开源的 P2P 文件同步工具,可用于在
![][3]
Syncthing 可让你跨多个设备同步文件(包括对 Android 智能手机的支持)。它主要通过 Linux 的 Web UI 进行工作,但也提供了 GUI需要单独安装
Syncthing 可让你跨多个设备同步文件(包括对 Android 智能手机的支持)。它主要通过 Linux 的 Web UI 进行工作,但也提供了 GUI需要单独安装
然而Syncthing 完全没有利用云,它是 [P2P][4] 文件同步工具。你的数据不会被发送到中央服务器。而是会在所有设备之间同步。因此,它并不能真正取代 [Linux 上的典型云存储服务][5]。
@ -36,7 +36,7 @@ Syncthing 可让你跨多个设备同步文件(包括对 Android 智能手机
例如,你可能不想在云上存储一些敏感文件,因此你可以添加其他受信任的设备来同步并保留这些文件的副本。
即使我简单描述了它,但它并不像看到的那么简单。如果你感兴趣的话,我建议你阅读[官方 FAQ][7] 来了解它如何工作的。
即使我对它的描述很简单,但它并不像看到的那么简单。如果你感兴趣的话,我建议你阅读[官方 FAQ][7] 来了解它如何工作的。
### Syncthing 的特性
@ -90,15 +90,15 @@ Syncthing 确实非常简单且易于理解。即使这样,如果你想使用
你可能无法在软件中心找到它(如果你找到了,那它可能不是最新版本)。
**注意:**_如果你需要一个 GUI 而不是浏览器来管理它,它还有一个 [Syncthing-GTK][16]。_
**注意:**如果你需要一个 GUI 应用而不是浏览器来管理它,它还有一个 [Syncthing-GTK][16]。
[Syncthing][2]
- [Syncthing][2]
如果你有基于 Debian 的发行版,你也可以利用终端来安装它,这些说明位于[官方下载页面][17] 上。
如果你有基于 Debian 的发行版,你也可以利用终端来安装它,这些说明位于[官方下载页面][17]上。
### 我在 Syncthing 方面的体验
就个人而言,我把它安装在 Pop!\_OS 19.10 上,并在写这篇文章之前用了一会儿。
就个人而言,我把它安装在 Pop!_OS 19.10 上,并在写这篇文章之前用了一会儿。
我尝试同步文件夹、删除它们、添加重复文件以查看文件版本控制是否工作,等等。它工作良好。
@ -108,7 +108,7 @@ Syncthing 确实非常简单且易于理解。即使这样,如果你想使用
总体而言,它工作良好,但我必须说,你不应该依赖它作为唯一的数据备份方案。
**总结**
### 总结
你试过 Syncthing 了吗?如果有的话,你的体验如何?欢迎在下面的评论中分享。
@ -121,7 +121,7 @@ via: https://itsfoss.com/syncthing/
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -0,0 +1,142 @@
[#]: collector: (lujun9972)
[#]: translator: (lujun9972)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12004-1.html)
[#]: subject: (6 things you should be doing with Emacs)
[#]: via: (https://opensource.com/article/20/1/emacs-cheat-sheet)
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
6 件你应该用 Emacs 做的事
======
> 下面六件事情你可能都没有意识到可以在 Emacs 下完成。此外还有我们的新备忘单,拿去,充分利用 Emacs 的功能吧。
![](https://img.linux.net.cn/data/attachment/album/202003/17/133738wjj66p2safcpc50z.jpg)
想象一下使用 Python 的 IDLE 界面来编辑文本。你可以将文件加载到内存中,编辑它们,并保存更改。但是你执行的每个操作都由 Python 函数定义。例如,调用 `upper()` 来让一个单词全部大写,调用 `open` 打开文件,等等。文本文档中的所有内容都是 Python 对象,可以进行相应的操作。从用户的角度来看,这与其他文本编辑器的体验一致。对于 Python 开发人员来说,这是一个丰富的 Python 环境,只需在配置文件中添加几个自定义函数就可以对其进行更改和开发。
这就是 [Emacs][2] 对 1958 年的编程语言 [Lisp][3] 所做的事情。在 Emacs 中,运行应用程序的 Lisp 引擎与输入文本之间无缝结合。对 Emacs 来说,一切都是 Lisp 数据,因此一切都可以通过编程进行分析和操作。
这造就了一个强大的用户界面UI。但是如果你是 Emacs 的普通用户,你可能对它的能力知之甚少。下面是你可能没有意识到 Emacs 可以做的六件事。
### 使用 Tramp 模式进行云端编辑
Emacs 早在网络流行化之前就实现了透明的网络编辑能力了而且时至今日它仍然提供了最流畅的远程编辑体验。Emacs 中的 [Tramp 模式][4](以前称为 RPC 模式)代表着 “<ruby>透明的远程(文件)访问,多协议<rt>Transparent Remote (file) AccessMultiple Protocol</rt></ruby>”,这准确说明了它提供的功能:通过最流行的网络协议轻松访问你希望编辑的远程文件。目前最流行、最安全的能用于远程编辑的协议是 [OpenSSH][5],因此 Tramp 使用它作为默认的协议。
在 Emacs 22.1 或更高版本中已经包含了 Tramp因此要使用 Tramp只需使用 Tramp 语法打开一个文件。在 Emacs 的 “File” 菜单中,选择 “Open File”。当在 Emacs 窗口底部的小缓冲区中出现提示时,使用以下语法输入文件名:
```
/ssh:user@example.com:/path/to/file
```
如果需要交互式登录Tramp 会提示你输入密码。但是Tramp 直接使用 OpenSSH所以为了避免交互提示你可以将主机名、用户名和 SSH 密钥路径添加到你的 `~/.ssh/config` 文件。与 Git 一样Emacs 首先使用你的 SSH 配置,只有在出现错误时才会停下来询问更多信息。
Tramp 非常适合编辑并没有放在你的计算机上的文件,它的用户体验与编辑本地文件没有明显的区别。下次,当你 SSH 到服务器启动 Vim 或 Emacs 会话时,请尝试使用 Tramp。
### 日历
如果你喜欢文本多过图形界面,那么你一定会很高兴地知道,可以使用 Emacs 以纯文本的方式安排你的日程(或生活),而且你依然可以在移动设备上使用开源的 [Org 模式][6]查看器来获得华丽的通知。
这个过程需要一些配置,以创建一个方便的方式来与移动设备同步你的日程(我使用 Git但你可以调用蓝牙、KDE Connect、Nextcloud或其他文件同步工具此外你必须在移动设备上安装一个 Org 模式查看器(如 [Orgzly][7])以及 Git 客户程序。但是一旦你搭建好了这些基础该流程就会与你常用的或正在完善的如果你是新用户Emacs 工作流完美地集成在一起。你可以在 Emacs 中方便地查阅日程、更新日程,并专注于任务上。议程上的变化将会反映在移动设备上,因此即使在 Emacs 不可用的时候,你也可以保持井然有序。
![][8]
感兴趣了?阅读我的关于[使用 Org mode 和 Git 进行日程安排][9]的逐步指南。
### 访问终端
有[许多终端模拟器][10]可用。尽管 Emacs 中的 Elisp 终端仿真器不是最强大的通用仿真器,但是它有两个显著的优点:
1. **打开在 Emacs 缓冲区之中**:我使用 Emacs 的 Elisp shell因为它在 Emacs 窗口中打开很方便,我经常全屏运行该窗口。这是一个小而重要的优势,只需要输入 `Ctrl+x+o`(或用 Emacs 符号来表示就是 `C-x o`)就能使用终端了,而且它还有一个特别好的地方在于当运行漫长的作业时能够一瞥它的状态报告。
2. **在没有系统剪贴板的情况下复制和粘贴特别方便**:无论是因为懒惰不愿将手从键盘移动到鼠标,还是因为在远程控制台运行 Emacs 而无法使用鼠标,在 Emacs 中运行终端有时意味着可以从 Emacs 缓冲区中很快地传输数据到 Bash。
要尝试 Emacs 终端,输入 `Alt+x`(用 Emacs 符号表示就是 `M-x`),然后输入 `shell`,然后按回车。
### 使用 Racket 模式
[Racket][11] 是一种激动人心的新兴 Lisp 方言拥有动态编程环境、GUI 工具包和充满激情的社区。学习 Racket 的默认编辑器是 DrRacket它的顶部是定义面板底部是交互面板。使用该设置用户可以编写影响 Racket 运行时环境的定义。就像旧的 [Logo Turtle][12] 程序,但是有一个终端而不是仅仅一个海龟。
![Racket-mode][13]
*由 PLT 提供的 LGPL 示例代码*
基于 Lisp 的 Emacs 为资深 Racket 编程人员提供了一个很好的集成开发环境IDE。它尚未附带 [Racket 模式][14],但你可以使用 Emacs 包安装程序安装 Racket 模式和辅助扩展。要安装它,按下 `Alt+X`(用 Emacs 符号表示就是 `M-x`),键入 `package-install`,然后按回车。接着输入要安装的包 `racet-mode`,按回车。
使用 `M-x racket-mode` 进入 Racket 模式。如果你是 Racket 新手,而对 Lisp 或 Emacs 比较熟悉,可以从这份优秀的[图解 Racket][15] 入手。
## 脚本
你可能知道Bash 脚本在自动化和增强 Linux 或 Unix 体验方面很流行。你可能听说过 Python 在这方面也做得很好。但是你知道 Lisp 脚本可以用同样的方式运行吗?有时人们会对 Lisp 到底有多有用感到困惑,因为许多人是通过 Emacs 来了解 Lisp 的,因此有一种潜在的印象,即在 21 世纪运行 Lisp 的惟一方法是在 Emacs 中运行。幸运的是事实并非如此Emacs 是一个很好的 IDE它支持将 Lisp 脚本作为一般的系统可执行文件来运行。
除了 Elisp 之外,还有两种流行的现代 Lisp 可以很容易地用来作为独立脚本运行。
1. **Racket**:你可以通过在系统上运行 Racket 来提供运行 Racket 脚本所需的运行时支持,或者你可以使用 `raco exe` 产生一个可执行文件。`raco exe` 命令将代码和运行时支持文件一起打包,以创建可执行文件。然后,`raco distribution` 命令将可执行文件打包成可以在其他机器上工作的发行版。Emacs 有许多 Racket 工具,因此在 Emacs 中创建 Racket 文件既简单又有效。
2. **GNU Guile**[GNU Guile][16]<ruby>GNU 通用智能语言扩展<rt>GNU Ubiquitous Intelligent Language for Extensions</rt></ruby> 的缩写)是 [Scheme][17] 编程语言的一个实现它可以用于为桌面、互联网、终端等创建应用程序和游戏。Emacs 中的 Scheme 扩展众多,使用任何一个扩展来编写 Scheme 都很容易。例如,这里有一个用 Guile 编写的 “Hello world” 脚本:
```
#!/usr/bin/guile -s
!#
(display "hello world")
(newline)
```
`guile` 编译并允许它:
```
$ guile ./hello.scheme
;;; compiling /home/seth/./hello.scheme
;;; compiled [...]/hello.scheme.go
hello world
$ guile ./hello.scheme
hello world
```
### 无需 Emacs 允许 Elisp
Emacs 可以作为 Elisp 的运行环境,但是你无需按照传统印象中的必须打开 Emacs 来运行 Elisp。`--script` 选项可以让你使用 Emacs 作为引擎来执行 Elisp 脚本,而无需运行 Emacs 图形界面(甚至也无需使用终端)。下面这个例子中,`-Q` 选项让 Emacs 忽略 `.emacs` 文件,从而避免由于执行 Elisp 脚本时产生延迟(若你的脚本依赖于 Emacs 配置中的内容,那么请忽略该选项)。
```
emacs -Q --script ~/path/to/script.el
```
### 下载 Emacs 备忘录
Emacs 许多重要功能都不是只能通过 Emacs 来实现的Org 模式是 Emacs 扩展也是一种格式标准,流行的 Lisp 方言大多不依赖于具体的应用,我们甚至可以在没有可见或可交互式 Emacs 实例的情况下编写和运行 Elisp。然后若你对为什么模糊代码和数据之间的界限能够引发创新和效率感到好奇的话那么 Emacs 是一个很棒的工具。
幸运的是,现在是 21 世纪Emacs 有了带有传统菜单的图形界面以及大量的文档,因此学习曲线不再像以前那样。然而,要最大化 Emacs 对你的好处,你需要学习它的快捷键。由于 Emacs 支持的每个任务都是一个 Elisp 函数Emacs 中的任何功能都可以对应一个快捷键,因此要描述所有这些快捷键是不可能完成的任务。你只要学习使用频率 10 倍于不常用功能的那些快捷键即可。
我们汇聚了最常用的 Emacs 快捷键成为一份 Emacs 备忘录以便你查询。将它挂在屏幕附近或办公室墙上,把它作为鼠标垫也行。让它触手可及经常翻阅一下。每次翻两下可以让你获得十倍的学习效率。而且一旦开始编写自己的函数,你一定不会后悔获取了这个免费的备忘录副本的!
- [这里下载 Emacs 备忘录(需注册)](https://opensource.com/downloads/emacs-cheat-sheet)
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/1/emacs-cheat-sheet
作者:[Seth Kenlon][a]
选题:[lujun9972][b]
译者:[lujun9972](https://github.com/lujun9972)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/seth
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_blue_text_editor_web.png
[2]: https://www.gnu.org/software/emacs/
[3]: https://en.wikipedia.org/wiki/Lisp_(programming_language)
[4]: https://www.gnu.org/software/tramp/
[5]: https://www.openssh.com/
[6]: https://orgmode.org/
[7]: https://f-droid.org/en/packages/com.orgzly/
[8]: https://opensource.com/sites/default/files/uploads/orgzly-agenda.jpg
[9]: https://linux.cn/article-11320-1.html
[10]: https://linux.cn/article-11814-1.html
[11]: http://racket-lang.org/
[12]: https://en.wikipedia.org/wiki/Logo_(programming_language)#Turtle_and_graphics
[13]: https://opensource.com/sites/default/files/racket-mode.jpg
[14]: https://www.racket-mode.com/
[15]: https://docs.racket-lang.org/quick/index.html
[16]: https://www.gnu.org/software/guile/
[17]: https://en.wikipedia.org/wiki/Scheme_(programming_language)

View File

@ -1,63 +1,63 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-11964-1.html)
[#]: subject: (Build your own cloud with Fedora 31 and Nextcloud Server)
[#]: via: (https://fedoramagazine.org/build-your-own-cloud-with-fedora-31-and-nextcloud-server/)
[#]: author: (storyteller https://fedoramagazine.org/author/storyteller/)
Build your own cloud with Fedora 31 and Nextcloud Server
使用 Fedora 31 和 Nextcloud 服务器构建自己的云
======
![][1]
[Nextcloud][2] is a software suite for storing and syncing your data across multiple devices. You can learn more about Nextcloud Servers features from [https://github.com/nextcloud/server][3].
[Nextcloud][2] 是用于跨多个设备存储和同步数据的软件套件。你可以从 [https://github.com/nextcloud/server][3] 了解有关 Nextcloud 服务器的更多特性信息。
This article demonstrates how to build a personal cloud using Fedora and Nextcloud in a few simple steps. For this tutorial you will need a dedicated computer or a virtual machine running Fedora 31 server edition and an internet connection.
本文通过几个简单的步骤演示了如何使用 Fedora 和 Nextcloud 构建个人云。对于本教程,你将需要一台独立计算机或运行 Fedora 31 服务器版的虚拟机,还需要互联网连接。
### Step 1: Install the prerequisites
### 步骤 1预先安装条件
Before installing and configuring Nextcloud, a few prerequisites must be satisfied.
在安装和配置 Nextcloud 之前,必须满足一些预先条件。
First, install Apache web server:
首先,安装 Apache Web 服务器:
```
# dnf install httpd
```
Next, install PHP and some additional modules. Make sure that the PHP version being installed meets [Nextclouds requirements][4]:
接下来,安装 PHP 和一些其他模块。确保所安装的 PHP 版本符合 [Nextcloud 的要求][4]
```
# dnf install php php-gd php-mbstring php-intl php-pecl-apcu php-mysqlnd php-pecl-redis php-opcache php-imagick php-zip php-process
```
After PHP is installed enable and start the Apache web server:
安装 PHP 后,启用并启动 Apache Web 服务器:
```
# systemctl enable --now httpd
```
Next, allow _HTTP_ traffic through the firewall:
接下来,允许 HTTP 流量穿过防火墙:
```
# firewall-cmd --permanent --add-service=http
# firewall-cmd --reload
```
Next, install the MariaDB server and client:
接下来,安装 MariaDB 服务器和客户端:
```
# dnf install mariadb mariadb-server
```
Then enable and start the MariaDB server:
然后启用并启动 MariaDB 服务器
```
# systemctl enable --now mariadb
```
Now that MariaDB is running on your server, you can run the _mysql_secure_installation_ command to secure it:
现在MariaDB 正在运行,你可以运行 `mysql_secure_installation` 命令来保护它:
```
# mysql_secure_installation
@ -128,7 +128,7 @@ MariaDB installation should now be secure.
Thanks for using MariaDB!
```
Next, create a dedicated user and database for your Nextcloud instance:
接下来,为你的 Nextcloud 实例创建独立的用户和数据库:
```
# mysql -p
@ -139,23 +139,23 @@ Next, create a dedicated user and database for your Nextcloud instance:
> exit;
```
### Step 2: Install Nextcloud Server
### 步骤 2安装 Nextcloud 服务器
Now that the prerequisites for your Nextcloud installation have been satisfied, download and unzip [the Nextcloud archive][5]:
现在,你已满足 Nextcloud 安装的预先条件,请下载并解压 [Nextcloud 压缩包][5]
```
# wget https://download.nextcloud.com/server/releases/nextcloud-17.0.2.zip
# unzip nextcloud-17.0.2.zip -d /var/www/html/
```
Next, create a data folder and grant Apache read and write access to the _nextcloud_ directory tree:
接下来,创建一个数据文件夹,并授予 Apache 对 `nextcloud` 目录树的读写访问权限:
```
# mkdir /var/www/html/nextcloud/data
# chown -R apache:apache /var/www/html/nextcloud
```
SELinux must be configured to work with Nextcloud. The basic commands are those bellow, but a lot more, by features used on nexcloud installation, are posted here: [Nextcloud SELinux configuration][6]
SELinux 必须配置为可与 Nextcloud 一起使用。基本命令如下所示,但在 nexcloud 安装中还有很多其他的命令,发布在这里:[Nextcloud SELinux 配置][6]。
```
# semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/config(/.*)?'
@ -166,34 +166,32 @@ SELinux must be configured to work with Nextcloud. The basic commands are those
# restorecon -Rv '/var/www/html/nextcloud/'
```
### Step 3: Configure N**extclou**d
### 步骤 3配置 Nextcloud
Nextcloud can be configured using its web interface or from the command line.
可以使用它的 Web 界面或在命令行配置 Nextcloud。
#### Using the web interface
#### 使用 Web 界面
From your favorite browser, access _<http://your\_server\_ip/nextcloud>_ and fill the fields:
在你喜欢的浏览器中,访问 <http://your\_server\_ip/nextcloud> 并输入字段:
![][7]
#### Using the command line
#### 使用命令行
From the command line, just enter the following, substituting the values you used when you created a dedicated Nextcloud user in MariaDB earlier:
在命令行中,只需输入以下内容,使用你之前在 MariaDB 中创建的独立 Nextcloud 用户替换相应的值:
```
# sudo -u apache php occ maintenance:install --data-dir /var/www/html/nextcloud/data/ --database "mysql" --database-name "nextcloud" --database-user "nc_admin" --database-pass "DB_SeCuRe_PaSsWoRd" --admin-user "admin" --admin-pass "Admin_SeCuRe_PaSsWoRd"
```
### Final Notes
### 最后几点
* I used the _http_ protocol, but Nextcloud also works over _https_. I might write a follow-up about securing Nextcloud in a future article.
* I disabled SELinux, but your server will be more secure if you configure it.
* The recommend PHP memory limit for Nextcloud is 512M. To change it, edit the _memory_limit_ variable in the _/etc/php.ini_ configuration file and restart your _httpd_ service.
* By default, the web interface can only be accessed using the _<http://localhost/>_ URL. If you want to allow access using other domain names, [you can do so by editing the _/var/www/html/nextcloud/config/config.php_ file][8]. The * character can be used to bypass the domain name restriction and allow the use of any URL that resolves to one of your servers IP addresses.
* 我使用的是 http 协议,但是 Nextcloud 也可以在 https 上运行。我可能会在以后的文章中写一篇有关保护 Nextcloud 的文章。
* 我禁用了 SELinux但是如果配置它你的服务器将更加安全。
* Nextcloud 的建议 PHP 内存限制为 512M。要更改它请编辑 `/etc/php.ini` 配置文件中的 `memory_limit` 变量,然后重新启动 httpd 服务。
* 默认情况下,只能使用 <http://localhost/> URL 访问 Web 界面。如果要允许使用其他域名访问,[你可编辑 /var/www/html/nextcloud/config/config.php 来进行此操作][8]。`*` 字符可用于绕过域名限制,并允许任何解析为服务器 IP 的 URL 访问。
```
```
'trusted_domains' =>
array (
0 => 'localhost',
@ -201,16 +199,14 @@ From the command line, just enter the following, substituting the values you use
),
```
_— Updated on January 28th, 2020 to include SELinux configuration —_
--------------------------------------------------------------------------------
via: https://fedoramagazine.org/build-your-own-cloud-with-fedora-31-and-nextcloud-server/
作者:[storyteller][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
译者:[geekpi](https://github.com/geekpi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -0,0 +1,163 @@
[#]: collector: (lujun9972)
[#]: translator: (lujun9972)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-11956-1.html)
[#]: subject: (Use Emacs to get social and track your todo list)
[#]: via: (https://opensource.com/article/20/1/emacs-social-track-todo-list)
[#]: author: (Kevin Sonney https://opensource.com/users/ksonney)
使用 Emacs 进行社交并跟踪你的待办事项列表
======
> 在 2020 年用开源实现更高生产力的二十种方式的第十九篇文章中,访问 Twitter、Reddit、 交谈、电子邮件 、RSS 和你的待办事项列表。
![](https://img.linux.net.cn/data/attachment/album/202003/04/100911lg2vrv92692b422y.jpg)
去年,我在 19 天里给你介绍了 19 个新(对你而言)的生产力工具。今年,我换了一种方式:使用你在使用或者还没使用的工具,构建一个使你可以在新一年更加高效的环境。
### 使用 Emacs 做(几乎)所有的事情,第 2 部分
[昨天][2],我谈到了如何在 Emacs 中读取电子邮件、访问电子邮件地址和显示日历。Emacs 功能繁多,你还可以将它用于 Twitter、交谈、待办事项列表等等
![在 Emacs 中处理所有事情][3]
要完成所有这些,你需要安装一些 Emacs 包。和昨天一样,用 `Meta+x package-manager` 打开 Emacs 包管理器Meta 键在大多数键盘上是 `Alt`,在 MacOS 上是 `Option`)。然后通过 `i` 选择以下带有的软件包,然后输入 `x` 进行安装:
```
nnreddit
todotxt
twittering-mode
```
安装之后,按下 `Ctrl+x ctrl+f` 打开 `~/.emacs.d/init.el`,并在 `(custom-set-variables` 行前加上:
```
;; Todo.txt
(require 'todotxt)
(setq todotxt-file (expand-file-name "~/.todo/todo.txt"))
;; Twitter
(require 'twittering-mode)
(setq twittering-use-master-password t)
(setq twittering-icon-mode t)
;; Python3 for nnreddit
(setq elpy-rpc-python-command "python3")
```
按下 `Ctrl+x Ctrl+s` 保存文件,使用 `Ctrl+x Ctrl+c` 退出 Emacs然后重启 Emacs。
#### 使用 twittering-mode 在 Emacs 中发推
![Emacs 中的 Twitter][4]
[Twittering-mode][5] 是 Twitter 最好的 Emacs 接口之一。它几乎支持 Twitter 的所有功能,并且键盘快捷键也易于使用。
首先,输入 `Meta+x twit` 来启动 twittering-mode。它会提供一个 URL 并提示你启动浏览器来访问它,你登录该 URL 后就能获得授权令牌。将令牌复制并粘贴到 Emacs 中,你的 Twitter 时间线就会加载了。你可以使用箭头键滚动,使用 `Tab` 从一个项目移动到另一个项目,并按回车访问光标所在的 URL。如果光标在用户名上按回车将在 web 浏览器中打开时间轴。如果你在一条推文的文本上,按回车将回复该推文。你可以用 `u` 创建一个新的推文,用 `Ctrl+c+Enter` 转发一些内容,然后用 `d` 发送一条即时消息——它打开的对话框中有关于如何发送、取消和缩短 URL 的说明。
`V` 会打开一个提示让你跳转到其他时间线。输入 `:mentions` 打开你的提及。输入 `:home` 打开你的主时间线,输入用户名将进入该用户的时间线。最后,按 `q` 会退出 twittering-mode 并关闭窗口。
twitter-mode 还有更多功能,我鼓励你阅读它 GitHub 页面上的[完整功能列表][6]。
#### 在 Emacs 上使用 Todotxt.el 追踪你的待办事项
![Emacs 中的 todo.txt][7]
[Todotxt.el][8] 是一个很棒的 [todo.txt][9] 待办列表管理器接口。它的快捷键几乎无所不包。
输入 `Meta+x todotxt` 启动它将加载 `todotxt-file` 变量中指定的 `todo.txt` 文件(本文的第一部分中设置了该文件)。在 `todo.txt` 的缓冲区(窗口),你可以按 `a` 添加新任务并和按 `c` 标记它已被完成。你还可以使用 `r` 设置优先级,并使用 `t` 添加项目和上下文。完成事项后只需要按下 `A` 即可将任务移如 `done.txt`。你可以使用 `/` 过滤列表,也可以使用 `l` 刷新完整列表。同样,你可以按 `q` 退出。
#### 在 Emacs 中使用 ERC 进行交谈
![使用 ERC 与人交谈 ][10]
Vim 的缺点之一是很难用它与人交谈。另一方面Emacs 则将 [ERC][11] 客户端内置到默认发行版中。使用 `Meta+x ERC` 启动 ERC系统将提示你输入服务器、用户名和密码。你可以使用几天前介绍设置 [BitlBee][12] 时使用的相同信息:服务器为 `localhost`,端口为 `6667`,相同用户名,无需密码。
ERC 使用起来与其他 IRC 客户端一样。每个频道单独一个缓冲区(窗口),你可以使用 `Ctrl+x ctrl+b` 进行频道间切换,这也可以在 Emacs 中的其他缓冲区之间进行切换。`/quit` 命令将退出 ERC。
#### 使用 Gnus 阅读电子邮件Reddit 和 RSS
![MailRedditand RSS feeds with Gnus][13]
我相信昨天在我提及在 Emacs 中阅读邮件时,许多 Emacs 的老用户会问,“怎么没有 [Gnus][14] 呢?”
这个疑问很合理。Gnus 是一个内置在 Emacs 中的邮件和新闻阅读器,尽管它这个邮件阅读器不支持以 [Notmuch][15] 作为搜索引擎。但是,如果你将其配置来阅读 Reddit 和 RSS feed稍后你将这样做那么同时使用它来阅读邮件是个聪明的选择。
Gnus 是为阅读 Usenet 新闻而创建的,并从此发展而来。因此,它的很多外观和感觉(以及术语)看起来很像 Usenet 的新闻阅读器。
Gnus 以 `~/.gnus` 作为自己的配置文件。(该配置也可以包含在 `~/.emacs.d/init.el` 中)。使用 `Ctrl+x Ctrl+f` 打开 `~/.gnus`,并添加以下内容:
```
;; Required packages
(require 'nnir)
(require 'nnrss)
;; Primary Mailbox
(setq gnus-select-method
      '(nnmaildir "Local"
                  (directory "~/Maildir")
                  (nnir-search-engine notmuch)
      ))
(add-to-list 'gnus-secondary-select-methods
             '(nnreddit ""))
```
`Ctrl+x Ctrl+s` 保存文件。这分配置告诉 Gnus 从 `~/Maildir` 这个本地邮箱中读取邮件作为主源(参见 `gnus-select-method` 变量),并使用 [nnreddit][16] 插件添加辅源(`gnus-secondary-select-methods` 变量)。你还可以定义多个辅助源,包括 Usenet 新闻nntp、IMAP nnimap、mboxnnmbox和虚拟集合nnvirtual。你可以在 [Gnus 手册][17] 中了解更多有关所有选项的信息。
保存文件后,使用 `Meta+x Gnus` 启动 Gnus。第一次运行将在 Python 虚拟环境中安装 [Reddit 终端查看器][18]Gnus 通过它获取 Reddit 上的文章。然后它会启动浏览器来登录 Reddit。之后它会扫描并加载你订阅的 Reddit 群组。你会看到一个有新邮件的邮件夹列表和一个有新内容的看板列表。在任一列表上按回车将加载该组中的消息列表。你可以使用箭头键导航并按回车加载和读取消息。在查看消息列表时,按 `q` 将返回到前一个视图,从主窗口按 `q` 将退出 Gnus。在阅读 Reddit 群组时,`a` 会创建一条新消息;在邮件组中,`m` 创建一个新的电子邮件;并且在任何一个视图中按 `r` 回复邮件。
你还可以向 Gnus 接口中添加 RSS 流,并像阅读邮件和新闻组一样阅读它们。要添加 RSS 流,输入 `G+R` 并填写 RSS 流的 URL。会有提示让你输入 RSS 的标题和描述,这些信息可以从流中提取出来并填充进去。现在输入 `g` 来检查新消息(这将检查所有组中的新消息)。阅读 RSS 流 就像阅读 Reddit 群组和邮件一样,它们使用相同的快捷键。
Gnus 中有*很多*功能,还有大量的键组合。[Gnus 参考卡][19]为每个视图列出了所有这些键组合(以非常小的字体显示在 5 页纸上)。
#### 使用 nyan-mode 查看位置
最后,你可能会一些截屏底部注意到 [Nyan cat][20]。这是 [nyan-mode][21],它指示了你在缓冲区中的位置,因此当你接近文档或缓冲区的底部时,它会变长。你可以使用包管理器安装它,并在 `~/.emacs.d/init.el` 中使用以下代码进行设置:
```
;; Nyan Cat
(setq nyan-wavy-trail t)
(setq nyan-bar-length 20)
(nyan-mode)
```
### Emacs 的基本功能
这只是 Emacs 所有功能的皮毛。Emacs *非常*强大,是我用来提高工作效率的必要工具之一,无论我是在追踪待办事项、阅读和回复邮件、编辑文本,还是与朋友和同事交流我都用它。这需要一点时间来适应,但是一旦你习惯了,它就会成为你桌面上最有用的工具之一。
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/1/emacs-social-track-todo-list
作者:[Kevin Sonney][a]
选题:[lujun9972][b]
译者:[lujun9972](https://github.com/lujun9972)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/ksonney
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/talk_chat_team_mobile_desktop.png?itok=d7sRtKfQ (Team communication, chat)
[2]: https://linux.cn/article-11932-1.html
[3]: https://opensource.com/sites/default/files/uploads/productivity_19-1.png (All the things with Emacs)
[4]: https://opensource.com/sites/default/files/uploads/productivity_19-2.png (Twitter in Emacs)
[5]: https://github.com/hayamiz/twittering-mode
[6]: https://github.com/hayamiz/twittering-mode#features
[7]: https://opensource.com/sites/default/files/uploads/productivity_19-3.png (todo.txt in emacs)
[8]: https://github.com/rpdillon/todotxt.el
[9]: http://todotxt.org/
[10]: https://opensource.com/sites/default/files/uploads/productivity_19-4.png (Chatting with erc)
[11]: https://www.gnu.org/software/emacs/manual/html_mono/erc.html
[12]: https://linux.cn/article-11856-1.html
[13]: https://opensource.com/sites/default/files/uploads/productivity_19-5.png (Mail, Reddit, and RSS feeds with Gnus)
[14]: https://www.gnus.org/
[15]: https://linux.cn/article-11807-1.html
[16]: https://github.com/dickmao/nnreddit
[17]: https://www.gnus.org/manual/gnus.html
[18]: https://pypi.org/project/rtv/
[19]: https://www.gnu.org/software/emacs/refcards/pdf/gnus-refcard.pdf
[20]: http://www.nyan.cat/
[21]: https://github.com/TeMPOraL/nyan-mode

View File

@ -0,0 +1,99 @@
[#]: collector: (lujun9972)
[#]: translator: (wxy)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-11961-1.html)
[#]: subject: (4 open source productivity tools on my wishlist)
[#]: via: (https://opensource.com/article/20/1/open-source-productivity-tools)
[#]: author: (Kevin Sonney https://opensource.com/users/ksonney)
我的愿望清单上的 4 种开源生产力工具
======
> 在 2020 年用开源实现更高生产力的二十种方式的最后一篇文章中,了解开源世界还需要什么。
![](https://img.linux.net.cn/data/attachment/album/202003/05/100642k52u7oydcwnc1c2w.jpg)
去年,我在 19 天里给你介绍了 19 个新(对你而言)的生产力工具。今年,我换了一种方式:使用你在使用或者还没使用的工具,构建一个使你可以在新一年更加高效的环境。
### 然而…
在搜索生产力应用程序时,我找不到想要的所有应用,而且几乎总是会丢失一些读者与我分享的精彩内容。 因此,当我结束本系列文章时,是时候[再次][2]谈论我在本年度系列文章中未能涵盖的一些主题。
![Desktop with Joplin, Emacs, and Firefox][3]
#### 在 Vim 中聊天
我试过了。我真的非常、非常想能够在 Vim 中聊天,但我做不到。我找到的一个软件包 [VimIRC.vim][4] 一直就工作不起来,我试了几天也没用。我探索的另一个选项是 [Irc it][5],这需要我付出更多的[努力去设置][6],超过了我正常可以付出的耐心或时间。我尝试过了,也确实做到了,但对于同处于相同境地的 Vim 用户,对不起,我无法帮到你。
#### Org 模式
![Org Mode in Emacs][7]
我喜欢 [Org 模式][8],并且每天都使用它。关于 Org 模式我可以滔滔不绝的说上几天。它提供了基本的[任务跟踪][9];谷歌[日历][10]同步和 [CalFW][11] 集成;富文本文档、网站和演示文稿;链接到任何事物;等等、等等……
我希望你会在 2020 年从我这里收到更多有关 Org 模式的信息,因为它真的很酷。
#### 图形用户界面程序
在 2019 年的生产力系列中,我共享了很多图形用户界面程序,而今年几乎都是命令行应用程序。有一些很棒的图形程序可以帮助解决我今年谈论的一些问题,例如可以使用 Maildir 邮箱的[邮件][12]程序、用于读取本地日历文件的日历程序、[天气][13]应用程序等等。我甚至尝试了几项对我而言新奇的事物,看它们是否适合这个主题。除了 [twin][14] 之外,我没有感觉到有什么图形用户界面程序是新颖的(对我而言)或值得注意的(同样对我而言)是今年要写的。至于……
#### 移动应用程序
越来越多的人将平板电脑(有时与笔记本电脑结合使用)作为主要设备。我将手机用于大多数社交媒体和即时消息传递,并且经常使用平板电脑(好的,老实说,好几个平板电脑)来阅读或浏览网络。可以肯定的是,并不是没有开源移动应用程序,但是它们与我今年的主题不符。开源和移动应用程序正在发生很多变化,我正在仔细地寻找可以帮助我在手机和平板电脑上提高工作效率的事物。
### 该你了
非常感谢你阅读今年的系列文章。请你发表评论,告诉我错过的或需要在 2021 年看到的内容。正如我在 [Productivity Alchemy][15] 播客上所说:“哥们,记着:要保持生产力!”
### 本系列汇总
1. [使用 Syncthing 在多个设备间同步文件](https://linux.cn/article-11793-1.html)
2. [使用 Stow 管理多台机器配置](https://linux.cn/article-11796-1.html)
3. [使用 OfflineIMAP 同步邮件](https://linux.cn/article-11804-1.html)
4. [使用 Notmuch 组织你的邮件](https://linux.cn/article-11807-1.html)
5. [使用 khal 和 vdirsyncer 组织和同步你的日历](https://linux.cn/article-11812-1.html)
6. [用于联系人管理的三个开源工具](https://linux.cn/article-11834-1.html)
7. [开始使用开源待办事项清单管理器](https://linux.cn/article-11835-1.html)
8. [使用这个 Python 程序记录你的活动](https://linux.cn/article-11846-1.html)
9. [一个通过 IRC 管理所有聊天的开源聊天工具](https://linux.cn/article-11856-1.html)
10. [使用这个 Twitter 客户端在 Linux 终端中发推特](https://linux.cn/article-11858-1.html)
11. [在 Linux 终端中阅读 Reddit](https://linux.cn/article-11869-1.html)
12. [使用此开源工具在一起收取你的 RSS 订阅源和播客](https://linux.cn/article-11876-1.html)
13. [使用这个开源工具获取本地天气预报](https://linux.cn/article-11879-1.html)
14. [使用此开源窗口环境一次运行多个控制台](https://linux.cn/article-11892-1.html)
15. [使用 tmux 创建你的梦想主控台](https://linux.cn/article-11900-1.html)
16. [使用 Vim 发送邮件和检查日历](https://linux.cn/article-11908-1.html)
17. [使用 Vim 管理任务列表和访问 Reddit 和 Twitter](https://linux.cn/article-11912-1.html)
18. [使用 Emacs 发送电子邮件和检查日历](https://linux.cn/article-11932-1.html)
19. [使用 Emacs 进行社交并跟踪你的待办事项列表](https://linux.cn/article-11956-1.html)
20. [我的愿望清单上的 4 种开源生产力工具](https://linux.cn/article-11961-1.html)
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/1/open-source-productivity-tools
作者:[Kevin Sonney][a]
选题:[lujun9972][b]
译者:[wxy](https://github.com/wxy)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/ksonney
[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://opensource.com/article/19/1/productivity-tool-wish-list
[3]: https://opensource.com/sites/default/files/uploads/productivity_20-1.png (Desktop with Joplin, Emacs, and Firefox)
[4]: https://github.com/vim-scripts/VimIRC.vim
[5]: https://tools.suckless.org/ii/
[6]: https://www.reddit.com/r/vim/comments/48t7ws/vim_ii_irc_client_xpost_runixporn/d0macnl/
[7]: https://opensource.com/sites/default/files/uploads/productivity_20-2.png (Org Mode in Emacs)
[8]: https://orgmode.org/
[9]: https://opensource.com/article/20/1/open-source-to-do-list
[10]: https://opensource.com/article/20/1/open-source-calendar
[11]: https://github.com/kiwanami/emacs-calfw
[12]: https://opensource.com/article/20/1/organize-email-notmuch
[13]: https://opensource.com/article/20/1/open-source-weather-forecast
[14]: https://github.com/cosmos72/twin
[15]: https://productivityalchemy.com

View File

@ -0,0 +1,160 @@
[#]: collector: "lujun9972"
[#]: translator: "messon007"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-12031-1.html"
[#]: subject: "DevOps vs Agile: What's the difference?"
[#]: via: "https://opensource.com/article/20/2/devops-vs-agile"
[#]: author: "Taz Brown https://opensource.com/users/heronthecli"
DevOps 和敏捷:究竟有什么区别?
======
> 两者之间的区别在于开发完毕之后发生的事情。
![](https://img.linux.net.cn/data/attachment/album/202003/23/200609w2rlzrjjhpf2hzsq.jpg)
早期,软件开发并没有特定的管理流程。随后出现了<ruby>[瀑布开发流程][2]<rt>Waterfall</rt></ruby>,它提出软件开发活动可以用开发和构建应用所耗费的时间来定义。
那时候,由于在开发流程中没有审查环节和权衡考虑,常常需要花费很长的时间来开发、测试和部署软件。交付的软件也是带有缺陷和 Bug 的质量较差的软件,而且交付时间也不满足要求。那时候软件项目管理的重点是长期而拖沓的计划。
瀑布流程与<ruby>[三重约束模型][3]<rt>triple constraint model</rt></ruby>相关,三重约束模型也称为<ruby>项目管理三角形<rt>project management triangle</rt></ruby>。三角形的每一个边代表项目管理三要素的一个要素: **范围、时间和成本**。正如 [Angelo Baretta 写到][4],三重约束模型“认为成本是时间和范围的函数,这三个约束以一种确定的、可预测的方式相互作用。……如果我们想缩短时间表(时间),就必须增加成本。如果我们想增加范围,就必须增加成本或时间。”
### 从瀑布流程过渡到敏捷开发
瀑布流程来源于生产和工程领域,这些领域适合线性化的流程:正如房屋封顶之前需要先盖好支撑墙。相似地,软件开发问题被认为可以通过提前做好计划来解决。从头到尾,开发流程均由路线图清晰地定义,沿着路线图就可以得到最终交付的产品。
最终,瀑布模型被认为对软件开发是不利的而且违反人的直觉,因为通常直到开发流程的最后才能体现出项目的价值,这导致许多项目最终都以失败告终。而且,在项目结束前客户看不到任何可以工作的软件。
<ruby>敏捷<rt>Agile</rt></ruby>采用了一种不同的方法,它抛弃了规划整个项目,承诺估计的时间点,简单的遵循计划。与瀑布流程相反,它假设和拥抱不确定性。它的理念是以响应变化代替讨论过去,它认为变更是客户需求的一部分。
### 敏捷价值观
敏捷由<ruby>敏捷宣言<rt>Agile Manifesto</rt></ruby>代言,敏捷宣言定义了 [12 条原则][5]LCTT 译注:此处没有采用本文原本的简略句式,而是摘录了来自敏捷软件开发宣言官方的[中文译本][14]
1. 我们最重要的目标,是通过持续不断地及早交付有价值的软件使客户满意。
2. 欣然面对需求变化,即使在开发后期也一样。
3. 经常交付可工作的软件,相隔几星期或一两个月,倾向于采取较短的周期。
4. 业务人员和开发人员必须相互合作,项目中的每一天都不例外。
5. 激发个体的斗志,以他们为核心搭建项目。提供所需的环境和支援,辅以信任,从而达成目标。
6. 面对面沟通是传递信息的最佳的也是效率最高的方法。
7. 可工作的软件是进度的首要度量标准。
8. 敏捷流程倡导可持续的开发,责任人、开发人员和用户要能够共同维持其步调稳定延续。
9. 坚持不懈地追求技术卓越和良好设计,敏捷能力由此增强。
10. 以简洁为本,它是极力减少不必要工作量的艺术。
11. 最好的架构,需求和设计出自自组织团队
12. 团队定期地反思如何能提高成效,并依此调整自身的举止表现。
敏捷的四个[核心价值观][6]是LCTT 译注:[此处译文][15]同样来自敏捷软件开发宣言官方):
* **个体和互动** 高于流程和工具
* **工作的软件** 高于详尽的文档
* **客户合作** 高于合同谈判
* **响应变化** 高于遵循计划
这与瀑布流程死板的计划风格相反。在敏捷流程中,客户是开发团队的一员,而不仅仅是在项目开始时参与项目需求的定义,在项目结束时验收最终的产品。客户帮忙团队完成[验收标准][7],并在整个过程中保持投入。另外,敏捷需要整个组织的变化和持续的改进。开发团队和其他团队一起合作,包括项目管理团队和测试团队。做什么和计划什么时候做由指定的角色领导,并由整个团队同意。
### 敏捷软件开发
敏捷软件开发需要自适应的规划、演进式的开发和交付。许多软件开发方法、框架和实践遵从敏捷的理念,包括:
* Scrum
* <ruby>看板<rt>Kanban</rt></ruby>(可视化工作流)
* <ruby>极限编程<rt>Xtreme Programming</rt></ruby>XP
* <ruby>精益方法<rt>Lean</rt></ruby>
* DevOps
* <ruby>特性驱动开发<rt>Feature-Driven Development</rt></ruby>FDD
* <ruby>测试驱动开发<rt>Test-Driven Development</rt></ruby>TDD
* <ruby>水晶方法<rt>Crystal</rt></ruby>
* <ruby>动态系统开发方法<rt>Dynamic Systems Development Method</rt></ruby>DSDM
* <ruby>自适应软件开发<rt>Adaptive Software Development</rt></ruby>ASD
所有这些已经被单独用于或一起用于开发和部署软件。最常用的是 [Scrum][8]、看板(或 Scrumban和 DevOps。
[Scrum][9] 是一个框架,采用该框架的团队通常由一个 Scrum 教练、产品经理和开发人员组成,该团队以跨职能、自主的工作方式运作,能够加快软件交付速度从而给客户带来巨大的商业价值。其关注点是[较小增量][10]的快速迭代。
[看板][11] 是一个敏捷框架,有时也叫工作流管理系统,它能帮助团队可视化他们的工作从而最大化效率(因而变得敏捷)。看板通常由数字或物理展示板来呈现。团队的工作在展示板上随着进度而移动,例如从未启动到进行中,一直到测试中、已完成。看板使得每个团队成员可以随时查看到所有工作的状态。
### DevOps 价值观
DevOps 是一种文化,是一种思维状态,是一种软件开发的方式或者基础设施的方式,也是一种构建和部署软件和应用的方式。它假设开发和运维之间没有隔阂,他们一起合作,没有矛盾。
DevOps 基于其它两个领域的实践: 精益和敏捷。DevOps 不是一个公司内的岗位或角色;它是一个组织或团队对持续交付、持续部署和持续集成的坚持不懈的追求。[Gene Kim][12]Phoenix 项目和 Unicorn 项目的作者)认为,有三种方式定义 DevOps 的理念:
* 第一种: 流程原则
* 第二种: 反馈原则
* 第三种: 持续学习原则
### DevOps 软件开发
DevOps 不会凭空产生;它是一种灵活的实践,它的本质是一种关于软件开发和 IT 或基础设施实施的共享文化和思维方式。
当你想到自动化、云、微服务时,你会想到 DevOps。在一次[访谈][13]中,《加速构建和扩张高性能技术组织》的作者 Nicol Forsgren、Jez Humble 和 Gene Kim 这样解释到:
> * 软件交付能力很重要,它极大地影响到组织的成果,例如利润、市场份额、质量、客户满意度以及组织战略目标的达成。
> * 优秀的团队能达到很高的交付量、稳定性和质量;他们并没有为了获得这些属性而进行取舍。
> * 你可以通过实施精益、敏捷和 DevOps 中的实践来提升能力。
> * 实施这些实践和能力也会影响你的组织文化,并且会进一步对你的软件交付能力和组织能力产生有益的提升。
> * 懂得怎样改进能力需要做很多工作。
### DevOps 和敏捷的对比
DevOps 和敏捷有相似性,但是它们不完全相同,一些人认为 DevOps 比敏捷更好。为了避免造成混淆,深入地了解它们是很重要的。
#### 相似之处
* 毫无疑问,两者都是软件开发技术。
* 敏捷已经存在了 20 多年DevOps 是最近才出现的。
* 两者都追求软件的快速开发,它们的理念都基于怎样在不伤害客户或运维利益的情况下快速开发出软件。
#### 不同之处
* 两者的差异在于软件开发完成后发生的事情。
* 在 DevOps 和敏捷中都有软件开发、测试和部署的阶段。然而敏捷流程在这三个阶段之后会终止。相反DevOps 包括后续持续的运维。因此DevOps 会持续的监控软件运行情况和进行持续的开发。
* 敏捷中,不同的人负责软件的开发、测试和部署。而 DevOps 工程角色负责所有活动,开发即运维,运维即开发。
* DevOps 更关注于削减成本,而敏捷则是精益和减少浪费的代名词,侧重于像敏捷项目会计和最小可行产品的概念。
* 敏捷专注于并体现了经验主义(适应、透明和检查),而不是预测性措施。
敏捷 | DevOps
--- | ---
从客户得到反馈 | 从自己得到反馈
较小的发布周期 | 较小的发布周期,立即反馈
聚焦于速度 | 聚焦于速度和自动化
对业务不是最好 | 对业务最好
### 总结
敏捷和 DevOps 是截然不同的,尽管它们的相似之处使人们认为它们是相同的。这对敏捷和 DevOps 都是一种伤害。
根据我作为一名敏捷专家的经验,我发现对于组织和团队从高层次上了解敏捷和 DevOps 是什么,以及它们如何帮助团队更高效地工作,更快地交付高质量产品从而提高客户满意度非常有价值。
敏捷和 DevOps 绝不是对抗性的(或至少没有这个意图)。在敏捷革命中,它们更像是盟友而不是敌人。敏捷和 DevOps 可以相互协作一致对外,因此可以在相同的场合共存。
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/2/devops-vs-agile
作者:[Taz Brown][a]
选题:[lujun9972][b]
译者:[messon007](https://github.com/messon007)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/heronthecli
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/collab-team-pair-programming-code-keyboard.png?itok=kBeRTFL1 "Pair programming"
[2]: http://www.agilenutshell.com/agile_vs_waterfall
[3]: https://en.wikipedia.org/wiki/Project_management_triangle
[4]: https://www.pmi.org/learning/library/triple-constraint-erroneous-useless-value-8024
[5]: http://agilemanifesto.org/principles.html
[6]: https://agilemanifesto.org/
[7]: https://www.productplan.com/glossary/acceptance-criteria/
[8]: https://opensource.com/article/19/8/scrum-vs-kanban
[9]: https://www.scrum.org/
[10]: https://www.scrum.org/resources/what-is-an-increment
[11]: https://www.atlassian.com/agile/kanban
[12]: https://itrevolution.com/the-unicorn-project/
[13]: https://www.infoq.com/articles/book-review-accelerate/
[14]: http://agilemanifesto.org/iso/zhchs/principles.html
[15]: http://agilemanifesto.org/iso/zhchs/manifesto.html

View File

@ -0,0 +1,198 @@
[#]: collector: (lujun9972)
[#]: translator: (wxy)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12007-1.html)
[#]: subject: (Basic kubectl and Helm commands for beginners)
[#]: via: (https://opensource.com/article/20/2/kubectl-helm-commands)
[#]: author: (Jessica Cherry https://opensource.com/users/jrepka)
适用于初学者的基本 kubectl 和 Helm 命令
======
> 去杂货店“采购”这些命令,你需要用这些 Kubernetes 工具来入门。
![](https://img.linux.net.cn/data/attachment/album/202003/18/113120adp34myy90eb944b.jpg)
最近,我丈夫告诉我他即将要去参加一个工作面试,面试时他需要在计算机上运行一些基本命令。他对这场面试感到焦虑,但是对于他来说,学习和记住事情的最好方法是将不了解的事物比喻为非常熟悉的事物。因为我们的谈话是在我逛杂货店试图决定当晚要烹饪的食物之后进行的,所以这启发我用一次去杂货店的行程来介绍 `kubectl``helm` 命令。
[Helm][2](“舵轮”)是在 Kubernetes来自希腊语意思是“舵手” 或 “领航员”)中管理应用程序的工具。你可以轻松地使用你的应用程序信息来部署“<ruby>海图<rt>chart</rt></ruby>”,从而可以在你的 Kubernetes 环境中几分钟之内让它们就绪并预配置好。在学习新知识时,查看示例的“海图”以了解其用法总是很有帮助的,因此,如果有时间,请查看这些成型的“[海图][3]”。LCTT 译注Kubernetes 生态中大量使用了和航海有关的比喻,因此本文在翻译时也采用了这些比喻)
[kubectl][4] 是与 Kubernetes 环境交互的命令行界面,允许你配置和管理集群。它需要一些配置才能在环境中工作,因此请仔细阅读其[文档][5]以了解你需要做什么。
我会在示例中使用命名空间,你可以在我的文章《[Kubernetes 命名空间入门][6]》中了解它。
现在我们已经准备好了,让我们开始 `kubectl``helm` 基本命令的购物之旅!
### 用 Helm 列出清单
你去商店之前要做的第一件事是什么?好吧,如果你做事有条理,会创建一个“清单”。同样,这是我将解释的第一个基本的 Helm 命令。
在一个用 Helm 部署的应用程序中,`list` 命令提供有关应用程序当前版本的详细信息。在此示例中我有一个已部署的应用程序Jenkins CI/CD 应用程序。运行基本的 `list` 命令总是会显示默认的命名空间。由于我没有在默认的命名空间中部署任何内容,因此不会显示任何内容:
```
$helm list
NAME    NAMESPACE    REVISION    UPDATED    STATUS    CHART    APP VERSION
```
但是,如果运行带有额外标志的命令,则会显示我的应用程序和信息:
```
$helm list --all-namespaces
NAME     NAMESPACE  REVISION  UPDATED                   STATUS      CHART           APP  VERSION
jenkins  jenkins        1         2020-01-18 16:18:07 EST   deployed    jenkins-1.9.4   lts
```
最后,我可以指示 `list` 命令只检查我想从中获取信息的命名空间:
```
$helm list --namespace jenkins
NAME     NAMESPACE  REVISION  UPDATED                   STATUS    CHART          APP VERSION
jenkins    jenkins      1              2020-01-18 16:18:07 EST  deployed  jenkins-1.9.4  lts    
```
现在我有了一个清单,并且知道该清单上有什么,我可以使用 `get` 命令来“获取”我的物品!我会从 Kubernetes 集群开始,看看我能从中获取到什么?
### 用 Kubectl 获取物品
`kubectl get` 命令提供了有关 Kubernetes 中许多事物的信息,包括“<ruby>吊舱<rt>Pod</rt></ruby>”、节点和命名空间。同样,如果没有指定命名空间标志,就会使用默认的命名空间。首先,我获取集群中的命名空间以查看正在运行的命名空间:
```
$kubectl get namespaces
NAME             STATUS   AGE
default          Active   53m
jenkins          Active   44m
kube-node-lease  Active   53m
kube-public      Active   53m
kube-system      Active   53m
```
现在我已经知道了在我的环境中运行的有哪些命名空间了,接下来获取节点并查看有多少个节点正在运行:
```
$kubectl get nodes
NAME       STATUS   ROLES       AGE   VERSION
minikube   Ready    master  55m   v1.16.2
```
我有一个节点正在运行,这主要是因为我的 Minikube 运行在一台小型服务器上。要得到在我的这一个节点上运行的“吊舱”可以这样:
```
$kubectl get pods
No resources found in default namespace.
```
啊哦,它是空的。我将通过以下方式获取 Jenkins 命名空间中的内容:
```
$kubectl get pods --namespace jenkins
NAME                      READY  STATUS   RESTARTS  AGE
jenkins-7fc688c874-mh7gv  1/1    Running  0         40m
```
好消息!这里发现了一个“吊舱”,它还没有重新启动过,已运行了 40 分钟了。好的,如今我知道“吊舱”已经装好,所以我想看看用 Helm 命令可以得到什么。
### 用 Helm 获取信息
`helm get` 命令稍微复杂一点,因为这个“获取”命令所需要的不仅仅是一个应用程序名称,而且你可以从应用程序中请求多个内容。我会从获取用于制作该应用程序的值开始,然后展示“获取全部”的操作结果的片段,该操作将提供与该应用程序相关的所有数据。
```
$helm get values jenkins -n jenkins
USER-SUPPLIED VALUES:
null
```
由于我只安装了最小限度的稳定版,因此配置没有更改。如果我运行“获取全部”命令,我将得到所有的“海图”:
```
$helm get all jenkins -n jenkins
```
![output from helm get all command][7]
这会产生大量数据,因此我始终建议保留一份 Helm “海图”的副本,以便你可以查看“海图”中的模板。我还创建自己的值来了解自己所拥有的。
现在,我把所有的商品都放在购物车中了,我会检查一下“描述”它们包含什么的标签。这些示例仅与 `kubectl` 命令有关,它们描述了我通过 Helm 部署的内容。
### 用 kubectl 查看描述
正如我使用“获取”命令(该命令可以描述 Kubernetes 中的几乎所有内容)所做的那样,我将示例限定到命名空间、“吊舱”和节点上。由于我知道它们每一个是什么,因此这很容易。
```
$kubectl describe ns jenkins
Name:           jenkins
Labels:         &lt;none&gt;
Annotations:  &lt;none&gt;
Status:         Active
No resource quota.
No resource limits.
```
我可以看到我的命名空间的名称,并且它是活动的,没有资源或限额限制。
`describe pods` 命令会产生大量信息,因此我这里提供的是一小段输出。如果你在不使用“吊舱”名称的情况下运行该命令,它将返回名称空间中所有“吊舱”的信息,这可能会很麻烦。因此,请确保在此命令中始终包含“吊舱”名称。例如:
```
$kubectl describe pods jenkins-7fc688c874-mh7gv --namespace jenkins
```
![output of kubectl-describe-pods][8]
这会提供容器的状态、管理方式、标签以及“吊舱”中所使用的镜像(还有很多其它信息)。没有在这个简化过的输出中包括的数据有:在 Helm 配置值文件中应用的各种条件下的资源请求和限制、初始化容器和存储卷信息。如果你的应用程序由于资源不足而崩溃,或者是一个需要运行前置脚本进行配置的初始配置容器,或者生成不应该存储于纯文本 YAML 文件中的隐藏密码,则此数据很有用。
最后,我将使用 `describe node` 命令,当然,它是用来描述节点的。由于本示例只有一个名为 Minikube 的示例,因此我将使用这个名字。如果你的环境中有多个节点,则必须包含你想查找的的节点名称。
与“吊舱”一样,这个节点的命令会产生大量数据,因此我将仅包括输出片段。
```
$kubectl describe node minikube
```
![output of kubectl describe node][9]
注意,`describe node` 是更重要的基本命令之一。如此图所示,该命令返回统计信息,该信息指示节点何时资源用尽,并且该数据非常适合在需要扩展时(如果你的环境中没有自动扩展)向你发出警报。此输出片段中未包含的其它内容包括:对所有资源和限制的请求所占的百分比,以及资源的使用期限和分配(例如,对于我的应用程序而言)。
### 买单
使用这些命令,我完成了“购物”并得到了我想要的一切。希望这些基本命令也能在你使用 Kubernetes 的日常工作中提供帮助。
我鼓励你经常使用命令行并学习“帮助”部分中的速记标志,你可以通过运行以下命令来查看这些标志:
```
$helm --help
```
```
$kubectl -h
```
### 花生酱和果冻
有些东西像花生酱和果冻一样混在一起。Helm 和 `kubectl` 就有点像那样交错在一起。
我经常在自己的环境中使用这些工具。因为它们在很多地方都有很多相似之处,所以在使用其中一个之后,我通常需要跟进另一个。例如,我可以进行 Helm 部署,并使用 `kubectl` 观察它是否失败。一起试试它们,看看它们能为你做什么。
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/2/kubectl-helm-commands
作者:[Jessica Cherry][a]
选题:[lujun9972][b]
译者:[wxy](https://github.com/wxy)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/jrepka
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003784_02_os.comcareers_os_rh2x.png?itok=jbRfXinl (A person working.)
[2]: https://helm.sh/
[3]: https://github.com/helm/charts/tree/master/stable
[4]: https://kubernetes.io/docs/reference/kubectl/kubectl/
[5]: https://kubernetes.io/docs/reference/kubectl/overview/
[6]: https://linux.cn/article-11749-1.html
[7]: https://opensource.com/sites/default/files/uploads/helm-get-all.png (output from helm get all command)
[8]: https://opensource.com/sites/default/files/uploads/kubectl-describe-pods.png (output of kubectl-describe-pods)
[9]: https://opensource.com/sites/default/files/uploads/kubectl-describe-node.png (output of kubectl describe node)

View File

@ -0,0 +1,152 @@
[#]: collector: (lujun9972)
[#]: translator: (wxy)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-11959-1.html)
[#]: subject: (Extend the life of your SSD drive with fstrim)
[#]: via: (https://opensource.com/article/20/2/trim-solid-state-storage-linux)
[#]: author: (Alan Formy-Duval https://opensource.com/users/alanfdoss)
在 Linux 下使用 fstrim 延长 SSD 驱动器的寿命
======
> 这个新的系统服务可以使你的生活更轻松。
![](https://img.linux.net.cn/data/attachment/album/202003/04/121625sl380ga10g56d33h.jpg)
在过去的十年中固态驱动器SSD带来了一种管理存储的新方法。与上一代的转盘产品相比SSD 具有无声、更冷却的操作和更快的接口规格等优点。当然新技术带来了新的维护和管理方法。SSD 具有一种称为 TRIM 的功能。从本质上讲这是一种用于回收设备上未使用的块的方法该块可能先前已被写入但不再包含有效数据因此可以返回到通用存储池以供重用。Opensource.com 的 Don Watkins 首先在其 2017 年的文章《[Linux 固态驱动器:为 SSD 启用 TRIM][2]》中介绍过 TRIM 的内容。
如果你一直在 Linux 系统上使用此功能,则你可能熟悉下面描述的两种方法。
### 老的方式
#### 丢弃选项
我最初使用 `mount` 命令的 `discard` 选项启用了此功能。每个文件系统的配置都放在 `/etc/fstab` 文件中。
```
# cat /etc/fstab
UUID=3453g54-6628-2346-8123435f  /home  xfs  defaults,discard   0 0
```
丢弃选项可启用自动的在线 TRIM。由于可能会对性能造成负面影响最近关于这是否是最佳方法一直存在争议。使用此选项会在每次将新数据写入驱动器时启动 TRIM。这可能会引入其他磁盘活动从而影响存储性能。
#### Cron 作业
我从 `fstab` 文件中删除了丢弃选项。然后,我创建了一个 cron 作业来按计划调用该命令。
```
# crontab -l
@midnight /usr/bin/trim
```
这是我最近在 Ubuntu Linux 系统上使用的方法,直到我了解到另一种方法。
### 一个新的 TRIM 服务
我最近发现有一个用于 TRIM 的 systemd 服务。Fedora 在版本 30 中将其[引入][3],尽管默认情况下在版本 30 和 31 中未启用它,但计划在版本 32 中使用它。如果你使用的是 Fedora 工作站 31并且你想要开始使用此功能可以非常轻松地启用它。我还将在下面向你展示如何对其进行测试。该服务并非 Fedora 独有的服务。它是否存在及其地位将因发行版而异。
#### 测试
我喜欢先进行测试,以更好地了解幕后情况。我通过打开终端并发出配置服务调用的命令来执行此操作。
```
/usr/sbin/fstrim --fstab --verbose --quiet
```
`fstrim``-help` 参数将描述这些信息和其他参数。
```
$ sudo /usr/sbin/fstrim --help
Usage:
fstrim [options] <mount point>
Discard unused blocks on a mounted filesystem.
Options:
-a, --all trim all supported mounted filesystems
-A, --fstab trim all supported mounted filesystems from /etc/fstab
-o, --offset <num> the offset in bytes to start discarding from
-l, --length <num> the number of bytes to discard
-m, --minimum <num> the minimum extent length to discard
-v, --verbose print number of discarded bytes
--quiet suppress error messages
-n, --dry-run does everything, but trim
-h, --help display this help
-V, --version display version
```
因此,现在我可以看到这个 systemd 服务已配置为在我的 `/etc/fstab` 文件中的所有受支持的挂载文件系统上运行该修剪操作(`-fstab`),并打印出所丢弃的字节数(`-verbose`),但是抑制了任何可能会发生的错误消息(`quiet`)。了解这些选项对测试很有帮助。例如,我可以从最安全的方法开始,即空运行。我还将去掉 `-quiet` 参数,以便确定驱动器设置是否发生任何错误。
```
$ sudo /usr/sbin/fstrim --fstab --verbose --dry-run
```
这就会显示 `fstrim` 命令根据在 `/etc/fstab` 文件中找到的文件系统要执行的操作。
```
$ sudo /usr/sbin/fstrim --fstab --verbose
```
现在,这会将 TRIM 操作发送到驱动器,并报告每个文件系统中丢弃的字节数。以下是我最近在新的 NVME SSD 上全新安装 Fedora 之后的示例。
```
/home: 291.5 GiB (313011310592 bytes) trimmed on /dev/mapper/wkst-home
/boot/efi: 579.2 MiB (607301632 bytes) trimmed on /dev/nvme0n1p1
/boot: 787.5 MiB (825778176 bytes) trimmed on /dev/nvme0n1p2
/: 60.7 GiB (65154805760 bytes) trimmed on /dev/mapper/wkst-root
```
#### 启用
Fedora Linux 实现了一个计划每周运行它的 systemd 计时器服务。要检查其是否存在及当前状态,请运行 `systemctl status`
```
$ sudo systemctl status fstrim.timer
```
现在,启用该服务。
```
$ sudo systemctl enable fstrim.timer
```
#### 验证
然后,你可以通过列出所有计时器来验证该计时器是否已启用。
```
$ sudo systemctl list-timers --all
```
会显示出下列行,表明 `fstrim.timer` 存在。注意,该计时器实际上激活了 `fstrim.service` 服务。这是实际调用 `fstrim` 的地方。与时间相关的字段显示为 `n/a`,因为该服务已启用且尚未运行。
```
NEXT   LEFT    LAST   PASSED   UNIT           ACTIVATES
n/a    n/a     n/a    n/a      fstrim.timer   fstrim.service
```
### 结论
该服务似乎是在驱动器上运行 TRIM 的最佳方法。这比必须创建自己的 crontab 条目来调用 `fstrim` 命令要简单得多。不必编辑 `fstab` 文件也更安全。观察固态存储技术的发展很有趣,并且我很高兴看到 Linux 似乎正在朝着标准且安全的方向实现它。
在本文中,学习了固态驱动器与传统硬盘驱动器有何不同以及它的含义...
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/2/trim-solid-state-storage-linux
作者:[Alan Formy-Duval][a]
选题:[lujun9972][b]
译者:[wxy](https://github.com/wxy)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/alanfdoss
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/linux_keyboard_desktop.png?itok=I2nGw78_ (Linux keys on the keyboard for a desktop computer)
[2]: https://linux.cn/article-8177-1.html
[3]: https://fedoraproject.org/wiki/Changes/EnableFSTrimTimer (Fedora Project WIKI: Changes/EnableFSTrimTimer)

View File

@ -0,0 +1,112 @@
[#]: collector: (lujun9972)
[#]: translator: (wxy)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-11968-1.html)
[#]: subject: (How to set up your own fast, private open source mesh network)
[#]: via: (https://opensource.com/article/20/2/mesh-network-freemesh)
[#]: author: (Spencer Thomason https://opensource.com/users/spencerthomason)
如何建立自己的快速、私有的开源网状网络mesh
======
> 只需要不到 10 分钟的安装时间,就可以用 FreeMesh 搭建一个经济实惠、性能卓越、尊重隐私的网格系统。
![](https://img.linux.net.cn/data/attachment/album/202003/06/234848jaga52a0wx05w0f0.jpg)
[FreeMesh][2] 系统有望为大众带来完全开源的<ruby>网状网络<rt>mesh network</rt></ruby>LCTT 译注:也称之为“多跳网络”)。我最近有机会对它进行了测试;它安装迅速,性能非常好 —— 特别是相对它的价格而言。
### 为什么要网格化和开源?
使用开源的原因很简单:隐私。有了 FreeMesh你的数据就是你自己的。它不会跟踪或收集数据。不相信吗毕竟你可以轻松检查 —— 它是开源的!而其它大型高科技企业集团提供的一些流行的网状网络解决方案,你是否相信它们会保护你的数据?
另一个重要因素更新。FreeMesh 表示,它将致力于定期发布安全性和性能更新。从现在起到 10 年后呢?使用开源解决方案,你可以根据需要自由地更新产品。
那么为什么要用网状网络呢在网状网络中多个无线路由器一起工作以广播单个超大型的无线网络。网状网络中的每个路由器都可与其他路由器智能地通信以便为你的数据提供最佳的“路径”。FreeMesh 网站上的以下图片突出显示了使用单个无线路由器和网状网络之间的区别。红色网络表示单个无线路由器,绿色网络是网状网络。
![单路由器网络] [3]
![网状网络] [4]
### 采购设备
要开始使用 FreeMesh请[订购套件][5]。它提供两种套件:标准套件和 4G LTE。
顾名思义4G LTE 套件支持蜂窝数据连接。此功能在消费级网络领域非常罕见,但对某些人来说非常有用。你可以在提供电源和电池的任何地方建立具有完整的快速故障转移功能的便携式网状网络。
FreeMesh 套件带有一个主路由器和两个节点。路由器和节点使用 802.11ac、802.11r 和 802.11s 标准。随附的固件运行定制版本的 [OpenWrt] [6],这是嵌入式设备的 Linux 发行版。
FreeMesh 路由器的一些规格非常好:
* CPU双核 880MHz MediaTek MT7621AT双核/四线程!)
* 内存DDR3 512MB
* 接口1 个 GbE WAN、4 个 GbE LAN、1 个 USB 2.0 端口、1 个 microSD 卡插槽、1 个 SIM 插槽
* 天线2 个 5dBi 2.4GHz、2 个 5dBi 5GHz、2 个 3dBi 3G/4G内置
* 4G LTE 调制解调器LTE 4 类模块,下行 150Mbps/上行 50Mbps
### 设置
设置很容易FreeMesh 的 [README][7] 提供了简单的说明和图表。首先首先设置主路由器。然后按照以下简单步骤操作:
1、将第一个节点蓝色 WAN 端口)连接到主路由器(黄色 LAN 端口)。
![FreeMesh 设置步骤 1][8]
2、等待约 30 至 60 秒。设置完成后,节点的 LED 将会闪烁。
![FreeMesh 设置步骤 2][9]
3、将节点移到另一个位置。
仅此而已!节点不需要手动设置。你只需将它们插入主路由器,其余的工作就完成了。你可以以相同的方式添加更多节点;只需重复上述步骤即可。
### 功能
FreeMesh 是开箱即用的,它由 OpenWRT 和 LuCI 组合而成。它具有你期望路由器提供的所有功能。是否要安装新功能或软件包SSH 连入并开始魔改!
![FreeMesh 网络上的实时负载][10]
![FreeMesh 网络概览][11]
![OpenWrt 状态报告][12]
### 性能如何
设置完 FreeMesh 系统后,我将节点移动到了房屋周围的各个地方。我使用 [iPerf][13] 测试带宽,它达到了约 150Mbps。WiFi 可能会受到许多环境变量的影响,因此你的结果可能会有所不同。节点与主路由器之间的距离在带宽中也有很大的影响。
但是,网状网络的真正优势不是高峰速度,而是整个空间的平均速度要好得多。即使在我家很远的地方,我仍然能够用流媒体播放视频并正常工作。我甚至可以在后院工作。在出门之前,我只是将一个节点重新放在窗口前面而已。
### 结论
FreeMesh 确实令人信服。它以简单、开源的形式为你提供高性价比和隐私。
以我的经验,设置非常容易,而且足够快。覆盖范围非常好,远远超过了任何单路由器环境。你可以随意魔改和定制 FreeMesh 设置,但是我觉得没有必要。它提供了我需要的一切。
如果你正在寻找价格可承受、性能良好且尊重隐私的网格系统,且该系统可以在不到 10 分钟的时间内安装完毕,你可以考虑一下 FreeMesh。
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/2/mesh-network-freemesh
作者:[Spencer Thomason][a]
选题:[lujun9972][b]
译者:[wxy](https://github.com/wxy)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/spencerthomason
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/bus-networking.png?itok=fHmulI9p (people on top of a connected globe)
[2]: https://freemeshwireless.com/
[3]: https://opensource.com/sites/default/files/uploads/singlerouternetwork.png (Single-router network)
[4]: https://opensource.com/sites/default/files/uploads/meshnetwork.png (Mesh network)
[5]: https://freemeshwireless.com/#pricing
[6]: https://openwrt.org/
[7]: https://gitlab.com/slthomason/freemesh/-/blob/master/README.md
[8]: https://opensource.com/sites/default/files/uploads/connecttorouter.png (FreeMesh setup step 1)
[9]: https://opensource.com/sites/default/files/uploads/setupcomplete.png (FreeMesh setup step 2)
[10]: https://opensource.com/sites/default/files/uploads/freemeshrealtimeload.png (Real-time load on FreeMesh network)
[11]: https://opensource.com/sites/default/files/uploads/freemeshwirelessoverview.png (Overview of FreeMesh network)
[12]: https://opensource.com/sites/default/files/uploads/openwrt.png (OpenWrt status report)
[13]: https://opensource.com/article/20/1/internet-speed-tests

View File

@ -0,0 +1,80 @@
[#]: collector: (lujun9972)
[#]: translator: (sndnvaps)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12022-1.html)
[#]: subject: (Linux is our love language)
[#]: via: (https://opensource.com/article/20/2/linux-love-language)
[#]: author: (Christopher Cherry https://opensource.com/users/chcherry)
学习 Linux 是我们的爱情语言
======
> 当一个妻子教丈夫一些新技能的时候,他们都学到了比期待更多的东西。
![](https://img.linux.net.cn/data/attachment/album/202003/22/163819clzuy77dc4d7q8zu.jpg)
2019 年是我们 Cherry 家学习的一年。我是一个喜欢学习新技术的高级软件工程师,并把学到的内容一起教给了我的丈夫 Chris。通过教给他一些我学到的东西并让他全程经历我的技术演练文章我帮助 Chris 学习到了新技术,使他能够将自己的职业生涯更深入地转向技术领域。而我学习到了新的方法,使我的演练和培训材料更易于让读者理解。
在这篇文章中,我们来讨论一下我们各自和彼此学习到了什么东西,然后探讨这对于我们的未来有何影响。
### 向学生的提问
**Jess** Chris是什么导致你想深入学习我的领域的技能呢
**Chris** 主要目的是为了让我事业更进一步。作为一个网络工程师的经历告诉我,现在的网络专家已经不像以前一样有价值了,我必须掌握更多的知识。由于网络经常被认为是造成这些天程序中断或出错的原因,我想从开发人员的角度了解更多关于编写应用程序的知识,以便于了解它们如何依赖网络资源。
**Jess** 我首先教你什么内容?你从中学到什么?
**Chris** 首先是从学习除此安装 Linux 系统开始的,之后又安装了 [Ansible][2]。只要硬件兼容,我用过的每一个 Linux 发行版都很容易安装,但可能会出现个别不兼容的情况。这就意味着我有时候第一手学习到的是如何解决系统安装过程的最初 5 分钟出现的问题了这个我最喜欢了。Ansible 给了一个我学习使用软件管理器来安装程序的理由。当程序安装完成后,通过查看 yum 安装的程序,我快速了解了程序管理器是如何处理程序的依赖项的,因此,用 Python 编写的 Ansible 能够在我的系统运行。自此之后,我开始使用 Ansible 来安装各种各样的程序。
**Jessica** 你喜欢我这种教学方式不?
**Chris** 我们一开始有过争吵,直到我们弄清楚了我喜欢的学习方式,你也知道了应该怎样为我提供最好的学习方式。在一开始的时候,我很难跟上你讲的内容。例如,当你说“一个码头工人集装箱”的时候,我完全不知道你在讲什么。比较早的时候,我的回答就是“这是一个集装箱”,然而当时这对我来说,完全没有意义。当你对这些内容进行一些更深入的讲解后,才让学习更有趣。
**Jess** 老实说,这对我来说也是一个重要的教训。在你之前,我从来没有教过在这个技术领域知识比我少的人,所以你帮助我认识到我需要解释更多细节。我也得说声谢谢。
当你通过这几个学习步骤的时候,你觉得我的这篇测试文章怎样呢?
**Chris** 就我个人而言,我认为这很容易,但我错了。在我主要学习的内容中,比如你[介绍的Vagrant][3],它在不同的 Linux 发行版间的变化比我想像的要多。操作系统的变化会影响设置的方式、运行都要求和特定的命令。这看起来比我用的网络设备变化更大。这让我花费更多的精力去查看这些说明是对应我的系统还是其它的系统(有时候很难知道)。在这学习路上,我似乎碰到很多问题。
**Jess** 我每天都会遇到各种各样的问题,所以对我来说日常就是用各种方法解决各种问题。
### 向老师的提问
**Chris** Jess你将来教我的方式会有所改变吗
**Jess** 我想让你像我一样读多一些书。通过翻阅书籍来学习新技术。每天起床后一小时和睡觉前一小时我都会看书,花费一个星期左右我就能看一到两本书。我也会创建为期两周的任务计划来实践我从书本中学习到的技能。这是除了我一天中第一个小时在喝大量咖啡时读到的科技文章之外的。当我考虑到你的职业发展目标的时候,我认为除了我们谈到的优秀博客文章和文章之外,书籍是一个重要的元素。我觉得我的阅读量使我保持进步,如果你也这么做了,你也会很快赶上我的。
**Chris** 那么学生有没有教过老师呢?
**Jess** 我在你那里学习到耐心。举个例子,当你完成了安装 Ansible 的时候,我问你下一步要怎样操作的时候。你直接回复我,“不知道”,这不是我想让你学习到的内容。所以我改变了策略,现在在逐步安装任何组件之前,我们将详细讨论你想要实现的目标。当我们在写 Vagrant 文章的时候,我们一起进行相应的演示操作,我以创建它时就牢记目标,因此我们就有一些需要马上实现的目标。
这实际上对我在工作中的培训方式产生了巨大的改变。现在我在大家学习的过程中会问更多问题,并更多地进行手把手讲解。我更愿意坐下来仔细检查,确保有人明白我在说什么和我们在做什么。这是我之前从来没有做过的。
### 我们一起学到了什么
做为一对夫妇,在这一年的技术合作中我们的技术都有所增长。
**Chris** 我对自己学到的东西感到震惊。通过一年课程学习,我认识了新操作系统、如何使用 API、使用 Ansible 部署 Web 应用和使用 Vagrant 启动虚拟机器。我还学习到了文档可以让生活变得更好,所以我也会尝试去写一写。然而,在这个工作领域,操作并不总是被记录在案,所以我学会了准备好处理棘手的问题,并记录如何解决它们。
**Jess** 除了我在教你中学到的知识外,我还专注于学习 Kubernetes 在云环境中的应用知识。这包括部署策略、Kubernetes API 的复杂度、创建我自己的容器,并对环境进行加密处理。我还节省了探索的时间:研究了 serverless 的代码、AI 模型、Python 和以图形方式显示热图。对于我来说,这一年也很充足。
我们下一个目标是什么?现在还不知道,但我可以向你保证,我们将会继续进行分享它。
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/2/linux-love-language
作者:[Christopher Cherry][a]
选题:[lujun9972][b]
译者:[sndnvaps](https://github.com/sndnvaps)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/chcherry
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/red-love-heart-alone-stone-path.jpg?itok=O3q1nEVz (红心 "你不是孤单的")
[2]: https://opensource.com/resources/what-ansible
[3]: https://opensource.com/resources/vagrant

View File

@ -0,0 +1,89 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-11967-1.html)
[#]: subject: (PHP Development on Fedora with Eclipse)
[#]: via: (https://fedoramagazine.org/php-development-on-fedora-with-eclipse/)
[#]: author: (Mehdi Haghgoo https://fedoramagazine.org/author/powergame/)
使用 Eclipse 在 Fedora 上进行 PHP 开发
======
![][1]
[Eclipse][2] 是由 Eclipse 基金会开发的功能全面的自由开源 IDE。它诞生于 2001 年。你可以在此 IDE 中编写各种程序,从 C/C++ 和 Java 到 PHP乃至于 Python、HTML、JavaScript、Kotlin 等等。
### 安装
该软件可从 Fedora 的官方仓库中获得。要安装它,请用:
```
sudo dnf install eclipse
```
这将安装基本的 IDE 和 Eclipse 平台,能让你开发 Java 应用。为了将 PHP 开发支持添加到 IDE请运行以下命令
```
sudo dnf install eclipse-pdt
```
这将安装 PHP 开发工具,如 PHP 项目向导、PHP 服务器配置composer 支持等。
### 功能
该 IDE 有许多使 PHP 开发更加容易的功能。例如,它有全面的项目向导(你可以在其中为新项目配置许多选项)。它还有如 composer 支持、调试支持、浏览器、终端等内置功能。
### 示例项目
现在已经安装了 IDE让我们创建一个简单的 PHP 项目。进入 “File →New → Project”。在出现的对话框中选择 “PHP project”。输入项目的名称。你可能还需要更改其他一些选项例如更改项目的默认位置启用 JavaScript 以及更改 PHP 版本。请看以下截图。
![Create A New PHP Project in Eclipse][3]
你可以单击 “Finish” 按钮创建项目,或按 “Next” 配置其他选项,例如添加包含和构建路径。在大多数情况下,你无需更改这些设置。
创建项目后,右键单击项目文件夹,然后选择 “New→PHP File” 将新的 PHP 文件添加到项目。在本教程中,我将其命名为 `index.php`,这是每个 PHP 项目中公认的默认文件。
![add a new PHP file][4]
接着在新文件中添加代码。
![Demo PHP code][5]
在上面的例子中,我在同一页面上使用了 CSS、JavaScript 和 PHP 标记,主要是为了展示 IDE 能够支持所有这些标记。
页面完成后,你可以将文件移至 Web 服务器文档根目录或在项目目录中创建一个 PHP 开发服务器来查看输出。
借助 Eclipse 中的内置终端,我们可以直接在 IDE 中启动 PHP 开发服务器。只需单击工具栏上的终端图标(![Terminal Icon][6]),然后单击 “OK”。在新终端中进入项目目录然后运行以下命令
```
php -S localhost:8080 -t . index.php
```
![Terminal output][7]
现在,打开浏览器并进入 <http://localhost:8080>。如果按照说明正确完成了所有操作,并且代码没有错误,那么你将在浏览器中看到 PHP 脚本的输出。
![PHP output in Fedora][8]
--------------------------------------------------------------------------------
via: https://fedoramagazine.org/php-development-on-fedora-with-eclipse/
作者:[Mehdi Haghgoo][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://fedoramagazine.org/author/powergame/
[b]: https://github.com/lujun9972
[1]: https://fedoramagazine.org/wp-content/uploads/2020/02/php-eclipse-816x346.png
[2]: https://projects.eclipse.org/projects/eclipse
[3]: https://fedoramagazine.org/wp-content/uploads/2020/02/Screenshot-from-2020-02-07-01-58-39.png
[4]: https://fedoramagazine.org/wp-content/uploads/2020/02/Screenshot-from-2020-02-07-02-02-05-1024x576.png
[5]: https://fedoramagazine.org/wp-content/uploads/2020/02/code-1024x916.png
[6]: https://fedoramagazine.org/wp-content/uploads/2020/02/Screenshot-from-2020-02-07-03-50-05.png
[7]: https://fedoramagazine.org/wp-content/uploads/2020/02/terminal-1024x239.png
[8]: https://fedoramagazine.org/wp-content/uploads/2020/02/output.png

View File

@ -0,0 +1,236 @@
[#]: collector: (lujun9972)
[#]: translator: (heguangzhi)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-11966-1.html)
[#]: subject: (How to find what youre looking for on Linux with find)
[#]: via: (https://www.networkworld.com/article/3527420/how-to-find-what-you-re-looking-for-on-linux-with-find.html)
[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/)
通过 find 命令找到你要找的东西
======
> find 命令有巨多的选项可以帮助你准确定位你在 Linux 系统上需要寻找的文件。这篇文章讨论了一系列非常有用的选项。
![](https://img.linux.net.cn/data/attachment/album/202003/06/113842txki5llopb5aagbt.jpg)
在 Linux 系统上有许多用于查找文件的命令,而你在使用它们时也有巨多的选项可以使用。
例如,你不仅可以通过文件的名称来查找文件,还可以通过文件的所有者或者组、它们的创建时间、大小、分配的权限、最后一次访问它们的时间、关联的信息节点,甚至是文件是否属于系统上不再存在的帐户或组等等来查找文件。
你还可以指定搜索从哪里开始,搜索应该深入到文件系统的什么位置,以及搜索结果将告诉你它所找到的文件的数量。
而所有这些要求都可以通过 `find` 命令来处理。
下面提供了根据这些要求查找文件的示例。在某些命令中,错误(例如试图列出你没有读取权限的文件)输出将被发送到 `/dev/null`,以便我们不必查看它。或者,我们可以简单地以 root 身份运行以避免这个问题。
请记住,还有更多的其他选项。这篇文章涵盖了很多内容,但并不是 `find` 命令帮助你定位查找文件的所有方式。
### 选择起点
使用 `find`,你可以选择一个起点或从你所在的位置开始。要选择的搜索的起点,请在单词 `find` 后输入它。例如,`find /usr` 或 `find ./bin` 将在 `/usr` 目录或当前位置下的 `bin` 目录开始搜索,而 `find ~` 将在你的主目录中开始搜索,即使你当前位于当前文件系统中的其他位置。
### 选择你要找的
最常用的搜索策略之一是按名称搜索文件。这需要使用 `-name` 选项。
默认情况下,`find` 会显示找到的文件的完整路径。如果你在命令中添加 `-print`,你会看到同样的结果。如果你想查看与文件相关的详细信息—-例如:文件的长度、权限等,你需要在你的 `find` 命令的末尾添加 `-ls` 参数。
```
$ find ~/bin -name tryme
/home/shs/bin/tryme
$ find ~/bin -name tryme -print
/home/shs/bin/tryme
$ find ~/bin -name tryme -ls
917528 4 -rwx------ 1 shs shs 139 Apr 8 2019 /home/shs/bin/tryme
```
你也可以使用子字符串来查找文件。例如,如果你将上面示例中的 `tryme` 替换为 `try*`,你将会找到所有名称以 `try` 开头的文件。LCTT 译注:如果要使用通配符 `*` ,请将搜索字符串放到单引号或双引号内,以避免通配符被 shell 所解释)
按名称查找文件可能是 `find` 命令最典型的用法,不过还有很多其他的方式来查找文件,并且有这样做的需要。下面的部分展示了如何使用其他可用的方式。
此外,当按文件大小、组、索引节点等条件来搜索文件时,你需要确认找到的文件与你要查找的文件是否相匹配。使用 `-ls` 选项来显示细节是非常有用。
### 通过大小查找文件
按大小查找文件需要使用 `-size` 选项并且对相应规范使用一点技巧。例如,如果你指定 `-size 189b`,你将找到 189 个块大小的文件,而不是 189 个字节。LCTT 译注:如果不跟上单位,默认单位是 `b`。一个块是 512 个字节大小,不足或正好 512 个字节将占据一个块。)对于字节,你需要使用 `--size 189c`(字符)。而且,如果你指定 `--size 200w` ,你将会找到 200 个“<ruby><rt>word</rt></ruby>”的文件——以“双字节增量”为单位的字,而不是“我们互相谈论的那些事情”中的单词。你还可以通过以千字节(`k`)、兆字节(`M`)和千兆字节(`G`为单位提供大小来查找文件。LCTT 译注:乃至还有 `T`、`P`
大多数情况下Linux 用户会搜索比选定大小要大的文件。例如,要查找大于 1 千兆字节的文件,你可以使用这样的命令,其中 `+1G` 表示“大于 1 千兆字节”:
```
$ find -size +1G -ls 2>/dev/null
787715 1053976 -rw-rw-r-- 1 shs shs 1079263432 Dec 21 2018 ./backup.zip
801834 1052556 -rw-rw-r-- 1 shs shs 1077809525 Dec 21 2018 ./2019/hold.zip
```
### 通过索引节点号查找文件
你可以通过用于维护文件元数据(即除文件内容和文件名之外的所有内容)的索引节点来查找文件。
```
$ find -inum 919674 -ls 2>/dev/null
919674 4 -rw-rw-r-- 1 shs shs 512 Dec 27 15:25 ./bin/my.log
```
### 查找具有特定文件所有者或组的文件
按所有者或组查找文件也非常简单。这里我们使用 `sudo` 来解决权限问题。
```
$ sudo find /home -user nemo -name "*.png" -ls
1705219 4 drwxr-xr-x 2 nemo nemo 4096 Jan 28 08:50 /home/nemo/Pictures/me.png
```
在下面这个命令中,我们寻找一个被称为 `admins` 的多用户组拥有的文件。
```
# find /tmp -group admins -ls
262199 4 -rwxr-x--- 1 dory admins 27 Feb 16 18:57 /tmp/testscript
```
### 查找没有所有者或组的文件
你可以使用如下命令所示的 `-nouser` 选项来查找不属于当前系统上的任何用户的文件。
```
# find /tmp -nouser -ls
262204 4 -rwx------ 1 1016 1016 17 Feb 17 16:42 /tmp/hello
```
请注意,该列表显示了旧用户的 UID 和 GID这清楚地表明该用户未在系统上定义。这种命令将查找帐户已从系统中删除的用户创建在主目录之外的文件或者在用户帐户被删除后而未被删除的主目录中创建的文件。类似地`-nogroup` 选项也会找到这样的文件,尤其是当这些用户是相关组的唯一成员时。
### 按上次更新时间查找文件
在此命令中,我们在特定用户的主目录中查找过去 24 小时内更新过的文件。`sudo` 用于搜索另一个用户的主目录。
```
$ sudo find /home/nemo -mtime -1
/home/nemo
/home/nemo/snap/cheat
/home/nemo/tryme
```
### 按上次更改权限的时间查找文件
`-ctime` 选项可以帮助你查找在某个参考时间范围内状态(如权限)发生更改的文件。以下是查找在最后一天内权限发生更改的文件的示例:
```
$ find . -ctime -1 -ls
787987 4 -rwxr-xr-x 1 shs shs 189 Feb 11 07:31 ./tryme
```
请记住,显示的日期和时间只反映了对文件内容进行的最后更新。你需要使用像 `stat` 这样的命令来查看与文件相关联的三个状态(文件创建、修改和状态更改)。
### 按上次访问的时间查找文件
在这个命令中,我们使用 `-atime` 选项查找在过去两天内访问过的本地 pdf 文件。
```
$ find -name "*.pdf" -atime -2
./Wingding_Invites.pdf
```
### 根据文件相对于另一个文件的时间来查找文件
你可以使用 `-newer` 选项来查找比其他文件更新的文件。
```
$ find . -newer dig1 -ls
786434 68 drwxr-xr-x 67 shs shs 69632 Feb 16 19:05 .
1064442 4 drwxr-xr-x 5 shs shs 4096 Feb 16 11:06 ./snap/cheat
791846 4 -rw-rw-r-- 1 shs shs 649 Feb 13 14:26 ./dig
```
没有相应的 `-older` 选项,但是你可以用 `! -newer` (即更旧)得到类似的结果,它们基本上一样。
### 按类型查找文件
通过文件类型找到一个文件,你有很多选项——常规文件、目录、块和字符文件等等。以下是文件类型选项列表:
```
b 块特殊文件(缓冲的)
c 字符特殊文件(无缓冲的)
d 目录
p 命名管道FIFO
f 常规文件
l 符号链接
s 套接字
```
这里有一个寻找符号链接的例子:
```
$ find . -type l -ls
805717 0 lrwxrwxrwx 1 shs shs 11 Apr 10 2019 ./volcano -> volcano.pdf
918552 0 lrwxrwxrwx 1 shs shs 1 Jun 16 2018 ./letter -> pers/letter2mom
```
### 限制查找的深度
`-mindepth``-maxdepth` 选项控制在文件系统中搜索的深度(从当前位置或起始点开始)。
```
$ find -maxdepth 3 -name "*loop"
./bin/save/oldloop
./bin/long-loop
./private/loop
```
### 查找空文件
在这个命令中,我们寻找空文件,但不进入目录及其子目录。
```
$ find . -maxdepth 2 -empty -type f -ls
917517 0 -rw-rw-r-- 1 shs shs 0 Sep 23 11:00 ./complaints/newfile
792050 0 -rw-rw-r-- 1 shs shs 0 Oct 4 19:02 ./junk
```
### 按权限查找文件
你可以使用 `-perm` 选项查找具有特定权限集的文件。在下面的示例中,我们只查找常规文件(`-type f`),以避免看到符号链接,默认情况下符号链接被赋予了这种权限,即使它们所引用的文件是受限的。
```
$ find -perm 777 -type f -ls
find: ./.dbus: Permission denied
798748 4 -rwxrwxrwx 1 shs shs 15 Mar 28 2019 ./runme
```
### 使用查找来帮助你删除文件
如果使用如下命令,你可以使用 `find` 命令定位并删除文件:
```
$ find . -name runme -exec rm {} \;
```
`{}` 代表根据搜索条件找到的每个文件的名称。
一个非常有用的选项是将 `-exec` 替换为 `-ok`。当你这样做时,`find` 会在删除任何文件之前要求确认。
```
$ find . -name runme -ok rm -rf {} \;
< rm ... ./bin/runme > ?
```
删除文件并不是 `-ok``-exec` 能为你做的唯一事情。例如,你可以复制、重命名或移动文件。
确实有很多选择可以有效地使用 `find` 命令,毫无疑问还有一些在本文中没有涉及到。我希望你已经找到一些新的,特别有帮助的。
--------------------------------------------------------------------------------
via: https://www.networkworld.com/article/3527420/how-to-find-what-you-re-looking-for-on-linux-with-find.html
作者:[Sandra Henry-Stocker][a]
选题:[lujun9972][b]
译者:[heguangzhi](https://github.com/heguangzhi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.networkworld.com/author/Sandra-Henry_Stocker/
[b]: https://github.com/lujun9972
[1]: https://www.networkworld.com/newsletters/signup.html
[2]: https://www.networkworld.com/article/3440100/take-the-intelligent-route-with-consumption-based-storage.html?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE21620&utm_content=sidebar ( Take the Intelligent Route with Consumption-Based Storage)
[3]: https://www.facebook.com/NetworkWorld/
[4]: https://www.linkedin.com/company/network-world

View File

@ -0,0 +1,330 @@
[#]: collector: (lujun9972)
[#]: translator: (wxy)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12025-1.html)
[#]: subject: (Try this Bash script for large filesystems)
[#]: via: (https://opensource.com/article/20/2/script-large-files)
[#]: author: (Nick Clifton https://opensource.com/users/nickclifton)
针对大型文件系统可以试试此 Bash 脚本
======
> 一个可以列出文件、目录、可执行文件和链接的简单脚本。
![bash logo on green background][1]
你是否曾经想列出目录中的所有文件,但仅列出文件,而不列出其它的。仅列出目录呢?如果有这种需求的话,那么下面的脚本可能正是你一直在寻找的,它在 GPLv3 下开源。
当然,你可以使用 `find` 命令:
```
find . -maxdepth 1 -type f -print
```
但这键入起来很麻烦,输出也不友好,并且缺少 `ls` 命令拥有的一些改进。你还可以结合使用 `ls``grep` 来达到相同的结果:
```
ls -F . | grep -v /
```
但是,这又有点笨拙。下面这个脚本提供了一种简单的替代方法。
### 用法
该脚本提供了四个主要功能,具体取决于你调用它的名称:`lsf` 列出文件,`lsd` 列出目录,`lsx` 列出可执行文件以及 `lsl` 列出链接。
通过符号链接无需安装该脚本的多个副本。这样可以节省空间并使脚本更新更容易。
该脚本通过使用 `find` 命令进行搜索,然后在找到的每个项目上运行 `ls`。这样做的好处是,任何给脚本的参数都将传递给 `ls` 命令。因此,例如,这可以列出所有文件,甚至包括以点开头的文件:
```
lsf -a
```
要以长格式列出目录,请使用 `lsd` 命令:
```
lsd -l
```
你可以提供多个参数,以及文件和目录路径。
下面提供了当前目录的父目录和 `/usr/bin` 目录中所有文件的长分类列表:
```
lsf -F -l .. /usr/bin
```
目前该脚本不处理递归,仅列出当前目录中的文件。
```
lsf -R
```
该脚本不会深入子目录,这个不足有一天可能会进行修复。
### 内部
该脚本采用自上而下的方式编写,其初始化功能位于脚本的开头,而工作主体则接近结尾。脚本中只有两个真正重要的功能。函数 `parse_args()` 会仔细分析命令行,将选项与路径名分开,并处理脚本中的 `ls` 命令行选项中的特定选项。
`list_things_in_dir()` 函数以目录名作为参数并在其上运行 `find` 命令。找到的每个项目都传递给 `ls` 命令进行显示。
### 总结
这是一个可以完成简单功能的简单脚本。它节省了时间,并且在使用大型文件系统时可能会非常有用。
### 脚本
```
#!/bin/bash
# Script to list:
# directories (if called "lsd")
# files (if called "lsf")
# links (if called "lsl")
# or executables (if called "lsx")
# but not any other type of filesystem object.
# FIXME: add lsp (list pipes)
#
# Usage:
# <command_name> [switches valid for ls command] [dirname...]
#
# Works with names that includes spaces and that start with a hyphen.
#
# Created by Nick Clifton.
# Version 1.4
# Copyright (c) 2006, 2007 Red Hat.
#
# This is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published
# by the Free Software Foundation; either version 3, or (at your
# option) any later version.
# It is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# ToDo:
# Handle recursion, eg: lsl -R
# Handle switches that take arguments, eg --block-size
# Handle --almost-all, --ignore-backups, --format and --ignore
main ()
{
init
parse_args ${1+"$@"}
list_objects
exit 0
}
report ()
{
echo $prog": " ${1+"$@"}
}
fail ()
{
report " Internal error: " ${1+"$@"}
exit 1
}
# Initialise global variables.
init ()
{
# Default to listing things in the current directory.
dirs[0]=".";
# num_dirs is the number of directories to be listed minus one.
# This is because we are indexing the dirs[] array from zero.
num_dirs=0;
# Default to ignoring things that start with a period.
no_dots=1
# Note - the global variables 'type' and 'opts' are initialised in
# parse_args function.
}
# Parse our command line
parse_args ()
{
local no_more_args
no_more_args=0 ;
prog=`basename $0` ;
# Decide if we are listing files or directories.
case $prog in
lsf | lsf.sh)
type=f
opts="";
;;
lsd | lsd.sh)
type=d
# The -d switch to "ls" is presumed when listing directories.
opts="-d";
;;
lsl | lsl.sh)
type=l
# Use -d to prevent the listed links from being followed.
opts="-d";
;;
lsx | lsx.sh)
type=f
find_extras="-perm /111"
;;
*)
fail "Unrecognised program name: '$prog', expected either 'lsd', 'lsf', 'lsl' or 'lsx'"
;;
esac
# Locate any additional command line switches for ls and accumulate them.
# Likewise accumulate non-switches to the directories list.
while [ $# -gt 0 ]
do
case "$1" in
# FIXME: Handle switches that take arguments, eg --block-size
# FIXME: Properly handle --almost-all, --ignore-backups, --format
# FIXME: and --ignore
# FIXME: Properly handle --recursive
-a | -A | --all | --almost-all)
no_dots=0;
;;
--version)
report "version 1.2"
exit 0
;;
--help)
case $type in
d) report "a version of 'ls' that lists only directories" ;;
l) report "a version of 'ls' that lists only links" ;;
f) if [ "x$find_extras" = "x" ] ; then
report "a version of 'ls' that lists only files" ;
else
report "a version of 'ls' that lists only executables";
fi ;;
esac
exit 0
;;
--)
# A switch to say that all further items on the command line are
# arguments and not switches.
no_more_args=1 ;
;;
-*)
if [ "x$no_more_args" = "x1" ] ;
then
dirs[$num_dirs]="$1";
let "num_dirs++"
else
# Check for a switch that just uses a single dash, not a double
# dash. This could actually be multiple switches combined into
# one word, eg "lsd -alF". In this case, scan for the -a switch.
# XXX: FIXME: The use of =~ requires bash v3.0+.
if [[ "x${1:1:1}" != "x-" && "x$1" =~ "x-.*a.*" ]] ;
then
no_dots=0;
fi
opts="$opts $1";
fi
;;
*)
dirs[$num_dirs]="$1";
let "num_dirs++"
;;
esac
shift
done
# Remember that we are counting from zero not one.
if [ $num_dirs -gt 0 ] ;
then
let "num_dirs--"
fi
}
list_things_in_dir ()
{
local dir
# Paranoia checks - the user should never encounter these.
if test "x$1" = "x" ;
then
fail "list_things_in_dir called without an argument"
fi
if test "x$2" != "x" ;
then
fail "list_things_in_dir called with too many arguments"
fi
# Use quotes when accessing $dir in order to preserve
# any spaces that might be in the directory name.
dir="${dirs[$1]}";
# Catch directory names that start with a dash - they
# confuse pushd.
if test "x${dir:0:1}" = "x-" ;
then
dir="./$dir"
fi
if [ -d "$dir" ]
then
if [ $num_dirs -gt 0 ]
then
echo " $dir:"
fi
# Use pushd rather passing the directory name to find so that the
# names that find passes on to xargs do not have any paths prepended.
pushd "$dir" > /dev/null
if [ $no_dots -ne 0 ] ; then
find . -maxdepth 1 -type $type $find_extras -not -name ".*" -printf "%f\000" \
| xargs --null --no-run-if-empty ls $opts -- ;
else
find . -maxdepth 1 -type $type $find_extras -printf "%f\000" \
| xargs --null --no-run-if-empty ls $opts -- ;
fi
popd > /dev/null
else
report "directory '$dir' could not be found"
fi
}
list_objects ()
{
local i
i=0;
while [ $i -le $num_dirs ]
do
list_things_in_dir i
let "i++"
done
}
# Invoke main
main ${1+"$@"}
```
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/2/script-large-files
作者:[Nick Clifton][a]
选题:[lujun9972][b]
译者:[wxy](https://github.com/wxy)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/nickclifton
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/bash_command_line.png?itok=k4z94W2U (bash logo on green background)

View File

@ -0,0 +1,106 @@
[#]: collector: (lujun9972)
[#]: translator: (wxy)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12033-1.html)
[#]: subject: (Waterfox: Firefox Fork With Legacy Add-ons Options)
[#]: via: (https://itsfoss.com/waterfox-browser/)
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
水狐:一个支持旧版扩展的火狐复刻版
======
> 在本周的开源软件推荐中,我们将介绍一个基于 Firefox 的浏览器,该浏览器支持 Firefox 如今已不再支持的旧版扩展,同时尽可能地提供了快速的用户体验。
在 Web 浏览器方面,虽然谷歌浏览器已经占据了最大的市场份额,但 [Mozilla Firefox 仍然是关切隐私的主流 Web 浏览器的一面大旗][1]。
Firefox 最近有了很多改进,这些改进的副作用之一是它删除了旧版<ruby>扩展附件<rt>add-on</rt></ruby>的支持。如果你最喜欢的扩展附件在最近几个月/几年内消失了,那么你可以以 Witerfox 的形式再次拥有它们。
> 注意!
>
> 我们注意到Waterfox 已被 System1 收购。该公司还收购了注重隐私的搜索引擎 Startpage。尽管 System1 声称他们提供注重隐私的产品,因为“这是刚需”,但我们不能对此担保。换句话说,这要取决于你是否信任 System1 和 Waterfox。
### Waterfox一个基于 Firefox 的浏览器
![Waterfox Classic][2]
[Waterfox][3] 是基于 Firefox 构建的一个好用的开源浏览器,它注重隐私并支持旧版扩展。它没有将自己定位为偏执于隐私的浏览器,但确实尊重这个基本的认知。
你可以得到两个单独的 Waterfox 浏览器版本。当前版旨在提供现代体验,而经典版则旨在支持 [NPAPI 插件][4] 和 [bootstrap 扩展][5]。
![Waterfox Classic][6]
如果你不需要使用 bootstrap 扩展程序,而是需要 [WebExtensions][7],则应该选择 Waterfox 当前版。
而如果你需要设置一个需要大量 NPAPI 插件或 Bootstrap 扩展的浏览器,则 Waterfox 经典版将非常适合你。
因此,如果你喜欢 Firefox但想在同一阵营内尝试一些不同的体验那么这个 Firefox 替代选择就是为此而生的。
### Waterfox 的功能
![Waterfox Current][8]
当然,从技术上讲,你应该能够做 Mozilla Firefox 支持的许多操作。
因此,我将在此处的列表中突出显示 Waterfox 的所有重要功能。
* 支持 NPAPI 插件
* 支持 Bootstrap 扩展
* 分别提供了支持旧版本扩展和现代的 WebExtension 两个版本。
* 跨平台支持Windows、Linux 和 macOS
* 主题定制
* 支持已经归档的扩展
### 在 Ubuntu/Linux 上安装 Waterfox
与其他流行的浏览器不同,它没有可以安装的软件包。因此,你将必须从其[官方下载页面][9]下载归档包。
![][10]
根据你想要的版本(当前版/经典版),只需下载该文件,它是以 .tar.bz2 为扩展名的文件。
下载后,只需解压缩文件即可。
接下来,转到解压缩的文件夹并查找 `Waterfox` 文件。你只需双击它即可运行以启动浏览器。
如果这不起作用,则可以使用终端并导航到提取的 `Waterfox` 文件夹。到达那里后,你只需使用一个命令即可运行它。看起来如下:
```
cd waterfox-classic
./waterfox
```
无论是哪种情况,你都可以访问其 [GitHub 页面][11]以了解将其安装在系统上的更多方式。
- [下载 Waterfox][3]
### 总结
我在我的 Pop!_OS 19.10 系统中启动了它,在我这里工作的很好。尽管我不准备从 Firefox 切换到 Waterfox因为我没有使用任何旧版扩展附件。但对于某些用户来说它可能是一个重要选择。
你可以尝试一下,在下面的评论中让我知道你的想法。
--------------------------------------------------------------------------------
via: https://itsfoss.com/waterfox-browser/
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[wxy](https://github.com/wxy)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://itsfoss.com/why-firefox/
[2]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/02/waterfox-classic.png?fit=800%2C423&ssl=1
[3]: https://www.waterfox.net/
[4]: https://en.wikipedia.org/wiki/NPAPI
[5]: https://wiki.mozilla.org/Extension_Manager:Bootstrapped_Extensions
[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/02/waterfox-classic-screenshot.jpg?ssl=1
[7]: https://wiki.mozilla.org/WebExtensions
[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/02/waterfox-screenshot.jpg?ssl=1
[9]: https://www.waterfox.net/download/
[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/02/waterfox-download-page.jpg?ssl=1
[11]: https://github.com/MrAlex94/Waterfox

View File

@ -1,8 +1,8 @@
[#]: collector: (lujun9972)
[#]: translator: (wxy)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-11950-1.html)
[#]: subject: (Using C and C++ for data science)
[#]: via: (https://opensource.com/article/20/2/c-data-science)
[#]: author: (Cristiano L. Fontana https://opensource.com/users/cristianofontana)
@ -10,30 +10,29 @@
在数据科学中使用 C 和 C++
======
> 让我们使用 C99 和 C++ 11 完成常见的数据科学任务。
> 让我们使用 C99 和 C++11 完成常见的数据科学任务。
![metrics and data shown on a computer screen][1]
虽然 [Python][2] 和 [R][3] 之类的语言在数据科学中越来越受欢迎,但是 C 和 C++ 对于高效的数据科学来说是一个不错的选择。在本文中,我们将使用 [C99][4] 和 [C++11][5] 编写一个程序,该程序使用 [Anscombe 的四重奏][6]数据集,下面将对其进行解释。
我在一篇涉及 [Python 和 GNU Octave][7] 的文章中写了我不断学习语言的动机,值得大家回顾。所有程序都应在[命令行][8]上运行,而不是在[图形用户界面GUI][9]上运行。完整的示例可在 [polyglot_fit 存储库][10]中找到。
我在一篇涉及 [Python 和 GNU Octave][7] 的文章中写了我不断学习编程语言的动机,值得大家回顾。这里所有的程序都需要在[命令行][8]上运行,而不是在[图形用户界面GUI][9]上运行。完整的示例可在 [polyglot_fit 存储库][10]中找到。
### 编程任务
你将在本系列中编写的程序:
* 从 [CSV 文件] [11]中读取数据
* 从 [CSV 文件][11]中读取数据
* 用直线插值数据(即 `f(x)=m ⋅ x + q`
* 将结果绘制到图像文件
这是许多数据科学家遇到的普遍情况。示例数据是 [Anscombe 的四重奏] [6]的第一组,如下表所示。这是一组人工构建的数据,当拟合直线时可以提供相同的结果,但是它们的曲线非常不同。数据文件是一个文本文件,其中的制表符用作列分隔符,几行作为标题。该任务将仅使用第一组(即前两列)。
[Anscombe 的四重奏][6]
这是许多数据科学家遇到的普遍情况。示例数据是 [Anscombe 的四重奏][6]的第一组,如下表所示。这是一组人工构建的数据,当拟合直线时可以提供相同的结果,但是它们的曲线非常不同。数据文件是一个文本文件,其中的制表符用作列分隔符,前几行作为标题。该任务将仅使用第一组(即前两列)。
![](https://img.linux.net.cn/data/attachment/album/202002/29/122805h3yrs1dkrgysssxk.png)
### C 语言的方式
[C][12] 语言是通用编程语言,是当今使用最广泛的语言之一(依据 [TIOBE 榜单][13]、[RedMonk 编程语言排名][14]、[编程语言流行度榜单][15]和 [GitHub Octoverse 状态][16])。这是一种相当古老的语言(大约诞生在 1973 年),并且用它编写了许多成功的程序(例如 Linux 内核和 Git 仅是其中两个例子)。它也是最接近计算机内部运行的语言之一,因为它直接用于操作内存。它是一种[编译语言] [17];因此,源代码必须由[编译器][18]转换为[机器代码][19]。它的[标准库][20]很小,功能也不多,因此开发了其他库来提供缺少的功能。
[C][12] 语言是通用编程语言,是当今使用最广泛的语言之一(依据 [TIOBE 指数][13]、[RedMonk 编程语言排名][14]、[编程语言流行度指数][15]和 [GitHub Octoverse 状态][16] 得来)。这是一种相当古老的语言(大约诞生在 1973 年),并且用它编写了许多成功的程序(例如 Linux 内核和 Git 仅是其中两个例子)。它也是最接近计算机内部运行机制的语言之一,因为它直接用于操作内存。它是一种[编译语言][17];因此,源代码必须由[编译器][18]转换为[机器代码][19]。它的[标准库][20]很小,功能也不多,因此人们开发了其它库来提供缺少的功能。
我最常在[数字运算][21]中使用该语言,主要是因为其性能。我觉得使用起来很繁琐,因为它需要很多[样板代码][22]但是它在各种环境中都得到了很好的支持。C99 标准是最新版本,增加了一些漂亮的功能,并且得到了编译器的良好支持。
@ -41,7 +40,7 @@
#### 安装
要使用 C99 进行开发,你需要一个编译器。我通常使用 [Clang][23],不过 [GCC][24] 是另一个有效的开源编译器。对于线性拟合,我选择使用 [GNU 科学库] [25]。对于绘图,我找不到任何明智的库,因此该程序依赖于外部程序:[Gnuplot] [26]。该示例还使用动态数据结构来存储数据,该结构在[伯克利软件分发版BSD][27]中定义。
要使用 C99 进行开发,你需要一个编译器。我通常使用 [Clang][23],不过 [GCC][24] 是另一个有效的开源编译器。对于线性拟合,我选择使用 [GNU 科学库][25]。对于绘图,我找不到任何明智的库,因此该程序依赖于外部程序:[Gnuplot][26]。该示例还使用动态数据结构来存储数据,该结构在[伯克利软件分发版BSD][27]中定义。
在 [Fedora][28] 中安装很容易:
@ -49,7 +48,7 @@
sudo dnf install clang gnuplot gsl gsl-devel
```
#### 注释代码
#### 代码注释
在 C99 中,[注释][29]的格式是在行的开头放置 `//`,行的其它部分将被解释器丢弃。另外,`/*` 和 `*/` 之间的任何内容也将被丢弃。
@ -65,7 +64,7 @@ sudo dnf install clang gnuplot gsl gsl-devel
* [头文件][30],其中包含函数说明
* 包含函数定义的源文件
头文件包含在源文件中,而库文件的源文件则与可执行文件[链接][31]。因此,此示例所需的头文件是:
头文件包含在源文件中,而库文件的源文件则[链接][31]到可执行文件。因此,此示例所需的头文件是:
```
// 输入/输出功能
@ -83,7 +82,7 @@ sudo dnf install clang gnuplot gsl gsl-devel
#### 主函数
在 C 语言中,程序必须位于称为主函数 [main()][32]的特殊函数内:
在 C 语言中,程序必须位于称为主函数 [main()][32] 的特殊函数内:
```
int main(void) {
@ -95,7 +94,7 @@ int main(void) {
#### 定义变量
在 C 语言中,变量必须在使用前声明,并且必须与类型关联。每当你要使用变量时,都必须决定要在其中存储哪种数据。你也可以指定是否打算将变量用作常量值,这不是必需的,但是编译器可以从此信息中受益。 来自存储库中的 [fitting_C99.c 程序] [33]
在 C 语言中,变量必须在使用前声明,并且必须与类型关联。每当你要使用变量时,都必须决定要在其中存储哪种数据。你也可以指定是否打算将变量用作常量值,这不是必需的,但是编译器可以从此信息中受益。 以下来自存储库中的 [fitting_C99.c 程序][33]
```
const char *input_file_name = "anscombe.csv";
@ -113,7 +112,7 @@ C 语言中的数组不是动态的,从某种意义上说,数组的长度必
int data_array[1024];
```
由于你通常不知道文件中有多少个数据点,因此请使用[单链列表][34]。这是一个动态数据结构可以无限增长。幸运的是BSD [提供了链表][35]。这是一个示例定义:
由于你通常不知道文件中有多少个数据点,因此请使用[单链列表][34]。这是一个动态数据结构可以无限增长。幸运的是BSD [提供了链表][35]。这是一个示例定义:
```
struct data_point {
@ -145,7 +144,7 @@ printf("Slope: %f\n", slope);
#### 读取数据
现在来到了困难的部分……有一些用 C 语言解析 CSV 文件的库,但是似乎没有一个库足够稳定或流行到可以放入到 Fedora 软件包存储库中。我没有为本教程添加依赖项,而是决定自己编写此部分。同样,讨论这些细节太啰嗦了,所以我只会解释大致的思路。为了简洁起见,将忽略源代码中的某些行,但是你可以在存储库中找到完整的示例。
现在来到了困难的部分……有一些用 C 语言解析 CSV 文件的库,但是似乎没有一个库足够稳定或流行到可以放入到 Fedora 软件包存储库中。我没有为本教程添加依赖项,而是决定自己编写此部分。同样,讨论这些细节太啰嗦了,所以我只会解释大致的思路。为了简洁起见,将忽略源代码中的某些行,但是你可以在存储库中找到完整的示例代码
首先,打开输入文件:
@ -210,7 +209,7 @@ double *x = malloc(sizeof(double) * entries_number);
double *y = malloc(sizeof(double) * entries_number);
```
然后,遍历链接列表以将相关数据保存到数组:
然后,遍历链表以将相关数据保存到数组:
```
SLIST_FOREACH(datum, &head, entries) {
@ -224,7 +223,7 @@ SLIST_FOREACH(datum, &head, entries) {
}
```
现在你已经完了链接列表,请清理它。要**总是**释放已手动分配的内存,以防止[内存泄漏][48]。内存泄漏是糟糕的、糟糕的、糟糕的(重要的话说三遍)。每次内存没有释放时,花园侏儒都会找不到自己的头:
现在你已经处理完了链表,请清理它。要**总是**释放已手动分配的内存,以防止[内存泄漏][48]。内存泄漏是糟糕的、糟糕的、糟糕的(重要的话说三遍)。每次内存没有释放时,花园侏儒都会找不到自己的头:
```
while (!SLIST_EMPTY(&head)) {
@ -278,7 +277,7 @@ plot 'fit_C99.csv' using 1:2 with lines title 'Fit', 'anscombe.csv' using 1:2 wi
clang -std=c99 -I/usr/include/ fitting_C99.c -L/usr/lib/ -L/usr/lib64/ -lgsl -lgslcblas -o fitting_C99
```
这个命令告诉编译器使用 C99 标准,读取 `fitting_C99.c` 文件,加载 `gsl``gslcblas` 库,并将结果保存到 `fitting_C99`。命令行上的结果输出为:
这个命令告诉编译器使用 C99 标准、读取 `fitting_C99.c` 文件、加载 `gsl``gslcblas` 库、并将结果保存到 `fitting_C99`。命令行上的结果输出为:
```
#### Anscombe's first set with C99 ####
@ -287,13 +286,13 @@ Intercept: 3.000091
Correlation coefficient: 0.816421
```
这是用 Gnuplot 生成的结果图像
这是用 Gnuplot 生成的结果图像
![Plot and fit of the dataset obtained with C99][52]
### C++11 方式
[C++][53] 语言是一种通用编程语言,也是当今使用的最受欢迎的语言之一。它是作为 [C 的继承人][54]创建的(诞生于 1983 年),重点是[面向对象程序设计OOP][55]。C++ 通常被视为 C 的超集,因此 C 程序应该能够使用 C++ 编译器进行编译。这并非完全正确,因为在某些极端情况下它们的行为有所不同。 根据我的经验C++ 比 C 需要更少的样板代码但是如果要进行对象开发语法会更困难。C++11 标准是最新版本,增加了一些漂亮的功能,并且或多或少得到了编译器的支持。
[C++][53] 语言是一种通用编程语言,也是当今使用的最受欢迎的语言之一。它是作为 [C 的继承人][54]创建的(诞生于 1983 年),重点是[面向对象程序设计OOP][55]。C++ 通常被视为 C 的超集,因此 C 程序应该能够使用 C++ 编译器进行编译。这并非完全正确,因为在某些极端情况下它们的行为有所不同。 根据我的经验C++ 与 C 相比需要更少的样板代码,但是如果要进行面向对象开发语法会更困难。C++11 标准是最新版本,增加了一些漂亮的功能,并且基本上得到了编译器的支持。
由于 C++ 在很大程度上与 C 兼容,因此我将仅强调两者之间的区别。我在本部分中没有涵盖的任何部分,则意味着它与 C 中的相同。
@ -309,7 +308,6 @@ sudo dnf install clang gnuplot gsl gsl-devel
库的工作方式与 C 语言相同,但是 `include` 指令略有不同:
```
#include <cstdlib>
#include <cstring>
@ -325,7 +323,7 @@ extern "C" {
}
```
由于 GSL 库是用 C 编写的,因此你必须将这种特殊性告知编译器。
由于 GSL 库是用 C 编写的,因此你必须将这个特殊情况告知编译器。
#### 定义变量
@ -429,17 +427,17 @@ Intercept: 3.00009
Correlation coefficient: 0.816421
```
这就是用 Gnuplot 生成的结果图像
这就是用 Gnuplot 生成的结果图像
![Plot and fit of the dataset obtained with C++11][58]
### 结论
本文提供了用 C99 和 C++11 编写的数据拟合和绘图任务的示例。由于 C++ 在很大程度上与 C 兼容因此本文利用了它们的相似性来编写了第二个示例。在某些方面C++ 更易于使用,因为它部分减轻了显式管理内存的负担。但是其语法更加复杂,因为它引入了为 OOP 编写类的可能性。但是,仍然可以用 C 使用 OOP 方法编写软件。由于 OOP 是一种编程风格,因此可以以任何语言使用。在 C 中有一些很好的 OOP 示例,例如 [GObject][59] 和 [Jansson][60]库。
本文提供了用 C99 和 C++11 编写的数据拟合和绘图任务的示例。由于 C++ 在很大程度上与 C 兼容因此本文利用了它们的相似性来编写了第二个示例。在某些方面C++ 更易于使用,因为它部分减轻了显式管理内存的负担。但是其语法更加复杂,因为它引入了为 OOP 编写类的可能性。但是,仍然可以用 C 使用 OOP 方法编写软件。由于 OOP 是一种编程风格,因此可以在任何语言中使用。在 C 中有一些很好的 OOP 示例,例如 [GObject][59] 和 [Jansson][60]库。
对于数字运算,我更喜欢在 C99 中进行因为它的语法更简单并且得到了广泛的支持。直到最近C++11 还没有得到广泛的支持我倾向于避免使用先前版本中的粗糙不足之处。对于更复杂的软件C++ 可能是一个不错的选择。
你是否也将 C 或 C++ 用于数据科学? 在评论中分享你的经验。
你是否也将 C 或 C++ 用于数据科学?在评论中分享你的经验。
--------------------------------------------------------------------------------
@ -448,7 +446,7 @@ via: https://opensource.com/article/20/2/c-data-science
作者:[Cristiano L. Fontana][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/) 荣誉推出
@ -460,7 +458,7 @@ via: https://opensource.com/article/20/2/c-data-science
[4]: https://en.wikipedia.org/wiki/C99
[5]: https://en.wikipedia.org/wiki/C%2B%2B11
[6]: https://en.wikipedia.org/wiki/Anscombe%27s_quartet
[7]: https://opensource.com/article/20/2/python-gnu-octave-data-science
[7]: https://linux.cn/article-11943-1.html
[8]: https://en.wikipedia.org/wiki/Command-line_interface
[9]: https://en.wikipedia.org/wiki/Graphical_user_interface
[10]: https://gitlab.com/cristiano.fontana/polyglot_fit

View File

@ -1,36 +1,36 @@
[#]: collector: (lujun9972)
[#]: translator: (HankChow)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-11957-1.html)
[#]: subject: (What developers need to know about domain-specific languages)
[#]: via: (https://opensource.com/article/20/2/domain-specific-languages)
[#]: author: (Girish Managoli https://opensource.com/users/gammay)
开发者需要了解的领域特定语言
开发者需要了解的领域特定语言DSL
======
> 领域特定语言是在特定领域下用于特定上下文的语言。作为开发者,很有必要了解领域特定语言的含义,以及为什么要使用特定领域语言。
![Various programming languages in use][1]
![](https://img.linux.net.cn/data/attachment/album/202003/04/112240b0os2988kolritlo.jpg)
<ruby>领域特定语言<rt>domain-specific language</rt></ruby>DSL在特定领域下用于特定上下文的语言。这里的领域是指某种商业上的(例如银行业、保险业等)上下文,也可以指某种应用程序的(例如 Web 应用、数据库等)上下文。与之相比的另一个概念是<ruby>通用语言<rt>general-purpose language</rt></ruby>GPL通用语言则可以广泛应用于各种商业或应用问题当中。
<ruby>领域特定语言<rt>domain-specific language</rt></ruby>DSL一种旨在特定领域下的上下文的语言。这里的领域是指某种商业上的(例如银行业、保险业等)上下文,也可以指某种应用程序的(例如 Web 应用、数据库等)上下文。与之相比的另一个概念是<ruby>通用语言<rt>general-purpose language</rt></ruby>GPLLCTT 译注:注意不要和 GPL 许可证混淆),通用语言则可以广泛应用于各种商业或应用问题当中。
DSL 并不具备很强的普适性它是仅为某个适用的领域而设计的但它也足以用于表示这个领域中的问题以及构建对应的解决方案。HTML 是 DSL 的一个典型,它是在 Web 应用上使用的语言,尽管 HTML 无法进行数字运算,但也不影响它在这方面的广泛应用。
而 GPL 则没有特定针对的领域,GPL 的设计者不可能知道这种语言会在什么领域被使用,更不清楚用户打算解决的问题是什么,因此 GPL 会被设计成可用于解决任何一种问题、适合任何一种业务、满足任何一种需求。例如 Java 就属于 GPL它可以在 PC 或移动设备上运行,嵌入到银行、金融、保险、制造业等各种行业的应用中去。
而 GPL 则没有特定针对的领域,这种语言的设计者不可能知道这种语言会在什么领域被使用,更不清楚用户打算解决的问题是什么,因此 GPL 会被设计成可用于解决任何一种问题、适合任何一种业务、满足任何一种需求。例如 Java 就属于 GPL它可以在 PC 或移动设备上运行,嵌入到银行、金融、保险、制造业等各种行业的应用中去。
### DSL 的类别
从使用方式的角度,语言可以划分出以下两类:
* DSL使用 DSL 形式编写或表示的语言
* <ruby>宿主语言<rt>host language</rt></ruby>:用于执行或处理 DSL 的语言
* DSL使用 DSL 形式编写或表示的语言
* <ruby>宿主语言<rt>host language</rt></ruby>:用于执行或处理 DSL 的语言
当 DSL 以独有的形式表达,并由另一种宿主语言来处理时,这种 DSL 称为<ruby>外部<rt>external</rt></ruby> DSL。
以下就是可以在宿主语言中处理的 SQL
由不同的语言编写并由另一种宿主语言处理的 DSL 被称为<ruby>外部<rt>external</rt></ruby> DSL。
以下就是可以在宿主语言中处理的 SQL 形式的 DSL
```
SELECT account
@ -40,22 +40,27 @@ WHERE account = '123' AND branch = 'abc' AND amount >= 1000
因此只要在规定了词汇和语法的情况下DSL 也可以直接使用英语来编写,并使用诸如 ANTLR 这样的<ruby>解析器生成器<rt>parser generator</rt></ruby>以另一种宿主语言来处理 DSL
```
`if smokes then increase premium by 10%`
if smokes then increase premium by 10%
```
如果 DSL 和宿主语言是同一种语言,这种 DSL 称为<ruby>内部<rt>internal</rt></ruby> DSL其中 DSL 由以同一种语义的宿主语言编写和处理,因此又称为<ruby>嵌入式<rt>embedded</rt></ruby> DSL。以下是两个例子
如果 DSL 和宿主语言是同一种语言,这种 DSL 称为<ruby>内部<rt>internal</rt></ruby>DSL其中 DSL 由以同一种语义的宿主语言编写和处理,因此又称为<ruby>嵌入式<rt>embedded</rt></ruby> DSL。以下是两个例子
* Bash 形式的 DSL 可以由 Bash 解释器执行:`if today_is_christmas; then apply_christmas_discount; fi` 同时这也是一段看起来符合英语语法的 Bash。
* 使用类似 Java 语法编写的 DSL
* Bash 形式的 DSL 可以由 Bash 解释器执行:
```
if today_is_christmas; then apply_christmas_discount; fi
```
同时这也是一段看起来符合英语语法的 Bash。
* 使用类似 Java 语法编写的 DSL
```
orderValue = orderValue
.applyFestivalDiscount()
.applyCustomerLoyalityDiscount()
.applyCustomerAgeDiscount();
```
这一段的可读性也相当强。
这一段的可读性也相当强。
实际上DSL 和 GPL 之间并没有非常明确的界限。
@ -63,18 +68,16 @@ orderValue = orderValue
以下这些语言都可以作为 DSL 使用:
* Web 应用HTML
* Shell用于类 Unix 系统的 sh、Bash、CSH 等;用于 Windows 系统的 MS-DOS、Windows Terminal、PowerShell 等
* 标记语言XML
* 建模UML
* 数据处理SQL 及其变体
* 业务规则管理Drools
* 硬件Verilog、VHD
* 构建工具Maven、Gradle
* 数值计算和模拟MATLAB商业、GNU Octave、Scilab
* 解析器和生成器Lex、YACC、GNU Bison、ANTLR
* Web 应用HTML
* Shell用于类 Unix 系统的 sh、Bash、CSH 等;用于 Windows 系统的 MS-DOS、Windows Terminal、PowerShell 等
* 标记语言XML
* 建模UML
* 数据处理SQL 及其变体
* 业务规则管理Drools
* 硬件Verilog、VHD
* 构建工具Maven、Gradle
* 数值计算和模拟MATLAB商业、GNU Octave、Scilab
* 解析器和生成器Lex、YACC、GNU Bison、ANTLR
### 为什么要使用 DSL
@ -92,25 +95,22 @@ DSL 的优点是,它对于领域的特征捕捉得非常好,同时它不像
开源的 DSL 软件包括:
* XtextXtext 可以与 Eclipse 集成,并支持 DSL 开发。它能够实现代码生成,因此一些开源和商业产品都用它来提供特定的功能。用于农业活动建模分析的<ruby>多用途农业数据系统<rt>Multipurpose Agricultural Data System</rt></ruby>MADS就是基于 Xtext 实现的一个项目,可惜的是这个项目现在已经不太活跃了。
* JetBrains MPSJetBrains MPS 是一个可供开发 DSL 的<ruby>集成开发环境<rt>Integrated Development Environment</rt></ruby>它将文档在底层存储为一个抽象树结构Microsoft Word 也使用了这一概念),因此它也自称为一个<ruby>投影编辑器<rt>projectional editor</rt></ruby>。JetBrains MPS 支持 Java、C、JavaScript 和 XML 的代码生成。
* XtextXtext 可以与 Eclipse 集成,并支持 DSL 开发。它能够实现代码生成,因此一些开源和商业产品都用它来提供特定的功能。用于农业活动建模分析的<ruby>多用途农业数据系统<rt>Multipurpose Agricultural Data System</rt></ruby>MADS就是基于 Xtext 实现的一个项目,可惜的是这个项目现在已经不太活跃了。
* JetBrains MPSJetBrains MPS 是一个可供开发 DSL 的<ruby>集成开发环境<rt>Integrated Development Environment</rt></ruby>它将文档在底层存储为一个抽象树结构Microsoft Word 也使用了这一概念),因此它也自称为一个<ruby>投影编辑器<rt>projectional editor</rt></ruby>。JetBrains MPS 支持 Java、C、JavaScript 和 XML 的代码生成。
### DSL 的最佳实践
如果你想使用 DSL记住以下几点
* DSL 不同于 GPLDSL 只能用于解决特定领域中有限范围内的问题。
* 不必动辄建立自己的 DSL可以首先尝试寻找已有的 DSL。例如 [DSLFIN][4] 这个网站就提供了很多金融方面的 DSL。在实在找不到合适的 DSL 的情况下,才需要建立自己的 DSL。
* DSL 最好像平常的语言一样具有可读性。
* 尽管代码生成不是一项必需的工作,但它确实会大大提高工作效率。
* 虽然 DSL 被称为语言,但 DSL 不需要像 GPL 一样可以被执行,可执行性并不是 DSL 需要达到的目的。
* DSL 可以使用文本编辑器编写,但专门的 DSL 编辑器可以更轻松地完成 DSL 的语法和语义检查。
* DSL 不同于 GPLDSL 只能用于解决特定领域中有限范围内的问题。
* 不必动辄建立自己的 DSL可以首先尝试寻找已有的 DSL。例如 [DSLFIN][4] 这个网站就提供了很多金融方面的 DSL。在实在找不到合适的 DSL 的情况下,才需要建立自己的 DSL。
* DSL 最好像平常的语言一样具有可读性。
* 尽管代码生成不是一项必需的工作,但它确实会大大提高工作效率。
* 虽然 DSL 被称为语言,但 DSL 不需要像 GPL 一样可以被执行,可执行性并不是 DSL 需要达到的目的。
* DSL 可以使用文本编辑器编写,但专门的 DSL 编辑器可以更轻松地完成 DSL 的语法和语义检查。
如果你正在使用或将要使用 DSL欢迎在评论区留言。
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/2/domain-specific-languages
@ -118,7 +118,7 @@ via: https://opensource.com/article/20/2/domain-specific-languages
作者:[Girish Managoli][a]
选题:[lujun9972][b]
译者:[HankChow](https://github.com/HankChow)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -0,0 +1,113 @@
[#]: collector: (lujun9972)
[#]: translator: (wenwensnow)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-11990-1.html)
[#]: subject: (3 eBook readers for the Linux desktop)
[#]: via: (https://opensource.com/article/20/2/linux-ebook-readers)
[#]: author: (Scott Nesbitt https://opensource.com/users/scottnesbitt)
可在 Linux 桌面使用的 3 个电子书阅读器应用
======
> 任意一个开源电子书应用都能使你在大屏设备上的阅读体验得到提升。
![电脑浏览器阅读书籍界面][1]
我通常使用手机或 Kobo 阅读器阅读电子书,总是没有在大屏设备上阅读书籍那么爽。很多人经常在自己的笔记本或桌面电脑上阅读电子书,如果你有这种需求(或者你认为以后会遇到这种情况),我想向你介绍三种 Linux 桌面下的电子书阅读器。
### Bookworm书虫
[Bookworm][2] 意在成为一个“简洁、专注的电子书阅读器”。事实证明它也确实做到了。Bookworm 内置一系列基础功能,有人抱怨它太过*简单*,缺少*功能性*虽然这词显然有点指意不明。Bookworm 起到了应有的作用而没有无关的花哨功能。
该应用的界面整洁干净。
![Bookworm 电子书应用][3]
你可通过以下方式查看书籍:
* 空格键前往下一页
* 上下方向键按行移动
* 左右方向键跳转至前后章节
你也可以通过添加注释或书签跳转至特定页面。
![Bookworm 注释][4]
Bookworm 没有太多设置选项。你能调整书籍字体大小及间距开启双页模式或夜间模式。在应用中添加新文件夹后Bookworm 会自动扫描文件夹中的电子书。
![Bookworm 参数设置][5]
Bookworm 支持常用的电子书格式EPUB、PDF、MOBI、[FB2][6],你还能用它阅读 [CBR][7] 和 CBZ 格式的数字版漫画。我只在 Bookworm 上测试了前三种格式PDF 倒是能打开,但加载速度很慢,格式也很难看。
### Foliate
单从功能上来说,[Foliate][8] 确实比 Bookworm 强上一些。Foliate 不仅功能更强,它还有更多设置选项。这个功能多样、简单干净的应用满足了所有要求。
![Foliate 电子书应用][9]
在 Foliate 中可以通过空格、方向键、向上或向下翻页键浏览电子书,这里没什么特别的。
你还可以在书籍中添加注释、查找以及翻译字句、查询字词含义。如果你电脑上安装了智能语音应用, Foliate 还能将文本朗读出来。
![在 Foliate 中的注释文本][10]
Foliate 与 Bookworm 相比有更多自定义选项。你能在应用中修改字体类型及大小、行间距、电子书页边距,也可以调高或降低屏幕亮度,从应用内置的四个主题中选择一个等。
![Foliate 设置][11]
你可以在 Foliate 上阅读 EPUB、MOBI、AZW、AZW3 格式的电子书。如果你不了解,我可以提前告诉你,后三种格式是亚马逊 Kindle 阅读器上架的书籍的闭源格式。
### Calibre 电子书阅读器
这个[电子书阅读器][12]是 [Calibre][13] 电子书管理工具的一个组件,就像它的前代一样,电子书阅读器这部分并不是软件整体最棒的部分。
![电子书阅读器应用][14]
不过别被上面的话吓到,它也的确是个桌面电子书阅读器。
在 Calibre 电子书阅读器中,你可以通过方向键、向上/向下翻页键以及空格浏览书籍,还能在在线字典中查找词语含义,添加书签。这一阅读器没有注释功能,但内置的搜索引擎却很好用,你还能将书籍保存为 PDF 格式(虽然我不太明白你为什么要这么做)。
不过参数设置这里确是它出彩的地方,它的可选设置比 Bookworm 和 Foliate 加起来都多,从字体到文本布局,页面分割方式你都能改。除此之外,你还能自定义应用按键设置,将你喜欢的词典网站添加进来,方便阅读查找。
![电子书参数设置][15]
Calibre 电子书阅读器一个很有用的功能,就是把自行设置的 CSS 配置文件效果应用到电子书上。赘言一句CSS 是一种调整网页格式的方法(这类文件就是许多电子书的一个组成部分)。如果你是使用 CSS 的高手,你可以将自己的 CSS 文件复制粘贴到配置窗口的 “User stylesheet” 部分,这就是个性化的究极办法。
据开发者描述,这一电子书阅读器“能支持所有主流电子书格式”。如果你想知道具体支持格式是什么,[这是列表链接][16]。我测试了列表中的一小部分格式,没有发现问题。
### 留在最后的话
不管你只是单纯想找个电子书阅读器,还是有个更多复杂功能的应用,上文提到的三个选择都很不错,而且它们都能提升你在大屏设备上的阅读体验。
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/2/linux-ebook-readers
作者:[Scott Nesbitt][a]
选题:[lujun9972][b]
译者:[wenwensnow](https://github.com/wenwensnow)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/scottnesbitt
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/computer_browser_program_books_read.jpg?itok=iNMWe8Bu (Computer browser with books on the screen)
[2]: https://babluboy.github.io/bookworm/
[3]: https://opensource.com/sites/default/files/uploads/bookworm-reading.png (Bookworm e-book application)
[4]: https://opensource.com/sites/default/files/uploads/bookworm-annotations.png (Annotations in Bookworm)
[5]: https://opensource.com/sites/default/files/uploads/bookworm-preferences.png (Bookworm preferences)
[6]: https://en.wikipedia.org/wiki/FictionBook
[7]: https://en.wikipedia.org/wiki/Comic_book_archive
[8]: https://johnfactotum.github.io/foliate/
[9]: https://opensource.com/sites/default/files/uploads/foliate-reading.png (Foliate e-book application)
[10]: https://opensource.com/sites/default/files/uploads/foliate-annotation_0.png
[11]: https://opensource.com/sites/default/files/uploads/foliate-settings.png (Foliate settings)
[12]: https://calibre-ebook.com/about
[13]: https://opensourcemusings.com/managing-your-ebooks-with-calibre
[14]: https://opensource.com/sites/default/files/uploads/e-book_viewer-reading.png (E-book Viewer application)
[15]: https://opensource.com/sites/default/files/uploads/ebook-viewer-preferences.png (E-book Viewer preferences)
[16]: https://manual.calibre-ebook.com/faq.html#what-formats-does-calibre-support-conversion-to-from
[17]: https://opensourcemusings.com/three-ebook-readers-for-the-linux-desktop
[18]: https://creativecommons.org/licenses/by-sa/4.0/

View File

@ -0,0 +1,73 @@
[#]: collector: (lujun9972)
[#]: translator: (Morisun029)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12020-1.html)
[#]: subject: (7 tips for writing an effective technical resume)
[#]: via: (https://opensource.com/article/20/2/technical-resume-writing)
[#]: author: (Emily Brand https://opensource.com/users/emily-brand)
撰写有效的技术简历的 7 个技巧
======
> 遵循以下这些要点,把自己最好的一面呈现给潜在雇主。
![](https://img.linux.net.cn/data/attachment/album/202003/21/092248u2w2gz2aezre2ba2.jpg)
如果你是一名软件工程师或技术领域的经理,那么创建或更新简历可能是一项艰巨的任务。要考虑的重点是什么?应该怎么把控格式、内容以及求职目标或摘要?哪些工作经验相关?如何确保自动化招聘工具不会过滤掉你的简历?
在过去的七年中,作为一名招聘经理,我看到了各种各样的简历;尽管有些令人印象深刻,但还有很多人写的很糟糕。
在编写或更新简历时,请遵循以下七个简单原则。
### 1、概述
简历顶部的简短段落应简洁明了、目的明确,避免过度使用形容词和副词。诸如“令人印象深刻”、“广泛”和“卓越”之类的词,这些词不会增加你的招聘机会;相反,它们看起来和感觉上像是过度使用的填充词。 关于你的求职目标,问自己一个重要的问题:**它是否告诉招聘经理我正在寻找什么样的工作以及如何为他们提供价值?** 如果不是,请加强并简化它以回答该问题,或者将其完全排除在外。
### 2、工作经验
数字、数字、数字——重要的事情说三遍。用确凿的事实传达观点远比一般的陈述,例如“帮助构建、管理、交付许多对客户利润有贡献的项目”更能对你有帮助。你的表达中应包括统计数据,例如“直接影响了 5 个顶级银行的项目,这些项目将其上市时间缩短了 40你提交了多少行代码或管理了几个团队。数据比修饰语更能有效地展示你的能力和价值。
如果你经验不足,没有什么工作经验可展示,那些无关的经验,如暑期兼职工作,就不要写了。相反,将相关经验的细节以及你所学到的知识的详细信息写进简历,这些可以使你成为一个更好的候选人。
### 3、搜索术语和行话
随着技术在招聘过程中发挥如此巨大的作用,确保简历被标记为正确的职位非常重要,但不要在简历上过分吹嘘自己。如果你提到敏捷技能但不知道看板是什么,请三思。如果你提到自己精通 Java但是已经有五年都没有使用过 Java 了,请小心。如果存在你熟悉但不一定是当前在用的语言和框架,请创建其他类别或将你的经验分为“精通”和“熟悉”。
### 4、教育
如果你不是应届大学毕业生,那就没必要再写你的 GPA 或你参加过的俱乐部或兄弟会,除非你计划将它们用作谈话要点以在面试中赢得信任。确保将你发表的或获取过专利的东西包括在内,即使它与该工作无关。如果你没有大学学位,请添加一个证书部分代替教育背景部分。如果你是军人,请包括现役和预备役时间。
### 5、资质证书
除非你想重新进入之前离开的领域,否则不要写过期的证书,例如,如果你曾经是一名人事经理,而现在正寻求动手编程的工作。如果你拥有与该领域不再相关的认证,就不要写这些认证,因为这些可能会分散招聘者的注意力,使你的简历失去吸引力。利用你的 LinkedIn 个人资料为简历添加更多色彩,因为大多数人在面试之前都会阅读你的简历和 LinkedIn 个人资料。
### 6、拼写和语法
让其他人帮忙对你的简历校对一下。很多时候,我在简历中看到过拼写错误的单词,或者错误用词,如“他们的”、“他们是”、“那些”。这些可以避免和修复的错误会产生负面影响。理想情况下,你的简历应用主动语态,但是如果这样会使你感到不舒服,那么就用过去时书写 —— 最重要的是要始终保持一致。不正确的拼写和语法会传递你要么不是很在乎所申请的工作,要么没有足够注意细节。
### 7、格式
确保你的简历是最新的并且富有吸引力,这是留下良好第一印象的简便方法。确保格式一致,例如相同的页边距,相同的间距、大写字母和颜色(将调色板保持在最低限度,不要花花绿绿)是简历写作中最基本的部分,但有必要表明你对工作感到自豪,并重视自己的价值和未来的雇主。在适当的地方使用表格,以视觉吸引人的方式分配信息。如果支持的话,以 .pdf 和 .docx 格式上传简历,然后用 Google Docs 导出为 .odt 格式,这样可以在 LibreOffice 中轻松打开。这里有一个我推荐的简单的 Google 文档[简历模板][2]。 你还可以支付少量费用(不到 10 美元)从一些设计公司购买模板。
### 定期更新
如果你需要(或希望)申请一份工作,定期更新简历可以最大程度地减少压力,也可以帮助你创建和维护更准确的简历版本。撰写简历时,要有远见,确保至少让另外三个人对你的简历内容、拼写和语法进行检查。即使你是由公司招募或其他人推荐给公司的,面试官也可能只能通过简历来认识你,因此请确保它为你带来良好的第一印象。
你还有其他提示要添加吗?
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/2/technical-resume-writing
作者:[Emily Brand][a]
选题:[lujun9972][b]
译者:[Morisun029](https://github.com/Morisun029)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/emily-brand
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/resume_career_document_general.png?itok=JEaFL2XI (Two hands holding a resume with computer, clock, and desk chair )
[2]: https://docs.google.com/document/d/1ARVyybC5qQEiCzUOLElwAdPpKOK0Qf88srr682eHdCQ/edit

View File

@ -0,0 +1,140 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-11970-1.html)
[#]: subject: (Use logzero for simple logging in Python)
[#]: via: (https://opensource.com/article/20/2/logzero-python)
[#]: author: (Ben Nuttall https://opensource.com/users/bennuttall)
使用 logzero 在 Python 中进行简单日志记录
======
> 快速了解一个方便的日志库,来帮助你掌握这个重要的编程概念。
![](https://img.linux.net.cn/data/attachment/album/202003/07/122445v743hy7ajdyrrda1.jpg)
logzero 库使日志记录就像打印语句一样容易,是简单性的杰出代表。我不确定 logzero 的名称是否要与 pygame-zero、GPIO Zero 和 guizero 这样的 “zero 样板库”契合,但是肯定属于该类别。它是一个 Python 库,可以使日志记录变得简单明了。
你可以使用它基本的记录到标准输出的日志记录,就像你可以使用 print 来获得信息和调试一样,学习它的更高级日志记录(例如记录到文件)的学习曲线也很平滑。
首先,使用 pip 安装 logzero
```
$ sudo pip3 install logzero
```
在 Python 文件中,导入 logger 并尝试以下一个或所有日志实例:
```
from logzero import logger
logger.debug("hello")
logger.info("info")
logger.warning("warning")
logger.error("error")
```
输出以易于阅读的方式自动着色:
![Python, Raspberry Pi: import logger][2]
因此现在不要再使用 `print` 来了解发生了什么,而应使用有相关日志级别的日志器。
### 在 Python 中将日志写入文件
如果你阅读至此,并会在你写代码时做一点改变,这对我就足够了。如果你要了解更多,请继续阅读!
写到标准输出对于测试新程序不错,但是仅当你登录到运行脚本的计算机时才有用。在很多时候,你需要远程执行代码并在事后查看错误。这种情况下,记录到文件很有帮助。让我们尝试一下:
```
from logzero import logger, logfile
logfile('/home/pi/test.log')
```
现在,你的日志条目将记录到文件 `test.log` 中。记住确保[脚本有权限][3]写入该文件及其目录结构。
你也可以指定更多选项:
```
logfile('/home/pi/test.log', maxBytes=1e6, backupCount=3)
```
现在,当提供给 `test.log` 文件的数据达到 1MB10^6 字节)时,它将通过 `test.log.1`、`test.log.2` 等文件轮替写入。这种行为可以避免系统打开和关闭大量 I/O 密集的日志文件,以至于系统无法打开和关闭。更专业一点,你或许还要记录到 `/var/log`。假设你使用的是 Linux那么创建一个目录并将用户设为所有者以便可以写入该目录
```
$ sudo mkdir /var/log/test
$ sudo chown pi /var/log/test
```
然后在你的 Python 代码中,更改 `logfile` 路径:
```
logfile('/var/log/test/test.log', maxBytes=1e6, backupCount=3)
```
当要在 `logfile` 中捕获异常时,可以使用 `logging.exception`
```
try:
    c = a / b
except Exception as e:
    logger.exception(e)
```
这将输出(在 `b` 为零的情况下):
```
[E 190422 23:41:59 test:9] division by zero
     Traceback (most recent call last):
       File "test.py", line 7, in
         c = a / b
     ZeroDivisionError: division by zero
```
你会得到日志,还有完整回溯。另外,你可以使用 `logging.error` 并隐藏回溯:
```
try:
    c = a / b
except Exception as e:
    logger.error(f"{e.__class__.__name__}: {e}")
```
现在,将产生更简洁的结果:
```
[E 190423 00:04:16 test:9] ZeroDivisionError: division by zero
```
![Logging output][4]
你可以在 [logzero.readthedocs.io] [5] 中阅读更多选项。
### logzero 为教育而生
对于新手程序员来说,日志记录可能是一个具有挑战性的概念。大多数框架依赖于流控制和大量变量操作来生成有意义的日志,但是 logzero 不同。由于它的语法类似于 `print` 语句,因此它在教育上很成功,因为它无需解释其他概念。在你的下个项目中试试它。
此文章最初发布在[我的博客][6]上,经许可重新发布。
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/2/logzero-python
作者:[Ben Nuttall][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/bennuttall
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/getting_started_with_python.png?itok=MFEKm3gl (Snake charmer cartoon with a yellow snake and a blue snake)
[2]: https://opensource.com/sites/default/files/uploads/rpi_ben_1.png (Python, Raspberry Pi: import logger)
[3]: https://opensource.com/article/19/6/understanding-linux-permissions
[4]: https://opensource.com/sites/default/files/uploads/rpi_ben_2.png (Logging output)
[5]: https://logzero.readthedocs.io/en/latest/
[6]: https://tooling.bennuttall.com/logzero/

View File

@ -0,0 +1,157 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-11983-1.html)
[#]: subject: (Converting between uppercase and lowercase on the Linux command line)
[#]: via: (https://www.networkworld.com/article/3529409/converting-between-uppercase-and-lowercase-on-the-linux-command-line.html)
[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/)
在 Linux 命令行中转换大小写
======
> 转换文本的大小写可能非常繁琐尤其是当你要避免无意间的拼写错误时。幸运的是Linux 提供了一些命令,可以使工作变得非常容易。
![](https://img.linux.net.cn/data/attachment/album/202003/11/095821df7u8nlyfyyydqvf.jpg)
有很多方法可以在 Linux 命令行中将文本从小写更改为大写,反之亦然。实际上,有一组这样的命令可以选择。这篇文章检验了一些最佳的命令来完成这项工作,以及你该如何让它们正常工作。
### 使用 tr
`tr`translate命令是在命令行或脚本中最容易使用的命令之一。如果你要确定要一串大写字符串你只需将它传给 `tr`,如下所示:
```
$ echo Hello There | tr [:lower:] [:upper:]
HELLO THERE
```
下面是一个在脚本中使用这个命令的例子当你要确保添加到文件中的所有文本都使用大写形式以保持一致性时LCTT 译注:这里输入部门名称作为示例):
```
#!/bin/bash
echo -n "Enter department name: "
read dept
echo $dept | tr [:lower:] [:upper:] >> depts
```
将顺序切换为 `[:upper:] [:lower:]` 会产生相反的效果,将所有大写的部门名称都转换为小写:
```
echo $dept | tr [:upper:] [:lower:] >> depts
```
同样,你可以使用 `sed` 命令的 `A-Z``a-z` 字符串完成相同的操作:
```
echo $dept | tr a-z A-Z >> depts
```
毫无疑问,反转 `a-z``A-Z` 字符串的顺序将产生相反的效果,将文本全部变为小写。
### 使用 awk
`awk` 命令可让你使用它的 `toupper``tolower` 选项执行相同的操作。上例脚本中的命令可以用这种方式代替:
```
echo $dept | awk '{print toupper($0)}' >> depts
```
相反操作(切换为小写)如下所示:
```
echo $dept | awk '{print tolower($0)}' >> depts
```
### 使用 sed
`sed`stream editor命令也可用于切换大小写。它与上面显示的两个命令中的第一个具有相同的效果。
```
echo $dept | sed 's/[a-z]/\U&/g' >> depts
```
从大写字母切换到小写字母只需将行尾附近的 `U` 替换为 `L`
```
echo $dept | sed 's/[A-Z]/\L&/g' >> depts
```
### 操作文件中的文本
`awk``sed` 都能更改整个文件的文本大小写。因此,你发现你的老板需要所有部门名称的小写么?没问题。只需带上文件名运行以下命令:
```
$ awk '{print tolower($0)}' depts
finance
billing
bookkeeping
```
如果要覆盖 `depts` 文件,而不仅仅是以小写形式显示,则需要执行以下操作:
```
$ awk '{print tolower($0)}' depts > depts-
$ mv depts- depts
```
但是,使用 `sed` 进行更改,你可以避免最后一步,因为 `sed` 可以“原地”编辑文件,如下所示,文件完整,但文本全部小写:
```
$ sed 's/[A-Z]/\L&/g' depts
```
### 仅将首字母转换为大写
要仅将字符串中单词的首字母转换为大写,那么可以执行以下操作:
```
$ echo design \& engineering| sed -e "s/\b\(.\)/\u\1/g"
Design & Engineering
```
该命令将确保首字母大写,但不会更改其余字母。
### 确保只有首字母大写
当要更改文本以使只有首字母大写时,这更具挑战性。假设你正在处理一个工作人员姓名列表,并且希望以正常的“名 姓”方式对其格式化。
#### 使用 sed
你可以使用更复杂的 `sed` 命令来确保以下结果:
```
$ echo design \& ENGINEERING | sed 's/\b\([[:alpha:]]\)\([[:alpha:]]*\)\b/\u\1\L\2/g'
Design & Engineering
```
#### 使用 Python
如果你已安装 Python你可以运行这样的命令它还可以设置文本格式以便每个单词只有首字母大写并且它可能比上面显示的 `sed` 命令更易于解析:
```
$ echo -n "design & engineering" | python3 -c "import sys; print(sys.stdin.read().title())"
Design & Engineering
```
有多种方法可以在大小写之间更改文本格式。哪种方法效果最好取决于你要处理的是单个字符串还是整个文件,以及想要的最终结果。
--------------------------------------------------------------------------------
via: https://www.networkworld.com/article/3529409/converting-between-uppercase-and-lowercase-on-the-linux-command-line.html
作者:[Sandra Henry-Stocker][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.networkworld.com/author/Sandra-Henry_Stocker/
[b]: https://github.com/lujun9972
[1]:https://images.idgesg.net/images/article/2019/04/alphabetic_letters_characters_language_by_andybrandon50_cc_by-sa_2-0_1500x1000-100794409-large.jpg
[2]: https://creativecommons.org/licenses/by-sa/2.0/legalcode
[3]: https://www.networkworld.com/newsletters/signup.html
[4]: https://www.networkworld.com/article/3440100/take-the-intelligent-route-with-consumption-based-storage.html?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE21620&utm_content=sidebar ( Take the Intelligent Route with Consumption-Based Storage)
[5]: https://www.facebook.com/NetworkWorld/
[6]: https://www.linkedin.com/company/network-world

View File

@ -0,0 +1,104 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-11975-1.html)
[#]: subject: (How to Add New Brushes in GIMP [Quick Tip])
[#]: via: (https://itsfoss.com/add-brushes-gimp/)
[#]: author: (Community https://itsfoss.com/author/itsfoss/)
快速技巧:如何在 GIMP 中添加新画笔
======
[GIMP][1] 是最流行的自由开源的图像编辑器,它也许是 Linux 上最好的 [Adobe Photoshop 替代品][2]。
当你[在 Ubuntu 或其他任何操作系统上安装了 GIMP 后][3],你会发现已经安装了一些用于基本图像编辑的画笔。如果你需要更具体的画笔,你可以随时在 GIMP 中添加新画笔。
怎么样?让我在这个快速教程中向你展示。
### 如何在 GIMP 中添加画笔
![][4]
在 GIMP 中安装新画笔需要三个步骤:
* 获取新画笔
* 将其放入指定的文件夹中
* 刷新 GIMP 中的画笔
#### 步骤 1下载新的 GIMP 画笔
第一步是获取新的 GIMP 画笔。你从哪里获取?当然是从互联网上。
你可以在 Google 或[如 Duck Duck Go 这种隐私搜索引擎][5]来搜索 “GIMP brushes”并从网站下载一个你喜欢的。
GIMP 画笔通常以 .gbr 和 .gih 文件格式提供。.gbr 文件用于常规画笔,而 .gih 用于动画画笔。
> 你知道吗?
>
> 从 2.4 版本起GIMP 使安装和使用 Photoshop 画笔(.abr 文件)非常简单。你只需将 Photoshop 画笔文件放在正确的文件夹中。
>
> 请记住,最新的 Photoshop 画笔可能无法完美地在 GIMP 中使用。
#### 步骤 2将新画笔复制到它的位置
获取画笔文件后,下一步是复制该文件并将其粘贴到 GIMP 配置目录中所在的文件夹。
> 在微软 Windows 上,你必须进入类似 `C:\Documents and Settings\myusername.gimp-2.10\brushes` 这样的文件夹。
我将展示 Linux 上的详细步骤,因为我们是一个专注于 Linux 的网站。
选择画笔文件后,在家目录中按下 `Ctrl+h` [查看 Linux 中的隐藏文件][6]。
![Press Ctrl+H to see hidden files in the home directory][7]
你应该进入 `.config/GIMP/2.10/brushes` 文件夹(如果你使用的是 GIMP 2.10)。如果使用其他版本,那么应在 `.config/GIMP` 下看到相应文件夹。
![Adding New Brushes in GIMP][8]
将画笔文件粘贴到此文件夹中。可选地,你可以通过再次按 `Ctrl+h` 来隐藏隐藏的文件。
#### 步骤 3刷新画笔避免重启 GIMP
GIMP 将在启动时自动加载画笔。如果已在运行,并且不想关闭它,你可以刷新画笔。
在 GIMP 的主菜单中找到 “Windows->Dockable Dialogues->Brushes”。
![Refresh GIMP Brushes by going go to Windows->Dockable Dialogues-> Brushes][9]
在右侧栏的 Brushes 对话框中找到“refresh”图标。
![Refresh GIMP Brushes][10]
如果你的画笔没有出现,那么你可以试试重启 GIMP。
> 额外的技巧!
>
> 在 [GIMP 中添加新画笔还能让你轻松给图片添加水印][11]。只需将 logo 用作画笔,并点击一下就可添加到图片中。
我希望你喜欢这个快速 GIMP 技巧。敬请期待更多。
--------------------------------------------------------------------------------
via: https://itsfoss.com/add-brushes-gimp/
作者:[Community][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/itsfoss/
[b]: https://github.com/lujun9972
[1]: https://www.gimp.org/
[2]: https://itsfoss.com/open-source-photoshop-alternatives/
[3]: https://itsfoss.com/gimp-2-10-release/
[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/03/Install-New-Brushes-in-GIMP.jpg?ssl=1
[5]: https://itsfoss.com/privacy-search-engines/
[6]: https://itsfoss.com/hide-folders-and-show-hidden-files-in-ubuntu-beginner-trick/
[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/adding-brushes-GIMP-1.jpg?ssl=1
[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/adding-brushes-GIMP.png?ssl=1
[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/Refresh-GIMP-Brushes.jpg?ssl=1
[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/Refresh-GIMP-Brushes-2.jpg?ssl=1
[11]: https://itsfoss.com/add-watermark-gimp-linux/

View File

@ -0,0 +1,99 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-11971-1.html)
[#]: subject: (Install GNU Emacs on Windows)
[#]: via: (https://opensource.com/article/20/3/emacs-windows)
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
如何在 Windows 上安装 GNU Emacs
======
> 即使你的操作系统是闭源的,你仍然可以使用这个流行的开源文本编辑器。
![](https://img.linux.net.cn/data/attachment/album/202003/08/094942ihwcnsqojnup46wo.jpg)
GNU Emacs 是一个专为各种程序员设计的流行的文本编辑器。因为它是在 Unix 上开发的,并在 LinuxmacOS 中也有)上得到了广泛使用,所以人们有时没有意识到它也可用于微软 Windows 上。你也无需成为有经验的或专职的程序员即可使用 Emacs。只需单击几下就可以下载并安装 Emacs本文向你展示了如何进行。
你可以手动安装 Windows也可以使用包管理器安装例如 [Chocolatey][2]。
### 7-zip
如果还没在 Windows 中安装 7-zip那么就先安装它。[7-zip][3] 是一个开源的归档程序,能够创建和解压 ZIP、7z、TAR、XZ、BZIP2 和 GZIP以及更多文件。对于 Windows 用户来说,这是一个宝贵的工具。
安装 7-zip 后,在 Windows 资源管理器中浏览文件时,右键单击菜单中就有新的 7-zip 归档选项。
### Powershell 和 Chocolatey
要在 Windows 上使用 Chocolatey 安装 GNU Emacs
```
PS> choco install emacs-full
```
安装后,在 Powershell 中启动 Emacs
```
PS> emacs
```
![Emacs running on Windows][4]
### 下载适用于 Windows 的 GNU Emacs
要在 Windows 上手动安装 GNU Emacs你必须[下载 Emacs][5]。
![GNU Windows downloader][6]
它会打开连接到离你最近的服务器,并展示所有可用的 Emacs 版本。找到发行版本号最高的目录然后单击进入。Windows 有许多不同的 Emacs 构建,但是最通用的版本只是被命名为 `emacs-VERSION-ARCHITECTURE.zip`。`VERSION` 取决于你要下载的版本,而 `ARCHITECTURE` 取决于你使用的是 32 位还是 64 位计算机。大多数现代计算机都是 64 位的,但是如果你有疑问,可以下载 32 位版本,它可在两者上运行。
如果要下载 64 位计算机的 Emacs v26你应该点击 `emacs-26.2-x86_64.zip` 的链接。有较小的下载包(例如 “no-deps” 等),但是你必须熟悉如何从源码构建 Emacs知道它需要哪些库以及你的计算机上已经拥有哪些库。通常获取较大版本的 Emacs 最容易,因为它包含了在计算机上运行所需的一切。
### 解压 Emacs
接下来,解压下载的 ZIP 文件。要解压缩,请右键单击 Emacs ZIP 文件,然后从 7-zip 子菜单中选择 “Extract to Emacs-VERSION”。这是一个很大的压缩包因此解压可能需要一段时间但是完成后你将拥有一个新目录其中包含与 Emacs 一起分发的所有文件。例如,在此例中,下载了 `emacs-26.2-x86_64.zip`,因此解压后的目录为 `emacs-26.2-x86_64`
### 启动 Emacs
在 Emacs 目录中,找到 `bin` 目录。此文件夹存储随 Emacs 一起分发的所有二进制可执行文件EXE 文件)。双击 `emacs.exe` 文件启动应用。
![Emacs running on Windows][7]
你可以在桌面上创建 `emacs.exe` 的快捷方式,以便于访问。
### 学习 Emacs
Emacs 并不像传闻那样难用。它具有自己的传统和惯例,但是当你其中输入文本时,你可以像在记事本或者网站的文本框中那样使用它。
重要的区别是在你*编辑*输入的文本时。
但是,学习的唯一方法是开始使用它,因此,使 Emacs 成为完成简单任务的首选文本编辑器。当你通常打开记事本、Word 或 Evernote 或其他工具来做快速笔记或临时记录时,请启动 Emacs。
Emacs 以基于终端的应用而闻名,但它显然有 GUI因此请像使用其他程序一样经常使用它的 GUI。从菜单而不是使用键盘复制、剪切和粘贴paste或用 Emacs 的术语 “yank”然后从菜单或工具栏打开和保存文件。从头开始并根据应用本身来学习它而不是根据你以往对其他编辑器的经验就认为它应该是怎样。
- 下载[速查表][8]
感谢 Matthias Pfuetzner 和 Stephen Smoogen。
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/3/emacs-windows
作者:[Seth Kenlon][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/seth
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/windows_building_sky_scale.jpg?itok=mH6CAX29 (Tall building with windows)
[2]: https://github.com/chocolatey/choco
[3]: https://www.7-zip.org/
[4]: https://opensource.com/sites/default/files/uploads/windows-ps-choco-emacs.jpg (Emacs running on Windows)
[5]: https://www.gnu.org/software/emacs/download.html
[6]: https://opensource.com/sites/default/files/uploads/windows-emacs-download.jpg (GNU Windows downloader)
[7]: https://opensource.com/sites/default/files/uploads/windows-emacs.jpg (Emacs running on Windows)
[8]: https://opensource.com/downloads/emacs-cheat-sheet

View File

@ -0,0 +1,561 @@
[#]: collector: (lujun9972)
[#]: translator: (wxy)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-11977-1.html)
[#]: subject: (Getting started with the Rust package manager, Cargo)
[#]: via: (https://opensource.com/article/20/3/rust-cargo)
[#]: author: (Gaurav Kamathe https://opensource.com/users/gkamathe)
Rust 包管理器 Cargo 入门
======
> 了解 Rust 的软件包管理器和构建工具。
![](https://img.linux.net.cn/data/attachment/album/202003/09/104906tdl21k977t8999qt.jpg)
[Rust][2] 是一种现代编程语言,可提供高性能、可靠性和生产力。几年来,它一直被 StackOverflow 调查评为[最受欢迎的语言][3]。
除了是一种出色的编程语言之外Rust 还具有一个称为 Cargo 的构建系统和软件包管理器。Cargo 处理许多任务,例如构建代码、下载库或依赖项等等。这两者捆绑在一起,因此在安装 Rust 时会得到 Cargo。
### 安装 Rust 和 Cargo
在开始之前,你需要安装 Rust 和 Cargo。Rust 项目提供了一个可下载的脚本来处理安装。要获取该脚本,请打开浏览器以访问 [https://sh.rustup.rs][4] 并保存该文件。阅读该脚本以确保你对它的具体行为有所了解,然后再运行它:
```
$ sh ./rustup.rs
```
你也可以参考这个[安装 Rust][5] 的网页以获取更多信息。
安装 Rust 和 Cargo 之后,你必须<ruby>获取<rt>source</rt></ruby> `env` 文件中的配置:
```
$ source $HOME/.cargo/env
```
更好的办法是,将所需目录添加到 `PATH` 环境变量中:
```
export PATH=$PATH:~/.cargo/bin
```
如果你更喜欢使用软件包管理器(例如 Linux 上的 DNF 或 Apt请在发行版本的存储库中查找 Rust 和 Cargo 软件包,并进行相应的安装。 例如:
```
$ dnf install rust cargo
```
安装并设置它们后,请验证你拥有的 Rust 和 Cargo 版本:
```
$ rustc --version
rustc 1.41.0 (5e1a79984 2020-01-27)
$ cargo --version
cargo 1.41.0 (626f0f40e 2019-12-03)
```
### 手动构建和运行 Rust
从在屏幕上打印“Hello, world!”的简单程序开始。打开你喜欢的文本编辑器,然后键入以下程序:
```
$ cat hello.rs
fn main() {
    println!("Hello, world!");
}
```
以扩展名 `.rs` 保存文件,以将其标识为 Rust 源代码文件。
使用 Rust 编译器 `rustc` 编译程序:
```
$ rustc hello.rs
```
编译后,你将拥有一个与源程序同名的二进制文件:
```
$ ls -l
total 2592
-rwxr-xr-x. 1 user group 2647944 Feb 13 14:14 hello
-rw-r--r--. 1 user group      45 Feb 13 14:14 hello.rs
$
```
执行程序以验证其是否按预期运行:
```
$ ./hello
Hello, world!
```
这些步骤对于较小的程序或任何你想快速测试的东西就足够了。但是在进行涉及到多人的大型程序时Cargo 是前进的最佳之路。
### 使用 Cargo 创建新包
Cargo 是 Rust 的构建系统和包管理器。它可以帮助开发人员下载和管理依赖项,并帮助创建 Rust 包。在 Rust 社区中Rust 中的“包”通常被称为“crate”板条箱但是在本文中这两个词是可以互换的。请参阅 Rust 社区提供的 Cargo [FAQ][6] 来区分。
如果你需要有关 Cargo 命令行实用程序的任何帮助,请使用 `--help``-h` 命令行参数:
```
$ cargo help
```
要创建一个新的包,请使用关键字 `new`,跟上包名称。在这个例子中,使用 `hello_opensource` 作为新的包名称。运行该命令后,你将看到一条消息,确认 Cargo 已创建具有给定名称的二进制包:
```
$ cargo new hello_opensource
     Created binary (application) `hello_opensource` package
```
运行 `tree` 命令以查看目录结构,它会报告已创建了一些文件和目录。首先,它创建一个带有包名称的目录,并且在该目录内有一个存放你的源代码文件的 `src` 目录:
```
$ tree .
.
└── hello_opensource
    ├── Cargo.toml
    └── src
        └── main.rs
2 directories, 2 files
```
Cargo 不仅可以创建包,它也创建了一个简单的 “Hello, world” 程序。打开 `main.rs` 文件看看:
```
$ cat hello_opensource/src/main.rs
fn main() {
    println!("Hello, world!");
}
```
下一个要处理的文件是 `Cargo.toml`,这是你的包的配置文件。它包含有关包的信息,例如其名称、版本、作者信息和 Rust 版本信息。
程序通常依赖于外部库或依赖项来运行,这使你可以编写应用程序来执行不知道如何编码或不想花时间编码的任务。你所有的依赖项都将在此文件中列出。此时,你的新程序还没有任何依赖关系。打开 `Cargo.toml` 文件并查看其内容:
```
$ cat hello_opensource/Cargo.toml
[package]
name = "hello_opensource"
version = "0.1.0"
authors = ["user <user@mail.com>"]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
```
### 使用 Cargo 构建程序
到目前为止,一切都很顺利。现在你已经有了一个包,可构建一个二进制文件(也称为可执行文件)。在此之前,进入包目录:
```
$ cd hello_opensource/
```
你可以使用 Cargo 的 `build` 命令来构建包。注意消息说它正在“编译”你的程序:
```
$ cargo build
   Compiling hello_opensource v0.1.0 (/opensource/hello_opensource)
    Finished dev [unoptimized + debuginfo] target(s) in 0.38s
```
运行 `build` 命令后,检查项目目录发生了什么:
```
$ tree .
.
├── Cargo.lock
├── Cargo.toml
├── src
│   └── main.rs
└── target
    └── debug
        ├── build
        ├── deps
        │   ├── hello_opensource-147b8a0f466515dd
        │   └── hello_opensource-147b8a0f466515dd.d
        ├── examples
        ├── hello_opensource
        ├── hello_opensource.d
        └── incremental
            └── hello_opensource-3pouh4i8ttpvz
                ├── s-fkmhjmt8tj-x962ep-1hivstog8wvf
                │   ├── 1r37g6m45p8rx66m.o
                │   ├── 2469ykny0eqo592v.o
                │   ├── 2g5i2x8ie8zed30i.o
                │   ├── 2yrvd7azhgjog6zy.o
                │   ├── 3g9rrdr4hyk76jtd.o
                │   ├── dep-graph.bin
                │   ├── query-cache.bin
                │   ├── work-products.bin
                │   └── wqif2s56aj0qtct.o
                └── s-fkmhjmt8tj-x962ep.lock
9 directories, 17 files
```
哇!编译过程产生了许多中间文件。另外,你的二进制文件将以与软件包相同的名称保存在 `./target/debug` 目录中。
### 使用 Cargo 运行你的应用程序
现在你的二进制文件已经构建好了,使用 Cargo 的 `run` 命令运行它。如预期的那样,它将在屏幕上打印 `Hello, world!`
```
$ cargo run
    Finished dev [unoptimized + debuginfo] target(s) in 0.01s
     Running `target/debug/hello_opensource`
Hello, world!
```
或者,你可以直接运行二进制文件,该文件位于:
```
$ ls -l ./target/debug/hello_opensource
-rwxr-xr-x. 2 root root 2655552 Feb 13 14:19 ./target/debug/hello_opensource
```
如预期的那样,它产生相同的结果:
```
$ ./target/debug/hello_opensource
Hello, world!
```
假设你需要重建包并丢弃早期编译过程创建的所有二进制文件和中间文件。Cargo 提供了一个方便的`clean` 选项来删除所有中间文件,但源代码和其他必需文件除外:
```
$ cargo clean
$ tree .
.
├── Cargo.lock
├── Cargo.toml
└── src
    └── main.rs
1 directory, 3 files
```
对程序进行一些更改,然后再次运行以查看其工作方式。例如,下面这个较小的更改将 `Opensource` 添加到 `Hello, world!` 字符串中:
```
$ cat src/main.rs
fn main() {
    println!("Hello, Opensource world!");
}
```
现在,构建该程序并再次运行它。这次,你会在屏幕上看到 `Hello, Opensource world!`
```
$ cargo build
   Compiling hello_opensource v0.1.0 (/opensource/hello_opensource)
    Finished dev [unoptimized + debuginfo] target(s) in 0.39s
$ cargo run
    Finished dev [unoptimized + debuginfo] target(s) in 0.01s
     Running `target/debug/hello_opensource`
Hello, Opensource world!
```
### 使用 Cargo 添加依赖项
Cargo 允许你添加程序需要运行的依赖项。使用 Cargo 添加依赖项非常容易。每个 Rust 包都包含一个 `Cargo.toml` 文件,其中包含一个依赖关系列表(默认为空)。用你喜欢的文本编辑器打开该文件,找到 `[dependencies]` 部分,然后添加要包含在包中的库。例如,将 `rand` 库添加为依赖项:
```
$ cat Cargo.toml
[package]
name = "hello_opensource"
version = "0.1.0"
authors = ["test user <test@mail.com>"]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
rand = "0.3.14"
```
试试构建你的包,看看会发生什么。
```
$ cargo build
    Updating crates.io index
   Compiling libc v0.2.66
   Compiling rand v0.4.6
   Compiling rand v0.3.23
   Compiling hello_opensource v0.1.0 (/opensource/hello_opensource)
    Finished dev [unoptimized + debuginfo] target(s) in 4.48s
```
现在Cargo 会联系 [Crates.io][9](这是 Rust 用于存储 crate或包的中央仓库并下载和编译 `rand`。但是,等等 —— `libc` 包是怎么回事?你没有要安装 libc 啊。是的,`rand` 包依赖于 `libc`因此Cargo 也会下载并编译 `libc`
库的新版本会不断涌现,而 Cargo 提供了一种使用 `update` 命令更新其所有依赖关系的简便方法:
```
cargo update
```
你还可以选择使用 `-p` 标志跟上包名称来更新特定的库:
```
cargo update -p rand
```
### 使用单个命令进行编译和运行
到目前为止,每当对程序进行更改时,都先使用了 `build` 之后是 `run`。有一个更简单的方法:你可以直接使用 `run` 命令,该命令会在内部进行编译并运行该程序。要查看其工作原理,请首先清理你的软件包目录:
```
$ cargo clean
$ tree .
.
├── Cargo.lock
├── Cargo.toml
└── src
    └── main.rs
1 directory, 3 files
```
现在执行 `run`。输出信息表明它已进行编译,然后运行了该程序,这意味着你不需要每次都显式地运行 `build`
```
$ cargo run
   Compiling hello_opensource v0.1.0 (/opensource/hello_opensource)
    Finished dev [unoptimized + debuginfo] target(s) in 0.41s
     Running `target/debug/hello_opensource`
Hello, world!
```
### 在开发过程中检查代码
在开发程序时你经常会经历多次迭代。你需要确保你的程序没有编码错误并且可以正常编译。你不需要负担在每次编译时生成二进制文件的开销。Cargo 为你提供了一个 `check` 选项,该选项可以编译代码,但跳过了生成可执行文件的最后一步。首先在包目录中运行 `cargo clean`
```
$ tree .
.
├── Cargo.lock
├── Cargo.toml
└── src
    └── main.rs
1 directory, 3 files
```
现在运行 `check` 命令,查看对目录进行了哪些更改:
```
$ cargo check
    Checking hello_opensource v0.1.0 (/opensource/hello_opensource)
    Finished dev [unoptimized + debuginfo] target(s) in 0.18s
```
该输出显示,即使在编译过程中创建了中间文件,但没有创建最终的二进制文件或可执行文件。这样可以节省一些时间,如果该包包含了数千行代码,这非常重要:
```
$ tree .
.
├── Cargo.lock
├── Cargo.toml
├── src
│   └── main.rs
└── target
    └── debug
        ├── build
        ├── deps
        │   ├── hello_opensource-842d9a06b2b6a19b.d
        │   └── libhello_opensource-842d9a06b2b6a19b.rmeta
        ├── examples
        └── incremental
            └── hello_opensource-1m3f8arxhgo1u
                ├── s-fkmhw18fjk-542o8d-18nukzzq7hpxe
                │   ├── dep-graph.bin
                │   ├── query-cache.bin
                │   └── work-products.bin
                └── s-fkmhw18fjk-542o8d.lock
9 directories, 9 files
```
要查看你是否真的节省了时间,请对 `build``check` 命令进行计时并进行比较。首先,计时 `build` 命令:
```
$ time cargo build
   Compiling hello_opensource v0.1.0 (/opensource/hello_opensource)
    Finished dev [unoptimized + debuginfo] target(s) in 0.40s
real    0m0.416s
user    0m0.251s
sys     0m0.199s
```
在运行 `check` 命令之前清理目录:
```
$ cargo clean
```
计时 `check` 命令:
```
$ time cargo check
    Checking hello_opensource v0.1.0 (/opensource/hello_opensource)
    Finished dev [unoptimized + debuginfo] target(s) in 0.15s
real    0m0.166s
user    0m0.086s
sys     0m0.081s
```
显然,`check` 命令要快得多。
### 建立外部 Rust 包
到目前为止,你所做的这些都可以应用于你从互联网上获得的任何 Rust crate。你只需要下载或克隆存储库移至包文件夹然后运行 `build` 命令,就可以了:
```
git clone <github-like-url>
cd <package-folder>
cargo build
```
### 使用 Cargo 构建优化的 Rust 程序
到目前为止,你已经多次运行 `build`,但是你注意到它的输出了吗?不用担心,再次构建它并密切注意:
```
$ cargo build
   Compiling hello_opensource v0.1.0 (/opensource/hello_opensource)
    Finished dev [unoptimized + debuginfo] target(s) in 0.36s
```
看到了每次编译后的 `[unoptimized + debuginfo]` 文本了吗?这意味着 Cargo 生成的二进制文件包含大量调试信息,并且未针对执行进行优化。开发人员经常经历开发的多次迭代,并且需要此调试信息进行分析。同样,性能并不是开发软件时的近期目标。因此,对于现在而言是没问题的。
但是,一旦准备好发布软件,就不再需要这些调试信息。而是需要对其进行优化以获得最佳性能。在开发的最后阶段,可以将 `--release` 标志与 `build` 一起使用。仔细看,编译后,你应该会看到 `[optimized]` 文本:
```
$ cargo build --release
   Compiling hello_opensource v0.1.0 (/opensource/hello_opensource)
    Finished release [optimized] target(s) in 0.29s
```
如果愿意,你可以通过这种练习来了解运行优化软件与未优化软件时节省的时间。
### 使用 Cargo 创建库还是二进制文件
任何软件程序都可以粗略地分类为独立二进制文件或库。一个独立二进制文件也许即使是当做外部库使用的,自身也是可以运行的。但是,作为一个库,是可以被另一个独立二进制文件所利用的。到目前为止,你在本教程中构建的所有程序都是独立二进制文件,因为这是 Cargo 的默认设置。 要创建一个**库**,请添加 `--lib` 选项:
```
$ cargo new --lib libhello
     Created library `libhello` package
```
这次Cargo 不会创建 `main.rs` 文件,而是创建一个 `lib.rs` 文件。 你的库的代码应该是这样的:
```
$ tree .
.
└── libhello
    ├── Cargo.toml
    └── src
        └── lib.rs
2 directories, 2 files
```
Cargo 就是这样的不要奇怪它在你的新库文件中添加了一些代码。通过移至包目录并查看文件来查找添加的内容。默认情况下Cargo 在库文件中放置一个测试函数。
### 使用 Cargo 运行测试
Rust 为单元测试和集成测试提供了一流的支持,而 Cargo 允许你执行以下任何测试:
```
$ cd libhello/
$ cat src/lib.rs
#[cfg(test)]
mod tests {
    #[test]
    fn it_works() {
        assert_eq!(2 + 2, 4);
    }
}
```
Cargo 有一个方便的 `test` 命令,可以运行代码中存在的任何测试。尝试默认运行 Cargo 在库代码中放入的测试:
```
$ cargo test
   Compiling libhello v0.1.0 (/opensource/libhello)
    Finished test [unoptimized + debuginfo] target(s) in 0.55s
     Running target/debug/deps/libhello-d52e35bb47939653
running 1 test
test tests::it_works ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
   Doc-tests libhello
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
```
### 深入了解 Cargo 内部
你可能有兴趣了解在运行一个 Cargo 命令时它底下发生了什么。毕竟在许多方面Cargo 只是个封装器。要了解它在做什么,你可以将 `-v` 选项与任何 Cargo 命令一起使用,以将详细信息输出到屏幕。
这是使用 `-v` 选项运行 `build``clean` 的几个例子。
`build` 命令中,你可以看到这些给定的命令行选项触发了底层的 `rustc`Rust 编译器):
```
$ cargo build -v
   Compiling hello_opensource v0.1.0 (/opensource/hello_opensource)
     Running `rustc --edition=2018 --crate-name hello_opensource src/main.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=147b8a0f466515dd -C extra-filename=-147b8a0f466515dd --out-dir /opensource/hello_opensource/target/debug/deps -C incremental=/opensource/hello_opensource/target/debug/incremental -L dependency=/opensource/hello_opensource/target/debug/deps`
    Finished dev [unoptimized + debuginfo] target(s) in 0.36s
```
`clean` 命令表明它只是删除了包含中间文件和二进制文件的目录:
```
$ cargo clean -v
    Removing /opensource/hello_opensource/target
```
### 不要让你的技能生锈
要扩展你的技能,请尝试使用 Rust 和 Cargo 编写并运行一个稍微复杂的程序。很简单就可以做到:例如,尝试列出当前目录中的所有文件(可以用 9 行代码完成),或者尝试自己回显输入。小型的实践应用程序可帮助你熟悉语法以及编写和测试代码的过程。
本文为刚起步的 Rust 程序员提供了大量信息,以使他们可以开始入门 Cargo。但是当你开始处理更大、更复杂的程序时你需要对 Cargo 有更深入的了解。当你准备好迎接更多内容时,请下载并阅读 Rust 团队编写的开源的《[Cargo 手册][10]》,看看你可以创造什么!
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/3/rust-cargo
作者:[Gaurav Kamathe][a]
选题:[lujun9972][b]
译者:[wxy](https://github.com/wxy)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/gkamathe
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/bus-containers2.png?itok=idd8duC_ (Shipping containers stacked in a yard)
[2]: https://www.rust-lang.org/
[3]: https://insights.stackoverflow.com/survey/2019#technology-_-most-loved-dreaded-and-wanted-languages
[4]: https://sh.rustup.rs/
[5]: https://www.rust-lang.org/tools/install
[6]: https://doc.rust-lang.org/cargo/faq.html
[7]: mailto:user@mail.com
[8]: mailto:test@mail.com
[9]: http://crates.io
[10]: https://doc.rust-lang.org/cargo

View File

@ -0,0 +1,138 @@
[#]: collector: (lujun9972)
[#]: translator: (HankChow)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-11982-1.html)
[#]: subject: (Session: An Open Source Private Messenger That Doesnt Need Your Phone Number)
[#]: via: (https://itsfoss.com/session-messenger/)
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
Session一款不需要电话号码的开源通信应用
======
Signal 作为一款私人通信应用,正在变得愈发流行。而我们下面要介绍开源应用 Session 则是 Signal 的一个<ruby>复刻<rt>fork</rt></ruby>,它的一大亮点是并不需要提供手机号码即可以开始使用。
### Session一款真正意义上的私人通信应用
![][1]
对于私人通信服务来说,有没有既能保护通信安全性,又尊重用户跨平台隐私的集大成者呢?很多注重个人隐私的用户似乎都在寻找这个问题的答案。
最近,我留意到 [Loki 基金会][3]开发的一款叫做 [Session][2] 的开源通信应用。从技术上来说Session 是另一款[开源、加密的通信应用 Signal][4] 的一个复刻。
在本文中,我会讲述我自己使用 Session 的体验,以及 Session 的一些主要功能。
Session 在这个领域中算是一款比较新的应用了,因此我还会在文章的最后提到它的一些不足之处。
### Session 的一些主要功能
接下来我会重点介绍 Session 的主要功能,可以供你参考这款应用是否值得使用。
#### Session 的使用过程中不需要提供手机号码
![][5]
在 Signal 或者其它类似的通信应用中,用户都需要提供手机号码才得以成功注册。注重隐私的用户们都认为这样的做法会潜藏着巨大的安全隐患。
而使用 Session 则简单得多。在 PC 或手机上安装应用之后,只需要点击“<ruby>创建账号<rt>Create Account</rt></ruby>”,无须提供手机号码,它就会生成一个类似 05652245af9a8bfee4f5a8138fd5c..... 这样的随机且唯一的 Session ID。
此后,把 Session ID 分享给想要添加的联系人就可以了。Session 还支持二维码,其他人可以通过扫描二维码添加你的 Session ID 为好友。
#### Session 使用了区块链等加密技术
![Session ID][6]
对[区块链][7]有所了解的用户都很期待区块链能为普罗大众做出什么有实际意义的应用,而 Session 可以算得上其中一个。尽管 Session 的核心是基于区块链的,但普通用户在使用时并不需要真正弄懂区块链。
如果你好奇它的工作原理,可以参考这篇[官方的博客文章][8],里面有相关的解释。
#### 跨平台支持
![][9]
这样严格保护隐私的应用,是否能在不同平台上使用?
答案是肯定的。首先,它支持 Linux 和 Android 平台,同时也支持 Windows/Mac/iOS 平台。因此跨平台、跨设备的消息同步是没有问题的。
#### 包含基本隐私选项
![][10]
毫无疑问,基本的隐私功能是必须有的,这是作为一个以安全为卖点的应用所必备的体验。
最基本的选项包括:
* **消息有效期**:你可以控制一条消息在接收者阅读前的保留时长
* **已读回执**:消息发送者可以知晓你已经阅读该消息
#### Session 使用去中心化网络保护你的元数据
尽管 Session 不使用<ruby>端对端<rt>peer-to-peer</rt></ruby>技术,但它也不使用中心化的服务器。
Session 采用了去中心化的架构实现消息的传输和路由。如果你不熟悉这方面的内容,可以关注 Session 的官方博客,尝试了解[中心化网络和去中心化网络的区别][11],以及它的实际工作原理。
同时,这样的网络架构还有助于保护诸如与 IP 地址相关的信息等元数据。
#### 其它功能
除了专注于隐私之外Session 也支持群聊、语音消息、发送附件等通信应用的基本功能。
### 在 Linux 上安装 Session
在[官方下载页面][12]中可以下载到对应的 .AppImage 文件。如果你不了解这个文件的使用方法,可以查阅我们的[相关文章][13]。
另外,你也可以在它的 [Github 发布页面][14] 获取到对应的 .deb 安装文件。
- [下载 Session][12]
### 我使用 Session 的体验
我在各种平台上都试用过 Session其中在 PC 上我使用了 Pop!\_OS 19.10 的 .AppImage 文件运行这个应用。
总的来说,使用的体验很不错,用户界面也没有出现问题。
在设置中备份了密码(也称为<ruby>种子<rt>seed</rt></ruby>)后,可以很方便地恢复账号。
![][15]
当然,我也发现了一些需要改进的地方:
* 在接受好友请求时会出现延迟
* 设备间连接的方式不太直观
* 当你在不同的设备上使用同一个 Session ID 向同一个人回复消息时,对方会收到两个不同的对话
### 总结
当然,最完美的事物是不存在的。我也会一直使用 Session 并考虑它发展的方向,这是一个注重隐私的用户应该做的事情。
欢迎在评论区发表你的看法。
--------------------------------------------------------------------------------
via: https://itsfoss.com/session-messenger/
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[HankChow](https://github.com/HankChow)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/02/session-app.jpg?ssl=1
[2]: https://getsession.org/
[3]: https://loki.foundation/
[4]: https://linux.cn/article-11764-1.html
[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/02/session-create.jpg?ssl=1
[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/03/session-application-id.jpg?ssl=1
[7]: https://en.wikipedia.org/wiki/Blockchain
[8]: https://getsession.org/how-session-protects-your-anonymity-with-blockchain-and-crypto/
[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/02/session-cross-platform.jpg?ssl=1
[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/02/session-settings.jpg?fit=800%2C512&ssl=1
[11]: https://getsession.org/centralisation-vs-decentralisation-in-private-messaging/
[12]: https://getsession.org/download/
[13]: https://itsfoss.com/use-appimage-linux/
[14]: https://github.com/loki-project/session-desktop/releases
[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/02/session-seed.jpg?ssl=1

View File

@ -0,0 +1,131 @@
[#]: collector: (lujun9972)
[#]: translator: (wxy)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-11972-1.html)
[#]: subject: (Drauger OS Linux Aims to Bring Console Gaming Experience on the Desktop)
[#]: via: (https://itsfoss.com/drauger-os/)
[#]: author: (John Paul https://itsfoss.com/author/john/)
Drauger OS Linux 旨在为台式机带来主机游戏体验
======
多年来(或数十年),人们抱怨不[使用Linux][1] 的原因之一是它缺乏主流游戏。[Linux 上的游戏][2]在最近几年有了显著改进,特别是 [Steam Proton][3] 项目的引入使你可以[在 Linux 上玩很多 Windows 专用的游戏][4]。
这也鼓励了一些[以游戏为中心的 Linux发行版][5]。以 [Lakka][6] 为例,你可以[借助 Lakka Linux 将旧计算机变成复古的街机游戏机][7]。
另一个以游戏为中心的 Linux 发行版是 [Draguer OS][8],我们今天将对其进行研究。
### Drauger OS
根据[该项目的网站][9]“Drauger OS 是 Linux 桌面游戏操作系统。它旨在为游戏玩家提供一个平台,使他们可以在不牺牲安全性的情况下获得出色的性能。此外,它旨在使任何人都可以轻松玩游戏,无论他们使用键盘和鼠标还是某种控制器。”
他们强调 Drauger OS 并非供日常使用。因此,大多数其他发行版附带的许多生产力工具都不在 Drauger OS 中。
![Drauger OS 7.4.1][10]
Drauger OS [基于][9] Ubuntu 之上。当前版本7.4.1 Jiangshi使用 “[Liquorix][11] 低延迟Linux 内核,这是一种预编译的 ZEN 内核,设计时考虑了延迟和吞吐量之间的平衡”。但是,这将在下一版本中更改。他们只有一个桌面环境可供选择,即一个修改版本的 [Xfce][12]。
Drauger OS 开箱即用地安装了多个应用程序和工具,以改善游戏体验。这些包括:
* [PlayOnLinux][13]
* WINE
* [Lutris][14]
* Steam
* [DXVK][15]
它还具有一组与游戏无关的有趣工具。[Drauger 安装器][16]是 .deb 安装程序,是 Gdebi 的替代品。[多软件库应用安装器][17]mrai是“用于基于 Debian 的 Linux 操作系统的类似于 AUR-helper 的脚本”。Mrai 旨在与 apt、snap、flatpaks 配合使用,并且可以从 GitHub 安装应用程序。
有趣的是Drauger OS 的名称是一个错误。开发负责人 [Thomas Castleman][18](即 batcastle曾打算为其发行版命名为 Draugr但是却打错了名字。在 Drauger OS 播客的[第 23 集][19]中Castleman 说会保留这个拼写错误的名称,因为要对其进行更正需要大量工作。根据 [Wikipedia][20] 的描述Draugr 是“来自北欧神话中的不死生物”。
是的你没看错。Drauger OS 是仅有的几个具有自己的[播客][21]的发行版之一。当被问到这个问题时Castleman 告诉我:“无论他们的情况如何,我都希望确保我们的社区拥有最大的透明度。”多数情况下,播客是 Drauger OS 博客的音频版本,但有时他们会在没有时间撰写博客文章时使用它来发布公告。
### Drauger OS 的未来
![Drauger OS][22]
Druager OS 背后的开发人员正在开发其下一个主要版本7.5.1。此版本将基于 Ubuntu 19.10。将有三个主要变化。首先,将使用“我们内部构建的内核” [替换][23] Liquorix 内核。该内核将基于 Linux 内核 GitHub 存储库,“因此,它会变得越来越原汁原味”。
新版本的第二个主要变化将是为其桌面提供新布局。根据用户的反馈,他们决定将其更改为看起来更类似于 GNOME 的样子。
第三,他们放弃了 SystemBack 作为其备份工具和安装程序。相反,他们从头开始编写了新的[安装程序][24]。
开发团队也正在研究 Drauger OS 的 [ARM 版本][25]。他们希望在 2022 年的某个时候发布它。
### 系统要求
Drauger OS [系统要求][25]非常适中。请记住Drauger OS 仅在 64 位系统上运行。
#### 最低系统要求
* CPU双核、1.8GHz、64 位处理器
* RAM1 GB
* 储存空间16 GB
* 图形处理器:集成
* 屏幕分辨率60Hz 时为 1024×768
* 外部端口1 个用于显示的端口HDMI/DisplayPort/VGA/DVI2 个用于安装 USB 驱动器和键盘的 USB 端口(鼠标可选,但建议使用)
#### 推荐系统要求
* CPU四核、2.2Ghz、64 位处理器
* RAM4 GB
* 储存空间128 GB
* 图形处理器NVIDIA GTX 1050、AMD RX 460 或同等显卡
* 屏幕分辨率60Hz 时为 1080p
* 外部端口1 个用于显示的端口HDMI/DisplayPort/VGA/DVI3 个用于安装 USB 驱动器、键盘和鼠标的 USB 端口1 个音频输出端口
### 如何为Drauger OS提供帮助
如果你有兴趣,可以通过多种方法来帮助 Drauger OS。他们一直在寻找[财政支持][26]以保持发展。
如果你想贡献代码,他们正在寻找具有 BASH、C++ 和 Python 经验的人员。他们所有的代码都在 [GitHub][27] 上。你也可以在社交媒体上[联系][28]他们。
### 结语
Drauger OS 只是这类项目之一。我还见过其他[面向游戏的发行版][29],但 Drauger OS 在专注于游戏方面一心一意。由于我更喜欢休闲游戏,因此该发行版对我个人而言并不具有吸引力。但是,我可以看到它如何吸引游戏爱好者使用 Linux。祝他们在以后的发行中好运。
你对这个仅限于游戏的发行版有何想法?你最喜欢的 Linux 游戏解决方案是什么?请在下面的评论中告诉我们。
--------------------------------------------------------------------------------
via: https://itsfoss.com/drauger-os/
作者:[John Paul][a]
选题:[lujun9972][b]
译者:[wxy](https://github.com/wxy)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/john/
[b]: https://github.com/lujun9972
[1]: https://itsfoss.com/why-use-linux/
[2]: https://linux.cn/article-7316-1.html
[3]: https://linux.cn/article-10054-1.html
[4]: https://itsfoss.com/steam-play/
[5]: https://itsfoss.com/linux-gaming-distributions/
[6]: http://www.lakka.tv/
[7]: https://itsfoss.com/lakka-retrogaming-linux/
[8]: https://draugeros.org/go/
[9]: https://www.draugeros.org/go/about/
[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/02/drauger-os-7.4.1.jpg?ssl=1
[11]: https://liquorix.net/
[12]: https://www.xfce.org/
[13]: https://www.playonlinux.com/en/
[14]: https://lutris.net/
[15]: https://github.com/doitsujin/dxvk
[16]: https://github.com/drauger-os-development/drauger-installer
[17]: https://github.com/drauger-os-development/mrai
[18]: https://github.com/Batcastle
[19]: https://anchor.fm/drauger-os/episodes/Episode-23-eapu47
[20]: https://en.wikipedia.org/wiki/Draugr
[21]: https://anchor.fm/drauger-os
[22]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/02/drauger-os-7.5.1.png?ssl=1
[23]: https://www.draugeros.org/go/2020/01/20/major-changes-in-drauger-os-7-5-1/
[24]: https://github.com/drauger-os-development/system-installer
[25]: https://www.draugeros.org/go/system-requirements/
[26]: https://www.draugeros.org/go/contribute/
[27]: https://github.com/drauger-os-development
[28]: https://www.draugeros.org/go/contact-us/
[29]: https://itsfoss.com/manjaro-gaming-linux/
[30]: https://reddit.com/r/linuxusersgroup

View File

@ -0,0 +1,216 @@
[#]: collector: (lujun9972)
[#]: translator: (qianmingtian)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-11987-1.html)
[#]: subject: (Install and Use Wireshark on Ubuntu Linux)
[#]: via: (https://itsfoss.com/install-wireshark-ubuntu/)
[#]: author: (Community https://itsfoss.com/author/itsfoss/)
Ubuntu 上 Wireshark 的安装与使用
======
> 在本教程中,你将学习如何在 Ubuntu 和其它基于 Ubuntu 的发行版上安装最新的 Wireshark。同时你也将学习如何在没有 sudo 的情况下来运行 Wireshark以及如何设置它来进行数据包嗅探。
[Wireshark][1] 是一款自由开源的网络协议分析器,它在全球被广泛使用。
通过使用 Wireshark你可以实时捕获网络的传入和传出数据包并将其用于网络故障排除、数据包分析、软件和通信协议开发等。
它适用于所有主流的桌面操作系统,如 Windows、Linux、macOS、BSD 等。
在本教程中,我将指导你在 Ubuntu 和其他基于 Ubuntu 的发行版上安装 Wireshark 。我还将介绍如何设置和配置 Wireshark 来捕获数据包。
### 在基于 Ubuntu 的 Linux 发行版上安装 Wireshark
![][2]
Wireshark 适用于所有主流 Linux 发行版。你应该查看[官方安装说明][3]。因为在本教程中,我将着重在仅基于 Ubuntu 的发行版上安装最新版本的 Wireshark 。
Wireshark 可以在 Ubuntu 的 Universe 存储库中找到。你可以[启用 universe 存储库][4],然后按如下方式安装:
```
sudo add-apt-repository universe
sudo apt install wireshark
```
这种方法的一个小问题是,你可能并不总是得到最新版本的 Wireshark 。
例如,在 Ubuntu 18.04 中,如果你使用 [apt][5] 命令检查 Wireshark 的可用版本,可用版本会显示是 2.6 。
```
abhishek@nuc:~$ apt show wireshark
Package: wireshark
Version: 2.6.10-1~ubuntu18.04.0
Priority: optional
Section: universe/net
Origin: Ubuntu
Maintainer: Balint Reczey <rbalint@ubuntu.com>
```
然而, [Wireshark 3.2 稳定版][6]已经在几个月前发布了。当然,新版本拥有新的特性。
那么在这种情况下,你应该怎么办呢?谢天谢地, Wireshark 开发者提供了一种官方 PPA 方式,你可以使用它在 Ubuntu 和其它基于 Ubuntu 的发行版上安装最新稳定版本的 Wireshark.
我希望你熟悉 PPA。如果没有请[阅读我们关于 PPA 的优秀指南,以便完全理解它][7]。
打开终端并逐个使用以下命令:
```
sudo add-apt-repository ppa:wireshark-dev/stable
sudo apt update
sudo apt install wireshark
```
即使安装了旧版本的 Wireshark ,它也将更新为新版本。
安装时系统将询问你是否允许非超级用户捕获数据包。选择“Yes”允许选择“No”限制非超级用户捕获数据包最后完成安装。
### 不使用 sudo 运行 Wireshark
如果在上一次安装中选择了“No”则以 root 用户身份运行以下命令:
```
sudo dpkg-reconfigure wireshark-common
```
然后按 `tab` 键并使用回车键选择“No”
![][8]
由于你允许非超级用户捕获数据包,因此你必须将该用户添加到 `wireshark` 组。使用 [usermod][9] 命令将自己添加到 `wireshark` 组。
```
sudo usermod -aG wireshark $(whoami)
```
最后,[重启你的 Ubuntu 系统][10]对你的系统进行必要的修改。
> 冷知识
>
> Wireshark 于 1998 年首次发布,最初被称为 Ethereal 。2006 年,由于商标问题,开发商不得不将其名称改为 Wireshark 。
### 启动 Wireshark
你可以从应用程序启动器或者命令行启动 Wireshark 应用。
如果从命令行启动,只需要在你的控制台中输入 `wireshark`
```
wireshark
```
要是从**图形化界面**启动,需要在搜索栏搜索 Wireshark 应用,并按回车键。
![][11]
现在,让我们来玩玩 Wireshark 吧。
### 使用 Wireshark 捕获数据包
当你启动 Wireshark 的时候,你会看到一个接口列表,你可以使用它来捕获这个接口接收和发送的数据包。
你可以使用 Wireshark 监视许多类型的接口,例如,有线、外部设备等。根据你的偏好,你可以从下图中的标记区域选择在欢迎屏幕中显示特定类型的接口。
![Select interface][12]
例如,我只列出了**有线**网络接口。
![][13]
接下来,要开始捕获数据包,你必须选择接口(在我的示例中是 `ens33` 然后单击“Start capturing packets”图标如下图所示。
![Start capturing packets with Wireshark][14]
你还可以同时从多个接口捕获数据包。只需按住 `CTRL` 按钮同时单击要捕获的接口然后点击“Start capturing packets”图标如下图所示。
![][15]
接下来,我尝试在终端中使用 `ping google.com` 命令,如你所见,捕获了许多数据包。
![Captured packets][16]
现在你可以选择任何数据包来检查该特定数据包。在点击一个特定的包之后,你可以看到与它相关的 TCP/IP 协议的不同层的信息。
![Packet info][17]
你还可以在底部看到该特定数据包的原始数据,如下图所示。
![Check RAW data in the captured packets][18]
> 这就是为什么端到端加密很重要。
>
> 假设你正在登录一个不使用 HTTPS 的网站。与你在同一网络上的任何人都可以嗅探数据包,并在原始数据中看到用户名和密码。
>
> 这就是为什么现在大多数聊天应用程序使用端到端加密,而大多数网站使用 https (而不是 http
#### 在 Wireshark 中停止数据包捕获
你可以点击如图所示的红色图标停止捕获数据包。
![Stop packet capture in Wireshark][19]
#### 将捕获的数据包保存成文件
你可以单击下图中标记的图标,将捕获的数据包保存到文件中以备将来使用。
![Save captured packets by Wireshark][20]
**注意**:输出可以导出为 XML、PostScript、CSV 或纯文本。
接下来选择一个目标文件夹键入文件名并单击“Save”。
然后选择文件并单击“Open”。
![][21]
现在你可以随时打开和分析保存的数据包。要打开文件,请按 `\+o`,或从 Wireshark 转到 “File > Open”。
捕获的数据包将从文件中加载。
![][22]
### 结语
Wireshark 支持许多不同的通信协议。有许多选项和功能,使你能够以独特的方式捕获和分析网络数据包。你可以从 Wireshark 的[官方文档][23]了解更多关于 Wireshark 的信息。
我希望这个教程能帮助你在 Ubuntu 上安装 Wireshark 。请让我知道你的问题和建议。
--------------------------------------------------------------------------------
via: https://itsfoss.com/install-wireshark-ubuntu/
作者:[Kushal Rai][a]
选题:[lujun9972][b]
译者:[qianmingtian][c]
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/itsfoss/
[b]: https://github.com/lujun9972
[c]: https://github.com/qianmingtian
[1]: https://www.wireshark.org/
[2]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/wireshark_ubuntu.png?ssl=1
[3]: https://www.wireshark.org/docs/wsug_html_chunked/ChBuildInstallUnixInstallBins.html
[4]: https://itsfoss.com/ubuntu-repositories/
[5]: https://itsfoss.com/apt-command-guide/
[6]: https://www.wireshark.org/news/20191218.html
[7]: https://itsfoss.com/ppa-guide/
[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/03/yes.png?ssl=1
[9]: https://linuxhandbook.com/usermod-command/
[10]: https://itsfoss.com/schedule-shutdown-ubuntu/
[11]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/03/wire.png?ssl=1
[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/interfaces.jpg?ssl=1
[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/intoption.jpg?ssl=1
[14]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/03/singleinterface.jpg?ssl=1
[15]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/selint.jpg?ssl=1
[16]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/03/capture.jpg?ssl=1
[17]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/03/packetinfo.png?ssl=1
[18]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/03/raw.png?ssl=1
[19]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/03/stopcapture.png?ssl=1
[20]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/03/savepackets.jpg?ssl=1
[21]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/savename.jpg?ssl=1
[22]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/openpacket.png?ssl=1
[23]: https://www.wireshark.org/docs/https://www.wireshark.org/docs/
[24]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/03/kushal_rai.jpg?ssl=1

View File

@ -0,0 +1,143 @@
[#]: collector: (lujun9972)
[#]: translator: (linusboyle)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12023-1.html)
[#]: subject: (Communicating with other users on the Linux command line)
[#]: via: (https://www.networkworld.com/article/3530343/communicating-with-other-users-on-the-linux-command-line.html)
[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/)
使用 Linux 命令行与其他用户进行通信
======
![](https://img.linux.net.cn/data/attachment/album/202003/22/171055z3q772v2zq320zx3.jpg)
使用 Linux 命令行向其他用户发送消息或许非常容易,这里有一些相关的命令你可以考虑使用。在这篇文章中,我们会考察 4 个这样的命令,看看它们是怎么工作的。
### wall
`wall`“Write ALL” 的简称)命令允许你向所有系统中已登录的用户发送一条信息。这里我们假设用户都使用命令行在同一台服务器上工作。虽然 `wall` 命令最常被系统管理员用于向用户发布公告和传递信息(比如说,服务器即将因维护而关闭),但它可以被任何用户使用。
系统管理员可能会用类似下面的方式发送信息:
```
$ wall The system will be going down in 15 minutes to address a serious problem
```
而所有登录的用户都将看到类似这样的信息:
```
Broadcast message from admin@dragonfly (pts/0) (Thu Mar 5 08:56:42 2020):
The system is going down in 15 minutes to address a serious problem
```
如果希望在消息中使用单引号,你可以像这样将信息用双引号括起来:
```
$ wall "Don't forget to save your work before logging off"
```
最外层的双引号不会出现在发出的消息中,但是如果没有它们,`wall` 会停下并等待输入一个配对的单引号。
### mesg
如果出于某种理由你不想接收来自另一个用户的消息,你可以使用 `mesg` 命令来屏蔽这些消息。这个命令可以接受一个 `n` 作为参数来拒绝某用户的消息,或者接收一个 `y` 作为参数来接收用户发来的消息。
```
$ mesg n doug
$ mesg y doug
```
被屏蔽的用户不会被告知这一事实。你也可以像这样使用 `mesg` 来屏蔽或者接收所有消息:
```
$ mesg y
$ mesg n
```
### write
另一个在不使用电子邮件的情况下发送文本的命令是 `write`,这个命令可以用来和一个特定的用户通信。
```
$ write nemo
Are you still at your desk?
I need to talk with you right away.
^C
```
输入你的信息后用 `ctrl-c` 退出,这样就完成了通信。这个命令允许你发送文本,但并不会建立一个双向的通话。它只是将文本发送过去而已。如果目标用户在多个终端上登录,你可以指定你想将消息发送到哪一个终端,否则系统会选择空闲时间最短的那个终端。
```
$ write nemo#1
```
如果你试图向一个将消息屏蔽了的用户发送信息,你应该会看到这样的输出:
```
$ write nemo
write: nemo has messages disabled
```
### talk/ytalk
`talk``ytalk` 命令让你可以和一个或多个用户进行交互式的聊天。它们会展示一个有上下两个子窗口的界面,每个用户向显示在他们屏幕上方的窗口内输入内容,并在下方的窗口看到回复信息。要回复一个`talk` 请求,接收方可以输入 `talk`,在后面加上请求方的用户名。
```
Message from Talk_Daemon@dragonfly at 10:10 ...
talk: connection requested by dory@127.0.0.1.
talk: respond with: talk dory@127.0.0.1
$ talk dory
```
如果使用的是 `ytalk`,那么窗口中可以包含多于两个参与者。正如下面的例子所展示的(这是上面 `talk dory` 命令的结果),`talk` 通常指向 `ytalk`
```
----------------------------= YTalk version 3.3.0 =--------------------------
Is the report ready?
-------------------------------= nemo@dragonfly =----------------------------
Just finished it
```
如上所述,在通话的另一侧,`talk`会话界面的窗口是相反的:
```
----------------------------= YTalk version 3.3.0 =--------------------------
Just finished it
-------------------------------= dory@dragonfly =----------------------------
Is the report ready?
```
同样的,使用 `ctrl-c` 来退出。
如果要和非本机的用户通讯,你需要加上 `-h` 选项和目标主机名或IP地址就像这样
```
$ talk -h 192.168.0.11 nemo
```
### 总结
Linux 上有若干基本的命令可以用来向其他登录的用户发送消息。如果你需要向所有用户快速发送信息或是需要便捷的电话替代品,又或是希望能简单地开始一个多用户快速通讯会话,这些命令会十分实用。
一些命令如 `wall` 允许广播消息但却不是交互式的。另外的一些命令如 `talk` 允许多用户进行长时间通讯,当你只需要非常快速地交换一些信息,它们可以你你避免建立一个电话会议。
--------------------------------------------------------------------------------
via: https://www.networkworld.com/article/3530343/communicating-with-other-users-on-the-linux-command-line.html
作者:[Sandra Henry-Stocker][a]
选题:[lujun9972][b]
译者:[linusboyle](https://github.com/linusboyle)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.networkworld.com/author/Sandra-Henry_Stocker/
[b]: https://github.com/lujun9972
[1]: https://www.networkworld.com/article/3440100/take-the-intelligent-route-with-consumption-based-storage.html?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE21620&utm_content=sidebar ( Take the Intelligent Route with Consumption-Based Storage)
[2]: https://www.facebook.com/NetworkWorld/
[3]: https://www.linkedin.com/company/network-world

View File

@ -0,0 +1,182 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-11992-1.html)
[#]: subject: (Three Ways to Exclude/Hold/Prevent a Specific Package from an apt Upgrade)
[#]: via: (https://www.2daygeek.com/debian-ubuntu-exclude-hold-prevent-packages-from-apt-get-upgrade/)
[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/)
从 apt 升级中排除/保留/阻止特定软件包的三种方法
======
![](https://img.linux.net.cn/data/attachment/album/202003/13/103902tfyv8eeuo5jf9ifo.jpg)
有时,由于某些应用依赖性,你可能会意外更新不想更新的软件包。这在全系统更新或自动包升级时经常会发生。如果发生这种情况,可能会破坏应用的功能。这会造成严重的问题,你需要花费大量时间来解决问题。
如何避免这种情况?如何从 `apt-get` 更新中排除软件包?
> 如果你要[从 Yum Update 中排除特定软件包][1],请参考这篇。
是的,可以在 Debian 和 Ubuntu 系统上使用以下三种方法来完成。
* [apt-mark 命令][2]
* [dpkg 命令][3]
* aptitude 命令
我们将分别详细展示。
### 方法 1如何使用 apt-mark 命令排除 Debian/Ubuntu 系统上的软件包更新
`apt-mark` 用于将软件包标记/取消标记为自动安装。
`hold` 选项用于将软件包标记为保留,以防止软件包被自动安装、升级或删除。
`unhold` 选项用于取消先前面的设置,以允许重复执行所有操作。
运行以下命令以使用 `apt-mark` 命令保留指定的软件包。
```
$ sudo apt-mark hold nano
nano set on hold.
```
保留软件包后,请运行以下 `apt-mark` 命令查看它们。
```
$ sudo apt-mark showhold
nano
```
这表明在执行完整的系统更新时,不会升级 nano 包。
```
$ sudo apt update
Reading package lists… Done
Building dependency tree
Reading state information… Done
Calculating upgrade… Done
The following packages have been kept back:
nano
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
```
运行以下命令,使用 `apt-mark` 命令取消保留 nano 包。
```
$ sudo apt-mark unhold nano
Canceled hold on nano.
```
### 方法 2如何使用 dpkg 命令在 Debian/Ubuntu 系统上排除软件包更新
`dpkg` 命令是一个 CLI 工具,用于安装、构建、删除和管理 Debian 软件包。`dpkg` 的主要且更用户友好的前端是 `aptitude`
运行以下命令使用 `dpkg` 命令阻止给定的软件包。
语法:
```
$ echo "package_name hold" | sudo dpkg --set-selections
```
运行以下 `dpkg` 命令以保留 apache2 包。
```
$ echo "apache2 hold" | sudo dpkg --set-selections
```
保留软件包后,请运行以下命令查看它们。
```
$ sudo dpkg --get-selections | grep "hold"
apache2 hold
```
它会显示在执行完整的系统更新时,不会升级 apache2包。
```
$ sudo apt update
Reading package lists… Done
Building dependency tree
Reading state information… Done
Calculating upgrade… Done
The following packages have been kept back:
apache2
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
```
运行以下命令,使用 `dpkg` 命令取消对指定软件包的保留。
语法:
```
$ echo "package_name install" | sudo dpkg --set-selections
```
运行以下命令,使用 `dpkg` 命令取消保留 apache2 包。
```
$ echo "apache2 install" | sudo dpkg --set-selections
```
### 方法 3如何使用 aptitude 命令排除 Debian/Ubuntu 系统上的软件包更新
`aptitude` 命令是 Debian 及其衍生版本的基于文​​本的软件包管理界面。
它允许用户查看软件包列表并执行软件包管理任务,例如安装、升级和删除软件包。它可以从可视界面或命令行执行操作。
运行以下命令,使用 `aptitude` 命令保留指定的软件包。
```
$ sudo aptitude hold python3
```
保留某些软件包后,请运行以下命令查看它们。
```
$ sudo dpkg --get-selections | grep "hold"
或者
$ sudo apt-mark showhold
python3
```
这表明在执行完整的系统更新时,不会升级 python3 软件包。
```
$ sudo apt update
Reading package lists… Done
Building dependency tree
Reading state information… Done
Calculating upgrade… Done
The following packages have been kept back:
python3
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
```
使用 `aptitude ` 命令运行以下命令以解除对 python3 软件包的保留。
```
$ sudo aptitude unhold python3
```
--------------------------------------------------------------------------------
via: https://www.2daygeek.com/debian-ubuntu-exclude-hold-prevent-packages-from-apt-get-upgrade/
作者:[Magesh Maruthamuthu][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.2daygeek.com/author/magesh/
[b]: https://github.com/lujun9972
[1]: https://www.2daygeek.com/redhat-centos-yum-update-exclude-specific-packages/
[2]: https://www.2daygeek.com/apt-get-apt-cache-command-examples-manage-packages-debian-ubuntu-systems/
[3]: https://www.2daygeek.com/dpkg-command-to-manage-packages-on-debian-ubuntu-linux-mint-systems/

View File

@ -0,0 +1,68 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12005-1.html)
[#]: subject: (6 Raspberry Pi tutorials to try out)
[#]: via: (https://opensource.com/article/20/3/raspberry-pi-tutorials)
[#]: author: (Lauren Pritchett https://opensource.com/users/lauren-pritchett)
6 个可以尝试的树莓派教程
======
> 这些树莓派项目均旨在简化你的生活并提高生产力。
![](https://img.linux.net.cn/data/attachment/album/202003/17/142619e7jbh7dj5448nf1i.jpg)
没有什么比体验树莓派创作结果更令人兴奋了。经过数小时的编程、测试和徒手构建,你的项目终于开始成形,你不禁大喊 “哇哦!”树莓派可以带给日常生活的可能性让我着迷。无论你是想学习新知识、尝试提高效率还是只是乐在其中,本文总有一个树莓派项目适合你。
### 设置 VPN 服务器
本[教程][2]教你如何使用树莓派添加一个网络安全层。这个项目不仅有实际好处,而且还能为你带来很多乐趣。额外的安全性使你可以放心地做其它项目,例如下面列出的项目。
### 创建一个物体跟踪摄像机
树莓派之所以具有吸引力,是因为它提供了较低的入门门槛来学习机器学习等新技术。这份[分步指南][3]提供了详尽的说明,说明了如何构建一个全景摄像头,以便使用 TensorFlow 和树莓派跟踪运动。
### 使用照片幻灯片展示你最喜欢的回忆
你是否曾经问过自己:“我应该怎么处理这些数码照片?”。如果你像我一样这样想过,那么答案是“是”。在朋友和家人圈子中,我被公认为摄像爱好者。这就是为什么我喜欢这个树莓派项目。在[本教程][4]中,你将学习如何设置照片幻灯片,以便轻松地在家里展示自己喜欢的回忆,而无需打印机!
### 玩复古电子游戏
如果你对复古游戏系统怀有怀旧之情,那么可以尝试[本教程][5]。了解包括树莓派在内的哪些设备可以运行 Amiga 模拟器。完成设置后,你将可在树莓派上玩自己喜欢的 Amiga 游戏。
### 为你的娱乐中心搭建时钟
在过去的十年中,家庭娱乐中心发生了很大的变化。我的家人完全依靠流媒体服务来观看节目和电影。我之所以爱它是因为我可以通过移动设备或语音助手控制电视。但是,当你不再能一眼看到时钟时,便会失去一定程度的便利!请遵循[这些步骤][6],使用树莓派从头开始搭建自己的时钟显示。
### 扩大自制啤酒的生产规模
在[本教程][7]中,经验丰富的家庭酿酒师分享了他建立电动啤酒酿造系统的经验。该项目需要在硬件和零件上进行更多的前期投资,但由此产生的效率和一致性让这些值得。为此祝贺!
如果你是像我这样的树莓派新手,那么我建议你阅读我们这些可下载的树莓派指南。我们的[单页速查表][8]提供了入门指南。有关更多技巧和教程,我们的[综合指南][9]涵盖了一些主题,例如选择树莓派、保持更新、为社区做出贡献等。
你会尝试哪个树莓派项目?让我们在评论中知道。
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/3/raspberry-pi-tutorials
作者:[Lauren Pritchett][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/lauren-pritchett
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/raspberrypi_cartoon.png?itok=m3TcBONJ (Cartoon graphic of Raspberry Pi board)
[2]: https://opensource.com/article/19/6/raspberry-pi-vpn-server
[3]: https://opensource.com/article/20/1/object-tracking-camera-raspberry-pi
[4]: https://opensource.com/article/19/2/wifi-picture-frame-raspberry-pi
[5]: https://opensource.com/article/19/3/amiga-raspberry-pi
[6]: https://opensource.com/article/17/7/raspberry-pi-clock
[7]: https://opensource.com/article/17/7/brewing-beer-python-and-raspberry-pi
[8]: https://opensource.com/downloads/getting-started-raspberry-pi-cheat-sheet
[9]: https://opensource.com/downloads/raspberry-pi-guide

View File

@ -0,0 +1,61 @@
[#]: collector: (lujun9972)
[#]: translator: (hkurj)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12034-1.html)
[#]: subject: (2020 Will Be a Year of Hindsight for SD-WAN)
[#]: via: (https://www.networkworld.com/article/3531315/2020-will-be-a-year-of-hindsight-for-sd-wan.html)
[#]: author: (Zeus Kerravala https://www.networkworld.com/author/Zeus-Kerravala/)
2020 年将是 SD-WAN 的回顾之年
======
![](https://images.idgesg.net/images/article/2020/03/istock-1127447341-100834720-large.jpg)
对于软件定义的广域网SD-WAN“过去看起来困难的选择知道了这些选择的结果后现在看起来就很清晰了” 这一说法再合适不过了。总结过去的几年:云计算和数字化转型促使公司重新评估传统的 WAN 技术该技术不再能够满足其不断增长的业务需求。从那时起SD-WAN 成为一种有前途的新技术。
SD-WAN 旨在解决物理设备的流量管理问题,并支持从云进行基于软件的配置。许多最初的 SD-WAN 部署都因希望取代昂贵的多协议标签交换 MPLS 而得到推动。公司希望它可以神奇地解决他们所有的网络问题。但是在实践中,基本的 SD-WAN 解决方案远没有实现这一愿景。
快速发展到现在,围绕 SD-WAN 的炒作已经尘埃落定,并且早期的实施工作已经过去。现在是时候回顾一下我们在 2019 年学到的东西以及在 2020 年要改进的地方。所以,让我们开始吧。
### 1、这与节省成本无关
大多数公司选择 SD-WAN 作为 MPLS 的替代品,因为它可以降低 WAN 成本。但是,[节省的成本][1]会因 SD-WAN 的不同而异因此不应将其用作部署该技术的主要驱动力。无论公司需要什么公司都应该专注于提高网络敏捷性例如实现更快的站点部署和减少配置时间。SD-WAN 的主要驱动力是使网络更高效。如果成功实现那么成本也会随之降低。
### 2、WAN 优化是必要的
说到效率,[WAN 优化][2]提高了应用程序和数据流量的性能。通过应用协议加速、重复数据消除、压缩和缓存等技术WAN 优化可以增加带宽、减少延迟并减轻数据包丢失。最初的想法是 SD-WAN 可以完成对 WAN 优化的需求,但是我们现在知道某些应用程序需要更多的性能支持。这些技术相互补充,而不是相互替代。它们应该用来解决不同的问题。
### 3、安全性不应该事后考虑
SD-WAN 具有许多优点,其中之一就是使用宽带互联网快速发送企业应用程序流量。但是这种方法也带来了安全风险,因为它使用户及其本地网络暴露于不受信任的公共互联网中。从一开始,安全性就应该成为 SD-WAN 实施的一部分,而不是在事后。公司可以通过使用[安全的云托管][3]之类的服务,将安全性放在分支机构附近,从而实现所需的应用程序性能和保护。
### 4、可见性对于 SD-WAN 成功至关重要
在应用程序和数据流量中具有[可见性][4],这使网络管理不再需要猜测。最好的起点是部署前阶段,在此阶段,公司可以在实施 SD-WAN 之前评估其现有功能以及缺少的功能。可见性以日常监控和警报的形式在部署后继续发挥重要作用。了解网络中正在发生的情况的公司会更好地准备应对性能问题,并可以利用这些知识来避免将来出现问题。
### 5、无线广域网尚未准备就绪
SD-WAN 可通过包括宽带和 4G/LTE 无线在内的任何传输将用户连接到应用程序。这就是[移动互联][5]越来越多地集成到 SD-WAN 解决方案中的原因。尽管公司渴望将 4G 用作潜在的传输替代方案(尤其是在偏远地区),但由此带来的按使用付费 4G 服务成本却很高。此外由于延迟和带宽限制4G 可能会出现问题。最好的方法是等待服务提供商部署具有更好的价格选择的 5G。今年我们将看到 5G 的推出,并更加关注无线 SD-WAN。
请务必观看以下 SD-WAN 视频系列:[你应该知道的所有关于 SD-WAN 的知识][6]。
--------------------------------------------------------------------------------
via: https://www.networkworld.com/article/3531315/2020-will-be-a-year-of-hindsight-for-sd-wan.html
作者:[Zeus Kerravala][a]
选题:[lujun9972][b]
译者:[hkurj](https://github.com/hkurj)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.networkworld.com/author/Zeus-Kerravala/
[b]: https://github.com/lujun9972
[1]: https://blog.silver-peak.com/to-maximize-the-value-of-sd-wan-look-past-hardware-savings
[2]: https://blog.silver-peak.com/sd-wan-vs-wan-optimization
[3]: https://blog.silver-peak.com/sd-wans-enable-scalable-local-internet-breakout-but-pose-security-risk
[4]: https://blog.silver-peak.com/know-the-true-business-drivers-for-sd-wan
[5]: https://blog.silver-peak.com/mobility-and-sd-wan-part-1-sd-wan-with-4g-lte-is-a-reality
[6]: https://www.silver-peak.com/everything-you-need-to-know-about-sd-wan

View File

@ -0,0 +1,103 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12001-1.html)
[#]: subject: (Basilisk: A Firefox Fork For The Classic Looks and Classic Extensions)
[#]: via: (https://itsfoss.com/basilisk-browser/)
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
Basilisk一个有着经典的外观和扩展的 Firefox 复刻
======
> Basilisk 是一个 Firefox 复刻,它支持旧版的扩展等更多功能。在这里,我们看一下它的功能并尝试一下。
![](https://img.linux.net.cn/data/attachment/album/202003/16/130319lvls6fvsaslzllrv.jpg)
### Basilisk基于 XUL 的开源 Web 浏览器
尽管最好使用 Linux 上的常规浏览器(如 Firefox 或 Chromium但了解其他浏览器也没坏处。最近我偶然发现了一个 Firefox 复刻:[Basilisk][1] 浏览器,它有经典的 Firefox 用户界面以及对旧版扩展的支持(就像 [Waterfox][2] 一样)。
![itsfoss.com homepage on Basilisk][3]
如果你迫切需要使用旧版扩展程序或怀念 Firefox 的经典外观Basilisk 浏览器可以帮到你。这个浏览器是由 [Pale Moon][4] 浏览器背后的团队维护(这是我接下来要介绍的另一个 Firefox 复刻)。
如果你正在寻找开源 [Chrome 替代品][5],那么你可以快速了解一下 Basilisk 提供的功能。
**注意:**Basilisk 是开发中软件。即使我在使用时没有遇到重大的可用性问题,但你也不应依赖它作为唯一使用的浏览器。
### Basilisk 浏览器的特性
![][6]
Basilisk 开箱即用。但是,在考虑使用之前,可能需要先看一下以下这些特性:
* 基于 [XUL][7] 的 Web 浏览器
* 它具有 “Australis” Firefox 界面,这在 v29v56 的 Firefox 版本中非常流行。
* 支持 [NPAPI][8] 插件Flash、Unity、Java 等)
* 支持 XUL/Overlay Mozilla 形式的扩展。
* 使用 [Goanna][9] 开源浏览器引擎,它是 Mozilla [Gecko][10] 的复刻
* 不使用 Rust 或 Photon 用户界面
* 仅支持 64 位系统
### 在 Linux 上安装 Basilisk
你可能没有在软件中心中找到它。因此,你必须前往其官方[下载页面][11]获得 tarballtar.xz文件。
下载后,只需将其解压缩并进入文件夹。接下来,你将在其中找到一个 `Basilisk` 可执行文件。你只需双击或右键单击并选择 “运行” 即可运行它。
你可以查看它的 [GitHub 页面][12]获取更多信息。
![][13]
你也可以按照下面的步骤使用终端进入下载的文件夹,并运行文件:
```
cd basilisk-latest.linux64
cd basilisk
./basilisk
```
- [下载 Basilisk][1]
### 使用 Basilisk 浏览器
![][14]
如果你想要支持旧版扩展Basilisk 是不错的 Firefox 复刻。它是由 Pale Moon 背后的团队积极开发的,对于希望获得 Mozilla Firefox在 Quantum 更新之前)经典外观,且不包括现代 Web 支持的用户而言,它可能是一个不错的选择。
浏览网页没有任何问题。但是,我注意到 YouTube 将其检测为过时的浏览器,并警告说它将很快停止支持它。
**因此,我不确定 Basilisk 是否适合所有现有的 Web 服务 —— 但是,如果你确实需要使用 Firefox 较早版本中的扩展,那这是一个解决方案。**
### 总结
你认为这个 Firefox 复刻值得尝试吗?你喜欢哪个?在下面的评论中分享你的想法。
--------------------------------------------------------------------------------
via: https://itsfoss.com/basilisk-browser/
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://www.basilisk-browser.org/
[2]: https://itsfoss.com/waterfox-browser/
[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/basilisk-itsfoss.jpg?ssl=1
[4]: https://www.palemoon.org
[5]: https://itsfoss.com/open-source-browsers-linux/
[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/03/basilisk-options-1.jpg?ssl=1
[7]: https://developer.mozilla.org/en-US/docs/Archive/Mozilla/XUL
[8]: https://wiki.mozilla.org/NPAPI
[9]: https://en.wikipedia.org/wiki/Goanna_(software)
[10]: https://developer.mozilla.org/en-US/docs/Mozilla/Gecko
[11]: https://www.basilisk-browser.org/download.shtml
[12]: https://github.com/MoonchildProductions/Basilisk
[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/basilisk-folder-1.jpg?ssl=1
[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/03/basilisk-browser-1.jpg?ssl=1

View File

@ -0,0 +1,85 @@
[#]: collector: "lujun9972"
[#]: translator: "messon007"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-12015-1.html"
[#]: subject: "Containers vs. VMs, Istio in production, and more industry news"
[#]: via: "https://opensource.com/article/20/3/survey-istio-industry-news"
[#]: author: "Tim Hildred https://opensource.com/users/thildred"
每周开源点评:容器 vs 虚拟机、生产环境中的 Istio 等
======
> 本文是最近一周开源社区的新闻和行业进展。
![Person standing in front of a giant computer screen with numbers, data][1]
我在一家采用开源软件开发模型的企业软件公司任高级产品营销经理,我的一部分职责是为产品营销人员,经理和其他相关人定期发布有关开源社区,市场和业界发展趋势的更新。以下是该更新中我和他们最喜欢的五篇文章。
### 云原生应用采用的技术:容器等
- [文章链接][2]
> * 在生产环境中采用容器的比例从 2018 年的 73% 上升到 2019 年的 84%。其中,运行了至少 250 个容器的比例从 2018 年的 46% 上升到 2019 年的 58%。2017 到 2019 年间, 环境中拥有 50 台以上计算机(物理或虚拟)的受访者人数从 2017 年的 77 上升到 2019 年的 81
> * 表明: 容器的引入似乎缓解了需要管理的 VM 的快速增长。但是,请警惕要管理的原始机器数量会减少的说法。
>
**分析**:从直觉上看,随着容器使用的增长,虚拟机的增长将放缓;有许多容器被部署在虚拟机内部,从而充分利用了两者的优势特性,而且许多应用不会很快被容器化(留意下你所在企业的传统单体式应用)。
### 在生产环境中运行Istio的经验
- [文章链接][3]
> 在 HelloFresh我们将团队分为小队和团伙。每个团伙都有自己的 Kubernetes 命名空间。如上所述,我们先按命名空间启用 sidecar 注入,然后再逐个对应用启用。在将应用添加到 Istio 之前,我们举办了研讨会,以使小队了解其应用发生的变化。由于我们采用“您构建,您维护”的模型,团队可以在故障定位时了解应用的进出流量。不仅如此,它还提升了公司内部的知识量。我们还创建了 Istio 相关的 [OKR][4] 来跟踪我们的进度并达成我们引入Istio的目的。
**分析**:引入或是不引入技术,要由自己决定,同时要自行承担相应的后果。
### Aether: 首个开源的边缘云平台
- [文章链接][5]
> ONF 的营销副主席 Sloane 这样解释 Aether: 它将多个正在自己的沙箱中开发和运行的项目聚集到一起ONF 试图在该框架下将多种边缘服务在一个融合平台上支持起来。ONF 的各个项目将保持独立并可继续单独使用,但是 Aether 试图将多个能力绑定到一起来简化企业的私有边缘云运营。
>
> 他说:“我们认为我们正在创造一个新的合作空间,工业界和社区可以携手帮助推动通用平台背后的整合和关键工作,然后可以帮助这些边缘云中的通用功能不断发展”。
**分析**:当今,使用技术解决的问题过于复杂,无法通过单一技术解决。比技术更重要的是要解决的业务问题需要聚焦于真正增值的部分。将两者结合起来,就是企业之间需要在他们共同的需求上找到合作的方法,并在它们特有的方面进行竞争。除了开源,你找不到比这更好的方法了。
### 与云相关职业的女性正在改变现状
- [文章链接][6]
> Yordanova 说:“由于云是一种相对较新的技术,我的[成为一名“科技女性”][7]的经验可能并不典型,因为云行业极为多样化”。“实际上,我的团队中性别比例相当,成员由随着云技术而成长的不同个性、文化和优势的具体人员组成。“
**分析**:我想考虑的一件事就是跨越式的演进思路。你可能可以跳过演进过程中的某个步骤或阶段,因为原先导致其存在的条件已不再适用。云技术时代没有形成“谁发明的以及它是为谁而生”的固有说法,所以也许它所承载的某些前代的技术负担更少?
### StarlingX 如何在中国开源项目的星空中闪耀
- [文章链接][8]
> 我们的团队在中国,因此我们的任务之一是帮助中国的社区开发软件、贡献代码、文档等。大多数 StarlingX 项目会议是在中国的深夜举行,因此华人社区成员的出席和参与颇具挑战。为了克服这些障碍,我们与中国的其他社区成员(例如 99cloud 的朋友)一起采取了一些措施,例如和其他社区成员一起聚会,一起参加动手实践研讨会和中文的特设技术会议,将一些文档翻译成中文,并在微信小组中不断进行互动(就像每个人都可以享受的 24/7 通话服务一样)
**分析**:随着中国对开源项目的贡献不断增长,这种情况似乎有可能逆转或至少相当。“学习英语”根本不是参与开源项目开发的先决条件。
希望你喜欢这个列表,下周再见。
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/3/survey-istio-industry-news
作者:[Tim Hildred][a]
选题:[lujun9972][b]
译者:[messon007](https://github.com/messon007)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/thildred
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/data_metrics_analytics_desktop_laptop.png?itok=9QXd7AUr "Person standing in front of a giant computer screen with numbers, data"
[2]: https://thenewstack.io/cncf-survey-snapshot-tech-adoption-in-the-cloud-native-world/
[3]: https://engineering.hellofresh.com/everything-we-learned-running-istio-in-production-part-1-51efec69df65
[4]: https://en.wikipedia.org/wiki/OKR
[5]: https://www.sdxcentral.com/articles/news/onf-projects-coalesce-for-enterprise-edge-cloud/2020/03/
[6]: https://www.cloudpro.co.uk/leadership/cloud-essentials/8446/how-women-in-cloud-are-challenging-the-narrative
[7]: https://www.itpro.co.uk/business-strategy/33301/diversity-not-a-company-priority-claim-nearly-half-of-women-in-tech
[8]: https://superuser.openstack.org/articles/starlingx-community-interview-how-starlingx-shines-in-the-starry-sky-of-open-source-projects-in-china/

View File

@ -0,0 +1,145 @@
[#]: collector: (lujun9972)
[#]: translator: (HankChow)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-11993-1.html)
[#]: subject: (How to install pip to manage PyPI packages easily)
[#]: via: (https://opensource.com/article/20/3/pip-linux-mac-windows)
[#]: author: (Vijay Singh Khatri https://opensource.com/users/vijaytechnicalauthor)
安装 pip 轻松管理 PyPI 软件包
======
> 在 Linux、Mac 或 Windows 上为旧版 Python 安装 pip。
![](https://img.linux.net.cn/data/attachment/album/202003/14/102539wq3a73opalpzoabb.jpg)
Python 是一种功能强大、流行广泛的编程语言,在常规编程、数据科学等很多方面它都有丰富的软件包可供使用。但这些软件包通常都不会在 Python 安装时自动附带,而是需要由用户自行下载、安装和管理。所有的这些软件包(包括库和框架)都存放在一个名叫 [PyPI][2](也就是 <ruby>Python 软件包索引<rt> Python Package Index</rt></ruby>)的中央存储库当中,而 `pip`(也就是<ruby>首选安装程序<rt>Preferred Installer Program</rt></ruby>)则是管理这个中央存储库的工具。
在安装 `pip` 之后,管理 PyPI 的软件包就变得很方便了。大部分的软件包都可以通过在终端或者命令行界面执行 `python -m pip install <软件包名>` 这样的命令来完成安装。
较新版本的 Python 33.4 或以上)和 Python 22.7.9 或以上)都已经预装了 `pip`,旧版本的 Python 没有自带 `pip`,但可以另外安装。
在这篇文章中,我将会介绍 `pip` 在 Linux、Mac 和 Windows 系统上的安装过程。想要了解更多详细信息,可以参考 [pip.pypa][3] 的文档。
### 首先需要安装 Python
首先你的系统中需要安装好 Python否则 `pip` 安装器无法理解任何相关的命令。你可以在命令行界面、Bash 或终端执行 `python` 命令确认系统中是否已经安装 Python如果系统无法识别 `python` 命令,请先[下载 Python][4] 并安装。安装完成后,你就可以看到一些引导你安装 `pip` 的提示语了。
### 在 Linux 上安装 pip
在不同发行版的 Linux 上,安装 `pip` 的命令也有所不同。
在 Fedora、RHEL 或 CentOS 上,执行以下命令安装:
```
$ sudo dnf install python3
```
在 Debian 或 Ubuntu 上,使用 `apt` 包管理工具安装:
```
$ sudo apt install python3-pip
```
其它的发行版可能还会有不同的包管理工具,比如 Arch Linux 使用的是 `pacman`
```
$ sudo pacman -S python-pip
```
执行 `pip --version` 命令就可以确认 `pip` 是否已经正确安装。
在 Linux 系统上安装 `pip` 就是这样简单,你可以直接跳到“使用 pip”部分继续阅读。
### 在 Mac 上安装 pip
MacOS 已经预装了 Python但 Python 版本一般是比较旧的。如果你要使用 Python 的话,建议[另外安装 Python 3][6]。
在 Mac 上可以使用 [homebrew][7] 安装 Python 3
```
$ brew update && brew upgrade python
```
如果你安装的是以上提到的新版本 Python 3它会自带 `pip` 工具。你可以使用以下命令验证:
```
$ python3 -m pip --version
```
如果你使用的是 Mac安装过程也到此结束可以从“使用 pip”部分继续阅读。
### 在 Windows 上安装 pip
以下 `pip` 安装过程是针对 Windows 8 和 Windows 10 的。下面文章中的截图是 Windows 10 环境下的截图,但对 Windows 8 同样适用。
首先确认 [Python 已经安装完成][8]。
如果你想在 Windows 系统上像 Linux 一样使用包管理工具,[Chocolatey][9] 是一个不错的选择,它可以让 Python 的调用和更新变得更加方便。Chocolatey 在 PowerShell 中就可以运行只需要简单的命令Python 就可以顺利安装。
```
PS> choco install python
```
接下来就可以使用 `pip` 安装所需的软件包了。
### 使用 pip
在 Linux、BSD、Windows 和 Mac 上,`pip` 都是以同样的方式使用的。
例如安装某个库:
```
python3 -m pip install foo --user
```
卸载某个已安装的库:
```
python3 -m pip uninstall foo
```
按照名称查找软件包:
```
python3 -m pip search foo
```
`pip` 更新到一个新版本:
```
$ sudo pip install --upgrade pip
```
需要注意的是,在 Windows 系统中不需要在前面加上 `sudo` 命令,这是因为 Windows 通过独有的方式管理用户权限,对应的做法是[创建一个执行策略例外][10]。
```
python -m pip install --upgrade pip
```
希望本文介绍的的方法能对你有所帮助,欢迎在评论区分享你的经验。
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/3/pip-linux-mac-windows
作者:[Vijay Singh Khatri][a]
选题:[lujun9972][b]
译者:[HankChow](https://github.com/HankChow)
校对:[wxy](https://github.com/wxy)
本文由 [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/1980s-computer-yearbook.png?itok=eGOYEKK- (Person typing on a 1980's computer)
[2]: https://pypi.org/
[3]: https://pip.pypa.io/en/stable/installing/
[4]: https://www.python.org/downloads/
[5]: tmp.u1JOYd3gs9#usage
[6]: https://opensource.com/article/19/5/python-3-default-mac
[7]: https://brew.sh
[8]: https://opensource.com/article/19/8/how-install-python-windows
[9]: https://opensource.com/article/20/3/chocolatey
[10]: https://opensource.com/article/20/3/chocolatey#admin

View File

@ -0,0 +1,87 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12018-1.html)
[#]: subject: (Amazon Has Launched Its Own Linux Distribution But Its Not for Everyone)
[#]: via: (https://itsfoss.com/bottlerocket-linux/)
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
Amazon 推出了自己的容器专用 Linux 发行版“瓶装火箭”
======
![](https://img.linux.net.cn/data/attachment/album/202003/21/074953h0a55lq72h0qlpzd.jpg)
Amazon 已经[推出][1]了自己的基于 Linux 的开源操作系统 Bottlerocket“瓶装火箭”。但在你兴奋地想要尝试安装和运行它之前我必须告诉你它不是常规的如 Ubuntu、Fedora 或 Debian 这样的 Linux 发行版。那它是什么?
### Bottlerocket来自 Amazon 的 Linux 发行版,用于运行容器
![][2]
如果你不了解 Linux 容器,建议你阅读 Red Hat 的[这篇文章][3]。
自从首次提出云计算一词以来IT 行业发生了许多变化。得益于 Amazon AWS、Google、Linode、Digital Ocean 等云服务器提供商,部署 Linux 服务器(通常在虚拟机中运行)只需几秒钟。最重要的是,你可以借助 Docker 和 Kubernetes 之类的工具在这些服务器上以容器形式部署应用和服务。
问题是,当你唯一目的是在 Linux 系统上运行容器时,并不总是需要完整的 Linux 发行版。这就是为什么容器专用 Linux 仅提供必要软件包的原因。这将大大减少操作系统的大小,从而进一步减少部署时间。
[Bottlerocket][5] Linux 由 Amazon Web ServicesAWS专门构建用于在虚拟机或裸机上运行容器。它支持 docker 镜像和其他遵循 [OCI 镜像][6]格式的镜像。
### Bottlerocket Linux 的特性
![][7]
这是来自 Amazon 的新 Linux 发行版提供的特性:
#### 没有逐包更新
传统的 Linux 发行版更新过程由更新单个软件包组成。Bottlerocket 改用基于镜像的更新。
由于采用了这种方法,可以避免冲突和破坏,并可以进行快速而完整的回滚(如有必要)。
#### 只读文件系统
Bottlerocket 还使用了只读主文件系统。在启动时通过 dm-verity 检查其完整性。在其他安全措施上,也不建议使用 SSH 访问,并且只能通过[管理容器][8](附加机制)使用。
AWS 已经统治了云世界。
#### 自动更新
你可以使用 Amazon EKS 之类的编排服务来自动执行 Bottlerocket 更新。
Amazon 还声称,与通用 Linux 发行版相比,仅包含运行容器的基本软件可以减少攻击面。
### 你怎么看?
Amazon 并不是第一个创建“容器专用 Linux” 的公司。我认为 CoreOS 是最早的此类发行版之一。[CoreOS 被 Red Hat 收购][9]Red Hat 又被 [IBM 收购][10]。Red Hat 公司最近停用了 CoreOS并用 [Fedora CoreOS][11] 代替了它。
云服务器是一个巨大的行业,它将继续发展壮大。像 Amazon 这样的巨头将竭尽所能与它竞争对手保持一致或领先。我认为Bottlerocket 是对 IBM Fedora CoreOS目前的应答。
尽管 [Bottlerocket 仓库可在 GitHub 上找到][12]但我还没发现就绪的镜像LCTT 译注:源代码已经提供)。在撰写本文时,它仅[可在 AWS 上预览][5]。
你对此有何看法Amazon 会从 Bottlerocket 获得什么?如果你以前使用过 CoreOS 之类的软件,你会切换到 Bottlerocket 么?
--------------------------------------------------------------------------------
via: https://itsfoss.com/bottlerocket-linux/
作者:[Abhishek Prakash][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/abhishek/
[b]: https://github.com/lujun9972
[1]: https://aws.amazon.com/blogs/aws/bottlerocket-open-source-os-for-container-hosting/
[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/03/botlerocket-logo.png?ssl=1
[3]: https://www.redhat.com/en/topics/containers/whats-a-linux-container
[4]: https://www.linode.com/
[5]: https://aws.amazon.com/bottlerocket/
[6]: https://www.opencontainers.org/
[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/03/BottleRocket.png?ssl=1
[8]: https://github.com/bottlerocket-os/bottlerocket-admin-container
[9]: https://itsfoss.com/red-hat-acquires-coreos/
[10]: https://itsfoss.com/ibm-red-hat-acquisition/
[11]: https://getfedora.org/en/coreos/
[12]: https://github.com/bottlerocket-os/bottlerocket

View File

@ -0,0 +1,215 @@
[#]: collector: (lujun9972)
[#]: translator: (hkurj)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12019-1.html)
[#]: subject: (6 Best AUR (Arch User Repository) Helpers for Arch Linux)
[#]: via: (https://www.2daygeek.com/best-aur-arch-user-repository-helpers-arch-linux-manjaro/)
[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/)
6 个用于 Arch Linux 的最佳 AUR 助手
======
![](https://img.linux.net.cn/data/attachment/album/202003/21/082920kxdmlwkk7xx7llpw.jpeg)
Arch Linux 是一款 Linux 发行版,主要由针对 x86-64 微处理器计算机的二进制软件包组成。Arch Linux 使用的是滚动发布模型,这种模式会频繁的给应用程序交付更新。它使用名为 [pacman][1] 的软件包管理器,可以用来安装、删除和更新软件包。
由于 Arch Linux 是为有经验的用户构建的,建议新手在使用过其他 Linux 后再来尝试。
### 什么是 AURArch 用户软件仓库)?
[Arch 用户软件仓库][2] 通常称为 AUR是给 Arch 用户的基于社区的软件存储库。
根据软件包在 AUR 社区的流行程度,用户编译的软件包会进入到 Arch 的官方存储库。
### 什么是 AUR 助手?
[AUR 助手][3]是一个包装程序,允许用户从 AUR 存储库安装软件包,而无需手动干预。
很多用例实现了自动化,比如包搜索、解决依赖关系、检索和构建 AUR 包、Web 内容检索和 AUR 包提交之类。
以下列出了 6 种最佳的 AUR 助手:
* YayYet another Yogurt
* Pakku
* Pacaur
* Pikaur
* Trizen
* Aura
### 1YayYet another Yogurt
[Yay][4] 是 Arch Linux 下基于 CLI 的最佳 AUR 助手,使用 Go 语言编写。Yay 是基于 yaourt、apacman 和 pacaur 设计的。
这是最合适推荐给新手的 AUR 助手。类似于 Pacman其使用方法和 `pacman` 中的命令和选项很相似,可以让用户在搜索过程中找到匹配的软件包提供程序,并进行选择。
#### 如何安装 yay
依次运行以下命令以在 Arch Linux 系统上安装。
```
$ sudo pacman -S git go base-devel
$ git clone https://aur.archlinux.org/yay.git
$ cd yay
$ makepkg -si
```
#### 如何使用 yay
`yay` 语法与 `pacman` 相同,使用以下命令安装软件包。
```
$ yay -s arch-wiki-man
```
### 2Pakku
[Pakku][5] 可以被视为一个初始阶段的 Pacman。它是一个包装程序可以让用户从 AUR 中搜索或安装软件包。
它在删除依赖项方面做得不错,并且还允许通过克隆 PKGBUILD 来安装软件包。
#### 如何安装 Pakku
要在 Arch Linux 的系统上安装 Pakku请依次运行以下命令。
```
$ sudo pacman -S git base-devel
$ git clone https://aur.archlinux.org/pakku.git
$ cd pakku
$ makepkg -si
```
#### 如何使用 Pakku
`pakku` 语法与 `pacman` 相同,使用以下命令安装软件包。
```
$ pakku -s dropbox
```
### 3Pacaur
另一个基于 CLI 的 AUR 助手,可帮助减少用户与提示符的交互。
[Pacaur][6] 专为倾向于自动化重复任务的高级用户而设计。用户需要熟悉 `makepkg` 及其配置的 AUR 手动构建过程。
#### 如何安装 Pacaur
要在 Arch Linux 的系统上安装 Pakku请依次运行以下命令。
```
$ sudo pacman -S git base-devel
$ git clone https://aur.archlinux.org/pacaur.git
$ cd pacaur
$ makepkg -si
```
#### 如何使用 Pacaur
`pacaur` 语法与 `pacman` 相同,使用以下命令安装软件包。
```
$ pacaur -s spotify
```
### 4Pikaur
[Pikaur][7] 是具有最小依赖性的 AUR 助手,可以一次查看所有 PKGBUILD无需用户交互即可全部构建。
Pikaur 将通过控制 `pacman` 命令来告知 Pacman 要执行的下一个步骤。
#### 如何安装 Pikaur
要在 Arch Linux 的系统上安装 Pakku请依次运行以下命令。
```
$ sudo pacman -S git base-devel
$ git clone https://aur.archlinux.org/pikaur.git
$ cd pikaur
$ makepkg -fsri
```
#### 如何使用 Pikaur
`pikaur` 语法与 `pacman` 相同,使用以下命令安装软件包。
```
$ pacaur -s spotify
```
### 5Trizen
[Trizen][8] 是用 Perl 编写的基于命令行的 AUR 轻量级包装器。这个面向速度的 AUR 助手,它允许用户搜索、安装软件包,还允许阅读 AUR 软件包注释。
支持编辑文本文件,并且输入/输出使用 UTF-8。内置与 `pacman` 的交互功能。
#### 如何安装 Trizen
要在 Arch Linux 的系统上安装 Trizen请依次运行以下命令。
```
$ sudo pacman -S git base-devel
$ git clone https://aur.archlinux.org/trizen.git
$ cd trizen
$ makepkg -si
```
#### 如何使用 Trizen
`trizen` 语法与 `pacman` 相同,使用以下命令安装软件包。
```
$ pacaur -s google-chrome
```
### 6Aura
[Aura][9] 是用 Haskell 编写的,是用于 Arch Linux 和 AUR 的安全的多语言包管理器。它支持许多Pacman 操作和子选项,可轻松进行开发并编写精美的代码。
它可以自动从 AUR 安装软件包。使用 Aura 时,用户通常会在系统升级方面遇到一些困难。
#### 如何安装 Aura
要在 Arch Linux 的系统上安装 Pakku请依次运行以下命令。
```
$ sudo pacman -S git base-devel
$ git clone https://aur.archlinux.org/aura.git
$ cd aura
$ makepkg -si
```
#### 如何使用 Aura
`aura` 语法与 `pacman` 相同,使用以下命令安装软件包。
```
$ pacaur -s android-sdk
```
### 结论
用户可以凭借这些分析在上述 6 个 AUR 助手中进行选择。
--------------------------------------------------------------------------------
via: https://www.2daygeek.com/best-aur-arch-user-repository-helpers-arch-linux-manjaro/
作者:[Magesh Maruthamuthu][a]
选题:[lujun9972][b]
译者:[hkurj](https://github.com/hkurj)
校对:[wxy](https://github.com/wxy)
本文由 [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/pacman-command-examples-manage-packages-arch-linux-system/
[2]: https://wiki.archlinux.org/index.php/Arch_User_Repository
[3]: https://wiki.archlinux.org/index.php/AUR_helpers
[4]: https://github.com/Jguer/yay
[5]: https://github.com/kitsunyan/pakku
[6]: https://github.com/E5ten/pacaur
[7]: https://github.com/actionless/pikaur
[8]: https://github.com/trizen/trizen
[9]: https://github.com/fosskers/aura

View File

@ -0,0 +1,114 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12030-1.html)
[#]: subject: (GNOME 3.36 Released With Visual & Performance Improvements)
[#]: via: (https://itsfoss.com/gnome-3-36-release/)
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
GNOME 3.36 发布,对视觉和性能进行了改进
======
![](https://img.linux.net.cn/data/attachment/album/202003/23/151837oglshll1b7kjj8jg.jpg)
在 [GNOME 3.34][1] 发布 6 个月后,最新版本的 GNOME 3.36 代号为 “Gresik” 也最终发布了。不仅是添加了功能GNOME 3.36 还改进了许多我们需要的功能。
在本文中,我将重点介绍 GNOME 新版本的主要更改。
### GNOME 3.36 的关键改进
如果你想快速了解发生了什么变化,可以看以下官方视频:
[视频][2]
现在,让我分别重点介绍最新版本中的更改:
#### GNOME Shell 扩展应用
你可以通过专门的“扩展”程序轻松管理 GNOME Shell 的扩展。
![][3]
因此,你可以使用该程序更新、配置、删除或禁用现有扩展。
#### 切换到请勿打扰DND
![][4]
你可能已经在 Pop!\_OS 或其他 Linux 发行版中注意到了它。
但是GNOME 3.36 现在在通知弹出区域中实现了 DND 切换。除非你将其关闭,否则不会收到任何通知。
#### 锁屏改进
![][5]
在新版本中,锁定屏幕在输入凭据之前没有额外的动画。取而代之会在登录屏幕直接打招呼。
另外,为了提升一致性,锁屏背景将是墙纸的模糊版本。
总的来说,对锁屏的改进旨在使之更易于访问,同时改善其外观/感觉。
#### 视觉变化
![][6]
包含了一些明显的新增,这些设计更改改善了 GNOME 3.36 的总体外观。
从图标的重新设计到文件夹和系统对话框,进行了许多小的改进以增强 GNOME 3.36 的用户体验。
此外,设置应用已进行了调整,通过微小的界面重新设计,使得选项访问更加容易。
#### 主要性能改进
GNOME 声称,此更新还提升了 GNOME 桌面的性能。
当使用装有 GNOME 3.36 的发行版时,你会注意到在性能上有明显的不同。无论是动画、重新设计还是微小的调整,对于 GNOME 3.36 所做的一切都会对用户的性能产生积极影响。
#### 其他更改
除了上述关键更改之外,还有很多其他改进,例如:
* 时钟重新设计
* 用户文档更新
* GNOME 安装助手改进
还有许多其他更改。你可以查看[官方发布说明][7]了解更多信息。
### 如何获取 GNOME 3.36
即使 GNOME 3.36 已正式发布。Linux 发行版可能需要一段时间才能让你轻松升级 GNOME 体验。
[Ubuntu 20.04 LTS][8] 将提供最新版本 GNOME。你可以等待。
其他[流行的 Linux 发行版][9],如 Fedora、OpenSuse、Pop!\_OS应该会很快包含 GNOME 3.36。[Arch Linux][10] 已升级到 GNOME 3.36。
我建议你耐心等待,直到获得发行版本的更新。不过,你可以查看[源代码][11]或尝试即将发布的流行发行版的开发版本,这些发行版可能有 GNOME 3.36。
你如何看待 GNOME 3.36?在下面的评论中让我知道你的想法。
--------------------------------------------------------------------------------
via: https://itsfoss.com/gnome-3-36-release/
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://itsfoss.com/gnome-3-34-release/
[2]: https://img.linux.net.cn/static/video/Introducing%20GNOME%203.36%20-%20%27Gresik%27-ae2D4aWTsXM.mp4
[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/extensions-gnome.jpg?ssl=1
[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/03/dnd-gnome.jpg?ssl=1
[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/gnome-lockscreen.jpg?ssl=1
[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/gnome-settings.jpg?ssl=1
[7]: https://help.gnome.org/misc/release-notes/3.36/
[8]: https://itsfoss.com/ubuntu-20-04-release-features/
[9]: https://itsfoss.com/best-linux-distributions/
[10]: https://www.archlinux.org/
[11]: https://gitlab.gnome.org/GNOME

View File

@ -0,0 +1,173 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12008-1.html)
[#]: subject: (How to Change MAC Address in Linux)
[#]: via: (https://itsfoss.com/change-mac-address-linux/)
[#]: author: (Dimitrios Savvopoulos https://itsfoss.com/author/itsfoss/)
如何在 Linux 中更改 MAC 地址
======
在向你展示如何在 Linux 中更改 MAC 地址之前,让我们首先讨论为什么要更改它。
可能有几个原因。也许你不希望在公共网络上公开你的实际 [MAC 地址][1](也称为物理地址)?还有可能是网络管理员可能已在路由器或防火墙中阻止了特定的 MAC 地址。
一个实用的“好处”是某些公共网络(例如机场 WiFi允许在有限的时间内免费上网。如果你还想继续使用那么伪造 Mac 地址可能会欺骗网络,让它认为是一台新设备。这也是一个有名的原因。
![](https://img.linux.net.cn/data/attachment/album/202003/18/120702qdjyb7hvyj7bsrj7.jpg)
我将展示更改 MAC 地址(也称为欺骗/伪造 MAC 地址)的步骤。
### 在 Linux 中更改 MAC 地址
让我们一步步来:
#### 查找你的 MAC 地址和网络接口
让我们找出一些[关于 Linux 中网卡的细节][3]。使用此命令获取网络接口详细信息:
```
ip link show
```
在输出中,你将看到一些详细信息以及 MAC 地址:
```
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eno1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN mode DEFAULT group default qlen 1000
link/ether 94:c6:f8:a7:d7:30 brd ff:ff:ff:ff:ff:ff
3: enp0s31f6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DORMANT group default qlen 1000
link/ether 38:42:f8:8b:a7:68 brd ff:ff:ff:ff:ff:ff
4: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default
link/ether 42:02:07:8f:a7:38 brd ff:ff:ff:ff:ff:ff
```
如你所见,在这里,我的网络接口称为 `enp0s31f6`MAC 地址为 `38:42:f8:8b:a7:68`
你可能需要在安全的地方记录下来,以便稍后还原到该原始 MAC 地址。
现在你可以继续更改 MAC 地址。
注意!
如果在当前使用的网络接口上执行此操作,那么可能会中断你的网络连接。因此,请在其他网卡上尝试使用此方法,或者准备重启网络。
#### 方法 1使用 Macchanger 更改 MAC 地址
![][4]
[Macchanger][5] 是查看、修改和操作网卡 MAC 地址的简单程序。它几乎在所有 GNU/Linux 操作系统中都可用,你可以使用发行版的包安装程序进行安装。
在 Arch Linux 或 Manjaro 上:
```
sudo pacman -S macchanger
```
在 Fedora、CentOS 和 RHEL 上:
```
sudo dnf install macchanger
```
在 Debian、Ubuntu、Linux Mint、Kali Linux 上:
```
sudo apt install macchanger
```
**重要!**系统会要求你选择是否应将 `macchanger` 设置为在每次启动或关闭网络设备时自动运行。每当你接到网线或重启 WiFi 时,它都会提供一个新的 MAC 地址。
![Not a good idea to run it automatically][6]
我建议不要自动运行它,除非你确实需要每次更改 MAC 地址。因此选择“No”`Tab` 键),然后按回车键继续。
**如何使用 Macchanger 更改 MAC 地址**
你还记得网络接口名称吗?你在前面的步骤中获得了它。
现在,要将随机 MAC 地址分配给该网卡,请使用:
```
sudo macchanger -r enp0s31f6
```
更改 MAC 后,使用以下命令进行验证:
```
ip addr
```
现在你将看到已经伪造 MAC。
要将 MAC 地址更改为特定值,请使用以下命令指定自定义 MAC 地址:
```
macchanger --mac=XX:XX:XX:XX:XX:XX
```
其中 XX:XX:XX:XX:XX:XX 是你要更改的新 MAC。
最后,要将 MAC 地址恢复为其原始硬件值,请运行以下命令:
```
macchanger -p enp0s31f6
```
但是,你不必如此。重启系统后,更改将自动丢失,并且实际的 MAC 地址将再次恢复。
你可以随时查看手册页以获取更多详细信息。
#### 方法 2使用 iproute2 更改 Mac 地址(中级知识)
我建议你使用 macchanger但如果你不想使用它那么可以使用另一种方法在 Linux 中更改 MAC 地址。
首先,使用以下命令关闭网卡:
```
sudo ip link set dev enp0s31f6 down
```
接下来,使用以下命令设置新的 MAC
```
sudo ip link set dev enp0s31f6 address XX:XX:XX:XX:XX:XX
```
最后,使用以下命令重新打开网络:
```
sudo ip link set dev enp0s31f6 up
```
现在,验证新的 MAC 地址:
```
ip link show enp0s31f6
```
就是这些了。你已经成功地在 Linux 中修改了 MAC 地址。敬请期待 FOSS 更多有关 Linux 教程和技巧的文章。
--------------------------------------------------------------------------------
via: https://itsfoss.com/change-mac-address-linux/
作者:[Dimitrios Savvopoulos][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/itsfoss/
[b]: https://github.com/lujun9972
[1]: https://en.wikipedia.org/wiki/MAC_address
[2]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/airport_wifi_meme.jpg?ssl=1
[3]: https://itsfoss.com/find-network-adapter-ubuntu-linux/
[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/03/Change_MAC_Address_Linux.jpg?ssl=1
[5]: https://github.com/alobbs/macchanger
[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/configuring_mcchanger.jpg?ssl=1
[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/03/Dimitrios.jpg?ssl=1

View File

@ -0,0 +1,98 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12017-1.html)
[#]: subject: (How to Install Netbeans on Ubuntu and Other Linux)
[#]: via: (https://itsfoss.com/install-netbeans-ubuntu/)
[#]: author: (Community https://itsfoss.com/author/itsfoss/)
如何在 Ubuntu 和其他 Linux 上安装 Netbeans
======
> 在本教程中,你将学习在 Ubuntu 和其他 Linux 发行版上安装 Netbeans IDE 的各种方法。
[NetBeans][1] 是一个开源集成开发环境,具有良好的跨平台支持。此工具已被 Java 和 C/C++ 开发社区广泛认可。
开发环境相当灵活。你可以配置它以支持各种开发。实际上,你可以用它来开发 Web、桌面和移动应用而无需离开此平台。这太神奇了不是吗除此之外用户可以添加许多已知语言如 [PHP][2]、C、C++、HTML、[Ajax][3]、JavaScript、JSP、Ruby on Rails 等。
如果你正在了解如何在 Linux 上安装 Netbeans那么有几种方法可以做到。我编写本教程主要是为了 Ubuntu但一些安装方法也适用于其他发行版。
* [使用 apt 在 Ubuntu 上安装 Netbeans][4]:适用于 Ubuntu 和基于 Ubuntu 的发行版,但通常**它是旧版的 Netbeans**
* [使用 Snap 在 Ubuntu 上安装 Netbeans][5]:适用于已启用 Snap 包支持的任何 Linux 发行版
* [使用 Flatpak 安装 Netbeans] [6]:适用于所有支持 Flatpak 包的 Linux 发行版
### 使用 Apt 包管理器在 Ubuntu 上安装 Netbeans IDE
如果在 Ubuntu 软件中心搜索 Netbeans你将找到两个版本的 Netbeans。Apache Netbeans 是 snap 版本,大小较大,但提供了最新的 Netbeans。
只需单击一下即可安装它。无需打开终端。是最简单的方法。
![Apache Netbeans in Ubuntu Software Center][7]
你也可以选择使用 `apt` 命令,但使用 `apt` 时,你无法获得最新的 Netbeans。例如在编写本教程时Ubuntu 18.04 中 Apt 提供 Netbeans 10而 Snap 有最新的 Netbeans 11。
如果你是 [apt 或 apt-get][8] 的粉丝,那么可以[启用 universe 仓库][9],并在终端中使用此命令安装 Netbeans
```
sudo apt install netbeans
```
### 使用 Snap 在任何 Linux 发行版上安装 Netbeans IDE
![][10]
Snap 是一个通用包管理器,如果[发行版上启用了 Snap][11],那么可以使用以下命令安装它:
```
sudo snap install netbeans --classic
```
此过程可能需要一些时间才能完成,因为总下载大小约为 1 GB。完成后你将在应用程序启动器中看到它。
你不仅可以通过 Snap 获取最新的 Netbeans已安装的版本将自动更新到较新版本。
### 使用 Flatpak 安装 Netbeans
[Flatpak][12] 是另一个类似 Snap 的包安装器。默认情况下,某些发行版支持 Flatpak在其他发行版上你可以[启用 Flatpak 支持][13]。
发行版支持 Flatpak 后,你可以使用以下命令安装 Netbeans
```
flatpak install flathub org.apache.netbeans
```
另外,你可以下载源码并自己编译。
- [下载 Netbeans][14]
希望你使用了上面其中一个方法在你的 Ubuntu 上安装了 Netbeans。但你使用的是哪个方法有遇到问题么让我们知道。
--------------------------------------------------------------------------------
via: https://itsfoss.com/install-netbeans-ubuntu/
作者:[Srimanta Koley][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/itsfoss/
[b]: https://github.com/lujun9972
[1]: https://netbeans.org/
[2]: https://www.php.net/
[3]: https://en.wikipedia.org/wiki/Ajax_(programming)
[4]: tmp.ZNFNEC210y#apt
[5]: tmp.ZNFNEC210y#snap
[6]: tmp.ZNFNEC210y#flatpak
[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/03/apache-netbeans-ubuntu-software-center.jpg?ssl=1
[8]: https://itsfoss.com/apt-vs-apt-get-difference/
[9]: https://itsfoss.com/ubuntu-repositories/
[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/03/Install_Netbeans_Linux.jpg?ssl=1
[11]: https://itsfoss.com/install-snap-linux/
[12]: https://flatpak.org/
[13]: https://itsfoss.com/flatpak-guide/
[14]: https://netbeans.apache.org/download/index.html
[15]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/03/srimanta.jpg?ssl=1

View File

@ -0,0 +1,67 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12037-1.html)
[#]: subject: (Connect your Google Drive to Fedora Workstation)
[#]: via: (https://fedoramagazine.org/connect-your-google-drive-to-fedora-workstation/)
[#]: author: (Paul W. Frields https://fedoramagazine.org/author/pfrields/)
将你的 Google Drive 连接到 Fedora 工作站
======
![][1]
有大量的云服务可用于存储重要文档。Google Drive 无疑是最受欢迎的之一。它提供了一组相应的应用程序,例如文档,表格和幻灯片来创建内容。但是,你也可以在 Google Drive 中存储任意内容。本文向你展示如何将其连接到 [Fedora 工作站][2]。
### 添加帐户
Fedora 工作站可在安装后首次启动或者之后的任何时候添加一个帐户。要在首次启动期间添加帐户,请按照提示进行操作。其中包括选择添加一个帐户:
![][3]
选择 Google然后会出现一个登录提示请使用你的 Google 帐户信息登录。
![][4]
请注意,此信息仅传输给 Google而不传输给 GNOME 项目。下一个页面要求你授予访问权限,这是必需的,以便系统桌面可以与 Google 进行交互。向下滚动查看访问请求,然后选择“允许”继续。
你会在移动设备和 Gmail 中收到有关新设备(系统)访问 Google 帐户的通知。这是正常现象。
![][5]
如果你在初次启动时没有执行此操作或者需要重新添加帐户请打开“设置”然后选择“在线账户”来添加帐户。可以通过顶部栏右侧的下拉菜单“齿轮”图标或打开“概览”并输入“settings”来使用它。接着和上面一样。
### 在 Google Drive 中使用“文件”应用
打开“文件”应用(以前称为 “nautilus”。“文件”应用可以通过左侧栏访问。在列表中找到你的 Google 帐户。
当你选择帐户后,“文件”应用会显示你的 Google Drive 的内容。你可以使用 Fedora 工作站的本地应用打开某些文件,例如声音文件或 [LibreOffice][6] 兼容文件(包括 Microsoft Office 文档)。其他文件(例如 Google 文档、表格和幻灯片等 Google 应用文件)将使用浏览器和相应的应用打开。
请记住,如果文件很大,将需要一些时间才能通过网络接收文件,你才可以打开它。
你还可以复制粘贴 Google Drive 中的文件到连接到 Fedora 工作站的其他存储,或者反之。你还可以使用内置功能来重命名文件、创建文件夹并组织它们。对于共享和其他高级选项,请和平常一样在浏览器中使用 Google Drive。
请注意,“文件”应用程序不会实时刷新内容。如果你从其他连接 Google 的设备(例如手机或平板电脑)添加或删除文件,那么可能需要按 `Ctrl+R` 刷新“文件”应用。
--------------------------------------------------------------------------------
via: https://fedoramagazine.org/connect-your-google-drive-to-fedora-workstation/
作者:[Paul W. Frields][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://fedoramagazine.org/author/pfrields/
[b]: https://github.com/lujun9972
[1]: https://fedoramagazine.org/wp-content/uploads/2020/03/gdrive-workstation-816x345.jpg
[2]: https://getfedora.org/workstation
[3]: https://fedoramagazine.org/wp-content/uploads/2020/03/firstboot-choices.jpg
[4]: https://fedoramagazine.org/wp-content/uploads/2020/03/firstboot-signin.jpg
[5]: https://fedoramagazine.org/wp-content/uploads/2020/03/firstboot-grantaccess.jpg
[6]: https://fedoramagazine.org/discover-hidden-gems-libreoffice/
[7]: https://unsplash.com/@beatriz_perez?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
[8]: https://unsplash.com/s/photos/office-files?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText

View File

@ -0,0 +1,116 @@
[#]: collector: (lujun9972)
[#]: translator: (HankChow)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12039-1.html)
[#]: subject: (Coronavirus challenges remote networking)
[#]: via: (https://www.networkworld.com/article/3532440/coronavirus-challenges-remote-networking.html)
[#]: author: (Michael Cooney https://www.networkworld.com/author/Michael-Cooney/)
新型冠状病毒对远程网络的影响
======
> 由于 COVID-19 的肆虐IBM、谷歌、亚马逊、AT&T、思科、苹果等公司都争先恐后地为远程办公提供了技术上的支持这为远程网络带来了不少的压力。
![](https://images.idgesg.net/images/article/2018/02/crisis_survival_strategy_disaster_preparedness_readiness_recovery_continuity_plan_thinkstock_600161484-100749343-large.jpg)
在新型冠状病毒广泛传播的大环境下,很多公司都要求员工留在家中远程办公,远程网络技术因此承受了更大的压力,一些带宽和安全方面的问题也接踵而至。
在过去的几十年当中,由于企业的蓬勃发展,远程办公的人数估计增加了 400 多万。而当前疫情流行的背景下,远程办公的需求激增,有望达到一个新的高峰。
一家<ruby>虚拟私有网络<rt>Virtual Private Network</rt></ruby>(缩写:???)提供商 [Atlas][1] 的一份研究表明,在今年 3 月 9 日到 3 月 15 日之间,美国的虚拟私有网络使用量增加了 53%,并且还会继续提高。而在意大利这个疫情爆发比美国早两周的国家,过去一周内的虚拟私有网络使用量甚至增加了 112%。Atlas 虚拟私有网络的首席执行官 Rachel Welch 在一份声明中称,美国的虚拟私有网络使用量在 3 月底预估会达到 150% 的增幅。
部分企业正在尝试通过<ruby>一日测试<rt>one-day test</rt></ruby>来评估远程办公的可行性。据《[芝加哥论坛报][2]》的报道,摩根大通、晨星以及一家数据分析方面的初创公司 Arity 已经通过让员工在家办公一天来测试整个办公系统的稳定性。
在政府方面,[美国国家海洋与大气管理局][3]和 NASA 都已经进行或计划进行网络方面的压力测试,评估是否有足够的网络容量足以让上千名工作人员远程办公,以及远程办公可能造成的影响。而放眼整个美国,供职于美国政府部门的员工数量在 [200 万][4]左右。
为了避免蜂窝数据网络发生拥堵,美国[联邦通信委员会][5]已批准 T-mobile 临时访问已分配给其它运营商的 600MHz 频段T-mobile 表示“将使用这个频段让美国人更方便地享受远程医疗、参与远程工作和学习,同时在保持‘物理距离’的情况下保持联系”。
- [video](https://youtu.be/-1-ugVx0hVc)
但也有一些业内人士指出,在一些对蜂窝网络有较强依赖的的场景下,“最后一英里”的网络访问会变得非常拥堵。
网络情报公司 ThousandEyes 的主要产品是局域网和广域网性能分析的软件,该公司的产品经理 Alex Cruz Farmer 表示,网络瓶颈在于一些较为偏远的农村地区,因为那些地区的网络基础设施较为薄弱,主要通过微波或蜂窝网络来访问互联网。最大的挑战在于现有的解决方案所能提供的带宽远远不足。
Alex Cruz Farmer 还补充道,尽管持续时间不长,但现在的确已经出现一些由于运营商问题或网络负载增加导致的故障现象。
AT&T 表示目前已经留意到蜂窝网络使用量的变化,但网络容量并没有作出提高。
[AT&T 在一份声明中称][7],在新冠病毒传播最严重的城市中,由于越来越多的人留在了家中远程办公,减少了通勤和人群聚集,很多特定位置和特定时段的蜂窝网络使用量峰值都明显降低了。他们还使用了一些工具对网络带宽进行了统计和监控,通过这些工具,他们可以更直观地了解网络使用情况的趋势,同时获取网络性能和网络容量方面的报告,进而管理整个通信网络。
Verison 表示自从新型冠状病毒疫情爆发以来尽管在家办公的用户数量大增但使用的数据量并没有明显的上升。他们在一份声明中称“Verison 的网络是为满足未来的需求设计建造的,面对各种需求量的增加或使用方式的改变,我们都有充分的准备。虽然这是一次前所未有的社会事件,整个局面也在不断发生改变,但随着不断了解实际需求的变化情况,我们随时可以对网络资源作出调整”。
Verison 一直在关注受影响最严重的地区的网络使用情况并承诺将会与医院、医护人员、政府机构合作制定网络资源使用的优先级以满足他们的需求。Verison 还宣布计划在 2020 年将支出在 170 亿至 180 亿美元的基础上再提高 5 亿美元,以实现“加快 Verison 向 5G 过渡并在困难时期帮助支撑经济”的目标。
### 企业虚拟私有网络安全问题
对于企业来说数据中心与远程用户之间的网络和安全问题解决起来绝非易事尤其是使用虚拟私有网络进行远程访问时来自用户所在住宅网络的访问几乎无法由企业控制。CIMI 公司总裁 Tom Nolle 认为IT 部门有必要验证这些连接是否符合企业的标准(关于 Tom Nolle 更多关于在家办公的看法,可以查阅[这里][8])。
Tom Nolle 认为像 ISP、DNS 和 Wi-Fi 这些常见的家用网络要素都应该作为适合远程办公网络业务认证的一部分。他发现 Google 的 DNS 服务比 ISP 提供的服务更能承受压力OpenDNS 也是一个很好的选择,这说明用户可以考虑使用其中一种。
Tom Nolle 还说,家庭 Wi-Fi 网络的安全性也是一个问题IT 部门应该要求远程办公的员工提交 Wi-Fi 配置的屏幕截图,以保证使用了正确的加密方式。之所以有这样的想法,是因为他觉得很多远程办公的员工都会绕过企业预设的一些安全措施。
DNS 软件公司 BlueCat 的首席战略官 Andrew Wertkin 表示,对一些刚刚开始在家远程办公的员工来说,适当提供相关指导是很有必要的。大部分员工从来没有尝试过在家远程办公,他们或许并不了解安全的重要性。如果员工访问公司网络的时候使用的是个人设备而不是公司设备,就更有可能出现问题。
而使用[虚拟私有网络][9]远程办公的人数激增也会为企业带来成本上的挑战。
“虚拟私有网络设备并不便宜如果考虑到计算资源的成本和每个人的均摊成本迁移到云上的虚拟环境会带来一笔不小的开支这还不包括每个虚拟私有网络许可证价格的上升”Alex Cruz Farmer 坦言。
在容量方面,随着远程访问量的增加,用于分配 IP 地址的 DHCP 服务也会承受巨大的压力。Andrew Wertkin 指出,如果进行远程连接的设备无法获取到网络地址,则是否具有足够的虚拟私有网络许可证并不重要。企业内部必须对这些风险进行测试,了解其中存在瓶颈的部分,并制定规避这些风险的策略。
按照这个思路,企业甚至需要验证数据中心可以用于公开的 SSL 套接字数量,否则也会面临数量不足的风险。
微软 Office 365 产品团队的高级程序经理 Paul Collinge 也表达了类似的担忧。他在一篇关于优化 Office 365 员工远程办公流量的[博客][10]中写道当大量员工在同时接入企业网络时会对诸如虚拟私有网络集中器、中央网络出口设备例如代理、DLP、中央互联网带宽、回程 MPLS 和 NAT 等网络要素产生巨大的压力。最终导致的结果是低下的性能、低下的生产力,以及员工们低下的使用体验。
Alex Cruz Farmer 提出,企业很可能需要增加网络上虚拟私有网络集中器的数量,这样就可以让远程用户分布在多个不同的虚拟私有网络端点上,避免产生拥堵。退而求其次,只能在防火墙上把某些端口放开,允许特定应用程序的公开访问,尽管这样有助于提高工作效率,但却降低了整体的安全性。
### 虚拟私有网络隧道分割技术有效吗?
业内人士对<ruby>隧道分割<rt>tunneling split</rt></ruby>有不同的看法。
BlueCat 的 Andrew Wertkin 认为,虚拟私有网络可以使用隧道分割技术,使得仅有需要访问企业内部网络的流量才通过虚拟私有网络隧道访问,其余流量则直接进入互联网。这意味着会有部分流量不受隧道和企业网络内部的安全控制,用户的计算机会暴露在互联网当中,进而导致企业的数据和网络面临安全风险。
尽管如此,微软在上周还是建议 IT 管理员使用隧道分割技术以缓解 Office 365 由于大量远程用户涌入导致的拥堵问题。微软在[建议][10]中提供了相关接入点的 URL 和 IP 地址列表,并引导 IT 人员如何按照这个方式将流量路由到 Office 365。
按照 Paul Collinge 的说法,虚拟私有网络客户端需要经过配置,才能将流量路由到已标识的 URL/IP/ 端口上,进而为全球的用户提供高性能的服务。
Alex Cruz Farmer 认为,在虚拟私有网络使用率上升之后,企业很有必要对网络安全进行一个全面的审查。对于仍然在使用传统网络安全架构的企业来说,应该开始考虑基于云端的网络安全方案了,这不仅可以提升远程办公的性能,还能减少企业对于广域网的使用量。
其它相关情况:
* [FCC][11] 呼吁宽带提供商应该适当放宽数据传输的限制电话运营商应该适当免除用户的长途电话费远程教育提供商应该合作为社会提供远程学习的机会网络运营商应该优先考虑医院或医疗机构的网络连接需求。对此AT&T 已经作出了相关的回应和行动。
* [美国参议员 Mark R. Warner (D-VA)][12] 和其他 17 名参议员致信了 AT&T、CenturyLink、Charter Communications、Comcast、Cox Communications、Sprint、T-Mobile、Verizon 这八家主要 ISP 的首席执行官,呼吁这些公司应该采取措施应对远程办公、在线教育、远程医疗、远程支持服务等方面需求激增带来的压力。这些参议员在信中呼吁,各公司应该降低可能对远程服务产生影响的限制和费用,同时还应该为受到疫情影响的学生提供免费或收费的宽带服务,否则学生在疫情期间无法接入网络进行在线学习。
* [思科][13]、微软、[谷歌][14]、[LogMeIn][15]、[Spectrum][16] 等供应商都提供了一些免费工具,帮助用户在疫情爆发期间正常进行安全通信。
--------------------------------------------------------------------------------
via: https://www.networkworld.com/article/3532440/coronavirus-challenges-remote-networking.html
作者:[Michael Cooney][a]
选题:[lujun9972][b]
译者:[HankChow](https://github.com/HankChow)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.networkworld.com/author/Michael-Cooney/
[b]: https://github.com/lujun9972
[1]: https://atlasvpn.com/blog/vpn-usage-in-italy-rockets-by-112-and-53-in-the-us-amidst-coronavirus-outbreak/
[2]: https://www.chicagotribune.com/coronavirus/ct-coronavirus-work-from-home-20200312-bscm4ifjvne7dlugjn34sksrz4-story.html
[3]: https://federalnewsnetwork.com/workforce/2020/03/agencies-ramp-up-coronavirus-preparations-as-noaa-plans-large-scale-telework-test/
[4]: https://fas.org/sgp/crs/misc/R43590.pdf
[5]: https://www.fcc.gov/coronavirus
[6]: https://www.networkworld.com/blog/itaas-and-the-corporate-storage-technology/?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE22140&utm_content=sidebar (ITAAS and Corporate Storage Strategy)
[7]: https://about.att.com/pages/COVID-19.html
[8]: https://blog.cimicorp.com/?p=4055
[9]: https://www.networkworld.com/article/3268744/understanding-virtual-private-networks-and-why-vpns-are-important-to-sd-wan.html
[10]: https://techcommunity.microsoft.com/t5/office-365-blog/how-to-quickly-optimize-office-365-traffic-for-remote-staff-amp/ba-p/1214571
[11]: https://www.fcc.gov/document/commissioner-starks-statement-fccs-response-covid-19
[12]: https://www.warner.senate.gov/public/_cache/files/2/3/239084db-83bd-4641-bf59-371cb829937a/A99E41ACD1BA92FB37BDE54E14A97BFA.letter-to-isps-on-covid-19-final-v2.-signed.pdf
[13]: https://blogs.cisco.com/collaboration/cisco-announces-work-from-home-webex-contact-center-quick-deployment
[14]: https://cloud.google.com/blog/products/g-suite/helping-businesses-and-schools-stay-connected-in-response-to-coronavirus
[15]: https://www.gotomeeting.com/work-remote?clickid=RFlSQF3DBxyOTSr0MKVSfWfHUknShrScK0%3AhTY0&irgwc=1&cid=g2m_noam_ir_aff_cm_pl_ct
[16]: https://www.multichannel.com/news/charter-opening-wi-fi-hotspots-in-face-of-covid-19
[17]: https://www.facebook.com/NetworkWorld/
[18]: https://www.linkedin.com/company/network-world

View File

@ -0,0 +1,141 @@
[#]: collector: (lujun9972)
[#]: translator: (wxy)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12014-1.html)
[#]: subject: (Top 10 open source tools for working from home)
[#]: via: (https://opensource.com/article/20/3/open-source-working-home)
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
在家工作的十大开源工具
======
> 无论你是在家工作的资深人士还是远程工作的新手,这些工具都可以使交流和协作变得轻而易举。
![](https://img.linux.net.cn/data/attachment/album/202003/20/103814bwxxqxkxc9qqxkbb.jpg)
如果你<ruby>在家工作<rt>work from home</rt></ruby>WFH你就会知道拥有一系列实用的工具是很重要的这些工具可以让你远离烦恼专注于重要的事情。在工作期间工作越努力工作日结束后你就越容易放松。
我已经在家工作多年了,这是我精选的远程工作者必备的最佳开源工具。
### 视频会议Jitsi
![Jitsi screenshot][2]
当你不在同事身边时,每周保持连接几次非常重要,甚至只是这样也可以保持人与人之间的联系,否则你就会变得孤独。市场上有很多视频会议系统,但以我的经验,最简单、最好的是开源的 [Jitsi][3]。
通过易于记忆的 URL[meet.jit.si][3]和按需会议室Jitsi 使得召开即席会议非常简单。而且更好的是,无需注册。你只需进入 [meet.jit.si][3],找到一个带有友好的、随机生成的 URL此处没有字母和数字的随机组合 的会议室,你就可以立即开始聊天。如果你选择注册,那么还可以与几种日历进行集成。
在现实生活中,我参加了许多来自新西兰最偏远地区的会议,而 Jitsi 无疑是我迄今为止拥有的最好的视频聊天体验。不需要浪费一半的会议时间在迷宫般的虚拟会议室中寻找彼此,也不用在尴尬的滞后时间中坐着发呆,更不用努力地为聊天应用程序安装更新。使用开源和符合标准的 webRTC 协议的 Jitsi 可以让你有个愉悦的开会体验。
### 白板Drawpile
![Drawpile screenshot][4]
有时,白板非常适合解释事情、跟踪想法或只是散布一下疯狂的想法。白板是办公室会议室的常见物品,但在数字世界中却很难获得。幸运的是,有了 [Drawpile][5],这是一个实时协作的绘图应用程序。你可以在自己的计算机上托管绘图会话并邀请其他用户,也可以在 Drawpile 的服务器上托管会话。
它易于使用,足够精简、直观而功能强大,当你的粗略想法开始逐渐成型时,它是使其成为可行的作品的应用程序。
### 看板Taiga
![Taiga screenshot][6]
想要保持有序并与你的部门保持同步吗?你应该试试 [Taiga][7],这是一个虚拟的“便利贴”面板,可以帮助团队跟踪各个任务。这种组织和项目计划方法被称为<ruby>看板<rt>kanban</rt></ruby>,在软件开发中很流行,而它也流行于从假期规划到家庭装修项目的所有计划之中。
Taiga 的优点是它是一个在线共享空间。与你进行协作或与之合作的任何人都可以把任务放到面板上并且随着每个人的进展他们将任务从左列起点移到右边终点线。Taiga 具有令人愉悦的图形化和交互性,没有什么比从一列移动到另一列的拖放任务令人感到舒适的了。
如果你的团队有 Taiga 无法满足的特定需求,那么你应该看看[我们挑选的最佳开源看板][8]。
### 个人笔记本Joplin
![Joplin][9]
我在办公桌旁放着一个纸质笔记本,这样我就可以随时记下思考或想法了。想要捕捉这种简单动作的感受和便利是很棘手的,但 Joplin 却做的很好。
你可以在 Joplin 中创建虚拟笔记本,每个笔记本可以有任意数量的条目。这些条目可以是简单的文本,也可以是带有图形、任务列表、超链接等的复杂的动态文档。最重要的是,你可以将 Joplin 与所有的在线存储服务同步,包括开源的 Nextcloud 服务,这样你可以在任何计算机和任何设备上使用笔记本。这是使你的工作日井井有条、专心致志并保持活动顺畅的好方法。
如果 Joplin 不太满足你的要求,请查看一些我们最喜欢的[笔记本应用][10]。
### 群聊Riot
![Riot screenshot][11]
并非所有内容都需要视频聊天或语音通话,但是有些事情比电子邮件更紧急。这就是团队聊天发挥作用的地方。一个好的群聊应用程序应该具有这些功能:即时消息传递、支持表情符号、支持 GIF 和图像,按需聊天室或“频道”、广泛的兼容性和隐私性。[Matrix][12] 是一个用于实时通信的开放标准和轻量级协议,如果你厌烦于键入大段消息,则可以使用相同的协议快速切换到 VOIP。你将获得世界上最好的群聊体验。
Matrix 是一种协议,并且有许多应用程序可以接驳到它(就像使用 Internet 协议一样Firefox 是使人类可以访问的应用程序)。最受欢迎的客户端之一是 [Riot.im][13]。你可以为你的计算机和手机下载 Riot并且只是短时间使用的话可以通过 Web 浏览器连接到 Riot。你的团队总是会近在咫尺但永远不会近到让你感到不舒服。
### 共享文档Etherpad
![Etherpad screenshot][14]
如果你想与他人协作处理文档或与开会,则仅需 Etherpad 就行。Etherpad 是一个实时共享的文字处理器。可以邀请一个或多个人访问文档,并在每个人进行添加和编辑时进行观察。这是一种快速有效的方法,可将想法记入“纸上”并一起迭代修订。
有几种使用 Etherpad 的方法。如果你拥有良好的 IT 支持,则可以要求你的 IT 部门为你的组织托管一个 Etherpad 实例。否则,将有来自开源支持者的在线公共实例,例如 [Riseup][15] 和 [Etherpad][16] 本身所提供的。
### 共享电子表格Ethercalc
![Ethercalc screenshot][17]
与 Etherpad 相似,在线 [Ethercalc][18] 编辑器允许多个用户同时在同一屏幕上远程地在电子表格上工作。Ethercalc 甚至可以从现有电子表格和定界文本文件中导入数据。你可能会也可能不会丢失大部分格式,具体取决于要导入的内容的复杂性,但是我从来没有弄坏过我的数据,因此导入文件总是一个好的开始。 下次需要复杂公式的帮助时,或者需要在最新预算中输入收据时,或者只是需要某人在格子上的输入时,请将其输入到 Ethercalc。
### 共享存储与日历Nextcloud
![Nextcloud screenshot][19]
[Nextcloud][20] 是一个心存远志的应用程序。顾名思义,它是你自己的个人云。它最明显的切入点是在线共享存储,它可以与台式机和移动设备上的文件夹同步。将文件放入文件中,文件会上传到存储空间,然后当一切内容都同步后,它们会出现在所有设备上。为组织中的每个人提供一个帐户,你马上便拥有了共享的存储空间,可以通过单击鼠标单击以共享带有或不带有密码的文件和文件夹。
但是除了充当共享数据的保管箱之外Nextcloud 还有很多其他功能。由于其插件式结构,你可以将无数的 Web 应用程序安装到 Nextcloud 中,例如聊天客户端、电子邮件客户端、视频聊天等等。并非所有插件都是“官方的”,因此其支持服务各不相同,但是有几个非常好的官方插件。值得注意的是,有一个官方的日历应用程序,你和你的同事可以用它安排会议并跟踪即将发生的重要事件。该日历使用 CalDAV 协议,因此你所做的一切都可以与任何 CalDAV 客户端兼容。
### LibreOffice
![LibreOffice screenshot][21]
如果你习惯于每天一整天都在办公室里工作,那么你也可能习惯整天在办公套件里工作。包含所有常用功能的面面俱到的应用程序会令人感到某种程度的舒适,而在开源办公世界中的这样的应用程序就是 [LibreOffice][22]。它具有办公套件所应有的一切:文字处理器、电子表格和幻灯片演示。它还具有超出预期的功能,例如基于矢量的绘图应用程序,它还可以编辑 PDF 文件,还有一个带有图形界面构建器的关系型数据库。如果你正在寻找一个好的办公应用程序,那么 LibreOffice 是你应该首先看一看的,因为一旦你使用它,你就再也不用看别的了。
### Linux
![][23]
如果你不熟悉远程工作而可能是由于某种原因而正在经历一场重大变革。对于某些人来说变革的时光是一个极好的动力它可以一劳永逸地改变一切。如果你是其中的一员那么可能是时候更改一下整个操作系统了。Windows 和 Mac 可能在过去为你提供了很好的服务,但是如果你希望从非开源软件转向开源软件,为什么不换一下运行所有这些应用程序的平台呢?
有许多出色的 Linux 发行版可以让你认真地工作、认真地自我管理和认真地进阶。获取一份 Linux 副本,不论是 [Fedora][24]、[Elementary][25] 还是 [Red Hat Enterprise Linux][26] 的长期支持订购,去尝试使用自由的开源操作系统吧。等你熟悉了远程人的生活时,你最终将成为一名 Linux 专家!
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/3/open-source-working-home
作者:[Seth Kenlon][a]
选题:[lujun9972][b]
译者:[wxy](https://github.com/wxy)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/seth
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/oatmeal-and-fedora.jpg?itok=NBFUH9eF (Oatmeal and a laptop.)
[2]: https://opensource.com/sites/default/files/uploads/jitsi_0.jpg (Jitsi screenshot)
[3]: http://meet.jit.si
[4]: https://opensource.com/sites/default/files/uploads/drawpile-whiteboard.jpg (Drawpile screenshot)
[5]: https://drawpile.net/
[6]: https://opensource.com/sites/default/files/uploads/taiga_kanban_screen_0.jpg (Taiga screenshot)
[7]: http://taiga.io
[8]: https://opensource.com/alternatives/trello
[9]: https://opensource.com/sites/default/files/joplin_0.png (Joplin)
[10]: https://opensource.com/alternatives/evernote
[11]: https://opensource.com/sites/default/files/uploads/riot-matrix.jpg (Riot screenshot)
[12]: http://matrix.org
[13]: http://riot.im
[14]: https://opensource.com/sites/default/files/uploads/etherpad.jpg (Etherpad screenshot)
[15]: https://pad.riseup.net/
[16]: https://beta.etherpad.org
[17]: https://opensource.com/sites/default/files/uploads/ethercalc.jpg (Ethercalc screenshot)
[18]: https://ethercalc.org
[19]: https://opensource.com/sites/default/files/uploads/nextcloud-calendar.jpg (Nextcloud screenshot)
[20]: http://nextcloud.com
[21]: https://opensource.com/sites/default/files/uploads/libreoffice.png (LibreOffice screenshot)
[22]: http://libreoffice.org
[23]: https://opensource.com/sites/default/files/uploads/advent-pantheon.jpg
[24]: https://getfedora.org/
[25]: https://elementary.io
[26]: https://www.redhat.com/en/store/red-hat-enterprise-linux-workstation

View File

@ -0,0 +1,151 @@
[#]: collector: (lujun9972)
[#]: translator: (HankChow)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12038-1.html)
[#]: subject: (Manually rotating log files on Linux)
[#]: via: (https://www.networkworld.com/article/3531969/manually-rotating-log-files-on-linux.html)
[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/)
在 Linux 系统中手动滚动日志
======
![](https://img.linux.net.cn/data/attachment/album/202003/25/223932xqibwq5fafx5ao3f.jpg)
<ruby>日志滚动<rt>log rotation</rt></ruby>在 Linux 系统上是再常见不过的一个功能了,它为系统监控和故障排查保留必要的日志内容,同时又防止过多的日志造成单个日志文件太大。
日志滚动的过程是这样的:在一组日志文件之中,编号最大的(最旧的)一个日志文件会被删除,其余的日志文件编号则依次增大并取代较旧的日志文件,而较新的文件则取代它作为当前的日志文件。这一个过程很容易就可以实现自动化,在细节上还能按需作出微调。
使用 `logrotate` 命令可以手动执行日志滚动的操作。本文将要介绍的就是手动进行日志滚动的方法,以及预期产生的结果。
文中出现的示例适用于 Ubuntu 等 Linux 系统,对于其它类型的系统,日志文件和配置文件可能会有所不同,但日志滚动的过程是大同小异的。
### 为什么需要滚动日志
一般情况下无需手动旋转日志文件。Linux 系统会每隔一天(或间隔更长的时间)或根据日志文件的大小自动进行一次日志滚动。如果你需要滚动日志以释放存储空间,又或者将某一部分日志从当前的活动中分割出来,这很容易做到,具体要取决于文件滚动规则。
### 一点背景介绍
在 Linux 系统安装完成后就已经有很多日志文件被纳入到日志滚动的范围内了。另外,一些应用程序在安装时也会为自己产生的日志文件设置滚动规则。一般来说,日志滚动的配置文件会放置在 `/etc/logrotate.d`。如果你想了解日志滚动的详细实现,可以参考[这篇以前的文章][4]。
在日志滚动的过程中,活动日志会以一个新名称命名,例如 `log.1`,之前被命名为 `log.1` 的文件则会被重命名为 `log.2`,依此类推。在这一组文件中,最旧的日志文件(假如名为 `log.7`)会从系统中删除。日志滚动时文件的命名方式、保留日志文件的数量等参数是由 `/etc/logrotate.d` 目录中的配置文件决定的,因此你可能会看到有些日志文件只保留少数几次滚动,而有些日志文件的滚动次数会到 7 次或更多。
例如 `syslog` 在经过日志滚动之后可能会如下所示(注意,行尾的注释部分只是说明滚动过程是如何对文件名产生影响的):
```
$ ls -l /var/log/syslog*
-rw-r----- 1 syslog adm 128674 Mar 10 08:00 /var/log/syslog <== 新文件
-rw-r----- 1 syslog adm 2405968 Mar 9 16:09 /var/log/syslog.1 <== 之前的 syslog
-rw-r----- 1 syslog adm 206451 Mar 9 00:00 /var/log/syslog.2.gz <== 之前的 syslog.1
-rw-r----- 1 syslog adm 216852 Mar 8 00:00 /var/log/syslog.3.gz <== 之前的 syslog.2.gz
-rw-r----- 1 syslog adm 212889 Mar 7 00:00 /var/log/syslog.4.gz <== 之前的 syslog.3.gz
-rw-r----- 1 syslog adm 219106 Mar 6 00:00 /var/log/syslog.5.gz <== 之前的 syslog.4.gz
-rw-r----- 1 syslog adm 218596 Mar 5 00:00 /var/log/syslog.6.gz <== 之前的 syslog.5.gz
-rw-r----- 1 syslog adm 211074 Mar 4 00:00 /var/log/syslog.7.gz <== 之前的 syslog.6.gz
```
你可能会发现,除了当前活动的日志和最新一次滚动的日志文件之外,其余的文件都已经被压缩以节省存储空间。这样设计的原因是大部分系统管理员都只需要查阅最新的日志文件,其余的日志文件压缩起来,需要的时候可以解压查阅,这是一个很好的折中方案。
### 手动日志滚动
你可以这样执行 `logrotate` 命令进行手动日志滚动:
```
$ sudo logrotate -f /etc/logrotate.d/rsyslog
```
值得一提的是,`logrotate` 命令使用 `/etc/logrotate.d/rsyslog` 这个配置文件,并通过了 `-f` 参数实行“强制滚动”。因此,整个过程将会是:
- 删除 `syslog.7.gz`
- 将原来的 `syslog.6.gz` 命名为 `syslog.7.gz`
- 将原来的 `syslog.5.gz` 命名为 `syslog.6.gz`
- 将原来的 `syslog.4.gz` 命名为 `syslog.5.gz`
- 将原来的 `syslog.3.gz` 命名为 `syslog.4.gz`
- 将原来的 `syslog.2.gz` 命名为 `syslog.3.gz`
- 将原来的 `syslog.1.gz` 命名为 `syslog.2.gz`
- 但新的 `syslog` 文件不一定必须创建。
你可以按照下面的几条命令执行操作,以确保文件的属主和权限正确:
```
$ sudo touch /var/log/syslog
$ sudo chown syslog:adm /var/log/syslog
$ sudo chmod 640 /var/log/syslog
```
你也可以把以下这一行内容添加到 `/etc/logrotate.d/rsyslog` 当中,由 `logrotate` 来帮你完成上面三条命令的操作:
```
create 0640 syslog adm
```
整个配置文件的内容是这样的:
```
/var/log/syslog
{
rotate 7
daily
missingok
notifempty
create 0640 syslog adm <==
delaycompress
compress
postrotate
/usr/lib/rsyslog/rsyslog-rotate
endscript
}
```
下面是手动滚动记录用户登录信息的 `wtmp` 日志的示例。由于 `/etc/logrotate.d/wtmp` 中有 `rotate 2` 的配置,因此系统中只保留了两份 `wtmp` 日志文件。
滚动前:
```
$ ls -l wtmp*
-rw-r----- 1 root utmp 1152 Mar 12 11:49 wtmp
-rw-r----- 1 root utmp 768 Mar 11 17:04 wtmp.1
```
执行滚动命令:
```
$ sudo logrotate -f /etc/logrotate.d/wtmp
```
滚动后:
```
$ ls -l /var/log/wtmp*
-rw-r----- 1 root utmp 0 Mar 12 11:52 /var/log/wtmp
-rw-r----- 1 root utmp 1152 Mar 12 11:49 /var/log/wtmp.1
-rw-r----- 1 root adm 99726 Feb 21 07:46 /var/log/wtmp.report
```
需要知道的是,无论发生的日志滚动是自动滚动还是手动滚动,最近一次的滚动时间都会记录在 `logrorate` 的状态文件中。
```
$ grep wtmp /var/lib/logrotate/status
"/var/log/wtmp" 2020-3-12-11:52:57
```
--------------------------------------------------------------------------------
via: https://www.networkworld.com/article/3531969/manually-rotating-log-files-on-linux.html
作者:[Sandra Henry-Stocker][a]
选题:[lujun9972][b]
译者:[HankChow](https://github.com/HankChow)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.networkworld.com/author/Sandra-Henry_Stocker/
[b]: https://github.com/lujun9972
[1]: https://www.flickr.com/photos/klif/4244284159/in/photolist-7t44P6-oPFpsr-a8c5W-gWNZ6-32EEo4-cjdxqy-diHaq9-8DYZWf-gWNWM-bgLApc-hBt94C-cj71kY-PMESV-dZBcCU-pSqgNM-51eKHq-EecbfS-osGNau-KMUx-nFaWEL-cj71PE-HFVXn-gWNWs-85HueR-8QpDh8-kV1dEc-76qYSV-5YnxuS-gWNXr-dYoQ5w-dzj1j3-3AJyd-mHbaWF-q2fTri-e9bFa6-nJyvfR-4PnMyH-gWNZr-8VUtGS-gWNWZ-ajzUd4-2hAjMk-gWW3g-gWP11-dwYbH5-4XMew-cj71B1-ica9kJ-5RonM6-8z5tGL
[2]: https://creativecommons.org/licenses/by/2.0/legalcode
[3]: https://www.networkworld.com/newsletters/signup.html
[4]: https://www.networkworld.com/article/3218728/how-log-rotation-works-with-logrotate.html
[5]: https://www.networkworld.com/blog/itaas-and-the-corporate-storage-technology/?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE22140&utm_content=sidebar (ITAAS and Corporate Storage Strategy)
[6]: https://www.facebook.com/NetworkWorld/
[7]: https://www.linkedin.com/company/network-world

View File

@ -0,0 +1,106 @@
[#]: collector: (lujun9972)
[#]: translator: (wxy)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12029-1.html)
[#]: subject: (Linus Torvalds Advice on Working From Home during Coronavirus Lockdown)
[#]: via: (https://itsfoss.com/torvalds-remote-work-advice/)
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
Linus Torvalds 关于在冠状病毒禁足期间在家工作的建议
======
在冠状病毒爆发期间,我们中的许多人都在室内自我隔离。[ZDNet][1] 特此与 Linus Torvalds 进行了专题采访,讨论了他对冠状病毒禁足期间在家工作的看法或想法。
如果你还不知道(怎么可能不知道),[Linus Torvalds][2] 是 Linux 的创建者,也是 [Git][3] 的创建者,而所有这一切都是他在家里工作时做的。这是 2016 年的视频Torvalds 展示了他的家庭办公室:
- [video](https://img.linux.net.cn/static/video/Linus%20Torvalds%20Guided%20Tour%20of%20His%20Home%20Office-SOXeXauRAm0.mp4)
因此,在本文中,我将分享我关注的一些主要要点,以及来自 Linus Torvalds 接受 ZDNet [Steven J. Vaughan-Nichols][4] 采访互动时的回应。
### 消除对人际交往缺失的恐惧
Linus 提到,几年前刚开始在家工作时,他担心过缺少人与人之间的互动,包括去办公室、与人互动或哪怕只是出去吃个午餐。
有趣的是,他似乎并没有错过任何东西,他更喜欢在家中没有人际交往的时间。
当然,将自己与人际互动隔离开并不是最好的事情 ,但在目前看来,这是一件好事。
### 利用在家工作的优势
![][5]
就像我们是完全远程操作一样,你可以做很多事情,而无需实际在办公室。
不要忘记,你可以随心所欲地养猫,我有 6 只猫,我知道这很困难(*哈哈*)。
而且,正如 Linus 所提到的,远程工作的真正优势在于“灵活性”。你不一定需要朝九晚五甚至更长的时间坐在办公桌前。从技术上讲,你可以在工作中自由休息,并在家中做你想做的任何事情。
换句话说Linus 建议**不要在你的家中重新搞一个办公室**,这比去办公室还差。
### 高效沟通是关键
![][6]
虽然你可以在一天之中召开几次会议(视频会议或音频呼叫),但这真的有必要吗?
对于某些人来说,这可能很重要,但是你应该通过简化和整理内容来尽量减少会议花费的时间。
或者,按照 Linus 的建议,最好有个电子邮件列表来记录事情,以确保一切各司其职,这就是 [Linux 内核][7] 的运行方式。
James Bottomley 是 [IBM 研究院][8]的杰出工程师,也是资深 Linux 内核开发人员,他也建议你重新阅读你的文字以确保发送的准确信息不会被人不小心跳过。
就个人而言,出于同样的原因,我更喜欢文本而不是语音。实际上,它可以节省你的时间。
但是,请记住,你需要只以适当的方式传达必要的信息,而不要使通过文本/电子邮件发送的信息过载。
### 追踪你的时间
灵活性并不一定意味着你可以减少工作量并泡在社交媒体平台上,除非那就是你的工作。
因此,你需要确保充分利用自己的时间。为此,你可以使用多种工具来跟踪你的时间用在什么地方,以及在计算机上花费的时间。
你甚至可以将其记录在便签上,以确保你可以将时间高效地分配于工作上。你可以选择使用 [RescueTime][9] 或 [ActivityWatch][10] 来跟踪你在计算机或智能手机上花费的时间。
### 和猫(宠物)一起玩
![][11]
不歧视其他宠物,但这就是 Linus Torvalds 提到的。
正因为你在家中,你在安排工作或尝试有效利用时间时要做的事情有很多。
Linus 坚持认为,每当你感到无聊时,可以在必要时出门获取必需品,也可以与猫(或你的其它宠物)一起玩。
### 结语
虽然 Linus 还提到了当你在家时没人会评判你,但他的建议似乎是正确的,对于那些在家工作的人来说可能很有用。
不仅是因为冠状病毒的爆发,而且如果你打算一直在家工作,应该牢记这些。
你如何看待 Linus 的看法呢?你同意他的观点吗?
--------------------------------------------------------------------------------
via: https://itsfoss.com/torvalds-remote-work-advice/
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[wxy](https://github.com/wxy)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://www.zdnet.com/article/pet-the-cat-own-the-bathrobe-linus-torvalds-on-working-from-home/
[2]: https://en.wikipedia.org/wiki/Linus_Torvalds
[3]: https://git-scm.com/
[4]: https://twitter.com/sjvn
[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/Work-from-Home-torvalds.jpg?ssl=1
[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/03/torvalds-home-office.jpg?ssl=1
[7]: https://en.wikipedia.org/wiki/Linux_kernel
[8]: https://www.research.ibm.com/
[9]: https://www.rescuetime.com/
[10]: https://activitywatch.net/
[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/torvalds-penguins.jpeg?ssl=1

View File

@ -1,71 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (NSA cloud advice, Facebook open source year in review, and more industry trends)
[#]: via: (https://opensource.com/article/20/1/nsa-facebook-more-industry-trends)
[#]: author: (Tim Hildred https://opensource.com/users/thildred)
NSA cloud advice, Facebook open source year in review, and more industry trends
======
A weekly look at open source community and industry trends.
![Person standing in front of a giant computer screen with numbers, data][1]
As part of my role as a senior product marketing manager at an enterprise software company with an open source development model, I publish a regular update about open source community, market, and industry trends for product marketers, managers, and other influencers. Here are five of my and their favorite articles from that update.
## [Facebook open source year in review][2]
> Last year was a busy one for our [open source][3] engineers. In 2019 we released 170 new open source projects, bringing our portfolio to a total of 579 [active repositories][3]. While its important for our internal engineers to contribute to these projects (and they certainly do — with more than 82,000 commits this year), we are also incredibly grateful for the massive support from external contributors. Approximately 2,500 external contributors committed more than 32,000 changes. In addition to these contributions, nearly 93,000 new people starred our projects this year, growing the most important component of any open source project — the community! Facebook Open Source would not be here without your contributions, so we want to thank you for your participation in 2019.
**The impact**: Facebook got ~33% more changes than they would have had they decided to develop these as closed projects. Organizations addressing similar challenges got an 82,000-commit boost in exchange. What a clear illustration of the business impact of open source development.
## [Cloud advice from the NSA][4]
> This document divides cloud vulnerabilities into four classes (misconfiguration, poor access control, shared tenancy vulnerabilities, and supply chain vulnerabilities) that encompass the vast majority of known vulnerabilities. Cloud customers have a critical role in mitigating misconfiguration and poor access control, but can also take actions to protect cloud resources from the exploitation of shared tenancy and supply chain vulnerabilities. Descriptions of each vulnerability class along with the most effective mitigations are provided to help organizations lock down their cloud resources. By taking a risk-based approach to cloud adoption, organizations can securely benefit from the clouds extensive capabilities.
**The impact**: The Fear, Uncertainty, and Doubt (FUD) that has been associated with cloud adoption is being debunked more all the time. None other then the US Department of Defense has done a lot of the thinking so you don't have to, and there is a good chance that their concerns are at least as dire as yours are.
## [With Kubernetes, China Minsheng Bank transformed its legacy applications][5]
> But all of CMBCs legacy applications—for example, the core banking system, payment systems, and channel systems—were written in C and Java, using traditional architecture. “We wanted to do distributed applications because in the past we used VMs in our own data center, and that was quite expensive and with low resource utilization rate,” says Zhang. “Our biggest challenge is how to make our traditional legacy applications adaptable to the cloud native environment.” So far, around 20 applications are running in production on the Kubernetes platform, and 30 new applications are in active development to adopt the Kubernetes platform.
**The impact**: This illustrates nicely the challenges and opportunities facing businesses in a competitive environment, and suggests a common adoption pattern. Do new stuff the new way, and move the old stuff as it makes sense.
## [The '5 Rs' of the move to cloud native: Re-platform, re-host, re-factor, replace, retire][6]
> The bottom line is that telcos and service providers will go cloud native when it is cheaper for them to migrate to the cloud and pay cloud costs than it is to remain in the data centre. That time is now and by adhering to the "5 Rs" of the move to cloud native, Re-platform, Re-host, Re-factor, Replace and/or Retire, the path is open, clearly marked and the goal eminently achievable.
**The impact**: Cloud-native is basically used as a synonym for open source in this interview; there is no other type of technology that will deliver the same lift.
## [Fedora CoreOS out of preview][7]
> Fedora CoreOS is a new Fedora Edition built specifically for running containerized workloads securely and at scale. Its the successor to both [Fedora Atomic Host][8] and [CoreOS Container Linux][9] and is part of our effort to explore new ways of assembling and updating an OS. Fedora CoreOS combines the provisioning tools and automatic update model of Container Linux with the packaging technology, OCI support, and SELinux security of Atomic Host.  For more on the Fedora CoreOS philosophy, goals, and design, see the [announcement of the preview release][10].
**The impact**: Collapsing these two branches of the Linux family tree into one another moves the state of the art forward for everyone (once you get through the migration).
_I hope you enjoyed this list of what stood out to me from last week and come back next Monday for more open source community, market, and industry trends._
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/1/nsa-facebook-more-industry-trends
作者:[Tim Hildred][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/thildred
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/data_metrics_analytics_desktop_laptop.png?itok=9QXd7AUr (Person standing in front of a giant computer screen with numbers, data)
[2]: https://opensource.com/article/20/1/hybrid-developer-future-industry-trends
[3]: https://opensource.facebook.com/
[4]: https://media.defense.gov/2020/Jan/22/2002237484/-1/-1/0/CSI-MITIGATING-CLOUD-VULNERABILITIES_20200121.PDF
[5]: https://www.cncf.io/blog/2020/01/23/with-kubernetes-china-minsheng-bank-transformed-its-legacy-applications-and-moved-into-ai-blockchain-and-big-data/
[6]: https://www.telecomtv.com/content/cloud-native/the-5-rs-of-the-move-to-cloud-native-re-platform-re-host-re-factor-replace-retire-37473/
[7]: https://fedoramagazine.org/fedora-coreos-out-of-preview/
[8]: https://www.projectatomic.io/
[9]: https://coreos.com/os/docs/latest/
[10]: https://fedoramagazine.org/introducing-fedora-coreos/

View File

@ -1,71 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (The Y2038 problem in the Linux kernel, 25 years of Java, and other industry news)
[#]: via: (https://opensource.com/article/20/2/linux-java-and-other-industry-news)
[#]: author: (Tim Hildred https://opensource.com/users/thildred)
The Y2038 problem in the Linux kernel, 25 years of Java, and other industry news
======
A weekly look at open source community and industry trends.
![Person standing in front of a giant computer screen with numbers, data][1]
As part of my role as a senior product marketing manager at an enterprise software company with an open source development model, I publish a regular update about open source community, market, and industry trends for product marketers, managers, and other influencers. Here are five of my and their favorite articles from that update.
## [Need 32-bit Linux to run past 2038? When version 5.6 of the kernel pops, you're in for a treat][2]
> Arnd Bergmann, an engineer working on the thorny Y2038 problem in the Linux kernel, posted to the [mailing list][3] that, yup, Linux 5.6 "should be the first release that can serve as a base for a 32-bit system designed to run beyond year 2038."
**The impact:** Y2K didn't get fixed; it just got bigger and delayed. There is no magic in software or computers; just people trying to solve complicated problems as best they can, and some times introducing more complicated problems for different people to solve at some point in the future.
## [What the dev? Celebrating Java's 25th anniversary][4]
> Java is coming up on a big milestone: Its 25th anniversary! To celebrate, we take a look back over the last 25 years to see how Java has evolved over time. In this episode, Social Media and Online Editor Jenna Sargent talks to Rich Sharples, senior director of product management for middleware at Red Hat, to learn more.
**The impact:** There is something comforting about immersing yourself in a deep well of lived experience. Rich clearly lived through what he is talking about and shares insider knowlege with you (and his dog).
## [Do I need an API Gateway if I use a service mesh?][5]
> This post may not be able to break through the noise around API Gateways and Service Mesh. However, its 2020 and there is still abundant confusion around these topics. I have chosen to write this to help bring real concrete explanation to help clarify differences, overlap, and when to use which. Feel free to [@ me on twitter (@christianposta)][6] if you feel Im adding to the confusion, disagree, or wish to buy me a beer (and these are not mutually exclusive reasons).
**The impact:** Yes, though they use similar terms and concepts they have different concerns and scopes.
## [What Australia's AGL Energy learned about Cloud Native compliance][7]
> This is really at the heart of what open source is, enabling everybody to contribute equally. Within large enterprises, there are controls that are needed, but if we can automate the management of the majority of these controls, we can enable an amazing culture and development experience.
**The impact:** They say "software is eating the world" and "developers are the new kingmakers." The fact that compliance in an energy utility is subject to developer experience improvement basically proves both statements.
## [Monoliths are the future][8]
> And then what they end up doing is creating 50 deployables, but its really a _distributed_ monolith. So its actually the same thing, but instead of function calls and class instantiation, theyre initiating things and throwing it over a network and hoping that it comes back. And since they cant reliably _make it_ come back, they introduce things like [Prometheus][9], [OpenTracing][10], all of this stuff. Im like, **“What are you doing?!”**
**The impact:** Do things for real reasons with a clear-eyed understanding of what those reasons are and how they'll make your business or your organization better.
_I hope you enjoyed this list of what stood out to me from last week and come back next Monday for more open source community, market, and industry trends._
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/2/linux-java-and-other-industry-news
作者:[Tim Hildred][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/thildred
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/data_metrics_analytics_desktop_laptop.png?itok=9QXd7AUr (Person standing in front of a giant computer screen with numbers, data)
[2]: https://www.theregister.co.uk/2020/01/30/linux_5_6_2038/
[3]: https://lkml.org/lkml/2020/1/29/355
[4]: https://whatthedev.buzzsprout.com/673192/2543290-celebrating-java-s-25th-anniversary-episode-16
[5]: https://blog.christianposta.com/microservices/do-i-need-an-api-gateway-if-i-have-a-service-mesh/ (Do I Need an API Gateway if I Use a Service Mesh?)
[6]: http://twitter.com/christianposta?lang=en
[7]: https://thenewstack.io/what-australias-agl-energy-learned-about-cloud-native-compliance/
[8]: https://changelog.com/posts/monoliths-are-the-future
[9]: https://prometheus.io/
[10]: https://opentracing.io

View File

@ -1,66 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Building a Linux desktop, CERN powered by Ceph, and more industry trends)
[#]: via: (https://opensource.com/article/20/2/linux-desktop-cern-more-industry-trends)
[#]: author: (Tim Hildred https://opensource.com/users/thildred)
Building a Linux desktop, CERN powered by Ceph, and more industry trends
======
A weekly look at open source community and industry trends.
![Person standing in front of a giant computer screen with numbers, data][1]
As part of my role as a senior product marketing manager at an enterprise software company with an open source development model, I publish a regular update about open source community, market, and industry trends for product marketers, managers, and other influencers. Here are five of my and their favorite articles from that update.
## [Building a Linux desktop for cloud-native development][2]
> This post covers the building of my Linux Desktop PC for Cloud Native Development. I'll be covering everything from parts, to peripherals, to CLIs, to SaaS software with as many links and snippets as I can manage. I hope that you enjoy reading about my experience, learn something, and possibly go on to build your own Linux Desktop.
**The impact**: I hope the irony is not lost on anyone that step 1, when doing cloud-native software development, is to install Linux on a physical computer.
## [Enabling CERNs particle physics research with open source][3]
> Ceph is an open-source software-defined storage platform. While its not often in the spotlight, its working hard behind the scenes, playing a crucial role in enabling ambitious, world-renowned projects such as CERNs particle physics research, Immunity Bios cancer research, The Human Brain Project, MeerKat radio telescope, and more. These ventures are propelling the collective understanding of our planet and the human race beyond imaginable realms, and the outcomes will forever change how we perceive our existence and potential. 
**The impact**: It is not often that you get to see a straight line drawn between storage and the perception of human existence. Thanks for that, CERN!
## [2020 cloud predictions][4]
> "Serverless" as a concept provides a simplified developer experience that will become a platform feature. More platform-as-a-service providers will incorporate serverless traits into the daily activities developers perform when building cloud-native applications, becoming the default computing paradigm for the cloud.
**The impact:** All of the trends in the predictions in this post are basically about maturation as ideas like serverless, edge computing, DevOps, and other cloud-adjacent buzz words move from the early adopters into the early majority phase of the adoption curve.
## [End-of-life announcement for CoreOS Container Linux][5]
> As we've [previously announced][6], [Fedora CoreOS][7] is the official successor to CoreOS Container Linux. Fedora CoreOS is a [new Fedora Edition][8] built specifically for running containerized workloads securely and at scale. It combines the provisioning tools and automatic update model of Container Linux with the packaging technology, OCI support, and SELinux security of Atomic Host. For more on the Fedora CoreOS philosophy, goals, and design, see the [announcement of the preview release][9] and the [Fedora CoreOS documentation][10].
**The impact**: Milestones like this are often bittersweet for both creators and users. The CoreOS team built something that their community loved to use, which is something to be celebrated. Hopefully, that community can find a [new home][11] in the wider [Fedora ecosystem][8].
_I hope you enjoyed this list and come back next week for more open source community, market, and industry trends._
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/2/linux-desktop-cern-more-industry-trends
作者:[Tim Hildred][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/thildred
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/data_metrics_analytics_desktop_laptop.png?itok=9QXd7AUr (Person standing in front of a giant computer screen with numbers, data)
[2]: https://blog.alexellis.io/building-a-linux-desktop-for-cloud-native-development/
[3]: https://insidehpc.com/2020/02/how-ceph-powers-exciting-research-with-open-source/
[4]: https://www.devopsdigest.com/2020-cloud-predictions-2
[5]: https://coreos.com/os/eol/
[6]: https://groups.google.com/d/msg/coreos-user/zgqkG88DS3U/PFP9yrKbAgAJ
[7]: https://getfedora.org/coreos/
[8]: https://fedoramagazine.org/fedora-coreos-out-of-preview/
[9]: https://fedoramagazine.org/introducing-fedora-coreos/
[10]: https://docs.fedoraproject.org/en-US/fedora-coreos/
[11]: https://getfedora.org/en/coreos/

View File

@ -1,115 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (OpenShot Video Editor Gets a Major Update With Version 2.5 Release)
[#]: via: (https://itsfoss.com/openshot-2-5-release/)
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
OpenShot Video Editor Gets a Major Update With Version 2.5 Release
======
[OpenShot][1] is one of the [best open-source video editors][2] out there. With all the features that it offered it was already a good video editor on Linux.
Now, with a major update to it (**v.2.5.0**), OpenShot has added a lot of new improvements and features. And, trust me, its not just any regular release it is a huge release packed with features that you probably wanted for a very long time.
In this article, I will briefly mention the key changes involved in the latest release.
![][3]
### OpenShot 2.5.0 Key Features
Here are some of the major new features and improvements in OpenShot 2.5:
#### Hardware Acceleration Support
The hardware acceleration support is still an experimental addition however, it is a useful feature to have.
Instead of relying on your CPU to do all the hard work, you can utilize your GPU to encode/decode video data when working with MP4/H.264 video files.
This will affect (or improve) the performance of OpenShot in a meaningful way.
#### Support Importing/Exporting Files From Final Cut Pro &amp; Premiere
![][4]
[Final Cut Pro][5] and [Adobe Premiere][6] are the two popular video editors for professional content creators. OpenShot 2.5 now allows you to work on projects created on these platforms. It can import (or export) the files from Final Cut Pro &amp; Premiere in EDL &amp; XML formats.
#### Thumbnail Generation Improved
This isnt a big feature but a necessary improvement to most of the video editors. You dont want broken images in the thumbnails (your timeline/library). So, with this update, OpenShot now generates the thumbnails using a local HTTP server, can check multiple folder locations, and regenerate missing ones.
#### Blender 2.8+ Support
The new OpenShot release also supports the latest [Blender][7] (.blend) format so it should come in handy if youre using Blender as well.
#### Easily Recover Previous Saves &amp; Improved Auto-backup
![][8]
It was always a horror to lose your timeline work after you accidentally deleted it which was then auto-saved to overwrite your saved project.
Now, the auto-backup feature has improved with an added ability to easily recover your previous saved version of the project.
Even though you can recover your previous saves now you will find a limited number of the saved versions, so you have to still remain careful.
#### Other Improvements
In addition to all the key highlights mentioned above, you will also notice a performance improvement when using the keyframe system.
Several other issues like SVG compatibility, exporting &amp; modifying keyframe data, and resizable preview window have been fixed in this major update. For privacy-concerned users, OpenShot no longer sends usage data unless you opt-in to share it with them.
For more information, you can take a look at [OpenShots official blog post][9] to get the release notes.
### Installing OpenShot 2.5 on Linux
You can simply download the .AppImage file from its [official download page][10] to [install the latest OpenShot version][11]. If youre new to AppImage, you should also check out [how to use AppImage][12] on Linux to easily launch OpenShot.
[Download Latest OpenShot Release][10]
Some distributions like Arch Linux may also provide the latest OpenShot release with regular system updates.
#### PPA available for Ubuntu-based distributions
On Ubuntu-based distributions, if you dont want to use AppImage, you can [use the official PPA][13] from OpenShot:
```
sudo add-apt-repository ppa:openshot.developers/ppa
sudo apt update
sudo apt install openshot-qt
```
You may want to know how to remove PPA if you want to uninstall it later.
**Wrapping Up**
With all the latest changes/improvements considered, do you see [OpenShot][11] as your primary [video editor on Linux][14]? If not, what more do you expect to see in OpenShot? Feel free to share your thoughts in the comments below.
--------------------------------------------------------------------------------
via: https://itsfoss.com/openshot-2-5-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://www.openshot.org/
[2]: https://itsfoss.com/open-source-video-editors/
[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/02/openshot-2-5-0.png?ssl=1
[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/02/openshot-xml-edl.png?ssl=1
[5]: https://www.apple.com/in/final-cut-pro/
[6]: https://www.adobe.com/in/products/premiere.html
[7]: https://www.blender.org/
[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/02/openshot-recovery.jpg?ssl=1
[9]: https://www.openshot.org/blog/2020/02/08/openshot-250-released-video-editing-hardware-acceleration/
[10]: https://www.openshot.org/download/
[11]: https://itsfoss.com/openshot-video-editor-release/
[12]: https://itsfoss.com/use-appimage-linux/
[13]: https://itsfoss.com/ppa-guide/
[14]: https://itsfoss.com/best-video-editing-software-linux/

View File

@ -1,121 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (KDE Plasma 5.18 LTS Released With New Features)
[#]: via: (https://itsfoss.com/kde-plasma-5-18-release/)
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
KDE Plasma 5.18 LTS Released With New Features
======
[KDE plasma][1] desktop is undoubtedly one of the most impressive [Linux desktop environments][2] available out there right now.
Now, with the latest release, the KDE Plasma desktop just got more awesome!
KDE Plasma 5.18 marks itself as an LTS (Long Term Support) release i.e it will be maintained by the KDE contributors for the next 2 years while the regular versions are maintained for just 4 months.
![KDE Plasma 5.18 on KDE Neon][3]
So, if you want more stability on your KDE-powered Linux system, it would be a good idea to upgrade to KDEs Plasma 5.18 LTS release.
### KDE Plasma 5.18 LTS Features
Here are the main new features added in this release:
#### Emoji Selector
![Emoji Selector in KDE][4]
Normally, you would Google an emoji to copy it to your clipboard or simply use the good-old emoticons to express yourself.
Now, with the latest update, you get an emoji selector in Plasma Desktop. You can simply find it by searching for it in the application launcher or by just pressing (Windows key/Meta/Super Key) + . (**period/dot)**.
The shortcut should come in handy when you need to use an emoji while sending an email or any other sort of messages.
#### Global Edit Mode
![Global Edit Mode][5]
You probably would have used the old desktop toolbox on the top-right corner of the screen in the Plasma desktop, but the new release gets rid of that and instead provides you with a global edit mode when you right-click on the desktop and click on “**Customize Layout**“.
#### Night Color Control
![Night Color Control][6]
Now, you can easily toggle the night color mode right from the system tray. In addition to that, you can even choose to set a keyboard shortcut for both night color and the do not disturb mode.
#### Privacy Improvements For User Feedback
![Improved Privacy][7]
It is worth noting that KDE Plasma lets you control the user feedback information that you share with them.
You can either choose to disable sharing any information at all or control the level of information you share (basic, intermediate, and detailed).
#### Global Themes
![Themes][8]
You can either choose from the default global themes available or download community-crafted themes to set up on your system.
#### UI Improvements
There are several subtle improvements and changes. For instance, the look and feel of the notifications have improved.
You can also notice a couple of differences in the software center (Discover) to help you easily install apps.
Not just limited to that, but you also get the ability to mute the volume of a window from the taskbar (just like you normally do on your browsers tab). Similarly, there are a couple of changes here and there to improve the KDE Plasma experience.
#### Other Changes
In addition to the visual changes and customization ability, the performance of KDE Plasma has improved when coupled with a graphics hardware.
To know more about the changes, you can refer the [official announcement post][9] for KDE Plasma 5.18 LTS.
[Subscribe to our YouTube channel for more Linux videos][10]
### How To Get KDE Plasma 5.18 LTS?
If you are using a rolling release distribution like Arch Linux, you might have got it with the system updates. If you havent performed an update yet, simply check for updates from the system settings.
If you are using Kubuntu, you can add the Kubuntu backports PPA to update the Plasma desktop with the following commands:
```
sudo add-apt-repository ppa:kubuntu-ppa/backports
sudo apt update && sudo apt full-upgrade
```
If you do not have KDE as your desktop environment, you can refer our article on [how to install KDE on Ubuntu][11] to get started.
**Wrapping Up**
KDE Plasma 5.18 may not involve a whole lot of changes but being an LTS release, the key new features seem helpful and should come in handy to improve the Plasma desktop experience for everyone.
What do you think about the latest Plasma desktop release? Feel free to let me know your thoughts in the comments below.
--------------------------------------------------------------------------------
via: https://itsfoss.com/kde-plasma-5-18-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://kde.org/plasma-desktop/
[2]: https://itsfoss.com/best-linux-desktop-environments/
[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/02/kde-plasma-5-18-info.jpg?ssl=1
[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/02/kde-plasma-emoji-pick.jpg?ssl=1
[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/02/kde-plasma-global-editor.jpg?ssl=1
[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/02/kde-plasma-night-color.jpg?ssl=1
[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/02/user-feedback-kde-plasma.png?ssl=1
[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/02/kde-plasma-global-themes.jpg?ssl=1
[9]: https://kde.org/announcements/plasma-5.18.0.php
[10]: https://www.youtube.com/c/itsfoss?sub_confirmation=1
[11]: https://itsfoss.com/install-kde-on-ubuntu/

View File

@ -0,0 +1,82 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Linux Foundation prepares for disaster, new anti-tracking data set, Mozilla goes back to mobile OSes, and more open source news)
[#]: via: (https://opensource.com/article/20/3/news-march-14)
[#]: author: (Scott Nesbitt https://opensource.com/users/scottnesbitt)
Linux Foundation prepares for disaster, new anti-tracking data set, Mozilla goes back to mobile OSes, and more open source news
======
Catch up on the biggest open source headlines from the past two weeks.
![][1]
In this edition of our open source news roundup, we take a look at the Linux Foundation's disaster relief project, DuckDuckGo's anti-tracking tool, open textbooks, and more!
### Linux Foundation unveils Project OWL
When a disaster happens, it's vital to keep communications links up and running. One way to do that is with [mesh networks][2]. The Linux Foundation [has unveiled][3] Project OWL to "help build mesh network nodes for global emergency communications networks."
Short for _Organisation, Whereabouts, and Logistics_, OWL is firmware for Internet of Things (IoT) devices that "can quickly turn a cheap wireless device into a DuckLink, a mesh network node". Those devices can connect to other, similar devices around them. OWL also provides an analytics tool that responders can use for "coordinating resources, learning about weather patterns, and communicating with civilians who would otherwise be cut off."
### New open source tool to block web trackers
It's no secret that sites all over the web track their visitors. Often, it's shocking how much of that goes on and what a threat to your privacy that is. To help web browser developers better protect their users, the team behind search engine DuckDuckGo is "[sharing data it's collected about online trackers with other companies so they can also protect your privacy][4]."
That dataset is called Tracker Radar and it "details 5,326 internet domains used by 1,727 companies and organizations that track you online". Browser Radar is different from other tracker databases in that it "annotates data with other information, like whether blocking a tracker is likely to break a website, so anyone using it can pick the best balance of privacy and convenience."
Tracker Radar's dataset is [available on GitHub][5]. The repository also links to the code for the [crawler][6] and [detector][7] that work with the data.
### Oregon Tech embracing open textbooks
With the cost of textbooks taking an increasingly large bite out of the budgets of university students, more and more schools are turning to open textbooks to cut those costs. By embracing open textbooks, the Oregon Institute of Technology has [save students $400,000][8] over the last two years.
The school offers open textbooks for 26 courses, ranging "from chemistry and biology, to respiratory care, sociology and engineering." Although the textbooks are free, university librarian John Schoppert points out that the materials are of a high quality and that faculty members have been "developing lab manuals and open-licensed textbooks where they hadnt existed before and improved on others materials."
### Mozilla to help update feature phone OS
A few years ago, Mozilla tried to break into the world of mobile operating systems with Firefox OS. While that effort didn't pan out, Firefox OS found new life powering low-cost feature phones under the name KaiOS. Mozilla's [jumping back into the game][9] by helping "modernize the browser engine that's core to the software."
KaiOS is built upon a four-year-old version of Mozilla's Gecko browser engine. Updating Gecko will "improve security, make apps run faster and more smoothly, and open [KaiOS to] more-sophisticated apps and WebGL 2.0 for better games graphics." Mozilla said its collaboration will include "Mozilla's help with test engineering and adding new low-level Gecko abilities."
#### In other news
* [CERN adopts Mattermost, an open source messaging app][10]
* [Open-source software analyzes economics of biofuels, bioproducts][11]
* [Netflix releases Dispatch for crisis management orchestration][12]
* [FreeNAS and TrueNAS are merging][13]
* [Smithsonian 3D Scans NASA Space Shuttle Discovery And Makes It Open Source][14]
Thanks, as always, to Opensource.com staff members and [Correspondents][15] for their help this week.
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/3/news-march-14
作者:[Scott Nesbitt][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/scottnesbitt
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/weekly_news_roundup_tv.png?itok=tibLvjBd
[2]: https://en.wikipedia.org/wiki/Mesh_networking
[3]: https://www.smartcitiesworld.net/news/news/linux-announces-open-source-project-to-aid-disaster-relief-5102
[4]: https://www.cnet.com/news/privacy-focused-duckduckgo-launches-new-effort-to-block-online-tracking/
[5]: https://github.com/duckduckgo/tracker-radar
[6]: https://github.com/duckduckgo/tracker-radar-collector
[7]: https://github.com/duckduckgo/tracker-radar-detector
[8]: https://www.heraldandnews.com/news/local_news/oregon-tech-turns-to-open-source-materials-to-save-students/article_ba641e79-3034-5b9a-a8f7-b5872ddc998e.html
[9]: https://www.cnet.com/news/mozilla-helps-modernize-feature-phones-powered-by-firefox-tech/
[10]: https://joinup.ec.europa.eu/collection/open-source-observatory-osor/news/cern-uses-mattermost
[11]: http://www.biomassmagazine.com/articles/16848/open-source-software-analyzes-economics-of-biofuels-bioproducts
[12]: https://jaxenter.com/netflix-dispatch-crisis-management-orchestration-169381.html
[13]: https://liliputing.com/2020/03/freenas-and-turenas-are-merging-open-source-operating-systems-for-network-attached-storage.html
[14]: https://www.forbes.com/sites/tjmccue/2020/03/04/smithsonian-3d-scans-the-nasa-space-shuttle-discovery-and-makes-it-open-source/#39aa0f243ecd
[15]: https://opensource.com/correspondent-program

View File

@ -0,0 +1,94 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Fedora 32 Release Date, New Features and Everything Else)
[#]: via: (https://itsfoss.com/fedora-32/)
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
Fedora 32 Release Date, New Features and Everything Else
======
Fedora 32 should be releasing at the end of April, around the same time as the [Ubuntu 20.04 LTS release][1].
Since we are covering the Ubuntu 20.04 release in detail, we thought of doing the same for our Fedora fans here.
In this article, I am going to highlight the new features coming to Fedora 32. Ill update this article as the development progresses further.
### New features in Fedora 32
![][2]
#### EarlyOOM Enabled
With this release, [EarlyOOM][3] comes enabled by default. To give you a background, EarlyOOM lets users to easily recover their systems from a low-memory situation with heavy [swap][4] usage.
It is worth noting that it is applicable to the Fedora 32 Beta Workstation edition.
#### GNOME 3.36 Added
The new Fedora 32 Workstation also comes included with the new [GNOME 3.36][5].
Not just limited to Fedora 32 Beta Workstation but it has also been added to the daily build of [Ubuntu 20.04 LTS][1].
Of course, the improvements in GNOME 3.36 translates to Fedoras latest release as well providing a faster and better experience, overall.
So, youll get the new lock screen, the do not disturb feature and everything else that comes with GNOME 3.36.
#### Package Updates
Fedora 32 release also updates a lot of important packages that include Ruby, Perl, and Python. It also features the latest version 10 of the [GNU Compiler Collection][6] (GCC).
#### Other Changes
In addition to the key highlights, theres a lot of things that have changed, improved, or fixed. You can take a detailed look at its [changelog][7] to know more about what has changed.
### Download Fedora 32 (development version)
Fedora 32 is still under development. The beta version has been released and you may test it on a spare system or in virtual machine. **I would not advise you to use it on your main system before the final release**. Theres an official [list of know bugs][8] for the current release, you can refer to that as well.
In the [official announcement][9], they mentioned the availability of both **Fedora 32 beta workstation** and the **server** along with other popular variants.
To get the Workstation and the Server edition, you have to visit the official download page for [Fedora Workstation][10] and [Fedora Server][11] (depending on what you want).
![Fedora Download Beta][12]
Once, you do that, just look for a release tagged as “**Beta!**” as shown in the image above and start downloading it. For other variants, click on the links below to head to their respective download pages:
* [Fedora 32 Beta Spins][13]
* [Fedora 32 Beta Labs][14]
* [Fedora 32 Beta ARM][15]
Have you noticed any other new feature in Fedora 32? What features you would like to see here? Feel free to leave a comment below.
--------------------------------------------------------------------------------
via: https://itsfoss.com/fedora-32/
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://itsfoss.com/ubuntu-20-04-release-features/
[2]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/11/update_fedora.jpg?ssl=1
[3]: https://fedoraproject.org/wiki/Changes/EnableEarlyoom#Enable_EarlyOOM
[4]: https://itsfoss.com/swap-size/
[5]: https://itsfoss.com/gnome-3-36-release/
[6]: https://gcc.gnu.org/
[7]: https://fedoraproject.org/wiki/Releases/32/ChangeSet
[8]: https://fedoraproject.org/wiki/Common_F32_bugs
[9]: https://fedoramagazine.org/announcing-the-release-of-fedora-32-beta/
[10]: https://getfedora.org/workstation/download/
[11]: https://getfedora.org/server/download/
[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/fedora-download-beta.jpg?ssl=1
[13]: https://spins.fedoraproject.org/prerelease
[14]: https://labs.fedoraproject.org/prerelease
[15]: https://arm.fedoraproject.org/prerelease

View File

@ -0,0 +1,60 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Tools for monitoring, introvert inclusion, and more industry trends)
[#]: via: (https://opensource.com/article/20/3/monitoring-introvert-industry-trends)
[#]: author: (Tim Hildred https://opensource.com/users/thildred)
Tools for monitoring, introvert inclusion, and more industry trends
======
A weekly look at open source community and industry trends.
![Person standing in front of a giant computer screen with numbers, data][1]
As part of my role as a senior product marketing manager at an enterprise software company with an open source development model, I publish a regular update about open source community, market, and industry trends for product marketers, managers, and other influencers. Here are five of my and their favorite articles from that update.
## [Top six open source tools for monitoring][2]
> These tools are widely used in the tech industry, and they all have their benefits. Most of these solutions, however, require skilled implementation and ongoing manual maintenance that can be a burden for DevOps teams and a distraction from the business. Theres no one solution that can cater to all of your requirements, since each tool focuses on one or two specific aspects of observability and analysis. By mixing these tools together, you can derive a unique solution for your individual business needs. 
**The impact**: If a container falls over in the cluster and there is no open source monitoring tool to see it, did it really happen?
## [Introvert environment: What can we do?][3]
> An example is its inclusive team dynamics programme, which consists of both information and guidance on everyday practices. Each team is required to appoint an inclusion champion, who ensures all members are given the space to contribute to discussions. Leaders are also encouraged not to speak first during meetings.
**The impact**: If it is hard for you not to speak for a while in a meeting, that probably indicates you should be doing it more often. Will new WFH policies make this harder, or easier? Only time will tell.
## [The difference between API Gateways and service mesh][4]
> The service connectivity capabilities that service mesh provides are conflicting with the API connectivity features that an API gateway provides. However, because the ones provided by service mesh are more inclusive (L4 + L7, all TCP traffic, not just HTTP and not just limited to APIs but to every service), they are in a way more complete. But as we can see from the diagram above, there are also use cases that service mesh does not provide, and that is the “API as a product” use case as well as the full API management lifecycle, which still belong to the API gateway pattern.
**The impact**: Another way of saying this is you can't make money from your service mesh directly, unlike your APIs.
## [Open Policy Agents mission to secure the cloud][5]
> While the cost of implementing OPA is a little high today, the technology pays for itself by providing more control and helping to secure systems. As OPA continues to be refined, we can expect implementation costs to fall, making an investment in OPA easier to justify.
**The impact**: Compliance is expensive; large investments in it only make sense if non-compliance is even more so.
_I hope you enjoyed this list and come back next week for more open source community, market, and industry trends._
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/3/monitoring-introvert-industry-trends
作者:[Tim Hildred][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/thildred
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/data_metrics_analytics_desktop_laptop.png?itok=9QXd7AUr (Person standing in front of a giant computer screen with numbers, data)
[2]: https://devops.com/top-six-open-source-tools-for-monitoring-kubernetes-and-docker/
[3]: https://www.raconteur.net/hr/introverts-workplace
[4]: https://www.cncf.io/blog/2020/03/06/the-difference-between-api-gateways-and-service-mesh/
[5]: https://thenewstack.io/open-policy-agents-mission-to-secure-the-cloud/

View File

@ -0,0 +1,78 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (With npm Acquisition, Microsoft is Set to Own the Largest Software Registry in the World)
[#]: via: (https://itsfoss.com/microsoft-npm-acquisition/)
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
With npm Acquisition, Microsoft is Set to Own the Largest Software Registry in the World
======
Microsoft has been betting big on open source for past few years. Apart from open sourcing a few things here and there, Microsoft is contributing a lot to Linux kernel (for its Azure cloud platform).
To further strengthen its position in the open source world, [Microsoft acquired the popular open source code hosting platform GitHub for $7.5 billion][1].
Now Microsoft owned GitHub [has acquired][2] [npm][3] ( short for Node Package Manager). npm is the [worlds largest software registry][4] with [more than 1.3 million packages that have 75 billion downloads a month][5].
![][6]
If you are not familiar, npm is a package manager for JavaScript programming language, primarily the hugely popular open source [Node.js][7].
Though npm has scope of private repository for enterprises, most of the 1.3 million packages are open source and/or used in various open source projects.
Both node.js and npm are used by big software and IT companies like IBM, Yahoo and big corporations like Netflix and PayPal.
In case you are wondering, the acquisition amount has not been disclosed by either party.
### Microsofts proposed plan for npm
![][8]
GitHub CEO Nat Friedman assured that Microsoft intends to keep the npm registry available as open-source and free to developers.
Once the acquisition is complete, Microsoft is going to invest in the registry infrastructure and platform. It plans to improve the core experience of npm by adding new features like Workspaces, as well as bringing improvements to publishing and multi-factor authentication.
Microsoft also intends to integrate GitHub and npm so that developers could trace a change from a GitHub pull request to the npm package version that fixed it.
### Part of a larger plan
First, [Microsoft bought GitHub][1], the platform that had the largest open source repositories and now npm, the largest software registry. Clearly, Microsoft is tightening its grip around open source projects. This could allow Microsoft to dictate the policies around these open source projects in future.
When Microsoft acquired GitHub, several open source developers moved to [alternate platforms like GitLab][9] but GitHub remained the first choice for the developers. Microsoft did introduce some innovative features like security advisories, [package registry][10], [sponsorship][11] etc. Microsoft is expanding GitHub by forming communities around it specially in developing countries. Recently, [GitHub announced its Indian subsidiary][12] to specially attract young developers to its platform.
So now Microsoft owns the professional social network [LinkedIn][13], developer oriented GitHub and npm. This indicates that Microsoft will continue its shopping spree and will acquire more open source related projects that have substantial developer population.
What could be next then? WordPress because it is the [most popular open source CMS][14] and [runs 33% of the websites][15] on the internet?
While we wait and watch for Microsofts next move, why not share your views on this development? Comment section is all yours.
--------------------------------------------------------------------------------
via: https://itsfoss.com/microsoft-npm-acquisition/
作者:[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/microsoft-github/
[2]: https://github.blog/2020-03-16-npm-is-joining-github/
[3]: https://www.npmjs.com/
[4]: https://www.linux.com/news/state-union-npm/
[5]: https://www.zdnet.com/article/microsoft-buys-javascript-developer-platform-npm-plans-to-integrate-it-with-github/
[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/microsoft-github-npm.jpg?ssl=1
[7]: https://nodejs.org/en/
[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/03/github-npm.jpg?ssl=1
[9]: https://itsfoss.com/github-alternatives/
[10]: https://github.blog/2019-05-10-introducing-github-package-registry/
[11]: https://itsfoss.com/github-sponsors-program/
[12]: https://github.blog/2020-02-12-announcing-github-india/
[13]: https://www.linkedin.com/
[14]: https://itsfoss.com/open-source-cms/
[15]: https://wordpress.org/news/2019/03/one-third-of-the-web/

View File

@ -0,0 +1,98 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (OBS Studio 25.0 is Here With Vulkan-based Games Capture Feature and More)
[#]: via: (https://itsfoss.com/obs-studio-25-release/)
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
OBS Studio 25.0 is Here With Vulkan-based Games Capture Feature and More
======
_**Brief: Open source screen recording and streaming software OBS Studio 25.0 has just been released and it brings the ability to capture Vulkan-based games with game capture among other new features.**_
![][1]
If you are into recording your desktop or streaming it, you might have heard of [OBS][2] (Open Broadcaster Software) Studio. Its one of the [best screen recorder tools on Linux][3] and other operating systems.
But OBS is more than just a simple screen recorder. It also provides all the stuff you need for streaming your recordings.
### New features in OBS Studio 25.0
![OBS 25.0][4]
OBS Studio has released its latest version 25.0 with plenty of new features to make your recording and streaming experience better. Lets take a look at some of the main new features:
* Capture Vulkan-based games with game capture
* New capture method to window capture which allows capturing browsers, browser-based windows, and UWP programs
* Advanced scene collection importing allows you to import from other common streaming programs
* Media source hotkeys to allow control of playback
* Ability to drag and drop URLs to create browser sources
* Support for the [SRT protocol][5]
* Ability to lock volume values of audio sources in the mixer
* Support for certain devices that can automatically rotate their camera output such as the Logitech StreamCam
* System tray icon to show when the recording is paused
* Help icons when an property has a tooltip associated with it
Apart from there, there are plenty of bug features and minor changes that you may follow in the [release notes][6].
### Install OBS Studio 25.0 on Linux
OBS Studio is a cross-platform software and is also available for Windows and macOS in addition to Linux. You can download it from its official website.
[Download OBS Studio 25.0][7]
For Linux, you can grab the source code and build it your self. I know thats not very convenient for everyone. The good news is that you can install the latest OBS version using Snap or Flatpak packages.
On Ubuntu or any other [Linux distribution with Snap support][8], you can use the following command:
```
sudo snap install obs-studio
```
If your distribution supports Fltapak packages, you can get it from Flathub website:
[OBS Studio on Flathub][9]
For Ubuntu users, there is also the official PPA for easily installing it. In a terminal, you can enter the following command one by one:
```
sudo add-apt-repository ppa:obsproject/obs-studio
sudo apt update
sudo apt install obs-studio
```
You can [learn about deleting PPA here][10].
Personally, I havent used OBS much though I have heard great stuff about it. I dont live stream but I do record my desktop to create tutorial and information Linux videos on I[ts FOSS YouTube channel][11] (you should subscribe to it if you havent already). For that, I [use Kazam][12] which I find simpler to use.
Do you use OBS Studio? Which features you like the most? Do share your views.
--------------------------------------------------------------------------------
via: https://itsfoss.com/obs-studio-25-release/
作者:[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/03/obs_logo_icon_small.png?resize=150%2C150&ssl=1
[2]: https://obsproject.com/
[3]: https://itsfoss.com/best-linux-screen-recorders/
[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/03/obs-25-ubuntu.png?ssl=1
[5]: https://en.wikipedia.org/wiki/Secure_Reliable_Transport
[6]: https://github.com/obsproject/obs-studio/releases/tag/25.0.0
[7]: https://obsproject.com/download
[8]: https://itsfoss.com/install-snap-linux/
[9]: https://flathub.org/apps/details/com.obsproject.Studio
[10]: https://itsfoss.com/how-to-remove-or-delete-ppas-quick-tip/
[11]: https://www.youtube.com/channel/UCEU9D6KIShdLeTRyH3IdSvw
[12]: https://itsfoss.com/kazam-screen-recorder/

View File

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

View File

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

View File

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

View File

@ -1,83 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Linux is our love language)
[#]: via: (https://opensource.com/article/20/2/linux-love-language)
[#]: author: (Christopher Cherry https://opensource.com/users/chcherry)
Linux is our love language
======
When a wife teaches a husband some new tech skills, they both learn a
lot more than they expect.
![Red heart with text "you are not alone"][1]
2019 was a year of learning in the Cherry household. I am a senior software engineer who set out to learn new skills and, along the way, I taught my husband, Chris. By teaching him some of the things I learned and asking him to work through my technology walkthrough articles, I helped Chris learn new skills that enabled him to pivot his career deeper into the technology field. And I learned new ways to make my walkthroughs and training materials more accessible for readers to digest.
In this article, we talk about what we learned individually and from each other, then we explore what it means for their future.
### Questions for the student
**Jess:** Chris, what made you want to learn more about my field?
**Chris:** It was primarily to further my career. Being in network engineering has shown me that being an expert only on networks is not as valuable as it once was, and I have to know a little bit of everything. Since the network is often blamed for outages or application challenges these days, I wanted to understand more from a developer's perspective on writing applications so I could see how they depend on the network as a resource.
**Jess:** What did I teach you first, and what did you learn from it?
**Chris:** It all started with installing Linux for the first time, then adding [Ansible][2]. Each Linux distribution I worked with was easy enough to install, as long as the hardware was compatible, but compatibility wasn't always clear. That meant sometimes I learned first-hand how to troubleshoot Linux within the first five minutes of running an installation (and I liked it). Ansible gave me a reason to learn Linux package managers to install the software. Once it was installed, I quickly learned how package management handles dependencies as I looked at the files that yum installed, so Ansible, which is written in Python, can run on my system. From there, I started to install all kinds of applications with Ansible.
**Jessica:** Do you like the way I taught you?
**Chris:** We had our struggles at first, until we ironed out how I like to learn and how you should present the best way for me to learn. In the beginning, it was hard to follow what you meant. For instance, when you said things like "a Docker container," I had no reference to what you were talking about. Early on, the response was, "well, it's a container," which meant nothing to me at the time. Once I got you to explain it in more detail, it became a lot more fun to learn.
**Jess:** To be fair, this was a big lesson for me as well. I hadn't trained anyone with less knowledge on this technology than me before you, so you helped me realize that I needed to be clearer with my explanations. Thanks for that.
How did you feel about testing my articles, the ones where I had you run through the steps?
**Chris:** Personally, I thought it would be easy, and boy, was I wrong. One of the main things I learned from these, like your [introduction to Vagrant][3], was how each Linux distribution varies more than I realized. The operating system (OS) changes how you set it up, the requirements to run, and the specific commands. It seems like a lot more variability than there is with the network gear I've worked on. So I started to pay a lot more attention to the instructions and whether they were written for my OS or another one (and how difficult it can be to know sometimes). I seemed to break a lot of things along the way.
**Jess:** I break stuff all day, so different paths for different problems are daily occurrences for me.
### Questions for the teacher
**Chris:** Jess, would you change anything with the way you taught me so far?
**Jess:** I'd have liked to make you read more, as I do. Learning new technology has me churning through books. I read a book and a half, if not two books, a week, and that's with spending one hour in the morning and one hour before bed every day. I also pick one project to run through for two weeks for about an hour a day to reinforce the book skills. And that's in addition to the tech articles I read for the first hour of my day while taking in an immense amount of coffee. When I think about your goal to grow your career, I think books are an important element alongside the great blog posts and articles we talk about. I feel my reading regiment has kept me up to speed, and if you did the same, you would catch up to me pretty quickly.
**Chris:** So did the student teach the teacher in any way?
**Jess:** I learned a great deal about being patient from you. For instance, after walking through an installation of Ansible, I asked what you wanted to do next. Your first answer was, "I don't know," which was hard for me because I want you to learn what you want to learn. So I changed my approach, and now we talk more about what you want to achieve before walking through installing anything. When we moved on to the Vagrant article we worked on together, I created it with an end goal in mind, so we had something to achieve right away.
This actually made a massive change in how I do training at work. Now I ask more questions on how people learn and work hand-in-hand more often than I did before. I am more likely to sit and go through and make sure someone understands what I'm saying and what we're doing. I wasn't really before.
### What we learned together
As a couple, we both grew from collaborating on technology over the last year.
**Chris:** I'm blown away at how much I learned. Over the course of a year, I understand new operating systems, how to use an API, web application deployment with Ansible, and standing up virtual machines with Vagrant. I also learned how documentation makes life better, so it's worth the time it takes to write some. In this field of work, however, behavior isn't always documented, so I've learned to be ready to work through tough issues and document how I fix them.
**Jess:** Beyond what I learned from teaching you, I've focused on learning a good deal about Kubernetes in cloud environments. That includes deployment strategies, the complexity of the Kubernetes API, building my own containers, and securing these environments. I've also saved time to dabble: toying around with serverless code, AI models, Python, and graphically displaying heat maps. It's been a good year.
What's next for us? It's yet to be seen, but I can assure you that we're going to share it here on Opensource.com.
**Who did you mentor in 2019, or who are you mentoring in 2020? Tell us about it in the comments.**
I can see the brightness of curiosity in my six year old niece Shuchi's eyes when she explores a...
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/2/linux-love-language
作者:[Christopher Cherry][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/chcherry
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/red-love-heart-alone-stone-path.jpg?itok=O3q1nEVz (Red heart with text "you are not alone")
[2]: https://opensource.com/resources/what-ansible
[3]: https://opensource.com/resources/vagrant

View File

@ -0,0 +1,113 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (8 reasons to consider hyperconverged infrastructure for your data center)
[#]: via: (https://www.networkworld.com/article/3530072/eight-reasons-to-consider-hyperconverged-infrastructure-for-your-data-center.html)
[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/)
8 reasons to consider hyperconverged infrastructure for your data center
======
Thinkstock
Demand for on-premises data center equipment is shrinking as organizations move workloads to the cloud. But on-prem is far from dead, and one segment thats thriving is hyperconverged infrastructure ([HCI][1]).
HCI is a form of scale-out, software-integrated infrastructure that applies a modular approach to compute, network and storage capacity. Rather than silos with specialized hardware, HCI leverages distributed, horizontal blocks of commodity hardware and delivers a single-pane dashboard for reporting and management. Form factors vary: Enterprises can choose to deploy hardware-agnostic [hyperconvergence software][2] from vendors such as Nutanix and VMware, or an integrated HCI appliance from vendors such as HP Enterprise, Dell, Cisco, and Lenovo.
**Learn more about enterprise infrastructure trends**
* [Making the right hyperconvergence choice: HCI hardware or software?][3]
* [10 of the world's fastest supercomputers][4]
* [NVMe over Fabrics creates data-center storage disruption][5]
* [For enterprise storage, persistent memory is here to stay][6]
The market is growing fast. By 2023, Gartner projects 70% of enterprises will be running some form of hyperconverged infrastructure, up from less than 30% in 2019. And as HCI grows in popularity, cloud providers such as Amazon, Google and Microsoft are providing connections to on-prem HCI products for hybrid deployment and management.
So why is it so popular? Here are some of the top reasons.
### 1) Simplified design
A traditional data center design is comprised of separate storage silos with individual tiers of servers and specialized networking spanning the compute and storage silos. This worked in the pre-cloud era, but its too rigid for the cloud era. “Its untenable for IT teams to take weeks or months to provision new infrastructure so the dev team can produce new apps and get to market quickly,” says Greg Smith, vice president of product marketing at Nutanix.
“HCI radically simplifies data center architectures and operations, reducing the time and expense of managing data and delivering apps,” he says.
### 2) Cloud integration
HCI software, such as from Nutanix or VMware, is deployed the same way in both a customers data center and cloud instances; it runs on bare metal instances in the cloud exactly the same as it does in a data center. HCI “is the best foundation for companies that want to build a hybrid cloud. They can deploy apps in their data center and meld it with a public cloud,” Smith says.
[][7]
“Because its the same on both ends, I can have one team manage an end-to-end hybrid cloud and with confidence that whatever apps run in my private cloud will also run in that public cloud environment,” he adds.
### 3) Ability to start small, grow large
“HCI allows you to consolidate compute, network, and storage into one box, and grow this solution quickly and easily without a lot of downtime,” says Tom Lockhart, IT systems manager with Hastings Prince Edward Public Health in Bellville, Ontario, Canada.
In a legacy approach, multiple pieces of hardware a server, Fiber Channel switch, host-based adapters, and a hypervisor have to be installed and configured separately. With hyperconvergence, everything is software-defined. HCI uses the storage in the server, and the software almost entirely auto-configures and detects the hardware, setting up the connections between compute, storage, and networking.
“Once we get in on a workload, [customers] typically have a pretty good experience. A few months later, they try another workload, then another, and they start to extend it out of their data center to remote sites,” says Chad Dunn, vice president of product management for HCI at Dell.
“They can start small and grow incrementally larger but also have a consistent operating model experience, whether they have 1,000 nodes or three nodes per site across 1,000 sites, whether they have 40 terabytes of data or 40 petabytes. They have consistent software updates where they dont have to retrain their people because its the same toolset,” Dunn added.
### 4) Reduced footprint
By starting small, customers find they can reduce their hardware stack to just what they need, rather than overprovision excessive capacity. Moving away from the siloed approach also allows users to eliminate certain hardware.
Josh Goodall, automation engineer with steel fabricator USS-POSCO Industries, says his firm deployed HCI primarily for its ability to do stretched clusters, where the hardware cluster is in two physical locations but linked together. This is primarily for use as a backup, so if one site went down, the other can take over the workload. In the process, though, USS-POSCO got rid of a lot of expensive hardware and software. “We eliminated several CPU [software] licenses, we eliminated the SAN from other site, we didnt need SRM [site recovery management] software, and we didnt need Commvault licensing. We saved between $25,000 and $30,000 on annual license renewals,” Goodall says.
### 5) No special skills needed
To run a traditional three-tiered environment, companies need specialists in compute, storage, and networking. With HCI, a company can manage its environment with general technology consultants and staff rather than the more expensive specialists.
“HCI has empowered the storage generalist,” Smith says. “You dont have to hire a storage expert, a network expert. Everyone has to have infrastructure, but they made the actual maintenance of infrastructure a lot easier than under a typical scenario, where a deep level of expertise is needed to manage under those three skill sets.”
Lockhart of Hastings Prince Edward Public Health says adding new compute/storage/networking is also much faster when compared to traditional infrastructure. “An upgrade to our server cluster was 20 minutes with no down time, versus hours of downtime with an interruption in service using the traditional method,” he says.
“Instead of concentrating on infrastructure, you can expand the amount of time and resources you spend on workloads, which adds value to your business. When you dont have to worry about infrastructure, you can spend more time on things that add value to your clients,” Lockhart adds.
### 6) Faster disaster recovery
Key elements of hyperconvergence products are their backup, recovery, data protection, and data deduplication capabilities, plus analytics to examine it all. Disaster recovery components are managed from a single dashboard, and HCI monitors not only the on-premises storage but also cloud storage resources. With deduplication, compression rates as high as 55:1, and backups can be done in minutes.
USS-POSCO Industries is an HP Enterprise shop and uses HPEs SimpliVity HCI software, which includes dedupe, backup, and recovery. Goodall says he gets about 12-15:1 compression on mixed workloads, and that has eliminated the need for third-party backup software.
More importantly, recovery timeframes have dropped. “The best recent example is a Windows update messed up a manufacturing line, and the error wasnt realized for a few weeks. In about 30 minutes, I rolled through four weeks of backups, updated the system, rebooted and tested a 350GB system. Restoring just one backup would have been a multi-hour process,” Goodall says.
### 7) Hyperconvergence analytics
HCI products come with a considerable amount of analytics software to monitor workloads and find resource constraints. The monitoring software is consolidated into a single dashboard view of system performance, including negatively impacted performance.
Hastings recently had a problem with a Windows 7 migration, but the HCI model made it easy to get performance info. “It showed that workloads, depending on time of day, were running out of memory, and there was excessive CPU queuing and paging,” Lockhart says. “We had the entire [issue] written up in an hour. It was easy to determine where problems lie. It can take a lot longer without that single-pane-of-glass view.”
### 8) Less time managing network, storage resources
Goodall says he used to spend up to 50% of his time dealing with storage issues and backup matrixes. Now he spends maybe 20% of his time dealing with it and most of his time tackling and addressing legacy systems. And his apps are better performing under HCI. “Weve had no issues with our SQL databases; if anything, weve seen huge performance gain due to the move to full SSDs [instead of hard disks] and the data dedupe, reducing reads and writes in the environment.”
Join the Network World communities on [Facebook][8] and [LinkedIn][9] to comment on topics that are top of mind.
--------------------------------------------------------------------------------
via: https://www.networkworld.com/article/3530072/eight-reasons-to-consider-hyperconverged-infrastructure-for-your-data-center.html
作者:[Andy Patrizio][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.networkworld.com/author/Andy-Patrizio/
[b]: https://github.com/lujun9972
[1]: https://www.networkworld.com/article/3207567/what-is-hyperconvergence.html?nsdr=true
[2]: https://www.networkworld.com/article/3318683/making-the-right-hyperconvergence-choice-hci-hardware-or-software.html
[3]: https://www.networkworld.com/article/3318683/making-the-right-hyperconvergence-choice-hci-hardware-or-software
[4]: https://www.networkworld.com/article/3236875/embargo-10-of-the-worlds-fastest-supercomputers.html#slide1
[5]: https://www.networkworld.com/article/3394296/nvme-over-fabrics-creates-data-center-storage-disruption.html
[6]: https://www.networkworld.com/article/3398988/for-enterprise-storage-persistent-memory-is-here-to-stay.html
[7]: https://www.networkworld.com/article/3440100/take-the-intelligent-route-with-consumption-based-storage.html?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE21620&utm_content=sidebar ( Take the Intelligent Route with Consumption-Based Storage)
[8]: https://www.facebook.com/NetworkWorld/
[9]: https://www.linkedin.com/company/network-world

View File

@ -0,0 +1,173 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (How to assess your organization's technological maturity)
[#]: via: (https://opensource.com/open-organization/20/3/communication-technology-worksheet)
[#]: author: (Ron McFarland https://opensource.com/users/ron-mcfarland)
How to assess your organization's technological maturity
======
Implementing new communications technologies can make your organization
more open. Use this worksheet to determine whether your organization—and
its people—are prepared.
![Someone wearing a hardhat and carrying code ][1]
New communication technologies can promote and improve [open organizational principles and practices][2]—both within a company and between customers and strategic partners, leading to greater sales and business opportunities.
Previously, I've discussed how companies adopting new communication technologies tend to [fall into four basic categories][3] of investment and utilization. In this article, I'll demonstrate how someone might assess an organization's level of preparedness for technological innovations and the cultural changes it requires.
### Becoming a superstar
For the purpose of this exercise, imagine you're a salesperson working for a company that provides communication or information technology solutions to companies that need advanced information systems and would benefit by becoming "[communication superstars][3]." You'll likely want to impress upon your customers the benefits of becoming this type of user—benefits such as:
* Enhanced customer interaction: When _our_ customers' salespeople visit _their_ customers, they'll need to make the best impression they can to build some level of trust. Therefore—before offering any product—a salesperson must get a customer talking about his situation in order to discover his particular needs, concerns, and opportunities for growth. When the customer asks the salesperson questions about what he can do to address these issues, imagine our customer's salespeople being able to answer him in seconds with detailed information, instead of making the customer wait for hours, day, or even weeks for the answers. Such technologies can increase one's capacity to make proposals, lead to faster and wiser purchasing decisions, and maximize salesperson-customer interactions—all extremely important benefits.
* Better operations: In manufacturing especially, production bottlenecks can be a drain on in-process inventory costs, and alleviating those bottlenecks is critical. Knowing _exactly_ the situation (in-process inventory levels and processing speed, for example) of _every_ stage of a production line in real time can greatly [improve productivity][4].
* Development of new business strategies: With new communication technology expertise, a company could open up new markets and opportunities that would have historically been out of its reach.
### **Let's do some research**
Armed with knowledge of those benefits, again imagine you're a salesperson at an enterprise communication or information technology company. You meet a potential customer at an exhibition or business summit, and she describes the following situation to you:
> "I'm the Operations Manager of a small, local transportation company that makes deliveries within and between several of the surrounding cities. We have a fleet of 30 trucks, all of various sizes and makes. I know the company's information system must to be improved; much of our communication is done through email attachments, texting, and mobile phone calls. We have no central information operating system."
A large, public, national trucking company has set up in her area. She's studied this competitor and read several of its news releases and annual reports. She's learned the company has a centralized communications system, and that all its trucks have tracking technologies that monitor the location of every truck in operation. Trucks also feature sensors that monitor many vehicle operations, including average and specific engine RPM per route by vehicle and driver, and miles travelled in particular conditions (to determine fuel economy and maintenance schedules). An electronic parts delivery system connects this company's service operations with a network of dealers to reduce the time service technicians must wait for parts.
This is what the small local trucking company must compete against. So its operations manager asks you, the IT company salesperson, what you can do to help.
You decide that your first step is to conduct a survey to learn more about both the company's current communication technology system and the personnel's attitude toward this system in order to see what _could_ and _should_ be done to improve the situation. While there, you want to learn this trucking company's IT status _before_ making any recommendations.
I've created a worksheet you might use to facilitate this conversation.
### Taking the temperature
The first part of the worksheet can help you develop a baseline assessment of an organization's readiness for technological change.
#### Part 1: Baseline maturity relative to competitors
Generally, if the customer scores between 10 and 42, then that customer needs more assistance adopting new communication technology, but this varies by industry. If the score is between 43 and 70, then (when compared to competitors the customer is likely already mature in its use of communication technologies.
#### Part 2: Leaders' relationship to communication technologies
Next, you need to assess the company leadership's relationship to technologies, associated processes, and cultural changes. So let's make those calculations in Part 2 of the worksheet.
Here again, depending on the competitive environment, if the score is between 10 and 42, then the company is generally _not_ completely utilizing the communication technology it has. If the score is between 43 and 70, then generally the company puts the communication technology it has to good, creative use.
Organizational leaders must lead the conversation about using more advanced communication systems in the organization. Therefore management must establish training programs to teach everyone in the organization the skills required to _use_ that technology (a step often forgotten or poorly implemented).
#### Part 3: Awareness of challenges and opportunities
We now need to help the organization think more strategically about its use of communication technologies to implement open processes and open culture. We'll do this with Part 3 of the worksheet.
If an organization scores higher than 15, the company understands the communication technology landscape fairly well. If the score is between 9 and 15, the organization needs to isolate its weakest areas and remedy them. A score of less than 9 indicates that the organization should consider conducting new awareness exercises and/or communication technology discovery programs.
#### Part 4: Technological mastery relative to competitors
Next, we need to better understand the trucking company's current strategic assets and its level of technological mastery relative to competitors. We'll do that with Part 4 of the worksheet.
An organization that scores above 16 in this section likely knows where it stands and what its innovation trajectory is in comparison to competitors. A score of 7 to 16 means the organization needs to build alignment around a viable renewal path. A score of less than 7 might mean the organization should conduct a communication technology maturity assessment and update its best practices.
#### Part 5: Ability to articulate technological vision
Now let's explore how well the organization's senior leaders can articulate a vision for the role communication technology will play in the company's future. That's Part 5 of the worksheet.
If the organization scores over 24, then its members likely believe its executives are aligned on a technological vision (and are considering competitors). A score of 14 to 24 should prompt us to isolate the root causes of the concerns and work with the team to remedy them. Anything less than 14 should spur a structured senior executive alignment initiative.
Questions like these can clarify the extent to which employees must be involved in communication technology investment decision-making and utilization. Front-line members typically know what's necessary, what's available, and what the organization should introduce.
### From vision to action
I've seen first-hand that in situations like these, purchasing technologies is only half the problem. Getting people to buy into the system and use it to full capacity are far bigger challenges.
In this section, we'll assess the organization's ability to translate technological vision into action.
#### Part 6: Ability to translate vision to action
First, let's see how the company is currently converting its vision into an action plan relative to competitors. We'll return to the worksheet, specifically Part 6.
A company scoring more than 17 points likely has a robust plan and evaluation system in place, and is focused on engaging people in executing technological adoption efforts relative to competitors. Organizations scoring 7 to 17 should review the action plan and milestone checklist weekly for content and alignment. Those scoring less than 7 should conduct a full review of its milestone checklist and action plan processes.
#### Part 7: Supervision strategies
Few plans succeed without proper supervision, so you'll want to assess the organization's plans to oversee change management efforts. We'll use the trusty worksheet—this time, Part 7.
Did the company score something greater than 15? Then its supervision model is in good shape. Maybe 8 to 15? It should check its governance principles and/or program leadership. Less than 8? Time to rework (or design for the first time) its supervision principles.
#### Part 8: Funding strategy for implementation
Of course, organizational initiatives like these require funding. So you'll want to assess the organization's financial commitment to technological change. Once again, let's use our worksheet (Part 8 this time).
Scoring more than 16 points means the company's funding for new communication technologies is strong. Scoring 8 to 16 means the company should work to ensure that the company portfolio, funding, and business strategy are better aligned. Anything less than 8 means company needs to rework its investment and funding strategy for new technologies.
#### Part 9: Clarity and promotion of vision
Organizational leaders should constantly be clarifying and advocating plans to adopt new technologies. How are they doing? Let's review Part 9 of our worksheet.
If the company scores over 17, then it's likely doing a good job of marketing its ambitions. If it scores somewhere between 7 and 17, it should isolate dimensions of its messaging that need refinement and work with the team to remedy them. If it scores less than 7, it should consider developing a specific program to convey the company's ambition more broadly.
#### Part 10: Ability to build and sustain engagement
Changes to technological systems and processes don't happen automatically. People need to invest in them, and leaders need to sustain their engagement in the organizational changes. Not everyone will buy in (as I've [written previously][5]). We can assess how well the organization is doing this with Part 10 of the worksheet.
A score over 23 indicates that the company is doing a good job building momentum while introducing communication technologies. A score of 12 to 23 means that organization might need to isolate some part of the process that's not proceeding satisfactorily and remedy that component. Less than 12? The company needs to design and conduct a full engagement program.
### Organizational considerations
This final section assesses specific _organizational_ capacities—that is, the organization's culture, its structure, and its processes. Becoming more open by adopting new communication technologies is only possible if the organization itself is flexible and willing to change.
#### Part 11: Organizational culture
Is the organizational environment amenable to the kinds of changes necessary for effectively adopting new communication activities? We'll assess that in Part 11 of our worksheet.
An organization scoring more than 16 points is already shifting its organizational behaviors and culture ahead of competitors. One scoring between 7 and 16 points should investigate root causes of concerns about cultural changes and work with the team to remedy problems. An organization scoring less than 7 should begin working to shift its culture around communication practices and expectations.
#### Part 12: Organizational structure
Does the organization's current structure allow it to sustain communication technology innovations? Use Part 12 of the worksheet to gather an initial impression.
Scoring over 16 means the company possesses the basic structural capabilities necessary for sustained, steady, technical changes. Scoring between 8 and 16 means the company has only begun implementing projects aimed at developing necessary structural capabilities, but more effort is needed. And a score of less than 8 indicates that the company needs to consider specific programs for improving basic structural capabilities.
#### Part 13: Reward and incentive structures
Are the organization's reward and incentive structures aligned with the organization's goals for introducing and adopting new communication technologies? Let's look at the worksheet one last time.
A score over 14 indicates that the company's current reward structures are aligned with its communication technology objectives. A score between 6 and 14 tells us that the organization should build stronger consensus around a viable reward strategy aligned to communication technology renewal. And a score of less than 6 should prompt leadership to implement specific reward structures that accomplish its communication technology adoption goals.
### Post-survey debrief
After collecting those data, you're now in a position to ask how your information technology company can help your potential customer in four areas:
1. Data gathering and company strategy analytics
2. Social media, internet utilization, and interaction internally
3. Telecommunication utilization within company (to avoid excess and unnecessary traveling for meetings, etc.)
4. Automation technology utilization within the company
You're also able to inquire within your company (among solution architects, for example) who we potentially should partner with if need be in order to achieve this transportation company's goals in these four areas."
In these kinds of strategic partnerships, open organization principles—especially transparency, inclusivity, collaboration, and community—come alive. One person cannot do this kind of work alone.
I've seen first-hand that in situations like these, purchasing technologies is only _half the problem._ Getting people to _buy into the system_ and _use it to full capacity_ are far bigger challenges. These challenges are cultural, not technological. Being a "communication superstar" means being great in both those areas—both the communication technology itself, as well as the culture and process expertise necesasry for actual utilization.
--------------------------------------------------------------------------------
via: https://opensource.com/open-organization/20/3/communication-technology-worksheet
作者:[Ron McFarland][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/ron-mcfarland
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/build_structure_tech_program_code_construction.png?itok=nVsiLuag (Someone wearing a hardhat and carrying code )
[2]: https://opensource.com/open-organization/resources/open-org-definition
[3]: https://opensource.com/open-organization/20/1/communication-technology-superstars
[4]: https://www.slideshare.net/RonMcFarland1/improving-processes-65115172?qid=b0a0fde3-62c6-4538-88c8-1bfd70485cee&v=&b=&from_search=5
[5]: https://opensource.com/open-organization/17/1/escape-the-cave

View File

@ -0,0 +1,78 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Key Takeaways from Ciscos Annual Internet Report)
[#]: via: (https://www.networkworld.com/article/3529989/key-takeaways-from-cisco-s-annual-internet-report.html)
[#]: author: (Zeus Kerravala https://www.networkworld.com/author/Zeus-Kerravala/)
Key Takeaways from Ciscos Annual Internet Report
======
Businesses need to be ready for the massive wave of devices and bandwidth that are coming in the next vide years
Natalya Burova / Getty Images
By 2023, two-thirds of the worlds population will have Internet access—thats 5.3 billion total Internet users, compared to 3.9 billion in 2018. The number of devices and connections will also skyrocket. There will be 3.6 networked devices per capita by 2023, whereas in 2018, there were 2.4 networked devices per capita.
These findings come from Ciscos _[Annual Internet Report (2018 2023) ][1]_(AIR) - previously known as Visual Network Index (VNI), which assesses the digital transformation across different business segments and their adoption of networking technologies, including fixed broadband, Wi-Fi, and mobile (3G, 4G, 5G). 
[[Get regularly scheduled insights by signing up for Network World newsletters.]][2]
The report described an increased demand for new or enhanced applications that boost workforce productivity or improve customer experiences. In todays mobile world, users expect their devices (and networks) to deliver on all fronts: quality, ease of use, and seamless connectivity. 
[Cisco][3]
The report can be useful as companies plan out their network strategies. One of the aspects of the VNI that Cisco carried over to AIR is an [online tool][4] that lets people slice and dice the information by country, device or other factors. They also included an [“Internet readiness” tool ][5]that explores how prepared different regions are for the coming wave of devices and need for bandwidth. 
**More network automation is needed**
To meet growing demand for enhanced apps, enterprises need automated network monitoring and optimization, andt that can be achieved with software-defined wide area networking (SD-WAN). Software-driven networks create more flexible infrastructures that can adapt to changing traffic requirements, which becomes necessary as more enterprises move to hybrid clouds, the report says.
Policy-based automation and Intent-Based Networking (IBN) are just as important when it comes to building agile, portable, and scalable networks. IBN, as the name implies, captures business intent through analytics and machine learning. One trend Cisco observed in its report is how business WAN traffic flow patterns are becoming more software-based and hybrid in nature, creating a need for IBN solutions, the report says.
[][6]
**SD-WAN is core to network success**
SD-WAN is important to the network edge, which brings computing, storage, and networking resources closer to users and devices. Cisco found many use cases driving the need for greater edge-computing capabilities. One of them is finding ways to control data from the billions of Internet of Things (IoT) endpoints being added to the network edge.
Out of the 29.3 billion networked devices in use by 2023, about half will support various IoT applications, per Ciscos report. As for machine-to-machine (M2M) communication, there will be 14.7 billion connections by 2023. Consumers will hold the biggest share (74%) of total devices and connections, with businesses claiming approximately 26%. However, the consumer share will grow at a slower rate than business.
How will enterprises manage to secure all networked devices and data? Cisco recommends creating a security policy that strikes a balance between data protection and ease of use. In other words, networks will have to be intelligent enough to grant access to the right users without putting them through a difficult authentication process.
**Network managers still struggle to lower operational costs**
Network managers continue to struggle with rising operational costs, as the explosion of devices and data outpaces IT resources. Cisco found nearly 95% of network changes are still performed manually, resulting in operational costs that outweigh network costs. Thats where IT automation can help, enabled by SDN, intelligent network-edge enhancements, and unified domain controls.
In addition to exploring business-specific networking needs, Cisco outlined some trends in consumer and small-to-medium business (SMB) markets. Here are the key takeaways:
* **Next-generation applications**—built with artificial intelligence (AI) and machine learning—will create complex requirements and new business models. Mobile applications, specifically, will drive future consumer, SMB, and enterprise needs, with 299.1 billion mobile apps downloaded worldwide by 2023.
* **Mixed devices and connections** are enabling myriad M2M apps. Connected-home, video-surveillance, connected appliances, and tracking apps will make up 48% of M2M connections by 2023. Connected-car apps will be the fastest-growing category, with connected cities coming in second.
* **Accelerating broadband speeds** will affect traffic growth and use of high-bandwidth content and applications. Average broadband speeds will more than double globally from 45.9 Mbps (in 2018) to 110.4 Mbps (in 2023). Fiber-to-the-home (FTTH), high-speed DSL, and cable broadband adoption will contribute to the growth.
* **Wi-Fi will gain momentum** as devices and IoT connections increase. By 2023, the number of public Wi-Fi hotspots will grow to 628 million, up from 169 million in 2018. Wi-Fi 6 promises to boost speeds by up to 30%, compared to the current generation. More importantly, next-gen Wi-Fi will significantly improve real-time communications and high-definition video, impacting both consumer and business sectors.
Join the Network World communities on [Facebook][7] and [LinkedIn][8] to comment on topics that are top of mind.
--------------------------------------------------------------------------------
via: https://www.networkworld.com/article/3529989/key-takeaways-from-cisco-s-annual-internet-report.html
作者:[Zeus Kerravala][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.networkworld.com/author/Zeus-Kerravala/
[b]: https://github.com/lujun9972
[1]: http://www.cisco.com/go/ciscoair
[2]: https://www.networkworld.com/newsletters/signup.html
[3]: https://www.cisco.com/c/en/us/solutions/collateral/executive-perspectives/annual-internet-report/white-paper-c11-741490.html
[4]: https://www.cisco.com/c/en/us/solutions/executive-perspectives/annual-internet-report/air-highlights.html
[5]: https://www.cisco.com/c/en/us/solutions/service-provider/cloud-readiness-tool/index.html
[6]: https://www.networkworld.com/article/3440100/take-the-intelligent-route-with-consumption-based-storage.html?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE21620&utm_content=sidebar ( Take the Intelligent Route with Consumption-Based Storage)
[7]: https://www.facebook.com/NetworkWorld/
[8]: https://www.linkedin.com/company/network-world

View File

@ -0,0 +1,61 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Most-used libraries, open source adoption, and more industry trends)
[#]: via: (https://opensource.com/article/20/3/libraries-5G-more-industry-trends)
[#]: author: (Tim Hildred https://opensource.com/users/thildred)
Most-used libraries, open source adoption, and more industry trends
======
A weekly look at open source community and industry trends.
![Person standing in front of a giant computer screen with numbers, data][1]
As part of my role as a senior product marketing manager at an enterprise software company with an open source development model, I publish a regular update about open source community, market, and industry trends for product marketers, managers, and other influencers. Here are five of my and their favorite articles from that update.
## [Most-used libraries revealed plus 10 things developers should be doing to keep their code secure][2]
> “The report begins to give us an inventory of the most important shared software and potential vulnerabilities and is the first step to understand more about these projects so that we can create tools and standards that results in trust and transparency in software," explained Jim Zemlin, executive director at the Linux Foundation, in a statement.
**The impact**: Importantly, there is also a great list of packages for backdoors here.
## [Survey: Open source adoption, quality gains][3]
> Overall, the survey finds there has been [a marked shift away from proprietary software][4]. Only 42% said that more than half of the software they use today is proprietary, down from 55% a year ago. Two years from now only 32% said they expect proprietary software to account for more than half their portfolio. On average, respondents said 36% of their organizations software is open source, which in two years is expected to increase to 44% in two years. A total of 77% said they would increase usage of open source software over the next 12 months.
**The impact**: There is a clear virtuous cycle of companies getting more comfortable with open source and more open source software being created. If there isn't already, there will be a rule 34 about open source software.
## [5G must go cloud-native from edge to core][5]
> A containerised core will be the heart of cloud-native 5G networks. Managing and scaling networking apps in containers using a modular microservices approach will help service providers to dynamically orchestrate and grow service capacity across a distributed architecture.
**The impact**: When you're building something complicated and reliable, you really can't look past starting with open source software. Unless you want to be in a foot race against "a Kawasaki" (that's a motorbike, right?).
## [High-performance object storage, Kubernetes, + why you can't containerize a storage appliance][6]
> True multi-tenancy isnt possible unless the storage system is extremely lightweight and able to be packaged with the application stack. If the storage system takes too many resources or contains too many APIs, it wont be possible to pack many tenants on the same infrastructure.
**The impact**: The title of this post is a challenge to someone much more skilled and knowledgable than I.
_I hope you enjoyed this list and come back next week for more open source community, market, and industry trends._
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/3/libraries-5G-more-industry-trends
作者:[Tim Hildred][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/thildred
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/data_metrics_analytics_desktop_laptop.png?itok=9QXd7AUr (Person standing in front of a giant computer screen with numbers, data)
[2]: https://www.theregister.co.uk/2020/02/20/linux_foundation_report/
[3]: https://devops.com/surevey-sees-open-source-adoption-quality-gains/
[4]: https://devops.com/devops-deeper-dive-devops-accelerates-open-source-innovation-pace/
[5]: https://www.5gradar.com/features/5g-must-go-cloud-native-from-edge-to-core
[6]: https://blog.min.io/high-performance-object-storage-with-kubernetes/

View File

@ -0,0 +1,79 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Seawater, humidity inspire new ways to generate power)
[#]: via: (https://www.networkworld.com/article/3529893/seawater-humidity-inspire-new-ways-to-generate-power.html)
[#]: author: (Patrick Nelson https://www.networkworld.com/author/Patrick-Nelson/)
Seawater, humidity inspire new ways to generate power
======
Researchers around the globe are working on new ways to generate huge amounts of power that will be needed for the shift to a data-driven society.
Getty Imags
The possiblity of a future power-availability crunch spurred in part by a global increase in data usage is driving researchers to get creative with a slew of new and modified ways to generate and store energy.
Ongoing projects include the use of seawater for batteries; grabbing ambient humidity; massive water storage systems for hydropower; and solar panels that work at night. Here are some details:
### Batteries based on seawater
Seawater will provide "super-batteries," says the University of Southern Denmark. Researchers there have been studying how to use sodium, which is abundant in seawater, as an alternative to lithium in batteries.
[[Get regularly scheduled insights by signing up for Network World newsletters.]][1]
"Sodium is a very readily available resource," the school says in a [press release][2], and it can be easily extracted from seawater. Lithium, on the other hand, is a limited resource that's mined only in a few places in the world, says research leader Dorthe Bomholdt Ravnsbæk of the department of physics, chemistry and pharmacy at the university. Batteries based on seawater would also alleviate the need for cobalt, which is used in lithium cells. The team in Denmark (working with Massachusetts Institute of Technology) believes it has come up with a new electrode material, based on manganese, that will make the seawater battery ultimately viable.
### Using ambient moisture to generate power
Humidity captured with bio-electronics could end up being a viable power source for sensors, say some scientists.
"Harvesting energy from the environment offers the promise of clean power for self-sustained systems," notes University of Massachusetts researchers [in an article published in Nature][3]. However, known technologies often have restrictive environmental requirements  solar panels that must be mounted outside, for example that limit their energy-producing potential.
Moisture harvesting with thin-film, protein nanowires doesn't have restrictive environmental requirements. Sustained voltages of about half a volt can be obtained from moisture present in normal, ambient air. "Connecting several devices linearly scales up the voltage and current to power electronics," the Amherst group claims. "Our results demonstrate the feasibility of a continuous energy-harvesting strategy that is less restricted by location or environmental conditions than other sustainable approaches."
[][4]
### Seasonally pumped hydropower storage 
On a larger scale, inland water storage could solve renewable power issues, say scientists at the International Institute for Applied Systems Analysis.
One big problem collecting power from the environment, as opposed to using fossil fuels, is where to store the on-the-fly electricity being generated. The Austrian organization believes that hydropower systems should be used to contain renewable energy. It's cheap, for starters. In addition, seasonal pumped hydropower storage (SPHS) is better than wind or solar, the group claims, because it not only generates the power in real time as its needed, but also isn't affected by variations— a windy day isn't required, for example.
SPHS operates by pumping water into dammed, river-adjacent reservoirs when water flow is high but power demand is low. Water is then allowed to flow out of the reservoir, through turbines—similar to hydroelectric—when energy demand increases. Electricity is thus created. The group, in a [press release][5] related to a study just released, says the technique is highly economical, even including required land purchases, excavation and tunneling.
### Nighttime, anti-solar cells
Contrary to popular belief, photovoltaic solar panels don't actually need full sun to function. Cloud cover allows some to work just fine, just not as well. Nighttime photovoltaic, however, is something more radical:
The earth should be used as a heat source, and the night sky a heat sink, say Jeremy Munday and Tristan Deppe of the department of electrical and computer engineering at University of California, Davis. They shared their idea for nighttime photovoltaic cells in an [abstract of a paper][6] published by American Chemical Society's ACS Photonics.
What they are suggesting is using thermoradiative photovoltaics, where deep space radiative cooling ([which Ive written about before][7]) is combined with photovoltaics. Current is created as infrared light or heat, in other words is radiated into extremely cold, deep space.
"Similar to the way a normal solar cell works, but in reverse," Munday says of their anti-solar panel concept, quoted in a [UC Davis news article][8]. 
Join the Network World communities on [Facebook][9] and [LinkedIn][10] to comment on topics that are top of mind.
--------------------------------------------------------------------------------
via: https://www.networkworld.com/article/3529893/seawater-humidity-inspire-new-ways-to-generate-power.html
作者:[Patrick Nelson][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.networkworld.com/author/Patrick-Nelson/
[b]: https://github.com/lujun9972
[1]: https://www.networkworld.com/newsletters/signup.html
[2]: https://www.sdu.dk/en/nyheder/Forskningsnyheder/skal_fremtidens_superbatterier_laves_af_havvand
[3]: https://www.nature.com/articles/s41586-020-2010-9
[4]: https://www.networkworld.com/article/3440100/take-the-intelligent-route-with-consumption-based-storage.html?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE21620&utm_content=sidebar ( Take the Intelligent Route with Consumption-Based Storage)
[5]: https://iiasa.ac.at/web/home/about/news/200219-seasonal-pumped-storage.html
[6]: https://pubs.acs.org/toc/apchd5/7/1
[7]: https://www.networkworld.com/article/3222850/space-radiated-cooling-cuts-power-use-21.html
[8]: https://www.ucdavis.edu/news/anti-solar-cells-photovoltaic-cell-works-night
[9]: https://www.facebook.com/NetworkWorld/
[10]: https://www.linkedin.com/company/network-world

View File

@ -0,0 +1,61 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Chinese auto giant Geely plans a private satellite network to support autonomous vehicles)
[#]: via: (https://www.networkworld.com/article/3530336/chinese-auto-giant-geely-plans-a-private-satellite-network-to-support-autonomous-vehicles.html)
[#]: author: (Patrick Nelson https://www.networkworld.com/author/Patrick-Nelson/)
Chinese auto giant Geely plans a private satellite network to support autonomous vehicles
======
Geely is developing a satellite network to provide high-bandwidth wireless needed by on-board applications in self-driving vehicles.
Olivier Le Moal / Getty Images
What does a large automaker thats morphing into a mobile-technology company and heavily investing in autonomous vehicles need to add to its ecosystem? Probably connectivity, and thats likely why Chinese car giant Geely says it will be building its own satellite data network.
A need for “highly accurate, autonomous driving solutions,” is part of whats driving the strategy, the company says in a [press release][1]. Geely the largest car maker in China and whose assets include Volvo and a stake in Lotus has begun building a test facility in Taizhou City where it will develop satellite models, the company says.
[[Get regularly scheduled insights by signing up for Network World newsletters.]][2]
“The creation of a truly smart, three-dimensional mobility ecosystem,” as the company describes its Geespace project, will include precise navigation, cloud computing and high-speed Internet functions. Geely is investing $326 million in the project [according to Reuters][3], citing a statement from the company.
Over-the-air updating of vehicle software is a principal reason data networks will become prevalent in automobile technology. Historically, car companies havent worried much about the speedy updating of end-users systems, in part because theyve liked getting customers back into the dealership to upsell service options and pitch new cars. A leisurely software patch while the customer hangs around drinking warm coffee and watching daytime soaps suits that purpose. However, autonomous cars are a different story: The safety of self-driving cars cant tolerate software vulnerabilities.
Control over vehicle positioning also comes into play. Knowing where the car is and where obstacles are is more important than in traditional vehicles. Lane-change and accident avoidance, for example, are autonomous-vehicle features that require high levels of accuracy.
“The Geespace low-orbit satellite network will offer much higher centimeter-accurate precision,” Geely says, comparing its proposed constellation with the U.S. government-owned Global Positioning System.
Data processing, artificial intelligence and infotainment onboard the vehicles all need fat networks, too. Former Intel CEO Brian Krzanich [said at a talk I attended a few years ago][4] that he thought cars would soon create 4,000 GB of data per hour of driving because of the number of sensors, such as cameras, that theyll be equipped with.
[][5]
The Geely private satellite network is the first of its kind for an industrial use and joins [a trend in private wireless networking][6]. Private, terrestrial 5G networks and private LTE networks allow companies to control their own data and uptime, rather than relying on service providers. Mercedes-Benz is reportedly working on a private 5G network for privacy and security.
“As vehicles become more connected and integrated into the Internet of Things ecosystem, the demand for data has grown exponentially,” Geely says.
Geely will begin launching the Geespace satellites by the end of 2020.
Join the Network World communities on [Facebook][7] and [LinkedIn][8] to comment on topics that are top of mind.
--------------------------------------------------------------------------------
via: https://www.networkworld.com/article/3530336/chinese-auto-giant-geely-plans-a-private-satellite-network-to-support-autonomous-vehicles.html
作者:[Patrick Nelson][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.networkworld.com/author/Patrick-Nelson/
[b]: https://github.com/lujun9972
[1]: http://zgh.com/media-center/news/2020-03-03-1/?lang=en
[2]: https://www.networkworld.com/newsletters/signup.html
[3]: https://www.reuters.com/article/geely-china-satellite-autonomous/chinas-geely-invests-326-mln-to-build-satellites-for-autonomous-cars-idUSL4N2AV45H
[4]: https://www.networkworld.com/article/3147892/one-autonomous-car-will-use-4000-gb-of-dataday.html
[5]: https://www.networkworld.com/article/3440100/take-the-intelligent-route-with-consumption-based-storage.html?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE21620&utm_content=sidebar ( Take the Intelligent Route with Consumption-Based Storage)
[6]: https://www.networkworld.com/article/3319176/private-5g-networks-are-coming.html
[7]: https://www.facebook.com/NetworkWorld/
[8]: https://www.linkedin.com/company/network-world

View File

@ -0,0 +1,61 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Report: Most IoT transactions are not secure)
[#]: via: (https://www.networkworld.com/article/3530476/report-most-iot-transactions-are-not-secure.html)
[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/)
Report: Most IoT transactions are not secure
======
Data gathered by security provider Zscaler shows that not only are most internet-of-things transactions unsecured, they are also unauthorized as IoT creeps in as shadow-IT devices.
Iot
The majority of [Internet of Things (IoT)][1] transactions dont use even basic security, and there is a great deal of unauthorized IoT taking place inside the perimeter of enterprise firewalls thanks to shadow IT, a new study finds.
Security vendor Zscaler analyzed nearly 500 million IoT transactions from more than 2,000 organizations over a two-week period. [The survey][2] found 553 different IoT devices from more than 200 different manufacturers, many of which had their security turned off.
[[Get regularly scheduled insights by signing up for Network World newsletters.]][3]
The study was done on Zscalers own Internet Access security service. It found the rate of IoT growth to be explosive: When it first started monitoring IoT traffic in May 2019, IoT traffic generated by its enterprise customer base was 56 million IoT transactions per month. By February 2020, that number had soared to 33 million transactions _per day_, or one billion IoT transactions per month, a 1,500% increase.
Zscaler is a bit generous in what it defines as enterprise IoT devices, from devices such as data-collection terminals, digital signage media players, industrial control devices, medical devices, to decidedly non-business devices like digital home assistants, TV set-top boxes, IP cameras, smart home devices, smart TVs, smart watches and even automotive multimedia systems.
“What this tells us is that employees inside the office might be checking their nanny cam over the corporate network. Or using their Apple Watch to look at email. Or working from home, connected to the enterprise network, and periodically checking the home security system or accessing media devices,” the company said in its report.
Which is typical, to be honest, and let (s)he who is without sin cast the first stone in that regard. Whats troubling is that roughly 83% of IoT-based transactions are happening over plaintext channels, while only 17% are using [SSL][4]. The use of plaintext is risky, opening traffic to packet sniffing, eavesdropping, man-in-the-middle attacks and other exploits.
And there are a lot of exploits. Zscaler said it detects about 14,000 IoT-based malware exploits per month, a seven-fold increase over the previous year.
“Folks can keep their smart watches, smart closets, and whatever else they think is making them smart. Banning devices is not going to be the answer here. The answer is changing up the narrative on how we think about IoT devices from a security and risk standpoint, and what expectations we put on manufacturers to increase the security posture of these devices,” wrote Deepen Desai, Zscalers vice president of security research in a [blog post][5].
Desai said the solution is “taking a [zero-trust][6] mentality.” It may be a buzzword but, “its about security people not trusting any person or device to touch the network—that is, until you know who the user is, what the device is, and whether that user and device are allowed to access the applications theyre trying to reach.”
Naturally Zscaler sells such a solution, but he makes a valid point. This is an ages-old problem I have seen time and again; a hot new technology comes along, everyone rushes to embrace it, then they think about securing it later. IoT is no different.
Whatever your device, at least go into the settings and turn on SSL.
Join the Network World communities on [Facebook][7] and [LinkedIn][8] to comment on topics that are top of mind.
--------------------------------------------------------------------------------
via: https://www.networkworld.com/article/3530476/report-most-iot-transactions-are-not-secure.html
作者:[Andy Patrizio][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.networkworld.com/author/Andy-Patrizio/
[b]: https://github.com/lujun9972
[1]: https://www.networkworld.com/article/3207535/what-is-iot-the-internet-of-things-explained.html
[2]: https://info.zscaler.com/resources-industry-iot-in-the-enterprise
[3]: https://www.networkworld.com/newsletters/signup.html
[4]: https://www.networkworld.com/article/2303073/lan-wan-what-is-transport-layer-security-protocol.html
[5]: https://www.zscaler.com/blogs/corporate/shining-light-shadow-iot-protect-your-organization
[6]: https://www.networkworld.com/article/3487720/the-vpn-is-dying-long-live-zero-trust.html
[7]: https://www.facebook.com/NetworkWorld/
[8]: https://www.linkedin.com/company/network-world

View File

@ -0,0 +1,111 @@
[#]: collector: (lujun9972)
[#]: translator: (chuan-325)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (How I learned about burnout the hard way)
[#]: via: (https://opensource.com/article/20/3/burnout)
[#]: author: (Jason Hibbets https://opensource.com/users/jhibbets)
How I learned about burnout the hard way
======
Burnout can happen to anyone. Here are the 3 things I wish I knew before
I burned out.
![Light bulb][1]
In early 2017, I was mentally in a bad spot. It was the perfect storm of stress, the kind that no one asks for, but you deal with the hand you're dealt. Work was piling up to a point where I couldn't process all the things that were expected of me. I was training for spring half-marathons, which should have been stress relief, but I was putting too much pressure on myself to perform at a high level. And then on top of the everyday family obligations, a surgery in our household turned us into a one-car family and seriously added to the mounting pressure on me to provide and take care of the family.
Then I broke.
It wasn't one thing. It was the culmination of things. And it hit me from the blind side, unexpected. I never thought I would be a victim of burnout. I was aware of it and thoughtful about the community I was managing. But "not me," I thought to myself, "I've got this under control." I remember thinking that something was wrong; something was off. But I couldn't quite put my finger on the source.
I distinctly remember the day where I cried at work, crumbling under the pressure that I was putting on myself. I consider myself a high performer in the office environment. I push myself to exceed the goals that my team co-creates because I want that success. I want the feeling that comes with it. But this experience was different. This wasn't a healthy win for my team or me. I felt like I let everyone down, including myself.
I was attending South by Southwest in Austin, Texas, where I was [presenting my first Ignite Talk][2] on applying open source principles to government—a talk that was well received by the audience. I remember practicing, and practicing, and practicing more the day before and the morning of my talk. I got that high that comes after delivering a great talk. I had a book signing at the City of Raleigh's Economic Development booth during the event, which was another emotional boost. Life was good. Upon reflection, that's when I started noticing signs of my burnout.
I didn't have much of an appetite. I was tired all the time. I was sleeping in, and not because of jet lag. I was exercising but wasn't getting the endorphins I was used to. And I wasn't motivated to do the work that I normally love to do. I was very blah and meh about getting work done or hanging out with people I love. These are all signs of depression and burnout.
After the trip, I scheduled my annual physical and talked to my doctor about my situation, who recommended I see a psychologist. I sat on the couch and talked things out. I was diagnosed with severe anxiety, which was enough for me to know that I didn't want to know what true depression felt like.
I learned my lesson the hard way. I'd like to share my experience so that you can recognize the signs and avoid going down this path. And before we move on, I must say that it's perfectly fine to ask for help. Ask a trusted co-worker or friend for help or guidance. We're human, and we need to help each other through the ups and the downs.
### Three things to know about burnout
Work burnout is a form of depression where you are not motivated to do the things that are expected of you at your job. It's not the occasional slacking off or spring fever because the weather is nice. It's a buildup of emotional stress where you don't want to do what is asked of you at work. There are numerous factors that can lead to burnout.
#### Know the signs of burnout
Lesson number one about burnout is to know the signs. I mentioned some of the things I was experiencing, but there are many others. I remember one thing that was extremely abnormal for me (because I'm so social) is that I started to separate myself from my usual team activities and people.
* Hey Jason, want to grab lunch with us? Nope, I'm too busy.
* Hey Jason, Matt's in town, want to join us for happy hour? No. I've got work to do.
This is totally unlike me. I would normally have said yes to both those opportunities. According to the [Mayo Clinic][3], here are a few things to ask yourself if you think you are experiencing burnout:
* Do you drag yourself to work?
* Do you have trouble getting started with work?
* Are you cynical or critical at work?
* Have you become irritable or impatient with co-workers or customers?
* Do you lack the energy to be productive?
* Do you find it hard to concentrate?
* Do you lack satisfaction from your achievements?
* Do you feel disillusioned about your work?
* Are you using food, drugs, or alcohol to feel better or to simply not feel?
* Have your sleep habits changed?
* Are you troubled by unexplained headaches, stomach or bowel problems, or other physical complaints?
You can check your own burnout risk at [BurnoutIndex.org][4], an anonymous online questionnaire created in response to the [high level of burnout][5] in the tech industry.
#### Prevent burnout
The second lesson is to identify ways [to prevent burnout][6]. First, take time away from your job and plan time to unplug and unwind. This means planning vacations, staycations, or other time away from work. It's sometimes hard to unplug like this with the pressures and obligations we put on ourselves.
There are three different levels of paid time off (PTO):
1. **Best way to unplug:** I'm totally cut-off, not logging in, not checking email.
2. **Decent way to unplug:** I'm kind of checking in, but not as responsive as normal.
3. **Meh way to unplug:** I'm available if you need me, I'll monitor email, but I'm away from normal office life.
Your situation will dictate which of these levels of time off will work for you. In my experience, you need at least two total check-outs a year. I typically have a blend of all three throughout the year, but since 2017, I have taken at least three week-long vacations each year to completely escape. It's working so far!
#### Manage stress
The third and final lesson is to manage stress effectively. My first go-to for stress management is exercise. I'm addicted to it. I work out pretty much every single day. And I like to mix it up: Cardio, weight lifting, swimming, running, cycling, surfing, and high-intensity interval training (HIIT) are staples in my exercise routine. I used to focus solely on running four to six half marathons a year, but I recently switched to triathlons. The multidisciplinary aspect of the activity has brought more joy and different challenges to my life.
Another way to reduce stress is to manage your time better. Time is our most precious resource. You've got to choose how you want to spend your time. Family, work, self, social? It's up to you. Find ways to work more efficiently, more effectively, and make sure that you put yourself first. It may sound selfish, but as I've learned from the airplane preflight safety videos, "you need to put your mask on first before helping others."
### Conclusion
Burnout can lead to fatigue, excessive stress, sadness, anger, irritability, insomnia, alcohol or substance misuse, heart disease, and other medical conditions—all things that are not good for humans or for your team at work. I hope you can use these tips to put yourself first, reduce stress, and prevent burnout.
* * *
_Jason Hibbets will present "[10 things I wish I knew before experiencing burnout][7]" at [SCaLE 18x][8], March 58, 2020, in Pasadena, Calif. This article is a preview for the talk and a way to share a bit of his experience._
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/3/burnout
作者:[Jason Hibbets][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/jhibbets
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/bulb-light-energy-power-idea.png?itok=zTEEmTZB (Light bulb)
[2]: https://schedule.sxsw.com/2017/events/PP96070
[3]: https://www.mayoclinic.org/healthy-lifestyle/adult-health/in-depth/burnout/art-20046642
[4]: https://burnoutindex.org/
[5]: https://opensource.com/article/19/11/burnout-open-source-communities
[6]: https://www.redhat.com/sysadmin/tips-avoiding-burnout
[7]: https://www.socallinuxexpo.org/scale/18x/presentations/10-things-i-wish-i-knew-experiencing-burnout
[8]: https://www.socallinuxexpo.org/scale/18x/

View File

@ -0,0 +1,193 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (What is Linux and Why There are 100s of Linux Distributions?)
[#]: via: (https://itsfoss.com/what-is-linux/)
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
What is Linux and Why There are 100s of Linux Distributions?
======
When you are just starting with Linux, its easy to get overwhelmed.
You probably know only Windows and now you want to use Linux because you read that [Linux is better than Windows][1] as it is more secure and you dont have to buy a license to use Linux.
But then when you go about downloading and installing Linux, you learn that Linux is not a single entity. There are [Ubuntu][2], [Fedora][3], [Linux Mint][4], elementary and hundreds of such Linux variants. The trouble is that some of them look just like the other.
If thats the case, why are there multiple of those Linux operating systems? And then you also learn that Linux is just a kernel not an operating system.
![Too Many Linux!][5]
It gets messy. And you may feel like pulling out your hair. For a person who has a receding hairline, I would like you to keep your hair intact by explaining things in a way you could easily understand.
I am going to take an analogy and explain why Linux is just a kernel, why there are hundreds of Linux and why, despite looking similar, they are different.
The explanation here may not be considered good enough for an answer in an exam or interview but it should give you a better understanding of the topic.
Apology in advance!
My analogy may not be entirely correct from mechanical point of view as well. I am not knowledgeable about engines, cars and other related mechanical stuff.
But in my experience, I have noticed that this analogy helps people clearly understand the concept of Linux and operating system.
Also, I have used the term Linux OS instead of Linux distribution deliberately so that newcomers dont start wondering about distribution.
### Linux is just a kernel
_**Linux is not an operating system, its just a kernel.**_
The statement is entirely true. But how do you understand it. If you look into books, youll find Linux kernel structure described like this:
![Linux Kernel Structure][6]
There is absolutely correct, however, lets take a different approach. Think of operating systems as vehicles, any kind of vehicle be it motorbikes, cars or trucks.
What is at the core of a vehicle? An engine.
Think of kernel as the engine. Its an essential part of the vehicle and you cannot use a vehicle without the engine.
![The Operating System Analogy][7]
But you cannot drive an engine, can you? You need a lot of other stuff to interact with the engine and drive the vehicle. You need wheels, steering, gears, clutch, brakes and more to drive a vehicle on top of that engine.
Similarly, you cannot use a kernel on its own. You need lots of tool to interact with the kernel and use the operating system. These stuff could be shell, commands, graphical interface (also called desktop environments) etc.
This makes sense, right? Now that you understand this analogy, lets take it further so that you understand the rest of it.
Windows and other operating systems have kernel too
Kernel is not something exclusive to Linux. You may not have realized but Windows, macOS and other operating systems have a kernel underneath as well.
Microsoft Windows operating systems are based on [Windows NT kernel][8]. Apples macOS is based on the [XNU kernel][9].
### Think of operating systems as vehicles
Think of Microsoft as an automobile company that makes a general purpose car (Windows operating system) that is hugely popular and dominates the car market. They use their own patented engine that no one else can use. But these Microsoft cars do not offer scope of customization. You cannot modify the engine on your own.
Now come to Apple automobile. They offer shiny looking, luxury cars at an expensive price. If you got a problem, they have a premium support system where they might just replace the car.
Now comes Linux. Remember, Linux is just an engine (kernel). But this Linux engine is not patented and thus anyone is free to modify and build cars (desktop operating system), bikes (small embed system in your toys, tvs etc), trucks (servers) or jet-planes ([supercomputers][10]) on top of it. In real world, no such engine exists but accept it for the sake of this analogy.
![][11]
* kernel = engine
* Linux kernel = specific type of engine
* desktop operating systems = cars
* server operating systems = heavy trucks
* embed systems = motor-bikes
* desktop environment = body of the vehicle along with interiors (dashboard and all)
* themes and icons = paint job, rim job and other customization
* applications = accessories you put for specific purpose (like music system)
### Why there are so many Linux OS/distributions? Why some look similar?
Why there are so many cars? Because there are several vehicle manufacturers using the Linux engine and each of them have so many cars of different type and for different purposes.
Since Linux engine is free to use and modify, anyone can use it to build a vehicle on top of it.
This is why Ubuntu, Debian, Fedora, SUSE, [Manjaro][12] and many other **Linux-based operating systems (also called Linux distributions or Linux distros)** exist.
You might also have noticed that these Linux operating systems offer different variants but they look similar. I mean look at Fedoras default GNOME version and Debians GNOME version. They do look the same, dont they?
![Fedora GNOME vs Debian GNOME: Virtually No Visual Difference][13]
The component that gives the look and feel in a Linux OS is called [desktop environment][14]. In our analogy here, you can think of it as a combination of outer body and matching interiors. This is what provides the look and feel to your vehicle, does it not?
Its from the exterior that you can identify the cars into category of sedan, SUV, hatchback, station wagon, convertible, minivan, van, compact car, 4×4 etc.
But these type of cars are not exclusive to a single automobile company. Ford offers SUV, compact cars, vans etc and so do other companies like General Motors, Toyota.
![Vehicles of same type look similar even if they are from different automobile companies][15]
Similarly, distributions (Linux OSes) like Fedora, Ubuntu, Debian, Manjaro etc also offer different variants in the form of GNOME, KDE, Cinnamon, MATE and other [desktop environments][16].
Fords SUV may look similar to Toyotas or Renaults SUV. Fedoras GNOME version may look similar to Manjaro or Debians GNOME version.
#### Some type of cars consume more fuel, some desktop environments need more RAM
You probably understand the usefulness of different types of cars. Compact cars are good for driving in the cities, vans are good for long trip with family, 4×4 are good for adventures in jungles and other rough terrain. A SUV may look good and feel comfortable for sitting but it consumes more fuel than a compact car that might not be comfortable to sit in.
Similarly, desktop environments (GNOME, MATE, KDE, Xfce etc) also serve some purpose other than just providing the looks to your Linux operating system.
GNOME gives a modern looking desktop but it consumes more RAM and thus require that your computer has more than 4 GB of RAM. Xfce on the other hand may look old/vintage but it can run on systems with 1 GB of RAM.
#### Difference between getting desktop environment from distribution and installing on your own
As you start using Linux, youll also come across suggestions that you can easily install other desktop environments on your current system.
Remember that Linux is a free world. You are free to modify the engine, customize the looks on your own, if you have the knowledge/experience or if you are an enthusiastic learner.
Think of it as customizing cars. You may modify a Hundai i20 to look like Suzuki Swift Dzire. But it might not be the same as using a Swift Dzire.
When you are inside the i20 modified to look like Swiftz Dzire, youll find that it may not have the same experience from the inside. Dashboard is different, seats are different. You may also notice that the exterior doesnt fit the same on i20s body.
The same goes for switching desktop environments. You will find that you dont have the same set of apps in Ubuntu that you should be getting in Mint Cinnamon. Few apps will look out of place. Not to mention that you may find a few things broken, such as network manager indicator missing etc.
Of course, you can put time, effort and skills to make Hundai i20 look as much like Swift Dzire as possible but you may feel like getting Suzuki Swift Dzire is a better idea in the first place.
This is the reason why installing Ubuntu MATE is better than installing Ubuntu (GNOME version) and then [installing MATE desktop][17] on it.
### Linux operating systems also differ in the way they handle applications
Another major criteria on which the Linux operating systems differ from each other is the package management.
Package management is basically how you get new software and updates in your systems. Its up to your Linux distribution/OS to provide the security and maintenance updates. Your Linux OS also provides the means of installing new software on your system.
Some Linux OS provides all the new software version immediately after their release while some take time to test them for your own good. Some Linux OS (like Ubuntu) provides easier way of installing a new software while you may find it complicated in some other Linux OS (like [Gentoo][18]).
Keeping the line of our analogy, consider installing software as adding accessories to your vehicle.
Suppose you have to install a music system in your car. You may have two options here. Your car is designed in such a way that you just insert the music player, you hear the click sound and you know its installed. The second option could be to get a screwdriver and then fix the music player on screws.
Most people would prefer the hassle-free click lock installing system. Some people might take matter (and screwdriver) into their own hands.
If an automobile company provides scope for installing lots of accessories in click-lock fashion in their cars, they will be preferred, wont they?
This is why Linux distributions like Ubuntu have a more users because they have a huge collection of software that can be easily installed in matter of clicks.
### Conclusion
Before I conclude this article, Ill also like to talk about support that plays a significant role in choosing a Linux OS. For your car, you would like to have its official service center or other garages that service the automobile brand you own, dont you? If the automobile company is popular, naturally, it will have more and more garages providing services.
The same goes for Linux as well. For a popular Linux OS like Ubuntu, you have some official forums to seek support and a good number of websites and forums providing troubleshooting tips to fix your problem.
Again, I know this is not a perfect analogy but this helps understand the things slightly better.
If you are absolutely new to Linux, did this article made things clear for you or you are more confused than before?
If you already know Linux, how would you explain Linux to someone from non-technical background?
Your suggestions and feedback is welcome.
--------------------------------------------------------------------------------
via: https://itsfoss.com/what-is-linux/
作者:[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/linux-better-than-windows/
[2]: https://ubuntu.com/
[3]: https://getfedora.org/
[4]: https://linuxmint.com/
[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/03/too-many-linux-choices.png?ssl=1
[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/03/Linux_Kernel_structure.png?ssl=1
[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/operating_system_analogy.png?ssl=1
[8]: https://en.wikipedia.org/wiki/Architecture_of_Windows_NT
[9]: https://en.wikipedia.org/wiki/XNU
[10]: https://itsfoss.com/linux-runs-top-supercomputers/
[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/linux-kernel-as-engine.png?ssl=1
[12]: https://manjaro.org/
[13]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/03/fedora-gnome-vs-debian-gnome.jpg?ssl=1
[14]: https://itsfoss.com/glossary/desktop-environment/
[15]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/linux_suv_analogy.jpg?ssl=1
[16]: https://itsfoss.com/best-linux-desktop-environments/
[17]: https://itsfoss.com/install-mate-desktop-ubuntu/
[18]: https://www.gentoo.org/

View File

@ -0,0 +1,115 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (The De-Googled Android Fork is Making Good Progress)
[#]: via: (https://itsfoss.com/gael-duval-interview/)
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
The De-Googled Android Fork is Making Good Progress
======
A couple years ago, we covered the [Eelo project][1]. If you remember, the Eelo project was started by [Gael Duval][2] who once created Mandrake Linux. The goal of the Eelo project was to remove all Google services from Android to give you an [alternate mobile operating system][3] that doesnt track you and invade your privacy.
A lot has happened to Eelo since then. Its not called Eelo anymore, now its called /e/. So, whats happening with this project? We talked to Gael Duval himself. Heres what he shared with us.
![][4]
_**Why did you create this Eelo or /e/ project in the first place?**_
**Gael:** In 2017, I realized that using Android and iPhone, Google and many mobile apps was not compatible with my personal privacy.
A later study by a US University confirmed this: using an iPhone or and Android phone sends between 6 to 12 MB of personal data to Google servers, daily! And this doesnt count mobile apps.
So I looked for reasonable alternatives to iPhone and Android phones but didnt find any. Either I found options for hobbyists, like Ubuntu Touch, that were not compatible with existing apps and not fully unGoogled either. Or there were alternative ROMs with all the Google fat inside, and no associated basic online services that could be used without tweaking the system.
Therefore, an idea came to mind: why not fork Android, remove all the Google features, even low level, such as connectivity check, DNS…, replace default apps with more virtuous apps, add basic online services, and integrate all this into a consistent form that could be used by Mum and Dad and any people without tech or expert knowledge?
_**How is it any different from other custom Android ROMs?**_
**Gael:** It doesnt send a bit of data to Google, and is and will be more and more privacy-focused.
Low-level: we remove any Android feature that sends data to Google servers. Even the connectivity check when you start the smartphone! To my knowledge, there is not any other Android ROM that does this at the moment. We change default DNS settings and offer users an option to set the DNS of their choice. We change NTP (automatic time configuration) settings to the default NTP servers because there is no reason to use Google NTP servers actually. Then we remove Google services, and we replace with a software layout called microG that can still receive push notifications and have geolocation data for apps (using Mozilla geolocation service).
Then we change the default apps by non-Google apps, including the maps applications, mail etc., most are open source applications and I can say that there is 99% probability that all will be open source before the end of this year.
Then we add our own Android application installer, with close to 80 000 available applications at the moment.
We provide a different web browser, which is a fork of Chromium, were all features that data to Google are removed, and were the default search engine is not Google…
And we operate online services:
* search, using a meta-search system that we have improve for a better user experience
* online drive with encrypted data, calendar etc. using a modified version of NextCloud
* mail…
And for we provide a unique identifier that can be used to access all those services, either on the web or from the /e/ OS system, by login once. Then you can sync all your data, calendar, email etc. between your smartphone and your personal /e/ cloud (it can also be self-hosted).
The purpose of the project is to provide a normal, ready to use, and attractive “digital life” to users, without sending all your personal data to Google.
_**If it is completely ungoogled, how do users install new apps? Do you have your own app store? If yes, how can we trust that these apps dont spy on user data?**_
**Gael:** Yes we have our own application installer, with about 80 000 applications. And we analyse each application to unveil the number of trackers, and we display this information to our users, for each application. We are also adding Progressive Web Apps soon to this application installer.
/e/ OS is about freedom of choice. We want the core system to be better, and then offer as many possible options to users, by informing them as much as possible. In short: they can still any application they need. Next step will be to offer a feature to actually block trackers used in applications.
_**What is the target user base for /e/? Can an average Joey use it without much trouble?**_
![][5]
**Gael:** We started with tech-savvy users, and were expanding the user base to people with less knowledge. At the moment, our typical user base is a mix of tech-savvy users, who can flash a smartphone with /e/ OS and people who are very concerned with Google and their data privacy but have very limited technical knowledge. For those people we have some smartphones pre-installed with /e/ OS for sale, on high-grade refurbished hardware.
We are also announcing this week an “/e/ easy installer” that will make the flashing process much more easier, by pluging the smartphone to a PC and launching a dedicated application that will make most of the job.
Then, the next step will be to expand our target users to a more global market, once we find the good partners. But clearly, there is a demand for something different than the Apple-Google worldwide market duopoly on the mobile.
_**Initially the project was named eelo and it is called /e/ or [e foundation][6]. Personally, I find the name /e/ weird and it is not easily recognizable. Why did you change the project name?**_
**Gael:** We have been “attacked” by a company called “eelloo”. They considered that “eelo” would interfere with their business. They are in the HR business solutions, but registered their trademark in all the classes related to mobile OS, smartphones etc. This is silly and a shame, but we had no money to defend us strongly at the time.
However the/e/ name will be abandonned for something else quite soon.
_**Its been a couple of years since the initial launch. How do you see the adoption of /e/?**_
**Gael:** We launched the first beta 18 months ago, and we have started to sell smartphones with /e/ a little more than 6 months ago. The adoption is growing a lot at the moment, we have to add terabytes of online storage regularly!
Also with the /e/ installer arriving, and some official partnerships with some hardware mobile manufacturers in the pipe, this is going to accelerate a lot this year.
However, this is not surprising, privacy concerns are rising both for individuals and corporations, and I think the rejection of Google is also trending.
_**What are your future plans to grow /e/?**_
**Gael:** The growth is very natural. There is a strong community of users who realize how unique our approach is. These guys are contributing, supporting us and talking a lot about the project.
With the easy installer coming along and strategic partnerships with hardware makers, this is going to accelerate a lot.
Also, and this is more personal, I think that there is a natural connection between /e/ OS, and the Linux world. OK, /e/ OS is based on Android, but its still a Linux kernel and its the same spirit, its Open Source… So Id really like to have more natural integration between my /e/ smartphone and my Linux desktop. There should be some nice features added in this spirit in the next versions of /e/ OS.
_**What can /e/ users and our readers do to help e foundation?**_
**Gael:** Join us, talk about what we are doing, send your feedback, organize some meetups… Help improve the /e/ Wikipedia page which is very poor and doesnt represent at all what we are actually doing.
We also have a [permanent crowdfunding campaign where users can support the project financially][7], pay for the servers etc. And, in addition to giving back in term of open source product, we send cool stuff in return :)
--------------------------------------------------------------------------------
via: https://itsfoss.com/gael-duval-interview/
作者:[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/eelo-mobile-os/
[2]: https://en.wikipedia.org/wiki/Ga%C3%ABl_Duval
[3]: https://itsfoss.com/open-source-alternatives-android/
[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/03/e-os-interview.jpg?ssl=1
[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/e-foundation-smartphones.jpg?resize=800%2C590&ssl=1
[6]: https://e.foundation/
[7]: https://e.foundation/donate/

View File

@ -0,0 +1,60 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Data-center power consumption holds steady)
[#]: via: (https://www.networkworld.com/article/3531316/data-center-power-consumption-holds-steady.html)
[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/)
Data-center power consumption holds steady
======
While computing capacity has exploded in recent years, power consumption is growing more slowly thanks to greater energy efficiency.
Google
A predicted explosion in power consumption by data centers has not manifested thanks to advances in power efficiency and, ironically enough, the move to the cloud, according to a new report.
The [study][1], published in the journal _Science_ last week, notes that while there has been an increase in global data-center energy consumption over the past decade, this growth is negligible compared with the rise of workloads and deployed hardware during that time.
Data centers accounted for about 205 terawatt-hours of electricity usage in 2018, which is roughly 1% of all electricity consumption worldwide, according to the report. (That's well below the often-cited stat that data centers consume 2% of the world's electricity). The 205 terawatt-hours represent a 6% increase in total power consumption since 2010, but global data center compute instances rose by 550% over that same time period.
**[ Now read: [What is quantum computing (and why enterprises should care)][2] ]**
To drive that point home: Considerably more compute is being deployed, yet the amount of power consumed is holding steady.
The paper cites a number of reasons for this. For starters, hardware power efficiency is vastly improved. The move to server virtualization has meant a six-fold increase in compute instances with only a 25% increase in server energy use. And a shift to faster and more energy-efficient port technologies has brought about a 10-fold increase in data center IP traffic with only a modest increase in the energy use of network devices.
Even more interesting, the report claims the rise of and migration to hyperscalers has helped curtail power consumption. 
Hyperscale data centers and cloud data centers are generally more energy efficient than company-owned data centers because there is greater incentive for energy efficiency. The less power Amazon, Microsoft, Google, etc., have to buy, the more their bottom line grows. And hyperscalers are big on cheap, renewable energy, such as hydro and wind.
[][3]
So if a company trades its own old, inefficient data center for AWS or Google Cloud, they're reducing the overall power draw of data centers as a whole.
"Total power consumption held steady as computing output has risen because of improvement efficiency of both IT and infrastructure equipment, and a shift from corporate data centers to more efficient cloud data centers (especially hyper scale)," said Jonathan Koomey, a Stanford professor and one of the authors of the research, in an email to me. He has spent years researching data center power and is an authority on the subject.
"As always, the IT equipment progresses most quickly. In this article, we show that the peak output efficiency of computing doubled every 2.6 years after 2000. This doesnt include the reduced idle power factored into the changes for servers we document," he added.
Koomey notes that there is additional room for efficiency improvements to cover the next doubling of computing output over the next few years but was reluctant to make projections out too far. "We avoid projecting the future of IT because it changes so fast, and we are skeptical of those who think they can project IT electricity use 10-15 years hence," he said.
Join the Network World communities on [Facebook][4] and [LinkedIn][5] to comment on topics that are top of mind.
--------------------------------------------------------------------------------
via: https://www.networkworld.com/article/3531316/data-center-power-consumption-holds-steady.html
作者:[Andy Patrizio][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.networkworld.com/author/Andy-Patrizio/
[b]: https://github.com/lujun9972
[1]: https://science.sciencemag.org/content/367/6481/984
[2]: https://www.networkworld.com/article/3275367/what-s-quantum-computing-and-why-enterprises-need-to-care.html
[3]: https://www.networkworld.com/article/3440100/take-the-intelligent-route-with-consumption-based-storage.html?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE21620&utm_content=sidebar ( Take the Intelligent Route with Consumption-Based Storage)
[4]: https://www.facebook.com/NetworkWorld/
[5]: https://www.linkedin.com/company/network-world

View File

@ -0,0 +1,61 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Setting yourself up for success while working remotely)
[#]: via: (https://opensource.com/article/20/3/remote-work)
[#]: author: (Dawn Parzych https://opensource.com/users/dawnparzych)
Setting yourself up for success while working remotely
======
Whether you are new to working remotely or are a seasoned veteran, here
are tips to improve the experience.
![Woman sitting in front of her computer][1]
Remote work is not easy. While there are perks to being remote, it is a mind-shift and takes some getting used to. Talk to anybody that works remotely, and they will likely tell you some of the biggest challenges of remote work are _**feeling disconnected**_ and _**a loss of regime**_. Here are my tips gathered from 10 years as a remote worker on how to set yourself and your team up to work remotely successfully.
### Environment and regime
1. **"Commute" to and from work**. I'm not saying go to the extremes in this [_Audible commercial_][2], but I suggest leaving your home to go for a walk or a bike ride before you begin working. Do the same at the end of the day. I take my dog, Barley (pictured here), for a walk at the start and end of most days.![Here's my dog, Barley, who gets regular walks during my morning &quot;commute&quot;][3]
2. **Get dressed.** Don't be tempted to work in your PJs, because this blurs the line between work and home. People sometimes say that being able to work in your pajamas is a perk of remote work, but studies show this isn't great advice. You don't need to put on a suit and tie, but do change out of your pajamas; otherwise, before you know it, you will have gone three days without changing your clothes. For more reasons why check out this article from [_Fast Company_][4].
3. **Eat lunch away from your desk**. This is good advice even if you aren't working remotely.
4. **Stick to a schedule**. It's easy to start working as soon as you wake up and continue late into the evening. Set a start time and an end time for your day and stick to it. When I stop work for the day, I try to close my office door. Configure your working hours in every app you use so others know when you are available. Don't use your work computer outside of working hours if you can.
5. **Set up a dedicated work environment**, if possible. Try not to work from the kitchen table. This blurs the lines between home and work. My office (picture below) also has space for comfortable seating and desk seating to switch between the two.
6. **Check-in with your team** or friends in the morning. Don't mistake this for a daily stand-up; this is more like saying _hi_ when you're getting coffee.
7. **Sign-off at the end of the day**. This means both letting your team members know you are leaving and actually walking away from where you are working. Close the laptop. Turn off Slack notifications, etc.
8. **Keep people posted** if you are leaving early or unavailable. It helps build trust.
9. **Invest in a headset** if you will be doing a lot of calls. If there is more than one person in your household that is working remotely, they will thank you for this. It is no fun listening to somebody else's conference call.
10. **Turn on your video** when on a video call to help you feel connected and stay engaged. When your video is disabled, it is easy to wander off and get distracted by Slack (or its [open source alternatives][5]), Twitter, or any other number of distractions.
11. **Set up a weekly, casual remote chat**. At my company, we meet on Friday mornings via Zoom (or the open source alternative, [Jitsi][6]). This chat is open to remote and non-remote staff. It is an open call to talk about whatever is on our minds. Topics have ranged from music preferences to parenting challenges to what people are doing over the weekend.
12. **Set-up chat-roulette **if one-on-one interaction is more your thing. There are applications on most chat platforms that randomly pairs two employees to chat and get to know one another.
13. **Ask for help**. Chat with your colleagues if you're stuck, need encouragement, or need to vent. You are not alone. You are a member of a team. You can still grab a coffee or go for a walk with a teammate remotely.
![Heres my home office set up][7]
Everybody is different. These tips work for me, Id love to hear you share your advice below!
Not all work-from-home gigs are created equal. There is a vast ocean between being a member of a...
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/3/remote-work
作者:[Dawn Parzych][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/dawnparzych
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_women_computing_2.png?itok=JPlR5aCA (Woman sitting in front of her computer)
[2]: https://www.youtube.com/watch?v=oVCJhZhrJ04
[3]: https://opensource.com/sites/default/files/resize/pictures/barleywalking_0-300x379.png (Here's my dog, Barley, who gets regular walks during my morning "commute")
[4]: https://www.fastcompany.com/3064295/what-happened-when-i-dressed-up-to-work-from-home-for-a-week
[5]: https://opensource.com/alternatives/slack
[6]: https://meet.jit.si/
[7]: https://opensource.com/sites/default/files/pictures/6151f75e-bbeb-4e64-a5ca-0bbe4e981054.jpeg (Heres my home office set up)

View File

@ -0,0 +1,92 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Next wave of digital transformation requires better security, automation)
[#]: via: (https://www.networkworld.com/article/3531448/next-wave-of-digital-transformation-requires-better-security-automation.html)
[#]: author: (Zeus Kerravala https://www.networkworld.com/author/Zeus-Kerravala/)
Next wave of digital transformation requires better security, automation
======
F5 report highlights the challenges of digital initiatives, including a struggle to secure multi-cloud environments and a lack of IT skills required to extend automation efforts.
Loops7 / Getty Images
Digital transformation is a top-of-mind priority for CIOs who want innovative ways to deploy applications and run IT operations. In today's digital economy, companies that don't depend on applications to support their business are rare. On the contrary, most companies have some kind of digital transformation initiative in place, which is driving the adoption of cloud-native architectures and application services.
A new report from application delivery vendor F5 Networks finds businesses are entering the second phase of digital transformation by automating more parts of their networks. Based on a survey of nearly 2,600 senior leaders globally—from various industries, company sizes, and roles—the [_2020 State of Application Services Report_][1] uncovered five key trends shaping the application landscape.
**READ MORE:** [Top 10 underused SD-WAN features][2]
### 1\. Every company is undergoing a digital transformation
Having conducted its annual survey for six years in a row, F5 consistently found IT optimization and business process optimization to be the top reported benefits for companies with digital transformation initiatives. At this point, most companies have mastered automation of individual tasks by digitizing IT and business processes—which the report classifies as phase one of digital transformation.
Moving on to phase two, companies are shifting their focus to reducing complexity and supporting apps with a consistent set of services. External-facing apps make up a portion (45%) of an average company's portfolio and help generate revenue. Yet, the internal-facing ones—like productivity and operational apps—are vital to digitizing business processes.
Modern, microservices/cloud-native apps now make up approximately 15% of a company's portfolio, compared to 11% for mainframe-hosted apps. This mix of new and older generation apps indicates that businesses are dealing with a diverse app portfolio. As more businesses adopt an application-centric mindset, they can start managing their app portfolio like a business asset.
### 2\. Organizations struggle to secure multi-cloud environments
Every company has different needs, which is why most choose the best cloud for their applications on a case-by-case basis, the report finds. Businesses are adopting cloud platforms at a high rate, with 27% planning to have more than half of their applications in the cloud by the end of 2020.
For 87% of companies, multi-cloud is the preferred choice due to its flexibility. Multi-cloud typically includes a mix of infrastructure-as-a-service (IaaS) environments, so a company can choose to deploy multiple software-as-a-service (SaaS) or platform-as-a-service (PaaS) cloud services.
[][3]
However, multi-cloud environments pose challenges for businesses when it comes to maintaining security, policy, and compliance, according to the report's respondents. Companies are dealing with applications that reach hundreds to millions of end users—each one with its own security risk. Meanwhile, many don't have the expertise to protect the apps.
A whopping 71% of companies surveyed by F5 reported a skills gap in security. Only 45% of companies are confident that they're able to secure apps in the public cloud, while 62% think they can protect apps in an on-premises data center. The most confident companies have consistency across multiple architectures and multiple infrastructures, ensuring security and performance of all apps in their portfolio.
### 3\. Automation key to boosting efficiency
Manual processes may have been the norm for legacy networks, but modern networks require automation. That's why most companies (73%) have embraced it.
In this year's report, F5 observed more consistent use of automation in the deployment pipeline than in previous years. Automation of application infrastructure, network, application services, and security is nearly equal across the board at approximately 40% for survey respondents. (See also: [Enterprises being won over by speed, effectiveness of network automation][4])
Interestingly, more companies are choosing open source and continuous integration/continuous delivery (CI/CD) tools for automation over proprietary vendor solutions. The report found there is a need for open ecosystems with the increasing use of CI/CD tools, as businesses search for ways to address problems that slow down automation. Companies said their biggest struggles are with skill gaps in enterprise IT, integrating toolsets across vendors and devices, and the cost of new tools.
### 4\. Security app services are most widely deployed
Modern networks require application services—a pool of services necessary to deploy, run, and secure apps across on-premises or multi-cloud environments. Today, 69% of companies are using 10 or more application services, such as ingress control and service discovery. Ingress control is a relatively new application service that has become essential to companies with high API call volumes. It's one of many examples of the growing adoption of microservices-based apps.
Security services remain as the most widely deployed, with these in particular dominating the top five: SSL VPN and firewall services (81%); IPS/IDS, antivirus, and spam mitigation (77%); load balancing and DNS (68%); web application firewalls (WAF) and DDoS protection (each at 67%).
Over the next 12 months, the evolution of cloud and modern app architectures will continue to shape application services. At the top of the list (41%) is software-defined wide-area networking ([SD-WAN][5]). SD-WAN enables software-based provisioning from the cloud to meet modern application demands. Early SD-WAN deployments focused on replacing costly multi-protocol label switching (MPLS), but there is now greater emphasis on security as a core requirement for SD-WAN.
### 5\. DevOps picks up responsibility for app services
Although IT operations is still primarily responsible for deploying app services, the report revealed a shift taking place from single-function to ops-oriented team structures—such SecOps and DevOps.
The responsibility for securing, optimizing, and managing apps by DevOps teams is growing, fueled by cloud and container-native applications. Compared to just a few years ago, businesses have developed a preference for containers over virtual appliances for app services. Container preference grew from just 6% in 2017 to 18% in 2020, surpassing virtual machines (15%) and hardware (15%).
Regardless of preference, the challenges of modern app architectures call for collaboration between teams. IT operations and DevOps don't have to be mutually exclusive and can work together to address those challenges.
### What's Next?
Senior leaders surveyed in the report see big data analytics coming into play in the next two to five years.
Companies today only use a small portion of their data and aren't taking full advantage of it. In the third phase of the digital transformation, businesses can begin leveraging data captured by apps via artificial intelligence (AI)-powered analytics. The harnessed data can provide valuable insights to improve business processes.
Join the Network World communities on [Facebook][6] and [LinkedIn][7] to comment on topics that are top of mind.
--------------------------------------------------------------------------------
via: https://www.networkworld.com/article/3531448/next-wave-of-digital-transformation-requires-better-security-automation.html
作者:[Zeus Kerravala][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.networkworld.com/author/Zeus-Kerravala/
[b]: https://github.com/lujun9972
[1]: https://www.f5.com/state-of-application-services-report
[2]: https://www.networkworld.com/article/3518992/top-10-underused-sd-wan-features.html
[3]: https://www.networkworld.com/article/3440100/take-the-intelligent-route-with-consumption-based-storage.html?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE21620&utm_content=sidebar ( Take the Intelligent Route with Consumption-Based Storage)
[4]: https://www.networkworld.com/article/3530275/enterprises-being-won-over-by-speed-effectiveness-of-network-automation.html
[5]: https://www.networkworld.com/article/3031279/sd-wan-what-it-is-and-why-you-ll-use-it-one-day.html
[6]: https://www.facebook.com/NetworkWorld/
[7]: https://www.linkedin.com/company/network-world

View File

@ -0,0 +1,73 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (What is the internet backbone and how it works)
[#]: via: (https://www.networkworld.com/article/3532318/what-is-the-internet-backbone-and-how-it-works.html)
[#]: author: (Tim Greene https://www.networkworld.com/author/Tim-Greene/)
What is the internet backbone and how it works
======
Tier 1 internet service providers (ISP) mesh their high-speed fiber-optic networks together to create the internet backbone, which moves traffic efficiently among geographic regions.
[Gerd Altmann][1] [(CC0)][2]
The internet generates massive amounts of computer-to-computer traffic, and insuring all that traffic can be delivered anywhere in the world requires the aggregation of a vast array of high-speed networks collectively known as the internet backbone, but how does that work?
### What is the internet backbone?
Like any other network, the internet consists of access links that move traffic to high-bandwidth routers that move traffic from its source over the best available path toward its destination. This core is made up of individual high-speed fiber-optic networks that peer with each other to create the internet backbone.
The individual core networks are privately owned by Tier 1 internet service providers (ISP), giant carriers whose networks are tied together. These providers include AT&amp;T, CenturyLink, Cogent Communications, Deutsche Telekom, Global Telecom and Technology (GTT), NTT Communications, Sprint, Tata Communications, Telecom Italia Sparkle, Telia Carrier, and Verizon.
[[Get regularly scheduled insights by signing up for Network World newsletters.]][3]
By joining these long-haul networks together, Tier 1 ISPs create a single worldwide network that gives all of them access to the entire internet routing table so they can efficiently deliver traffic to its destination through a hierarchy of progressively more local ISPs.
In addition to being physically connected, these backbone providers are held together by a shared network protocol, TCP/IP. They are actually two protocols, transport control protocol and internet protocol that set up connections between computers, insuring that the connections are reliable and formating messages into packets.
### Internet exchange points (IXP) tie the backbone together
Backbone ISPs connect their networks at peering points, neutrally owned locations with high-speed switches and routers that move traffic among the peers. These are often owned by third parties, sometimes non-profits, that facilitate unifying the backbone.
Participating Tier 1 ISPs help fund the IXPs, but dont charge each other for transporting traffic from the other Tier 1 ISPs in a relationship known as settlement-free peering. Such agreements eliminate potential financial disputes that might have the result of slowing down internet performance.
[][4]
### How fast is the backbone?
The internet backbone is made up of the fastest routers, which can deliver 100Gbps trunk speeds. These routers are made by vendors including Cisco, Extreme, Huawei, Juniper, and Nokia, and use the border gateway protocol (BGP) to route traffic among themselves.
### How traffic gets on the backbone
Below the Tier 1 ISPs are smaller Tier 2 and Tier 3 ISPs.
Tier 3 providers provide businesses and consumers with access to the internet. These providers have no access of their own to the internet backbone, so on their own would not be able to connect their customers to all of the billions of internet-attached computers.
Buying access to Tier 1 providers is expensive. So often Tier 3 ISPs contract with Tier 2 (regional) ISPs that have their own networks that can deliver traffic to a limited geographic area but not to all internet-attached devices.
In order to do that, Tier 2 ISPs contract with Tier 1 ISPs for access to the global backbone, and in that way make the entire internet accesssible to their customers.
This arrangment makes it possible for traffic from a computer on one side of the world to connect to one on the other side. That traffic goes from a source computer to a Tier 3 ISP that routes it to a Tier 2 ISP that routes it to a Tier 1 backbone provider that routes it to the appropriate Tier 2 ISP that routes it to a Tier 3 access provider that delivers it to the destination computer.
Join the Network World communities on [Facebook][5] and [LinkedIn][6] to comment on topics that are top of mind.
--------------------------------------------------------------------------------
via: https://www.networkworld.com/article/3532318/what-is-the-internet-backbone-and-how-it-works.html
作者:[Tim Greene][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.networkworld.com/author/Tim-Greene/
[b]: https://github.com/lujun9972
[1]: https://pixabay.com/en/social-media-digitization-faces-3271592/
[2]: https://creativecommons.org/publicdomain/zero/1.0/
[3]: https://www.networkworld.com/newsletters/signup.html
[4]: https://www.networkworld.com/article/3440100/take-the-intelligent-route-with-consumption-based-storage.html?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE21620&utm_content=sidebar ( Take the Intelligent Route with Consumption-Based Storage)
[5]: https://www.facebook.com/NetworkWorld/
[6]: https://www.linkedin.com/company/network-world

View File

@ -0,0 +1,81 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (As the networks evolve enterprises need to rethink network security)
[#]: via: (https://www.networkworld.com/article/3531929/as-the-network-evolves-enterprises-need-to-rethink-security.html)
[#]: author: (Zeus Kerravala https://www.networkworld.com/author/Zeus-Kerravala/)
As the networks evolve enterprises need to rethink network security
======
Q&A: John Maddison, executive vice president of products for network security vendor Fortinet, discusses how to deal with network security in the digital era.
D3Damon / Getty Images
_Digital innovation is disrupting businesses. Data and applications are at the hub of new business models, and data needs to travel across the extended network at increasingly high speeds without interruption. To make this possible, organizations are radically redesigning their networks by adopting multi-cloud environments, building hyperscale data centers, retooling their campuses, and designing new connectivity systems for their next-gen branch offices. Networks are faster than ever before, more agile and software-driven. They're also increasingly difficult to secure. To understand the challenges and how security needs to change, I recently talked with John Maddison, executive vice president of products for network security vendor Fortinet._
**ZK: As the speed and scale of data escalate, how do the challenges to secure it change?**
JM: Security platforms were designed to provide things like enhanced visibility, control, and performance by monitoring and managing the perimeter. But the traditional perimeter has shifted from being a very closely monitored, single access point to a highly dynamic and flexible environment that has not only expanded outward but inward, into the core of the network as well.
**[ Also see [What to consider when deploying a next generation firewall][1]. | Get regularly scheduled insights by [signing up for Network World newsletters][2]. ]**
**READ MORE:** [The VPN is dying, long live zero trust][3]
Today's perimeter not only includes multiple access points, the campus, the WAN, and the cloud, but also IoT, mobile, and virtual devices that are generating data, communicating with data centers and manufacturing floors, and literally creating thousands of new edges inside an organization. And with this expanded perimeter, there are a lot more places for attacks to get in. To address this new attack surface, security has to move from being a standalone perimeter solution to being fully integrated into the network.
This convergence of security and networking needs to cover SD-WAN, VPN, Wi-Fi controllers, switching infrastructures, and data center environments something we call security-driven networking. As we see it, security-driven networking is an essential approach for ensuring that security and networking are integrated together into a single system so that whenever the networking infrastructure evolves or expands, security automatically adapts as an integrated part of that environment. And it needs to do this by providing organizations with a new suite of security solutions, including network segmentation, dynamic multi-cloud controls, and [zero-trust network access][3]. And because of the speed of digital operations and the sophistication of today's attacks, this new network-centric security strategy also needs to be augmented with AI-driven security operations.
The perimeter security devices that have been on the market weren't really built to run as part of the internal network, and when you put them there, they become bottlenecks. Customers don't put these traditional security devices in the middle of their networks because they just can't run fast enough. But the result is an open network environment that can become a playground for criminals that manage to breach perimeter defenses. It's why the dwell time for network malware is over six months.
**[ [Prepare to become a Certified Information Security Systems Professional with this comprehensive online course from PluralSight. Now offering a 10-day free trial!][4] ]**
As you combine networking applications, networking functionality, and security applications together to address this challenge, you absolutely need a different performance architecture. This can't be achieved using the traditional hardware most security platforms rely on.
**ZK: Why can't traditional security devices secure the internal network?**
JM: They simply aren't fast enough. And the ones that come close are prohibitively expensive… For example, internal segmentation not only enables organizations to see and separate all of the devices on their network but also dynamically create horizontal segments that support and secure applications and automated workflows that need to travel across the extended network. Inside the network, you're running at 100 gigs, 400 gigs, that sort of thing. But the interface for a lot of security systems today is just 10 gigs. Even with multiple ports, the device can't handle much more than that without having to spend a fortune… In order to handle today's capacity and performance demands, security needs to be done at network speeds that most security solutions cannot support without specialized content processors.
**ZK: Hyperscale data centers have been growing steadily. What sort of additional security challenges do these environments face?**
JM: Hyperscale architectures are being used to move and process massive amounts of data. A lot of the times, research centers will need to send a payload of over 10 gigabytes one packet that's 10 gigabytes to support advanced rendering and modeling projects. Most firewalls today cannot process these large payloads, also known as elephant flows. Instead, they often compromise on their security to let them flow through. Other hyperscale environment examples include financial organizations that need to process transactions with sub-second latency or online gaming providers that need to support massive numbers of connections per second while maintaining high user experience. … [Traditional security platforms] will never be able to secure hyperscale environments, or even worse, the next generation of ultra-fast converged networks that rely on hyperscale and hyperconnectivity to run things like smart cities or smart infrastructures, until they fundamentally change their hardware.
**ZK: Do these approaches introduce new risks or increase the existing risk for these organizations?**
JM: They do both. As the attack surface expands, existing risks often get multiplied across the network. We actually see more exploits in the wild targeting older vulnerabilities than new ones. But cybercriminals are also building new tools designed to exploit cloud environments and modern data centers. They are targeting mobile devices and exploiting IoT vulnerabilities. Some of these attacks are simply revisions of older, tried and true exploits. But many are new and highly sophisticated. We are also seeing new attacks that use machine learning and rely on AI enhancements to better bypass security and evade detection.
To address this challenge, security platforms need to be broad, integrated, and automated.
Broad security platforms come in a variety of form factors so they can be deployed everywhere across the expanding network. Physical hardware enhancements, such as our [security processing units], enable security platforms to be effectively deployed inside high-performance networks, including hyperscale data centers and SD-WAN environments. And virtualized versions need to support private cloud environments as well as all major cloud providers through thorough cloud-native integration.
Next, these security platforms need to be integrated. The security components built into a security platform need to work together as a single solution ­ not the sort of loose affiliation most platforms provide to enable extremely fast threat intelligence collection, correlation, and response. That security platform also needs to support common standards and APIs so third-party tools can be added and supported. And finally, these platforms need to be able to work together, regardless of their location or form factor, to create a single, unified security fabric. It's important to note that many cloud providers have developed their own custom hardware, such as Google's TPU, Amazon's Inferentia, and Microsoft's Corsica, to accelerate cloud functions. As a result, hardware acceleration on physical security platforms is essential to ensure consistent performance for data moving between physical and cloud environments
And finally, security platforms need to be automated. Support for automated workflows and AI-enhanced security operations can significantly accelerate the speed of threat detection, analysis, and response. But like other processing-intensive functions, such as decrypting traffic for deep inspection, these functions also need specialized and purpose-built processors or they will become innovation-killing bottlenecks.
**ZK: What's next for network security?**
JM: This is just the start. As networking functions begin to converge even further, creating the next generation of smart environments smart buildings, smart cities, and smart critical infrastructures the lack of viable security tools capable of inspecting and protecting these hyperfast, hyperconnected, and hyper-scalable environments will seriously impact our digital economy and way of life.
Security vendors need to understand this challenge and begin investing now in developing advanced hardware and security-driven networking technologies. Organizations aren't waiting for vendors to catch up so they can secure their networks of tomorrow. Their networks are being left exposed right now because the software-based security solutions they have in place are just not adequate. And it's up to the security industry to step up and solve this challenge.
Join the Network World communities on [Facebook][5] and [LinkedIn][6] to comment on topics that are top of mind.
--------------------------------------------------------------------------------
via: https://www.networkworld.com/article/3531929/as-the-network-evolves-enterprises-need-to-rethink-security.html
作者:[Zeus Kerravala][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.networkworld.com/author/Zeus-Kerravala/
[b]: https://github.com/lujun9972
[1]: https://www.networkworld.com/article/3236448/lan-wan/what-to-consider-when-deploying-a-next-generation-firewall.html
[2]: https://www.networkworld.com/newsletters/signup.html
[3]: https://www.networkworld.com/article/3487720/the-vpn-is-dying-long-live-zero-trust.html
[4]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fpaths%2Fcertified-information-systems-security-professional-cisspr
[5]: https://www.facebook.com/NetworkWorld/
[6]: https://www.linkedin.com/company/network-world

View File

@ -0,0 +1,108 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (How to be the right person for DevOps)
[#]: via: (https://opensource.com/article/20/3/devops-relationships)
[#]: author: (Josh Atwell https://opensource.com/users/joshatwell)
How to be the right person for DevOps
======
Creating healthy relationships is the essential ingredient in DevOps
success.
![Team meeting][1]
In my kitchen, we have a sign that reads "Marriage is more than finding the right person. It is being the right person." It serves as a great reminder of the individual responsibility everyone has in any healthy relationship. As organizations adopt [DevOps][2] as a model of developing and delivering value to customers, the impact of healthy relationships is extremely important for success.
![Marriage sign][3]
Historically, the relationship between development and operations teams has been unhealthy. Poor communication, limited empathy, and a history of mistrust make merging these teams into a tighter operating model challenging, to say the least. This is not entirely unfair to either side.
Developers have long been frustrated by lead times and processes put in place by the operations organization. They just want to work, and they often see operations as an anchor on the ship of progress.
Operations professionals have long been frustrated by the impatience and lack of clear requirements that come from development teams. They are often confused about why those teams are not able to use the available services and processes. They see developers as a liability to their ability to maintain stable services for customers and the business.
A lingering gap here is that each side has been focused on protecting its own perspective. They emphasize how the other team is not being what _they_ need, and they never question whether they, too, could be doing something different.
In DevOps, all sides must frame their role in the organization based on how they add value to others.
There are a few things that everyone, including managers and leaders, can do right away to become a better contributor and partner in their DevOps relationships.
### Communicate
Most professionals in an organization adopting DevOps find themselves needing to work closely with new people, ones they have had limited exposure to in the past. It is important for everyone to take time to get to know their new teammates and learn more about their concerns, their interests, and also their preferred communication style.
Successful communication in new relationships is often built on simply listening more and talking less. Our natural tendency is to talk about ourselves. Most people love sharing what they know best. However, it is extremely important to make more room to listen.
Hearing someone is not the same as listening to them. I'm confident that we have all been in the situation where someone expresses a concern that we do not entirely internalize. Also, merely hearing does not encourage people to shareor to share as completely as they should.
![Stick figures hearing][4]
It is important to listen actively. Repeat what you hear, and seek validation that what you repeat is what they wanted you to understand. Once you understand their concern, it is important to make your initial response a selfless one. Even if you can't completely solve the problem, demonstrate sympathy and help the person move towards a solution.
![Stick figures listening][5]
### Selflessness
Another key relationship challenge as organizations adopt DevOps is developing a perspective of selflessness. In DevOps, most people are responsible for delivering value to a wide variety of other people. Each person should begin by considering how their actions and work impact other people.
This service mindset carries forward when you become more sensitive to when others are in need and then dedicate time in your schedule specifically for the purpose of helping them. This can be as simple as creating a small improvement in a process or helping to troubleshoot an issue. A positive side effect is that this effort will provide you more opportunities to work with others and develop deeper trust.
It is also important not to hoard knowledge—either technical or institutional—especially when people ask questions or seek help. Maintain the mindset that there are no stupid questions.
![Stick figure apologizing][6]
Finally, selflessness includes being trustworthy. It is difficult to maintain a healthy relationship when there is no trust. Be honest and transparent. In IT, this is often seen as a liability, but in DevOps it is a requirement for success.
### Self-care
In order to be a strong contributor to a relationship, it is necessary to maintain a sense of self. Our individuality provides the diversity a relationship needs to grow. Make sure you maintain and share your interests with others. Be more than just the work you do. Apply your interests to your work.
You are no good to others if you are not good to yourself. Healthy relationships are stronger with healthy people. Make sure you take time to enjoy your interests and recharge. Take your vacation and leave work behind!
![Stick figure relaxing][7]
I am also a strong advocate for mental health days. Sometimes our mental health is not sufficient to work effectively. You're not as effective when you are physically ill, and you're not as effective when your head is not 100%. Work with your manager and your team to support each other to maintain good mental health.
Mental health is improved by learning. Invest in yourself and expand your knowledge. DevOps ideally needs "t-shaped" people who have depth on a topic and also broader system knowledge. Work to increase your depth, but balance that by learning new things about your environment. This knowledge can come from your teammates and create operational sympathy.
![Stick figure with open arms][8]
Finally, healthy relationships are not all work and no play. Take time to acknowledge the successes of others. If you know your team, you likely know how individuals prefer to receive praise. Respect those preferences, but always strive to praise vocally where possible.
![Stick figures celebrating][9]
Make sure to celebrate these successes as a team. All work and no play makes everyone dull. Celebrate milestones together as a team, and then articulate and target the next objectives.
### Be the right person
DevOps requires more from every individual, and its success is directly tied to the health of relationships. Each member of the organization should apply these techniques to grow and improve themselves. A focus on being the right person for the team will build stronger bonds and make the organization better equipped to reach its goals.
* * *
_This article is based on [a talk][10] Josh Atwell gave at All Things Open 2019._
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/3/devops-relationships
作者:[Josh Atwell][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/joshatwell
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/meeting-team-listen-communicate.png?itok=KEBP6vZ_ (Team meeting)
[2]: https://opensource.com/tags/devops
[3]: https://opensource.com/sites/default/files/uploads/marriage.png (Marriage sign)
[4]: https://opensource.com/sites/default/files/uploads/hearing.png (Stick figures hearing)
[5]: https://opensource.com/sites/default/files/uploads/listening.png (Stick figures listening)
[6]: https://opensource.com/sites/default/files/uploads/apologize.png (Stick figure apologizing)
[7]: https://opensource.com/sites/default/files/uploads/relax.png (Stick figure relaxing)
[8]: https://opensource.com/sites/default/files/uploads/open_0.png (Stick figure with open arms)
[9]: https://opensource.com/sites/default/files/uploads/celebrate.png (Stick figures celebrating)
[10]: https://opensource.com/article/20/1/devops-empathy

View File

@ -0,0 +1,93 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (OpenStreetMap: A Community-Driven Google Maps Alternative)
[#]: via: (https://itsfoss.com/openstreetmap/)
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
OpenStreetMap: A Community-Driven Google Maps Alternative
======
_**Brief: OpenStreetMap is a community-driven map which is a potential alternative to Google Maps. Learn more about this open source project.**_
[OpenStreetMap][1] (OSM) is a free editable map of the world. Anyone can contribute, edit, and make changes to the OpenStreetMap to improve it.
![][2]
You need to sign up for an account first in order to be able to edit or add information to the OpenStreetMap. To view the map, you wouldnt need an account.
Even though its a free-to-use map under an [open data license][3], you cannot use the map API to build another service on top of it for commercial purpose.
So, you can download the map data to use it and host it yourself while mentioning the credits to OSM. You can learn more about its [API usage policy][4] and [copyright][5] information on its official website to learn more.
In this article, we shall take a brief look at how it works and what kind of projects use OpenStreetMaps as the source of their map data.
### OpenStreetMap: Overview
![][6]
OpenStreetMap is a good alternative to Google Maps. You might not get the same level of information as Google Maps- but for basic navigation and traveling, OpenStreetMap is sufficient.
Just like any other map, you will be able to switch between multiple layers in the map, get to know your location, and easily search for places.
You may not find all the latest information for the businesses, shops, and restaurants nearby. But, for basic navigation, its more than enough.
OpenStreetMap can be usually accessed through a web browser on both desktop and mobile by visiting the [OpenStreetMap site][7]. It does not have an official Android/iOS app yet.
However, there are a variety of applications available that utilize OpenStreetMap at its core. So, if you want to utilize OpenStreetMap on a smartphone, you can take a look at some of the popular open-source Google Maps alternatives:
* [OsmAnd][8]
* [MAPS.ME][9]
**MAPS.ME** and **OsmAnd** are two open-source applications for Android and iOS that utilize OpenStreetMap data to provide a rich user experience with a bunch of useful information and features added to it.
You can also opt for other proprietary options if you wish, like [Magic Earth][10].
In either case, you can take a look at the extensive list of applications on their official wiki page for [Android][11] and [iOS][12].
### Using OpenStreetMap On Linux
![][13]
The easiest way to use OpenStreetMap on Linux is to use it in a web browser. If you use GNOME desktop environment, you can install GNOME Maps which is built on top of OpenStreetMap.
There are also several software (that are mostly obsolete) that utilize OpenStreetMap on Linux for specific purposes. You can check out the list of available packages in their [official wiki list][14].
### Wrapping Up
OpenStreetMap may not be the best source for navigation for end users but its open source model allows it to be used freely. This means that many services can be built using OpenStreetMap. For example, [ÖPNVKarte][15] uses OpenStreetMap to display worldwide public transport facilities on a uniform map so that you dont have to browse individual operators websites.
What do you think about OpenStreetMap? Can you use it as a Google Maps alternative? Feel free to share your thoughts in the comments below.
--------------------------------------------------------------------------------
via: https://itsfoss.com/openstreetmap/
作者:[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.openstreetmap.org/
[2]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/openstreetmap.jpg?ssl=1
[3]: https://opendatacommons.org/licenses/odbl/
[4]: https://operations.osmfoundation.org/policies/api/
[5]: https://www.openstreetmap.org/copyright
[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/open-street-map-2.jpg?ssl=1
[7]: https://www.openstreetmap.org
[8]: https://play.google.com/store/apps/details?id=net.osmand
[9]: https://play.google.com/store/apps/details?id=com.mapswithme.maps.pro
[10]: https://www.magicearth.com/
[11]: https://wiki.openstreetmap.org/wiki/Android#OpenStreetMap_applications
[12]: https://wiki.openstreetmap.org/wiki/Apple_iOS
[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/open-street-map-1.jpg?ssl=1
[14]: https://wiki.openstreetmap.org/wiki/Linux
[15]: http://xn--pnvkarte-m4a.de/

View File

@ -0,0 +1,61 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: ('AI everywhere' IoT chips coming from Arm)
[#]: via: (https://www.networkworld.com/article/3532094/ai-everywhere-iot-chips-coming-from-arm.html)
[#]: author: (Patrick Nelson https://www.networkworld.com/author/Patrick-Nelson/)
'AI everywhere' IoT chips coming from Arm
======
Two new microprocessors from Arm promise to miniaturize artificial intelligence.
Healthcare
Silicon microchip maker Arm is working on a new semiconductor design that it says will enable machine learning, at scale, on small sensor devices. Arm has completed testing of the technology and expects to bring it to market next year.
Artificial intelligence, implemented locally on "billions and ultimately trillions" of devices is coming, the company says in a [press release][1]. Arm Holdings, owned by Japanese conglomerate Softbank, says its partners have shipped more than 160 billion Arm-based chips to date, and that 45 million of its microprocessor designs are being placed within electronics every day.
The new machine-learning silicon will include micro neural processing units (microNPU) that can be used to identify speech patterns and perform other AI tasks. Importantly, the processing is accomplished on-device and in smaller form factors than have so far been available. The chips don't need the cloud or any network.
[RELATED: Auto parts supplier has big plans for its nascent IoT effort][2]
Arm, which historically has been behind mobile smartphone microchips, is aiming this design  the Cortex M55 processor, paired with the Ethos-U55, Arm's first microNPU at Internet of Things instead.
"Enabling AI everywhere requires device makers and developers to deliver machine learning locally on billions, and ultimately trillions of devices," said Dipti Vachani, senior vice president and general manager of Arm's automotive and IoT areas, in a statement. "With these additions to our AI platform, no device is left behind as on-device ML on the tiniest devices will be the new normal, unleashing the potential of AI securely across a vast range of life-changing applications."
Arm wants to take advantage of the autonomous nature of chip-based number crunching, as opposed to doing it in the cloud. Privacy-conscious (and regulated) healthcare is an example of a vertical that might like the idea of localized processing. 
Functioning AI without cloud dependence isn't entirely new. Intel's [Neural Compute Stick 2][3], a $69 self-contained computer vision and deep learning development kit, doesn't need it, for example.
**[ [Get certified as an Apple Technical Coordinator with this seven-part online course from PluralSight.][4] ]**
Arm is also going for power savings with its new AI technology. Not requiring a data network can mean longer battery life for the sensor— only the calculated results need to be sent, rather than every bit. Much of the time, raw sensor data is irrelevant and can be discarded. Arm's new endpoint ML technologies are going to help microcontroller developers "accelerate edge inference in devices limited by size and power," said Geoff Lees, senior vice president of edge processing at IoT semiconductor company [NXP][5], in the announcement. 
Enabling machine learning in power-constrained settings and eliminating the need for network connectivity mean the sensor can be placed where there isn't a hardy power supply. Latency advantages and cost advantages also can come into play.
"These devices can run neural network models on batteries for years, and deliver low-latency inference directly on the device," said Ian Nappier, product manager of TensorFlow Lite for Microcontrollers at Google, in a statement to Arm. [TensorFlow][6] is an open-source machine learning platform that's been used for detecting respiratory diseases, among other things.
Join the Network World communities on [Facebook][7] and [LinkedIn][8] to comment on topics that are top of mind.
--------------------------------------------------------------------------------
via: https://www.networkworld.com/article/3532094/ai-everywhere-iot-chips-coming-from-arm.html
作者:[Patrick Nelson][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.networkworld.com/author/Patrick-Nelson/
[b]: https://github.com/lujun9972
[1]: https://www.arm.com/company/news/2020/02/new-ai-technology-from-arm
[2]: https://www.networkworld.com/article/3098084/internet-of-things/auto-parts-supplier-has-big-plans-for-its-nascent-iot-effort.html#tk.nww-fsb
[3]: https://store.intelrealsense.com/buy-intel-neural-compute-stick-2.html
[4]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fpaths%2Fapple-certified-technical-trainer-10-11
[5]: https://www.nxp.com/company/our-company/about-nxp:ABOUT-NXP
[6]: https://www.tensorflow.org/
[7]: https://www.facebook.com/NetworkWorld/
[8]: https://www.linkedin.com/company/network-world

View File

@ -0,0 +1,61 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Electronics should sweat to cool down, say researchers)
[#]: via: (https://www.networkworld.com/article/3532827/electronics-should-sweat-to-cool-down-say-researchers.html)
[#]: author: (Patrick Nelson https://www.networkworld.com/author/Patrick-Nelson/)
Electronics should sweat to cool down, say researchers
======
Scientists think that in much the same way the human body releases perspiration to cool down, special materials might release water to draw heat from electronics.
rclassenlayouts / Aleksei Derin / Getty Images
Computing devices should sweat when they get too hot, say scientists at Shanghai Jiao Tong University in China, where they have developed a materials application they claim will cool down devices more efficiently and in smaller form-factors than existing fans.
Its “a coating for electronics that releases water vapor to dissipate heat from running devices,” the team explain in a news release. “Mammals sweat to regulate body temperature,” so should electronics, they believe.
[[Get regularly scheduled insights by signing up for Network World newsletters.]][1]
The groups focus has been on studying porous materials that can absorb moisture from the environment and then release water vapor when warmed. MIL-101(Cr) checks the boxes, they say. The material is a metal organic framework, or MOF, which is a sorbent, a material that stores large amounts of water. The higher the water capacity one has, the greater the dissipation of heat when it's warmed.
MOF projects have been attempted before. “Researchers have tried to use MOFs to extract water from the desert air,” says refrigeration-engineering scientist Ruzhu Wang, who is senior author of a paper on the universitys work that has just been [published in Joule][2].
Their proof-of-concept test involved applying a micrometers-thin coating of MIL-101(Cr) to metallic substrates that resulted in temperature drops of up to 8.6 degrees Celsius for 25 minutes, according to the abstract for their paper.
Thats “a significant improvement compared to that of traditional PCMs,” they say. Phase change materials (PCM) include waxes and fatty acids that are used in electronics and melt to absorb heat. They are used in smartphones, but the solid-to-liquid transition doesnt exchange all that much energy.
“In contrast, the liquid-vapor transition of water can exchange 10 times the energy compared to that of PCM solid-liquid transition.” Plus the material used recovers almost immediately to start sweating again, just like a mammal.
[][3]
Shanghai Jiao Tong University isnt the only school looking into sweat for future tech. Cornell University says it wants to get robots to sweat to bring their temperature below ambient. Researchers there say they have built a 3D-printed, sweating robot muscle. It [manages its own temperature][4], and they think it will one day let robots run for extended periods without overheating.
Soft robots, which are the kind preferred by many developers for their flexibility, hold more heat than metal ones. As in electronic devices such as smartphones and IoT sensors, fans arent ideal because they take up too much space. Thats why new materials applications are being studied.
The Cornell robot group uses light to cure resin into shapes that control the flow of heat. A base layer “smart sponge” made of poly-N-isopropylacrylamide retains water and squeezes it through fabricated, dilated pores when heated. The pores then close automatically when cooled.
“Just when it seemed like robots couldnt get any cooler,” the group says.
Join the Network World communities on [Facebook][5] and [LinkedIn][6] to comment on topics that are top of mind.
--------------------------------------------------------------------------------
via: https://www.networkworld.com/article/3532827/electronics-should-sweat-to-cool-down-say-researchers.html
作者:[Patrick Nelson][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.networkworld.com/author/Patrick-Nelson/
[b]: https://github.com/lujun9972
[1]: https://www.networkworld.com/newsletters/signup.html
[2]: https://www.cell.com/joule/fulltext/S2542-4351(19)30590-2
[3]: https://www.networkworld.com/blog/itaas-and-the-corporate-storage-technology/?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE22140&utm_content=sidebar (ITAAS and Corporate Storage Strategy)
[4]: https://news.cornell.edu/stories/2020/01/researchers-create-3d-printed-sweating-robot-muscle
[5]: https://www.facebook.com/NetworkWorld/
[6]: https://www.linkedin.com/company/network-world

View File

@ -0,0 +1,74 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Cisco warns of five SD-WAN security weaknesses)
[#]: via: (https://www.networkworld.com/article/3533550/cisco-warns-of-five-sd-wan-security-weaknesses.html)
[#]: author: (Michael Cooney https://www.networkworld.com/author/Michael-Cooney/)
Cisco warns of five SD-WAN security weaknesses
======
Cisco warnings include three high-impact SD-WAN vulnerabilities
[Jaredd Craig][1] [(CC0)][2]
Cisco has issued five  warnings about security weaknesses in its [SD-WAN][3] offerings, three of them on the high-end of the vulnerability scale.
The worst problem is with the command-line interface (CLI) of its [SD-WAN][4] Solution software where a weakness could let a local attacker inject arbitrary commands that are executed with root privileges, Cisco [wrote.][5]
[[Get regularly scheduled insights by signing up for Network World newsletters.]][6]
An attacker could exploit this vulnerability which has a 7.8 out if 10 on  the Common Vulnerability Scoring System by authenticating to the device and submitting crafted input to the CLI utility. The attacker must be authenticated to access the CLI utility. The vulnerability is due to insufficient input validation, Cisco wrote.
Another high warning problem lets an authenticated, local attacker elevate privileges to root on the underlying operating system.  An attacker could exploit this vulnerability by sending a crafted request to an affected system. A successful exploit could allow the attacker to gain root-level privileges, Cisco [wrote][7].  The vulnerability is due to insufficient input validation.
The third high-level vulnerability in the SD-WAN Solution software could let an attacker cause a buffer overflow on an affected device. An attacker could exploit this vulnerability by sending crafted traffic to an affected device. A successful exploit could allow the attacker to gain access to information that they are not authorized to access and make changes to the system that they are not authorized to make, Cisco [wrote][8].
The vulnerabilities affect a number of Cisco products if they are running a Cisco SD-WAN Solution software release earlier than Release 19.2.2: vBond Orchestrator Software, vEdge 100-5000 Series Routers, vManage Network Management System and vSmart Controller Software.
Cisco said there were no workarounds for any of the vulnerabilities and it suggested users accept automatic software updates to allay exploit risks. There are [software fixes for the problems][9] as well. 
**[ [Prepare to become a Certified Information Security Systems Professional with this comprehensive online course from PluralSight. Now offering a 10-day free trial!][10] ]**
All three of the high-level warnings were reported to Cisco by the Orange Group, Cisco said.
The other two SD-WAN Solution software warnings with medium threat levels -- include a one that allows a cross-site scripting (XSS) attack against the web-based management interface of the vManage software and SQL injection threat.
The [XXS vulnerability][11] is due to insufficient validation of user-supplied input by the web-based management interface. An attacker could exploit this vulnerability by persuading a user of the interface to click a crafted link. A successful exploit could allow the attacker to execute arbitrary script code in the context of the interface or to access sensitive, browser-based information.
The SQL vulnerability exists because the web UI improperly validates SQL values. An attacker could exploit this vulnerability by authenticating to the application and sending malicious SQL queries to an affected system. A successful exploit could let the attacker  modify values on, or return values from, the underlying database as well as the operating system, Cisco [wrote][12].
Cisco recognized Julien Legras and Thomas Etrillard of Synacktiv for reporting the problems.
The company said release 19.2.2 of the [Cisco SD-WAN Solution][13] contains fixes for all five vulnerabilities.
Join the Network World communities on [Facebook][14] and [LinkedIn][15] to comment on topics that are top of mind.
--------------------------------------------------------------------------------
via: https://www.networkworld.com/article/3533550/cisco-warns-of-five-sd-wan-security-weaknesses.html
作者:[Michael Cooney][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.networkworld.com/author/Michael-Cooney/
[b]: https://github.com/lujun9972
[1]: https://unsplash.com/photos/T15gG5nA9Xk
[2]: https://creativecommons.org/publicdomain/zero/1.0/
[3]: https://www.networkworld.com/article/3031279/sd-wan-what-it-is-and-why-you-ll-use-it-one-day.html
[4]: https://www.networkworld.com/article/3527194/multicloud-security-integration-drive-massive-sd-wan-adoption.html
[5]: https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-sdwclici-cvrQpH9v
[6]: https://www.networkworld.com/newsletters/signup.html
[7]: https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-sdwpresc-ySJGvE9
[8]: https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-sdwanbo-QKcABnS2
[9]: https://software.cisco.com/download/home
[10]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fpaths%2Fcertified-information-systems-security-professional-cisspr
[11]: https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20200318-vmanage-xss
[12]: https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20200318-vmanage-cypher-inject
[13]: https://www.cisco.com/c/en/us/solutions/enterprise-networks/sd-wan/index.html#~benefits
[14]: https://www.facebook.com/NetworkWorld/
[15]: https://www.linkedin.com/company/network-world

View File

@ -0,0 +1,85 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (How technical debt is risking your security)
[#]: via: (https://opensource.com/article/20/3/remove-security-debt)
[#]: author: (Sam Bocetta https://opensource.com/users/sambocetta)
How technical debt is risking your security
======
A few security fixes now will help lighten the load of future developers
using your software.
![A lock on the side of a building][1]
Everyone knows they shouldn't take shortcuts, especially in their work, and yet everyone does. Sometimes it doesn't matter, but when it comes to code development, though, it definitely does.
As any experienced programmer knows, building your code the quick and dirty way soon leads to problems down the line. These issues might not be disastrous, but they incur a small penalty every time you want to develop your code further.
This is the basic idea behind [technical debt][2], a term first coined by well-known programmer Ward Cunningham. Technical debt is a metaphor that explains the long-term burden developers and software teams incur when taking shortcuts, and has become a popular way to think about the extra effort that we have to do in future development because of the quick and dirty design choice.
"Security Debt" is an extension of this idea, and in this article, we'll take a look at what the term means, why it is a problem, and what you can do about it.
### What is security debt?
To get an idea of how security debt works, we have to consider the software development lifecycle. Today, it's very rare for developers to start with a blank page, even for a new piece of software. At the very least, most programmers will start a new project with open source code copied from online repositories.
They will then adapt and change this code to make their project. While they are doing this, there will be many points where they notice a security vulnerability. Something as simple as an error establishing a database connection can be an indication that systems are not playing well together, and that someone has taken a fast and dirty approach.
Then they have two options: they can either take an in-depth look at the code they are working with, and fix the issue at a fundamental level, or they can quickly paste extra code over the top that gets around the problem in a quick, inefficient way.
Given the demands of today's development environment, most developers choose the second route, and we can't blame them. The problem is that the next person who looks at the code is going to have to spend longer working out how it operates.
Time, as we all know, is money. Because of this, each time software needs to be changed, there will be a small cost to make it secure due to previous developers taking shortcuts. This is security debt.
### How security debt threatens your software
There was a time when security debt was not a huge problem, at least not in the open source community. A decade ago, open source components had lifetimes measured in years and were freely available to everyone.
This meant that security issues in legacy code got fixed. Today, the increased speed of the development lifecycle and the increasingly censored internet means that developers can no longer trust third party code to the degree they used to.
This has led to a considerable increase in security debt for developers using open source components. Veracode's latest [State of Software Security (SOSS)][3] report found that security issues in open source software take about a month longer to be fixed than those in software that is sourced internally. Insourced software recorded the highest fix rates, but even software sourced from external contractors gets fixed faster, by about two weeks, than open source software.
The ultimate outcome of this and one that the term "security debt" captures very well is that most companies currently face security vulnerabilities throughout their entire software stack, and these are accumulating faster than they are fixed. In other words, developers have maxed out their security debt credit card, and are drowning in the debt they've incurred. This is particularly concerning when you consider that total household debt [reached nearly $14 trillion][4] in the United States alone in 2019.
### How to avoid security debt
Avoiding a build-up of security debt requires that developers take a different approach to security than the one that is prevalent in the industry at the moment. Proven methods such as zero-knowledge cloud encryption, VPNs to promote online anonymity, and network intrusion prevention software are great, but they may also not be enough.
In fact, there might have been some developers who were scratching their heads during our definition of security debt above: how many of us think about the next poor soul who will have to check our code for security flaws?
Changing that way of thinking is key to preventing a build-up of security debt. Developers should take the time to thoroughly [check their software for security vulnerabilities][5], not just during development, but after the release as well. Fix any errors now, rather than waiting for security holes to build up.
If that instruction sounds familiar, then well done. A continuity approach to software development is a critical component of [layering security through DevOps][6], and one of the pillars of the emerging discipline of DevSecOps. Along with [chaos engineering][7], these approaches seek to integrate security into development, testing, and assessment processes, and thereby prevent a build-up of security debt.
Just like a credit card, the key to avoiding security debt getting out of control is to avoid the temptation to take shortcuts in the first place. That's easier said than done, of course, but one of the key lessons from recent data breaches is that legacy systems that many developers assume are secure are just as full of shortcuts as recently written code.
### Measure twice, cut once
Since [security by default hasn't arrived yet][8], we must all try and do things properly in the future. Taking the fast, dirty approach might mean that you get to leave the office early, but ultimately that decision will come back to bite you.
If you finish early anyway, well done: you can use the time to read [our best articles on security][9] and check whether your code is as secure as you think it is.
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/3/remove-security-debt
作者:[Sam Bocetta][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/sambocetta
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/BUSINESS_3reasons.png?itok=k6F3-BqA (A lock on the side of a building)
[2]: https://opensource.com/article/17/10/why-i-love-technical-debt
[3]: https://www.veracode.com/state-of-software-security-report
[4]: https://thetokenist.io/financial-statistics/
[5]: https://opensource.com/article/17/6/3-security-musts-software-developers
[6]: https://opensource.com/article/19/9/layered-security-devops
[7]: https://www.infoq.com/articles/chaos-engineering-security-networking/
[8]: https://opensource.com/article/20/1/confidential-computing
[9]: https://opensource.com/article/19/12/security-resources

View File

@ -0,0 +1,110 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (3 metrics to measure your open source community health)
[#]: via: (https://opensource.com/article/20/3/community-metrics)
[#]: author: (Kevin Xu https://opensource.com/users/kevin-xu)
3 metrics to measure your open source community health
======
Community building is critical to the success of any open source
project. Here's how to evaluate your community's health and strengthen
it.
![Green graph of measurements][1]
Community building is table stakes in the success of any open source project. Even outside of open source, community is considered a competitive advantage for businesses in many industries—from retail, to gaming, to fitness. (For a deeper dive, see "[When community becomes your competitive advantage][2]" in the _Harvard Business Review_.)
However, open source community building—especially offline activities—is notoriously hard to measure, track, and analyze. While we've all been to our fair share of meetups, conferences, and "summits" (and probably hosted a few of them ourselves), were they worth it? Did the community meaningfully grow? Was printing all those stickers and swags worth the money? Did we collect and track the right numbers to measure progress?
To develop a better framework for measuring community, we can look to a different industry for guidance and fresh ideas: political campaigns.
### My metrics start with politics
I started my career in political campaigns in the US as a field organizer (aka a low-level staffer) for then-candidate Senator Obama in 2008. Thinking back, a field organizer's job is basically community building in a specifically assigned geographical area that your campaign needs to win. My day consisted of calling supporters to do volunteer activities, hosting events to gather supporters, bringing in guest speakers (called "surrogates" in politics) to events, and selling the vision and plan of our candidate (essentially our "product").
Another big chunk of my day was doing data entry. We logged everything: interactions on phone conversations with voters, contact rates, event attendance, volunteer recruitment rates, volunteer show-up rates, and myriad other numbers to constantly measure our effectiveness.
Regardless of your misgivings about politics in general or specific politicians, the winning campaigns that lead to political victories are all giant community-building exercises that are data-driven, meticulously measured, and constantly optimized. They are well-oiled community-building machines.
When I entered the world of open source a few years ago, the community-building part felt familiar and natural. What surprised me was how little community building as an operation is quantified and measured—especially with offline activities.
### Three metrics to track
Taking a page from the best-run political campaigns I've seen, here are the three most important metrics for an open source community to track and optimize:
* Number of **community ambassadors**
* Number of **return attendees** (people who attend your activities two times or more)
* Rate of **churned attendees** (the percentage of people who attend your activities only once or say they will come but don't show up)
If you're curious, the corresponding terms on a political campaign for these three metrics are typically community captains, super volunteers, and flake rate.
#### Community ambassadors
A "community ambassador" is a user or enthusiast of your project who is willing to _consistently_ host local meetups or activities where she or he lives. Growing the number of community ambassadors and supporting them with resources and guidance are core to your community's strength and scale. You can probably hire for these if you have a lot of funding, but pure volunteers speak more to your project's allure.
These ambassadors should be your best friends, where you understand inside and out why they are motivated to evangelize your project in front of both peers and strangers. Their feedback on your project is also valuable and should be a critical part of your development roadmap and process. You can strategically cultivate ambassadors in different tech hubs geographically around the world, so your project can count on someone with local knowledge to reach and serve users of different business cultures with different needs. The beauty of open source is that it's global by default; take advantage of it!
Some cities are arguably more of a developer hub than others. Some to consider are Amsterdam, Austin, Bangalore, Beijing, Berlin, Hangzhou, Istanbul, London, NYC, Paris, Seattle, Seoul, Shenzhen, Singapore, São Paulo, San Francisco-Bay Area, Vancouver, Tel Aviv, Tokyo, and Toronto (listed alphabetically and based on feedback I got through social media. Please add a comment if I missed any!). An example of this is the [Cloud Native Ambassadors program][3] of the Cloud Native Computing Foundation.
#### Return attendees
The number of return attendees is crucial to measuring the usefulness or stickiness of your community activities. Tracking return attendees is how you can draw a meaningful line between "the curious" and "the serious."
Trying to grow this number should be an obvious goal. However, that's not the only goal. This is the group whose motivation you want to understand the clearest. This is the group that reflects your project's user persona. This is the group that can probably give you the most valuable feedback. This is the group that will become your future community ambassadors.
Putting it differently, this is your [1,000 true fans][4] (if you can keep them).
Having hosted and attended my fair share of these community meetups, my observation is that most people attend to be educated on a technical topic, look for tools to solve problems at work, or network for their next job opportunity. What they are not looking for is being "marketed to."
There is a growing trend of developer community events becoming marketing events, especially when companies are flush with funding or have a strong marketing department that wants to "control the message." I find this trend troubling because it undermines community building.
Thus, be laser-focused on technical education. If a developer community gets taken over by marketing campaigns, your return-attendees metric won't be pretty.
#### Churned attendees rate
Tracking churned attendees is the flipside of the returned-attendees coin, so I won't belabor the point. These are the people that join once and then disappear or who show interest but don't show up. They are important because they tell you what isn't working and for whom, which is more actionable than just counting the people who show up.
One note of caution: Be brutally honest when measuring this number, and don't fool yourself (or others). On its own, if someone signs up but doesn't show up, it doesn't mean much. Similarly, if someone shows up once and never comes back, it doesn't mean much. Routinely sit down and assess _why_ someone isn't showing up, so you can re-evaluate and refine your community program and activities. Don't build the wrong incentives into your community-building operation to reward the wrong metric.
### Value of in-person connections
I purposely focused this post on measuring offline community activities because online activities are inherently more trackable and intuitive to digital-native open source creators.
Offline community activities are essential to any project's journey to reaching traction and prominence. I have yet to see a successful project that does not have a sizable offline presence, regardless of its online popularity.
Why is this the case? Why can't an open source community, usually born online, just stay and grow online?
Because technology choice is ultimately a human decision; therefore, face-to-face interaction is an irreplaceable element of new technology adoption. No one wants to be the guinea pig. No one wants to be the first. The most effective way to not feel like the first is to literally _see_ other human beings trying out or being interested in the same thing.
Being in the same room as other developers, learning about the same project, and doing that regularly is the most effective way to build trust for a project. And with trust comes traction.
### These three metrics work
There are other things you _can_ track, but more data does not necessarily mean clearer insight. Focusing your energy on these three metrics will make the most impact on your community-building operation. An open source community where the _number of ambassadors and return attendees are trending up_ and the _churned attendees rate is trending down_ is one that's healthy and growing in the right way.
* * *
_This article originally appeared on_ _[COSS Media][5]_ _and is republished with permission._
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/3/community-metrics
作者:[Kevin Xu][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/kevin-xu
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/metrics_lead-steps-measure.png?itok=DG7rFZPk (Green graph of measurements)
[2]: https://hbr.org/2020/01/when-community-becomes-your-competitive-advantage
[3]: https://www.cncf.io/people/ambassadors/
[4]: https://kk.org/thetechnium/1000-true-fans/
[5]: https://coss.media/how-to-measure-community-building/

View File

@ -0,0 +1,107 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Coronavirus challenges capacity, but core networks are holding up)
[#]: via: (https://www.networkworld.com/article/3533438/coronavirus-challenges-capacity-but-core-networks-are-holding-up.html)
[#]: author: (Michael Cooney https://www.networkworld.com/author/Michael-Cooney/)
Coronavirus challenges capacity, but core networks are holding up
======
COVID-19 has sent thousands of employees to work from home, placing untold stress on remote-access networks.
Cicilie Arcurs / Getty Images
As the coronavirus continues to spread and more people work from home, the impact of the increased traffic on networks in the US so far seems to be minimal.
No doubt that web, VPN and data usage is growing dramatically with the [influx of remote workers][1].  For example, Verizon said it has seen a 34% increase in VPN traffic from March 10 to 17.  It has also seen a 75% increase in gaming traffic, and web traffic increased by just under 20% in that time period, according to Verizon.
[[Get regularly scheduled insights by signing up for Network World newsletters.]][2]
Verizon said its fiber optic and wireless networks “have been able to meet the shifting demands of customers and continue to perform well. In small pockets where there has been a significant increase in usage, our engineers have quickly added capacity to meet customers demand.”
“As we see more and more individuals work from home and students engage in online learning, it is a natural byproduct that we would see an increase in web traffic and access to VPN. And as more entertainment options are cancelled in communities across the US, an increase in video traffic and online gaming is not surprising,” said Kyle Malady, Chief Technology Officer for Verizon in a [statement][3]. “We expect these peak hour percentages to fluctuate, so our engineers are continuing to closely monitor network usage patterns 24x7 and stand ready to adjust resources as changing demands arise."
As of March 16, AT&amp;T said that its network continues to perform well. “In cities where the coronavirus has had the biggest impact, we are seeing fewer spikes in wireless usage around particular cell towers or particular times of day because more people are working from home rather than commuting to work and fewer people are gathering in large crowds at specific locations.”
In Europe, Vodaphone say it has seen an 50% increase in data traffic in some markets.
“COVID-19 is already having a significant impact on our services and placing a greater demand on our network,” the company said in a statement. “Our technology teams throughout Europe have been focusing on capacity across our networks to make sure they are resilient and can absorb any new usage patterns arising as more people start working from home.”
[][4]
In Europe there have also been indications of problems. 
Ireland-based [Spearline][5], which monitors international phone numbers for connectivity and audio quality, said this week that Italy's landline connection rate continues to be volatile with as much as a 10% failure rate and audio quality is running approximately 4% below normal levels. 
Other Spearline research says:
* Spain saw a drop in connection rates to 98.5% on March 16, but it is improving again.
* France saw a dip in connection rates approaching 5% on March17. Good quality has been maintained overall, though periodic slippage has been observed.
* Germany saw a 1.7% connection-failure rate March 17.  Good quality has been maintained, though periodic slippage has been observed.
Such problems are not showing up in the US at this point, Spearline said.
“The US is Spearline's most tested market with test calls over three main sectors being enterprise, unified communications and carrier. To date, there has been no significant impact on either the connection rates or the audio quality on calls throughout the US,” said Matthew Lawlor, co-founder and chief technical officer at Spearline. 
The future impact is the real unknown of course, Lawlor said.
“There are many potential issues which have happened in other countries which may have a similar impact on US infrastructure. For example, in many countries there have been hardware issues where engineers are unable to get physical access to resolve the issue,” Lawlor said.   “While rerouting calls may help resolve issues it does put more pressure on other segments of your network.”
On March 19, one week after the CDC declarated the virus as pandemic, data analytics and broadband vendor OpenVault wrote:
* Subscribers average usage from 9 a.m. to 5 p.m. has risen to 6.3 GB, 41.4% higher than the January figure of 4.4 GB. 
* During the same period, peak-hour (6 p.m. to 11 p.m.) usage has risen 17.2% from 5.0 GB per subscriber in January to 5.87 GB in March. 
* Overall daily usage has grown from 12.19 GB to 15.46 GB, an increase of 26.8%.
Based on the current rate of growth, OpenVault projected that consumption for March will reach nearly 400 GB per subscriber, an increase of almost 11% over the previous monthly record of 361 GB, established in January. In addition, OpenVault projects a new coronavirus-influenced run rate of 460 GB per subscriber per month going forward. OpenVaults research is based on the usage of more than 1 million broadband subscribers through the United States, the company said.
“Broadband clearly is keeping the hearts of business, education and entertainment beating during this crisis,” said Mark Trudeau, CEO and founder of OpenVault in a  [statement][6]. “Networks built for peak-hours consumption so far are easily handling the rise in nine-to-five business-hours usage. Weve had concerns about peak hours consumption given the increase in streaming entertainment and the trend toward temporary cessation of bandwidth caps, but operator networks seem to be handling the additional traffic without impacting customer experiences.”
Increased use of conferencing apps may affect their availability for reasons other than network capacity. For example,  according to Thousand Eyes, users around the globe were unable to connect to their Zoom meetings for approximately 20 minutes on Friday due to failed DNS resolution. 
Others too are monitoring data traffic looking for warning signs of slowdowns.  “Traffic towards video conferencing, streaming services and news, e-commerce websites has surged. We've seen growth in traffic from residential broadband networks, and a slowing of traffic from businesses and universities," wrote Louis Poinsignon a network engineer with CloudFlare in a [blog][7] about Internet traffic patterns. He noted that on March 13 when the US announced a state of emergency, CloudFlares US data centers served 20% more traffic than usual.
Poinsignon  noted that  [Internet Exchange Points][8], where Internet service providers and content providers can exchange data directly (rather than via a third party) have also seen spikes in traffic. For example, Amsterdam ([AMS-IX][9]), London ([LINX][10]) and Frankfurt ([DE-CIX][11]), a 10-20% increase was seen around March 9.
“Even though from time to time individual services, such as a web site or an app, have outages, the core of the Internet is robust,” Poinsignon wrote.  “Traffic is shifting from corporate and university networks to residential broadband, but the Internet was designed for change.”
In related news:
* Netflix said it would reduce streaming quality in Europe for at least the next 30 days to prevent the internet collapsing under the strain of unprecedented usage due to the coronavirus pandemic. "We estimate that this will reduce Netflix traffic on European networks by around 25% while also ensuring a good quality service for our members," Netflix said.
* DISH announced that it is providing 20 MHz of AWS-4 (Band 66) and all of its 700 MHz spectrum to AT&amp;T at no cost for 60 days. Last week, DISH began lending its complete 600 MHz portfolio of spectrum to T-Mobile. With these two agreements, DISH has activated most of its spectrum portfolio to enhance national wireless capacity as the nation confronts the COVID-19 crisis.
Join the Network World communities on [Facebook][12] and [LinkedIn][13] to comment on topics that are top of mind.
--------------------------------------------------------------------------------
via: https://www.networkworld.com/article/3533438/coronavirus-challenges-capacity-but-core-networks-are-holding-up.html
作者:[Michael Cooney][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.networkworld.com/author/Michael-Cooney/
[b]: https://github.com/lujun9972
[1]: https://www.networkworld.com/article/3532440/coronavirus-challenges-remote-networking.html
[2]: https://www.networkworld.com/newsletters/signup.html
[3]: https://www.verizon.com/about/news/how-americans-are-spending-their-time-temporary-new-normal
[4]: https://www.networkworld.com/blog/itaas-and-the-corporate-storage-technology/?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE22140&utm_content=sidebar (ITAAS and Corporate Storage Strategy)
[5]: https://www.spearline.com/
[6]: http://openvault.com/covid-19-impact-driving-business-hours-broadband-consumption-up-41/
[7]: https://blog.cloudflare.com/on-the-shoulders-of-giants-recent-changes-in-internet-traffic/
[8]: https://en.wikipedia.org/wiki/Internet_exchange_point
[9]: https://www.ams-ix.net/ams/documentation/total-stats
[10]: https://portal.linx.net/stats/lans
[11]: https://www.de-cix.net/en/locations/germany/frankfurt/statistics
[12]: https://www.facebook.com/NetworkWorld/
[13]: https://www.linkedin.com/company/network-world

View File

@ -1,70 +0,0 @@
Exploring free and open web fonts
======
![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc-lead-docdish-yellow-typewriter-keys.png?itok=0sPgIdMG)
There is no question that the face of the web has been transformed in recent years by open source fonts. Prior to 2010, the only typefaces you were likely to see in a web browser were the generic "web safe" [core fonts][1] from Microsoft. But that year saw the start of several revolutions: the introduction of the Web Open Font Format ([WOFF][2]), which offered an open standard for efficiently delivering font files over HTTP, and the launch of web-font services like [Google Fonts][3] and the [Open Font Library][4]—both of which offered web publishers access to a large collection of fonts, for free, available under open licenses.
It is hard to overstate the positive impact of these events on web typography. But it can be all too easy to equate the successes of open web fonts with open source typography as a whole and conclude that the challenges are behind us, the puzzles solved. That is not the case, so if you care about type, the good news is there are a lot of opportunities to get involved in improvement.
For starters, it's critical to understand that Google Fonts and Open Font Library offer a specialized service—delivering fonts in web pages—and they don't implement solutions for other use cases. That is not a shortcoming on the services' side; it simply means that we have to develop other solutions.
There are a number of problems to solve. Probably the most obvious example is the awkwardness of installing fonts on a desktop Linux machine for use in other applications. You can download any of the web fonts offered by either service, but all you will get is a generic ZIP file with some TTF or OTF binaries inside and a plaintext license file. What happens next is up to you to guess.
Most users learn quickly that the "right" step is to manually copy those font binaries into any one of a handful of special directories on their hard drive. But that just makes the files visible to the operating system; it doesn't offer much in the way of a user experience. Again, this is not a flaw with the web-font service; rather it's evidence of the point where the service stops and more work needs to be done on the other side.
A big improvement from the user's perspective would be for the OS or the desktop environment to be smarter at this "just downloaded" stage. Not only would it install the font files to the right location but, more importantly, it could add important metadata that the user will want to access when selecting a font to use in a project.
What this additional information consists of and how it is presented to the user is tied to another challenge: Managing a font collection on Linux is noticeably less pleasant than on other operating systems. Periodically, font manager applications appear (see [GTK+ Font Manager][5] for one of the most recent examples), but they rarely catch on. I've been thinking a lot about where I think they come up short; one core factor is they have limited themselves to displaying only the information embedded in the font binary: basic character-set coverage, weight/width/slope settings, embedded license and copyright statements, etc.
But a lot of decisions go into the process of selecting a font for a job besides what's in this embedded data. Serious font users—like information designers, journal article authors, or book designers—make their font-selection decisions in the context of each document's requirements and needs. That includes license information, naturally, but it includes much more, like information about the designer and the foundry, stylistic trends, or details about how the font works in use.
For example, if your document includes both English and Arabic text, you probably want a font where the Latin and Arabic glyphs were designed together by someone experienced with the two scripts. Otherwise, you'll waste a ton of time making tiny adjustments to the font sizes and line spacing trying to get the two languages to mix well. You may have learned from experience that certain designers or vendors are better at multi-script design than others. Or it might be relevant to your project that today's fashion magazines almost exclusively use "[Didone][6]"-style typefaces, a name that refers to super-high-contrast styles pioneered by [Firmin Didot][7] and [Giambattista Bodoni][8] around 200 years ago. It just happens to be the trend.
But none of those terms (Didone, Didot, or Bodoni) are likely to show up in the binary's embedded data, nor is easy to tell whether the Latin and Arabic fit together or anything else about the typeface's back history. That information might appear in supplementary material like a type specimen or font documentation—if any exists.
A specimen is a designed document (often a PDF) that shows the font in use and includes background information; it frequently serves a dual role as a marketing piece and a sample to look at when choosing a font. The considered design of a specimen showcases how the font functions in practice and in a manner that an automatically generated character table simply cannot. Documentation may include some other vital information, like how to activate the font's OpenType features, what mathematical or archaic forms it provides, or how it varies stylistically across supported languages. Making this sort of material available to the user in the font-management application would go a long way towards helping users find the fonts that fit their projects' needs.
Of course, if we're going to consider a font manager that can handle documentation and specimens, we also have to take a hard look at what comes with the font packages provided by distributions. Linux users start with a few fonts automatically installed, and repository-provided packages are the only font source most users have besides downloading the generic ZIP archive. Those packages tend to be pretty bare-bones. Commercial fonts generally include specimens, documentation, and other support items, whereas open source fonts usually do not.
There are some excellent examples of open fonts that do provide quality specimens and documentation (see [SIL Gentium][9] and [Bungee][10] for two distinctly different but valid approaches), but they rarely (if ever) make their way into the downstream packaging chain. We plainly can do better.
There are some technical obstacles to offering a richer user experience for interacting with the fonts on your system. For one thing, the [AppStream][11] metadata standard defines a few [parameters][12] specific to font files, but so far includes nothing that would cover specimens, designer and foundry information, and other relevant details. For another, the [SPDX][13] (Software Package Data Exchange) format does not cover many of the software licenses (and license variants) used to distribute fonts.
Finally, as any audiophile will tell you, a music player that does not let you edit and augment the ID3 tags in your MP3 collection is going to get frustrating quickly. You want to fix errors in the tags, you want to add things like notes and album art—essentially, you want to polish your library. You would want to do the same to keep your local font library in a pleasant-to-use state.
But editing the embedded data in a font file has been taboo because fonts tend to get embedded and attached to other documents. If you monkey with the fields in a font binary, then redistribute it with your presentation slides, anyone who downloads those slides can end up with bad metadata through no fault of their own. So anyone making improvements to the font-management experience will have to figure out how to strategically wrangle repeated changes to the embedded and external font metadata.
In addition to the technical angle, enriching the font-management experience is also a design challenge. As I said above, good specimens and well-written documentation exist for several open fonts. But there are many more packages missing both, and there are a lot of older font packages that are no longer being maintained. That probably means the only way that most open font packages are going to get specimens or documentation is for the community to create them.
Perhaps that's a tall order. But the open source design community is bigger than it has ever been, and it is a highly motivated segment of the overall free and open source software movement. So who knows; maybe this time next year finding, downloading, and using fonts on a desktop Linux system will be an entirely different experience.
One train of thought on the typography challenges of modern Linux users includes packaging, document design, and maybe even a few new software components for desktop environments. There are other trains to consider, too. The commonality is that where the web-font service ends, matters get more difficult.
The best news, from my perspective, is that there are more people interested in this topic than ever before. For that, I think we have the higher profile that open fonts have received from big web-font services like Google Fonts and Open Font Library to thank.
--------------------------------------------------------------------------------
via: https://opensource.com/article/18/3/webfonts
作者:[Nathan Willis][a]
译者:[译者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/n8willis
[1]:https://en.wikipedia.org/wiki/Core_fonts_for_the_Web
[2]:https://en.wikipedia.org/wiki/Web_Open_Font_Format
[3]:https://fonts.google.com/
[4]:https://fontlibrary.org/
[5]:https://fontmanager.github.io/
[6]:https://en.wikipedia.org/wiki/Didone_(typography)
[7]:https://en.wikipedia.org/wiki/Firmin_Didot
[8]:https://en.wikipedia.org/wiki/Giambattista_Bodoni
[9]:https://software.sil.org/gentium/
[10]:https://djr.com/bungee/
[11]:https://www.freedesktop.org/wiki/Distributions/AppStream/
[12]:https://www.freedesktop.org/software/appstream/docs/sect-Metadata-Fonts.html
[13]:https://spdx.org/

View File

@ -1,5 +1,4 @@
Cgo and Python
[#] MonkeyDEcho translating
============================================================
![](https://datadog-prod.imgix.net/img/blog/engineering/cgo-and-python/cgo_python_hero.png?auto=format&w=1900&dpr=1)

View File

@ -1,119 +0,0 @@
Translating by MjSeven
Advanced use of the less text file viewer in Linux
======
![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc_terminals_0.png?itok=XwIRERsn)
I recently read Scott Nesbitt's article "[Using less to view text files at the Linux command line][1]" and was inspired to share additional tips and tricks I use with `less`.
### LESS env var
If you have an environment variable `LESS` defined (e.g., in your `.bashrc`), `less` treats it as a list of options, as if passed on the command line.
I use this:
```
LESS='-C -M -I -j 10 -# 4'
```
These mean:
* `-C` Make full-screen reprints faster by not scrolling from the bottom.
* `-M` Show more information from the last (status) line. You can customize the information shown with `-PM`, but I usually do not bother.
* `-I` Ignore letter case (upper/lower) in searches.
* `-j 10` Show search results in line 10 of the terminal, instead of the first line. This way you have 10 lines of context each time you press `n` (or `N`) to jump to the next (or previous) match.
* `-# 4` Jump four characters to the right or left when pressing the Right or Left arrow key. The default is to jump half of the screen, which I usually find to be too much. Generally speaking, `less` seems to be (at least partially) optimized to the environment it was initially developed in, with slow modems and low-bandwidth internet connections, when it made sense to jump half a screen.
### PAGER env var
Many programs show information using the command set in the `PAGER` environment variable (if it's set). So, you can set `PAGER=less` in your `.bashrc` and have your program run `less`. Check the man page environ(7) (`man 7 environ`) for other such variables.
### -S
`-S` tells `less` to chop long lines instead of wrapping them. I rarely find a need for this unless (and until) I've started viewing a file. Fortunately, you can type all command-line options inside `less` as if they were keyboard commands. So, if I want to chop long lines while I'm already in a file, I can simply type `-S`.
The command-line optiontellsto chop long lines instead of wrapping them. I rarely find a need for this unless (and until) I've started viewing a file. Fortunately, you can type all command-line options insideas if they were keyboard commands. So, if I want to chop long lines while I'm already in a file, I can simply type
Here's an example I use a lot:
```
    su - postgres
    export PAGER=less  # Because I didn't bother editing postgres' .bashrc on all the machines I use it on
    psql
```
Sometimes when I later view the output of a `SELECT` command with a very wide output, I type `-S` so it will be formatted nicely. If it jumps too far when I press the Right arrow to see more (because I didn't set `-#`), I can type `-#8`, then each Right arrow press will move eight characters to the right.
Sometimes after typing `-S` too many times, I exit psql and run it again after entering:
```
export LESS=-S
```
### F
The command `F` makes `less` work like `tail -f`—waiting until more data is added to the file before showing it. One advantage this has over `tail -f` is that highlighting search matches still works. So you can enter `less /var/log/logfile`, search for something—which will highlight all occurrences of it (unless you used `-g`)—and then press `F`. When more data is written to the log, `less` will show it and highlight the new matches.
After you press `F`, you can press `Ctrl+C` to stop it from looking for new data (this will not kill it); go back into the file to see older stuff, search for other things, etc.; and then press `F` again to look at more new data.
### Searching
Searches use the system's regexp library, and this usually means you can use extended regular expressions. In particular, searching for `one|two|three` will find and highlight all occurrences of one, two, or three.
Another pattern I use a lot, especially with wide log lines (e.g., ones that span more than one terminal line), is `.*something.*`, which highlights the entire line. This pattern makes it much easier to see where a line starts and finishes. I also combine these, such as: `.*one thing.*|.*another thing.*`, or `key: .*|.*marker.*` to see the contents of `key` (e.g., in a log file with a dump of some dictionary/hash) and highlight relevant marker lines (so I have a context), or even, if I know the value is surrounded by quotes:
```
key: '[^']*'|.*marker.*
```
`less` maintains a history of your search items and saves them to disk for future invocations. When you press `/` (or `?`), you can go through this history with the Up or Down arrow (as well as do basic line editing).
I stumbled upon what seems to be a very useful feature when skimming through the `less` man page while writing this article: skipping uninteresting lines with `&!pattern`. For example, while looking for something in `/var/log/messages`, I used to iterate through this list of commands:
```
    cat /var/log/messages | egrep -v 'systemd: Started Session' | less
    cat /var/log/messages | egrep -v 'systemd: Started Session|systemd: Starting Session' | less
    cat /var/log/messages | egrep -v 'systemd: Started Session|systemd: Starting Session|User Slice' | less
    cat /var/log/messages | egrep -v 'systemd: Started Session|systemd: Starting Session|User Slice|dbus' | less
    cat /var/log/messages | egrep -v 'systemd: Started Session|systemd: Starting Session|User Slice|dbus|PackageKit Daemon' | less
```
But now I know how to do the same thing within `less`. For example, I can type `&!systemd: Started Session`, then decide I want to get rid of `systemd: Starting Session`, so I add it by typing `&!` and use the Up arrow to get the previous search from the history. Then I type `|systemd: Starting Session` and press `Enter`, continuing to add more items the same way until I filter out enough to see the more interesting stuff.
### =
The command `=` shows more information about the file and location, even more than `-M`. If the file is very long, and calculating `=` takes too long, you can press `Ctrl+C` and it will stop trying.
If the content you're viewing is from a pipe rather than a file, `=` (and `-M`) will not show what it does not know, including the number of lines and bytes in the file. To see that data, if you know that `command` will finish quickly, you can jump to the end with `G`, and then `less` will start showing that information.
If you press `G` and the command writing to the pipe takes longer than expected, you can press `Ctrl+C`, and the command will be killed. Pressing `Ctrl+C` will kill it even if you didn't press `G`, so be careful not to press `Ctrl+C` accidentally if you don't intend to kill it. For this reason, if the command does something (that is, it's not only showing information), it's usually safer to write its output to a file and view the file in a separate terminal, instead of using a pipe.
### Why you need less
`less` is a very powerful program, and contrary to newer contenders in this space, such as `most` and `moar`, you are likely to find it on almost all the systems you use, just like `vi`. So, even if you use GUI viewers or editors, it's worth investing some time going through the `less` man page, at least to get a feeling of what's available. This way, when you need to do something that might be covered by existing functionality, you'll know to search the manual page or the internet to find what you need.
For more information, visit the [less home page][2]. The site has a nice FAQ with more tips and tricks.
--------------------------------------------------------------------------------
via: https://opensource.com/article/18/5/advanced-use-less-text-file-viewer
作者:[Yedidyah Bar David][a]
选题:[lujun9972](https://github.com/lujun9972)
译者:[译者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/didib
[1]:http://opensource.com/article/18/4/using-less-view-text-files-command-line
[2]:http://www.greenwoodsoftware.com/less/

View File

@ -1,171 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (MonkeyDEcho )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: subject: (5 Minimal Web Browsers for Linux)
[#]: via: (https://www.linux.com/blog/intro-to-linux/2018/11/5-minimal-web-browsers-linux)
[#]: author: (Jack Wallen https://www.linux.com/users/jlwallen)
[#]: url: ( )
5 Minimal Web Browsers for Linux
======
linux上的五种微型浏览器
======
![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/minimal.jpg?itok=ifA0Y3pV)
There are so many reasons to enjoy the Linux desktop. One reason I often state up front is the almost unlimited number of choices to be found at almost every conceivable level. From how you interact with the operating system (via a desktop interface), to how daemons run, to what tools you use, you have a multitude of options.
有太多理由去选择使用linux系统。很重要的一个理由是我们可以按照我们自己的想法去选择想要的。从操作系统的交互方式桌面系统到守护系统的运行方式在到使用的工具你用更多的选择。
The same thing goes for web browsers. You can use anything from open source favorites, such as [Firefox][1] and [Chromium][2], or closed sourced industry darlings like [Vivaldi][3] and [Chrome][4]. Those options are full-fledged browsers with every possible bell and whistle youll ever need. For some, these feature-rich browsers are perfect for everyday needs.
web浏览器也是如此。你可以使用开源的[火狐][1][Chromium][2];或者未开源的[Vivaldi][3][Chrome][4]。这些功能强大的浏览器有你需要的各种功能。对于某些人,这些功能完备的浏览器是日常必需的。
There are those, however, who prefer using a web browser without all the frills. In fact, there are many reasons why you might prefer a minimal browser over a standard browser. For some, its about browser security, while others look at a web browser as a single-function tool (as opposed to a one-stop shop application). Still others might be running low-powered machines that cannot handle the requirements of, say, Firefox or Chrome. Regardless of the reason, Linux has you covered.
但是有些人更喜欢没有冗余功能的纯粹的浏览器。实际上有很多原因导致你会选择微型的浏览器而不选择上述功能完备的浏览器。对于某些人来说与浏览器的安全有关而有些人则将浏览器当作一种简单的工具而不是一站式商店应用程序还有一些可能运行在低功率的计算机上这些计算机无法满足火狐chrome浏览器的运行要求。无论出于何种原因在linux系统上都可以满足你的要求。
Lets take a look at five of the minimal browsers that can be installed on Linux. Ill be demonstrating these browsers on the Elementary OS platform, but each of these browsers are available to nearly every distribution in the known Linuxverse. Lets dive in.
让我们看一下可以在linux上安装运行的五种微型浏览器。我将在 Elementary 的操作系统平台上演示这些浏览器在已知的linux发型版中几乎每个版本都可以使用这些浏览器。让我们一起来看一下吧
### GNOME Web
GNOME Web (codename Epiphany, which means [“a usually sudden manifestation or perception of the essential nature or meaning of something”][5]) is the default web browser for Elementary OS, but it can be installed from the standard repositories. (Note, however, that the recommended installation of Epiphany is via Flatpak or Snap). If you choose to install via the standard package manager, issue a command such as sudo apt-get install epiphany-browser -y for successful installation.
GNOME web (Epiphany 含义:[顿悟][5])是Elementary系统默认的web浏览器也可以从标准存储库中安装。(注意,建议通过使用 Flatpak 或者 Snap 工具安装),如果你想选择标准软件包管理器进行安装,请执行 ```sudo apt-get install epiphany-browser -y``` 命令成功安装。
Epiphany uses the WebKit rendering engine, which is the same engine used in Apples Safari browser. Couple that rendering engine with the fact that Epiphany has very little in terms of bloat to get in the way, you will enjoy very fast page-rendering speeds. Epiphany development follows strict adherence to the following guidelines:
* Simplicity - Feature bloat and user interface clutter are considered evil.
* Standards compliance - No non-standard features will ever be introduced to the codebase.
* Software freedom - Epiphany will always be released under a license that respects freedom.
* Human interface - Epiphany follows the [GNOME Human Interface Guidelines][6].
* Minimal preferences - Preferences are only added when they make sense and after careful consideration.
* Target audience - Non-technical users are the primary target audience (which helps to define the types of features that are included).
GNOME Web is as clean and simple a web browser as youll find (Figure 1).
![GNOME Web][8]
Figure 1: The GNOME Web browser displaying a minimal amount of preferences for the user.
[Used with permission][9]
The GNOME Web manifesto reads:
A web browser is more than an application: it is a way of thinking, a way of seeing the world. Epiphany's principles are simplicity, standards compliance, and software freedom.
### Netsurf
The [Netsurf][10] minimal web browser opens almost faster than you can release the mouse button. Netsurf uses its own layout and rendering engine (designed completely from scratch), which is rather hit and miss in its rendering (Figure 2).
![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/minimalbrowsers_2.jpg?itok=KhGhIKlj)
Although you might find Netsurf to suffer from rendering issues on certain sites, understand the Hubbub HTML parser is following the work-in-progress HTML5 specification, so there will be issues popup now and then. To ease those rendering headaches, Netsurf does include HTTPS support, web page thumbnailing, URL completion, scale view, bookmarks, full-screen mode, keyboard shorts, and no particular GUI toolkit requirements. That last bit is important, especially when you switch from one desktop to another.
For those curious as to the requirements for Netsurf, the browser can run on a machine as slow as a 30Mhz ARM 6 computer with 16MB of RAM. Thats impressive, by todays standard.
### QupZilla
If youre looking for a minimal browser that uses the Qt Framework and the QtWebKit rendering engine, [QupZilla][11] might be exactly what youre looking for. QupZilla does include all the standard features and functions youd expect from a web browser, such as bookmarks, history, sidebar, tabs, RSS feeds, ad blocking, flash blocking, and CA Certificates management. Even with those features, QupZilla still manages to remain a very fast lightweight web browser. Other features include: Fast startup, speed dial homepage, built-in screenshot tool, browser themes, and more.
One feature that should appeal to average users is that QupZilla has a more standard preferences tools than found in many lightweight browsers (Figure 3). So, if going too far outside the lines isnt your style, but you still want something lighter weight, QupZilla is the browser for you.
![QupZilla][13]
Figure 3: The QupZilla preferences tool.
[Used with permission][9]
### Otter Browser
Otter Browser is a free, open source attempt to recreate the closed-source offerings found in the Opera Browser. Otter Browser uses the WebKit rendering engine and has an interface that should be immediately familiar with any user. Although lightweight, Otter Browser does include full-blown features such as:
* Passwords manager
* Add-on manager
* Content blocking
* Spell checking
* Customizable GUI
* URL completion
* Speed dial (Figure 4)
* Bookmarks and various related features
* Mouse gestures
* User style sheets
* Built-in Note tool
![Otter][15]
Figure 4: The Otter Browser Speed Dial tab.
[Used with permission][9]
Otter Browser can be run on nearly any Linux distribution from an [AppImage][16], so theres no installation required. Just download the AppImage file, give the file executable permissions (with the command chmod u+x otter-browser-*.AppImage), and then launch the app with the command ./otter-browser*.AppImage.
Otter Browser does an outstanding job of rendering websites and could function as your go-to minimal browser with ease.
### Lynx
Lets get really minimal. When I first started using Linux, back in 97, one of the web browsers I often turned to was a text-only take on the app called [Lynx][17]. It should come as no surprise that Lynx is still around and available for installation from the standard repositories. As you might expect, Lynx works from the terminal window and doesnt display pretty pictures or render much in the way of advanced features (Figure 5). In fact, Lynx is as bare-bones a browser as you will find available. Because of how bare-bones this web browser is, its not recommended for everyone. But if you happen to have a gui-less web server and you have a need to be able to read the occasional website, Lynx can be a real lifesaver.
![Lynx][19]
Figure 5: The Lynx browser rendering the Linux.com page.
[Used with permission][9]
I have also found Lynx an invaluable tool when troubleshooting certain aspects of a website (or if some feature on a website is preventing me from viewing the content in a regular browser). Another good reason to use Lynx is when you only want to view the content (and not the extraneous elements).
### Plenty More Where This Came From
There are plenty more minimal browsers than this. But the list presented here should get you started down the path of minimalism. One (or more) of these browsers are sure to fill that need, whether youre running it on a low-powered machine or not.
Learn more about Linux through the free ["Introduction to Linux" ][20]course from The Linux Foundation and edX.
--------------------------------------------------------------------------------
via: https://www.linux.com/blog/intro-to-linux/2018/11/5-minimal-web-browsers-linux
作者:[Jack Wallen][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.linux.com/users/jlwallen
[b]: https://github.com/lujun9972
[1]: https://www.mozilla.org/en-US/firefox/new/
[2]: https://www.chromium.org/
[3]: https://vivaldi.com/
[4]: https://www.google.com/chrome/
[5]: https://www.merriam-webster.com/dictionary/epiphany
[6]: https://developer.gnome.org/hig/stable/
[7]: /files/images/minimalbrowsers1jpg
[8]: https://www.linux.com/sites/lcom/files/styles/rendered_file/public/minimalbrowsers_1.jpg?itok=Q7wZLF8B (GNOME Web)
[9]: /licenses/category/used-permission
[10]: https://www.netsurf-browser.org/
[11]: https://qupzilla.com/
[12]: /files/images/minimalbrowsers3jpg
[13]: https://www.linux.com/sites/lcom/files/styles/rendered_file/public/minimalbrowsers_3.jpg?itok=O8iMALWO (QupZilla)
[14]: /files/images/minimalbrowsers4jpg
[15]: https://www.linux.com/sites/lcom/files/styles/rendered_file/public/minimalbrowsers_4.jpg?itok=5bCa0z-e (Otter)
[16]: https://sourceforge.net/projects/otter-browser/files/
[17]: https://lynx.browser.org/
[18]: /files/images/minimalbrowsers5jpg
[19]: https://www.linux.com/sites/lcom/files/styles/rendered_file/public/minimalbrowsers_5.jpg?itok=p_Lmiuxh (Lynx)
[20]: https://training.linuxfoundation.org/linux-courses/system-administration-training/introduction-to-linux

View File

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

View File

@ -1,96 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (9 ways to save the planet)
[#]: via: (https://opensource.com/article/19/4/save-planet)
[#]: author: (Jen Wike Huger https://opensource.com/users/jen-wike/users/alanfdoss/users/jmpearce)
9 ways to save the planet
======
These ideas have an open source twist.
![][1]
What can be done to help save the planet? The question can seem depressing at a time when it feels like an individual's contribution isn't enough. But, who are we Earth dwellers if not for a collection of individuals? So, I asked our writer community to share ways that open source software or hardware can be used to make a difference. Here's what I heard back.
### 9 ways to save the planet with an open source twist
**1.** **Disable the blinking cursor in your terminal.**
It might sound silly, but the trivial, blinking cursor can cause up to [2 watts per hour of extra power consumption][2]. To disable it, go to Terminal Settings: Edit > Preferences > Cursor > Cursor blinking > Disabled.
_Recommended by Mars Toktonaliev_
**2\. Reduce your consumption of animal products and processed foods.**
One way to do this is to add these open source apps to your phone: Daily Dozen, OpenFoodFacts, OpenVegeMap, and Food Restrictions. These apps will help you eat a healthy, plant-based diet, find vegan- and vegetarian-friendly restaurants, and communicate your dietary needs to others, even if they do not speak the same language. To learn more about these apps read [_4 open source apps to support eating a plant-based diet_][3].
_Recommendation by Joshua Allen Holm_
**3\. Recycle old computers.**
How? With Linux, of course. Pay it forward by giving creating a new computer for someone who can't one and keep a computer out of the landfill. Here's how we do it at [The Asian Penguins][4].
_Recommendation by Stu Keroff_
**4\. Turn off devices when you're not using them.**
Use "smart power strips" that have a "master" outlet and several "controlled" outlets. Plug your PC into the master outlet, and when you turn on the computer, your monitor, printer, and anything else plugged into the controlled outlets turns on too. A simpler, low-tech solution is a power strip with a timer. That's what I use at home. You can use switches on the timer to set a handy schedule to turn the power on and off at specific times. Automatically turn off your network printer when no one is at home. Or for my six-year-old laptop, extend the life of the battery with a schedule to alternate when it's running from wall power (outlet is on) and when it's running from the battery (outlet is off).
_Recommended by Jim Hall_
**5\. Reduce the use of your HVAC system.**
Sunlight shining through windows adds a lot of heat to your home during the summer. Use Home Assistant to [automatically adjust][5] window blinds and awnings [based on the time of day][6], or even based on the angle of the sun.
_Recommended by Michael Hrivnak_
**6\. Turn your thermostat off or to a lower setting while you're away.**
If your home thermostat has an "Away" feature, activating it on your way out the door is easy to forget. With a touch of automation, any connected thermostat can begin automatically saving energy while you're not home. [Stataway][7] is one such project that uses your phone's GPS coordinates to determine when it should set your thermostat to "Home" or "Away".
_Recommended by Michael Hrivnak_
**7\. Save computing power for later.**
I have an idea: Create a script that can read the power output from an alternative energy array (wind and solar) and begin turning on servers (taking them from a power-saving sleep mode to an active mode) in a computing cluster until the overload power is used (whatever excess is produced beyond what can be stored/buffered for later use). Then use the overload power during high-production times for compute-intensive projects like rendering. This process would be essentially free of cost because the power can't be buffered for other uses. I'm sure the monitoring, power management, and server array tools must exist to do this. Then, it's just an integration problem, making it all work together.
_Recommended by Terry Hancock_
**8\. Turn off exterior lights.**
Light pollution affects more than 80% of the world's population, according to the [World Atlas of Artificial Night Sky Brightness][8], published (Creative Commons Attribution-NonCommercial 4.0) in 2016 in the open access journal _Science Advances_. Turning off exterior lights is a quick way to benefit wildlife, human health, our ability to enjoy the night sky, and of course energy consumption. Visit [darksky.org][9] for more ideas on how to reduce the impact of your exterior lighting.
_Recommended by Michael Hrivnak_
**9\. Reduce your CPU count.**
For me, I remember I used to have a whole bunch of computers running in my basement as my IT playground/lab. I've become more conscious now of power consumption and so have really drastically reduced my CPU count. I like to take advantage of VMs, zones, containers... that type of technology a lot more these days. Also, I'm really glad that small form factor and SoC computers, such as the Raspberry Pi, exist because I can do a lot with one, such as run a DNS or Web server, without heating the room and running up my electricity bill.
P.S. All of these computers are running Linux, FreeBSD, or Raspbian!
_Recommended by Alan Formy-Duvall_
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/4/save-planet
作者:[Jen Wike Huger ][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/jen-wike/users/alanfdoss/users/jmpearce
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/pixelated-world.png?itok=fHjM6m53
[2]: https://www.redhat.com/archives/fedora-devel-list/2009-January/msg02406.html
[3]: https://opensource.com/article/19/4/apps-plant-based-diets
[4]: https://opensource.com/article/19/2/asian-penguins-close-digital-divide
[5]: https://www.home-assistant.io/docs/automation/trigger/#sun-trigger
[6]: https://www.home-assistant.io/components/cover/
[7]: https://github.com/mhrivnak/stataway
[8]: http://advances.sciencemag.org/content/2/6/e1600377
[9]: http://darksky.org/

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