Merge pull request #3 from LCTT/master

2019-02-23 update from LCTT
This commit is contained in:
AnDJ 2019-02-23 17:43:01 +08:00 committed by GitHub
commit 707994a7fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
18 changed files with 1213 additions and 703 deletions

View File

@ -1,76 +1,68 @@
[#]: collector: (lujun9972)
[#]: translator: (wxy)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-10560-1.html)
[#]: subject: (PowerTOP Monitors Power Usage and Improve Laptop Battery Life in Linux)
[#]: via: (https://www.2daygeek.com/powertop-monitors-laptop-battery-usage-linux/)
[#]: author: (Vinoth Kumar https://www.2daygeek.com/author/vinoth/)
PowerTOP Monitors Power Usage and Improve Laptop Battery Life in Linux
PowerTOP:在 Linux 上监视电量使用和改善笔记本电池寿命
======
We all know, we almost 80-90% migrated from PC (Desktop) to laptop.
我们都知道,现在几乎都从 PC 机换到了笔记本电脑了。但是使用笔记本有个问题,我们希望电池耐用,我们可以使用到每一点电量。所以,我们需要知道电量都去哪里了,是不是浪费了。
But one thing we want from a laptop, its long battery life and we want to use every drop of power.
你可以使用 PowerTOP 工具来查看没有接入电源线时电量都用在了何处。你需要在终端中使用超级用户权限来运行 PowerTOP 工具。它可以访问该电池硬件并测量电量使用情况。
So its good to know where our power is going and getting waste.
### 什么是 PowerTOP
You can use the powertop utility to see whats drawing power when your systems not plugged in.
PowerTOP 是一个 Linux 工具,用于诊断电量消耗和电源管理的问题。
You need to run the powertop utility in terminal with super user privilege.
它是由 Intel 开发的,可以在内核、用户空间和硬件中启用各种节电模式。
It will access the hardware and measure power usage.
除了作为一个一个诊断工具之外PowweTop 还有一个交互模式,可以让你实验 Linux 发行版没有启用的各种电源管理设置。
### What is PowerTOP
它也能监控进程,并展示其中哪个正在使用 CPU以及从休眠状态页将其唤醒也可以找出电量消耗特别高的应用程序。
PowerTOP is a Linux tool to diagnose issues with power consumption and power management.
### 如何安装 PowerTOP
It was developed by Intel to enable various power-saving modes in kernel, userspace, and hardware.
PowerTOP 软件包在大多数发行版的软件库中可用,使用发行版的 [包管理器][1] 安装即可。
In addition to being a diagnostic tool, PowerTOP also has an interactive mode where the user can experiment various power management settings for cases where the Linux distribution has not enabled these settings.
It is possible to monitor processes and show which of them are utilizing the CPU and wake it from its Idle-States, allowing to identify applications with particular high power demands.
### How to Install PowerTOP
PowerTOP package is available in most of the distributions official repository so, use the distributions **[Package Manager][1]** to install it.
For **`Fedora`** system, use **[DNF Command][2]** to install PowerTOP.
对于 Fedora 系统,使用 [DNF 命令][2] 来安装 PowerTOP。
```
$ sudo dnf install powertop
```
For **`Debian/Ubuntu`** systems, use **[APT-GET Command][3]** or **[APT Command][4]** to install PowerTOP.
对于 Debian/Ubuntu 系统,使用 [APT-GET 命令][3] 或 [APT 命令][4] 来安装 PowerTOP。
```
$ sudo apt install powertop
```
For **`Arch Linux`** based systems, use **[Pacman Command][5]** to install PowerTOP.
对于基于 Arch Linux 的系统,使用 [Pacman 命令][5] 来安装 PowerTOP。
```
$ sudo pacman -S powertop
```
For **`RHEL/CentOS`** systems, use **[YUM Command][6]** to install PowerTOP.
对于 RHEL/CentOS 系统,使用 [YUM 命令][6] 来安装 PowerTOP。
```
$ sudo yum install powertop
```
For **`openSUSE Leap`** system, use **[Zypper Command][7]** to install PowerTOP.
对于 openSUSE Leap 系统,使用 [Zypper 命令][7] 来安装 PowerTOP。
```
$ sudo zypper install powertop
```
### How To Access PowerTOP
### 如何使用 PowerTOP
PowerTOP requires super user privilege so, run as root to use PowerTOP utility on your Linux system.
PowerTOP 需要超级用户权限,所以在 Linux 系统中以 root 身份运行 PowerTOP 工具。
By default it shows `Overview` tab where we can see the power usage consumption for all the devices. Also shows your system wakeups seconds.
默认情况下其显示 “概览” 页,在这里我们可以看到所有设备的电量消耗情况,也可以看到系统的唤醒秒数。
```
$ sudo powertop
@ -132,11 +124,11 @@ Summary: 1692.9 wakeups/second, 0.0 GPU ops/seconds, 0.0 VFS ops/sec and 54.9%
Exit | / Navigate |
```
The powertop output looks similar to the above screenshot, it will be slightly different based on your hardware. This have many screen you can switch between screen the using `Tab` and `Shift+Tab` button.
PowerTOP 的输出类似如上截屏,在你的机器上由于硬件不同会稍有不同。它的显示有很多页,你可以使用 `Tab``Shift+Tab` 在它们之间切换。
### Idle Stats Tab
### 空闲状态页
It displays various information about the processor.
它会显示处理器的各种信息。
```
PowerTOP v2.9 Overview Idle stats Frequency stats Device stats Tunables
@ -194,9 +186,9 @@ C10 (pc10) 0.0% | | C10 39.5% 4.7 ms 41.4%
Exit | / Navigate |
```
### Frequency Stats Tab
### 频率状态页
It displays the frequency of CPU.
它会显示 CPU 的主频。
```
PowerTOP v2.9 Overview Idle stats Frequency stats Device stats Tunables
@ -220,9 +212,9 @@ Idle | Idle | Idle
```
### Device Stats Tab
### 设备状态页
It displays power usage information against only devices.
它仅针对设备显示其电量使用信息。
```
PowerTOP v2.9 Overview Idle stats Frequency stats Device stats Tunables
@ -277,12 +269,12 @@ The power consumed was 280 J
0.0% runtime-coretemp.0
0.0% runtime-alarmtimer
Exit | / Navigate |
Exit | / Navigate |
```
### Tunables Stats Tab
### 可调整状态页
This tab is important area that provides suggestions to optimize your laptop battery.
这个页面是个重要区域,可以为你的笔记本电池优化提供建议。
```
PowerTOP v2.9 Overview Idle stats Frequency stats Device stats Tunables
@ -340,9 +332,9 @@ PowerTOP v2.9 Overview Idle stats Frequency stats Device stats Tunab
Exit | Toggle tunable | Window refresh
```
### How To Generate PowerTop HTML Report
### 如何生成 PowerTop 的 HTML 报告
Run the following command to generate the PowerTop HTML report.
运行如下命令生成 PowerTop 的 HTML 报告。
```
$ sudo powertop --html=powertop.html
@ -363,12 +355,13 @@ Taking 1 measurement(s) for a duration of 20 second(s) each.
PowerTOP outputing using base filename powertop.html
```
Navigate to `file:///home/daygeek/powertop.html` file to access the generated PowerTOP HTML report.
打开 `file:///home/daygeek/powertop.html` 文件以访问生成的 PowerTOP 的 HTML 报告。
![][9]
### Auto-Tune mode
### 自动调整模式
This feature sets all tunable options from `BAD` to `GOOD` which increase the laptop battery life in Linux.
这个功能可以将所有可调整选项从 BAD 设置为 GOOD这可以提升 Linux 中的笔记本电池寿命。
```
$ sudo powertop --auto-tune
@ -393,8 +386,8 @@ via: https://www.2daygeek.com/powertop-monitors-laptop-battery-usage-linux/
作者:[Vinoth Kumar][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
译者:[wxy](https://github.com/wxy)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -1,47 +1,48 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-10561-1.html)
[#]: subject: (Get started with LogicalDOC, an open source document management system)
[#]: via: (https://opensource.com/article/19/1/productivity-tool-logicaldoc)
[#]: author: (Kevin Sonney https://opensource.com/users/ksonney)
开始使用 LogicalDOC一个开源文档管理系统
开始使用 LogicalDOC,一个开源文档管理系统
======
使用 LogicalDOC 更好地跟踪文档版本,这是我们开源工具系列中的第 12 个工具,它将使你在 2019 年更高效。
> 使用 LogicalDOC 更好地跟踪文档版本,这是我们开源工具系列中的第 12 个工具,它将使你在 2019 年更高效。
![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/document_free_access_cut_security.png?itok=ocvCv8G2)
每年年初似乎都有疯狂的冲动,想方设法提高工作效率。新年的决议,开始一年的权利,当然,“与旧的,与新的”的态度都有助于实现这一目标。通常的一轮建议严重偏向封闭源和专有软件。它不一定是这样。
每年年初似乎都有疯狂的冲动想提高工作效率。新年的决心,渴望开启新的一年,当然,“抛弃旧的,拥抱新的”的态度促成了这一切。通常这时的建议严重偏向闭源和专有软件,但事实上并不用这样。
这是我挑选出的 19 个新的(或者对你而言新的)开源工具中的第 12 个工具来帮助你在 2019 年更有效率。
### LogicalDOC
高效的一部分是能够在你需要时找到你需要的东西。我们都看到过充满类似名称文件的目录, 这是每次更改文档时为跟踪所有版本而重命名这些文件的结果。例如,我的妻子是一名作家,她在将文档发送给审稿人之前,她经常使用新名称保存文档修订版。
高效部分表现在能够在你需要时找到你所需的东西。我们都看到过塞满名称类似的文件的目录,这是每次更改文档时为了跟踪所有版本而重命名这些文件而导致的。例如,我的妻子是一名作家,她在将文档发送给审稿人之前,她经常使用新名称保存文档修订版。
![](https://opensource.com/sites/default/files/uploads/logicaldoc-1.png)
程序员对此一个自然的解决方案是 Git 或者其他版本控制器,这个不适用于文档作者,因为用于代码的系统通常不能很好地兼容商业文本编辑器使用的格式。之前有人说,“只是更改格式”,[这不是每个人的选择][1]。同样,许多版本控制工具对于非技术人员来说并不是非常友好。在大型组织中,有一些工具可以解决此问题,但它们还需要大型组织的资源来运行、管理和支持它们。
程序员对此一个自然的解决方案是 Git 或者其他版本控制器,这个不适用于文档作者,因为用于代码的系统通常不能很好地兼容商业文本编辑器使用的格式。之前有人说,“改格式就行”,[这不是适合每个人的选择][1]。同样,许多版本控制工具对于非技术人员来说并不是非常友好。在大型组织中,有一些工具可以解决此问题,但它们还需要大型组织的资源来运行、管理和支持它们。
![](https://opensource.com/sites/default/files/uploads/logicaldoc-2.png)
[LogicalDOC CE][2] 是为解决此问题而编写的开源文档管理系统。它允许用户签入、签出、查看版本、搜索和锁定文档,并保留版本历史记录,类似于程序员使用的版本控制工具。
LogicalDOC 可在 Linux、MacOS 和 Windows 上[安装][3],使用基于 Java 的安装程序。在安装中,系统将提示你提供数据库存储文职,并提供仅限本地文件存储的选项。你将获得访问服务器的 URL 和默认用户名和密码,以及保存用于自动安装脚本选项。
LogicalDOC 可在 Linux、MacOS 和 Windows 上[安装][3],使用基于 Java 的安装程序。在安装时,系统将提示你提供数据库存储位置,并提供只在本地文件存储的选项。你将获得访问服务器的 URL 和默认用户名和密码,以及保存用于自动安装脚本选项。
登录后LogicalDOC 的默认页面会列出你已标记、签出的文档以及有关它们的最新说明。切换到“文档”选项卡将显示你有权访问的文件。你可以在界面中选择文件或使用拖放来上传文档。如果你上传 ZIP 文件LogicalDOC 会解压它,并将其中的文件添加到仓库中。
![](https://opensource.com/sites/default/files/uploads/logicaldoc-3.png)
右键单击文件将显示一个菜单选项,包括检出文件、锁定文件以防止更改,以及执行大量其他操作。签出文件会将其下载到用于编辑的本地计算机。在重新签入之前,其他任何人都无法修改签出文件。当重新签入文件时(使用相同的菜单),用户可以向版本添加标签,并且需要评论对其执行的操作。
右键单击文件将显示一个菜单选项,包括检出文件、锁定文件以防止更改,以及执行大量其他操作。签出文件会将其下载到本地计算机以便编辑。在重新签入之前,其他任何人都无法修改签出文件。当重新签入文件时(使用相同的菜单),用户可以向版本添加标签,并且需要备注对其执行的操作。
![](https://opensource.com/sites/default/files/uploads/logicaldoc-4.png)
查看早期版本只需在“版本”页面下载就行。对于某些第三方服务,它还有导入和导出选项,内置 [Dropbox][4] 支持。
文档管理不仅仅是能够负担得起昂贵解决方案的大公司。LogicalDOC 可帮助你追踪文档的版本历史,并为难以管理的文档提供了安全的仓库。
文档管理不仅仅是能够负担得起昂贵解决方案的大公司才能有的。LogicalDOC 可帮助你追踪文档的版本历史,并为难以管理的文档提供了安全的仓库。
--------------------------------------------------------------------------------
@ -50,7 +51,7 @@ via: https://opensource.com/article/19/1/productivity-tool-logicaldoc
作者:[Kevin Sonney][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

@ -1,60 +1,70 @@
[#]: collector: (lujun9972)
[#]: translator: (guevaraya)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-10562-1.html)
[#]: subject: (How to List Installed Packages on Ubuntu and Debian [Quick Tip])
[#]: via: (https://itsfoss.com/list-installed-packages-ubuntu)
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
如何索引 Ubuntu 和 Debian 上已安装的软件包 [快速提示]
如何列出 Ubuntu 和 Debian 上已安装的软件包
======
当你安装了 [Ubuntu 并想好好用一用][1]。但在将来某个时候,你肯定会遇到忘记曾经安装了那些软件包。
这个是完全正常。没有人要求你把系统里所有已安装的软件包都记住。但是问题是,如何才能知道已经安装了哪些软件包?如何查看安装过的软件包呢?
### 索引 Ubuntu 和 Debian 上已安装的软件包
### 列出 Ubuntu 和 Debian 上已安装的软件包
![索引已安装的软件包][2]
![列出已安装的软件包][2]
如果你经常用 [apt 命令][3],你可能会注意到 apt 可以索引已安装的软件包。这里说对了一点
如果你经常用 [apt 命令][3],你可能觉得会有个命令像 `apt` 一样可以列出已安装的软件包。不算全错
[apt-get 命令][4] 没有类似列出已安装软件包的简单的选项,但是 `apt` 有一个这样的命令:
[apt-get 命令] 没有类似索引已安装软件包的简单的选项,但是 apt 有一个这样的命令:
```
apt list --installed
```
这个会显示 apt 命令安装的所有的软件包。同时也会包含由于依赖被安装的软件包。也就是说不仅会包含你曾经安装的程序,而且会包含大量库文件和间接安装的软件包。
![用 atp 命令索引显示已安装的软件包][5] 用 atp 命令索引显示已安装的软件包
这个会显示使用 `apt` 命令安装的所有的软件包。同时也会包含由于依赖而被安装的软件包。也就是说不仅会包含你曾经安装的程序,而且会包含大量库文件和间接安装的软件包。
![用 atp 命令列出显示已安装的软件包][5]
*用 atp 命令列出显示已安装的软件包*
由于列出出来的已安装的软件包太多,用 `grep` 过滤特定的软件包是一个比较好的办法。
由于索引出来的已安装的软件包太多,用 grep 过滤特定的软件包是一个比较好的办法。
```
apt list --installed | grep program_name
```
如上命令也可以检索出 .deb 格式的软件包文件。是不是很酷?不是吗?
如上命令也可以检索出使用 .deb 软件包文件安装的软件。是不是很酷?
如果你阅读过 [apt 与 apt-get 对比][7]的文章,你可能已经知道 apt 和 apt-get 命令都是基于 [dpkg][8]。也就是说用 dpkg 命令可以索引 Debian 系统的所有已经安装的软件包。
如果你阅读过 [apt 与 apt-get 对比][7]的文章,你可能已经知道 `apt``apt-get` 命令都是基于 [dpkg][8]。也就是说用 `dpkg` 命令可以列出 Debian 系统的所有已经安装的软件包。
```
dpkg-query -l
```
你可以用 grep 命令检索指定的软件包。
![用 dpkg 命令索引显示已经安装的软件包][9]![用 dpkg 命令索引显示已经安装的软件包][9]用 dpkg 命令索引显示已经安装的软件包
你可以用 `grep` 命令检索指定的软件包。
![用 dpkg 命令列出显示已经安装的软件包][9]!
现在你可以搞定索引 Debian 的软件包管理器安装的应用了。那 Snap 和 Flatpak 这个两种应用呢?如何索引他们?因为他们不能被 apt 和 dpkg 访问。
*用 dpkg 命令列出显示已经安装的软件包*
现在你可以搞定列出 Debian 的软件包管理器安装的应用了。那 Snap 和 Flatpak 这个两种应用呢?如何列出它们?因为它们不能被 `apt``dpkg` 访问。
显示系统里所有已经安装的 [Snap 软件包][10],可以这个命令:
```
snap list
```
Snap 可以用绿色勾号索引显示经过认证的发布者。
![索引已经安装的 Snap 软件包][11]索引已经安装的 Snap 软件包
Snap 可以用绿色勾号标出哪个应用来自经过认证的发布者。
![列出已经安装的 Snap 软件包][11]
*列出已经安装的 Snap 软件包*
显示系统里所有已安装的 [Flatpak 软件包][12],可以用这个命令:
@ -65,37 +75,45 @@ flatpak list
让我来个汇总:
apt 命令显示已安装软件包:
`apt` 命令显示已安装软件包:
**apt** **list installed**
```
apt list installed
```
用 dpkg 命令显示已安装软件包:
`dpkg` 命令显示已安装软件包:
**dpkg-query -l**
```
dpkg-query -l
```
索引系统里 Snap 已安装软件包:
列出系统里 Snap 已安装软件包:
**snap list**
```
snap list
```
索引系统里 Flatpak 已安装软件包:
列出系统里 Flatpak 已安装软件包:
**flatpak list**
```
flatpak list
```
### 显示最近安装的软件包
现在你已经看过以字母顺序索引的已经安装软件包了。如何显示最近已经安装的软件包?
现在你已经看过以字母顺序列出的已经安装软件包了。如何显示最近已经安装的软件包?
幸运的是Linux 系统保存了所有发生事件的日志。你可以参考最近安装软件包的日志。
有两个方法可以来做。用 dpkg 命令的日志或者 apt 命令的日志。
有两个方法可以来做。用 `dpkg` 命令的日志或者 `apt` 命令的日志。
你仅仅需要用 grep 命令过滤已经安装的软件包日志。
你仅仅需要用 `grep` 命令过滤已经安装的软件包日志。
```
grep " install " /var/log/dpkg.log
```
这会显示所有的软件安装包,其中包括最近安装的过程中依赖的软件包。
这会显示所有的软件安装包,其中包括最近安装的过程中依赖的软件包。
```
2019-02-12 12:41:42 install ubuntu-make:all 16.11.1ubuntu1
@ -108,13 +126,13 @@ grep " install " /var/log/dpkg.log
2019-02-14 11:49:10 install qml-module-qtgraphicaleffects:amd64 5.9.5-0ubuntu1
```
你也可以查看 apt历史命令日志。这个仅会显示用 apt 命令安装的的程序。但不会显示被依赖安装的软件包,详细的日志在日志里可以看到。有时你只是想看看对吧?
你也可以查看 `apt` 历史命令日志。这个仅会显示用 `apt` 命令安装的的程序。但不会显示被依赖安装的软件包,详细的日志在日志里可以看到。有时你只是想看看对吧?
```
grep " install " /var/log/apt/history.log
```
具体的显示如下:
具体的显示如下
```
Commandline: apt install pinta
@ -128,28 +146,30 @@ Commandline: apt install cool-retro-term
Commandline: apt install ubuntu-software
```
![显示最近已安装的软件包][13]显示最近已安装的软件包
![显示最近已安装的软件包][13]
apt 的历史日志非常有用。因为他显示了什么时候执行了 apt 命令,哪个用户执行的命令以及安装的软件包名
*显示最近已安装的软件包*
### 小贴士: 在软件中心显示已安装的程序包名
`apt` 的历史日志非常有用。因为他显示了什么时候执行了 `apt` 命令,哪个用户执行的命令以及安装的软件包名。
如果你觉得终端和命令行交互不友好,可以有一个方法查看系统的程序名。
### 小技巧:在软件中心显示已安装的程序包名
如果你觉得终端和命令行交互不友好,还有一个方法可以查看系统的程序名。
可以打开软件中心,然后点击已安装标签。你可以看到系统上已经安装的程序包名
![Ubuntu 软件中心显示已安装的软件包][14] 在软件中心显示已安装的软件包
![Ubuntu 软件中心显示已安装的软件包][14]
这个不会显示库和其他命令行的东西,有可能你也不想看到他们,因为你是大量交互都是在 GUI相反你可以一直用 Synaptic 软件包管理器。
*在软件中心显示已安装的软件包*
**结束语**
这个不会显示库和其他命令行的东西,有可能你也不想看到它们,因为你的大量交互都是在 GUI。此外你也可以用 Synaptic 软件包管理器。
我希望这个简易的教程可以帮你查看 Ubuntu 和 基于 Debian 的发行版的已安装软件包。
### 结束语
我希望这个简易的教程可以帮你查看 Ubuntu 和基于 Debian 的发行版的已安装软件包。
如果你对本文有什么问题或建议,请在下面留言。
--------------------------------------------------------------------------------
via: https://itsfoss.com/list-installed-packages-ubuntu
@ -157,7 +177,7 @@ via: https://itsfoss.com/list-installed-packages-ubuntu
作者:[Abhishek Prakash][a]
选题:[lujun9972][b]
译者:[guevaraya](https://github.com/guevaraya)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -1,160 +0,0 @@
tomjlw is translating
Annoying Experiences Every Linux Gamer Never Wanted!
============================================================
[![Linux gamer's problem](https://itsfoss.com/wp-content/uploads/2016/09/Linux-Gaming-Problems.jpg)][10]
[Gaming on Linux][12] has come a long way. There are dedicated [Linux gaming distributions][13] now. But this doesnt mean that gaming experience on Linux is as smooth as on Windows.
What are the obstacles that should be thought about to ensure that we enjoy games as much as Windows users do?
[Wine][14], [PlayOnLinux][15] and other similar tools are not always able to play every popular Windows game. In this article, I would like to discuss various factors that must be dealt with in order to have the best possible Linux gaming experience.
### #1 SteamOS is Open Source, Steam for Linux is NOT
As stated on the [SteamOS page][16], even though SteamOS is open source, Steam for Linux continues to be proprietary. Had it also been open source, the amount of support from the open source community would have been tremendous! Since it is not, [the birth of Project Ascension was inevitable][17]:
[video](https://youtu.be/07UiS5iAknA)
Project Ascension is an open source game launcher designed to launch games that have been bought and downloaded from anywhere they can be Steam games, [Origin games][18], Uplay games, games downloaded directly from game developer websites or from DVD/CD-ROMs.
Here is how it all began: [Sharing The Idea][19] resulted in a very interesting discussion with readers all over from the gaming community pitching in their own opinions and suggestions.
### #2 Performance compared to Windows
Getting Windows games to run on Linux is not always an easy task. But thanks to a feature called [CSMT][20] (command stream multi-threading), PlayOnLinux is now better equipped to deal with these performance issues, though its still a long way to achieve Windows level outcomes.
Native Linux support for games has not been so good for past releases.
Last year, it was reported that SteamOS performed [significantly worse][21] than Windows. Tomb Raider was released on SteamOS/Steam for Linux last year. However, benchmark results were [not at par][22] with performance on Windows.
[video](https://youtu.be/nkWUBRacBNE)
This was much obviously due to the fact that the game had been developed with [DirectX][23] in mind and not [OpenGL][24].
Tomb Raider is the [first Linux game that uses TressFX][25]. This video includes TressFX comparisons:
[video](https://youtu.be/-IeY5ZS-LlA)
Here is another interesting comparison which shows Wine+CSMT performing much better than the native Linux version itself on Steam! This is the power of Open Source!
[Suggested readA New Linux OS "OSu" Vying To Be Ubuntu Of Arch Linux World][26]
[video](https://youtu.be/sCJkC6oJ08A)
TressFX has been turned off in this case to avoid FPS loss.
Here is another Linux vs Windows comparison for the recently released “[Life is Strange][27]” on Linux:
[video](https://youtu.be/Vlflu-pIgIY)
Its good to know that  [_Steam for Linux_][28]  has begun to show better improvements in performance for this new Linux game.
Before launching any game for Linux, developers should consider optimizing them especially if its a DirectX game and requires OpenGL translation. We really do hope that [Deus Ex: Mankind Divided on Linux][29] gets benchmarked well, upon release. As its a DirectX game, we hope its being ported well for Linux. Heres [what the Executive Game Director had to say][30].
### #3 Proprietary NVIDIA Drivers
[AMDs support for Open Source][31] is definitely commendable when compared to [NVIDIA][32]. Though [AMD][33] driver support is [pretty good on Linux][34] now due to its better open source driver, NVIDIA graphic card owners will still have to use the proprietary NVIDIA drivers because of the limited capabilities of the open-source version of NVIDIAs graphics driver called Nouveau.
In the past, legendary Linus Torvalds has also shared his thoughts about Linux support from NVIDIA to be totally unacceptable:
[video](https://youtu.be/O0r6Pr_mdio)
You can watch the complete talk [here][35]. Although NVIDIA responded with [a commitment for better linux support][36], the open source graphics driver still continues to be weak as before.
### #4 Need for Uplay and Origin DRM support on Linux
[video](https://youtu.be/rc96NFwyxWU)
The above video describes how to install the [Uplay][37] DRM on Linux. The uploader also suggests that the use of wine as the main tool of games and applications is not recommended on Linux. Rather, preference to native applications should be encouraged instead.
The following video is a guide about installing the [Origin][38] DRM on Linux:
[video](https://youtu.be/ga2lNM72-Kw)
Digital Rights Management Software adds another layer for game execution and hence it adds up to the already challenging task to make a Windows game run well on Linux. So in addition to making the game execute, W.I.N.E has to take care of running the DRM software such as Uplay or Origin as well. It would have been great if, like Steam, Linux could have got its own native versions of Uplay and Origin.
[Suggested readLinux Foundation Head Calls 2017 'Year of the Linux Desktop'... While Running Apple's macOS Himself][39]
### #5 DirectX 11 support for Linux
Even though we have tools on Linux to run Windows applications, every game comes with its own set of tweak requirements for it to be playable on Linux. Though there was an announcement about [DirectX 11 support for Linux][40] last year via Code Weavers, its still a long way to go to make playing newly launched titles on Linux a possibility. Currently, you can
Currently, you can [buy Crossover from Codeweavers][41] to get the best DirectX 11 support available. This [thread][42] on the Arch Linux forums clearly shows how much more effort is required to make this dream a possibility. Here is an interesting [find][43] from a [Reddit thread][44], which mentions Wine getting [DirectX 11 patches from Codeweavers][45]. Now thats definitely some good news.
### #6 100% of Steam games are not available for Linux
This is an important point to ponder as Linux gamers continue to miss out on every major game release since most of them land up on Windows. Here is a guide to [install Steam for Windows on Linux][46].
### #7 Better Support from video game publishers for OpenGL
Currently, developers and publishers focus primarily on DirectX for video game development rather than OpenGL. Now as Steam is officially here for Linux, developers should start considering development in OpenGL as well.
[Direct3D][47] is made solely for the Windows platform. The OpenGL API is an open standard, and implementations exist for not only Windows but a wide variety of other platforms.
Though quite an old article, [this valuable resource][48] shares a lot of thoughtful information on the realities of OpenGL and DirectX. The points made are truly very sensible and enlightens the reader about the facts based on actual chronological events.
Publishers who are launching their titles on Linux should definitely not leave out the fact that developing the game on OpenGL would be a much better deal than translating it from DirectX to OpenGL. If conversion has to be done, the translations must be well optimized and carefully looked into. There might be a delay in releasing the games but still it would definitely be worth the wait.
Have more annoyances to share? Do let us know in the comments.
--------------------------------------------------------------------------------
via: https://itsfoss.com/linux-gaming-problems/
作者:[Avimanyu Bandyopadhyay ][a]
译者:[tomjlw](https://github.com/tomjlw
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:https://itsfoss.com/author/avimanyu/
[1]:https://itsfoss.com/author/avimanyu/
[2]:https://itsfoss.com/linux-gaming-problems/#comments
[3]:https://www.facebook.com/share.php?u=https%3A%2F%2Fitsfoss.com%2Flinux-gaming-problems%2F%3Futm_source%3Dfacebook%26utm_medium%3Dsocial%26utm_campaign%3DSocialWarfare
[4]:https://twitter.com/share?original_referer=/&text=Annoying+Experiences+Every+Linux+Gamer+Never+Wanted%21&url=https://itsfoss.com/linux-gaming-problems/%3Futm_source%3Dtwitter%26utm_medium%3Dsocial%26utm_campaign%3DSocialWarfare&via=itsfoss2
[5]:https://plus.google.com/share?url=https%3A%2F%2Fitsfoss.com%2Flinux-gaming-problems%2F%3Futm_source%3DgooglePlus%26utm_medium%3Dsocial%26utm_campaign%3DSocialWarfare
[6]:https://www.linkedin.com/cws/share?url=https%3A%2F%2Fitsfoss.com%2Flinux-gaming-problems%2F%3Futm_source%3DlinkedIn%26utm_medium%3Dsocial%26utm_campaign%3DSocialWarfare
[7]:http://www.stumbleupon.com/submit?url=https://itsfoss.com/linux-gaming-problems/&title=Annoying+Experiences+Every+Linux+Gamer+Never+Wanted%21
[8]:https://www.reddit.com/submit?url=https://itsfoss.com/linux-gaming-problems/&title=Annoying+Experiences+Every+Linux+Gamer+Never+Wanted%21
[9]:https://itsfoss.com/wp-content/uploads/2016/09/Linux-Gaming-Problems.jpg
[10]:https://itsfoss.com/wp-content/uploads/2016/09/Linux-Gaming-Problems.jpg
[11]:http://pinterest.com/pin/create/bookmarklet/?media=https://itsfoss.com/wp-content/uploads/2016/09/Linux-Gaming-Problems.jpg&url=https://itsfoss.com/linux-gaming-problems/&is_video=false&description=Linux%20gamer%27s%20problem
[12]:https://itsfoss.com/linux-gaming-guide/
[13]:https://itsfoss.com/linux-gaming-distributions/
[14]:https://itsfoss.com/use-windows-applications-linux/
[15]:https://www.playonlinux.com/en/
[16]:http://store.steampowered.com/steamos/
[17]:http://www.ibtimes.co.uk/reddit-users-want-replace-steam-open-source-game-launcher-project-ascension-1498999
[18]:https://www.origin.com/
[19]:https://www.reddit.com/r/pcmasterrace/comments/33xcvm/we_hate_valves_monopoly_over_pc_gaming_why/
[20]:https://github.com/wine-compholio/wine-staging/wiki/CSMT
[21]:http://arstechnica.com/gaming/2015/11/ars-benchmarks-show-significant-performance-hit-for-steamos-gaming/
[22]:https://www.gamingonlinux.com/articles/tomb-raider-benchmark-video-comparison-linux-vs-windows-10.7138
[23]:https://en.wikipedia.org/wiki/DirectX
[24]:https://en.wikipedia.org/wiki/OpenGL
[25]:https://www.gamingonlinux.com/articles/tomb-raider-released-for-linux-video-thoughts-port-report-included-the-first-linux-game-to-use-tresfx.7124
[26]:https://itsfoss.com/osu-new-linux/
[27]:http://lifeisstrange.com/
[28]:https://itsfoss.com/install-steam-ubuntu-linux/
[29]:https://itsfoss.com/deus-ex-mankind-divided-linux/
[30]:http://wccftech.com/deus-ex-mankind-divided-director-console-ports-on-pc-is-disrespectful/
[31]:http://developer.amd.com/tools-and-sdks/open-source/
[32]:http://nvidia.com/
[33]:http://amd.com/
[34]:http://www.makeuseof.com/tag/open-source-amd-graphics-now-awesome-heres-get/
[35]:https://youtu.be/MShbP3OpASA
[36]:https://itsfoss.com/nvidia-optimus-support-linux/
[37]:http://uplay.com/
[38]:http://origin.com/
[39]:https://itsfoss.com/linux-foundation-head-uses-macos/
[40]:http://www.pcworld.com/article/2940470/hey-gamers-directx-11-is-coming-to-linux-thanks-to-codeweavers-and-wine.html
[41]:https://itsfoss.com/deal-run-windows-software-and-games-on-linux-with-crossover-15-66-off/
[42]:https://bbs.archlinux.org/viewtopic.php?id=214771
[43]:https://ghostbin.com/paste/sy3e2
[44]:https://www.reddit.com/r/linux_gaming/comments/3ap3uu/directx_11_support_coming_to_codeweavers/
[45]:https://www.codeweavers.com/about/blogs/caron/2015/12/10/directx-11-really-james-didnt-lie
[46]:https://itsfoss.com/linux-gaming-guide/
[47]:https://en.wikipedia.org/wiki/Direct3D
[48]:http://blog.wolfire.com/2010/01/Why-you-should-use-OpenGL-and-not-DirectX

View File

@ -1,3 +1,4 @@
tomjlw is translating
3 open source tools for scientific publishing
======
@ -51,7 +52,7 @@ We are always on the lookout for opportunities to engage with the best emerging
via: https://opensource.com/article/18/3/scientific-publishing-software
作者:[Paul Shanno][a]
译者:[译者ID](https://github.com/译者ID)
译者:[tomjlw](https://github.com/tomjlw)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -0,0 +1,514 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Linux Desktop Setup · HookRace Blog)
[#]: via: (https://hookrace.net/blog/linux-desktop-setup/)
[#]: author: (Dennis Felsing http://felsin9.de/nnis/)
Linux Desktop Setup
======
My software setup has been surprisingly constant over the last decade, after a few years of experimentation since I initially switched to Linux in 2006. It might be interesting to look back in another 10 years and see what changed. A quick overview of whats running as Im writing this post:
[![htop overview][1]][2]
### Motivation
My software priorities are, in no specific order:
* Programs should run on my local system so that Im in control of them, this excludes cloud solutions.
* Programs should run in the terminal, so that they can be used consistently from anywhere, including weak computers or a phone.
* Keyboard focused is nearly automatic by using terminal software. I prefer to use the mouse where it makes sense only, reaching for the mouse all the time during typing feels like a waste of time. Occasionally it took me an hour to notice that the mouse wasnt even plugged in.
* Ideally use fast and efficient software, I dont like hearing the fan and feeling the room heat up. I can also keep running older hardware for much longer, my 10 year old Thinkpad x200s is still fine for all the software I use.
* Be composable. I dont want to do every step manually, instead automate more when it makes sense. This naturally favors the shell.
### Operating Systems
I had a hard start with Linux 12 years ago by removing Windows, armed with just the [Gentoo Linux][3] installation CD and a printed manual to get a functioning Linux system. It took me a few days of compiling and tinkering, but in the end I felt like I had learnt a lot.
I havent looked back to Windows since then, but I switched to [Arch Linux][4] on my laptop after having the fan fail from the constant compilation stress. Later I also switched all my other computers and private servers to Arch Linux. As a rolling release distribution you get package upgrades all the time, but the most important breakages are nicely reported in the [Arch Linux News][5].
One annoyance though is that Arch Linux removes the old kernel modules once you upgrade it. I usually notice that once I try plugging in a USB flash drive and the kernel fails to load the relevant module. Instead youre supposed to reboot after each kernel upgrade. There are a few [hacks][6] around to get around the problem, but I havent been bothered enough to actually use them.
Similar problems happen with other programs, commonly Firefox, cron or Samba requiring a restart after an upgrade, but annoyingly not warning you that thats the case. [SUSE][7], which I use at work, nicely warns about such cases.
For the [DDNet][8] production servers I prefer [Debian][9] over Arch Linux, so that I have a lower chance of breakage on each upgrade. For my firewall and router I used [OpenBSD][10] for its clean system, documentation and great [pf firewall][11], but right now I dont have a need for a separate router anymore.
### Window Manager
Since I started out with Gentoo I quickly noticed the huge compile time of KDE, which made it a no-go for me. I looked around for more minimal solutions, and used [Openbox][12] and [Fluxbox][13] initially. At some point I jumped on the tiling window manager train in order to be more keyboard-focused and picked up [dwm][14] and [awesome][15] close to their initial releases.
In the end I settled on [xmonad][16] thanks to its flexibility, extendability and being written and configured in pure [Haskell][17], a great functional programming language. One example of this is that at home I run a single 40” 4K screen, but often split it up into four virtual screens, each displaying a workspace on which my windows are automatically arranged. Of course xmonad has a [module][18] for that.
[dzen][19] and [conky][20] function as a simple enough status bar for me. My entire conky config looks like this:
```
out_to_console yes
update_interval 1
total_run_times 0
TEXT
${downspeed eth0} ${upspeed eth0} | $cpu% ${loadavg 1} ${loadavg 2} ${loadavg 3} $mem/$memmax | ${time %F %T}
```
And gets piped straight into dzen2 with `conky | dzen2 -fn '-xos4-terminus-medium-r-normal-*-12-*-*-*-*-*-*-*' -bg '#000000' -fg '#ffffff' -p -e '' -x 1000 -w 920 -xs 1 -ta r`.
One important feature for me is to make the terminal emit a beep sound once a job is done. This is done simply by adding a `\a` character to the `PR_TITLEBAR` variable in zsh, which is shown whenever a job is done. Of course I disable the actual beep sound by blacklisting the `pcspkr` kernel module with `echo "blacklist pcspkr" > /etc/modprobe.d/nobeep.conf`. Instead the sound gets turned into an urgency by urxvts `URxvt.urgentOnBell: true` setting. Then xmonad has an urgency hook to capture this and I can automatically focus the currently urgent window with a key combination. In dzen I get the urgent windowspaces displayed with a nice and bright `#ff0000`.
The final result in all its glory on my Laptop:
[![Laptop screenshot][21]][22]
I hear that [i3][23] has become quite popular in the last years, but it requires more manual window alignment instead of specifying automated methods to do it.
I realize that there are also terminal multiplexers like [tmux][24], but I still require a few graphical applications, so in the end I never used them productively.
### Terminal Persistency
In order to keep terminals alive I use [dtach][25], which is just the detach feature of screen. In order to make every terminal on my computer detachable I wrote a [small wrapper script][26]. This means that even if I had to restart my X server I could keep all my terminals running just fine, both local and remote.
### Shell & Programming
Instead of [bash][27] I use [zsh][28] as my shell for its huge number of features.
As a terminal emulator I found [urxvt][29] to be simple enough, support Unicode and 256 colors and has great performance. Another great feature is being able to run the urxvt client and daemon separately, so that even a large number of terminals barely takes up any memory (except for the scrollback buffer).
There is only one font that looks absolutely clean and perfect to me: [Terminus][30]. Since is a bitmap font everything is pixel perfect and renders extremely fast and at low CPU usage. In order to switch fonts on-demand in each terminal with `CTRL-WIN-[1-7]` my ~/.Xdefaults contains:
```
URxvt.font: -xos4-terminus-medium-r-normal-*-14-*-*-*-*-*-*-*
dzen2.font: -xos4-terminus-medium-r-normal-*-14-*-*-*-*-*-*-*
URxvt.keysym.C-M-1: command:\033]50;-xos4-terminus-medium-r-normal-*-12-*-*-*-*-*-*-*\007
URxvt.keysym.C-M-2: command:\033]50;-xos4-terminus-medium-r-normal-*-14-*-*-*-*-*-*-*\007
URxvt.keysym.C-M-3: command:\033]50;-xos4-terminus-medium-r-normal-*-18-*-*-*-*-*-*-*\007
URxvt.keysym.C-M-4: command:\033]50;-xos4-terminus-medium-r-normal-*-22-*-*-*-*-*-*-*\007
URxvt.keysym.C-M-5: command:\033]50;-xos4-terminus-medium-r-normal-*-24-*-*-*-*-*-*-*\007
URxvt.keysym.C-M-6: command:\033]50;-xos4-terminus-medium-r-normal-*-28-*-*-*-*-*-*-*\007
URxvt.keysym.C-M-7: command:\033]50;-xos4-terminus-medium-r-normal-*-32-*-*-*-*-*-*-*\007
URxvt.keysym.C-M-n: command:\033]10;#ffffff\007\033]11;#000000\007\033]12;#ffffff\007\033]706;#00ffff\007\033]707;#ffff00\007
URxvt.keysym.C-M-b: command:\033]10;#000000\007\033]11;#ffffff\007\033]12;#000000\007\033]706;#0000ff\007\033]707;#ff0000\007
```
For programming and writing I use [Vim][31] with syntax highlighting and [ctags][32] for indexing, as well as a few terminal windows with grep, sed and the other usual suspects for search and manipulation. This is probably not at the same level of comfort as an IDE, but allows me more automation.
One problem with Vim is that you get so used to its key mappings that youll want to use them everywhere.
[Python][33] and [Nim][34] do well as scripting languages where the shell is not powerful enough.
### System Monitoring
[htop][35] (look at the background of that site, its a live view of the server thats hosting it) works great for getting a quick overview of what the software is currently doing. [lm_sensors][36] allows monitoring the hardware temperatures, fans and voltages. [powertop][37] is a great little tool by Intel to find power savings. [ncdu][38] lets you analyze disk usage interactively.
[nmap][39], iptraf-ng, [tcpdump][40] and [Wireshark][41] are essential tools for analyzing network problems.
There are of course many more great tools.
### Mails & Synchronization
On my home server I have a [fetchmail][42] daemon running for each email acccount that I have. Fetchmail just retrieves the incoming emails and invokes [procmail][43]:
```
#!/bin/sh
for i in /home/deen/.fetchmail/*; do
FETCHMAILHOME=$i /usr/bin/fetchmail -m 'procmail -d %T' -d 60
done
```
The configuration is as simple as it could be and waits for the server to inform us of fresh emails:
```
poll imap.1und1.de protocol imap timeout 120 user "dennis@felsin9.de" password "XXX" folders INBOX keep ssl idle
```
My `.procmailrc` config contains a few rules to backup all mails and sort them into the correct directories, for example based on the mailing list id or from field in the mail header:
```
MAILDIR=/home/deen/shared/Maildir
LOGFILE=$HOME/.procmaillog
LOGABSTRACT=no
VERBOSE=off
FORMAIL=/usr/bin/formail
NL="
"
:0wc
* ! ? test -d /media/mailarchive/`date +%Y`
| mkdir -p /media/mailarchive/`date +%Y`
# Make backups of all mail received in format YYYY/YYYY-MM
:0c
/media/mailarchive/`date +%Y`/`date +%Y-%m`
:0
* ^From: .*(.*@.*.kit.edu|.*@.*.uka.de|.*@.*.uni-karlsruhe.de)
$MAILDIR/.uni/
:0
* ^list-Id:.*lists.kit.edu
$MAILDIR/.uni-ml/
[...]
```
To send emails I use [msmtp][44], which is also great to configure:
```
account default
host smtp.1und1.de
tls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
auth on
from dennis@felsin9.de
user dennis@felsin9.de
password XXX
[...]
```
But so far the emails are still on the server. My documents are all stored in a directory that I synchronize between all computers using [Unison][45]. Think of Unison as a bidirectional interactive [rsync][46]. My emails are part of this documents directory and thus they end up on my desktop computers.
This also means that while the emails reach my server immediately, I only fetch them on deman instead of getting instant notifications when an email comes in.
From there I read the mails with [mutt][47], using the sidebar plugin to display my mail directories. The `/etc/mailcap` file is essential to display non-plaintext mails containing HTML, Word or PDF:
```
text/html;w3m -I %{charset} -T text/html; copiousoutput
application/msword; antiword %s; copiousoutput
application/pdf; pdftotext -layout /dev/stdin -; copiousoutput
```
### News & Communication
[Newsboat][48] is a nice little RSS/Atom feed reader in the terminal. I have it running on the server in a `tach` session with about 150 feeds. Filtering feeds locally is also possible, for example:
```
ignore-article "https://forum.ddnet.tw/feed.php" "title =~ \"Map Testing •\" or title =~ \"Old maps •\" or title =~ \"Map Bugs •\" or title =~ \"Archive •\" or title =~ \"Waiting for mapper •\" or title =~ \"Other mods •\" or title =~ \"Fixes •\""
```
I use [Irssi][49] the same way for communication via IRC.
### Calendar
[remind][50] is a calendar that can be used from the command line. Setting new reminders is done by editing the `rem` files:
```
# One time events
REM 2019-01-20 +90 Flight to China %b
# Recurring Holidays
REM 1 May +90 Holiday "Tag der Arbeit" %b
REM [trigger(easterdate(year(today()))-2)] +90 Holiday "Karfreitag" %b
# Time Change
REM Nov Sunday 1 --7 +90 Time Change (03:00 -> 02:00) %b
REM Apr Sunday 1 --7 +90 Time Change (02:00 -> 03:00) %b
# Birthdays
FSET birthday(x) "'s " + ord(year(trigdate())-x) + " birthday is %b"
REM 16 Apr +90 MSG Andreas[birthday(1994)]
# Sun
SET $LatDeg 49
SET $LatMin 19
SET $LatSec 49
SET $LongDeg -8
SET $LongMin -40
SET $LongSec -24
MSG Sun from [sunrise(trigdate())] to [sunset(trigdate())]
[...]
```
Unfortunately there is no Chinese Lunar calendar function in remind yet, so Chinese holidays cant be calculated easily.
I use two aliases for remind:
```
rem -m -b1 -q -g
```
to see a list of the next events in chronological order and
```
rem -m -b1 -q -cuc12 -w$(($(tput cols)+1)) | sed -e "s/\f//g" | less
```
to show a calendar fitting just the width of my terminal:
![remcal][51]
### Dictionary
[rdictcc][52] is a little known dictionary tool that uses the excellent dictionary files from [dict.cc][53] and turns them into a local database:
```
$ rdictcc rasch
====================[ A => B ]====================
rasch:
- apace
- brisk [speedy]
- cursory
- in a timely manner
- quick
- quickly
- rapid
- rapidly
- sharpish [Br.] [coll.]
- speedily
- speedy
- swift
- swiftly
rasch [gehen]:
- smartly [quickly]
Rasch {n} [Zittergras-Segge]:
- Alpine grass [Carex brizoides]
- quaking grass sedge [Carex brizoides]
Rasch {m} [regional] [Putzrasch]:
- scouring pad
====================[ B => A ]====================
Rasch model:
- Rasch-Modell {n}
```
### Writing and Reading
I have a simple todo file containing my tasks, that is basically always sitting open in a Vim session. For work I also use the todo file as a “done” file so that I can later check what tasks I finished on each day.
For writing documents, letters and presentations I use [LaTeX][54] for its superior typesetting. A simple letter in German format can be set like this for example:
```
\documentclass[paper = a4, fromalign = right]{scrlttr2}
\usepackage{german}
\usepackage{eurosym}
\usepackage[utf8]{inputenc}
\setlength{\parskip}{6pt}
\setlength{\parindent}{0pt}
\setkomavar{fromname}{Dennis Felsing}
\setkomavar{fromaddress}{Meine Str. 1\\69181 Leimen}
\setkomavar{subject}{Titel}
\setkomavar*{enclseparator}{Anlagen}
\makeatletter
\@setplength{refvpos}{89mm}
\makeatother
\begin{document}
\begin{letter} {Herr Soundso\\Deine Str. 2\\69121 Heidelberg}
\opening{Sehr geehrter Herr Soundso,}
Sie haben bei mir seit dem Bla Bla Bla.
Ich fordere Sie hiermit zu Bla Bla Bla auf.
\closing{Mit freundlichen Grüßen}
\end{letter}
\end{document}
```
Further example documents and presentations can be found over at [my private site][55].
To read PDFs [Zathura][56] is fast, has Vim-like controls and even supports two different PDF backends: Poppler and MuPDF. [Evince][57] on the other hand is more full-featured for the cases where I encounter documents that Zathura doesnt like.
### Graphical Editing
[GIMP][58] and [Inkscape][59] are easy choices for photo editing and interactive vector graphics respectively.
In some cases [Imagemagick][60] is good enough though and can be used straight from the command line and thus automated to edit images. Similarly [Graphviz][61] and [TikZ][62] can be used to draw graphs and other diagrams.
### Web Browsing
As a web browser Ive always used [Firefox][63] for its extensibility and low resource usage compared to Chrome.
Unfortunately the [Pentadactyl][64] extension development stopped after Firefox switched to Chrome-style extensions entirely, so I dont have satisfying Vim-like controls in my browser anymore.
### Media Players
[mpv][65] with hardware decoding allows watching videos at 5% CPU load using the `vo=gpu` and `hwdec=vaapi` config settings. `audio-channels=2` in mpv seems to give me clearer downmixing to my stereo speakers / headphones than what PulseAudio does by default. A great little feature is exiting with `Shift-Q` instead of just `Q` to save the playback location. When watching with someone with another native tongue you can use `--secondary-sid=` to show two subtitles at once, the primary at the bottom, the secondary at the top of the screen
My wirelss mouse can easily be made into a remote control with mpv with a small `~/.config/mpv/input.conf`:
```
MOUSE_BTN5 run "mixer" "pcm" "-2"
MOUSE_BTN6 run "mixer" "pcm" "+2"
MOUSE_BTN1 cycle sub-visibility
MOUSE_BTN7 add chapter -1
MOUSE_BTN8 add chapter 1
```
[youtube-dl][66] works great for watching videos hosted online, best quality can be achieved with `-f bestvideo+bestaudio/best --all-subs --embed-subs`.
As a music player [MOC][67] hasnt been actively developed for a while, but its still a simple player that plays every format conceivable, including the strangest Chiptune formats. In the AUR there is a [patch][68] adding PulseAudio support as well. Even with the CPU clocked down to 800 MHz MOC barely uses 1-2% of a single CPU core.
![moc][69]
My music collection sits on my home server so that I can access it from anywhere. It is mounted using [SSHFS][70] and automount in the `/etc/fstab/`:
```
root@server:/media/media /mnt/media fuse.sshfs noauto,x-systemd.automount,idmap=user,IdentityFile=/root/.ssh/id_rsa,allow_other,reconnect 0 0
```
### Cross-Platform Building
Linux is great to build packages for any major operating system except Linux itself! In the beginning I used [QEMU][71] to with an old Debian, Windows and Mac OS X VM to build for these platforms.
Nowadays I switched to using chroot for the old Debian distribution (for maximum Linux compatibility), [MinGW][72] to cross-compile for Windows and [OSXCross][73] to cross-compile for Mac OS X.
The script used to [build DDNet][74] as well as the [instructions for updating library builds][75] are based on this.
### Backups
As usual, we nearly forgot about backups. Even if this is the last chapter, it should not be an afterthought.
I wrote [rrb][76] (reverse rsync backup) 10 years ago to wrap rsync so that I only need to give the backup server root SSH rights to the computers that it is backing up. Surprisingly rrb needed 0 changes in the last 10 years, even though I kept using it the entire time.
The backups are stored straight on the filesystem. Incremental backups are implemented using hard links (`--link-dest`). A simple [config][77] defines how long backups are kept, which defaults to:
```
KEEP_RULES=( \
7 7 \ # One backup a day for the last 7 days
31 8 \ # 8 more backups for the last month
365 11 \ # 11 more backups for the last year
1825 4 \ # 4 more backups for the last 5 years
)
```
Since some of my computers dont have a static IP / DNS entry and I still want to back them up using rrb I use a reverse SSH tunnel (as a systemd service) for them:
```
[Unit]
Description=Reverse SSH Tunnel
After=network.target
[Service]
ExecStart=/usr/bin/ssh -N -R 27276:localhost:22 -o "ExitOnForwardFailure yes" server
KillMode=process
Restart=always
[Install]
WantedBy=multi-user.target
```
Now the server can reach the client through `ssh -p 27276 localhost` while the tunnel is running to perform the backup, or in `.ssh/config` format:
```
Host cr-remote
HostName localhost
Port 27276
```
While talking about SSH hacks, sometimes a server is not easily reachable thanks to some bad routing. In that case you can route the SSH connection through another server to get better routing, in this case going through the USA to reach my Chinese server which had not been reliably reachable from Germany for a few weeks:
```
Host chn.ddnet.tw
ProxyCommand ssh -q usa.ddnet.tw nc -q0 chn.ddnet.tw 22
Port 22
```
### Final Remarks
Thanks for reading my random collection of tools. I probably forgot many programs that I use so naturally every day that I dont even think about them anymore. Lets see how stable my software setup stays in the next years. If you have any questions, feel free to get in touch with me at [dennis@felsin9.de][78].
Comments on [Hacker News][79].
--------------------------------------------------------------------------------
via: https://hookrace.net/blog/linux-desktop-setup/
作者:[Dennis Felsing][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: http://felsin9.de/nnis/
[b]: https://github.com/lujun9972
[1]: https://hookrace.net/public/linux-desktop/htop_small.png
[2]: https://hookrace.net/public/linux-desktop/htop.png
[3]: https://gentoo.org/
[4]: https://www.archlinux.org/
[5]: https://www.archlinux.org/news/
[6]: https://www.reddit.com/r/archlinux/comments/4zrsc3/keep_your_system_fully_functional_after_a_kernel/
[7]: https://www.suse.com/
[8]: https://ddnet.tw/
[9]: https://www.debian.org/
[10]: https://www.openbsd.org/
[11]: https://www.openbsd.org/faq/pf/
[12]: http://openbox.org/wiki/Main_Page
[13]: http://fluxbox.org/
[14]: https://dwm.suckless.org/
[15]: https://awesomewm.org/
[16]: https://xmonad.org/
[17]: https://www.haskell.org/
[18]: http://hackage.haskell.org/package/xmonad-contrib-0.15/docs/XMonad-Layout-LayoutScreens.html
[19]: http://robm.github.io/dzen/
[20]: https://github.com/brndnmtthws/conky
[21]: https://hookrace.net/public/linux-desktop/laptop_small.png
[22]: https://hookrace.net/public/linux-desktop/laptop.png
[23]: https://i3wm.org/
[24]: https://github.com/tmux/tmux/wiki
[25]: http://dtach.sourceforge.net/
[26]: https://github.com/def-/tach/blob/master/tach
[27]: https://www.gnu.org/software/bash/
[28]: http://www.zsh.org/
[29]: http://software.schmorp.de/pkg/rxvt-unicode.html
[30]: http://terminus-font.sourceforge.net/
[31]: https://www.vim.org/
[32]: http://ctags.sourceforge.net/
[33]: https://www.python.org/
[34]: https://nim-lang.org/
[35]: https://hisham.hm/htop/
[36]: http://lm-sensors.org/
[37]: https://01.org/powertop/
[38]: https://dev.yorhel.nl/ncdu
[39]: https://nmap.org/
[40]: https://www.tcpdump.org/
[41]: https://www.wireshark.org/
[42]: http://www.fetchmail.info/
[43]: http://www.procmail.org/
[44]: https://marlam.de/msmtp/
[45]: https://www.cis.upenn.edu/~bcpierce/unison/
[46]: https://rsync.samba.org/
[47]: http://www.mutt.org/
[48]: https://newsboat.org/
[49]: https://irssi.org/
[50]: https://www.roaringpenguin.com/products/remind
[51]: https://hookrace.net/public/linux-desktop/remcal.png
[52]: https://github.com/tsdh/rdictcc
[53]: https://www.dict.cc/
[54]: https://www.latex-project.org/
[55]: http://felsin9.de/nnis/research/
[56]: https://pwmt.org/projects/zathura/
[57]: https://wiki.gnome.org/Apps/Evince
[58]: https://www.gimp.org/
[59]: https://inkscape.org/
[60]: https://imagemagick.org/Usage/
[61]: https://www.graphviz.org/
[62]: https://sourceforge.net/projects/pgf/
[63]: https://www.mozilla.org/en-US/firefox/new/
[64]: https://github.com/5digits/dactyl
[65]: https://mpv.io/
[66]: https://rg3.github.io/youtube-dl/
[67]: http://moc.daper.net/
[68]: https://aur.archlinux.org/packages/moc-pulse/
[69]: https://hookrace.net/public/linux-desktop/moc.png
[70]: https://github.com/libfuse/sshfs
[71]: https://www.qemu.org/
[72]: http://www.mingw.org/
[73]: https://github.com/tpoechtrager/osxcross
[74]: https://github.com/ddnet/ddnet-scripts/blob/master/ddnet-release.sh
[75]: https://github.com/ddnet/ddnet-scripts/blob/master/ddnet-lib-update.sh
[76]: https://github.com/def-/rrb/blob/master/rrb
[77]: https://github.com/def-/rrb/blob/master/config.example
[78]: mailto:dennis@felsin9.de
[79]: https://news.ycombinator.com/item?id=18979731

View File

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

View File

@ -1,102 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Olive is a new Open Source Video Editor Aiming to Take On Biggies Like Final Cut Pro)
[#]: via: (https://itsfoss.com/olive-video-editor)
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
Olive is a new Open Source Video Editor Aiming to Take On Biggies Like Final Cut Pro
======
[Olive][1] is a new open source video editor under development. This non-linear video editor aims to provide a free alternative to high-end professional video editing software. Too high an aim? I think so.
If you have read our [list of best video editors for Linux][2], you might have noticed that most of the professional-grade video editors such as [Lightworks][3] or DaVinciResolve are neither free nor open source.
[Kdenlive][4] and Shotcut are there but they dont often meet the standards of professional video editing (thats what many Linux users have expressed).
This gap between the hobbyist and professional video editors prompted the developer(s) of Olive to start this project.
![Olive Video Editor][5]Olive Video Editor Interface
There is a detailed [review of Olive on Libre Graphics World][6]. Actually, this is where I came to know about Olive first. You should read the article if you are interested in knowing more about it.
### Installing Olive Video Editor in Linux
Let me remind you. Olive is in the early stages of development. Youll find plenty of bugs and missing/incomplete features. You should not treat it as your main video editor just yet.
If you want to test Olive, there are several ways to install it on Linux.
#### Install Olive in Ubuntu-based distributions via PPA
You can install Olive via its official PPA in Ubuntu, Mint and other Ubuntu-based distributions.
```
sudo add-apt-repository ppa:olive-editor/olive-editor
sudo apt-get update
sudo apt-get install olive-editor
```
#### Install Olive via Snap
If your Linux distribution supports Snap, you can use the command below to install it.
```
sudo snap install --edge olive-editor
```
#### Install Olive via Flatpak
If your [Linux distribution supports Flatpak][7], you can install Olive video editor via Flatpak.
#### Use Olive via AppImage
Dont want to install it? Download the [AppImage][8] file, set it as executable and run it.
Both 32-bit and 64-bit AppImage files are available. You should download the appropriate file.
Olive is also available for Windows and macOS. You can get it from their [download page][9].
### Want to support the development of Olive video editor?
If you like what Olive is trying to achieve and want to support it, here are a few ways you can do that.
If you are testing Olive and find some bugs, please report it on their GitHub repository.
If you are a programmer, go and check out the source code of Olive and see if you could help the project with your coding skills.
Contributing to projects financially is another way you can help the development of open source software. You can support Olive monetarily by becoming a patron.
If you dont have either the money or coding skills to support Olive, you could still help it. Share this article or Olives website on social media or in Linux/software related forums and groups you frequent. A little word of mouth should help it indirectly.
### What do you think of Olive?
Its too early to judge Olive. I hope that the development continues rapidly and we have a stable release of Olive by the end of the year (if I am not being overly optimistic).
What do you think of Olive? Do you agree with the developers aim of targeting the pro-users? What features would you like Olive to have?
--------------------------------------------------------------------------------
via: https://itsfoss.com/olive-video-editor
作者:[Abhishek Prakash][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/abhishek/
[b]: https://github.com/lujun9972
[1]: https://www.olivevideoeditor.org/
[2]: https://itsfoss.com/best-video-editing-software-linux/
[3]: https://www.lwks.com/
[4]: https://kdenlive.org/en/
[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/01/olive-video-editor-interface.jpg?resize=800%2C450&ssl=1
[6]: http://libregraphicsworld.org/blog/entry/introducing-olive-new-non-linear-video-editor
[7]: https://itsfoss.com/flatpak-guide/
[8]: https://itsfoss.com/use-appimage-linux/
[9]: https://www.olivevideoeditor.org/download.php
[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/01/olive-video-editor-interface.jpg?fit=800%2C450&ssl=1

View File

@ -1,106 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (HankChow)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Will quantum computing break security?)
[#]: via: (https://opensource.com/article/19/1/will-quantum-computing-break-security)
[#]: author: (Mike Bursell https://opensource.com/users/mikecamel)
Will quantum computing break security?
======
Do you want J. Random Hacker to be able to pretend they're your bank?
![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/security_privacy_lock.png?itok=ZWjrpFzx)
Over the past few years, a new type of computer has arrived on the block: the quantum computer. It's arguably the sixth type of computer:
1. **Humans:** Before there were artificial computers, people used, well, people. And people with this job were called "computers."
2. **Mechanical analogue:** These are devices such as the [Antikythera mechanism][1], astrolabes, or slide rules.
3. **Mechanical digital:** In this category, I'd count anything that allowed discrete mathematics but didn't use electronics for the actual calculation: the abacus, Babbage's Difference Engine, etc.
4. **Electronic analogue:** Many of these were invented for military uses such as bomb sights, gun aiming, etc.
5. **Electronic digital:** I'm going to go out on a limb here and characterise Colossus as the first electronic digital computer1: these are basically what we use today for anything from mobile phones to supercomputers.
6. **Quantum computers:** These are coming and are fundamentally different from all of the previous generations.
### What is quantum computing?
Quantum computing uses concepts from quantum mechanics to allow very different types of calculations from what we're used to in "classical computing." I'm not even going to try to explain, because I know I'd do a terrible job, so I suggest you try something like [Wikipedia's definition][2] as a starting point. What's important for our purposes is to understand that quantum computers use qubits to do calculations, and for quite a few types of mathematical algorithms—and therefore computing operationsthey can solve problems much faster than classical computers.
What's "much faster"? Much, much faster: orders of magnitude faster. A calculation that might take years or decades with a classical computer could, in certain circumstances, take seconds. Impressive, yes? And scary. Because one of the types of problems that quantum computers should be good at solving is decrypting encrypted messages, even without the keys.
This means that someone with a sufficiently powerful quantum computer should be able to read all of your current and past messages, decrypt any stored data, and maybe fake digital signatures. Is this a big thing? Yes. Do you want J. Random Hacker to be able to pretend they're your bank?2 Do you want that transaction on the blockchain where you were sold a 10 bedroom mansion in Mayfair to be "corrected" to be a bedsit in Weston-super-Mare?3
### Some good news
This is all scary stuff, but there's good news of various types.
The first is that, in order to make any of this work at all, you need a quantum computer with a good number of qubits operating, and this is turning out to be hard.4 The general consensus is that we've got a few years before anybody has a "big" enough quantum computer to do serious damage to classical encryption algorithms.
The second is that, even with a sufficient number of qubits to attacks our existing algorithms, you still need even more to allow for error correction.
The third is that, although there are theoretical models to show how to attack some of our existing algorithms, actually making them work is significantly harder than you or I5 might expect. In fact, some of the attacks may turn out to be infeasible or just take more years to perfect than we worry about.
The fourth is that there are clever people out there who are designing quantum-computation-resistant algorithms (sometimes referred to as "post-quantum algorithms") that we can use, at least for new encryption, once they've been tested and become widely available.
All in all, in fact, there's a strong body of expert opinion that says we shouldn't be overly worried about quantum computing breaking our encryption in the next five or even 10 years.
### And some bad news
It's not all rosy, however. Two issues stick out to me as areas of concern.
1. People are still designing and rolling out systems that don't consider the issue. If you're coming up with a system that is likely to be in use for 10 or more years or will be encrypting or signing data that must remain confidential or attributable over those sorts of periods, then you should be considering the possible impact of quantum computing on your system.
2. Some of the new, quantum-computing-resistant algorithms are proprietary. This means that when you and I want to start implementing systems that are designed to be quantum-computing resistant, we'll have to pay to do so. I'm a big proponent of open source, and particularly of [open source cryptography][3], and my big worry is that we just won't be able to open source these things, and worse, that when new protocol standards are createdeither de-facto or through standards bodiesthey will choose proprietary algorithms that exclude the use of open source, whether on purpose, through ignorance, or because few good alternatives are available.
### What to do?
Luckily, there are things you can do to address both of the issues above. The first is to think and plan when designing a system about what the impact of quantum computing might be on it. Often—very often—you won't need to implement anything explicit now (and it could be hard to, given the current state of the art), but you should at least embrace [the concept of crypto-agility][4]: designing protocols and systems so you can swap out algorithms if required.7
The second is a call to arms: Get involved in the open source movement and encourage everybody you know who has anything to do with cryptography to rally for open standards and for research into non-proprietary, quantum-computing-resistant algorithms. This is something that's very much on my to-do list, and an area where pressure and lobbying is just as important as the research itself.
1\. I think it's fair to call it the first electronic, programmable computer. I know there were earlier non-programmable ones, and that some claim ENIAC, but I don't have the space or the energy to argue the case here.
2\. No.
3\. See 2. Don't get me wrong, by the way—I grew up near Weston-super-Mare, and it's got things going for it, but it's not Mayfair.
4\. And if a quantum physicist says something's hard, then to my mind, it's hard.
5\. And I'm assuming that neither of us is a quantum physicist or mathematician.6
6\. I'm definitely not.
7\. And not just for quantum-computing reasons: There's a good chance that some of our existing classical algorithms may just fall to other, non-quantum attacks such as new mathematical approaches.
This article was originally published on [Alice, Eve, and Bob][5] and is reprinted with the author's permission.
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/1/will-quantum-computing-break-security
作者:[Mike Bursell][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/mikecamel
[b]: https://github.com/lujun9972
[1]: https://en.wikipedia.org/wiki/Antikythera_mechanism
[2]: https://en.wikipedia.org/wiki/Quantum_computing
[3]: https://opensource.com/article/17/10/many-eyes
[4]: https://aliceevebob.com/2017/04/04/disbelieving-the-many-eyes-hypothesis/
[5]: https://aliceevebob.com/2019/01/08/will-quantum-computing-break-security/

View File

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

View File

@ -1,227 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (How to determine how much memory is installed, used on Linux systems)
[#]: via: (https://www.networkworld.com/article/3336174/linux/how-much-memory-is-installed-and-being-used-on-your-linux-systems.html)
[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/)
How to determine how much memory is installed, used on Linux systems
======
![](https://images.idgesg.net/images/article/2019/02/memory-100787327-large.jpg)
There are numerous ways to get information on the memory installed on Linux systems and view how much of that memory is being used. Some commands provide an overwhelming amount of detail, while others provide succinct, though not necessarily easy-to-digest, answers. In this post, we'll look at some of the more useful tools for checking on memory and its usage.
Before we get into the details, however, let's review a few details. Physical memory and virtual memory are not the same. The latter includes disk space that configured to be used as swap. Swap may include partitions set aside for this usage or files that are created to add to the available swap space when creating a new partition may not be practical. Some Linux commands provide information on both.
Swap expands memory by providing disk space that can be used to house inactive pages in memory that are moved to disk when physical memory fills up.
One file that plays a role in memory management is **/proc/kcore**. This file looks like a normal (though extremely large) file, but it does not occupy disk space at all. Instead, it is a virtual file like all of the files in /proc.
```
$ ls -l /proc/kcore
-r--------. 1 root root 140737477881856 Jan 28 12:59 /proc/kcore
```
Interestingly, the two systems queried below do _not_ have the same amount of memory installed, yet the size of /proc/kcore is the same on both. The first of these two systems has 4 GB of memory installed; the second has 6 GB.
```
system1$ ls -l /proc/kcore
-r--------. 1 root root 140737477881856 Jan 28 12:59 /proc/kcore
system2$ ls -l /proc/kcore
-r-------- 1 root root 140737477881856 Feb 5 13:00 /proc/kcore
```
Explanations that claim the size of this file represents the amount of available virtual memory (maybe plus 4K) don't hold much weight. This number would suggest that the virtual memory on these systems is 128 terrabytes! That number seems to represent instead how much memory a 64-bit systems might be capable of addressing — not how much is available on the system. Calculations of what 128 terrabytes and that number, plus 4K would look like are fairly easy to make on the command line:
```
$ expr 1024 \* 1024 \* 1024 \* 1024 \* 128
140737488355328
$ expr 1024 \* 1024 \* 1024 \* 1024 \* 128 + 4096
140737488359424
```
Another and more human-friendly command for examining memory is the **free** command. It gives you an easy-to-understand report on memory.
```
$ free
total used free shared buff/cache available
Mem: 6102476 812244 4090752 13112 1199480 4984140
Swap: 2097148 0 2097148
```
With the **-g** option, free reports the values in gigabytes.
```
$ free -g
total used free shared buff/cache available
Mem: 5 0 3 0 1 4
Swap: 1 0 1
```
With the **-t** option, free shows the same values as it does with no options (don't confuse -t with terrabytes!) but by adding a total line at the bottom of its output.
```
$ free -t
total used free shared buff/cache available
Mem: 6102476 812408 4090612 13112 1199456 4983984
Swap: 2097148 0 2097148
Total: 8199624 812408 6187760
```
And, of course, you can choose to use both options.
```
$ free -tg
total used free shared buff/cache available
Mem: 5 0 3 0 1 4
Swap: 1 0 1
Total: 7 0 5
```
You might be disappointed in this report if you're trying to answer the question "How much RAM is installed on this system?" This is the same system shown in the example above that was described as having 6GB of RAM. That doesn't mean this report is wrong, but that it's the system's view of the memory it has at its disposal.
The free command also provides an option to update the display every X seconds (10 in the example below).
```
$ free -s 10
total used free shared buff/cache available
Mem: 6102476 812280 4090704 13112 1199492 4984108
Swap: 2097148 0 2097148
total used free shared buff/cache available
Mem: 6102476 812260 4090712 13112 1199504 4984120
Swap: 2097148 0 2097148
```
With **-l** , the free command provides high and low memory usage.
```
$ free -l
total used free shared buff/cache available
Mem: 6102476 812376 4090588 13112 1199512 4984000
Low: 6102476 2011888 4090588
High: 0 0 0
Swap: 2097148 0 2097148
```
Another option for looking at memory is the **/proc/meminfo** file. Like /proc/kcore, this is a virtual file and one that gives a useful report showing how much memory is installed, free and available. Clearly, free and available do not represent the same thing. MemFree seems to represent unused RAM. MemAvailable is an estimate of how much memory is available for starting new applications.
```
$ head -3 /proc/meminfo
MemTotal: 6102476 kB
MemFree: 4090596 kB
MemAvailable: 4984040 kB
```
If you only want to see total memory, you can use one of these commands:
```
$ awk '/MemTotal/ {print $2}' /proc/meminfo
6102476
$ grep MemTotal /proc/meminfo
MemTotal: 6102476 kB
```
The **DirectMap** entries break information on memory into categories.
```
$ grep DirectMap /proc/meminfo
DirectMap4k: 213568 kB
DirectMap2M: 6076416 kB
```
DirectMap4k represents the amount of memory being mapped to standard 4k pages, while DirectMap2M shows the amount of memory being mapped to 2MB pages.
The **getconf** command is one that will provide quite a bit more information than most of us want to contemplate.
```
$ getconf -a | more
LINK_MAX 65000
_POSIX_LINK_MAX 65000
MAX_CANON 255
_POSIX_MAX_CANON 255
MAX_INPUT 255
_POSIX_MAX_INPUT 255
NAME_MAX 255
_POSIX_NAME_MAX 255
PATH_MAX 4096
_POSIX_PATH_MAX 4096
PIPE_BUF 4096
_POSIX_PIPE_BUF 4096
SOCK_MAXBUF
_POSIX_ASYNC_IO
_POSIX_CHOWN_RESTRICTED 1
_POSIX_NO_TRUNC 1
_POSIX_PRIO_IO
_POSIX_SYNC_IO
_POSIX_VDISABLE 0
ARG_MAX 2097152
ATEXIT_MAX 2147483647
CHAR_BIT 8
CHAR_MAX 127
--More--
```
Pare that output down to something specific with a command like the one shown below, and you'll get the same kind of information provided by some of the commands above.
```
$ getconf -a | grep PAGES | awk 'BEGIN {total = 1} {if (NR == 1 || NR == 3) total *=$NF} END {print total / 1024" kB"}'
6102476 kB
```
That command calculates memory by multiplying the values in the first and last lines of output like this:
```
PAGESIZE 4096 <==
_AVPHYS_PAGES 1022511
_PHYS_PAGES 1525619 <==
```
Calculating that independently, we can see how that value is derived.
```
$ expr 4096 \* 1525619 / 1024
6102476
```
Clearly that's one of those commands that deserves to be turned into an alias!
Another command with very digestible output is **top**. In the first five lines of top's output, you'll see some numbers that show how memory is being used.
```
$ top
top - 15:36:38 up 8 days, 2:37, 2 users, load average: 0.00, 0.00, 0.00
Tasks: 266 total, 1 running, 265 sleeping, 0 stopped, 0 zombie
%Cpu(s): 0.2 us, 0.4 sy, 0.0 ni, 99.4 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
MiB Mem : 3244.8 total, 377.9 free, 1826.2 used, 1040.7 buff/cache
MiB Swap: 3536.0 total, 3535.7 free, 0.3 used. 1126.1 avail Mem
```
And finally a command that will answer the question "So, how much RAM is installed on this system?" in a succinct fashion:
```
$ sudo dmidecode -t 17 | grep "Size.*MB" | awk '{s+=$2} END {print s / 1024 "GB"}'
6GB
```
Depending on how much detail you want to see, Linux systems provide a lot of options for seeing how much memory is installed on your systems and how much is used and available.
Join the Network World communities on [Facebook][1] and [LinkedIn][2] to comment on topics that are top of mind.
--------------------------------------------------------------------------------
via: https://www.networkworld.com/article/3336174/linux/how-much-memory-is-installed-and-being-used-on-your-linux-systems.html
作者:[Sandra Henry-Stocker][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/Sandra-Henry_Stocker/
[b]: https://github.com/lujun9972
[1]: https://www.facebook.com/NetworkWorld/
[2]: https://www.linkedin.com/company/network-world

View File

@ -1,5 +1,5 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: translator: ( pityonline )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
@ -180,7 +180,7 @@ via: https://www.2daygeek.com/remove-delete-empty-lines-in-a-file-in-linux/
作者:[Magesh Maruthamuthu][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
译者:[pityonline](https://github.com/pityonline)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

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

View File

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

View File

@ -0,0 +1,155 @@
每个 Linux 平台上的玩家都从不想要的恼人经历
============================================================
[![Linux 平台上玩家的问题](https://itsfoss.com/wp-content/uploads/2016/09/Linux-Gaming-Problems.jpg)][10]
[在 Linux 平台上玩游戏][12] 已经走了很远,现在有专门的 [Linux 游戏型发行版]。但是这不意味着在 Linux 上打游戏的感觉和在 Windows 上一样顺畅。
为了确保我们和 Windows 用户同样地享受游戏,什么是我们应该考虑的困难呢?
[Wine][14][PlayOnLinux][15] 和其它类似软件不总是能够玩所有流行的 Windows 游戏。在这篇文章里,我想讨论一下为了拥有一个最好的 Linux 游戏体验所必须处理好的若干因素。
### #1 SteamOS 是一个开源平台Steam for Linux 并不是
正如 [StemOS 主页][16]所说, 即便 SteamOS 是一个开源平台Steam for Linux 仍然是专有的。如果 Steam for Linux 也开源,那么它从开源社区得到的支持将会是巨大的。既然它不是,那么 [Ascension 计划的诞生自然是不可避免的][17]
[video](https://youtu.be/07UiS5iAknA)
Ascension 计划是一个开源的能够启动从任何平台购买、下载的游戏的游戏启动器。这些游戏可以是 Steam 平台的,[Origin 游戏]平台的Uplay 平台的,以及直接从游戏开发者主页或者从 DVD、CD-ROM 拷下来的。
这是 Ascension 计划如何开始的:[头脑风暴][19]激发了一场与游戏社区读者之间有趣的讨论,在这场讨论中读者们纷纷发表自己的观点并给出建议。
### #2 与 Windows 平台的性能比较
在 Linux 平台上运行 Windows 游戏并不总是一件轻松的任务。但是感谢一个叫做 [CSMT][20](多线程命令流)的特性,尽管离 Windows 级别的性能还有相当长的路要走PlayOnLinux 现在依旧可以更好地解决这些性能方面的问题。
原生态 Linux 对游戏的支持在过去发行的游戏中从未如人意。
去年,有报道说 SteamOS 比 Windows 在游戏方面的表现要[差得多][21]。古墓丽影去年在 SteamOS 及 Steam for Linux 上发行,然而基准测试的结果与 Windows 上的性能无法抗衡。
[视频](https://youtu.be/nkWUBRacBNE)
这明显是因为游戏是基于 [DirectX][23] 而不是 [OpenGL][24] 开发的缘故。
古墓丽影是[第一个使用 TressFX 的游戏][25]。这个视频包涵了 TressFX 的比较:
[视频](https://youtu.be/-IeY5ZS-LlA)
下面是另一个有趣的比较,它显示出使用 Wine+CSMT 带来的游戏性能比 Steam 上原生的 Linux 版游戏带来的游戏性能要好得多!这就是开源的力量!
[推荐阅读:一个新 Linux 操作系统 "OSu",力争成为 Arch Linux 世界中的 Ubuntu][26]
[视频](https://youtu.be/sCJkC6oJ08A)
以防 FPS 损失TressFX 已经被关闭。
以下是另一个有关在 Linux 上最新发布的 “[Life is Strange][27]”在 Linux 与 Windows上的比较
[视频](https://youtu.be/Vlflu-pIgIY)
[_Steam for Linux_][28] 开始在这个游戏上展示出比 Windows 更好的游戏性能,这是一件好事。
在发布任何 Linux 版的游戏前,开发者应该考虑优化游戏,特别是基于 DirectX 并需要 OpenGL转换的游戏。我们十分希望[ Linux 上的杀出重围:人类分裂][29] 在正式发行时能有一个好的基准测试结果。由于它是基于 DirectX的游戏我们希望它能良好地移植到 Linux 上。以下是[游戏执行总监不得不说的话][30]。
### #3 专有的 NVIDIA 驱动
相比于 [NVIDIA][32][AMD 对于开源的支持][31]绝对是值得称赞的。尽管 [AMD][33] 因其更好的开源驱动在 Linux 上的驱动支持挺不错NVIDIA 显卡用户由于开源版本的 NVIDIA 显卡驱动 “Nouveau” 有限的能力,仍不得不用专有的 NVIDIA 驱动。
在过去,传奇般的 Linus Torvalds 同样分享了他关于“来自 NIVIDIA 的 Linux 支持完全不可接受”的想法。
[视频](https://youtu.be/O0r6Pr_mdio)
你可以在这里观看完整的[讲话][35],尽管 NVIDIA 用 [承诺更好的 Linux 平台支持][36]作为回复,开源显卡驱动仍如之前一样毫无起色。
### #4 需要 Uplay 和 Origin 在 Linux 平台上的 DRM 支持
[视频](https://youtu.be/rc96NFwyxWU)
以上的视频描述了如何在 Linux 上安装 [Uplay][37] DRM。上传者还建议使用 Wine 作为 Linux 上的主要的应用和游戏支持软件并不推荐。相反,使用原生的应用更值得鼓励。
以下视频是一个关于如何在 Linux 上安装 [Origin][38] DRM 的教程。
[视频](https://youtu.be/ga2lNM72-Kw)
数字版权管理软件给游戏运行又加了一层阻碍,使得在 Linux 上良好运行 Windows 游戏这一本就充满挑战性的任务更有难度。因此除了使游戏能够运行之外W.I.N.E 不得不同时负责运行像 Uplay 或 Origin 之类的 DRM 软件。如果能像 Steam 一样Linux 也能够有自己原生版本的 Uplay 和 Origin 那就好了。
[推荐阅读Linux 基金会会长称 2017 是 Linux 桌面之年......尽管他自己正使用苹果的 macOS][39]
### #5 DirectX 11 对于 Linux 的支持
尽管我们在 Linux 平台上有可以运行 Windows 应用的工具,每个游戏为了能在 Linux 上运行都带有自己的配套插件需求。尽管去年通过 Code Weavers 有一篇关于 [DirectX 11 对于 Linux 的支持][40] 的公告,在 Linux 上畅玩新发大作仍是长路漫漫。现在你可以[从 Codweavers 购买 Crossover][41] 以获得可得到的最佳 DirectX 11 支持。这个在 Arch Linux 论坛上的[频道][42]清楚展现了将这个梦想成真需要多少的努力。以下是一个 [Reddit 频道][44] 上的有趣[发现][43]。这个发现提到了[来自 Codeweavers 的 DirectX 11 补丁][45],现在看来这无疑是好消息。
### #6 100%的 Steam 游戏在 Linux 上无法获得
随着 Linux 游戏玩家持续错过每一款主要游戏的发行,这是需要考虑的一个重点,因为大部分主要游戏都在 Windows 上发行。以下是[如何在 Linux 上安装 Windows 版的 Steam 的教程][46]。
### #7 游戏发行商对OpenGL更好的支持
目前开发者和发行商主要着眼于 DirectX 而不是 OpenGL 来开发游戏。现在随着 Steam 正式登录 Linux开发者应该同样考虑在 OpenGL 下开发。
[Direct3D][47] 仅仅是为了 Windows 平台打造。而 OpenGL API 拥有开放性标准,并且它不仅能在 Windows 上同样也能在其它各种各样的平台上实现。
尽管是一篇很老的文章,[这个很有价值的资源][48]分享了许多有关 OpenGL 和 DirectX 现状的很有想法的信息。所提出的观点确实十分明智,基于按时间排序的事件给予读者启迪。
在 Linux 平台上发布大作的发行商绝不应该忽视一个事实:在 OpenGL 下直接开发游戏要比从 DirectX 移植到 OpenGL 合算得多。如果不得不转换平台,移植必须被仔细优化并谨慎研究。发布游戏可能会有延迟但这绝对值得。
有更多的烦恼要分享?务必在评论区让我们知道。
--------------------------------------------------------------------------------
via: https://itsfoss.com/linux-gaming-problems/
作者:[Avimanyu Bandyopadhyay ][a]
译者:[tomjlw](https://github.com/tomjlw)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:https://itsfoss.com/author/avimanyu/
[1]:https://itsfoss.com/author/avimanyu/
[2]:https://itsfoss.com/linux-gaming-problems/#comments
[3]:https://www.facebook.com/share.php?u=https%3A%2F%2Fitsfoss.com%2Flinux-gaming-problems%2F%3Futm_source%3Dfacebook%26utm_medium%3Dsocial%26utm_campaign%3DSocialWarfare
[4]:https://twitter.com/share?original_referer=/&text=Annoying+Experiences+Every+Linux+Gamer+Never+Wanted%21&url=https://itsfoss.com/linux-gaming-problems/%3Futm_source%3Dtwitter%26utm_medium%3Dsocial%26utm_campaign%3DSocialWarfare&via=itsfoss2
[5]:https://plus.google.com/share?url=https%3A%2F%2Fitsfoss.com%2Flinux-gaming-problems%2F%3Futm_source%3DgooglePlus%26utm_medium%3Dsocial%26utm_campaign%3DSocialWarfare
[6]:https://www.linkedin.com/cws/share?url=https%3A%2F%2Fitsfoss.com%2Flinux-gaming-problems%2F%3Futm_source%3DlinkedIn%26utm_medium%3Dsocial%26utm_campaign%3DSocialWarfare
[7]:http://www.stumbleupon.com/submit?url=https://itsfoss.com/linux-gaming-problems/&title=Annoying+Experiences+Every+Linux+Gamer+Never+Wanted%21
[8]:https://www.reddit.com/submit?url=https://itsfoss.com/linux-gaming-problems/&title=Annoying+Experiences+Every+Linux+Gamer+Never+Wanted%21
[9]:https://itsfoss.com/wp-content/uploads/2016/09/Linux-Gaming-Problems.jpg
[10]:https://itsfoss.com/wp-content/uploads/2016/09/Linux-Gaming-Problems.jpg
[11]:http://pinterest.com/pin/create/bookmarklet/?media=https://itsfoss.com/wp-content/uploads/2016/09/Linux-Gaming-Problems.jpg&url=https://itsfoss.com/linux-gaming-problems/&is_video=false&description=Linux%20gamer%27s%20problem
[12]:https://itsfoss.com/linux-gaming-guide/
[13]:https://itsfoss.com/linux-gaming-distributions/
[14]:https://itsfoss.com/use-windows-applications-linux/
[15]:https://www.playonlinux.com/en/
[16]:http://store.steampowered.com/steamos/
[17]:http://www.ibtimes.co.uk/reddit-users-want-replace-steam-open-source-game-launcher-project-ascension-1498999
[18]:https://www.origin.com/
[19]:https://www.reddit.com/r/pcmasterrace/comments/33xcvm/we_hate_valves_monopoly_over_pc_gaming_why/
[20]:https://github.com/wine-compholio/wine-staging/wiki/CSMT
[21]:http://arstechnica.com/gaming/2015/11/ars-benchmarks-show-significant-performance-hit-for-steamos-gaming/
[22]:https://www.gamingonlinux.com/articles/tomb-raider-benchmark-video-comparison-linux-vs-windows-10.7138
[23]:https://en.wikipedia.org/wiki/DirectX
[24]:https://en.wikipedia.org/wiki/OpenGL
[25]:https://www.gamingonlinux.com/articles/tomb-raider-released-for-linux-video-thoughts-port-report-included-the-first-linux-game-to-use-tresfx.7124
[26]:https://itsfoss.com/osu-new-linux/
[27]:http://lifeisstrange.com/
[28]:https://itsfoss.com/install-steam-ubuntu-linux/
[29]:https://itsfoss.com/deus-ex-mankind-divided-linux/
[30]:http://wccftech.com/deus-ex-mankind-divided-director-console-ports-on-pc-is-disrespectful/
[31]:http://developer.amd.com/tools-and-sdks/open-source/
[32]:http://nvidia.com/
[33]:http://amd.com/
[34]:http://www.makeuseof.com/tag/open-source-amd-graphics-now-awesome-heres-get/
[35]:https://youtu.be/MShbP3OpASA
[36]:https://itsfoss.com/nvidia-optimus-support-linux/
[37]:http://uplay.com/
[38]:http://origin.com/
[39]:https://itsfoss.com/linux-foundation-head-uses-macos/
[40]:http://www.pcworld.com/article/2940470/hey-gamers-directx-11-is-coming-to-linux-thanks-to-codeweavers-and-wine.html
[41]:https://itsfoss.com/deal-run-windows-software-and-games-on-linux-with-crossover-15-66-off/
[42]:https://bbs.archlinux.org/viewtopic.php?id=214771
[43]:https://ghostbin.com/paste/sy3e2
[44]:https://www.reddit.com/r/linux_gaming/comments/3ap3uu/directx_11_support_coming_to_codeweavers/
[45]:https://www.codeweavers.com/about/blogs/caron/2015/12/10/directx-11-really-james-didnt-lie
[46]:https://itsfoss.com/linux-gaming-guide/
[47]:https://en.wikipedia.org/wiki/Direct3D
[48]:http://blog.wolfire.com/2010/01/Why-you-should-use-OpenGL-and-not-DirectX

View File

@ -0,0 +1,101 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Olive is a new Open Source Video Editor Aiming to Take On Biggies Like Final Cut Pro)
[#]: via: (https://itsfoss.com/olive-video-editor)
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
Olive 是一个新的开源视频编辑器,一款类似 Final Cut Pro 的工具
======
[Olive][1] 是一个正在开发的新开源视频编辑器。这个非线性视频编辑器旨在提供高端专业视频编辑软件的免费替代品。目标高么?我认为是的。
如果你读过我们的 [Linux 中的最佳视频编辑器][2]这篇文章,你可能已经注意到大多数“专业级”视频编辑器(如 [Lightworks][3] 或 DaVinciResolve既不免费也不开源。
[Kdenlive][4] 和 Shotcut 也出现在了文章中,但它通常无法达到专业视频编辑的标准(这是许多 Linux 用户说的)。
爱好者和专业视频编辑之间的这种差距促使 Olive 的开发人员启动了这个项目。
![Olive Video Editor][5]Olive Video Editor Interface
Libre Graphics World 中有一篇详细的[关于 Olive 的评论][6]。实际上,这是我第一次知道 Olive 的地方。如果你有兴趣了解更多信息,请阅读该文章。
### 在 Linux 中安装 Olive 视频编辑器
提醒你一下。Olive 正处于发展的早期阶段。你会发现很多 bug 和缺失/不完整的功能。你不应该把它当作你的主要视频编辑器。
如果你想测试 Olive有几种方法可以在 Linux 上安装它。
#### 通过 PPA 在基于 Ubuntu 的发行版中安装 Olive
你可以在 Ubuntu、Mint 和其他基于 Ubuntu 的发行版使用官方 PPA 安装 Olive。
```
sudo add-apt-repository ppa:olive-editor/olive-editor
sudo apt-get update
sudo apt-get install olive-editor
```
#### 通过 Snap 安装 Olive
如果你的 Linux 发行版支持 Snap则可以使用以下命令进行安装。
```
sudo snap install --edge olive-editor
```
#### 通过 Flatpak 安装 Olive
如果你的 [Linux 发行版支持 Flatpak][7],你可以通过 Flatpak 安装 Olive 视频编辑器。
#### 通过 AppImage 使用 Olive
不想安装吗?下载 [AppImage][8] 文件,将其设置为可执行文件并运行它。
32 位和 64 位 AppImage 文件都有。你应该下载相应的文件。
Olive 也可用于 Windows 和 macOS。你可以从它的[下载页面][9]获得它。
### 想要支持 Olive 视频编辑器的开发吗?
如果你喜欢 Olive 尝试实现的功能,并且想要支持它,那么你可以通过以下几种方式。
如果你在测试 Olive 时发现一些 bug请到它们的 GitHub 仓库中报告。
如果你是程序员,请浏览 Olive 的源代码,看看你是否可以通过编码技巧帮助项目。
在经济上为项目做贡献是另一种可以帮助开发开源软件的方法。你可以通过成为赞助人来支持 Olive。
如果你没有支持 Olive 的金钱或编码技能,你仍然可以帮助它。在社交媒体或你经常访问的 Linux/软件相关论坛和群组中分享这篇文章或 Olive 的网站。一点微小的口碑都能间接地帮助它。
### 你如何看待 Olive
评判 Olive 还为时过早。我希望能够持续快速开发,并且在年底之前发布 Olive 的稳定版(如果我没有过于乐观的话)。
你如何看待 Olive你是否认同开发人员针对专业用户的目标你希望 Olive 拥有哪些功能?
--------------------------------------------------------------------------------
via: https://itsfoss.com/olive-video-editor
作者:[Abhishek Prakash][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/abhishek/
[b]: https://github.com/lujun9972
[1]: https://www.olivevideoeditor.org/
[2]: https://itsfoss.com/best-video-editing-software-linux/
[3]: https://www.lwks.com/
[4]: https://kdenlive.org/en/
[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/01/olive-video-editor-interface.jpg?resize=800%2C450&ssl=1
[6]: http://libregraphicsworld.org/blog/entry/introducing-olive-new-non-linear-video-editor
[7]: https://itsfoss.com/flatpak-guide/
[8]: https://itsfoss.com/use-appimage-linux/
[9]: https://www.olivevideoeditor.org/download.php
[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/01/olive-video-editor-interface.jpg?fit=800%2C450&ssl=1

View File

@ -0,0 +1,93 @@
[#]: collector: (lujun9972)
[#]: translator: (HankChow)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Will quantum computing break security?)
[#]: via: (https://opensource.com/article/19/1/will-quantum-computing-break-security)
[#]: author: (Mike Bursell https://opensource.com/users/mikecamel)
量子计算会打破现有的安全体系吗?
======
> 你会希望黑客冒充成你的银行吗?
![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/security_privacy_lock.png?itok=ZWjrpFzx)
近年来,量子计算机已经出现在大众的视野当中。量子计算机被认为是第六类计算机,这六类计算机包括:
1. **人力:** 在人造的计算工具出现之前,人类只能使用人力去进行计算。而承担计算工作的人,只能被称为“计算者”。
2. **模拟计算工具:** 由人类制造的一些模拟计算过程的小工具,例如<ruby>[安提凯希拉装置][1]<rt>Antikythera mechanism</rt></ruby>、星盘、计算尺等等。
3. **机械工具:** 在这一个类别中包括了运用到离散数学但未使用电子技术进行计算的工具例如算盘、Charles Babbage 的<ruby>差分机<rt>Difference Engine</rt></ruby>等等。
4. **电子模拟计算工具:** 这一个类别的计算机多数用于军事方面的用途,例如炸弹瞄准器、枪炮瞄准装置等等。
5. **电子计算机:** 这个类别包含的种类就太多了,几乎包含现代所有的电子设备,从移动电话到超级计算机,都在这个类别当中。
6. **量子计算机:** 即将进入我们的生活,而且与之前的几类完全不同。
### 什么是量子计算?
量子计算的概念来源于量子力学,因此使用的计算方式和我们平常使用的普通计算并不相同。如果想要深入理解,建议从参考[维基百科上的定义][2]开始。对我们来说,最重要的是理解这一点:量子计算机使用<ruby>量子位<rt>qubit</rt></ruby>进行计算。在这样的前提下,对于很多数学算法和运算操作,量子计算机的计算速度会比普通计算机要快得多。
这里的“快得多”是按数量级来说的“快得多”。在某些情况下,一个计算任务如果由普通计算机来执行,可能要耗费几年或者几十年才能完成,但如果由量子计算机来执行,就只需要几秒钟。这样的速度甚至令人感到可怕。因为量子计算机会非常擅长信息的加密解密计算,即使在没有密钥的情况下,也能快速完成繁重的计算任务。
这意味着,如果拥有足够强大的量子计算机,那么你的所有信息都会被一览无遗,任何被加密的数据都可以被正确解密出来,甚至伪造数字签名也会成为可能。这确实是一个严重的问题。毕竟谁也不想被黑客冒充成自己在用的银行,更不希望自己在区块链上的交易被篡改得面目全非。
### 好消息
尽管上面的提到的问题非常可怕,但也不需要太担心。
首先,如果要实现上面提到的能力,一台可以操作大量量子位的量子计算机是必不可少的,而这个硬件上的要求就是一个很高的门槛。目前普遍认为,规模大得足以有效破解经典加密算法的量子计算机在最近几年还不可能出现。
其次,除了攻击现有的加密算法需要大量的量子位以外,还需要很多量子位来保证容错性。
还有,尽管确实有一些理论上的模型阐述了量子计算机如何对一些现有的算法作出攻击,但是要让这样的理论模型实际运作起来的难度会比我们想象中大得多。事实上,有一些攻击手段也是未被完全确认是可行的,又或者这些攻击手段还需要继续耗费很多年的改进才能到达如斯恐怖的程度。
最后,还有很多专业人士正在研究能够防御量子计算的算法(这样的算法也被称为“<ruby>后量子算法<rt>post-quantum algorithms</rt></ruby>”)。如果这些防御算法经过测试以后投入使用,我们就可以使用这些算法进行加密,来对抗量子计算了。
总而言之,很多专家都认为,我们现有的加密方式在未来 5 年甚至未来 10 年内都是安全的,不需要过分担心。
### 也有坏消息
但我们也并不是高枕无忧了,以下两个问题就值得我们关注:
1. 人们在设计应用系统的时候仍然没有对量子计算作出太多的考量。如果设计的系统可能会使用 10 年以上,又或者数据存储和加密的时间跨度在 10 年以上,那么就必须考虑量子计算在未来会不会对系统造成不利的影响。
2. 新出现的防御量子计算的算法可能会是专有的。也就是说,如果基于这些防御量子计算的算法来设计系统,那么在系统落地的时候,可能会需要为此付费。尽管我是支持开源的,尤其是[开源密码学][3],但我最担心的就是这方面的内容无法被开源。而且,在建立新的协议标准时,无论是故意的,无意的,还是别无选择,都很可能不会使用开源的专有算法。
### 我们要怎样做?
幸运的是,针对上述两个问题,我们还是有应对措施的。首先,在整个系统的设计阶段,就需要考虑到它是否会受到量子计算的影响,并作出相应的规划。当然了,不需要现在就立即采取行动,因为当前的技术水平也没法实现有效的方案,但至少也要[在加密方面保持敏捷性][4],以便在任何需要的时候为你的协议和系统更换更有效的加密算法。
其次是参与开源运动。尽可能鼓励密码学方面的有识之士团结起来,支持开放标准,并投入对非专有的防御量子计算的算法研究当中去。这一点也算是当务之急,因为号召更多的人重视起来并加入研究,比研究本身更为重要。
本文首发于《[Alice, Eve, and Bob][5]》,并在作者同意下重新发表。
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/1/will-quantum-computing-break-security
作者:[Mike Bursell][a]
选题:[lujun9972][b]
译者:[HankChow](https://github.com/HankChow)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/mikecamel
[b]: https://github.com/lujun9972
[1]: https://en.wikipedia.org/wiki/Antikythera_mechanism
[2]: https://en.wikipedia.org/wiki/Quantum_computing
[3]: https://opensource.com/article/17/10/many-eyes
[4]: https://aliceevebob.com/2017/04/04/disbelieving-the-many-eyes-hypothesis/
[5]: https://aliceevebob.com/2019/01/08/will-quantum-computing-break-security/

View File

@ -0,0 +1,227 @@
[#]: collector: (lujun9972)
[#]: translator: (leommxj)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (How to determine how much memory is installed, used on Linux systems)
[#]: via: (https://www.networkworld.com/article/3336174/linux/how-much-memory-is-installed-and-being-used-on-your-linux-systems.html)
[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/)
如何在Linux系统中判断安装、使用了多少内存
======
![](https://images.idgesg.net/images/article/2019/02/memory-100787327-large.jpg)
在Linux系统中有很多种方法获取有关安装了多少内存的信息及查看多少内存正在被使用。有些命令提供了大量的细节而其他命令提供了简洁但不一定易于理解的答案。在这篇文章中我们将介绍一些查看内存及其使用状态的有用的工具。
在我们开始之前,让我们先来回顾一些基础知识。物理内存和虚拟内存并不是一回事。后者包括配置为 swap 的磁盘空间。Swap 空间可能包括为此目的特意留出来的分区,以及在创建新的 swap 分区不可行时创建的用来增加可用 swap 空间的文件。有些Linux命令提供关于两者的信息。
Swap 通过提供当物理内存占满时可以用来存放内存中非活动页的磁盘空间来扩展内存。
**/proc/kcore** 是在内存管理中起作用的一个文件。这个文件看上去是个普通文件(虽然非常大),但它并不占用任何空间。它就像其他 /proc 下的文件一样是个虚拟文件。
```
$ ls -l /proc/kcore
-r--------. 1 root root 140737477881856 Jan 28 12:59 /proc/kcore
```
有趣的是,下面查询的两个系统并没有安装相同大小的内存,但 /proc/kcore 的大小却是相同的。第一个系统安装了 4 GB 的内存,而第二个系统安装了 6 GB。
```
system1$ ls -l /proc/kcore
-r--------. 1 root root 140737477881856 Jan 28 12:59 /proc/kcore
system2$ ls -l /proc/kcore
-r-------- 1 root root 140737477881856 Feb 5 13:00 /proc/kcore
```
一种不靠谱的解释说这个文件代表可用虚拟内存的大小(没准要加 4 KB如果这样这些系统的虚拟内存可就是 128TB 了这个数字似乎代表了64位系统可以寻址多少内存而不是当前系统有多少可用内存。在命令行中计算 128 TB 和这个文件大小加上 4 KB 很容易。
```
$ expr 1024 \* 1024 \* 1024 \* 1024 \* 128
140737488355328
$ expr 1024 \* 1024 \* 1024 \* 1024 \* 128 + 4096
140737488359424
```
另一个用来检查内存的更人性化的命令是 **free**。它会给出一个易于理解的内存报告。
```
$ free
total used free shared buff/cache available
Mem: 6102476 812244 4090752 13112 1199480 4984140
Swap: 2097148 0 2097148
```
使用 **-g** 选项free会以 GB 为单位返回结果。
```
$ free -g
total used free shared buff/cache available
Mem: 5 0 3 0 1 4
Swap: 1 0 1
```
使用 **-t** 选项free 会显示与无附加选项时相同的值(不要把 -t 选项与 TB 搞混),并额外在输出的底部添加一行总计数据。
```
$ free -t
total used free shared buff/cache available
Mem: 6102476 812408 4090612 13112 1199456 4983984
Swap: 2097148 0 2097148
Total: 8199624 812408 6187760
```
当然,你也可以选择同时使用两个选项。
```
$ free -tg
total used free shared buff/cache available
Mem: 5 0 3 0 1 4
Swap: 1 0 1
Total: 7 0 5
```
如果你尝试用这个报告来解释“这个系统安装了多少内存?”,你可能会感到失望。上面的报告就是在前文说的装有 6 GB 内存的系统上运行的结果。这并不是说这个结果是错的,这就是系统对其可使用的内存的看法。
free 命令也提供了每隔 X 秒刷新显示的选项(下方示例中 X 为 10
```
$ free -s 10
total used free shared buff/cache available
Mem: 6102476 812280 4090704 13112 1199492 4984108
Swap: 2097148 0 2097148
total used free shared buff/cache available
Mem: 6102476 812260 4090712 13112 1199504 4984120
Swap: 2097148 0 2097148
```
使用 **-l** 选项free命令会提供高低内存使用信息。
```
$ free -l
total used free shared buff/cache available
Mem: 6102476 812376 4090588 13112 1199512 4984000
Low: 6102476 2011888 4090588
High: 0 0 0
Swap: 2097148 0 2097148
```
查看内存的另一个选择是 **/proc/meminfo** 文件。像 /proc/kcore 一样,这也是一个虚拟文件,它可以提供关于安装/使用了多少内存以及可用内存的报告。显然空闲内存和可用内存并不是同一回事。MemFree 看起来代表未使用的 RAM。MemAvailable则是对于启动新程序时可使用的内存的一个估计。
```
$ head -3 /proc/meminfo
MemTotal: 6102476 kB
MemFree: 4090596 kB
MemAvailable: 4984040 kB
```
如果只想查看内存总计,可以使用下面的命令之一:
```
$ awk '/MemTotal/ {print $2}' /proc/meminfo
6102476
$ grep MemTotal /proc/meminfo
MemTotal: 6102476 kB
```
**DirectMap** 将内存信息分为几类。
```
$ grep DirectMap /proc/meminfo
DirectMap4k: 213568 kB
DirectMap2M: 6076416 kB
```
DirectMap4k 代表被映射成标准 4 k 页的内存大小DirectMap2M 则显示了被映射为 2 MB 的页的内存大小。
**getconf** 命令将会提供比我们大多数人想要看到的更多的信息。
```
$ getconf -a | more
LINK_MAX 65000
_POSIX_LINK_MAX 65000
MAX_CANON 255
_POSIX_MAX_CANON 255
MAX_INPUT 255
_POSIX_MAX_INPUT 255
NAME_MAX 255
_POSIX_NAME_MAX 255
PATH_MAX 4096
_POSIX_PATH_MAX 4096
PIPE_BUF 4096
_POSIX_PIPE_BUF 4096
SOCK_MAXBUF
_POSIX_ASYNC_IO
_POSIX_CHOWN_RESTRICTED 1
_POSIX_NO_TRUNC 1
_POSIX_PRIO_IO
_POSIX_SYNC_IO
_POSIX_VDISABLE 0
ARG_MAX 2097152
ATEXIT_MAX 2147483647
CHAR_BIT 8
CHAR_MAX 127
--More--
```
使用类似下面的命令来将其输出精简为指定的内容,你会得到跟前文提到的其他命令相同的结果。
```
$ getconf -a | grep PAGES | awk 'BEGIN {total = 1} {if (NR == 1 || NR == 3) total *=$NF} END {print total / 1024" kB"}'
6102476 kB
```
上面的命令通过将下方输出的第一行和最后一行的值相乘来计算内存。
```
PAGESIZE 4096 <==
_AVPHYS_PAGES 1022511
_PHYS_PAGES 1525619 <==
```
自己动手计算一下,我们就知道这个值是怎么来的了。
```
$ expr 4096 \* 1525619 / 1024
6102476
```
显然值得为以上的指令之一设置个 alias。
另一个具有非常易于理解的输出的命令是 **top** 。在 top 输出的前五行,你可以看到一些数字显示多少内存正被使用。
```
$ top
top - 15:36:38 up 8 days, 2:37, 2 users, load average: 0.00, 0.00, 0.00
Tasks: 266 total, 1 running, 265 sleeping, 0 stopped, 0 zombie
%Cpu(s): 0.2 us, 0.4 sy, 0.0 ni, 99.4 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
MiB Mem : 3244.8 total, 377.9 free, 1826.2 used, 1040.7 buff/cache
MiB Swap: 3536.0 total, 3535.7 free, 0.3 used. 1126.1 avail Mem
```
最后一个命令将会以一个非常简洁的方式回答“系统安装了多少内存?”:
```
$ sudo dmidecode -t 17 | grep "Size.*MB" | awk '{s+=$2} END {print s / 1024 "GB"}'
6GB
```
取决于你想要获取多少细节Linux系统提供了许多用来查看系统安装内存以及使用/空闲内存的选择。
在 [Facebook][1] 或 [LinkedIn][2] 上加入 Network World 社区,评论最重要的话题。
--------------------------------------------------------------------------------
via: https://www.networkworld.com/article/3336174/linux/how-much-memory-is-installed-and-being-used-on-your-linux-systems.html
作者:[Sandra Henry-Stocker][a]
选题:[lujun9972][b]
译者:[leommxj](https://github.com/leommxj)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [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.facebook.com/NetworkWorld/
[2]: https://www.linkedin.com/company/network-world