mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-01-28 23:20:10 +08:00
Merge remote-tracking branch 'LCTT/master'
This commit is contained in:
commit
654cf57b5b
@ -1,34 +1,34 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (How to Convert Text Files between Unix and DOS (Windows) Formats)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-12558-1.html)
|
||||
[#]: subject: (How to Convert Text Files between Unix and DOS Windows Formats)
|
||||
[#]: via: (https://www.2daygeek.com/how-to-convert-text-files-between-unix-and-dos-windows-formats/)
|
||||
[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/)
|
||||
|
||||
如何在 Unix 和 DOS(Windows)格式之间转换文本文件
|
||||
如何将文本文件在 Unix 和 DOS(Windows)格式之间转换
|
||||
======
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202008/27/235550klfnz34lzpnchf7g.jpg)
|
||||
|
||||
作为一名 Linux 管理员,你可能已经注意到了一些开发者请求将文件从 DOS 格式转换为 Unix 格式,反之亦然。
|
||||
|
||||
这是因为这些文件是在 Windows 系统上创建的,并由于某种原因被复制到 Linux 系统上。
|
||||
|
||||
这本身没什么问题,但 Linux 系统上的一些应用可能不理解这些新的换行符,所以在使用之前,你需要转换它们。
|
||||
这本身没什么问题,但 Linux 系统上的一些应用可能不能理解这些新的换行符,所以在使用之前,你需要转换它们。
|
||||
|
||||
DOS 文本文件带有回车 (CR 或 \r) 和换行 (LF 或 \n) 对作为它们的换行符,而 Unix 文本只有换行 (LF) 符。
|
||||
DOS 文本文件带有回车(`CR` 或 `\r`)和换行(`LF` 或 `\n`)一对字符作为它们的换行符,而 Unix 文本只有换行(`LF`)符。
|
||||
|
||||
有很多方法可以将 DOS 文本文件转换为 Unix 格式。
|
||||
|
||||
但我推荐使用一个名为 **dos2unix** / **unix2dos** 的特殊工具将文本在 DOS 和 Unix 格式之间转换。
|
||||
但我推荐使用一个名为 `dos2unix` / `unix2dos` 的特殊工具将文本在 DOS 和 Unix 格式之间转换。
|
||||
|
||||
* **dos2unix:** 将文本文件从 DOS 格式转换为 Unix 格式。
|
||||
* **unix2dos:** 将文本文件从 Unix 格式转换为 DOS 格式。
|
||||
* **tr、awk 和 [sed 命令][1]:** 这些可以用于相同的目的。
|
||||
* `dos2unix`:将文本文件从 DOS 格式转换为 Unix 格式。
|
||||
* `unix2dos`:将文本文件从 Unix 格式转换为 DOS 格式。
|
||||
* `tr`、`awk` 和 [sed 命令][1]:这些可以用于相同的目的。
|
||||
|
||||
|
||||
|
||||
使用 od(八进制转储) 命令可以很容易地识别文件是 DOS 格式还是 Unix 格式,如下图所示。
|
||||
使用 `od`(<ruby>八进制转储<rt>octal dump</rt></ruby>)命令可以很容易地识别文件是 DOS 格式还是 Unix 格式,如下图所示:
|
||||
|
||||
```
|
||||
# od -bc windows.txt
|
||||
@ -55,9 +55,9 @@ n L i n u x \r \n
|
||||
0000231
|
||||
```
|
||||
|
||||
上面的输出清楚地表明这是一个 DOS 格式的文件,因为它包含了转义序列 **`\r\n`**。
|
||||
上面的输出清楚地表明这是一个 DOS 格式的文件,因为它包含了转义序列 `\r\n`。
|
||||
|
||||
同时,当你在终端上打印文件输出时,你会得到下面的输出。
|
||||
同时,当你在终端上打印文件输出时,你会得到下面的输出:
|
||||
|
||||
```
|
||||
# cat windows.txt
|
||||
@ -69,28 +69,28 @@ Anything can be done on Linux
|
||||
|
||||
### 如何在 Linux 上安装 dos2unix?
|
||||
|
||||
dos2unix 可以很容易地从发行版的官方仓库中安装。
|
||||
`dos2unix` 可以很容易地从发行版的官方仓库中安装。
|
||||
|
||||
对于 RHEL/CentOS 6/7 系统,使用 **[yum命令][2]** 安装 dos2unix。
|
||||
对于 RHEL/CentOS 6/7 系统,使用 [yum 命令][2] 安装 `dos2unix`。
|
||||
|
||||
```
|
||||
$ sudo yum install -y dos2unix
|
||||
```
|
||||
|
||||
对于 RHEL/CentOS 8 和 Fedora 系统,使用 **[dnf命令][3]** 安装 dos2unix。
|
||||
对于 RHEL/CentOS 8 和 Fedora 系统,使用 [dnf 命令][3] 安装 `dos2unix`。
|
||||
|
||||
```
|
||||
$ sudo yum install -y dos2unix
|
||||
```
|
||||
|
||||
对于基于 Debian 的系统,使用 **[apt 命令][4]** 或 **[apt-get 命令][5]** 来安装 dos2unix。
|
||||
对于基于 Debian 的系统,使用 [apt 命令][4] 或 [apt-get 命令][5] 来安装 `dos2unix`。
|
||||
|
||||
```
|
||||
$ sudo apt-get update
|
||||
$ sudo apt-get install dos2unix
|
||||
```
|
||||
|
||||
对于 openSUSE 系统,使用 **[zypper命令][6]** 安装 dos2unix。
|
||||
对于 openSUSE 系统,使用 [zypper命令][6] 安装 `dos2unix`。
|
||||
|
||||
```
|
||||
$ sudo zypper install -y dos2unix
|
||||
@ -98,9 +98,9 @@ $ sudo zypper install -y dos2unix
|
||||
|
||||
### 1)如何将 DOS 文件转换为 UNIX 格式?
|
||||
|
||||
以下命令将 ”windows.txt“ 文件从 DOS 转换为 Unix 格式。
|
||||
以下命令将 `windows.txt` 文件从 DOS 转换为 Unix 格式。
|
||||
|
||||
对该文件的修改是删除文件每行的 ”\r“。
|
||||
对该文件的修改是删除文件每行的 `\r`。
|
||||
|
||||
```
|
||||
# dos2unix windows.txt
|
||||
@ -141,31 +141,31 @@ i n u x \n
|
||||
dos2unix: converting file windows.txt to file unix.txt in Unix format …
|
||||
```
|
||||
|
||||
### 1a)如何使用 tr 命令将 DOS 文件转换为 UNIX 格式。
|
||||
#### 1a)如何使用 tr 命令将 DOS 文件转换为 UNIX 格式。
|
||||
|
||||
正如文章开头所讨论的,你可以如下所示使用 tr 命令将 DOS 文件转换为 Unix 格式。
|
||||
正如文章开头所讨论的,你可以如下所示使用 `tr` 命令将 DOS 文件转换为 Unix 格式。
|
||||
|
||||
```
|
||||
Syntax: tr -d '\r' < source_file > output_file
|
||||
```
|
||||
|
||||
下面的 tr 命令将 DOS 格式文件 ”windows.txt“ 转换为 Unix 格式文件 ”unix.txt“。
|
||||
下面的 `tr` 命令将 DOS 格式的文件 `windows.txt` 转换为 Unix 格式文件 `unix.txt`。
|
||||
|
||||
```
|
||||
# tr -d '\r' < windows.txt >unix.txt
|
||||
```
|
||||
|
||||
**注意:**不能使用 tr 命令将文件从 Unix 格式转换为 Windows(DOS)。
|
||||
注意:不能使用 `tr` 命令将文件从 Unix 格式转换为 Windows(DOS)。
|
||||
|
||||
### 1b)如何使用 awk 命令将 DOS 文件转换为 UNIX 格式。
|
||||
#### 1b)如何使用 awk 命令将 DOS 文件转换为 UNIX 格式。
|
||||
|
||||
使用以下 awk 命令格式将 DOS 文件转换为 Unix 格式。
|
||||
使用以下 `awk` 命令格式将 DOS 文件转换为 Unix 格式。
|
||||
|
||||
```
|
||||
Syntax: awk '{ sub("\r$", ""); print }' source_file.txt > output_file.txt
|
||||
```
|
||||
|
||||
以下 awk 命令将 DOS 文件 ”windows.txt“ 转换为 Unix 格式文件 ”unix.txt“。
|
||||
以下 `awk` 命令将 DOS 文件 `windows.txt` 转换为 Unix 格式文件 `unix.txt`。
|
||||
|
||||
```
|
||||
# awk '{ sub("\r$", ""); print }' windows.txt > unix.txt
|
||||
@ -173,7 +173,7 @@ Syntax: awk '{ sub("\r$", ""); print }' source_file.txt > output_file.txt
|
||||
|
||||
### 2)如何将 UNIX 文件转换为 DOS 格式?
|
||||
|
||||
当你把一个文件从 UNIX 转换为 DOS 格式时,它会在每一行中添加一个回车(CR 或 \r)。
|
||||
当你把一个文件从 UNIX 转换为 DOS 格式时,它会在每一行中添加一个回车(`CR` 或 `\r`)。
|
||||
|
||||
```
|
||||
# unix2dos unix.txt
|
||||
@ -187,15 +187,15 @@ unix2dos: converting file unix.txt to DOS format …
|
||||
unix2dos: converting file unix.txt to file windows.txt in DOS format …
|
||||
```
|
||||
|
||||
### 2a)如何使用 awk 命令将 UNIX 文件转换为 DOS 格式?
|
||||
#### 2a)如何使用 awk 命令将 UNIX 文件转换为 DOS 格式?
|
||||
|
||||
使用以下 awk 命令格式将 UNIX 文件转换为 DOS 格式。
|
||||
使用以下 `awk` 命令格式将 UNIX 文件转换为 DOS 格式。
|
||||
|
||||
```
|
||||
Syntax: awk 'sub("$", "\r")' source_file.txt > output_file.txt
|
||||
```
|
||||
|
||||
下面的 awk 命令将 “unix.txt” 文件转换为 DOS 格式文件 “windows.txt”。
|
||||
下面的 `awk` 命令将 `unix.txt` 文件转换为 DOS 格式文件 `windows.txt`。
|
||||
|
||||
```
|
||||
# awk 'sub("$", "\r")' unix.txt > windows.txt
|
||||
@ -208,7 +208,7 @@ via: https://www.2daygeek.com/how-to-convert-text-files-between-unix-and-dos-win
|
||||
作者:[Magesh Maruthamuthu][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/) 荣誉推出
|
||||
|
75
sources/talk/20200824 Origin stories about Unix.md、
Normal file
75
sources/talk/20200824 Origin stories about Unix.md、
Normal file
@ -0,0 +1,75 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Origin stories about Unix)
|
||||
[#]: via: (https://opensource.com/article/20/8/unix-history)
|
||||
[#]: author: (Jim Hall https://opensource.com/users/jim-hall)
|
||||
|
||||
Origin stories about Unix
|
||||
======
|
||||
Brian Kernighan, one of the original Unix gurus, shares his insights
|
||||
into the origins of Unix and its associated technology.
|
||||
![Old UNIX computer][1]
|
||||
|
||||
Brian W. Kernighan opens his book _Unix: A History and a Memoir_ with the line, "To understand how Unix happened, we have to understand Bell Labs, especially how it worked and the creative environment that it provided." And so begins a wonderful trip back in time, following the creation and development of early Unix with someone who was there.
|
||||
|
||||
You may recognize Brian Kernighan's name. He is the "K" in [AWK][2], the "K" in "K&R C" (he co-wrote the original "Kernighan and Ritchie" book about the C programming language), and he has authored and co-authored many books about Unix and technology. On my own bookshelf, I can find several of Kernighan's books, including _The Unix Programming Environment_ (with Rob Pike), _The AWK Programming Language_ (with Alfred Aho and Peter J. Weinberger), and _The C Programming Language_ (with Dennis M. Ritchie). And of course, his latest entry, _Unix: A History and a Memoir_.
|
||||
|
||||
I interviewed Brian about this most recent book. I think we spent equal amounts of time discussing the book as we did reminiscing about Unix and groff. Below are a few highlights of our conversation:
|
||||
|
||||
### JH: What prompted you to write this book?
|
||||
|
||||
BWK: I thought it would be nice to have a history of what happened at Bell Labs. Jon Gertner wrote a book, _The Idea Factory: Bell Labs and the Great Age of American Innovation_, that described the physical science work at Bell Labs. This was an authoritative work, very technical, and not something that I could do, but it was kind of the inspiration for this book.
|
||||
|
||||
There's also a book by James Gleick, _The Information: A History, a Theory, a Flood_, that isn't specific to Bell Labs, but it's very interesting. That was kind of an inspiration for this, too.
|
||||
|
||||
I originally wanted to write an academic history of the Labs, but I realized it was better to write something based on my own memories and the memories of those who were there at the time. So that's where the book came from.
|
||||
|
||||
### JH: What are a few stories from the book you'd like people to read about?
|
||||
|
||||
BWK: I think there are really two stories I'd like people to know about, and both of them are origin myths. I heard them afresh when Ken Thompson and I were at the [Vintage Computer Festival about a year ago][3].
|
||||
|
||||
One is the origin of Unix itself—how Bonnie, Ken's wife, went off on vacation for three weeks, just at the time that Ken thought he was about three weeks away from having a complete operating system. This was, of course, due to Ken's very competent programming abilities, and it was incredible he was able to pull it off. It was written entirely in Assembly and was really amazing work.
|
||||
|
||||
[Note: This story starts on page 33 in the book. I'll briefly relate it here. Thompson was working on "a disk scheduling algorithm that would try to maximize throughput on any disk," but particularly the PDP-7's very tall single-platter disk drive. In testing the algorithm, Thompson realized, "I was three weeks from an operating system." He broke down his work into three units—an editor, an assembler, and a kernel—and wrote one per week. And about that time, Bonnie took their son to visit Ken's parents in California, so Thompson had those three weeks to work undisturbed.]
|
||||
|
||||
And then there's the origin story for `grep`. Over the years, I'd gotten the story slightly wrong—I thought Ken had written `grep` entirely on demand. It was classic Ken that he had a great idea, a neat idea, a clean idea, and he was able to write it very quickly. Regular expressions (regex) were already present in the text editor, so really, he just pulled regex from the editor and turned it into a program.
|
||||
|
||||
[Note: This story starts on page 70 in the book. Doug McIlroy said, "Wouldn't it be great if we could look for things in files?" Thompson replied, "Let me think about it overnight," and the next morning presented McIlroy with the `grep` program he'd written.]
|
||||
|
||||
### JH: What other stories did you not get to tell in the book?
|
||||
|
||||
BWK: I immediately think of the "Peter Weinberger's face" story! There were a lot of pranks based on having a picture of Peter's face pop up in random places. Someone attached a picture of Peter with magnets to the metal wall of a stairway. And there was a meeting once where Peter was up in front, not in the audience. And while he was talking, everyone in the audience held up a mask that had Peter's face printed on it.
|
||||
|
||||
[Note: The "Peter Weinberger's face" story starts on page 47 in the book. Spinroot also has an [archive of the prank][4] with examples.]
|
||||
|
||||
I talked to a lot of people from the Labs about the book. I would email people, and I would receive long replies with more stories than I could fit into the length or the narrative. Honestly, there's probably a whole other book that someone else could write just based on those stories. It's amazing how many people come forward with stories about Unix and running Unix on systems I haven't even heard of.
|
||||
|
||||
## A fantastic read
|
||||
|
||||
_Unix: A History and a Memoir_ is well-titled. Throughout the book, Kernighan shares details on the rich history of Unix, including background on Bell Labs, the spark of Unix with CTSS and Multics in 1969, and the first edition in 1971. Kernighan also provides his own reflection on how Unix came to be such a dominant platform, including notes on portability, Unix tools, the Unix Wars, and Unix descendants such as Minix, Linux, BSD, and Plan9. You will also find nuggets of information and great stories that fill in details around some of the everyday features of Unix.
|
||||
|
||||
At just over 180 pages, _Unix: A History and a Memoir_ is a fantastic read. If you are a fan of Linux, or any open source Unix, including the BSD versions, you will want to read this book.
|
||||
|
||||
_Unix: A History and a Memoir_ is available on [Amazon][5] in paperback and e-book formats. Published by Kindle Direct Publishing, October 2019.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/8/unix-history
|
||||
|
||||
作者:[Jim Hall][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/jim-hall
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/retro_old_unix_computer.png?itok=SYAb2xoW (Old UNIX computer)
|
||||
[2]: https://opensource.com/resources/what-awk
|
||||
[3]: https://www.youtube.com/watch?v=EY6q5dv_B-o
|
||||
[4]: https://spinroot.com/pico/pjw.html
|
||||
[5]: https://www.amazon.com/dp/1695978552
|
@ -0,0 +1,102 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Why we open sourced our security project)
|
||||
[#]: via: (https://opensource.com/article/20/8/why-open-source)
|
||||
[#]: author: (Mike Bursell https://opensource.com/users/mikecamel)
|
||||
|
||||
Why we open sourced our security project
|
||||
======
|
||||
It’s not just coding that we do in the open.
|
||||
![A lock on the side of a building][1]
|
||||
|
||||
When Nathaniel McCallum and I embarked on the project that is now called [Enarx][2], we made one decision right at the beginning: the code for Enarx would be open source, a stance fully supported by our employer, Red Hat (see the [standard disclaimer][3] on my blog). All of it, and forever.
|
||||
|
||||
That's a decision that we've not regretted at any point, and it's something we stand behind. As soon as we had enough code for a demo and were ready to show it, we created a [repository on GitHub][4] and made it public. There's a very small exception, which is that there are some details of upcoming chip features that are shared with us under an NDA[1][5] where publishing any code we might write for them would be a breach of the NDA. But where this applies (which is rarely), we are absolutely clear with the vendors that we intend to make the code open as soon as possible, and we lobby them to release details as early as they can (which may be earlier than they might prefer) so that more experts can look over both their designs and our code.
|
||||
|
||||
### Auditability and trust
|
||||
|
||||
This brings us to possibly the most important reasons for making Enarx open source: auditability and trust. Enarx is a security-related project, and I believe passionately not only that [security should be done in the open][6] but also that if anybody is actually going to trust their sensitive data, algorithms, and workloads to a piece of software, then they want to be in a position where as many experts as possible have looked at it, scrutinised it, criticised it, and improved it, whether that is the people running the software, their employees, contractors, or (even better) the wider security community. The more people who check the code, the happier you should be to [trust it][7]. This is important for any piece of security software, but it is _vital_ for software such as Enarx, which is designed to protect your most sensitive workloads.
|
||||
|
||||
### Bug catching
|
||||
|
||||
There are bugs in Enarx. I know: I'm writing some of the code,[2][8] and I found one yesterday (which I'd put in), just as I was about to give a demo.[3][9] It is very, very difficult to write perfect code, and we know that if we make our source open, then more people can help us fix issues.
|
||||
|
||||
### Commonwealth
|
||||
|
||||
For Nathaniel and me, open source is an ethical issue, and we make no apologies for that. I think it's the same for most, if not all, of the team working on Enarx. This includes a number of Red Hat employees (see standard disclaimer), so it shouldn't come as a surprise, but we also have non-Red Hat contributors from a number of backgrounds. We feel that Enarx should be a Common Good and [contribute to the commonwealth][10] of intellectual property out there.
|
||||
|
||||
### More brainpower
|
||||
|
||||
Making something open source doesn't just make it easier to fix bugs: it can improve the quality of what you produce in general. The more brainpower you have to apply to the problem, the better your chances of making something great––assuming that the brainpower is applied efficiently (not always an easy task!). In a recent design meeting, one of the participants said towards the end, "I'm sure I could implement some of this, but I don't know a huge amount about this topic, and I'm worried that I'm not contributing to this discussion." In fact, they had contributed by asking questions and clarifying some points, and we assured them that we wanted to include experienced, senior developers for their expertise and knowledge and to pull out assumptions and validate the design, and not because we expected everybody to be experts in all parts of the project.
|
||||
|
||||
Having bright people involved in design and coding spreads expertise and knowledge and helps keep the work from becoming an insulated, isolated "ivory tower" construction, understood by few, and almost impossible to validate.
|
||||
|
||||
### Not just code
|
||||
|
||||
It's not just coding that we do in the open. We manage our architecture in the open, our design meetings, our protocol design, our design methodology,[4][11] our documentation, our bug tracking, our chat, our CI/CD processes: all of it is open. The one exception is our [vulnerability management][12] process, which needs the opportunity for confidential exposure for a limited time. Here is where you can find our resources:
|
||||
|
||||
* [Code][4]
|
||||
* [Wiki][13]
|
||||
* Design is on the wiki and [request for comments][14] repo
|
||||
* [Issues][15] and [pull requests][16]
|
||||
* [Chat][17] (thanks to [Rocket.chat][18]!)
|
||||
* CI/CD resources thanks to [Packet][19]!
|
||||
* [Stand-ups][20]
|
||||
|
||||
|
||||
|
||||
We also take diversity seriously, and the project contributors are subject to the [Contributor Covenant Code of Conduct][21].
|
||||
|
||||
In short, Enarx is an open project. I'm sure we could do better, and we'll strive for that, but our underlying principles are that open is good in general and vital for security. If you agree, please come and visit!
|
||||
|
||||
* * *
|
||||
|
||||
1. Non-disclosure agreement
|
||||
2. To the surprise of many of the team, including myself. At least it's not in Perl.
|
||||
3. I fixed it. Admittedly, after the demo.
|
||||
4. We've just moved to a sprint pattern, the details of which we designed and agreed to in the open.
|
||||
|
||||
|
||||
|
||||
* * *
|
||||
|
||||
_This article was originally published on [Alice, Eve, and Bob][22] and is adapted and reprinted with the author's permission._
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/8/why-open-source
|
||||
|
||||
作者:[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://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://enarx.dev/
|
||||
[3]: https://aliceevebob.com/
|
||||
[4]: https://github.com/enarx
|
||||
[5]: tmp.PM1nWCfATC#1
|
||||
[6]: https://opensource.com/article/17/10/many-eyes
|
||||
[7]: https://aliceevebob.com/2019/06/18/trust-choosing-open-source/
|
||||
[8]: tmp.PM1nWCfATC#2
|
||||
[9]: tmp.PM1nWCfATC#3
|
||||
[10]: https://opensource.com/article/17/11/commonwealth-open-source
|
||||
[11]: tmp.PM1nWCfATC#4
|
||||
[12]: https://aliceevebob.com/2020/05/26/security-disclosure-or-vulnerability-management/
|
||||
[13]: https://github.com/enarx/enarx/wiki
|
||||
[14]: https://github.com/enarx/rfcs
|
||||
[15]: https://github.com/enarx/enarx/issues
|
||||
[16]: https://github.com/enarx/enarx/pulls
|
||||
[17]: https://chat.enarx.dev/
|
||||
[18]: https://rocket.chat/
|
||||
[19]: https://packet.com/
|
||||
[20]: https://github.com/enarx/enarx/wiki/How-to-contribute
|
||||
[21]: https://github.com/enarx/.github/blob/master/CODE_OF_CONDUCT.md
|
||||
[22]: https://aliceevebob.com/2020/07/28/why-enarx-is-open/
|
140
sources/talk/20200826 What is DNS and how does it work.md
Normal file
140
sources/talk/20200826 What is DNS and how does it work.md
Normal file
@ -0,0 +1,140 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (What is DNS and how does it work?)
|
||||
[#]: via: (https://www.networkworld.com/article/3268449/what-is-dns-and-how-does-it-work.html)
|
||||
[#]: author: (Keith Shaw and Josh Fruhlinger )
|
||||
|
||||
What is DNS and how does it work?
|
||||
======
|
||||
The Domain Name System resolves the names of internet sites with their underlying IP addresses adding efficiency and even security in the process.
|
||||
Thinkstock
|
||||
|
||||
The Domain Name System (DNS) is one of the foundations of the internet, yet most people outside of networking probably don’t realize they use it every day to do their jobs, check their email or waste time on their smartphones.
|
||||
|
||||
At its most basic, DNS is a directory of names that match with numbers. The numbers, in this case are IP addresses, which computers use to communicate with each other. Most descriptions of DNS use the analogy of a phone book, which is fine for people over the age of 30 who know what a phone book is.
|
||||
|
||||
[[Get regularly scheduled insights by signing up for Network World newsletters.]][1]
|
||||
|
||||
If you’re under 30, think of DNS like your smartphone’s contact list, which matches people’s names with their phone numbers and email addresses. Then multiply that contact list by everyone else on the planet.
|
||||
|
||||
### A brief history of DNS
|
||||
|
||||
When the internet was very, very small, it was easier for people to correspond specific IP addresses with specific computers, but that didn’t last for long as more devices and people joined the growing network. It's still possible to type a specific IP address into a browser to reach a website, but then, as now, people wanted an address made up of easy-to-remember words, of the sort that we would recognize as a domain name (like networkworld.com) today. In the 1970s and early '80s, those names and addresses were assigned by one person — [Elizabeth Feinler at Stanford][2] – who maintained a master list of every Internet-connected computer in a text file called [HOSTS.TXT][3].
|
||||
|
||||
This was obviously an untenable situation as the Internet grew, not least because Feinler only handled requests before 6 p.m. California time, and took time off for Christmas. In 1983, Paul Mockapetris, a researcher at USC, was tasked with coming up with a compromise among multiple suggestions for dealing with the problem. He basically ignored them all and developed his own system, which he dubbed DNS. While it's obviously changed quite a bit since then, at a fundamental level it still works the same way it did nearly 40 years ago.
|
||||
|
||||
### How DNS servers work
|
||||
|
||||
The DNS directory that matches name to numbers isn’t located all in one place in some dark corner of the internet. With [more than 332 million domain names listed at the end of 2017][4], a single directory would be very large indeed. Like the internet itself, the directory is distributed around the world, stored on domain name servers (generally referred to as DNS servers for short) that all communicate with each other on a very regular basis to provide updates and redundancies.
|
||||
|
||||
### Authoritative DNS servers vs. recursive DNS servers
|
||||
|
||||
When your computer wants to find the IP address associated with a domain name, it first makes its request to a recursive DNS server, also known as recursive resolver*.* A recursive resolver is a server that is usually operated by an ISP or other third-party provider, and it knows which other DNS servers it needs to ask to resolve the name of a site with its IP address. The servers that actually have the needed information are called authoritative DNS servers*.*
|
||||
|
||||
### DNS servers and IP addresses
|
||||
|
||||
Each domain can correspond to more than one IP address. In fact, some sites have hundreds or more IP addresses that correspond with a single domain name. For example, the server your computer reaches for [www.google.com][5] is likely completely different from the server that someone in another country would reach by typing the same site name into their browser.
|
||||
|
||||
Another reason for the distributed nature of the directory is the amount of time it would take for you to get a response when you were looking for a site if there was only one location for the directory, shared among the millions, probably billions, of people also looking for information at the same time. That’s one long line to use the phone book.
|
||||
|
||||
### What is DNS caching?
|
||||
|
||||
To get around this problem, DNS information is shared among many servers. But information for sites visited recently is also cached locally on client computers. Chances are that you use google.com several times a day. Instead of your computer querying the DNS name server for the IP address of google.com every time, that information is saved on your computer so it doesn’t have to access a DNS server to resolve the name with its IP address. Additional caching can occur on the routers used to connect clients to the internet, as well as on the servers of the user’s Internet Service Provider (ISP). With so much caching going on, the number of queries that actually make it to DNS name servers is a lot lower than it would seem.
|
||||
|
||||
### How do I find my DNS server?
|
||||
|
||||
Generally speaking, the DNS server you use will be established automatically by your network provider when you connect to the internet. If you want to see which servers are your primary nameservers — generally the recursive resolver, as described above — there are web utilities that can provide a host of information about your current network connection. [Browserleaks.com][6] is a good one, and it provides a lot of information, including your current DNS servers.
|
||||
|
||||
### Can I use 8.8.8.8 DNS?
|
||||
|
||||
It's important to keep in mind, though, that while your ISP will set a default DNS server, you're under no obligation to use it. Some users may have reason to avoid their ISP's DNS — for instance, some ISPs use their DNS servers to redirect requests for nonexistent addresses to [pages with advertising][7].
|
||||
|
||||
If you want an alternative, you can instead point your computer to a public DNS server that will act as a recursive resolver. One of the most prominent public DNS servers is Google's; its IP address is 8.8.8.8. Google's DNS services tend to be [fast][8], and while there are certain questions about the [ulterior motives Google has for offering the free service][9], they can't really get any more information from you that they don't already get from Chrome. Google has a page with detailed instructions on how to [configure your computer or router][10] to connect to Google's DNS.
|
||||
|
||||
### How DNS adds efficiency
|
||||
|
||||
DNS is organized in a hierarchy that helps keep things running quickly and smoothly. To illustrate, let’s pretend that you wanted to visit networkworld.com.
|
||||
|
||||
The initial request for the IP address is made to a recursive resolver, as discussed above. The recursive resolver knows which other DNS servers it needs to ask to resolve the name of a site (networkworld.com) with its IP address. This search leads to a root server, which knows all the information about top-level domains, such as .com, .net, .org and all of those country domains like .cn (China) and .uk (United Kingdom). Root servers are located all around the world, so the system usually directs you to the closest one geographically.
|
||||
|
||||
Once the request reaches the correct root server, it goes to a top-level domain (TLD) name server, which stores the information for the second-level domain, the words used before you get to the .com, .org, .net (for example, that information for networkworld.com is “networkworld”). The request then goes to the Domain Name Server, which holds the information about the site and its IP address. Once the IP address is discovered, it is sent back to the client, which can now use it to visit the website. All of this takes mere milliseconds.
|
||||
|
||||
Because DNS has been working for the past 30-plus years, most people take it for granted. Security also wasn’t considered when building the system, so [hackers have taken full advantage of this][11], creating a variety of attacks.
|
||||
|
||||
### DNS reflection attacks
|
||||
|
||||
DNS reflection attacks can swamp victims with high-volume messages from DNS resolver servers. Attackers request large DNS files from all the open DNS resolvers they can find and do so using the spoofed IP address of the victim. When the resolvers respond, the victim receives a flood of unrequested DNS data that overwhelms their machines.
|
||||
|
||||
### DNS cache poisoning
|
||||
|
||||
[DNS cache poisoning][12] can divert users to malicious Web sites. Attackers manage to insert false address records into the DNS so when a potential victim requests an address resolution for one of the poisoned sites, the DNS responds with the IP address for a different site, one controlled by the attacker. Once on these phony sites, victims may be tricked into giving up passwords or suffer malware downloads.
|
||||
|
||||
### DNS resource exhaustion
|
||||
|
||||
[DNS resource exhaustion][13] attacks can clog the DNS infrastructure of ISPs, blocking the ISP’s customers from reaching sites on the internet. This can be done by attackers registering a domain name and using the victim’s name server as the domain’s authoritative server. So if a recursive resolver can’t supply the IP address associated with the site name, it will ask the name server of the victim. Attackers generate large numbers of requests for their domain and toss in non-existent subdomains to boot, which leads to a torrent of resolution requests being fired at the victim’s name server, overwhelming it.
|
||||
|
||||
### What is DNSSec?
|
||||
|
||||
DNS Security Extensions is an effort to make communication among the various levels of servers involved in DNS lookups more secure. It was devised by the Internet Corporation for Assigned Names and Numbers (ICANN), the organization in charge of the DNS system.
|
||||
|
||||
ICANN became aware of weaknesses in the communication between the DNS top-level, second-level and third-level directory servers that could allow attackers to hijack lookups. That would allow the attackers to respond to requests for lookups to legitimate sites with the IP address for malicious sites. These sites could upload malware to users or carry out phishing and pharming attacks.
|
||||
|
||||
DNSSEC would address this by having each level of DNS server digitally sign its requests, which insures that the requests sent in by end users aren’t commandeered by attackers. This creates a chain of trust so that at each step in the lookup, the integrity of the request is validated.
|
||||
|
||||
In addition, DNSSec can determine if domain names exist, and if one doesn’t, it won’t let that fraudulent domain be delivered to innocent requesters seeking to have a domain name resolved.
|
||||
|
||||
As more domain names are created, and more devices continue to join the network via internet of things devices and other “smart” systems, and as [more sites migrate to IPv6][14], maintaining a healthy DNS ecosystem will be required. The growth of big data and analytics also [brings a greater need for DNS management][15].
|
||||
|
||||
### SIGRed: A wormable DNS flaw rears its head
|
||||
|
||||
The world got a good look recently at the sort of chaos weaknesses in DNS could cause with the discovery of a flaw in Windows DNS servers. The potential security hole, dubbed SIGRed, [requires a complex attack chain][16], but can exploit unpatched Windows DNS servers to potentially install and execute arbitrary malicious code on clients. And the exploit is "wormable," meaning that it can spread from computer to computer without human intervention. The vulnerability was considered alarming enough that U.S. federal agencies were [given only a few days to install patches][17].
|
||||
|
||||
### DNS over HTTPS: A new privacy landscape
|
||||
|
||||
As of this writing, DNS is on the verge of one of its biggest shifts in its history. Google and Mozilla, who together control the lion's share of the browser market, are encouraging a move towards [DNS over HTTPS][18], or DoH, in which DNS requests are encrypted by the same HTTPS protocol that already protects most web traffic. In Chrome's implementation, the browser checks to see if the DNS servers support DoH, and if they don't, it reroutes DNS requests to Google's 8.8.8.8.
|
||||
|
||||
It's a move not without controversy. Paul Vixie, who did much of the early work on the DNS protocol back in the 1980s, calls the move a "[disaster][19]" for security: corporate IT will have a much harder time monitoring or directing DoH traffic that traverses their network, for instance. Still, Chrome is omnipresent and DoH will soon be turned on by default, so we'll see what the future holds.
|
||||
|
||||
_(Keith Shaw is_ _a former senior editor for Network World and_ _an award-winning writer, editor and product reviewer who has written for many publications and websites around the world.)_
|
||||
|
||||
_(Josh Fruhlinger is a writer and editor who lives in Los Angeles.)_
|
||||
|
||||
Join the Network World communities on [Facebook][20] and [LinkedIn][21] to comment on topics that are top of mind.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.networkworld.com/article/3268449/what-is-dns-and-how-does-it-work.html
|
||||
|
||||
作者:[Keith Shaw and Josh Fruhlinger][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.networkworld.com/newsletters/signup.html
|
||||
[2]: https://www.internethalloffame.org/blog/2012/07/23/why-does-net-still-work-christmas-paul-mockapetris
|
||||
[3]: https://tools.ietf.org/html/rfc608
|
||||
[4]: http://www.verisign.com/en_US/domain-names/dnib/index.xhtml?section=cc-tlds
|
||||
[5]: http://www.google.com
|
||||
[6]: https://browserleaks.com/ip
|
||||
[7]: https://www.networkworld.com/article/2246426/comcast-redirects-bad-urls-to-pages-with-advertising.html
|
||||
[8]: https://www.networkworld.com/article/3194890/comparing-the-performance-of-popular-public-dns-providers.html
|
||||
[9]: https://blog.dnsimple.com/2015/03/why-and-how-to-use-googles-public-dns/
|
||||
[10]: https://developers.google.com/speed/public-dns/docs/using
|
||||
[11]: https://www.networkworld.com/article/2838356/network-security/dns-is-ubiquitous-and-its-easily-abused-to-halt-service-or-steal-data.html
|
||||
[12]: https://www.networkworld.com/article/2277316/tech-primers/tech-primers-how-dns-cache-poisoning-works.html
|
||||
[13]: https://www.cloudmark.com/releases/docs/whitepapers/dns-resource-exhaustion-v01.pdf
|
||||
[14]: https://www.networkworld.com/article/3254575/lan-wan/what-is-ipv6-and-why-aren-t-we-there-yet.html
|
||||
[15]: http://social.dnsmadeeasy.com/blog/opinion/future-big-data-dns-analytics/
|
||||
[16]: https://www.csoonline.com/article/3567188/wormable-dns-flaw-endangers-all-windows-servers.html
|
||||
[17]: https://federalnewsnetwork.com/cybersecurity/2020/07/cisa-gives-agencies-a-day-to-remedy-windows-dns-server-vulnerability/
|
||||
[18]: https://www.networkworld.com/article/3322023/dns-over-https-seeks-to-make-internet-use-more-private.html
|
||||
[19]: https://www.theregister.com/2018/10/23/paul_vixie_slaps_doh_as_dns_privacy_feature_becomes_a_standard/
|
||||
[20]: https://www.facebook.com/NetworkWorld/
|
||||
[21]: https://www.linkedin.com/company/network-world
|
@ -0,0 +1,98 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (What is IPv6, and why aren’t we there yet?)
|
||||
[#]: via: (https://www.networkworld.com/article/3254575/what-is-ipv6-and-why-aren-t-we-there-yet.html)
|
||||
[#]: author: (Keith Shaw and Josh Fruhlinger )
|
||||
|
||||
What is IPv6, and why aren’t we there yet?
|
||||
======
|
||||
IPv6 has been in the works since 1998 to address the shortfall of IP addresses available under Ipv4, yet despite its efficiency and security advantages, adoption is still slow.
|
||||
Thinkstock
|
||||
|
||||
For the most part the dire warnings about running out of internet addresses have ceased because, slowly but surely, migration from the world of Internet Protocol Version 4 (IPv4) to IPv6 has begun, and software is in place to prevent the address apocalypse that many were predicting.
|
||||
|
||||
But before we see where are and where we’re going with IPv6, let’s go back to the early days of internet addressing.
|
||||
|
||||
**[ Related: [IPv6 deployment guide][1] + [How to plan your migration to IPv6][2] ]**
|
||||
|
||||
### What is IPv6 and why is it important?
|
||||
|
||||
IPv6 is the latest version of the Internet Protocol, which identifies devices across the internet so they can be located. Every device that uses the internet is identified through its own IP address in order for internet communication to work. In that respect, it’s just like the street addresses and zip codes you need to know in order to mail a letter.
|
||||
|
||||
The previous version, IPv4, uses a 32-bit addressing scheme to support 4.3 billion devices, which was thought to be enough. However, the growth of the internet, personal computers, smartphones and now Internet of Things devices proves that the world needed more addresses.
|
||||
|
||||
Fortunately, the Internet Engineering Task Force (IETF) recognized this 20 years ago. In 1998 it created IPv6, which instead uses 128-bit addressing to support approximately 340 trillion trillion (or 2 to the 128th power, if you like). Instead of the IPv4 address method of four sets of one- to three-digit numbers, IPv6 uses eight groups of four hexadecimal digits, separated by colons.
|
||||
|
||||
### What are the benefits of IPv6?
|
||||
|
||||
In its work, the IETF included enhancements to IPv6 compared with IPv4. The IPv6 protocol can handle packets more efficiently, improve performance and increase security. It enables internet service providers to reduce the size of their routing tables by making them more hierarchical.
|
||||
|
||||
### Network address translation (NAT) and IPv6
|
||||
|
||||
Adoption of IPv6 has been delayed in part due to network address translation (NAT), which takes private IP addresses and turns them into public IP addresses. That way a corporate machine with a private IP address can send to and receive packets from machines located outside the private network that have public IP addresses.
|
||||
|
||||
Without NAT, large corporations with thousands or tens of thousands of computers would devour enormous quantities of public IPv4 addresses if they wanted to communicate with the outside world. But those IPv4 addresses are limited and nearing exhaustion to the point of having to be rationed.
|
||||
|
||||
NAT helps alleviate the problem. With NAT, thousands of privately addressed computers can be presented to the public internet by a NAT machine such as a firewall or router.
|
||||
|
||||
The way NAT works is when a corporate computer with a private IP address sends a packet to a public IP address outside the corporate network, it first goes to the NAT device. The NAT notes the packet’s source and destination addresses in a translation table.
|
||||
|
||||
The NAT changes the source address of the packet to the public-facing address of the NAT device and sends it along to the external destination. When a packet replies, the NAT translates the destination address to the private IP address of the computer that initiated the communication. This can be done so that a single public IP address can represent multiple privately addressed computers.
|
||||
|
||||
### Who is deploying IPv6?
|
||||
|
||||
Carrier networks and ISPs have been the first group to start deploying IPv6 on their networks, with mobile networks leading the charge. For example, T-Mobile USA has more than 90% of its traffic going over IPv6, with Verizon Wireless close behind at 82.25%. Comcast and AT&T have its networks at 63% and 65%, respectively, according to the industry group [World Ipv6 Launch][3].
|
||||
|
||||
Major websites are following suit - just under 30% of the Alexa Top 1000 websites are currently reachable over IPv6, World IPv6 Launch says.
|
||||
|
||||
Enterprises are trailing in deployment, with slightly under one-fourth of enterprises advertising IPv6 prefixes, according to the Internet Society’s [“State of IPv6 Deployment 2017” report][4]. Complexity, costs and time needed to complete are all reasons given. In addition, some projects have been delayed due to software compatibility. For example, a [January 2017 report][5] said a bug in Windows 10 was “undermining Microsoft’s efforts to roll out an IPv6-only network at its Seattle headquarters.”
|
||||
|
||||
### When will more deployments occur?
|
||||
|
||||
The Internet Society said the price of IPv4 addresses will peak in 2018, and then prices will drop after IPv6 deployment passes the 50% mark. Currently, [according to Google][6], the world has 20% to 22% IPv6 adoption, but in the U.S. it’s about 32%).
|
||||
|
||||
As the price of IPv4 addresses begin to drop, the Internet Society suggests that enterprises sell off their existing IPv4 addresses to help fund IPv6 deployment. The Massachusetts Institute of Technology has done this, according to [a note posted on GitHub][7]. The university concluded that 8 million of its IPv4 addresses were “excess” and could be sold without impacting current or future needs since it also holds 20 nonillion IPv6 addresses. (A nonillion is the numeral one followed by 30 zeroes.)
|
||||
|
||||
In addition, as more deployments occur, more companies will start charging for the use of IPv4 addresses, while providing IPv6 services for free. [UK-based ISP Mythic Beasts][8] says “IPv6 connectivity comes as standard,” while “IPv4 connectivity is an optional extra.”
|
||||
|
||||
### When will IPv4 be “shut off”?
|
||||
|
||||
Most of the world [“ran out” of new IPv4 addresses][9] between 2011 and 2018 – but we won’t completely be out of them as IPv4 addresses get sold and re-used (as mentioned earlier), and any leftover addresses will be used for IPv6 transitions.
|
||||
|
||||
There’s no official switch-off date, so people shouldn’t be worried that their internet access will suddenly go away one day. As more networks transition, more content sites support IPv6 and more end users upgrade their equipment for IPv6 capabilities, the world will slowly move away from IPv4.
|
||||
|
||||
### Why is there no IPv5?
|
||||
|
||||
There was an IPv5 that was also known as Internet Stream Protocol, abbreviated simply as ST. It was designed for connection-oriented communications across IP networks with the intent of supporting voice and video.
|
||||
|
||||
It was successful at that task, and was used experimentally. One shortcoming that undermined its popular use was its 32-bit address scheme – the same scheme used by IPv4. As a result, it had the same problem that IPv4 had – a limited number of possible IP addresses. That led to the development and eventual adoption of IPv6. Even though IPv5 was never adopted publicly, it had used up the name IPv5.
|
||||
|
||||
Join the Network World communities on [Facebook][10] and [LinkedIn][11] to comment on topics that are top of mind.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.networkworld.com/article/3254575/what-is-ipv6-and-why-aren-t-we-there-yet.html
|
||||
|
||||
作者:[Keith Shaw and Josh Fruhlinger][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.networkworld.com/article/3235805/lan-wan/ipv6-deployment-guide.html#tk.nww-fsb
|
||||
[2]: https://www.networkworld.com/article/3214388/lan-wan/how-to-plan-your-migration-to-ipv6.html#tk.nww-fsb
|
||||
[3]: http://www.worldipv6launch.org/measurements/
|
||||
[4]: https://www.internetsociety.org/resources/doc/2017/state-of-ipv6-deployment-2017/
|
||||
[5]: https://www.theregister.co.uk/2017/01/19/windows_10_bug_undercuts_ipv6_rollout/https://www.theregister.co.uk/2017/01/19/windows_10_bug_undercuts_ipv6_rollout/
|
||||
[6]: https://www.google.com/intl/en/ipv6/statistics.html
|
||||
[7]: https://gist.github.com/simonster/e22e50cd52b7dffcf5a4db2b8ea4cce0
|
||||
[8]: https://www.mythic-beasts.com/sales/ipv6
|
||||
[9]: https://ipv4.potaroo.net/
|
||||
[10]: https://www.facebook.com/NetworkWorld/
|
||||
[11]: https://www.linkedin.com/company/network-world
|
@ -0,0 +1,60 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Information could be half the world's mass by 2245, says researcher)
|
||||
[#]: via: (https://www.networkworld.com/article/3570438/information-could-be-half-the-worlds-mass-by-2245-says-researcher.html)
|
||||
[#]: author: (Patrick Nelson https://www.networkworld.com/author/Patrick-Nelson/)
|
||||
|
||||
Information could be half the world's mass by 2245, says researcher
|
||||
======
|
||||
Because of the amount of energy and resources used to create and store digital information, the data should be considered physical, and not just invisible ones and zeroes, according to one theoretical physicist.
|
||||
Luza Studios / Getty Images
|
||||
|
||||
Digital content should be considered a fifth state of matter, along with gas, liquid, plasma and solid, suggests one university scholar.
|
||||
|
||||
Because of the energy and resources used to create, store and distribute data physically and digitally, data has evolved and should now be considered as mass, according to Melvin Vopson, a senior lecturer at the U.K.'s University of Portsmouth and author of an article, "[The information catastrophe][1]," published in the journal AIP Advances.
|
||||
|
||||
Vopson also claims digital bits are on a course to overwhelm the planet and will eventually outnumber atoms.
|
||||
|
||||
The idea of assigning mass to digital information builds off some existing data points. Vopson cites an IBM estimate that finds data is created at a rate of 2.5 quintillion bytes every day. He also factors in data storage densities of more than 1 terabit per inch to compare the size of a bit to the size of an atom.
|
||||
|
||||
Presuming 50% annual growth in data generation, "the number of bits would equal the number of atoms on Earth in approximately 150 years," according to a [media release][2] announcing Vopson's research.
|
||||
|
||||
"It would be approximately 130 years until the power needed to sustain digital information creation would equal all the power currently produced on planet Earth, and by 2245, half of Earth's mass would be converted to digital information mass," the release reads.
|
||||
|
||||
The COVID-19 pandemic is increasing the rate of digital data creation and accelerating this process, Vopson adds.
|
||||
|
||||
He warns of an impending saturation point: "Even assuming that future technological progress brings the bit size down to sizes closer to the atom itself, this volume of digital information will take up more than the size of the planet, leading to what we define as the information catastrophe," Vopson writes in the [paper][3].
|
||||
|
||||
"We are literally changing the planet bit by bit, and it is an invisible crisis," says Vopson, a former R&D scientist at Seagate Technology.
|
||||
|
||||
Vopson isn't alone in exploring the idea that information isn't simply imperceptible ones and zeroes. According to the release, Vopson draws on the mass-energy comparisons in Einstein's theory of general relativity; the work of Rolf Landauer, who applied the laws of thermodynamics to information; and the work of Claude Shannon, the inventor of the digital bit.
|
||||
|
||||
"When one brings information content into existing physical theories, it is almost like an extra dimension to everything in physics," Vopson says.
|
||||
|
||||
With a growth rate that seems unstoppable, digital information production "will consume most of the planetary power capacity, leading to ethical and environmental concerns," his paper concludes.
|
||||
|
||||
Interestingly – and a bit more out there – Vopson also suggests that if, as he projects, the future mass of the planet is made up predominantly of bits of information, and there exists enough power created to do it (not certain), then "one could envisage a future world mostly computer simulated and dominated by digital bits and computer code," he writes.
|
||||
|
||||
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/3570438/information-could-be-half-the-worlds-mass-by-2245-says-researcher.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://aip.scitation.org/doi/10.1063/5.0019941
|
||||
[2]: https://publishing.aip.org/publications/latest-content/digital-content-on-track-to-equal-half-earths-mass-by-2245/
|
||||
[3]: https://aip.scitation.org/doi/full/10.1063/5.0019941
|
||||
[4]: https://www.facebook.com/NetworkWorld/
|
||||
[5]: https://www.linkedin.com/company/network-world
|
@ -0,0 +1,177 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Recognize more devices on Linux with this USB ID Repository)
|
||||
[#]: via: (https://opensource.com/article/20/8/usb-id-repository)
|
||||
[#]: author: (Alan Formy-Duval https://opensource.com/users/alanfdoss)
|
||||
|
||||
Recognize more devices on Linux with this USB ID Repository
|
||||
======
|
||||
An open source project contains a public repository of all known IDs
|
||||
used in USB devices.
|
||||
![Multiple USB plugs in different colors][1]
|
||||
|
||||
There are thousands of USB devices on the market—keyboards, scanners, printers, mouses, and countless others that all work on Linux. Their vendor details are stored in the USB ID Repository.
|
||||
|
||||
### lsusb
|
||||
|
||||
The Linux `lsusb` command lists information about the USB devices connected to a system, but sometimes the information is incomplete. For example, I recently noticed that the brand of one of my USB devices was not recognized. the device was functional, but listing the details of my connected USB devices provided no identification information. Here is the output from my `lsusb` command:
|
||||
|
||||
|
||||
```
|
||||
$ lsusb
|
||||
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
|
||||
Bus 001 Device 004: ID 046d:082c Logitech, Inc.
|
||||
Bus 001 Device 003: ID 0951:16d2 Kingston Technology
|
||||
Bus 001 Device 002: ID 18f8:1486
|
||||
Bus 001 Device 005: ID 051d:0002 American Power Conversion Uninterruptible Power Supply
|
||||
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
|
||||
```
|
||||
|
||||
As you can see in the last column, there is one device with no manufacturers description. To determine what the device is, I would have to do a deeper inspection of my USB device tree. Fortunately, the `lsusb` command has more options. One is `-D device`, to elicit per-device details, as the man page explains:
|
||||
|
||||
> "Do not scan the /dev/bus/usb directory, instead display only information about the device whose device file is given. The device file should be something like /dev/bus/usb/001/001. This option displays detailed information like the **v** option; you must be root to do this."
|
||||
|
||||
I didn't think it was easily apparent how to pass the device path to the lsusb command, but after carefully reading the man page and the initial output I was able to determine how to construct it. USB devices reside in the UDEV filesystem. Their device path begins in the USB device directory `/dev/bus/usb/`. The rest of the path is made up of the device's Bus ID and Device ID. My non-descript device is Bus 001, Device 002, which translates to 001/002, and completes the path `/dev/bus/usb/001/002`. Now I can pass this path to `lsusb`. I'll also pipe to `more` since there is often quite a lot of information there:
|
||||
|
||||
|
||||
```
|
||||
$ lsusb -D /dev/bus/usb/001/002 |more
|
||||
Device: ID 18f8:1486
|
||||
Device Descriptor:
|
||||
bLength 18
|
||||
bDescriptorType 1
|
||||
bcdUSB 1.10
|
||||
bDeviceClass 0 (Defined at Interface level)
|
||||
bDeviceSubClass 0
|
||||
bDeviceProtocol 0
|
||||
bMaxPacketSize0 8
|
||||
idVendor 0x18f8
|
||||
idProduct 0x1486
|
||||
bcdDevice 1.00
|
||||
iManufacturer 0
|
||||
iProduct 1
|
||||
iSerial 0
|
||||
bNumConfigurations 1
|
||||
Configuration Descriptor:
|
||||
bLength 9
|
||||
bDescriptorType 2
|
||||
wTotalLength 59
|
||||
bNumInterfaces 2
|
||||
bConfigurationValue 1
|
||||
iConfiguration 0
|
||||
bmAttributes 0xa0
|
||||
(Bus Powered)
|
||||
Remote Wakeup
|
||||
MaxPower 100mA
|
||||
Interface Descriptor:
|
||||
bLength 9
|
||||
bDescriptorType 4
|
||||
bInterfaceNumber 0
|
||||
bAlternateSetting 0
|
||||
bNumEndpoints 1
|
||||
bInterfaceClass 3 Human Interface Device
|
||||
bInterfaceSubClass 1 Boot Interface Subclass
|
||||
bInterfaceProtocol 2 Mouse
|
||||
iInterface 0
|
||||
HID Device Descriptor:
|
||||
```
|
||||
|
||||
Unfortunately, this didn't provide the detail I was hoping to find. The two fields that appear in the initial output, `idVendor` and `idProduct`, are both empty. There is some help, as scanning down a bit reveals the word **Mouse**. A-HA! So, this device is my mouse.
|
||||
|
||||
## The USB ID Repository
|
||||
|
||||
This made me wonder how I could populate these fields, not only for myself but also for other Linux users. It turns out there is already an open source project for this: the [USB ID Repository][2]. It is a public repository of all known IDs used in USB devices. It is also used in various programs, including the [USB Utilities][3], to display human-readable device names.
|
||||
|
||||
![The USB ID Repository Site][4]
|
||||
|
||||
(Alan Formy-Duval, [CC BY-SA 4.0][5])
|
||||
|
||||
You can browse the repository for particular devices either from the website or by downloading the database. Users are also welcome to submit new data. This is what I did for my mouse, which was absent.
|
||||
|
||||
### Update your USB IDs
|
||||
|
||||
The USB ID database is stored in a file called `usb.ids`. This location may vary depending on the Linux distribution.
|
||||
|
||||
On Ubuntu 18.04, this file is located in `/var/lib/usbutils`. To update the database, use the command `update-usbids`, which you need to run with root privileges or with `sudo`:
|
||||
|
||||
|
||||
```
|
||||
`$ sudo update-usbids`
|
||||
```
|
||||
|
||||
If a new file is available, it will be downloaded. The current file will be backed up and replaced by the new one:
|
||||
|
||||
|
||||
```
|
||||
$ ls -la
|
||||
total 1148
|
||||
drwxr-xr-x 2 root root 4096 Jan 15 00:34 .
|
||||
drwxr-xr-x 85 root root 4096 Nov 7 08:05 ..
|
||||
-rw-r--r-- 1 root root 614379 Jan 9 15:34 usb.ids
|
||||
-rw-r--r-- 1 root root 551472 Jan 15 00:34 usb.ids.old
|
||||
```
|
||||
|
||||
Recent versions of Fedora Linux store the database file in `/usr/share/hwdata`. Also, there is no update script. Instead, the database is maintained in a package named `hwdata`.
|
||||
|
||||
|
||||
```
|
||||
# dnf info hwdata
|
||||
|
||||
Installed Packages
|
||||
Name : hwdata
|
||||
Version : 0.332
|
||||
Release : 1.fc31
|
||||
Architecture : noarch
|
||||
Size : 7.5 M
|
||||
Source : hwdata-0.332-1.fc31.src.rpm
|
||||
Repository : @System
|
||||
From repo : updates
|
||||
Summary : Hardware identification and configuration data
|
||||
URL : <https://github.com/vcrhonek/hwdata>
|
||||
License : GPLv2+
|
||||
Description : hwdata contains various hardware identification and configuration data,
|
||||
: such as the pci.ids and usb.ids databases.
|
||||
```
|
||||
|
||||
Now my USB device list shows a name next to this previously unnamed device. Compare this to the output above:
|
||||
|
||||
|
||||
```
|
||||
$ lsusb
|
||||
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
|
||||
Bus 001 Device 004: ID 046d:082c Logitech, Inc. HD Webcam C615
|
||||
Bus 001 Device 003: ID 0951:16d2 Kingston Technology
|
||||
Bus 001 Device 014: ID 18f8:1486 [Maxxter]
|
||||
Bus 001 Device 005: ID 051d:0002 American Power Conversion Uninterruptible Power Supply
|
||||
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
|
||||
```
|
||||
|
||||
You may notice that other device descriptions change as the repository is regularly updated with new devices and details about existing ones.
|
||||
|
||||
### Submit new data
|
||||
|
||||
There are two ways to submit new data: by using the web interface or by emailing a specially formatted patch file. Before I began, I read through the submission guidelines. First, I had to register an account, and then I needed to use the project's submission system to provide my mouse's ID and name. The process is the same for adding any USB device.
|
||||
|
||||
Have you used the USB ID Repository? If so, please share your reaction in the comments.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/8/usb-id-repository
|
||||
|
||||
作者:[Alan Formy-Duval][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/alanfdoss
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/usb-hardware.png?itok=ROPtNZ5V (Multiple USB plugs in different colors)
|
||||
[2]: http://www.linux-usb.org/usb-ids.html
|
||||
[3]: https://sourceforge.net/projects/linux-usb/files/
|
||||
[4]: https://opensource.com/sites/default/files/uploads/theusbidrepositorysite.png (The USB ID Repository Site)
|
||||
[5]: https://creativecommons.org/licenses/by-sa/4.0/
|
@ -0,0 +1,177 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (6 open source virtualization technologies to know in 2020)
|
||||
[#]: via: (https://opensource.com/article/20/8/virt-tools)
|
||||
[#]: author: (Bryant Son https://opensource.com/users/brson)
|
||||
|
||||
6 open source virtualization technologies to know in 2020
|
||||
======
|
||||
Run, customize, and manage your VMs with open source Virt Tools. Plus
|
||||
get a glossary of key virtualization terms.
|
||||
![What is virtualization][1]
|
||||
|
||||
Virtualization Tools, better known as [Virt Tools][2], is a collection of six open source virtualization tools created by various contributors to make the virtualization world a better place.
|
||||
|
||||
![Virt Tools website][3]
|
||||
|
||||
(Bryant Son, [CC BY-SA 4.0][4])
|
||||
|
||||
Some of the tools, like KVM and QEMU, might be familiar to Linux enthusiasts, but tools like libvirt and libguestfs are probably less so.
|
||||
|
||||
In case you prefer to learn through watching videos than reading, I created a [video version][5] of this article, which you can access on YouTube.
|
||||
|
||||
Before walking through the tools, it's a good idea to know some essential [virtualization][6] terminology. I derived many of these definitions from Wikipedia, with pages linked in the table.
|
||||
|
||||
Term | Definition
|
||||
---|---
|
||||
[Virtualization][7] | In computing, virtualization refers to the act of creating a virtual (rather than physical) version of something, including virtual computer hardware platforms, storage devices, and computer network resources.
|
||||
[Emulator][8] | An emulator is a hardware or software that enables one computer system (called the host) to behave like another computer system (called the guest).
|
||||
[Virtual machine (VM)][9] | Also known as a "guest machine," these are emulations of real, physical hardware computers.
|
||||
Hosts | In [hardware virtualization][10], a computer on which a hypervisor runs one or more VMs.
|
||||
[Hypervisor][11] | This is computer software, firmware, or hardware that creates and runs a VMs.
|
||||
[Kernel][12] | This is a computer program at the core of a computer's operating system with complete control over everything in the system.
|
||||
[Daemon][13] | This is a computer program that runs as a background process, rather than under the direct control of an interactive user.
|
||||
|
||||
This table summarizes each Virt Tool, including license information and links to each tool's website and source code. Much of this information comes from the Virt Tools website and each tool's site.
|
||||
|
||||
Name | What It Is | License | Source Code
|
||||
---|---|---|---
|
||||
[Kernel-based Virtual Machine (KVM)][14] | A virtualization module in the Linux kernel that allows the kernel to function as a hypervisor | GNU GPL or LGPL | [Source code][15]
|
||||
[Quick Emulator (QEMU)][16] | A generic and open source machine emulator and virtualizer | GPLv2 | [Source code][17]
|
||||
[Libvirt][18] | A library and daemon providing a stable, open source API for managing virtualization hosts | GNU | [Source code][19]
|
||||
[Libguestfs][20] | A set of tools for accessing and modifying VM disk images | LGPL, GPL | [Source code][21]
|
||||
[Virt-manager][22] | A desktop user interface for managing VMs through libvirt | GPLv2+ | [Source code][23]
|
||||
[Libosinfo][24] | Provides a database of information about operating system releases to assist in optimally configuring hardware when deploying VMs | LGPLv2+ | [Source code][25]
|
||||
|
||||
### Kernel-based Virtual Manager (KVM)
|
||||
|
||||
![KVM website][26]
|
||||
|
||||
(Bryant Son, [CC BY-SA 4.0][4])
|
||||
|
||||
KVM is a full virtualization solution for Linux on hardware containing virtualization extensions. KVM provides the hardware virtualization for a wide variety of guest operating systems, including Linux, Windows, macOS, ReactOS, and Haiku. Using KVM, you can run multiple VMs on unmodified Linux or Windows images. Each VM has private virtualized hardware: a network card, disk, graphics adapter, etc.
|
||||
|
||||
Most of the time, you won't directly interact with KVM. Instead, you must use QEMU, virt-manager, or another virtualization management tool to leverage KVM.
|
||||
|
||||
You can find full [documentation][27] on the KVM website, as well as access its [source code][15].
|
||||
|
||||
### Quick Emulator (QEMU)
|
||||
|
||||
![QEMU website][28]
|
||||
|
||||
(Bryant Son, [CC BY-SA 4.0][4])
|
||||
|
||||
QEMU is a generic, open source machine emulator and virtualizer. When used as an emulator, QEMU can run operating systems and programs made for one machine (e.g., an ARM board) on a different machine (e.g., your own x86_64 PC). When used as a virtualizer, QEMU achieves near-native performance by executing the guest code directly on the host CPU using KVM.
|
||||
|
||||
QEMU is supported on multiple operating systems, and its installation process is as easy as running a few simple commands; here, you can see how to install QEMU on macOS with [Homebrew][29].
|
||||
|
||||
![QEMU macOS installation info][30]
|
||||
|
||||
(Bryant Son, [CC BY-SA 4.0][4])
|
||||
|
||||
After installing, learn how to use it by reading through its [documentation][31], and you can also access its [source code][17].
|
||||
|
||||
### Libvirt
|
||||
|
||||
![Libvirt website][32]
|
||||
|
||||
(Bryant Son, [CC BY-SA 4.0][4])
|
||||
|
||||
Libvirt is a library and daemon that provides a stable open source API for managing virtualization hosts. It targets multiple hypervisors, including QEMU, KVM, LXC, Xen, OpenVZ, VMWare ESX, VirtualBox, and more.
|
||||
|
||||
Another interesting thing about libvirt is that [KubeVirt][33], an open source project for creating and managing VMs inside the Kubernetes platform, largely utilizes Libvirt. (I'll cover KubeVirt in a future article.) Libvirt is an interesting project to explore, and you can find a plethora of information on its official [website][18] as well as download its [source code][21].
|
||||
|
||||
### Libguestfs
|
||||
|
||||
![Libguestfs website][34]
|
||||
|
||||
(Bryant Son, [CC BY-SA 4.0][4])
|
||||
|
||||
Libguestfs is a set of tools for accessing and modifying VM disk images. You can use it for viewing and editing files inside guests; scripting changes to VMs; monitoring disk used/free statistics; creating guests, physical to virtual (P2V), or virtual to virtual (V2V) machines; performing backups; cloning VMs; building VMs; formatting disks; resizing disks; and much more. I have been using it recently while working on a KubeVirt-based project called [OpenShift Virtualization][35], which you can learn more about in my [video tutorial][36].
|
||||
|
||||
Libguestfs' official [website][20] contains extensive documentation on how to use each command, and you can also download its [source code][21] on GitHub.
|
||||
|
||||
### Virt-manager
|
||||
|
||||
![Virt-manager website][37]
|
||||
|
||||
(Bryant Son, [CC BY-SA 4.0][4])
|
||||
|
||||
Virt-manager is a desktop user interface for managing VMs through libvirt. It primarily targets KVM VMs but also manages Xen and LXC. It also includes the command line provisioning tool virt-install. Think of virt-manager as an easy-to-use management tool for your VMs. For example, you can use virt-manager to run a Microsoft Windows environment on a Linux workstation or vice versa.
|
||||
|
||||
Virt-manager's [source code][23] is available on GitHub and [documentation][38] is on its website. At this time, virt-manager is only available for Linux platforms.
|
||||
|
||||
### Libosinfo
|
||||
|
||||
![Libosinfo website][39]
|
||||
|
||||
(Bryant Son, [CC BY-SA 4.0][4])
|
||||
|
||||
Libosinfo provides a database of information about operating system releases to assist in configuring hardware when deploying VMs. It includes a C library for querying information in the database, which is also accessible from any language supported by GObject introspection. As you may guess, libosinfo is more of a building block to enable an operating system's functionality—but quite an important one.
|
||||
|
||||
Libosinfo's [source code][25] is available on GitLab, and its [documentation][40] can be found on at its website.
|
||||
|
||||
### Conclusion
|
||||
|
||||
Virt-tools is a set of six powerful tools that make virtualization easier and enable important virtualization functions. All of them are open source projects, so I encourage you to explore further and maybe even contribute to them.
|
||||
|
||||
What do you think? Feel free to leave a comment to share your thoughts or ask questions.
|
||||
|
||||
Learn how Vagrant and Ansible can be used to provision virtual machines for web development.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/8/virt-tools
|
||||
|
||||
作者:[Bryant Son][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/brson
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/what_is_virtualization.png?itok=e4WCa7N_ (What is virtualization)
|
||||
[2]: https://www.virt-tools.org/
|
||||
[3]: https://opensource.com/sites/default/files/uploads/1_virttools.jpg (Virt Tools website)
|
||||
[4]: https://creativecommons.org/licenses/by-sa/4.0/
|
||||
[5]: https://youtu.be/E6TBDh2RLY8
|
||||
[6]: https://www.redhat.com/en/topics/virtualization/what-is-virtualization
|
||||
[7]: https://en.wikipedia.org/wiki/Virtualization
|
||||
[8]: https://en.wikipedia.org/wiki/Emulator
|
||||
[9]: https://en.wikipedia.org/wiki/Virtual_machine
|
||||
[10]: https://en.wikipedia.org/wiki/Hardware_virtualization
|
||||
[11]: https://en.wikipedia.org/wiki/Hypervisor
|
||||
[12]: https://en.wikipedia.org/wiki/Kernel_%28operating_system%29
|
||||
[13]: https://en.wikipedia.org/wiki/Daemon_%28computing%29
|
||||
[14]: https://www.linux-kvm.org/page/Main_Page
|
||||
[15]: https://git.kernel.org/pub/scm/virt/kvm/kvm.git
|
||||
[16]: https://www.qemu.org
|
||||
[17]: https://git.qemu.org/git/qemu.git
|
||||
[18]: https://libvirt.org
|
||||
[19]: https://libvirt.org/git/?p=libvirt.git
|
||||
[20]: http://libguestfs.org/
|
||||
[21]: https://github.com/libguestfs/libguestfs
|
||||
[22]: https://virt-manager.org
|
||||
[23]: https://github.com/virt-manager/virt-manager
|
||||
[24]: https://libosinfo.org/download/
|
||||
[25]: https://gitlab.com/libosinfo/libosinfo
|
||||
[26]: https://opensource.com/sites/default/files/uploads/2_kvm.jpg (KVM website)
|
||||
[27]: https://www.linux-kvm.org/page/Documents
|
||||
[28]: https://opensource.com/sites/default/files/uploads/3_qemu.jpg (QEMU website)
|
||||
[29]: https://opensource.com/article/20/6/homebrew-mac
|
||||
[30]: https://opensource.com/sites/default/files/uploads/3_1_qemuinstall.jpg (QEMU macOS installation info)
|
||||
[31]: https://www.qemu.org/documentation/
|
||||
[32]: https://opensource.com/sites/default/files/uploads/4_libvirt.jpg (Libvirt website)
|
||||
[33]: https://kubevirt.io/
|
||||
[34]: https://opensource.com/sites/default/files/uploads/5_libguestfs.jpg (Libguestfs website)
|
||||
[35]: https://www.openshift.com/blog/blog-openshift-virtualization-whats-new-with-virtualization-from-red-hat
|
||||
[36]: https://www.youtube.com/watch?v=tWPC-YER1I0
|
||||
[37]: https://opensource.com/sites/default/files/uploads/6_virtualmanager.jpg (Virt-manager website)
|
||||
[38]: https://virt-manager.org/documentation/
|
||||
[39]: https://opensource.com/sites/default/files/uploads/7_libosinfo.jpg (Libosinfo website)
|
||||
[40]: https://libosinfo.org/documentation/
|
@ -0,0 +1,75 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (How to choose an affordable Linux laptop for video conferencing)
|
||||
[#]: via: (https://opensource.com/article/20/8/linux-laptop-video-conferencing)
|
||||
[#]: author: (Alan Formy-Duval https://opensource.com/users/alanfdoss)
|
||||
|
||||
How to choose an affordable Linux laptop for video conferencing
|
||||
======
|
||||
Open source can give pre-owned computers the necessary boost to make
|
||||
them useful with today's popular video conferencing tools.
|
||||
![Two people chatting via a video conference app][1]
|
||||
|
||||
As more and more activities move online during the global pandemic, an increasing number of folks are looking for affordable and stable solutions to connect to their doctor, therapist, bank, college, and more. Many of the folks I've been working with are on limited incomes, and they're eager for any technical help they can get.
|
||||
|
||||
Whether they're on a proprietary video conferencing solution or using an [open source one like Jitsi Meet][2], everyone needs a platform that's robust enough to support their needs without breaking the budget. One of the leading cloud video conferencing providers [recommends][3] that platforms should have at least an i3 processor or equivalent with a minimum of 4GB RAM. My experience has taught me that an i5 or equivalent and at least 4-8GB RAM is even better.
|
||||
|
||||
I also recommend Linux for running meeting solutions. You could go out and purchase a new Linux computer. However, if you're on a limited income, then plunking down $1000 or more for a new system might not be what you had in mind.
|
||||
|
||||
A more budget-friendly solution I recently put together for a friend was a 2015 MacBook Air running Elementary OS. The computer had 4GB RAM, an i5 processor, and 240GB NVMe solid-state drive. Elementary OS was a great choice for this computer, as it came with a Broadcom 4360 wireless card, which didn't play nice with other Linux distributions but was detected by Elementary. The FaceTime camera didn't work with any Linux distribution I tried, Elementary included, and no one seems to have a good solution, so I purchased a USB camera and connected it to the laptop. This fellow needed to use Zoom to connect to his church, so I downloaded the [Zoom client][4] for Linux and installed it. The software download supports .rpm, .deb, and [Flatpak][5].
|
||||
|
||||
In another case, I purchased a refurbished PC laptop from a prominent vendor. It came with 8GB RAM, i5, webcam, and 256 SSD drive. I'm going to install either Fedora or Pop!_OS on it along with the Zoom client and the usual complement of free software, including LibreOffice, Calibre, ClamAV, Gnu Chess, and other games for my friend to explore.
|
||||
|
||||
### Used laptops for Linux
|
||||
|
||||
When looking for a used laptop, I usually consider the reputation of the brand. I check for the same or similar models and their compatibility with Linux. Both [Fedora][6] and [Ubuntu][7] maintain lists of acceptable hardware platforms. If possible, I try to get a list of the included hardware. For example, what is the CPU model and speed? Does the unit have Bluetooth built-in? How many USB ports does it have? Does it have audio ports? Does it support Thunderbolt? Does it have built-in WiFi, and what is the chipset of the WiFi adapter? I have had good luck with Intel, Broadcom, and Realtek, though the list varies depending on your particular needs.
|
||||
|
||||
There are many sources of good used laptops and desktops, but my favorites are eBay, [Dell Refurbished][8], and [PC Liquidations][9]. I look for units that are three to five years old, that are in good condition, and that have at least an Intel i3 or AMD FX-6300, or better, processor. CPU speed and at least 4 GB RAM are important if you are going to be using your Linux laptop or desktop for video conferencing. Check to make sure the unit you purchase has a power supply. It's handy to have a webcam, but that's not a dealbreaker because you can use a USB camera. I have had good experiences with Logitech web cameras.
|
||||
|
||||
### Refurbishing computers
|
||||
|
||||
When refurbishing older laptops or desktop computers, you'll often find older system components such as a mechanical hard drive or WiFi card that doesn't support the latest wireless technology. These can usually be remedied with a small amount of effort and a minimal budget. For instance, replacing an old hard drive with a solid-state drive (SSD) will usually provide an immediate performance boost. You can also purchase newer WiFi + Bluetooth cards. Most likely, the form factor on a laptop will be Mini PCI but do your research to be sure. This allows you to choose a brand and chipset that might be better supported by Linux. RAM can also be increased. 4GB is definitely my minimum, but I'd much rather have 8GB. I also like to install the latest BIOS, if it is available from the respective vendor, in order to have the latest fixes and features.
|
||||
|
||||
A lot of this advice also applies to desktop systems. You'll generally have more flexibility with these since there are more card slots and other connectors for peripherals. For instance, an older system may not support new technology such as Bluetooth, WiFi, or USB3. Add-in PCI or PCIe cards can be installed to provide this support.
|
||||
|
||||
### Choosing a Linux distribution for an old computer
|
||||
|
||||
The last piece of the puzzle is choosing a Linux distribution for your rescued computer. There are many distributions out there, and though they do like to highlight their own unique spin on providing a [Linux desktop][10], at the end of the day, they're all Linux. When it comes to installing Linux on an old computer, the best one is the one that works on the computer you have.
|
||||
|
||||
The key is to step through the install process (it's not much more complex than installing an office application or a new web browser) and then see how your computer responds when you reboot it. If you get a desktop to come up and you can open and run basic applications, then you're on the right track.
|
||||
|
||||
Once you're satisfied that you have a working computer with a desktop and access to the Internet, give your usual video conferencing application a try. If it fails, try a lightweight Linux distribution in hopes that using fewer resources for your OS can solve any video issues.
|
||||
|
||||
Also, if your camera is HiDef (high definition or HD), then try setting it to broadcast at a lower resolution. Sometimes this can improve your system's performance because you're sending less data over what's probably an old network card with a limited capacity.
|
||||
|
||||
I recommend trying [Elementary OS][11] or [Fedora Linux][12] for recent computers. For very old computers, try [Peppermint OS][13], which is specifically designed for computers without many resources. The great news is there are multiple ways to use open source solutions to turn your old machine into a modern communication platform.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/8/linux-laptop-video-conferencing
|
||||
|
||||
作者:[Alan Formy-Duval][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/alanfdoss
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/chat_video_conference_talk_team.png?itok=t2_7fEH0 (Two people chatting via a video conference app)
|
||||
[2]: https://opensource.com/article/20/5/open-source-video-conferencing
|
||||
[3]: https://support.zoom.us/hc/en-us/articles/201362023-System-requirements-for-Windows-macOS-and-Linux
|
||||
[4]: https://zoom.us/download
|
||||
[5]: https://flathub.org/apps/details/us.zoom.Zoom
|
||||
[6]: https://docs.fedoraproject.org/en-US/fedora/rawhide/release-notes/welcome/Hardware_Overview/
|
||||
[7]: https://certification.ubuntu.com/
|
||||
[8]: https://www.dellrefurbished.com/laptops
|
||||
[9]: https://www.pcliquidations.com/
|
||||
[10]: https://opensource.com/article/20/5/linux-desktops
|
||||
[11]: https://elementary.io/
|
||||
[12]: http://getfedora.org/
|
||||
[13]: https://peppermintos.com/
|
@ -1,161 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (OnionShare: An Open-Source Tool to Share Files Securely Over Tor Network)
|
||||
[#]: via: (https://itsfoss.com/onionshare/)
|
||||
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
|
||||
|
||||
OnionShare: An Open-Source Tool to Share Files Securely Over Tor Network
|
||||
======
|
||||
|
||||
_**Brief: OnionShare is a free and open-source tool that utilizes the Tor network to share files securely and anonymously.**_
|
||||
|
||||
You might have already come across a lot of online services to share files securely but it may not be completely anonymous.
|
||||
|
||||
Also, you do have to rely on a centralized service to share your files and if the service decides to shut down like [Firefox Send][1] — you can’t really depend on it to safely share files all the time.
|
||||
|
||||
All things considered, OnionShare is an amazing open-source tool that lets you share files using the [Tor Onion service][2]. It should be an amazing alternative to all the cloud file sharing services.
|
||||
|
||||
Let’s take a look at what it offers and how it works.
|
||||
|
||||
![][3]
|
||||
|
||||
### OnionShare: Share files anonymously over Tor
|
||||
|
||||
[OnionShare][4] is an interesting open-source tool that’s available for Linux, Windows, and macOS.
|
||||
|
||||
It lets you securely share files directly from your computer to the receiver without revealing your identity in the process. You don’t have to sign up for any account — nor does it rely on any centralized storage service.
|
||||
|
||||
It is basically peer-to-peer over the Tor network. The receiver only needs to have a [Tor browser][5] to download/upload files to your computer. I’d also recommend you to go through our [Tor guide][6] to explore more about it if you’re curious.
|
||||
|
||||
Let’s take a look at the features.
|
||||
|
||||
### Features of OnionShare
|
||||
|
||||
For an average user who just wants security and anonymity, there’s no tweak required. However, you do have some advanced options if you need.
|
||||
|
||||
* Cross-platform support (Windows, macOS, and Linux)
|
||||
* Send files
|
||||
* Receive files
|
||||
* Command-line options
|
||||
* Publish onion sites
|
||||
* Ability to use bridges (if your tor connection isn’t working)
|
||||
* Ability to use a persistent URL for sharing (advanced users)
|
||||
* Stealth mode (more secure)
|
||||
|
||||
|
||||
|
||||
You can go through the [official user guide][7] on GitHub to learn more about them.
|
||||
|
||||
### Installing OnionShare on Linux
|
||||
|
||||
You should find OnionShare listed in your software center to get it installed. If it’s not there, you can add the PPA using the commands below on Ubuntu-based distros:
|
||||
|
||||
```
|
||||
sudo add-apt-repository ppa:micahflee/ppa
|
||||
sudo apt update
|
||||
sudo apt install -y onionshare
|
||||
```
|
||||
|
||||
If you’re looking to install it on other Linux distributions, you can visit the [official website][4] for installation instructions on Fedora and build instructions as well.
|
||||
|
||||
[Download OnionShare][4]
|
||||
|
||||
### How does OnionShare Work?
|
||||
|
||||
After you get it installed, everything is pretty self-explanatory and easy-to-use. But, if you want a heads up, let me show you how it works.
|
||||
|
||||
Once, it loads up and connects to the Tor network
|
||||
|
||||
#### Sharing a File
|
||||
|
||||
![][8]
|
||||
|
||||
You just have to add the file(s) that you want to share from your computer and then click on “**Start sharing**“.
|
||||
|
||||
Once you’re done, the status at the bottom-right should say “**Sharing**” and an **OnionShare address** will be generated (copied to clipboard automatically) as shown in the image below:
|
||||
|
||||
![][9]
|
||||
|
||||
All the receiver needs now is the OnionShare address that should look like this:
|
||||
|
||||
```
|
||||
http://onionshare:[email protected]
|
||||
```
|
||||
|
||||
And, a Tor browser to start downloading the files.
|
||||
|
||||
It’s worth noting that once the download completes (file transfer is done), the file sharing stops. You will also be notified of the same when that happens.
|
||||
|
||||
So, if you have to share it again or with someone else, you will have to re-share it and send the new OnionShare address to the receiver.
|
||||
|
||||
#### Allow Receiving Files
|
||||
|
||||
If you want to generate a URL that lets someone upload files directly to your computer (be careful with whom you share it), you can just click on the **Receive Files** tab after you launch OnionShare.
|
||||
|
||||
![][10]
|
||||
|
||||
You just have to click on the “**Start Receive Mode**” button to get started. Next, you will get an OnionShare address (just like while sharing a file).
|
||||
|
||||
The receiver has to access it using the Tor browser and start uploading files. Here’s how it should look like:
|
||||
|
||||
![][11]
|
||||
|
||||
Even though you will be notified of the file transfer when someone is uploading to your computer, you need to manually stop the receiving mode when you’re done.
|
||||
|
||||
#### Downloading/Uploading Files
|
||||
|
||||
Considering that you have a Tor browser installed, you just need to hit the OnionShare address in the URL address, confirm log in (press OK) and here’s how it should look like:
|
||||
|
||||
![][12]
|
||||
|
||||
Similarly, when you get an address to upload files, it should look like this:
|
||||
|
||||
![][13]
|
||||
|
||||
#### Publish Onion Sites
|
||||
|
||||
You can simply add the files to host a static onion website if you want. Of course, just because it’s peer-to-peer connection, it’ll be very slow to load up while it transfers every file from your computer.
|
||||
|
||||
![][14]
|
||||
|
||||
I tried using a [free template][15] to test it out and it works great (but very slow). So, it may depend on your network connection.
|
||||
|
||||
### **Wrapping Up**
|
||||
|
||||
In addition to all the features mentioned above, you can also use the command line and opt for some advanced tweaks if needed.
|
||||
|
||||
OnionShare is indeed an impressive open-source tool that makes it easy to share files anonymously without needing any special tweaks.
|
||||
|
||||
Have you tried OnionShare yet? Is there something similar to this that you know of? Let me know in the comments below!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/onionshare/
|
||||
|
||||
作者:[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/firefox-send/
|
||||
[2]: https://community.torproject.org/onion-services/
|
||||
[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/08/onionshare-screenshot.jpg?resize=800%2C629&ssl=1
|
||||
[4]: https://onionshare.org/
|
||||
[5]: https://itsfoss.com/install-tar-browser-linux/
|
||||
[6]: https://itsfoss.com/tor-guide/
|
||||
[7]: https://github.com/micahflee/onionshare/wiki
|
||||
[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/08/onionshare-share.png?resize=800%2C604&ssl=1
|
||||
[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/08/onionshare-file-shared.jpg?resize=800%2C532&ssl=1
|
||||
[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/08/onionshare-receive-files.jpg?resize=800%2C655&ssl=1
|
||||
[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/08/onionshare-receive-mode.jpg?resize=800%2C529&ssl=1
|
||||
[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/08/onionshare-download.jpg?resize=800%2C499&ssl=1
|
||||
[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/08/onionshare-upload.jpg?resize=800%2C542&ssl=1
|
||||
[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/08/onionshare-onion-site.jpg?resize=800%2C366&ssl=1
|
||||
[15]: https://www.styleshout.com/free-templates/kards/
|
@ -0,0 +1,179 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Create and run Python apps on your Android phone)
|
||||
[#]: via: (https://opensource.com/article/20/8/python-android-mobile)
|
||||
[#]: author: (Phani Adabala https://opensource.com/users/adabala)
|
||||
|
||||
Create and run Python apps on your Android phone
|
||||
======
|
||||
Use Termux and Flask to create, develop, and run a web app on your
|
||||
mobile device.
|
||||
![Tux and Android stuffed animals on shelf][1]
|
||||
|
||||
Learning and using Python is fun. Thanks to its growing popularity, there are a plethora of ways it can be used to make the world of computing better than what it is today.
|
||||
|
||||
Imagine building and running python applications, whether it's a command-line tool developed to fetch your favorite curated articles from the Internet, or starting a web server that runs right in the palm of your hand, all with just an Android mobile device and open source tools. This would change how you view your mobile device entirely, changing it from a device that merely lets you consume content to a device that helps you be creative.
|
||||
|
||||
In this article, I'll demonstrate all of the tools, software packages, steps, and all the bells and whistles required to build, run, and test a simple Python application on any Android mobile device. I use the [Flask framework][2] to create a simple “Hello, World!” app running on a simple but powerful web server. And best of all, it all happens on the phone. No laptop or desktop required.
|
||||
|
||||
### Install Termux on Android
|
||||
|
||||
First, [install the Termux application][3]. Termux is a powerful terminal emulator that offers all the most popular Linux commands, plus hundreds of additional packages for easy installation. It doesn't require any special permissions You can use either the default [Google Play][4] store or the open source app repository [F-Droid][5] to install.
|
||||
|
||||
![Welcome to Termux][6]
|
||||
|
||||
Once you have installed Termux, launch it and perform a few requisite software installations using Termux's **pkg** command:
|
||||
|
||||
Subscribe to the additional repository “root-repo”:
|
||||
|
||||
|
||||
```
|
||||
`$ pkg install root-repo`
|
||||
```
|
||||
|
||||
Perform an update to bring all the installed software up to date:
|
||||
|
||||
|
||||
```
|
||||
`$ pkg update`
|
||||
```
|
||||
|
||||
Finally, install Python:
|
||||
|
||||
|
||||
```
|
||||
`$ pkg install python`
|
||||
```
|
||||
|
||||
![Install Python][7]
|
||||
|
||||
Once the installation and auto set-up of configuration is complete, it’s time to build your application.
|
||||
|
||||
### Build an app for Android on Android
|
||||
|
||||
Now that you have a terminal installed, you can work on your Android phone largely as if it were just another Linux computer. This is a great demonstration of just how powerful a terminal really is.
|
||||
|
||||
Start by creating a project directory:
|
||||
|
||||
|
||||
```
|
||||
$ mkdir Source
|
||||
$ cd Source
|
||||
```
|
||||
|
||||
Next, create a Python virtual environment. This is a common practice among Python developers, and it helps keep your Python project independent of your development system (in this case, your phone). Within your virtual environment, you'll be able to install Python modules specific to your app.
|
||||
|
||||
|
||||
```
|
||||
`$ python -m venv venv`
|
||||
```
|
||||
|
||||
Activate your new virtual environment (note that the two dots at the start are separated by a space):
|
||||
|
||||
|
||||
```
|
||||
$ . ./venv/bin/activate
|
||||
(env)$
|
||||
```
|
||||
|
||||
Notice that your shell prompt is now preceded by **(env)** to indicate that you're in a virtual environment.
|
||||
|
||||
Now install the Flask Python module using **pip**:
|
||||
|
||||
|
||||
```
|
||||
`(env) $ pip install flask`
|
||||
```
|
||||
|
||||
### Write Python code on Android
|
||||
|
||||
You're all set up. All you need now is to write the code for your app.
|
||||
|
||||
To do this, you should have experience with a classic text editor. I use **vi**. If you’re unfamiliar with **vi**, install and try the **vimtutor** application, which (as its name suggests) can teach you how to use this editor. If you have a different editor you prefer, such as **jove**, **jed**, **joe**, or **emacs**, you can install and use one of those instead.
|
||||
|
||||
For now, because this demonstration app is so simple, you can also just use the shell's **heredoc** function, which allows you to enter text directly at your prompt:
|
||||
|
||||
|
||||
```
|
||||
(env)$ cat << EOF >> hello_world.py
|
||||
> from flask import Flask
|
||||
> app = Flask(__name__)
|
||||
>
|
||||
> @app.route('/')
|
||||
> def hello_world():
|
||||
> return 'Hello, World!'
|
||||
> EOF
|
||||
(env)$
|
||||
```
|
||||
|
||||
That's just six lines of code, but with that you import Flask, create an app, and route incoming traffic to the function called **hello_world**.
|
||||
|
||||
![Vim on Android][8]
|
||||
|
||||
Now you have the web-server code ready. It's time to set up some [environment variables][9] and start a web server on your phone.
|
||||
|
||||
|
||||
```
|
||||
(env) $ export FLASK_APP=hello_world.py
|
||||
(env) $ export FLASK_ENV=development
|
||||
(evn) $ python hello_world.py
|
||||
```
|
||||
|
||||
![Running a Flask app on your phone][10]
|
||||
|
||||
After starting your app, you see this message:
|
||||
|
||||
|
||||
```
|
||||
`serving Flask app… running on http://127.0.0.1:5000/`
|
||||
```
|
||||
|
||||
This indicates that you now have a tiny web server running on **localhost** (that is, your device). This server is listening for requests looking for port 5000.
|
||||
|
||||
Open your mobile browser and navigate to **<http://localhost:5000>** to see your web app.
|
||||
|
||||
![Your web app][11]
|
||||
|
||||
You haven't compromised your phone's security. You're only running a local server, meaning that your phone isn't accepting requests from the outside world. Only you can access your Flask server.
|
||||
|
||||
To make your server visible to others, you can disable Flask's debugging mode by adding **\--host=0.0.0.0** to the **run** command. This does open ports on your phone, so use this wisely.
|
||||
|
||||
|
||||
```
|
||||
(env) $ export FLASK_ENV=””
|
||||
(env) $ flask run –host=0.0.0.0
|
||||
```
|
||||
|
||||
Stop the server by pressing **Ctrl+C** (use the special Termux key for Control).
|
||||
|
||||
### Decide what comes next
|
||||
|
||||
Your phone is probably not the ideal server platform for a serious web app, but this demonstrates that the possibilities are endless. You might program on your Android phone just because it’s a convenient way to stay in practice, or because you have an exciting new idea for localized web apps, or maybe you just happen to use a Flask app for your own daily tasks. As Einstein once said “Imagination is more important than knowledge”, and this is a fun little project for any new coder, or a seasoned Linux or Android enthusiast. It can be expanded to endless levels, so let your curiosity take over, and make something exciting!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/8/python-android-mobile
|
||||
|
||||
作者:[Phani Adabala][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/adabala
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/tux_penguin_linux_android.jpg?itok=ctgANLI7 (Tux and Android stuffed animals on shelf)
|
||||
[2]: https://opensource.com/article/18/4/flask
|
||||
[3]: https://opensource.com/article/20/8/termux
|
||||
[4]: https://play.google.com/store/apps/details?id=com.termux
|
||||
[5]: https://f-droid.org/repository/browse/?fdid=com.termux
|
||||
[6]: https://opensource.com/sites/default/files/termux-flask-1_0.webp (Welcome to Termux)
|
||||
[7]: https://opensource.com/sites/default/files/termux-install-python.webp (Install Python)
|
||||
[8]: https://opensource.com/sites/default/files/termux-python-vim.webp (Vim on Android)
|
||||
[9]: https://opensource.com/article/19/8/what-are-environment-variables
|
||||
[10]: https://opensource.com/sites/default/files/termux-flask-run.webp (Running a Flask app on your phone)
|
||||
[11]: https://opensource.com/sites/default/files/flask-app-android.webp (Your web app)
|
106
sources/tech/20200826 Customize your GNOME desktop theme.md
Normal file
106
sources/tech/20200826 Customize your GNOME desktop theme.md
Normal file
@ -0,0 +1,106 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Customize your GNOME desktop theme)
|
||||
[#]: via: (https://opensource.com/article/20/8/gnome-themes)
|
||||
[#]: author: (Alan Formy-Duval https://opensource.com/users/alanfdoss)
|
||||
|
||||
Customize your GNOME desktop theme
|
||||
======
|
||||
Use Tweaks and its user themes extension to change the look of your
|
||||
Linux UI.
|
||||
![Gnomes in a window.][1]
|
||||
|
||||
GNOME is a fairly simple and streamlined Linux graphical user interface (GUI), and a lot of users appreciate its minimalist look. Although it's pretty basic out of the box, you can customize [GNOME][2] to match your preferences. Thanks to GNOME Tweaks and the user themes extension, you can change the look and feel of the top bar, window title bars, icons, cursors, and many other UI options.
|
||||
|
||||
### Get started
|
||||
|
||||
Before you can change your GNOME theme, you have to install [Tweaks][3] and enable the user themes extension.
|
||||
|
||||
#### Install GNOME Tweaks
|
||||
|
||||
You can find Tweaks in the GNOME Software Center, where you can install it quickly with just the click of a button.
|
||||
|
||||
![Install Tweaks in Software Center][4]
|
||||
|
||||
(Alan Formy-Duval, [CC BY-SA 4.0][5])
|
||||
|
||||
If you prefer the command line, use your package manager. For instance, on Fedora or CentOS:
|
||||
|
||||
|
||||
```
|
||||
`$ sudo dnf install gnome-tweaks`
|
||||
```
|
||||
|
||||
On Debian or similar:
|
||||
|
||||
|
||||
```
|
||||
`$ sudo apt install gnome-tweaks`
|
||||
```
|
||||
|
||||
#### Enable user themes
|
||||
|
||||
To enable the user themes extension, launch Tweaks and select **Extensions**. Find **User themes** and click the slider to enable it.
|
||||
|
||||
![Enable User Themes Extension][6]
|
||||
|
||||
(Alan Formy-Duval, [CC BY-SA 4.0][5])
|
||||
|
||||
### Get a theme
|
||||
|
||||
Now that you've completed those prerequisites, you're ready to find and download some themes. A great site to find new themes is [GNOME-Look.org][7].
|
||||
|
||||
There's a list of theme categories on the left-hand side of the page. Once you find a theme you want, you need to download it. I downloaded the `.tar` file directly to the `.themes` directory under my home directory (you may need to create the directory first):
|
||||
|
||||
|
||||
```
|
||||
`$ mkdir ~/.themes`
|
||||
```
|
||||
|
||||
If you want all the machine's users to be able to use the theme, place it in `/usr/share/themes`.
|
||||
|
||||
|
||||
```
|
||||
`$ tar xvf theme_archive.tar.xz`
|
||||
```
|
||||
|
||||
Once you have downloaded the file, extract the archive. You can delete the `.tar.xz` file to save some disk space.
|
||||
|
||||
### Apply a theme
|
||||
|
||||
To apply your new theme, go to the **Appearance** section in Tweaks. Here, you can select different options for each aspect of your desktop.
|
||||
|
||||
![Apply a theme][8]
|
||||
|
||||
(Alan Formy-Duval, [CC BY-SA 4.0][5])
|
||||
|
||||
### Variety is the spice of life
|
||||
|
||||
Being able to personalize a computer desktop with different wallpaper, colors, fonts, and more has been a popular feature since the first graphical interfaces hit the market. GNOME Tweaks and the user themes extension enable this customization on the GNOME desktop environment on all the GNU/Linux operating systems where it is available. And the open source community continues to provide a wide range of themes, icons, fonts, and wallpapers that anyone can download, play with, and customize.
|
||||
|
||||
What are your favorite GNOME themes, and why do you like them? Please share in the comments.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/8/gnome-themes
|
||||
|
||||
作者:[Alan Formy-Duval][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/alanfdoss
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/custom_gnomes.png?itok=iG98iL8d (Gnomes in a window.)
|
||||
[2]: https://www.gnome.org/
|
||||
[3]: https://wiki.gnome.org/Apps/Tweaks
|
||||
[4]: https://opensource.com/sites/default/files/uploads/gnome-install_tweaks_gui.png (Install Tweaks in Software Center)
|
||||
[5]: https://creativecommons.org/licenses/by-sa/4.0/
|
||||
[6]: https://opensource.com/sites/default/files/uploads/gnome-enable_user_theme_extension.png (Enable User Themes Extension)
|
||||
[7]: https://www.gnome-look.org
|
||||
[8]: https://opensource.com/sites/default/files/uploads/gnome-apply_theme.png (Apply a theme)
|
@ -0,0 +1,228 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Glances – A Versatile System Monitoring Tool for Linux Systems)
|
||||
[#]: via: (https://itsfoss.com/glances/)
|
||||
[#]: author: (Chinmay https://itsfoss.com/author/chinmay/)
|
||||
|
||||
Glances – A Versatile System Monitoring Tool for Linux Systems
|
||||
======
|
||||
|
||||
The most commonly used command line [tools for process monitoring on Linux][1] are top and its colorful, feature rich cousin [htop][2] .
|
||||
|
||||
To [monitor temperature on Linux][3], you can use [lm-sensors][4]. Similarly, there are many utilities to monitor other real-time metrics such as Disk I/O, Network Stats and others.
|
||||
|
||||
[Glances][5] is a system monitoring tool which ties them all together and offers a lot more features. What I like the most is that you can use run Glances on a remote Linux server and monitor the system resources on your local system or monitor it through your web browser.
|
||||
|
||||
Here’s what it looks like. The terminal in the below screenshot has been [beautified with Pywal tool that automatically changes the color based on wallpaper][6].
|
||||
|
||||
![][7]
|
||||
|
||||
You can also integrate it to a tool like [Grafana][8] to monitor the stats in an intuitive dashboard.
|
||||
|
||||
It is written in Python which means that it can be used on most platforms with almost all features.
|
||||
|
||||
### Features of Glances
|
||||
|
||||
![Glances Data In Grafana Dashboard][9]
|
||||
|
||||
Let’s have a quick glance over the main feature Glances provides (pun intended).
|
||||
|
||||
* Can monitor 15+ metrics on a system (including docker containers).
|
||||
* Flexible usage modes: standalone, client-server, over SSH and web mode.
|
||||
* Versatile REST API and XML-RPC available for integrations.
|
||||
* Readily supports exporting data to different services and databases.
|
||||
* Highly configurable and adaptable to different needs.
|
||||
* Very comprehensive Documentation.
|
||||
|
||||
|
||||
|
||||
### Installing Glances on Ubuntu and other Linux distributions
|
||||
|
||||
Glances is available in the official repositories of many Linux distributions. This means you can use your distribution’s package manager to install it easily.
|
||||
|
||||
On Debian/Ubuntu based distributions, you can use the following command:
|
||||
|
||||
```
|
||||
sudo apt install glances
|
||||
```
|
||||
|
||||
You can also install the latest Glances using snap package:
|
||||
|
||||
```
|
||||
sudo snap install glances
|
||||
```
|
||||
|
||||
Since Glances is based on Python, you can also use PIP to install it on most Linux distributions. [Install PIP][10] first and then use it to install Glances:
|
||||
|
||||
```
|
||||
sudo pip3 install glances
|
||||
```
|
||||
|
||||
If nothing else, you can always use the auto install script provided by Glances developer. Though we at It’s FOSS don’t recommend running random scripts directly on your system. It’s entirely your decision.
|
||||
|
||||
```
|
||||
curl -L https://bit.ly/glances | /bin/bash
|
||||
```
|
||||
|
||||
You can check out other ways to install Glances from their [documentation][11], you can also install it as a docker container.
|
||||
|
||||
### Using Glances to monitor Linux system resources on local system (standalone mode)
|
||||
|
||||
You can easily launch Glances to monitor your local machine by running this command n the terminal.
|
||||
|
||||
```
|
||||
glances
|
||||
```
|
||||
|
||||
You can instantly observe that it integrates a lot of different information in one single screen. I like that it shows the public and private IP’s of the computer right at the top.
|
||||
|
||||
![][12]
|
||||
|
||||
Glances is also interactive, meaning you can use commands to interact with it while it is running. You can press **“s”** to bring up the sensors onto the screen; **“k”** to bring up the TCP connections list; **“1”** to expand the CPU stats to show individual threads.
|
||||
|
||||
You can also use the arrow keys to move around the list of processes and sort the table by different metrics.
|
||||
|
||||
You can launch Glances with various command line options. There are plenty more interactive commands as well. You can find the complete list in their [comprehensive documentation][13].
|
||||
|
||||
Press Ctrl+C to exit Glances.
|
||||
|
||||
### Using Glances to monitor remote Linux systems (Client – Server mode)
|
||||
|
||||
To monitor a remote computer you can use Glances in client-server mode. You need to have Glances installed on both systems.
|
||||
|
||||
On the remote Linux system, you’ll have to launch glances in server mode using the -s option.
|
||||
|
||||
```
|
||||
glances -s
|
||||
```
|
||||
|
||||
On the client system, use this command to launch Glances in client mode and connect to the server.
|
||||
|
||||
```
|
||||
glances -c server_ip_address
|
||||
```
|
||||
|
||||
You can also SSH into any computer and launch Glances, which works flawlessly. More information about client-server mode [here][14].
|
||||
|
||||
### Monitor Linux system resources in web browser using Glances (Web Mode)
|
||||
|
||||
Glances can also run in web mode. This means that you can use a web browser to access Glances. Unlike the previous client-server mode, you don’t need to install Glances on the client system.
|
||||
|
||||
To start Glances in web mode, use the -w option.
|
||||
|
||||
```
|
||||
glances -w
|
||||
```
|
||||
|
||||
Keep in mind that it may display “Glances Web User Interface started on <http://0.0.0.0:61208”> even on a Linux server when it is actually using the server’s IP address.
|
||||
|
||||
The main part is that it uses 61208 port number and you can use it to access Glances via web browser. Just type the server’s IP address followed by the port number like <http://123.123.123.123:61208>.
|
||||
|
||||
You can also use it on the local system using <http://0.0.0.0:61208/> or <https://localhost:61208/>.
|
||||
|
||||
![][15]
|
||||
|
||||
The web mode also emulates the terminal look. The web version is built with responsive design principles in mind and looks good even on phones.
|
||||
|
||||
You may want to protect the web mode with a password so that only authorized people could use it. The default username is glances.
|
||||
|
||||
```
|
||||
[email protected]:~# glances -w --password
|
||||
Define the Glances webserver password (glances username):
|
||||
Password (confirm):
|
||||
Do you want to save the password? [Yes/No]: n
|
||||
Glances Web User Interface started on http://0.0.0.0:61208/
|
||||
```
|
||||
|
||||
You can find more information on configuring password in the [quickstart guide][16].
|
||||
|
||||
### Export Glances data to different services
|
||||
|
||||
One of the biggest advantage of using Glances is the out of the box support to export data to various databases, services and integration into various data pipelines seamlessly.
|
||||
|
||||
You can export to CSV while monitoring with this command.
|
||||
|
||||
```
|
||||
glances --export csv --export-csv-file /tmp/glances.csv
|
||||
```
|
||||
|
||||
‘/tmp/glances.csv’ is the location of the file. The data is filled in neatly as time series.
|
||||
|
||||
![][17]
|
||||
|
||||
You can export to powerful applications like [Prometheus][18] to enable conditional triggers and notifications.
|
||||
|
||||
It can directly plug into messaging services like RabbitMQ, MQTT, streaming platforms like Kafka and export time series data to databases like InfluxDB and visualize using Grafana.
|
||||
|
||||
You can check out the whole list of services and export options [here][19].
|
||||
|
||||
### Use REST API to integrate Glances with other services
|
||||
|
||||
This is my favorite feature in the whole stack. Glances not only brings together various metrics together, it also exposes them via APIs.
|
||||
|
||||
This simple yet powerful feature makes it very easy to build custom applications, services and middleware applications for any specific use cases.
|
||||
|
||||
REST API server stars automatically when you launch Glances in web mode. To launch it in API server only mode you can use the following command.
|
||||
|
||||
```
|
||||
glances -w --disable-webui
|
||||
```
|
||||
|
||||
The [REST API][20] documentation is comprehensive and the responses are easy to integrate with a web application. This makes it easy to build a unified dashboard to monitor multiple servers with a tool like [Node-RED][21].
|
||||
|
||||
![][22]
|
||||
|
||||
Glances also provides an XML-RPC server, you can check out the documentation [here][23].
|
||||
|
||||
### Closing thoughts on Glances
|
||||
|
||||
Glances uses the [psutil][24] python library to access different system stats. I had built a simple API server using the same library to retrieve CPU usage back in 2017. I was able to monitor all the Raspberry Pi’s in a cluster using a dashboard built with Node-RED.
|
||||
|
||||
Glances could have saved me some time while offering way more features, unfortunately I didn’t know about it back then.
|
||||
|
||||
I did try to install Glances on my Raspberry Pi’s while writing this article, unfortunately it failed with some errors with all the installation methods. I’ll update the article when I succeed or maybe write another article with steps to install on a Raspberry Pi.
|
||||
|
||||
I wish Glances offered a way to kill processes like top or htop. Let’s hope that we get it in upcoming releases.
|
||||
|
||||
I hope this gave you a good deal of information on Glances. What system monitoring tools do you guys use? let me know in the comments.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/glances/
|
||||
|
||||
作者:[Chinmay][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/chinmay/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://itsfoss.com/linux-system-monitoring-tools/
|
||||
[2]: https://hisham.hm/htop/
|
||||
[3]: https://itsfoss.com/monitor-cpu-gpu-temp-linux/
|
||||
[4]: https://github.com/lm-sensors/lm-sensors
|
||||
[5]: https://nicolargo.github.io/glances/
|
||||
[6]: https://itsfoss.com/pywal/
|
||||
[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/08/glances-linux.png?resize=800%2C510&ssl=1
|
||||
[8]: https://grafana.com/
|
||||
[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/08/glances-data-in-grafana-dashboard.jpg?resize=800%2C472&ssl=1
|
||||
[10]: https://itsfoss.com/install-pip-ubuntu/
|
||||
[11]: https://github.com/nicolargo/glances/blob/master/README.rst#installation
|
||||
[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/08/Screenshot-from-2020-08-13-11-54-18.png?resize=800%2C503&ssl=1
|
||||
[13]: https://glances.readthedocs.io/en/latest/cmds.html
|
||||
[14]: https://glances.readthedocs.io/en/latest/quickstart.html#central-client
|
||||
[15]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/08/Screenshot-from-2020-08-13-16-49-11.png?resize=800%2C471&ssl=1
|
||||
[16]: https://glances.readthedocs.io/en/stable/quickstart.html
|
||||
[17]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/08/Screenshot-from-2020-08-13-12-25-40.png?resize=800%2C448&ssl=1
|
||||
[18]: https://prometheus.io/
|
||||
[19]: https://glances.readthedocs.io/en/latest/gw/index.html
|
||||
[20]: https://github.com/nicolargo/glances/wiki/The-Glances-RESTFULL-JSON-API
|
||||
[21]: https://nodered.org/
|
||||
[22]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/08/Screenshot-from-2020-08-13-17-49-41.png?resize=800%2C468&ssl=1
|
||||
[23]: https://github.com/nicolargo/glances/wiki
|
||||
[24]: https://pypi.org/project/psutil/
|
@ -0,0 +1,84 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Manage your software repositories with this open source tool)
|
||||
[#]: via: (https://opensource.com/article/20/8/manage-repositories-pulp)
|
||||
[#]: author: (Melanie Corr https://opensource.com/users/melanie-corr)
|
||||
|
||||
Manage your software repositories with this open source tool
|
||||
======
|
||||
An introduction to Pulp, the open source repository management solution
|
||||
that is growing in scope and functionality.
|
||||
![Cut pieces of citrus fruit and pomegranates][1]
|
||||
|
||||
[Foreman][2] is a robust management and automation product that provides administrators of Linux environments with enterprise-level solutions for four key scenarios: provisioning management, configuration management, patch management, and content management. A major component of the content management functionality in Foreman is provided by the Pulp project. While Pulp is an integral part of this product, it is also a standalone, free, and open source project that is making huge progress on its own.
|
||||
|
||||
Let's take a look at the Pulp project, especially the features of the latest release, Pulp 3.
|
||||
|
||||
### What is Pulp?
|
||||
|
||||
Pulp is a platform for managing repositories of software packages and making them available to a large number of consumers. You can use Pulp to mirror, synchronize, upload, and promote content like RPMs, Python packages, Ansible collections, container images, and more across different environments. If you have dozens, hundreds, or even thousands of software packages and need a better way to manage them, Pulp can help.
|
||||
|
||||
The latest major version is [Pulp 3][3], which was released in December 2019. Pulp 3 is the culmination of years of gathering user requirements and a complete technical overhaul of the existing Pulp architecture to increase reliability and flexibility. Plus, it includes a vast range of new features.
|
||||
|
||||
### Who uses Pulp?
|
||||
|
||||
For the most part, Pulp users administer enterprise software environments where the stability and reliability of content are paramount. Pulp users want a platform to develop content without worrying that repositories might disappear. They want to promote content across the different stages of their lifecycle environment in a secure manner that optimizes disk space and scales their environment to meet new demands. They also need the flexibility to work with a wide variety of content types. Pulp 3 provides that and more.
|
||||
|
||||
### Manage a wide variety of content in one place
|
||||
|
||||
After you install Pulp, you can add [content plugins][4] for the content types that you plan to manage, mirror the content locally, add privately hosted content, and blend content to suit your requirements. If you’re an Ansible user, for example, and you don't want to host your private content on Ansible Galaxy, you can add the Pulp Ansible plugin, mirror the public Ansible content that you require, and use Pulp as an on-premise platform to manage and distribute a scalable blend of public and private Ansible roles and collections across your organization. You can do this with any content type. There is a wide variety of content plugins available, including RPM, Debian, Python, Container, and Ansible, to name but a few. There is also a File plugin, which you can use to manage files like ISO images.
|
||||
|
||||
If you don't find a plugin for the content type that you require, Pulp 3 has introduced a new plugin API and plugin template to make it easy to create a Pulp plugin of your own. You can use the [plugin writing guide][5] to autogenerate a minimal viable plugin, and then start building from there.
|
||||
|
||||
### High availability
|
||||
|
||||
With Pulp 3, the change from MongoDB to PostgreSQL facilitated major improvements around performance and data integrity. Pulp users now have a fully open source tech stack that provides high availability (HA) and better scalability.
|
||||
|
||||
### Repository versioning
|
||||
|
||||
Using Pulp 3, you can experiment without risk. Every time you add or remove content, Pulp creates an immutable repository version so that you can roll back to earlier versions and thereby guarantee the safety and stability of your operation. Using publications and distributions, you can expose multiple versions of a repository, which you can use as another method of rolling back to an earlier version. To roll back, you can simply point your distribution to an older publication.
|
||||
|
||||
### Disk optimization
|
||||
|
||||
One of the major challenges for any software development environment is disk optimization. If you're downloading a constant stream of packages—for example, nightly builds of repositories that you require today but will no longer require tomorrow—disk space will quickly become an issue. Pulp 3 has been designed with disk optimization in mind. While the default option downloads and saves all software packages, you can also enable either the "on demand" or "streamed" option. The "on demand" option saves disk space by downloading and saving only the content that clients request. With the "streamed" option, you also download upon client request, but you don't save the content in Pulp. This is ideal for synchronizing content, for example, from a nightly repository, and saves you from having to perform a disk cleanup at a later stage.
|
||||
|
||||
### Multiple storage options
|
||||
|
||||
Even with the best disk optimization, as your project grows, you might need a way to scale your deployment to match your requirements. As well as local file storage, Pulp supports a range of cloud storage options, such as Amazon S3 and Azure, to ensure that you can scale to meet the demands of your deployment.
|
||||
|
||||
### Protect your content
|
||||
|
||||
Pulp 3 has the option of adding the [Certguard][6] plugin, which provides an X.509 capable ContentGuard that requires clients to submit a certificate proving their entitlement to content before receiving content from Pulp.
|
||||
|
||||
Any client presenting an X.509 or Red Hat Subscription Management-based certificate at request time will be authorized, as long as the client certification is not expired, is signed by the Certificate Authority, and was stored on the Certguard when it was created. The client presents the certificate using transport layer security (TLS), which proves that the client has not only the certificate but also its key. You can develop, confident in the knowledge that your content is being protected.
|
||||
|
||||
The Pulp team is also actively working on a role-based access control system for the entire Pulp deployment so that administrators can ensure that the right users have access to the right environments.
|
||||
|
||||
### Try Pulp in a container
|
||||
|
||||
If you're interested in evaluating Pulp 3 for yourself, you can easily install [Pulp 3 in a Container][7] using Docker or Podman. The Pulp team is constantly working on simplifying the installation process. You can also use an [Ansible playbook][8] to automate the full installation and configuration of Pulp 3.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/8/manage-repositories-pulp
|
||||
|
||||
作者:[Melanie Corr][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/melanie-corr
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/fruit-orange-pomegranate-pulp-unsplash.jpg?itok=4cvODZDJ (Oranges and pomegranates)
|
||||
[2]: https://opensource.com/article/17/8/system-management-foreman
|
||||
[3]: https://pulpproject.org/about-pulp-3/
|
||||
[4]: https://pulpproject.org/content-plugins/
|
||||
[5]: https://docs.pulpproject.org/plugins/plugin-writer/index.html
|
||||
[6]: https://pulp-certguard.readthedocs.io/en/latest/
|
||||
[7]: https://pulpproject.org/pulp-in-one-container/
|
||||
[8]: https://pulp-installer.readthedocs.io/en/latest/
|
@ -0,0 +1,189 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (How to Check Dependencies of a Package in Ubuntu/Debian-based Linux Distributions)
|
||||
[#]: via: (https://itsfoss.com/check-dependencies-package-ubuntu/)
|
||||
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
||||
|
||||
How to Check Dependencies of a Package in Ubuntu/Debian-based Linux Distributions
|
||||
======
|
||||
|
||||
Installing applications via command line is quite easy in Ubuntu/Debian. All you need to do is to use apt install package_name.
|
||||
|
||||
But what if you want to know the dependencies of a package before or after installing it?
|
||||
|
||||
In this tutorial, I’ll show you various ways to see the dependencies of a package in Ubuntu and other Debian-based Linux distributions that use [APT package management system][1].
|
||||
|
||||
### What is package dependency in Ubuntu?
|
||||
|
||||
If you didn’t know already, when you install a software package in Linux, sometimes, it needs other packages to function properly. These additional packages are called dependencies. If these dependency packages are not installed on the system, it is usually installed automatically with the package.
|
||||
|
||||
For example, the [GUI tool HandBrake for converting video formats][2] needs [FFmpeg][3], [GStreamer][4]. So for HandBrake, FFmpeg and GStreamer are the dependencies.
|
||||
|
||||
If you don’t have these packages installed on your system, they will be automatically installed when you [install HandBrake on Ubuntu][5].
|
||||
|
||||
### Check dependencies of a package in Ubuntu and Debian based distributions
|
||||
|
||||
As it often happens in Linux, there are more than one way to achieve the same result. Let’s see various ways to see the dependencies of a package.
|
||||
|
||||
#### Checking dependencies with apt show
|
||||
|
||||
You can use the [apt show command][6] to display details of a package. Part of this information is dependencies and you can see it in the line starting with Depends.
|
||||
|
||||
For example, here’s what it shows for [ubuntu-restricted-extras][7] package.
|
||||
|
||||
```
|
||||
[email protected]:~$ apt show ubuntu-restricted-extras
|
||||
Package: ubuntu-restricted-extras
|
||||
Version: 67
|
||||
Priority: optional
|
||||
Section: multiverse/metapackages
|
||||
Origin: Ubuntu
|
||||
Maintainer: Ubuntu Developers <[email protected]>
|
||||
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
|
||||
Installed-Size: 14.3 kB
|
||||
Depends: ubuntu-restricted-addons
|
||||
Recommends: libavcodec-extra, ttf-mscorefonts-installer, unrar
|
||||
Download-Size: 3,200 B
|
||||
APT-Manual-Installed: yes
|
||||
APT-Sources: http://us.archive.ubuntu.com/ubuntu focal/multiverse amd64 Packages
|
||||
Description: Commonly used media codecs and fonts for Ubuntu
|
||||
This collection of packages includes:
|
||||
- MP3 and other audio codec software to play various audio formats
|
||||
(GStreamer plugins)
|
||||
- software to install the Microsoft Web fonts
|
||||
- the Adobe Flash plugin
|
||||
- LAME, software to create compressed audio files.
|
||||
.
|
||||
This software does not include libdvdcss2, and will not let you play
|
||||
encrypted DVDs. For more information, see
|
||||
https://help.ubuntu.com/community/RestrictedFormats/PlayingDVDs
|
||||
.
|
||||
These software packages are from the Multiverse channel, restricted by
|
||||
copyright or legal issues in some countries. For more information, see
|
||||
http://www.ubuntu.com/ubuntu/licensing
|
||||
```
|
||||
|
||||
As you can see, ubuntu-restricted-extras package depends on ubuntu-restricted-addons package.
|
||||
|
||||
Here’s a catch! The dependency package may also depend on some other package and the chain could go on. Thankfully, the APT package manager handles this for you by automatically installing all the dependencies (most of the time).
|
||||
|
||||
What is recommended package?
|
||||
|
||||
Did you notice the line starting with Recommends in the above output?
|
||||
|
||||
Recommended packages are not direct dependencies for the package but they enable additional features.
|
||||
|
||||
As you can see, ubuntu-restricted-extras has ttf-mscorefonts-installer as recommended package for installing Microsoft Fonts on Ubuntu.
|
||||
|
||||
The recommended packages are also installed by default and if you explicitly want to forbid the installation of recommended package, use the –no-install-recommends flag like this:
|
||||
|
||||
sudo apt install –no-install-recommends package_name
|
||||
|
||||
#### Use apt-cache for getting just the dependencies information
|
||||
|
||||
The apt show has way too many information. If you want to get the dependencies in a script, the apt-cache command gives you a better and clean output.
|
||||
|
||||
```
|
||||
apt-cache depends package_name
|
||||
```
|
||||
|
||||
The output looks much clean, does it not?
|
||||
|
||||
![][8]
|
||||
|
||||
#### Check the dependencies of a DEB file using dpkg
|
||||
|
||||
Both apt and apt-cache command works on the packages that are available from the repositories. But if you download a DEB file, these command won’t work.
|
||||
|
||||
In this case, you can use the dpkg command with -I or –info option.
|
||||
|
||||
```
|
||||
dpkg -I path_to_deb_file
|
||||
```
|
||||
|
||||
The dependencies can be seen in the line starting with Depends.
|
||||
|
||||
![][9]
|
||||
|
||||
#### Checking dependencies and reverse dependencies with apt-rdepends
|
||||
|
||||
If you want more details on the dependencies, you can use the apt-rdepends tool. This tool creates the complete dependency tree. So, you get the dependency of a package and the dependencies of the dependencies as well.
|
||||
|
||||
It is not a regular apt command and you’ll have to install it from the universe repository:
|
||||
|
||||
```
|
||||
sudo apt install apt-rdepends
|
||||
```
|
||||
|
||||
The output is usually quite large depending on the dependency tree.
|
||||
|
||||
```
|
||||
Reading package lists... Done
|
||||
Building dependency tree
|
||||
Reading state information... Done
|
||||
shutter
|
||||
Depends: procps
|
||||
Depends: xdg-utils
|
||||
imagemagick
|
||||
Depends: imagemagick-6.q16 (>= 8:6.9.2.10+dfsg-2~)
|
||||
imagemagick-6.q16
|
||||
Depends: hicolor-icon-theme
|
||||
Depends: libc6 (>= 2.4)
|
||||
Depends: libmagickcore-6.q16-6 (>= 8:6.9.10.2)
|
||||
Depends: libmagickwand-6.q16-6 (>= 8:6.9.10.2)
|
||||
hicolor-icon-theme
|
||||
libc6
|
||||
Depends: libcrypt1 (>= 1:4.4.10-10ubuntu4)
|
||||
Depends: libgcc-s1
|
||||
libcrypt1
|
||||
Depends: libc6 (>= 2.25)
|
||||
```
|
||||
|
||||
The apt-rdepends tool is quite versatile. It can also calculate the reverse dependencies. Which means, you can see what other packages depend on a certain package.
|
||||
|
||||
```
|
||||
apt-rdepends -r package_name
|
||||
```
|
||||
|
||||
The output could be pretty big because it will print the reverse dependency tree.
|
||||
|
||||
```
|
||||
[email protected]:~$ apt-rdepends -r ffmpeg
|
||||
Reading package lists... Done
|
||||
Building dependency tree
|
||||
Reading state information... Done
|
||||
ffmpeg
|
||||
Reverse Depends: ardour-video-timeline (>= 1:5.12.0-3ubuntu4)
|
||||
Reverse Depends: deepin-screen-recorder (5.0.0-1build2)
|
||||
Reverse Depends: devede (4.15.0-2)
|
||||
Reverse Depends: dvd-slideshow (0.8.6.1-1)
|
||||
Reverse Depends: green-recorder (>= 3.2.3)
|
||||
```
|
||||
|
||||
I hope this quick tutorial was helpful in improving your command line knowledge a bit. Stay tuned for more such tips.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/check-dependencies-package-ubuntu/
|
||||
|
||||
作者:[Abhishek Prakash][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/abhishek/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://wiki.debian.org/Apt
|
||||
[2]: https://itsfoss.com/handbrake/
|
||||
[3]: https://ffmpeg.org/
|
||||
[4]: https://gstreamer.freedesktop.org/
|
||||
[5]: https://itsfoss.com/install-handbrake-ubuntu/
|
||||
[6]: https://itsfoss.com/apt-search-command/
|
||||
[7]: https://itsfoss.com/install-media-codecs-ubuntu/
|
||||
[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/08/apt-check-dependencies-ubuntu.png?resize=800%2C297&ssl=1
|
||||
[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/08/check-dpendencies-of-deb-package.png?resize=800%2C432&ssl=1
|
@ -0,0 +1,134 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Use this command-line tool to find security flaws in your code)
|
||||
[#]: via: (https://opensource.com/article/20/8/static-code-security-analysis)
|
||||
[#]: author: (Ari Noman https://opensource.com/users/arinoman)
|
||||
|
||||
Use this command-line tool to find security flaws in your code
|
||||
======
|
||||
Featuring broad language support, Graudit allows you to audit the
|
||||
security of your code during the development process.
|
||||
![Code on a screen][1]
|
||||
|
||||
Testing is an important part of the software development lifecycle (SDLC), and there are several stages to it. Today, I want to talk about finding security issues in the code.
|
||||
|
||||
You can't ignore security when developing a piece of software. That's why there is a term called DevSecOps, which is fundamentally responsible for identifying and resolving security vulnerabilities in an application. There are open source solutions for checking [OWASP vulnerabilities][2] and which will derive insights by creating a threat model of the source code.
|
||||
|
||||
There are different approaches to handling security issues, e.g., static application security testing (SAST), dynamic application security testing (DAST), interactive application security testing (IAST), software composition analysis, etc.
|
||||
|
||||
Static application security testing runs at the code level and analyzes applications by uncovering errors in the code that has already been written. This approach doesn't require the code to be running, which is why it's called static analysis.
|
||||
|
||||
I'll focus on static code analysis and use an open source tool to have a hands-on experience.
|
||||
|
||||
### Why use an open source tool to check code security
|
||||
|
||||
There are many reasons to choose open source software, tools, and projects as a part of your development. It won't cost any money, as you're using a tool developed by a like-minded community of developers who want to help other developers. If you have a small team or a startup, it's good to find open source software to check your code security. This keeps you from having to hire a separate DevSecOps team, keeping your costs lower.
|
||||
|
||||
Good open source tools are always made with flexibility in mind, and they should be able to be used in any environment, covering as many cases as possible. It makes life easier for developers to connect that piece of software with their existing system.
|
||||
|
||||
But there can be times where you need a feature that is not available within the tool that you chose. Then you have the option to fork the code and develop your own feature on top of it and use it in your system.
|
||||
|
||||
Since, most of the time, open source software is driven by a community, the pace of the development tends to be a plus for the users of that tool because they iterate the project based on user feedback, issues, or bug-posting.
|
||||
|
||||
### Using Graudit to ensure that your code is secure
|
||||
|
||||
There are various open source static code analysis tools available, but as you know, the tool analyzes the code itself, and that's why there is no generic tool for any and all programming languages. But some of them follow OWASP guidelines and try to cover as many languages as they can.
|
||||
|
||||
Here, we'll use [Graudit][3], which is a simple command-line tool that allows us to find security flaws in our codebase. It has support for different languages but a fixed signature set.
|
||||
|
||||
Graudit uses grep, which is a GNU-licensed utility tool, and there are similar types of static code analysis tools like Rough Auditing Tool for Security (RATS), Securitycompass Web Application Analysis Tool (SWAAT), flawfinder, etc. But the technical requirement it has is minimal and very flexible. Still, you might have requirements that are not served by Graudit. If so, you can look at this [list][4] for other options.
|
||||
|
||||
We can install this tool under a specific project, or in the global namespace, or under a specific user—whatever we like, it's flexible. Let's clone the repo first:
|
||||
|
||||
|
||||
```
|
||||
`$ git clone https://github.com/wireghoul/graudit`
|
||||
```
|
||||
|
||||
Now, we need to create a symbolic link of Graudit so that we can use it as a command:
|
||||
|
||||
|
||||
```
|
||||
$ cd ~/bin && mkdir graudit
|
||||
$ ln --symbolic ~/graudit/graudit ~/bin/graudit
|
||||
```
|
||||
|
||||
Add an alias to .bashrc (or the config file for whatever shell you're using):
|
||||
|
||||
|
||||
```
|
||||
#------ .bashrc ------
|
||||
|
||||
alias graudit="~/bin/graudit"
|
||||
```
|
||||
|
||||
and reload the shell:
|
||||
|
||||
|
||||
```
|
||||
$ source ~/.bashrc # OR
|
||||
$ exex $SHELL
|
||||
```
|
||||
|
||||
Let's check whether or not we have successfully installed the tool by running this:
|
||||
|
||||
|
||||
```
|
||||
`$ graudit -h`
|
||||
```
|
||||
|
||||
If you get something similar to this, then you're good to go.
|
||||
|
||||
![Graudit terminal screen showing help page][5]
|
||||
|
||||
Fig. 1 Graudit help page
|
||||
|
||||
I'm using one of my existing projects to test the tool. To run the tool, we need to pass the database of the respective language. You'll find the databases under the signatures folder:
|
||||
|
||||
|
||||
```
|
||||
`$ graudit -d ~/gradit/signatures/js.db`
|
||||
```
|
||||
|
||||
I ran this on two JavaScript files from my existing projects, and you can see that it throws the vulnerable code in the console:
|
||||
|
||||
![JavaScript file showing Graudit display of vulnerable code][6]
|
||||
|
||||
![JavaScript file showing Graudit display of vulnerable code][7]
|
||||
|
||||
You can try running this on one of your projects, and they have a long list of [databases][8] included in the project itself for supporting different languages.
|
||||
|
||||
### Graudit pros and cons
|
||||
|
||||
Graudit supports a lot of languages, which makes it a good bet for users on many different systems. It's comparable to other free or paid tools because of its simplicity of use and broad language support. Most importantly, they are under development, and the community supports other users too.
|
||||
|
||||
Though this is a handy tool, you may find it difficult to identify a specific code as "vulnerable." Maybe the developers will include this function in future versions of the tool. But, it is always good to keep an eye on security issues in the code by using tools like this.
|
||||
|
||||
### Conclusion
|
||||
|
||||
In this article, I've only covered one of the many types of security testing—static application security testing. It's easy to start with static code analysis, but that's just the beginning. You can add other types of application security testing in your application development pipeline to enrich your overall security awareness.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/8/static-code-security-analysis
|
||||
|
||||
作者:[Ari Noman][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/arinoman
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/programming_code_screen_display.jpg?itok=2HMTzqz0 (Code on a screen)
|
||||
[2]: https://owasp.org/www-community/vulnerabilities/
|
||||
[3]: https://github.com/wireghoul/graudit
|
||||
[4]: https://project-awesome.org/mre/awesome-static-analysis
|
||||
[5]: https://opensource.com/sites/default/files/uploads/graudit_1.png (Graudit terminal screen showing help page)
|
||||
[6]: https://opensource.com/sites/default/files/uploads/graudit_2.png (JavaScript file showing Graudit display of vulnerable code)
|
||||
[7]: https://opensource.com/sites/default/files/uploads/graudit_3.png (JavaScript file showing Graudit display of vulnerable code)
|
||||
[8]: https://github.com/wireghoul/graudit#databases
|
@ -0,0 +1,162 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (OnionShare: An Open-Source Tool to Share Files Securely Over Tor Network)
|
||||
[#]: via: (https://itsfoss.com/onionshare/)
|
||||
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
|
||||
|
||||
OnionShare: 一个通过 Tor 网络安全共享文件的开源工具
|
||||
======
|
||||
|
||||
_**简介:OnionShare 是一个免费开源工具,它利用 Tor 网络安全和匿名地共享文件。**_
|
||||
|
||||
你可能已经有很多在线服务来安全地共享文件,但它可能不是完全匿名的。
|
||||
|
||||
此外,你必须依靠一个集中式服务来共享文件,如果服务决定像 [Firefox Send][1] 那样关闭,那你不能真正依靠它来一直安全地共享文件。
|
||||
|
||||
考虑到这些,OnionShare 是一个让人惊叹的开源工具,它让你使用 [Tor Onion 服务][2]来共享文件。它应该是所有云端文件共享服务的一个很好的替代品。
|
||||
|
||||
让我们来看看它提供了什么以及它是如何工作的。
|
||||
|
||||
![][3]
|
||||
|
||||
### OnionShare: 通过 Tor 匿名分享文件
|
||||
|
||||
[OnionShare][4] 是一款有趣的开源工具,可用于 Linux、Windows 和 macOS。
|
||||
|
||||
它可以让你安全地将文件直接从你的电脑分享给接收者,而不会在这个过程中暴露你的身份。你不必注册任何帐户,它也不依赖于任何集中式存储服务。
|
||||
|
||||
它基本上是在 Tor 网络上的点对点服务。接收者只需要有一个 [Tor 浏览器][5]就可以下载/上传文件到你的电脑上。如果你好奇的话,我也建议你去看看我们的 [Tor 指南][6]来探索更多关于它的内容。
|
||||
|
||||
让我们来看看它的功能。
|
||||
|
||||
### OnionShare 的功能
|
||||
|
||||
对于一个只想要安全和匿名的普通用户来说,它不需要调整。不过,如果你有需要,它也有一些高级选项。
|
||||
|
||||
* 跨平台支持(Windows、macOS和 Linux)。
|
||||
* 发送文件
|
||||
* 接收文件
|
||||
* 命令行选项
|
||||
* 发布洋葱站点
|
||||
* 能够使用桥接(如果你的 Tor 连接不起作用)
|
||||
* 能够使用持久 URL 进行共享(高级用户)。
|
||||
* 隐身模式(更安全)
|
||||
|
||||
|
||||
|
||||
你可以通过 GitHub 上的[官方用户指南][7]来了解更多关于它们的信息。
|
||||
|
||||
### 在 Linux 上安装 OnionShare
|
||||
|
||||
|
||||
你应该可以在你的软件中心找到 OnionShare 并安装它。如果没有,你可以在 Ubuntu 发行版上使用下面的命令添加 PPA:
|
||||
|
||||
```
|
||||
sudo add-apt-repository ppa:micahflee/ppa
|
||||
sudo apt update
|
||||
sudo apt install -y onionshare
|
||||
```
|
||||
|
||||
如果你想把它安装在其他 Linux 发行版上,你可以访问[官方网站][4]获取 Fedora 上的安装说明以及构建说明。
|
||||
|
||||
[下载 OnionShare][4]
|
||||
|
||||
### OnionShare 如何工作?
|
||||
|
||||
当你安装好后,一切都很明了且易于使用。但是,如果你想开始,让我告诉你它是如何工作的。
|
||||
|
||||
完成后,它加载并连接到 Tor 网络。
|
||||
|
||||
#### 共享文件
|
||||
|
||||
![][8]
|
||||
|
||||
你只需要在电脑上添加你要分享的文件,然后点击 “**Start sharing**”。
|
||||
|
||||
完成后,右下角的状态应该是 “**Sharing**”,然后会生成一个 **OnionShare 地址**(自动复制到剪贴板),如下图所示。
|
||||
|
||||
![][9]
|
||||
|
||||
现在接收方需要的是 OnionShare 的地址,它看上去是这样的。
|
||||
|
||||
```
|
||||
http://onionshare:[email protected]
|
||||
```
|
||||
|
||||
接着 Tor 浏览器开始下载文件。
|
||||
|
||||
值得注意的是,下载完成后(文件传输完成),文件共享就会停止。到时候也会通知你。
|
||||
|
||||
所以,如果你要再次分享或与他人分享,你必须重新分享,并将新的 OnionShare 地址发送给接收者。
|
||||
|
||||
#### 允许接收文件
|
||||
|
||||
如果你想生成一个 URL,让别人直接上传文件到你的电脑上(要注意谁与你分享),你可以在启动 OnionShare 后点击 **Receive Files** 标签即可。
|
||||
|
||||
![][10]
|
||||
|
||||
你只需要点击 “**Start Receive Mode**” 按钮就可以开始了。接下来,你会得到一个 OnionShare 地址(就像共享文件时一样)。
|
||||
|
||||
接收者必须使用 Tor 浏览器访问它并开始上传文件。它应该像下面这样:
|
||||
|
||||
![][11]
|
||||
|
||||
虽然当有人上传文件到你的电脑上时,你会收到文件传输的通知,但完成后,你需要手动停止接收模式。
|
||||
|
||||
#### 下载/上传文件
|
||||
|
||||
考虑到你已经安装了 Tor 浏览器,你只需要在 URL 地址中输入 OnionShare 的地址,确认登录(按 OK 键),它看上去像这样。
|
||||
|
||||
![][12]
|
||||
|
||||
同样,当你得到一个上传文件的地址时,它看上去是这样的。
|
||||
|
||||
![][13]
|
||||
|
||||
#### 发布洋葱站点
|
||||
|
||||
如果你想的话,你可以直接添加文件来托管一个静态的洋葱网站。当然,正因为是点对点的连接,所以在它从你的电脑上传输每个文件时,加载速度会非常慢。
|
||||
|
||||
![][14]
|
||||
|
||||
我试着用[免费模板][15]测试了一下,效果很好(但很慢)。所以,这可能取决于你的网络连接。
|
||||
|
||||
### **总结**
|
||||
|
||||
除了上面提到的功能,如果需要的话,你还可以使用命令行进行一些高级的调整。
|
||||
|
||||
OnionShare 的确是一款令人印象深刻的开源工具,它可以让你轻松地匿名分享文件,而不需要任何特殊的调整。
|
||||
|
||||
你尝试过 OnionShare 吗?你知道有类似的软件么?请在下面的评论中告诉我!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/onionshare/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](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/firefox-send/
|
||||
[2]: https://community.torproject.org/onion-services/
|
||||
[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/08/onionshare-screenshot.jpg?resize=800%2C629&ssl=1
|
||||
[4]: https://onionshare.org/
|
||||
[5]: https://itsfoss.com/install-tar-browser-linux/
|
||||
[6]: https://itsfoss.com/tor-guide/
|
||||
[7]: https://github.com/micahflee/onionshare/wiki
|
||||
[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/08/onionshare-share.png?resize=800%2C604&ssl=1
|
||||
[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/08/onionshare-file-shared.jpg?resize=800%2C532&ssl=1
|
||||
[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/08/onionshare-receive-files.jpg?resize=800%2C655&ssl=1
|
||||
[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/08/onionshare-receive-mode.jpg?resize=800%2C529&ssl=1
|
||||
[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/08/onionshare-download.jpg?resize=800%2C499&ssl=1
|
||||
[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/08/onionshare-upload.jpg?resize=800%2C542&ssl=1
|
||||
[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/08/onionshare-onion-site.jpg?resize=800%2C366&ssl=1
|
||||
[15]: https://www.styleshout.com/free-templates/kards/
|
Loading…
Reference in New Issue
Block a user