From ff12562754b0e227147fb4b0fb05781f6afe9eeb Mon Sep 17 00:00:00 2001 From: DarkSun Date: Mon, 29 Jun 2020 05:01:59 +0800 Subject: [PATCH 001/130] =?UTF-8?q?=E9=80=89=E9=A2=98[talk]:=2020200628=20?= =?UTF-8?q?Roy=20Fielding's=20Misappropriated=20REST=20Dissertation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20200628 Roy Fielding-s Misappropriated REST Dissertation.md --- ...ing-s Misappropriated REST Dissertation.md | 125 ++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 sources/talk/20200628 Roy Fielding-s Misappropriated REST Dissertation.md diff --git a/sources/talk/20200628 Roy Fielding-s Misappropriated REST Dissertation.md b/sources/talk/20200628 Roy Fielding-s Misappropriated REST Dissertation.md new file mode 100644 index 0000000000..5906fd1d92 --- /dev/null +++ b/sources/talk/20200628 Roy Fielding-s Misappropriated REST Dissertation.md @@ -0,0 +1,125 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Roy Fielding's Misappropriated REST Dissertation) +[#]: via: (https://twobithistory.org/2020/06/28/rest.html) +[#]: author: (Two-Bit History https://twobithistory.org) + +Roy Fielding's Misappropriated REST Dissertation +====== + +RESTful APIs are everywhere. This is funny, because how many people really know what “RESTful” is supposed to mean? + +I think most of us can empathize with [this Hacker News poster][1]: + +> I’ve read several articles about REST, even a bit of the original paper. But I still have quite a vague idea about what it is. I’m beginning to think that nobody knows, that it’s simply a very poorly defined concept. + +I had planned to write a blog post exploring how REST came to be such a dominant paradigm for communication across the internet. I started my research by reading [Roy Fielding’s 2000 dissertation][2], which introduced REST to the world. After reading Fielding’s dissertation, I realized that the much more interesting story here is how Fielding’s ideas came to be so widely misunderstood. + +Many more people know that Fielding’s dissertation is where REST came from than have read the dissertation (fair enough), so misconceptions about what the dissertation actually contains are pervasive. + +The biggest of these misconceptions is that the dissertation directly addresses the problem of building APIs. I had always assumed, as I imagine many people do, that REST was intended from the get-go as an architectural model for web APIs built on top of HTTP. I thought perhaps that there had been some chaotic experimental period where people were building APIs on top of HTTP all wrong, and then Fielding came along and presented REST as the sane way to do things. But the timeline doesn’t make sense here: APIs for web services, in the sense that we know them today, weren’t a thing until a few years after Fielding published his dissertation. + +Fielding’s dissertation (titled “Architectural Styles and the Design of Network-based Software Architectures”) is not about how to build APIs on top of HTTP but rather about HTTP itself. Fielding contributed to the HTTP/1.0 specification and co-authored the HTTP/1.1 specification, which was published in 1999. He was interested in the architectural lessons that could be drawn from the design of the HTTP protocol; his dissertation presents REST as a distillation of the architectural principles that guided the standardization process for HTTP/1.1. Fielding used these principles to make decisions about which proposals to incorporate into HTTP/1.1. For example, he rejected a proposal to batch requests using new `MGET` and `MHEAD` methods because he felt the proposal violated the constraints prescribed by REST, especially the constraint that messages in a REST system should be easy to proxy and cache.[1][3] So HTTP/1.1 was instead designed around persistent connections over which multiple HTTP requests can be sent. (Fielding also felt that cookies are not RESTful because they add state to what should be a stateless system, but their usage was already entrenched.[2][4]) REST, for Fielding, was not a guide to building HTTP-based systems but a guide to extending HTTP. + +This isn’t to say that Fielding doesn’t think REST could be used to build other systems. It’s just that he assumes these other systems will also be “distributed hypermedia systems.” This is another misconception people have about REST: that it is a general architecture you can use for any kind of networked application. But you could sum up the part of the dissertation where Fielding introduces REST as, essentially, “Listen, we just designed HTTP, so if you also find yourself designing a _distributed hypermedia system_ you should use this cool architecture we worked out called REST to make things easier.” It’s not obvious why Fielding thinks anyone would ever attempt to build such a thing given that the web already exists; perhaps in 2000 it seemed like there was room for more than one distributed hypermedia system in the world. Anyway, Fielding makes clear that REST is intended as a solution for the scalability and consistency problems that arise when trying to connect hypermedia across the internet, _not_ as an architectural model for distributed applications in general. + +We remember Fielding’s dissertation now as the dissertation that introduced REST, but really the dissertation is about how much one-size-fits-all software architectures suck, and how you can better pick a software architecture appropriate for your needs. Only a single chapter of the dissertation is devoted to REST itself; much of the word count is spent on a taxonomy of alternative architectural styles[3][5] that one could use for networked applications. Among these is the Pipe-and-Filter (PF) style, inspired by Unix pipes, along with various refinements of the Client-Server style (CS), such as Layered-Client-Server (LCS), Client-Cache-Stateless-Server (C$SS), and Layered-Client-Cache-Stateless-Server (LC$SS). The acronyms get unwieldy but Fielding’s point is that you can mix and match constraints imposed by existing styles to derive new styles. REST gets derived this way and could instead have been called—but for obvious reasons was not—Uniform-Layered-Code-on-Demand-Client-Cache-Stateless-Server (ULCODC$SS). Fielding establishes this taxonomy to emphasize that different constraints are appropriate for different applications and that this last group of constraints were the ones he felt worked best for HTTP. + +This is the deep, deep irony of REST’s ubiquity today. REST gets blindly used for all sorts of networked applications now, but Fielding originally offered REST as an illustration of how to derive a software architecture tailored to an individual application’s particular needs. + +I struggle to understand how this happened, because Fielding is so explicit about the pitfalls of not letting form follow function. He warns, almost at the very beginning of the dissertation, that “design-by-buzzword is a common occurrence” brought on by a failure to properly appreciate software architecture.[4][6] He picks up this theme again several pages later: + +> Some architectural styles are often portrayed as “silver bullet” solutions for all forms of software. However, a good designer should select a style that matches the needs of a particular problem being solved.[5][7] + +REST itself is an especially poor “silver bullet” solution, because, as Fielding later points out, it incorporates trade-offs that may not be appropriate unless you are building a distributed hypermedia application: + +> REST is designed to be efficient for large-grain hypermedia data transfer, optimizing for the common case of the Web, but resulting in an interface that is not optimal for other forms of architectural interaction.[6][8] + +Fielding came up with REST because the web posed a thorny problem of “anarchic scalability,” by which Fielding means the need to connect documents in a performant way across organizational and national boundaries. The constraints that REST imposes were carefully chosen to solve this anarchic scalability problem. Web service APIs that are _public-facing_ have to deal with a similar problem, so one can see why REST is relevant there. Yet today it would not be at all surprising to find that an engineering team has built a backend using REST even though the backend only talks to clients that the engineering team has full control over. We have all become the architect in [this Monty Python sketch][9], who designs an apartment building in the style of a slaughterhouse because slaughterhouses are the only thing he has experience building. (Fielding uses a line from this sketch as an epigraph for his dissertation: “Excuse me… did you say ‘knives’?”) + +So, given that Fielding’s dissertation was all about avoiding silver bullet software architectures, how did REST become a de facto standard for web services of every kind? + +My theory is that, in the mid-2000s, the people who were sick of SOAP and wanted to do something else needed their own four-letter acronym. + +I’m only half-joking here. SOAP, or the Simple Object Access Protocol, is a verbose and complicated protocol that you cannot use without first understanding a bunch of interrelated XML specifications. Early web services offered APIs based on SOAP, but, as more and more APIs started being offered in the mid-2000s, software developers burned by SOAP’s complexity migrated away en masse. + +Among this crowd, SOAP inspired contempt. Ruby-on-Rails dropped SOAP support in 2007, leading to this emblematic comment from Rails creator David Heinemeier Hansson: “We feel that SOAP is overly complicated. It’s been taken over by the enterprise people, and when that happens, usually nothing good comes of it.”[7][10] The “enterprise people” wanted everything to be formally specified, but the get-shit-done crowd saw that as a waste of time. + +If the get-shit-done crowd wasn’t going to use SOAP, they still needed some standard way of doing things. Since everyone was using HTTP, and since everyone would keep using HTTP at least as a transport layer because of all the proxying and caching support, the simplest possible thing to do was just rely on HTTP’s existing semantics. So that’s what they did. They could have called their approach Fuck It, Overload HTTP (FIOH), and that would have been an accurate name, as anyone who has ever tried to decide what HTTP status code to return for a business logic error can attest. But that would have seemed recklessly blasé next to all the formal specification work that went into SOAP. + +Luckily, there was this dissertation out there, written by a co-author of the HTTP/1.1 specification, that had something vaguely to do with extending HTTP and could offer FIOH a veneer of academic respectability. So REST was appropriated to give cover for what was really just FIOH. + +I’m not saying that this is exactly how things happened, or that there was an actual conspiracy among irreverent startup types to misappropriate REST, but this story helps me understand how REST became a model for web service APIs when Fielding’s dissertation isn’t about web service APIs at all. Adopting REST’s constraints makes some sense, especially for public-facing APIs that do cross organizational boundaries and thus benefit from REST’s “uniform interface.” That link must have been the kernel of why REST first got mentioned in connection with building APIs on the web. But imagining a separate approach called “FIOH,” that borrowed the “REST” name partly just for marketing reasons, helps me account for the many disparities between what today we know as RESTful APIs and the REST architectural style that Fielding originally described. + +REST purists often complain, for example, that so-called REST APIs aren’t actually REST APIs because they do not use Hypermedia as The Engine of Application State (HATEOAS). Fielding himself [has made this criticism][11]. According to him, a real REST API is supposed to allow you to navigate all its endpoints from a base endpoint by following links. If you think that people are actually out there trying to build REST APIs, then this is a glaring omission—HATEOAS really is fundamental to Fielding’s original conception of REST, especially considering that the “state transfer” in “Representational State Transfer” refers to navigating a state machine using hyperlinks between resources (and not, as many people seem to believe, to transferring resource state over the wire).[8][12] But if you imagine that everyone is just building FIOH APIs and advertising them, with a nudge and a wink, as REST APIs, or slightly more honestly as “RESTful” APIs, then of course HATEOAS is unimportant. + +Similarly, you might be surprised to know that there is nothing in Fielding’s dissertation about which HTTP verb should map to which CRUD action, even though software developers like to argue endlessly about whether using PUT or PATCH to update a resource is more RESTful. Having a standard mapping of HTTP verbs to CRUD actions is a useful thing, but this standard mapping is part of FIOH and not part of REST. + +This is why, rather than saying that nobody understands REST, we should just think of the term “REST” as having been misappropriated. The modern notion of a REST API has historical links to Fielding’s REST architecture, but really the two things are separate. The historical link is good to keep in mind as a guide for when to build a RESTful API. Does your API cross organizational and national boundaries the same way that HTTP needs to? Then building a RESTful API with a predictable, uniform interface might be the right approach. If not, it’s good to remember that Fielding favored having form follow function. Maybe something like GraphQL or even just JSON-RPC would be a better fit for what you are trying to accomplish. + +_If you enjoyed this post, more like it come out every four weeks! Follow [@TwoBitHistory][13] on Twitter or subscribe to the [RSS feed][14] to make sure you know when a new post is out._ + +_Previously on TwoBitHistory…_ + +> New post is up! I wrote about how to solve differential equations using an analog computer from the '30s mostly made out of gears. As a bonus there's even some stuff in here about how to aim very large artillery pieces. +> +> — TwoBitHistory (@TwoBitHistory) [April 6, 2020][15] + + 1. Roy Fielding. “Architectural Styles and the Design of Network-based Software Architectures,” 128. 2000. University of California, Irvine, PhD Dissertation, accessed June 28, 2020, . [↩︎][16] + + 2. Fielding, 130. [↩︎][17] + + 3. Fielding distinguishes between software architectures and software architecture “styles.” REST is an architectural style that has an instantiation in the architecture of HTTP. [↩︎][18] + + 4. Fielding, 2. [↩︎][19] + + 5. Fielding, 15. [↩︎][20] + + 6. Fielding, 82. [↩︎][21] + + 7. Paul Krill. “Ruby on Rails 2.0 released for Web Apps,” InfoWorld. Dec 7, 2007, accessed June 28, 2020,  [↩︎][22] + + 8. Fielding, 109. [↩︎][23] + + + + +-------------------------------------------------------------------------------- + +via: https://twobithistory.org/2020/06/28/rest.html + +作者:[Two-Bit History][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://twobithistory.org +[b]: https://github.com/lujun9972 +[1]: https://news.ycombinator.com/item?id=7201871 +[2]: https://www.ics.uci.edu/~fielding/pubs/dissertation/fielding_dissertation_2up.pdf +[3]: tmp.o6JUcKs91D#fn:1 +[4]: tmp.o6JUcKs91D#fn:2 +[5]: tmp.o6JUcKs91D#fn:3 +[6]: tmp.o6JUcKs91D#fn:4 +[7]: tmp.o6JUcKs91D#fn:5 +[8]: tmp.o6JUcKs91D#fn:6 +[9]: https://www.youtube.com/watch?v=vNoPJqm3DAY +[10]: tmp.o6JUcKs91D#fn:7 +[11]: https://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven +[12]: tmp.o6JUcKs91D#fn:8 +[13]: https://twitter.com/TwoBitHistory +[14]: https://twobithistory.org/feed.xml +[15]: https://twitter.com/TwoBitHistory/status/1247187881946275841?ref_src=twsrc%5Etfw +[16]: tmp.o6JUcKs91D#fnref:1 +[17]: tmp.o6JUcKs91D#fnref:2 +[18]: tmp.o6JUcKs91D#fnref:3 +[19]: tmp.o6JUcKs91D#fnref:4 +[20]: tmp.o6JUcKs91D#fnref:5 +[21]: tmp.o6JUcKs91D#fnref:6 +[22]: tmp.o6JUcKs91D#fnref:7 +[23]: tmp.o6JUcKs91D#fnref:8 From 1d6514fa8a660d2ec82faf26d2e57a003ad2ba9b Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 28 Oct 2020 15:51:24 +0800 Subject: [PATCH 002/130] PUB @wxy https://linux.cn/article-12764-1.html --- .../20201027 Fedora 33 is officially here.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/news => published}/20201027 Fedora 33 is officially here.md (99%) diff --git a/translated/news/20201027 Fedora 33 is officially here.md b/published/20201027 Fedora 33 is officially here.md similarity index 99% rename from translated/news/20201027 Fedora 33 is officially here.md rename to published/20201027 Fedora 33 is officially here.md index ad8fe96322..f1fa986952 100644 --- a/translated/news/20201027 Fedora 33 is officially here.md +++ b/published/20201027 Fedora 33 is officially here.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12764-1.html) [#]: subject: (Fedora 33 is officially here!) [#]: via: (https://fedoramagazine.org/announcing-fedora-33/) [#]: author: (Matthew Miller https://fedoramagazine.org/author/mattdm/) From 032f63376336f9783a165a64edfb383f3469106b Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 28 Oct 2020 21:18:39 +0800 Subject: [PATCH 003/130] PRF @HankChow --- ...ion with Ansible modules for Kubernetes.md | 69 ++++++++----------- 1 file changed, 27 insertions(+), 42 deletions(-) diff --git a/translated/tech/20200910 Automate your container orchestration with Ansible modules for Kubernetes.md b/translated/tech/20200910 Automate your container orchestration with Ansible modules for Kubernetes.md index e0566d713c..6183972de4 100644 --- a/translated/tech/20200910 Automate your container orchestration with Ansible modules for Kubernetes.md +++ b/translated/tech/20200910 Automate your container orchestration with Ansible modules for Kubernetes.md @@ -1,36 +1,35 @@ [#]: collector: (lujun9972) [#]: translator: (HankChow) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Automate your container orchestration with Ansible modules for Kubernetes) [#]: via: (https://opensource.com/article/20/9/ansible-modules-kubernetes) [#]: author: (Seth Kenlon https://opensource.com/users/seth) - -使用 Ansible Kubernetes 模块实现容器编排自动化 +使用 Ansible 的 Kubernetes 模块实现容器编排自动化 ====== -> 在云上的 Kubernetes 中结合 Ansible 实现自动化的同时,还可以参照我们的速记表熟悉 Ansible 的 k8s 模块。 -![Ship captain sailing the Kubernetes seas][1] +> 将 Kubernetes 与 Ansible 结合实现云端自动化。此外,还可以参照我们的 Ansible 的 k8s 模块速查表。 + +![](https://img.linux.net.cn/data/attachment/album/202010/28/211747jhlttlf3f81xrffi.jpg) [Ansible][2] 是实现自动化工作的优秀工具,而 [Kubernetes][3] 则是容器编排方面的利器,要是把两者结合起来,会有怎样的效果呢?正如你所猜测的,Ansible + Kubernetes 的确可以实现容器编排自动化。 ### Ansible 模块 -实际上,Ansible 本身只是一个用于解释 YAML 文件的框架。它真正强大之处在于它[丰富的模块][4],所谓模块module,就是在 Ansible playbook 中让你得以通过简单配置就能调用外部应用程序的一些工具。 +实际上,Ansible 本身只是一个用于解释 YAML 文件的框架。它真正强大之处在于它[丰富的模块][4],所谓模块module,就是在 Ansible 剧本playbook 中让你得以通过简单配置就能调用外部应用程序的一些工具。 Ansible 中有模块可以直接操作 Kubernetes,也有对一些相关组件(例如 [Docker][5] 和 [Podman][6])实现操作的模块。学习使用一个新模块的过程和学习新的终端命令、API 一样,可以先从文档中了解这个模块在调用的时候需要接受哪些参数,以及这些参数在外部应用程序中产生的具体作用。 ### 访问 Kubernetes 集群 -在使用 Ansible Kubernetes 模块之前,先要有能够访问 Kubernetes 集群的权限。在没有权限的情况下,可以尝试使用一个短期账号,但我们更推荐的是按照 Kubernetes 官网上的指引,或是参考 Braynt Son 《[入门 Kubernetes][8]》的教程安装 [Minikube][7]。Minikube 提供了一个单节点 Kubernetes 实例的安装过程,你可以像使用一个完整集群一样对其进行配置和交互。 +在使用 Ansible Kubernetes 模块之前,先要有能够访问 Kubernetes 集群的权限。在没有权限的情况下,可以尝试使用一个短期在线试用账号,但我们更推荐的是按照 Kubernetes 官网上的指引,或是参考 Braynt Son 《[入门 Kubernetes][8]》的教程安装 [Minikube][7]。Minikube 提供了一个单节点 Kubernetes 实例的安装过程,你可以像使用一个完整集群一样对其进行配置和交互。 -**[下载 [Ansible k8s 速记表][9]]** +- 下载 [Ansible k8s 速记表][9](需注册) 在安装 Minikube 之前,你需要确保你的环境支持虚拟化并安装 `libvirt`,然后对 `libvirt` 用户组授权: - ``` $ sudo dnf install libvirt $ sudo systemctl start libvirtd @@ -42,7 +41,6 @@ $ newgrp libvirt 为了能够在 Ansible 中使用 Kubernetes 相关的模块,你需要安装以下这些 Python 模块: - ``` $ pip3.6 install kubernetes --user $ pip3.6 install openshift --user @@ -52,9 +50,8 @@ $ pip3.6 install openshift --user 如果你使用的是 Minikube 而不是完整的 Kubernetes 集群,请使用 `minikube` 命令在本地创建一个最精简化的 Kubernetes 实例: - ``` -`$ minikube start --driver=kvm2 --kvm-network default` +$ minikube start --driver=kvm2 --kvm-network default ``` 然后等待 Minikube 完成初始化,这个过程所需的时间会因实际情况而异。 @@ -63,29 +60,26 @@ $ pip3.6 install openshift --user 集群启动以后,通过 `cluster-info` 选项就可以获取到集群相关信息了: - ``` $ kubectl cluster-info -Kubernetes master is running at -KubeDNS is running at +Kubernetes master is running at https://192.168.39.190:8443 +KubeDNS is running at https://192.168.39.190:8443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'. ``` -### 使用 `k8s` 模块 - -Ansible 使用 `k8s` 这个模块来实现对 Kubernetes 的操作,在 playbook 中使用 `k8s` 模块就可以对 Kuvernetes 对象进行管理。这个模块描述了 `kubectl` 命令的最终状态,例如对于以下这个使用 `kubectl` 创建新的[命名空间][10]的操作: +### 使用 k8s 模块 +Ansible 使用 `k8s` 这个模块来实现对 Kubernetes 的操作,在剧本中使用 `k8s` 模块就可以对 Kuvernetes 对象进行管理。这个模块描述了 `kubectl` 命令的最终状态,例如对于以下这个使用 `kubectl` 创建新的[命名空间][10]的操作: ``` -`$ kubectl create namespace my-namespace` +$ kubectl create namespace my-namespace ``` 这是一个很简单的操作,而对这个操作的最终状态用 YAML 文件来描述是这样的: - ``` -\- hosts: localhost +- hosts: localhost   tasks:     - name: create namespace       k8s: @@ -95,25 +89,22 @@ Ansible 使用 `k8s` 这个模块来实现对 Kubernetes 的操作,在 playboo         state: present ``` -如果你使用的是 Minikube,那么主机名应该定义为 `localhost`。需要注意的是,模块中对其它可用参数也定义了对应的语法(例如 `api_version` 和 `kind` 参数)。 - -在运行这个 playbook 之前,先通过 `yamllint` 命令验证是否有错误: +如果你使用的是 Minikube,那么主机名(`hosts`)应该定义为 `localhost`。需要注意的是,所使用的模块也定义了可用参数的语法(例如 `api_version` 和 `kind` 参数)。 +在运行这个剧本之前,先通过 `yamllint` 命令验证是否有错误: ``` -`$ yamllint example.yaml` +$ yamllint example.yaml ``` -确保没有错误之后,运行 playbook: - +确保没有错误之后,运行剧本: ``` -`$ ansible-playbook ./example.yaml` +$ ansible-playbook ./example.yaml ``` 可以验证新的命名空间是否已经被创建出来: - ``` $ kubectl get namespaces NAME              STATUS   AGE @@ -127,10 +118,9 @@ my-namespace      Active   3s ### 使用 Podman 拉取容器镜像 -容器是受 Kubernetes 管理的最小单位 Linux 系统,因此 [LXC 项目][11]和 Docker 对容器定义了很多规范。Podman 是一个最新的容器操作工具集,它不需要守护进程就可以运行,为此受到了很多用户的欢迎。 - -通过 Podman 可以从 Docker Hub 或者 Quay.io 拉取到容器镜像。这一操作对应的 Ansible 语法也很简单,只需要将存储库网站提供的镜像路径写在 playbook 中的相应位置就可以了: +容器是个 Linux 系统,几乎是最小化的,可以由 Kubernetes 管理。[LXC 项目][11]和 Docker 定义了大部分的容器规范。最近加入容器工具集的是 Podman,它不需要守护进程就可以运行,为此受到了很多用户的欢迎。 +通过 Podman 可以从 Docker Hub 或者 Quay.io 等存储库拉取容器镜像。这一操作对应的 Ansible 语法也很简单,只需要将存储库网站提供的镜像路径写在剧本中的相应位置就可以了: ```    - name: pull an image @@ -140,13 +130,11 @@ my-namespace      Active   3s 使用 `yamllint` 验证: - ``` -`$ yamllint example.yaml` +$ yamllint example.yaml ``` -运行 playbook: - +运行剧本: ``` $ ansible-playbook ./example.yaml @@ -171,8 +159,7 @@ localhost: ok=3 changed=1 unreachable=0 failed=0 ### 使用 Ansible 实现部署 -Ansible 除了可以执行小型维护任务以外,还可以通过 playbook 实现其它由 `kubectl` 实现的功能,因为两者的 YAML 文件之间只有少量的差异。 在 Kubernetes 中使用的 YAML 文件只需要稍加改动,就可以在 Ansible playbook 中使用。例如下面这个用于使用 `kubectl` 命令部署 Web 服务器的 YAML 文件: - +Ansible 除了可以执行小型维护任务以外,还可以通过剧本实现其它由 `kubectl` 实现的功能,因为两者的 YAML 文件之间只有少量的差异。在 Kubernetes 中使用的 YAML 文件只需要稍加改动,就可以在 Ansible 剧本中使用。例如下面这个用于使用 `kubectl` 命令部署 Web 服务器的 YAML 文件: ``` apiVersion: apps/v1 @@ -196,8 +183,7 @@ spec:         - containerPort: 80 ``` -如果你对其中的参数比较熟悉,你只要把 YAML 文件中的大部分内容放到 playbook 中的 `definition` 部分,就可以在 Ansible 中使用了: - +如果你对其中的参数比较熟悉,你只要把 YAML 文件中的大部分内容放到剧本中的 `definition` 部分,就可以在 Ansible 中使用了: ```    - name: deploy a web server @@ -230,7 +216,6 @@ spec: 执行完成后,使用 `kubectl` 命令可以看到预期中的的部署deployment: - ``` $ kubectl -n my-namespace get pods NAME                      READY  STATUS @@ -248,7 +233,7 @@ via: https://opensource.com/article/20/9/ansible-modules-kubernetes 作者:[Seth Kenlon][a] 选题:[lujun9972][b] 译者:[HankChow](https://github.com/HankChow) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 15ba2faf71234253e65aeef35bca57726eb07689 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 28 Oct 2020 21:19:20 +0800 Subject: [PATCH 004/130] PUB @HankChow https://linux.cn/article-12766-1.html --- ...ainer orchestration with Ansible modules for Kubernetes.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20200910 Automate your container orchestration with Ansible modules for Kubernetes.md (99%) diff --git a/translated/tech/20200910 Automate your container orchestration with Ansible modules for Kubernetes.md b/published/20200910 Automate your container orchestration with Ansible modules for Kubernetes.md similarity index 99% rename from translated/tech/20200910 Automate your container orchestration with Ansible modules for Kubernetes.md rename to published/20200910 Automate your container orchestration with Ansible modules for Kubernetes.md index 6183972de4..c30f1e28d9 100644 --- a/translated/tech/20200910 Automate your container orchestration with Ansible modules for Kubernetes.md +++ b/published/20200910 Automate your container orchestration with Ansible modules for Kubernetes.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (HankChow) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12766-1.html) [#]: subject: (Automate your container orchestration with Ansible modules for Kubernetes) [#]: via: (https://opensource.com/article/20/9/ansible-modules-kubernetes) [#]: author: (Seth Kenlon https://opensource.com/users/seth) From cd52557e342fc4ec43be04ae9bbdf6dc4cdc0bc3 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 29 Oct 2020 05:01:36 +0800 Subject: [PATCH 005/130] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020201028=20?= =?UTF-8?q?What=E2=80=99s=20new=20in=20Fedora=2033=20Workstation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20201028 What-s new in Fedora 33 Workstation.md --- ...028 What-s new in Fedora 33 Workstation.md | 81 +++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 sources/tech/20201028 What-s new in Fedora 33 Workstation.md diff --git a/sources/tech/20201028 What-s new in Fedora 33 Workstation.md b/sources/tech/20201028 What-s new in Fedora 33 Workstation.md new file mode 100644 index 0000000000..853af7ed6a --- /dev/null +++ b/sources/tech/20201028 What-s new in Fedora 33 Workstation.md @@ -0,0 +1,81 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (What’s new in Fedora 33 Workstation) +[#]: via: (https://fedoramagazine.org/whats-new-fedora-33-workstation/) +[#]: author: (Gregory Bartholomew https://fedoramagazine.org/author/glb/) + +What’s new in Fedora 33 Workstation +====== + +![][1] + +Fedora 33 Workstation is the [latest release][2] of our free, leading-edge operating system. You can download it from [the official website here][3] right now. There are several new and noteworthy changes in Fedora 33 Workstation. Read more details below. + +### GNOME 3.38 + +Fedora 33 Workstation includes the latest release of GNOME Desktop Environment for users of all types. GNOME 3.38 in Fedora 33 Workstation includes many updates and improvements, including: + +#### A new GNOME Tour app + +New users are now greeted by “a new _Tour_ application, highlighting the main functionality of the desktop and providing first time users a nice welcome to GNOME.” + +![The new GNOME Tour application in Fedora 33][4] + +#### Drag to reorder apps + +GNOME 3.38 replaces the previously split Frequent and All apps views with a single customizable and consistent view that allows you to reorder apps and organize them into custom folders. Simply click and drag to move apps around. + +![GNOME 3.38 Drag to Reorder][5] + +#### Improved screen recording + +The screen recording infrastructure in GNOME Shell has been improved to take advantage of PipeWire and kernel APIs. This will help reduce resource consumption and improve responsiveness. + +GNOME 3.38 also provides many additional features and enhancements. Check out the [GNOME 3.38 Release Notes][6] for further information. + +* * * + +### B-tree file system + +As [announced previously][7], new installations of Fedora 33 will default to using [Btrfs][8]. Features and enhancements are added to Btrfs with each new kernel release. The [change log][9] has a complete summary of the features that each new kernel version brings to Btrfs. + +* * * + +### Swap on ZRAM + +Anaconda and Fedora IoT have been using swap-on-zram by default for years. With Fedora 33, swap-on-zram will be enabled by default instead of a swap partition. Check out [the Fedora wiki page][10] for more details about swap-on-zram. + +* * * + +### Nano by default + +Fresh Fedora 33 installations will set the EDITOR environment variable to [_nano_ by default][11]. This change affects several command line tools that spawn a text editor when they require user input. With earlier releases, this environment variable default was unspecified, leaving it up to the individual application to pick a default editor. Typically, applications would use _[vi][12]_ as their default editor due to it being a small application that is traditionally available on the base installation of most Unix/Linux operating systems. Since Fedora 33 includes nano in its base installation, and since nano is more intuitive for a beginning user to use, Fedora 33 will use nano by default. Users who want vi can, of course, override the value of the EDITOR variable in their own environment. See [the Fedora change request][11] for more details. + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/whats-new-fedora-33-workstation/ + +作者:[Gregory Bartholomew][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://fedoramagazine.org/author/glb/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2020/10/f33workstation-816x345.jpg +[2]: https://fedoramagazine.org/announcing-fedora-33/ +[3]: https://getfedora.org/workstation +[4]: https://fedoramagazine.org/wp-content/uploads/2020/10/fedora-33-gnome-tour-1.png +[5]: https://fedoramagazine.org/wp-content/uploads/2020/10/drag-to-reorder-1.gif +[6]: https://help.gnome.org/misc/release-notes/3.38/ +[7]: https://fedoramagazine.org/btrfs-coming-to-fedora-33/ +[8]: https://en.wikipedia.org/wiki/Btrfs +[9]: https://btrfs.wiki.kernel.org/index.php/Changelog#By_feature +[10]: https://fedoraproject.org/wiki/Changes/SwapOnZRAM +[11]: https://fedoraproject.org/wiki/Changes/UseNanoByDefault +[12]: https://en.wikipedia.org/wiki/Vi From 0ffc10cb3654e74469e944f87f37afe0e38a9ca5 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 29 Oct 2020 05:01:46 +0800 Subject: [PATCH 006/130] add done: 20201028 What-s new in Fedora 33 Workstation.md --- ... old hardware back to life with OpenBSD.md | 73 +++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 sources/tech/20201027 Bring old hardware back to life with OpenBSD.md diff --git a/sources/tech/20201027 Bring old hardware back to life with OpenBSD.md b/sources/tech/20201027 Bring old hardware back to life with OpenBSD.md new file mode 100644 index 0000000000..e2043c0f54 --- /dev/null +++ b/sources/tech/20201027 Bring old hardware back to life with OpenBSD.md @@ -0,0 +1,73 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Bring old hardware back to life with OpenBSD) +[#]: via: (https://opensource.com/article/20/10/old-hardware-openbsd) +[#]: author: (Jonathan Garrido https://opensource.com/users/jgarrido) + +Bring old hardware back to life with OpenBSD +====== +Install OpenBSD and the Xfce desktop to give a new spin to an old +machine—for free. +![Old UNIX computer][1] + +Almost everyone has (or knows someone who has) old hardware sitting around gathering dust because they believe that no modern operating system (OS) supports such a relic. I know this is wrong because I am one of those geeks who likes to use every piece of equipment as long as it is possibly functional. + +Although most modern OSes do run better on modern hardware, it is also true that there are alternatives for up-to-date 32-bit OSes to run all types of machines, including very old ones. Thanks to a bunch of people with enough determination and skills, there are different types of Linux and BSD distros that you can use, free of charge, to give a new spin to an old machine. + +## What can you do with a new OS on old hardware? + +Besides the obvious benefit of bringing back a piece of equipment that has been idle for a price that is equal to nothing, using an open source 32-bit distro to revive "antique" hardware has several benefits and purposes, including: + + * **Create single-purpose equipment:** Today's networks are complex, and there are a lot of services that interact with one another. After bringing an old machine back to life, you can set it up to fulfill one of those unique services within your infrastructure, such as DHCP, DNS, or SFTP. + * **Learn how the OS works:** I always want to know how things work under the hood. Tinkering with old hardware and tiny OSes gives you the chance to understand the interactions between hardware and software, learn how to tune the installation's default settings to make the most of a system, and much, much more. + * **Teach others about open source:** Finally, 32-bit OSes and old hardware can teach the next generation about OSes and the open source world. One of the main features of these types of OSes is their simplicity of use with fewer options to overwhelm the user. This makes them an excellent tool to teach and explore the essential components of any operating system. + + + +## Distributions to try + +To encourage you, here is a list of distros that I have tried on old hardware with very good results. These are not the only options available, but these are the ones I have used the most: + + * [Linux Lite][2] + * [FreeBSD][3] + * [OpenBSD][4] + * [Lubuntu][5] + * [Debian][6] + * [Tiny Core Linux][7] + * [Slax Linux][8] + + + +## Give it a try with OpenBSD + +OpenBSD is one of the main [BSD][9] distros. It is well-known because it is made with security in mind, with almost no security bugs in the default installation and a lot of cryptography tools available to users. Another cool feature, at least for me, is the fact that you can run it on a huge variety of hardware, from new computers to very old machines. + +For this installation, my hardware was a 2005 MacBook with the following specs: + + * A 32-bit, dual-core processor + * 2GB of RAM (with no possibility of expansion) + * A 32GB hard drive + * Two network cards + * A CD-ROM (reads only CDs) + * A few USB ports + + + +### Install OpenBSD + +The installation was very straightforward. I [downloaded][10] the most recent version of OpenBSD and created a boot CD (because there is no other way to boot my old laptop besides the internal drive). The installation went flawlessly. It recognized my hardware, network (including my access point), and time zone; let me choose the layout of my hard drive and manage my users; and asked some questions about the system's security setup. Also, even though the installation has a very small footprint, OpenBSD let me choose what to install and from where. + +I ended up with a brand-new, up-to-date operating system and a screen like this. + +![OpenBSD][11] + +(Jonathan Garrido, [CC BY-SA 4.0][12]) + +### Add a graphical desktop + +If you want your desktop to use graphical applications, a black terminal with white letters is not enough. So follow these steps to install the [Xfce desktop][13]: + + 1. As root, run: [code]`pkg_add xcfe xfce-extras slim slim-themes consolekit2 polkit`[/code] to install the Xfce environment and the login greeter. In the above, `pkg_add` is the utility to use when you want to d \ No newline at end of file From 43d74056fba344f6633381e222f132fc9c17827f Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 29 Oct 2020 05:02:02 +0800 Subject: [PATCH 007/130] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020201029=20?= =?UTF-8?q?Linux=20Kernel=205.10=20Will=20be=20the=20Next=20LTS=20Release?= =?UTF-8?q?=20and=20it=20has=20Some=20Exciting=20Improvements=20Lined=20Up?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20201029 Linux Kernel 5.10 Will be the Next LTS Release and it has Some Exciting Improvements Lined Up.md --- ...has Some Exciting Improvements Lined Up.md | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 sources/tech/20201029 Linux Kernel 5.10 Will be the Next LTS Release and it has Some Exciting Improvements Lined Up.md diff --git a/sources/tech/20201029 Linux Kernel 5.10 Will be the Next LTS Release and it has Some Exciting Improvements Lined Up.md b/sources/tech/20201029 Linux Kernel 5.10 Will be the Next LTS Release and it has Some Exciting Improvements Lined Up.md new file mode 100644 index 0000000000..ccb6a1c284 --- /dev/null +++ b/sources/tech/20201029 Linux Kernel 5.10 Will be the Next LTS Release and it has Some Exciting Improvements Lined Up.md @@ -0,0 +1,93 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Linux Kernel 5.10 Will be the Next LTS Release and it has Some Exciting Improvements Lined Up) +[#]: via: (https://itsfoss.com/kernel-5-10/) +[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) + +Linux Kernel 5.10 Will be the Next LTS Release and it has Some Exciting Improvements Lined Up +====== + +_**Development for Linux Kernel 5.10 is in progress. It’s been confirmed to be a long term support release and it will be bringing newer hardware support among other promised features.**_ + +### Linux Kernel 5.10 will be Long Term Support Release + +**Greg Kroah-Hartman**, the key stable kernel maintainer, addressed an “Ask the Expert” session at Linux Foundation’s Open-Source Summit Europe and confirmed that Linux 5.10 will be the next LTS release. + +Even though there were some early speculations of 5.9 being the LTS release, Greg clarified that the last kernel release of the year will always be an LTS release. + +As of now, [Linux Kernel 5.4][1] series happens to be the latest LTS version out there which added a lot of improvements and hardware support. Also, considering the development progress with Linux [Kernel 5.8][2] being the biggest release so far and Linux 5.10’s first release candidate being close to it, there’s a lot of things going on under the hood. + +> Because people keep asking me… +> +> — Greg K-H (@gregkh) [October 26, 2020][3] + +Let’s take a look at some of the features and improvements that you can expect with Linux Kernel 5.10. + +### Linux kernel 5.10 features + +![][4] + +**Note:** _Linux Kernel 5.10 is still in early development. So, we will be updating the article regularly for the latest additions/feature updates._ + +#### AMD Zen 3 Processor Support + +The new [Ryzen 5000][5] lineup is one of the biggest buzzes of 2020. So, with Linux Kernel 5.10 release candidate version, various additions are being made for Zen 3 processors. + +#### Intel Rocket Lake Support + +I do not hope for a lot with Intel’s Rocket Lake chipsets arriving Q1 next year (2021). But, considering that Intel’s constantly squeezing everything out of that 14 nm process, it is definitely a good thing to see work done for Intel Rocket Lake on Linux Kernel 5.10 + +#### Open Source Driver for Radeon RX 6000 series + +Even though we’re covering this a day before the Big Navi reveal, the Radeon RX 6000 series is definitely going to be something impressive to compete with NVIDIA RTX 3000 series. + +Of course, unless it suffers from the same issues the Vega series or the 5000 series met with. + +It’s good to see work being already done for an open source driver to support the next-gen Radeon GPUs on Linux Kernel 5.10. + +#### File System Optimizations and Storage Improvements + +[Phoronix][6] reports on file-system optimizations and storage improvements with 5.10 as well. So, judging by that, we should see some performance improvements. + +#### Other Improvements + +Undoubtedly, you should expect a great deal of driver updates and hardware supports with the new kernel. + +For now, the support for SoundBlaster AE-7, early support for NVIDIA Orin (AI processor), and Tiger Lake GPU improvements seem to be the key highlights. + +A stable release for Linux Kernel 5.10 should be expected around the mid-December timeline. It will be supported for at least 2 years but you could end up with security/bug fix updates till 2026. So, we will have to stay tuned to the development for anything exciting on the next Linux Kernel 5.10 LTS release. + +**Recommended Read:** + +![][7] + +#### [Explained! Why Your Distribution Still Using an ‘Outdated’ Linux Kernel?][8] + +A new stable kernel is released every 2-3 months yet your distribution might still be using an old, outdated Linux kernel. But you don’t need to worry and here’s why! + +What do you think about the upcoming Linux Kernel 5.10 release? Let us know your thoughts in the comments. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/kernel-5-10/ + +作者:[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/linux-kernel-5-4/ +[2]: https://itsfoss.com/kernel-5-8-release/ +[3]: https://twitter.com/gregkh/status/1320745076566433793?ref_src=twsrc%5Etfw +[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/10/kernel-5-10-release.png?resize=800%2C450&ssl=1 +[5]: https://www.tomsguide.com/news/amd-ryzen-5000-revealed-what-it-means-for-pc-gaming +[6]: https://www.phoronix.com/scan.php?page=article&item=linux-510-features&num=1 +[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/12/why_Linux_distro_use_outdated_kernel.jpg?fit=800%2C450&ssl=1 +[8]: https://itsfoss.com/why-distros-use-old-kernel/ From 89a9a5cc307657315d57907616b976aab9dded3c Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 29 Oct 2020 05:02:20 +0800 Subject: [PATCH 008/130] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020201028=20?= =?UTF-8?q?How=20JavaScript=20became=20a=20serious=20programming=20languag?= =?UTF-8?q?e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20201028 How JavaScript became a serious programming language.md --- ...t became a serious programming language.md | 81 +++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 sources/tech/20201028 How JavaScript became a serious programming language.md diff --git a/sources/tech/20201028 How JavaScript became a serious programming language.md b/sources/tech/20201028 How JavaScript became a serious programming language.md new file mode 100644 index 0000000000..7818764717 --- /dev/null +++ b/sources/tech/20201028 How JavaScript became a serious programming language.md @@ -0,0 +1,81 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How JavaScript became a serious programming language) +[#]: via: (https://opensource.com/article/20/10/history-javascript) +[#]: author: (Nimisha Mukherjee https://opensource.com/users/nimisha) + +How JavaScript became a serious programming language +====== +From humble beginnings as a way to make websites pretty, JavaScript has +been transformed into a serious programming language. +![Javascript code close-up with neon graphic overlay][1] + +JavaScript's humble start began in 1995, when it was [created in just 10 days][2] by Brendan Eich, then an employee with Netscape Communications Corporation. JavaScript has come a long way since then, from a tool to make websites pretty to a serious programming language. + +In its early days, JavaScript was considered a visual tool that made websites a little more fun and attractive. Languages like [Jakarta Server Pages][3] (JSP; formerly JavaServer Pages) used to do all the heavy lifting on rendered web pages, and JavaScript was used to create basic interactions, visual enhancements, and animations. + +For a long time, the demarcations between HTML, CSS, and JavaScript were not clear. Frontend development primarily consists of HTML, CSS, and JavaScript, forming a "[layer cake][4]" of standard web technologies. + +![Layer cake of standard web technologies][5] + +The "[layer cake][4]" of standard web technologies (Mozilla Developers Network, [CC BY-SA 4.0][6]) + +HTML and CSS provide structure, format, and style to content. JavaScript comes into play once a web page does something beyond displaying static content. Ecma International develops JavaScript specifications, and the World Wide Web Consortium (W3C) develops HTML and CSS specifications. + +### How JavaScript gained prominence + +There is a long [history][7] behind how JavaScript came to be the [most popular][8] programming language. Back in the 1990s, Java was king, and comparisons to it were inevitable. Many engineers thought JavaScript was not a good programming language due to lack of support for object-oriented programming. Even though it was not evident, JavaScript's object-model and functional features were already present in its first version. + +After JavaScript's rushed release in 1995, Netscape submitted it to the European Computer Manufacturers Association (ECMA) International for standardization. This led to [ECMAScript][9], a JavaScript standard meant to ensure interoperability of web pages across different web browsers. ECMAScript 1 came out in June 1997 and helped to advance the standardization of JavaScript. + +During this time, PHP and JSP became popular server-side language choices. JSP had gained prominence as the preferred alternative to Common Gateway Interface ([CGI][10]) because it enabled embedding Java code in HTML. While it was popular, developers found it unnatural to have Java inside HTML. In addition, even for the simplest text change on HTML, JSP had to undergo a time-consuming lifecycle. In today's microservice world, JSP-oriented pages are considered technical debt.  + +[PHP][11] works similarly to JSP but the PHP code is processed as a Common Gateway Interface ([CGI][10]) executable. PHP-based web applications are easier to deploy than those based on JSP. Overall, it is easier to get up and running with PHP. Today, PHP and JavaScript are one of the most popular combinations for creating dynamic websites. PHP serves as the server-side scripting and JavaScript as the client-side scripting. + +JavaScript's adoption grew with the release of [jQuery][12], a multi-purpose JavaScript library that simplifies tedious Document Object Model (DOM) management, event handling, and [Ajax][13], in 2006.  + +The turning point for JavaScript came in 2009 when [Node.js][14] was released. Developers could now write server-side scripting with JavaScript. Closely following were frameworks like [Backbone.js][15] and [AngularJS][16], both released in 2010. This led to the concept of full-stack development using a single language. + +In 2015, Ecma International released ECMAScript 6 (ES6), which added significant new syntax for writing complex applications, including class declarations. Other new features included iterators, arrow function expressions, let and const keywords, typed arrays, new collections (maps, sets, and WeakMap), promises, template literals for strings, and many other cool features. Later editions have gone on to add more features that have made JavaScript more robust, streamlined, and reliable. + +### Conclusion + +JavaScript has advanced significantly over the past two decades. Most browsers now compete to meet compliance, so the latest specifications are rolled out faster. + +There are a host of stable JavaScript frameworks to choose from, depending on your project requirements, including the most popular ones: [React][17], [Angular][18], and [Vue.js][19]. In the next article in this series, I'll dive into why JavaScript is so popular. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/10/history-javascript + +作者:[Nimisha Mukherjee][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/nimisha +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/code_javascript.jpg?itok=60evKmGl (Javascript code close-up with neon graphic overlay) +[2]: https://en.wikipedia.org/wiki/JavaScript +[3]: https://en.wikipedia.org/wiki/Jakarta_Server_Pages +[4]: https://developer.mozilla.org/en-US/docs/Learn/JavaScript/First_steps/What_is_JavaScript +[5]: https://opensource.com/sites/default/files/uploads/layercakewebtech.png (Layer cake of standard web technologies) +[6]: https://creativecommons.org/licenses/by-sa/4.0/ +[7]: https://blog.logrocket.com/history-of-frontend-frameworks/ +[8]: https://octoverse.github.com/ +[9]: https://en.wikipedia.org/wiki/ECMAScript +[10]: https://en.wikipedia.org/wiki/Common_Gateway_Interface +[11]: https://en.wikipedia.org/wiki/PHP#:~:text=PHP%20development%20began%20in%201994,Interpreter%22%20or%20PHP%2FFI. +[12]: https://en.wikipedia.org/wiki/JQuery +[13]: https://en.wikipedia.org/wiki/Ajax_(programming) +[14]: https://en.wikipedia.org/wiki/Node.js +[15]: https://en.wikipedia.org/wiki/Backbone.js +[16]: https://en.wikipedia.org/wiki/AngularJS +[17]: https://reactjs.org/ +[18]: https://angular.io/ +[19]: https://vuejs.org/ From 775894f1b51a6413eb0cb34c7dff6a096bf6da28 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 29 Oct 2020 05:02:33 +0800 Subject: [PATCH 009/130] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020201028=20?= =?UTF-8?q?Program=20in=20Arm6=20assembly=20language=20on=20a=20Raspberry?= =?UTF-8?q?=20Pi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20201028 Program in Arm6 assembly language on a Raspberry Pi.md --- ...rm6 assembly language on a Raspberry Pi.md | 629 ++++++++++++++++++ 1 file changed, 629 insertions(+) create mode 100644 sources/tech/20201028 Program in Arm6 assembly language on a Raspberry Pi.md diff --git a/sources/tech/20201028 Program in Arm6 assembly language on a Raspberry Pi.md b/sources/tech/20201028 Program in Arm6 assembly language on a Raspberry Pi.md new file mode 100644 index 0000000000..b986e4d6e5 --- /dev/null +++ b/sources/tech/20201028 Program in Arm6 assembly language on a Raspberry Pi.md @@ -0,0 +1,629 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Program in Arm6 assembly language on a Raspberry Pi) +[#]: via: (https://opensource.com/article/20/10/arm6-assembly-language) +[#]: author: (Marty Kalin https://opensource.com/users/mkalindepauledu) + +Program in Arm6 assembly language on a Raspberry Pi +====== +Assembly language offers special insights into how machines work and how +they can be programmed. +![An intersection of pipes.][1] + +The [Arm website][2] touts the processor's underlying architecture as "the keystone of the world's largest compute ecosystem," which is plausible given the number of handheld and embedded devices with Arm processors. Arm processors are prevalent in the Internet of Things (IoT), but they are also used in desktop machines, servers, and even high-performance computers, such as the Fugaku HPC. But why look at Arm machines through the lens of assembly language? + +Assembly language is the symbolic language immediately above machine code and thereby offers special insights into how machines work and how they can be programmed efficiently. In this article, I hope to illustrate this point with the Arm6 architecture using a Raspberry Pi 4 mini-desktop machine running Debian. + +The Arm6 family of processors supports two instruction sets: + + * The Arm set, with 32-bit instructions throughout. + * The Thumb set, with a mix of 16-bit and 32-bit instructions. + + + +The examples in this article use the Arm instruction set. The Arm assembly code is in lowercase, and, for contrast, pseudo-assembly code is in uppercase. + +### Load-store machines + +The RISC/CISC distinction is often seen when comparing the Arm family and the Intel x86 family of processors, both of which are commercial products competing on the market. The terms RISC (reduced instruction set computer) and CISC (complex instruction set computer) date from the middle 1980s. Even then the terms were misleading, in that both RISC (e.g., MIPS) and CISC (e.g., Intel) processors had about 300 instructions in their instruction sets; today the counts for core instructions in Arm and Intel machines are close, although both types of machines have extended their instruction sets. A sharper distinction between Arm and Intel machines draws on an architectural feature other than instruction count. + +An instruction set architecture (ISA) is an abstract model of a computing machine. Processors from Arm and Intel implement different ISAs: Arm processors implement a load-store ISA, whereas their Intel counterparts implement a register-memory ISA. The difference in ISAs can be described as: + + * In a load-store machine, only two instructions move data between a CPU and the memory subsystem: + * A load instruction copies bits from memory into a CPU register. + * A store instruction copies bits from a CPU register into memory. + * Other instructions—in particular, the ones for arithmetic-logic operations—use only CPU registers as source and destination operands. For example, here is pseudo-assembly code on a load-store machine to add two numbers originally in memory, storing their sum back in memory (comments start with `##`): [code] ## R0 is a CPU register, RAM[32] is a memory location +LOAD R0, RAM[32]   ## R0 = RAM[32] +LOAD R1, RAM[64]   ## R1 = RAM[64] +ADD R2, R0, R1     ## R2 = R0 + R1 +STORE R2, RAM[32]  ## RAM[32] = R2 [/code] The task requires four instructions: two LOADs, one ADD, and one STORE. + * By contrast, a register-memory machine allows the operands for arithmetic-logic instructions to be registers or memory locations, usually in any combination. For example, here is pseudo-assembly code on a register-memory machine to add two numbers in memory: [code]`ADD RAM[32], RAM[32], RAM[64] ## RAM[32] += RAM[64]`[/code] The task can be accomplished with a single instruction, although the bits to be added must still be fetched from memory to a CPU, and the sum then must be copied back to memory location RAM[32]. + + + +Any ISA comes with tradeoffs. As the example above illustrates, a load-store ISA has what architects call "low instruction density": relatively many instructions may be required to perform a task. A register-memory machine has high instruction density, which is an upside. There are upsides, as well, to the load-store ISA. + +Load-store design is an effort to simplify an architecture. For instance, consider the case in which a register-memory machine has an instruction with mixed operands: + + +``` +COPY R2, RAM[64]          ## R2 = RAM[64] +ADD RAM[32], RAM[32], R2  ## RAM[32] = RAM[32] + R2 +``` + +Executing the ADD instruction is tricky in that the access times for the numbers to be added differs—perhaps significantly if the memory operand happens to be only in main memory rather than also in a cache thereof. Load-store machines avoid the problem of mixed access times in arithmetic-logic operations: all operands, as registers, have the same access time. + +Furthermore, load-store architectures emphasize fixed-sized instructions (e.g., 32-bits apiece), limited formats (e.g., one, two, or three fields per instruction), and relatively few addressing modes. These design constraints mean that the processor's control unit (CU) and arithmetic-logic unit (ALU) can be simplified: fewer transistors and wires, less required power and generated heat, and so on. Load-store machines are designed to be architecturally sparse. + +My aim is not to step into the debate over load-store versus register-memory machines but rather to set up a code example in the load-store Arm6 architecture. This first look at load-store helps to explain the code that follows. The two programs (one in C, one in Arm6 assembly) are available on [my website][3]. + +### The hstone program in C + +Among my favorite short code examples is the hailstone function, which takes a positive integer as an argument. (I used this example in an [earlier article on WebAssembly][4].) This function is rich enough to highlight important assembly-language details. The function is defined as: + + +``` +             3N+1 if N is odd +hstone(N) = +             N/2 if N is even +``` + +For example, hstone(12) evaluates to 6, whereas hstone(11) evaluates to 34. If N is odd, then 3N+1 is even; but if N is even, then N/2 could be either even (e.g., 4/2 = 2) or odd (e.g., 6/2 = 3). + +The hstone function can be used iteratively by passing the returned value as the next argument. The result is a _hailstone sequence_, such as this one, which starts with 24 as the original argument, the returned value 12 as the next argument, and so on: + + +``` +`24,12,6,3,10,5,16,8,4,2,1,4,2,1,...` +``` + +It takes 10 steps for the sequence to converge to 1, at which point the sequence of 4,2,1 repeats indefinitely: (3x1)+1 is 4, which is halved to yield 2, which is halved to yield 1, and so on. For an explanation of why "hailstone" seems an appropriate name for such sequences, see "[Mathematical mysteries: Hailstone sequences][5]." + +Note that powers of 2 converge quickly: 2N requires just N divisions by 2 to reach 1. For example, 32 = 25 has a convergence length of 5, and 512 = 29 has a convergence length of 9. If the hailstone function returns any power of 2, then the sequence converges to 1. Of interest here is the sequence length from the initial argument to the first occurrence of 1. + +The [Collatz conjecture][6] is that a hailstone sequence converges to 1 no matter what the initial argument N > 0 happens to be. Neither a counterexample nor a proof has been found. The conjecture, simple as it is to illustrate with a program, remains a profoundly challenging problem in number theory. + +Below is the C source code for the hstoneC program, which computes the length of the hailstone sequence whose starting value is given as user input. The assembly-language version of the program (hstoneS) is provided after an overview of Arm6 basics. For clarity, the two programs are structurally similar. + +Here is the C source code: + + +``` +#include <stdio.h> + +/* Compute steps from n to 1. +   -- update an odd n to (3 * n) + 1 +   -- update an even n to (n / 2) */ +unsigned hstone(unsigned n) { +  unsigned len = 0; /* counter */ +  while (1) { +    if (1 == n) break;           +    n = (0 == (n & 1)) ? n / 2 : (3 * n) + 1; +    len++;                       +  } +  return len; +} + +int main() { +  [printf][7]("Integer > 0: "); +  unsigned num; +  [scanf][8]("%u", &num); +  [printf][7]("Steps from %u to 1: %u\n", num, hstone(num)); +  return 0; +} +``` + +When the program is run with an input of 9, the output is: + + +``` +`Steps from 9 to 1: 19` +``` + +The hstoneC program has a simple structure. The `main` function prompts the user for an input N (an integer > 0) and then calls the `hstone` function with this input as an argument. The `hstone` function loops until the sequence from N reaches the first 1, returning the number of steps required. + +The most complicated statement in the program involves C's conditional operator, which is used to update N: + + +``` +`n = (0 == (n & 1)) ? n / 2 : (3 * n) + 1;` +``` + +This is a terse form of an if-then construct. The test `(0 == (n & 1))` checks whether the C variable `n` (representing N) is even or odd depending on whether the bitwise AND of N and 1 is zero: an integer value is even just in case its least-significant (rightmost) bit is zero. If N is even, N/2 becomes the new value; otherwise, 3N+1 becomes the new value. The assembly-language version of the program (hstoneS) likewise avoids an explicit if-else construct in updating its implementation of N. + +My Arm6 mini-desktop machine includes the GNU C toolset, which can generate the corresponding code in assembly language. With `%` as the command-line prompt, the command is: + + +``` +`% gcc -S hstoneC.c ## -S flag produces and saves assembly code` +``` + +This produces the file hstoneC.s, which is about 120 lines of assembly-language source code, including a `nop` ("no operation") instruction. Compiler-generated assembly tends to be hard to read and may have inefficiencies such as the `nop`. A hand-crafted version, such as `hstoneS.s` (below), can be easier to follow and even significantly shorter (e.g., `hstoneS.s` has about 50 lines of code). + +### Assembly language basics + +Arm6, like most modern architectures, is byte-addressable: a memory address is of a byte, even if the addressed item (e.g., a 32-bit instruction) consists of multiple bytes. Instructions are addressed in little-[endian][9] fashion: the address is of the low-order byte. Data items are addressed in little-endian fashion by default, but this can be changed to big-endian so that the address of a multi-byte data item points to the high-order byte. By tradition, the low-order byte is depicted as the rightmost one and the high-order byte as the leftmost one:  + + +``` +high-order    low-order +    /             / ++----+----+----+----+ +| b1 | b2 | b3 | b4 | ## 4 bytes = 32 bits ++----+----+----+----+ +``` + +Addresses are 32-bits in size, and data items come in three standard sizes: + + * A _byte_ is 8 bits in size. + * A _halfword_ is 16 bits in size. + * A _word_ is 32 bits in size. + + + +Aggregates of bytes, halfwords, and words (e.g., arrays and structures) are supported. CPU registers are 32-bits in size. + +Assembly languages, in general, have three key features with a syntax that is close and, at times, identical: + + * Directives in both Arm6 and Intel assembly start with a period. Here are two Arm6 examples, which happen to work in Intel as well: + + +``` +.data       +.align 4 +``` + +The first directive indicates that the following section holds data items rather than code. The `.align 4` directive specifies that data items should be laid out, in memory, on 4-byte boundaries, which is common in modern architectures. As the name suggests, a directive gives direction to the translator (the "assembler") as this does its work. + +By contrast, this directive indicates a code rather than a data section: + + +``` +`.text` +``` + +The term "text" is traditional, and its meaning, in this context, is "read-only": during program execution, code is read-only, whereas data can be read and written. + + * Labels in both recent Arm and Intel assembly end with colons. A label is a memory address for either data items (e.g., variables) or code blocks (e.g., functions). Assembly languages, in general, rely heavily on addresses, which means that manipulating pointers—in particular, dereferencing them to get the values to which they point—takes front stage in assembly-language programming. Here are two labels in the hstoneS program: + + +``` +collatz:         /* label */ +     mov r0, #0  /* instruction */   +loop_start:      /* label */ +     ... +``` + +The first label marks the start of the `collatz` function, whose first instruction copies the value zero (`#0`) into the register `r0`. (The `mov` for "move" opcode occurs across assembly languages but really means "copy.") The second label, `loop_start:`, is the address of the loop that computes the length of the hailstone sequence. The register `r0` serves as the sequence counter. + + * Instructions, which assembly-sensitive editors usually indent along with directives, specify the operations to be performed (e.g., `mov`) together with operands (in this case, `r0` and `#0`). There are instructions with no operands and others with several. + + + + +The `mov` instruction above does not violate the load-store principle about memory access. In general, a load instruction (`ldr` in Arm6) loads memory contents into a register. By contrast, a `mov` instruction can be used to copy an "immediate value," such as an integer constant, into a register: + + +``` +`mov r0, #0 /* copy zero into r0 */` +``` + +A `mov` instruction also can be used to copy the contents of one register into another: + + +``` +`mov r1, r0 /* r1 = r0 */` +``` + +The load opcode `ldr` would be inappropriate in both cases because a memory location is not in play. Examples of Arm6 `ldr` ("load register") and `str` ("store register") instructions are forthcoming. + +The Arm6 architecture has 16 primary CPU registers (each 32-bits in size), a mix of general-purpose and special-purpose. Table 1 gives a summary, listing special features and uses beyond scratchpad: + +#### Table 1. Primary CPU registers + +Register | Special features +---|--- +r0 | 1st arg to library function, retval +r1 | 2nd arg to library function +r2 | 3rd arg to library function +r3 | 4th arg to library function +r4 | callee-saved +r5 | callee-saved +r6 | callee-saved +r7 | callee-saved, system calls +r8 | callee-saved +r9 | callee-saved +r10 | callee-saved +r11 | callee-saved, frame pointer +r12 | intra-procedure +r13 | stack pointer +r14 | link register +r15 | program counter + +In general, CPU registers serve as a backup for the stack, the area of main memory that provides reusable scratchpad storage for the arguments passed to functions and the local variables used in functions and other code blocks (e.g., the body of a loop). Given that CPU registers reside on the same chip as the CPU, access time is fast. Access to the stack is significantly slower, with the details depending on the particularities of a system. However, registers are scarce. In the case of Arm6, there are only 16 primary CPU registers, and some of these have special uses beyond scratchpad. + +The first four registers, `r0` through `r3`, are used for scratchpad but also to pass arguments along to library functions. For example, calling a library function such as `printf` (used in both the hstoneC and hstoneS programs) requires that the expected arguments be in the expected registers. The `printf` function takes at least one argument (a format string) but usually takes others, as well (the values to be formatted). The address of the format string has to be in register `r0` for the call to succeed. A programmer-defined function can implement its own register strategy, of course, but using the first four registers for function arguments is common in Arm6 programming. + +Register `r0` also has special uses. For example, it typically holds the value returned from a function, as in the `collatz` function of the hstoneS program. If a program calls the `syscall` function, which is used to invoke system functions such as `read` and `write`, register `r0` holds the integer identifier of the system function to be called (e.g., function `write` has 4 as its identifier). In this respect, register `r0` is similar in purpose to register `r7`, which holds such an identifier when function `svc` ("supervisor call") is used instead of `syscall`. + +Registers `r4` through `r11` are general-purpose and "callee saved" (aka "non-volatile" or "call-preserved"). Consider the case in which function F1 calls function F2 using registers to pass arguments to F2. The registers `r0` through `r3` are "caller saved" (aka "volatile" or "call-clobbered") in that, for example, the called function F2 might call some other function F3 by using the very same registers that F1 did—but with new values therein: + + +``` +  27  13    191  437 +   \   \      \   \ +   r0, r1     r0, r1 +F1-------->F2-------->F3 +``` + +After F1 calls F2, the contents of registers `r0` and `r1` get changed for F2's call to F3. Accordingly, F1 must not assume that its values in `r0` and `r1` (27 and 13, respectively) have been preserved; instead, these values have been overwritten—clobbered by the new values 191 and 437. Because the first four registers are not "callee saved," called function F2 is not responsible for preserving and later restoring the values in the registers set by F1. + +Callee-saved registers bring responsibility to a called function. For example, if F1 used callee-saved registers `r4` and `r5` in its call to F2, then F2 would be responsible for saving the contents of these registers (typically on the stack) and then restoring the values before returning to F1. F2's code then might start and end as follows: + + +``` +push {r4, r5}  /* save r4 and r5 values on the stack */ +...            /* reuse r4 and r5 for some other task */ +pop {r4, r5}   /* restore r4 and r5 values */ +``` + +The `push` operation saves the values in `r4` and `r5` to the stack. The matching `pop` operation then recovers these values from the stack and puts them into `r4` and `r5`. + +Other registers in Table 1 can be used as scratchpad, but some have a special use, as well. As noted earlier, register `r7` can be used to make system calls (e.g., to function `write`), which a later example shows in detail. In an `svc` instruction, the integer identifier for a particular system function must be in register `r7` (e.g., 4 to identify the `write` function). + +Register `r11` is aliased as `fp` for "frame pointer," which points to the start of the current call frame. When one function calls another, the called function gets its own area of the stack (a call frame) for use as scratchpad. A frame pointer, unlike the stack pointer described below, typically remains fixed until a called function returns. + +Register `r12`, also known as `ip` ("intra-procedure"), is used by the dynamic linker. Between calls to dynamically linked library functions, however, a program can use this register as scratchpad. + +Register `r13`, which has `sp` ("stack pointer") as an alias, points to the top of the stack and is updated automatically through `push` and `pop` operations. The stack pointer also can be used as a base address with an offset; for example, `sp - #4` points 4 bytes below where the `sp` points. The Arm6 stack, like its Intel counterpart, grows from high to low addresses. (Some authors accordingly describe the stack pointer as pointing to the bottom rather than the top of the stack.) + +Register `r14`, with `lr` as an alias, serves as the "link register" that holds a return address for a function. However, a called function can call another with a `bl` ("branch with link") or `bx` ("branch with exchange") instruction, thereby clobbering the contents of the `lr` register. For example, in the hstoneS program, the function `main` calls four others. Accordingly, function `main` saves the `lr` of its caller on the stack and later restores this value. The pattern occurs regularly in Arm6 assembly language: + + +``` +push {lr} /* save caller's lr */ +...       /* call some functions */ +pop {lr}  /* restore caller's lr */ +``` + +Register `r15` is also the `pc` ("program counter"). In most architectures, the program counter points to the "next" instruction to be executed. For historical reasons, the Arm6 `pc` points to _two_ instructions beyond the current one. The `pc` can be manipulated directly (for example, to call a function), but the recommended approach is to use instructions such as `bl` that manipulate the link register. + +Arm6 has the usual assortment of instructions for arithmetic (e.g., add, subtract, multiply, divide), logic (e.g., compare, shift), control (e.g., branch, exit), and input/output (e.g., read, write). The results of comparisons and other operations are saved in the special-purpose register `cpsr` ("current processor status register"). For example, this register records whether an addition caused an overflow or whether two compared integer values are equal. + +It is worth repeating that the Arm6 has exactly two basic data movement instructions: `ldr` to load memory contents into a register and `str` to store register contents in memory. Arm6 includes variations of the basic `ldr` and `str` instructions, but the load-store pattern of moving data between registers and memory remains the same. + +A code example brings these architectural details to life. The next section introduces the hailstone program in assembly language. + +### The hstone program in Arm6 assembly + +The above overview of Arm6 assembly is enough to introduce the full code example for hstoneS. For clarity, the assembly-language program hstoneS has essentially the same structure as the C program hstoneC: two functions, `main` and `collatz`, and mostly straight-line code execution in each function. The behavior of the two programs is the same. + +Here is the source code for hstoneS: + + +``` +        .data        /* data versus code */ +        .balign 4    /* alignment on 4-byte boundaries */ + +/* labels (addresses) for user input, formatters, etc. */ +num:    .int    0               /* 4-byte integer */ +steps:  .int    0               /* another for the result */ +prompt: .asciz  "Integer > 0: " /* zero-terminated ASCII string */ +format: .asciz  "%u"            /* %u for "unsigned" */ +report: .asciz  "From %u to 1 takes %u steps.\n" +        +        .text          /* code: 'text' in the sense of 'read only' */ +        .global main   /* program's entry point must be global */ +        .extern [printf][7] /* library function */ +        .extern [scanf][8]  /* ditto */ + +collatz:                 /** collatz function **/ +        mov r0, #0       /* r0 is the step counter */ +loop_start:              /** collatz loop **/ +        cmp r1, #1       /* are we done? (num == 1?) */ +        beq collatz_end  /* if so, return to main */     +        +        and r2, r1, #1            /* odd-even test for r1 (num) */ +        cmp r2, #0                /* even? */ +        moveq r1, r1, LSR #1      /* even: divide by 2 via a 1-bit right shift */ +        addne r1, r1, r1, LSL #1  /* odd: multiply by adding and 1-bit left shift */ +        addne r1, #1              /* odd: add the 1 for (3 * num) + 1 */ + +        add r0, r0, #1            /* increment counter by 1 */ +        b loop_start              /* loop again */ +collatz_end: +        bx lr                     /* return to caller (main) */ + +main:   +        push {lr}              /* save link register to stack */ + +        /* prompt for and read user input */ +        ldr r0, =prompt        /* format string's address into r0 */ +        bl  [printf][7]             /* call printf, with r0 as only argument */ + +        ldr r0, =format        /* format string for scanf */ +        ldr r1, =num           /* address of num into r1 */ +        bl  [scanf][8]              /* call scanf */ + +        ldr r1, =num           /* address of num into r1 */ +        ldr r1, [r1]           /* value at the address into r1 */ +        bl  collatz            /* call collatz with r1 as the argument */ + +        /* demo a store */ +        ldr r3, =steps         /* load memory address into r3 */ +        str r0, [r3]           /* store hailstone steps at mem[r3] */ + +        /* setup report */ +        mov r2, r0             /* r0 holds hailstone steps: copy into r2 */ +        ldr r1, =num           /* get user's input again */ +        ldr r1, [r1]           /* dereference address to get value */ +        ldr r0, =report        /* format string for report into r0 */ +        bl  [printf][7]             /* print report */ + +        pop {lr}               /* return to caller */ +``` + +Arm6 assembly supports documentation in either C style (the slash-star and star-slash syntax used here) or one-line comments introduced by the @ sign. The hstoneS program, like its C counterpart, has two functions: + + * The program's entry point is the `main` function, which is identified by the label `main:`; this label marks where the function's first instruction is found. In Arm6 assembly, the entry point must be declared as global: + + +``` +`.global main` +``` + +In C, a function's _name_ is the address of the code block that makes up the function's body, and a C function is `extern` (global) by default. It is unsurprising how much C and assembly language resemble one another; indeed, C is portable assembly language. + + * The `collatz` function expects one argument, which is implemented by the register `r1` to hold the user's input of an unsigned integer value (e.g., 9). This function updates register `r1` until it equals 1, keeping count of the steps involved with register `r0`, which thereby serves as the function's return value. + + + + +An early and interesting code segment in `main` involves the call to the library function `scanf`, a high-level input function that scans a value from the standard input (by default, the keyboard) and converts this value to the desired data type, in this case, a 4-byte unsigned integer. Here is the code segment in full: + + +``` +ldr r0, =format  /* address of format string into r0 */ +ldr r1, =num     /* address of num into r1 */ +bl  [scanf][8]        /* call scanf (bl = branch with link) */ + +ldr r1, =num     /* address of num into r1 */ +ldr r1, [r1]     /* value at the address into r1 */ +bl  collatz      /* call collatz with r1 as the argument */ +``` + +Two labels (addresses) are in play: `format` and `num`, both of which are defined in the `.data` section at the top of the program: + + +``` +num:    .int    0       +format: .asciz  "%u"     +``` + +The label `num:` is the memory address of a 4-byte integer value, initialized to zero; the label `format:` points to a null-terminated (the "z" in "asciz" for zero) string `"%u"`, which specifies that the scanned input should be converted to an unsigned integer. Accordingly, the first two instructions in the code segment load the address of the format string (`=format`) into register `r0` and the address for the scanned number (`=num`) into register `r1`. Note that each label now starts with an equals sign ("assign address") and that the colon is dropped at the end of each label. The library function `scanf` can take an arbitrary number of arguments, but the first (which `scanf` expects in register `r0`) should be the "address" of a format string. In this example, the second argument to `scanf` is the "address" at which to save the scanned integer. + +The last three instructions in the code segment highlight important assembly details. The first `ldr` instruction loads the _address_ of the memory-based integer (`=num`) into register `r1`. However, the `collatz` function expects the _value_ stored at this address, not the address itself; hence, the address is dereferenced to get the value: + + +``` +ldr r1, =num /* load address into r1 */ +ldr r1, [r1] /* dereference to get value */ +``` + +The square brackets specify memory and `r1` holds a memory address. The expression `[r1]` thus evaluates to the _value_ stored in memory at address `r1`. The example underscores that registers can hold addresses and values stored at addresses: register `r1` first holds an address and then the value stored at this address. + +When the `collatz` function returns to `main`, this function first performs a store operation: + + +``` +ldr r3, =steps /* steps is a memory address */ +str r0, [r3]   /* store r0 value at mem[r3] */ +``` + +The label `steps:` is from the `.data` section and register `r0` holds the steps computed in the `collatz` function. The `str` instruction thus saves to memory the length of the hailstone sequence. In a `ldr` instruction, the first operand (a register) is the _target_ for the load; but in a `str` operation, the first operand (also a register) is the _source_ for the store. In both cases, the second operand is a memory location. + +Some additional work in `main` sets up the final report: + + +``` +mov r2, r0      /* save count in r2 */ +ldr r1, =num    /* recover user input */ +ldr r1, [r1]    /* dereference r1 */   +ldr r0, =report /* r0 points to format string */ +bl  [printf][7]      /* print report */ +``` + +In the `collatz` function, register `r0` tracks how many steps are needed to reach 1 from the user's input, but the library function `printf` expects its first argument (the address of a format string) to be stored in register `r0`. The return value in register `r0` is therefore copied into register `r2` with the `mov` instruction. The address of the format string for `printf` is then stored in register `r0`. + +The argument to the `collatz` function is the scanned input, which is stored in register `r1`; but this register is updated in the `collatz` loop unless the value happens to be 1 at the start. Accordingly, the address `num:` is again copied into `r1` and then dereferenced to get the user's original input. This value becomes the second argument to `printf`, the starting value of the hailstone sequence. With this setup in place, `main` calls `printf` with the `bl` ("branch with link") instruction. + +At the very start of the `collatz` loop, the program checks whether the sequence has hit a 1: + + +``` +cmp r1, #1       +beq collatz_end   +``` + +If register `r1` has 1 as its value, there is a branch (`beq` for "branch if equal") to the end of the `collatz` function, which means a return to its caller `main` with register `r0` as the return value—the number of steps in the hailstone sequence. + +The `collatz` function introduces new features and opcodes, which illustrate how efficient assembly code can be. The assembly code, like the C code, checks for N's parity, with register `r1` as N: + + +``` +and r2, r1, #1 /* r2 = r1 & 1 */           +cmp r2, #0     /* is the result even? */ +``` + +The result of the bitwise AND operation on register `r1` and 1 is stored in register `r2`. If the least-significant (rightmost) bit of register `r2` is a 1, then N (register `r1`) is odd, and otherwise, it is even. The result of this comparison (saved in the special-purpose register `cpsr`) is used automatically in forthcoming instructions such as `moveq` ("move if equal") and `addne` ("add if not equal"). + +The assembly code, like the C code, now avoids an explicit if-else construct. This code segment has the same effect as an if-else test, but the code is more efficient in that no branching is involved—the code executes in straight-line fashion because the conditional tests are built into the instruction opcodes: + + +``` +moveq r1, r1, LSR #1     /* right-shift 1 bit if even */ +addne r1, r1, r1, LSL #1 /* left-shift 1 bit and add otherwise */ +addne r1, #1             /* add 1 for the + 1 in N = 3N + 1 */ +``` + +The `moveq` (`eq` for "if equal") instruction checks the outcome of the earlier `cmp` test, which determines whether the current value of register `r1` (N) is even or odd. If the value in register `r1` is even, this value must be updated to its half, which is done by a 1-bit right-shift (`LSR #1`). In general, right-shifting an integer is more efficient than explicitly dividing it by two. For example, suppose that register `r1` currently holds 4, whose least significant four bits are: + + +``` +`...0100 ## 4 in binary` +``` + +Shifting right by 1 bit yields: + + +``` +`...0010 ## 2 in binary` +``` + +The `LSR` stands for "logical shift right" and contrasts with `ASR` for "arithmetic shift right." An arithmetic shift is sign-preserving (most significant bit of 1 for negative and 0 for non-negative), whereas a logical shift is not, but the hailstone programs deal exclusively with _unsigned_ (hence, non-negative) values. In a logical shift, the shifted bits are replaced by zeros. + +If register `r1` holds a value with odd parity, similar straight-line code occurs: + + +``` +addne r1, r1, r1, LSL #1  /* r1 = r1 * 3 */ +addne r1, #1              /* r1 = r1 + 1 */ +``` + +The two `addne` instructions (`ne` for "if not equal") execute only if the earlier check for parity indicates an odd value. The first `addne` instruction does multiplication through a 1-bit left-shift and addition. In general, shifting and adding are more efficient than explicitly multiplying. The second `addne` then adds 1 to register `r1` so that the update is from N to 3N+1. + +### Assembling the hstoneS program + +The assembly source code for the hstoneS program needs to be translated ("assembled") into a binary _object module_, which is then linked with appropriate libraries to become executable. The simplest approach is to use the GNU C compiler in the same way as it is used to compile a C program such as hstoneC: + + +``` +`% gcc -o hstoneS hstoneS.s` +``` + +This command does the assembling and linking. + +A slightly more efficient approach is to use the _as_ utility that ships with the GNU toolset. This approach separates the assembling and the linking. Here is the assembling step: + + +``` +`% as -o hstoneS.o hstoneS.s ## assemble` +``` + +The extension `.o` is traditional for object modules. The system utility _ld_ then could be used for the linking, but an easier and equally efficient approach is to revert to the _gcc_ command: + + +``` +`% gcc -o hstoneS hstoneS.o ## link` +``` + +This approach highlights again that the C compiler handles any mix of C and assembly, whether source files or object modules. + +### Wrapping up with an explicit system call + +The two hailstone programs use the high-level input/output functions `scanf` and `printf`. These functions are high-level in that they deal with formatted types (in this case, unsigned integers) rather than with raw bytes. In an embedded system, however, these functions might not be available; the low-level input/output functions `read` and `write`, which ultimately implement their high-level counterparts, then would be used instead. These two system functions are low-level in that they work with raw bytes. + +In Arm6 assembly, a program explicitly calls a system function such as `write` in an indirect manner—by invoking one of the aforementioned functions `svc` or `syscall`, for example: + + +``` +        calls      calls +program------->svc------->write +``` + +The integer identifier for a particular system function (e.g., 4 identifies `write`) goes into the appropriate register (register `r7` for `svc` and register `r0` for `syscall`). The code segments below illustrate, first with `svc` and then with `syscall`. + +The two code segments write the traditional greeting to the standard output, which is the screen by default. The standard output has a _file descriptor_, a non-negative integer value that identifies it. The three predefined descriptors are: + + +``` +standard input:  0 (keyboard by default) +standard output: 1 (screen by default) +standard error:  2 (screen by default) +``` + +Here is the code segment for a sample system call with `svc`: + + +``` +msg: .asciz "Hello, world!\n" /* greeting */ +... +mov r0, #1    /* 1 = standard output */ +ldr r1, =msg  /* address of bytes to write */ +mov r2, #14   /* message length (in bytes) */ +mov r7, #4    /* write has 4 as an id */ +svc #0        /* system call to write */ +``` + +The function `write` takes three arguments and, when called via `svc`, the function's arguments go into the following registers: + + * `r0` holds the target for the write operation, in this case, the standard output (`#1`). + * `r1` has the address of the byte(s) to write (`=msg`). + * `r2` specifies how many bytes are to be written (`#14`). + + + +In the case of the `svc` instruction, register `r7` identifies, with a non-negative integer (in this case, `#4`), which system function to call. The `svc` call returns zero (the `#0`) to signal success but usually a negative value to signal an error. + +The `syscall` and `svc` functions differ in detail, but using either to invoke a system function requires the same two steps: + + * Specify the system function to be called (in `r7` for `svc`, in `r0` for `syscall`). + * Put the arguments for the system function in the appropriate registers, which differ between the `svc` and `syscall` variants. + + + +Here is the `syscall` example of invoking the `write` function: + + +``` +msg: .asciz "Hello, world!\n" /* greeting */ +... +mov r1, #1   /* standard output */ +ldr r2, =msg /* address of message */ +mov r3, #14  /* byte count */ +mov r0, #4   /* identifier for write */ +syscall +``` + +C has a thin wrapper not only for the `syscall` function but for the system functions `read` and `write` as well. The C wrapper for `syscall` gives the gist at a high level: + + +``` +syscall(SYS_write,         /* 4 is the id for write */ +        STDOUT_FILENO,     /* 1 is the standard output */ +        "Hello, world!\n", /* message */ +        14);               /* byte length */ +``` + +The direct approach in C uses the wrapper for the system `write` function: + + +``` +`write(STDOUT_FILENO, "Hello, world!\n", 14);` +``` + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/10/arm6-assembly-language + +作者:[Marty Kalin][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/mkalindepauledu +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/LAW-Internet_construction_9401467_520x292_0512_dc.png?itok=RPkPPtDe (An intersection of pipes.) +[2]: https://www.arm.com/ +[3]: https://condor.depaul.edu/mkalin +[4]: https://opensource.com/article/19/8/webassembly-speed-code-reuse +[5]: https://plus.maths.org/content/mathematical-mysteries-hailstone-sequences +[6]: https://en.wikipedia.org/wiki/Collatz_conjecture +[7]: http://www.opengroup.org/onlinepubs/009695399/functions/printf.html +[8]: http://www.opengroup.org/onlinepubs/009695399/functions/scanf.html +[9]: https://en.wikipedia.org/wiki/Endianness From f73c3125fea5d19ef1a155005d842660ced7ec34 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 29 Oct 2020 05:02:46 +0800 Subject: [PATCH 010/130] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020201028=20?= =?UTF-8?q?5=20new=20sudo=20features=20you=20need=20to=20know=20in=202020?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20201028 5 new sudo features you need to know in 2020.md --- ... sudo features you need to know in 2020.md | 133 ++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 sources/tech/20201028 5 new sudo features you need to know in 2020.md diff --git a/sources/tech/20201028 5 new sudo features you need to know in 2020.md b/sources/tech/20201028 5 new sudo features you need to know in 2020.md new file mode 100644 index 0000000000..1a341c50ca --- /dev/null +++ b/sources/tech/20201028 5 new sudo features you need to know in 2020.md @@ -0,0 +1,133 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (5 new sudo features you need to know in 2020) +[#]: via: (https://opensource.com/article/20/10/sudo-19) +[#]: author: (Peter Czanik https://opensource.com/users/czanik) + +5 new sudo features you need to know in 2020 +====== +From central session recording through chroot support to Python API, +sudo 1.9 offers many new features. +![Wratchet set tools][1] + +When you want to perform an action on a [POSIX system][2], one of the safest ways to do so is to use the sudo command. Unlike logging in as the root user and performing what could be a dangerous action, sudo grants any user [designated as a "sudoer"][3]  by the sysadmin temporary permission to perform a normally restricted activity. + +This system has helped keep Linux, Unix, and macOS systems safe from silly mistakes and malicious attacks for decades, and it is the default administrative mechanism on all major Linux distributions today. + +When it was released in May 2020, sudo 1.9 brought many new features, including central collection of session recordings, support for chroot within sudo, and a Python API. If you are surprised by any of these, read my article about some [lesser-known features of sudo][4]. + +Sudo is a lot more than just a prefix for administrative commands. You can fine-tune permissions, record what is happening on the terminal, extend sudo using plugins, store configurations in LDAP, do extensive logging, and much more. + +Version 1.9.0 and subsequent minor releases added a variety of new features (which I'll describe below), including: + + * A recording service to collect sudo session recordings centrally + * Audit plugin API + * Approval plugin API + * Python support for plugins + * Chroot and CWD support built into sudo (starting with 1.9.3) + + + +### Where to get sudo 1.9 + +Most Linux distributions still package the previous generation of sudo (version 1.8), and it will stay that way in long-term support (LTS) releases for several years. The most complete sudo 1.9 package I am aware of in a Linux distribution is openSUSE [Tumbleweed][5], which is a rolling distro, and the sudo package has Python support available in a subpackage. Recent [Fedora][6] releases include sudo 1.9 but without Python. [FreeBSD Ports][7] has the latest sudo version available, and you can enable Python support if you build sudo yourself instead of using the package. + +If your favorite Linux distribution does not yet include sudo 1.9, check the [sudo binaries page][8] to see if a ready-to-use package is available for your system. This page also has packages for several commercial Unix variants. + +As usual, before you start experimenting with sudo settings, _make sure you know the root password_. Yes, even on Ubuntu. Having a temporary "backdoor" is important; without it, you would have to hack your own system if something goes wrong. And remember: a syntactically correct configuration does not mean that anybody can do anything through sudo on that system! + +### Recording service + +The recording service collects session recordings centrally. This offers many advantages compared to local session log storage: + + * It is more convenient to search in one place instead of visiting individual machines for recordings + * Recordings are available even if the sending machine is down + * Recordings cannot be deleted by local users who want to cover their tracks + + + +For a quick test, you can send sessions through non-encrypted connections to the recording service. My blog contains [instructions][9] for setting it up in just a few minutes. For a production setup, I recommend using encryption. There are many possibilities, so read the [documentation][10] that best suits your environment. + +### Audit plugin API + +The new audit plugin API is not a user-visible feature. In other words, you cannot configure it from the sudoers file. It is an API, meaning that you can access audit information from plugins, including ones written in Python. You can use it in many different ways, like sending events from sudo directly to Elasticsearch or Logging-as-a-Service (LaaS) when something interesting happens. You can also use it for debugging and print otherwise difficult-to-access information to the screen in whatever format you like. + +Depending on how you want to use it, you can find its documentation in the sudo plugin manual page (for C) and the sudo Python plugin manual. [Sample Python code][11] is available in the sudo source code, and there is also a [simplified example][12] on my blog. + +### Approval plugin API + +The approval plugin API makes it possible to include extra restrictions before a command will execute. These will run only after the policy plugin succeeds, so you can effectively add additional policy layers without replacing the policy plugin and thus sudoers. Multiple approval plugins may be defined, and all must succeed for the command to execute. + +As with the audit plugin API, you can use it both from C and Python. The [sample Python code][13] documented on my blog is a good introduction to the API. Once you understand how it works, you can extend it to connect sudo to ticketing systems and approve sessions only with a related open ticket. You can also connect to an HR database so that only the engineer on duty can gain administrative privileges. + +### Python support for plugins + +Even though I am not a programmer, my favorite new sudo 1.9 feature is Python support for plugins. You can use most of the APIs available from C with Python as well. Luckily, sudo is not performance-sensitive, so the relatively slow speed of running Python code is not a problem for sudo. Using Python for extending sudo has many advantages: + + * Easier, faster development + * No need to compile; code might even be distributed by configuration management + * Many APIs do not have ready-to-use C clients, but Python code is available + + + +In addition to the audit and approval plugin APIs, there are a few others available, and you can do very interesting things with them. + +By using the policy plugin API, you can replace the sudo policy engine. Note you will lose most sudo features, and there is no more sudoers-based configuration. This can still be useful in niche cases, but most of the time, it is better to keep using sudoers and create additional policies using the approval plugin API. If you want to give it a try, my [introduction to the Python plugin][14] provides a very simple policy: allowing only the `id` command. Once again, make sure you know the root password, as once this policy is enabled, it prevents any practical use of sudo. + +Using the I/O logs API, you can access input and output from user sessions. This means you can analyze what is happening in a session and even terminate it if you find something suspicious. This API has many possible uses, such as data-leak prevention. You can monitor the screen for keywords and, if any of them appear in the data stream, you can break the connection before the keyword can appear on the user's screen. Another possibility is checking what the user is typing and using that data to reconstruct the command line the user is entering. For example, if a user enters `rm -fr /`, you can disconnect the user even before Enter is hit. + +The group plugin API allows non-Unix group lookups. In a way, this is similar to the approval plugin API as it also extends the policy plugin. You can check if a user is part of a given group and act based on this in later parts of the configuration. + +### Chroot and CWD support + +The latest additions to sudo are chroot and change working directory (CWD) support. Neither option is enabled by default—you need to explicitly enable them in the sudoers file. When they're enabled, you can fine-tune target directories or allow users to specify which directory to use. The logs reflect when these settings were used. + +On most systems, chroot is available only to root. If one of your users needs chroot, you need to give them root access, which gives them a lot more power than just chroot. Alternately, you can allow access to the chroot command through sudo, but it still allows loopholes where they can gain full access. When you use sudo's built-in chroot support, you can easily restrict access to a single directory. You can also give users the flexibility to specify the root directory. Of course, this might lead to disasters (e.g., `sudo --chroot / -s`), but at least the event is logged. + +When you run a command through sudo, it sets the working directory to the current directory. This is the expected behavior, but there may be cases when the command needs to be run in a different directory. For example, I recall using an application that checked my privileges by checking whether my working directory was `/root`. + +### Try the new features + +I hope that this article inspires you to take a closer look at sudo 1.9. Central session recording is both more convenient and secure than storing session logs locally. Chroot and CWD support give you additional security and flexibility. And using Python to extend sudo makes it easy to custom-tailor sudo to your environment. You can try the new features by using one of the latest Linux distributions or the ready-to-use packages from the sudo website. + +If you want to learn more about sudo, here are a few resources: + + * [Sudo website][15] + * [Sudo blog][16] + * [Sudo on Twitter][17] + + + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/10/sudo-19 + +作者:[Peter Czanik][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/czanik +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/tools_osyearbook2016_sysadmin_cc.png?itok=Y1AHCKI4 (Wratchet set tools) +[2]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains +[3]: https://opensource.com/article/17/12/using-sudo-delegate +[4]: https://opensource.com/article/19/10/know-about-sudo +[5]: https://software.opensuse.org/distributions/tumbleweed +[6]: https://getfedora.org/ +[7]: https://www.freebsd.org/ports/ +[8]: https://www.sudo.ws/download.html#binary +[9]: https://blog.sudo.ws/posts/2020/03/whats-new-in-sudo-1.9-recording-service/ +[10]: https://www.sudo.ws/man/sudo_logsrvd.man.html#EXAMPLES +[11]: https://github.com/sudo-project/sudo/blob/master/plugins/python/example_audit_plugin.py +[12]: https://blog.sudo.ws/posts/2020/06/sudo-1.9-using-the-new-audit-api-from-python/ +[13]: https://blog.sudo.ws/posts/2020/08/sudo-1.9-using-the-new-approval-api-from-python/ +[14]: https://blog.sudo.ws/posts/2020/01/whats-new-in-sudo-1.9-python/ +[15]: https://www.sudo.ws/ +[16]: https://blog.sudo.ws/ +[17]: https://twitter.com/sudoproject From f754f12fe46ff22bb4d9f7d8026b2644f29031e1 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 29 Oct 2020 05:02:59 +0800 Subject: [PATCH 011/130] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020201028=20?= =?UTF-8?q?A=20few=20things=20I've=20learned=20about=20email=20marketing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20201028 A few things I-ve learned about email marketing.md --- ...ings I-ve learned about email marketing.md | 139 ++++++++++++++++++ 1 file changed, 139 insertions(+) create mode 100644 sources/tech/20201028 A few things I-ve learned about email marketing.md diff --git a/sources/tech/20201028 A few things I-ve learned about email marketing.md b/sources/tech/20201028 A few things I-ve learned about email marketing.md new file mode 100644 index 0000000000..4918d3dd3e --- /dev/null +++ b/sources/tech/20201028 A few things I-ve learned about email marketing.md @@ -0,0 +1,139 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (A few things I've learned about email marketing) +[#]: via: (https://jvns.ca/blog/2020/10/28/a-few-things-i-ve-learned-about-email-marketing/) +[#]: author: (Julia Evans https://jvns.ca/) + +A few things I've learned about email marketing +====== + +Hello! I’ve been learning a lot about business over the last few years (it’s possible to make a living by helping people learn! it’s amazing!). One of the things I’ve found hardest to get my head around was email marketing. + +Like a lot of people, I get a lot of unwanted email, and at first I was really opposed to doing any kind of email marketing because I was worried I’d be the _source_ of that unwanted email. But I’ve learned how to do it in a way that feels good to me, and where the replies to my marketing emails are usually along the lines of “wow, I love this, thank you so much!”. ([literally: here are excerpts from the last 20 or so replies I’ve gotten][1]) + +I’m going to structure this as a series of beliefs I had about email marketing that turned out not to be universally true. + +### myth 1: selling things is an adversarial relationship + +I used to think that selling things was a sort of adversarial relationship: the person selling the product wants to convince the buyer (by any means necessary) to spend as much money as possible, and that people buying things are usually kind of resentful of anyone asking them to spend money. + +I’ve learned that actually a lot of people are happy (or even actively **want**) to spend money on something that will help them solve a problem they have. + +Here’s a silly example of something illustrating this: 2 years ago, we’d hired someone to paint our new apartment. We decided to paint a lot of the walls white, and we were stuck with the impossible problem of deciding which of the 10 billion possible shades of white to paint the walls. I found a $27 ebook called [white is complicated][2], and (long story short, this blog post is not about painting) it really helped me confidently choose a shade of white!! We spent thousands of dollars on painting, so $30 was a really good investment in making sure we’d be happy with the result. + +So even though $27 for an ebook on how to choose a white seems silly at first, I was really happy to spend the money, and my guess is a lot of other people who bought that ebook are as well. + +The bigger idea here is that it’s easier to run a business when you’re selling to people who are happy to buy things based on the value they’re getting from the product. In my case, I’ve found that there are lots of programmers who are happy to pay for clear, short, friendly explanations of concepts they need to understand for their jobs. + +### a quick note on how I learned these things: 30x500 + +I originally wrote this blog post about all these things I learned, and it kind of read like I figured out all of these things naturally over the course of running a business. But that’s not how it went at all! I’ve actually found it very hard to debug business problems on my own. A lot of the attitudes I had when I started out running a business were counterproductive (like thinking of selling something as an adversarial process), and I don’t know that many people who run similar businesses who I can get advice from. + +I learned how to think about selling things as a non-adversarial process (and everything else in this blog post, and a lot more) from [30x500][3], a business class by Amy Hoy ([her writing is here][4]) and [Alex Hillman][5] that I bought a couple of years ago. 30x500 is about running a specific kind of business (very briefly: sell to people who buy based on value, decide what to build by researching your audience, market by teaching people helpful things), which happens to be the exact kind of business that I run. It’s been a really great way to learn how to run my business better. + +Okay, back to my misconceptions about email marketing! + +### myth 2: sending email is inherently bad + +The next thing I believed was that sending email from a business was somehow inherently bad and that all marketing email was unwanted. + +I now realize this is untrue even for normal marketing emails – for example, lots of people subscribe to marketing newsletters for brands they like because they want to hear about new products when they come out & sales. + +But marketing emails aren’t just “not inherently bad”, they can actually be really useful! + +### marketing is about building trust + +When I started sending out business emails, I based them on the emails I was used to receiving – I’d announce new zines I’d written, and explain why the zine was useful. + +But what I’ve learned is that (at least for me) marketing isn’t about describing your product to the audience, **marketing is about building trust by helping people**. + +So, instead of just periodically emailing out “hey, here’s a new zine, here’s why it’s good”, my main marketing email list is called [saturday comics][6], and it sends you 1 email a week with a programming comic. + +What I like about this approach to marketing (“just help people learn things for free”) is that it’s literally just what I love doing anyway – I wrote this blog to help people learn things for free for years just because I think it’s fun to help people learn. + +And people love the Saturday Comics! And it makes money – I announce new zines to that list as well, and lots of people buy them. It’s really simple and nice! + +### myth 3: you have to trick people into signing up for your email marketing list + +One pattern I see a lot is that I sign up for some free service, and then I start getting deluged with marketing emails trying to convince me to upgrade to the paid tier or whatever. I used to think that this was how marketing emails **had** to work – you somehow get people’s email and then send them email, and hope that for some reason (???) they decide to buy things from you. + +But, of course, this isn’t true! If your marketing list is actually just full of genuinely helpful emails, and you can describe who it’s intended for clearly (give people a link to the archive to see if they like what they see!), then a lot of people will be happy to sign up and receive the emails! + +If you clearly communicate who your mailing list will help, then people can easily filter themselves in, and the only people on the list will be happy to be on the list. And then you don’t have to send any unwanted email at all! Hooray! + +Here’s one story that influenced how I think about this: once I sent an email to everyone who had bought a past zine saying “hey, I just released this other zine, maybe you want to buy it!”. And I got an angry reply from someone saying something like “why are you emailing me, I just bought that one thing from you, I don’t want you to keep emailing me about other things”. I decided that I agreed with that, and now I’m more careful about being clear about what kinds of emails people are opting into. + +### marketing is about communicating clearly & honestly + +One insight (from Alex Hillman) that helped me a lot recently was – when someone is dissatisfied with something they bought, it doesn’t always mean that the product is “bad”. Maybe the product is helpful to many other people! + +But it definitely means that the person’s expectations weren’t met. A tiny example: one of the few refund requests I’ve gotten for a zine was from someone from who expected there to be more information about sed in the zine, and they were disappointed there was only 1 page about sed. + +So if I communicate clearly & accurately what problems a product solves, who it’s for, and how it solves those problems, people are much more likely to be delighted when they buy it and be happy to buy from me again in the future!. For my zines specifically, I like to make the table of contents very easy to find so that people can see that there’s [1 page about sed][7] :) + +### myth 4: you have to constantly produce new emails + +I’ve tried and failed to start a lot of mailing lists. the pattern I kept getting stuck in was: + +I have an idea for a weekly mailing list I send 2 emails I give up forever + +This was partly because I thought that to have a weekly/biweekly mailing list, you have to write new emails every week. And some people definitely do mailing lists this way, like [Austin Kleon][8]. + +But I learned that there’s a different way to write a mailing list! Instead, you: + +put together a list of your best articles / comics / whatever when someone subscribes to that list, send them 1 email a week (or every 2 weeks, or whatever) with one article from the List Of Your Best Articles + +The point is most people in the world probably haven’t already read your best articles, and so if you just send them one article a week from that list, it’ll probably actually be MORE helpful to them than if you were writing a new article every week. And you don’t need to write any emails every week! + +I think this is called a “drip marketing campaign”, but when I search for that term I don’t find the results super helpful – there’s a lot out there about tools to do this, but as with anything I think the actual content of the emails is the most important thing. + +### myth 5: unsubscribes are the end of the world + +Another email marketing thing I used to get stressed out about was unsubscribes. It always feels a little sad to send an email about something I’m excited about and see 20 people unsubscribe immediately, even if it’s only 0.3% of people on the mailing list. + +But I know that I subscribe to mailing lists very liberally, even on topics that I’m not that interested in, and 70% of the time I decide that I’m not that interested in the topic and unsubscribe eventually. A small percentage of people unsubscribing really just isn’t that big of a deal. + +### myth 6: you need to optimize your open rates + +There are all kinds of analytics you can do with email marketing, like open rates. I love numbers and analyzing things, but so far I really haven’t found trying to A/B test or optimize my numbers to be that productive or healthy. I’d rather spend my energy on just writing more helpful things for people to read. + +The most important thing I’ve learned about website analytics is that it’s unproductive to look at random statistics like “the open rate on this email is 43% but the last one was 47%” and wonder what they mean. What _has_ been helpful has been coming up with a few specific questions that are important to me (“are people visiting this page from links on other sites, or only from my links?”) and keeping very rough track of the answers over time. + +So far I’ve really never used any of the tracking features of my email marketing software. The only thing I’ve done that I’ve found helpful is: sometimes when I release a new zine I’ll send out a discount code to people on the list, and I can tell if people bought the thing from the mailing list because they used the discount code. + +### it’s important to remember there are people on the other side + +The last thing that’s helped me is to remember that even though emailing thousands of people sometimes feels like a weird anonymous thing, there are a lot of very delightful people on the other side! So when I write emails, I usually try to imagine that I’m writing to some very nice person I met at a conference one time who told me that they like my blog. We’re not best friends, but they know my work to some extent, and they’re interested to hear what I have to say. + +I often like to remind people why they’re getting the email, especially if I haven’t emailed that list for a long time – “you signed up to get announcements when I release a new zine, so here’s an announcement!”. I think the technical email marketing term for this is a list being “cold” and “warm”, like if you don’t email a list for too long it’s “cold” and your subscribers might have forgotten that they’re on it. + +### that’s all! + +When I started, I was really convinced that email marketing was this terrible, awful thing that I could not do that mostly involved tricking people into getting emails they don’t want (ok, I’m exaggerating a bit, but I really struggled with it). But it’s possible to do it in a transparent way where I’m mostly just sending people helpful emails that they do want! + +The big surprise for me was that email marketing is not a monolithic thing. I have a lot of choices about how to do it, and if I don’t like the way someone else does email marketing, I can just make different choices when doing it myself! + +-------------------------------------------------------------------------------- + +via: https://jvns.ca/blog/2020/10/28/a-few-things-i-ve-learned-about-email-marketing/ + +作者:[Julia Evans][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://jvns.ca/ +[b]: https://github.com/lujun9972 +[1]: https://gist.github.com/jvns/c2aaecbbbf60b7f3adf3e0be18d54a7b +[2]: https://mariakillam.com/product/white-is-complicated/ +[3]: https://30x500.com/academy/ +[4]: https://stackingthebricks.com/ +[5]: https://dangerouslyawesome.com +[6]: https://wizardzines.com/saturday-comics +[7]: https://wizardzines.com/zines/bite-size-command-line/ +[8]: https://austinkleon.com/ From 506f766ea53ebbcdb9e4ee39dca261765ecd4a7c Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 29 Oct 2020 08:48:53 +0800 Subject: [PATCH 012/130] translating --- ...Install Ubuntu Server on a Raspberry Pi.md | 210 ----------------- ...Install Ubuntu Server on a Raspberry Pi.md | 211 ++++++++++++++++++ 2 files changed, 211 insertions(+), 210 deletions(-) delete mode 100644 sources/tech/20200909 How to Install Ubuntu Server on a Raspberry Pi.md create mode 100644 translated/tech/20200909 How to Install Ubuntu Server on a Raspberry Pi.md diff --git a/sources/tech/20200909 How to Install Ubuntu Server on a Raspberry Pi.md b/sources/tech/20200909 How to Install Ubuntu Server on a Raspberry Pi.md deleted file mode 100644 index ac2fa3d489..0000000000 --- a/sources/tech/20200909 How to Install Ubuntu Server on a Raspberry Pi.md +++ /dev/null @@ -1,210 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to Install Ubuntu Server on a Raspberry Pi) -[#]: via: (https://itsfoss.com/install-ubuntu-server-raspberry-pi/) -[#]: author: (Dimitrios Savvopoulos https://itsfoss.com/author/dimitrios/) - -How to Install Ubuntu Server on a Raspberry Pi -====== - -The [Raspberry Pi][1] is the best-known [single-board computer][2]. Initially, the scope of the Raspberry Pi project was targeted to the promotion of teaching of basic computer science in schools and in developing countries. - -Its low cost, portability and very low power consumption, made the models far more popular than anticipated. From weather station to home automation, tinkerers built so many [cool projects using Raspberry Pi][3]. - -The [4th generation of the Raspberry Pi][4], is equipped with features and processing power of a regular desktop computer. But this article is not about using RPi as desktop. Instead, I’ll show you how to install Ubuntu server on Raspberry Pi. - -In this tutorial I will use a Raspberry Pi 4 and I will cover the following: - - * Installing Ubuntu Server on a microSD card - * Setting up a wireless network connection on the Raspberry Pi - * Accessing your Raspberry Pi via SSH - - - -![][5] - -**You’ll need the following things for this tutorial**: - - * A micro SD card (8 GB or greater recommended) - * A computer (running Linux, Windows or macOS) with a micro SD card reader - * A Raspberry Pi 2, 3 or 4 - * Good internet connection - * An HDMI cable for the Pi 2 & 3 and a micro HDMI cable for the Pi 4 (optional) - * A USB keyboard set (optional) - - - -### Installing Ubuntu Server on a Raspberry Pi - -![][6] - -I have used Ubuntu for creating Raspberry Pi SD card in this tutorial but you may follow it on other Linux distributions, macOS and Windows as well. This is because the steps for preparing the SD card is the same with Raspberry Pi Imager tool. - -The Raspberry Pi Imager tool downloads the image of your [choice of Raspberry Pi OS][7] automatically. This means that you need a good internet connection for downloading data around 1 GB. - -#### Step 1: Prepare the SD Card with Raspberry Pi Imager - -Make sure you have inserted the microSD card into your computer, and install the Raspberry Pi Imager at your computer. - -You can download the Imager tool for your operating system from these links: - - * [Raspberry Pi Imager for Ubuntu/Debian][8] - * [Raspberry Pi Imager for Windows][9] - * [Raspberry Pi Imager for MacOS][10] - - - -Despite I use Ubuntu, I won’t use the Debian package that is listed above, but I will install the snap package using the command line. This method can be applied to wider range of Linux distributions. - -``` -sudo snap install rpi-imager -``` - -Once you have installed Raspberry Pi Imager tool, find and open it and click on the “CHOOSE OS” menu. - -![][11] - -Scroll across the menu and click on “Ubuntu” (Core and Server Images). - -![][12] - -From the available images, I choose the Ubuntu 20.04 LTS 64 bit. If you have a Raspberry Pi 2, you are limited to the 32bit image. - -**Important Note: If you use the latest Raspberry Pi 4 – 8 GB RAM model, you should choose the 64bit OS, otherwise you will be able to use 4 GB RAM only.** - -![][13] - -Select your microSD card from the “SD Card” menu, and click on “WRITE”after. - -![][14] - -If it shows some error, try writing it again. It will now download the Ubuntu server image and write it to the micro SD card. - -It will notify you when the process is completed. - -![][15] - -#### Step 2: Add WiFi support to Ubuntu server - -Once the micro SD card flashing is done, you are almost ready to use it. There is one thng that you may want to do before using it and that is to add Wi-Fi support. - -With the SD card still inserted in the card reader, open the file manager and locate the “system-boot” partition on the card. - -The file that you are looking for and need to edit is named `network-config`. - -![][16] - -This process can be done on Windows and MacOS too. Edit the **`network-config`** file as already mentioned to add your Wi-Fi credentials. - -Firstly, uncomment (remove the hashtag “#” at the beginning) from lines that are included in the rectangular box. - -After that, replace myhomewifi with your Wi-Fi network name enclosed in quotation marks, such as “itsfoss” and the “S3kr1t” with the Wi-Fi password enclosed in quotation marks, such as “12345679”. - -![][17] - -It may look like this: - -``` -wifis: - wlan0: - dhcp4: true - optional: true - access-points: - "your wifi name": - password: "your_wifi_password" -``` - -Save the file and insert the micro SD card into your Raspberry Pi. During the first boot, if your Raspberry Pi fails connect to the Wi-Fi network, simply reboot your device. - -#### Step 3: Use Ubuntu server on Raspberry Pi (if you have dedicated monitor, keyboard and mouse for Raspberry Pi) - -If you have got an additional set of mouse, keyboard and a monitor for the Raspberry Pi, you can use easily use it like any other computer (but without GUI). - -Simply insert the micro SD card to the Raspberry Pi, plug in the monitor, keyboard and mouse. Now [turn on your Raspberry Pi][18]. It will present TTY login screen (black terminal screen) and aks for username and password. - - * Default username: ubuntu - * Default password: ubuntu - - - -When prompted, use “**ubuntu**” for the password. Right after a successful login, [Ubuntu will ask you to change the default password][19]. - -Enjoy your Ubuntu Server! - -#### Step 3: Connect remotely to your Raspberry Pi via SSH (if you don’t have monitor, keyboard and mouse for Raspberry Pi) - -It is okay if you don’t have a dedicated monitor to be used with Raspberry Pi. Who needs a monitor with a server when you can just SSH into it and use it the way you want? - -**On Ubuntu and Mac OS**, an SSH client is usually already installed. To connect remotely to your Raspberry Pi, you need to discover its IP address. Check the [devices connected to your network][20] and see which one is the Raspberry Pi. - -Since I don’t have access to a Windows machine, you can access a comprehensive guide provided by [Microsoft][21]. - -Open a terminal and run the following command: - -``` -ssh [email protected]_pi_ip_address -``` - -You will be asked to confirm the connection with the message: - -``` -Are you sure you want to continue connecting (yes/no/[fingerprint])? -``` - -Type “yes” and click the enter key. - -![][22] - -When prompted, use “ubuntu” for the password as mentioned earlier. You’ll be asked to change the password of course. - -Once done, you will be automatically logged out and you have to reconnect, using your new password. - -Your Ubuntu server is up and running on a Raspberry Pi! - -**Conclusion** - -Installing Ubuntu Server on a Raspberry Pi is an easy process and it comes pre-configured at a great degree which the use a pleasant experience. - -I have to say that among all the [operating systems that I tried on my Raspberry Pi][7], Ubuntu Server was the easiest to install. I am not exaggerating. Check my guide on [installing Arch Linux on Raspberry Pi][23] for reference. - -I hope this guide helped you in installing Ubuntu server on your Raspberry Pi as well. If you have questions or suggestions, please let me know in the comment section. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/install-ubuntu-server-raspberry-pi/ - -作者:[Dimitrios Savvopoulos][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/dimitrios/ -[b]: https://github.com/lujun9972 -[1]: https://www.raspberrypi.org/ -[2]: https://itsfoss.com/raspberry-pi-alternatives/ -[3]: https://itsfoss.com/raspberry-pi-projects/ -[4]: https://itsfoss.com/raspberry-pi-4/ -[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/09/Ubuntu-Server-20.04.1-LTS-aarch64.png?resize=800%2C600&ssl=1 -[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/09/ubuntu-server-raspberry-pi.png?resize=800%2C450&ssl=1 -[7]: https://itsfoss.com/raspberry-pi-os/ -[8]: https://downloads.raspberrypi.org/imager/imager_amd64.deb -[9]: https://downloads.raspberrypi.org/imager/imager.exe -[10]: https://downloads.raspberrypi.org/imager/imager.dmg -[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/09/raspberry-pi-imager.png?resize=800%2C600&ssl=1 -[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/09/raspberry-pi-imager-choose-ubuntu.png?resize=800%2C600&ssl=1 -[13]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/09/raspberry-pi-imager-ubuntu-server.png?resize=800%2C600&ssl=1 -[14]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/09/raspberry-pi-imager-sd-card.png?resize=800%2C600&ssl=1 -[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/09/ubuntu-server-installed-raspberry-pi.png?resize=799%2C506&ssl=1 -[16]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/09/ubuntu-server-pi-network-config.png?resize=800%2C565&ssl=1 -[17]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/09/Ubuntu-server-wifi.png?resize=800%2C600&ssl=1 -[18]: https://itsfoss.com/turn-on-raspberry-pi/ -[19]: https://itsfoss.com/change-password-ubuntu/ -[20]: https://itsfoss.com/how-to-find-what-devices-are-connected-to-network-in-ubuntu/ -[21]: https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse -[22]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/09/ubuntu-server-change-password.png?resize=800%2C600&ssl=1 -[23]: https://itsfoss.com/install-arch-raspberry-pi/ diff --git a/translated/tech/20200909 How to Install Ubuntu Server on a Raspberry Pi.md b/translated/tech/20200909 How to Install Ubuntu Server on a Raspberry Pi.md new file mode 100644 index 0000000000..8dd702fafc --- /dev/null +++ b/translated/tech/20200909 How to Install Ubuntu Server on a Raspberry Pi.md @@ -0,0 +1,211 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to Install Ubuntu Server on a Raspberry Pi) +[#]: via: (https://itsfoss.com/install-ubuntu-server-raspberry-pi/) +[#]: author: (Dimitrios Savvopoulos https://itsfoss.com/author/dimitrios/) + +如何在树莓派上安装 Ubuntu 服务器? +====== + +[树莓派][1]是最著名的[单板计算机][2]。最初,树莓派项目的范围是针对促进学校和发展中国家的计算机基础科学教学。 + +它的低成本、便携性和极低的功耗,使得它的受欢迎程度远远超过预期。从气象站到家庭自动化,玩家们用树莓派搭建了许多[酷炫的项目][3]。 + +[第四代树莓派][4]具备了普通台式电脑的功能和处理能力。但本文并不是要介绍如何使用树莓派作为桌面。相反,我会告诉你如何在树莓派上安装 Ubuntu 服务器。 + +在本教程中,我将使用树莓派 4,以下是我将介绍的内容: + + * 在 microSD 卡上安装 Ubuntu 服务器 + * 在树莓派上设置无线网络连接 + * 通过 SSH 访问你的树莓派 + + + +![][5] + +**本教程需要以下东西**: + + * 一张 micro SD 卡(建议使用 8GB 或更大的卡) + * 一台带有 micro SD 卡读卡器的计算机(运行 Linux、Windows 或 macOS) + * 树莓派 2、3 或 4 + * 良好的互联网连接 + * 用于树莓派 2 和 3 的 HDMI 线和用于树莓派 4的 micro HDMI 线(可选) + * 一套 USB 键盘(可选) + + + +### 在树莓派上安装 Ubuntu 服务器 + +![][6] + +在本教程中,我使用 Ubuntu 来创建树莓派 SD 卡,但你可以在其他 Linux 发行版、macOS 和 Windows 上创建它。这是因为准备 SD 卡的步骤对 Raspberry Pi Imager 工具而言是一样的。 + +Raspberry Pi Imager 工具会自动下载你[选择树莓派系统][7]的镜像。这意味着你需要一个良好的网络连接来下载 1GB 左右的数据。 + +#### 步骤 1:用 Raspberry Pi Imager 准备 SD 卡 + +确保你已将 microSD 卡插入电脑,并在电脑上安装 Raspberry Pi Imager。 + +你可以从这些链接中下载适合你操作系统的 Imager 工具: + + * [用于 Ubuntu/Debian 的 Raspberry Pi Imager][8] + * [用于 Windows 的 Raspberry Pi Imager][9] + * [用于 MacOS 的 Raspberry Pi Imager][10] + + + + +尽管我使用的是 Ubuntu,但我不会使用上面列出的 Debian 软件包,而是使用命令行安装 snap 包。这个方法可以适用于更广泛的 Linux 发行版。 + +``` +sudo snap install rpi-imager +``` + +安装好 Raspberry Pi Imager 工具后,找到并打开它,点击 ”CHOOSE OS“ 菜单。 + +![][11] + +滚动菜单并点击 ”Ubuntu“ (核心和服务器镜像)。 + +![][12] + +从可用的镜像中,我选择了 Ubuntu 20.04 LTS 64 位。如果你有一个树莓派 2,那你只能选择 32 位镜像。 + +**重要提示:如果你使用的是最新的树莓派 4 - 8 GB 内存型号,你应该选择 64 位操作系统,否则只能使用 4 GB 内存。** + +![][13] + +从 “SD Card” 菜单中选择你的 microSD 卡,然后点击 ”WRITE“。 + +![][14] + +如果它显示一些错误,请尝试再次写入它。现在它将下载 Ubuntu 服务器镜像并将其写入 micro SD 卡。 + +当这个过程完成时,它将通知你。 + +![][15] + +#### 步骤 2:在 Ubuntu 服务器上添加 WiFi 支持 + +烧录完 micro SD 卡后,你就差不多可以使用它了。在使用它之前,有一件事情你可能想做,那就是添加 Wi-Fi 支持。 + +SD 卡仍然插入读卡器中,打开文件管理器,找到卡上的 ”system-boot” 分区。 + +你要找的和需要编辑的文件名为 `network-config`。 + +![][16] + +这个过程也可以在 Windows 和 MacOS 上完成。如前所述,编辑 **`network-config`** 文件,添加你的 Wi-Fi 凭证。 + +首先,取消矩形框内的行的注释(删除开头的标签 “#”),然后将 myhomewifi 替换为你的 Wi-Fi 网络名称。 + +之后,将 myhomewifi 替换为你的 Wi-Fi 网络名,用引号括起来,比如 ”itsfoss“,将 ”S3kr1t“ 替换为 Wi-Fi 密码,用引号括起来,比如 ”12345679“。 + +![][17] + +它可能看上去像这样: + +``` +wifis: + wlan0: + dhcp4: true + optional: true + access-points: + "your wifi name": + password: "your_wifi_password" +``` + +保存文件并将 micro SD 卡插入到你的树莓派中。在第一次启动时,如果你的树莓派无法连接到 Wi-Fi 网络,只需重启你的设备。 + +#### 步骤 3:在树莓派上使用 Ubuntu 服务器(如果你有专门的显示器、键盘和鼠标的话) + +如果你有一套额外的鼠标,键盘和显示器,你可以很容易地像其他电脑一样使用树莓派(但没有 GUI)。 + +只需将 micro SD 卡插入树莓派,连接显示器、键盘和鼠标。现在[打开你的树莓派][18]。它将出现 TTY 登录屏幕(黑色终端屏幕)并询问用户名和密码。 + + * 默认用户名:ubuntu + * 默认密码:ubuntu + + + +看到提示时,用 “**ubuntu**” 作为密码。登录成功后,[Ubuntu 会要求你更改默认密码][19]。 + +享受你的 Ubuntu 服务器吧! + +#### 步骤 3:通过 SSH 远程连接到你的树莓派(如果你没有树莓派的显示器、键盘和鼠标的话) + +如果你没有专门的显示器与树莓派一起使用也没关系。当你可以直接通过 SSH 进入它并按照你的方式使用它时,谁还需要一个带有显示器的服务器呢? + +**在 Ubuntu 和 Mac OS**上,通常已经安装了一个 SSH 客户端。要远程连接到你的树莓派,你需要发现它的 IP 地址。检查[连接到你的网络的设备][20],看看哪个是树莓派。 + +由于我没有 Windows 机器,你可以访问[微软][21]提供的综合指南。 + +打开终端,运行以下命令: + +``` +ssh [email protected]_pi_ip_address +``` + +你可能会看到以下信息确认连接: + +``` +Are you sure you want to continue connecting (yes/no/[fingerprint])? +``` + +输入 ”yes“,然后点击回车键。 + +![][22] + +当提示时,用前面提到的 ”ubuntu“ 作为密码。当然,你会被要求更改密码。 + +完成后,你将自动注销,你必须使用新密码重新连接。 + +你的 Ubuntu 服务器就可以在树莓派上运行了! + +**总结** + +在树莓派上安装 Ubuntu 服务器是一个简单的过程,而且它的预配置程度很高,使用起来很愉快。 + +我不得不说,在所有[我在树莓派上尝试的操作系统][7]中,Ubuntu 服务器是最容易安装的。我并没有夸大其词。请查看我的[在树莓派上安装 Arch Linux][23]的指南,以供参考。 + +希望这篇指南也能帮助你在树莓派上安装 Ubuntu 服务器。如果你有问题或建议,请在评论区告诉我。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/install-ubuntu-server-raspberry-pi/ + +作者:[Dimitrios Savvopoulos][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/dimitrios/ +[b]: https://github.com/lujun9972 +[1]: https://www.raspberrypi.org/ +[2]: https://itsfoss.com/raspberry-pi-alternatives/ +[3]: https://itsfoss.com/raspberry-pi-projects/ +[4]: https://itsfoss.com/raspberry-pi-4/ +[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/09/Ubuntu-Server-20.04.1-LTS-aarch64.png?resize=800%2C600&ssl=1 +[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/09/ubuntu-server-raspberry-pi.png?resize=800%2C450&ssl=1 +[7]: https://itsfoss.com/raspberry-pi-os/ +[8]: https://downloads.raspberrypi.org/imager/imager_amd64.deb +[9]: https://downloads.raspberrypi.org/imager/imager.exe +[10]: https://downloads.raspberrypi.org/imager/imager.dmg +[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/09/raspberry-pi-imager.png?resize=800%2C600&ssl=1 +[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/09/raspberry-pi-imager-choose-ubuntu.png?resize=800%2C600&ssl=1 +[13]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/09/raspberry-pi-imager-ubuntu-server.png?resize=800%2C600&ssl=1 +[14]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/09/raspberry-pi-imager-sd-card.png?resize=800%2C600&ssl=1 +[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/09/ubuntu-server-installed-raspberry-pi.png?resize=799%2C506&ssl=1 +[16]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/09/ubuntu-server-pi-network-config.png?resize=800%2C565&ssl=1 +[17]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/09/Ubuntu-server-wifi.png?resize=800%2C600&ssl=1 +[18]: https://itsfoss.com/turn-on-raspberry-pi/ +[19]: https://itsfoss.com/change-password-ubuntu/ +[20]: https://itsfoss.com/how-to-find-what-devices-are-connected-to-network-in-ubuntu/ +[21]: https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse +[22]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/09/ubuntu-server-change-password.png?resize=800%2C600&ssl=1 +[23]: https://itsfoss.com/install-arch-raspberry-pi/ From 91ef7612449a1c1f9e9b25bc3be57a54c24bbf16 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 29 Oct 2020 08:54:01 +0800 Subject: [PATCH 013/130] translating --- .../tech/20201021 5 open source tools I can-t live without.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20201021 5 open source tools I can-t live without.md b/sources/tech/20201021 5 open source tools I can-t live without.md index 2d5220c471..25b79f9959 100644 --- a/sources/tech/20201021 5 open source tools I can-t live without.md +++ b/sources/tech/20201021 5 open source tools I can-t live without.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 324fba9c339044abee6ec365c26b77dac1999249 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Thu, 29 Oct 2020 20:42:55 +0800 Subject: [PATCH 014/130] Rename sources/tech/20201028 A few things I-ve learned about email marketing.md to sources/talk/20201028 A few things I-ve learned about email marketing.md --- .../20201028 A few things I-ve learned about email marketing.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => talk}/20201028 A few things I-ve learned about email marketing.md (100%) diff --git a/sources/tech/20201028 A few things I-ve learned about email marketing.md b/sources/talk/20201028 A few things I-ve learned about email marketing.md similarity index 100% rename from sources/tech/20201028 A few things I-ve learned about email marketing.md rename to sources/talk/20201028 A few things I-ve learned about email marketing.md From a008b109aa7da7051f42c3a3d43c1daed4dc8088 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 30 Oct 2020 05:01:42 +0800 Subject: [PATCH 015/130] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020201030=20?= =?UTF-8?q?How=20to=20Use=20apt-cache=20Command=20in=20Debian,=20Ubuntu=20?= =?UTF-8?q?and=20Other=20Linux=20Distributions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20201030 How to Use apt-cache Command in Debian, Ubuntu and Other Linux Distributions.md --- ...n, Ubuntu and Other Linux Distributions.md | 167 ++++++++++++++++++ 1 file changed, 167 insertions(+) create mode 100644 sources/tech/20201030 How to Use apt-cache Command in Debian, Ubuntu and Other Linux Distributions.md diff --git a/sources/tech/20201030 How to Use apt-cache Command in Debian, Ubuntu and Other Linux Distributions.md b/sources/tech/20201030 How to Use apt-cache Command in Debian, Ubuntu and Other Linux Distributions.md new file mode 100644 index 0000000000..23b314319b --- /dev/null +++ b/sources/tech/20201030 How to Use apt-cache Command in Debian, Ubuntu and Other Linux Distributions.md @@ -0,0 +1,167 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to Use apt-cache Command in Debian, Ubuntu and Other Linux Distributions) +[#]: via: (https://itsfoss.com/apt-cache-command/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) + +How to Use apt-cache Command in Debian, Ubuntu and Other Linux Distributions +====== + +_**With apt-cache command, you can search for package details in the local APT cache. Learn to use apt-cache command in this tutorial.**_ + +### What is apt-cache command used for? + +The [apt][1] [package manager][2] works on a local cache of package metadata. The metadata usually consists information like package name, version, description, dependencies, its repository and developers. With the apt-cache command, you can query this local APT cache and get relevant information. + +You can search for the availability of a package, its version number, its dependencies among other things. I’ll show you how to use the apt-cache command with examples. + +The **location of APT cache** is /var/lib/apt/lists/ directory. Which repository metadata to cache depends on the repositories added in your source list in the /etc/apt/sources.list file and additional repository files located in ls /etc/apt/sources.list.d directory. + +Surprisingly, apt-cache doesn’t clear the APT cache. For that you’ll have to [use the apt-get clean command][3]. + +Needless to say, the APT packaging system is used on Debian and Debian-based Linux distributions like Ubuntu, Linux Mint, elementary OS etc. You cannot use it on Arch or Fedora. + +### Using apt-cache command + +![][4] + +Like any other Linux command, there are several options available with apt-cache and you can always refer to its man page to read about them. + +However, you probably won’t need to use all of them. This is why I am going to show you only the most common and useful examples of the apt-cache command in this tutorial. + +Always update + +It is always a good idea to update the local APT cache to sync it with the remote repositories. How do you do that? You use the command: + +**sudo apt update** + +#### Search for packages + +The most common use of apt-cache command is for finding package. You can use a regex pattern to search for a package in the local APT cache. + +``` +apt-cache search package_name +``` + +By default, it looks for the search term in both the name and description of the package. It shows the matching package along with its short description in alphabetical order. + +![][5] + +You can narrow down your search to look for the search term in package names only. + +``` +apt-cache search --names-only package_name +``` + +![][6] + +If you want complete details of all the matched packages, you may use the `--full` flag. It can also be used with `--names-only` flag. + +![][7] + +#### Get detailed package information + +If you know the exact package name (or if you have manged to find it with the search), you can get the detailed metadata information on the package. + +``` +apt-cache show package_name +``` + +![][8] + +You can see all kind of details in the package metadata like name, version, developer, maintainer, repository, short and long description, package size and even checksum. + +There is another option showpkg that displays information about the package name, version and its forward and reverse dependencies. + +``` +apt-cache showpkg package_name +``` + +#### apt-cache policy + +This is one of the rarely used option of apt-cache command. The policy options helps you debug the issue related to the [preference file][9]. + +If you specify the package name, it will show whether the package is installed, which version is available from which repository and its priority. + +![][10] + +By default, each installed package version has a priority of 100 and a non-installed package has a priority of 500. The same package may have more than one version with a different priority. APT installs the version with higher priority unless the installed version is newer. + +If this doesn’t make sense, it’s okay. It will be extremely rare for a regular Linux user to dwell this deep into package management. + +#### Check dependencies and reverse dependencies of a package + +You can [check the dependencies of a package][11] before (or even after) installing it. It also shows all the possible packages that can fulfill the dependency. + +``` +apt-cache depends package +``` + +![][12] + +You may also check which packages are dependent on a certain package by checking the reverse dependencies with apt-cahce. + +![][13] + +Frankly, I was also surprised to see that a DevOps tool like Ansible has a dependency on a [funny Linux command like Cowsay][14]. I think it’s perhaps because after [installing Ansible][15], it displays some message on the nodes. + +#### Check unmet dependencies + +You may get troubled with [unmet dependencies issue in Ubuntu][16] or other Linux. The apt-cache command provides option to check all the unmet dependencies of various available packages on your system. + +``` +apt-cache unmet +``` + +![][17] + +**Conclusion** + +You can list all available packages with the apt-cache command. The output would be huge, so I suggest combining it with [wc command][18] to get a total number of available packages like this: + +``` +apt-cache pkgnames | wc -l +``` + +Did you notice that you don’t need to be [root user][19] for using apt-cache command? + +The newer [apt command][20] has a few options available to match the features of apt-cache command. Since apt is new, apt-get and its associated commands like apt-cache are still preferred to be used in scripts. + +I hope you find this tutorial helpful. If you have questions about any point discussed above or suggestion to improve it, please let me know in the comments. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/apt-cache-command/ + +作者:[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/package-manager/ +[3]: https://itsfoss.com/clear-apt-cache/ +[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/10/apt-cache-command.png?resize=800%2C450&ssl=1 +[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/10/apt-cache-search.png?resize=759%2C437&ssl=1 +[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/10/apt-cache-search-names-only.png?resize=759%2C209&ssl=1 +[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/10/apt-cache-show-full.png?resize=759%2C722&ssl=1 +[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/10/apt-cache-show-pkgname.png?resize=800%2C795&ssl=1 +[9]: https://debian-handbook.info/browse/stable/sect.apt-get.html#sect.apt.priorities +[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/10/apt-cache-policy.png?resize=795%2C456&ssl=1 +[11]: https://itsfoss.com/check-dependencies-package-ubuntu/ +[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/10/apt-cache-dependency-check.png?resize=768%2C304&ssl=1 +[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/10/apt-cache-reverse-dependency.png?resize=768%2C304&ssl=1 +[14]: https://itsfoss.com/funny-linux-commands/ +[15]: https://linuxhandbook.com/install-ansible-linux/ +[16]: https://itsfoss.com/held-broken-packages-error/ +[17]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/10/apt-cache-unmet.png?resize=759%2C399&ssl=1 +[18]: https://linuxhandbook.com/wc-command/ +[19]: https://itsfoss.com/root-user-ubuntu/ +[20]: https://itsfoss.com/apt-command-guide/ From dc5a538c3e018d3f4006cbcd315d4e743e0242d0 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 30 Oct 2020 05:02:01 +0800 Subject: [PATCH 016/130] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020201029=20?= =?UTF-8?q?Improve=20your=20database=20knowledge=20with=20this=20MariaDB?= =?UTF-8?q?=20and=20MySQL=20cheat=20sheet?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20201029 Improve your database knowledge with this MariaDB and MySQL cheat sheet.md --- ...with this MariaDB and MySQL cheat sheet.md | 389 ++++++++++++++++++ 1 file changed, 389 insertions(+) create mode 100644 sources/tech/20201029 Improve your database knowledge with this MariaDB and MySQL cheat sheet.md diff --git a/sources/tech/20201029 Improve your database knowledge with this MariaDB and MySQL cheat sheet.md b/sources/tech/20201029 Improve your database knowledge with this MariaDB and MySQL cheat sheet.md new file mode 100644 index 0000000000..3fd06952ce --- /dev/null +++ b/sources/tech/20201029 Improve your database knowledge with this MariaDB and MySQL cheat sheet.md @@ -0,0 +1,389 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Improve your database knowledge with this MariaDB and MySQL cheat sheet) +[#]: via: (https://opensource.com/article/20/10/mariadb-mysql-cheat-sheet) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) + +Improve your database knowledge with this MariaDB and MySQL cheat sheet +====== +Read this article and download our free cheat sheet to get started using +an open source database. +![Cheat Sheet cover image][1] + +When you're writing an application or configuring one for a server, eventually, you will need to store persistent information. Sometimes, a configuration file, such as an INI or [YAML][2] file will do. Other times, a custom file format designed in XML or JSON or similar is better. + +But sometimes you need something that can validate input, search through information quickly, make connections between related data, and generally handle your users' work adeptly. That's what a database is designed to do, and [MariaDB][3] (a fork of [MySQL][4] by some of its original developers) is a great option. I use MariaDB in this article, but the information applies equally to MySQL. + +It's common to interact with a database through programming languages. For this reason, there are [SQL][5] libraries for Java, Python, Lua, PHP, Ruby, C++, and many others. However, before using these libraries, it helps to have an understanding of what's happening with the database engine and why your choice of database is significant. This article introduces MariaDB and the `mysql` command to familiarize you with the basics of how a database handles data. + +If you don't have MariaDB yet, follow the instructions in my article about [installing MariaDB on Linux][6]. If you're not on Linux, use the instructions provided on the MariaDB [download page][7]. + +### Interact with MariaDB + +You can interact with MariaDB using the `mysql` command. First, verify that your server is up and running using the `ping` subcommand, entering your MariaDB password when prompted: + + +``` +$ mysqladmin -u root -p ping +Enter password: +mysqld is alive +``` + +To make exploring SQL easy, open an interactive MariaDB session: + + +``` +$ mysql -u root -p +Enter password: +Welcome to the MariaDB monitor. +Commands end with ; or \g. +[...] +Type 'help;' or '\h' for help. +Type '\c' to clear the current input statement. + +MariaDB [(none)]> +``` + +This places you in a MariaDB subshell, and your prompt is now a MariaDB prompt. Your usual Bash commands don't work here. You must use MariaDB commands. To see a list of MariaDB commands, type `help` (or just `?`). These are administrative commands for your MariaDB shell, so they're useful for customizing your shell, but they aren't part of the SQL language. + +### Learn SQL basics + +The [Structured Query Language (SQL)][8] is named after what it provides: a method to inquire about the contents of a database in a predictable and consistent syntax in order to receive useful results. SQL reads a lot like an ordinary English sentence, if a little robotic. For instance, if you've signed into a database server and you need to understand what you have to work with, type `SHOW DATABASES;` and press Enter for the results. + +SQL commands are terminated with a semicolon. If you forget the semicolon, MariaDB assumes you want to continue your query on the next line, where you can either do so or terminate the query with a semicolon. + + +``` +MariaDB [(NONE)]> SHOW DATABASES; ++--------------------+ +| DATABASE           | ++--------------------+ +| information_schema | +| mysql              | +| performance_schema | +| test               | ++--------------------+ +4 ROWS IN SET (0.000 sec) +``` + +This shows there are four databases present: information_schema, mysql, performance_schema, and test. To issue queries to a database, you must select which database you want MariaDB to use. This is done with the MariaDB command `use`. Once you choose a database, your MariaDB prompt changes to reflect the active database. + + +``` +MariaDB [(NONE)]> USE test; +MariaDB [(test)]> +``` + +#### Show database tables + +Databases contain _tables_, which can be visualized in the same way a spreadsheet is: as a series of rows (called _records_ in a database) and columns. The intersection of a row and a column is called a _field_. + +To see the tables available in a database (you can think of them as tabs in a multi-sheet spreadsheet), use the SQL keyword `SHOW` again: + + +``` +MariaDB [(test)]> SHOW TABLES; +empty SET +``` + +The `test` database doesn't have much to look at, so use the `use` command to switch to the `mysql` database. + + +``` +MariaDB [(test)]> USE mysql; +MariaDB [(mysql)]> SHOW TABLES; + ++---------------------------+ +| Tables_in_mysql           | ++---------------------------+ +| column_stats              | +| columns_priv              | +| db                        | +[...] +| time_zone_transition_type | +| transaction_registry      | +| USER                      | ++---------------------------+ +31 ROWS IN SET (0.000 sec) +``` + +There are a lot more tables in this database! The `mysql` database is the system management database for this MariaDB instance. It contains important data, including an entire user structure to manage database privileges. It's an important database, and you don't always have to interact with it directly, but it's not uncommon to manipulate it in SQL scripts. It's also useful to understand the `mysql` database when you're learning MariaDB because it can help demonstrate some basic SQL commands. + +#### Examine a table + +The last table listed in this instance's `mysql` database is titled `user`. This table contains data about users permitted to access the database. Right now, there's only a root user, but you can add other users with varying privileges to control whether each user can view, update, or create data. To get an idea of all the attributes a MariaDB user can have, you can view column headers in a table: + + +``` +> SHOW COLUMNS IN USER; +MariaDB [mysql]> SHOW COLUMNS IN USER; ++-------------+---------------+------+-----+----------+ +| FIELD       | TYPE          | NULL | KEY | DEFAULT  | ++-------------+---------------+------+-----+----------+ +| Host        | CHAR(60)      | NO   | PRI |          | +| USER        | CHAR(80)      | NO   | PRI |          | +| Password    | CHAR(41)      | NO   |     |          | +| Select_priv | enum('N','Y') | NO   |     | N        | +| Insert_priv | enum('N','Y') | NO   |     | N        | +| Update_priv | enum('N','Y') | NO   |     | N        | +| Delete_priv | enum('N','Y') | NO   |     | N        | +| Create_priv | enum('N','Y') | NO   |     | N        | +| Drop_priv   | enum('N','Y') | NO   |     | N        | +[...] +47 ROWS IN SET (0.001 sec) +``` + +#### Create a new user + +Whether you need help from a fellow human to administer a database or you're setting up a database for a computer to use (for example, in a WordPress, Drupal, or Joomla installation), it's common to need an extra user account within MariaDB. You can create a MariaDB user either by adding it to the `user` table in the `mysql` database, or you can use the SQL keyword `CREATE` to prompt MariaDB to do it for you. The latter features some helper functions so that you don't have to generate all the information manually: + + +``` +`> CREATE USER 'tux'@'localhost' IDENTIFIED BY 'really_secure_password';` +``` + +#### View table fields + +You can view fields and values in a database table with the `SELECT` keyword. In this example, you created a user called `tux`, so select the columns in the `user` table: + + +``` +> SELECT USER,host FROM USER; ++------+------------+ +| USER | host       | ++------+------------+ +| root | localhost  | +[...] +| tux  | localhost  | ++------+------------+ +7 ROWS IN SET (0.000 sec) +``` + +#### Grant privileges to a user + +By looking at the column listing on the `user` table, you can explore a user's status. For instance, the new user `tux` doesn't have permission to do anything with the database. Using the `WHERE` statement, you can view only the record for `tux`: + + +``` +> SELECT USER,select_priv,insert_priv,update_priv FROM USER WHERE USER='tux'; ++------+-------------+-------------+-------------+ +| USER | select_priv | insert_priv | update_priv | ++------+-------------+-------------+-------------+ +| tux  | N           | N           | N           | ++------+-------------+-------------+-------------+ +``` + +Use the `GRANT` command to modify user permissions: + + +``` +> GRANT SELECT ON *.* TO 'tux'@'localhost'; +> FLUSH PRIVILEGES; +``` + +Verify your change: + + +``` +> SELECT USER,select_priv,insert_priv,update_priv FROM USER WHERE USER='tux'; ++------+-------------+-------------+-------------+ +| USER | select_priv | insert_priv | update_priv | ++------+-------------+-------------+-------------+ +| tux  | Y           | N           | N           | ++------+-------------+-------------+-------------+ +``` + +User `tux` now has privileges to select records from all tables. + +### Create a custom database + +So far, you've interacted just with the default databases. Most people rarely interact much with the default databases outside of user management. Usually, you create a database and populate it with tables full of custom data. + +#### Create a MariaDB database + +You may already be able to guess how to create a new database in MariaDB. It's a lot like creating a new user: + + +``` +> CREATE DATABASE example; +Query OK, 1 ROW affected (0.000 sec) +> SHOW DATABASES; ++--------------------+ +| DATABASE           | ++--------------------+ +| example            | +[...] +``` + +Make this new database your active one with the `use` command: + + +``` +`> USE example;` +``` + +#### Create a table + +Creating a table is more complex than creating a database because you must define column headings. MariaDB provides many convenience functions for you to use when creating columns, including data type definitions, automatic incrementing options, constraints to avoid empty values, automated timestamps, and more. + +Here's a simple table to describe a set of users: + + +``` +> CREATE TABLE IF NOT EXISTS member ( +    -> id INT AUTO_INCREMENT PRIMARY KEY, +    -> name VARCHAR(128) NOT NULL, +    -> startdate TIMESTAMP DEFAULT CURRENT_TIMESTAMP); +Query OK, 0 ROWS affected (0.030 sec) +``` + +This table provides a unique identifier to each row by using an auto-increment function. It contains a field for a user's name, which cannot be empty (or `null`), and generates a timestamp when the record is created. + +Populate this table with some sample data using the `INSERT` SQL keyword: + + +``` +> INSERT INTO member (name) VALUES ('Alice'); +Query OK, 1 ROW affected (0.011 sec) +> INSERT INTO member (name) VALUES ('Bob'); +Query OK, 1 ROW affected (0.011 sec) +> INSERT INTO member (name) VALUES ('Carol'); +Query OK, 1 ROW affected (0.011 sec) +> INSERT INTO member (name) VALUES ('David'); +Query OK, 1 ROW affected (0.011 sec) +``` + +Verify the data in the table: + + +``` +> SELECT * FROM member; ++----+-------+---------------------+ +| id | name  | startdate           | ++----+-------+---------------------+ +|  1 | Alice | 2020-10-03 15:25:06 | +|  2 | Bob   | 2020-10-03 15:26:43 | +|  3 | Carol | 2020-10-03 15:26:46 | +|  4 | David | 2020-10-03 15:26:51 | ++----+-------+---------------------+ +4 ROWS IN SET (0.000 sec) +``` + +#### Add multiple rows at once + +Now create a second table: + + +``` +> CREATE TABLE IF NOT EXISTS linux ( +    -> id INT AUTO_INCREMENT PRIMARY KEY, +    -> distro VARCHAR(128) NOT NULL, +Query OK, 0 ROWS affected (0.030 sec) +``` + +Populate it with some sample data, this time using a little `VALUES` shortcut so you can add multiple rows in one command. The `VALUES` keyword expects a list in parentheses, but it can take multiple lists separated by commas: + + +``` +> INSERT INTO linux (distro) + -> VALUES ('Slackware'), ('RHEL'),('Fedora'),('Debian'); +Query OK, 4 ROWS affected (0.011 sec) +Records: 4  Duplicates: 0  Warnings: 0 +> SELECT * FROM linux; ++----+-----------+ +| id | distro    | ++----+-----------+ +|  1 | Slackware | +|  2 | RHEL      | +|  3 | Fedora    | +|  4 | Debian    | ++----+-----------+ +``` + +### Create relationships between tables + +You now have two tables, but there's no relationship between them. They each contain independent data, but you might need to associate a member of the first table to a specific item listed in the second. + +To do that, you can create a new column for the first table that corresponds to something in the second. Because both tables were designed with unique identifiers (the auto-incrementing `id` field), the easiest way to connect them is to use the `id` field of one as a selector for the other. + +Create a new column in the first table to represent a value in the second table: + + +``` +> ALTER TABLE member ADD COLUMN (os INT); +Query OK, 0 ROWS affected (0.012 sec) +Records: 0  Duplicates: 0  Warnings: 0 +> DESCRIBE member; +DESCRIBE member; ++-----------+--------------+------+-----+---------+------+ +| FIELD     | TYPE         | NULL | KEY | DEFAULT | Extra| ++-----------+--------------+------+-----+---------+------+ +| id        | INT(11)      | NO   | PRI | NULL    | auto_| +| name      | VARCHAR(128) | NO   |     | NULL    |      | +| startdate | TIMESTAMP    | NO   |     | cur[...]|      | +| os        | INT(11)      | YES  |     | NULL    |      | ++-----------+--------------+------+-----+---------+------+ +``` + +Using the unique IDs of the `linux` table, assign a distribution to each member. Because the records already exist, use the `UPDATE` SQL keyword rather than `INSERT`. Specifically, you want to select one row and then update the value of one column. Syntactically, this is expressed a little in reverse, with the update happening first and the selection matching last: + + +``` +> UPDATE member SET os=1 WHERE name='Alice'; +Query OK, 1 ROW affected (0.007 sec) +ROWS matched: 1  Changed: 1  Warnings: 0 +``` + +Repeat this process for the other names in the `member` table to populate it with data. For variety, assign three different distributions across the four rows (doubling up on one). + +#### Join tables + +Now that these two tables relate to one another, you can use SQL to display the associated data. There are many kinds of joins in databases, and you can try them all once you know the basics. Here's a basic join to correlate the values found in the `os` field of the `member` table to the `id` field of the `linux` table: + + +``` +SELECT * FROM member JOIN linux ON member.os=linux.id; ++----+-------+---------------------+------+----+-----------+ +| id | name  | startdate           | os   | id | distro    | ++----+-------+---------------------+------+----+-----------+ +|  1 | Alice | 2020-10-03 15:25:06 |    1 |  1 | Slackware | +|  2 | Bob   | 2020-10-03 15:26:43 |    3 |  3 | Fedora    | +|  4 | David | 2020-10-03 15:26:51 |    3 |  3 | Fedora    | +|  3 | Carol | 2020-10-03 15:26:46 |    4 |  4 | Debian    | ++----+-------+---------------------+------+----+-----------+ +4 ROWS IN SET (0.000 sec) +``` + +The `os` and `id` fields form the join. + +In a graphical application, you can imagine that the `os` field might be set by a drop-down menu, the values for which are drawn from the contents of the `distro` field of the `linux` table. By using separate tables for unique but related sets of data, you ensure the consistency and validity of data, and thanks to SQL, you can associate them dynamically later. + +### [Download the MariaDB and MySQL cheat sheet][9] + +MariaDB is an enterprise-grade database. It's designed and proven to be a robust, powerful, and fast database engine. Learning it is a great step toward using it to do things like managing web applications or programming language libraries. As a quick reference when you're using MariaDB, [download our MariaDB and MySQL cheat sheet][9]. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/10/mariadb-mysql-cheat-sheet + +作者:[Seth Kenlon][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/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/coverimage_cheat_sheet.png?itok=lYkNKieP (Cheat Sheet cover image) +[2]: https://www.redhat.com/sysadmin/yaml-tips +[3]: https://mariadb.org/ +[4]: https://www.mysql.com/ +[5]: https://en.wikipedia.org/wiki/SQL +[6]: https://opensource.com/article/20/10/install-mariadb-and-mysql-linux +[7]: https://mariadb.org/download +[8]: https://publications.opengroup.org/c449 +[9]: https://opensource.com/downloads/mariadb-mysql-cheat-sheet From 2a2058642bf175a70d27f6f64571ddd779bbe6b4 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 30 Oct 2020 05:02:17 +0800 Subject: [PATCH 017/130] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020201029=20?= =?UTF-8?q?Managing=20resources=20with=20cgroups=20in=20systemd?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20201029 Managing resources with cgroups in systemd.md --- ...aging resources with cgroups in systemd.md | 369 ++++++++++++++++++ 1 file changed, 369 insertions(+) create mode 100644 sources/tech/20201029 Managing resources with cgroups in systemd.md diff --git a/sources/tech/20201029 Managing resources with cgroups in systemd.md b/sources/tech/20201029 Managing resources with cgroups in systemd.md new file mode 100644 index 0000000000..5cb7f5c8c8 --- /dev/null +++ b/sources/tech/20201029 Managing resources with cgroups in systemd.md @@ -0,0 +1,369 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Managing resources with cgroups in systemd) +[#]: via: (https://opensource.com/article/20/10/cgroups) +[#]: author: (David Both https://opensource.com/users/dboth) + +Managing resources with cgroups in systemd +====== +Cgroups manage resources per application rather than by the individual +processes that make up an application. +![Business woman on laptop sitting in front of window][1] + +There is little more frustrating to me as a sysadmin than unexpectedly running out of a computing resource. On more than one occasion, I have filled all available disk space in a partition, run out of RAM, and not had enough CPU time to perform my tasks in a reasonable amount of time. Resource management is one of the most important tasks that sysadmins do. + +The point of resource management is to ensure that all processes have relatively equal access to the system resources they need. Resource management also involves ensuring that RAM, hard drive space, and CPU capacity are added when necessary or rationed when that is not possible. In addition, users who hog system resources, whether intentionally or accidentally, should be prevented from doing so. + +There are tools that enable sysadmins to monitor and manage various system resources. For example, [top][2] and similar tools allow you to monitor the use of memory, I/O, storage (disk, SSD, etc.), network, swap space, CPU usage, and more. These tools, particularly those that are CPU-centric, are mostly based on the paradigm that the running process is the unit of control. At best, they provide a way to adjust the nice number–and through that, the priority—or to kill a running process. (For information about nice numbers, see [_Monitoring Linux and Windows hosts with Glances_][3].) + +Other tools based on traditional resource management in a SystemV environment are managed by the `/etc/security/limits.conf` file and the local configuration files located in the `/etc/security/limits.d` directory. Resources can be limited in a fairly crude but useful manner by user or group. Resources that can be managed include various aspects of RAM, total CPU time per day, total amount of data, priority, nice number, number of concurrent logins, number of processes, maximum file size, and more. + +### Using cgroups for process management + +One major difference between [systemd and SystemV][4] is how they handle processes. SystemV treats each process as an entity unto itself. systemd collects related processes into control groups, called [cgroups][5] (short for control groups), and manages system resources for the cgroup as a whole. This means resources can be managed per application rather than by the individual processes that make up an application. + +The control units for cgroups are called slice units. Slices are a conceptualization that allows systemd to order processes in a tree format for ease of management. + +### Viewing cgroups + +I'll start with some commands that allow you to view various types of information about cgroups. The `systemctl status ` command displays slice information about a specified service, including its slice. This example shows the `at` daemon: + + +``` +[root@testvm1 ~]# systemctl status atd.service +● atd.service - Deferred execution scheduler +     Loaded: loaded (/usr/lib/systemd/system/atd.service; enabled; vendor preset: enabled) +     Active: active (running) since Wed 2020-09-23 12:18:24 EDT; 1 day 3h ago +       Docs: man:atd(8) +   Main PID: 1010 (atd) +      Tasks: 1 (limit: 14760) +     Memory: 440.0K +        CPU: 5ms +     CGroup: /system.slice/atd.service +             └─1010 /usr/sbin/atd -f + +Sep 23 12:18:24 testvm1.both.org systemd[1]: Started Deferred execution scheduler. +[root@testvm1 ~]# +``` + +This is an excellent example of one reason that I find systemd more usable than SystemV and the old init program. There is so much more information here than SystemV could provide. The cgroup entry includes the hierarchical structure where the `system.slice` is systemd (PID 1), and the `atd.service` is one level below and part of the `system.slice`. The second line of the cgroup entry also shows the process ID (PID) and the command used to start the daemon. + +The `systemctl` command shows multiple cgroup entries. The `--all` option shows all slices, including those that are not currently active: + + +``` +[root@testvm1 ~]# systemctl -t slice --all +  UNIT                             LOAD   ACTIVE   SUB    DESCRIPTION                     +  -.slice                          loaded active   active Root Slice                       +  system-getty.slice               loaded active   active system-getty.slice               +  system-lvm2\x2dpvscan.slice      loaded active   active system-lvm2\x2dpvscan.slice     +  system-modprobe.slice            loaded active   active system-modprobe.slice           +  system-sshd\x2dkeygen.slice      loaded active   active system-sshd\x2dkeygen.slice     +  system-systemd\x2dcoredump.slice loaded inactive dead   system-systemd\x2dcoredump.slice +  system-systemd\x2dfsck.slice     loaded active   active system-systemd\x2dfsck.slice     +  system.slice                     loaded active   active System Slice                     +  user-0.slice                     loaded active   active User Slice of UID 0             +  user-1000.slice                  loaded active   active User Slice of UID 1000           +  user.slice                       loaded active   active User and Session Slice           + +LOAD   = Reflects whether the unit definition was properly loaded. +ACTIVE = The high-level unit activation state, i.e. generalization of SUB. +SUB    = The low-level unit activation state, values depend on unit type. + +11 loaded units listed. +To show all installed unit files use 'systemctl list-unit-files'. +[root@testvm1 ~]# +``` + +The first thing to notice about this data is that it shows user slices for UIDs 0 (root) and 1000, which is my user login. This shows only the slices and not the services that are part of each slice. This data shows that a slice is created for each user at the time they log in. This can provide a way to manage all of a user's tasks as a single cgroup entity. + +### Explore the cgroup hierarchy + +All is well and good so far, but cgroups are hierarchical, and all of the service units run as members of one of the cgroups. Viewing that hierarchy is easy and uses one old command and one new one that is part of systemd. + +The `ps` command can be used to map the processes and their locations in the cgroup hierarchy. Note that it is necessary to specify the desired data columns when using the `ps` command. I significantly reduced the volume of output from this command below, but I tried to leave enough so you can get a feel for what you might find on your systems: + + +``` +[root@testvm1 ~]# ps xawf -eo pid,user,cgroup,args +    PID USER     CGROUP                      COMMAND +      2 root     -                           [kthreadd] +      3 root     -                            \\_ [rcu_gp] +      4 root     -                            \\_ [rcu_par_gp] +      6 root     -                            \\_ [kworker/0:0H-kblockd] +      9 root     -                            \\_ [mm_percpu_wq] +     10 root     -                            \\_ [ksoftirqd/0] +     11 root     -                            \\_ [rcu_sched] +     12 root     -                            \\_ [migration/0] +     13 root     -                            \\_ [cpuhp/0] +     14 root     -                            \\_ [cpuhp/1] +<SNIP> + 625406 root     -                            \\_ [kworker/3:0-ata_sff] + 625409 root     -                            \\_ [kworker/u8:0-events_unbound] +      1 root     0::/init.scope              /usr/lib/systemd/systemd --switched-root --system --deserialize 30 +    588 root     0::/system.slice/systemd-jo /usr/lib/systemd/systemd-journald +    599 root     0::/system.slice/systemd-ud /usr/lib/systemd/systemd-udevd +    741 root     0::/system.slice/auditd.ser /sbin/auditd +    743 root     0::/system.slice/auditd.ser  \\_ /usr/sbin/sedispatch +    764 root     0::/system.slice/ModemManag /usr/sbin/ModemManager +    765 root     0::/system.slice/NetworkMan /usr/sbin/NetworkManager --no-daemon +    767 root     0::/system.slice/irqbalance /usr/sbin/irqbalance --foreground +    779 root     0::/system.slice/mcelog.ser /usr/sbin/mcelog --ignorenodev --daemon --foreground +    781 root     0::/system.slice/rngd.servi /sbin/rngd -f +    782 root     0::/system.slice/rsyslog.se /usr/sbin/rsyslogd -n +<SNIP> +    893 root     0::/system.slice/sshd.servi sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups +   1130 root     0::/user.slice/user-0.slice  \\_ sshd: root [priv] +   1147 root     0::/user.slice/user-0.slice  |   \\_ sshd: root@pts/0 +   1148 root     0::/user.slice/user-0.slice  |       \\_ -bash +   1321 root     0::/user.slice/user-0.slice  |           \\_ screen +   1322 root     0::/user.slice/user-0.slice  |               \\_ SCREEN +   1323 root     0::/user.slice/user-0.slice  |                   \\_ /bin/bash + 498801 root     0::/user.slice/user-0.slice  |                   |   \\_ man systemd.resource-control + 498813 root     0::/user.slice/user-0.slice  |                   |       \\_ less +   1351 root     0::/user.slice/user-0.slice  |                   \\_ /bin/bash + 123293 root     0::/user.slice/user-0.slice  |                   |   \\_ man systemd.slice + 123305 root     0::/user.slice/user-0.slice  |                   |       \\_ less +   1380 root     0::/user.slice/user-0.slice  |                   \\_ /bin/bash + 625412 root     0::/user.slice/user-0.slice  |                   |   \\_ ps xawf -eo pid,user,cgroup,args + 625413 root     0::/user.slice/user-0.slice  |                   |   \\_ less + 246795 root     0::/user.slice/user-0.slice  |                   \\_ /bin/bash + 625338 root     0::/user.slice/user-0.slice  |                       \\_ /usr/bin/mc -P /var/tmp/mc-root/mc.pwd.246795 + 625340 root     0::/user.slice/user-0.slice  |                           \\_ bash -rcfile .bashrc +   1218 root     0::/user.slice/user-1000.sl  \\_ sshd: dboth [priv] +   1233 dboth    0::/user.slice/user-1000.sl      \\_ sshd: dboth@pts/1 +   1235 dboth    0::/user.slice/user-1000.sl          \\_ -bash +<SNIP> +   1010 root     0::/system.slice/atd.servic /usr/sbin/atd -f +   1011 root     0::/system.slice/crond.serv /usr/sbin/crond -n +   1098 root     0::/system.slice/lxdm.servi /usr/sbin/lxdm-binary +   1106 root     0::/system.slice/lxdm.servi  \\_ /usr/libexec/Xorg -background none :0 vt01 -nolisten tcp -novtswitch -auth /var/run/lxdm/lxdm-:0.auth + 370621 root     0::/user.slice/user-1000.sl  \\_ /usr/libexec/lxdm-session + 370631 dboth    0::/user.slice/user-1000.sl      \\_ xfce4-session + 370841 dboth    0::/user.slice/user-1000.sl          \\_ /usr/bin/ssh-agent /bin/sh -c exec -l bash -c "/usr/bin/startxfce4" + 370911 dboth    0::/user.slice/user-1000.sl          \\_ xfwm4 --display :0.0 --sm-client-id 2dead44ab-0b4d-4101-bca4-e6771f4a8ac2 + 370930 dboth    0::/user.slice/user-1000.sl          \\_ xfce4-panel --display :0.0 --sm-client-id 2ce38b8ef-86fd-4189-ace5-deec1d0e0952 + 370942 dboth    0::/user.slice/user-1000.sl          |   \\_ /usr/lib64/xfce4/panel/wrapper-2.0 /usr/lib64/xfce4/panel/plugins/libsystray.so 6 23068680 systr +ay Notification Area Area where notification icons appear + 370943 dboth    0::/user.slice/user-1000.sl          |   \\_ /usr/lib64/xfce4/panel/wrapper-2.0 /usr/lib64/xfce4/panel/plugins/libpulseaudio-plugin.so 8 2306 +8681 pulseaudio PulseAudio Plugin Adjust the audio volume of the PulseAudio sound system + 370944 dboth    0::/user.slice/user-1000.sl          |   \\_ /usr/lib64/xfce4/panel/wrapper-2.0 /usr/lib64/xfce4/panel/plugins/libxfce4powermanager.so 9 2306 +8682 power-manager-plugin Power Manager Plugin Display the battery levels of your devices and control the brightness of your display + 370945 dboth    0::/user.slice/user-1000.sl          |   \\_ /usr/lib64/xfce4/panel/wrapper-2.0 /usr/lib64/xfce4/panel/plugins/libnotification-plugin.so 10 2 +3068683 notification-plugin Notification Plugin Notification plugin for the Xfce panel + 370948 dboth    0::/user.slice/user-1000.sl          |   \\_ /usr/lib64/xfce4/panel/wrapper-2.0 /usr/lib64/xfce4/panel/plugins/libactions.so 14 23068684 acti +ons Action Buttons Log out, lock or other system actions + 370934 dboth    0::/user.slice/user-1000.sl          \\_ Thunar --sm-client-id 2cfc809d8-4e1d-497a-a5c5-6e4fa509c3fb --daemon + 370939 dboth    0::/user.slice/user-1000.sl          \\_ xfdesktop --display :0.0 --sm-client-id 299be0608-4dca-4055-b4d6-55ec6e73a324 + 370962 dboth    0::/user.slice/user-1000.sl          \\_ nm-applet +<SNIP> +``` + +You can view the entire hierarchy with the `systemd-cgls` command, which is a bit simpler because it does not require any complex options. + +I have shortened this tree view considerably. as well, but I left enough to give you some idea of the amount of data as well as the types of entries you should see when you do this on your system. I did this on one of my virtual machines, and it is about 200 lines long; the amount of data from my primary workstation is about 250 lines: + + +``` +[root@testvm1 ~]# systemd-cgls +Control group /: +-.slice +├─user.slice +│ ├─user-0.slice +│ │ ├─session-1.scope +│ │ │ ├─  1130 sshd: root [priv] +│ │ │ ├─  1147 sshd: root@pts/0 +│ │ │ ├─  1148 -bash +│ │ │ ├─  1321 screen +│ │ │ ├─  1322 SCREEN +│ │ │ ├─  1323 /bin/bash +│ │ │ ├─  1351 /bin/bash +│ │ │ ├─  1380 /bin/bash +│ │ │ ├─123293 man systemd.slice +│ │ │ ├─123305 less +│ │ │ ├─246795 /bin/bash +│ │ │ ├─371371 man systemd-cgls +│ │ │ ├─371383 less +│ │ │ ├─371469 systemd-cgls +│ │ │ └─371470 less +│ │ └─[user@0.service][6] … +│ │   ├─dbus-broker.service +│ │   │ ├─1170 /usr/bin/dbus-broker-launch --scope user +│ │   │ └─1171 dbus-broker --log 4 --controller 12 --machine-id 3bccd1140fca488187f8a1439c832f07 --max-bytes 100000000000000 --max-fds 25000000000000 --max-> +│ │   ├─gvfs-daemon.service +│ │   │ └─1173 /usr/libexec/gvfsd +│ │   └─init.scope +│ │     ├─1137 /usr/lib/systemd/systemd --user +│ │     └─1138 (sd-pam) +│ └─user-1000.slice +│   ├─[user@1000.service][7] … +│   │ ├─dbus\x2d:1.2\x2dorg.xfce.Xfconf.slice +│   │ │ └─dbus-:[1.2-org.xfce.Xfconf@0.service][8] +│   │ │   └─370748 /usr/lib64/xfce4/xfconf/xfconfd +│   │ ├─dbus\x2d:1.2\x2dca.desrt.dconf.slice +│   │ │ └─dbus-:[1.2-ca.desrt.dconf@0.service][9] +│   │ │   └─371262 /usr/libexec/dconf-service +│   │ ├─dbus-broker.service +│   │ │ ├─1260 /usr/bin/dbus-broker-launch --scope user +│   │ │ └─1261 dbus-broker --log 4 --controller 11 --machine-id +<SNIP> +│   │ └─gvfs-mtp-volume-monitor.service +│   │   └─370987 /usr/libexec/gvfs-mtp-volume-monitor +│   ├─session-3.scope +│   │ ├─1218 sshd: dboth [priv] +│   │ ├─1233 sshd: dboth@pts/1 +│   │ └─1235 -bash +│   └─session-7.scope +│     ├─370621 /usr/libexec/lxdm-session +│     ├─370631 xfce4-session +│     ├─370805 /usr/bin/VBoxClient --clipboard +│     ├─370806 /usr/bin/VBoxClient --clipboard +│     ├─370817 /usr/bin/VBoxClient --seamless +│     ├─370818 /usr/bin/VBoxClient --seamless +│     ├─370824 /usr/bin/VBoxClient --draganddrop +│     ├─370825 /usr/bin/VBoxClient --draganddrop +│     ├─370841 /usr/bin/ssh-agent /bin/sh -c exec -l bash -c "/usr/bin/startxfce4" +│     ├─370910 /bin/gpg-agent --sh --daemon --write-env-file /home/dboth/.cache/gpg-agent-info +│     ├─370911 xfwm4 --display :0.0 --sm-client-id 2dead44ab-0b4d-4101-bca4-e6771f4a8ac2 +│     ├─370923 xfsettingsd --display :0.0 --sm-client-id 261b4a437-3029-461c-9551-68c2c42f4fef +│     ├─370930 xfce4-panel --display :0.0 --sm-client-id 2ce38b8ef-86fd-4189-ace5-deec1d0e0952 +│     ├─370934 Thunar --sm-client-id 2cfc809d8-4e1d-497a-a5c5-6e4fa509c3fb --daemon +│     ├─370939 xfdesktop --display :0.0 --sm-client-id 299be0608-4dca-4055-b4d6-55ec6e73a324 +<SNIP> +└─system.slice +  ├─rngd.service +  │ └─1650 /sbin/rngd -f +  ├─irqbalance.service +  │ └─1631 /usr/sbin/irqbalance --foreground +  ├─fprintd.service +  │ └─303383 /usr/libexec/fprintd +  ├─systemd-udevd.service +  │ └─956 /usr/lib/systemd/systemd-udevd +<SNIP> +  ├─systemd-journald.service +  │ └─588 /usr/lib/systemd/systemd-journald +  ├─atd.service +  │ └─1010 /usr/sbin/atd -f +  ├─system-dbus\x2d:1.10\x2dorg.freedesktop.problems.slice +  │ └─dbus-:[1.10-org.freedesktop.problems@0.service][10] +  │   └─371197 /usr/sbin/abrt-dbus -t133 +  ├─sshd.service +  │ └─893 sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups +  ├─vboxservice.service +  │ └─802 /usr/sbin/VBoxService -f +  ├─crond.service +  │ └─1011 /usr/sbin/crond -n +  ├─NetworkManager.service +  │ └─765 /usr/sbin/NetworkManager --no-daemon +  ├─switcheroo-control.service +  │ └─787 /usr/libexec/switcheroo-control + <SNIP> +``` + +This tree view shows all of the user and system slices and the services and programs running in each cgroup. Notice the units called "scopes," which group related programs into a management unit, within the `user-1000.slice` in the listing above. The `user-1000.slice/session-7.scope` cgroup contains the GUI desktop program hierarchy, starting with the LXDM display manager session and all of its subtasks, including things like the Bash shell and the Thunar GUI file manager. + +Scope units are not defined in configuration files but are generated programmatically as the result of starting groups of related programs. Scope units do not create or start the processes running as part of that cgroup. All processes within the scope are equal, and there is no internal hierarchy. The life of a scope begins when the first process is created and ends when the last process is destroyed. + +Open several windows on your desktop, such as terminal emulators, LibreOffice, or whatever you want, then switch to an available virtual console and start something like `top` or [Midnight Commander][11]. Run the `systemd-cgls` command on your host, and take note of the overall hierarchy and the scope units. + +The `systemd-cgls` command provides a more complete representation of the cgroup hierarchy (and details of the units that make it up) than any other command I have found. I prefer its cleaner representation of the tree than what the `ps` command provides. + +### With a little help from my friends + +After covering these basics, I had planned to go into more detail about cgroups and how to use them, but I discovered a series of four excellent articles by Red Hat's [Steve Ovens][12] on Opensource.com's sister site [Enable Sysadmin][13]. Rather then basically rewriting Steve's articles, I decided it would be much better to take advantage of his cgroup expertise by linking to them: + + 1. [A Linux sysadmin's introduction to cgroups][14] + 2. [How to manage cgroups with CPUShares][15] + 3. [Managing cgroups the hard way—manually][16] + 4. [Managing cgroups with systemd][17] + + + +Enjoy and learn from them, as I did. + +### Other resources + +There is a great deal of information about systemd available on the internet, but much is terse, obtuse, or even misleading. In addition to the resources mentioned in this article, the following webpages offer more detailed and reliable information about systemd startup. This list has grown since I started this series of articles to reflect the research I have done. + + * The Fedora Project has a good, practical [guide][18] [to systemd][18]. It has pretty much everything you need to know in order to configure, manage, and maintain a Fedora computer using systemd. + * The Fedora Project also has a good [cheat sheet][19] that cross-references the old SystemV commands to comparable systemd ones. + * The [systemd.unit(5) manual page][20] contains a nice list of unit file sections and their configuration options along with concise descriptions of each. + * Red Hat documentation contains a good description of the [Unit file structure][21] as well as other important information. + * For detailed technical information about systemd and the reasons for creating it, check out Freedesktop.org's [description of systemd][22]. This page is one of the best I have found because it contains many links to other important and accurate documentation. + * Linux.com's "More systemd fun" offers more advanced systemd [information and tips][23]. + * See the man page for [systemd.resource-control(5)][24]. + * In [_The Linux kernel user's and administrator's guide_][25], see the [Control Group v2][26] entry. + + + +There is also a series of deeply technical articles for Linux sysadmins by Lennart Poettering, the designer and primary developer of systemd. These articles were written between April 2010 and September 2011, but they are just as relevant now as they were then. Much of everything else good that has been written about systemd and its ecosystem is based on these papers. + + * [Rethinking PID 1][27] + * [systemd for Administrators, Part I][28] + * [systemd for Administrators, Part II][29] + * [systemd for Administrators, Part III][30] + * [systemd for Administrators, Part IV][31] + * [systemd for Administrators, Part V][32] + * [systemd for Administrators, Part VI][33] + * [systemd for Administrators, Part VII][34] + * [systemd for Administrators, Part VIII][35] + * [systemd for Administrators, Part IX][36] + * [systemd for Administrators, Part X][37] + * [systemd for Administrators, Part XI][38] + + + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/10/cgroups + +作者:[David Both][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/dboth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/lenovo-thinkpad-laptop-concentration-focus-windows-office.png?itok=-8E2ihcF (Woman using laptop concentrating) +[2]: https://en.wikipedia.org/wiki/Top_(software) +[3]: https://opensource.com/article/19/11/monitoring-linux-glances +[4]: https://opensource.com/article/20/4/systemd +[5]: https://en.wikipedia.org/wiki/Cgroups +[6]: mailto:user@0.service +[7]: mailto:user@1000.service +[8]: mailto:1.2-org.xfce.Xfconf@0.service +[9]: mailto:1.2-ca.desrt.dconf@0.service +[10]: mailto:1.10-org.freedesktop.problems@0.service +[11]: https://midnight-commander.org/ +[12]: https://www.redhat.com/sysadmin/users/steve-ovens +[13]: https://www.redhat.com/sysadmin/ +[14]: https://www.redhat.com/sysadmin/cgroups-part-one +[15]: https://www.redhat.com/sysadmin/cgroups-part-two +[16]: https://www.redhat.com/sysadmin/cgroups-part-three +[17]: https://www.redhat.com/sysadmin/cgroups-part-four +[18]: https://docs.fedoraproject.org/en-US/quick-docs/understanding-and-administering-systemd/index.html +[19]: https://fedoraproject.org/wiki/SysVinit_to_Systemd_Cheatsheet +[20]: https://man7.org/linux/man-pages/man5/systemd.unit.5.html +[21]: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/configuring_basic_system_settings/managing-services-with-systemd_configuring-basic-system-settings#Managing_Services_with_systemd-Unit_File_Structure +[22]: https://www.freedesktop.org/wiki/Software/systemd/ +[23]: https://www.linux.com/training-tutorials/more-systemd-fun-blame-game-and-stopping-services-prejudice/ +[24]: https://man7.org/linux/man-pages/man5/systemd.resource-control.5.html +[25]: https://www.kernel.org/doc/html/latest/admin-guide/index.html +[26]: https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html +[27]: http://0pointer.de/blog/projects/systemd.html +[28]: http://0pointer.de/blog/projects/systemd-for-admins-1.html +[29]: http://0pointer.de/blog/projects/systemd-for-admins-2.html +[30]: http://0pointer.de/blog/projects/systemd-for-admins-3.html +[31]: http://0pointer.de/blog/projects/systemd-for-admins-4.html +[32]: http://0pointer.de/blog/projects/three-levels-of-off.html +[33]: http://0pointer.de/blog/projects/changing-roots +[34]: http://0pointer.de/blog/projects/blame-game.html +[35]: http://0pointer.de/blog/projects/the-new-configuration-files.html +[36]: http://0pointer.de/blog/projects/on-etc-sysinit.html +[37]: http://0pointer.de/blog/projects/instances.html +[38]: http://0pointer.de/blog/projects/inetd.html From 6973e839acd5287f0218f8daefba357796f4a842 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 30 Oct 2020 08:43:08 +0800 Subject: [PATCH 018/130] translating --- ...201026 ninja- a simple way to do builds.md | 117 ------------------ ...201026 ninja- a simple way to do builds.md | 117 ++++++++++++++++++ 2 files changed, 117 insertions(+), 117 deletions(-) delete mode 100644 sources/tech/20201026 ninja- a simple way to do builds.md create mode 100644 translated/tech/20201026 ninja- a simple way to do builds.md diff --git a/sources/tech/20201026 ninja- a simple way to do builds.md b/sources/tech/20201026 ninja- a simple way to do builds.md deleted file mode 100644 index b56fbaf7e4..0000000000 --- a/sources/tech/20201026 ninja- a simple way to do builds.md +++ /dev/null @@ -1,117 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (ninja: a simple way to do builds) -[#]: via: (https://jvns.ca/blog/2020/10/26/ninja--a-simple-way-to-do-builds/) -[#]: author: (Julia Evans https://jvns.ca/) - -ninja: a simple way to do builds -====== - -Hello! Every so often I find a new piece of software I really like, and today I want to talk about one of my recent favourites: [ninja][1]! - -### incremental builds are useful - -I do a lot of small projects where I want to set up incremental builds – for example, right now I’m writing a zine about bash, and I have one `.svg` file for each page of the zine. I need to convert the SVGs to PDFs, and I’d been doing it something like this: - -``` -for i in *.svg -do - svg2pdf $i $i.pdf # or ${i/.svg/.pdf} if you want to get really fancy -done -``` - -This works fine, but my `svg2pdf` script is a little slow (it uses Inkscape), and it’s annoying to have to wait 90 seconds or whatever to rebuild all the PDFs when I’ve just updated 1 page. - -### build systems are confusing - -In the past I’ve been pretty put off by using a Build System like make or bazel for my small projects because bazel is this Big Complicated Thing and `make` feels a little arcane to me. I don’t really know how to use either of them. - -So for a long time I’ve just written a bash script or something for my builds and resigned myself to just waiting for a minute sometimes. - -### ninja is an EXTREMELY SIMPLE build system - -But ninja is not complicated! Here is literally everything I know about ninja build file syntax: how to create a `rule` and a `build`: - -a `rule` has a command and description (the description is just for humans to read so you can tell what it’s doing when it’s building your code) - -``` -rule svg2pdf - command = inkscape $in --export-text-to-path --export-pdf=$out - description = svg2pdf $in $out -``` - -the syntax for `build` is `build output_file: rule_name input_files`. Here’s one using the `svg2pdf` rule. The output goes in `$out` in the rule and the input goes in `$in`. - -``` -build pdfs/variables.pdf: svg2pdf variables.svg -``` - -That’s it! If you put those two things in a file called `build.ninja` and then run `ninja`, ninja will run `inkscape variables.svg --export-text-to-path --export-pdf=pdfs/variables.pdf`. And then if you run it again, it won’t run anything (because it can tell that you’ve already built `pdfs/variables.pdf` and you’re up to date) - -Ninja has a few more features than this (see [the manual][2]), but I haven’t used them yet. It was originally built [for Chromium][3], so even with a small feature set it can support large builds. - -### ninja files are usually automatically generated - -The magic of ninja is that instead of having to use some confusing Build Language that’s hard to remember because you use it so infrequently (like make), instead the ninja language is SUPER simple, and if you want to do something complicated then you just generate the build file you want using any programming language you want. - -I like to make a `build.py` file or that looks something like this, that creates the ninja build file and then runs `ninja`: - -``` -with open('build.ninja', 'w') as ninja_file: - # write some rules - ninja_file.write(""" -rule svg2pdf - command = inkscape $in --export-text-to-path --export-pdf=$out - description = svg2pdf $in $out -""") - - # some for loop with every file I need to build - for filename in things_to_convert: - ninja_file.write(f""" -build {filename.replace('svg', 'pdf')}: svg2pdf {filename} -""") - -# run ninja -import subprocess -subprocess.check_call(['ninja']) -``` - -I’m sure there are a bunch of ninja best practices, but I don’t know them and for my small projects I find this works well. - -### meson is a build system that generates ninja files - -I don’t know too much about [Meson][4] yet, but recently I was building a C program ([plocate][5], a faster alternative to `locate`) and I noticed that instead of the usual `./configure; make; make install`, there were different build instructions: - -``` -meson builddir -cd builddir -ninja -``` - -It seems like Meson is a build system for C/C++/Java/Rust/Fortran that can use ninja as a backend. - -### that’s all! - -I’ve been using ninja for a few months now. I really like it and it’s caused me approximately 0 build-related headaches which feels pretty magical to me. - --------------------------------------------------------------------------------- - -via: https://jvns.ca/blog/2020/10/26/ninja--a-simple-way-to-do-builds/ - -作者:[Julia Evans][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://jvns.ca/ -[b]: https://github.com/lujun9972 -[1]: https://ninja-build.org/ -[2]: https://ninja-build.org/manual.html -[3]: http://neugierig.org/software/chromium/notes/2011/02/ninja.html -[4]: https://mesonbuild.com/Tutorial.html -[5]: https://blog.sesse.net/blog/tech/2020-09-28-00-37_introducing_plocate diff --git a/translated/tech/20201026 ninja- a simple way to do builds.md b/translated/tech/20201026 ninja- a simple way to do builds.md new file mode 100644 index 0000000000..dcfe386a3f --- /dev/null +++ b/translated/tech/20201026 ninja- a simple way to do builds.md @@ -0,0 +1,117 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (ninja: a simple way to do builds) +[#]: via: (https://jvns.ca/blog/2020/10/26/ninja--a-simple-way-to-do-builds/) +[#]: author: (Julia Evans https://jvns.ca/) + +ninja:一个简单的构建方式 +====== + +大家好!每隔一段时间,我就会发现一款我非常喜欢的新软件,今天我想说说我最近喜欢的一款软件:[ninja][1]! + +### 增量构建很有用 + +我做了很多小项目,在这些项目中,我想设置增量构建。例如,现在我正在写一本关于 bash 的杂志,杂志的每一页都有一个 `.svg`文件。我需要将 SVG 转换为 PDF,我的做法是这样的: + +``` +for i in *.svg +do + svg2pdf $i $i.pdf # or ${i/.svg/.pdf} if you want to get really fancy +done +``` + +这很好用,但是我的 `svg2pdf` 脚本有点慢(它使用 Inkscape),而且当我刚刚只更新了一页的时候,必须等待 90 秒或者其他什么时间来重建所有的 PDF 文件,这很烦人。 + +### 构建系统是让人困惑的 + +在过去,我对使用 make 或 bazel 这样的构建系统来做我的小项目一直很反感,因为 bazel 是个大而复杂的东西,而 `make` 对我来说感觉有点神秘。我真的不知道如何使用它们中的任何一个。 + +所以很长时间以来,我只是写了一个 bash 脚本或者其他的东西来进行构建,然后就认命了,有时候只能等一分钟。 + +### ninja 是一个非常简单的构建系统 + +但 ninja 并不复杂!以下是我所知道的关于 ninja 构建文件的语法:如何创建一个 `rule `和一个 `build`: + +`rule` 有一个命令和描述(描述只是给人看的,所以你可以知道它在构建你的代码时在做什么)。 + +``` +rule svg2pdf + command = inkscape $in --export-text-to-path --export-pdf=$out + description = svg2pdf $in $out +``` + +`build` 的语法是 `build output_file: rule_name input_files`。下面是一个使用 `svg2pdf` 规则的例子。输出在规则中的 `$out` 里,输入在 `$in` 里。 + +``` +build pdfs/variables.pdf: svg2pdf variables.svg +``` + +这就完成了!如果你把这两个东西放在一个叫 `build.ninja` 的文件里,然后运行 `ninja`,ninja 会运行 `inkscape variables.svg --export-text-to-path --export-pdf=pdfs/variables.pdf`。然后如果你再次运行它,它不会运行任何东西(因为它可以告诉你已经构建了 `pdfs/variables.pdf`,而且是最新的)。 + +Ninja 还有一些更多的功能(见[手册][2]),但我还没有用过。它最初是[为 Chromium][3] 构建的,所以即使只有一个小的功能集,它也能支持大型构建。 + +### ninja 文件通常是自动生成的 + +ninja 的神奇之处在于,你不必使用一些混乱的构建语言,它们很难记住(比如 make),因为你不经常使用它,相反,ninja 语言超级简单,如果你想做一些复杂的事情,那么你只需使用任意编程语言生成你想要的构建文件。 + +我喜欢写一个 `build.py` 文件,或者像这样的文件,创建 ninja 的构建文件,然后运行 `ninja`: + +``` +with open('build.ninja', 'w') as ninja_file: + # write some rules + ninja_file.write(""" +rule svg2pdf + command = inkscape $in --export-text-to-path --export-pdf=$out + description = svg2pdf $in $out +""") + + # some for loop with every file I need to build + for filename in things_to_convert: + ninja_file.write(f""" +build {filename.replace('svg', 'pdf')}: svg2pdf {filename} +""") + +# run ninja +import subprocess +subprocess.check_call(['ninja']) +``` + +我相信有一堆 ninja 的最佳实践,但我不知道。对于我的小项目而言,我发现它很好用。 + +### meson 是一个生成 ninja 文件的构建系统 + +我对 [Meson][4] 还不太了解,但最近我在构建一个 C 程序 ([plocate][5],一个比 `locate` 更快的替代方案)时,我注意到它有不同的构建说明,而不是通常的 `./configure; make; make install`: + +``` +meson builddir +cd builddir +ninja +``` + +好像 Meson 是一个 C/C++/Java/Rust/Fortran 的构建系统,可以用 ninja 作为后端。 + +### 就是这些! + +我使用 ninja 已经有几个月了。我真的很喜欢它,而且它几乎没有给我带来让人头疼的构建问题,这让我感觉非常神奇。 + +-------------------------------------------------------------------------------- + +via: https://jvns.ca/blog/2020/10/26/ninja--a-simple-way-to-do-builds/ + +作者:[Julia Evans][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://jvns.ca/ +[b]: https://github.com/lujun9972 +[1]: https://ninja-build.org/ +[2]: https://ninja-build.org/manual.html +[3]: http://neugierig.org/software/chromium/notes/2011/02/ninja.html +[4]: https://mesonbuild.com/Tutorial.html +[5]: https://blog.sesse.net/blog/tech/2020-09-28-00-37_introducing_plocate From 8b2bc8c5f789f4126fd80a229ec8711a30a891ca Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 30 Oct 2020 08:51:22 +0800 Subject: [PATCH 019/130] translating --- ...n in Ubuntu and Other Linux Distributions -Beginner-s Tip.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20201028 How to Clear Terminal Screen in Ubuntu and Other Linux Distributions -Beginner-s Tip.md b/sources/tech/20201028 How to Clear Terminal Screen in Ubuntu and Other Linux Distributions -Beginner-s Tip.md index 0925e8703e..3cbee66656 100644 --- a/sources/tech/20201028 How to Clear Terminal Screen in Ubuntu and Other Linux Distributions -Beginner-s Tip.md +++ b/sources/tech/20201028 How to Clear Terminal Screen in Ubuntu and Other Linux Distributions -Beginner-s Tip.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 5cb9788e7424bb7c5e31083a66f79eb353eb1a71 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 30 Oct 2020 11:23:57 +0800 Subject: [PATCH 020/130] PRF @chenmu-kk --- ...ution to open source- Making a decision.md | 33 ++++++++++--------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/translated/talk/20191105 My first contribution to open source- Making a decision.md b/translated/talk/20191105 My first contribution to open source- Making a decision.md index 38cd62ac87..142b42a18a 100644 --- a/translated/talk/20191105 My first contribution to open source- Making a decision.md +++ b/translated/talk/20191105 My first contribution to open source- Making a decision.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( chenmu-kk ) +[#]: translator: (chenmu-kk) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) @@ -9,33 +9,36 @@ 我的第一次开源贡献:做出决定 ====== -一位新的开源贡献者记录了她加入到开源项目后开始犯得五个错误。 -![Lightbulb][1] +> 一位新的开源贡献者告诉你如何加入到开源项目中。 -先前,我将大量的责任归咎于[冒充综合症][2]因为这延迟了我的第一个开源贡献。但还有一个我无法忽视的因素:我无法做决定来拯救我的生活。 在[成千上百万][3]的开源项目中抉择时,选择一个要做贡献的项目势不可挡。如此压迫以至于我常常不得不关掉我的笔记本去思考:“或许我可以改天再做一次”。 +![](https://img.linux.net.cn/data/attachment/album/202010/30/112350rh0xwp1x1y6awehn.jpg) -错误二是让我对做决定的恐惧妨碍了我做出第一次贡献。在理想世界里,也许我会带着一个我真正关心和想去做的特定项目开始我的开源之旅,但我有的只是总得为开源项目做出的贡献的模糊目标。对于那些处于同一处境的人来说,这儿有一些策略可以为自己的贡献挑选合适的项目(或者至少是一个好的项目)。 +先前,我把我的第一次开源贡献的拖延归咎于[冒牌综合症][2]。但还有一个我无法忽视的因素:我做出决定太艰难了。在[成千上百万][3]的开源项目中选择时,选择一个要做贡献的项目是难以抉择的。如此重负,以至于我常常不得不关掉我的笔记本去思考:“或许我改天再做吧”。 -### 我经常使用的工具 +错误之二是让我对做出决定的恐惧妨碍了我做出第一次贡献。在理想世界里,也许开始我的开源之旅时,心中就已经有了一个真正关心和想去做的具体项目,但我有的只是总得为开源项目做出贡献的模糊目标。对于那些处于同一处境的人来说,这儿有一些帮助我挑选出合适的项目(或者至少是一个好的项目)来做贡献的策略。 -一开始,我不认为有必要将自己局限于已经熟悉的工具或项目。有一些我之前从未使用过,但由于他们活跃的社区,或者他们解决了有趣的问题,因此看起来很有吸引力。 +### 经常使用的工具 -但是,考虑我投入到这个项目中的时间有限,我决定继续使用我了解的工具。要了解工具需求,你需要熟悉它的工作方式。如果您想为自己不熟悉的项目做贡献,则需要完成一个额外的步骤来了解代码的功能和目标。这个额外的工作量是有趣且值得的,但也会使你的工作时间加倍。因为我的目标主要是贡献,坚持我所知道的是缩小范围一个很好的方式。回馈一个你认为有用的项目也是一种回报。 +一开始,我不认为有必要将自己局限于已经熟悉的工具或项目。有一些项目我之前从未使用过,但由于它们的社区很活跃,或者它们解决的问题很有趣,因此看起来很有吸引力。 -### 我经常使用的工具 +但是,考虑我投入到这个项目中的时间有限,我决定继续投入到我了解的工具上去。要了解工具需求,你需要熟悉它的工作方式。如果你想为自己不熟悉的项目做贡献,则需要完成一个额外的步骤来了解代码的功能和目标。这个额外的工作量可能是有趣且值得的,但也会使你的工作时间加倍。因为我的目标主要是贡献,投入到我了解的工具上是缩小范围的很好方式。回馈一个你认为有用的项目也是有意义的。 -一开始,我不认为有必要将自己局限于已经熟悉的工具或项目。有一些我之前从未使用过,但由于他们活跃的社区,或者他们解决了有趣的问题,因此看起来很有吸引力。 +### 活跃而友好的社区 -但是,考虑我投入到这个项目中的时间有限,我决定继续使用我了解的工具。要了解工具需求,你需要熟悉它的工作方式。如果您想为自己不熟悉的项目做贡献,则需要完成一个额外的步骤来了解代码的功能和目标。这个额外的工作量是有趣且值得的,但也会使你的工作时间加倍。因为我的目标主要是贡献,坚持我所知道的是缩小范围一个很好的方式。回馈一个你认为有用的项目也是一种回报。 +在选择项目的时候,我希望在那里有人会审查我写的代码才会觉得有信心。当然,我也希望审核我代码的人是个和善的人。毕竟,把你的作品放在那里接受公众监督是很可怕的。虽然我对建设性的反馈持开放态度,但开发者社区中的一些有毒角落是我希望避免的。 -因为这是我第一次为开源项目做出贡献,在此过程中我有很多问题。一些项目社区非常擅长记录选择问题和提出请求的程序。一些项目社区在记录流程方面很优秀,可以用来挑选其中的项目并提交请求。尽管那时我没有选择它们,因为在此之前我从未使用过该产品,[Gatsby][4]是该实践的一个范例。 +为了评估我将要加入的社区,我查看了我正在考虑加入的仓库的议题issue部分。我要查看核心团队中是否有人定期回复。更重要的是,我试着确保没有人在评论中互相诋毁(这在议题讨论中是很常见的)。我还留意了那些有行为准则的项目,概述了什么是适当的和不适当的在线互动行为。 -这种细致的文件帮助我们缓解一些不知如何去做的不安全感。它也给了我希望,项目是开放给新的贡献者,并将花时间来查看我的工作。除了贡献准则外,我还查看了问题部分,看看这个项目是否利用了“好的第一个问题”标志。这是该项目对初学者开放的另一个标志(并帮助你学会如何操作)。 +### 明确的贡献准则 + +因为这是我第一次为开源项目做出贡献,在此过程中我有很多问题。一些项目社区在流程的文档记录方面做的很好,可以用来指导挑选其中的议题并发起拉取请求。 [Gatsby][4] 是这种做法的典范,尽管那时我没有选择它们,因为在此之前我从未使用过该产品。 + +这种清晰的文档帮助我们缓解了一些不知如何去做的不安全感。它也给了我希望:项目对新的贡献者是开放的,并且会花时间来查看我的工作。除了贡献准则外,我还查看了议题部分,看看这个项目是否使用了“第一个好议题good first issue”标志。这是该项目对初学者开放的另一个迹象(并可以帮助你学会要做什么)。 ### 总结 -如果你还没有计划好一个项目,那么选择合适的领域进行您的第一个开源贡献已势不可挡。列出一系列标准可以帮助自己缩减选择范围,并为自己的首次提交找到一个好的项目。 +如果你还没有计划好选择一个项目,那么选择合适的领域进行你的第一个开源贡献更加可行。列出一系列标准可以帮助自己缩减选择范围,并为自己的第一个拉取请求找到一个好的项目。 -------------------------------------------------------------------------------- @@ -44,7 +47,7 @@ via: https://opensource.com/article/19/11/my-first-open-source-contribution-mist 作者:[Galen Corey][a] 选题:[lujun9972][b] 译者:[chenmu-kk](https://github.com/chenmu-kk) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 4f32c3849528c76667ead8ffba39bf379b789c41 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 30 Oct 2020 11:24:32 +0800 Subject: [PATCH 021/130] PUB @chenmu-kk https://linux.cn/article-12768-1.html --- ... first contribution to open source- Making a decision.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename {translated/talk => published}/20191105 My first contribution to open source- Making a decision.md (98%) diff --git a/translated/talk/20191105 My first contribution to open source- Making a decision.md b/published/20191105 My first contribution to open source- Making a decision.md similarity index 98% rename from translated/talk/20191105 My first contribution to open source- Making a decision.md rename to published/20191105 My first contribution to open source- Making a decision.md index 142b42a18a..a8863ea7ff 100644 --- a/translated/talk/20191105 My first contribution to open source- Making a decision.md +++ b/published/20191105 My first contribution to open source- Making a decision.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (chenmu-kk) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12768-1.html) [#]: subject: (My first contribution to open source: Making a decision) [#]: via: (https://opensource.com/article/19/11/my-first-open-source-contribution-mistake-decisions) [#]: author: (Galen Corey https://opensource.com/users/galenemco) From 400e53def5ad5e61809d2775f6b09c3448cf7bbf Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 30 Oct 2020 12:21:44 +0800 Subject: [PATCH 022/130] PRF @geekpi --- ...ny computer with this bootable USB tool.md | 49 +++++++++---------- 1 file changed, 23 insertions(+), 26 deletions(-) diff --git a/translated/tech/20201014 Try Linux on any computer with this bootable USB tool.md b/translated/tech/20201014 Try Linux on any computer with this bootable USB tool.md index 20029022bd..76bed944bf 100644 --- a/translated/tech/20201014 Try Linux on any computer with this bootable USB tool.md +++ b/translated/tech/20201014 Try Linux on any computer with this bootable USB tool.md @@ -1,75 +1,72 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Try Linux on any computer with this bootable USB tool) [#]: via: (https://opensource.com/article/20/10/fedora-media-writer) [#]: author: (Sumantro Mukherjee https://opensource.com/users/sumantro) -用这个可引导的 USB 工具在任何电脑上尝试 Linux +用这个创建可引导 USB 的工具在电脑上尝试 Linux ====== -Fedora Media Writer 是创建 Live USB 以尝试 Linux 的方便的方法。 -![Multiple USB plugs in different colors][1] -[Fedora Media Writer][2] 是一个小巧、轻量、全面的工具,它简化了 Linux 的入门体验。它将 Fedora Workstation 或 Server 下载并写入一个可以在任何系统上引导的 USB 驱动器,使你无需将其安装到硬盘上就可以试用 Fedora Linux。 +> Fedora Media Writer 是创建临场版 USB 以尝试 Linux 的方便方法。 -Media Writer 工具可以用来创建一个实时的、可引导的 USB。在你的平台上安装 Fedora Media Writer 应用后,你可以下载并烧录最新的 Fedora Workstation 或 Server 稳定版,也可以选择你下载的任何其他镜像。而且它并不局限于英特尔 64 位设备。它还可以用于 ARM 设备,[如树莓派][3],它们每天都在变得更加强大和有用。 +![](https://img.linux.net.cn/data/attachment/album/202010/30/122142c1cmcv7cxgjmw5vw.jpg) + +[Fedora Media Writer][2] 是一个小巧、轻量、全面的工具,它简化了 Linux 的入门体验。它可以下载 Fedora 的 Workstation 或 Server 版本并写入到一个可以在任何系统上引导的 USB 驱动器上,使你无需将其安装到硬盘上就可以试用 Fedora Linux。 + +Media Writer 工具可以用来创建一个临场体验的Live、可引导的 USB 驱动器。在你的平台上安装 Fedora Media Writer 应用后,你可以下载并烧录最新的 Fedora Workstation 或 Server 稳定版,也可以选择烧录你下载的任何其他镜像。而且它并不局限于英特尔 64 位设备。它还可以用于 ARM 设备,如[树莓派][3],这些设备日益变得更加强大和有用。 ![Fedora Media Writer main screen][4] -(Sumantro Mukherjee, [CC BY-SA 4.0][5]) - ### 安装 Fedora Media Writer -你有几种方式来[安装 Fedora Media Writer][6]。你可以在 GitHub 上[从源码编译][7]、下载 MacOS 或 Windows 版本、使用 **dnf** 或 **yum** 安装 RPM 包、或者以 Flatpak 的形式获得。 +[安装 Fedora Media Writer][6] 有几种方式。你可以通过 GitHub [从源码编译][7]、下载 MacOS 或 Windows 版本、使用 `dnf` 或 `yum` 安装 RPM 包,或者以 Flatpak 的形式获得。 在 Fedora 上: - ``` -`$ sudo dnf install mediawriter` +$ sudo dnf install mediawriter ``` 最新版本请参见 GitHub 仓库的[发布][8]部分。 -### 准备好你的媒体 +### 准备好你的媒体介质 -首先,你需要一个 USB 驱动器来安装你的 Linux 操作系统。这就是 Fedora Media Writer 要烧录的东西。这个驱动器必须是空白或可擦除的,因为 **USB 驱动器上的所有数据都会被删除**。如果有任何数据,哪怕只是一个文件,如果你不想丢失,那么你必须在继续之前备份它! +首先,你需要一个 USB 驱动器来安装你的 Linux 操作系统。这就是 Fedora Media Writer 要烧录的设备。这个驱动器必须是空白或可擦除的,因为 **该 USB 驱动器上的所有数据都会被删除**。如果有任何数据,哪怕只是一个文件,如果你不想丢失,那么你必须在继续之前备份它! -确认你的 U 盘是可擦除的后,将它插入你的电脑并启动 Fedora Media Writer。 +确认你的 USB 驱动器是可擦除的之后,将它插入你的电脑并启动 Fedora Media Writer。 ### 使用 Fedora Media Writer -当你启动 Fedora Media Writer 时,你会看到一个页面,提示你从互联网上获取一个可引导的镜像,或者从你的硬盘上加载一个自定义镜像。第一个选择是 Fedora 的最新版本。工作站版适用于台式机和笔记本电脑,服务器版适用于虚拟化、机架服务器或任何你想作为服务器运行的情况。 +当你启动 Fedora Media Writer 时,你会看到一个页面,提示你从互联网上获取一个可引导的镜像,或者从你的硬盘上加载一个自定义镜像。第一个选择是 Fedora 的最新版本。Workstation 版本适用于台式机和笔记本电脑,Server 版本适用于虚拟化、机架服务器或任何你想作为服务器运行的情况。 -如果你选择了 Fedora 镜像,Media Writer 会下载一个光盘镜像(通常称为 ”iso“,文件扩展名为 **.iso**),并将其保存到你的 `Downloads` 文件夹中,这样你就可以重复使用它来烧录另一个驱动器。 +如果你选择了 Fedora 镜像,Media Writer 会下载一个光盘镜像(通常称为 “iso”,文件扩展名为 .iso),并将其保存到你的下载文件夹中,这样你就可以重复使用它来烧录另一个驱动器。 ![Select your image][9] -另外还有 Fedora Spins,这是来自 Fedora 社区的镜像,它旨在满足小众的兴趣。例如,如果你是 [MATE 桌面][10]的粉丝,那么你会很高兴地发现 Media Writer 提供的 MATE ”spin“。它有很多选择,所以请滚动查看所有的。如果你是 Linux 的新手,不要被吓到或困惑:额外的选项是为长期用户准备的,这些用户除了默认的选项外,还发展出了自己的偏好,所以对你来说,只使用工作站或服务器选项是安全的,这取决于你是想把 Fedora 作为一个桌面还是作为一个服务器操作系统来运行。 +另外还有 Fedora Spins,这是来自 Fedora 社区的镜像,它旨在满足小众的兴趣。例如,如果你是 [MATE 桌面][10]的粉丝,那么你会很高兴地发现 Media Writer 提供了 MATE spin。它有很多,所以请滚动查看所有的选择。如果你是 Linux 的新手,不要被吓到或感到困惑:这些额外的选项是为老用户准备的,这些用户除了默认的选项外,还发展出了自己的偏好,所以对你来说,只使用 Workstation 或 Server 选项就行,这取决于你是想把 Fedora 作为一个桌面还是作为一个服务器操作系统来运行。 -如果你需要一个与你当前使用的 CPU 不同的镜像,从窗口右上角的下拉菜单中选择 CPU 架构。 +如果你需要一个与你当前使用的 CPU 不同架构的镜像,从窗口右上角的下拉菜单中选择 CPU 架构。 -如果你已经将镜像保存在硬盘上,请选择**自定义映像**选项,并选择你要烧录到 USB 的发行版的 **.iso** 文件。 +如果你已经将镜像保存在硬盘上,请选择“Custom Image”选项,并选择你要烧录到 USB 的发行版的 .iso 文件。 ### 写入 USB 驱动器 当你下载或选择了一个镜像,你必须确认你要将该镜像写入驱动器。 -驱动器选择下拉菜单只显示外部驱动器,所以你不会意外地覆盖自己的硬盘驱动器。这是 Fedora Media Writer 的一个重要功能,它比你在网上看到的许多手动说明要安全得多。然而,如果你的计算机上连接了多个外部驱动器,除了你想覆盖的那个,你应该将它们全部移除,以增加安全性。 +驱动器选择下拉菜单只显示了外部驱动器,所以你不会意外地覆盖自己的硬盘驱动器。这是 Fedora Media Writer 的一个重要功能,它比你在网上看到的许多手动说明要安全得多。然而,如果你的计算机上连接了多个外部驱动器,除了你想覆盖的那个,你应该将它们全部移除,以增加安全性。 -选择你要安装镜像的驱动器,然后单击**写入磁盘**按钮。 +选择你要安装镜像的驱动器,然后单击“Write to Disk”按钮。 ![Media write][11] -  - -等一会儿镜像被写入你的驱动器,然后查看 Don Watkins 对[如何从 USB 驱动器启动到 Linux][12]的出色概述 。 +稍等一会儿,镜像就会被写入到你的驱动器,然后可以看看 Don Watkins 对[如何从 USB 驱动器启动到 Linux][12]的出色介绍。 ### 开始使用 Linux -Fedora Media Writer 是一种将 Fedora Workstation 或 Server,或任何 Linux 发行版烧录到 USB 驱动器的方法,因此你可以在设备安装它之前试用它。试试吧,并在评论中分享你的经验和问题。 +Fedora Media Writer 是一种将 Fedora Workstation 或 Server,或任何 Linux 发行版烧录到 USB 驱动器的方法,因此你可以在安装它到设备上之前试用它。试试吧,并在评论中分享你的经验和问题。 -------------------------------------------------------------------------------- @@ -78,7 +75,7 @@ via: https://opensource.com/article/20/10/fedora-media-writer 作者:[Sumantro Mukherjee][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/) 荣誉推出 From bce93b2acffaad75fde5b694415dbc4a8a9cb540 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 30 Oct 2020 12:22:20 +0800 Subject: [PATCH 023/130] PUB @geekpi https://linux.cn/article-12769-1.html --- ...4 Try Linux on any computer with this bootable USB tool.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20201014 Try Linux on any computer with this bootable USB tool.md (98%) diff --git a/translated/tech/20201014 Try Linux on any computer with this bootable USB tool.md b/published/20201014 Try Linux on any computer with this bootable USB tool.md similarity index 98% rename from translated/tech/20201014 Try Linux on any computer with this bootable USB tool.md rename to published/20201014 Try Linux on any computer with this bootable USB tool.md index 76bed944bf..9e72c9dab8 100644 --- a/translated/tech/20201014 Try Linux on any computer with this bootable USB tool.md +++ b/published/20201014 Try Linux on any computer with this bootable USB tool.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12769-1.html) [#]: subject: (Try Linux on any computer with this bootable USB tool) [#]: via: (https://opensource.com/article/20/10/fedora-media-writer) [#]: author: (Sumantro Mukherjee https://opensource.com/users/sumantro) From d1e307ea6f1d0ca96debe838a2f59f7a811bff5e Mon Sep 17 00:00:00 2001 From: chenmu-kk <53132802+chenmu-kk@users.noreply.github.com> Date: Fri, 30 Oct 2020 14:03:43 +0800 Subject: [PATCH 024/130] Update 20190925 Most enterprise networks can-t handle big data loads.md --- ...0925 Most enterprise networks can-t handle big data loads.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/talk/20190925 Most enterprise networks can-t handle big data loads.md b/sources/talk/20190925 Most enterprise networks can-t handle big data loads.md index 191900c10a..725783e362 100644 --- a/sources/talk/20190925 Most enterprise networks can-t handle big data loads.md +++ b/sources/talk/20190925 Most enterprise networks can-t handle big data loads.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: ( chenmu-kk ) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From f2a23214366ca3838d6369f93aa0077bf2460150 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 31 Oct 2020 00:06:01 +0800 Subject: [PATCH 025/130] PRF @MjSeven --- ...nternet from the command line with curl.md | 68 +++++++++++-------- 1 file changed, 39 insertions(+), 29 deletions(-) diff --git a/translated/tech/20200521 Use the internet from the command line with curl.md b/translated/tech/20200521 Use the internet from the command line with curl.md index 156b195494..a64c3fbb3a 100644 --- a/translated/tech/20200521 Use the internet from the command line with curl.md +++ b/translated/tech/20200521 Use the internet from the command line with curl.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (MjSeven) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Use the internet from the command line with curl) @@ -9,19 +9,21 @@ 使用 curl 从命令行访问互联网 ====== -下载我们整理的 curl 备忘录。在不使用图形界面的情况下从互联网上获取所需的信息,curl 是一种快速有效的方法。 -![Cheat Sheet cover image][1] +> 下载我们整理的 curl 备忘录。要在不使用图形界面的情况下从互联网上获取所需的信息,curl 是一种快速有效的方法。 -Curl 通常被认为是非交互式 Web 浏览器,这意味着它能够从互联网上获取信息并在你的终端中显示或将其保存到文件中。从表面看,这是 Web 浏览器,例如 Firefox 或 Chromium 所做的工作,只是它们默认情况下会 _渲染_ 信息,而 curl 会下载并显示原始信息。实际上,curl 命令可以做更多的事情,并且能够使用多种协议与服务器进行双向传输数据,这些协议包括 HTTP、FTP、SFTP、IMAP、POP3、LDAP、SMB、SMTP 等。对于普通终端用户来说,这是一个有用的工具;而对于系统管理员,这非常便捷;对于微服务和云开发人员来说,它是质量保证的工具。 +![(https://img.linux.net.cn/data/attachment/album/202010/31/000543n032ud499yy4d94v.jpg) -Curl 被设计为在没有用户交互的情况下工作,因此与 Firefox 不同,你必须从头到尾考虑与在线数据的交互。例如,如果想要在 Firefox 中查看网页,你需要启动 Firefox 窗口。打开 Firefox 后,在地址栏或搜索引擎中输入要访问的网站。然后,导航到网站,然后单击要查看的页面。 +`curl` 通常被视作一款非交互式 Web 浏览器,这意味着它能够从互联网上获取信息,并在你的终端中显示,或将其保存到文件中。从表面看,这是 Web 浏览器,类似 Firefox 或 Chromium 所做的工作,只是它们默认情况下会*渲染*信息,而 `curl` 会下载并显示原始信息。实际上,`curl` 命令可以做更多的事情,并且能够使用多种协议与服务器进行双向传输数据,这些协议包括 HTTP、FTP、SFTP、IMAP、POP3、LDAP、SMB、SMTP 等。对于普通终端用户来说,这是一个有用的工具;而对于系统管理员,这非常便捷;对于微服务和云开发人员来说,它是一个质量保证工具。 -对于 curl 来说也是如此,不同之处在于你需要一次执行所有操作:在启动 curl 的同时提供需要访问的 Internet 位置,并告诉它是否要将数据保存在终端或文件中。当你必须与需要身份验证的网站或 API 进行交互时,会变得有点复杂,但是一旦你学习了 **curl** 命令语法,它就会成为你的第二天性。为了帮助你掌握它,我们在一个方便的[备忘录][2]中收集了相关的语法信息。 +`curl` 被设计为在没有用户交互的情况下工作,因此与 Firefox 不同,你必须从头到尾考虑与在线数据的交互。例如,如果想要在 Firefox 中查看网页,你需要启动 Firefox 窗口。打开 Firefox 后,在地址栏或搜索引擎中输入要访问的网站。然后,导航到网站,然后单击要查看的页面。 + +对于 `curl` 来说也是如此,不同之处在于你需要一次执行所有操作:在启动 `curl` 的同时提供需要访问的互联网地址,并告诉它是否要将数据保存在终端或文件中。当你必须与需要身份验证的网站或 API 进行交互时,会变得有点复杂,但是一旦你学习了 `curl` 命令语法,它就会变得自然而然。为了帮助你掌握它,我们在一个方便的[备忘录][2]中收集了相关的语法信息。 ### 使用 curl 下载文件 -你可以通过提供指向特定 URL 的链接来使用 **curl** 命令下载文件。如果你提供的 URL 默认为 **index.html**,那么将下载此页面,并将下载的文件显示在终端屏幕上。你可以将数据通过管道传递到 less、tail 或任何其它命令: +你可以通过提供指向特定 URL 的链接来使用 `curl` 命令下载文件。如果你提供的 URL 默认为 `index.html`,那么将下载此页面,并将下载的文件显示在终端屏幕上。你可以将数据通过管道传递到 `less`、`tail` 或任何其它命令: + ``` $ curl "http://example.com" | tail -n 4

Example Domain

@@ -30,16 +32,17 @@ $ curl "http://example.com" | tail -n 4 ``` -由于某些 URL 包含特殊字符,shell 通常会将其解释,因此用引号将 URL 包起来是最安全的。 +由于某些 URL 包含特殊字符,shell 通常会将其解释,因此最安全的做法用引号将 URL 包起来。 + +某些文件无法很好的在终端中转换显示。你可以使用 `--remote-name` 选项使文件根据服务器上的命名进行保存: -某些文件在终端中无法很好的转换显示。你可以使用 **\--remote-name** 选项使文件根据服务器上的命名进行保存: ``` -$ curl --remote-name "" +$ curl --remote-name "https://example.com/linux-distro.iso" $ ls linux-distro.iso ``` -或者,你可以使用 **\--output** 选项来命名你想要下载的内容: +或者,你可以使用 `--output` 选项来命名你想要下载的内容: ``` curl "http://example.com/foo.html" --output bar.html @@ -47,35 +50,38 @@ curl "http://example.com/foo.html" --output bar.html ### 使用 curl 列出带有远程目录的内容 -因为 curl 不是交互式的,所以很难浏览页面上的可下载元素。如果你要连接的远程服务器允许,可以使用 **curl** 来列出目录的内容: +因为 `curl` 不是交互式的,所以很难浏览页面上的可下载元素。如果你要连接的远程服务器允许,可以使用 `curl` 来列出目录的内容: + ``` $ curl --list-only "https://example.com/foo/" ``` ### 继续中断下载 -如果你正在下载一个非常大的文件,你可能会发现有时候必须中断下载。Curl 非常智能,可以确定下载从何处中断并继续下载。这意味着,下一次当你下载一个 4GB 的 Linux 发行版 ISO 出现问题时,就不必重新开始了。**\--continue-at** 的语法有点不寻常:如果你知道下载中断时的字节数,你可以提供给 curl;否则,你可以使用单独的一个破折号(**-**)指示 curl 自动检测: +如果你正在下载一个非常大的文件,你可能会发现有时候必须中断下载。`curl` 非常智能,可以确定下载从何处中断并继续下载。这意味着,下一次当你下载一个 4GB 的 Linux 发行版的 ISO 出现问题时,就不必重新开始了。`--continue-at` 的语法有点不寻常:如果你知道下载中断时的字节数,你可以提供给 `curl`;否则,你可以使用单独的一个破折号(`-`)指示 curl 自动检测: + ``` $ curl --remote-name --continue-at - "https://example.com/linux-distro.iso" ``` ### 下载文件序列 -如果你需要下载多个文件而不是一个大文件,那么 curl 可以帮助你解决这个问题。假设你知道要下载的文件的位置和文件名模式,则可以使用 curl 的排序标记:中括号中整数范围内的起点和终点。对于输出文件名,使用 **#1** 表示第一个变量: +如果你需要下载多个文件而不是一个大文件,那么 `curl` 可以帮助你解决这个问题。假设你知道要下载的文件的位置和文件名模式,则可以使用 `curl` 的序列标记:中括号里是整数范围的起点和终点。对于输出文件名,使用 `#1` 表示第一个变量: ``` $ curl "https://example.com/file_[1-4].webp" --output "file_#1.webp" ``` -如果你需要使用其它变量来表示另一个序列,按照每个变量在命令中出现的顺序表示它们。例如,在这个命令中,**#1** 指目录 **images_000** 到 **images_009**,而 **#2** 指目录 **file_1.webp** 至 **file_4.webp**。 +如果你需要使用其它变量来表示另一个序列,按照每个变量在命令中出现的顺序表示它们。例如,在这个命令中,`#1` 指目录 `images_000` 到 `images_009`,而 `#2` 指目录 `file_1.webp` 至 `file_4.webp`: + ``` -$ curl "" \ -\--output "file_#1-#2.webp" +$ curl "https://example.com/images_00[0-9]/file_[1-4].webp" --output "file_#1-#2.webp" ``` ### 从站点下载所有 PNG 文件 -你也可以仅使用 **curl** 和 **grep** 进行一些基本的 Web 抓取操作,以找到想要下载的内容。例如,假设你需要下载与正在归档网页关联的所有图像,首先,下载引用图像的页面。将页面内通过管道传输到 grep,搜索所需的图片类型(在此示例中为 PNG)。最后,创建一个 **while** 循环来构造下载 URL,并将文件保存到你的计算机: +你也可以仅使用 `curl` 和 `grep` 进行一些基本的 Web 抓取操作,以找到想要下载的内容。例如,假设你需要下载与正在归档网页关联的所有图像,首先,下载引用了图像的页面。将页面内通过管道传输到 `grep`,搜索所需的图片类型(在此示例中为 PNG)。最后,创建一个 `while` 循环来构造下载 URL,并将文件保存到你的计算机: + ``` $ curl https://example.com |\ grep --only-matching 'src="[^"]*.[png]"' |\ @@ -85,13 +91,14 @@ curl https://example.com/"${i}" -o "${i##*/}"; \ done ``` -这只是一个示例,但它展示了 curl 与 Unix 管道和一些基本巧妙的解析结合使用时是多么的灵活。 +这只是一个示例,但它展示了 `curl` 与 Unix 管道和一些基本而巧妙的解析结合使用时是多么的灵活。 ### 获取 HTML 头 用于数据交换的协议在计算机发送通信的数据包中嵌入了大量元数据。HTTP 头是数据初始部分的组件。在连接一个网站出现问题时,查看这些报文头(尤其是响应码)会有所帮助: + ``` -curl --head "" +curl --head "https://example.com" HTTP/2 200 accept-ranges: bytes age: 485487 @@ -110,19 +117,22 @@ content-length: 1256 响应 200 通常是 HTTP 成功指示符,这是你与服务器连接时通常期望的结果。著名的 404 响应表示找不到页面,而 500 则表示服务器在处理请求时出现了错误。 -要查看协商过程中发生了什么错误,添加 **\--shou-error** 选项: +要查看协商过程中发生了什么错误,添加 `--show-error` 选项: + ``` $ curl --head --show-error "http://opensource.ga" ``` -除非你可以访问要连接的服务器,否则这些问题将很难解决,但是 curl 通常会尽力连接你指定的地址。有时在网络上进行测试时,无休止的重试似乎只会浪费时间,因此你可以使用 **\--fail-early** 选项来强制 curl 在失败时迅速退出: +除非你可以访问要连接的服务器,否则这些问题将很难解决,但是 `curl` 通常会尽力连接你指定的地址。有时在网络上进行测试时,无休止的重试似乎只会浪费时间,因此你可以使用 `--fail-early` 选项来强制 `curl` 在失败时迅速退出: + ``` curl --fail-early "http://opensource.ga" ``` ### 由 3xx 响应指定的重定向查询 -300 这个系列的响应更加灵活。具体来说,301 响应意味着一个 URL 已被永久移动到其它位置。对于网站管理员来说,重新定位内容并留下“痕迹”是一种常见的方式,这样访问老地址的人们仍然可以找到它。默认情况下,Curl 不会进行 301 重定向,但你可以使用 **\--localtion** 选项使其继续进入 301 响应指向的目标: +300 这个系列的响应更加灵活。具体来说,301 响应意味着一个 URL 已被永久移动到其它位置。对于网站管理员来说,重新定位内容并留下“痕迹”是一种常见的方式,这样访问旧地址的人们仍然可以找到它。默认情况下,`curl` 不会进行 301 重定向,但你可以使用 `--localtion` 选项使其继续进入 301 响应指向的目标: + ``` $ curl "https://iana.org" | grep title 301 Moved Permanently @@ -132,15 +142,15 @@ $ curl --location "https://iana.org" ### 展开短网址 -如果你想要在访问短网址之前先查看它们,那么 **\--location** 选项非常有用。短网址对于有字符限制的社交网络(当然,如果你使用[现代和开源的社交网络][4]的话,这可能不是问题),或者对于用户不能复制粘贴长地址的打印媒体来说是有用处的。但是,它们也可能存在风险,因为其目的地址本质上是隐藏的。通过结合使用 **\--head** 选项仅查看 HTTP 头,**\--location** 选项可以查看一个 URL 的最终地址,你可以查看一个短网址而无需加载其完整的资源: +如果你想要在访问短网址之前先查看它们,那么 `--location` 选项非常有用。短网址对于有字符限制的社交网络(当然,如果你使用[现代和开源的社交网络][4]的话,这可能不是问题),或者对于用户不能复制粘贴长地址的印刷媒体来说是有用处的。但是,它们也可能存在风险,因为其目的地址本质上是隐藏的。通过结合使用 `--head` 选项仅查看 HTTP 头,`--location` 选项可以查看一个 URL 的最终地址,你可以查看一个短网址而无需加载其完整的资源: + ``` -$ curl --head --location \ -"" +$ curl --head --location "" ``` -### [下载我们的 curl 备忘录][2] +### 下载我们的 curl 备忘录 -一旦你开始考虑了将探索 web 由一条命令来完成,那么 curl 就成为一种快速有效的方式,可以从 Internet 上获取所需的信息,而无需麻烦图形界面。为了帮助你适应到工作流中,我们创建了一个 [curl 备忘录][2],它包含常见的 curl 用法和语法,包括使用它查询 API 的概述。 +一旦你开始考虑了将探索 web 由一条命令来完成,那么 `curl` 就成为一种快速有效的方式,可以从互联网上获取所需的信息,而无需麻烦图形界面。为了帮助你适应到工作流中,我们创建了一个 [curl 备忘录][2],它包含常见的 `curl` 用法和语法,包括使用它查询 API 的概述。 -------------------------------------------------------------------------------- @@ -149,7 +159,7 @@ via: https://opensource.com/article/20/5/curl-cheat-sheet 作者:[Seth Kenlon][a] 选题:[lujun9972][b] 译者:[MjSeven](https://github.com/MjSeven) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From dbff471b7f05b1ba26b6976c1727ae4c1d196638 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 31 Oct 2020 00:07:02 +0800 Subject: [PATCH 026/130] PUB @MjSeven https://linux.cn/article-12772-1.html --- ...0521 Use the internet from the command line with curl.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename {translated/tech => published}/20200521 Use the internet from the command line with curl.md (98%) diff --git a/translated/tech/20200521 Use the internet from the command line with curl.md b/published/20200521 Use the internet from the command line with curl.md similarity index 98% rename from translated/tech/20200521 Use the internet from the command line with curl.md rename to published/20200521 Use the internet from the command line with curl.md index a64c3fbb3a..9880cead4e 100644 --- a/translated/tech/20200521 Use the internet from the command line with curl.md +++ b/published/20200521 Use the internet from the command line with curl.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (MjSeven) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12772-1.html) [#]: subject: (Use the internet from the command line with curl) [#]: via: (https://opensource.com/article/20/5/curl-cheat-sheet) [#]: author: (Seth Kenlon https://opensource.com/users/seth) @@ -12,7 +12,7 @@ > 下载我们整理的 curl 备忘录。要在不使用图形界面的情况下从互联网上获取所需的信息,curl 是一种快速有效的方法。 -![(https://img.linux.net.cn/data/attachment/album/202010/31/000543n032ud499yy4d94v.jpg) +![](https://img.linux.net.cn/data/attachment/album/202010/31/000543n032ud499yy4d94v.jpg) `curl` 通常被视作一款非交互式 Web 浏览器,这意味着它能够从互联网上获取信息,并在你的终端中显示,或将其保存到文件中。从表面看,这是 Web 浏览器,类似 Firefox 或 Chromium 所做的工作,只是它们默认情况下会*渲染*信息,而 `curl` 会下载并显示原始信息。实际上,`curl` 命令可以做更多的事情,并且能够使用多种协议与服务器进行双向传输数据,这些协议包括 HTTP、FTP、SFTP、IMAP、POP3、LDAP、SMB、SMTP 等。对于普通终端用户来说,这是一个有用的工具;而对于系统管理员,这非常便捷;对于微服务和云开发人员来说,它是一个质量保证工具。 From f06e78cb394327482527b68e0d4ebf94f8602ee2 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 31 Oct 2020 12:51:41 +0800 Subject: [PATCH 027/130] PRF @wxy --- ... Jargon Buster- What is Display Manager in Linux.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/translated/tech/20201012 Linux Jargon Buster- What is Display Manager in Linux.md b/translated/tech/20201012 Linux Jargon Buster- What is Display Manager in Linux.md index 789d1aebe5..08e671a1fa 100644 --- a/translated/tech/20201012 Linux Jargon Buster- What is Display Manager in Linux.md +++ b/translated/tech/20201012 Linux Jargon Buster- What is Display Manager in Linux.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Linux Jargon Buster: What is Display Manager in Linux?) @@ -46,9 +46,9 @@ Linux 黑话解释:什么是显示管理器? 有这么多的桌面环境可供选择,它们都有自己的显示管理器吗?不,不是这样的。 -正如我之前提到的,可见的登录屏幕被称为欢迎页。这个欢迎页可以被自定义来改变登录屏幕的外观。 +正如我之前提到的,可见的登录屏幕被称为欢迎页。这个欢迎页可以进行自定义来改变登录屏幕的外观。 -事实上,许多发行版和/或桌面环境都编写了自己的欢迎页,以给用户提供一个类似于他们品牌的登录屏幕。 +事实上,许多发行版和/或桌面环境都制作了自己的欢迎页,以给用户提供一个类似于他们品牌的登录屏幕。 例如,Mint 的 Cinnamon 桌面使用了 LightDM,但有自己的欢迎页来给它更多的 Mint 式(或者我应该说是 Cinnamon)的外观。 @@ -66,7 +66,7 @@ Linux 黑话解释:什么是显示管理器? ![][12] -如果当时没有做切换,那么以后可以通过手动配置来改变显示管理器。不同的发行版重新配置显示管理器的方法略有不同,不在本文讨论范围内。 +如果当时没有做切换,那么以后可以通过手动配置来改变显示管理器。不同的发行版重新配置显示管理器的方法略有不同,这不在本文讨论范围内。 ### 结语 @@ -81,7 +81,7 @@ via: https://itsfoss.com/display-manager/ 作者:[Abhishek Prakash][a] 选题:[lujun9972][b] 译者:[wxy](https://github.com/wxy) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 7a6ce76b28ea80e10136927ee747a4796876e0a1 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 31 Oct 2020 12:53:49 +0800 Subject: [PATCH 028/130] PUB @wxy https://linux.cn/article-12773-1.html --- ...2 Linux Jargon Buster- What is Display Manager in Linux.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20201012 Linux Jargon Buster- What is Display Manager in Linux.md (98%) diff --git a/translated/tech/20201012 Linux Jargon Buster- What is Display Manager in Linux.md b/published/20201012 Linux Jargon Buster- What is Display Manager in Linux.md similarity index 98% rename from translated/tech/20201012 Linux Jargon Buster- What is Display Manager in Linux.md rename to published/20201012 Linux Jargon Buster- What is Display Manager in Linux.md index 08e671a1fa..efbd10a32d 100644 --- a/translated/tech/20201012 Linux Jargon Buster- What is Display Manager in Linux.md +++ b/published/20201012 Linux Jargon Buster- What is Display Manager in Linux.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12773-1.html) [#]: subject: (Linux Jargon Buster: What is Display Manager in Linux?) [#]: via: (https://itsfoss.com/display-manager/) [#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) From 8bc277ad22c2aa4c275332a35983818a53c26422 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 31 Oct 2020 13:00:45 +0800 Subject: [PATCH 029/130] PRF --- ...2 Linux Jargon Buster- What is Display Manager in Linux.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/published/20201012 Linux Jargon Buster- What is Display Manager in Linux.md b/published/20201012 Linux Jargon Buster- What is Display Manager in Linux.md index efbd10a32d..2aef0b010f 100644 --- a/published/20201012 Linux Jargon Buster- What is Display Manager in Linux.md +++ b/published/20201012 Linux Jargon Buster- What is Display Manager in Linux.md @@ -12,7 +12,7 @@ Linux 黑话解释:什么是显示管理器? > 在这篇 Linux 黑话解释中,你将了解 Linux 中的显示管理器。它是桌面环境的一部分吗?它的作用是什么? -### 在 Linux 中什么是显示管理器? +### 什么是 Linux 中的显示管理器? 简单来说,显示管理器display manager(DM)是一个为你的 Linux 发行版提供图形登录功能的程序。它控制用户会话并管理用户认证。显示管理器会在你输入用户名和密码后,立即启动[显示服务器][1]并加载[桌面环境][2]。 @@ -52,7 +52,7 @@ Linux 黑话解释:什么是显示管理器? 例如,Mint 的 Cinnamon 桌面使用了 LightDM,但有自己的欢迎页来给它更多的 Mint 式(或者我应该说是 Cinnamon)的外观。 -![基于 LightDM 的 Linux Mint 登录屏幕][9]。 +![基于 LightDM 的 Linux Mint 登录屏幕][9] 来看看 Kali Linux 的登录界面: From 648a1863314218e3b4f9ad067edf5dd8f97e146f Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 1 Nov 2020 10:06:42 +0800 Subject: [PATCH 030/130] PRF @geekpi --- ...nOffice and Support LibreOffice Instead.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/translated/tech/20201014 LibreOffice Wants Apache to Drop the Ailing OpenOffice and Support LibreOffice Instead.md b/translated/tech/20201014 LibreOffice Wants Apache to Drop the Ailing OpenOffice and Support LibreOffice Instead.md index 5620f99321..cbbbbbd46d 100644 --- a/translated/tech/20201014 LibreOffice Wants Apache to Drop the Ailing OpenOffice and Support LibreOffice Instead.md +++ b/translated/tech/20201014 LibreOffice Wants Apache to Drop the Ailing OpenOffice and Support LibreOffice Instead.md @@ -1,20 +1,20 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (LibreOffice Wants Apache to Drop the Ailing OpenOffice and Support LibreOffice Instead) [#]: via: (https://itsfoss.com/libreoffice-letter-openoffice/) [#]: author: (Ankush Das https://itsfoss.com/author/ankush/) -LibreOffice 希望 Apache 放弃陷入困境的 OpenOffice,转而支持 LibreOffice +文档基金会希望 Apache 放弃陷入困境的 OpenOffice,转而支持 LibreOffice ====== 对于 Linux 用户来说,当我们想到[微软 Office 的开源替代品][1]时,Apache OpenOffice 仍然是一个相关的推荐,这是不言而喻的。然而,在过去的几年里,OpenOffice 的发展几乎是停滞的。 -当然,考虑到 Abhishek 早在 2016年 就写过 [Apache OpenOffice 关闭的可能性][2],这并不令人震惊。 +当然,考虑到 Abhishek 早在 2016 年就写过 [Apache OpenOffice 关闭的可能性][2],这并不令人震惊。 -现在,在[文档基金会的公开信][3]中,他们呼吁 Apache OpenOffice 推荐用户开始使用更好的替代品,比如 LibreOffice。在本文中,我将提到文档基金会的博文中的一些重点,以及它对 Apache OpenOffice 的意义。 +现在,在一封[文档基金会的公开信][3]中,他们呼吁 Apache OpenOffice 推荐用户开始使用更好的替代品,比如 LibreOffice。在本文中,我将提到文档基金会的博文中的一些重点,以及它对 Apache OpenOffice 的意义。 ![][4] @@ -28,11 +28,11 @@ LibreOffice 希望 Apache 放弃陷入困境的 OpenOffice,转而支持 LibreO ![][5] -现在 OpenOffice 已经没有重大的开发了,Apache OpenOffice 的未来是什么?最大开源基金会一个有些活跃的项目没有重大发布? +现在 OpenOffice 已经没有重大的开发了,Apache OpenOffice 的未来是什么?一个相当活跃的项目,这个最大的开源基金会会不发布重大版本? 这听起来并不乐观,而这正是文档基金会在他们的公开信中所强调的: -> OpenOffice(.org),LibreOffice 的”父项目“,是一个伟大的办公套件,它改变了世界。它有着引人入胜的历史,但**自从 2014 年以来,Apache OpenOffice (它现在的家)还没有一个重大的版本**。没错,六年多来,没有重大的新功能或重大更新到来。很少有次要的发布,而且在及时的安全更新方面也存在问题。 +> OpenOffice(.org),是 LibreOffice 的”父项目“,它是一个伟大的办公套件,它改变了世界。它有着引人入胜的历史,但**自从 2014 年以来,Apache OpenOffice (它现在的家)还没有一个重大的版本**。没错,六年多来,没有重大的新功能或重大更新到来,也很少发布次要版本,而且在及时的安全更新方面也存在问题。 对于一个普通用户来说,如果他们不知道 [LibreOffice][6],我肯定希望他们知道。但是,Apache 基金会是否应该建议 OpenOffice 用户尝试使用 LibreOffice 来体验更好或更高级的办公套件呢? @@ -48,9 +48,9 @@ LibreOffice 希望 Apache 放弃陷入困境的 OpenOffice,转而支持 LibreO 如果 OpenOffice 能完成工作,用户可能不需要努力寻找替代品。那么,因为他们的缓慢开发而呼唤另一个项目,建议用户采用未来工具并推荐它是一个好主意么? -在争论中,有人可能会说,如果你已经完成了,并且对改进 OpenOffice 没有兴趣,那么推广你的竞争对手才是公平的。而且,这并没有错,开源社区应该一直合作,以确保新用户得到最好的选择。 +在争论中,有人可能会说,如果你已经完成了你的目标,并且对改进 OpenOffice 没有兴趣,那么推广你的竞争对手才是公平的。而且,这并没有错,开源社区应该一直合作,以确保新用户得到最好的选择。 -从另一个侧面来看,我们可以说,文档基金会对于 OpenOffice 在 2020 年即使没有任何重大改进却仍然有重要意义感到沮丧。 +从另一个侧面来看,我们可以说,文档基金会对于 OpenOffice 到了 2020 年即使没有任何重大改进却仍然有重要意义感到沮丧。 我不会去评判,但当我看了这封公开信时,这些矛盾的想法就浮现在我的脑海里。 @@ -67,7 +67,7 @@ via: https://itsfoss.com/libreoffice-letter-openoffice/ 作者:[Ankush Das][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -77,5 +77,5 @@ via: https://itsfoss.com/libreoffice-letter-openoffice/ [2]: https://itsfoss.com/openoffice-shutdown/ [3]: https://blog.documentfoundation.org/blog/2020/10/12/open-letter-to-apache-openoffice/ [4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/10/libre-office-open-office.png?resize=800%2C450&ssl=1 -[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/10/libre-office-open-office-derivatives.jpg?resize=800%2C166&ssl=1 +[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/10/libre-office-open-office-derivatives.jpg?resize=1536%2C319&ssl=1 [6]: https://itsfoss.com/libreoffice-tips/ From 7d1588a2d78de88a388a8c4cb06737e4f6bcc7db Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 1 Nov 2020 10:07:34 +0800 Subject: [PATCH 031/130] PUB @geekpi https://linux.cn/article-12775-1.html --- ...p the Ailing OpenOffice and Support LibreOffice Instead.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20201014 LibreOffice Wants Apache to Drop the Ailing OpenOffice and Support LibreOffice Instead.md (98%) diff --git a/translated/tech/20201014 LibreOffice Wants Apache to Drop the Ailing OpenOffice and Support LibreOffice Instead.md b/published/20201014 LibreOffice Wants Apache to Drop the Ailing OpenOffice and Support LibreOffice Instead.md similarity index 98% rename from translated/tech/20201014 LibreOffice Wants Apache to Drop the Ailing OpenOffice and Support LibreOffice Instead.md rename to published/20201014 LibreOffice Wants Apache to Drop the Ailing OpenOffice and Support LibreOffice Instead.md index cbbbbbd46d..216a944683 100644 --- a/translated/tech/20201014 LibreOffice Wants Apache to Drop the Ailing OpenOffice and Support LibreOffice Instead.md +++ b/published/20201014 LibreOffice Wants Apache to Drop the Ailing OpenOffice and Support LibreOffice Instead.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12775-1.html) [#]: subject: (LibreOffice Wants Apache to Drop the Ailing OpenOffice and Support LibreOffice Instead) [#]: via: (https://itsfoss.com/libreoffice-letter-openoffice/) [#]: author: (Ankush Das https://itsfoss.com/author/ankush/) From 48a73a57bbd143f3971ebfa0d06a27cdd7845487 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 1 Nov 2020 10:16:26 +0800 Subject: [PATCH 032/130] =?UTF-8?q?=E5=BD=92=E6=A1=A3=20202010?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{ => 202010}/20180414 Go on very small hardware Part 2.md | 0 .../{ => 202010}/20180710 Building a Messenger App- Messages.md | 0 .../20180710 Building a Messenger App- Realtime Messages.md | 0 .../20180712 Building a Messenger App- Development Login.md | 0 .../20180716 Building a Messenger App- Access Page.md | 0 .../{ => 202010}/20180719 Building a Messenger App- Home Page.md | 0 .../20180720 Building a Messenger App- Conversation Page.md | 0 ...20190102 Using Yarn on Ubuntu and Other Linux Distributions.md | 0 .../{ => 202010}/20190521 How to Disable IPv6 on Ubuntu Linux.md | 0 .../20190822 Things You Didn-t Know About GNU Readline.md | 0 ...105 My first contribution to open source- Making a decision.md | 0 .../{ => 202010}/20200512 Scan your Linux security with Lynis.md | 0 .../20200521 Use the internet from the command line with curl.md | 0 .../{ => 202010}/20200629 Using Bash traps in your scripts.md | 0 ...3 Automate testing for website errors with this Python tool.md | 0 ...0200810 How to read Lynis reports to improve Linux security.md | 0 .../20200811 TCP window scaling, timestamps and SACK.md | 0 .../20200820 Learn the basics of programming with C.md | 0 .../20200826 What is IPv6, and why aren-t we there yet.md | 0 .../{ => 202010}/20200901 Create a mobile app with Flutter.md | 0 .../{ => 202010}/20200903 A practical guide to learning awk.md | 0 .../{ => 202010}/20200908 How to install software with Ansible.md | 0 ...container orchestration with Ansible modules for Kubernetes.md | 0 .../20200914 NFC vs. Bluetooth LE- When to use which.md | 0 ...o Create-Configure LVM (Logical Volume Management) in Linux.md | 0 ...pp Grid, Performance Improvements and Tons of Other Changes.md | 0 ...w to Extend-Increase LVM-s (Logical Volume Resize) in Linux.md | 0 .../20200921 Installing and running Vagrant using qemu-kvm.md | 0 ...How to Reduce-Shrink LVM-s (Logical Volume Resize) in Linux.md | 0 .../20200923 Find security issues in Go code using gosec.md | 0 ...uestions to ask yourself when writing project documentation.md | 0 ...te Generators to Create Fast and Resource-Friendly Websites.md | 0 ...s FOSS (Free and Open Source Software)- What is Open Source.md | 0 published/{ => 202010}/20200928 Create template files in GNOME.md | 0 ...r (to Find and Kill RAM and CPU Eating Tabs and Extensions).md | 0 ...928 How to view information on your Linux devices with lshw.md | 0 ...ng is an Open Source MS-Paint Type of App for Linux Desktop.md | 0 ...resent Slides in Linux Terminal With This Nifty Python Tool.md | 0 .../20200930 Recovering deleted files on Linux with testdisk.md | 0 ...uster- What is a Package Manager in Linux- How Does it Work.md | 0 ...your web experience with this internet protocol alternative.md | 0 ...rate your calendar with Ansible to avoid schedule conflicts.md | 0 .../20201009 How to Install Deepin Desktop on Ubuntu 20.04 LTS.md | 0 ...09 How to Remove Physical Volume from a Volume Group in LVM.md | 0 ...010 6 Essential Things To Do After Installing Manjaro Linux.md | 0 ... Microsoft be en route to dumping Windows in favor of Linux.md | 0 ...01012 Linux Jargon Buster- What is Display Manager in Linux.md | 0 .../{ => 202010}/20201013 Install MariaDB or MySQL on Linux.md | 0 .../20201014 2 Ways to Download Files From Linux Terminal.md | 0 ...layer is a Desktop App for Various Streaming Music Services.md | 0 ...01014 Try Linux on any computer with this bootable USB tool.md | 0 published/{ => 202010}/20201016 Set up ZFS on Linux with yum.md | 0 published/{ => 202010}/20201027 Fedora 33 is officially here.md | 0 53 files changed, 0 insertions(+), 0 deletions(-) rename published/{ => 202010}/20180414 Go on very small hardware Part 2.md (100%) rename published/{ => 202010}/20180710 Building a Messenger App- Messages.md (100%) rename published/{ => 202010}/20180710 Building a Messenger App- Realtime Messages.md (100%) rename published/{ => 202010}/20180712 Building a Messenger App- Development Login.md (100%) rename published/{ => 202010}/20180716 Building a Messenger App- Access Page.md (100%) rename published/{ => 202010}/20180719 Building a Messenger App- Home Page.md (100%) rename published/{ => 202010}/20180720 Building a Messenger App- Conversation Page.md (100%) rename published/{ => 202010}/20190102 Using Yarn on Ubuntu and Other Linux Distributions.md (100%) rename published/{ => 202010}/20190521 How to Disable IPv6 on Ubuntu Linux.md (100%) rename published/{ => 202010}/20190822 Things You Didn-t Know About GNU Readline.md (100%) rename published/{ => 202010}/20191105 My first contribution to open source- Making a decision.md (100%) rename published/{ => 202010}/20200512 Scan your Linux security with Lynis.md (100%) rename published/{ => 202010}/20200521 Use the internet from the command line with curl.md (100%) rename published/{ => 202010}/20200629 Using Bash traps in your scripts.md (100%) rename published/{ => 202010}/20200723 Automate testing for website errors with this Python tool.md (100%) rename published/{ => 202010}/20200810 How to read Lynis reports to improve Linux security.md (100%) rename published/{ => 202010}/20200811 TCP window scaling, timestamps and SACK.md (100%) rename published/{ => 202010}/20200820 Learn the basics of programming with C.md (100%) rename published/{ => 202010}/20200826 What is IPv6, and why aren-t we there yet.md (100%) rename published/{ => 202010}/20200901 Create a mobile app with Flutter.md (100%) rename published/{ => 202010}/20200903 A practical guide to learning awk.md (100%) rename published/{ => 202010}/20200908 How to install software with Ansible.md (100%) rename published/{ => 202010}/20200910 Automate your container orchestration with Ansible modules for Kubernetes.md (100%) rename published/{ => 202010}/20200914 NFC vs. Bluetooth LE- When to use which.md (100%) rename published/{ => 202010}/20200916 How to Create-Configure LVM (Logical Volume Management) in Linux.md (100%) rename published/{ => 202010}/20200917 GNOME 3.38 is Here With Customizable App Grid, Performance Improvements and Tons of Other Changes.md (100%) rename published/{ => 202010}/20200918 How to Extend-Increase LVM-s (Logical Volume Resize) in Linux.md (100%) rename published/{ => 202010}/20200921 Installing and running Vagrant using qemu-kvm.md (100%) rename published/{ => 202010}/20200922 How to Reduce-Shrink LVM-s (Logical Volume Resize) in Linux.md (100%) rename published/{ => 202010}/20200923 Find security issues in Go code using gosec.md (100%) rename published/{ => 202010}/20200925 5 questions to ask yourself when writing project documentation.md (100%) rename published/{ => 202010}/20200926 10 Open Source Static Site Generators to Create Fast and Resource-Friendly Websites.md (100%) rename published/{ => 202010}/20200926 Linux Jargon Buster- What is FOSS (Free and Open Source Software)- What is Open Source.md (100%) rename published/{ => 202010}/20200928 Create template files in GNOME.md (100%) rename published/{ => 202010}/20200928 How to Use the Firefox Task Manager (to Find and Kill RAM and CPU Eating Tabs and Extensions).md (100%) rename published/{ => 202010}/20200928 How to view information on your Linux devices with lshw.md (100%) rename published/{ => 202010}/20200929 Drawing is an Open Source MS-Paint Type of App for Linux Desktop.md (100%) rename published/{ => 202010}/20200930 Present Slides in Linux Terminal With This Nifty Python Tool.md (100%) rename published/{ => 202010}/20200930 Recovering deleted files on Linux with testdisk.md (100%) rename published/{ => 202010}/20201005 Linux Jargon Buster- What is a Package Manager in Linux- How Does it Work.md (100%) rename published/{ => 202010}/20201006 Simplify your web experience with this internet protocol alternative.md (100%) rename published/{ => 202010}/20201008 Integrate your calendar with Ansible to avoid schedule conflicts.md (100%) rename published/{ => 202010}/20201009 How to Install Deepin Desktop on Ubuntu 20.04 LTS.md (100%) rename published/{ => 202010}/20201009 How to Remove Physical Volume from a Volume Group in LVM.md (100%) rename published/{ => 202010}/20201010 6 Essential Things To Do After Installing Manjaro Linux.md (100%) rename published/{ => 202010}/20201012 Could Microsoft be en route to dumping Windows in favor of Linux.md (100%) rename published/{ => 202010}/20201012 Linux Jargon Buster- What is Display Manager in Linux.md (100%) rename published/{ => 202010}/20201013 Install MariaDB or MySQL on Linux.md (100%) rename published/{ => 202010}/20201014 2 Ways to Download Files From Linux Terminal.md (100%) rename published/{ => 202010}/20201014 MellowPlayer is a Desktop App for Various Streaming Music Services.md (100%) rename published/{ => 202010}/20201014 Try Linux on any computer with this bootable USB tool.md (100%) rename published/{ => 202010}/20201016 Set up ZFS on Linux with yum.md (100%) rename published/{ => 202010}/20201027 Fedora 33 is officially here.md (100%) diff --git a/published/20180414 Go on very small hardware Part 2.md b/published/202010/20180414 Go on very small hardware Part 2.md similarity index 100% rename from published/20180414 Go on very small hardware Part 2.md rename to published/202010/20180414 Go on very small hardware Part 2.md diff --git a/published/20180710 Building a Messenger App- Messages.md b/published/202010/20180710 Building a Messenger App- Messages.md similarity index 100% rename from published/20180710 Building a Messenger App- Messages.md rename to published/202010/20180710 Building a Messenger App- Messages.md diff --git a/published/20180710 Building a Messenger App- Realtime Messages.md b/published/202010/20180710 Building a Messenger App- Realtime Messages.md similarity index 100% rename from published/20180710 Building a Messenger App- Realtime Messages.md rename to published/202010/20180710 Building a Messenger App- Realtime Messages.md diff --git a/published/20180712 Building a Messenger App- Development Login.md b/published/202010/20180712 Building a Messenger App- Development Login.md similarity index 100% rename from published/20180712 Building a Messenger App- Development Login.md rename to published/202010/20180712 Building a Messenger App- Development Login.md diff --git a/published/20180716 Building a Messenger App- Access Page.md b/published/202010/20180716 Building a Messenger App- Access Page.md similarity index 100% rename from published/20180716 Building a Messenger App- Access Page.md rename to published/202010/20180716 Building a Messenger App- Access Page.md diff --git a/published/20180719 Building a Messenger App- Home Page.md b/published/202010/20180719 Building a Messenger App- Home Page.md similarity index 100% rename from published/20180719 Building a Messenger App- Home Page.md rename to published/202010/20180719 Building a Messenger App- Home Page.md diff --git a/published/20180720 Building a Messenger App- Conversation Page.md b/published/202010/20180720 Building a Messenger App- Conversation Page.md similarity index 100% rename from published/20180720 Building a Messenger App- Conversation Page.md rename to published/202010/20180720 Building a Messenger App- Conversation Page.md diff --git a/published/20190102 Using Yarn on Ubuntu and Other Linux Distributions.md b/published/202010/20190102 Using Yarn on Ubuntu and Other Linux Distributions.md similarity index 100% rename from published/20190102 Using Yarn on Ubuntu and Other Linux Distributions.md rename to published/202010/20190102 Using Yarn on Ubuntu and Other Linux Distributions.md diff --git a/published/20190521 How to Disable IPv6 on Ubuntu Linux.md b/published/202010/20190521 How to Disable IPv6 on Ubuntu Linux.md similarity index 100% rename from published/20190521 How to Disable IPv6 on Ubuntu Linux.md rename to published/202010/20190521 How to Disable IPv6 on Ubuntu Linux.md diff --git a/published/20190822 Things You Didn-t Know About GNU Readline.md b/published/202010/20190822 Things You Didn-t Know About GNU Readline.md similarity index 100% rename from published/20190822 Things You Didn-t Know About GNU Readline.md rename to published/202010/20190822 Things You Didn-t Know About GNU Readline.md diff --git a/published/20191105 My first contribution to open source- Making a decision.md b/published/202010/20191105 My first contribution to open source- Making a decision.md similarity index 100% rename from published/20191105 My first contribution to open source- Making a decision.md rename to published/202010/20191105 My first contribution to open source- Making a decision.md diff --git a/published/20200512 Scan your Linux security with Lynis.md b/published/202010/20200512 Scan your Linux security with Lynis.md similarity index 100% rename from published/20200512 Scan your Linux security with Lynis.md rename to published/202010/20200512 Scan your Linux security with Lynis.md diff --git a/published/20200521 Use the internet from the command line with curl.md b/published/202010/20200521 Use the internet from the command line with curl.md similarity index 100% rename from published/20200521 Use the internet from the command line with curl.md rename to published/202010/20200521 Use the internet from the command line with curl.md diff --git a/published/20200629 Using Bash traps in your scripts.md b/published/202010/20200629 Using Bash traps in your scripts.md similarity index 100% rename from published/20200629 Using Bash traps in your scripts.md rename to published/202010/20200629 Using Bash traps in your scripts.md diff --git a/published/20200723 Automate testing for website errors with this Python tool.md b/published/202010/20200723 Automate testing for website errors with this Python tool.md similarity index 100% rename from published/20200723 Automate testing for website errors with this Python tool.md rename to published/202010/20200723 Automate testing for website errors with this Python tool.md diff --git a/published/20200810 How to read Lynis reports to improve Linux security.md b/published/202010/20200810 How to read Lynis reports to improve Linux security.md similarity index 100% rename from published/20200810 How to read Lynis reports to improve Linux security.md rename to published/202010/20200810 How to read Lynis reports to improve Linux security.md diff --git a/published/20200811 TCP window scaling, timestamps and SACK.md b/published/202010/20200811 TCP window scaling, timestamps and SACK.md similarity index 100% rename from published/20200811 TCP window scaling, timestamps and SACK.md rename to published/202010/20200811 TCP window scaling, timestamps and SACK.md diff --git a/published/20200820 Learn the basics of programming with C.md b/published/202010/20200820 Learn the basics of programming with C.md similarity index 100% rename from published/20200820 Learn the basics of programming with C.md rename to published/202010/20200820 Learn the basics of programming with C.md diff --git a/published/20200826 What is IPv6, and why aren-t we there yet.md b/published/202010/20200826 What is IPv6, and why aren-t we there yet.md similarity index 100% rename from published/20200826 What is IPv6, and why aren-t we there yet.md rename to published/202010/20200826 What is IPv6, and why aren-t we there yet.md diff --git a/published/20200901 Create a mobile app with Flutter.md b/published/202010/20200901 Create a mobile app with Flutter.md similarity index 100% rename from published/20200901 Create a mobile app with Flutter.md rename to published/202010/20200901 Create a mobile app with Flutter.md diff --git a/published/20200903 A practical guide to learning awk.md b/published/202010/20200903 A practical guide to learning awk.md similarity index 100% rename from published/20200903 A practical guide to learning awk.md rename to published/202010/20200903 A practical guide to learning awk.md diff --git a/published/20200908 How to install software with Ansible.md b/published/202010/20200908 How to install software with Ansible.md similarity index 100% rename from published/20200908 How to install software with Ansible.md rename to published/202010/20200908 How to install software with Ansible.md diff --git a/published/20200910 Automate your container orchestration with Ansible modules for Kubernetes.md b/published/202010/20200910 Automate your container orchestration with Ansible modules for Kubernetes.md similarity index 100% rename from published/20200910 Automate your container orchestration with Ansible modules for Kubernetes.md rename to published/202010/20200910 Automate your container orchestration with Ansible modules for Kubernetes.md diff --git a/published/20200914 NFC vs. Bluetooth LE- When to use which.md b/published/202010/20200914 NFC vs. Bluetooth LE- When to use which.md similarity index 100% rename from published/20200914 NFC vs. Bluetooth LE- When to use which.md rename to published/202010/20200914 NFC vs. Bluetooth LE- When to use which.md diff --git a/published/20200916 How to Create-Configure LVM (Logical Volume Management) in Linux.md b/published/202010/20200916 How to Create-Configure LVM (Logical Volume Management) in Linux.md similarity index 100% rename from published/20200916 How to Create-Configure LVM (Logical Volume Management) in Linux.md rename to published/202010/20200916 How to Create-Configure LVM (Logical Volume Management) in Linux.md diff --git a/published/20200917 GNOME 3.38 is Here With Customizable App Grid, Performance Improvements and Tons of Other Changes.md b/published/202010/20200917 GNOME 3.38 is Here With Customizable App Grid, Performance Improvements and Tons of Other Changes.md similarity index 100% rename from published/20200917 GNOME 3.38 is Here With Customizable App Grid, Performance Improvements and Tons of Other Changes.md rename to published/202010/20200917 GNOME 3.38 is Here With Customizable App Grid, Performance Improvements and Tons of Other Changes.md diff --git a/published/20200918 How to Extend-Increase LVM-s (Logical Volume Resize) in Linux.md b/published/202010/20200918 How to Extend-Increase LVM-s (Logical Volume Resize) in Linux.md similarity index 100% rename from published/20200918 How to Extend-Increase LVM-s (Logical Volume Resize) in Linux.md rename to published/202010/20200918 How to Extend-Increase LVM-s (Logical Volume Resize) in Linux.md diff --git a/published/20200921 Installing and running Vagrant using qemu-kvm.md b/published/202010/20200921 Installing and running Vagrant using qemu-kvm.md similarity index 100% rename from published/20200921 Installing and running Vagrant using qemu-kvm.md rename to published/202010/20200921 Installing and running Vagrant using qemu-kvm.md diff --git a/published/20200922 How to Reduce-Shrink LVM-s (Logical Volume Resize) in Linux.md b/published/202010/20200922 How to Reduce-Shrink LVM-s (Logical Volume Resize) in Linux.md similarity index 100% rename from published/20200922 How to Reduce-Shrink LVM-s (Logical Volume Resize) in Linux.md rename to published/202010/20200922 How to Reduce-Shrink LVM-s (Logical Volume Resize) in Linux.md diff --git a/published/20200923 Find security issues in Go code using gosec.md b/published/202010/20200923 Find security issues in Go code using gosec.md similarity index 100% rename from published/20200923 Find security issues in Go code using gosec.md rename to published/202010/20200923 Find security issues in Go code using gosec.md diff --git a/published/20200925 5 questions to ask yourself when writing project documentation.md b/published/202010/20200925 5 questions to ask yourself when writing project documentation.md similarity index 100% rename from published/20200925 5 questions to ask yourself when writing project documentation.md rename to published/202010/20200925 5 questions to ask yourself when writing project documentation.md diff --git a/published/20200926 10 Open Source Static Site Generators to Create Fast and Resource-Friendly Websites.md b/published/202010/20200926 10 Open Source Static Site Generators to Create Fast and Resource-Friendly Websites.md similarity index 100% rename from published/20200926 10 Open Source Static Site Generators to Create Fast and Resource-Friendly Websites.md rename to published/202010/20200926 10 Open Source Static Site Generators to Create Fast and Resource-Friendly Websites.md diff --git a/published/20200926 Linux Jargon Buster- What is FOSS (Free and Open Source Software)- What is Open Source.md b/published/202010/20200926 Linux Jargon Buster- What is FOSS (Free and Open Source Software)- What is Open Source.md similarity index 100% rename from published/20200926 Linux Jargon Buster- What is FOSS (Free and Open Source Software)- What is Open Source.md rename to published/202010/20200926 Linux Jargon Buster- What is FOSS (Free and Open Source Software)- What is Open Source.md diff --git a/published/20200928 Create template files in GNOME.md b/published/202010/20200928 Create template files in GNOME.md similarity index 100% rename from published/20200928 Create template files in GNOME.md rename to published/202010/20200928 Create template files in GNOME.md diff --git a/published/20200928 How to Use the Firefox Task Manager (to Find and Kill RAM and CPU Eating Tabs and Extensions).md b/published/202010/20200928 How to Use the Firefox Task Manager (to Find and Kill RAM and CPU Eating Tabs and Extensions).md similarity index 100% rename from published/20200928 How to Use the Firefox Task Manager (to Find and Kill RAM and CPU Eating Tabs and Extensions).md rename to published/202010/20200928 How to Use the Firefox Task Manager (to Find and Kill RAM and CPU Eating Tabs and Extensions).md diff --git a/published/20200928 How to view information on your Linux devices with lshw.md b/published/202010/20200928 How to view information on your Linux devices with lshw.md similarity index 100% rename from published/20200928 How to view information on your Linux devices with lshw.md rename to published/202010/20200928 How to view information on your Linux devices with lshw.md diff --git a/published/20200929 Drawing is an Open Source MS-Paint Type of App for Linux Desktop.md b/published/202010/20200929 Drawing is an Open Source MS-Paint Type of App for Linux Desktop.md similarity index 100% rename from published/20200929 Drawing is an Open Source MS-Paint Type of App for Linux Desktop.md rename to published/202010/20200929 Drawing is an Open Source MS-Paint Type of App for Linux Desktop.md diff --git a/published/20200930 Present Slides in Linux Terminal With This Nifty Python Tool.md b/published/202010/20200930 Present Slides in Linux Terminal With This Nifty Python Tool.md similarity index 100% rename from published/20200930 Present Slides in Linux Terminal With This Nifty Python Tool.md rename to published/202010/20200930 Present Slides in Linux Terminal With This Nifty Python Tool.md diff --git a/published/20200930 Recovering deleted files on Linux with testdisk.md b/published/202010/20200930 Recovering deleted files on Linux with testdisk.md similarity index 100% rename from published/20200930 Recovering deleted files on Linux with testdisk.md rename to published/202010/20200930 Recovering deleted files on Linux with testdisk.md diff --git a/published/20201005 Linux Jargon Buster- What is a Package Manager in Linux- How Does it Work.md b/published/202010/20201005 Linux Jargon Buster- What is a Package Manager in Linux- How Does it Work.md similarity index 100% rename from published/20201005 Linux Jargon Buster- What is a Package Manager in Linux- How Does it Work.md rename to published/202010/20201005 Linux Jargon Buster- What is a Package Manager in Linux- How Does it Work.md diff --git a/published/20201006 Simplify your web experience with this internet protocol alternative.md b/published/202010/20201006 Simplify your web experience with this internet protocol alternative.md similarity index 100% rename from published/20201006 Simplify your web experience with this internet protocol alternative.md rename to published/202010/20201006 Simplify your web experience with this internet protocol alternative.md diff --git a/published/20201008 Integrate your calendar with Ansible to avoid schedule conflicts.md b/published/202010/20201008 Integrate your calendar with Ansible to avoid schedule conflicts.md similarity index 100% rename from published/20201008 Integrate your calendar with Ansible to avoid schedule conflicts.md rename to published/202010/20201008 Integrate your calendar with Ansible to avoid schedule conflicts.md diff --git a/published/20201009 How to Install Deepin Desktop on Ubuntu 20.04 LTS.md b/published/202010/20201009 How to Install Deepin Desktop on Ubuntu 20.04 LTS.md similarity index 100% rename from published/20201009 How to Install Deepin Desktop on Ubuntu 20.04 LTS.md rename to published/202010/20201009 How to Install Deepin Desktop on Ubuntu 20.04 LTS.md diff --git a/published/20201009 How to Remove Physical Volume from a Volume Group in LVM.md b/published/202010/20201009 How to Remove Physical Volume from a Volume Group in LVM.md similarity index 100% rename from published/20201009 How to Remove Physical Volume from a Volume Group in LVM.md rename to published/202010/20201009 How to Remove Physical Volume from a Volume Group in LVM.md diff --git a/published/20201010 6 Essential Things To Do After Installing Manjaro Linux.md b/published/202010/20201010 6 Essential Things To Do After Installing Manjaro Linux.md similarity index 100% rename from published/20201010 6 Essential Things To Do After Installing Manjaro Linux.md rename to published/202010/20201010 6 Essential Things To Do After Installing Manjaro Linux.md diff --git a/published/20201012 Could Microsoft be en route to dumping Windows in favor of Linux.md b/published/202010/20201012 Could Microsoft be en route to dumping Windows in favor of Linux.md similarity index 100% rename from published/20201012 Could Microsoft be en route to dumping Windows in favor of Linux.md rename to published/202010/20201012 Could Microsoft be en route to dumping Windows in favor of Linux.md diff --git a/published/20201012 Linux Jargon Buster- What is Display Manager in Linux.md b/published/202010/20201012 Linux Jargon Buster- What is Display Manager in Linux.md similarity index 100% rename from published/20201012 Linux Jargon Buster- What is Display Manager in Linux.md rename to published/202010/20201012 Linux Jargon Buster- What is Display Manager in Linux.md diff --git a/published/20201013 Install MariaDB or MySQL on Linux.md b/published/202010/20201013 Install MariaDB or MySQL on Linux.md similarity index 100% rename from published/20201013 Install MariaDB or MySQL on Linux.md rename to published/202010/20201013 Install MariaDB or MySQL on Linux.md diff --git a/published/20201014 2 Ways to Download Files From Linux Terminal.md b/published/202010/20201014 2 Ways to Download Files From Linux Terminal.md similarity index 100% rename from published/20201014 2 Ways to Download Files From Linux Terminal.md rename to published/202010/20201014 2 Ways to Download Files From Linux Terminal.md diff --git a/published/20201014 MellowPlayer is a Desktop App for Various Streaming Music Services.md b/published/202010/20201014 MellowPlayer is a Desktop App for Various Streaming Music Services.md similarity index 100% rename from published/20201014 MellowPlayer is a Desktop App for Various Streaming Music Services.md rename to published/202010/20201014 MellowPlayer is a Desktop App for Various Streaming Music Services.md diff --git a/published/20201014 Try Linux on any computer with this bootable USB tool.md b/published/202010/20201014 Try Linux on any computer with this bootable USB tool.md similarity index 100% rename from published/20201014 Try Linux on any computer with this bootable USB tool.md rename to published/202010/20201014 Try Linux on any computer with this bootable USB tool.md diff --git a/published/20201016 Set up ZFS on Linux with yum.md b/published/202010/20201016 Set up ZFS on Linux with yum.md similarity index 100% rename from published/20201016 Set up ZFS on Linux with yum.md rename to published/202010/20201016 Set up ZFS on Linux with yum.md diff --git a/published/20201027 Fedora 33 is officially here.md b/published/202010/20201027 Fedora 33 is officially here.md similarity index 100% rename from published/20201027 Fedora 33 is officially here.md rename to published/202010/20201027 Fedora 33 is officially here.md From 5efe97e9aa9d012df34cf44b48bdb1579c313bf6 Mon Sep 17 00:00:00 2001 From: chenmu-kk <53132802+chenmu-kk@users.noreply.github.com> Date: Sun, 1 Nov 2020 15:42:00 +0800 Subject: [PATCH 033/130] Update 20190925 Most enterprise networks can-t handle big data loads.md --- ...0925 Most enterprise networks can-t handle big data loads.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/talk/20190925 Most enterprise networks can-t handle big data loads.md b/sources/talk/20190925 Most enterprise networks can-t handle big data loads.md index 725783e362..a55b0bdc91 100644 --- a/sources/talk/20190925 Most enterprise networks can-t handle big data loads.md +++ b/sources/talk/20190925 Most enterprise networks can-t handle big data loads.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( chenmu-kk ) +[#]: translator: (chenmu-kk) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From e94829fccb2ed12cd6aa556f33cdd489643b28f9 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 1 Nov 2020 15:52:21 +0800 Subject: [PATCH 034/130] PRF MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @xiao-song-123 恭喜你,完成了第一篇翻译贡献! --- ... source underpins blockchain technology.md | 38 +++++++++---------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/translated/tech/20201001 How open source underpins blockchain technology.md b/translated/tech/20201001 How open source underpins blockchain technology.md index da4141388c..716664f9bc 100644 --- a/translated/tech/20201001 How open source underpins blockchain technology.md +++ b/translated/tech/20201001 How open source underpins blockchain technology.md @@ -1,6 +1,6 @@ [#]: collector: "lujun9972" [#]: translator: "xiao-song-123" -[#]: reviewer: " " +[#]: reviewer: "wxy" [#]: publisher: " " [#]: url: " " [#]: subject: "How open source underpins blockchain technology" @@ -9,63 +9,61 @@ 开源是如何支撑区块链技术发展的 ====== -创造出区块链安全性和可靠性的原因:是开放,而非监管。 -![cubes coming together to create a larger cube][1] +> 创造出区块链安全性和可靠性的原因:是开放,而非监管。 +![](https://img.linux.net.cn/data/attachment/album/202011/01/155124l5c81g86mfwgjxfx.jpg) 当人们发现以安全性而闻名的区块链技术居然是建立在开源软件代码之上时,通常会感到非常惊讶。事实上,正是这种开放性才赋予了区块链技术的安全性和可靠性。 -把任何事物构建成开源的,其核心价值之一就是提高效率。建立起一个有着不同观点和技能的开发人员社区,这些开发人员工作在同一个代码库的时候,可以成倍增加构建出来的应用程序数量以及复杂性。 +以开源方式构建的任何事物,其核心价值之一就是为了提高效率。建立起一个有着不同观点和技能的开发人员社区,这些开发人员工作在同一个代码库的时候,可以成倍增加构建出来的应用程序数量以及复杂性。 ### 开源比人们想象中的要更加普遍 -开源的 Linux,就是一种比较流行的操作系统。Linux 为服务器提供了许多服务,这些服务让我们可以轻松地共享个人信息。其中包括 Google,Facebook 和数千个主要网站。当我们使用这些服务时,就是在和这些在网络上运行着 Linux 系统的计算机进行交互。Chromebook 也使用 Linux,Android 手机使用的操作系统也是基于 Linux 的。 +开源的 Linux,就是一种比较流行的操作系统。Linux 为服务器提供了许多服务,这些服务让我们可以轻松地共享个人信息。其中包括 Google、Facebook 和数千个主要网站。当我们使用这些服务时,就是在和这些在网络上运行着 Linux 系统的计算机进行交互。Chromebook 也使用 Linux,Android 手机使用的操作系统也是基于 Linux 的。 -Linux 不属于任何一家公司,人们可以免费使用并且可以共同协作来完善创造它。自 2005 年推出以来,已经有来自 1,700 多家公司的 20,000 多名开发人员 [为其中的代码做出了贡献][2] 。 +Linux 不属于任何一家公司,人们可以免费使用并且可以共同协作来完善创造它。自 2005 年推出以来,已经有来自 1,700 多家公司的 20,000 多名开发人员 [为其中的代码做出了贡献][2] 。 -这就是开源软件的工作原理。大量的人为此贡献,并不断添加、修改或构建开源代码库来创建新的应用程序和平台。区块链和加密货币的大部分代码都是使用开源软件开发的。开源软件是由热情的用户构建的,这些用户对错误、故障或缺陷时刻保持警惕。当发现问题时,开源社区中的开发人员将一起努力来解决问题。 +这就是开源软件的运作方式。大量的人为此贡献,并不断添加、修改或构建开源代码库来创建新的应用程序和平台。区块链和加密货币的大部分代码都是使用开源软件开发的。开源软件是由充满热情的用户构建的,这些用户对错误、故障或缺陷时刻保持警惕。当发现问题时,开源社区中的开发人员将一起努力来解决问题。 ### 区块链和开源 整个开源区块链开发者社区都在不断地添加和完善代码库。 -以下是区块链执行的基本方式: +以下是区块链的基本表现方式: * 区块链平台具有一个交易数据库,该交易数据库允许对等方在任何时候彼此进行交易。 * 附有用户识别标签,以方便交易。 * 平台一定有一种安全的方式来在交易批准前对交易进行验证。 * 无法被验证的交易不会进行。 +开源软件允许开发者在 [去中心化应用程序(Dapp)][3]中创建这些平台,这是区块链中交易的安全、保障和可变性的关键。 - -开源软件允许开发者在 [去中心化应用程序(Dapp)][3]中创建这些平台,这是区块链中交易的安全性、安全性和可变性的关键。 - -这种去中心化的方式意味着没有中央权威机构来调解交易,没有人能控制发生的事情。直接点对点的交易可以更快速、安全的进行。随着交易记录在分类账簿中,这条交易记录也会分发到系统各处。 +这种去中心化的方式意味着没有中央权威机构来调解交易,没有人能控制发生的事情。直接的点对点的交易可以更快速、安全的进行。由于交易被记录在分类账簿中,它们也会分发到整个生态系统中。 区块链使用密码学来保证安全。每一笔交易都携带着与前一笔交易相关联的信息,以验证其真实性。这可以防止威胁者篡改数据,因为一旦数据被添加到公共分类账中,其他用户就不能更改。 ### 区块链是开源的吗? -虽然区块链本身在技术上可能不是开源的,但区块链系统通常是使用开源软件实现的,因为没有政府机构对其进行监管,所以这些开源软件使用的概念体现了一种开放文化。私人公司开发的用于处理金融交易的专有软件很可能受到 [政府机构 ][4] 的监管。在美国,这可能包括美国证券交易委员会 (SEC)、联邦储备委员会和联邦存款保险公司 (FDIC)。区块链技术在开放环境下使用不需要政府监管,实际上,用来验证交易的是用户社区。 +虽然区块链本身在技术上可以是不开源的,但区块链系统通常是使用开源软件实现的,因为没有政府机构对其进行监管,所以这些开源软件使用的概念体现了一种开放文化。私人公司开发的用于处理金融交易的专有软件很可能受到 [政府机构][4] 的监管。在美国,这可能包括美国证券交易委员会(SEC)、联邦储备委员会和联邦存款保险公司(FDIC)。区块链技术在开放环境下使用不需要政府监管,实际上,用来验证交易的是用户社区。 -你可以称它为众包的一种极端形式,既用于开发构建区块链平台的开源软件,也用于验证交易。这就是区块链得到如此多关注的原因之一:它有可能颠覆整个行业,因为它可以作为处理和验证交易的权威中介。 +你可以称它为一种极端的众包形式,既用于开发构建区块链平台的开源软件,也用于验证交易。这就是区块链得到如此多关注的原因之一:它有可能颠覆整个行业,因为它可以作为处理和验证交易的权威中介。 ### 比特币,以太坊和其他加密货币 -截至2020年6月,超过 [5000万人拥有区块链钱包][5] 。他们大多数用于金融交易,例如交易比特币,以太坊和其他加密货币。 与交易员观察股票价格一样,[检查加密货币价格][6] 已成为许多人的主流。 +截至 2020 年 6 月,超过 [5000 万人拥有区块链钱包][5] 。他们大多数用于金融交易,例如交易比特币、以太坊和其他加密货币。对许多人来说,像交易员观察股票价格一样,[查看加密货币价格][6] 已成为主流。 -加密货币平台也使用开源软件。[以太坊项目][7] 开发出了任何人都可以免费使用的开源软件,社区中大量的开发者都为此贡献了代码。比特币客户端的参考实现版是由 450 多个开发人员和工程师进行开发的,他们已经贡献了超过 150,000 行代码。 +加密货币平台也使用开源软件。[以太坊项目][7] 开发出了任何人都可以免费使用的开源软件,社区中大量的开发者都为此贡献了代码。比特币客户端的参考实现版是由 450 多个开发人员和工程师进行开发的,他们已经贡献了超过 150,000 个贡献。 -加密货币区块链是一个持续增长的记录。每个被称作为块的记录按顺序链接在一起,它们互相链接形成一条链。每个块都有其自己的唯一标记,这个标记称为 [哈希][8] 。一个块包含自身的哈希值和前一个块密码的哈希值。从本质上讲,每个块都链接到前一个块,形成了无法中断的长链,每个长链都包含有关用于验证交易的其他块的信息。 +加密货币区块链是一个持续增长的记录。每个被称作为块的记录按顺序链接在一起,它们互相链接形成一条链。每个块都有其自己的唯一标记,这个标记称为 [哈希][8] 。一个块包含自身的哈希值和前一个块的加密计算出的哈希值。从本质上讲,每个块都链接到前一个块,形成了无法中断的长链,每个块都包含其它区块的信息,用于验证交易。 在金融或是加密货币的区块链中没有中央银行。这些分布在整个互联网中的区块,建立了一个性能强大的审计跟踪系统。任何人都能够通过区块链来验证交易,但却不能更改上面的记录。 ### 牢不可破的区块链 -尽管区块链不受任何政府或机构的监管,但分布式的网络保证了它们的安全。随着区块链的发展,每一笔交易都会增加伪造的难度。区块分布在世界各地的网络中,它们使用的信任标记不可被改变,这条链条变得牢不可破。 +尽管区块链不受任何政府或机构的监管,但分布式的网络保证了它们的安全。随着链的增长,每一笔交易都会增加伪造的难度。区块分布在世界各地的网络中,它们使用的信任标记不可被改变,这条链条几乎变得牢不可破。 -这种去中心化的网络,其背后的代码是开源的,也是用户在交易中不必使用诸如银行或经纪人之类的中介就可以相互信任的原因之一。支撑加密货币平台的软件是由相互独立的开发者组建的联盟创建的,并且任何人都可以免费使用。这创造了世界上最大的制衡体系之一。 +这种去中心化的网络,其背后的代码是开源的,这也是用户在交易中不必使用诸如银行或经纪人之类的中介就可以相互信任的原因之一。支撑加密货币平台的软件是由相互独立的开发者组建的联盟创建的,并且任何人都可以免费使用。这创造了世界上最大的制衡体系之一。 -------------------------------------------------------------------------------- @@ -74,7 +72,7 @@ via: https://opensource.com/article/20/10/open-source-blockchain 作者:[Matt Shealy][a] 选题:[lujun9972][b] 译者:[xiao-song-123](https://github.com/xiao-song-123) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From e1555dcfff044da1eead5f236f28949e2cd54ac3 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 1 Nov 2020 15:53:48 +0800 Subject: [PATCH 035/130] PUB MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @xiao-song-123 本文首发地址: https://linux.cn/article-12776-1.html 您的 LCTT 专页地址: https://linux.cn/lctt/xiao-song-123 --- ...0201001 How open source underpins blockchain technology.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20201001 How open source underpins blockchain technology.md (99%) diff --git a/translated/tech/20201001 How open source underpins blockchain technology.md b/published/20201001 How open source underpins blockchain technology.md similarity index 99% rename from translated/tech/20201001 How open source underpins blockchain technology.md rename to published/20201001 How open source underpins blockchain technology.md index 716664f9bc..8205d3b2ce 100644 --- a/translated/tech/20201001 How open source underpins blockchain technology.md +++ b/published/20201001 How open source underpins blockchain technology.md @@ -1,8 +1,8 @@ [#]: collector: "lujun9972" [#]: translator: "xiao-song-123" [#]: reviewer: "wxy" -[#]: publisher: " " -[#]: url: " " +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-12776-1.html" [#]: subject: "How open source underpins blockchain technology" [#]: via: "https://opensource.com/article/20/10/open-source-blockchain" [#]: author: "Matt Shealy https://opensource.com/users/mshealy" From c1fe687e1c06c3d8d58ecfe75c851ad26f9574f6 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 1 Nov 2020 22:34:59 +0800 Subject: [PATCH 036/130] APL --- ...e Command in Debian, Ubuntu and Other Linux Distributions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20201030 How to Use apt-cache Command in Debian, Ubuntu and Other Linux Distributions.md b/sources/tech/20201030 How to Use apt-cache Command in Debian, Ubuntu and Other Linux Distributions.md index 23b314319b..cc1fe5b59d 100644 --- a/sources/tech/20201030 How to Use apt-cache Command in Debian, Ubuntu and Other Linux Distributions.md +++ b/sources/tech/20201030 How to Use apt-cache Command in Debian, Ubuntu and Other Linux Distributions.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 2af052f46694a36420b4c838ea5cc18fbd00b7bc Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 1 Nov 2020 23:08:00 +0800 Subject: [PATCH 037/130] TSL --- ...n, Ubuntu and Other Linux Distributions.md | 167 ----------------- ...n, Ubuntu and Other Linux Distributions.md | 169 ++++++++++++++++++ 2 files changed, 169 insertions(+), 167 deletions(-) delete mode 100644 sources/tech/20201030 How to Use apt-cache Command in Debian, Ubuntu and Other Linux Distributions.md create mode 100644 translated/tech/20201030 How to Use apt-cache Command in Debian, Ubuntu and Other Linux Distributions.md diff --git a/sources/tech/20201030 How to Use apt-cache Command in Debian, Ubuntu and Other Linux Distributions.md b/sources/tech/20201030 How to Use apt-cache Command in Debian, Ubuntu and Other Linux Distributions.md deleted file mode 100644 index cc1fe5b59d..0000000000 --- a/sources/tech/20201030 How to Use apt-cache Command in Debian, Ubuntu and Other Linux Distributions.md +++ /dev/null @@ -1,167 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to Use apt-cache Command in Debian, Ubuntu and Other Linux Distributions) -[#]: via: (https://itsfoss.com/apt-cache-command/) -[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) - -How to Use apt-cache Command in Debian, Ubuntu and Other Linux Distributions -====== - -_**With apt-cache command, you can search for package details in the local APT cache. Learn to use apt-cache command in this tutorial.**_ - -### What is apt-cache command used for? - -The [apt][1] [package manager][2] works on a local cache of package metadata. The metadata usually consists information like package name, version, description, dependencies, its repository and developers. With the apt-cache command, you can query this local APT cache and get relevant information. - -You can search for the availability of a package, its version number, its dependencies among other things. I’ll show you how to use the apt-cache command with examples. - -The **location of APT cache** is /var/lib/apt/lists/ directory. Which repository metadata to cache depends on the repositories added in your source list in the /etc/apt/sources.list file and additional repository files located in ls /etc/apt/sources.list.d directory. - -Surprisingly, apt-cache doesn’t clear the APT cache. For that you’ll have to [use the apt-get clean command][3]. - -Needless to say, the APT packaging system is used on Debian and Debian-based Linux distributions like Ubuntu, Linux Mint, elementary OS etc. You cannot use it on Arch or Fedora. - -### Using apt-cache command - -![][4] - -Like any other Linux command, there are several options available with apt-cache and you can always refer to its man page to read about them. - -However, you probably won’t need to use all of them. This is why I am going to show you only the most common and useful examples of the apt-cache command in this tutorial. - -Always update - -It is always a good idea to update the local APT cache to sync it with the remote repositories. How do you do that? You use the command: - -**sudo apt update** - -#### Search for packages - -The most common use of apt-cache command is for finding package. You can use a regex pattern to search for a package in the local APT cache. - -``` -apt-cache search package_name -``` - -By default, it looks for the search term in both the name and description of the package. It shows the matching package along with its short description in alphabetical order. - -![][5] - -You can narrow down your search to look for the search term in package names only. - -``` -apt-cache search --names-only package_name -``` - -![][6] - -If you want complete details of all the matched packages, you may use the `--full` flag. It can also be used with `--names-only` flag. - -![][7] - -#### Get detailed package information - -If you know the exact package name (or if you have manged to find it with the search), you can get the detailed metadata information on the package. - -``` -apt-cache show package_name -``` - -![][8] - -You can see all kind of details in the package metadata like name, version, developer, maintainer, repository, short and long description, package size and even checksum. - -There is another option showpkg that displays information about the package name, version and its forward and reverse dependencies. - -``` -apt-cache showpkg package_name -``` - -#### apt-cache policy - -This is one of the rarely used option of apt-cache command. The policy options helps you debug the issue related to the [preference file][9]. - -If you specify the package name, it will show whether the package is installed, which version is available from which repository and its priority. - -![][10] - -By default, each installed package version has a priority of 100 and a non-installed package has a priority of 500. The same package may have more than one version with a different priority. APT installs the version with higher priority unless the installed version is newer. - -If this doesn’t make sense, it’s okay. It will be extremely rare for a regular Linux user to dwell this deep into package management. - -#### Check dependencies and reverse dependencies of a package - -You can [check the dependencies of a package][11] before (or even after) installing it. It also shows all the possible packages that can fulfill the dependency. - -``` -apt-cache depends package -``` - -![][12] - -You may also check which packages are dependent on a certain package by checking the reverse dependencies with apt-cahce. - -![][13] - -Frankly, I was also surprised to see that a DevOps tool like Ansible has a dependency on a [funny Linux command like Cowsay][14]. I think it’s perhaps because after [installing Ansible][15], it displays some message on the nodes. - -#### Check unmet dependencies - -You may get troubled with [unmet dependencies issue in Ubuntu][16] or other Linux. The apt-cache command provides option to check all the unmet dependencies of various available packages on your system. - -``` -apt-cache unmet -``` - -![][17] - -**Conclusion** - -You can list all available packages with the apt-cache command. The output would be huge, so I suggest combining it with [wc command][18] to get a total number of available packages like this: - -``` -apt-cache pkgnames | wc -l -``` - -Did you notice that you don’t need to be [root user][19] for using apt-cache command? - -The newer [apt command][20] has a few options available to match the features of apt-cache command. Since apt is new, apt-get and its associated commands like apt-cache are still preferred to be used in scripts. - -I hope you find this tutorial helpful. If you have questions about any point discussed above or suggestion to improve it, please let me know in the comments. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/apt-cache-command/ - -作者:[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/package-manager/ -[3]: https://itsfoss.com/clear-apt-cache/ -[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/10/apt-cache-command.png?resize=800%2C450&ssl=1 -[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/10/apt-cache-search.png?resize=759%2C437&ssl=1 -[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/10/apt-cache-search-names-only.png?resize=759%2C209&ssl=1 -[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/10/apt-cache-show-full.png?resize=759%2C722&ssl=1 -[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/10/apt-cache-show-pkgname.png?resize=800%2C795&ssl=1 -[9]: https://debian-handbook.info/browse/stable/sect.apt-get.html#sect.apt.priorities -[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/10/apt-cache-policy.png?resize=795%2C456&ssl=1 -[11]: https://itsfoss.com/check-dependencies-package-ubuntu/ -[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/10/apt-cache-dependency-check.png?resize=768%2C304&ssl=1 -[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/10/apt-cache-reverse-dependency.png?resize=768%2C304&ssl=1 -[14]: https://itsfoss.com/funny-linux-commands/ -[15]: https://linuxhandbook.com/install-ansible-linux/ -[16]: https://itsfoss.com/held-broken-packages-error/ -[17]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/10/apt-cache-unmet.png?resize=759%2C399&ssl=1 -[18]: https://linuxhandbook.com/wc-command/ -[19]: https://itsfoss.com/root-user-ubuntu/ -[20]: https://itsfoss.com/apt-command-guide/ diff --git a/translated/tech/20201030 How to Use apt-cache Command in Debian, Ubuntu and Other Linux Distributions.md b/translated/tech/20201030 How to Use apt-cache Command in Debian, Ubuntu and Other Linux Distributions.md new file mode 100644 index 0000000000..36521d7fb8 --- /dev/null +++ b/translated/tech/20201030 How to Use apt-cache Command in Debian, Ubuntu and Other Linux Distributions.md @@ -0,0 +1,169 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to Use apt-cache Command in Debian, Ubuntu and Other Linux Distributions) +[#]: via: (https://itsfoss.com/apt-cache-command/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) + +如何在 Debian、Ubuntu 中使用 apt-cache 命令 +====== + +> 使用 apt-cache 命令,你可以在本地 APT 缓存中搜索软件包的详细信息。在本教程中学习使用 apt-cache 命令。 + +### apt-cache 命令是用来干什么的? + +[APT][1] [包管理器][2]工作在软件包元数据的本地缓存上。元数据通常由包名、版本、描述、依赖关系、仓库和开发者等信息组成。通过 `apt-cache` 命令,你可以查询这个本地 APT 缓存并获得相关信息。 + +你可以搜索一个包的可用性、它的版本号、它的依赖关系等等。我将通过实例告诉你如何使用 `apt-cache`命令。 + +APT 缓存的位置是 `/var/lib/apt/lists/` 目录。缓存哪些仓库元数据取决于你的源列表中 `/etc/apt/sources.list` 文件中添加的仓库,以及位于 `/etc/apt/sources.list.d` 目录下的额外仓库文件。 + +令人惊讶的是,`apt-cache` 并不能清除 APT 缓存。为此,你必须[使用 apt-get clean 命令][3]。 + +不用说,APT 打包系统是在 Debian 和基于 Debian 的 Linux 发行版上使用的,比如 Ubuntu、Linux Mint、Elementary OS 等。你不能在 Arch 或 Fedora 上使用它。 + +### 使用 apt-cache 命令 + +![][4] + +就像其他 Linux 命令一样,`apt-cache` 也有一些可用的选项,你可以随时参考它的手册页来了解这些选项。 + +然而,你可能并不需要使用所有的选项。这就是为什么我在本教程中只向你展示 `apt-cache` 命令中最常见和最有用的例子。 + +#### 始终更新 + +更新本地 APT 缓存以与远程仓库同步是一个好主意。如何做到这一点呢?你可以使用命令: + +``` +sudo apt update +``` + +#### 搜索软件包 + +`apt-cache` 命令最常见的用途是查找软件包。你可以使用一个正则表达式来搜索本地 APT 缓存中的包。 + +``` +apt-cache search package_name +``` + +默认情况下,它会在软件包的名称和描述中查找搜索关键词。它按字母顺序显示匹配的软件包及其简短的描述。 + +![][5] + +你也可以缩小搜索范围,只在产品名称中查找搜索词。 + +``` +apt-cache search --names-only package_name +``` + +![][6] + +如果你想知道所有匹配软件包的完整细节,你可以使用 `--full` 标志。 + +![][7] + +#### 获取详细的包装信息 + +如果你知道确切的软件包名称(或者你已经成功地通过搜索找到了它),你可以得到软件包的详细元数据信息。 + +``` +apt-cache show package_name +``` + +![][8] + +你可以看到软件包元数据中的所有细节,比如名称、版本、开发者、维护者、仓库、长短描述、软件包大小甚至是校验和。 + +还有一个选项 `showpkg` 可以显示软件包的名称、版本、正向和反向依赖关系等信息。 + +``` +apt-cache showpkg package_name +``` + +#### apt-cache 的策略 + +这是 `apt-cache` 命令中很少使用的一个选项。`policy` 选项可以帮助你调试与 [preference 文件][9]相关的问题。 + +如果你指定了软件包的名称,它将显示该软件包是否已经安装,在哪个版本的仓库中可用,以及它的优先级。 + +![][10] + +默认情况下,每个已安装的软件包版本的优先级为 100,未安装的软件包的优先级为 500。同一软件包可能有多个不同优先级的版本。APT 会安装优先级较高的版本,除非安装的版本较新。 + +如果不理解这个部分,也没关系。对于一个普通的 Linux 用户来说,会极少纠结于这么深的软件包管理。 + +#### 检查软件包的依赖关系和反向依赖关系。 + +你可以在安装之前(甚至在安装之后)[检查一个包的依赖关系][11]。它还会显示所有可能满足依赖关系的软件包。 + +``` +apt-cache depends package +``` + +![][12] + +你也可以通过 `apt-cahce` 检查反向依赖关系来检查哪些包是依赖于某个包的。 + +![][13] + +坦白说,看到 Ansible 这样的 DevOps 工具对 [Cowsay 这样有趣的 Linux 命令][14]有依赖性,我也很惊讶。我想可能是因为在[安装 Ansible][15]之后,它会在节点上显示一些信息。 + +#### 检查未满足的依赖性 + +你可能会被 [Ubuntu 中未满足的依赖问题][16]所困扰,其他 Linux 也有类似问题。`apt-cache` 命令提供了一个选项来检查系统中各种可用软件包的所有未满足的依赖关系。 + +``` +apt-cache unmet +``` + +![][17] + +### 结论 + +你可以用 `apt-cache` 命令列出所有可用的软件包。输出结果会很庞大,所以我建议将其与 [wc 命令][18] 结合起来,得到可用软件包的总数,就像这样: + +``` +apt-cache pkgnames | wc -l +``` + +你是否注意到你不需要成为 [root 用户][19]就可以使用 `apt-cache` 命令? + +较新的 [apt 命令][20]也有一些与 `apt-cache` 命令对应的功能选项。由于 `apt` 比较新,所以在脚本中还是首选 `apt-get` 及其相关的 `apt-cache` 等命令。 + +希望你觉得本教程对你有帮助。如果你对上面讨论的任何一点有疑问或者有改进的建议,请在评论中告诉我。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/apt-cache-command/ + +作者:[Abhishek Prakash][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://wiki.debian.org/Apt +[2]: https://itsfoss.com/package-manager/ +[3]: https://itsfoss.com/clear-apt-cache/ +[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/10/apt-cache-command.png?resize=800%2C450&ssl=1 +[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/10/apt-cache-search.png?resize=759%2C437&ssl=1 +[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/10/apt-cache-search-names-only.png?resize=759%2C209&ssl=1 +[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/10/apt-cache-show-full.png?resize=759%2C722&ssl=1 +[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/10/apt-cache-show-pkgname.png?resize=800%2C795&ssl=1 +[9]: https://debian-handbook.info/browse/stable/sect.apt-get.html#sect.apt.priorities +[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/10/apt-cache-policy.png?resize=795%2C456&ssl=1 +[11]: https://itsfoss.com/check-dependencies-package-ubuntu/ +[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/10/apt-cache-dependency-check.png?resize=768%2C304&ssl=1 +[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/10/apt-cache-reverse-dependency.png?resize=768%2C304&ssl=1 +[14]: https://itsfoss.com/funny-linux-commands/ +[15]: https://linuxhandbook.com/install-ansible-linux/ +[16]: https://itsfoss.com/held-broken-packages-error/ +[17]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/10/apt-cache-unmet.png?resize=759%2C399&ssl=1 +[18]: https://linuxhandbook.com/wc-command/ +[19]: https://itsfoss.com/root-user-ubuntu/ +[20]: https://itsfoss.com/apt-command-guide/ From 48b0b5732c0a7bd5a98e9d0a09b0e359b524d8e9 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 2 Nov 2020 08:54:01 +0800 Subject: [PATCH 038/130] translated --- ... open source tools I can-t live without.md | 104 ------------------ ... open source tools I can-t live without.md | 103 +++++++++++++++++ 2 files changed, 103 insertions(+), 104 deletions(-) delete mode 100644 sources/tech/20201021 5 open source tools I can-t live without.md create mode 100644 translated/tech/20201021 5 open source tools I can-t live without.md diff --git a/sources/tech/20201021 5 open source tools I can-t live without.md b/sources/tech/20201021 5 open source tools I can-t live without.md deleted file mode 100644 index 25b79f9959..0000000000 --- a/sources/tech/20201021 5 open source tools I can-t live without.md +++ /dev/null @@ -1,104 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (5 open source tools I can't live without) -[#]: via: (https://opensource.com/article/20/10/open-source-tools) -[#]: author: (Victoria Martinez de la Cruz https://opensource.com/users/vkmc) - -5 open source tools I can't live without -====== -Increase your productivity inside and outside the terminal by keeping -these tools in your own bag of tricks. -![woman on laptop sitting at the window][1] - -Some time ago, I engaged with a Twitter thread that went viral among techies. The challenge? Pick only five tools that you cannot live without. I started to think about this in relation to my everyday life, and picking just five tools was not easy. I use many tools that I consider essential, such as my [IRC][2] client to connect with my colleagues and friends (yes, I still use IRC), a good text editor to hack on things, a calendar app to keep organized, and a videoconferencing platform when more direct interaction is needed. - -So let me put a twist on this challenge: Pick just five open source tools that boost your productivity. Here's my list; please share yours in the comments. - -### tmate - -![tmate screenshot][3] - -(Victoria Marinez de la Cruz, [CC BY-SA 4.0][4]) - -Oh, I love this tool. tmate is a fork of the well-known [tmux][5] terminal multiplexer that allows you to start a tmux session and share it over SSH. You can use it for [pair programming][6] (which is my primary use case) or for remote control. - -If you collaborate often with your team members, and you want an easy, distro-agnostic, open source way to program with them (and sharing terminal access is enough for you), this is definitely a must-add to your list. - -Get more info on [tmate's website][7], or check out the code on [GitHub][8]. - -### ix - -ix is a command-line pastebin. You don't need to install anything; you can create new pastes just by `curl`ing to the [ix.io][9] site. For example, `echo Hello world. | curl -F 'f:1=<-' ix.io` will give you a link to ix.io where the message "Hello world" is pasted. This is very convenient when you want to share logs for debugging purposes or to save config files in servers where you don't have a desktop environment. - -One downside is that the source code is not yet published, even though it is intended to be free and open source. If you are the author and are reading this post, please post the code so that we can contribute to the polishing process. - -### asciinema - -Yes, this is another terminal tool. asciinema allows you to record your terminal. There are many ways to use it, but I generally use it to make demos for presentations. It's very easy to use, and there are packages available for many Linux distributions and other platforms. - -To see how it works, check out this [cool demo][10]. Isn't it great? - -Get more information on [asciinema's website][11] and access its source code on [GitHub][12]. - -### GNOME Pomodoro - -![pomodoro timer gnome][13] - -(Victoria Martinez de la Cruz, [CC BY-SA 4.0][4]) - -OK, that's enough with the terminal tools. Now I want to share this simple gem for getting and staying organized. Have you heard about the [Pomodoro Technique][14]? Pomodoro is basically a time-management tool. It uses a tomato-shaped timer that helps you split your time into work chunks and breaks (by default, 25 minutes of work followed by five-minute breaks). And, after every four pomodoros, you take a longer break (15 minutes by default). The idea is that you stay focused during the work time, and you stretch and relax on the breaks. - -This sounds very, very simple, and you might be hesitant to allow a tomato-shaped clock to control your life, but it definitely helped me get better organized and avoid exhaustion when trying to focus on many things at the same time. - -Whatever your role, I highly recommend this practice. And among the many different tools that implement it, I recommend the GNOME Pomodoro app. It's available for major GNU/Linux distros, so it requires that you use the GNOME desktop environment (this might be its downside). - -Check out more information on [GNOME Pomodoro's website][15], and access its [GitHub][16] repo to get the source code and learn how you can contribute. - -### Jitsi - -Last but not least is Jitsi. When you're working on a remote, globally distributed team, you need a way to connect with people. Instant messaging is good, but sometimes it's better to have a quick meeting to discuss things face to face (well, seeing each other faces). There are a lot of [videoconferencing tools][17] available, but I like Jitsi a lot. Not only because it's free and open source, but also because it provides a clean, functional interface. You can set up your own Jitsi server (for business purposes), but you can also try out a public Jitsi instance by going to the [Jitsi Meet][18] website. - -A good practice for setting up this kind of meeting: use it only when you have a clear agenda in mind. And always ask yourself, can this meeting be an email instead? Follow these guidelines and use Jitsi with caution, and your workday will be extremely productive! - -Learn more on [Jitsi's website][19] and start contributing by accessing its [GitHub][20] repository. - -* * * - -I hope my list helps you reach the next level in productivity. What are your five, can't-do-without-them, open source productivity tools? Let me know in the comments! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/10/open-source-tools - -作者:[Victoria Martinez de la Cruz][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/vkmc -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/lenovo-thinkpad-laptop-window-focus.png?itok=g0xPm2kD (young woman working on a laptop) -[2]: https://en.wikipedia.org/wiki/Internet_Relay_Chat -[3]: https://opensource.com/sites/default/files/pictures/tmate-opensource.jpg (tmate screenshot) -[4]: https://creativecommons.org/licenses/by-sa/4.0/ -[5]: https://opensource.com/article/20/7/tmux-cheat-sheet -[6]: https://en.wikipedia.org/wiki/Pair_programming -[7]: https://tmate.io/ -[8]: https://github.com/tmate-io/tmate -[9]: http://ix.io/ -[10]: https://asciinema.org/a/239367 -[11]: https://asciinema.org/ -[12]: https://github.com/asciinema/asciinema -[13]: https://opensource.com/sites/default/files/pictures/pomodoro_timer_gnome.jpg (pomodoro timer gnome) -[14]: https://en.wikipedia.org/wiki/Pomodoro_Technique -[15]: https://gnomepomodoro.org/ -[16]: https://github.com/codito/gnome-pomodoro -[17]: https://opensource.com/article/20/5/open-source-video-conferencing -[18]: https://meet.jit.si/ -[19]: https://jitsi.org/ -[20]: https://github.com/jitsi diff --git a/translated/tech/20201021 5 open source tools I can-t live without.md b/translated/tech/20201021 5 open source tools I can-t live without.md new file mode 100644 index 0000000000..027d230e86 --- /dev/null +++ b/translated/tech/20201021 5 open source tools I can-t live without.md @@ -0,0 +1,103 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (5 open source tools I can't live without) +[#]: via: (https://opensource.com/article/20/10/open-source-tools) +[#]: author: (Victoria Martinez de la Cruz https://opensource.com/users/vkmc) + +5 个我不能离开的开源工具 +====== +通过将这些工具放在自己的技囊中,提高终端内外的工作效率。 +![woman on laptop sitting at the window][1] + +前段时间,我参与了一个在科技人士中广为流传的 Twitter 话题。挑战是什么?只挑选五个你不能没有的工具。我开始结合我的日常生活来思考这个问题,只挑出五个工具并不容易。我使用了许多我认为必不可少的工具,比如我的 [IRC][2] 客户端来与同事和朋友联系(是的,我仍然使用 IRC),一个好的文本编辑器来做事情,一个日历应用来保持有条不紊,以及当需要更直接的互动时的一个视频会议平台。 + +所以,让我给这个挑战来个转折:选出五个能提高你工作效率的开源工具。这是我的清单。请在评论中分享你的清单。 + +### tmate + +![tmate screenshot][3] + +(Victoria Marinez de la Cruz, [CC BY-SA 4.0][4]) + +tmate 是著名的 [tmux][5] 终端多路复用器的一个分支,它允许你启动一个 tmux 会话并通过 SSH 共享。你可以用它来进行[配对编程][6](这是我的主要使用场景),也可以用来进行远程控制。 + +如果你经常与你的团队成员合作,并且你想要一个简单的、与发行版无关的、开源的方式与他们一起编程(而且共享终端访问对你来说已经足够了),这绝对是你必须加到列表中的东西。 + +在 [tmate 的网站][7]上获取更多信息,或者在 [GitHub][8] 上查看代码。 + +### ix + +ix 是一个命令行粘贴板。你不需要安装任何东西。你可以通过 `curl` 到 [ix.io][9] 站点来创建新的粘贴。例如, `echo Hello world. | curl -F 'f:1=<-' ix.io` 会给你一个到 ix.io 的链接,那里粘贴了消息 “Hello world” 的信息。当你想分享日志用于调试或在没有桌面环境的服务器上保存配置文件时,这非常方便。 + +有一个缺点是源码还没有公布,尽管它的目的是免费和开源。如果你是作者,并且正在阅读这篇文章,请发布代码,这样我们就可以为打磨过程做出贡献。 + +### asciinema + +是的,这是另一个终端工具,asciinema 可以让你记录你的终端。使用它的方法有很多,但我一般用它来制作 demo 演示。它非常容易使用,而且有很多 Linux 发行版和其他平台的软件包。 + +要想知道它是如何工作的,可以看看这个[酷炫的 demo][10]。是不是很棒? + +在 [asciinema 的网站][11]上获取更多信息,在 [GitHub][12] 上访问其源代码。 + +### GNOME Pomodoro + +![pomodoro timer gnome][13] + +(Victoria Martinez de la Cruz, [CC BY-SA 4.0][4]) + +好了,关于终端工具的介绍就到此为止。现在我想和大家分享一下这个简单的宝物,它让你的工作变得有条不紊。你听说过 [Pomodoro Technique][14] 吗?Pomodoro 基本上是一个时间管理工具。它使用一个番茄形状的计时器,帮助你将时间分成工作时间和休息时间(默认情况下,25 分钟的工作后有 5 分钟的休息时间)。而且,每隔 4 个 pomodoro 之后,你就会有更长的休息时间(默认为 15 分钟)。这样做的目的是让你在工作时间内保持专注,而在休息时间内进行伸展和放松。 + +这听起来非常非常简单,你可能会对让一个番茄形状的时钟来控制你的生活感到犹豫,但它确实帮助我更好地组织起来,避免在试图同时专注于许多事情时感到疲惫。 + +无论你是什么角色,我都强烈推荐这种做法。而在众多实现它的不同工具中,我推荐 GNOME Pomodoro 应用。它适用于主要的 GNU/Linux 发行版,所以它需要你使用 GNOME 桌面环境(这可能是它的缺点)。 + +在 [GNOME Pomodoro 的网站][15]上查看更多信息,并访问其 [GitHub][16] 仓库来获取源码并了解如何做出贡献。 + +### Jitsi + +最后但并非最不重要的是 Jitsi。当你在一个远程、全球分布的团队中工作时,你需要一种与人们联系的方式。即时通讯是好的,但有时最好还是开个快速会议,面对面地讨论事情(嗯,看到对方的脸)。有很多[视频会议工具][17]可用,但我很喜欢 Jitsi。不仅因为它是免费和开源的,还因为它提供了一个简洁、实用的界面。你可以设置自己的 Jitsi 服务器(用于商业目的),但你也可以通过访问 [Jitsi Meet][18] 网站来试用一个公共的 Jitsi 实例。 + +设置这种会议的一个好做法是:只有在你心中有明确的议程时才使用它。而且要时刻问自己,这个会议能不能用电子邮件代替?遵循这些准则,谨慎使用 Jitsi,你的工作日将会非常高效! + +在 [Jitsi 网站][19]上了解更多信息,并通过访问其 [GitHub][20] 仓库开始贡献。 + +* * * + +我希望我的清单能帮助你在生产力上达到一个新的水平。你的 5 个不能离开的开源生产力工具是什么?在评论中告诉我。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/10/open-source-tools + +作者:[Victoria Martinez de la Cruz][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/vkmc +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/lenovo-thinkpad-laptop-window-focus.png?itok=g0xPm2kD (young woman working on a laptop) +[2]: https://en.wikipedia.org/wiki/Internet_Relay_Chat +[3]: https://opensource.com/sites/default/files/pictures/tmate-opensource.jpg (tmate screenshot) +[4]: https://creativecommons.org/licenses/by-sa/4.0/ +[5]: https://opensource.com/article/20/7/tmux-cheat-sheet +[6]: https://en.wikipedia.org/wiki/Pair_programming +[7]: https://tmate.io/ +[8]: https://github.com/tmate-io/tmate +[9]: http://ix.io/ +[10]: https://asciinema.org/a/239367 +[11]: https://asciinema.org/ +[12]: https://github.com/asciinema/asciinema +[13]: https://opensource.com/sites/default/files/pictures/pomodoro_timer_gnome.jpg (pomodoro timer gnome) +[14]: https://en.wikipedia.org/wiki/Pomodoro_Technique +[15]: https://gnomepomodoro.org/ +[16]: https://github.com/codito/gnome-pomodoro +[17]: https://opensource.com/article/20/5/open-source-video-conferencing +[18]: https://meet.jit.si/ +[19]: https://jitsi.org/ +[20]: https://github.com/jitsi From e653d0eaa9fa6e0111f04b7b0d0f3efc7d3e6fe8 Mon Sep 17 00:00:00 2001 From: chenmu-kk <53132802+chenmu-kk@users.noreply.github.com> Date: Mon, 2 Nov 2020 09:22:03 +0800 Subject: [PATCH 039/130] Update 20190925 Most enterprise networks can-t handle big data loads.md --- ...0925 Most enterprise networks can-t handle big data loads.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/talk/20190925 Most enterprise networks can-t handle big data loads.md b/sources/talk/20190925 Most enterprise networks can-t handle big data loads.md index a55b0bdc91..52778b1b90 100644 --- a/sources/talk/20190925 Most enterprise networks can-t handle big data loads.md +++ b/sources/talk/20190925 Most enterprise networks can-t handle big data loads.md @@ -7,7 +7,7 @@ [#]: via: (https://www.networkworld.com/article/3440519/most-enterprise-networks-cant-handle-big-data-loads.html) [#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/) -Most enterprise networks can't handle big data loads +大多数企业网络无法处理大数据负载 ====== As more data moves through the network, efforts to keep up are lagging due to leadership and technology issues. Metamorworks / Getty Images From d0cbcd227c64fdba1cb00160238465af99983d67 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 2 Nov 2020 09:28:52 +0800 Subject: [PATCH 040/130] translating --- sources/tech/20201028 What-s new in Fedora 33 Workstation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20201028 What-s new in Fedora 33 Workstation.md b/sources/tech/20201028 What-s new in Fedora 33 Workstation.md index 853af7ed6a..bff7b31228 100644 --- a/sources/tech/20201028 What-s new in Fedora 33 Workstation.md +++ b/sources/tech/20201028 What-s new in Fedora 33 Workstation.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 7fd6b00240661e15881b9f7b7459b0d99cdddf63 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 2 Nov 2020 09:53:42 +0800 Subject: [PATCH 041/130] PRF @robsean --- ...pace in -boot Partition on Ubuntu Linux.md | 64 +++++++++---------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/translated/tech/20201002 How to Free Up Space in -boot Partition on Ubuntu Linux.md b/translated/tech/20201002 How to Free Up Space in -boot Partition on Ubuntu Linux.md index 6179dc28d4..085d6e978a 100644 --- a/translated/tech/20201002 How to Free Up Space in -boot Partition on Ubuntu Linux.md +++ b/translated/tech/20201002 How to Free Up Space in -boot Partition on Ubuntu Linux.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (robsean) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (How to Free Up Space in /boot Partition on Ubuntu Linux?) @@ -10,13 +10,13 @@ 如何在 Ubuntu Linux 上释放 /boot 分区的空间? ====== -前几天,我收到一个警告,/boot 分区已经几乎满了或者已经没有剩余空间了。是的,我有一个独立的 /boot 分区,我相信现在很少有人这样做了。 +前几天,我收到一个警告,`/boot` 分区已经几乎满了,没有剩余空间了。是的,我有一个独立的 `/boot` 分区,我相信现在很少有人这样做了。(LCTT 译注:个人认为保留单独的 /boot 分区是个好的运维经验,除此以外,/tmp、/var 也单独划定分区比较好。) -这是我第一次看到这样一个错误,它让我很迷惑。现在,这里有一些 [方法来释放在 Ubuntu 上的分区][1] (或者基于 Ubuntu 的发行版) ,但是在这种情况下并不是所有的方法都能用。 +这是我第一次看到这样一个错误,它让我很迷惑。现在,这里有一些 [方法来释放在 Ubuntu (或基于 Ubuntu 的分区)上的分区][1] ,但是在这种情况下并不是所有的方法都能用。 -这就是为什么我决定写这些我释放 /boot 分区空间的步骤的原因。 +这就是为什么我决定写这些我释放 `/boot` 分区空间的步骤的原因。 -### 如何在 Ubuntu 上释放 /boot 分区的空间(如果你的 /boot 分区空间不足) +### 如何在 Ubuntu 上释放 /boot 分区的空间 ![][2] @@ -24,7 +24,7 @@ #### 方法 1: 使用 apt autoremove -你不必是一名终端专家来做这件事,它只需要一个命令,你将移除未使用的内核来释放 /boot 分区中是空间。 +你不必是一名终端专家来做这件事,它只需要一个命令,你将移除未使用的内核来释放 `/boot` 分区中是空间。 你所有要做的事情是,输入: @@ -32,7 +32,7 @@ sudo apt autoremove ``` -这个命令不仅仅可以移除未使用的内核,而且也将摆脱你不需要的或工具安装后所不需要的依赖项。 +这个命令不仅仅可以移除未使用的内核,而且也将移除你不需要的或工具安装后所不需要的依赖项。 在你输入命令后,它将列出将被移除的东西,你只需要确认操作即可。如果你很好奇它将移除什么,你可以仔细检查一下看看它实际移除了什么。 @@ -40,13 +40,13 @@ sudo apt autoremove ![][3] -你必需按 **Y** 按键来继续。 +你必须按 `Y` 按键来继续。 -_**值得注意的是,这种方法只在你仅剩余一点点空间并并且得到警告的情况下才有效。但是,如果你的 /boot 分区已经满了,APT 甚至可能不会工作。**_ +**值得注意的是,这种方法只在你还剩余一点点空间,并且得到警告的情况下才有效。但是,如果你的 `/boot` 分区已经满了,APT 甚至可能不会工作。** 在接下来的方法中,我将重点介绍两种不同的方法,通过这些方法你可以使用 GUI 和终端来移除旧内核来释放空间。 -#### 方法 2: 手动移除未使用的内核(如果 apt autoremove 不工作的话) +#### 方法 2: 手动移除未使用的内核 在你尝试 [移除一些旧内核][4] 来释放空间前,你需要识别当前活动的内核,并且确保你不会删除它。 @@ -56,43 +56,43 @@ _**值得注意的是,这种方法只在你仅剩余一点点空间并并且 uname -r ``` -[uname 命令通常用于获取 Linux 系统信息][6] 。在这里,这个命令显示当前正在被使用的 Linux 内核。它看起来应该是这样: +[uname 命令通常用于获取 Linux 系统信息][6]。在这里,这个命令显示当前正在被使用的 Linux 内核。它看起来应该是这样: ![][7] -现在,你已经知道你当前的 Linux 内核是什么,你必需移除一个不同于这个版本内核的内核。你应该把它记录在某些地方,以便你不会不知不觉地移除它。 +现在,你已经知道你当前的 Linux 内核是什么,你必须移除一个不同于这个版本的内核。你应该把它记录在某些地方,以便你不会不知不觉地移除它。 -接下来,要移除它,你可以使用终端或 GUI . +接下来,要移除它,你可以使用终端或 GUI。 -警告! - -在删除内核时一定要额外的小心。只识别和删除旧内核,而不是当前你正在使用的内核,否则你将会拥有一个残缺的系统。 +> 警告! +> +> 在删除内核时一定要额外的小心。只识别和删除旧内核,而不是当前你正在使用的内核,否则你将会拥有一个残缺的系统。 ##### 使用一个 GUI 工具来移除旧的 Linux 内核 -你可以使用 [Synaptic 软件包管理器][8] 或一个类似 [Stacer][9] 的工具来开始。就我个人而言,当我遇到一个满满的 /boot 分区且 apt 损坏是,我使用 [Stacer][6] 来丢弃旧内核。因此,让我向你展示一下它看起的样子。 +你可以使用 [Synaptic 软件包管理器][8] 或一个类似 [Stacer][9] 的工具来开始。就我个人而言,当我遇到一个满满的 `/boot` 分区且 APT 损坏时,我使用 [Stacer][6] 来丢弃旧内核。因此,让我向你展示一下它看起的样子。 -首先,你需要启动 “**Stacer**” ,然后导航到软件包卸载器,如下面屏幕截图所示。 +首先,你需要启动 Stacer ,然后导航到软件包卸载器,如下面屏幕截图所示。 ![][10] -在这里,搜索 “**image**” ,你将找到你所拥有的 Linux 内核。你只需要删除旧内核版本的镜像,而不是当前内核的镜像。 +在这里,搜索 “image” ,你将找到你所拥有的 Linux 内核。你只需要删除旧内核版本的镜像,而不是当前内核的镜像。 -在上面的屏幕截图中,我已经指出了我系统上的当前内核和旧内核,因此你必需注意你系统上的内核。 +在上面的屏幕截图中,我已经指出了我系统上的当前内核和旧内核,因此你必须注意你系统上的内核。 你没有必要删除任何其它东西,只需要删除旧的内核版本。 -同样的,只需要在软件包列表中搜索 “**headers**” ,并删除如下显示的旧的 “**headers**” 版本。 +同样的,只需要在软件包列表中搜索 “headers” ,并删除如下显示的旧的 “headers” 版本。 ![][11] -只是提醒你,你 **不希望移除 “linux-headers-generic”** 。只是关注那些与其相关的有版本号的。 +作为提醒,你 **不会希望移除 `linux-headers-generic`** 。只关注一下那些与其相关的有版本号的就行。 -然后,就这样,你完成了所有的工作,apt 将会再次工作,并且你将成功地释放来自 /boot 分区的一些空间。同样地,你也可以使用任意其它的软件包管理器来完成这些工作。 +然后,就这样,你完成了所有的工作,APT 将会再次工作,并且你将成功地释放来自 `/boot` 分区的一些空间。同样地,你也可以使用任意其它的软件包管理器来完成这些工作。 #### 使用命令行来移除旧内核 -使用命令行来移除旧内核与使用 GUI 来移除旧内核是一样的。因此,如果你没有选择使用一款 GUI 软件 (如果它是一台远程机器/一项远程服务) 的权利,或者如果你只是对终端情有独钟,你可以仿效下面的步骤。 +使用命令行来移除旧内核与使用 GUI 来移除旧内核是一样的。因此,如果你没有选择使用 GUI 软件(如果它是一台远程机器/一项远程服务)的权利,或者如果你只是对终端情有独钟,你可以仿效下面的步骤。 首先,使用下面的命令列出所有已安装的内核: @@ -104,15 +104,15 @@ ls -l /boot ![][12] -写为 “**old**” 的内核,或者不匹配你当前内核版本,都是未使用的内核,你可以删除它们。 +标记为 “old” 的内核,或者不匹配你当前内核版本,都是未使用的内核,你可以删除它们。 -现在,你可以使用 **rm** 命令来移除具体指定来自 /boot 分区中的内核,使用下面的命令(一个命令对应一个内核): +现在,你可以使用 `rm` 命令来移除具体指定来自 `/boot` 分区中的内核,使用下面的命令(一个命令对应一个内核): ``` sudo rm /boot/vmlinuz-5.4.0-7634-generic ``` -务必检查你发系统的版本 — 它可能与你的系统的版本不同。 +务必检查系统的版本 — 这里可能与你的系统的版本不同。 如果你有很多未使用的内核,这将需要一些时间。因此,你也可以下面的命令丢弃多个内核: @@ -120,7 +120,7 @@ sudo rm /boot/vmlinuz-5.4.0-7634-generic sudo rm /boot/*-5.4.0-{7634}-* ``` -为了澄清这一点,你需要用逗号分隔内核版本号的最后一部分/编码,以便同时删除它们。 +为了清晰起见,你需要用逗号分隔内核版本号的最后一部分/编码,以便同时删除它们。 假设,我有两个旧的内核 5.4.0-7634-generic 和 5.4.0-7624 ,那么命令将是: @@ -128,15 +128,15 @@ sudo rm /boot/*-5.4.0-{7634}-* sudo rm /boot/*-5.4.0-{7634,7624}-* ``` -如果你不希望在 grub 启动菜单中再看到这些旧的内核版本,你可以使用下面的命令简单地 [更新 grub][13] : +如果你不希望在 grub 启动菜单中再看到这些旧的内核版本,你可以使用下面的命令简单地 [更新 grub][13]: ``` sudo update-grub ``` -就这样,你完成了所有的工作。你已经释放了空间,还修复了可能潜在的破损的 APT 问题,如果它是一个在你的 /boot 分区填满后出现的重要的问题的话。 +就这样,你完成了所有的工作。你已经释放了空间,还修复了可能潜在的破损的 APT 问题,如果它是一个在你的 `/boot` 分区填满后出现的重要的问题的话。 -在一些情况下,你需要输入这些命令来修复破损的 (正如我在论坛中注意到的): +在一些情况下,你需要输入这些命令来修复破损的(正如我在论坛中注意到的): ``` sudo dpkg --configure -a @@ -152,7 +152,7 @@ via: https://itsfoss.com/free-boot-partition-ubuntu/ 作者:[Ankush Das][a] 选题:[lujun9972][b] 译者:[robsean](https://github.com/robsean) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 73c447dba869f82075e16cf3a9a531fcb0dd9699 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 2 Nov 2020 09:56:11 +0800 Subject: [PATCH 042/130] PUB @robsean https://linux.cn/article-12779-1.html --- ...How to Free Up Space in -boot Partition on Ubuntu Linux.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20201002 How to Free Up Space in -boot Partition on Ubuntu Linux.md (99%) diff --git a/translated/tech/20201002 How to Free Up Space in -boot Partition on Ubuntu Linux.md b/published/20201002 How to Free Up Space in -boot Partition on Ubuntu Linux.md similarity index 99% rename from translated/tech/20201002 How to Free Up Space in -boot Partition on Ubuntu Linux.md rename to published/20201002 How to Free Up Space in -boot Partition on Ubuntu Linux.md index 085d6e978a..c73bd3a14d 100644 --- a/translated/tech/20201002 How to Free Up Space in -boot Partition on Ubuntu Linux.md +++ b/published/20201002 How to Free Up Space in -boot Partition on Ubuntu Linux.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (robsean) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12779-1.html) [#]: subject: (How to Free Up Space in /boot Partition on Ubuntu Linux?) [#]: via: (https://itsfoss.com/free-boot-partition-ubuntu/) [#]: author: (Ankush Das https://itsfoss.com/author/ankush/) From 68db4e26853c2a597fac0205faf986f8429ade48 Mon Sep 17 00:00:00 2001 From: chenmu-kk <53132802+chenmu-kk@users.noreply.github.com> Date: Mon, 2 Nov 2020 14:19:17 +0800 Subject: [PATCH 043/130] Update 20190925 Most enterprise networks can-t handle big data loads.md --- ...se networks can-t handle big data loads.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/sources/talk/20190925 Most enterprise networks can-t handle big data loads.md b/sources/talk/20190925 Most enterprise networks can-t handle big data loads.md index 52778b1b90..39c4a5195a 100644 --- a/sources/talk/20190925 Most enterprise networks can-t handle big data loads.md +++ b/sources/talk/20190925 Most enterprise networks can-t handle big data loads.md @@ -9,34 +9,34 @@ 大多数企业网络无法处理大数据负载 ====== -As more data moves through the network, efforts to keep up are lagging due to leadership and technology issues. +随着越来越多的数据通过网络传输,由于领导力和技术问题,数据网络跟上数据传输速度的工作正在滞后。 Metamorworks / Getty Images -Another week, another survey that finds IT cannot keep up with the ever-expanding data overload. This time the problem surrounds network bandwidth and overall performance. +又过了一周,另一项调查发现,IT已经无法跟上不断膨胀的数据过载。这次问题将围绕着网络带宽和整体性能展开。 -[A survey of 300 IT professionals][1] conducted by management consultant firm Accenture found the majority feel their enterprise networks are not up to the task of handling big data and internet of things (IoT) deployments. Only 43% of those companies polled said their networks are ready to support the cloud, IoT, and other digital technologies. +管理咨询公司埃森哲(Accenture)对[300名IT专业人士进行的一项调查][1] 发现,大多数人感觉他们企业网络无法胜任处理大数据的任务和物联网 (IoT) 部署。只有43%的受访公司表示他们的网络已经准备好支持云服务、物联网和其他数字技术。 **[ Learn more about SDN: Find out [where SDN is going][2] and learn the [difference between SDN and NFV][3]. | Get regularly scheduled insights: [Sign up for Network World newsletters][4]. ]** -A key reason (58%) is a “misalignment between IT and business needs” that is slowing those rollouts. That is an unusual finding, since 85% of respondents also reported that their networks were completely or mostly ready to support the business’ digital initiatives. So which is it? +一个关键原因(58%)是“IT与商业需求的不一致性”,这减缓了这些项目的推出。这是一个不同寻常的发现,因为85%的受访者也表示他们的网络已经完全或者大体上已经准备好支持企业的数字化计划。到底是哪一个呢? -The second and third most commonly cited barriers were “inherent complexities between business requirements and operational needs” and “demands for bandwidth, performance, etc. outpacing the ability to deliver” at 45% each. +第二和第三大时常提及的障碍是“业务需求和运营需求间固有的复杂性”以及“对带宽、性能等方面的需求超过交付能力”,各占45%。 -Network bottlenecks continue to grow as the sheer amount of data being pumped over the wires continues to increase thanks to analytics and other big data technologies. The survey found that bandwidth demands were not being met and current network performance continues to fall short. +由于分析技术和其他大数据技术的推动,大量传输数据持续涌入网络线路,网络瓶颈持续增长。调查发现,带宽需求并未满足,目前的网络性能依旧达不到要求。 -Other reasons cited were lack of networking skills, device sprawl, and aging equipment. +其他原因还包括缺乏网络技术、设备扩展和设备老化。 -### One solution to network performance woes: SDN +### 网络性能问题的一个解决方案:SDN -Accenture found that most firms said [software-defined networks (SDN)][5] were the solution for bandwidth and performance challenges, with 77% of those surveyed reporting they were in the process of deploying SDN or have completed the deployment. It qualified that, noting that while SDN may be in place in parts of the organization, it is not always rolled out uniformly enterprise-wide. +埃森哲发现,大多数公司表示 [软件定义网络 (SDN)][5] 是应对带宽和性能挑战的解决方案,77%的受访企业在调查中表示正在部署SDN或者已完成部署。它指出,虽然SDN可能在组织的某部分中存在,它并不总是在整个企业范围内统一地推出。 **** From HPE: [ITaaS and Corporate Storage Technology][6]: This blog explains why pay-per-use IT models, such as ITaaS, could be the next chapter in IT infrastructure. (Sponsored) **** -Now, while it seems no one ever has enough budget for all of their IT ambitions, 31% of those surveyed describe funding network improvements as “easy” and within the network infrastructure team’s control, with CIOs/CTOs being much more likely to report the funding process as “easy” (40%), compared to their direct reports (13%) or directors and vice presidents of infrastructure/network (19%).  +如今看来,似乎从未有人有足够的预算来满足他们所有的IT雄心,但31%受访者认为网络改善筹资“简单”。而且在网络基础设施团队的控制下,首席信息官/首席技术官更可能将融资过程报告为“轻松”(40%),相较于直接下属(13%)或基础设施/网络主管和副总裁(19%)。 -Saying, "Legacy networks alone cannot support the innovation and performance required in the digital age," the report calls for embracing new technologies, without saying SDN by name. It also called for greater collaboration between the C suite and their direct reports because it was clear there was a disconnect between how the two sides viewed things. +报告指出,“仅靠传统网络无法支持数字时代所需的创新和性能。”呼吁拥抱新技术,但没有提到SDN的名字。同时呼吁首席执行官和他们直接下属间加强合作,因为很明显,双方在看待问题的方式上存在分歧。 -"We believe a new network paradigm is needed to ensure networks meet current and future business needs. However, although there are signs of progress, the pace of change is slow. Companies must undertake significant work before they achieve a unified and standardized enterprise capability that will offer the bandwidth, performance and security necessary to support business needs today—and tomorrow," the report concluded. +报告总结说,“我们认为需要一种新的网络范式来确保网络满足当前和未来的业务需求。然而,尽管有进步的迹象,但改变的步伐缓慢。公司必须承担起重担,才能实现统一和标准化企业能力,提供必要的带宽、性能和安全,以支持当前和未来的业务需求”。 **[ Now see: [How network pros acquire skills for SDN, programmable networks][7] ]** From 43146304d8f5023c082a9a93d0779740bf52e39a Mon Sep 17 00:00:00 2001 From: chenmu-kk <53132802+chenmu-kk@users.noreply.github.com> Date: Mon, 2 Nov 2020 14:21:01 +0800 Subject: [PATCH 044/130] Update 20190925 Most enterprise networks can-t handle big data loads.md --- ...0925 Most enterprise networks can-t handle big data loads.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/talk/20190925 Most enterprise networks can-t handle big data loads.md b/sources/talk/20190925 Most enterprise networks can-t handle big data loads.md index 39c4a5195a..53fb677838 100644 --- a/sources/talk/20190925 Most enterprise networks can-t handle big data loads.md +++ b/sources/talk/20190925 Most enterprise networks can-t handle big data loads.md @@ -48,7 +48,7 @@ via: https://www.networkworld.com/article/3440519/most-enterprise-networks-cant- 作者:[Andy Patrizio][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[chenmu-kk](https://github.com/chenmu-kk) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From bd1e0f4ec39b8ab486ee03c9624df516af227ec8 Mon Sep 17 00:00:00 2001 From: chenmu-kk <53132802+chenmu-kk@users.noreply.github.com> Date: Mon, 2 Nov 2020 14:23:29 +0800 Subject: [PATCH 045/130] Rename sources/talk/20190925 Most enterprise networks can-t handle big data loads.md to translated/talk/20190925 Most enterprise networks can-t handle big data loads.md --- ...190925 Most enterprise networks can-t handle big data loads.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/talk/20190925 Most enterprise networks can-t handle big data loads.md (100%) diff --git a/sources/talk/20190925 Most enterprise networks can-t handle big data loads.md b/translated/talk/20190925 Most enterprise networks can-t handle big data loads.md similarity index 100% rename from sources/talk/20190925 Most enterprise networks can-t handle big data loads.md rename to translated/talk/20190925 Most enterprise networks can-t handle big data loads.md From 81532e53e440b87a4ed77b1a8bcb3e7aa2a59ae3 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 3 Nov 2020 00:07:12 +0800 Subject: [PATCH 046/130] PRF @gxlct008 --- ...0503 Go on very small hardware (Part 3).md | 110 +++++++++--------- 1 file changed, 53 insertions(+), 57 deletions(-) diff --git a/translated/tech/20180503 Go on very small hardware (Part 3).md b/translated/tech/20180503 Go on very small hardware (Part 3).md index 28d5817236..11ef451aa7 100644 --- a/translated/tech/20180503 Go on very small hardware (Part 3).md +++ b/translated/tech/20180503 Go on very small hardware (Part 3).md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (gxlct008) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Go on very small hardware Part 3) @@ -9,27 +9,31 @@ Go 语言在极小硬件上的运用(三) ====== -[![STM32F030F4P6][1]][2] -在本系列的 [第一][3] 和 [第二][4] 部分中讨论的大多数示例都是以一种或另一种方式闪烁的 LED。起初它可能很有趣,但是一段时间后变得有些无聊。让我们做些更有趣的事情…… +![](https://img.linux.net.cn/data/attachment/album/202010/24/090026to9c9sweyrw9ww37.png) + + +在本系列的 [第一][3] 和 [第二][4] 部分中讨论的大多数示例都是以某种方式闪烁的 LED。起初它可能很有趣,但是一段时间后变得有些无聊。让我们做些更有趣的事情…… …让我们点亮更多的 LED! -### WS281x LEDs +![STM32F030F4P6][1] -[WS281x][5] RGB LED(及其克隆)非常受欢迎。您可以作为单个元素购买、链成长条或组装成矩阵、环或其他形状因子。 +### WS281x LED + +[WS281x][5] RGB LED(及其克隆品)非常受欢迎。你可以以单个元素购买、链成长条或组装成矩阵、环或其他形状。 ![WS2812B][6] -它们可以串联连接,基于这个事实,您可以只用 MCU 的单个引脚就可以控制一个很长的 LED 灯条。不幸的是,它们的内部控制器使用的物理协议不能直接适用于您在 MCU 中可以找到的任何外围设备。您必须使用 位脉冲bit-banging或以特殊方式使用可用的外设。 +它们可以串联连接,基于这个事实,你可以只用 MCU 的单个引脚就可以控制一个很长的 LED 灯条。不幸的是,它们的内部控制器使用的物理协议不能直接适用于你在 MCU 中可以找到的任何外围设备。你必须使用 位脉冲bit-banging或以特殊方式使用可用的外设。 -哪种可用的解决方案最有效取决于同时控制的 LED 灯条数量。如果您必须驱动 4 到 16 个条带,那么最有效的方法是 [使用定时器和 DMA][7](请不要忽略 Martin 文章末尾的链接)。 +哪种可用的解决方案最有效取决于同时控制的 LED 灯条数量。如果你必须驱动 4 到 16 个灯条,那么最有效的方法是 [使用定时器和 DMA][7](请不要忽略这篇文章末尾的链接)。 -如果只需要控制一个或两个条带,请使用可用的 SPI 或 UART 外设。对于 SPI,您只能在发送的一个字节中编码两个 WS281x 位。由于巧妙地使用了起始位和停止位,UART 允许更密集的编码:每发送一个字节 3 位。 +如果只需要控制一个或两个灯条,请使用可用的 SPI 或 UART 外设。对于 SPI,你只能在发送的一个字节中编码两个 WS281x 位。由于巧妙地使用了起始位和停止位,UART 允许更密集的编码:每发送一个字节 3 位。 -我在 [此站点][8] 上找到了有关 UART 协议如何适用于 WS281x 协议的最佳解释。如果您不懂波兰语,这里是 [英文翻译][9]。 +我在 [此站点][8] 上找到了有关 UART 协议如何适用于 WS281x 协议的最佳解释。如果你不懂波兰语,这里是 [英文翻译][9]。 -基于 WS281x 的 LED 仍然是最受欢迎的,但市场上也有 SPI 控制的 LED:[APA102][10],[SK9822][11]。关于它们的三篇有趣的文章在这里:[1][12],[2][13],[3][14] +基于 WS281x 的 LED 仍然是最受欢迎的,但市场上也有 SPI 控制的 LED:[APA102][10]、[SK9822][11]。关于它们的三篇有趣的文章在这里:[1][12]、[2][13]、[3][14]。 ### LED 环 @@ -43,12 +47,11 @@ Go 语言在极小硬件上的运用(三) ![WS2812B][16] -我们的 STM32F030F4P6 MCU 和整个 STM32 F0、F3、F7、L4 系列具有 F1、F4、L1 MCU 不具备的一项重要功能:它可以反转 UART 信号,因此我们可以将环直接连接到 UART TXD 引脚。如果您不知道我们需要这种反转,那么您可能没有读过我上面提到的 [文章][9]。 +我们的 STM32F030F4P6 MCU 和整个 STM32 F0、F3、F7、L4 系列具有 F1、F4、L1 MCU 不具备的一项重要功能:它可以反转 UART 信号,因此我们可以将环直接连接到 UART TXD 引脚。如果你不知道我们需要这种反转,那么你可能没有读过我上面提到的 [文章][9]。 -因此,您不能以这种方式使用流行的 [Blue Pill][17] 或 [STM32F4-DISCOVERY][18]。使用其 SPI 外设或外部反相器。有关使用 SPI 的 NUCLEO-F411RE,请参见 [圣诞树灯][19] 项目作为 UART + 逆变器的示例或 [WS2812示例][20]。 +因此,你不能以这种方式使用流行的 [Blue Pill][17] 或 [STM32F4-DISCOVERY][18]。使用其 SPI 外设或外部反相器。有关使用 SPI 的 NUCLEO-F411RE,请参见 [圣诞树灯][19] 项目作为 UART + 逆变器的示例或 [WS2812示例][20]。 - -顺便说一下,大多数 DISCOVERY 板可能还有一个问题:它们在 VDD = 3V 而不是 3.3V 的情况下工作。 对于高 DI,WS281x 至少要求电源电压 * 0.7。如果是 5V 电源,则为 3.5V;如果是 4.7V 电源,则为 3.3V;可在 DISCOVERY 的 5V 引脚上找到。如您所见,即使在我们的情况下,第一个 LED 的工作电压也低于规格 0.2V。对于 DISCOVERY 板,如果供电 4.7V,它将工作在低于规格的 0.3V 下;如果供电 5V,它将工作在低于规格 0.5V 下。 +顺便说一下,大多数 DISCOVERY 板可能还有一个问题:它们在 VDD = 3V 而不是 3.3V 的情况下工作。 对于高 DI,WS281x 至少要求电源电压 * 0.7。如果是 5V 电源,则为 3.5V;如果是 4.7V 电源,则为 3.3V;可在 DISCOVERY 的 5V 引脚上找到。如你所见,即使在我们的情况下,第一个 LED 的工作电压也低于规格 0.2V。对于 DISCOVERY 板,如果供电 4.7V,它将工作在低于规格的 0.3V 下;如果供电 5V,它将工作在低于规格 0.5V 下。 让我们结束这段冗长的介绍并转到代码: @@ -134,9 +137,9 @@ var ISRs = [...]func(){ } ``` -##### 导入部分 +#### 导入部分 -与前面的示例相比,导入部分中的新内容是 `rand/math` 包和带有 `led/ws281x` 子树的 led 包。 led 包本身包含 `Color` 类型的定义。 `led/ws281x/wsuart` 定义了 `ColorOrder`、`Pixel` 和 `Strip` 类型。 +与前面的示例相比,导入部分中的新内容是 `rand/math` 包和带有 `led/ws281x` 子树的 `led` 包。 `led` 包本身包含 `Color` 类型的定义。 `led/ws281x/wsuart` 定义了 `ColorOrder`、`Pixel` 和 `Strip` 类型。 我想知道如何使用 `image/color` 中的 `Color` 或 `RGBA` 类型,以及如何以它将实现 `image.Image` 接口的方式定义 `Strip`。 但是由于使用了 [gamma 校正][21] 和 大开销的 `color/draw` 包,我以简单的方式结束: @@ -147,13 +150,13 @@ type Strip []Pixel 使用一些有用的方法。然而,这种情况在未来可能会改变。 -##### init 函数 +#### init 函数 `init` 函数没有太多新颖之处。 UART 波特率从 115200 更改为 3000000000/1390 ≈ 2158273,相当于每个 WS2812 位 1390 纳秒。 CR2 寄存器中的 TxInv 位设置为反转 TXD 信号。 -##### main 函数 +#### main 函数 -`XorShift64` 伪随机数生成器用于生成随机颜色。 [XORSHIFT][22] 是目前由 `math/rand` 包实现的唯一算法。您必须使用带有非零参数的 `Seed` 方法显式初始化它。 +`XorShift64` 伪随机数生成器用于生成随机颜色。 [XORSHIFT][22] 是目前由 `math/rand` 包实现的唯一算法。你必须使用带有非零参数的 `Seed` 方法显式初始化它。 `rgb` 变量的类型为 `wsuart.ColorOrder`,并设置为 WS2812 使用的 GRB 颜色顺序(WS2811 使用 RGB 顺序)。然后用于将颜色转换为像素。 @@ -166,9 +169,9 @@ strip.Clear() 其余代码使用随机颜色绘制类似于 “Please Wait…” 微调器的内容。 -条带切片充当帧缓冲区。 `tts.Write(strip.Bytes()` 将帧缓冲区的内容发送到环。 +`strip` 切片充当帧缓冲区。 `tts.Write(strip.Bytes())` 将帧缓冲区的内容发送到环。 -##### 中断 +#### 中断 该程序由处理中断的代码组成,与先前的 [UART 示例][23] 中的代码相同。 @@ -182,27 +185,25 @@ $ arm-none-eabi-size cortexm0.elf $ openocd -d0 -f interface/stlink.cfg -f target/stm32f0x.cfg -c 'init; program cortexm0.elf; reset run; exit' ``` -我跳过了 openocd 输出。下面的视频显示了该程序的工作原理: +我跳过了 `openocd` 的输出。下面的视频显示了该程序的工作原理: 原文中插入视频的代码: - + +![video](https://ziutek.github.io/videos/rgbspinner.mp4) ### 让我们做些有用的事情... -在 [第一部分][3] 的开头,我曾问过:“我们能降到多低,还能做一些有用的事情?”。 我们的 MCU 实际上是一种低端设备(8 比特的人可能会不同意我的看法),但到目前为止,我们还没有做任何有用的事情。 +在 [第一部分][3] 的开头,我曾问过:“Go 能深入到多低层,而还能做一些有用的事情?”。 我们的 MCU 实际上是一种低端设备(8 比特的人可能会不同意我的看法),但到目前为止,我们还没有做任何有用的事情。 所以... 让我们做些有用的事情... 让我们做个时钟! -在互联网上有许多由 RGB LED 构成的时钟示例。让我们用小板子和 RGB 环制作自己的时钟。我们按照下面的描述更改先前的代码。 +在互联网上有许多由 RGB LED 构成的时钟示例。让我们用我们的小板子和 RGB 环制作自己的时钟。我们按照下面的描述更改先前的代码。 -##### 导入部分 +#### 导入部分 删除 `math/rand` 包,然后添加 `stm32/hal/exti`。 -##### 全局变量 +#### 全局变量 添加两个新的全局变量:`btn` 和 `btnev`: @@ -214,9 +215,9 @@ var ( ) ``` -它们将用来处理那些用于设置时钟的 “button”。我们的板子除了重置之外没有其他按钮,但是如果没有它,我们仍然可以通过某种方式进行管理。 +它们将用来处理那些用于设置时钟的 “按钮”。我们的板子除了重置之外没有其他按钮,但是如果没有它,我们仍然可以通过某种方式进行管理。 -##### init 函数 +#### init 函数 将这段代码添加到 `init` 函数: @@ -237,9 +238,9 @@ rtos.IRQ(irq.EXTI4_15).Enable() 我们使用 EXTI 外设来跟踪 PA4 状态。它被配置为在发生任何更改时都会产生中断。 -##### btnWait 函数 +#### btnWait 函数 -定义一个新的辅助功能: +定义一个新的辅助函数: ``` func btnWait(state int, deadline int64) bool { @@ -254,7 +255,7 @@ func btnWait(state int, deadline int64) bool { } ``` -它等待 “button” 引脚上的指定状态,但只等到最后期限出现。这是稍微改进的轮询代码: +它等待 “按钮” 引脚上的指定状态,但只等到最后期限出现。这是稍微改进的轮询代码: ``` for btn.Load() != state { @@ -264,9 +265,9 @@ for btn.Load() != state { } ``` -我们的 `btnWait` 函数不是忙于等待状态或截止日期,而是使用 `rtos.EventFlag` 类型的 `btnev` 变量休眠,直到有事情发生。您当然可以使用通道而不是 `rtos.EventFlag`,但是后者便宜得多。 +我们的 `btnWait` 函数不是忙于等待 `state` 或 `deadline`,而是使用 `rtos.EventFlag` 类型的 `btnev` 变量休眠,直到有事情发生。你当然可以使用通道而不是 `rtos.EventFlag`,但是后者便宜得多。 -##### main 函数 +#### main 函数 我们需要全新的 `main` 函数: @@ -331,11 +332,11 @@ func main() { } ``` -我们使用 `rtos.Nanosec` 函数代替 `time.Now` 来获取当前时间。这样可以节省大量的 Flash,但也使我们的时钟变成了不知道日、月、年的老式设备,最糟糕的是它无法处理夏令时的变化。 +我们使用 `rtos.Nanosec` 函数代替 `time.Now` 来获取当前时间。这样可以节省大量的闪存,但也使我们的时钟变成了不知道日、月、年的老式设备,最糟糕的是它无法处理夏令时的变化。 我们的环有 24 个 LED,因此秒针的显示精度可以达到 2.5 秒。为了不牺牲这种精度并获得流畅的运行效果,我们使用 1/4 秒作为基准间隔。半秒就足够了,但四分之一秒更准确,而且与 16 和 48 个 LED 配合使用也很好。 -红色、绿色和蓝色分别用于时针、分针和秒针。这允许我们使用简单的 `逻辑或操作` 进行颜色混合。我们 `Color.Blend` 方法可以混合任意颜色,但是我们缺少 Flash,所以我们选择最简单的解决方案。 +红色、绿色和蓝色分别用于时针、分针和秒针。这允许我们使用简单的“逻辑或操作”进行颜色混合。我们 `Color.Blend` 方法可以混合任意颜色,但是我们闪存不多,所以我们选择最简单的解决方案。 我们只有在秒针移动时才重画时钟。 @@ -345,9 +346,9 @@ btnWait(0, int64(qs+ds)*25e7) 上面的这行代码等待的正是那一刻,或者是按钮的按下。 -每按一下按钮就会把时钟向前调一调。按住按钮一段时间会产生加速度。 +每按一下按钮就会把时钟向前调一调。按住按钮一段时间会加速调整。 -##### 中断 +#### 中断 定义新的中断处理程序: @@ -363,12 +364,11 @@ func exti4_15ISR() { 并将 `irq.EXTI4_15: exti4_15ISR` 条目添加到 ISR 数组。 -该处理程序(或中断服务程序)处理 EXTI4_15 IRQ。 Cortex-M0 CPU 支持的 IRQ 明显少于其较大的同类兄弟处理器,因此您经常可以看到一个 IRQ 被多个中断源共享。在我们的例子中,一个 IRQ 由 12 个 EXTI 线共享。 +该处理程序(或中断服务程序)处理 EXTI4_15 IRQ。 Cortex-M0 CPU 支持的 IRQ 明显少于其较大的同类兄弟处理器,因此你经常可以看到一个 IRQ 被多个中断源共享。在我们的例子中,一个 IRQ 由 12 个 EXTI 线共享。 -exti4_15ISR 读取所有挂起的位,并从中选择 12 个更高的有效位。接下来,它清除 EXTI 中选中的位并开始处理它们。在我们的例子中,仅检查第 4 位。 `btnev.Signal(1)` 引发 `btnev.Wait(1, deadline)` 唤醒并返回 true。 +exti4_15ISR 读取所有挂起的位,并从中选择 12 个更高的有效位。接下来,它清除 EXTI 中选中的位并开始处理它们。在我们的例子中,仅检查第 4 位。 `btnev.Signal(1)` 引发 `btnev.Wait(1, deadline)` 唤醒并返回 `true`。 - -您可以在 [Github][24] 上找到完整的代码。让我们来编译它: +你可以在 [Github][24] 上找到完整的代码。让我们来编译它: ``` $ egc @@ -377,7 +377,7 @@ $ arm-none-eabi-size cortexm0.elf 15960 240 216 16416 4020 cortexm0.elf ``` -这里所有的改进只有 184 个字节。让我们再次重新构建所有内容,但这次在 typeinfo 中不使用任何类型和字段名: +这里所有的改进只得到 184 个字节。让我们再次重新构建所有内容,但这次在 typeinfo 中不使用任何类型和字段名: ``` $ cd $HOME/emgo @@ -389,26 +389,22 @@ $ arm-none-eabi-size cortexm0.elf 15120 240 216 15576 3cd8 cortexm0.elf ``` -现在,有了千字节的空闲空间,您可以改进一些东西。让我们看看它是如何工作的: +现在,有了千字节的空闲空间,你可以改进一些东西。让我们看看它是如何工作的: -原文中插入视频的代码: - +![video](https://ziutek.github.io/videos/rgbclock.mp4) 我不知道我是怎么精确打到 3:00 的!? -以上就是所有内容!在第 4 部分(本系列的结束)中,我们将尝试在 LCD 上显示一些内容。 +以上就是所有内容!在第 4 部分(本系列的结束)中,我们将尝试在 LCD 上显示一些内容。(LCTT 译注:然而烂尾了,第三篇写于 2018 年,整个博客当年就停更了。) -------------------------------------------------------------------------------- via: https://ziutek.github.io/2018/05/03/go_on_very_small_hardware3.html -作者:[-;Michał Derkacz][a] +作者:[Michał Derkacz][a] 选题:[lujun9972][b] 译者:[gxlct008](https://github.com/gxlct008) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -416,8 +412,8 @@ via: https://ziutek.github.io/2018/05/03/go_on_very_small_hardware3.html [b]: https://github.com/lujun9972 [1]: https://ziutek.github.io/images/mcu/f030-demo-board/board.jpg [2]: https://ziutek.github.io/2018/05/03/go_on_very_small_hardware3.html -[3]: https://ziutek.github.io/2018/03/30/go_on_very_small_hardware.html -[4]: https://ziutek.github.io/2018/04/14/go_on_very_small_hardware2.html +[3]: https://linux.cn/article-11383-1.html +[4]: https://linux.cn/article-12747-1.html [5]: http://www.world-semi.com/solution/list-4-1.html [6]: https://ziutek.github.io/images/led/ws2812b.jpg [7]: http://www.martinhubacek.cz/arm/improved-stm32-ws2812b-library From b4550919c2bb51194a8723ec25c4c8081d3838b8 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 3 Nov 2020 00:09:13 +0800 Subject: [PATCH 047/130] PUB @gxlct008 https://linux.cn/article-12782-1.html --- .../20180503 Go on very small hardware (Part 3).md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20180503 Go on very small hardware (Part 3).md (99%) diff --git a/translated/tech/20180503 Go on very small hardware (Part 3).md b/published/20180503 Go on very small hardware (Part 3).md similarity index 99% rename from translated/tech/20180503 Go on very small hardware (Part 3).md rename to published/20180503 Go on very small hardware (Part 3).md index 11ef451aa7..ac3c5c9ebc 100644 --- a/translated/tech/20180503 Go on very small hardware (Part 3).md +++ b/published/20180503 Go on very small hardware (Part 3).md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (gxlct008) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12782-1.html) [#]: subject: (Go on very small hardware Part 3) [#]: via: (https://ziutek.github.io/2018/05/03/go_on_very_small_hardware3.html) [#]: author: (Michał Derkacz ) From 9b72fc0e71dafb5855a72cb5c78646e6eb04dd20 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 3 Nov 2020 00:14:34 +0800 Subject: [PATCH 048/130] PRF --- published/20180503 Go on very small hardware (Part 3).md | 2 -- 1 file changed, 2 deletions(-) diff --git a/published/20180503 Go on very small hardware (Part 3).md b/published/20180503 Go on very small hardware (Part 3).md index ac3c5c9ebc..4fa8c39c6d 100644 --- a/published/20180503 Go on very small hardware (Part 3).md +++ b/published/20180503 Go on very small hardware (Part 3).md @@ -187,8 +187,6 @@ $ openocd -d0 -f interface/stlink.cfg -f target/stm32f0x.cfg -c 'init; program c 我跳过了 `openocd` 的输出。下面的视频显示了该程序的工作原理: -原文中插入视频的代码: - ![video](https://ziutek.github.io/videos/rgbspinner.mp4) ### 让我们做些有用的事情... From 82f7535b747cb6c0fb4a8500ccb77be5a87d8e16 Mon Sep 17 00:00:00 2001 From: "Xiaobin.Liu" Date: Tue, 3 Nov 2020 00:42:41 +0800 Subject: [PATCH 049/130] APL --- ...atabase knowledge with this MariaDB and MySQL cheat sheet.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20201029 Improve your database knowledge with this MariaDB and MySQL cheat sheet.md b/sources/tech/20201029 Improve your database knowledge with this MariaDB and MySQL cheat sheet.md index 3fd06952ce..b68e42e455 100644 --- a/sources/tech/20201029 Improve your database knowledge with this MariaDB and MySQL cheat sheet.md +++ b/sources/tech/20201029 Improve your database knowledge with this MariaDB and MySQL cheat sheet.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (lxbwolf) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From ecd9342d21aafe5dfa8e40a349b30d32f9e776bc Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 3 Nov 2020 05:01:37 +0800 Subject: [PATCH 050/130] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020201102=20?= =?UTF-8?q?4=20cool=20new=20projects=20to=20try=20in=20COPR=20from=20Octob?= =?UTF-8?q?er=202020?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20201102 4 cool new projects to try in COPR from October 2020.md --- ...ojects to try in COPR from October 2020.md | 132 ++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 sources/tech/20201102 4 cool new projects to try in COPR from October 2020.md diff --git a/sources/tech/20201102 4 cool new projects to try in COPR from October 2020.md b/sources/tech/20201102 4 cool new projects to try in COPR from October 2020.md new file mode 100644 index 0000000000..b88e106090 --- /dev/null +++ b/sources/tech/20201102 4 cool new projects to try in COPR from October 2020.md @@ -0,0 +1,132 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (4 cool new projects to try in COPR from October 2020) +[#]: via: (https://fedoramagazine.org/4-cool-new-projects-to-try-in-copr-from-october-2020/) +[#]: author: (frostyx https://fedoramagazine.org/author/frostyx/) + +4 cool new projects to try in COPR from October 2020 +====== + +![][1] + +COPR is a [collection][2] of personal repositories for software +that isn’t carried in Fedora. Some software doesn’t conform to +standards that allow easy packaging. Or it may not meet other Fedora +standards, despite being free and open-source. COPR can offer these +projects outside the Fedora set of packages. Software in COPR isn’t +supported by Fedora infrastructure or signed by the project. However, +it can be a neat way to try new or experimental software. + +This article presents a few new and interesting projects in COPR. If +you’re new to using COPR, see the [COPR User Documentation][3] +for how to get started. + +### Dialect + +[Dialect][4] translates text to foreign languages using Google Translate. It remembers your translation history and supports features such as automatic language detection and text to speech. The user interface is minimalistic and mimics the Google Translate tool itself, so it is really easy to use. + +![][5] + +#### Installation instructions + +The [repo][6] currently provides Dialect for Fedora 33 and Fedora +Rawhide. To install it, use these commands: + +``` +sudo dnf copr enable lyessaadi/dialect +sudo dnf install dialect +``` + +### GitHub CLI + +[gh][7] is an official GitHub command-line client. It provides fast +access and full control over your project issues, pull requests, and +releases, right in the terminal. Issues (and everything else) can also +be easily viewed in the web browser for a more standard user interface +or sharing with others. + +![][8] + +#### Installation instructions + +The [repo][9] currently provides _gh_ for Fedora 33 and Fedora +Rawhide. To install it, use these commands: + +``` +sudo dnf copr enable jdoss/github-cli +sudo dnf install github-cli +``` + +### Glide + +[Glide][10] is a minimalistic media player based on GStreamer. It +can play both local and remote files in any multimedia format +supported by GStreamer itself. If you are in need of a multi-platform +media player with a simple user interface, you might want to give Glide a try. + +![][11] + +#### Installation instructions + +The [repo][12] currently provides Glide for Fedora 32, 33, and +Rawhide. To install it, use these commands: + +``` +sudo dnf copr enable atim/glide-rs +sudo dnf install glide-rs +``` + +### Vim ALE + +[ALE][13] is a plugin for Vim text editor, providing syntax and +semantic error checking. It also brings support for fixing code and +many other IDE-like features such as TAB-completion, jumping to +definitions, finding references, viewing documentation, etc. + +![][14] + +#### Installation instructions + +The [repo][15] currently provides _vim-ale_ for Fedora 31, +32, 33, and Rawhide, as well as for EPEL8. To install it, use these +commands: + +``` +sudo dnf copr enable praiskup/vim-ale +sudo dnf install vim-ale +``` + +Editors note: Previous COPR articles can be found [here][16]. + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/4-cool-new-projects-to-try-in-copr-from-october-2020/ + +作者:[frostyx][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://fedoramagazine.org/author/frostyx/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2017/08/4-copr-945x400.jpg +[2]: https://copr.fedorainfracloud.org/ +[3]: https://docs.pagure.org/copr.copr/user_documentation.html +[4]: https://github.com/gi-lom/dialect +[5]: https://fedoramagazine.org/wp-content/uploads/2020/10/dialect.png +[6]: https://copr.fedorainfracloud.org/coprs/lyessaadi/dialect/ +[7]: https://github.com/cli/cli +[8]: https://fedoramagazine.org/wp-content/uploads/2020/10/github-cli.png +[9]: https://copr.fedorainfracloud.org/coprs/jdoss/github-cli/ +[10]: https://github.com/philn/glide +[11]: https://fedoramagazine.org/wp-content/uploads/2020/10/glide.png +[12]: https://copr.fedorainfracloud.org/coprs/atim/glide-rs/ +[13]: https://github.com/dense-analysis/ale +[14]: https://fedoramagazine.org/wp-content/uploads/2020/10/vim-ale.png +[15]: https://copr.fedorainfracloud.org/coprs/praiskup/vim-ale/ +[16]: https://fedoramagazine.org/?s=COPR From bafd09268f45bfd6b57ed4a40c9413cb181841bc Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 3 Nov 2020 05:03:11 +0800 Subject: [PATCH 051/130] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020201103=20?= =?UTF-8?q?The=20New=20Raspberry=20Pi=20400=20is=20Basically=20a=20Tiny=20?= =?UTF-8?q?Computer=20Inside=20a=20Keyboard?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20201103 The New Raspberry Pi 400 is Basically a Tiny Computer Inside a Keyboard.md --- ...cally a Tiny Computer Inside a Keyboard.md | 101 ++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 sources/tech/20201103 The New Raspberry Pi 400 is Basically a Tiny Computer Inside a Keyboard.md diff --git a/sources/tech/20201103 The New Raspberry Pi 400 is Basically a Tiny Computer Inside a Keyboard.md b/sources/tech/20201103 The New Raspberry Pi 400 is Basically a Tiny Computer Inside a Keyboard.md new file mode 100644 index 0000000000..016bd1c5cb --- /dev/null +++ b/sources/tech/20201103 The New Raspberry Pi 400 is Basically a Tiny Computer Inside a Keyboard.md @@ -0,0 +1,101 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (The New Raspberry Pi 400 is Basically a Tiny Computer Inside a Keyboard) +[#]: via: (https://itsfoss.com/raspberry-pi-400/) +[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) + +The New Raspberry Pi 400 is Basically a Tiny Computer Inside a Keyboard +====== + +Raspberry Pi needs no introduction. What started as a low-spec computer for DIY enthusiasts, it can now be used as full-featured desktop. + +With the Raspberry Pi 400 release, they are making it more friendly for home computer usage. The Raspberry Pi 400 is basically a computer in the form of a keyboard. + +If you remember, [Commodore 64][1] was also a computer in the form of a keyboard back in 1982. Even though it isn’t unique, for a successful product like Raspberry Pi, it is a sweet deal. + +### Raspberry Pi 400: Overview + +![][2] + +It is based on the Raspberry Pi 4 (with 4 GB RAM) and has been tweaked to run cooler as well. With a Quad-core processor, it is faster than ever. + +Not just limited to the ease of use and portability, but it should save you a lot of desk space. And, just like me, if you were planning to get a spare computer to test stuff, I think I may want to go with the Raspberry Pi 400 instead of building another PC or [Linux-based mini PC][3]. + +Even though I’ve mentioned the tech specs below, you can watch the official video to get an idea on how it looks and if it’s promising enough as your home computer: + +### Raspberry Pi 400 specification + +Here’s the tech specs for the Pi 400: + + * Broadcom BCM2711 quad-core Cortex-A72 (ARM v8) 64-bit SoC @ 1.8GHz + * 4GB LPDDR4-3200 + * Dual-band (2.4GHz and 5.0GHz) IEEE 802.11b/g/n/ac wireless LAN + * Bluetooth 5.0, BLE + * Gigabit Ethernet + * 2 × USB 3.0 and 1 × USB 2.0 ports + * Horizontal 40-pin GPIO header + * 2 × micro HDMI ports (supports up to 4Kp60) + * H.265 (4Kp60 decode); H.264 (1080p60 decode, 1080p30 encode); OpenGL ES 3.0 graphics + * MicroSD card slot for operating system and data storage + * 78- or 79-key compact keyboard (depending on regional variant) + * 5V DC via USB connector + * Operating temperature: 0°C to +50°C ambient + * Maximum dimensions 286 mm × 122 mm × 23 mm + + + +![][4] + +### Pricing & Availability + +For **$70**, this is the best modern home computer that you can get with the simplicity of just having a keyboard and being able to carry it anywhere (you just need a screen to connect to). + +You can either get just the Raspberry Pi 400 for **$70** or get the complete kit for **$100** with a USB mouse, micro HDMI to HDMI cable, USB-C power supply, a beginners guide, and an SD card with Raspberry Pi OS pre-installed. + +If you’re wondering, for the keyboard layout support, here’s what the press release mentioned: + +> At launch, we are supporting English (UK and US), French, Italian, German, and Spanish keyboard layouts, with (for the first time) translated versions of the Beginner’s Guide. In the near future, we plan to support the same set of languages as our [official keyboard][5]. + +In other words, they support every major keyboard layout to start with. So, it shouldn’t be an issue for the majority. + +In addition to the details for keyboard layout, here’s how you can get your hands on a Raspberry Pi 400: + +> UK, US, and French Raspberry Pi 400 [kits][6] and [computers][7] are available to buy right now. Italian, German, and Spanish units are on their way to Raspberry Pi Approved Resellers, who should have them in stock in the next week. +> +> We expect that Approved Resellers in India, Australia, and New Zealand will have kits and computers in stock by the end of the year. We’re rapidly rolling out compliance certification for other territories too, so that Raspberry Pi 400 will be available around the world in the first few months of 2021. +> +> Of course, if you’re anywhere near Cambridge, you can head over to the [Raspberry Pi Store][8] to pick up your Raspberry Pi 400 today. + +[Raspberry Pi 400][9] + +### Wrapping Up + +Raspberry Pi 400 is definitely something impressive and useful in the current time when remote work is becoming the new norm. + +What do you think about the new Raspberry Pi 400? Planning to get one? Let me know your thoughts in the comments below. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/raspberry-pi-400/ + +作者:[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://en.wikipedia.org/wiki/Commodore_64 +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/11/raspberry-pi-400.jpg?resize=800%2C554&ssl=1 +[3]: https://itsfoss.com/linux-based-mini-pc/ +[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/11/raspberry-pi-400-shot.jpeg?resize=800%2C572&ssl=1 +[5]: https://www.raspberrypi.org/products/raspberry-pi-keyboard-and-hub/ +[6]: https://www.raspberrypi.org/products/raspberry-pi-400/ +[7]: https://www.raspberrypi.org/products/raspberry-pi-400-unit/ +[8]: https://www.raspberrypi.org/raspberry-pi-store/ +[9]: https://www.raspberrypi.org/products/raspberry-pi-400 From fd3883c4382efd9d818a112eb75ce19353207947 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 3 Nov 2020 05:03:24 +0800 Subject: [PATCH 052/130] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020201103=20?= =?UTF-8?q?GnuCash:=20A=20Powerful=20Open=20Source=20Accounting=20Software?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20201103 GnuCash- A Powerful Open Source Accounting Software.md --- ...owerful Open Source Accounting Software.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 sources/tech/20201103 GnuCash- A Powerful Open Source Accounting Software.md diff --git a/sources/tech/20201103 GnuCash- A Powerful Open Source Accounting Software.md b/sources/tech/20201103 GnuCash- A Powerful Open Source Accounting Software.md new file mode 100644 index 0000000000..0fb7826743 --- /dev/null +++ b/sources/tech/20201103 GnuCash- A Powerful Open Source Accounting Software.md @@ -0,0 +1,95 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (GnuCash: A Powerful Open Source Accounting Software) +[#]: via: (https://itsfoss.com/gnucash/) +[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) + +GnuCash: A Powerful Open Source Accounting Software +====== + +_**Brief: GnuCash is a popular free and open-source accounting software that can be used to manage personal finance as well as business transactions.**_ + +Considering the complexities of managing personal finances and business transactions, you will find a lot of online services or software tools that aim to simplify things. Some tools simply let you add expenses and income to keep track of your savings while others offer different features. + +I have already covered several [open source account software][1] in the past. Here, I will be focusing on one of the options — **GnuCash**, which is a popular free accounting software with plenty of features for every user. + +### GnuCash: Free & Open Source Accounting Software + +![][2] + +GnuCash is a free accounting software tailored for professional requirements to track transactions, stocks, etc. It is available for Linux, BSD, macOS, and Windows as well. + +Even though it can be overwhelming to start with, it is easy to use for managing personal transactions as well. You can get a detailed report to analyze after you’ve started managing an account and added transactions to it. + +### Features of GnuCash + +![][3] + +As I mentioned earlier, GnuCash comes loaded with a bunch of features which could be overwhelming for someone new to accounting, but I think it should be worth it: + + * Double-entry Accounting + * Stock/Bond/Mutual Fund accounts + * Small-business accounting with tax support (like GST in India) + * Detailed report for breakdown + * Graph for easy analysis + * Financial calculations support + * Auto-saving feature + * Color coding + * Online Banking Wizard + * Journal + * Loan repayment calculator + * Price database for quick calculation + * Budget balance sheet, flow, graph for each category + * Ability to export as CSV + * Add Customer, Vendor, and Employee records separately + * Scheduled transactions + * Ability to set a Budget + * Configuring bill generator to ease up the accounting process + + + +I’m no expert but this is just the tip of the iceberg. You will find a host of options to customize and set for your accounting needs. + +![Gnucash Report][4] + +### Installing GnuCash on Linux + +You can find GnuCash in the software center of your Linux distribution. Install it from there or use the [package manager of your distribution][5]. + +A [Flatpak package][6] is also available for those who want the latest version. In case you didn’t know, I’d suggest you to go through our [Flatpak guide][7]. + +Alternatively, you can build it from source or you can head to their [official download page][8] to explore options for your Linux distribution. + +[GnuCash][9] + +### Wrapping Up + +For basic personal finance management, it was a little overwhelming for me because I prefer to use an Android app for simplicity. However, if you take a look around for a few minutes, it is easy to understand and GnuCash seems flexible for most requirements. + +If you like to manage your or your business’s finances, you may give it a try. It is definitely better than keeping data in spreadsheet :) + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/gnucash/ + +作者:[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/open-source-accounting-software/ +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/11/gnucash.jpg?resize=800%2C633&ssl=1 +[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/11/gnucash-screenshot.jpg?resize=800%2C636&ssl=1 +[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/11/gnucash-report.jpg?resize=800%2C638&ssl=1 +[5]: https://itsfoss.com/package-manager/ +[6]: https://flathub.org/apps/details/org.gnucash.GnuCash +[7]: https://itsfoss.com/flatpak-guide/ +[8]: https://www.gnucash.org/download.phtml#distribution +[9]: https://www.gnucash.org From cdf43bef4b07f9d0a7ea8e2a37999466048aa8fe Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 3 Nov 2020 05:03:37 +0800 Subject: [PATCH 053/130] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020201103=20?= =?UTF-8?q?Linux=20Jargon=20Buster:=20What=20are=20GUI,=20CLI=20and=20TUI?= =?UTF-8?q?=20in=20Linux=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20201103 Linux Jargon Buster- What are GUI, CLI and TUI in Linux.md --- ...ter- What are GUI, CLI and TUI in Linux.md | 102 ++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 sources/tech/20201103 Linux Jargon Buster- What are GUI, CLI and TUI in Linux.md diff --git a/sources/tech/20201103 Linux Jargon Buster- What are GUI, CLI and TUI in Linux.md b/sources/tech/20201103 Linux Jargon Buster- What are GUI, CLI and TUI in Linux.md new file mode 100644 index 0000000000..cc4b54ff55 --- /dev/null +++ b/sources/tech/20201103 Linux Jargon Buster- What are GUI, CLI and TUI in Linux.md @@ -0,0 +1,102 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Linux Jargon Buster: What are GUI, CLI and TUI in Linux?) +[#]: via: (https://itsfoss.com/gui-cli-tui/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) + +Linux Jargon Buster: What are GUI, CLI and TUI in Linux? +====== + +When you start using Linux and follow Linux-based websites and forums, you’ll often come across terms like GUI, CLI and sometimes TUI. + +This chapter of Linux Jargon Buster briefly explains these terms so that you as a (new) Linux user can understand the context better when these acronyms are used. + +To be honest, the terms like GUI, CLI or TUI are not exclusive to Linux. These are generic computing terms and you’ll find them used in non-Linux discussions as well. + +### GUI – Graphical User Interface + +Probably the most common term you’ll across on It’s FOSS. It’s because we focus on desktop Linux users and try to cover the easy to use graphical methods and applications. + +A GUI application or graphical application is basically anything that you can interact with your mouse, touchpad or touch screen. You have icons and other visual notions and you can use your mouse pointer to access the functionalities. + +![GIMP: A GUI app for photo editing][1] + +On Linux, a [desktop environment][2] provides the graphical interface for you to interact with your system. Then you can use GUI applications like GIMP, VLC Firefox, LibreOffice, file manager etc for various tasks. + +GUI has made computing easier for the common users otherwise it would have remained a geek-only zone. + +### CLI – Command Line Interface + +CLI is basically a command line program that accepts inputs to perform a certain function. Basically, any application that you can use via commands in the terminal falls into this category. + +![apt-cache is a CLI tool for interacting with APT cache on Debian-based systems][3] + +Early computers didn’t have mouse to interact with the operating system. You had to do interact with the machine using commands. + +If you think that’s difficult you should know that the earlier computers didn’t even have a screen to see what is being typed on, they had actual paper printer to see their typed commands. I have never used such a computer or seen in my real life. The closest thing I used was the microcontroller kits during my studies. + +![Ken Thompson And Dennis Ritchie Working on developing UNIX operating system on PDP 11 computer. | Image Credit][4] + +Is CLI relevant these days? Absolutely. Commands always have their benefit specially when you are dealing with the core functioning and configuration of the operating system like setting up firewall, managing network or even [package management][5]. + +You may have a GUI-based application to do the same task but commands give you more granular access to those features. In any case, you’ll find that GUI application also interact with the operating system with commands (used in their code). + +![Handbrake GUI app uses FFMPEG CLI tool underneath][6] + +Many popular GUI applications are often based on CLI tools. Take [Handbrake][7] for example. It’s a popular open source media converter and it uses the [FFMPEG command][8] line tool underneath. + +Quite evidently, using command line tools is not as easy as the graphical ones. Don’t worry. Unless you have specific needs, you should be able to use your Linux system graphically. However, knowing the basic Linux commands helps a great deal. + +### TUI – Terminal User Interface (also known as Text-based User Interface) + +This is the most uncommon term of the three. TUI is basically part GUI and part CLI. Confused? Let me explain that for you. + +You already know that early computers used CLI. Before the advent of the actual GUI, the text-based user interface provided a very basic kind of graphical interaction in the terminal. You have more visuals and could use mouse and keyboard to interact with the application. + +![nnn File Browser in terminal][9] + +TUI stands for text-based user interface or terminal user interface. Text-based because primarily, you have a bunch of text on the screen and terminal user interface because they are used only in the terminal. + +TUI applications are not that common but you still have a bunch of them. [Terminal based web browsers][10] are good example of TUI programs. [Terminal-based games][11] also fell in this category. + +![CMUS is terminal based music player][12] + +You may come across TUI when you are [installing multimedia codecs in Ubuntu][13] where you have to accept EULA or make a choice. + +TUI apps are not as user-friendly as GUI applications, and they often have a learning curve involved but they are a bit easier to use than the command line tools. + +**In the end…** + +TUI apps are often also considered as CLI applications because they are restricted to the terminal. In my opinion, it’s up to you if you consider them different from CLI. + +I hope you liked this part of Linux Jargon Buster. If you have any suggestions for topics in this series, please let me know in the comments and I’ll try to cover them in the future. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/gui-cli-tui/ + +作者:[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://i1.wp.com/itsfoss.com/wp-content/uploads/2018/04/gimp-2-10-interface.jpg?resize=800%2C450&ssl=1 +[2]: https://itsfoss.com/what-is-desktop-environment/ +[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/10/apt-cache-search-names-only.png?resize=759%2C209&ssl=1 +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/11/Ken_Thompson_and_Dennis_Ritchie_at_PDP-11.jpg?resize=800%2C641&ssl=1 +[5]: https://itsfoss.com/package-manager/ +[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/11/handbrake.png?resize=800%2C537&ssl=1 +[7]: https://itsfoss.com/handbrake/ +[8]: https://itsfoss.com/ffmpeg/ +[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/10/nnn-file-browser.jpg?resize=800%2C597&ssl=1 +[10]: https://itsfoss.com/terminal-web-browsers/ +[11]: https://itsfoss.com/best-command-line-games-linux/ +[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2017/07/cmus-interface.png?resize=734%2C436&ssl=1 +[13]: https://itsfoss.com/install-media-codecs-ubuntu/ From 10ddcc6505b3419f119f8ce685b735bb5ff9799b Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 3 Nov 2020 05:03:50 +0800 Subject: [PATCH 054/130] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020201103=20?= =?UTF-8?q?A=20Brief=20History=20of=20Ubuntu=20Touch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20201103 A Brief History of Ubuntu Touch.md --- ...0201103 A Brief History of Ubuntu Touch.md | 154 ++++++++++++++++++ 1 file changed, 154 insertions(+) create mode 100644 sources/tech/20201103 A Brief History of Ubuntu Touch.md diff --git a/sources/tech/20201103 A Brief History of Ubuntu Touch.md b/sources/tech/20201103 A Brief History of Ubuntu Touch.md new file mode 100644 index 0000000000..c770c2e613 --- /dev/null +++ b/sources/tech/20201103 A Brief History of Ubuntu Touch.md @@ -0,0 +1,154 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (A Brief History of Ubuntu Touch) +[#]: via: (https://itsfoss.com/ubuntu-touch/) +[#]: author: (John Paul https://itsfoss.com/author/john/) + +A Brief History of Ubuntu Touch +====== + +Sensing the tech trend, Ubuntu tried its hands on creating a Linux-based mobile operating system. The first announcement came a decade back and six years down the line, Ubuntu closed the curtains on the project. + +What went wrong? How it started? Is Ubuntu Touch still alive? Let’s take a look at the history of Ubuntu Touch in chronological order. + +### Shuttleworth Announced Ubuntu Touch + +![][1] + +The [Ubuntu Touch project][2] began with a blog post by Canonical founder [Mark Shuttleworth][3]. The [blog post][4], dated October 31, 2011, started with a bold prediction: “By 14.04 LTS Ubuntu will power tablets, phones, TVs and smart screens from the car to the office kitchen, and it will connect those devices cleanly and seamlessly to the desktop, the server and the cloud.” + +Shuttleworth went on to explain that this move would be accomplished mainly through the use of the company’s new desktop environment, Unity. (Unity was introduced in Ubuntu 10.10.) “Unity, the desktop interface in today’s Ubuntu 11.10, was designed with this specific vision in mind.” + +The whole idea behind Unity was to create an interface that would work on different screen resolutions. + +_**“Unity’s core elements are arranged in exactly the way we need to create coherence across all of those devices. This was the origin of the name Unity – a single core interface framework, that scales across all screens, and supports all toolkits.”**_ + +Shuttleworth said that this move was motivated by the increasing use of mobile devices. “Make no mistake – just as the world is changing for manufacturers so is it changing for Linux distributions. Today, 70% of people in Egypt access the Internet solely via the phone. Even in the US that figure is a startling 25%.” + +### Ubuntu Touch is Released to the World + +![][5] + +The Unity desktop environment was originally introduced in the netbook version of Ubuntu 10.10. However, the phone interface wouldn’t be seen by the public until 2013. [Mark Shuttleworth demoed][6] it at the 2013 CES. + +Ubuntu Touch 1.0 was baked into the [Ubuntu 13.10 release][7]. This version primarily supported “Galaxy Nexus and Nexus 4 phone” with other images being available, as well. + +The [system requirements][8] for Ubuntu Touch looked a little bit like this: + +| Entry-level Ubuntu smartphone | High-end Ubuntu “superphone” +---|---|--- +Processor architecture | 1Ghz Cortex A9 | Quad-core A9 or Intel Atom +Memory | 512MB – 1GB | Min 1GB +Flash storage | 4-8GB eMMC + SD | Min 32GB eMMC + SD +Multi-touch | Yes | Yes +Desktop convergence | No | Yes + +![Convergence concept][9] + +Note: The last item on the above list (**desktop convergence**) might be a new idea to some people. This meant that you could use your Ubuntu Touch device like a phone, but you could also hook it up to a display, keyboard, and mouse to use it as a desktop. Unfortunately, Ubuntu Touch never gained this feature. + +### Ubuntu Tries to Crowdfund a Phone + +To show off what an ideal Ubuntu phone would look like, Canonical started a crowdfunding campaign to finance the [Ubuntu Edge][10] on July 22, 2013. The goal was to raise $32 million in a month to produce 40,000 devices. + +According to the campaign’s page, Canonical hoped to use the new device “to provide a low-volume, high-technology platform, crowdfunded by enthusiasts and mobile computing professionals. A pioneering project that accelerates the adoption of new technologies and drives them down into the mainstream.” + +The Ubuntu Edge was considered high-end at the time with the following specs: + +Mobile OS | Dual-boots Android and Ubuntu mobile +---|--- +Desktop OS | Ubuntu Desktop +RAM | 4GB +Internal storage | 128GB +Screen | 720 x 1,280, 4.5 inches +Protection | Sapphire Glass +Connectivity | Dual-LTE, GSM +Speakers | Stereo +Battery | Silicon-anode Li-ion +Price | $695 + +Interestingly, several large companies pledged money. For example, [Bloomberg pledged $800,000][11]. They made this pledge because they believed that Ubuntu Touch “could benefit its clients and the future of mobile Relevant Products/Services computing.” + +Ultimately, the campaign didn’t reach its goal. It only reached $12.7 million or 37% of the goal. The amount raised was the biggest a crowdfunding campaign ever saw. + +### Ubuntu Touch Goes into Production (Sort of) + +Though Canonical failed to make its own hardware, it continued working on the software part i.e., developing the Ubuntu Touch mobile operating system. + +![][12] + +Ubuntu Touch was released to device makers in 2014. That same year, [two device makers committed][13] to produce Ubuntu phones. These two companies, Chinese Meizu and Spanish BQ, weren’t exactly global household names, but Shuttleworth said that was all part of the plan. + +_“While we’re happy to work with household names, we want to be involved with partners for whom we can be a significant part of their story, rather than being appended to the more complicated story of other brands.”_ + +Both companies produced and released several phones with Ubuntu Touch as the main operating system. BQ also released an Ubuntu Touch tablet. However, no other manufacturer signed up to make Ubuntu Touch devices. + +### Canonical Discontinues Ubuntu Touch + +![Unity 8 was in beta when Ubuntu discontinued Unity and Ubuntu Touch project][14] + +In early April of 2017, Mark Shuttleworth made another [announcement][15]. After mentioning that Canonical had experienced an “excellent quarter and excellent year”, Shuttleworth [announced the end of the Ubuntu Touch and Unity][16]. “I’m writing to let you know that we will end our investment in Unity8, the phone and convergence shell.” Instead, Canonical would focus on desktop Ubuntu. + +He continued: + +> I took the view that, if convergence was the future and we could deliver it as free software, that would be widely appreciated both in the free software community and in the technology industry, where there is substantial frustration with the existing, closed, alternatives available to manufacturers. I was wrong on both counts. In the community, our efforts were seen fragmentation not innovation. And industry has not rallied to the possibility, instead taking a ‘better the devil you know’ approach to those form factors, or investing in home-grown platforms. What the Unity8 team has delivered so far is beautiful, usable and solid, but I respect that markets, and community, ultimately decide which products grow and which disappear. + +He closed by saying that it was a hard decision to make because of his strong belief in the future of convergence. + +### The Community Keeps the Project Alive + +When Shuttleworth’s announcement hit the internet, all the supporters of Ubuntu Touch were shocked. Many were unsure of what would happen to the devices that they owned. Thankfully, the community came to the rescue. + +![][17] + +Shortly after Shuttleworth’s announcement, Marius Gripsgård [announced][18] that the UBports team would be keeping Ubuntu Touch alive. UBports was already well known in the Ubuntu Touch community for their work on porting it to more devices. + +Several other projects tried to do the same with the desktop version of Unity, but most did not last long. One of them had the inventive name of Yunit but I guess it is not actively developed anymore. + +[UBports is the only project][2] that is keeping Ubuntu Touch alive by continuously working on its development. + +### Epilogue + +Ubuntu Touch was not the success that Canonical wanted it to be. It was too early for the market. However, it did lay the groundwork for the Linux phones that we have now. + +I believe that the [PinePhone][19] and the [Purism Librem 5][20] phone would not have come about without Ubuntu Touch sparking interest in a Linux phone. At the same time, the Canonical engineers and programmers solved problems that laid the groundwork for these modern phones. You don’t get successes without a few failures along the way. + +If you found this article interesting, please take a minute to share it on social media, Hacker News, or [Reddit][21]. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/ubuntu-touch/ + +作者:[John Paul][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/john/ +[b]: https://github.com/lujun9972 +[1]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/10/ubuntu-touch-devices.jpg?resize=800%2C497&ssl=1 +[2]: https://ubuntu-touch.io/ +[3]: https://en.wikipedia.org/wiki/Mark_Shuttleworth +[4]: https://www.markshuttleworth.com/archives/820 +[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/10/ubuntu-touch-tablet.jpg?resize=625%2C363&ssl=1 +[6]: https://www.youtube.com/watch?v=RO7QbCqFY7Y +[7]: https://wiki.ubuntu.com/SaucySalamander/ReleaseNotes#Ubuntu_for_Phones +[8]: https://web.archive.org/web/20130326085927/http://www.ubuntu.com/devices/phone/operators-and-oems +[9]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2016/02/convergence-ubuntu.jpg?resize=1024%2C588&ssl=1 +[10]: https://www.indiegogo.com/projects/ubuntu-edge#/ +[11]: https://web.archive.org/web/20131020144457/http://www.cio-today.com/story.xhtml?story_title=Ubuntu_Edge_Smartphone_Raises_Millions__Falls_Short&story_id=10200A158ZW0 +[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2015/02/image-phone-overview.jpg?resize=567%2C302&ssl=1 +[13]: https://www.cnet.com/news/ubuntu-touch-gets-grip-on-its-first-phone-makers/ +[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/02/unity8_ubports.png?resize=800%2C450&ssl=1 +[15]: https://ubuntu.com/blog/growing-ubuntu-for-cloud-and-iot-rather-than-phone-and-convergence +[16]: https://itsfoss.com/ubuntu-unity-shutdown/ +[17]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/02/ubports.jpeg?resize=720%2C480&ssl=1 +[18]: https://news.softpedia.com/news/ubuntu-touch-and-unity-8-are-not-dead-ubports-community-will-keep-them-alive-514620.shtml +[19]: https://itsfoss.com/pinephone/ +[20]: https://itsfoss.com/librem-linux-phone/ +[21]: https://%0Areddit.com/r/linuxusersgroup From d2f553f9513287cbc034223005ceb1db9f6a7557 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 3 Nov 2020 05:04:02 +0800 Subject: [PATCH 055/130] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020201103=20?= =?UTF-8?q?27=20Super=20Cool=20Raspberry=20Pi=20Zero=20W=20Projects=20for?= =?UTF-8?q?=20DIY=20Enthusiasts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20201103 27 Super Cool Raspberry Pi Zero W Projects for DIY Enthusiasts.md --- ... Pi Zero W Projects for DIY Enthusiasts.md | 364 ++++++++++++++++++ 1 file changed, 364 insertions(+) create mode 100644 sources/tech/20201103 27 Super Cool Raspberry Pi Zero W Projects for DIY Enthusiasts.md diff --git a/sources/tech/20201103 27 Super Cool Raspberry Pi Zero W Projects for DIY Enthusiasts.md b/sources/tech/20201103 27 Super Cool Raspberry Pi Zero W Projects for DIY Enthusiasts.md new file mode 100644 index 0000000000..e315657689 --- /dev/null +++ b/sources/tech/20201103 27 Super Cool Raspberry Pi Zero W Projects for DIY Enthusiasts.md @@ -0,0 +1,364 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (27 Super Cool Raspberry Pi Zero W Projects for DIY Enthusiasts) +[#]: via: (https://itsfoss.com/raspberry-pi-zero-projects/) +[#]: author: (Chinmay https://itsfoss.com/author/chinmay/) + +27 Super Cool Raspberry Pi Zero W Projects for DIY Enthusiasts +====== + +The small form factor of the [Raspberry Pi Zero W][1] enables a new range of projects. In fact, a lot of people use the Pi Zero in the final version of the project after prototyping on a different full-sized Pi board. And, that’s because it consumes much less power compared to the flagship Pi boards and makes it ideal to build battery powered gadgets. + +Preview | Product | Price | +---|---|---|--- +![CanaKit Raspberry Pi Zero W \(Wireless\) Complete Starter Kit - 16 GB Edition][2] ![CanaKit Raspberry Pi Zero W \(Wireless\) Complete Starter Kit - 16 GB Edition][2] | [CanaKit Raspberry Pi Zero W (Wireless) Complete Starter Kit - 16 GB Edition][3] | $32.99[][4] | [Buy on Amazon][5] + +After scouring [Instructables][6], [Reddit][7], [Hackaday][8], other maker oriented communities and my own experience with Pi, I have compiled a list of projects built around the Raspberry Pi Zero and the Raspberry Pi Zero W. The community is extremely innovative and all these projects make impressive use of various features of this maker board. + +So, in addition to the awesome list of [Raspberry Pi Projects][9] that we covered earlier, here, we will be focusing on Raspberry Pi Zero! + +### Top Creative Projects You Can Build With Raspberry Pi Zero + +![][10] + +Of course, you’re free to use some [Raspberry Pi Zero alternatives][11] and try the same project ideas mentioned below. + +#### 1\. Portable Game Console + +This is by far my favorite project built around the Raspberry Pi Zero, hence featured at the top. Today we have emulators for most of the retro games. This project puts the Pi Zero in the classic game-boy form factor. You can play most of your favorite retro games and you can play them anywhere. + +This project is also beautifully documented in YouTube video(s) and on Instructables. + +[Portable Game Console][12] + +#### 2\. DIY Smart Speaker Powered by Alexa + +Amazon’s Alexa has always been very tinkerer friendly and makers around the world have built all kinds of Alexa based devices. This project also adds RGB programmable LED’s to make it look a little more like the echo speaker. + +[DIY Smart Speaker][13] + +#### 3\. Home Network Music System + +Getting a proper home music system setup is usually expensive. However, with the inexpensive Raspberry Pi Zero, you can utilize your MP3 collection to set up a home network music system. + +This project uses the [PiDrive][14], PiDrive is basically a Raspberry Pi Zero W attached to a hard disk. Unfortunately, I think it has been discontinued but you can also build it using a normal Pi Zero W in different configurations. You can play local music or even stream from different services. + +[Pi MusicBox][15] + +#### 4\. Network Ad Blocker using Pi-Hole + +This is something I personally use on a daily basis and it has completely changed my internet experience. If you’re someone who doesn’t want to see advertisements while you browse around online, an Ad blocker using Raspberry Pi would be exciting, right? + +[Pi-Hole][16] on a Raspberry Pi can block all the ads on your entire network. Anyone on the network with an active Pi-Hole will have an ad-free experience. It also speeds up your internet experience since the bandwidth used by ads is freed up. + +You can watch Linus’ video to get an idea or refer to the detailed post in Linus Tech Tips forums linked in the button below. + +[Ad-Blocker using Pi Hole][17] + +#### 5\. AirPlay Speaker using Raspberry Pi Zero + +![][18] + +AirPlay is a chromecast equivalent in the Apple ecosystem, you can cast media from your Apple devices to an AirPlay supported speaker. + +This project is built very well with 3D printed parts and you can find detailed instructions for it. + +[AirPlay Speaker][19] + +#### 6\. DIY Google Home with a Bluetooth Speaker + +![][20] + +This is another nifty little project which is a tinkerer’s dream. Building your own smart speaker powered by the Google Assistant? Indeed, exciting! + +Here, a Pi Zero is paired with a Bluetooth speaker, microphone and the Google Assistant SDK to achieve some functionalities. You can ask questions and do most of the things you can with the official Google Home device. This project does not handle the casting part of the Google Home experience though. + +[DIY Google Home][21] + +#### 7\. Pedal Pi – Raspberry Pi Zero Guitar Pedal + +Pedal Pi is a programmable Lo-Fi guitar pedal built using the Pi Zero where you can program your own custom effects. The project is fully open source (including the hardware) as well. It goes to prove how versatile the Pi Zero can be. + +It can be an incredibly fun experience for people who are makers and also into digital music. + +[Pedal Pi][22] + +#### 8\. ZeroBot – FPV Robot + +There are a lot of different robots you can build using the Pi Zero. It is almost perfect for any kind of robot that you can think of building. It has ample amount of [GPIO][23], a decent processor, a camera interface and the choice of software stack and programming language. + +The ZeroBot is an [FPV][24] bot which also has a camera and is able to transmit what it is seeing. It even features a completely 3D printed body. + +You can find [detailed instructions here][25]. + +#### 9\. WiFi Security Camera + +Raspberry Pi Zero W comes with a CSI connector where you can connect the camera module. This compatibility also lets you easily build a WiFi-powered CCTV camera(s) for your home at a very reasonable price compared to commercial products. + +The [motionEyeOS][26] is a purposely built to convert your SBC (in this case the Pi Zero) to a surveillance system. You can find more information in the video above or head to the link below. + +[WiFi Security Camera][27] + +#### 10\. PIX-E GIF Camera + +![][28] + +GIF’s have taken over social media and all IM platforms. Just thinking of a dedicated GIF camera makes me chuckle. That’s exactly what this project is all about. I am very curious about how it would turn out with the new HQ camera which has a much better image quality. + +This [project has been documented][29] really well with accompanying videos on Hackaday + +[GIF Camera][29] + +#### 11\. Wearable Timelapse Camera + +One of the sleekest camera project I’ve seen, this is a wearable camera. You can take time-lapses, and videos from a first person’s perspective. + +This is a project by Adafruit and is documented really well. Refer to the video above to get an idea or head to the link below. + +[Wearable Timelapse Camera][30] + +#### 12\. Telescope Camera + +![][31] + +Building a telescope camera is one of the most popular camera based applications for the Pi Zero. Makers around the world have taken amazing pictures with their DIY telescope cameras. + +[Telescope Camera][32] + +#### 13\. Kodi on Pi Zero + +Kodi is one of the best open source [media server software][33] for making a media box for your TV. The amazing part is that it also runs on the Pi Zero W. + +Now you can DIY an alternative to the Amazon Fire TV Stick. + +[Kodi on Pi Zero][34] + +#### 14\. OctoPrint – Wireless 3D Printing + +![][35] + +If you are into 3D printing, you would have heard about [OctoPrint][36] at some point. OctoPrint unlocks many feature comforts we enjoy with normal printers like sending print jobs directly from the computer to the 3D printer instead of using a micro SD card. You can also attach a webcam and monitor your prints and control all aspects of the printer. + +OctoPrint is usually used with the bigger Pi’s but it can also be used with the Raspberry Pi Zero W with some soldering and mods. It is important to note that there is low WiFi interference when using the Pi Zero since it can impact prints. Here are some references talking about OctoPrint on Pi Zero to help you build it yourself: + + * [OctoPrint on Pi Zero][37] + * [OctoPrint on Pi Zero (from Prusa 3D)][38] + + + +#### 15\. Pirate Radio Station + +This seems like quite a fun idea, you can actually make the Pi Zero W broadcast using FM. + +It also happens to be a simple project and you don’t need many additional components either. You can be your own neighborhood RJ, do make sure to check out the legal aspects of a pirate radio station in your country. + +[Pirate Radio Station][39] + +#### 16\. IoT Smart Alarm Clock + +![][40] + +Here’s a project making something which might sound very trivial but nevertheless is super cool and underrated. + +The freedom of being able to program your own alarm clock, automating it with scripts and making your life a little easier and fun (and still not waking up) sounds exciting! + +[IoT Smart Alarm Clock][41] + +#### 17\. Pi Zero Tesla Coil + +This is the most unexpected yet an amazing project I’ve come across which uses the Pi Zero W. + +It doesn’t get cooler than playing music on a [tesla coil][42] using the Pi. Make sure you watch the video. + +[Tesla Coil with Pi Zero][43] + +#### 18\. Network Performance Monitoring using Pi Zero + +![][44] + +If you like to keep tabs on your network, you should check out this project. + +This is a [bandwidth monitor][45] built using the Pi Zero W that features a nifty little screen to display important stats. + +[Bandwidth Monitor][45] + +#### 19\. Pi Pod – Raspberry Pi Zero Music Player + +![][46] + +It’s 2020 and you might be thinking who would want a portable music player since mobile phones have replaced them almost entirely. But, there are always people (including myself) who would want a device dedicated to music and does not do anything else. + +This project features the Raspberry Pi Zero W in another form and looks pretty neat. It’s called the **Pi Pod**. + +You can also design your own 3D printable enclosure and customize every element of the music player. + +[Pi Pod][47] + +#### 20\. Raspberry Pi Drone + +![][48] + +The Pi Zero packs in enough features and processing power for it be at the heart of a drone. It is light weight, cheaper than some alternative drone specific boards too. You also get the freedom of using different firmware(s) or code one on your own. + +There are also many open source designs available for the frame of the drone on [Thingiverse.][49] + +[Pi Drone][50] + +#### 21\. Internet Connected Info Display + +The Pi Zero W is capable of connecting to the internet via WiFi, it also has all the GPIO and display outputs to make a highly functional device to display information from the internet. + +The freedom of programming means that you can have the display show any information you need. Your google calendar events, stock prices and anything you can find on the internet. +Here are a couple of interesting projects which are built around this idea. + + 1. [YouTube Subscriber Counter][51] + 2. [Raspberry Pi Internet Connected Information Display][52] + + + +#### 22\. Raspberry Pi Pocket Projector + +Ever since Texas Instruments came out with the mini projector evaluation board, a Raspberry Pi Zero based projector has been a very popular project. + +If you can get your hands on the projector module, this can be a very interesting build. This is not a beginner-friendly project, but a tinkerer should feel right at home. You can find all the relevant details from the video above. + +#### 23\. VPN Server + +![][53] + +In today’s world, extra care needs to be taken about companies barging into one’s privacy and using a VPN is becoming more and more commonplace. + +Fret not, you can utilize the Raspberry Pi Zero W with [OpenVPN][54] to add an extra layer of security to your home network. This can be a great for small families where everyone in the house can be protected and don’t need to separate VPN subscriptions. + +[VPN Server][55] + +#### 24\. Weather Station + +![][56] + +This is a very cool project, a complete weather station which can display various weather metrics for the day and forecasts too. It even includes a 3D printed case which looks pretty sharp. The amazing part is that you can use the display to show things other than weather as well. + +As I also noticed in another similar project on [Instructables][57], you may also tweak it with your own custom database and website. + +[Weather Station][58] + +#### 25\. Ambient Lighting System for TV + +An ambient lighting system enhances the TV experience, this is another amazing project involving the Raspberry Pi Zero. + +In real life this effect feels like a dynamic portrait mode applied to the screen and whatever is being shown on the screen, makes the experience a lot immersive. + +GreatScott (a popular YouTuber) for content based around electronics and DIY shows you around with the project in the video above. You may also refer to the written instructions from the link below. + +[Ambient Lighting System][59] + +#### 26\. Wireless Network Printer + +![][60] + +The Pi Zero W is a great board to make any old printer free from being fixed to one computer and have the freedom of placing it anywhere. + +This way print jobs can be sent from multiple computers, phones on the same network. This is a quality of life improvement which is highly underrated, even in households. + +This project utilizes [CUPS][61] running on Pi Zero W to make your printer wireless. + +[Wireless Network Printer][62] + +#### 27\. Pi Zero Cluster + +![][63] + +You can pack in 10’s of these tiny computers together to have access to massive amounts of parallel processing. The GPU’s on these SBC’s can be utilized for challenging compute needs. + +Regular Raspberry Pi’s have long been used to make clusters and Raspberry Pi based super computers consisting of 100’s – 1000’s of Pi’s. Since the introduction of the Pi Zero with it’s lower price and size, it is possible to put more of them into a small space. + +There are many custom boards which are built to hold multiple Pi Zero’s. + +[Pi Zero Cluster][64] + +#### Closing Thoughts + +The projects featured here are only a tip of the iceberg. You can find many more projects if you look around on the internet. The versatility of the Raspberry Pi Zero is unprecedented, combined with its affordability it is one of the most used SBC by makers and tinkerers around the world. + +What did you build with the Raspberry Pi Zero ? Put it in the comments below along with your favorite projects. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/raspberry-pi-zero-projects/ + +作者:[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/raspberry-pi-zero-w/ +[2]: https://i1.wp.com/m.media-amazon.com/images/I/517BwcAPmTL._SL160_.jpg?ssl=1 +[3]: https://www.amazon.com/dp/B072N3X39J?tag=chmod7mediate-20&linkCode=ogi&th=1&psc=1 (CanaKit Raspberry Pi Zero W (Wireless) Complete Starter Kit - 16 GB Edition) +[4]: https://www.amazon.com/gp/prime/?tag=chmod7mediate-20 (Amazon Prime) +[5]: https://www.amazon.com/dp/B072N3X39J?tag=chmod7mediate-20&linkCode=ogi&th=1&psc=1 (Buy on Amazon) +[6]: https://www.instructables.com +[7]: https://www.reddit.com/r/raspberry_pi +[8]: https://hackaday.com +[9]: https://itsfoss.com/raspberry-pi-projects/ +[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/10/raspberry-pi-zero-w-projects.png?resize=800%2C450&ssl=1 +[11]: https://itsfoss.com/raspberry-pi-zero-alternatives/ +[12]: https://www.instructables.com/DIY-Raspberry-Pi-Zero-Handheld-Game-Console/ +[13]: https://www.instructables.com/Alexa-Assistant-With-a-10-Raspberry-Pi-Zero-W-and-/ +[14]: https://www.raspberrypi.org/blog/meet-314gb-pidrive/ +[15]: https://www.instructables.com/Raspberry-Pi-Home-Network-Music-System/ +[16]: https://pi-hole.net/ +[17]: https://linustechtips.com/main/topic/1094810-pi-hole-setup-tutorial/ +[18]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/10/pi-airplay-speaker.png?resize=800%2C578&ssl=1 +[19]: https://www.hackster.io/fvdbosch/raspberry-pi-zero-airplay-speaker-d99feb +[20]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/10/pi-google-home.png?resize=800%2C541&ssl=1 +[21]: https://www.instructables.com/DIY-Google-Home-With-Bluetooth-Speaker-on-Raspberr/ +[22]: https://www.instructables.com/Raspberry-Pi-Zero-Guitar-Pedal/ +[23]: https://en.wikipedia.org/wiki/General-purpose_input/output +[24]: https://en.wikipedia.org/wiki/First-person_view_(radio_control) +[25]: https://hackaday.io/project/25092-zerobot-raspberry-pi-zero-fpv-robot +[26]: https://github.com/ccrisan/motioneyeos +[27]: https://maker.pro/raspberry-pi/projects/how-to-build-a-cctv-network-camera-with-raspberry-pi-zero-w-and-motionpie +[28]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/10/pi-gif-camera.jpg?resize=800%2C633&ssl=1 +[29]: https://hackaday.io/project/16358-pix-e-gif-camera +[30]: https://learn.adafruit.com/raspberry-pi-wearable-time-lapse-camera/overview +[31]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/10/pi-telescope-camera.png?resize=800%2C555&ssl=1 +[32]: https://www.instructables.com/Astrophotography-With-the-Raspberry-Pi-Zero/ +[33]: https://itsfoss.com/best-linux-media-server/ +[34]: https://dronebotworkshop.com/kodi-raspberry-pi/ +[35]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/10/octoprint-logo.png?resize=515%2C421&ssl=1 +[36]: https://octoprint.org +[37]: https://toglefritz.com/how-to-run-octoprint-on-a-raspberry-pi-zero/ +[38]: https://help.prusa3d.com/en/article/octoprint-building-an-image-for-raspberry-pi-zero-w_2182 +[39]: https://makezine.com/projects/pirate-radio-throwies/ +[40]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/10/pi-iot-clock.png?resize=800%2C472&ssl=1 +[41]: https://hackaday.io/project/19230-iot-smart-alarm-clock +[42]: https://en.wikipedia.org/wiki/Tesla_coil +[43]: https://www.extremeelectronics.co.uk/electronic-tesla-coils/pi-zero-tesla-coil/ +[44]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/10/pi-network-performance.png?resize=800%2C432&ssl=1 +[45]: https://www.instructables.com/Bandwidth-Monitor/ +[46]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/10/pi-pod-music-player.png?resize=743%2C542&ssl=1 +[47]: https://www.raspberrypi.org/blog/pipod-pi-zero-music-player/ +[48]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/10/pi-zero-drone.png?resize=736%2C552&ssl=1 +[49]: https://thingiverse.com +[50]: https://www.hackster.io/12590/pi0drone-a-200-smart-drone-with-the-pi-zero-4fec08?f=1 +[51]: https://www.youtube.com/watch?v=afY_xHqQu-s +[52]: https://www.hackster.io/fvdbosch/raspberry-pi-zero-internet-connected-information-display-5cae96 +[53]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/10/pi-open-vpn.jpg?resize=800%2C296&ssl=1 +[54]: https://openvpn.net/ +[55]: https://circuitdigest.com/microcontroller-projects/turn-your-raspberry-pi-zero-in-to-a-vpn-server-using-openvpn +[56]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/10/pi-zero-weather-station.png?resize=800%2C599&ssl=1 +[57]: https://www.instructables.com/Complete-Raspberry-Pi-Weather-Station/ +[58]: https://www.hackster.io/hartmut-wendt/raspberry-pi-based-weather-station-a9a7dd +[59]: https://www.instructables.com/Make-Your-Own-Ambient-Lighting-With-the-Raspberry-/ +[60]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/10/pi-wireless-printer.jpg?resize=800%2C450&ssl=1 +[61]: https://www.cups.org/ +[62]: https://maker.pro/raspberry-pi/projects/how-to-turn-a-usb-printer-into-a-wireless-printer-with-raspberry-pi-zero-w +[63]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/10/pi-zero-cluster.png?resize=800%2C531&ssl=1 +[64]: https://magpi.raspberrypi.org/articles/clusterhat-review-cluster-hat-kit From 9f9a0b27c43babce98007bb4cbd743b9572b4c38 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 3 Nov 2020 05:04:30 +0800 Subject: [PATCH 056/130] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020201102=20?= =?UTF-8?q?5=20reasons=20to=20use=20Linux=20in=202020?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20201102 5 reasons to use Linux in 2020.md --- ...20201102 5 reasons to use Linux in 2020.md | 87 +++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 sources/tech/20201102 5 reasons to use Linux in 2020.md diff --git a/sources/tech/20201102 5 reasons to use Linux in 2020.md b/sources/tech/20201102 5 reasons to use Linux in 2020.md new file mode 100644 index 0000000000..832ac8fd46 --- /dev/null +++ b/sources/tech/20201102 5 reasons to use Linux in 2020.md @@ -0,0 +1,87 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (5 reasons to use Linux in 2020) +[#]: via: (https://opensource.com/article/20/11/linux-2020) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) + +5 reasons to use Linux in 2020 +====== +Here's a look back at the year so far and a review of what you need to +know about Linux in 2020. +![Penguin driving a car with a yellow background][1] + +Some of the best technology is a moving target. When technology stagnates, society tends to outpace and outgrow it. [Linux][2], the widely used open source operating system (OS), is a foundational technology and the basis for some of the most progressive modern computing ideas. So, while it's startlingly unchanged after three decades of development, it also allows adaptation. As a result, Linux is in a unique position of being both a sound investment in skills because it doesn't change and a seemingly eternal driving force for new skills to learn. + +The year 2020 has been a strange one—by any measure—but for Linux, it's been a typical development cycle. Here's a look back at the year so far and a review of what you need to know about Linux in 2020. + +### ZFS on Linux + +The ZFS filesystem offers integrity checking for data and metadata, redundancy with mirroring, support for up to _256 trillion yobibytes_ of storage, hardware-accelerated native encryption, and efficient replication. ZFS is a Sun Microsystems innovation that, unfortunately, has a license that prohibits it from being bundled with Linux by default. However, the [OpenZFS][3] group has ported the project to BSD and Linux so that you can run ZFS on anything from your laptop to your data center. + +Getting started with ZFS is surprisingly simple on Fedora Linux, as Sheng Mao demonstrates in his article on [setting up ZFS on Linux][4]. + +### Linux interrupts + +No matter how familiar you are with Linux, there's always an opportunity to dive deeper and discover how it achieves what it does so well. Computers running stock markets, digital film studios, audio workstations, and other performance-intensive tasks need real-time processing, while other computers can afford to be a little lazy when processing requests, and it's no small task to manage the myriad loops happening on a computer at any given millisecond. Understanding how and why the Linux kernel manages interrupt requests (IRQs) may not be vital to the everyday user, but it's a fascinating study no matter what you do on computers. Read Stephan Avenwedde's article "[How the Linux kernel handles interrupts][5]" to learn more. + +### Linux in your pocket + +Since Google's Android OS runs on a Linux kernel, many of us technically have Linux in our pockets. As comforting as that might be, Android's smooth Java frontend doesn't always provide the Linux _feeling_ many Linux users long for. And some users don't have an Android phone at all. + +The good news is that you can use Linux on your Android or iOS device, complete with a terminal, Bash, Python, a package manager, and all the other things you love about your favorite open source desktop OS. + +If you're on Android, read my article about [Termux][6]. And if you're on iOS, read Lee Tusman's excellent article about [running a Linux command line on your iOS device][7]. + +### New commands on Linux + +Time marches on, and sometimes the old, quaint commands of yesteryear are insufficient for modern systems. Although your muscle memory may cling to commands like `crontab` and `ifconfig` (and `iwconfig` and `wpa_supplicant`), there are perfectly good replacements for these and more. If you can't bring yourself to abandon your old commands, get familiar with [Bash aliases][8] because these new commands are worth learning. + + * Drop `ifconfig` for `nmcli`. Look, at some point, you have to admit that the unholy combination of `ifconfig` plus `iwconfig` and a foray into `wpa_supplicant` (which you secretly dropped long ago in favor of `wicd` anyway) just isn't efficient. Linux uses `nmcli` now, and it's become a highly usable, sometimes even intuitive way to interface with your network. Read Dave McKay's excellent [nmcli tutorial][9]. + * Cronjobs, `at`, and `batch` are uniquely timeless commands that probably ought never be replaced. They're great for quick and simple scheduling, but for complex jobs, you might find some features you like in a supplement to them: systemd timers. David Both provides an extensive [systemd timers tutorial][10] that demonstrates how to write and monitor your important custom system tasks. + * `gcore` and `gdb` are important debuggers that developers may be familiar with. A new take on `gcore` functionality is Microsoft's ProcDump, which obtains a core dump of a process ID (PID) so that you can analyze it with `gdb`. It's more an alternative than a replacement, but it's worth trying if you're curious about different tools. Read Guarav Kamathe's [ProcDump tutorial][11] for more information. + + + +### The cloud runs on Linux + +As "the cloud" continues full steam ahead, Linux remains its main driving force. The cloud is a collection of computers (nodes) with a massively distributed filesystem (such as [Ceph][12]), and it's commonly managed with Kubernetes ("_KOO-burr-net-eez"_] or [OpenShift][13]. + +Regardless of how well you know Linux on your laptop or desktop or even in your private data center, there's a whole new world of Linux experimentation available in containers running on the cloud. It can take some adjustment to learn how to get comfortable in an ephemeral container, but with some practice and a little context, you can build some interesting systems and then orchestrate them (that is, cause them to update, scale, and perform as needed) with Kubernetes. + +Jiaqi Liu wrote one of the best overviews of the cloud workflow in "[A beginner's guide to Kubernetes container orchestration][14]." Read it, and then download Chris Collins' [Kubernetes eBook][15] to build your own cloud at home on a Raspberry Pi cluster. + +### Open source growth + +Linux users relish the consistency and stability of Linux, and it's a testament to the original Unix system design that the OS can stay the same while also pushing its boundaries into exciting new forms of technology. Part of the fun of Linux and open source is the sense of discovery you get when you start learning a new command and the sense of accomplishment when it works to make your life easier. Take a look at the latest Linux developments, and get started with something new today! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/11/linux-2020 + +作者:[Seth Kenlon][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/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/car-penguin-drive-linux-yellow.png?itok=twWGlYAc (Penguin driving a car with a yellow background) +[2]: https://opensource.com/resources/linux +[3]: https://openzfs.org/wiki/Main_Page +[4]: https://opensource.com/article/20/10/zfs-dnf +[5]: https://opensource.com/article/20/10/linux-kernel-interrupts +[6]: https://opensource.com/article/20/8/termux +[7]: https://opensource.com/article/20/9/run-linux-ios +[8]: https://opensource.com/article/19/7/bash-aliases +[9]: https://opensource.com/article/20/7/nmcli +[10]: https://opensource.com/article/20/7/systemd-timers +[11]: https://opensource.com/article/20/7/procdump-linux +[12]: https://opensource.com/business/15/1/introduction-ceph-storage-openstack +[13]: https://www.redhat.com/en/technologies/cloud-computing/openshift +[14]: https://opensource.com/article/20/6/container-orchestration +[15]: https://opensource.com/downloads/kubernetes-raspberry-pi From 6cec5c65560d79a9a74843686f307ba25e417b9c Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 3 Nov 2020 05:04:42 +0800 Subject: [PATCH 057/130] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020201102=20?= =?UTF-8?q?4=20reasons=20why=20JavaScript=20is=20so=20popular?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20201102 4 reasons why JavaScript is so popular.md --- ... 4 reasons why JavaScript is so popular.md | 121 ++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 sources/tech/20201102 4 reasons why JavaScript is so popular.md diff --git a/sources/tech/20201102 4 reasons why JavaScript is so popular.md b/sources/tech/20201102 4 reasons why JavaScript is so popular.md new file mode 100644 index 0000000000..bf35c455bd --- /dev/null +++ b/sources/tech/20201102 4 reasons why JavaScript is so popular.md @@ -0,0 +1,121 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (4 reasons why JavaScript is so popular) +[#]: via: (https://opensource.com/article/20/11/javascript-popular) +[#]: author: (Nimisha Mukherjee https://opensource.com/users/nimisha) + +4 reasons why JavaScript is so popular +====== +There are good reasons why JavaScript is consistently among the top +programming languages. +![JavaScript in Vim][1] + +As this chart from GitHub's _[State of the Octoverse][2]_ report shows, [JavaScript][3] has consistently been most popular programming language based on the number of contributors to projects on GitHub. + +![Top Languages from The State of the Octoverse report][4] + +Top languages, per The State of the Octoverse (© 2019, [GitHub Corp][2]) + +In the [previous article][5] in this series, I dove into the history of JavaScript. In this article, I'll share four of [the reasons][6] it is so popular. + +### 1\. JavaScript caters to beginner, intermediate, and advanced developers + +JavaScript does not need any environment setup; just open a browser, like Chrome, navigate to [Developer Tools][7], and start coding. Writing a "Hello World" program is as simple as: + + +``` +`console.log("Hello World");` +``` + +JavaScript's flexibility is best suited for intermediate developers. The language just helps get things done by letting the developer focus on solving the problem. Developers can use a mix of plugins and their own code snippets to get an application working. + +While JavaScript is relatively easy to get started with, it is not straightforward to master. If you want to get to an advanced level, here are some of the concepts you need to know: + + * **JavaScript's [multi-paradigm][8] nature:** JavaScript supports both functional programming and object-oriented programming (OOP). + * **Applying [design patterns][9] in JavaScript:** The model-view-* ([MV*][10]) design patterns have been among the most popular and have led to the development of [several modern frameworks][11]. + * **[Inheritance with prototype chain][12]:** JavaScript cannot implement OOP in the traditional Java class-based model due to its dynamic nature. OOP in JavaScript is achieved through the prototypal inheritance model. + * **[Closures][13]:** A closure gives access to an outer function's scope from an inner function. + * **[Currying][14]:** Currying is a transformation of functions that translates a function from callable as f(a, b, c) into callable as f(a)(b)(c). + * **[Promises][15] and [Observables][16]:** These help you work with asynchronous functions. + * **[TypeScript][17]:** This adds static typing to JavaScript. + + + +### 2\. Omni-platform + +JavaScript can run everywhere, including: + + * Devices like mobiles, tablets, and laptops + * On the client-side as well as the server-side + + + +This ability to run everywhere makes JavaScript a universal language. + +### 3\. Open standards and community + +[ECMAScript][18] is the standardized version of JavaScript as well as an open standard language. Companies can use ECMAScript to create a JavaScript implementation. According to [Wikipedia][19], "an ECMAScript engine  is a program that executes source code written in a version of the ECMAScript language standard, for example, JavaScript." The most popular engines, [V8][20] and [SpiderMonkey][21], are open source projects. + +JavaScript has been around for 25 years and has a vast community behind it. A developer is spoiled for choice. The community has built so many plugins and frameworks that the phrase "[framework fatigue][22]" was coined. + +### 4\. Modern frameworks + +Modern frameworks like [React][23], [Angular][24], and [Vue.js][25] have stabilized and are being optimized for better performance. Most frameworks are very developer-friendly with good community support. + +### The future + +JavaScript is here to stay. Full-stack development and the modern frontend framework continue to help JavaScript cement its position as one of the most popular programming languages. + +The [next wave of JavaScript][26] might put the spotlight on: + + * **[Deno][27]:** A modern and secure runtime for JavaScript + * **Web components:** Reusable custom elements + * **Integration with AI and ML:** Projects like [Supernova][28] and [BAYOU][29] have made substantial breakthroughs in integrating JavaScript with artificial intelligence and machine learning. + + + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/11/javascript-popular + +作者:[Nimisha Mukherjee][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/nimisha +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/javascript_vim.jpg?itok=mqkAeakO (JavaScript in Vim) +[2]: https://octoverse.github.com/ +[3]: https://en.wikipedia.org/wiki/JavaScript +[4]: https://opensource.com/sites/default/files/uploads/toplanguages-the_state_of_the_octoverse.png (Top Languages from The State of the Octoverse report) +[5]: https://opensource.com/article/20/10/javascript-part-1 +[6]: https://medium.com/paul-heintzelman/so-why-is-javascript-so-popular-f35bd6cfeb39 +[7]: https://developers.google.com/web/tools/chrome-devtools +[8]: https://medium.com/javascript-in-plain-english/what-are-javascript-programming-paradigms-3ef0f576dfdb +[9]: https://addyosmani.com/resources/essentialjsdesignpatterns/book/ +[10]: https://developpaper.com/javascript-mv-pattern/ +[11]: https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93viewmodel#JavaScript_frameworks +[12]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Inheritance_and_the_prototype_chain +[13]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Closures +[14]: https://javascript.info/currying-partials +[15]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise +[16]: https://rxjs-dev.firebaseapp.com/guide/observable +[17]: https://en.wikipedia.org/wiki/TypeScript +[18]: https://en.wikipedia.org/wiki/ECMAScript +[19]: https://en.wikipedia.org/wiki/List_of_ECMAScript_engines +[20]: https://en.wikipedia.org/wiki/V8_%28JavaScript_engine%29 +[21]: https://en.wikipedia.org/wiki/SpiderMonkey +[22]: https://teropa.info/blog/2015/07/15/overcoming-javascript-framework-fatigue.html +[23]: https://en.wikipedia.org/wiki/React_%28web_framework%29 +[24]: https://en.wikipedia.org/wiki/Angular_%28web_framework%29 +[25]: https://en.wikipedia.org/wiki/Vue.js +[26]: https://medium.com/@rangleio/the-future-of-javascript-in-the-front-end-world-2544c1814e2 +[27]: https://en.wikipedia.org/wiki/Deno_%28software%29 +[28]: https://techcrunch.com/2018/03/13/supernova-studio/ +[29]: https://futurism.com/military-created-ai-learned-to-program From 2933105096e834e5181885d1235ec5bb6ec66a84 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 3 Nov 2020 05:04:54 +0800 Subject: [PATCH 058/130] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020201102=20?= =?UTF-8?q?Understand=20your=20Python=20code=20with=20this=20open=20source?= =?UTF-8?q?=20visualization=20tool?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20201102 Understand your Python code with this open source visualization tool.md --- ...ith this open source visualization tool.md | 113 ++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 sources/tech/20201102 Understand your Python code with this open source visualization tool.md diff --git a/sources/tech/20201102 Understand your Python code with this open source visualization tool.md b/sources/tech/20201102 Understand your Python code with this open source visualization tool.md new file mode 100644 index 0000000000..88fbd404ff --- /dev/null +++ b/sources/tech/20201102 Understand your Python code with this open source visualization tool.md @@ -0,0 +1,113 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Understand your Python code with this open source visualization tool) +[#]: via: (https://opensource.com/article/20/11/python-code-viztracer) +[#]: author: (Tian Gao https://opensource.com/users/gaogaotiantian) + +Understand your Python code with this open source visualization tool +====== +VizTracer visualizes and traces Python code to provide greater insight +into how the code works. +![Python programming language logo with question marks][1] + +It's challenging to understand your Python project as it gets larger and more complex. Even when you write the entire project, it's impossible to know how it works fully. Debugging and profiling your code is essential to better understanding it. + +[VizTracer][2] is a tool to help you understand Python code by tracing and visualizing its execution. Without making any changes to your source code, VizTracer can log function entries/exits, function arguments/returns, and any arbitrary variables, then display the data using an intuitive front-end Google [Trace-Viewer][3]. + +Here is an example of running a [Monte Carlo tree search][4]: + +![Monte Carlo tree search visualization][5] + +(Tian Gao, [CC BY-SA 4.0][6]) + +Every function is logged and visualized in stack style on a timeline so that you can see what is happening when you run a program. You can zoom in to see the details at any specific point: + +![Zooming in on VizTracer visualization][7] + +(Tian Gao, [CC BY-SA 4.0][6]) + +VizTracer can also automatically log function arguments and return value; you can click on the function entry and see the detail info: + +![Viewing VizTracer details][8] + +(Tian Gao, [CC BY-SA 4.0][6]) + +Or you can create a whole new signal and use it to log variables. For example, this shows the cost value when you do a gradient descent: + +![VizTracer gradient descent][9] + +(Tian Gao, [CC BY-SA 4.0][6]) + +In contrast to other tools with complicated setups, VizTracer is super-easy to use and does not have any dependencies. You can install it from pip with: + + +``` +`pip install viztracer` +``` + +And trace your program by entering (where `` is the name of your script): + + +``` +`viztracer ` +``` + +VizTracer will generate an HTML report in your working directory that you can open in Chrome. + +VizTracer offers other advanced features, such as filters, which you can use to filter out the functions that you do not want to trace so that you'll have a cleaner report. For example, to include only the functions in files, you are interested in: + + +``` +`viztracer include_files ./ --run ` +``` + +To record the function arguments and return value: + + +``` +`viztracer --log_function_args --log_return_value ` +``` + +To log any arbitrary variables matching a certain regex: + + +``` +# log variables starts with a +viztracer --log_var a.* --run <your_script.py> +``` + +You can get other features, like custom events to log numeric values and objects, by making minor modifications to your source code. + +VizTracer also includes a virtual debugger (vdb) that can debug VizTracer's log file. vdb debugs your executed code (much like [pdb][10]) so that you can understand the code flow. Helpfully, it supports running back in time because it knows everything that happened. + +Unlike some prototypes, VizTracer implements its core in pure C, which significantly reduces the overhead to a level similar to [cProfile][11]. + +VizTracer is open source, released under the Apache 2.0 License, and supports all common operating systems platforms (Linux, macOS, and Windows). You can learn more about its features and access its source code on [GitHub][2]. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/11/python-code-viztracer + +作者:[Tian Gao][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/gaogaotiantian +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/python_programming_question.png?itok=cOeJW-8r (Python programming language logo with question marks) +[2]: https://github.com/gaogaotiantian/viztracer +[3]: http://google.github.io/trace-viewer/ +[4]: https://en.wikipedia.org/wiki/Monte_Carlo_tree_search +[5]: https://opensource.com/sites/default/files/uploads/viztracer_mcts.png (Monte Carlo tree search visualization) +[6]: https://creativecommons.org/licenses/by-sa/4.0/ +[7]: https://opensource.com/sites/default/files/uploads/viztracer_zoomin.png (Zooming in on VizTracer visualization) +[8]: https://opensource.com/sites/default/files/uploads/viztracer_details.png (Viewing VizTracer details) +[9]: https://opensource.com/sites/default/files/uploads/viztracer_gradient.png (VizTracer gradient descent) +[10]: https://docs.python.org/3/library/pdb.html +[11]: https://docs.python.org/2/library/profile.html#module-cProfile From c71df49b7a3dba39ac1dec0cb07c6a58c7ba4227 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 3 Nov 2020 05:05:16 +0800 Subject: [PATCH 059/130] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020201030=20?= =?UTF-8?q?My=20journey=20to=20becoming=20an=20open=20source=20mentor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20201030 My journey to becoming an open source mentor.md --- ...urney to becoming an open source mentor.md | 92 +++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 sources/tech/20201030 My journey to becoming an open source mentor.md diff --git a/sources/tech/20201030 My journey to becoming an open source mentor.md b/sources/tech/20201030 My journey to becoming an open source mentor.md new file mode 100644 index 0000000000..035ffaa8c7 --- /dev/null +++ b/sources/tech/20201030 My journey to becoming an open source mentor.md @@ -0,0 +1,92 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (My journey to becoming an open source mentor) +[#]: via: (https://opensource.com/article/20/10/open-source-mentor) +[#]: author: (Mehant Kammakomati https://opensource.com/users/mehant-kammakomati) + +My journey to becoming an open source mentor +====== +I grew from a teenage open source novice to a 20-year-old frequent +contributor and mentor to new users. +![Puzzle pieces coming together to form a computer screen][1] + +I was just 16 when I made my first meaningful open source contribution. It was the first code contribution I ever made, and I learned a lot from it. I'm 20 now, and I've been strongly attached to free and open source software (FOSS) ever since. I strive to be a friend to my community colleagues and to help others continue growing, learning, and succeeding. + +### Early days + +I first heard about FOSS through the [Google Code-In][2] contest. I was 16, but I was already learning computer science fundamentals, the C++ programming language, and anything else about computers I could get my hands on. I was very excited about the contest—not just because of the free Google swag, but because it gave me the opportunity to work directly on codebases being used all around the world. I jumped into the contest feet-first and started trying to solve as many open source software tasks as I could in the code, design, documentation, and research. + +![Google Code-in Mehant Kammakomati][3] + +(Mehant Kammakomati, [CC BY-SA 4.0][4]) + +It wasn't easy. I didn't know the FOSS community culture, nor much about the software development methodologies they used, nor even how to seek help or interact with others. So, rather than focusing on tasks, I started by focusing on understanding these fundamentals. + +In a way, I spent much of my time during the contest learning more about how open source development works instead of closing tasks. But I wasn't sad about my failure to contribute code during the contest and instead focused on my success in getting acquainted with free software and open source culture. + +### Fundamentals + +I didn't stop my journey there. As a beginner, I learned: + + 1. Git + 2. GitHub + 3. Using the terminal + 4. Writing meaningful commit messages + 5. How to communicate with colleagues and partake in project discussions + 6. A new way of looking at codebases and project anatomy + 7. Basic fundamentals of computer science + 8. Important components of the technical stack and programming languages + + + +The following year, I participated again in the Google Code-In contest to implement what I'd learned and try to make better bonds with my new FOSS friends. This time, I was able to complete a good number of tasks and make some valuable contributions that were pushed into production. As a result, I was selected as one of the 50 grand prize winners out of all the participants from all over the world. Being a kid, this gave me the motivation to make FOSS one of my best friends. + +### Programs that got me closer to FOSS + +From my start, I always liked being part of FOSS, and the journey has been amazing and addictive. I wanted to learn more, and I believed participating in FOSS initiatives and programs would help this happen. [Hacktoberfest][5] is one such initiative where I was able to contribute to Microsoft open source software and various other projects in 2018 and 2019. All the lessons I learned in Google Code-In were reinforced and strengthened.  + +[Google Summer of Code][6] (GSoC) was another important, engaging, and challenging experience for me. I became part of the GSoC 2019 and 2020 programs as a student with the [Sustainable Computing Research Lab][7]. These were two fast-paced and exciting summers spent hunting down bugs, writing new features, and documenting the work. + +In 2019, [Red Hat's Open Source Contest][8] was another wonderful opportunity to work on open source engineering problems. Red Hat is one of my dream companies—it provides open source software products (particularly interesting to me are container technologies and orchestration tools), so I'm lucky to have been part of the contest. The best part was that I was paired with a Red Hat engineer to mentor me throughout the course of the contest. I contributed to the [ansible-bender][9] project, and the journey absolutely stepped up my skills to the next level.  + +![Red Hat Open Source contest certificate][10] + +(Mehant Kammakomati, [CC BY-SA 4.0][4]) + +I also made valuable contributions to the [SPDX][11] online tools for their deployment infrastructure. While I was learning about blockchain technology, I contributed to Hyperledger Fabric's Python SDK. + +### Spreading FOSS culture + +I also served as a Google Code-In mentor in 2018 and 2019 and mentored many young aspirants making their very first valuable FOSS contributions. I was able to review around 400+ tasks and had the privilege of helping hundreds of students. + +Through my time as an open source benefactor, I've learned that the open source model is the best way to host a project. It avails you of many benefits, ranging from obtaining contributions from all over the world to getting project funding. Through my time as a contributor to open source programs, I've learned the value of working to inculcate FOSS culture in our institutions and students. + +I strongly believe in FOSS, and I recommend being part of this culture. Maybe you'll find it difficult to start, but if you seek the advice of friendly participants online or in a sponsored program, you'll surely get help. The most important part of the journey is the first few steps; once you get past that, you'll soon feel responsible and proud of each and every contribution you make—code or otherwise—knowing it helps your friends around the world. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/10/open-source-mentor + +作者:[Mehant Kammakomati][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/mehant-kammakomati +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/puzzle_computer_solve_fix_tool.png?itok=U0pH1uwj (Puzzle pieces coming together to form a computer screen) +[2]: https://en.wikipedia.org/wiki/Google_Code-in +[3]: https://opensource.com/sites/default/files/pictures/google_code-in.jpg (Google Code-in Mehant Kammakomati) +[4]: https://creativecommons.org/licenses/by-sa/4.0/ +[5]: https://hacktoberfest.digitalocean.com/ +[6]: https://summerofcode.withgoogle.com/archive/ +[7]: https://scorelab.org/ +[8]: https://research.redhat.com/red-hat-open-source-contest/ +[9]: https://opensource.com/article/19/10/building-container-images-ansible +[10]: https://opensource.com/sites/default/files/pictures/redhatcertificate.jpg (Red Hat Open Source contest certificate) +[11]: https://en.wikipedia.org/wiki/Software_Package_Data_Exchange From 3cf7b127a22888032aaa903d09d48d113ec167c0 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 3 Nov 2020 08:43:03 +0800 Subject: [PATCH 060/130] translated --- ...her Linux Distributions -Beginner-s Tip.md | 87 ------------------- ...her Linux Distributions -Beginner-s Tip.md | 87 +++++++++++++++++++ 2 files changed, 87 insertions(+), 87 deletions(-) delete mode 100644 sources/tech/20201028 How to Clear Terminal Screen in Ubuntu and Other Linux Distributions -Beginner-s Tip.md create mode 100644 translated/tech/20201028 How to Clear Terminal Screen in Ubuntu and Other Linux Distributions -Beginner-s Tip.md diff --git a/sources/tech/20201028 How to Clear Terminal Screen in Ubuntu and Other Linux Distributions -Beginner-s Tip.md b/sources/tech/20201028 How to Clear Terminal Screen in Ubuntu and Other Linux Distributions -Beginner-s Tip.md deleted file mode 100644 index 3cbee66656..0000000000 --- a/sources/tech/20201028 How to Clear Terminal Screen in Ubuntu and Other Linux Distributions -Beginner-s Tip.md +++ /dev/null @@ -1,87 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to Clear Terminal Screen in Ubuntu and Other Linux Distributions [Beginner’s Tip]) -[#]: via: (https://itsfoss.com/clear-terminal-ubuntu/) -[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) - -How to Clear Terminal Screen in Ubuntu and Other Linux Distributions [Beginner’s Tip] -====== - -When you are working in the terminal, often you’ll find that your terminal screen is filled up with too many commands and their outputs. - -You may want to clear the terminal to declutter the screen and focus on the next task you are going to perform. Clearing the Linux terminal screen helps a lot, trust me. - -### Clear Linux terminal with clear command - -So, how do you clear terminal in Linux? The simplest and the most common way is to use the clear command: - -``` -clear -``` - -You need no option with the clear command. It’s that simple but there are some additional things you need to know about it. - -![][1] - -_**The clear command and other methods of clearing screen may depend on the terminal emulator you are using.**_ Terminal emulator is the terminal application that you use for accessing the Linux shell (command line). - -If you use clear command on Ubuntu with GNOME Terminal, it will clear the screen and you won’t be able to see what else you had on the screen previously. - -In many other terminal emulators or Putty, it may just clear the screen for one page. If you scroll with mouse or PageUp and PageDown keys, you can still access the old screen outputs. - -Frankly, it depends on your need. If you suddenly realize that you need to refer to the output of a previously run command, perhaps having that option available will be helpful. - -### Other ways to clear terminal screen in Linux - -![][2] - -Clear command is not the only way to clear the terminal screen. - -You can use Ctrl+L [keyboard shortcut in Linux][3] to clear the screen. It works in most terminal emulators. - -``` -Ctrl+L -``` - -If you use Ctrl+L and clear command in GNOME terminal (default in Ubuntu), you’ll notice the difference between their impact. Ctrl+L moves the screen one page down giving the illusion of a clean screen but you can still access the command output history by scrolling up. - -**Some other terminal emulators have this keyboard shortcut set at Ctrl+Shift+K.** - -You can also use reset command for clearing the terminal screen. Actually, this command performs a complete terminal re-initialization. It could take a bit longer than clear command, though. - -``` -reset -``` - -There are a couple of other complicated ways to clear the screen when you want to clear the screen completely. But since the command is a bit complicated, it’s better to use it as [alias in Linux][4]: - -``` -alias cls='printf "\033c"' -``` - -You can add this alias to your bash profile so that it is available as command. - -I know this was a pretty basic topic and most Linux users probably already knew it but it doesn’t harm in covering the elementary topics for the new Linux users. Isn’t it? - -Got some secretive tip on clearing terminal screen? Why not share it with us? - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/clear-terminal-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://i1.wp.com/itsfoss.com/wp-content/uploads/2020/10/clear-command-linux.gif?resize=800%2C432&ssl=1 -[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/10/clear-terminal-screen-linux.png?resize=800%2C450&ssl=1 -[3]: https://linuxhandbook.com/linux-shortcuts/ -[4]: https://linuxhandbook.com/linux-alias-command/ diff --git a/translated/tech/20201028 How to Clear Terminal Screen in Ubuntu and Other Linux Distributions -Beginner-s Tip.md b/translated/tech/20201028 How to Clear Terminal Screen in Ubuntu and Other Linux Distributions -Beginner-s Tip.md new file mode 100644 index 0000000000..3f0e150395 --- /dev/null +++ b/translated/tech/20201028 How to Clear Terminal Screen in Ubuntu and Other Linux Distributions -Beginner-s Tip.md @@ -0,0 +1,87 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to Clear Terminal Screen in Ubuntu and Other Linux Distributions [Beginner’s Tip]) +[#]: via: (https://itsfoss.com/clear-terminal-ubuntu/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) + +如何清除 Ubuntu 和其他 Linux 发行版的终端屏幕(初学者提示) +====== + +在终端上工作时,通常会发现终端屏幕上显示了太多的命令及其输出。 + +你可能需要清除终端屏幕并专注于要执行的下一个任务。相信我,清除 Linux 终端屏幕会很有帮助。 + +### 使用 clear 命令清除 Linux 终端 + +那么,如何清除 Linux 中的终端?最简单,最常见的方法是使用 clear 命令: + +``` +clear +``` + +你无需使用 clear 命令选项。就是这么简单,但是你还需要了解其他一些内容。 + +![][1] + +_ **clear 命令和其他清除屏幕的方法可能取决于你使用的终端模拟器。** _ 终端模拟器是用于访问 Linux Shell(命令行)的终端应用。 + +如果你在具有 GNOME Terminal 的 Ubuntu 上使用 clear 命令,它将清除屏幕,并且你将无法看到之前屏幕上的内容。 + +在许多其他终端模拟器或 Putty 中,它可能只清除一页屏幕。如果使用鼠标或 PageUp 和 PageDown 键滚动,那么仍然可以看到以前的屏幕输出。 + +坦白说,这取决于你的需要。如果你突然意识到需要引用以前运行的命令的输出,那么也许可以使用该方式。 + +### 在 Linux 中清除终端屏幕的其他方法 + +![][2] + +clear 命令不是清除终端屏幕的唯一方法。 + +你可以在 Linux 中使用 Ctrl+L [键盘快捷键][3]来清除屏幕。它适用于大多数终端模拟器。 + +``` +Ctrl+L +``` + +如果你在 GNOME terminal (Ubuntu 中默认)中使用 Ctrl+L 和 clear 命令,那么你会注意到它们的影响有所不同。Ctrl+L 将屏幕向下移动一页,给人一种干净的错觉,但是你仍然可以通过向上滚动来访问命令输出历史。 + +**某些其他终端模拟器将此键盘快捷键设置为 Ctrl+Shift+K**。 + +你也可以使用 reset 命令清除终端屏幕。实际上,此命令执行完整的终端重新初始化。但是,它可能比 clear 命令要花费更长的时间。 + +``` +reset +``` + +当你想完全清除屏幕时,还有几种其他复杂的方法可以清除屏幕。但是由于命令有点复杂,所以最好将它作为 [Linux 中的别名][4]: + +``` +alias cls='printf "\033c"' +``` + +你可以将此别名添加到你的 bash 配置文件中,以便作为命令使用。 + +我知道这是一个非常基本的主题,大多数 Linux 用户可能已经知道了,但这对于为新 Linux 用户介绍基本主题并没有什么坏处。是不是? + +在清除终端屏幕上有些秘密提示​​吗?为什么不与我们分享呢? + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/clear-terminal-ubuntu/ + +作者:[Abhishek Prakash][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/10/clear-command-linux.gif?resize=800%2C432&ssl=1 +[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/10/clear-terminal-screen-linux.png?resize=800%2C450&ssl=1 +[3]: https://linuxhandbook.com/linux-shortcuts/ +[4]: https://linuxhandbook.com/linux-alias-command/ From 35ab2098bfca10bad9fc66eae238f725852474ba Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 3 Nov 2020 08:55:56 +0800 Subject: [PATCH 061/130] translating --- ...TS Release and it has Some Exciting Improvements Lined Up.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20201029 Linux Kernel 5.10 Will be the Next LTS Release and it has Some Exciting Improvements Lined Up.md b/sources/tech/20201029 Linux Kernel 5.10 Will be the Next LTS Release and it has Some Exciting Improvements Lined Up.md index ccb6a1c284..45ae5f36c1 100644 --- a/sources/tech/20201029 Linux Kernel 5.10 Will be the Next LTS Release and it has Some Exciting Improvements Lined Up.md +++ b/sources/tech/20201029 Linux Kernel 5.10 Will be the Next LTS Release and it has Some Exciting Improvements Lined Up.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 7d27c49a91b3fe4540d52148178dc690811fad71 Mon Sep 17 00:00:00 2001 From: chenmu-kk <53132802+chenmu-kk@users.noreply.github.com> Date: Tue, 3 Nov 2020 09:53:04 +0800 Subject: [PATCH 062/130] Update 20190402 When Wi-Fi is mission-critical, a mixed-channel architecture is the best option.md --- ...critical, a mixed-channel architecture is the best option.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190402 When Wi-Fi is mission-critical, a mixed-channel architecture is the best option.md b/sources/tech/20190402 When Wi-Fi is mission-critical, a mixed-channel architecture is the best option.md index 29a73998d7..3a13957772 100644 --- a/sources/tech/20190402 When Wi-Fi is mission-critical, a mixed-channel architecture is the best option.md +++ b/sources/tech/20190402 When Wi-Fi is mission-critical, a mixed-channel architecture is the best option.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (chenmu-kk) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 3c94251bf2cd1cfa0a95b8b87858b30c6e7c58cd Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 3 Nov 2020 10:28:14 +0800 Subject: [PATCH 063/130] PRF @geekpi --- ...Install Ubuntu Server on a Raspberry Pi.md | 65 ++++++++----------- 1 file changed, 28 insertions(+), 37 deletions(-) diff --git a/translated/tech/20200909 How to Install Ubuntu Server on a Raspberry Pi.md b/translated/tech/20200909 How to Install Ubuntu Server on a Raspberry Pi.md index 8dd702fafc..569598e580 100644 --- a/translated/tech/20200909 How to Install Ubuntu Server on a Raspberry Pi.md +++ b/translated/tech/20200909 How to Install Ubuntu Server on a Raspberry Pi.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (How to Install Ubuntu Server on a Raspberry Pi) @@ -10,7 +10,9 @@ 如何在树莓派上安装 Ubuntu 服务器? ====== -[树莓派][1]是最著名的[单板计算机][2]。最初,树莓派项目的范围是针对促进学校和发展中国家的计算机基础科学教学。 +![][6] + +[树莓派][1]是最著名的[单板计算机][2]。最初,树莓派项目的范围旨在促进学校和发展中国家的计算机基础科学的教学。 它的低成本、便携性和极低的功耗,使得它的受欢迎程度远远超过预期。从气象站到家庭自动化,玩家们用树莓派搭建了许多[酷炫的项目][3]。 @@ -22,28 +24,22 @@ * 在树莓派上设置无线网络连接 * 通过 SSH 访问你的树莓派 - - ![][5] -**本教程需要以下东西**: +**本教程需要以下设备**: * 一张 micro SD 卡(建议使用 8GB 或更大的卡) * 一台带有 micro SD 卡读卡器的计算机(运行 Linux、Windows 或 macOS) * 树莓派 2、3 或 4 * 良好的互联网连接 - * 用于树莓派 2 和 3 的 HDMI 线和用于树莓派 4的 micro HDMI 线(可选) + * 用于树莓派 2 和 3 的 HDMI 线和用于树莓派 4 的 micro HDMI 线(可选) * 一套 USB 键盘(可选) - - ### 在树莓派上安装 Ubuntu 服务器 -![][6] - 在本教程中,我使用 Ubuntu 来创建树莓派 SD 卡,但你可以在其他 Linux 发行版、macOS 和 Windows 上创建它。这是因为准备 SD 卡的步骤对 Raspberry Pi Imager 工具而言是一样的。 -Raspberry Pi Imager 工具会自动下载你[选择树莓派系统][7]的镜像。这意味着你需要一个良好的网络连接来下载 1GB 左右的数据。 +Raspberry Pi Imager 工具会自动下载你[选择的树莓派系统][7]镜像。这意味着你需要一个良好的网络连接来下载 1GB 左右的数据。 #### 步骤 1:用 Raspberry Pi Imager 准备 SD 卡 @@ -55,20 +51,17 @@ Raspberry Pi Imager 工具会自动下载你[选择树莓派系统][7]的镜像 * [用于 Windows 的 Raspberry Pi Imager][9] * [用于 MacOS 的 Raspberry Pi Imager][10] - - - 尽管我使用的是 Ubuntu,但我不会使用上面列出的 Debian 软件包,而是使用命令行安装 snap 包。这个方法可以适用于更广泛的 Linux 发行版。 ``` sudo snap install rpi-imager ``` -安装好 Raspberry Pi Imager 工具后,找到并打开它,点击 ”CHOOSE OS“ 菜单。 +安装好 Raspberry Pi Imager 工具后,找到并打开它,点击 “CHOOSE OS” 菜单。 ![][11] -滚动菜单并点击 ”Ubuntu“ (核心和服务器镜像)。 +滚动菜单并点击 “Ubuntu” (“核心”和“服务器”镜像)。 ![][12] @@ -78,7 +71,7 @@ sudo snap install rpi-imager ![][13] -从 “SD Card” 菜单中选择你的 microSD 卡,然后点击 ”WRITE“。 +从 “SD Card” 菜单中选择你的 microSD 卡,然后点击 “WRITE”。 ![][14] @@ -90,19 +83,19 @@ sudo snap install rpi-imager #### 步骤 2:在 Ubuntu 服务器上添加 WiFi 支持 -烧录完 micro SD 卡后,你就差不多可以使用它了。在使用它之前,有一件事情你可能想做,那就是添加 Wi-Fi 支持。 +烧录完 micro SD 卡后,你就差不多可以使用它了。在使用它之前,有一件事情你可能想做,那就是添加 Wi-Fi 支持。 -SD 卡仍然插入读卡器中,打开文件管理器,找到卡上的 ”system-boot” 分区。 +SD 卡仍然插入读卡器中,打开文件管理器,找到卡上的 “system-boot” 分区。 你要找的和需要编辑的文件名为 `network-config`。 ![][16] -这个过程也可以在 Windows 和 MacOS 上完成。如前所述,编辑 **`network-config`** 文件,添加你的 Wi-Fi 凭证。 +这个过程也可以在 Windows 和 MacOS 上完成。如前所述,编辑 `network-config` 文件,添加你的 Wi-Fi 凭证。 -首先,取消矩形框内的行的注释(删除开头的标签 “#”),然后将 myhomewifi 替换为你的 Wi-Fi 网络名称。 +首先,取消矩形框内的行的注释(删除开头的标签 `#`)。 -之后,将 myhomewifi 替换为你的 Wi-Fi 网络名,用引号括起来,比如 ”itsfoss“,将 ”S3kr1t“ 替换为 Wi-Fi 密码,用引号括起来,比如 ”12345679“。 +之后,将 `myhomewifi` 替换为你的 Wi-Fi 网络名,比如 `"itsfoss"`,将 `"S3kr1t"` 替换为 Wi-Fi 密码,用引号括起来,比如 `"12345679"`。 ![][17] @@ -126,27 +119,25 @@ wifis: 只需将 micro SD 卡插入树莓派,连接显示器、键盘和鼠标。现在[打开你的树莓派][18]。它将出现 TTY 登录屏幕(黑色终端屏幕)并询问用户名和密码。 - * 默认用户名:ubuntu - * 默认密码:ubuntu + * 默认用户名:`ubuntu` + * 默认密码:`ubuntu` +看到提示符时,用 `ubuntu` 作为密码。登录成功后,[Ubuntu 会要求你更改默认密码][19]。 - -看到提示时,用 “**ubuntu**” 作为密码。登录成功后,[Ubuntu 会要求你更改默认密码][19]。 - -享受你的 Ubuntu 服务器吧! +享受你的 Ubuntu 服务器吧! #### 步骤 3:通过 SSH 远程连接到你的树莓派(如果你没有树莓派的显示器、键盘和鼠标的话) -如果你没有专门的显示器与树莓派一起使用也没关系。当你可以直接通过 SSH 进入它并按照你的方式使用它时,谁还需要一个带有显示器的服务器呢? +如果你没有专门与树莓派一起使用的显示器也没关系。当你可以直接通过 SSH 进入它并按照你的方式使用它时,谁还需要一个带有显示器的服务器呢? -**在 Ubuntu 和 Mac OS**上,通常已经安装了一个 SSH 客户端。要远程连接到你的树莓派,你需要发现它的 IP 地址。检查[连接到你的网络的设备][20],看看哪个是树莓派。 +**在 Ubuntu 和 Mac OS**上,通常已经安装了一个 SSH 客户端。要远程连接到你的树莓派,你需要找到它的 IP 地址。检查[连接到你的网络的设备][20],看看哪个是树莓派。 由于我没有 Windows 机器,你可以访问[微软][21]提供的综合指南。 打开终端,运行以下命令: ``` -ssh [email protected]_pi_ip_address +ssh ubuntu@raspberry_pi_ip_address ``` 你可能会看到以下信息确认连接: @@ -155,21 +146,21 @@ ssh [email protected]_pi_ip_address Are you sure you want to continue connecting (yes/no/[fingerprint])? ``` -输入 ”yes“,然后点击回车键。 +输入 `yes`,然后点击回车键。 ![][22] -当提示时,用前面提到的 ”ubuntu“ 作为密码。当然,你会被要求更改密码。 +当提示时,用前面提到的 `ubuntu` 作为密码。当然,你会被要求更改密码。 完成后,你将自动注销,你必须使用新密码重新连接。 -你的 Ubuntu 服务器就可以在树莓派上运行了! +你的 Ubuntu 服务器就可以在树莓派上运行了! -**总结** +### 总结 在树莓派上安装 Ubuntu 服务器是一个简单的过程,而且它的预配置程度很高,使用起来很愉快。 -我不得不说,在所有[我在树莓派上尝试的操作系统][7]中,Ubuntu 服务器是最容易安装的。我并没有夸大其词。请查看我的[在树莓派上安装 Arch Linux][23]的指南,以供参考。 +我不得不说,在所有[我在树莓派上尝试的操作系统][7]中,Ubuntu 服务器是最容易安装的。我并没有夸大其词。请查看我的[在树莓派上安装 Arch Linux][23] 的指南,以供参考。 希望这篇指南也能帮助你在树莓派上安装 Ubuntu 服务器。如果你有问题或建议,请在评论区告诉我。 @@ -180,7 +171,7 @@ via: https://itsfoss.com/install-ubuntu-server-raspberry-pi/ 作者:[Dimitrios Savvopoulos][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/) 荣誉推出 From 6f13c560d5aab65f0cd75663e0d8e5857d614d7e Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 3 Nov 2020 10:30:51 +0800 Subject: [PATCH 064/130] PUB @geekpi https://linux.cn/article-12783-1.html --- ...20200909 How to Install Ubuntu Server on a Raspberry Pi.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20200909 How to Install Ubuntu Server on a Raspberry Pi.md (99%) diff --git a/translated/tech/20200909 How to Install Ubuntu Server on a Raspberry Pi.md b/published/20200909 How to Install Ubuntu Server on a Raspberry Pi.md similarity index 99% rename from translated/tech/20200909 How to Install Ubuntu Server on a Raspberry Pi.md rename to published/20200909 How to Install Ubuntu Server on a Raspberry Pi.md index 569598e580..58c77ccb7f 100644 --- a/translated/tech/20200909 How to Install Ubuntu Server on a Raspberry Pi.md +++ b/published/20200909 How to Install Ubuntu Server on a Raspberry Pi.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12783-1.html) [#]: subject: (How to Install Ubuntu Server on a Raspberry Pi) [#]: via: (https://itsfoss.com/install-ubuntu-server-raspberry-pi/) [#]: author: (Dimitrios Savvopoulos https://itsfoss.com/author/dimitrios/) From ca07b0412f211477a6e1aa2824282cdd356d8961 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Tue, 3 Nov 2020 10:37:39 +0800 Subject: [PATCH 065/130] Rename sources/tech/20201030 My journey to becoming an open source mentor.md to sources/talk/20201030 My journey to becoming an open source mentor.md --- .../20201030 My journey to becoming an open source mentor.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => talk}/20201030 My journey to becoming an open source mentor.md (100%) diff --git a/sources/tech/20201030 My journey to becoming an open source mentor.md b/sources/talk/20201030 My journey to becoming an open source mentor.md similarity index 100% rename from sources/tech/20201030 My journey to becoming an open source mentor.md rename to sources/talk/20201030 My journey to becoming an open source mentor.md From e7a1e775cdf28ba1c9e1752d37a06784a36bf709 Mon Sep 17 00:00:00 2001 From: zouchong Date: Tue, 3 Nov 2020 20:11:12 +0800 Subject: [PATCH 066/130] hankchow translating --- ...a Kubernetes Minecraft server with Ansible-s Helm modules.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20201012 Build a Kubernetes Minecraft server with Ansible-s Helm modules.md b/sources/tech/20201012 Build a Kubernetes Minecraft server with Ansible-s Helm modules.md index 08dd088007..8708a104d9 100644 --- a/sources/tech/20201012 Build a Kubernetes Minecraft server with Ansible-s Helm modules.md +++ b/sources/tech/20201012 Build a Kubernetes Minecraft server with Ansible-s Helm modules.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (HankChow) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From e06fd0478a11d94441f842a980701d9dcf0ca801 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 4 Nov 2020 05:02:15 +0800 Subject: [PATCH 067/130] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020201103=20?= =?UTF-8?q?Create=20a=20list=20in=20a=20Flutter=20mobile=20app?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20201103 Create a list in a Flutter mobile app.md --- ...3 Create a list in a Flutter mobile app.md | 379 ++++++++++++++++++ 1 file changed, 379 insertions(+) create mode 100644 sources/tech/20201103 Create a list in a Flutter mobile app.md diff --git a/sources/tech/20201103 Create a list in a Flutter mobile app.md b/sources/tech/20201103 Create a list in a Flutter mobile app.md new file mode 100644 index 0000000000..b6befbda3b --- /dev/null +++ b/sources/tech/20201103 Create a list in a Flutter mobile app.md @@ -0,0 +1,379 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Create a list in a Flutter mobile app) +[#]: via: (https://opensource.com/article/20/11/flutter-lists-mobile-app) +[#]: author: (Vitaly Kuprenko https://opensource.com/users/kooper) + +Create a list in a Flutter mobile app +====== +Learn how to create Flutter app screens and pass data between them. +![Mobile devices and collaboration leads to staring at our phones][1] + +Flutter is a popular open source toolkit for building cross-platform apps. In "[Create a mobile app with Flutter][2]," I demonstrated how to install [Flutter][3] on Linux and create your first app. In this article, I'll show you how to add a list of items in your app, with each item opening a new screen. This is a common design method for mobile apps, so you've probably seen it before, but here's a screenshot to help you visualize it: + +![Testing the Flutter app][4] + +(Vitaly Kuprenko, [CC BY-SA 4.0][5]) + +Flutter uses the [Dart][6] language. In some of the code snippets below, you'll see statements beginning with slashes. Two slashes (`/ /`) is for code comments, which explain certain pieces of code. Three slashes (`/ / /`) denotes Dart's documentation comments, which explain Dart classes and their properties and other useful information. + +### Examine a Flutter app's main parts + +A typical entry point for a  Flutter application is a `main()` function, usually found in a file called `lib/main.dart`: + + +``` +void main() { + runApp(MyApp()); +} +``` + +This method is called when the app is launched. It runs `MyApp()`, a StatelessWidget containing all necessary app settings in the `MaterialApp()` widget (app theme, initial page to open, and so on): + + +``` +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { +   return MaterialApp( +     title: 'Flutter Demo', +     theme: ThemeData( +       primarySwatch: Colors.blue, +       visualDensity: VisualDensity.adaptivePlatformDensity, +     ), +     home: MyHomePage(title: 'Flutter Demo Home Page'), +   ); + } +} +``` + +The initial page generated is called `MyHomePage()`. It's a stateful widget that contains variables that can be passed to a widget constructor parameter (take a look at the code above, where you pass the variable `title` to the page constructor): + + +``` +class MyHomePage extends StatefulWidget { +  MyHomePage({[Key][7] key, this.title}) : super(key: key); + +  final [String][8] title; + +  @override +  _MyHomePageState createState() => _MyHomePageState(); +} +``` + +StatefulWidget means that this page has its own state: `_MyHomePageState`. It lets you call the `setState()` method there to rebuild the page's user interface (UI): + + +``` +class _MyHomePageState extends State<MyHomePage> { + int _counter = 0; // Number of taps on + button. + + void _incrementCounter() { // Increase number of taps and update UI by calling setState(). +   setState(() { +     _counter++; +   }); + } + ... +} +``` + +A `build()` function in stateful and stateless widgets is responsible for UI appearance: + + +``` +@override +Widget build(BuildContext context) { + return Scaffold( // Page widget. +   appBar: AppBar( // Page app bar with title and back button if user can return to previous screen. +     title: Text(widget.title), // Text to display page title. +   ), +   body: Center( // Widget to center child widget. +     child: Column( // Display children widgets in column. +       mainAxisAlignment: MainAxisAlignment.center, +       children: <Widget>[ +         Text( // Static text. +           'You have pushed the button this many times:', +         ), +         Text( // Text with our taps number. +           '$_counter', // $ sign allows us to use variables inside a string. +           style: Theme.of(context).textTheme.headline4,// Style of the text, “Theme.of(context)” takes our context and allows us to access our global app theme. +         ), +       ], +     ), +   ), +        // Floating action button to increment _counter number. +   floatingActionButton: FloatingActionButton( +     onPressed: _incrementCounter, +     tooltip: 'Increment', +     child: [Icon][9](Icons.add), +   ), + ); +} +``` + +### Modify your app + +It's good practice to separate the `main()` method and other pages' code into different files. To do so, you need to create a new .dart file by right-clicking on the **lib** folder then selecting **New > Dart File**: + +![Create a new Dart file][10] + +(Vitaly Kuprenko, [CC BY-SA 4.0][5]) + +Name the file `items_list_page`. + +Switch back to your `main.dart` file, cut the `MyHomePage` and `_MyHomePageState` code, and paste it into your new file. Next, set your cursor on `StatefulWidget` (underlined below in red), press Alt+Enter, and select `package:flutter/material.dart`: + +![Importing Flutter package][11] + +(Vitaly Kuprenko, [CC BY-SA 4.0][5]) + +This adds `flutter/material.dart` to your file so that you can use the default material widgets Flutter provides. + +Then, right-click on **MyHomePage class > Refactor > Rename…** and rename this class to `ItemsListPage`: + +![Renaming StatefulWidget class][12] + +(Vitaly Kuprenko, [CC BY-SA 4.0][5]) + +Flutter recognizes that you renamed the StatefulWidget class and automatically renames its State class: + +![State class renamed automatically][13] + +(Vitaly Kuprenko, [CC BY-SA 4.0][5]) + +Return to the `main.dart` file and change the name `MyHomePage` to `ItemsListPage`. Once you start typing, your Flutter integrated development environment (probably IntelliJ IDEA Community Edition, Android Studio, and VS Code or [VSCodium][14]) suggests how to autocomplete your code: + +![IDE suggests autocompleting code][15] + +(Vitaly Kuprenko, [CC BY-SA 4.0][5]) + +Press Enter to complete your input. It will add the missing import to the top of the file automatically: + +![Adding missing import ][16] + +(Vitaly Kuprenko, [CC BY-SA 4.0][5]) + +You've completed your initial setup. Now you need to create a new .dart file in the **lib** folder and name it `item_model`. (Note that classes have UpperCamelCase names, but files have snake_case names.) Paste this code into the new file: + + +``` +/// Class that stores list item info: +/// [id] - unique identifier, number. +/// [icon] - icon to display in UI. +/// [title] - text title of the item. +/// [description] - text description of the item. +class ItemModel { + // class constructor + ItemModel(this.id, this.icon, this.title, this.description); + + // class fields + final int id; + final IconData icon; + final [String][8] title; + final [String][8] description; +} +``` + +Return to `items_list_page.dart`, and replace the existing `_ItemsListPageState` code with: + + +``` +class _ItemsListPageState extends State<ItemsListPage> { + +// Hard-coded list of [ItemModel] to be displayed on our page. + final List<ItemModel> _items = [ +   ItemModel(0, Icons.account_balance, 'Balance', 'Some info'), +   ItemModel(1, Icons.account_balance_wallet, 'Balance wallet', 'Some info'), +   ItemModel(2, Icons.alarm, 'Alarm', 'Some info'), +   ItemModel(3, Icons.my_location, 'My location', 'Some info'), +   ItemModel(4, Icons.laptop, 'Laptop', 'Some info'), +   ItemModel(5, Icons.backup, 'Backup', 'Some info'), +   ItemModel(6, Icons.settings, 'Settings', 'Some info'), +   ItemModel(7, Icons.call, 'Call', 'Some info'), +   ItemModel(8, Icons.restore, 'Restore', 'Some info'), +   ItemModel(9, Icons.camera_alt, 'Camera', 'Some info'), + ]; + + @override + Widget build(BuildContext context) { +   return Scaffold( +       appBar: AppBar( +         title: Text(widget.title), +       ), +       body: [ListView][17].builder( // Widget which creates [ItemWidget] in scrollable list. +         itemCount: _items.length, // Number of widget to be created. +         itemBuilder: (context, itemIndex) => // Builder function for every item with index. +             ItemWidget(_items[itemIndex], () { +           _onItemTap(context, itemIndex); +         }), +       )); + } + + // Method which uses BuildContext to push (open) new MaterialPageRoute (representation of the screen in Flutter navigation model) with ItemDetailsPage (StateFullWidget with UI for page) in builder. + _onItemTap(BuildContext context, int itemIndex) { +   Navigator.of(context).push(MaterialPageRoute( +       builder: (context) => ItemDetailsPage(_items[itemIndex]))); + } +} + +// StatelessWidget with UI for our ItemModel-s in ListView. +class ItemWidget extends StatelessWidget { + const ItemWidget(this.model, this.onItemTap, {[Key][7] key}) : super(key: key); + + final ItemModel model; + final Function onItemTap; + + @override + Widget build(BuildContext context) { +   return InkWell( // Enables taps for child and add ripple effect when child widget is long pressed. +     onTap: onItemTap, +     child: ListTile( // Useful standard widget for displaying something in ListView. +       leading: [Icon][9](model.icon), +       title: Text(model.title), +     ), +   ); + } +} +``` + +Consider moving `ItemWidget` to a separate file in the **lib** folder to improve the readability of your code. + +The only thing missing is the `ItemDetailsPage` class. Create a new file in the **lib** folder and name it `item_details_page`. Then copy and paste this code there: + + +``` +import 'package:flutter/material.dart'; + +import 'item_model.dart'; + +/// Widget for displaying detailed info of [ItemModel] +class ItemDetailsPage extends StatefulWidget { + final ItemModel model; + + const ItemDetailsPage(this.model, {[Key][7] key}) : super(key: key); + + @override + _ItemDetailsPageState createState() => _ItemDetailsPageState(); +} + +class _ItemDetailsPageState extends State<ItemDetailsPage> { + @override + Widget build(BuildContext context) { +   return Scaffold( +     appBar: AppBar( +       title: Text(widget.model.title), +     ), +     body: Center( +       child: Column( +         children: [ +           const SizedBox(height: 16), +           [Icon][9]( +             widget.model.icon, +             size: 100, +           ), +           const SizedBox(height: 16), +           Text( +             'Item description: ${widget.model.description}', +             style: TextStyle(fontSize: 18), +           ) +         ], +       ), +     ), +   ); + } +} +``` + +Almost nothing new here. Notice that `_ItemDetailsPageState` is using the `widget.item.title` code. It enables referring to the `StatefulWidget` fields in its `State` class. + +### Add some animation + +Now, it's time to add some basic animation: + + 1. Go to `ItemWidget` code. + 2. Put the cursor on the `Icon()` widget in the `build()` method. + 3. Press Alt+Enter and select "Wrap with widget…" + + + +![Wrap with widget option][18] + +(Vitaly Kuprenko, [CC BY-SA 4.0][5]) + +Start typing "Hero" and select the suggestion for `Hero((Key key, @required this, tag, this.create))`: + +![Finding the Hero widget][19] + +(Vitaly Kuprenko, [CC BY-SA 4.0][5]) + +Next, add the tag property `tag: model.id` to the Hero widget: + +![Adding the tag property model.id to the Hero widget][20] + +(Vitaly Kuprenko, [CC BY-SA 4.0][5]) + +And the final step is to make the same change in the `item_details_page.dart` file: + +![Changing item_details_page.dart file][21] + +(Vitaly Kuprenko, [CC BY-SA 4.0][5]) + +The previous steps wrapped the `Icon()` widget with the `Hero()` widget. Do you remember in `ItemModel` you added the `id field` but didn't use it anywhere? The Hero widget takes a unique tag for the child widget. If Hero detects that different app screens (MaterialPageRoute) have a Hero widget with the same tag, it'll automatically animate the transition between these pages. + +Test it out by running the app on an Android emulator or physical device. When you open and close the item details page, you'll see a nice animation of the icon: + +![Testing the Flutter app][4] + +(Vitaly Kuprenko, [CC BY-SA 4.0][5]) + +### Wrapping up + +In this tutorial, you learned: + + * The components of a standard, automatically created app + * How to add several pages that pass data among each other + * How to add a simple animation for those pages + + + +If you want to learn more, check out Flutter's [docs][22] (with links to sample projects, videos, and "recipes" for creating Flutter apps) and the [source code][23], which is open source under a BSD 3-Clause License. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/11/flutter-lists-mobile-app + +作者:[Vitaly Kuprenko][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/kooper +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/team-phone-collaboration-mobile-device.png?itok=v3EjbRK6 (Mobile devices and collaboration leads to staring at our phones) +[2]: https://opensource.com/article/20/9/mobile-app-flutter +[3]: https://flutter.dev/ +[4]: https://opensource.com/sites/default/files/uploads/flutter_test.gif (Testing the Flutter app) +[5]: https://creativecommons.org/licenses/by-sa/4.0/ +[6]: https://dart.dev/ +[7]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+key +[8]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+string +[9]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+icon +[10]: https://opensource.com/sites/default/files/uploads/flutter_new-dart-file_0.png (Create a new Dart file) +[11]: https://opensource.com/sites/default/files/uploads/flutter_import-package.png (Importing Flutter package) +[12]: https://opensource.com/sites/default/files/uploads/flutter_rename-class.png (Renaming StatefulWidget class) +[13]: https://opensource.com/sites/default/files/uploads/flutter_stateclassrenamed.png (State class renamed automatically) +[14]: https://opensource.com/article/20/6/open-source-alternatives-vs-code +[15]: https://opensource.com/sites/default/files/uploads/flutter_autocomplete.png (IDE suggests autocompleting code) +[16]: https://opensource.com/sites/default/files/uploads/flutter_import-input.png (Adding missing import ) +[17]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+listview +[18]: https://opensource.com/sites/default/files/uploads/flutter_wrapwithwidget.png (Wrap with widget option) +[19]: https://opensource.com/sites/default/files/uploads/flutter_hero.png (Finding the Hero widget) +[20]: https://opensource.com/sites/default/files/uploads/flutter_hero-tag.png (Adding the tag property model.id to the Hero widget) +[21]: https://opensource.com/sites/default/files/uploads/flutter_details-tag.png (Changing item_details_page.dart file) +[22]: https://flutter.dev/docs +[23]: https://github.com/flutter From a86907b764c86ec5bfa5ab7cb5cc90028b5efcb7 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 4 Nov 2020 05:02:27 +0800 Subject: [PATCH 068/130] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020201103=20?= =?UTF-8?q?4=20ways=20to=20run=20Kubernetes=20locally?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20201103 4 ways to run Kubernetes locally.md --- ...201103 4 ways to run Kubernetes locally.md | 137 ++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100644 sources/tech/20201103 4 ways to run Kubernetes locally.md diff --git a/sources/tech/20201103 4 ways to run Kubernetes locally.md b/sources/tech/20201103 4 ways to run Kubernetes locally.md new file mode 100644 index 0000000000..b2035519b2 --- /dev/null +++ b/sources/tech/20201103 4 ways to run Kubernetes locally.md @@ -0,0 +1,137 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (4 ways to run Kubernetes locally) +[#]: via: (https://opensource.com/article/20/11/run-kubernetes-locally) +[#]: author: (Bryant Son https://opensource.com/users/brson) + +4 ways to run Kubernetes locally +====== +Set up a local development environment or just try out the container +orchestration platform with these tools. +![Business woman on laptop sitting in front of window][1] + +[Kubernetes][2] is an open source orchestration platform for containers. Developed by Google, it offers an open source system for automating deployment, scaling, and managing containerized applications. Although most people run Kubernetes in a cloud environment, running a Kubernetes cluster locally is not only possible, it has at least two benefits: + + * You can quickly try out Kubernetes before deciding to use it as your primary platform to deploy your application. + * You can set it up as a local development environment before pushing anything to a public cloud, thus allowing separation between the development environment and the production environment. + + + +Setting up a local Kubernetes environment as your development environment is the recommended option, no matter your situation, because this setup can create a safe and agile application-deployment process. + +Fortunately, there are multiple platforms that you can try out to run Kubernetes locally, and they are all open source and available under the [Apache 2.0][3] license. + + * [Minikube][4] has the primary goals of being the best tool for local Kubernetes application development, and to support all Kubernetes features that fit. + * [kind][5] runs local Kubernetes clusters using Docker container "nodes." + * [CodeReady Containers][6] (CRC) manages a local OpenShift 4.x cluster optimized for testing and development purposes. + * [Minishift][7] helps you run OpenShift 3.x clusters locally by running a single-node OpenShift cluster inside a virtual machine (VM). + + + +### Minikube + +![Minikube][8] + +(Bryant Son, [CC BY-SA 4.0][9]) + +[Minikube][10] is the most well-known and popular choice to run a Kubernetes environment on a local computer. No matter what operating system you use, [Minikube's documentation][11] offers an easy [installation][12] guide for you. Generally, installing Minikube is as simple as running two commands: + + +``` +$ curl -LO +$ sudo install minikube-PLATFORM-amd64 /usr/local/bin/minikube +``` + +Minikube quickly sets up a local Kubernetes cluster on Linux, macOS, or Windows with the following features: + + * Supports the latest Kubernetes release (+6 previous minor versions) + * Cross-platform (Linux, macOS, Windows) + * Deploys as a VM, a container, or on bare-metal + * Multiple container runtimes (CRI-O, containerd, Docker) + * Docker API endpoint for blazing-fast image pushes + * LoadBalancer, filesystem mounts, FeatureGates, and other advanced features + * Add-ons for easily installing Kubernetes applications + + + +Because Minikube is an open source project, you can contribute to its [source code][4]. + +### kind + +![kind][13] + +(Bryant Son, [CC BY-SA 4.0][9]) + +[kind][14]'s developers describe it as "a tool for running local Kubernetes clusters using Docker container 'nodes.'" It was designed for testing Kubernetes but may also be used for local development or continuous integration. + +kind supports: + + * Multi-node (including high-availability) clusters + * Building Kubernetes release builds from source + * Make/Bash/Docker or Bazel, in addition to pre-published builds + * Linux, macOS, and Windows + + + +In addition, kind is a Cloud Native Computing Foundation (CNCF)-certified conformant Kubernetes installer. Because it's open source, you can find kind's [source code][5] in its GitHub repository. + +### CodeReady Container (CRC) + +![CodeReady Container][15] + +(Bryant Son, [CC BY-SA 4.0][9]) + +If you want to try the latest version of OpenShift locally, try Red Hat [CodeReady Containers][16] (CRC). CRC brings a minimal OpenShift 4.x cluster to your local computer that provides a minimal environment for development and testing purposes. CRC is mainly targeted for use on developers' desktops. + +You can find CodeReady Container's [source code][6] on GitHub, also available under the Apache 2.0 license. + +### Minishift + +![Minishift][17] + +(Bryant Son, [CC BY-SA 4.0][9]) + +The [Minishift][7] project [helps you run a version of OpenShift][18] with [OKD][19] locally with a single-node OpenShift cluster inside a virtual machine. You can use it to [try OpenShift][20] or to develop for the cloud, on your local host. + +Like the other tools on this list, Minishift is open source, and you can access its [source code][7] on GitHub. + +### Kubernetes for the people + +As you can see, there are several ways to try out Kubernetes in your local environment. Did I miss anything? Feel free to leave a comment to ask a question or make a suggestion. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/11/run-kubernetes-locally + +作者:[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/lenovo-thinkpad-laptop-concentration-focus-windows-office.png?itok=-8E2ihcF (Woman using laptop concentrating) +[2]: https://kubernetes.io/ +[3]: https://www.apache.org/licenses/LICENSE-2.0 +[4]: https://github.com/kubernetes/minikube +[5]: https://github.com/kubernetes-sigs/kind +[6]: https://github.com/code-ready/crc +[7]: https://github.com/minishift/minishift +[8]: https://opensource.com/sites/default/files/uploads/1_minikube.jpg (Minikube) +[9]: https://creativecommons.org/licenses/by-sa/4.0/ +[10]: https://minikube.sigs.k8s.io/docs/ +[11]: https://minikube.sigs.k8s.io/docs +[12]: https://minikube.sigs.k8s.io/docs/start/ +[13]: https://opensource.com/sites/default/files/uploads/2_kind.jpg (kind) +[14]: https://kind.sigs.k8s.io +[15]: https://opensource.com/sites/default/files/uploads/4_crc.jpg (CodeReady Container) +[16]: https://code-ready.github.io/crc +[17]: https://opensource.com/sites/default/files/uploads/3_minishift.jpg (Minishift) +[18]: https://www.redhat.com/sysadmin/kubernetes-cluster-laptop +[19]: https://www.okd.io/ +[20]: https://www.redhat.com/sysadmin/learn-openshift-minishift From c7836b7614b0247d659f12efc885ca18e3a6fe0b Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 4 Nov 2020 05:02:39 +0800 Subject: [PATCH 069/130] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020201103=20?= =?UTF-8?q?How=20the=20Kubernetes=20scheduler=20works?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20201103 How the Kubernetes scheduler works.md --- ...1103 How the Kubernetes scheduler works.md | 159 ++++++++++++++++++ 1 file changed, 159 insertions(+) create mode 100644 sources/tech/20201103 How the Kubernetes scheduler works.md diff --git a/sources/tech/20201103 How the Kubernetes scheduler works.md b/sources/tech/20201103 How the Kubernetes scheduler works.md new file mode 100644 index 0000000000..ba6918fdc9 --- /dev/null +++ b/sources/tech/20201103 How the Kubernetes scheduler works.md @@ -0,0 +1,159 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How the Kubernetes scheduler works) +[#]: via: (https://opensource.com/article/20/11/kubernetes-scheduler) +[#]: author: (Mike Calizo https://opensource.com/users/mcalizo) + +How the Kubernetes scheduler works +====== +Understand how the Kubernetes scheduler discovers new pods and assigns +them to nodes. +![Parts, modules, containers for software][1] + +[Kubernetes][2] has emerged as the standard orchestration engine for containers and containerized workloads. It provides a common, open source abstraction layer that spans public and private cloud environments. + +For those already familiar with Kubernetes and its components, the conversation is usually around maximizing Kubernetes' power. But when you're just learning Kubernetes, it's wise to begin with some general knowledge about Kubernetes and its components (including the [Kubernetes scheduler][3]), as shown in this high-level view, before trying to use it in production. + +![][4] + +Kubernetes also uses control planes and nodes. + + 1. **Control plane:** Also known as master, these nodes are responsible for making global decisions about the clusters and detecting or responding to cluster events. The control plane components are: + * etcd + * kube-apiserver  + * kube-controller-manager + * scheduler + 2. **Nodes:** Also called worker nodes, these sets of nodes are where a workload resides. They should always talk to the control plane to get the information necessary for the workload to run and to communicate and connect outside the cluster. Worker nodes' components are: + * kubelet + * kube-proxy + * container runtime Interface. + + + +I hope this background helps you understand how the Kubernetes components are stacked together. + +### How Kubernetes scheduler works + +A Kubernetes [pod][5] is comprised of one or more containers with shared storage and network resources. The Kubernetes scheduler's task is to ensure that each pod is assigned to a node to run on. + +At a high level, here is how the Kubernetes scheduler works: + + 1. Every pod that needs to be scheduled is added to a queue + 2. When new pods are created, they are also added to the queue + 3. The scheduler continuously takes pods off that queue and schedules them + + + +The [scheduler's code][6] (`scheduler.go`) is large, around 9,000 lines, and fairly complex, but the important bits to tackle are: + + 1. **Code that waits/watches for pod creation** +The code that watches for pod creation begins on line 8970 of `scheduler.go`; it waits indefinitely for new pods: + + +``` +// Run begins watching and scheduling. It waits for cache to be synced, then starts a goroutine and returns immediately. + +func (sched *Scheduler) Run() { +        if !sched.config.WaitForCacheSync() { +                return +        } + +        go wait.Until(sched.scheduleOne, 0, sched.config.StopEverything) +``` + + 2. **Code that is responsible for queuing the pod** +The function responsible for pod queuing is: + + +``` +// queue for pods that need scheduling +        podQueue *cache.FIFO +``` + +The code responsible for queuing the pod begins on line 7360 of `scheduler.go`. When the event handler is triggered to indicate that a new pod is available, this piece of code automatically puts the new pod in the queue: + + +``` +func (f *ConfigFactory) getNextPod() *v1.Pod { +        for { +                pod := cache.Pop(f.podQueue).(*v1.Pod) +                if f.ResponsibleForPod(pod) { +                        glog.V(4).Infof("About to try and schedule pod %v", pod.Name) +                        return pod +                } +        } +} +``` + + 3. **Code that handles errors** +You will inevitably encounter scheduling errors in pod scheduling. The following code is how the scheduler handles the errors. It listens to `podInformer` and then spits out an error that the pod was not scheduled and terminates: + + +``` +// scheduled pod cache +        podInformer.Informer().AddEventHandler( +                cache.FilteringResourceEventHandler{ +                        FilterFunc: func(obj interface{}) bool { +                                switch t := obj.(type) { +                                case *v1.Pod: +                                        return assignedNonTerminatedPod(t) +                                default: +                                        runtime.HandleError(fmt.Errorf("unable to handle object in %T: %T", c, obj)) +                                        return false +                                } +                        }, +``` + + + + +In other words, the Kubernetes scheduler is responsible for: + + * Scheduling the newly created pods on nodes with enough space to satisfy the pod's resource needs + * Listening to the kube-apiserver and the controller for the presence of newly created pods and then scheduling them to an available node on the cluster + * Watching for unscheduled pods and binding them to nodes by using the `/binding` pod sub-resource API. + + + +For example, imagine an application is being deployed that requires 1GB of memory and two CPU cores. Therefore, the pods for the application are created on a node that has enough resources available. Then, the scheduler continues to run forever, watching to see if there are pods that need to be scheduled. + +### Learn more + +To have a working Kubernetes cluster, you need to get all the components above working together in sync. The scheduler is a complex piece of code, but Kubernetes is awesome software, and currently, it's the default choice when talking about adopting cloud-native applications. + +Learning Kubernetes requires time and effort, but having it as one of your skills will give you an edge that should bring rewards in your career. There are a lot of good learning resources available, and the [documentation][7] is good. If you are interested in learning more, I recommend starting with: + + * [Kubernetes the hard way][8] + * [Kubernetes the hard way on bare metal][9] + * [Kubernetes the hard way on AWS][10] + + + +What are your favorite ways to learn about Kubernetes? Please share in the comments. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/11/kubernetes-scheduler + +作者:[Mike Calizo][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/mcalizo +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/containers_modules_networking_hardware_parts.png?itok=rPpVj92- (Parts, modules, containers for software) +[2]: https://kubernetes.io/ +[3]: https://kubernetes.io/docs/concepts/scheduling-eviction/kube-scheduler/ +[4]: https://lh4.googleusercontent.com/egB0SSsAglwrZeWpIgX7MDF6u12oxujfoyY6uIPa8WLqeVHb8TYY_how57B4iqByELxvitaH6-zjAh795wxAB8zenOwoz2YSMIFRqHsMWD9ohvUTc3fNLCzo30r7lUynIHqcQIwmtRo +[5]: https://kubernetes.io/docs/concepts/workloads/pods/ +[6]: https://github.com/kubernetes/kubernetes/blob/e4551d50e57c089aab6f67333412d3ca64bc09ae/plugin/pkg/scheduler/scheduler.go +[7]: https://kubernetes.io/docs/home/ +[8]: https://github.com/kelseyhightower/kubernetes-the-hard-way +[9]: https://github.com/Praqma/LearnKubernetes/blob/master/kamran/Kubernetes-The-Hard-Way-on-BareMetal.md +[10]: https://github.com/Praqma/LearnKubernetes/blob/master/kamran/Kubernetes-The-Hard-Way-on-AWS.md From 2ddf7bcbc3d83557eda9c3927b88328eb9db5c79 Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 4 Nov 2020 08:42:57 +0800 Subject: [PATCH 070/130] translating --- ...028 What-s new in Fedora 33 Workstation.md | 81 ------------------- ...028 What-s new in Fedora 33 Workstation.md | 81 +++++++++++++++++++ 2 files changed, 81 insertions(+), 81 deletions(-) delete mode 100644 sources/tech/20201028 What-s new in Fedora 33 Workstation.md create mode 100644 translated/tech/20201028 What-s new in Fedora 33 Workstation.md diff --git a/sources/tech/20201028 What-s new in Fedora 33 Workstation.md b/sources/tech/20201028 What-s new in Fedora 33 Workstation.md deleted file mode 100644 index bff7b31228..0000000000 --- a/sources/tech/20201028 What-s new in Fedora 33 Workstation.md +++ /dev/null @@ -1,81 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (What’s new in Fedora 33 Workstation) -[#]: via: (https://fedoramagazine.org/whats-new-fedora-33-workstation/) -[#]: author: (Gregory Bartholomew https://fedoramagazine.org/author/glb/) - -What’s new in Fedora 33 Workstation -====== - -![][1] - -Fedora 33 Workstation is the [latest release][2] of our free, leading-edge operating system. You can download it from [the official website here][3] right now. There are several new and noteworthy changes in Fedora 33 Workstation. Read more details below. - -### GNOME 3.38 - -Fedora 33 Workstation includes the latest release of GNOME Desktop Environment for users of all types. GNOME 3.38 in Fedora 33 Workstation includes many updates and improvements, including: - -#### A new GNOME Tour app - -New users are now greeted by “a new _Tour_ application, highlighting the main functionality of the desktop and providing first time users a nice welcome to GNOME.” - -![The new GNOME Tour application in Fedora 33][4] - -#### Drag to reorder apps - -GNOME 3.38 replaces the previously split Frequent and All apps views with a single customizable and consistent view that allows you to reorder apps and organize them into custom folders. Simply click and drag to move apps around. - -![GNOME 3.38 Drag to Reorder][5] - -#### Improved screen recording - -The screen recording infrastructure in GNOME Shell has been improved to take advantage of PipeWire and kernel APIs. This will help reduce resource consumption and improve responsiveness. - -GNOME 3.38 also provides many additional features and enhancements. Check out the [GNOME 3.38 Release Notes][6] for further information. - -* * * - -### B-tree file system - -As [announced previously][7], new installations of Fedora 33 will default to using [Btrfs][8]. Features and enhancements are added to Btrfs with each new kernel release. The [change log][9] has a complete summary of the features that each new kernel version brings to Btrfs. - -* * * - -### Swap on ZRAM - -Anaconda and Fedora IoT have been using swap-on-zram by default for years. With Fedora 33, swap-on-zram will be enabled by default instead of a swap partition. Check out [the Fedora wiki page][10] for more details about swap-on-zram. - -* * * - -### Nano by default - -Fresh Fedora 33 installations will set the EDITOR environment variable to [_nano_ by default][11]. This change affects several command line tools that spawn a text editor when they require user input. With earlier releases, this environment variable default was unspecified, leaving it up to the individual application to pick a default editor. Typically, applications would use _[vi][12]_ as their default editor due to it being a small application that is traditionally available on the base installation of most Unix/Linux operating systems. Since Fedora 33 includes nano in its base installation, and since nano is more intuitive for a beginning user to use, Fedora 33 will use nano by default. Users who want vi can, of course, override the value of the EDITOR variable in their own environment. See [the Fedora change request][11] for more details. - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/whats-new-fedora-33-workstation/ - -作者:[Gregory Bartholomew][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://fedoramagazine.org/author/glb/ -[b]: https://github.com/lujun9972 -[1]: https://fedoramagazine.org/wp-content/uploads/2020/10/f33workstation-816x345.jpg -[2]: https://fedoramagazine.org/announcing-fedora-33/ -[3]: https://getfedora.org/workstation -[4]: https://fedoramagazine.org/wp-content/uploads/2020/10/fedora-33-gnome-tour-1.png -[5]: https://fedoramagazine.org/wp-content/uploads/2020/10/drag-to-reorder-1.gif -[6]: https://help.gnome.org/misc/release-notes/3.38/ -[7]: https://fedoramagazine.org/btrfs-coming-to-fedora-33/ -[8]: https://en.wikipedia.org/wiki/Btrfs -[9]: https://btrfs.wiki.kernel.org/index.php/Changelog#By_feature -[10]: https://fedoraproject.org/wiki/Changes/SwapOnZRAM -[11]: https://fedoraproject.org/wiki/Changes/UseNanoByDefault -[12]: https://en.wikipedia.org/wiki/Vi diff --git a/translated/tech/20201028 What-s new in Fedora 33 Workstation.md b/translated/tech/20201028 What-s new in Fedora 33 Workstation.md new file mode 100644 index 0000000000..a181148cac --- /dev/null +++ b/translated/tech/20201028 What-s new in Fedora 33 Workstation.md @@ -0,0 +1,81 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (What’s new in Fedora 33 Workstation) +[#]: via: (https://fedoramagazine.org/whats-new-fedora-33-workstation/) +[#]: author: (Gregory Bartholomew https://fedoramagazine.org/author/glb/) + +Fedora 33 Workstation 的新功能 +====== + +![][1] + +Fedora 33 Workstation 是我们免费的、领先的操作系统的[最新版本][2]。你现在就可以从[官方网站][3]下载它。Fedora 33 Workstation 中有一些新的和值得注意的变化。请阅读更多如下细节。 + +### GNOME 3.38 + +Fedora 33 Workstation 为各类用户提供了最新版本的 GNOME 桌面环境。在 Fedora 33 Workstation 中的 GNOME 3.38 包含了许多更新和改进,包括: + +#### 一个新的 GNOME Tour 应用 + +现在,新用户会看到一个“新的 _Tour_ 应用,高亮显示了桌面的主要功能,并为第一次使用 GNOME 的用户提供一个很好的欢迎”。 + +![The new GNOME Tour application in Fedora 33][4] + +#### 拖动重排序应用 + +GNOME 3.38 用一个单一的可定制和一致的视图取代了之前分开的常用和所有应用视图,这允许你重新排列应用并将它们组织到自定义文件夹中。只需点击并拖动即可移动应用。 + +![GNOME 3.38 Drag to Reorder][5] + +#### 改进屏幕录制 + +GNOME Shell 中的屏幕录制基础架构已被改进,以利用 PipeWire 和内核 API。这将有助于减少资源消耗并提高响应速度。 + +GNOME 3.38 还提供了许多额外的功能和改进。查看 [GNOME 3.38 发行说明][6]以获得更多信息。 + +* * * + +### B-tree 文件系统 + +正如[之前宣布的][7],新安装的 Fedora 33 将默认使用 [Btrfs][8]。每一个新的内核版本都会为 Btrfs 增加一些特性和增强功能。[变更日志][9]有一个完整的总结,它介绍了每个新内核版本给 Btrfs 带来的功能。 + +* * * + +### Swap on ZRAM + +Anaconda 和 Fedora IoT 多年来一直默认使用 swap-on-zram。在 Fedora 33 中,swap-on-zram 将被默认启用,而不是 swap 分区。查看 [Fedora wiki 页面][10]了解更多关于 swap-on-zram 的细节。 + +* * * + +### 默认使用 Nano + +新的 Fedora 33 将把 EDITOR 环境变量默认设置为 [_nano_ ][11]。这个变化影响了一些命令行工具,当它们需要用户输入时,会打开一个文本编辑器。在早期的版本中,这个环境变量的默认值并没有被指定,而是由各个应用程序来选择一个默认的编辑器。通常情况下,应用程序会使用 [_vi_][12]作为它们的默认编辑器,因为它是一个小应用,通常在大多数 Unix/Linux 操作系统的基础安装中都可以使用。由于 Fedora 33 的基本安装中包含了 nano,而且 nano 对于初学者来说更加直观,所以 Fedora 33 将默认使用 nano。当然,想要使用 vi 的用户可以在自己的环境中覆盖 EDITOR 变量的值。详见[Fedora修改请求][11]获取更多信息。 + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/whats-new-fedora-33-workstation/ + +作者:[Gregory Bartholomew][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://fedoramagazine.org/author/glb/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2020/10/f33workstation-816x345.jpg +[2]: https://fedoramagazine.org/announcing-fedora-33/ +[3]: https://getfedora.org/workstation +[4]: https://fedoramagazine.org/wp-content/uploads/2020/10/fedora-33-gnome-tour-1.png +[5]: https://fedoramagazine.org/wp-content/uploads/2020/10/drag-to-reorder-1.gif +[6]: https://help.gnome.org/misc/release-notes/3.38/ +[7]: https://fedoramagazine.org/btrfs-coming-to-fedora-33/ +[8]: https://en.wikipedia.org/wiki/Btrfs +[9]: https://btrfs.wiki.kernel.org/index.php/Changelog#By_feature +[10]: https://fedoraproject.org/wiki/Changes/SwapOnZRAM +[11]: https://fedoraproject.org/wiki/Changes/UseNanoByDefault +[12]: https://en.wikipedia.org/wiki/Vi From 61cbeda14140da82ba4f2dbd74caea75ae3a7974 Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 4 Nov 2020 08:57:59 +0800 Subject: [PATCH 071/130] translating --- ...1102 4 cool new projects to try in COPR from October 2020.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20201102 4 cool new projects to try in COPR from October 2020.md b/sources/tech/20201102 4 cool new projects to try in COPR from October 2020.md index b88e106090..80bd6f2f77 100644 --- a/sources/tech/20201102 4 cool new projects to try in COPR from October 2020.md +++ b/sources/tech/20201102 4 cool new projects to try in COPR from October 2020.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From d3c803e1af770536e8d3de0f30506c8061dfb2eb Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 4 Nov 2020 10:14:46 +0800 Subject: [PATCH 072/130] PRF --- ... in Debian, Ubuntu and Other Linux Distributions.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/translated/tech/20201030 How to Use apt-cache Command in Debian, Ubuntu and Other Linux Distributions.md b/translated/tech/20201030 How to Use apt-cache Command in Debian, Ubuntu and Other Linux Distributions.md index 36521d7fb8..288867e50a 100644 --- a/translated/tech/20201030 How to Use apt-cache Command in Debian, Ubuntu and Other Linux Distributions.md +++ b/translated/tech/20201030 How to Use apt-cache Command in Debian, Ubuntu and Other Linux Distributions.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (How to Use apt-cache Command in Debian, Ubuntu and Other Linux Distributions) @@ -52,7 +52,7 @@ apt-cache search package_name ![][5] -你也可以缩小搜索范围,只在产品名称中查找搜索词。 +你也可以缩小搜索范围,只在软件包名称中查找搜索词。 ``` apt-cache search --names-only package_name @@ -92,7 +92,7 @@ apt-cache showpkg package_name 默认情况下,每个已安装的软件包版本的优先级为 100,未安装的软件包的优先级为 500。同一软件包可能有多个不同优先级的版本。APT 会安装优先级较高的版本,除非安装的版本较新。 -如果不理解这个部分,也没关系。对于一个普通的 Linux 用户来说,会极少纠结于这么深的软件包管理。 +如果不理解这个部分,也没关系。对于一个普通的 Linux 用户来说,会极少纠结于这么深的软件包管理知识。 #### 检查软件包的依赖关系和反向依赖关系。 @@ -130,7 +130,7 @@ apt-cache pkgnames | wc -l 你是否注意到你不需要成为 [root 用户][19]就可以使用 `apt-cache` 命令? -较新的 [apt 命令][20]也有一些与 `apt-cache` 命令对应的功能选项。由于 `apt` 比较新,所以在脚本中还是首选 `apt-get` 及其相关的 `apt-cache` 等命令。 +较新的 [apt 命令][20]也有一些与 `apt-cache` 命令相对应的功能选项。由于 `apt` 比较新,所以在脚本中还是首选使用 `apt-get` 及其相关的 `apt-cache` 等命令。 希望你觉得本教程对你有帮助。如果你对上面讨论的任何一点有疑问或者有改进的建议,请在评论中告诉我。 @@ -141,7 +141,7 @@ via: https://itsfoss.com/apt-cache-command/ 作者:[Abhishek Prakash][a] 选题:[lujun9972][b] 译者:[wxy](https://github.com/wxy) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From e45b25669a88aabaa0f168a9a53f5d9c69ec2d46 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 4 Nov 2020 10:15:22 +0800 Subject: [PATCH 073/130] PUB @geekpi https://linux.cn/article-12786-1.html --- ...Command in Debian, Ubuntu and Other Linux Distributions.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20201030 How to Use apt-cache Command in Debian, Ubuntu and Other Linux Distributions.md (99%) diff --git a/translated/tech/20201030 How to Use apt-cache Command in Debian, Ubuntu and Other Linux Distributions.md b/published/20201030 How to Use apt-cache Command in Debian, Ubuntu and Other Linux Distributions.md similarity index 99% rename from translated/tech/20201030 How to Use apt-cache Command in Debian, Ubuntu and Other Linux Distributions.md rename to published/20201030 How to Use apt-cache Command in Debian, Ubuntu and Other Linux Distributions.md index 288867e50a..32432da3d8 100644 --- a/translated/tech/20201030 How to Use apt-cache Command in Debian, Ubuntu and Other Linux Distributions.md +++ b/published/20201030 How to Use apt-cache Command in Debian, Ubuntu and Other Linux Distributions.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12786-1.html) [#]: subject: (How to Use apt-cache Command in Debian, Ubuntu and Other Linux Distributions) [#]: via: (https://itsfoss.com/apt-cache-command/) [#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) From 6676178d8e6af4ed688dbabcfca9f3dc99e20359 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 4 Nov 2020 10:31:15 +0800 Subject: [PATCH 074/130] PRF @geekpi --- ...t Cache and Reclaim Precious Disk Space.md | 52 +++++++++---------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/translated/tech/20201007 How to Clear Apt Cache and Reclaim Precious Disk Space.md b/translated/tech/20201007 How to Clear Apt Cache and Reclaim Precious Disk Space.md index b1cabdd910..3ea3e497cc 100644 --- a/translated/tech/20201007 How to Clear Apt Cache and Reclaim Precious Disk Space.md +++ b/translated/tech/20201007 How to Clear Apt Cache and Reclaim Precious Disk Space.md @@ -1,50 +1,52 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (How to Clear Apt Cache and Reclaim Precious Disk Space) [#]: via: (https://itsfoss.com/clear-apt-cache/) [#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) -如何清除 apt 缓存来回收宝贵的磁盘空间 +如何清除 APT 缓存来回收宝贵的磁盘空间 ====== -如何清除 apt 缓存?你只需使用这个 [apt-get 命令][1]选项: +![][13] + +如何清除 APT 缓存?你只需使用这个 [apt-get 命令][1]选项: ``` sudo apt-get clean ``` -但是,清理 apt 缓存不仅仅是运行上面的命令。 +但是,清理 APT 缓存不仅仅是运行上面的命令。 -在本教程中,我将解释什么是 apt 缓存、为什么会使用它、为什么你要清理它,以及关于清理 apt 缓存你应该知道的其他事情。 +在本教程中,我将解释什么是 APT 缓存、为什么会使用它、为什么你要清理它,以及关于清理 APT 缓存你应该知道的其他事情。 -我将在这里使用 Ubuntu 作为参考,但由于这是关于 apt 的,因此它也适用于 [Debian][2] 和其他基于 Debian 和 Ubuntu 的发行版,比如 Linux Mint、Deepin 等等。 +我将在这里使用 Ubuntu 作为参考,但由于这是关于 APT 的,因此它也适用于 [Debian][2] 和其他基于 Debian 和 Ubuntu 的发行版,比如 Linux Mint、Deepin 等等。 -### 什么是 apt 缓存?为什么要使用它? +### 什么是 APT 缓存?为什么要使用它? -当你使用 apt-get 或 [apt 命令][3]安装一个软件包时(或在软件中心安装 DEB 包),apt [包管理器][4]会以 .deb 格式下载软件包及其依赖关系,并将其保存在 /var/cache/apt/archives 文件夹中。 +当你使用 `apt-get` 或 [apt 命令][3]安装一个软件包时(或在软件中心安装 DEB 包),APT [包管理器][4]会以 .deb 格式下载软件包及其依赖关系,并将其保存在 `/var/cache/apt/archives` 文件夹中。 ![][5] -下载时,apt 将 deb 包保存在 /var/cache/apt/archives/partial 目录下。当 deb 包完全下载完毕后,它会被移到 /var/cache/apt/archives 目录下。 +下载时,`apt` 将 deb 包保存在 `/var/cache/apt/archives/partial` 目录下。当 deb 包完全下载完毕后,它会被移到 `/var/cache/apt/archives` 目录下。 下载完包的 deb 文件及其依赖关系后,你的系统就会[从这些 deb 文件中安装包][6]。 -现在你明白缓存的用途了吧?系统在安装软件包之前,需要一个地方把软件包文件存放在某个地方。如果你了解 [Linux 目录结构][7],你就会明白,/var/cache 是合适的地方。 +现在你明白缓存的用途了吧?系统在安装软件包之前,需要一个地方把软件包文件存放在某个地方。如果你了解 [Linux 目录结构][7],你就会明白,`/var/cache` 是合适的地方。 #### 为什么安装包后要保留缓存? 下载的 deb 文件在安装完成后并不会立即从目录中删除。如果你删除了一个软件包,然后重新安装,你的系统会在缓存中查找这个软件包,并从这里获取它,而不是重新下载(只要缓存中的软件包版本与远程仓库中的版本相同)。 -这样就快多了。你可以自己尝试一下,看看一个程序第一次安装,删除后再安装需要多长时间。你可以[使用 time 命令来了解完成一个命令需要多长时间][8]:_**time sudo apt install package_name**_ +这样就快多了。你可以自己尝试一下,看看一个程序第一次安装,删除后再安装需要多长时间。你可以[使用 time 命令来了解完成一个命令需要多长时间][8]:`time sudo apt install package_name`。 我找不到任何关于缓存保留策略的内容,所以我无法说明 Ubuntu 会在缓存中保留下载的包多长时间。 -#### 你应该清理 apt 缓存吗? +#### 你应该清理 APT 缓存吗? -这取决于你。如果你的根目录下的磁盘空间用完了,你可以清理 apt cache 来回收磁盘空间。这是 [Ubuntu 上释放磁盘空间的几种方法][9]之一。 +这取决于你。如果你的根目录下的磁盘空间用完了,你可以清理 APT 缓存来回收磁盘空间。这是 [Ubuntu 上释放磁盘空间的几种方法][9]之一。 使用 [du 命令][10]检查缓存占用了多少空间: @@ -52,43 +54,41 @@ sudo apt-get clean 有的时候,这可能会占用几百兆,如果你正在运行一个服务器,这些空间可能是至关重要的。 -#### 如何清理 apt 缓存? +#### 如何清理 APT 缓存? -如果你想清除 apt 缓存,有一个专门的命令来做。所以不要去手动删除缓存目录。只要使用这个命令就可以了: +如果你想清除 APT 缓存,有一个专门的命令来做。所以不要去手动删除缓存目录。只要使用这个命令就可以了: ``` sudo apt-get clean ``` -这将删除 /var/cache/apt/archives 目录的内容(除了锁文件)。以下是 apt-get clean 命令模拟删除内容: +这将删除 `/var/cache/apt/archives` 目录的内容(除了锁文件)。以下是 `apt-get clean` 命令模拟删除内容: ![][12] -还有一个命令是关于清理 apt 缓存的: +还有一个命令是关于清理 APT 缓存的: ``` sudo apt-get autoclean ``` -与 clean 不同的是,autoclean 只删除那些无法从仓库中下载的包。 +与 `clean` 不同的是,`autoclean` 只删除那些无法从仓库中下载的包。 -假设你安装了包 xyz。它的 deb 文件仍然保留在缓存中。如果现在仓库中有新的 xyz 包,那么缓存中现有的这个 xyz 包就已经过时了,没有用了。autoclean 选项会删除这种不能再下载的无用包。 +假设你安装了包 xyz。它的 deb 文件仍然保留在缓存中。如果现在仓库中有新的 xyz 包,那么缓存中现有的这个 xyz 包就已经过时了,没有用了。`autoclean` 选项会删除这种不能再下载的无用包。 #### 删除 apt 缓存安全吗? -![][13] +是的,清除 APT 创建的缓存是完全安全的。它不会对系统的性能产生负面影响。也许如果你重新安装软件包,下载时间会更长一些,但也仅此而已。 -是的,清除 apt 创建的缓存是完全安全的。它不会对系统的性能产生负面影响。也许如果你重新安装软件包,下载时间会更长一些,但也仅此而已。 - -再说一次,使用 apt-get clean 命令。它比手动删除缓存目录更快、更简单。 +再说一次,使用 `apt-get clean` 命令。它比手动删除缓存目录更快、更简单。 你也可以使用像 [Stacer][14] 或 [Bleachbit][15] 这样的图形工具来实现这个目的。 #### 总结 -在写这篇文章的时候,新的 apt 命令没有内置选项。不过,为了保持向后的兼容性,仍然可以运行 _**apt clean**_ (内部应该是运行 apt-get clean)。请参考这篇文章来[了解 apt 和 apt-get 的区别][16]。 +在写这篇文章的时候,新的 `apt` 命令没有这样的内置选项。不过,为了保持向后的兼容性,仍然可以运行 `apt clean` (内部应该是运行了 `apt-get clean`)。请参考这篇文章来[了解 apt 和 apt-get 的区别][16]。 -我希望你觉得这个关于 apt 缓存的解释很有趣。虽然这不是什么必要的东西,但了解这些小东西会让你对你的 Linux 系统更加了解。 +我希望你觉得这个关于 APT 缓存的解释很有趣。虽然这不是什么必要的东西,但了解这些小东西会让你对你的 Linux 系统更加了解。 欢迎你在评论区提出反馈和建议。 @@ -99,7 +99,7 @@ via: https://itsfoss.com/clear-apt-cache/ 作者:[Abhishek Prakash][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/) 荣誉推出 From 18cdd962c73af4632e9e90e896d44c7c9df716a0 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 4 Nov 2020 10:31:45 +0800 Subject: [PATCH 075/130] PUB @geekpi https://linux.cn/article-12787-1.html --- ... How to Clear Apt Cache and Reclaim Precious Disk Space.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20201007 How to Clear Apt Cache and Reclaim Precious Disk Space.md (98%) diff --git a/translated/tech/20201007 How to Clear Apt Cache and Reclaim Precious Disk Space.md b/published/20201007 How to Clear Apt Cache and Reclaim Precious Disk Space.md similarity index 98% rename from translated/tech/20201007 How to Clear Apt Cache and Reclaim Precious Disk Space.md rename to published/20201007 How to Clear Apt Cache and Reclaim Precious Disk Space.md index 3ea3e497cc..de0b5a3659 100644 --- a/translated/tech/20201007 How to Clear Apt Cache and Reclaim Precious Disk Space.md +++ b/published/20201007 How to Clear Apt Cache and Reclaim Precious Disk Space.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12787-1.html) [#]: subject: (How to Clear Apt Cache and Reclaim Precious Disk Space) [#]: via: (https://itsfoss.com/clear-apt-cache/) [#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) From 8dffef12540cd9374b9c028f63c56e3f96c24f1a Mon Sep 17 00:00:00 2001 From: chenmu-kk <53132802+chenmu-kk@users.noreply.github.com> Date: Wed, 4 Nov 2020 13:18:17 +0800 Subject: [PATCH 076/130] Update 20190402 When Wi-Fi is mission-critical, a mixed-channel architecture is the best option.md --- ...itical, a mixed-channel architecture is the best option.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/tech/20190402 When Wi-Fi is mission-critical, a mixed-channel architecture is the best option.md b/sources/tech/20190402 When Wi-Fi is mission-critical, a mixed-channel architecture is the best option.md index 3a13957772..bbb6d9563f 100644 --- a/sources/tech/20190402 When Wi-Fi is mission-critical, a mixed-channel architecture is the best option.md +++ b/sources/tech/20190402 When Wi-Fi is mission-critical, a mixed-channel architecture is the best option.md @@ -10,11 +10,11 @@ When Wi-Fi is mission-critical, a mixed-channel architecture is the best option ====== -### Multi-channel is the norm for Wi-Fi today, but it’s not always the best choice. Single-channel and hybrid APs offer compelling alternatives when reliable Wi-Fi is a must. +### 当Wi-Fi 成为关键业务时,对于如今的它来说,混合信道架构是最好的多信道选择,但它并不总是最佳的选择。当需要可靠的Wi-Fi时,单信道和混合Aps提供了令人信服的替代方案。 ![Getty Images][1] -I’ve worked with a number of companies that have implemented digital projects only to see them fail. The ideation was correct, the implementation was sound, and the market opportunity was there. The weak link? The Wi-Fi network. +I’ve worked with a number of companies that have implemented digital projects only to 我曾与许多实施数字项目的公司合作,结果却发现它们失败了。想法是正确的,施行是健全的,市场机遇也在那里。那薄弱的环节在哪里呢?是Wi-Fi网络。 For example, a large hospital wanted to improve clinician response times to patient alarms by having telemetry information sent to mobile devices. Without the system, the only way a nurse would know about a patient alarm is from an audible alert. And with all the background noise, it’s often tough to discern where noises are coming from. The problem was the Wi-Fi network in the hospital had not been upgraded in years and caused messages to be significantly delayed in their delivery, often taking four to five minutes to deliver. The long delivery times caused a lack of confidence in the system, so many clinicians stopped using it and went back to manual alerting. As a result, the project was considered a failure. From 4e18612b696b11d9c576717bfaa9d875ea848531 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 4 Nov 2020 23:46:22 +0800 Subject: [PATCH 077/130] PRF @geekpi --- ... virtual tables in Apache Cassandra 4.0.md | 30 +++++++++---------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/translated/tech/20201006 Start using virtual tables in Apache Cassandra 4.0.md b/translated/tech/20201006 Start using virtual tables in Apache Cassandra 4.0.md index d4f20db68c..13c0509f3d 100644 --- a/translated/tech/20201006 Start using virtual tables in Apache Cassandra 4.0.md +++ b/translated/tech/20201006 Start using virtual tables in Apache Cassandra 4.0.md @@ -1,40 +1,38 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Start using virtual tables in Apache Cassandra 4.0) [#]: via: (https://opensource.com/article/20/10/virtual-tables-apache-cassandra) [#]: author: (Ben Bromhead https://opensource.com/users/ben-bromhead) -开始在 Apache Cassandra 4.0 中使用虚拟表 +如何在 Apache Cassandra 4.0 中使用虚拟表 ====== -它们是什么以及如何使用它们。 -![Computer laptop in space][1] -在最近的 [Apache Cassandra 4.0 测试版][3]中的[众多新增功能][2]中,虚拟表是一个值得关注的功能。 +> 虚拟表是什么以及如何使用。 -在以前的 Cassandra 版本中,用户需要访问 Java 管理扩展 ([JMX][4]) 来检查 Cassandra 的细节,如运行中的压缩、客户端、度量和各种配置设置。虚拟表消除了这些挑战。Cassandra 4.0 测试版使用户能够从一个只读的系统表中以 Cassandra 查询语言 (CQL) 行的形式查询这些细节和数据。 +![](https://img.linux.net.cn/data/attachment/album/202011/04/234511kpmv6dzac6fjmr65.jpg) -以下是之前 Cassandra 版本中基于 JMX 的机制是如何工作的。想象一下,一个用户想要检查集群中某个节点的压缩状态。用户首先要建立一个 JMX 连接,在节点上运行 `nodetool compactionstats`。这个要求给用户带来了一些复杂的问题。用户的客户端是否配置了 JMX 访问?Cassandra 节点和防火墙是否配置为允许 JMX 访问?是否准备好了适当的安全和审计措施,并落实到位?这些只是用户在处理 Cassandra 以前版本时不得不面对的一些问题。 +在最近的发布的 [Apache Cassandra 4.0 测试版][3]中的[众多新增功能][2]中,虚拟表virtual table是一个值得关注的功能。 + +在以前的 Cassandra 版本中,用户需要访问 Java 管理扩展Java Management Extensions([JMX][4]) 来查看 Cassandra 的细节,如运行中的压实compaction、客户端、度量和各种配置设置。虚拟表消除了这些挑战。Cassandra 4.0 测试版让用户能够从一个只读的系统表中以 Cassandra 查询语言Cassandra Query Language(CQL)行的形式查询这些细节和数据。 + +以下是之前 Cassandra 版本中基于 JMX 的机制是如何工作的。想象一下,一个用户想要检查集群中某个节点的压实状态。用户首先要建立一个 JMX 连接,在节点上运行 `nodetool compactionstats`。这个要求马上就给用户带来了一些复杂的问题。用户的客户端是否配置了 JMX 访问?Cassandra 节点和防火墙是否配置为允许 JMX 访问?是否准备好了适当的安全和审计措施,并落实到位?这些只是用户在处理 Cassandra 以前版本时必须面对的其中一些问题。 在 Cassandra 4.0 中,虚拟表使得用户可以利用之前配置的驱动来查询所需信息。这一变化消除了与实现和维护 JMX 访问相关的所有开销。 -Cassandra 4.0 创建了两个新的键空间来帮助用户利用虚拟表:`system_views` 和 `system_virtual_schema`。`system_views` 键空间包含了用户查询的所有有价值的信息,有用地存储在一些表中。`system_virtual_schema` 键空间,顾名思义,存储了这些虚拟表的所有必要的模式信息。 +Cassandra 4.0 创建了两个新的键空间keyspace来帮助用户利用虚拟表:`system_views` 和 `system_virtual_schema`。`system_views` 键空间包含了用户查询的所有有价值的信息,有用地存储在一些表中。`system_virtual_schema` 键空间,顾名思义,存储了这些虚拟表的所有必要的模式信息。 ![system_views and system_virtual_schema keyspaces and tables][5] -(Ben Bromhead, [CC BY-SA 4.0][6]) +重要的是要明白,每个虚拟表的范围仅限于其节点。任何虚拟表查询都将返回的数据,只对其协调器的节点有效,而不管一致性如何。为了简化这一要求,已经在几个驱动中添加了支持,以便在这些查询中指定协调器节点 (Python、DataStax Java 和其他驱动现在提供了这种支持)。 -重要的是要明白,每个虚拟表的范围仅限于其节点。任何虚拟表查询都将返回只对作为其协调器的节点有效的数据,而不管一致性如何。为了简化这一要求,已经在几个驱动中添加了支持,以便在这些查询中指定协调器节点 (Python、DataStax Java 和其他驱动现在提供了这种支持)。 - -为了说明这一点,请检查这个 `sstable_tasks` 虚拟表。这个虚拟表显示了对 [SSTables][7] 的所有操作,包括压缩、清理、升级等。 +为了说明这一点,请查看这个 `sstable_tasks` 虚拟表。这个虚拟表显示了对 [SSTables][7] 的所有操作,包括压实、清理、升级等。 ![Querying the sstable_tasks virtual table][8] -(Ben Bromhead, [CC BY-SA 4.0][6]) - -如果用户在以前的 Cassandra 版本中运行 `nodetool compactionstats`,则会显示相同类型的信息。 在这里,查询发现该节点当前有一个活动的压缩。它还显示了它的进度以及它的键空间和表。得益于虚拟表,用户可以快速收集这些信息,并同样有效地获得正确诊断集群健康状况所需的能力。 +如果用户在以前的 Cassandra 版本中运行 `nodetool compactionstats`,则会显示相同类型的信息。 在这里,这个查询发现该节点当前有一个活动的压缩。它还显示了它的进度以及它的键空间和表。得益于虚拟表,用户可以快速收集这些信息,并同样有效地获得正确诊断集群健康状况所需的能力。 需要说明的是,Cassandra 4.0 并没有去除对 JMX 访问的需求。JMX 仍然是查询某些指标的唯一选择。尽管如此,用户会欢迎简单地使用 CQL 来获取关键集群指标的能力。由于虚拟表提供的便利,用户可能会将之前投入到 JMX 工具的时间和资源重新投入到 Cassandra 本身。客户端工具也应该开始利用虚拟表提供的优势。 @@ -47,7 +45,7 @@ via: https://opensource.com/article/20/10/virtual-tables-apache-cassandra 作者:[Ben Bromhead][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/) 荣誉推出 From a4d599b8770f68d08414ff71cee8a8b31c1dfc46 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 4 Nov 2020 23:47:07 +0800 Subject: [PATCH 078/130] PUB @geekpi https://linux.cn/article-12791-1.html --- ...1006 Start using virtual tables in Apache Cassandra 4.0.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20201006 Start using virtual tables in Apache Cassandra 4.0.md (98%) diff --git a/translated/tech/20201006 Start using virtual tables in Apache Cassandra 4.0.md b/published/20201006 Start using virtual tables in Apache Cassandra 4.0.md similarity index 98% rename from translated/tech/20201006 Start using virtual tables in Apache Cassandra 4.0.md rename to published/20201006 Start using virtual tables in Apache Cassandra 4.0.md index 13c0509f3d..ba78aa772f 100644 --- a/translated/tech/20201006 Start using virtual tables in Apache Cassandra 4.0.md +++ b/published/20201006 Start using virtual tables in Apache Cassandra 4.0.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12791-1.html) [#]: subject: (Start using virtual tables in Apache Cassandra 4.0) [#]: via: (https://opensource.com/article/20/10/virtual-tables-apache-cassandra) [#]: author: (Ben Bromhead https://opensource.com/users/ben-bromhead) From 82bf04192a1657ae4a660b279b777090e7d5eb5b Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 4 Nov 2020 23:54:58 +0800 Subject: [PATCH 079/130] APL --- ...rry Pi 400 is Basically a Tiny Computer Inside a Keyboard.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20201103 The New Raspberry Pi 400 is Basically a Tiny Computer Inside a Keyboard.md b/sources/tech/20201103 The New Raspberry Pi 400 is Basically a Tiny Computer Inside a Keyboard.md index 016bd1c5cb..e7aaee54e3 100644 --- a/sources/tech/20201103 The New Raspberry Pi 400 is Basically a Tiny Computer Inside a Keyboard.md +++ b/sources/tech/20201103 The New Raspberry Pi 400 is Basically a Tiny Computer Inside a Keyboard.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 96280242f56b81c7a25f6825b2d3d641c7fcaa90 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 5 Nov 2020 00:39:45 +0800 Subject: [PATCH 080/130] TSL --- ...cally a Tiny Computer Inside a Keyboard.md | 101 ------------------ ...cally a Tiny Computer Inside a Keyboard.md | 100 +++++++++++++++++ 2 files changed, 100 insertions(+), 101 deletions(-) delete mode 100644 sources/tech/20201103 The New Raspberry Pi 400 is Basically a Tiny Computer Inside a Keyboard.md create mode 100644 translated/tech/20201103 The New Raspberry Pi 400 is Basically a Tiny Computer Inside a Keyboard.md diff --git a/sources/tech/20201103 The New Raspberry Pi 400 is Basically a Tiny Computer Inside a Keyboard.md b/sources/tech/20201103 The New Raspberry Pi 400 is Basically a Tiny Computer Inside a Keyboard.md deleted file mode 100644 index e7aaee54e3..0000000000 --- a/sources/tech/20201103 The New Raspberry Pi 400 is Basically a Tiny Computer Inside a Keyboard.md +++ /dev/null @@ -1,101 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (The New Raspberry Pi 400 is Basically a Tiny Computer Inside a Keyboard) -[#]: via: (https://itsfoss.com/raspberry-pi-400/) -[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) - -The New Raspberry Pi 400 is Basically a Tiny Computer Inside a Keyboard -====== - -Raspberry Pi needs no introduction. What started as a low-spec computer for DIY enthusiasts, it can now be used as full-featured desktop. - -With the Raspberry Pi 400 release, they are making it more friendly for home computer usage. The Raspberry Pi 400 is basically a computer in the form of a keyboard. - -If you remember, [Commodore 64][1] was also a computer in the form of a keyboard back in 1982. Even though it isn’t unique, for a successful product like Raspberry Pi, it is a sweet deal. - -### Raspberry Pi 400: Overview - -![][2] - -It is based on the Raspberry Pi 4 (with 4 GB RAM) and has been tweaked to run cooler as well. With a Quad-core processor, it is faster than ever. - -Not just limited to the ease of use and portability, but it should save you a lot of desk space. And, just like me, if you were planning to get a spare computer to test stuff, I think I may want to go with the Raspberry Pi 400 instead of building another PC or [Linux-based mini PC][3]. - -Even though I’ve mentioned the tech specs below, you can watch the official video to get an idea on how it looks and if it’s promising enough as your home computer: - -### Raspberry Pi 400 specification - -Here’s the tech specs for the Pi 400: - - * Broadcom BCM2711 quad-core Cortex-A72 (ARM v8) 64-bit SoC @ 1.8GHz - * 4GB LPDDR4-3200 - * Dual-band (2.4GHz and 5.0GHz) IEEE 802.11b/g/n/ac wireless LAN - * Bluetooth 5.0, BLE - * Gigabit Ethernet - * 2 × USB 3.0 and 1 × USB 2.0 ports - * Horizontal 40-pin GPIO header - * 2 × micro HDMI ports (supports up to 4Kp60) - * H.265 (4Kp60 decode); H.264 (1080p60 decode, 1080p30 encode); OpenGL ES 3.0 graphics - * MicroSD card slot for operating system and data storage - * 78- or 79-key compact keyboard (depending on regional variant) - * 5V DC via USB connector - * Operating temperature: 0°C to +50°C ambient - * Maximum dimensions 286 mm × 122 mm × 23 mm - - - -![][4] - -### Pricing & Availability - -For **$70**, this is the best modern home computer that you can get with the simplicity of just having a keyboard and being able to carry it anywhere (you just need a screen to connect to). - -You can either get just the Raspberry Pi 400 for **$70** or get the complete kit for **$100** with a USB mouse, micro HDMI to HDMI cable, USB-C power supply, a beginners guide, and an SD card with Raspberry Pi OS pre-installed. - -If you’re wondering, for the keyboard layout support, here’s what the press release mentioned: - -> At launch, we are supporting English (UK and US), French, Italian, German, and Spanish keyboard layouts, with (for the first time) translated versions of the Beginner’s Guide. In the near future, we plan to support the same set of languages as our [official keyboard][5]. - -In other words, they support every major keyboard layout to start with. So, it shouldn’t be an issue for the majority. - -In addition to the details for keyboard layout, here’s how you can get your hands on a Raspberry Pi 400: - -> UK, US, and French Raspberry Pi 400 [kits][6] and [computers][7] are available to buy right now. Italian, German, and Spanish units are on their way to Raspberry Pi Approved Resellers, who should have them in stock in the next week. -> -> We expect that Approved Resellers in India, Australia, and New Zealand will have kits and computers in stock by the end of the year. We’re rapidly rolling out compliance certification for other territories too, so that Raspberry Pi 400 will be available around the world in the first few months of 2021. -> -> Of course, if you’re anywhere near Cambridge, you can head over to the [Raspberry Pi Store][8] to pick up your Raspberry Pi 400 today. - -[Raspberry Pi 400][9] - -### Wrapping Up - -Raspberry Pi 400 is definitely something impressive and useful in the current time when remote work is becoming the new norm. - -What do you think about the new Raspberry Pi 400? Planning to get one? Let me know your thoughts in the comments below. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/raspberry-pi-400/ - -作者:[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://en.wikipedia.org/wiki/Commodore_64 -[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/11/raspberry-pi-400.jpg?resize=800%2C554&ssl=1 -[3]: https://itsfoss.com/linux-based-mini-pc/ -[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/11/raspberry-pi-400-shot.jpeg?resize=800%2C572&ssl=1 -[5]: https://www.raspberrypi.org/products/raspberry-pi-keyboard-and-hub/ -[6]: https://www.raspberrypi.org/products/raspberry-pi-400/ -[7]: https://www.raspberrypi.org/products/raspberry-pi-400-unit/ -[8]: https://www.raspberrypi.org/raspberry-pi-store/ -[9]: https://www.raspberrypi.org/products/raspberry-pi-400 diff --git a/translated/tech/20201103 The New Raspberry Pi 400 is Basically a Tiny Computer Inside a Keyboard.md b/translated/tech/20201103 The New Raspberry Pi 400 is Basically a Tiny Computer Inside a Keyboard.md new file mode 100644 index 0000000000..5643313844 --- /dev/null +++ b/translated/tech/20201103 The New Raspberry Pi 400 is Basically a Tiny Computer Inside a Keyboard.md @@ -0,0 +1,100 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (The New Raspberry Pi 400 is Basically a Tiny Computer Inside a Keyboard) +[#]: via: (https://itsfoss.com/raspberry-pi-400/) +[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) + +新的树莓派 400:一台藏身于键盘内微型计算机 +====== + +树莓派已经无需介绍。起初是 DIY 爱好者的低规格电脑,而现在可以作为全功能桌面使用了。 + +随着树莓派 400 的发布,使得它更加适合作为家庭电脑使用。树莓派 400 基本上是一台藏身于键盘内微型计算机。 + +如果你还记得,[Commodore 64][1] 在 1982 年时也是一台键盘形式的电脑。尽管树莓派 400 并不是独一无二的,但对于树莓派这样的成功产品来说,这是一个令人心仪的产品。 + +### 树莓派 400 概观 + +![][2] + +它是基于树莓派 4 的(带有 4GB 内存),并已调整为带有冷却器。采用四核处理器,速度比以往更快。 + +不仅仅是易用性和便携性,它应该可以为你节省很多桌面空间。而且,就像我一样,如果你打算买一台备用电脑来测试东西,我想我可能会选择树莓派 400,而不是组装另一台 PC 或[基于 Linux 的迷你 PC][3]。 + +尽管我在下面提到了技术规格,但你可以观看官方视频来了解它的外观,以及它所承诺的是否可以满足作为你的家用电脑的需求。 + +![video](https://www.youtube.com/embed/ZSvHJ97d8n8) + +### 树莓派 400 技术规格 + + * 博通 BCM2711 四核 Cortex-A72(ARM v8)64 位 SoC @ 1.8GHz + * 4GB LPDDR4-3200 + * 双频(2.4GHz 和 5.0GHz)IEEE 802.11b/g/n/ac 无线局域网 + * 蓝牙 5.0,BLE + * 千兆以太网 + * 2 个 USB 3.0 和 1 个 USB 2.0 端口 + * 水平 40 针 GPIO 头 + * 2 个 micro HDMI 端口(支持最高 4Kp60) + * H.265(4Kp60 解码);H.264(1080p60 解码,1080p30 编码);OpenGL ES 3.0 图形 + * micro SD 卡插槽,用于操作系统和数据存储 + * 78 或 79 键的小型键盘(取决于地区差异) + * 5V DC,通过 USB 连接器 + * 工作温度:环境温度 0℃ 至 +50℃。 + * 最大尺寸 286 毫米 × 122 毫米 × 23 毫米 + + +![][4] + +### 定价与供应 + +付出 **70** 美元,这是你所能得到的最好的现代家用电脑,只需一个键盘就可以简单的携带到任何地方(你只需要一个屏幕连接)。 + +你可以花 70 美元只买树莓派 400,也可以花 100 美元买完整的套装,它包括一个 USB 鼠标、micro HDMI 转 HDMI 线、USB-C 电源、一本初学者指南和一张预装了树莓派操作系统的 SD 卡。 + +如果你想知道,对于键盘布局的支持,新闻稿中是这样提到的: + +> 在发布时,我们支持英语(英国和美国)、法语、意大利语、德语和西班牙语的键盘布局,并(首次)提供翻译版的新手指南。在不久的将来,我们计划支持与我们的[官方键盘][5]相同的语言集。 + +换句话说,一开始他们就支持所有主要的键盘布局。所以,对于大多数人来说,这应该不是问题。 + +除了键盘布局的细节外,下面是你如何获得树莓派 400 的方法: + +> 英国、美国和法国的树莓派 400 [套件][6]和[电脑][7]现在就可以购买。意大利、德国和西班牙的产品正在送往树莓派授权经销商的路上,他们应该在下周就会有货。 +> +> 我们预计,印度、澳大利亚和新西兰的授权经销商将在今年年底前拿到套件和电脑。我们也在迅速推出其他地区的合规认证,因此树莓派 400 将在 2021 年的前几个月在全球范围内上市。 +> +> 当然,如果你在剑桥附近的任何地方,你可以前往[树莓派商店][8],今天就可以领取你的树莓派 400。 + +- [树莓派 400][9] + +### 总结 + +在远程办公成为新常态的当下,树莓派 400 绝对是令人印象深刻的好东西,也是非常有用的。 + +你对新的树莓派 400 有什么看法?打算买一台吗?在下面的评论中告诉我你的想法。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/raspberry-pi-400/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://en.wikipedia.org/wiki/Commodore_64 +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/11/raspberry-pi-400.jpg?resize=800%2C554&ssl=1 +[3]: https://itsfoss.com/linux-based-mini-pc/ +[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/11/raspberry-pi-400-shot.jpeg?resize=800%2C572&ssl=1 +[5]: https://www.raspberrypi.org/products/raspberry-pi-keyboard-and-hub/ +[6]: https://www.raspberrypi.org/products/raspberry-pi-400/ +[7]: https://www.raspberrypi.org/products/raspberry-pi-400-unit/ +[8]: https://www.raspberrypi.org/raspberry-pi-store/ +[9]: https://www.raspberrypi.org/products/raspberry-pi-400 From a0b7f0661f27d81f3a74783541412add4b56c06a Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 5 Nov 2020 05:01:37 +0800 Subject: [PATCH 081/130] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020201105=20?= =?UTF-8?q?How=20to=20Scan/Detect=20New=20LUNs=20and=20SCSI=20Disks=20on?= =?UTF-8?q?=20Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20201105 How to Scan-Detect New LUNs and SCSI Disks on Linux.md --- ...Detect New LUNs and SCSI Disks on Linux.md | 163 ++++++++++++++++++ 1 file changed, 163 insertions(+) create mode 100644 sources/tech/20201105 How to Scan-Detect New LUNs and SCSI Disks on Linux.md diff --git a/sources/tech/20201105 How to Scan-Detect New LUNs and SCSI Disks on Linux.md b/sources/tech/20201105 How to Scan-Detect New LUNs and SCSI Disks on Linux.md new file mode 100644 index 0000000000..c965d8ee57 --- /dev/null +++ b/sources/tech/20201105 How to Scan-Detect New LUNs and SCSI Disks on Linux.md @@ -0,0 +1,163 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to Scan/Detect New LUNs and SCSI Disks on Linux) +[#]: via: (https://www.2daygeek.com/scan-detect-luns-scsi-disks-on-redhat-centos-oracle-linux/) +[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) + +How to Scan/Detect New LUNs and SCSI Disks on Linux +====== + +When the Linux system has connected to the SAN (Storage Area Network) you need to rescan the iSCSI service to discover new LUNs. + +To do so, you must provide the WWN number of the Linux host and required LUN size to the storage team. + +The following article will help you [**find the WWN number of a Linux host**][1]. + +Once the storage team has mapped the LUNs with the given Linux host, they will provide you with the new LUN details. + +LUN in storage terms is referred to as serial-hex of LUN. + +You need to scan the SCSI host to find new LUNs assigned by the storage team. + +This can be done in two ways, scan each scsi host device or run the “rescan-scsi-bus.sh” script to detect new disks. + +After scanning they can be found under the “/dev/disk/by-id” directory. + +``` +# ll /dev/disk/by-id + +total 0 +lrwxrwxrwx 1 root root 10 Jul 9 17:52 scsi-60a98000486e542d4f5a2f47694d684b -> ../../sdah +lrwxrwxrwx 1 root root 9 Jul 9 17:52 scsi-60a98000486e542d4f5a2f47694d684c -> ../../sdw +. +. +lrwxrwxrwx 1 root root 10 Jul 9 17:52 scsi-60a98000486e542d4f5a2f47694d684d -> ../../sdjk +lrwxrwxrwx 1 root root 10 Jul 9 17:52 scsi-60a98000486e542d4f5a2f47694d684e -> ../../sdaa +lrwxrwxrwx 1 root root 9 Jul 9 17:52 scsi-60a98000486e542d4f5a2f47694d684f -> ../../sdh +``` + +Also, you can find them using the Multipath command if you already have them configured with Multipath. + +Multipath is mostly configured into the Oracle database server for better performance. + +``` +# multipath -ll + +60a98000486e542d4f5a2f47694d684b dm-37 NETAPP,LUN C-Mode +size=512G features='3 queue_if_no_path pg_init_retries 50' hwhandler='1 alua' wp=rw +|-+- policy='round-robin 0' prio=50 status=active +| |- 1:0:4:18 sdoe 128:416 active ready running +| |- 0:0:4:18 sdpq 131:256 active ready running +| |- 0:0:5:18 sdsr 135:496 active ready running +| `- 1:0:5:18 sdsq 135:480 active ready running +`-+- policy='round-robin 0' prio=10 status=enabled + |- 1:0:1:18 sdfw 131:32 active ready running + |- 1:0:0:18 sdci 69:96 active ready running + |- 0:0:1:18 sdbz 68:208 active ready running + |- 0:0:0:18 sds 65:32 active ready running + |- 1:0:3:18 sdmd 69:336 active ready running + |- 1:0:2:18 sdjj 8:464 active ready running + |- 0:0:3:34 sdjt 65:368 active ready running + `- 0:0:2:34 sdgi 131:224 active ready running +``` + +This procedure works on Red Hat 6.x, 7.x and 8.x (RHEL – Red Hat Enterprise Linux) based systems such as CentOS and Oracle Linux. + +### Method-1: How to Scan New LUNs and SCSI Disks on Linux Using the “/sys” Class File + +The sysfs filesystem is a pseudo-filesystem which provides an interface to kernel data structures. + +The files under sysfs provide information about devices, kernel modules, filesystems, and other kernel components. + +The sysfs filesystem is commonly mounted at “/sys”. Typically, it is mounted automatically by the system. + +You can use the echo command to scan each scsi host device as shown below. + +``` +# echo "- - -" > /sys/class/scsi_host/host[n]/scan +``` + +When you run the above command that rescan everything, the three dash (“- – -“) refers the wildcard option. These values would be as follow. + +``` +# echo "c t l" > /sys/class/scsi_host/host[n]/scan +``` + +where + + * **c –** Channel on the HBA + * **t –** SCSI target ID + * **l –** LUN ID + * **n –** HBA number + + + +Run the below command to find all the host bus number on your system. + +``` +# ls /sys/class/scsi_host +host0 host1 host2 +``` + +Once you get the host bus number, run the following command to discover new disks. + +``` +# echo "- - -" > /sys/class/scsi_host/host0/scan +# echo "- - -" > /sys/class/scsi_host/host1/scan +# echo "- - -" > /sys/class/scsi_host/host2/scan +``` + +Also, it can be scanned using “for loop” with a single command. + +``` +# for host in ls /sys/class/scsi_host/;do echo "- - -" >/sys/class/scsi_host/${host}/scan; done +``` + +You can check them using the **[ls command][2]** as mentioned at the beginning of the article. + +``` +# ls /dev/disk/by-id | grep -i "serial-hex of LUN" +``` + +### Method-2: How to Scan New LUNs and SCSI Disks on Linux Using the rescan-scsi-bus.sh Script + +Make sure you have already installed the “sg3_utils” package to use this script. Otherwise, run the following command to install it. + +For **RHEL/CentOS 6/7** systems, use the **[yum command][3]** to install sg3_utils. + +``` +# yum install -y sg3_utils +``` + +For **RHEL/CentOS 8** and Fedora systems, use the **[dnf command][4]** to install sg3_utils. + +``` +# dnf install -y sg3_utils +``` + +Now you can rescan the LUNs using the rescan-scsi-bus.sh script. + +``` +# ./rescan-scsi-bus.sh +``` + +-------------------------------------------------------------------------------- + +via: https://www.2daygeek.com/scan-detect-luns-scsi-disks-on-redhat-centos-oracle-linux/ + +作者:[Magesh Maruthamuthu][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.2daygeek.com/author/magesh/ +[b]: https://github.com/lujun9972 +[1]: https://www.2daygeek.com/how-to-find-wwn-wwnn-wwpn-number-of-hba-card-in-linux/ +[2]: https://www.2daygeek.com/linux-unix-ls-command-display-directory-contents/ +[3]: https://www.2daygeek.com/linux-yum-command-examples-manage-packages-rhel-centos-systems/ +[4]: https://www.2daygeek.com/linux-dnf-command-examples-manage-packages-fedora-centos-rhel-systems/ From 1129e63e85753a03dff2d504929517e1bba8dc80 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 5 Nov 2020 05:04:24 +0800 Subject: [PATCH 082/130] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020201105=20?= =?UTF-8?q?How=20to=20Check=20Free=20Disk=20Space=20on=20Linux=20[Terminal?= =?UTF-8?q?=20and=20GUI=20Methods]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20201105 How to Check Free Disk Space on Linux -Terminal and GUI Methods.md --- ...pace on Linux -Terminal and GUI Methods.md | 129 ++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 sources/tech/20201105 How to Check Free Disk Space on Linux -Terminal and GUI Methods.md diff --git a/sources/tech/20201105 How to Check Free Disk Space on Linux -Terminal and GUI Methods.md b/sources/tech/20201105 How to Check Free Disk Space on Linux -Terminal and GUI Methods.md new file mode 100644 index 0000000000..abbe114c41 --- /dev/null +++ b/sources/tech/20201105 How to Check Free Disk Space on Linux -Terminal and GUI Methods.md @@ -0,0 +1,129 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to Check Free Disk Space on Linux [Terminal and GUI Methods]) +[#]: via: (https://itsfoss.com/check-free-disk-space-linux/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) + +How to Check Free Disk Space on Linux [Terminal and GUI Methods] +====== + +_**How much disk space I have utilized?**_ + +The simplest way to find the free disk space on Linux is to [use df command][1]. The df command stands for disk-free and quite obviously, it shows you the free and available disk space on Linux systems. + +``` +df -h +``` + +With `-h` option, it shows the disk space in human-readable format (MB and GB). + +Here’s the output of the df command for my Dell XPS system that has only Linux installed with encrypted disk: + +![Checking free disk space with df command in Linux][2] + +If the above output is confusing for you, don’t worry. I’ll explain a few things around checking available disk space in Linux. _**I’ll also show the GUI method for desktop Linux users.**_ + +### Method 1: Checking free disk space in Linux with df command (and understanding its output) + +When you use the df command to check disk space, it will show a bunch of ‘file systems’ with their size, used space and free space. Your actual disks should normally be listed as one of the following: + + * /dev/sda + * /dev/sdb + * /dev/nvme0n1p + + + +This is not a hard and fast rule but it gives you an indication to easily recognize the actual disk from the crowd. + +Your Linux system might have several partitions on your disk for boot, EFI, root, swap, home etc. In such cases, these partitions are reflected with a number at the end of the ‘disk name’, like /dev/sda1, /dev/nvme0n1p2 etc. + +You could identify which partition is used for what purpose from its mount point. Root is mounted on /, EFI in /boot/EFI etc. + +In my case, I have used 41% of the 232 GB of disk space under root. If you have 2-3 big partitions (like root, home etc), you’ll have to make a calculation here. + +![Understanding df command output][3] + + * **tmpfs**: The [tmpfs][4] (temporary filesystem) used for keeping files in virtual memory. You can ignore this virtual filesystem comfortably. + * **udev**: The [udev filesystem][5] is used for storing information related to devices (like USB, network card, CD ROM etc) plugged to your system. You may ignore it as well. + * **/dev/loop**: These are loop devices. You’ll see plenty of them while checking disk space in Ubuntu because of snap applications. Loops are virtual devices that allow normal files to be accessed as block devices. With the loop devices, snap applications are sandboxed in their own virtual disk. Since they are under root, you don’t need to count their used disk space separately. + + + +#### Missing disk space? Check if you have mounted all disks and partitions + +Keep in mind that the df command only shows disk space for mounted filesystems. If you are using more than one Linux distribution (or operating systems) on the same disk or you have multiple disks on your system, you need to mount them first in order to see the free space available on those partitions and disks. + +For example, my [Intel NUC][6] has two SSDs and 4 or 5 Linux distributions installed on them. It shows additional disks only when I mount them explicitly. + +![][7] + +You can use the lsblk command to see all the disks and partitions on your system. + +![][8] + +Once you have the disk partition name, you can mount it in this fashion: + +``` +sudo mount /dev/sdb2 /mnt +``` + +I hope this gives you a pretty good idea about checking hard drive space on Linux. Let’s see how to do it graphically. + +### Method 2: Check free disk usage graphically + +Checking free disk space graphically is much easier in Ubuntu with the Disk Usage Analyzer tool. + +![Disk Usage Analyzer Tool][9] + +You’ll see all the actual disks and partitions here. You may have to mount some partitions by clicking on them. It displays the disk usage for all the mounted partitions. + +![Disk usage check][10] + +#### Checking free disk space with GNOME Disks utility + +Otherwise, the GNOME Disks utility is also pretty handy tool. + +![GNOME Disks Tool][11] + +Start the tool and select the disk. Select a partition to see the free disk space. If a partition is not mounted, mount it first by clicking the ‘play’ icon. + +![Free Disk Space Check in Ubuntu Desktop][12] + +I think all major desktop environments have some sort of graphical tool to check the disk usage on Linux. You can search for it in the menu of your desktop Linux system. + +**Conclusion** + +There can be more ways and tools to check the disk space of course. I showed you the most common command line and GUI methods for this purpose. + +I also explained a few things that might trouble you in understanding the disk usage. Hope you like it. + +If you have questions or suggestions, please let me know in the comment section. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/check-free-disk-space-linux/ + +作者:[Abhishek Prakash][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://linuxhandbook.com/df-command/ +[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/11/free-disk-space-linux-df-command-output.png?resize=786%2C475&ssl=1 +[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/11/df-command-output.png?resize=800%2C600&ssl=1 +[4]: https://www.kernel.org/doc/html/latest/filesystems/tmpfs.html +[5]: https://wiki.debian.org/udev +[6]: https://itsfoss.com/install-linux-on-intel-nuc/ +[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/11/df-command-ubuntu-1.png?resize=786%2C443&ssl=1 +[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/11/lsblk-command-to-see-disks-linux.png?resize=786%2C538&ssl=1 +[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/11/disk-usage-analyzer-tool-linux.jpg?resize=800%2C250&ssl=1 +[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/11/free-disk-space-ubuntu-desktop.png?resize=800%2C648&ssl=1 +[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/11/disks-tool-linux.jpg?resize=800%2C250&ssl=1 +[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/11/free-disk-space-check-ubuntu-desktop.png?resize=800%2C600&ssl=1 From dd2b63ab11e7c9d65860ee6b5a3f432294ece1f4 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 5 Nov 2020 05:05:04 +0800 Subject: [PATCH 083/130] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020201105=20?= =?UTF-8?q?Got=20Kids=3F=20Limit=20Computer=20Usage=20Per=20Account=20in?= =?UTF-8?q?=20Linux=20With=20Timekpr-nExt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20201105 Got Kids- Limit Computer Usage Per Account in Linux With Timekpr-nExt.md --- ... Per Account in Linux With Timekpr-nExt.md | 111 ++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 sources/tech/20201105 Got Kids- Limit Computer Usage Per Account in Linux With Timekpr-nExt.md diff --git a/sources/tech/20201105 Got Kids- Limit Computer Usage Per Account in Linux With Timekpr-nExt.md b/sources/tech/20201105 Got Kids- Limit Computer Usage Per Account in Linux With Timekpr-nExt.md new file mode 100644 index 0000000000..0b3ed25c39 --- /dev/null +++ b/sources/tech/20201105 Got Kids- Limit Computer Usage Per Account in Linux With Timekpr-nExt.md @@ -0,0 +1,111 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Got Kids? Limit Computer Usage Per Account in Linux With Timekpr-nExt) +[#]: via: (https://itsfoss.com/timekpr-next/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) + +Got Kids? Limit Computer Usage Per Account in Linux With Timekpr-nExt +====== + +_**Open source software highlight of this week is Timekpr-nExt. It is a GUI application to limit the computer usage for certain accounts on a Linux system. This is a handy utility for parents who do not want children to spend excessive time on the computer.**_ + +### Use Timekpr-nExt to limit computer usage on Linux + +If you have young children at home who spend too much time on computer, you may want to put some sort of restriction on the usage. + +Timekpr-nExt enables you to limit computer usage for certain accounts based on the time of day, number of hours a day, week or month. You may also set time interval to force the account user to take break. + +![][1] + +After the given time expires, the user is automatically logged out and cannot log back in until the restriction conditions are satisfied. + +![][2] + +Of course, this means that you need to have separate non-admin (no sudo access) accounts for the children. If the kids accounts also have admin access, they can change the settings easily. Kids are smart, you know. + +### Features of Timekpr-nExt + +Apart from an annoyingly stylized name, Timekpr-nExt has the following features: + + * Limit system usage as day wise limit, daily limit, weekly or monthly limit + * You can also set access restrictions based on time and hour + * Users can be shown notification about how much time they have left + * Set the lockout action (terminate session, shutdown, suspend or lock screen) + * Track the time usage of the accounts + + + +Keep the following things in mind: + + * Check carefully which account you are configuring. _**Do not lock yourself out**_. + * Hit the apply or set button for each configuration changes otherwise the changes won’t be set. + * Children accounts should not have admin action otherwise they can overwrite the settings. + + + +Read the [documents about more information on using Timekpr-nExt][3]. + +### Installing Timekpr-nExt on Linux + +For Ubuntu-based Linux distributions (like Mint, Linux Lite etc), there is an [official PPA available][4]. You can install it by using the following commands one by one: + +``` +sudo add-apt-repository ppa:mjasnik/ppa +sudo apt update +sudo apt install timekpr-next +``` + +Arch Linux users can [find it in AUR][5]. For others, please check your distribution’s repository. If there is no such package, you may try using the source code. + +[Timekpr-nExt Source Code][6] + +_**Again, do not use Timekpr-nExt for your own main account. You may lock yourself out.**_ + +You’ll see two instances of the application. Use the one with (SU) at the beginning. + +![][7] + +#### Removing Timekpr-nExt + +I cannot say for certain if removing Timekpr-nExt will also remove the restrictions you put in place for the users. It will be a good idea to manually restore them (putting 24 hr interval a day). There is no reset button here. + +To remove this application (if you used PPA to install it), use the following command: + +``` +sudo apt-get remove --purge timekpr-next +``` + +Delete the PPA repository as well: + +``` +sudo add-apt-repository -r ppa:mjasnik/ppa +``` + +Like [blocking adult content on Linux][8], this application is also children specific. Not everyone would find it useful but people with young children at home may use it if they feel the need. + +Do you use some other application to monitor/restrict children from accessing computer? + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/timekpr-next/ + +作者:[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://i2.wp.com/itsfoss.com/wp-content/uploads/2020/10/timekpr-next-ubuntu.png?resize=800%2C612&ssl=1 +[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/10/timekpr-next-icon-system-notification-area.png?resize=640%2C94&ssl=1 +[3]: https://mjasnik.gitlab.io/timekpr-next/ +[4]: https://launchpad.net/~mjasnik/+archive/ubuntu/ppa +[5]: https://aur.archlinux.org/packages/timekpr-next/ +[6]: https://launchpad.net/timekpr-next +[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/10/timekeeper-next.jpg?resize=799%2C250&ssl=1 +[8]: https://itsfoss.com/how-to-block-porn-by-content-filtering-on-ubuntu/ From c6714b998059d6ee61655288fd16562afc6525cc Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 5 Nov 2020 08:47:11 +0800 Subject: [PATCH 084/130] translated --- ...has Some Exciting Improvements Lined Up.md | 93 ------------------- ...has Some Exciting Improvements Lined Up.md | 80 ++++++++++++++++ 2 files changed, 80 insertions(+), 93 deletions(-) delete mode 100644 sources/tech/20201029 Linux Kernel 5.10 Will be the Next LTS Release and it has Some Exciting Improvements Lined Up.md create mode 100644 translated/tech/20201029 Linux Kernel 5.10 Will be the Next LTS Release and it has Some Exciting Improvements Lined Up.md diff --git a/sources/tech/20201029 Linux Kernel 5.10 Will be the Next LTS Release and it has Some Exciting Improvements Lined Up.md b/sources/tech/20201029 Linux Kernel 5.10 Will be the Next LTS Release and it has Some Exciting Improvements Lined Up.md deleted file mode 100644 index 45ae5f36c1..0000000000 --- a/sources/tech/20201029 Linux Kernel 5.10 Will be the Next LTS Release and it has Some Exciting Improvements Lined Up.md +++ /dev/null @@ -1,93 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Linux Kernel 5.10 Will be the Next LTS Release and it has Some Exciting Improvements Lined Up) -[#]: via: (https://itsfoss.com/kernel-5-10/) -[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) - -Linux Kernel 5.10 Will be the Next LTS Release and it has Some Exciting Improvements Lined Up -====== - -_**Development for Linux Kernel 5.10 is in progress. It’s been confirmed to be a long term support release and it will be bringing newer hardware support among other promised features.**_ - -### Linux Kernel 5.10 will be Long Term Support Release - -**Greg Kroah-Hartman**, the key stable kernel maintainer, addressed an “Ask the Expert” session at Linux Foundation’s Open-Source Summit Europe and confirmed that Linux 5.10 will be the next LTS release. - -Even though there were some early speculations of 5.9 being the LTS release, Greg clarified that the last kernel release of the year will always be an LTS release. - -As of now, [Linux Kernel 5.4][1] series happens to be the latest LTS version out there which added a lot of improvements and hardware support. Also, considering the development progress with Linux [Kernel 5.8][2] being the biggest release so far and Linux 5.10’s first release candidate being close to it, there’s a lot of things going on under the hood. - -> Because people keep asking me… -> -> — Greg K-H (@gregkh) [October 26, 2020][3] - -Let’s take a look at some of the features and improvements that you can expect with Linux Kernel 5.10. - -### Linux kernel 5.10 features - -![][4] - -**Note:** _Linux Kernel 5.10 is still in early development. So, we will be updating the article regularly for the latest additions/feature updates._ - -#### AMD Zen 3 Processor Support - -The new [Ryzen 5000][5] lineup is one of the biggest buzzes of 2020. So, with Linux Kernel 5.10 release candidate version, various additions are being made for Zen 3 processors. - -#### Intel Rocket Lake Support - -I do not hope for a lot with Intel’s Rocket Lake chipsets arriving Q1 next year (2021). But, considering that Intel’s constantly squeezing everything out of that 14 nm process, it is definitely a good thing to see work done for Intel Rocket Lake on Linux Kernel 5.10 - -#### Open Source Driver for Radeon RX 6000 series - -Even though we’re covering this a day before the Big Navi reveal, the Radeon RX 6000 series is definitely going to be something impressive to compete with NVIDIA RTX 3000 series. - -Of course, unless it suffers from the same issues the Vega series or the 5000 series met with. - -It’s good to see work being already done for an open source driver to support the next-gen Radeon GPUs on Linux Kernel 5.10. - -#### File System Optimizations and Storage Improvements - -[Phoronix][6] reports on file-system optimizations and storage improvements with 5.10 as well. So, judging by that, we should see some performance improvements. - -#### Other Improvements - -Undoubtedly, you should expect a great deal of driver updates and hardware supports with the new kernel. - -For now, the support for SoundBlaster AE-7, early support for NVIDIA Orin (AI processor), and Tiger Lake GPU improvements seem to be the key highlights. - -A stable release for Linux Kernel 5.10 should be expected around the mid-December timeline. It will be supported for at least 2 years but you could end up with security/bug fix updates till 2026. So, we will have to stay tuned to the development for anything exciting on the next Linux Kernel 5.10 LTS release. - -**Recommended Read:** - -![][7] - -#### [Explained! Why Your Distribution Still Using an ‘Outdated’ Linux Kernel?][8] - -A new stable kernel is released every 2-3 months yet your distribution might still be using an old, outdated Linux kernel. But you don’t need to worry and here’s why! - -What do you think about the upcoming Linux Kernel 5.10 release? Let us know your thoughts in the comments. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/kernel-5-10/ - -作者:[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/linux-kernel-5-4/ -[2]: https://itsfoss.com/kernel-5-8-release/ -[3]: https://twitter.com/gregkh/status/1320745076566433793?ref_src=twsrc%5Etfw -[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/10/kernel-5-10-release.png?resize=800%2C450&ssl=1 -[5]: https://www.tomsguide.com/news/amd-ryzen-5000-revealed-what-it-means-for-pc-gaming -[6]: https://www.phoronix.com/scan.php?page=article&item=linux-510-features&num=1 -[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/12/why_Linux_distro_use_outdated_kernel.jpg?fit=800%2C450&ssl=1 -[8]: https://itsfoss.com/why-distros-use-old-kernel/ diff --git a/translated/tech/20201029 Linux Kernel 5.10 Will be the Next LTS Release and it has Some Exciting Improvements Lined Up.md b/translated/tech/20201029 Linux Kernel 5.10 Will be the Next LTS Release and it has Some Exciting Improvements Lined Up.md new file mode 100644 index 0000000000..bdcd81e8c7 --- /dev/null +++ b/translated/tech/20201029 Linux Kernel 5.10 Will be the Next LTS Release and it has Some Exciting Improvements Lined Up.md @@ -0,0 +1,80 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Linux Kernel 5.10 Will be the Next LTS Release and it has Some Exciting Improvements Lined Up) +[#]: via: (https://itsfoss.com/kernel-5-10/) +[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) + +Linux Kernel 5.10 将是下一个 LTS 版本,它有一些令人兴奋的改进 +====== + +_**Linux Kernel 5.10 的开发正在进行中。已确认这是一个长期支持的版本,将带来更新的硬件支持和其他承诺的功能。**_ + +### Linux Kernel 5.10 将是长期支持版本 + +主要稳定内核维护者 **Greg Kroah-Hartman** 在 Linux 基金会欧洲开源峰会的 “Ask the Expert” 会议上发言,确认 Linux 5.10 将是下一个 LTS 版本。 + +尽管早期有一些关于 5.9 是 LTS 版本的猜测,但 Greg 澄清说,一年的最后一个内核版本永远是 LTS 版本。 + +目前来看,[Linux Kernel 5.4][1] 系列恰好是最新的 LTS 版本,它增加了很多改进和硬件支持。另外,考虑到开发进度,Linux [Kernel 5.8][2] 是目前最大的版本,而 Linux 5.10 的第一个候选版本也很接近,所以下面有很多事情要做。 + +让我们来看看 Linux Kernel 5.10 的一些功能和改进。 + +### Linux kernel 5.10 的功能 + +![][4] + +**注意:** _Linux Kernel 5.10 仍处于早期开发阶段。因此,我们将定期更新文章,以更新最新的补充/功能。_ + +#### AMD Zen 3 处理器支持 + +新的 [Ryzen 5000][5] 产品线是 2020 年最大的看点之一。所以,随着 Linux Kernel 5.10 发布候选版本的推出,针对 Zen 3 处理器的各种新增功能也在陆续推出。 + +#### Intel Rocket Lake 支持 + +我并不对 Intel 的 Rocket Lake 芯片组在明年 Q1(2021 年)出货报太大希望。但是,考虑到英特尔在不断地压榨 14 纳米制程,看到 Intel Rocket Lake 在 Linux Kernel 5.10 上所做的工作,绝对是一件好事。 + +#### Radeon RX 6000 系列开源驱动 + +尽管我们是在 Big Navi 揭晓前一天才报道的,但 Radeon RX 6000 系列绝对会是一个令人印象深刻的东西,可以和 NVIDIA RTX 3000 系列竞争。 + +当然,除非它和 Vega 系列或 5000 系列遇到的同样问题。 + +很高兴在 Linux Kernel 5.10 上看到下一代 Radeon GPU 的开源驱动已经完成。 + + +#### 文件系统优化和存储改进 + +[Phoronix][6] 报道了 5.10 也对文件系统进行了优化和存储改进。所以,从这一点来看,我们应该会看到一些性能上的改进。 + +#### 其他改进 + +毫无疑问,你应该期待新内核带来大量的驱动更新和硬件支持。 + +目前,对 SoundBlaster AE-7 的支持、对 NVIDIA Orin(AI 处理器)的早期支持以及 Tiger Lake GPU 的改进似乎是主要亮点。 + +Linux Kernel 5.10 的稳定版本应该会在 12 月中旬左右发布。它将被支持至少2年,但可能一直会有安全/bug 修复更新,直到 2026 年。因此,我们将继续关注下一个 Linux Kernel 5.10 LTS 版本的发展,以获得任何令人兴奋的东西。 + +你对即将发布的 Linux Kernel 5.10 有什么看法?请在评论中告诉我们你的想法。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/kernel-5-10/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/linux-kernel-5-4/ +[2]: https://itsfoss.com/kernel-5-8-release/ +[3]: https://twitter.com/gregkh/status/1320745076566433793?ref_src=twsrc%5Etfw +[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/10/kernel-5-10-release.png?resize=800%2C450&ssl=1 +[5]: https://www.tomsguide.com/news/amd-ryzen-5000-revealed-what-it-means-for-pc-gaming +[6]: https://www.phoronix.com/scan.php?page=article&item=linux-510-features&num=1 From 7c7821b2cae8d4e52b0eebde56b3cc0b3b2a03d6 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 5 Nov 2020 08:54:50 +0800 Subject: [PATCH 085/130] translating --- sources/tech/20201103 4 ways to run Kubernetes locally.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20201103 4 ways to run Kubernetes locally.md b/sources/tech/20201103 4 ways to run Kubernetes locally.md index b2035519b2..9a5e4c981e 100644 --- a/sources/tech/20201103 4 ways to run Kubernetes locally.md +++ b/sources/tech/20201103 4 ways to run Kubernetes locally.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 98677f87ef18ee2f35ea7bf8dfd2bec63e04d4a7 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 5 Nov 2020 19:19:02 +0800 Subject: [PATCH 086/130] PRF --- ...sically a Tiny Computer Inside a Keyboard.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/translated/tech/20201103 The New Raspberry Pi 400 is Basically a Tiny Computer Inside a Keyboard.md b/translated/tech/20201103 The New Raspberry Pi 400 is Basically a Tiny Computer Inside a Keyboard.md index 5643313844..7ea0e4c667 100644 --- a/translated/tech/20201103 The New Raspberry Pi 400 is Basically a Tiny Computer Inside a Keyboard.md +++ b/translated/tech/20201103 The New Raspberry Pi 400 is Basically a Tiny Computer Inside a Keyboard.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (The New Raspberry Pi 400 is Basically a Tiny Computer Inside a Keyboard) @@ -10,7 +10,7 @@ 新的树莓派 400:一台藏身于键盘内微型计算机 ====== -树莓派已经无需介绍。起初是 DIY 爱好者的低规格电脑,而现在可以作为全功能桌面使用了。 +树莓派是什么已经无需介绍。这台起初是为 DIY 爱好者打造的低规格电脑,现在可以作为全功能桌面使用了。 随着树莓派 400 的发布,使得它更加适合作为家庭电脑使用。树莓派 400 基本上是一台藏身于键盘内微型计算机。 @@ -20,11 +20,11 @@ ![][2] -它是基于树莓派 4 的(带有 4GB 内存),并已调整为带有冷却器。采用四核处理器,速度比以往更快。 +它是基于树莓派 4 的(带有 4GB 内存),并已调整附加了冷却器。它采用四核处理器,速度比以往更快。 -不仅仅是易用性和便携性,它应该可以为你节省很多桌面空间。而且,就像我一样,如果你打算买一台备用电脑来测试东西,我想我可能会选择树莓派 400,而不是组装另一台 PC 或[基于 Linux 的迷你 PC][3]。 +除了易用性和便携性,它还可以为你节省很多桌面空间。而且,就像我一样,如果你打算买一台备用电脑来测试东西,我想我可能会选择树莓派 400,而不是组装另一台 PC 或[基于 Linux 的迷你 PC][3]。 -尽管我在下面提到了技术规格,但你可以观看官方视频来了解它的外观,以及它所承诺的是否可以满足作为你的家用电脑的需求。 +尽管我在下面提到了它的技术规格,但你可以观看官方视频来了解它的外观,以及它所承诺的是否可以满足作为你的家用电脑的需求。 ![video](https://www.youtube.com/embed/ZSvHJ97d8n8) @@ -45,14 +45,13 @@ * 工作温度:环境温度 0℃ 至 +50℃。 * 最大尺寸 286 毫米 × 122 毫米 × 23 毫米 - ![][4] ### 定价与供应 -付出 **70** 美元,这是你所能得到的最好的现代家用电脑,只需一个键盘就可以简单的携带到任何地方(你只需要一个屏幕连接)。 +这是你付出 **70** 美元,所能得到的最好的现代家用电脑,只需一个键盘就可以简单的携带到任何地方(你只需要一个屏幕连接)。 -你可以花 70 美元只买树莓派 400,也可以花 100 美元买完整的套装,它包括一个 USB 鼠标、micro HDMI 转 HDMI 线、USB-C 电源、一本初学者指南和一张预装了树莓派操作系统的 SD 卡。 +你可以花 70 美元只买树莓派 400,也可以花 100 美元买完整的套装,它还包括一个 USB 鼠标、micro HDMI 转 HDMI 线、USB-C 电源、一本初学者指南和一张预装了树莓派操作系统的 SD 卡。 如果你想知道,对于键盘布局的支持,新闻稿中是这样提到的: @@ -83,7 +82,7 @@ via: https://itsfoss.com/raspberry-pi-400/ 作者:[Ankush Das][a] 选题:[lujun9972][b] 译者:[wxy](https://github.com/wxy) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From e728cccc2de665e672d6f438e8f0b0859283e7c7 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 5 Nov 2020 19:20:47 +0800 Subject: [PATCH 087/130] PUB @wxy https://linux.cn/article-12793-1.html --- ...y Pi 400 is Basically a Tiny Computer Inside a Keyboard.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20201103 The New Raspberry Pi 400 is Basically a Tiny Computer Inside a Keyboard.md (98%) diff --git a/translated/tech/20201103 The New Raspberry Pi 400 is Basically a Tiny Computer Inside a Keyboard.md b/published/20201103 The New Raspberry Pi 400 is Basically a Tiny Computer Inside a Keyboard.md similarity index 98% rename from translated/tech/20201103 The New Raspberry Pi 400 is Basically a Tiny Computer Inside a Keyboard.md rename to published/20201103 The New Raspberry Pi 400 is Basically a Tiny Computer Inside a Keyboard.md index 7ea0e4c667..1a070873f6 100644 --- a/translated/tech/20201103 The New Raspberry Pi 400 is Basically a Tiny Computer Inside a Keyboard.md +++ b/published/20201103 The New Raspberry Pi 400 is Basically a Tiny Computer Inside a Keyboard.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12793-1.html) [#]: subject: (The New Raspberry Pi 400 is Basically a Tiny Computer Inside a Keyboard) [#]: via: (https://itsfoss.com/raspberry-pi-400/) [#]: author: (Ankush Das https://itsfoss.com/author/ankush/) From 35941d43b455031962c627341b1b3ed828c39d4d Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 6 Nov 2020 05:01:41 +0800 Subject: [PATCH 088/130] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020201106=20?= =?UTF-8?q?11=20Linux=20Distributions=20You=20Can=20Rely=20on=20for=20Your?= =?UTF-8?q?=20Ancient=2032-bit=20Computer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20201106 11 Linux Distributions You Can Rely on for Your Ancient 32-bit Computer.md --- ...ely on for Your Ancient 32-bit Computer.md | 224 ++++++++++++++++++ 1 file changed, 224 insertions(+) create mode 100644 sources/tech/20201106 11 Linux Distributions You Can Rely on for Your Ancient 32-bit Computer.md diff --git a/sources/tech/20201106 11 Linux Distributions You Can Rely on for Your Ancient 32-bit Computer.md b/sources/tech/20201106 11 Linux Distributions You Can Rely on for Your Ancient 32-bit Computer.md new file mode 100644 index 0000000000..54608a245e --- /dev/null +++ b/sources/tech/20201106 11 Linux Distributions You Can Rely on for Your Ancient 32-bit Computer.md @@ -0,0 +1,224 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (11 Linux Distributions You Can Rely on for Your Ancient 32-bit Computer) +[#]: via: (https://itsfoss.com/32-bit-linux-distributions/) +[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) + +11 Linux Distributions You Can Rely on for Your Ancient 32-bit Computer +====== + +If you’ve been keeping up with the latest [Linux distributions][1], you must have noticed that 32-bit support has been dropped from [most of the popular Linux distributions][2]. Arch Linux, Ubuntu, Fedora, everyone has dropped the support for this older architecture. + +But, what if you have vintage hardware with you that still needs to be revived or you want to make use of it for something? Fret not, there are still a few options left to choose from for your 32-bit system. + +In this article, I’ve tried to compile some of the best Linux distributions that will keep on supporting 32-bit platform for next few years. + +### Top Linux distributions that still offer 32-bit support + +![][3] + +This list is a bit different from [our earlier list of Linux distributions for old laptops][4]. Even 64-bit computers can be considered old if they were released before 2010. This is why some suggestions listed there included distros that only support 64-bit now. + +The information presented here are correct as per my knowledge and findings but if you find otherwise, please let me know in the comment section. + +Before you go on, I suppose you know [how to check if you have a 32 bit or 64 bit computer][5]. + +#### 1\. Debian + +![Image Credits: mrneilypops / Deviantart][6] + +Debian is a fantastic choice for 32-bit systems because they still support it with their latest stable release. At the time of writing this, the latest stable release **Debian 10 “buster”** offers a 32-bit version and is supported until 2024. + +If you’re new to Debian, it is worth mentioning that you get solid documentation for everything on their [official wiki][7]. So, it shouldn’t be an issue to get started. + +You can browse through the [available installers][8] to get it installed. However, before you proceed, I would recommend referring to the list of [things to remember before installing Debian][9] in addition to its [installation manual][10]. + +[Debian][11] + +#### 2\. Slax + +![][12] + +If you just want to quickly boot up a device for some temporary work, Slax is an impressive option. + +It is based on Debian but it aims to be a portable and fast option that is meant to be run through USB devices or DVDs. You can download the 32-bit ISO file from their website for free or purchase a rewritable DVD/encrypted pendrive with Slax pre-installed. + +Of course, this isn’t meant to replace a traditional desktop operating system. But, yes, you do get the 32-bit support with Debian as its base. + +[Slax][13] + +#### 3\. AntiX + +![Image Credits: Opensourcefeed][14] + +Yet another impressive Debian-based distribution. AntiX is popularly known as a systemd-free distribution which focuses on performance while being a lightweight installation. + +It is perfectly suitable for just about any old 32-bit system. To give you an idea, it just needs 256 MB RAM and 2.7 GB storage space at the very least. Not just easy to install, but the user experience is focused for both newbies and experienced users as well. + +You should get the latest version based on Debian’s latest stable branch available. + +[AntiX][15] + +#### 4\. openSUSE + +![][16] + +openSUSE is an independent Linux distribution that supports 32-bit systems as well. Even though the latest regular version (Leap) does not offer 32-bit images, the rolling release edition (Tumbleweed) does provide 32-bit image. + +It will be an entirely different experience if you’re new. However, I suggest you to go through the [reasons why you should be using openSUSE.][17] + +It is mostly focused for developers and system administrators but you can utilize it as an average desktop user as well. It is worth noting that openSUSE is not meant to run on vintage hardware — so you have to make sure that you have at least 2 GB RAM, 40+ GB storage space, and a dual core processor. + +[openSUSE][18] + +#### 5\. Emmabuntüs + +![][19] + +Emmabuntus is an interesting distribution that aims to extend the life of the hardware to reduce waste of raw materials with 32-bit support. As a group they’re also involved in providing computers and digital technologies to schools. + +It offers two different editions, one based on Ubuntu and the other based on Debian. If you want a longer 32-bit support, you may want to go with the Debian edition. It may not be the best option, but with a number of pre-configured software to make the Linux learning experience easy and 32-bit support, it is a decent option if you want to support their cause in the process. + +[Emmanbuntus][20] + +#### 6\. NixOS + +![Nixos KDE Edition \(Image Credits: Distrowatch\)][21] + +NixOS is yet another independent Linux distribution that supports 32-bit systems. It focuses on providing a reliable system where packages are isolated from each other. + +This may not be directly geared towards average users but it is a KDE-powered usable distribution with a unique approach to package management. You can learn more about its [features][22] from its official website. + +[NixOS][23] + +#### 7\. Gentoo Linux + +![][24] + +If you’re an experienced Linux user and looking for a 32-bit Linux distributions, Gentoo Linux should be a great choice. + +You can easily configure, compile, and install a kernel through package manager with Gentoo Linux if you want. Not just limited to its configurability, which it is popularly known for, you will also be able to run it without any issues on older hardware. + +Even if you’re not an experienced user and want to give it a try, simply read through the [installation instructions][25] and you will be in for an adventure. + +[Gentoo Linux][26] + +#### 8\. Devuan + +![][27] + +[Devuan][28] is yet another systemd-free distribution. It is technically a fork of Debian, just without systemd and encouraging [Init freedom][29]. + +It may not be a very popular Linux distribution for an average user but if you want a systemd-free distribution and 32-bit support, Devuan should be a good option. + +[Devuan][30] + +#### 9\. Void Linux + +![][31] + +Void Linux is an interesting distribution independently developed by volunteers. It aims to be a general purpose OS while offering a stable rolling release cycle. It features runit as the init system instead of systemd and gives you the option of several [desktop environments][32]. + +It has an extremely impressive minimum requirement specification with just 96 MB of RAM paired up with Pentium 4 (or equivalent) chip. Try it out! + +[Void Linux][33] + +#### 10\. Q4OS + +![][34] + +Q4OS is another Debian-based distribution that focuses on providing a minimal and fast desktop user experience. It also happens to be one of the [best lightweight Linux distributions][4] in our list. It features the [Trinity desktop][35] for its 32-bit edition and you can find KDE Plasma support on 64-bit version. + +Similar to Void Linux, Q4OS also runs on a bare minimum of at least 128 MB RAM and a 300 MHz CPU with a 3 GB storage space requirement. It should be more than enough for any vintage hardware. So, I’d say, you should definitely try it out! + +To know more about it, you can also check out [our review of Q4OS][36]. + +[Q$OS][37] + +#### 11: MX Linux + +![][38] + +If you’ve got a slightly decent configuration (not completely vintage but old), MX Linux would be my personal recommendation for 32-bit systems. It also happens to be one of the [best Linux distributions][2] for every type of user. + +In general, MX Linux is a fantastic lightweight and customizable distribution based on Debian. You get the option to choose from KDE, XFCE or Fluxbox (which is their own desktop environment for older hardware). You can explore more about it on their official website and give it a try. + +[MX Linux][39] + +### Honorable Mention: Funtoo + +Funtoo is a Gentoo-based community-developed Linux distribution. It focuses on giving you the best performance with Gentoo Linux along with some extra packages to make the experience complete for users. It is also interesting to note that the development is actually led by Gentoo Linux’s creator **Daniel Robbins**. + +Of course, if you’re new to Linux, you may not have the best experience here. But, it does support 32-bit systems and works well across many older Intel/AMD chipsets. Explore more about it on its official website to see if you want to try it out. + +[Funtoo][40] + +### Wrapping Up + +I focused the list on Debian-based and some Independent distributions. However, if you don’t mind long term support and just want to get your hands on a 32-bit supported image, you can try any Ubuntu 18.04 based distributions (or any official flavour) as well. + +At the time of writing this, they just have a few more months of software support left. Hence, I avoided mentioning it as the primary options. But, if you like Ubuntu 18.04 based distros or any of its flavours, you do have options like [LXLE][41], [Linux Lite][42], [Zorin Lite 15][43], and other official flavours. + +Even though most modern desktop operating systems based on Ubuntu have dropped support for 32-bit support. You still have plenty of choices to go with. + +What would you prefer to have on your 32-bit system? Let me know your thoughts in the comments below. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/32-bit-linux-distributions/ + +作者:[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/what-is-linux-distribution/ +[2]: https://itsfoss.com/best-linux-distributions/ +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/11/32-bit-linux.png?resize=800%2C450&ssl=1 +[4]: https://itsfoss.com/lightweight-linux-beginners/ +[5]: https://itsfoss.com/32-bit-64-bit-ubuntu/ +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/08/debian-screenshot.png?resize=800%2C450&ssl=1 +[7]: https://wiki.debian.org/FrontPage +[8]: https://www.debian.org/releases/buster/debian-installer/ +[9]: https://itsfoss.com/before-installing-debian/ +[10]: https://www.debian.org/releases/buster/installmanual +[11]: https://www.debian.org/ +[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/slax-screenshot.jpg?resize=800%2C600&ssl=1 +[13]: https://www.slax.org +[14]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/10/antiX-19-1.jpg?resize=800%2C500&ssl=1 +[15]: https://antixlinux.com +[16]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/01/opensuse-15-1.png?resize=800%2C500&ssl=1 +[17]: https://itsfoss.com/why-use-opensuse/ +[18]: https://www.opensuse.org/ +[19]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/10/Emmabuntus-xfce.png?resize=800%2C500&ssl=1 +[20]: https://emmabuntus.org/ +[21]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/10/nixos-kde.jpg?resize=800%2C500&ssl=1 +[22]: https://nixos.org/features.html +[23]: https://nixos.org/ +[24]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/08/gentoo-linux.png?resize=800%2C450&ssl=1 +[25]: https://www.gentoo.org/get-started/ +[26]: https://www.gentoo.org +[27]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/06/devuan-beowulf.jpg?resize=800%2C600&ssl=1 +[28]: https://itsfoss.com/devuan-3-release/ +[29]: https://www.devuan.org/os/init-freedom +[30]: https://www.devuan.org +[31]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/10/void-linux.jpg?resize=800%2C450&ssl=1 +[32]: https://itsfoss.com/best-linux-desktop-environments/ +[33]: https://voidlinux.org/ +[34]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/02/q4os8Debonaire.jpg?resize=800%2C500&ssl=1 +[35]: https://en.wikipedia.org/wiki/Trinity_Desktop_Environment +[36]: https://itsfoss.com/q4os-linux-review/ +[37]: https://q4os.org/index.html +[38]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/08/mx-linux-19-2-kde.jpg?resize=800%2C452&ssl=1 +[39]: https://mxlinux.org/ +[40]: https://www.funtoo.org/Welcome +[41]: https://www.lxle.net/ +[42]: https://www.linuxliteos.com +[43]: https://zorinos.com/download/15/lite/32/ From 9f0e82a1bafcc563925f0773e7fe4be7f4b78ce5 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 6 Nov 2020 05:01:57 +0800 Subject: [PATCH 089/130] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020201105=20?= =?UTF-8?q?5=20surprising=20ways=20I=20use=20Jupyter=20to=20improve=20my?= =?UTF-8?q?=20life?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20201105 5 surprising ways I use Jupyter to improve my life.md --- ...g ways I use Jupyter to improve my life.md | 88 +++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 sources/tech/20201105 5 surprising ways I use Jupyter to improve my life.md diff --git a/sources/tech/20201105 5 surprising ways I use Jupyter to improve my life.md b/sources/tech/20201105 5 surprising ways I use Jupyter to improve my life.md new file mode 100644 index 0000000000..3fa9083248 --- /dev/null +++ b/sources/tech/20201105 5 surprising ways I use Jupyter to improve my life.md @@ -0,0 +1,88 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (5 surprising ways I use Jupyter to improve my life) +[#]: via: (https://opensource.com/article/20/11/surprising-jupyter) +[#]: author: (Moshe Zadka https://opensource.com/users/moshez) + +5 surprising ways I use Jupyter to improve my life +====== +Jupyter is much more than a data-analysis tool. Learn about some of the +most creative ways you can use the Python-based software. +![Computer laptop in space][1] + +The [Jupyter][2] project offers interactive ways to write software with technology like JupyterLab and Jupyter Notebook. This software is commonly used for data analysis, but what you might not know (and the Jupyter community didn't expect) is how many things you can do with it. + +Here are my top five unexpected and creative ways to use Jupyter. + +### 1\. Manipulate images + +There are great open source tools out there for [image editing and manipulation][3]—from those that rival Photoshop to the experimental work of [Glimpse][4]. Even with all those options, sometimes I just don't want to leave the world of [Python][5]. + +Luckily, Jupyter is a great option for doing light image manipulation. Taking advantage of the fact that Jupyter directly shows [Pillow][6] objects as images lets you experiment with pictures as much as you want. I even used it to [make a coloring book page][7] for my child. + +### 2\. Make an SSH jumpbox remote control + +Since JupyterLab lets you [upload and download][8] files, [edit][9] files, and even [run terminals][10], it has all the pieces necessary to make an SSH jumpbox environment. + +With some SSH-forwarding magic, you can make Jupyter your [remote console][11] on the other side of a firewall. + +### 3\. Develop web applications + +One of my favorite ways to use Jupyter is for an unexpected kind of software development. I [gave a talk][12] where I developed a [web application in real time][13] using a Jupyter notebook. The talk concluded with a simple form that is XSS- and CSS-safe and included some light server-side computation. + +A day-to-day Jupyter user may not expect it to be a great web development environment, but it's a remarkably powerful one. + +### 4\. Pull reports from your favorite services + +Data analysis in JupyterLab is a common use, but what about self-improvement analysis? + +You can use Jupyter to [analyze your calendar][14]. If your favorite services allow API export, or even let you export a CSV, you can correlate those against your calendar. If you find out that you were posting on social media when your calendar said you were supposed to be in a meeting with your manager, however, Jupyter can't do much to help you! + +### 5\. Develop games + +My favorite way to expand the expectations of what I can accomplish in a Jupyter Notebook is by building a game with my child. I wrote about this previously, with a step-by-step tutorial on [writing a game][15] using [PursuedPyBear][16] and Jupyter. + +This iterative approach to game development is especially helpful when trying to figure out game mechanics. It's a game-changer (sorry, I had to) to be able to change the rules mid-game. + +You can even use IPywidgets to modify the numeric parameters, as [this video][17] shows. + +### [Download the eBook][18] + +JupyterLab and Jupyter Notebooks offer an incredible environment for experimenting. [Download this guide][18] that contains tutorials on the surprising ways to use Jupyter.  + +How are you using it in creative ways? Share your favorites in the comments below. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/11/surprising-jupyter + +作者:[Moshe Zadka][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/moshez +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/computer_space_graphic_cosmic.png?itok=wu493YbB (Computer laptop in space) +[2]: https://jupyter.org/ +[3]: https://opensource.com/life/12/6/design-without-debt-five-tools-for-designers +[4]: https://glimpse-editor.github.io/ +[5]: https://opensource.com/resources/python +[6]: https://pillow.readthedocs.io/en/stable/index.html +[7]: https://opensource.com/article/20/8/edit-images-python +[8]: https://jupyterlab.readthedocs.io/en/stable/user/files.html#uploading-and-downloading +[9]: https://jupyterlab.readthedocs.io/en/stable/user/files.html#opening-files +[10]: https://jupyterlab.readthedocs.io/en/stable/user/terminal.html +[11]: https://opensource.com/article/20/8/remote-management-jupyter +[12]: https://opensource.com/article/20/8/write-talk-using-jupyter-notebooks +[13]: https://github.com/moshez/interactive-web-development/blob/e31ae72d8cab7637d18bc734c4e8afc10c60251f/interactive-web-development.ipynb +[14]: https://opensource.com/article/20/9/analyze-your-life-jupyter +[15]: https://opensource.com/article/20/5/python-games +[16]: https://ppb.dev/ +[17]: https://www.youtube.com/watch?v=JaTf_ZT7tE8 +[18]: https://opensource.com/downloads/jupyter-guide From 54d3bbba1d173ab6de949449a0ebd1d63165553a Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 6 Nov 2020 05:02:09 +0800 Subject: [PATCH 090/130] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020201105=20?= =?UTF-8?q?Tweak=20your=20Git=20config=20for=20multiple=20user=20IDs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20201105 Tweak your Git config for multiple user IDs.md --- ...k your Git config for multiple user IDs.md | 75 +++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 sources/tech/20201105 Tweak your Git config for multiple user IDs.md diff --git a/sources/tech/20201105 Tweak your Git config for multiple user IDs.md b/sources/tech/20201105 Tweak your Git config for multiple user IDs.md new file mode 100644 index 0000000000..d0f0a0c35d --- /dev/null +++ b/sources/tech/20201105 Tweak your Git config for multiple user IDs.md @@ -0,0 +1,75 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Tweak your Git config for multiple user IDs) +[#]: via: (https://opensource.com/article/20/10/git-config) +[#]: author: (Ramanathan M https://opensource.com/users/muthiahramanathan) + +Tweak your Git config for multiple user IDs +====== +Use the same machine for your work and personal Git commits without +manually resetting your config. +![Chat via email][1] + +Git's [git config][2] command (hereafter referred to as "config") enables you to set repository or global options for Git. It has many options, and one of them, `includeIf`, is handy when you have dual roles using Git, for example, working full time as a developer and contributing to open source projects in your spare time. Most people in this situation don't want to use a common config for both roles or, at the very least, would rather keep certain portions of their config distinct, especially if they use the same computer in both roles. + +This is my situation, so I keep two separate sets of mail IDs as part of my Git config. This way, commits in repositories related to projects at my workplace carry my office mail ID, whereas the commits made to repositories hosted in my personal GitHub account use my personal mail ID. + +To illustrate, here is a sample snippet from my global config (maintained at `$HOME/.gitconfig`), which I will describe below. + + +``` +[includeIf "gitdir:~/priv_scm/"] +        path = ~/priv_scm/.gitconfig +[includeIf "gitdir:~/work_scm/"] +        path = ~/work_scm/.gitconfig +``` + +### What's includeIf? + +The `includeIf.condition.path` variable, part of the `include` config directives, allows you to set a custom config conditionally. Also, the path to the custom config can be set as part of the directive. + +This directive supports three keywords: `gitdir`, `gitdir/I`, and `onbranch`. I will briefly explain `gitdir`, which I use in the code snippet above; you can learn about the other two in the [docs][3]. + +Using the `gitdir` keyword in the `includeIf` directive causes a conditional check to be performed on the pattern. Per the rule, if the current working directory matches the specified directory pattern in `gitdir`, then it picks the config from the given path. I'll apply this rule on the config snippet to show how it's evaluated. + +In the config snippet, you can see a simple pattern, `~/`, used along with the `gitdir` keyword. This pattern is substituted with the value stored in the `$HOME` environment variable. + +### How to use it + +If you're using the same system to work on open source projects hosted on GitHub or GitLab and committing to Git repositories at work, you can have two top-level directories, like `$HOME/priv_scm` and `$HOME/work_scm`. Within these two directories, you can have two separate `.gitconfig` files with settings related to your `user.name` and `user.email`. However, they can also be included in a global `.gitconfig` stored at `$HOME` that can hold all the customizations common to both environments. + +Here is a snippet of an example `$HOME/priv_scm/.gitconfig`: + + +``` +$ cat $HOME/priv_scm/.gitconfig +[user] +    name  = Ramanathan Muthiah +    email = <personal-mailid-goes-here> +``` + +With this config in place, you can switch directories and start working on open source projects without resetting some of the config related to Git manually. These changes are handled automatically in the main `.gitconfig` with the aid of the `includeIf` conditional directive. + +### Git tips + +I hope this tip helps you organize your Git projects. What are your favorite Git tips? Share them in the comments! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/10/git-config + +作者:[Ramanathan M][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/muthiahramanathan +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/email_chat_communication_message.png?itok=LKjiLnQu (Chat via email) +[2]: https://git-scm.com/docs/git-config +[3]: https://git-scm.com/docs/git-config#_conditional_includes From 0943488b3842d4e27a3cfa7edd2f616e7215dd18 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 6 Nov 2020 05:02:22 +0800 Subject: [PATCH 091/130] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020201105=20?= =?UTF-8?q?6=20evening=20rituals=20for=20working=20in=20tech?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20201105 6 evening rituals for working in tech.md --- ...5 6 evening rituals for working in tech.md | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 sources/tech/20201105 6 evening rituals for working in tech.md diff --git a/sources/tech/20201105 6 evening rituals for working in tech.md b/sources/tech/20201105 6 evening rituals for working in tech.md new file mode 100644 index 0000000000..6b999b090e --- /dev/null +++ b/sources/tech/20201105 6 evening rituals for working in tech.md @@ -0,0 +1,49 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (6 evening rituals for working in tech) +[#]: via: (https://opensource.com/article/20/11/evening-rituals-working-tech) +[#]: author: (Jen Wike Huger https://opensource.com/users/jen-wike) + +6 evening rituals for working in tech +====== +After a busy day of virtual meetings, emails, coding, and collaborating, +how do you wind down for the night? +![A farm road][1] + +This strange time has given us, on one hand, the chance to slow down, yet on the other, it's busier than ever. Especially if you have others in your life to care for in addition to yourself. But you can't give from an empty cup, so, this list of evening rituals is focused on what you can do for yourself right after you turn the computer off, shut the laptop, or say goodbye to the last virtual meeting of the day. + +1\. Head to the nearest door and take a big, deep belly breath in... and out. I don't care if it's snowing. Fill your lungs with fresh air. Stay for a while if you can -- take a lap around the yard, or walk down the street and back. + +2\. If you have some time, make a cup of tea -- black (is caffeinated, so beware), green, or herbal -- and, let it cool down while you get your shoes (and maybe a jacket) on. Pop it in a favorite thermos, and take a stroll around your neighborhood. You don't have to have a plan or a place you're walking to. Set a timer for 15 minutes if you only have a short window. + +3\. Turn on a song that pops into your head or the one you didn't get a chance to jam/relax to earlier today. + +4\. If you have some time, stand up and dance it out or lay all the way down with your feet up. No more sitting. Don't think, just listen. Research shows giving your brain blank space helps you think and deal better later. + +5\. Open your [reader app][2] or pick up a book (the latter is easier on your eyes), and fully indulge, letting the day slip away, or give yourself enough time to read at least one chapter. + +6\. Make food that feels good. Maybe that means a few basic ingredients and simple instructions. Maybe that means putting together that new, complex meal you've been excited about since you picked up the items at the grocery store. + +Can you combine some of these to get even more out of your evening ritual time? If you're working in tech, creating rituals like this—whether they're [in the morning][3], middle of your day, or evening—is critical as we live out a new normal working from home, taking meetings virtually, and missing the energy of in-person connections with colleagues.  + +What is your evening ritual? + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/11/evening-rituals-working-tech + +作者:[Jen Wike Huger][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jen-wike +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/EDUCATION_jadud_farm-road.png?itok=of8IuSM5 (A farm road) +[2]: https://opensource.com/article/20/2/linux-ebook-readers +[3]: https://opensource.com/article/20/10/tech-morning-rituals From 85de6b016fcb6196f558f9627c98cda9aa516798 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 6 Nov 2020 08:39:53 +0800 Subject: [PATCH 092/130] translating --- ...ojects to try in COPR from October 2020.md | 132 ------------------ ...ojects to try in COPR from October 2020.md | 109 +++++++++++++++ 2 files changed, 109 insertions(+), 132 deletions(-) delete mode 100644 sources/tech/20201102 4 cool new projects to try in COPR from October 2020.md create mode 100644 translated/tech/20201102 4 cool new projects to try in COPR from October 2020.md diff --git a/sources/tech/20201102 4 cool new projects to try in COPR from October 2020.md b/sources/tech/20201102 4 cool new projects to try in COPR from October 2020.md deleted file mode 100644 index 80bd6f2f77..0000000000 --- a/sources/tech/20201102 4 cool new projects to try in COPR from October 2020.md +++ /dev/null @@ -1,132 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (4 cool new projects to try in COPR from October 2020) -[#]: via: (https://fedoramagazine.org/4-cool-new-projects-to-try-in-copr-from-october-2020/) -[#]: author: (frostyx https://fedoramagazine.org/author/frostyx/) - -4 cool new projects to try in COPR from October 2020 -====== - -![][1] - -COPR is a [collection][2] of personal repositories for software -that isn’t carried in Fedora. Some software doesn’t conform to -standards that allow easy packaging. Or it may not meet other Fedora -standards, despite being free and open-source. COPR can offer these -projects outside the Fedora set of packages. Software in COPR isn’t -supported by Fedora infrastructure or signed by the project. However, -it can be a neat way to try new or experimental software. - -This article presents a few new and interesting projects in COPR. If -you’re new to using COPR, see the [COPR User Documentation][3] -for how to get started. - -### Dialect - -[Dialect][4] translates text to foreign languages using Google Translate. It remembers your translation history and supports features such as automatic language detection and text to speech. The user interface is minimalistic and mimics the Google Translate tool itself, so it is really easy to use. - -![][5] - -#### Installation instructions - -The [repo][6] currently provides Dialect for Fedora 33 and Fedora -Rawhide. To install it, use these commands: - -``` -sudo dnf copr enable lyessaadi/dialect -sudo dnf install dialect -``` - -### GitHub CLI - -[gh][7] is an official GitHub command-line client. It provides fast -access and full control over your project issues, pull requests, and -releases, right in the terminal. Issues (and everything else) can also -be easily viewed in the web browser for a more standard user interface -or sharing with others. - -![][8] - -#### Installation instructions - -The [repo][9] currently provides _gh_ for Fedora 33 and Fedora -Rawhide. To install it, use these commands: - -``` -sudo dnf copr enable jdoss/github-cli -sudo dnf install github-cli -``` - -### Glide - -[Glide][10] is a minimalistic media player based on GStreamer. It -can play both local and remote files in any multimedia format -supported by GStreamer itself. If you are in need of a multi-platform -media player with a simple user interface, you might want to give Glide a try. - -![][11] - -#### Installation instructions - -The [repo][12] currently provides Glide for Fedora 32, 33, and -Rawhide. To install it, use these commands: - -``` -sudo dnf copr enable atim/glide-rs -sudo dnf install glide-rs -``` - -### Vim ALE - -[ALE][13] is a plugin for Vim text editor, providing syntax and -semantic error checking. It also brings support for fixing code and -many other IDE-like features such as TAB-completion, jumping to -definitions, finding references, viewing documentation, etc. - -![][14] - -#### Installation instructions - -The [repo][15] currently provides _vim-ale_ for Fedora 31, -32, 33, and Rawhide, as well as for EPEL8. To install it, use these -commands: - -``` -sudo dnf copr enable praiskup/vim-ale -sudo dnf install vim-ale -``` - -Editors note: Previous COPR articles can be found [here][16]. - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/4-cool-new-projects-to-try-in-copr-from-october-2020/ - -作者:[frostyx][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://fedoramagazine.org/author/frostyx/ -[b]: https://github.com/lujun9972 -[1]: https://fedoramagazine.org/wp-content/uploads/2017/08/4-copr-945x400.jpg -[2]: https://copr.fedorainfracloud.org/ -[3]: https://docs.pagure.org/copr.copr/user_documentation.html -[4]: https://github.com/gi-lom/dialect -[5]: https://fedoramagazine.org/wp-content/uploads/2020/10/dialect.png -[6]: https://copr.fedorainfracloud.org/coprs/lyessaadi/dialect/ -[7]: https://github.com/cli/cli -[8]: https://fedoramagazine.org/wp-content/uploads/2020/10/github-cli.png -[9]: https://copr.fedorainfracloud.org/coprs/jdoss/github-cli/ -[10]: https://github.com/philn/glide -[11]: https://fedoramagazine.org/wp-content/uploads/2020/10/glide.png -[12]: https://copr.fedorainfracloud.org/coprs/atim/glide-rs/ -[13]: https://github.com/dense-analysis/ale -[14]: https://fedoramagazine.org/wp-content/uploads/2020/10/vim-ale.png -[15]: https://copr.fedorainfracloud.org/coprs/praiskup/vim-ale/ -[16]: https://fedoramagazine.org/?s=COPR diff --git a/translated/tech/20201102 4 cool new projects to try in COPR from October 2020.md b/translated/tech/20201102 4 cool new projects to try in COPR from October 2020.md new file mode 100644 index 0000000000..de7397e856 --- /dev/null +++ b/translated/tech/20201102 4 cool new projects to try in COPR from October 2020.md @@ -0,0 +1,109 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (4 cool new projects to try in COPR from October 2020) +[#]: via: (https://fedoramagazine.org/4-cool-new-projects-to-try-in-copr-from-october-2020/) +[#]: author: (frostyx https://fedoramagazine.org/author/frostyx/) + +COPR 仓库中 4 个很酷的新项目(2020.10) +====== + +![][1] + +COPR 是个人软件仓库[集合][2],它不在 Fedora 中。这是因为某些软件不符合轻松打包的标准;或者它可能不符合其他 Fedora 标准,尽管它是自由而开源的。COPR 可以在 Fedora 套件之外提供这些项目。COPR 中的软件不受 Fedora 基础设施的支持,或者是由项目自己背书的。但是,这是一种尝试新的或实验性的软件的一种巧妙的方式。 + +本文介绍了 COPR 中一些有趣的新项目。如果你第一次使用 COPR,请参阅 [COPR 用户文档][3]。 + +### Dialect + +[Dialect][4] 使用谷歌翻译将文本翻译成外语。它可以记住你的翻译历史,并支持自动语言检测和文本到语音等功能。用户界面简约,模仿谷歌翻译工具本身,所以它真的很容易使用。 + +![][5] + +#### 安装说明 + +目前[仓库][6]在 Fedora 33 和 Fedora Rawhide 中提供了 Dialect。要安装它,请使用下面的命令: + +``` +sudo dnf copr enable lyessaadi/dialect +sudo dnf install dialect +``` + +### GitHub CLI + +[gh][7] 是一个官方的 GitHub 命令行客户端。它在终端提供了快速的访问,并完全控制你的项目问题、拉取请求和发布。问题(和其他东西)也可以在浏览器中轻松查看,以获得更标准的用户界面,或与他人分享。 + +![][8] + +#### 安装说明 + +目前[仓库][9]在 Fedora 33 和 Fedora Rawhide 中提供了 _gh_ 。要安装它,请使用下面的命令: + +``` +sudo dnf copr enable jdoss/github-cli +sudo dnf install github-cli +``` + +### Glide + +[Glide][10] 是一个基于 GStreamer 的极简主义媒体播放器。它可以播放任何 GStreamer 支持的多媒体格式的本地和远程文件。如果你需要一个多平台的具有简单用户界面的媒体播放器,你可能会想试试 Glide。 + +![][11] + +#### 安装说明 + +目前[仓库][12]在 Fedora 32、33 和 Rawhide 中提供了 Glide。要安装它,请使用下面的命令: + +``` +sudo dnf copr enable atim/glide-rs +sudo dnf install glide-rs +``` + +### Vim ALE + +[ALE][13] 是 Vim 文本编辑器的一个插件,它提供了语法和语义错误检查。它还带来了诸如代码修复和许多其他类似于 IDE 的功能,如 TAB 补全、跳转到定义、查找引用、查看文档等。 + +![][14] + +#### 安装说明 + +目前[仓库][15]在 Fedora 31、32、33 和 Rawhide 还有 EPEL8 中提供了 _vim-ale_ 。要安装它,请使用下面的命令: + +``` +sudo dnf copr enable praiskup/vim-ale +sudo dnf install vim-ale +``` + +编者注:可在[此处][16]查阅以前的 COPR 文章。 + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/4-cool-new-projects-to-try-in-copr-from-october-2020/ + +作者:[frostyx][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://fedoramagazine.org/author/frostyx/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2017/08/4-copr-945x400.jpg +[2]: https://copr.fedorainfracloud.org/ +[3]: https://docs.pagure.org/copr.copr/user_documentation.html +[4]: https://github.com/gi-lom/dialect +[5]: https://fedoramagazine.org/wp-content/uploads/2020/10/dialect.png +[6]: https://copr.fedorainfracloud.org/coprs/lyessaadi/dialect/ +[7]: https://github.com/cli/cli +[8]: https://fedoramagazine.org/wp-content/uploads/2020/10/github-cli.png +[9]: https://copr.fedorainfracloud.org/coprs/jdoss/github-cli/ +[10]: https://github.com/philn/glide +[11]: https://fedoramagazine.org/wp-content/uploads/2020/10/glide.png +[12]: https://copr.fedorainfracloud.org/coprs/atim/glide-rs/ +[13]: https://github.com/dense-analysis/ale +[14]: https://fedoramagazine.org/wp-content/uploads/2020/10/vim-ale.png +[15]: https://copr.fedorainfracloud.org/coprs/praiskup/vim-ale/ +[16]: https://fedoramagazine.org/?s=COPR From a3a3d07fe294c689bbcd043cbcac854142fbf63a Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 6 Nov 2020 08:52:50 +0800 Subject: [PATCH 093/130] translating --- ...01105 How to Scan-Detect New LUNs and SCSI Disks on Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20201105 How to Scan-Detect New LUNs and SCSI Disks on Linux.md b/sources/tech/20201105 How to Scan-Detect New LUNs and SCSI Disks on Linux.md index c965d8ee57..bc63527249 100644 --- a/sources/tech/20201105 How to Scan-Detect New LUNs and SCSI Disks on Linux.md +++ b/sources/tech/20201105 How to Scan-Detect New LUNs and SCSI Disks on Linux.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 11b28e0dc754b77f07e1f401189552c639753673 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 7 Nov 2020 10:55:05 +0800 Subject: [PATCH 094/130] PRF @geekpi --- ...201026 ninja- a simple way to do builds.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/translated/tech/20201026 ninja- a simple way to do builds.md b/translated/tech/20201026 ninja- a simple way to do builds.md index dcfe386a3f..da7f8a3951 100644 --- a/translated/tech/20201026 ninja- a simple way to do builds.md +++ b/translated/tech/20201026 ninja- a simple way to do builds.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (ninja: a simple way to do builds) @@ -27,15 +27,15 @@ done ### 构建系统是让人困惑的 -在过去,我对使用 make 或 bazel 这样的构建系统来做我的小项目一直很反感,因为 bazel 是个大而复杂的东西,而 `make` 对我来说感觉有点神秘。我真的不知道如何使用它们中的任何一个。 +在过去,我对使用 `make` 或 `bazel` 这样的构建系统来做我的小项目一直很反感,因为 `bazel` 是个大而复杂的东西,而 `make` 对我来说感觉有点神秘。我真的不想使用它们中的任何一个。 所以很长时间以来,我只是写了一个 bash 脚本或者其他的东西来进行构建,然后就认命了,有时候只能等一分钟。 -### ninja 是一个非常简单的构建系统 +### ninja 是一个极其简单的构建系统 -但 ninja 并不复杂!以下是我所知道的关于 ninja 构建文件的语法:如何创建一个 `rule `和一个 `build`: +但 `ninja` 并不复杂!以下是我所知道的关于 ninja 构建文件的语法:创建一个 `rule` 和一个 `build`: -`rule` 有一个命令和描述(描述只是给人看的,所以你可以知道它在构建你的代码时在做什么)。 +`rule` 有一个命令(`command`)和描述(`description`)参数(描述只是给人看的,所以你可以知道它在构建你的代码时在做什么)。 ``` rule svg2pdf @@ -55,7 +55,7 @@ Ninja 还有一些更多的功能(见[手册][2]),但我还没有用过。 ### ninja 文件通常是自动生成的 -ninja 的神奇之处在于,你不必使用一些混乱的构建语言,它们很难记住(比如 make),因为你不经常使用它,相反,ninja 语言超级简单,如果你想做一些复杂的事情,那么你只需使用任意编程语言生成你想要的构建文件。 +ninja 的神奇之处在于,你不必使用一些混乱的构建语言,它们很难记住,因为你不经常使用它(比如 `make`),相反,ninja 语言超级简单,如果你想做一些复杂的事情,那么你只需使用任意编程语言生成你想要的构建文件。 我喜欢写一个 `build.py` 文件,或者像这样的文件,创建 ninja 的构建文件,然后运行 `ninja`: @@ -79,11 +79,11 @@ import subprocess subprocess.check_call(['ninja']) ``` -我相信有一堆 ninja 的最佳实践,但我不知道。对于我的小项目而言,我发现它很好用。 +我相信有一堆 `ninja` 的最佳实践,但我不知道。对于我的小项目而言,我发现它很好用。 ### meson 是一个生成 ninja 文件的构建系统 -我对 [Meson][4] 还不太了解,但最近我在构建一个 C 程序 ([plocate][5],一个比 `locate` 更快的替代方案)时,我注意到它有不同的构建说明,而不是通常的 `./configure; make; make install`: +我对 [Meson][4] 还不太了解,但最近我在构建一个 C 程序 ([plocate][5],一个比 `locate` 更快的替代方案)时,我注意到它有不同的构建说明,而不是通常的 `./configure; make; make install`: ``` meson builddir @@ -91,7 +91,7 @@ cd builddir ninja ``` -好像 Meson 是一个 C/C++/Java/Rust/Fortran 的构建系统,可以用 ninja 作为后端。 +看起来 Meson 是一个可以用 ninja 作为后端的 C/C++/Java/Rust/Fortran 构建系统。 ### 就是这些! @@ -104,7 +104,7 @@ via: https://jvns.ca/blog/2020/10/26/ninja--a-simple-way-to-do-builds/ 作者:[Julia Evans][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/) 荣誉推出 From 967073def7101c5f9d1b87ac28497d33351b8453 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 7 Nov 2020 10:55:33 +0800 Subject: [PATCH 095/130] PUB @geekpi https://linux.cn/article-12798-1.html --- .../20201026 ninja- a simple way to do builds.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20201026 ninja- a simple way to do builds.md (98%) diff --git a/translated/tech/20201026 ninja- a simple way to do builds.md b/published/20201026 ninja- a simple way to do builds.md similarity index 98% rename from translated/tech/20201026 ninja- a simple way to do builds.md rename to published/20201026 ninja- a simple way to do builds.md index da7f8a3951..43911730e3 100644 --- a/translated/tech/20201026 ninja- a simple way to do builds.md +++ b/published/20201026 ninja- a simple way to do builds.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12798-1.html) [#]: subject: (ninja: a simple way to do builds) [#]: via: (https://jvns.ca/blog/2020/10/26/ninja--a-simple-way-to-do-builds/) [#]: author: (Julia Evans https://jvns.ca/) From e7f1d9425f8a77a42ed72db632dec0f7be564c06 Mon Sep 17 00:00:00 2001 From: chenmu-kk <53132802+chenmu-kk@users.noreply.github.com> Date: Sat, 7 Nov 2020 18:37:35 +0800 Subject: [PATCH 096/130] Update 20190402 When Wi-Fi is mission-critical, a mixed-channel architecture is the best option.md --- ...channel architecture is the best option.md | 50 +++++++++---------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/sources/tech/20190402 When Wi-Fi is mission-critical, a mixed-channel architecture is the best option.md b/sources/tech/20190402 When Wi-Fi is mission-critical, a mixed-channel architecture is the best option.md index bbb6d9563f..6eb1516fa4 100644 --- a/sources/tech/20190402 When Wi-Fi is mission-critical, a mixed-channel architecture is the best option.md +++ b/sources/tech/20190402 When Wi-Fi is mission-critical, a mixed-channel architecture is the best option.md @@ -7,59 +7,59 @@ [#]: via: (https://www.networkworld.com/article/3386376/when-wi-fi-is-mission-critical-a-mixed-channel-architecture-is-the-best-option.html#tk.rss_all) [#]: author: (Zeus Kerravala https://www.networkworld.com/author/Zeus-Kerravala/) -When Wi-Fi is mission-critical, a mixed-channel architecture is the best option +当Wi-Fi 成为关键业务时,混合信道架构是最好的多信道选择 ====== ### 当Wi-Fi 成为关键业务时,对于如今的它来说,混合信道架构是最好的多信道选择,但它并不总是最佳的选择。当需要可靠的Wi-Fi时,单信道和混合Aps提供了令人信服的替代方案。 ![Getty Images][1] -I’ve worked with a number of companies that have implemented digital projects only to 我曾与许多实施数字项目的公司合作,结果却发现它们失败了。想法是正确的,施行是健全的,市场机遇也在那里。那薄弱的环节在哪里呢?是Wi-Fi网络。 +我曾与许多实施数字项目的公司合作,结果却发现它们失败了。想法是正确的,施行是健全的,市场机遇也在那里。薄弱的环节在哪里呢?是Wi-Fi网络。 -For example, a large hospital wanted to improve clinician response times to patient alarms by having telemetry information sent to mobile devices. Without the system, the only way a nurse would know about a patient alarm is from an audible alert. And with all the background noise, it’s often tough to discern where noises are coming from. The problem was the Wi-Fi network in the hospital had not been upgraded in years and caused messages to be significantly delayed in their delivery, often taking four to five minutes to deliver. The long delivery times caused a lack of confidence in the system, so many clinicians stopped using it and went back to manual alerting. As a result, the project was considered a failure. +例如,一家大型医院希望通过将遥测信息发送到移动设备,来提高临床医生对患者警报的响应时间。如果没有这个系统,护士了解病人警报的唯一途径就是通过声音警报。在所有嘈杂的背景音中,通常很难分辨噪音来自哪里。问题是这家医院中的Wi-Fi网络已经很多年未升级了,这导致信息传递严重延迟(通常需要4~5分钟)。过长的信息传递导致人们对该系统失去信心,因此许多临床医生停止使用该系统,转而使用手动警报。最终,人们认为这个项目是失败的。 -I’ve seen similar examples in manufacturing, K-12 education, entertainment, and other industries. Businesses are competing on the basis of customer experience, and that’s driven from the ever-expanding, ubiquitous wireless edge. Great Wi-Fi doesn’t necessarily mean market leadership, but bad Wi-Fi will have a negative impact on customers and employees. And in today’s competitive climate, that’s a recipe for disaster. +我曾在制造业、K-12教育、娱乐和其他行业中见过类似的案例。企业竞争的基础是客户体验,而竞争的动力来自不断扩展又无处不在的无线优势。好的 Wi-Fi并不意味着市场领导地位,但是劣质的Wi-Fi将会对客户和员工产生负面影响。而在当今竞争激烈的环境下,这是灾难的根源。 **[ Read also:[Wi-Fi site-survey tips: How to avoid interference, dead spots][2] ]** -## Wi-Fi performance historically inconsistent +## Wi-Fi性能历来不一致 -The problem with Wi-Fi is that it’s inherently flaky. I’m sure everyone reading this has experienced the typical flaws with failed downloads, dropped connections, inconsistent performance, and lengthy wait times to connect to public hot spots. +Wi-Fi的问题在于它本身就很脆弱。我相信每个阅读这篇文章的人都经历过下载失败、连接中断、性能不一致以及连接公用热点的漫长等待时间等缺陷。 -Picture sitting in a conference prior to a keynote address and being able to tweet, send email, browse the web, and do other things with no problem. Then the keynote speaker comes on stage and the entire audiences start snapping pics, uploading those pictures, and streaming things – and the Wi-Fi stops working. I find this to be the norm more than the exception, underscoring the need for [no-compromise Wi-Fi][3]. +想象一下,你坐在一个会议上,在一个主题演讲之前,你可以随意地发推特、发电子邮件、浏览网页以及做其他事情。然后主讲人上台,所有观众开始拍照,上传并流传信息——然后网络崩溃了。我发现这不仅仅是一个例外,更是一种常态,强调了对[不妥协Wi-Fi][3]的需求。 -The question for network professionals is how to get to a place where the Wi-Fi is rock solid 100% of the time. Some say that just beefing up the existing network will do that, and it might, but in some cases, the type of Wi-Fi might not be appropriate. +对于网络技术人员的问题是如何到达一个Wi-Fi一直不间断保持100%的地方。有人说只要加强现存的网络可以做到,这也许可以,但在某些情况下,Wi-Fi的类型可能并不合适。 -The most commonly deployed type of Wi-Fi is multi-channel, also known as micro-cell, where each client connects to the access point (AP) using a radio channel. A high-quality experience is based on two things: good signal strength and minimal interference. Several things can cause interference, such as APs being too close, layout issues, or interference from other equipment. To minimize interference, businesses invest a significant amount of time and money in [site surveys to plan the optimal channel map][2], but even with that’s done well, Wi-Fi glitches can still happen. +最常见的Wi-Fi部署类型是多信道,也称为微蜂窝,每个客户端通过无线信道连接到接入点(AP)。高质量的通话体验基于两点:良好的信号强度和最小的干扰。有几个因素会导致干扰,例如接入点太靠近,布局问题或者来自其他设备的干扰。为了最大程度地减少干扰,企业需要在现场调查中投入大量的时间和资金来规划最佳的信道地图,但即使这些做得很好,Wi-Fi故障仍然可能发生。 [site surveys to plan the optimal channel map][2], but even with that’s done well, Wi-Fi glitches can still happen. **[[Take this mobile device management course from PluralSight and learn how to secure devices in your company without degrading the user experience.][4] ]** -## Multi-channel Wi-Fi not always the best choice +## 多通道Wi-Fi并非总是最佳选择 -For many carpeted offices, multi-channel Wi-Fi is likely to be solid, but there are some environments where external circumstances will impact performance. A good example of this is a multi-tenant building in which there are multiple Wi-Fi networks transmitting on the same channel and interfering with one another. Another example is a hospital where there are many campus workers moving between APs. The client will also try to connect to the best AP, causing the client to continually disconnect and reconnect resulting in dropped sessions. Then there are environments such as schools, airports, and conference facilities where there is a high number of transient devices and multi-channel can struggle to keep up. +对于许多铺着地毯的办公室来说,多通道Wi-Fi可能是可靠的,但在某些环境中,外部环境会影响性能。一个很好的例子是多租户建筑,其中有多个Wi-Fi网络在同一信道上传输并相互干扰。另一个例子是医院,这里有许多工作人员在多个接入点间流动。有并联Wi-Fi网络传输在相同通道并相互干扰。客户端将试图连接到最佳接入点,导致客户端不断断开连接并重新连接,从而导致会话中断。还有一些环境,例如学校、机场和会议设施,那里存在大量的瞬态设备,而多通道则难以跟上。 -## Single channel Wi-Fi offers better reliability but with a performance hit +## 单通道Wi-Fi提供更好的可靠性但与此同时性能会受到影响 -What’s a network manager to do? Is inconsistent Wi-Fi just a fait accompli? Multi-channel is the norm, but it isn’t designed for dynamic physical environments or those where reliable connectivity is a must. +网络管理器要做什么?不一致的Wi-Fi只是一个既定事实吗?多信道是一种标准,但它并非是为动态物理环境或那些需要可靠的连接环境而设计的。 -Several years ago an alternative architecture was proposed that would solve these problems. As the name suggests, “single channel” Wi-Fi uses a single radio channel for all APs in the network. Think of this as being a single Wi-Fi fabric that operates on one channel. With this architecture, the placement of APs is irrelevant because they all utilize the same channel, so they won’t interfere with one another. This has an obvious simplicity advantage, such as if coverage is poor, there’s no reason to do another expensive site survey. Instead, just drop in APs where they are needed. +几年前提出了一项解决这些问题的替代架构。顾名思义,“单信道”Wi-Fi在网络中为所有接入点使用单一的无线频道。可以把它想象成在一个信道上运行的单个Wi-Fi结构。这种架构中,接入点的位置无关紧要,因为他们都利用相同的通道,因此不会互相干扰。这有一个显而易见的简化优势,比如,如果覆盖率很低,那就没有理由再做一次昂贵的现场调查。相反,只需在需要的地方布置接入点就可以了。 -One of the disadvantages of single-channel is that aggregate network throughput was lower than multi-channel because only one channel can be used. This might be fine in environments where reliability trumps performance, but many organizations want both. +单通道的缺点之一是总网络吞吐量低于多通道,因为只能使用一个通道。在可靠性高于性能的环境中,这可能会很好,但许多组织希望二者兼而有之。 -## Hybrid APs offer the best of both worlds +## 混合接入点提供了两全其美的优势 -There has been recent innovation from the manufacturers of single-channel systems that mix channel architectures, creating a “best of both worlds” deployment that offers the throughput of multi-channel with the reliability of single-channel. For example, Allied Telesis offers Hybrid APs that can operate in multi-channel and single-channel mode simultaneously. That means some web clients can be assigned to the multi-channel to have maximum throughput, while others can use single-channel for seamless roaming experience. +单信道系统制造商最近进行了创新,将信道架构混合在一起,创造了一种“两全其美”的部署,可提供多信道的吞吐量和单信道的可靠性。举个例子,安奈特提供了混合接入点,可以同时在多信道和单信道模式下运行。这意味着可以分配一些web客户端到多信道以获得最大的吞吐量,而其他的web客户端则可使用单信道来获得无缝漫游体验。 -A practical use-case of such a mix might be a logistics facility where the office staff uses multi-channel, but the fork-lift operators use single-channel for continuous connectivity as they move throughout the warehouse. +这种混合的实际用例可能是物流设施,办公室工作人员使用多通道,但叉车操作员在整个仓库移动时使用单一通道持续连接。 -Wi-Fi was once a network of convenience, but now it is perhaps the most mission-critical of all networks. A traditional multi-channel system might work, but due diligence should be done to see how it functions under a heavy load. IT leaders need to understand how important Wi-Fi is to digital transformation initiatives and do the proper testing to ensure it’s not the weak link in the infrastructure chain and choose the best technology for today’s environment. +Wi-Fi曾是一个便利的网络,但如今他或许是所有网络中最关键的任务。传统的多信道体系也许可以工作,但应该做一些尽职调查来看看它在重负下如何运转。IT领导者需要了解Wi-Fi对数字转型计划的重要性,并进行适当的测试,以确保它不是基础设施链中的薄弱环节,并为当今环境选择最佳技术。 -**Reviews: 4 free, open-source network monitoring tools:** +**综述:4个免费的开源网络监控工具** - * [Icinga: Enterprise-grade, open-source network-monitoring that scales][5] - * [Nagios Core: Network-monitoring software with lots of plugins, steep learning curve][6] - * [Observium open-source network monitoring tool: Won’t run on Windows but has a great user interface][7] - * [Zabbix delivers effective no-frills network monitoring][8] + * [Icinga:可扩展的企业级开源网络监控][5] + * [Nagios Core: 包含大量插件、陡峭学习曲线的网络监控软件][6] + * [Observium 开源网络监控工具: 无法在Windows系统上运行,但有着出色的用户界面][7] + * [Zabbix 提供有效的网络监控][8] @@ -71,7 +71,7 @@ via: https://www.networkworld.com/article/3386376/when-wi-fi-is-mission-critical 作者:[Zeus Kerravala][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[chenmu-kk](https://github.com/chenmu-kk) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 002bf67d496a8e103aec2b48800d2d5a07a756bd Mon Sep 17 00:00:00 2001 From: chenmu-kk <53132802+chenmu-kk@users.noreply.github.com> Date: Sat, 7 Nov 2020 18:42:52 +0800 Subject: [PATCH 097/130] Update and rename sources/tech/20190402 When Wi-Fi is mission-critical, a mixed-channel architecture is the best option.md to translated/tech/20190402 When Wi-Fi is mission-critical, a mixed-channel architecture is the best option.md --- ...itical, a mixed-channel architecture is the best option.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {sources => translated}/tech/20190402 When Wi-Fi is mission-critical, a mixed-channel architecture is the best option.md (94%) diff --git a/sources/tech/20190402 When Wi-Fi is mission-critical, a mixed-channel architecture is the best option.md b/translated/tech/20190402 When Wi-Fi is mission-critical, a mixed-channel architecture is the best option.md similarity index 94% rename from sources/tech/20190402 When Wi-Fi is mission-critical, a mixed-channel architecture is the best option.md rename to translated/tech/20190402 When Wi-Fi is mission-critical, a mixed-channel architecture is the best option.md index 6eb1516fa4..4bdbdc4c27 100644 --- a/sources/tech/20190402 When Wi-Fi is mission-critical, a mixed-channel architecture is the best option.md +++ b/translated/tech/20190402 When Wi-Fi is mission-critical, a mixed-channel architecture is the best option.md @@ -14,7 +14,7 @@ ![Getty Images][1] -我曾与许多实施数字项目的公司合作,结果却发现它们失败了。想法是正确的,施行是健全的,市场机遇也在那里。薄弱的环节在哪里呢?是Wi-Fi网络。 +我曾与许多实施数字项目的公司合作,结果却发现它们失败了。正确的想法,健全地施行,现存地市场机遇。哪里是薄弱的环节?是Wi-Fi网络。 例如,一家大型医院希望通过将遥测信息发送到移动设备,来提高临床医生对患者警报的响应时间。如果没有这个系统,护士了解病人警报的唯一途径就是通过声音警报。在所有嘈杂的背景音中,通常很难分辨噪音来自哪里。问题是这家医院中的Wi-Fi网络已经很多年未升级了,这导致信息传递严重延迟(通常需要4~5分钟)。过长的信息传递导致人们对该系统失去信心,因此许多临床医生停止使用该系统,转而使用手动警报。最终,人们认为这个项目是失败的。 @@ -30,7 +30,7 @@ Wi-Fi的问题在于它本身就很脆弱。我相信每个阅读这篇文章的 对于网络技术人员的问题是如何到达一个Wi-Fi一直不间断保持100%的地方。有人说只要加强现存的网络可以做到,这也许可以,但在某些情况下,Wi-Fi的类型可能并不合适。 -最常见的Wi-Fi部署类型是多信道,也称为微蜂窝,每个客户端通过无线信道连接到接入点(AP)。高质量的通话体验基于两点:良好的信号强度和最小的干扰。有几个因素会导致干扰,例如接入点太靠近,布局问题或者来自其他设备的干扰。为了最大程度地减少干扰,企业需要在现场调查中投入大量的时间和资金来规划最佳的信道地图,但即使这些做得很好,Wi-Fi故障仍然可能发生。 [site surveys to plan the optimal channel map][2], but even with that’s done well, Wi-Fi glitches can still happen. +最常见的Wi-Fi部署类型是多信道,也称为微蜂窝,每个客户端通过无线信道连接到接入点(AP)。高质量的通话体验基于两点:良好的信号强度和最小的干扰。有几个因素会导致干扰,例如接入点太靠近,布局问题或者来自其他设备的干扰。为了最大程度地减少干扰,企业需要投入大量的时间和资金在 [现场调查中规划最佳的信道地图][2],但即使这些做得很好,Wi-Fi故障仍然可能发生。 **[[Take this mobile device management course from PluralSight and learn how to secure devices in your company without degrading the user experience.][4] ]** From fb11fc2d1f885b88838beb159b7c1c163955d2d9 Mon Sep 17 00:00:00 2001 From: chenmu-kk <53132802+chenmu-kk@users.noreply.github.com> Date: Sat, 7 Nov 2020 18:44:33 +0800 Subject: [PATCH 098/130] Update 20190402 When Wi-Fi is mission-critical, a mixed-channel architecture is the best option.md --- ...critical, a mixed-channel architecture is the best option.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/20190402 When Wi-Fi is mission-critical, a mixed-channel architecture is the best option.md b/translated/tech/20190402 When Wi-Fi is mission-critical, a mixed-channel architecture is the best option.md index 4bdbdc4c27..e0133ea9e9 100644 --- a/translated/tech/20190402 When Wi-Fi is mission-critical, a mixed-channel architecture is the best option.md +++ b/translated/tech/20190402 When Wi-Fi is mission-critical, a mixed-channel architecture is the best option.md @@ -14,7 +14,7 @@ ![Getty Images][1] -我曾与许多实施数字项目的公司合作,结果却发现它们失败了。正确的想法,健全地施行,现存地市场机遇。哪里是薄弱的环节?是Wi-Fi网络。 +我曾与许多实施数字项目的公司合作,结果却发现它们失败了。正确的想法,健全地施行,现存的市场机遇。哪里是薄弱的环节?是Wi-Fi网络。 例如,一家大型医院希望通过将遥测信息发送到移动设备,来提高临床医生对患者警报的响应时间。如果没有这个系统,护士了解病人警报的唯一途径就是通过声音警报。在所有嘈杂的背景音中,通常很难分辨噪音来自哪里。问题是这家医院中的Wi-Fi网络已经很多年未升级了,这导致信息传递严重延迟(通常需要4~5分钟)。过长的信息传递导致人们对该系统失去信心,因此许多临床医生停止使用该系统,转而使用手动警报。最终,人们认为这个项目是失败的。 From cf20d763ceeae41efd0040969cdb809879069f17 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 8 Nov 2020 08:07:53 +0800 Subject: [PATCH 099/130] PRF @geekpi --- ...028 What-s new in Fedora 33 Workstation.md | 26 +++++++------------ 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/translated/tech/20201028 What-s new in Fedora 33 Workstation.md b/translated/tech/20201028 What-s new in Fedora 33 Workstation.md index a181148cac..a8397973c4 100644 --- a/translated/tech/20201028 What-s new in Fedora 33 Workstation.md +++ b/translated/tech/20201028 What-s new in Fedora 33 Workstation.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (What’s new in Fedora 33 Workstation) @@ -12,7 +12,7 @@ Fedora 33 Workstation 的新功能 ![][1] -Fedora 33 Workstation 是我们免费的、领先的操作系统的[最新版本][2]。你现在就可以从[官方网站][3]下载它。Fedora 33 Workstation 中有一些新的和值得注意的变化。请阅读更多如下细节。 +Fedora 33 Workstation 是我们这个免费的、领先的操作系统的[最新版本][2]。你现在就可以从[官方网站][3]下载它。Fedora 33 Workstation 中有一些新的和值得注意的变化。请阅读如下更多细节。 ### GNOME 3.38 @@ -20,13 +20,13 @@ Fedora 33 Workstation 为各类用户提供了最新版本的 GNOME 桌面环境 #### 一个新的 GNOME Tour 应用 -现在,新用户会看到一个“新的 _Tour_ 应用,高亮显示了桌面的主要功能,并为第一次使用 GNOME 的用户提供一个很好的欢迎”。 +现在,新用户会看到一个“新的 Tour 应用,重点展示了桌面的主要功能,并为第一次使用 GNOME 的用户提供一个很好的欢迎页”。 ![The new GNOME Tour application in Fedora 33][4] #### 拖动重排序应用 -GNOME 3.38 用一个单一的可定制和一致的视图取代了之前分开的常用和所有应用视图,这允许你重新排列应用并将它们组织到自定义文件夹中。只需点击并拖动即可移动应用。 +GNOME 3.38 用一个单一的可定制的、一致的视图取代了之前分开的“常用”和“所有”应用视图,这允许你重新排列应用并将它们组织到自定义文件夹中。只需点击并拖动即可移动应用。 ![GNOME 3.38 Drag to Reorder][5] @@ -36,23 +36,17 @@ GNOME Shell 中的屏幕录制基础架构已被改进,以利用 PipeWire 和 GNOME 3.38 还提供了许多额外的功能和改进。查看 [GNOME 3.38 发行说明][6]以获得更多信息。 -* * * - -### B-tree 文件系统 +#### B-tree 文件系统 正如[之前宣布的][7],新安装的 Fedora 33 将默认使用 [Btrfs][8]。每一个新的内核版本都会为 Btrfs 增加一些特性和增强功能。[变更日志][9]有一个完整的总结,它介绍了每个新内核版本给 Btrfs 带来的功能。 -* * * +#### Swap on ZRAM -### Swap on ZRAM +Anaconda 和 Fedora IoT 多年来一直默认使用 swap-on-zram。在 Fedora 33 中,将默认启用 swap-on-zram,而不是交换分区。查看 [Fedora wiki 页面][10]了解更多关于 swap-on-zram 的细节。 -Anaconda 和 Fedora IoT 多年来一直默认使用 swap-on-zram。在 Fedora 33 中,swap-on-zram 将被默认启用,而不是 swap 分区。查看 [Fedora wiki 页面][10]了解更多关于 swap-on-zram 的细节。 +#### 默认使用 Nano -* * * - -### 默认使用 Nano - -新的 Fedora 33 将把 EDITOR 环境变量默认设置为 [_nano_ ][11]。这个变化影响了一些命令行工具,当它们需要用户输入时,会打开一个文本编辑器。在早期的版本中,这个环境变量的默认值并没有被指定,而是由各个应用程序来选择一个默认的编辑器。通常情况下,应用程序会使用 [_vi_][12]作为它们的默认编辑器,因为它是一个小应用,通常在大多数 Unix/Linux 操作系统的基础安装中都可以使用。由于 Fedora 33 的基本安装中包含了 nano,而且 nano 对于初学者来说更加直观,所以 Fedora 33 将默认使用 nano。当然,想要使用 vi 的用户可以在自己的环境中覆盖 EDITOR 变量的值。详见[Fedora修改请求][11]获取更多信息。 +新的 Fedora 33 将把 `EDITOR` 环境变量默认设置为 [nano][11]。这个变化影响了一些命令行工具,当它们需要用户输入时,会打开一个文本编辑器。在早期的版本中,这个环境变量的默认值并没有被指定,而是由各个应用程序来选择一个默认的编辑器。通常情况下,应用程序会使用 [vi][12] 作为它们的默认编辑器,因为它是一个小应用,通常在大多数 Unix/Linux 操作系统的基础安装中都可以使用。由于 Fedora 33 的基本安装中包含了 nano,而且 nano 对于初学者来说更加直观,所以 Fedora 33 将默认使用 nano。当然,想要使用 vi 的用户可以在自己的环境中覆盖 `EDITOR` 变量的值。详见[Fedora 修改请求][11]获取更多信息。 -------------------------------------------------------------------------------- @@ -61,7 +55,7 @@ via: https://fedoramagazine.org/whats-new-fedora-33-workstation/ 作者:[Gregory Bartholomew][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/) 荣誉推出 From 8ad8c757cf5456739db7ee7c839a82da886321a5 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 8 Nov 2020 08:08:24 +0800 Subject: [PATCH 100/130] PUB @geekpi https://linux.cn/article-12801-1.html --- .../20201028 What-s new in Fedora 33 Workstation.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20201028 What-s new in Fedora 33 Workstation.md (98%) diff --git a/translated/tech/20201028 What-s new in Fedora 33 Workstation.md b/published/20201028 What-s new in Fedora 33 Workstation.md similarity index 98% rename from translated/tech/20201028 What-s new in Fedora 33 Workstation.md rename to published/20201028 What-s new in Fedora 33 Workstation.md index a8397973c4..c4027535d2 100644 --- a/translated/tech/20201028 What-s new in Fedora 33 Workstation.md +++ b/published/20201028 What-s new in Fedora 33 Workstation.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12801-1.html) [#]: subject: (What’s new in Fedora 33 Workstation) [#]: via: (https://fedoramagazine.org/whats-new-fedora-33-workstation/) [#]: author: (Gregory Bartholomew https://fedoramagazine.org/author/glb/) From 433c096e100303a2759607298633f4513a76d433 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 8 Nov 2020 09:28:52 +0800 Subject: [PATCH 101/130] APL --- ...3 Linux Jargon Buster- What are GUI, CLI and TUI in Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20201103 Linux Jargon Buster- What are GUI, CLI and TUI in Linux.md b/sources/tech/20201103 Linux Jargon Buster- What are GUI, CLI and TUI in Linux.md index cc4b54ff55..bdef06b9d4 100644 --- a/sources/tech/20201103 Linux Jargon Buster- What are GUI, CLI and TUI in Linux.md +++ b/sources/tech/20201103 Linux Jargon Buster- What are GUI, CLI and TUI in Linux.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From bee0aae904b1208f4bfc3384ee9272fa2cf70693 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 8 Nov 2020 10:08:30 +0800 Subject: [PATCH 102/130] TSL&PRF @wxy --- ...ter- What are GUI, CLI and TUI in Linux.md | 102 ------------------ ...ter- What are GUI, CLI and TUI in Linux.md | 102 ++++++++++++++++++ 2 files changed, 102 insertions(+), 102 deletions(-) delete mode 100644 sources/tech/20201103 Linux Jargon Buster- What are GUI, CLI and TUI in Linux.md create mode 100644 translated/tech/20201103 Linux Jargon Buster- What are GUI, CLI and TUI in Linux.md diff --git a/sources/tech/20201103 Linux Jargon Buster- What are GUI, CLI and TUI in Linux.md b/sources/tech/20201103 Linux Jargon Buster- What are GUI, CLI and TUI in Linux.md deleted file mode 100644 index bdef06b9d4..0000000000 --- a/sources/tech/20201103 Linux Jargon Buster- What are GUI, CLI and TUI in Linux.md +++ /dev/null @@ -1,102 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Linux Jargon Buster: What are GUI, CLI and TUI in Linux?) -[#]: via: (https://itsfoss.com/gui-cli-tui/) -[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) - -Linux Jargon Buster: What are GUI, CLI and TUI in Linux? -====== - -When you start using Linux and follow Linux-based websites and forums, you’ll often come across terms like GUI, CLI and sometimes TUI. - -This chapter of Linux Jargon Buster briefly explains these terms so that you as a (new) Linux user can understand the context better when these acronyms are used. - -To be honest, the terms like GUI, CLI or TUI are not exclusive to Linux. These are generic computing terms and you’ll find them used in non-Linux discussions as well. - -### GUI – Graphical User Interface - -Probably the most common term you’ll across on It’s FOSS. It’s because we focus on desktop Linux users and try to cover the easy to use graphical methods and applications. - -A GUI application or graphical application is basically anything that you can interact with your mouse, touchpad or touch screen. You have icons and other visual notions and you can use your mouse pointer to access the functionalities. - -![GIMP: A GUI app for photo editing][1] - -On Linux, a [desktop environment][2] provides the graphical interface for you to interact with your system. Then you can use GUI applications like GIMP, VLC Firefox, LibreOffice, file manager etc for various tasks. - -GUI has made computing easier for the common users otherwise it would have remained a geek-only zone. - -### CLI – Command Line Interface - -CLI is basically a command line program that accepts inputs to perform a certain function. Basically, any application that you can use via commands in the terminal falls into this category. - -![apt-cache is a CLI tool for interacting with APT cache on Debian-based systems][3] - -Early computers didn’t have mouse to interact with the operating system. You had to do interact with the machine using commands. - -If you think that’s difficult you should know that the earlier computers didn’t even have a screen to see what is being typed on, they had actual paper printer to see their typed commands. I have never used such a computer or seen in my real life. The closest thing I used was the microcontroller kits during my studies. - -![Ken Thompson And Dennis Ritchie Working on developing UNIX operating system on PDP 11 computer. | Image Credit][4] - -Is CLI relevant these days? Absolutely. Commands always have their benefit specially when you are dealing with the core functioning and configuration of the operating system like setting up firewall, managing network or even [package management][5]. - -You may have a GUI-based application to do the same task but commands give you more granular access to those features. In any case, you’ll find that GUI application also interact with the operating system with commands (used in their code). - -![Handbrake GUI app uses FFMPEG CLI tool underneath][6] - -Many popular GUI applications are often based on CLI tools. Take [Handbrake][7] for example. It’s a popular open source media converter and it uses the [FFMPEG command][8] line tool underneath. - -Quite evidently, using command line tools is not as easy as the graphical ones. Don’t worry. Unless you have specific needs, you should be able to use your Linux system graphically. However, knowing the basic Linux commands helps a great deal. - -### TUI – Terminal User Interface (also known as Text-based User Interface) - -This is the most uncommon term of the three. TUI is basically part GUI and part CLI. Confused? Let me explain that for you. - -You already know that early computers used CLI. Before the advent of the actual GUI, the text-based user interface provided a very basic kind of graphical interaction in the terminal. You have more visuals and could use mouse and keyboard to interact with the application. - -![nnn File Browser in terminal][9] - -TUI stands for text-based user interface or terminal user interface. Text-based because primarily, you have a bunch of text on the screen and terminal user interface because they are used only in the terminal. - -TUI applications are not that common but you still have a bunch of them. [Terminal based web browsers][10] are good example of TUI programs. [Terminal-based games][11] also fell in this category. - -![CMUS is terminal based music player][12] - -You may come across TUI when you are [installing multimedia codecs in Ubuntu][13] where you have to accept EULA or make a choice. - -TUI apps are not as user-friendly as GUI applications, and they often have a learning curve involved but they are a bit easier to use than the command line tools. - -**In the end…** - -TUI apps are often also considered as CLI applications because they are restricted to the terminal. In my opinion, it’s up to you if you consider them different from CLI. - -I hope you liked this part of Linux Jargon Buster. If you have any suggestions for topics in this series, please let me know in the comments and I’ll try to cover them in the future. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/gui-cli-tui/ - -作者:[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://i1.wp.com/itsfoss.com/wp-content/uploads/2018/04/gimp-2-10-interface.jpg?resize=800%2C450&ssl=1 -[2]: https://itsfoss.com/what-is-desktop-environment/ -[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/10/apt-cache-search-names-only.png?resize=759%2C209&ssl=1 -[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/11/Ken_Thompson_and_Dennis_Ritchie_at_PDP-11.jpg?resize=800%2C641&ssl=1 -[5]: https://itsfoss.com/package-manager/ -[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/11/handbrake.png?resize=800%2C537&ssl=1 -[7]: https://itsfoss.com/handbrake/ -[8]: https://itsfoss.com/ffmpeg/ -[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/10/nnn-file-browser.jpg?resize=800%2C597&ssl=1 -[10]: https://itsfoss.com/terminal-web-browsers/ -[11]: https://itsfoss.com/best-command-line-games-linux/ -[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2017/07/cmus-interface.png?resize=734%2C436&ssl=1 -[13]: https://itsfoss.com/install-media-codecs-ubuntu/ diff --git a/translated/tech/20201103 Linux Jargon Buster- What are GUI, CLI and TUI in Linux.md b/translated/tech/20201103 Linux Jargon Buster- What are GUI, CLI and TUI in Linux.md new file mode 100644 index 0000000000..50fade6de8 --- /dev/null +++ b/translated/tech/20201103 Linux Jargon Buster- What are GUI, CLI and TUI in Linux.md @@ -0,0 +1,102 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: (wxy) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Linux Jargon Buster: What are GUI, CLI and TUI in Linux?) +[#]: via: (https://itsfoss.com/gui-cli-tui/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) + +Linux 黑话解释:什么是 Linux 中的 GUI、CLI 和 TUI? +====== + +当你开始使用 Linux 并关注关于 Linux 的网站和论坛时,你会经常遇到诸如 GUI、CLI 等术语,有时还会遇到 TUI。 + +这一章的 Linux 黑话解释简要解释了这些术语,以便你作为一个(新的)Linux 用户在使用这些缩写词时能够更好地理解上下文。 + +说实话,像 GUI、CLI 或 TUI 这样的术语并不是 Linux 的专属术语。这些都是通用的计算术语,你会发现在非 Linux 的讨论中也会用到它们。 + +### GUI - 图形用户界面Graphical User Interface + +这可能是你在这里最常遇到的词汇。这是因为我们专注于桌面 Linux 用户,并试图涵盖易于使用的图形化方法和应用程序。 + +GUI 应用程序(或图形应用程序)基本上是指任何可以与你的鼠标、触摸板或触摸屏交互的东西。有了图标和其他视觉概念,你可以使用鼠标指针来访问功能。 + +![GIMP:一个用于照片编辑的GUI应用程序][1] + +在 Linux 上,[桌面环境][2]为你提供了与系统交互的图形界面,然后,你可以使用 GUI 应用程序,如 GIMP,VLC、Firefox、LibreOffice、文件管理器等来完成各种任务。 + +GUI 使普通用户的计算机使用变得更加容易,否则它将仍然是一个极客专用区。 + +### CLI - 命令行界面Command Line Interface + +CLI 基本上是一个接受输入来执行某种功能的命令行程序。基本上,任何可以在终端中通过命令使用的应用程序都属于这一类。 + +![apt-cache 是一个 CLI 工具,用于在基于 Debian 的系统上与 APT 缓存交互][3] + +早期的电脑与操作系统交互没有鼠标,你必须使用命令与机器互动。 + +如果你认为这都算困难,那你应该知道,早期的计算机甚至没有一个屏幕可以看到正在输入的东西,他们用实体的纸质打印机看到他们的输入命令。我从来没有用过这样的电脑,也没有在现实生活中看到过。我用过的最接近的东西是学习期间的单片机套件。 + +![肯•汤普森和丹尼斯•里奇在 PDP11 电脑上开发 UNIX 操作系统][4] + +现在的 CLI 还有用吗?当然有。命令总是有它的好处,特别是当你处理操作系统的核心功能和配置时,比如设置防火墙、管理网络甚至[包管理][5]。 + +你可能会有一个基于 GUI 的应用程序来完成同样的任务,但命令可以让你更精细地访问这些功能。在一些情况下,你会发现 GUI 应用程序也会用命令(在它们的代码中使用)与操作系统交互。 + +![Handbrake GUI 应用程序在底层使用 FFMPEG CLI 工具][6] + +许多流行的 GUI 应用程序往往是基于 CLI 工具的。以[Handbrake][7] 为例。这是一个流行的开源媒体转换器,它底层使用的是 [FFMPEG 命令行][8]工具。 + +很明显,使用命令行工具没有图形工具那么简单。不要担心。除非你有特殊需要,否则你应该可以用图形化的方式使用 Linux 系统。然而,了解基本的 Linux 命令会有很大的帮助。 + +### TUI - 终端用户界面Terminal User Interface(也称为基于文本的用户界面Text-based User Interface) + +这是三者中最不常见的名词。TUI 基本上部分是 GUI,部分是 CLI。糊涂了吗?让我为你解释一下。 + +你已经知道,早期的计算机使用 CLI。在实际的 GUI 出现之前,基于文本的用户界面在终端中提供了一种非常基本的图形交互。你会有更多的视觉效果,也可以使用鼠标和键盘与应用程序进行交互。 + +![终端中的 nnn 文件浏览器][9] + +TUI 是基于文本的用户界面或终端用户界面的缩写。“基于文本”这个说法主要是因为你在屏幕上有一堆文本,而“终端用户界面”的说法是因为它们只在终端中使用。 + +TUI 的应用虽然不是那么常见,但你还是有一些的。[基于终端的 Web 浏览器][10]是 TUI 程序的好例子。[基于终端的游戏][11]也属于这一类。 + +![CMUS 是基于终端的音乐播放器][12] + +当你在 [Ubuntu 中安装多媒体编解码器][13]时,你可能会遇到 TUI,你必须接受 EULA 或做出选择。 + +TUI 应用程序不像 GUI 应用程序那样用户友好,它们经常会有学习曲线,但它们比命令行工具更容易使用一些。 + +### 最后…… + +TUI 应用程序通常也被认为是 CLI 应用程序,因为它们被限制在终端上。在我看来,你是否认为它们与 CLI 不同,这取决于你。 + +我希望你喜欢这篇 Linux 黑话解释。如果你对这个系列的主题有什么建议,请在评论中告诉我,我将在以后尽量涵盖它们。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/gui-cli-tui/ + +作者:[Abhishek Prakash][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2018/04/gimp-2-10-interface.jpg?resize=800%2C450&ssl=1 +[2]: https://itsfoss.com/what-is-desktop-environment/ +[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/10/apt-cache-search-names-only.png?resize=759%2C209&ssl=1 +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/11/Ken_Thompson_and_Dennis_Ritchie_at_PDP-11.jpg?resize=800%2C641&ssl=1 +[5]: https://itsfoss.com/package-manager/ +[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/11/handbrake.png?resize=800%2C537&ssl=1 +[7]: https://itsfoss.com/handbrake/ +[8]: https://itsfoss.com/ffmpeg/ +[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/10/nnn-file-browser.jpg?resize=800%2C597&ssl=1 +[10]: https://itsfoss.com/terminal-web-browsers/ +[11]: https://itsfoss.com/best-command-line-games-linux/ +[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2017/07/cmus-interface.png?resize=734%2C436&ssl=1 +[13]: https://itsfoss.com/install-media-codecs-ubuntu/ From 0e6a7022c7947ab13158ca26fdbe4143d26ee96d Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 8 Nov 2020 10:25:56 +0800 Subject: [PATCH 103/130] APL --- ...201105 5 surprising ways I use Jupyter to improve my life.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20201105 5 surprising ways I use Jupyter to improve my life.md b/sources/tech/20201105 5 surprising ways I use Jupyter to improve my life.md index 3fa9083248..d694154b5b 100644 --- a/sources/tech/20201105 5 surprising ways I use Jupyter to improve my life.md +++ b/sources/tech/20201105 5 surprising ways I use Jupyter to improve my life.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 3595b49985f6cf595f2686b8aaca68e8e54223eb Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 8 Nov 2020 11:04:25 +0800 Subject: [PATCH 104/130] TSL&PRF @wxy --- ...g ways I use Jupyter to improve my life.md | 88 ------------------ ...g ways I use Jupyter to improve my life.md | 89 +++++++++++++++++++ 2 files changed, 89 insertions(+), 88 deletions(-) delete mode 100644 sources/tech/20201105 5 surprising ways I use Jupyter to improve my life.md create mode 100644 translated/tech/20201105 5 surprising ways I use Jupyter to improve my life.md diff --git a/sources/tech/20201105 5 surprising ways I use Jupyter to improve my life.md b/sources/tech/20201105 5 surprising ways I use Jupyter to improve my life.md deleted file mode 100644 index d694154b5b..0000000000 --- a/sources/tech/20201105 5 surprising ways I use Jupyter to improve my life.md +++ /dev/null @@ -1,88 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (5 surprising ways I use Jupyter to improve my life) -[#]: via: (https://opensource.com/article/20/11/surprising-jupyter) -[#]: author: (Moshe Zadka https://opensource.com/users/moshez) - -5 surprising ways I use Jupyter to improve my life -====== -Jupyter is much more than a data-analysis tool. Learn about some of the -most creative ways you can use the Python-based software. -![Computer laptop in space][1] - -The [Jupyter][2] project offers interactive ways to write software with technology like JupyterLab and Jupyter Notebook. This software is commonly used for data analysis, but what you might not know (and the Jupyter community didn't expect) is how many things you can do with it. - -Here are my top five unexpected and creative ways to use Jupyter. - -### 1\. Manipulate images - -There are great open source tools out there for [image editing and manipulation][3]—from those that rival Photoshop to the experimental work of [Glimpse][4]. Even with all those options, sometimes I just don't want to leave the world of [Python][5]. - -Luckily, Jupyter is a great option for doing light image manipulation. Taking advantage of the fact that Jupyter directly shows [Pillow][6] objects as images lets you experiment with pictures as much as you want. I even used it to [make a coloring book page][7] for my child. - -### 2\. Make an SSH jumpbox remote control - -Since JupyterLab lets you [upload and download][8] files, [edit][9] files, and even [run terminals][10], it has all the pieces necessary to make an SSH jumpbox environment. - -With some SSH-forwarding magic, you can make Jupyter your [remote console][11] on the other side of a firewall. - -### 3\. Develop web applications - -One of my favorite ways to use Jupyter is for an unexpected kind of software development. I [gave a talk][12] where I developed a [web application in real time][13] using a Jupyter notebook. The talk concluded with a simple form that is XSS- and CSS-safe and included some light server-side computation. - -A day-to-day Jupyter user may not expect it to be a great web development environment, but it's a remarkably powerful one. - -### 4\. Pull reports from your favorite services - -Data analysis in JupyterLab is a common use, but what about self-improvement analysis? - -You can use Jupyter to [analyze your calendar][14]. If your favorite services allow API export, or even let you export a CSV, you can correlate those against your calendar. If you find out that you were posting on social media when your calendar said you were supposed to be in a meeting with your manager, however, Jupyter can't do much to help you! - -### 5\. Develop games - -My favorite way to expand the expectations of what I can accomplish in a Jupyter Notebook is by building a game with my child. I wrote about this previously, with a step-by-step tutorial on [writing a game][15] using [PursuedPyBear][16] and Jupyter. - -This iterative approach to game development is especially helpful when trying to figure out game mechanics. It's a game-changer (sorry, I had to) to be able to change the rules mid-game. - -You can even use IPywidgets to modify the numeric parameters, as [this video][17] shows. - -### [Download the eBook][18] - -JupyterLab and Jupyter Notebooks offer an incredible environment for experimenting. [Download this guide][18] that contains tutorials on the surprising ways to use Jupyter.  - -How are you using it in creative ways? Share your favorites in the comments below. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/11/surprising-jupyter - -作者:[Moshe Zadka][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/moshez -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/computer_space_graphic_cosmic.png?itok=wu493YbB (Computer laptop in space) -[2]: https://jupyter.org/ -[3]: https://opensource.com/life/12/6/design-without-debt-five-tools-for-designers -[4]: https://glimpse-editor.github.io/ -[5]: https://opensource.com/resources/python -[6]: https://pillow.readthedocs.io/en/stable/index.html -[7]: https://opensource.com/article/20/8/edit-images-python -[8]: https://jupyterlab.readthedocs.io/en/stable/user/files.html#uploading-and-downloading -[9]: https://jupyterlab.readthedocs.io/en/stable/user/files.html#opening-files -[10]: https://jupyterlab.readthedocs.io/en/stable/user/terminal.html -[11]: https://opensource.com/article/20/8/remote-management-jupyter -[12]: https://opensource.com/article/20/8/write-talk-using-jupyter-notebooks -[13]: https://github.com/moshez/interactive-web-development/blob/e31ae72d8cab7637d18bc734c4e8afc10c60251f/interactive-web-development.ipynb -[14]: https://opensource.com/article/20/9/analyze-your-life-jupyter -[15]: https://opensource.com/article/20/5/python-games -[16]: https://ppb.dev/ -[17]: https://www.youtube.com/watch?v=JaTf_ZT7tE8 -[18]: https://opensource.com/downloads/jupyter-guide diff --git a/translated/tech/20201105 5 surprising ways I use Jupyter to improve my life.md b/translated/tech/20201105 5 surprising ways I use Jupyter to improve my life.md new file mode 100644 index 0000000000..15ba339821 --- /dev/null +++ b/translated/tech/20201105 5 surprising ways I use Jupyter to improve my life.md @@ -0,0 +1,89 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: (wxy) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (5 surprising ways I use Jupyter to improve my life) +[#]: via: (https://opensource.com/article/20/11/surprising-jupyter) +[#]: author: (Moshe Zadka https://opensource.com/users/moshez) + +5 种令人惊讶的使用 Jupyter 的方式 +====== + +> Jupyter 不仅仅是一个数据分析工具,让我们看看如何以最有创意的方式使用这个基于 Python 的软件。 + +!["太空中的电脑笔记本"[1] + +[Jupyter][2] 项目提供了用 JupyterLab 和 Jupyter Notebook 等交互式编写软件的技术方式。这个软件通常用于数据分析,但你可能不知道(Jupyter 社区也没有想到),你可以用它做多少事情。 + +以下是我使用 Jupyter 的五大意想不到的创造性方法。 + +### 1、处理图像 + +在[图像编辑和处理][3]方面,有很多很好的开源工具 —— 从那些可以与 Photoshop 媲美的工具到实验性的 [Glimpse][4]。但即使有这么多选择,有时我还是不想离开 [Python][5] 的世界。 + +幸运的是,Jupyter 是一个做轻量级图像处理的好选择。利用 Jupyter 直接将 [Pillow][6] 对象显示为图像的优势,让你可以尽情地对图片进行实验。我甚至还用它给孩子[做了一个涂色画][7]。 + +### 2、做一个 SSH 跳板遥控器 + +由于 JupyterLab 可以让你[上传和下载][8]文件、[编辑][9]文件,甚至[运行终端][10],所以它拥有制作 SSH 跳板环境所需的所有部件。 + +通过一些 SSH 转发魔法,你可以让 Jupyter 成为防火墙另一边的[远程控制台][11]。 + +### 3、开发 Web 应用程序 + +我最喜欢的使用 Jupyter 的方式之一是用于一种意想不到的软件开发。我[做了一次演讲][12],在演讲中,我使用 Jupyter Notebook 实时开发了一个 [Web 应用][13]。讲演的最后是一个简单的表单,它是 XSS 和 CSS 安全的,并包括一些轻量级的服务器端计算。 + +一个日常的 Jupyter 用户可能不会期望它是一个最棒的 Web 开发环境,但它是一个非常强大的环境。 + +### 4、从你喜欢的服务中提取报告 + +JupyterLab 中的数据分析是一种常见的用法,但自我提升分析self-improvement analysis呢? + +你可以使用 Jupyter 来[分析你的日历][14]。如果你最喜欢的服务允许 API 导出,甚至可以让你导出一个 CSV,你可以将这些与你的日历进行关联。如果你发现你在社交媒体上发帖的时候,你的日历上写着你应该和你的经理开会,那 Jupyter 也救不了你! + +### 5、开发游戏 + +对于扩大对 Jupyter Notebook 的期望值,我最喜欢的方式是和孩子一起建立一个游戏。我之前写过这方面的文章,有一个使用 [PursuedPyBear][16] 和 Jupyter [编写游戏][15]的分步教程。 + +在试图弄清游戏机制时,这种迭代式的游戏开发方法特别有用。能够在游戏中途改变规则(对不起,我必须得这样做)是一个改变游戏规则的方法。 + +你甚至可以使用 IPywidgets 来修改数字参数,就像[这个视频][17]所示。 + +### 下载电子书 + +JupyterLab 和 Jupyter Notebooks 提供了一个不可思议的实验环境。[下载这本指南][18],其中包含了以令人吃惊的方式使用 Jupyter 的教程。  + +你是如何以创造性的方式使用它的?在下面的评论中分享你的最爱。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/11/surprising-jupyter + +作者:[Moshe Zadka][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/moshez +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/computer_space_graphic_cosmic.png?itok=wu493YbB (Computer laptop in space) +[2]: https://jupyter.org/ +[3]: https://opensource.com/life/12/6/design-without-debt-five-tools-for-designers +[4]: https://glimpse-editor.github.io/ +[5]: https://opensource.com/resources/python +[6]: https://pillow.readthedocs.io/en/stable/index.html +[7]: https://opensource.com/article/20/8/edit-images-python +[8]: https://jupyterlab.readthedocs.io/en/stable/user/files.html#uploading-and-downloading +[9]: https://jupyterlab.readthedocs.io/en/stable/user/files.html#opening-files +[10]: https://jupyterlab.readthedocs.io/en/stable/user/terminal.html +[11]: https://opensource.com/article/20/8/remote-management-jupyter +[12]: https://opensource.com/article/20/8/write-talk-using-jupyter-notebooks +[13]: https://github.com/moshez/interactive-web-development/blob/e31ae72d8cab7637d18bc734c4e8afc10c60251f/interactive-web-development.ipynb +[14]: https://opensource.com/article/20/9/analyze-your-life-jupyter +[15]: https://opensource.com/article/20/5/python-games +[16]: https://ppb.dev/ +[17]: https://www.youtube.com/watch?v=JaTf_ZT7tE8 +[18]: https://opensource.com/downloads/jupyter-guide From 39fa1bbedaedfb67a935a20831ffbbd7a8fe39b4 Mon Sep 17 00:00:00 2001 From: "Xiaobin.Liu" Date: Sun, 8 Nov 2020 15:02:35 +0800 Subject: [PATCH 105/130] TSL --- ...with this MariaDB and MySQL cheat sheet.md | 389 ------------------ ...with this MariaDB and MySQL cheat sheet.md | 389 ++++++++++++++++++ 2 files changed, 389 insertions(+), 389 deletions(-) delete mode 100644 sources/tech/20201029 Improve your database knowledge with this MariaDB and MySQL cheat sheet.md create mode 100644 translated/tech/20201029 Improve your database knowledge with this MariaDB and MySQL cheat sheet.md diff --git a/sources/tech/20201029 Improve your database knowledge with this MariaDB and MySQL cheat sheet.md b/sources/tech/20201029 Improve your database knowledge with this MariaDB and MySQL cheat sheet.md deleted file mode 100644 index b68e42e455..0000000000 --- a/sources/tech/20201029 Improve your database knowledge with this MariaDB and MySQL cheat sheet.md +++ /dev/null @@ -1,389 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (lxbwolf) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Improve your database knowledge with this MariaDB and MySQL cheat sheet) -[#]: via: (https://opensource.com/article/20/10/mariadb-mysql-cheat-sheet) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -Improve your database knowledge with this MariaDB and MySQL cheat sheet -====== -Read this article and download our free cheat sheet to get started using -an open source database. -![Cheat Sheet cover image][1] - -When you're writing an application or configuring one for a server, eventually, you will need to store persistent information. Sometimes, a configuration file, such as an INI or [YAML][2] file will do. Other times, a custom file format designed in XML or JSON or similar is better. - -But sometimes you need something that can validate input, search through information quickly, make connections between related data, and generally handle your users' work adeptly. That's what a database is designed to do, and [MariaDB][3] (a fork of [MySQL][4] by some of its original developers) is a great option. I use MariaDB in this article, but the information applies equally to MySQL. - -It's common to interact with a database through programming languages. For this reason, there are [SQL][5] libraries for Java, Python, Lua, PHP, Ruby, C++, and many others. However, before using these libraries, it helps to have an understanding of what's happening with the database engine and why your choice of database is significant. This article introduces MariaDB and the `mysql` command to familiarize you with the basics of how a database handles data. - -If you don't have MariaDB yet, follow the instructions in my article about [installing MariaDB on Linux][6]. If you're not on Linux, use the instructions provided on the MariaDB [download page][7]. - -### Interact with MariaDB - -You can interact with MariaDB using the `mysql` command. First, verify that your server is up and running using the `ping` subcommand, entering your MariaDB password when prompted: - - -``` -$ mysqladmin -u root -p ping -Enter password: -mysqld is alive -``` - -To make exploring SQL easy, open an interactive MariaDB session: - - -``` -$ mysql -u root -p -Enter password: -Welcome to the MariaDB monitor. -Commands end with ; or \g. -[...] -Type 'help;' or '\h' for help. -Type '\c' to clear the current input statement. - -MariaDB [(none)]> -``` - -This places you in a MariaDB subshell, and your prompt is now a MariaDB prompt. Your usual Bash commands don't work here. You must use MariaDB commands. To see a list of MariaDB commands, type `help` (or just `?`). These are administrative commands for your MariaDB shell, so they're useful for customizing your shell, but they aren't part of the SQL language. - -### Learn SQL basics - -The [Structured Query Language (SQL)][8] is named after what it provides: a method to inquire about the contents of a database in a predictable and consistent syntax in order to receive useful results. SQL reads a lot like an ordinary English sentence, if a little robotic. For instance, if you've signed into a database server and you need to understand what you have to work with, type `SHOW DATABASES;` and press Enter for the results. - -SQL commands are terminated with a semicolon. If you forget the semicolon, MariaDB assumes you want to continue your query on the next line, where you can either do so or terminate the query with a semicolon. - - -``` -MariaDB [(NONE)]> SHOW DATABASES; -+--------------------+ -| DATABASE           | -+--------------------+ -| information_schema | -| mysql              | -| performance_schema | -| test               | -+--------------------+ -4 ROWS IN SET (0.000 sec) -``` - -This shows there are four databases present: information_schema, mysql, performance_schema, and test. To issue queries to a database, you must select which database you want MariaDB to use. This is done with the MariaDB command `use`. Once you choose a database, your MariaDB prompt changes to reflect the active database. - - -``` -MariaDB [(NONE)]> USE test; -MariaDB [(test)]> -``` - -#### Show database tables - -Databases contain _tables_, which can be visualized in the same way a spreadsheet is: as a series of rows (called _records_ in a database) and columns. The intersection of a row and a column is called a _field_. - -To see the tables available in a database (you can think of them as tabs in a multi-sheet spreadsheet), use the SQL keyword `SHOW` again: - - -``` -MariaDB [(test)]> SHOW TABLES; -empty SET -``` - -The `test` database doesn't have much to look at, so use the `use` command to switch to the `mysql` database. - - -``` -MariaDB [(test)]> USE mysql; -MariaDB [(mysql)]> SHOW TABLES; - -+---------------------------+ -| Tables_in_mysql           | -+---------------------------+ -| column_stats              | -| columns_priv              | -| db                        | -[...] -| time_zone_transition_type | -| transaction_registry      | -| USER                      | -+---------------------------+ -31 ROWS IN SET (0.000 sec) -``` - -There are a lot more tables in this database! The `mysql` database is the system management database for this MariaDB instance. It contains important data, including an entire user structure to manage database privileges. It's an important database, and you don't always have to interact with it directly, but it's not uncommon to manipulate it in SQL scripts. It's also useful to understand the `mysql` database when you're learning MariaDB because it can help demonstrate some basic SQL commands. - -#### Examine a table - -The last table listed in this instance's `mysql` database is titled `user`. This table contains data about users permitted to access the database. Right now, there's only a root user, but you can add other users with varying privileges to control whether each user can view, update, or create data. To get an idea of all the attributes a MariaDB user can have, you can view column headers in a table: - - -``` -> SHOW COLUMNS IN USER; -MariaDB [mysql]> SHOW COLUMNS IN USER; -+-------------+---------------+------+-----+----------+ -| FIELD       | TYPE          | NULL | KEY | DEFAULT  | -+-------------+---------------+------+-----+----------+ -| Host        | CHAR(60)      | NO   | PRI |          | -| USER        | CHAR(80)      | NO   | PRI |          | -| Password    | CHAR(41)      | NO   |     |          | -| Select_priv | enum('N','Y') | NO   |     | N        | -| Insert_priv | enum('N','Y') | NO   |     | N        | -| Update_priv | enum('N','Y') | NO   |     | N        | -| Delete_priv | enum('N','Y') | NO   |     | N        | -| Create_priv | enum('N','Y') | NO   |     | N        | -| Drop_priv   | enum('N','Y') | NO   |     | N        | -[...] -47 ROWS IN SET (0.001 sec) -``` - -#### Create a new user - -Whether you need help from a fellow human to administer a database or you're setting up a database for a computer to use (for example, in a WordPress, Drupal, or Joomla installation), it's common to need an extra user account within MariaDB. You can create a MariaDB user either by adding it to the `user` table in the `mysql` database, or you can use the SQL keyword `CREATE` to prompt MariaDB to do it for you. The latter features some helper functions so that you don't have to generate all the information manually: - - -``` -`> CREATE USER 'tux'@'localhost' IDENTIFIED BY 'really_secure_password';` -``` - -#### View table fields - -You can view fields and values in a database table with the `SELECT` keyword. In this example, you created a user called `tux`, so select the columns in the `user` table: - - -``` -> SELECT USER,host FROM USER; -+------+------------+ -| USER | host       | -+------+------------+ -| root | localhost  | -[...] -| tux  | localhost  | -+------+------------+ -7 ROWS IN SET (0.000 sec) -``` - -#### Grant privileges to a user - -By looking at the column listing on the `user` table, you can explore a user's status. For instance, the new user `tux` doesn't have permission to do anything with the database. Using the `WHERE` statement, you can view only the record for `tux`: - - -``` -> SELECT USER,select_priv,insert_priv,update_priv FROM USER WHERE USER='tux'; -+------+-------------+-------------+-------------+ -| USER | select_priv | insert_priv | update_priv | -+------+-------------+-------------+-------------+ -| tux  | N           | N           | N           | -+------+-------------+-------------+-------------+ -``` - -Use the `GRANT` command to modify user permissions: - - -``` -> GRANT SELECT ON *.* TO 'tux'@'localhost'; -> FLUSH PRIVILEGES; -``` - -Verify your change: - - -``` -> SELECT USER,select_priv,insert_priv,update_priv FROM USER WHERE USER='tux'; -+------+-------------+-------------+-------------+ -| USER | select_priv | insert_priv | update_priv | -+------+-------------+-------------+-------------+ -| tux  | Y           | N           | N           | -+------+-------------+-------------+-------------+ -``` - -User `tux` now has privileges to select records from all tables. - -### Create a custom database - -So far, you've interacted just with the default databases. Most people rarely interact much with the default databases outside of user management. Usually, you create a database and populate it with tables full of custom data. - -#### Create a MariaDB database - -You may already be able to guess how to create a new database in MariaDB. It's a lot like creating a new user: - - -``` -> CREATE DATABASE example; -Query OK, 1 ROW affected (0.000 sec) -> SHOW DATABASES; -+--------------------+ -| DATABASE           | -+--------------------+ -| example            | -[...] -``` - -Make this new database your active one with the `use` command: - - -``` -`> USE example;` -``` - -#### Create a table - -Creating a table is more complex than creating a database because you must define column headings. MariaDB provides many convenience functions for you to use when creating columns, including data type definitions, automatic incrementing options, constraints to avoid empty values, automated timestamps, and more. - -Here's a simple table to describe a set of users: - - -``` -> CREATE TABLE IF NOT EXISTS member ( -    -> id INT AUTO_INCREMENT PRIMARY KEY, -    -> name VARCHAR(128) NOT NULL, -    -> startdate TIMESTAMP DEFAULT CURRENT_TIMESTAMP); -Query OK, 0 ROWS affected (0.030 sec) -``` - -This table provides a unique identifier to each row by using an auto-increment function. It contains a field for a user's name, which cannot be empty (or `null`), and generates a timestamp when the record is created. - -Populate this table with some sample data using the `INSERT` SQL keyword: - - -``` -> INSERT INTO member (name) VALUES ('Alice'); -Query OK, 1 ROW affected (0.011 sec) -> INSERT INTO member (name) VALUES ('Bob'); -Query OK, 1 ROW affected (0.011 sec) -> INSERT INTO member (name) VALUES ('Carol'); -Query OK, 1 ROW affected (0.011 sec) -> INSERT INTO member (name) VALUES ('David'); -Query OK, 1 ROW affected (0.011 sec) -``` - -Verify the data in the table: - - -``` -> SELECT * FROM member; -+----+-------+---------------------+ -| id | name  | startdate           | -+----+-------+---------------------+ -|  1 | Alice | 2020-10-03 15:25:06 | -|  2 | Bob   | 2020-10-03 15:26:43 | -|  3 | Carol | 2020-10-03 15:26:46 | -|  4 | David | 2020-10-03 15:26:51 | -+----+-------+---------------------+ -4 ROWS IN SET (0.000 sec) -``` - -#### Add multiple rows at once - -Now create a second table: - - -``` -> CREATE TABLE IF NOT EXISTS linux ( -    -> id INT AUTO_INCREMENT PRIMARY KEY, -    -> distro VARCHAR(128) NOT NULL, -Query OK, 0 ROWS affected (0.030 sec) -``` - -Populate it with some sample data, this time using a little `VALUES` shortcut so you can add multiple rows in one command. The `VALUES` keyword expects a list in parentheses, but it can take multiple lists separated by commas: - - -``` -> INSERT INTO linux (distro) - -> VALUES ('Slackware'), ('RHEL'),('Fedora'),('Debian'); -Query OK, 4 ROWS affected (0.011 sec) -Records: 4  Duplicates: 0  Warnings: 0 -> SELECT * FROM linux; -+----+-----------+ -| id | distro    | -+----+-----------+ -|  1 | Slackware | -|  2 | RHEL      | -|  3 | Fedora    | -|  4 | Debian    | -+----+-----------+ -``` - -### Create relationships between tables - -You now have two tables, but there's no relationship between them. They each contain independent data, but you might need to associate a member of the first table to a specific item listed in the second. - -To do that, you can create a new column for the first table that corresponds to something in the second. Because both tables were designed with unique identifiers (the auto-incrementing `id` field), the easiest way to connect them is to use the `id` field of one as a selector for the other. - -Create a new column in the first table to represent a value in the second table: - - -``` -> ALTER TABLE member ADD COLUMN (os INT); -Query OK, 0 ROWS affected (0.012 sec) -Records: 0  Duplicates: 0  Warnings: 0 -> DESCRIBE member; -DESCRIBE member; -+-----------+--------------+------+-----+---------+------+ -| FIELD     | TYPE         | NULL | KEY | DEFAULT | Extra| -+-----------+--------------+------+-----+---------+------+ -| id        | INT(11)      | NO   | PRI | NULL    | auto_| -| name      | VARCHAR(128) | NO   |     | NULL    |      | -| startdate | TIMESTAMP    | NO   |     | cur[...]|      | -| os        | INT(11)      | YES  |     | NULL    |      | -+-----------+--------------+------+-----+---------+------+ -``` - -Using the unique IDs of the `linux` table, assign a distribution to each member. Because the records already exist, use the `UPDATE` SQL keyword rather than `INSERT`. Specifically, you want to select one row and then update the value of one column. Syntactically, this is expressed a little in reverse, with the update happening first and the selection matching last: - - -``` -> UPDATE member SET os=1 WHERE name='Alice'; -Query OK, 1 ROW affected (0.007 sec) -ROWS matched: 1  Changed: 1  Warnings: 0 -``` - -Repeat this process for the other names in the `member` table to populate it with data. For variety, assign three different distributions across the four rows (doubling up on one). - -#### Join tables - -Now that these two tables relate to one another, you can use SQL to display the associated data. There are many kinds of joins in databases, and you can try them all once you know the basics. Here's a basic join to correlate the values found in the `os` field of the `member` table to the `id` field of the `linux` table: - - -``` -SELECT * FROM member JOIN linux ON member.os=linux.id; -+----+-------+---------------------+------+----+-----------+ -| id | name  | startdate           | os   | id | distro    | -+----+-------+---------------------+------+----+-----------+ -|  1 | Alice | 2020-10-03 15:25:06 |    1 |  1 | Slackware | -|  2 | Bob   | 2020-10-03 15:26:43 |    3 |  3 | Fedora    | -|  4 | David | 2020-10-03 15:26:51 |    3 |  3 | Fedora    | -|  3 | Carol | 2020-10-03 15:26:46 |    4 |  4 | Debian    | -+----+-------+---------------------+------+----+-----------+ -4 ROWS IN SET (0.000 sec) -``` - -The `os` and `id` fields form the join. - -In a graphical application, you can imagine that the `os` field might be set by a drop-down menu, the values for which are drawn from the contents of the `distro` field of the `linux` table. By using separate tables for unique but related sets of data, you ensure the consistency and validity of data, and thanks to SQL, you can associate them dynamically later. - -### [Download the MariaDB and MySQL cheat sheet][9] - -MariaDB is an enterprise-grade database. It's designed and proven to be a robust, powerful, and fast database engine. Learning it is a great step toward using it to do things like managing web applications or programming language libraries. As a quick reference when you're using MariaDB, [download our MariaDB and MySQL cheat sheet][9]. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/10/mariadb-mysql-cheat-sheet - -作者:[Seth Kenlon][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/seth -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/coverimage_cheat_sheet.png?itok=lYkNKieP (Cheat Sheet cover image) -[2]: https://www.redhat.com/sysadmin/yaml-tips -[3]: https://mariadb.org/ -[4]: https://www.mysql.com/ -[5]: https://en.wikipedia.org/wiki/SQL -[6]: https://opensource.com/article/20/10/install-mariadb-and-mysql-linux -[7]: https://mariadb.org/download -[8]: https://publications.opengroup.org/c449 -[9]: https://opensource.com/downloads/mariadb-mysql-cheat-sheet diff --git a/translated/tech/20201029 Improve your database knowledge with this MariaDB and MySQL cheat sheet.md b/translated/tech/20201029 Improve your database knowledge with this MariaDB and MySQL cheat sheet.md new file mode 100644 index 0000000000..a3e1c0b339 --- /dev/null +++ b/translated/tech/20201029 Improve your database knowledge with this MariaDB and MySQL cheat sheet.md @@ -0,0 +1,389 @@ +[#]: collector: "lujun9972" +[#]: translator: "lxbwolf" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " +[#]: subject: "Improve your database knowledge with this MariaDB and MySQL cheat sheet" +[#]: via: "https://opensource.com/article/20/10/mariadb-mysql-cheat-sheet" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" + +使用这个 MariaDB 和 MySQL 备忘单提升你的数据库技能 +====== + +阅读本文并下载我们的免费备忘单,去使用开源的数据库吧。 +![Cheat Sheet cover image][1] + +当你写一个程序或配置一个服务时,你最终都要持久化存储信息。有时候,你只需要一个 INI 或者 [YAML][2] 配置文件就够了。而有时候,一个自定义格式的 XML 或者 JSON 或其他类似的文件会更好。 + +但也有时候你需要校验输入、快速查询信息、关联数据、通常还要熟练地处理你的用户的请求。这就是设计数据库的目的,而 [MariaDB][3](由 [MySQL][4] 的原始开发人员开发的一个分支) 是一个极佳的选项。在本文中我使用的是 MariaDB,但这些信息同样适用于 MySQL。 + +通过编程语言与数据库进行交互是很普遍的。正因如此,出现了大量 Java、Python、Lua、PHP、Ruby、C++ 和其他语言的 [SQL][5] 库。然而,在使用这些库之前,理解数据库引擎做了什么以及为什么选择数据库是重要的对我们会很有帮助。本文介绍 MariaDB 和 `mysql` 命令来帮助你熟悉数据库处理数据的基本原理。 + +如果你还没有安装 MariaDB,请查阅我的文章 [在 Linux 上安装 MariaDB][6]。如果你没有使用 Linux,请参照 MariaDB [下载页面][7]提供的指导方法。 + +### 与 MariaDB 交互 + +你可以使用 `mysql` 命令与 MariaDB 进行交互。首先使用子命令 `ping` 确认你的服务是运行着的,在提示后输入密码: + + +``` +$ mysqladmin -u root -p ping +Enter password: +mysqld is alive +``` + +为了易于读者理解,打开一个交互式的 MariaDB 会话: + + +``` +$ mysql -u root -p +Enter password: +Welcome to the MariaDB monitor. +Commands end with ; or \g. +[...] +Type 'help;' or '\h' for help. +Type '\c' to clear the current input statement. + +MariaDB [(none)]> +``` + +你现在是在一个 MariaDB 子 shell 中,提示框是 MariaDB 提示框。普通的 Bash 命令在这里不能使用,只能用 MariaDB 命令。输入 `help` (或 `?`)查看命令列表。这些是你的 MariaDB shell 的管理命令,使用它们可以定制你的 shell,但它们不属于 SQL 语言。 + +### 学习 SQL 基本知识 + +[结构化查询语言][8] 是基于它们的能力定义的:一种通过有规则且一致的语法来查询数据库中的内容得到有用的结果的方法。SQL 看起来像是普通的英文语句,有一点点生硬。例如,如果你登入数据库服务器,想查看有哪些库,输入 `SHOW DATABASES;` 并回车就能看到结果。 + +SQL 命令以分号作为结尾。如果你忘记输入分号,MariaDB 会认为你是想在下一行继续输入你的查询命令,在下一行你可以继续输入命令也可以输入分号结束命令。 + + +``` +MariaDB [(NONE)]> SHOW DATABASES; ++--------------------+ +| DATABASE | ++--------------------+ +| information_schema | +| mysql | +| performance_schema | +| test | ++--------------------+ +4 ROWS IN SET (0.000 sec) +``` + +上面的例子显示当前有四个数据库:information_schema、mysql、performance_schema 和 test。你必须指定 MariaDB 使用哪个库,才能对该库使用查询语句。指定数据库的命令是 `use`。当你选择了一个库后,MariaDB 提示框会切换为选择的库。 + + +``` +MariaDB [(NONE)]> USE test; +MariaDB [(test)]> +``` + +#### 显示数据库的表 + +数据库里有_表_,与电子表格类似:有一系列的行(在数据库中称为_记录_)和列。一个行和一个列唯一确定一个 _filed_。 + +查看一个数据库中可用的表(可以理解为多表单电子表格中的一页),使用 SQL 关键字 `SHOW`: + + +``` +MariaDB [(test)]> SHOW TABLES; +empty SET +``` + +`test` 数据库是空的,所以使用 `use` 命令切换到 `mysql` 数据库: + + +``` +MariaDB [(test)]> USE mysql; +MariaDB [(mysql)]> SHOW TABLES; + ++---------------------------+ +| Tables_in_mysql | ++---------------------------+ +| column_stats | +| columns_priv | +| db | +[...] +| time_zone_transition_type | +| transaction_registry | +| USER | ++---------------------------+ +31 ROWS IN SET (0.000 sec) +``` + +这个数据库中有很多表!`mysql` 数据库是这个 MariaDB 实例的系统管理数据库。它里面包含重要数据,比如用来管理数据库权限的用户结构。这个数据库很重要,你不需要经常直接与它交互,但是使用 SQL 脚本来操作它却很常见。当你学习 MariaDB 时理解 `mysql` 数据库很有用,因为它有助于说明一些基本的 SQL 命令。 + +#### 检查一个表 + +这个实例的 `mysql` 数据库的最后一个表名为 `user`。这个表包含了可以访问这个数据库的用户。当前里面只有一个 root 用户,但是你可以添加不同权限的用户,赋予它们查看、更新或创建数据的权限。你可以查看一个表的列首来了解一个 MariaDB 用户的所有属性: + + +``` +> SHOW COLUMNS IN USER; +MariaDB [mysql]> SHOW COLUMNS IN USER; ++-------------+---------------+------+-----+----------+ +| FIELD | TYPE | NULL | KEY | DEFAULT | ++-------------+---------------+------+-----+----------+ +| Host | CHAR(60) | NO | PRI | | +| USER | CHAR(80) | NO | PRI | | +| Password | CHAR(41) | NO | | | +| Select_priv | enum('N','Y') | NO | | N | +| Insert_priv | enum('N','Y') | NO | | N | +| Update_priv | enum('N','Y') | NO | | N | +| Delete_priv | enum('N','Y') | NO | | N | +| Create_priv | enum('N','Y') | NO | | N | +| Drop_priv | enum('N','Y') | NO | | N | +[...] +47 ROWS IN SET (0.001 sec) +``` + +#### 创建一个新的用户 + +不论你是否需要一个普通的账号来管理数据库或者为计算机配置数据库(例如安装 WordPress、Drupal 或 Joomla时),在 MariaDB 中多建一个用户账号是很普遍的。你可以通过向 `mysql` 数据库的 `user` 表中添加一个用户或使用 SQL 关键字 `CREATE` 来提示 MariaDB 创建一个 MariaDB 用户。使用 `CREATE` 来创建新用户会默认执行一些有用的方法,因此你不需要手动生成所有的信息: + + +``` +`> CREATE USER 'tux'@'localhost' IDENTIFIED BY 'really_secure_password';` +``` + +#### 查看表的字段 + +你可以使用 `SELECT` 关键字来查看数据库表的字段和值。这本例中,你创建了一个名为 `tux` 的用户,因此查询 `user` 表中的列: + + +``` +> SELECT USER,host FROM USER; ++------+------------+ +| USER | host | ++------+------------+ +| root | localhost | +[...] +| tux | localhost | ++------+------------+ +7 ROWS IN SET (0.000 sec) +``` + +#### 为一个用户赋予权限 + +通过查看 `user` 表列出的信息,你可以看到用户的状态。例如,新用户 `tux` 对这个数据库没有任何权限。使用 `WHERE` 语句你可以只查 `tux` 那一条记录。 + + +``` +> SELECT USER,select_priv,insert_priv,update_priv FROM USER WHERE USER='tux'; ++------+-------------+-------------+-------------+ +| USER | select_priv | insert_priv | update_priv | ++------+-------------+-------------+-------------+ +| tux | N | N | N | ++------+-------------+-------------+-------------+ +``` + +使用 `GRANT` 命令修改用户的权限: + + +``` +> GRANT SELECT ON *.* TO 'tux'@'localhost'; +> FLUSH PRIVILEGES; +``` + +验证你的修改: + + +``` +> SELECT USER,select_priv,insert_priv,update_priv FROM USER WHERE USER='tux'; ++------+-------------+-------------+-------------+ +| USER | select_priv | insert_priv | update_priv | ++------+-------------+-------------+-------------+ +| tux | Y | N | N | ++------+-------------+-------------+-------------+ +``` + +`tux` 用户现在有了从所有表中查询记录的权限。 + +### 创建自定义的数据库 + +到目前为止,你一直在与默认的数据库进行交互。除了用户管理,大部分人很少会与默认的数据库进行交互。通常,你会用自定义的数据来填充创建的数据库。 + +#### 创建一个 MariaDB 数据库 + +你可能已经可以自己在 MariaDB 中创建新数据库了。创建数据库跟新建用户差不多。 + + +``` +> CREATE DATABASE example; +Query OK, 1 ROW affected (0.000 sec) +> SHOW DATABASES; ++--------------------+ +| DATABASE | ++--------------------+ +| example | +[...] +``` + +使用 `use` 命令来把这个新建的数据库作为当前使用的库: + + +``` +`> USE example;` +``` + +#### 创建一个表 + +创建表比创建数据库要复杂,因为你必须定义列首。MariaDB 提供了很多方便的函数,可以用于创建列,引入数据类型定义,自增选项,对空值的约束,自动时间戳等等。 + +下面是用来描述一系列用户的一个简单的表: + + +``` +> CREATE TABLE IF NOT EXISTS member ( + -> id INT AUTO_INCREMENT PRIMARY KEY, + -> name VARCHAR(128) NOT NULL, + -> startdate TIMESTAMP DEFAULT CURRENT_TIMESTAMP); +Query OK, 0 ROWS affected (0.030 sec) +``` + +这个表通过使用一个自动递增的方法来唯一标识每一行。表示用户名字的字段不能为空(或 `null`),每一行被创建时会自动生成时间戳。 + +使用 SQL 关键字 `INSERT` 向这个表填充一些示例数据: + + +``` +> INSERT INTO member (name) VALUES ('Alice'); +Query OK, 1 ROW affected (0.011 sec) +> INSERT INTO member (name) VALUES ('Bob'); +Query OK, 1 ROW affected (0.011 sec) +> INSERT INTO member (name) VALUES ('Carol'); +Query OK, 1 ROW affected (0.011 sec) +> INSERT INTO member (name) VALUES ('David'); +Query OK, 1 ROW affected (0.011 sec) +``` + +验证一下表里的数据: + + +``` +> SELECT * FROM member; ++----+-------+---------------------+ +| id | name | startdate | ++----+-------+---------------------+ +| 1 | Alice | 2020-10-03 15:25:06 | +| 2 | Bob | 2020-10-03 15:26:43 | +| 3 | Carol | 2020-10-03 15:26:46 | +| 4 | David | 2020-10-03 15:26:51 | ++----+-------+---------------------+ +4 ROWS IN SET (0.000 sec) +``` + +#### 同时增加多行数据 + +再创建一个表: + + +``` +> CREATE TABLE IF NOT EXISTS linux ( + -> id INT AUTO_INCREMENT PRIMARY KEY, + -> distro VARCHAR(128) NOT NULL, +Query OK, 0 ROWS affected (0.030 sec) +``` + +填充一些示例数据,这次使用 `VALUES` 快捷方式,这样你可以一次添加多行数据。`VALUES` 关键字需要一个用括号包围的列表作为参数,也可以用逗号分隔的多个列表作为参数。 + + +``` +> INSERT INTO linux (distro) + -> VALUES ('Slackware'), ('RHEL'),('Fedora'),('Debian'); +Query OK, 4 ROWS affected (0.011 sec) +Records: 4 Duplicates: 0 Warnings: 0 +> SELECT * FROM linux; ++----+-----------+ +| id | distro | ++----+-----------+ +| 1 | Slackware | +| 2 | RHEL | +| 3 | Fedora | +| 4 | Debian | ++----+-----------+ +``` + +### 关联多个表 + +现在你有两个表,之间没有关联。两个表的数据是独立的,但是你可能需要表一中的一个值来识别表二的记录。 + +你可以在表一中新增一列对应表二中的值。因为两个表都有唯一的标识符(自动递增的 `id` 字段),关联的它们的最简单的方式是,使用表一中的 `id` 字段作为表二的查询条件。 + +在表一中创建一列用来表示表二中的一个值。 + + +``` +> ALTER TABLE member ADD COLUMN (os INT); +Query OK, 0 ROWS affected (0.012 sec) +Records: 0 Duplicates: 0 Warnings: 0 +> DESCRIBE member; +DESCRIBE member; ++-----------+--------------+------+-----+---------+------+ +| FIELD | TYPE | NULL | KEY | DEFAULT | Extra| ++-----------+--------------+------+-----+---------+------+ +| id | INT(11) | NO | PRI | NULL | auto_| +| name | VARCHAR(128) | NO | | NULL | | +| startdate | TIMESTAMP | NO | | cur[...]| | +| os | INT(11) | YES | | NULL | | ++-----------+--------------+------+-----+---------+------+ +``` + +把 `linux` 表中的独一无二的 ID 分配给每个成员。因为记录已经存在,使用 `UPDATE` 关键字而不是 `INSERT`。尤其是当你想查询某行然后再更新某列值时。语法上,表达方式有点倒装,先更新后查询: + + +``` +> UPDATE member SET os=1 WHERE name='Alice'; +Query OK, 1 ROW affected (0.007 sec) +ROWS matched: 1 Changed: 1 Warnings: 0 +``` + +要填充数据,请对其他名字重复执行这个过程。为了数据的多样性,在四行记录中分配三个不同的值。 + +#### 连接表 + +现在这两个表彼此有了关联,你可以使用 SQL 来展示关联的数据。数据库中有很多种连接方式,你可以尽请尝试。下面的例子是关联 `member` 表中 `os` 字段和 `linux` 表中 `id` 字段: + + +``` +SELECT * FROM member JOIN linux ON member.os=linux.id; ++----+-------+---------------------+------+----+-----------+ +| id | name | startdate | os | id | distro | ++----+-------+---------------------+------+----+-----------+ +| 1 | Alice | 2020-10-03 15:25:06 | 1 | 1 | Slackware | +| 2 | Bob | 2020-10-03 15:26:43 | 3 | 3 | Fedora | +| 4 | David | 2020-10-03 15:26:51 | 3 | 3 | Fedora | +| 3 | Carol | 2020-10-03 15:26:46 | 4 | 4 | Debian | ++----+-------+---------------------+------+----+-----------+ +4 ROWS IN SET (0.000 sec) +``` + +连接 `os` 和 `id` 字段。 + +在图像化的应用中,你可以想象 `os` 字段可以在下拉菜单中设置,值的来源是 `linux` 表中的 `distro` 字段。通过使用多个表中独立却有关联的数据,你可以保证数据的一致性和有效性,使用 SQL 你可以动态地关联它们。 + +### [下载 MariaDB 和 MySQL 备忘单][9] + +MariaDB 是企业级的数据库。它是健壮、强大、高效的数据库引擎。学习它是你向管理 web 应用和编写语言库迈出的伟大的一步。你可以[下载 MariaDB 和 MySQL 备忘单][9],在你使用 MariaDB 时可以快速参考。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/10/mariadb-mysql-cheat-sheet + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[lxbwolf](https://github.com/lxbwolf) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/coverimage_cheat_sheet.png?itok=lYkNKieP "Cheat Sheet cover image" +[2]: https://www.redhat.com/sysadmin/yaml-tips +[3]: https://mariadb.org/ +[4]: https://www.mysql.com/ +[5]: https://en.wikipedia.org/wiki/SQL +[6]: https://opensource.com/article/20/10/install-mariadb-and-mysql-linux +[7]: https://mariadb.org/download +[8]: https://publications.opengroup.org/c449 +[9]: https://opensource.com/downloads/mariadb-mysql-cheat-sheet \ No newline at end of file From f2f1229df6b5325046aff80f092075b8a8c80c6f Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 8 Nov 2020 18:35:22 +0800 Subject: [PATCH 106/130] PRF MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @chenmu-kk 这篇稍有过时,应尽量翻译较新的文章~~ --- ...se networks can-t handle big data loads.md | 34 ++++++++----------- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/translated/talk/20190925 Most enterprise networks can-t handle big data loads.md b/translated/talk/20190925 Most enterprise networks can-t handle big data loads.md index 53fb677838..e5d819f237 100644 --- a/translated/talk/20190925 Most enterprise networks can-t handle big data loads.md +++ b/translated/talk/20190925 Most enterprise networks can-t handle big data loads.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (chenmu-kk) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Most enterprise networks can't handle big data loads) @@ -9,38 +9,32 @@ 大多数企业网络无法处理大数据负载 ====== -随着越来越多的数据通过网络传输,由于领导力和技术问题,数据网络跟上数据传输速度的工作正在滞后。 -Metamorworks / Getty Images -又过了一周,另一项调查发现,IT已经无法跟上不断膨胀的数据过载。这次问题将围绕着网络带宽和整体性能展开。 +> 随着网络中流动着越来越多的数据,由于领导力和技术问题,网络正在滞后于数据的发展速度。 -管理咨询公司埃森哲(Accenture)对[300名IT专业人士进行的一项调查][1] 发现,大多数人感觉他们企业网络无法胜任处理大数据的任务和物联网 (IoT) 部署。只有43%的受访公司表示他们的网络已经准备好支持云服务、物联网和其他数字技术。 +![](https://images.idgesg.net/images/article/2019/08/gettyimages-811109186-100808291-large.jpg) -**[ Learn more about SDN: Find out [where SDN is going][2] and learn the [difference between SDN and NFV][3]. | Get regularly scheduled insights: [Sign up for Network World newsletters][4]. ]** +又过了一周,另一项调查发现,IT 已经无法跟上不断膨胀的数据过载。这次的问题将主要是网络带宽和整体性能。 -一个关键原因(58%)是“IT与商业需求的不一致性”,这减缓了这些项目的推出。这是一个不同寻常的发现,因为85%的受访者也表示他们的网络已经完全或者大体上已经准备好支持企业的数字化计划。到底是哪一个呢? +管理咨询公司埃森哲对 [300 名 IT 专业人士进行的一项调查][1] 发现,大多数人认为他们企业网络无法胜任处理大数据的任务和物联网部署的任务。只有 43% 的受访公司表示他们的网络已经准备好支持云服务、物联网和其他数字技术。 -第二和第三大时常提及的障碍是“业务需求和运营需求间固有的复杂性”以及“对带宽、性能等方面的需求超过交付能力”,各占45%。 +一个关键原因(58%)是“IT 与商业需求之间的错位”,这延缓了这些项目的进展。这是一个不同寻常的发现,因为 85% 的受访者还表示他们的网络已经完全或者大体上已经准备好支持企业的数字化计划。那么,究竟是哪一种情况呢? -由于分析技术和其他大数据技术的推动,大量传输数据持续涌入网络线路,网络瓶颈持续增长。调查发现,带宽需求并未满足,目前的网络性能依旧达不到要求。 +第二和第三大时常提及的障碍是“业务需求和运营需求间固有的复杂性”以及“对带宽、性能等方面的需求超过交付能力”,各占 45%。 + +由于分析技术和其他大数据技术的推动,大量传输的数据持续涌入网络线路,网络瓶颈持续增长。调查发现,带宽需求并未得到满足,目前的网络性能依旧达不到要求。 其他原因还包括缺乏网络技术、设备扩展和设备老化。 ### 网络性能问题的一个解决方案:SDN -埃森哲发现,大多数公司表示 [软件定义网络 (SDN)][5] 是应对带宽和性能挑战的解决方案,77%的受访企业在调查中表示正在部署SDN或者已完成部署。它指出,虽然SDN可能在组织的某部分中存在,它并不总是在整个企业范围内统一地推出。 +埃森哲发现,大多数公司表示 [软件定义网络(SDN)][5] 是应对带宽和性能挑战的解决方案,77% 的受访企业在调查中表示正在部署 SDN 或者已完成部署。它指出,虽然 SDN 可能在组织的某部分中存在,它并不总是在整个企业范围内统一地推出。 -**** From HPE: [ITaaS and Corporate Storage Technology][6]: This blog explains why pay-per-use IT models, such as ITaaS, could be the next chapter in IT infrastructure. (Sponsored) **** +如今看来,似乎从未有人有足够的预算来满足他们所有的 IT 雄心,但 31% 受访者认为为网络改善提供资金是“简单的”,而且是在网络基础设施团队的控制范围内,相较于直接下属(13%)或基础设施/网络主管和副总裁(19%),首席信息官/首席技术官更可能将融资过程报告为“轻松”(40%)。 -如今看来,似乎从未有人有足够的预算来满足他们所有的IT雄心,但31%受访者认为网络改善筹资“简单”。而且在网络基础设施团队的控制下,首席信息官/首席技术官更可能将融资过程报告为“轻松”(40%),相较于直接下属(13%)或基础设施/网络主管和副总裁(19%)。 +报告指出,“仅靠传统网络无法支持数字时代所需的创新和性能。”报告呼吁拥抱新技术,但没有提到 SDN 的名字。同时它还呼吁首席执行官和他们直接下属间加强合作,因为很明显,双方在看待问题的方式上存在分歧。 -报告指出,“仅靠传统网络无法支持数字时代所需的创新和性能。”呼吁拥抱新技术,但没有提到SDN的名字。同时呼吁首席执行官和他们直接下属间加强合作,因为很明显,双方在看待问题的方式上存在分歧。 - -报告总结说,“我们认为需要一种新的网络范式来确保网络满足当前和未来的业务需求。然而,尽管有进步的迹象,但改变的步伐缓慢。公司必须承担起重担,才能实现统一和标准化企业能力,提供必要的带宽、性能和安全,以支持当前和未来的业务需求”。 - -**[ Now see: [How network pros acquire skills for SDN, programmable networks][7] ]** - -Join the Network World communities on [Facebook][8] and [LinkedIn][9] to comment on topics that are top of mind. +报告总结说,“我们认为需要一种新的网络范式来确保网络满足当前和未来的业务需求。然而,尽管有进步的迹象,但变革的步伐缓慢。公司必须承担起重担,才能实现统一和标准化企业能力,提供必要的带宽、性能和安全,以支持当前和未来的业务需求”。 -------------------------------------------------------------------------------- @@ -49,7 +43,7 @@ via: https://www.networkworld.com/article/3440519/most-enterprise-networks-cant- 作者:[Andy Patrizio][a] 选题:[lujun9972][b] 译者:[chenmu-kk](https://github.com/chenmu-kk) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From ebda51f88a98db2d67e70200cc49d579131939b2 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 8 Nov 2020 18:35:55 +0800 Subject: [PATCH 107/130] PUB @chenmu-kk https://linux.cn/article-12803-1.html --- ...25 Most enterprise networks can-t handle big data loads.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/talk => published}/20190925 Most enterprise networks can-t handle big data loads.md (98%) diff --git a/translated/talk/20190925 Most enterprise networks can-t handle big data loads.md b/published/20190925 Most enterprise networks can-t handle big data loads.md similarity index 98% rename from translated/talk/20190925 Most enterprise networks can-t handle big data loads.md rename to published/20190925 Most enterprise networks can-t handle big data loads.md index e5d819f237..ae1615b66f 100644 --- a/translated/talk/20190925 Most enterprise networks can-t handle big data loads.md +++ b/published/20190925 Most enterprise networks can-t handle big data loads.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (chenmu-kk) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12803-1.html) [#]: subject: (Most enterprise networks can't handle big data loads) [#]: via: (https://www.networkworld.com/article/3440519/most-enterprise-networks-cant-handle-big-data-loads.html) [#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/) From f94b8b86b23a53e387c98ff84899d4035a25c31b Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 8 Nov 2020 18:58:51 +0800 Subject: [PATCH 108/130] PRF @geekpi --- ... open source tools I can-t live without.md | 36 +++++++++---------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/translated/tech/20201021 5 open source tools I can-t live without.md b/translated/tech/20201021 5 open source tools I can-t live without.md index 027d230e86..d9e9ad3336 100644 --- a/translated/tech/20201021 5 open source tools I can-t live without.md +++ b/translated/tech/20201021 5 open source tools I can-t live without.md @@ -1,28 +1,28 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (5 open source tools I can't live without) [#]: via: (https://opensource.com/article/20/10/open-source-tools) [#]: author: (Victoria Martinez de la Cruz https://opensource.com/users/vkmc) -5 个我不能离开的开源工具 +5 个我不可或缺的开源工具 ====== -通过将这些工具放在自己的技囊中,提高终端内外的工作效率。 -![woman on laptop sitting at the window][1] -前段时间,我参与了一个在科技人士中广为流传的 Twitter 话题。挑战是什么?只挑选五个你不能没有的工具。我开始结合我的日常生活来思考这个问题,只挑出五个工具并不容易。我使用了许多我认为必不可少的工具,比如我的 [IRC][2] 客户端来与同事和朋友联系(是的,我仍然使用 IRC),一个好的文本编辑器来做事情,一个日历应用来保持有条不紊,以及当需要更直接的互动时的一个视频会议平台。 +> 通过将这些工具放在自己的技能包中,提高你在终端内、外的工作效率。 -所以,让我给这个挑战来个转折:选出五个能提高你工作效率的开源工具。这是我的清单。请在评论中分享你的清单。 +![](https://img.linux.net.cn/data/attachment/album/202011/08/185810ffjljj7o830fboz3.jpg) + +前段时间,我参与了一个在科技人士中广为流传的 Twitter 话题。“挑战?只挑选五个你不能没有的工具。”我开始结合我的日常生活来思考这个问题,只挑出五个工具并不容易。我使用了许多我认为必不可少的工具,比如用来与同事和朋友联系的 [IRC][2] 客户端(是的,我仍然使用 IRC),一个用来做各种事情的出色的文本编辑器,一个用来保持有条不紊的日历应用,以及当需要更直接的互动时的一个视频会议平台。 + +所以,让我给这个挑战来个变化:选出五个能提高你工作效率的开源工具。这是我的清单。请在评论中分享你的清单。 ### tmate ![tmate screenshot][3] -(Victoria Marinez de la Cruz, [CC BY-SA 4.0][4]) - -tmate 是著名的 [tmux][5] 终端多路复用器的一个分支,它允许你启动一个 tmux 会话并通过 SSH 共享。你可以用它来进行[配对编程][6](这是我的主要使用场景),也可以用来进行远程控制。 +哦,我喜欢这个工具。`tmate` 是著名的 [tmux][5] 终端多路复用器的一个复刻,它允许你启动一个 `tmux` 会话并通过 SSH 共享。你可以用它来进行[结对编程][6](这是我的主要使用场景),也可以用来进行远程控制。 如果你经常与你的团队成员合作,并且你想要一个简单的、与发行版无关的、开源的方式与他们一起编程(而且共享终端访问对你来说已经足够了),这绝对是你必须加到列表中的东西。 @@ -30,15 +30,15 @@ tmate 是著名的 [tmux][5] 终端多路复用器的一个分支,它允许你 ### ix -ix 是一个命令行粘贴板。你不需要安装任何东西。你可以通过 `curl` 到 [ix.io][9] 站点来创建新的粘贴。例如, `echo Hello world. | curl -F 'f:1=<-' ix.io` 会给你一个到 ix.io 的链接,那里粘贴了消息 “Hello world” 的信息。当你想分享日志用于调试或在没有桌面环境的服务器上保存配置文件时,这非常方便。 +`ix` 是一个命令行粘贴板。你不需要安装任何东西。你可以通过 `curl` 到 [ix.io][9] 站点来创建新的粘贴。例如,`echo Hello world. | curl -F 'f:1=<-' ix.io` 会给你一个到 ix.io 的链接,那里粘贴了消息 “Hello world” 的信息。当你想分享日志用于调试或在没有桌面环境的服务器上保存配置文件时,这非常方便。 -有一个缺点是源码还没有公布,尽管它的目的是免费和开源。如果你是作者,并且正在阅读这篇文章,请发布代码,这样我们就可以为打磨过程做出贡献。 +有一个缺点是源码还没有公布,尽管它的目的是自由开源。如果你是作者,并且正在阅读这篇文章,请发布代码,这样我们就可以为打磨它的过程做出贡献。 ### asciinema -是的,这是另一个终端工具,asciinema 可以让你记录你的终端。使用它的方法有很多,但我一般用它来制作 demo 演示。它非常容易使用,而且有很多 Linux 发行版和其他平台的软件包。 +是的,这是另一个终端工具,`asciinema` 可以让你记录你的终端。使用它的方法有很多,但我一般用它来制作演示。它非常容易使用,而且有很多 Linux 发行版和其他平台的软件包。 -要想知道它是如何工作的,可以看看这个[酷炫的 demo][10]。是不是很棒? +要想知道它是如何工作的,可以看看这个[酷炫的演示][10]。是不是很棒? 在 [asciinema 的网站][11]上获取更多信息,在 [GitHub][12] 上访问其源代码。 @@ -46,11 +46,9 @@ ix 是一个命令行粘贴板。你不需要安装任何东西。你可以通 ![pomodoro timer gnome][13] -(Victoria Martinez de la Cruz, [CC BY-SA 4.0][4]) +好了,关于终端工具的介绍就到此为止。现在我想和大家分享一下这个简单的宝物,它让你的工作变得有条不紊。你听说过 [番茄工作法][14] 吗?Pomodoro 基本上是一个时间管理工具。它使用一个番茄形状的计时器,帮助你将时间分成工作时间和休息时间(默认情况下,25 分钟的工作后有 5 分钟的休息时间)。而且,每隔 4 个“番茄”之后,你就会有更长的休息时间(默认为 15 分钟)。这样做的目的是让你在工作时间内保持专注,而在休息时间内进行伸展和放松。 -好了,关于终端工具的介绍就到此为止。现在我想和大家分享一下这个简单的宝物,它让你的工作变得有条不紊。你听说过 [Pomodoro Technique][14] 吗?Pomodoro 基本上是一个时间管理工具。它使用一个番茄形状的计时器,帮助你将时间分成工作时间和休息时间(默认情况下,25 分钟的工作后有 5 分钟的休息时间)。而且,每隔 4 个 pomodoro 之后,你就会有更长的休息时间(默认为 15 分钟)。这样做的目的是让你在工作时间内保持专注,而在休息时间内进行伸展和放松。 - -这听起来非常非常简单,你可能会对让一个番茄形状的时钟来控制你的生活感到犹豫,但它确实帮助我更好地组织起来,避免在试图同时专注于许多事情时感到疲惫。 +这听起来非常非常简单,你可能会对让一个番茄形状的时钟来控制你的生活感到犹豫,但它确实帮助我变得跟有条理,并且在试图同时专注于许多事情时避免感到疲惫。 无论你是什么角色,我都强烈推荐这种做法。而在众多实现它的不同工具中,我推荐 GNOME Pomodoro 应用。它适用于主要的 GNU/Linux 发行版,所以它需要你使用 GNOME 桌面环境(这可能是它的缺点)。 @@ -58,7 +56,7 @@ ix 是一个命令行粘贴板。你不需要安装任何东西。你可以通 ### Jitsi -最后但并非最不重要的是 Jitsi。当你在一个远程、全球分布的团队中工作时,你需要一种与人们联系的方式。即时通讯是好的,但有时最好还是开个快速会议,面对面地讨论事情(嗯,看到对方的脸)。有很多[视频会议工具][17]可用,但我很喜欢 Jitsi。不仅因为它是免费和开源的,还因为它提供了一个简洁、实用的界面。你可以设置自己的 Jitsi 服务器(用于商业目的),但你也可以通过访问 [Jitsi Meet][18] 网站来试用一个公共的 Jitsi 实例。 +最后但同样重要的是 Jitsi。当你在一个远程、遍布全球的团队中工作时,你需要一种与人们联系的方式。即时通讯是好的,但有时最好还是开个快速会议,面对面地讨论事情(嗯,看到对方的脸)。有很多[视频会议工具][17]可用,但我很喜欢 Jitsi。不仅因为它是免费和开源的,还因为它提供了一个简洁、实用的界面。你可以设置自己的 Jitsi 服务器(用于商业目的),但你也可以通过访问 [Jitsi Meet][18] 网站来试用一个公共的 Jitsi 实例。 设置这种会议的一个好做法是:只有在你心中有明确的议程时才使用它。而且要时刻问自己,这个会议能不能用电子邮件代替?遵循这些准则,谨慎使用 Jitsi,你的工作日将会非常高效! @@ -75,7 +73,7 @@ via: https://opensource.com/article/20/10/open-source-tools 作者:[Victoria Martinez de la Cruz][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/) 荣誉推出 From 485643ea79dbc62d2fa27698e6b5071164eeb497 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 8 Nov 2020 18:59:30 +0800 Subject: [PATCH 109/130] PUB @geekpi https://linux.cn/article-12804-1.html --- .../20201021 5 open source tools I can-t live without.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20201021 5 open source tools I can-t live without.md (98%) diff --git a/translated/tech/20201021 5 open source tools I can-t live without.md b/published/20201021 5 open source tools I can-t live without.md similarity index 98% rename from translated/tech/20201021 5 open source tools I can-t live without.md rename to published/20201021 5 open source tools I can-t live without.md index d9e9ad3336..d60f272f59 100644 --- a/translated/tech/20201021 5 open source tools I can-t live without.md +++ b/published/20201021 5 open source tools I can-t live without.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12804-1.html) [#]: subject: (5 open source tools I can't live without) [#]: via: (https://opensource.com/article/20/10/open-source-tools) [#]: author: (Victoria Martinez de la Cruz https://opensource.com/users/vkmc) From 879e509315c56ffc663cf983a499c3555266e1c5 Mon Sep 17 00:00:00 2001 From: xiao-song-123 <59152623+xiao-song-123@users.noreply.github.com> Date: Mon, 9 Nov 2020 08:34:38 +0800 Subject: [PATCH 110/130] translating --- ...your Python code with this open source visualization tool.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20201102 Understand your Python code with this open source visualization tool.md b/sources/tech/20201102 Understand your Python code with this open source visualization tool.md index 88fbd404ff..a2a5773cfa 100644 --- a/sources/tech/20201102 Understand your Python code with this open source visualization tool.md +++ b/sources/tech/20201102 Understand your Python code with this open source visualization tool.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (xiao-song-123) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From fd8386109ef1441b92e8e396eda3837beff67dec Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 9 Nov 2020 08:45:57 +0800 Subject: [PATCH 111/130] translating --- ...201103 4 ways to run Kubernetes locally.md | 137 ------------------ ...201103 4 ways to run Kubernetes locally.md | 136 +++++++++++++++++ 2 files changed, 136 insertions(+), 137 deletions(-) delete mode 100644 sources/tech/20201103 4 ways to run Kubernetes locally.md create mode 100644 translated/tech/20201103 4 ways to run Kubernetes locally.md diff --git a/sources/tech/20201103 4 ways to run Kubernetes locally.md b/sources/tech/20201103 4 ways to run Kubernetes locally.md deleted file mode 100644 index 9a5e4c981e..0000000000 --- a/sources/tech/20201103 4 ways to run Kubernetes locally.md +++ /dev/null @@ -1,137 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (4 ways to run Kubernetes locally) -[#]: via: (https://opensource.com/article/20/11/run-kubernetes-locally) -[#]: author: (Bryant Son https://opensource.com/users/brson) - -4 ways to run Kubernetes locally -====== -Set up a local development environment or just try out the container -orchestration platform with these tools. -![Business woman on laptop sitting in front of window][1] - -[Kubernetes][2] is an open source orchestration platform for containers. Developed by Google, it offers an open source system for automating deployment, scaling, and managing containerized applications. Although most people run Kubernetes in a cloud environment, running a Kubernetes cluster locally is not only possible, it has at least two benefits: - - * You can quickly try out Kubernetes before deciding to use it as your primary platform to deploy your application. - * You can set it up as a local development environment before pushing anything to a public cloud, thus allowing separation between the development environment and the production environment. - - - -Setting up a local Kubernetes environment as your development environment is the recommended option, no matter your situation, because this setup can create a safe and agile application-deployment process. - -Fortunately, there are multiple platforms that you can try out to run Kubernetes locally, and they are all open source and available under the [Apache 2.0][3] license. - - * [Minikube][4] has the primary goals of being the best tool for local Kubernetes application development, and to support all Kubernetes features that fit. - * [kind][5] runs local Kubernetes clusters using Docker container "nodes." - * [CodeReady Containers][6] (CRC) manages a local OpenShift 4.x cluster optimized for testing and development purposes. - * [Minishift][7] helps you run OpenShift 3.x clusters locally by running a single-node OpenShift cluster inside a virtual machine (VM). - - - -### Minikube - -![Minikube][8] - -(Bryant Son, [CC BY-SA 4.0][9]) - -[Minikube][10] is the most well-known and popular choice to run a Kubernetes environment on a local computer. No matter what operating system you use, [Minikube's documentation][11] offers an easy [installation][12] guide for you. Generally, installing Minikube is as simple as running two commands: - - -``` -$ curl -LO -$ sudo install minikube-PLATFORM-amd64 /usr/local/bin/minikube -``` - -Minikube quickly sets up a local Kubernetes cluster on Linux, macOS, or Windows with the following features: - - * Supports the latest Kubernetes release (+6 previous minor versions) - * Cross-platform (Linux, macOS, Windows) - * Deploys as a VM, a container, or on bare-metal - * Multiple container runtimes (CRI-O, containerd, Docker) - * Docker API endpoint for blazing-fast image pushes - * LoadBalancer, filesystem mounts, FeatureGates, and other advanced features - * Add-ons for easily installing Kubernetes applications - - - -Because Minikube is an open source project, you can contribute to its [source code][4]. - -### kind - -![kind][13] - -(Bryant Son, [CC BY-SA 4.0][9]) - -[kind][14]'s developers describe it as "a tool for running local Kubernetes clusters using Docker container 'nodes.'" It was designed for testing Kubernetes but may also be used for local development or continuous integration. - -kind supports: - - * Multi-node (including high-availability) clusters - * Building Kubernetes release builds from source - * Make/Bash/Docker or Bazel, in addition to pre-published builds - * Linux, macOS, and Windows - - - -In addition, kind is a Cloud Native Computing Foundation (CNCF)-certified conformant Kubernetes installer. Because it's open source, you can find kind's [source code][5] in its GitHub repository. - -### CodeReady Container (CRC) - -![CodeReady Container][15] - -(Bryant Son, [CC BY-SA 4.0][9]) - -If you want to try the latest version of OpenShift locally, try Red Hat [CodeReady Containers][16] (CRC). CRC brings a minimal OpenShift 4.x cluster to your local computer that provides a minimal environment for development and testing purposes. CRC is mainly targeted for use on developers' desktops. - -You can find CodeReady Container's [source code][6] on GitHub, also available under the Apache 2.0 license. - -### Minishift - -![Minishift][17] - -(Bryant Son, [CC BY-SA 4.0][9]) - -The [Minishift][7] project [helps you run a version of OpenShift][18] with [OKD][19] locally with a single-node OpenShift cluster inside a virtual machine. You can use it to [try OpenShift][20] or to develop for the cloud, on your local host. - -Like the other tools on this list, Minishift is open source, and you can access its [source code][7] on GitHub. - -### Kubernetes for the people - -As you can see, there are several ways to try out Kubernetes in your local environment. Did I miss anything? Feel free to leave a comment to ask a question or make a suggestion. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/11/run-kubernetes-locally - -作者:[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/lenovo-thinkpad-laptop-concentration-focus-windows-office.png?itok=-8E2ihcF (Woman using laptop concentrating) -[2]: https://kubernetes.io/ -[3]: https://www.apache.org/licenses/LICENSE-2.0 -[4]: https://github.com/kubernetes/minikube -[5]: https://github.com/kubernetes-sigs/kind -[6]: https://github.com/code-ready/crc -[7]: https://github.com/minishift/minishift -[8]: https://opensource.com/sites/default/files/uploads/1_minikube.jpg (Minikube) -[9]: https://creativecommons.org/licenses/by-sa/4.0/ -[10]: https://minikube.sigs.k8s.io/docs/ -[11]: https://minikube.sigs.k8s.io/docs -[12]: https://minikube.sigs.k8s.io/docs/start/ -[13]: https://opensource.com/sites/default/files/uploads/2_kind.jpg (kind) -[14]: https://kind.sigs.k8s.io -[15]: https://opensource.com/sites/default/files/uploads/4_crc.jpg (CodeReady Container) -[16]: https://code-ready.github.io/crc -[17]: https://opensource.com/sites/default/files/uploads/3_minishift.jpg (Minishift) -[18]: https://www.redhat.com/sysadmin/kubernetes-cluster-laptop -[19]: https://www.okd.io/ -[20]: https://www.redhat.com/sysadmin/learn-openshift-minishift diff --git a/translated/tech/20201103 4 ways to run Kubernetes locally.md b/translated/tech/20201103 4 ways to run Kubernetes locally.md new file mode 100644 index 0000000000..41b9f835c0 --- /dev/null +++ b/translated/tech/20201103 4 ways to run Kubernetes locally.md @@ -0,0 +1,136 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (4 ways to run Kubernetes locally) +[#]: via: (https://opensource.com/article/20/11/run-kubernetes-locally) +[#]: author: (Bryant Son https://opensource.com/users/brson) + +本地运行 Kubernetes 的 4 种方法 +====== +设置一个本地开发环境,或者直接用这些工具尝试容器编排平台。 +![Business woman on laptop sitting in front of window][1] + +[Kubernetes][2] 是一个开源的容器编排平台。它由 Google 开发,为自动化部署、扩展和管理容器化应用提供了一个开源系统。虽然大多数人在云环境中运行 Kubernetes,但在本地运行 Kubernetes 集群不仅是可能的,它还至少有两个好处: + +* 在决定使用 Kubernetes 作为主要平台部署应用之前,你可以快速试用它。 +* 在将任何东西推送到公共云之前,你可以将其设置为本地开发环境,从而实现开发环境和生产环境之间的分离。 + + + +无论你的情况如何,将本地 Kubernetes 环境设置为你的开发环境都是推荐的选择,因为这种设置可以创建一个安全而敏捷的应用部署流程。 + +幸运的是,有多个平台可以让你尝试在本地运行 Kubernetes,它们都是开源的,并且都是 [Apache 2.0][3] 许可。 + +* [Minikube][4] 的主要目标是成为本地 Kubernetes 应用开发的最佳工具,并支持所有适合的 Kubernetes 特性。 +* [kind][5] 使用 Docker 容器“节点”运行本地 Kubernetes 集群。 +* [CodeReady Containers][6] (CRC) 管理为测试和开发目的优化的本地 OpenShift 4.x 集群。 +* [Minishift][7] 通过在虚拟机 (VM) 内运行单节点 OpenShift 集群,帮助你在本地运行 OpenShift 3.x 集群。 + + + +### Minikube + +![Minikube][8] + +(Bryant Son, [CC BY-SA 4.0][9]) + +[Minikube][10] 是在本地计算机上运行 Kubernetes 环境的最知名和最流行的选择。无论你使用什么操作系统,[Minikube 的文档][11]都会为你提供一个简单的[安装][12]指南。一般来说,安装 Minikube 只需运行两条命令: + + +``` +$ curl -LO +$ sudo install minikube-PLATFORM-amd64 /usr/local/bin/minikube +``` + +Minikube 可在Linux、macOS 或 Windows 上快速设置本地 Kubernetes 集群,其功能如下: + +* 支持最新的 Kubernetes 版本(包括 6 个以前的小版本) +* 跨平台 (Linux、macOS、Windows) +* 以虚拟机、容器或裸机的形式部署 +* 多个容器运行时 (CRI-O、containerd、Docker) +* 用于快速推送镜像的 Docker API 端点 +* 负载均衡器、文件系统挂载、FeatureGates 和其他高级功能 +* 用于轻松安装 Kubernetes 应用的附加组件 + + + +因为 Minikube 是一个开源项目,你可以对它的[源代码][4]做贡献。 + +### kind + +![kind][13] + +(Bryant Son, [CC BY-SA 4.0][9]) + +[kind][14] 的开发者将其描述为“一个使用 Docker 容器“节点”运行本地 Kubernetes 集群的工具”。它是为测试 Kubernetes 而设计的,但也可能用于本地开发或持续集成。 + +kind 支持: + +* 多节点(包括高可用性)集群。 +* 从源码构建 Kubernetes 版本 +* Make/Bash/Docker 或 Bazel,以及预发布构建。 +* Linux、MacOS 和 Windows + + + +此外,kind 是一个经过云原生计算基金会 (CNCF) 认证的 Kubernetes 合规安装程序。因为它是开源的,你可以在它的 GitHub 仓库中找到 kind 的[源码][5]。 + +### CodeReady Container (CRC) + +![CodeReady Container][15] + +(Bryant Son, [CC BY-SA 4.0][9]) + +如果你想在本地尝试最新版本的 OpenShift,可以尝试红帽的 [CodeReady Containers][16] (CRC)。CRC 将一个最小的 OpenShift 4.x 集群带到你的本地计算机上,为开发和测试目的提供一个最小的环境。CRC 主要针对开发者的桌面使用。 + +你可以在 GitHub 上找到 CodeReady Container 的[源码][6],也是在 Apache 2.0 许可下提供的。 + +### Minishift + +![Minishift][17] + +(Bryant Son, [CC BY-SA 4.0][9]) + +[Minishift][7] 项目帮助你在本地用 [OKD][19] 在虚拟机内的单节点 OpenShift 集群[运行一个版本的 OpenShift][18]。你可以用它来[尝试 OpenShift][20],或者在你的本地主机上为云开发。 + +和这个列表中的其他工具一样,Minishift 也是开源的,你可以在 GitHub 上访问它的[源码][7]。 + +### 为人服务的 Kubernetes + +正如你所看到的,有几种方法可以在本地环境中试用 Kubernetes。我有遗漏么?欢迎留言提问或提出建议。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/11/run-kubernetes-locally + +作者:[Bryant Son][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/brson +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/lenovo-thinkpad-laptop-concentration-focus-windows-office.png?itok=-8E2ihcF (Woman using laptop concentrating) +[2]: https://kubernetes.io/ +[3]: https://www.apache.org/licenses/LICENSE-2.0 +[4]: https://github.com/kubernetes/minikube +[5]: https://github.com/kubernetes-sigs/kind +[6]: https://github.com/code-ready/crc +[7]: https://github.com/minishift/minishift +[8]: https://opensource.com/sites/default/files/uploads/1_minikube.jpg (Minikube) +[9]: https://creativecommons.org/licenses/by-sa/4.0/ +[10]: https://minikube.sigs.k8s.io/docs/ +[11]: https://minikube.sigs.k8s.io/docs +[12]: https://minikube.sigs.k8s.io/docs/start/ +[13]: https://opensource.com/sites/default/files/uploads/2_kind.jpg (kind) +[14]: https://kind.sigs.k8s.io +[15]: https://opensource.com/sites/default/files/uploads/4_crc.jpg (CodeReady Container) +[16]: https://code-ready.github.io/crc +[17]: https://opensource.com/sites/default/files/uploads/3_minishift.jpg (Minishift) +[18]: https://www.redhat.com/sysadmin/kubernetes-cluster-laptop +[19]: https://www.okd.io/ +[20]: https://www.redhat.com/sysadmin/learn-openshift-minishift \ No newline at end of file From e5e3432f9be380a40206c42f91e3a7d4f7e3879f Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 9 Nov 2020 08:56:52 +0800 Subject: [PATCH 112/130] translating --- .../20201105 Tweak your Git config for multiple user IDs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20201105 Tweak your Git config for multiple user IDs.md b/sources/tech/20201105 Tweak your Git config for multiple user IDs.md index d0f0a0c35d..43e6e6a513 100644 --- a/sources/tech/20201105 Tweak your Git config for multiple user IDs.md +++ b/sources/tech/20201105 Tweak your Git config for multiple user IDs.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 78ff15ce121df61f638fc226011d90c523005d51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91?= Date: Mon, 9 Nov 2020 09:01:34 +0800 Subject: [PATCH 113/130] Translated --- .../20200928 Add sound to your Python game.md | 166 ------------------ .../20200928 Add sound to your Python game.md | 166 ++++++++++++++++++ 2 files changed, 166 insertions(+), 166 deletions(-) delete mode 100644 sources/tech/20200928 Add sound to your Python game.md create mode 100644 translated/tech/20200928 Add sound to your Python game.md diff --git a/sources/tech/20200928 Add sound to your Python game.md b/sources/tech/20200928 Add sound to your Python game.md deleted file mode 100644 index d17429da26..0000000000 --- a/sources/tech/20200928 Add sound to your Python game.md +++ /dev/null @@ -1,166 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (robsean) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Add sound to your Python game) -[#]: via: (https://opensource.com/article/20/9/add-sound-python-game) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -Add sound to your Python game -====== -Hear what happens when your hero fights, jumps, collects loot, and more -by adding sounds to your game. Learn how in the 13th article in this -series on creating a platformer in Pygame. -![Colorful sound wave graph][1] - -This is part 13 in an ongoing series about creating video games in [Python 3][2] using the [Pygame][3] module. Previous articles are: - - 1. [Learn how to program in Python by building a simple dice game][4] - 2. [Build a game framework with Python using the Pygame module][5] - 3. [How to add a player to your Python game][6] - 4. [Using Pygame to move your game character around][7] - 5. [What's a hero without a villain? How to add one to your Python game][8] - 6. [Add platforms to your game][9] - 7. [Simulate gravity in your Python game][10] - 8. [Add jumping to your Python platformer game][11] - 9. [Enable your Python game player to run forward and backward][12] - 10. [Using Python to set up loot in Pygame][13] - 11. [Add scorekeeping to your Python game][14] - 12. [Add throwing mechanics to your Python game][15] - - - -Pygame provides an easy way to integrate sounds into your Python video game. Pygame's [mixer module][16] can play one or more sounds on command, and by mixing those sounds together, you can have, for instance, background music playing at the same time you hear the sounds of your hero collecting loot or jumping over enemies. - -It is easy to integrate the mixer module into an existing game, so—rather than giving you code samples showing you exactly where to put them—this article explains the four steps required to get sound in your application. - -### Start the mixer - -First, in your code's setup section, start the mixer process. Your code already starts Pygame and Pygame fonts, so grouping it together with these is a good idea: - - -``` -pygame.init() -pygame.font.init() -pygame.mixer.init() # add this line -``` - -### Define the sounds - -Next, you must define the sounds you want to use. This requires that you have the sounds on your computer, just as using fonts requires you to have fonts, and using graphics requires you to have graphics. - -You also must bundle those sounds with your game so that anyone playing your game has the sound files. - -To bundle a sound with your game, first create a new directory in your game folder, right along with the directory you created for your images and fonts. Call it `sound`: - - -``` -`s = 'sound'` -``` - -Even though there are plenty of sounds on the internet, it's not necessarily _legal_ to download them and give them away with your game. It seems strange because so many sounds from famous video games are such a part of popular culture, but that's how the law works. If you want to ship a sound with your game, you must find an open source or [Creative Commons][17] sound that gives you permission to give the sound away with your game. - -There are several sites that specialize in free and legal sounds, including: - - * [Freesound][18] hosts sound effects of all sorts. - * [Incompetech][19] hosts background music. - * [Open Game Art][20] hosts some sound effects and music. - - - -Some sound files are free to use only if you give the composer or sound designer credit. Read the conditions of use carefully before bundling any with your game! Musicians and sound designers work just as hard on their sounds as you work on your code, so it's nice to give them credit even when they don't require it. - -To give your sound sources credit, list the sounds that you use in a text file called `CREDIT`, and place the text file in your game folder. - -You might also try making your own music. The excellent [LMMS][21] audio workstation is easy to use and ships with lots of interesting sounds. It's available on all major platforms and exports to [Ogg Vorbis][22] (OGG) audio format. - -### Add sound to Pygame - -When you find a sound that you like, download it. If it comes in a ZIP or TAR file, extract it and move the sounds into the `sound` folder in your game directory. - -If the sound file has a complicated name with spaces or special characters, rename it. The filename is completely arbitrary, and the simpler it is, the easier it is for you to type into your code. - -Most video games use OGG sound files because the format provides high quality in small file sizes. When you download a sound file, it might be an MP3, WAVE, FLAC, or another audio format. To keep your compatibility high and your download size low, convert these to Ogg Vorbis with a tool like [fre:ac][23] or [Miro][24]. - -For example, assume you have downloaded a sound file called `ouch.ogg`. - -In your code's setup section, create a variable representing the sound file you want to use: - - -``` -`ouch = pygame.mixer.Sound(os.path.join(s, 'ouch.ogg'))` -``` - -### Trigger a sound - -To use a sound, all you have to do is call the variable when you want to trigger it. For instance, to trigger the `OUCH` sound effect when your player hits an enemy: - - -``` -for enemy in enemy_hit_list: -    pygame.mixer.Sound.play(ouch) -    score -= 1 -``` - -You can create sounds for all kinds of actions, such as jumping, collecting loot, throwing, colliding, and whatever else you can imagine. - -### Add background music - -If you have music or atmospheric sound effects you want to play in your game's background, you can use the `music` function of Pygame's mixer module. In your setup section, load the music file: - - -``` -`music = pygame.mixer.music.load(os.path.join(s, 'music.ogg'))` -``` - -And start the music: - - -``` -`pygame.mixer.music.play(-1)` -``` - -The `-1` value tells Pygame to loop the music file infinitely. You can set it to anything from `0` and beyond to define how many times the music should loop before stopping. - -### Enjoy the soundscapes - -Music and sound can add a lot of flavor to your game. Try adding some to your Pygame project! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/9/add-sound-python-game - -作者:[Seth Kenlon][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/seth -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/colorful_sound_wave.png?itok=jlUJG0bM (Colorful sound wave graph) -[2]: https://www.python.org/ -[3]: https://www.pygame.org/news -[4]: https://opensource.com/article/17/10/python-101 -[5]: https://opensource.com/article/17/12/game-framework-python -[6]: https://opensource.com/article/17/12/game-python-add-a-player -[7]: https://opensource.com/article/17/12/game-python-moving-player -[8]: https://opensource.com/article/18/5/pygame-enemy -[9]: https://opensource.com/article/18/7/put-platforms-python-game -[10]: https://opensource.com/article/19/11/simulate-gravity-python -[11]: https://opensource.com/article/19/12/jumping-python-platformer-game -[12]: https://opensource.com/article/19/12/python-platformer-game-run -[13]: https://opensource.com/article/19/12/loot-python-platformer-game -[14]: https://opensource.com/article/20/1/add-scorekeeping-your-python-game -[15]: https://opensource.com/article/20/9/add-throwing-python-game -[16]: https://www.pygame.org/docs/ref/mixer.html -[17]: https://opensource.com/article/20/1/what-creative-commons -[18]: https://freesound.org -[19]: https://incompetech.filmmusic.io -[20]: https://opengameart.org -[21]: https://opensource.com/life/16/2/linux-multimedia-studio -[22]: https://en.wikipedia.org/wiki/Vorbis -[23]: https://www.freac.org/index.php/en/downloads-mainmenu-330 -[24]: http://getmiro.com diff --git a/translated/tech/20200928 Add sound to your Python game.md b/translated/tech/20200928 Add sound to your Python game.md new file mode 100644 index 0000000000..916f54cc64 --- /dev/null +++ b/translated/tech/20200928 Add sound to your Python game.md @@ -0,0 +1,166 @@ +[#]: collector: (lujun9972) +[#]: translator: (robsean) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Add sound to your Python game) +[#]: via: (https://opensource.com/article/20/9/add-sound-python-game) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) + +添加声音到你的 Python 游戏 +====== +通过添加声音到你的游戏中,听听当你的英雄战斗,跳跃,收集战利品时会发生什么。学习如何在这一 Pygame 系列的第十三篇文章中,创建一个声音平台类精灵。 +![彩色声波图][1] + +这是仍在进行中的关于使用 [Pygame][3] 模块来在 [Python 3][2] 中创建电脑游戏的第十三部分。先前的文章是: + + 1. [通过构建一个简单的掷骰子游戏去学习怎么用 Python 编程][4] + 2. [使用 Python 和 Pygame 模块构建一个游戏框架][5] + 3. [如何在你的 Python 游戏中添加一个玩家][6] + 4. [用 Pygame 使你的游戏角色移动起来][7] + 5. [如何向你的 Python 游戏中添加一个敌人][8] + 6. [在 Pygame 游戏中放置平台][9] + 7. [在你的 Python 游戏中模拟引力][10] + 8. [为你的 Python 平台类游戏添加跳跃功能][11] + 9. [使你的 Python 游戏玩家能够向前和向后跑][12] + 10. [在你的 Python 平台类游戏中放一些奖励][13] + 11. [添加计分到你的 Python 游戏][14] + 12. [在你的Python游戏中加入投掷技巧][15] + + + +Pygame 提供了一种简单的方法来集成声音到你的 Python 电脑游戏中。Pygame 的 [mixer 模块][16] 可以依据命令播放一个或多个声音,并且你也可以将这些声音混合在一起,例如,你能够在听到你的英雄收集奖励或跳过敌人声音的同时播放背景音乐。 + +集成 mixer 模块到一个已存在的游戏中是很容易的,因此 — 并不是给予你代码示例来向你展示放置它们的准确位置 — 这篇文章分四个所需要的步骤来阐明如何在你应用程序中的获取声音。 + +### 启动 mixer + +首先,在你代码的 setup 部分,启动 mixer 进程。你的代码已经启动 Pygame 和 Pygame 字体,因此将它们归类到一起是一个很好的主意: + + +``` +pygame.init() +pygame.font.init() +pygame.mixer.init() # add this line +``` + +### 定义声音 + +接下来,你必需定义你想要使用的声音。这样就要求你的计算机上有声音文件,就像使用字体就要求你有字体文件,使用图像就要求你有图像文件一样。 + +你还必需把这些声音与你的游戏捆绑在一起,以便任何玩你游戏的人都有声音文件。 + +为将一个声音与你的游戏捆绑在一起,首先在你的游戏目录中创建一个新的目录,就像你为你图像和字体创建的目录一样。称它为 `sound`: + + +``` +s = 'sound' +``` + +尽管在互联网上有很多声音文件,下载这些声音文件并将其与你的游戏一起分发并不一定是合法的。这看起来是很奇怪的,因为这么多来自著名电脑游戏的声音是流行文化的一部分,但法律就是这样运作的。如果你想与你的游戏一起分发一个声音文件,你必需找到一个开放源码或 [Creative Commons][17] 声音文件,它们准许与游戏一起提供声音。 + +这里有一些专门提供自由和合法的声音文件的网站,包括: + + * [Freesound][18] 托管存储所有种类的音效。 + * [Incompetech][19] 托管存储背景音乐。 + * [Open Game Art][20] 托管存储一些音效和音乐。 + + + + + +一些声音文件只有当你给予作曲家或声音设计师一下费用时才是可以自由使用的。在与你的游戏捆绑前,仔细阅读使用条件!音乐家和声音设计师在声音上的工作就像你在代码上的工作一样努力,因此当他们不要一些费用时,给予他们一些费用也是极好的。 + +给予你的声音源文件一些费用,在一个名称为 `CREDIT` 的文本文件中列出你使用的声音,并在你的游戏文件夹中放置该文本文件。 + +你也可以尝试制作你自己的音乐。极好的 [LMMS][21] 音频工作站易于使用,并携带很多有趣的声音。它在所有主要的平台上都可以使用,也可以导出为 [Ogg Vorbis][22] (OGG) 音频格式。 + +### 添加声音到 Pygame + +当你找到你喜欢的一个声音文件时,下载它。如果它来自一个 ZIP 或 TAR 文件中,提取它并将其移动到你游戏目录中的 `sound` 文件夹中。 + +如果声音文件有一个带有空格或特殊字符的名字,重新命名它。文件名称是完全随意的,它的名称越简单,你就越容易输入到你的代码中。 + +大多数的电脑游戏使用 OGG 格式声音文件,因为这种格式在占有较小空间的情况下提供高质量的声音。当你下载一个声音文件时,它可能是一个 MP3, WAVE, FLAC, 或者其它的音频格式。为保持你的文件的较高兼容性和降低下载文件大小,使用一个工具 (像 [fre:ac][23] 或 [Miro][24]) 来转换这些的文件格式为 Ogg 格式。 + +例如,假设你已经下载一个称为 ouch.ogg 的声音文件。 + +在你代码的 setup 部分中,创建一个代表这你想使用的声音文件的变量: + + +``` +ouch = pygame.mixer.Sound(os.path.join(s, 'ouch.ogg')) +``` + +### 触发一个声音 + +为使用一个声音,你所需要做的全部工作是,当你想触发声音时来调用变量。例如,当你的玩家击中一名敌人时,触发 `OUCH` 声音效果: + + +``` +for enemy in enemy_hit_list: + pygame.mixer.Sound.play(ouch) + score -= 1 +``` + +你可以为所有的动作类型创建声音,例如,跳跃,收集奖励,投掷,碰撞,和任何你可以想象到的东西。 + +### 添加背景音乐 + +如果你有你想在你的游戏的背景中播放的音乐或令人激动的音效,你可以使用 Pygame 中的 mixer 模块中的`music` 函数。在你的 setup 部分中,加载音乐文件: + + +``` +music = pygame.mixer.music.load(os.path.join(s, 'music.ogg')) +``` + +然后,开始音乐: + + +``` +pygame.mixer.music.play(-1) +``` + +`-1` 值来告诉 Pygame 无限循环音乐文件。你可以将其设置为 `0` 或任意更高的数值,以定义音乐在停止前循环多少次。 + +### 享受声音时空 + +音乐和声音可以为你的游戏添加很多韵味。尝试添加一些声音到你的 Pygame 工程! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/9/add-sound-python-game + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[robsean](https://github.com/robsean) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/colorful_sound_wave.png?itok=jlUJG0bM (Colorful sound wave graph) +[2]: https://www.python.org/ +[3]: https://www.pygame.org/news +[4]: https://opensource.com/article/17/10/python-101 +[5]: https://opensource.com/article/17/12/game-framework-python +[6]: https://opensource.com/article/17/12/game-python-add-a-player +[7]: https://opensource.com/article/17/12/game-python-moving-player +[8]: https://opensource.com/article/18/5/pygame-enemy +[9]: https://opensource.com/article/18/7/put-platforms-python-game +[10]: https://opensource.com/article/19/11/simulate-gravity-python +[11]: https://opensource.com/article/19/12/jumping-python-platformer-game +[12]: https://opensource.com/article/19/12/python-platformer-game-run +[13]: https://opensource.com/article/19/12/loot-python-platformer-game +[14]: https://opensource.com/article/20/1/add-scorekeeping-your-python-game +[15]: https://opensource.com/article/20/9/add-throwing-python-game +[16]: https://www.pygame.org/docs/ref/mixer.html +[17]: https://opensource.com/article/20/1/what-creative-commons +[18]: https://freesound.org +[19]: https://incompetech.filmmusic.io +[20]: https://opengameart.org +[21]: https://opensource.com/life/16/2/linux-multimedia-studio +[22]: https://en.wikipedia.org/wiki/Vorbis +[23]: https://www.freac.org/index.php/en/downloads-mainmenu-330 +[24]: http://getmiro.com From 4e9caa667c50bc6b02655eb78ab90cafe27c150a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91?= Date: Mon, 9 Nov 2020 09:06:00 +0800 Subject: [PATCH 114/130] Translating --- .../tech/20200918 Add throwing mechanics to your Python game.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20200918 Add throwing mechanics to your Python game.md b/sources/tech/20200918 Add throwing mechanics to your Python game.md index 8022106421..cb441ea94a 100644 --- a/sources/tech/20200918 Add throwing mechanics to your Python game.md +++ b/sources/tech/20200918 Add throwing mechanics to your Python game.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (robsean) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From f545c84b0551d277fa2b6c71b6ee9959a8425376 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91?= Date: Mon, 9 Nov 2020 09:14:19 +0800 Subject: [PATCH 115/130] Translating --- ... Check Free Disk Space on Linux -Terminal and GUI Methods.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20201105 How to Check Free Disk Space on Linux -Terminal and GUI Methods.md b/sources/tech/20201105 How to Check Free Disk Space on Linux -Terminal and GUI Methods.md index abbe114c41..0afc1f1e32 100644 --- a/sources/tech/20201105 How to Check Free Disk Space on Linux -Terminal and GUI Methods.md +++ b/sources/tech/20201105 How to Check Free Disk Space on Linux -Terminal and GUI Methods.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (robsean) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From e920b0337d3cc918214b0ad0e17b4c3e5de10c4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91?= Date: Mon, 9 Nov 2020 09:15:39 +0800 Subject: [PATCH 116/130] Translating --- .../tech/20200922 Easily set image transparency using GIMP.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20200922 Easily set image transparency using GIMP.md b/sources/tech/20200922 Easily set image transparency using GIMP.md index 54e3e9da76..b8d587cca3 100644 --- a/sources/tech/20200922 Easily set image transparency using GIMP.md +++ b/sources/tech/20200922 Easily set image transparency using GIMP.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (robsean) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From cd232d72947d5cb3aaa973ac1fb10cfba2eb89a1 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 9 Nov 2020 10:39:05 +0800 Subject: [PATCH 117/130] PRF @geekpi --- ...her Linux Distributions -Beginner-s Tip.md | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/translated/tech/20201028 How to Clear Terminal Screen in Ubuntu and Other Linux Distributions -Beginner-s Tip.md b/translated/tech/20201028 How to Clear Terminal Screen in Ubuntu and Other Linux Distributions -Beginner-s Tip.md index 3f0e150395..832e871d20 100644 --- a/translated/tech/20201028 How to Clear Terminal Screen in Ubuntu and Other Linux Distributions -Beginner-s Tip.md +++ b/translated/tech/20201028 How to Clear Terminal Screen in Ubuntu and Other Linux Distributions -Beginner-s Tip.md @@ -1,56 +1,56 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (How to Clear Terminal Screen in Ubuntu and Other Linux Distributions [Beginner’s Tip]) [#]: via: (https://itsfoss.com/clear-terminal-ubuntu/) [#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) -如何清除 Ubuntu 和其他 Linux 发行版的终端屏幕(初学者提示) +如何清除 Ubuntu 和其他 Linux 发行版的终端屏幕 ====== +![][2] + 在终端上工作时,通常会发现终端屏幕上显示了太多的命令及其输出。 你可能需要清除终端屏幕并专注于要执行的下一个任务。相信我,清除 Linux 终端屏幕会很有帮助。 ### 使用 clear 命令清除 Linux 终端 -那么,如何清除 Linux 中的终端?最简单,最常见的方法是使用 clear 命令: +那么,如何清除 Linux 中的终端?最简单,最常见的方法是使用 `clear` 命令: ``` clear ``` -你无需使用 clear 命令选项。就是这么简单,但是你还需要了解其他一些内容。 +`clear` 命令无需选项。就是这么简单,但是你还需要了解其他一些内容。 ![][1] -_ **clear 命令和其他清除屏幕的方法可能取决于你使用的终端模拟器。** _ 终端模拟器是用于访问 Linux Shell(命令行)的终端应用。 +`clear` 命令和其他清除屏幕的方法可能取决于你使用的终端模拟器。终端模拟器是用于访问 Linux Shell(命令行)的终端应用。 -如果你在具有 GNOME Terminal 的 Ubuntu 上使用 clear 命令,它将清除屏幕,并且你将无法看到之前屏幕上的内容。 +如果你在带有 GNOME 终端的 Ubuntu 上使用 `clear` 命令,它将清除屏幕,并且你将无法看到之前屏幕上的内容。 -在许多其他终端模拟器或 Putty 中,它可能只清除一页屏幕。如果使用鼠标或 PageUp 和 PageDown 键滚动,那么仍然可以看到以前的屏幕输出。 +在许多其他终端模拟器或 Putty 中,它可能只清除一页屏幕。如果使用鼠标或 `PageUp` 和 `PageDown` 键滚动,那么仍然可以看到以前的屏幕输出。 坦白说,这取决于你的需要。如果你突然意识到需要引用以前运行的命令的输出,那么也许可以使用该方式。 ### 在 Linux 中清除终端屏幕的其他方法 -![][2] +`clear` 命令不是清除终端屏幕的唯一方法。 -clear 命令不是清除终端屏幕的唯一方法。 - -你可以在 Linux 中使用 Ctrl+L [键盘快捷键][3]来清除屏幕。它适用于大多数终端模拟器。 +你可以在 Linux 中使用 `Ctrl+L` [键盘快捷键][3]来清除屏幕。它适用于大多数终端模拟器。 ``` Ctrl+L ``` -如果你在 GNOME terminal (Ubuntu 中默认)中使用 Ctrl+L 和 clear 命令,那么你会注意到它们的影响有所不同。Ctrl+L 将屏幕向下移动一页,给人一种干净的错觉,但是你仍然可以通过向上滚动来访问命令输出历史。 +如果你在 GNOME 终端(Ubuntu 中默认)中使用 `Ctrl+L` 和 `clear` 命令,那么你会注意到它们的影响有所不同。`Ctrl+L` 将屏幕向下移动一页,给人一种干净的错觉,但是你仍然可以通过向上滚动来访问命令输出历史。 -**某些其他终端模拟器将此键盘快捷键设置为 Ctrl+Shift+K**。 +**某些其他终端模拟器将此键盘快捷键设置为 `Ctrl+Shift+K`**。 -你也可以使用 reset 命令清除终端屏幕。实际上,此命令执行完整的终端重新初始化。但是,它可能比 clear 命令要花费更长的时间。 +你也可以使用 `reset` 命令清除终端屏幕。实际上,此命令执行完整的终端重新初始化。但是,它可能比 `clear` 命令要花费更长的时间。 ``` reset @@ -75,7 +75,7 @@ via: https://itsfoss.com/clear-terminal-ubuntu/ 作者:[Abhishek Prakash][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/) 荣誉推出 From 9ebadc80836c634976913c093959ab2ec11993c1 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 9 Nov 2020 10:39:37 +0800 Subject: [PATCH 118/130] PUB @geekpi https://linux.cn/article-12806-1.html --- ...in Ubuntu and Other Linux Distributions -Beginner-s Tip.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20201028 How to Clear Terminal Screen in Ubuntu and Other Linux Distributions -Beginner-s Tip.md (98%) diff --git a/translated/tech/20201028 How to Clear Terminal Screen in Ubuntu and Other Linux Distributions -Beginner-s Tip.md b/published/20201028 How to Clear Terminal Screen in Ubuntu and Other Linux Distributions -Beginner-s Tip.md similarity index 98% rename from translated/tech/20201028 How to Clear Terminal Screen in Ubuntu and Other Linux Distributions -Beginner-s Tip.md rename to published/20201028 How to Clear Terminal Screen in Ubuntu and Other Linux Distributions -Beginner-s Tip.md index 832e871d20..bb5988667c 100644 --- a/translated/tech/20201028 How to Clear Terminal Screen in Ubuntu and Other Linux Distributions -Beginner-s Tip.md +++ b/published/20201028 How to Clear Terminal Screen in Ubuntu and Other Linux Distributions -Beginner-s Tip.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12806-1.html) [#]: subject: (How to Clear Terminal Screen in Ubuntu and Other Linux Distributions [Beginner’s Tip]) [#]: via: (https://itsfoss.com/clear-terminal-ubuntu/) [#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) From 8cf399dab4d42df73d4b2815f1c192d431c456bc Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 9 Nov 2020 11:00:04 +0800 Subject: [PATCH 119/130] PRF @geekpi --- ...has Some Exciting Improvements Lined Up.md | 31 +++++++++---------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/translated/tech/20201029 Linux Kernel 5.10 Will be the Next LTS Release and it has Some Exciting Improvements Lined Up.md b/translated/tech/20201029 Linux Kernel 5.10 Will be the Next LTS Release and it has Some Exciting Improvements Lined Up.md index bdcd81e8c7..0397417126 100644 --- a/translated/tech/20201029 Linux Kernel 5.10 Will be the Next LTS Release and it has Some Exciting Improvements Lined Up.md +++ b/translated/tech/20201029 Linux Kernel 5.10 Will be the Next LTS Release and it has Some Exciting Improvements Lined Up.md @@ -1,40 +1,40 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Linux Kernel 5.10 Will be the Next LTS Release and it has Some Exciting Improvements Lined Up) [#]: via: (https://itsfoss.com/kernel-5-10/) [#]: author: (Ankush Das https://itsfoss.com/author/ankush/) -Linux Kernel 5.10 将是下一个 LTS 版本,它有一些令人兴奋的改进 +Linux 内核 5.10 LTS 的一些令人兴奋的改进 ====== -_**Linux Kernel 5.10 的开发正在进行中。已确认这是一个长期支持的版本,将带来更新的硬件支持和其他承诺的功能。**_ +> Linux 内核 5.10 的开发正在进行中。已确认这是一个长期支持的版本,将带来更新的硬件支持和其他承诺的功能。 ### Linux Kernel 5.10 将是长期支持版本 -主要稳定内核维护者 **Greg Kroah-Hartman** 在 Linux 基金会欧洲开源峰会的 “Ask the Expert” 会议上发言,确认 Linux 5.10 将是下一个 LTS 版本。 +主要稳定内核维护者 **Greg Kroah-Hartman** 在 Linux 基金会欧洲开源峰会的 “Ask the Expert” 环节上发言,确认 Linux 5.10 将是下一个 LTS 版本。 -尽管早期有一些关于 5.9 是 LTS 版本的猜测,但 Greg 澄清说,一年的最后一个内核版本永远是 LTS 版本。 +尽管早期有一些关于 5.9 是 LTS 版本的猜测,但 Greg 澄清说,**一年的最后一个内核版本永远是 LTS 版本**。 -目前来看,[Linux Kernel 5.4][1] 系列恰好是最新的 LTS 版本,它增加了很多改进和硬件支持。另外,考虑到开发进度,Linux [Kernel 5.8][2] 是目前最大的版本,而 Linux 5.10 的第一个候选版本也很接近,所以下面有很多事情要做。 +目前来看,[Linux 内核 5.4][1] 系列恰好是最新的 LTS 版本,它增加了很多改进和硬件支持。另外,考虑到开发进度,Linux [内核 5.8][2] 是目前最大的版本,而 Linux 5.10 的第一个候选版本也很接近,所以下面有很多事情要做。 -让我们来看看 Linux Kernel 5.10 的一些功能和改进。 +让我们来看看 Linux 内核 5.10 的一些功能和改进。 -### Linux kernel 5.10 的功能 +### Linux 内核 5.10 特性 ![][4] -**注意:** _Linux Kernel 5.10 仍处于早期开发阶段。因此,我们将定期更新文章,以更新最新的补充/功能。_ +**注意:** Linux 内核 5.10 仍处于早期开发阶段。因此,我们将定期更新文章,以更新最新的补充/功能。 #### AMD Zen 3 处理器支持 -新的 [Ryzen 5000][5] 产品线是 2020 年最大的看点之一。所以,随着 Linux Kernel 5.10 发布候选版本的推出,针对 Zen 3 处理器的各种新增功能也在陆续推出。 +新的 [Ryzen 5000][5] 产品线是 2020 年最大的看点之一。所以,随着 Linux 内核 5.10 发布候选版本的推出,针对 Zen 3 处理器的各种新增功能也在陆续推出。 #### Intel Rocket Lake 支持 -我并不对 Intel 的 Rocket Lake 芯片组在明年 Q1(2021 年)出货报太大希望。但是,考虑到英特尔在不断地压榨 14 纳米制程,看到 Intel Rocket Lake 在 Linux Kernel 5.10 上所做的工作,绝对是一件好事。 +我并不对 Intel 的 Rocket Lake 芯片组在明年(2021 年) Q1 出货报太大希望。但是,考虑到英特尔在不断地压榨 14 纳米制程,看到 Intel Rocket Lake 在 Linux 内核 5.10 上所做的工作,绝对是一件好事。 #### Radeon RX 6000 系列开源驱动 @@ -42,8 +42,7 @@ _**Linux Kernel 5.10 的开发正在进行中。已确认这是一个长期支 当然,除非它和 Vega 系列或 5000 系列遇到的同样问题。 -很高兴在 Linux Kernel 5.10 上看到下一代 Radeon GPU 的开源驱动已经完成。 - +很高兴在 Linux 内核 5.10 上看到下一代 Radeon GPU 的开源驱动已经完成。 #### 文件系统优化和存储改进 @@ -55,9 +54,9 @@ _**Linux Kernel 5.10 的开发正在进行中。已确认这是一个长期支 目前,对 SoundBlaster AE-7 的支持、对 NVIDIA Orin(AI 处理器)的早期支持以及 Tiger Lake GPU 的改进似乎是主要亮点。 -Linux Kernel 5.10 的稳定版本应该会在 12 月中旬左右发布。它将被支持至少2年,但可能一直会有安全/bug 修复更新,直到 2026 年。因此,我们将继续关注下一个 Linux Kernel 5.10 LTS 版本的发展,以获得任何令人兴奋的东西。 +Linux 内核 5.10 的稳定版本应该会在 12 月中旬左右发布。它将被支持至少 2 年,但可能一直会有安全和 bug 修复更新,直到 2026 年。因此,我们将继续关注下一个 Linux 内核 5.10 LTS 版本的发展,以获得任何令人兴奋的东西。 -你对即将发布的 Linux Kernel 5.10 有什么看法?请在评论中告诉我们你的想法。 +你对即将发布的 Linux 内核 5.10 有什么看法?请在评论中告诉我们你的想法。 -------------------------------------------------------------------------------- @@ -66,7 +65,7 @@ via: https://itsfoss.com/kernel-5-10/ 作者:[Ankush Das][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 30cae4dfa8a62945fec4cd6c6bcad941e0791f2d Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 9 Nov 2020 11:00:33 +0800 Subject: [PATCH 120/130] PUB @geekpi https://linux.cn/article-12807-1.html --- ... Release and it has Some Exciting Improvements Lined Up.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20201029 Linux Kernel 5.10 Will be the Next LTS Release and it has Some Exciting Improvements Lined Up.md (98%) diff --git a/translated/tech/20201029 Linux Kernel 5.10 Will be the Next LTS Release and it has Some Exciting Improvements Lined Up.md b/published/20201029 Linux Kernel 5.10 Will be the Next LTS Release and it has Some Exciting Improvements Lined Up.md similarity index 98% rename from translated/tech/20201029 Linux Kernel 5.10 Will be the Next LTS Release and it has Some Exciting Improvements Lined Up.md rename to published/20201029 Linux Kernel 5.10 Will be the Next LTS Release and it has Some Exciting Improvements Lined Up.md index 0397417126..ac2f20a8e5 100644 --- a/translated/tech/20201029 Linux Kernel 5.10 Will be the Next LTS Release and it has Some Exciting Improvements Lined Up.md +++ b/published/20201029 Linux Kernel 5.10 Will be the Next LTS Release and it has Some Exciting Improvements Lined Up.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12807-1.html) [#]: subject: (Linux Kernel 5.10 Will be the Next LTS Release and it has Some Exciting Improvements Lined Up) [#]: via: (https://itsfoss.com/kernel-5-10/) [#]: author: (Ankush Das https://itsfoss.com/author/ankush/) From 8c82cdc014447d109b0529a369d8dca2b1ae45e8 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 9 Nov 2020 11:10:09 +0800 Subject: [PATCH 121/130] APL --- ...1028 How JavaScript became a serious programming language.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20201028 How JavaScript became a serious programming language.md b/sources/tech/20201028 How JavaScript became a serious programming language.md index 7818764717..e1d5ee3218 100644 --- a/sources/tech/20201028 How JavaScript became a serious programming language.md +++ b/sources/tech/20201028 How JavaScript became a serious programming language.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 8e90d1bf3273e856f65b97a49267b48e91727c65 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 9 Nov 2020 11:56:56 +0800 Subject: [PATCH 122/130] TSL&PRF @wxy --- ...t became a serious programming language.md | 81 ------------------ ...t became a serious programming language.md | 82 +++++++++++++++++++ 2 files changed, 82 insertions(+), 81 deletions(-) delete mode 100644 sources/tech/20201028 How JavaScript became a serious programming language.md create mode 100644 translated/tech/20201028 How JavaScript became a serious programming language.md diff --git a/sources/tech/20201028 How JavaScript became a serious programming language.md b/sources/tech/20201028 How JavaScript became a serious programming language.md deleted file mode 100644 index e1d5ee3218..0000000000 --- a/sources/tech/20201028 How JavaScript became a serious programming language.md +++ /dev/null @@ -1,81 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How JavaScript became a serious programming language) -[#]: via: (https://opensource.com/article/20/10/history-javascript) -[#]: author: (Nimisha Mukherjee https://opensource.com/users/nimisha) - -How JavaScript became a serious programming language -====== -From humble beginnings as a way to make websites pretty, JavaScript has -been transformed into a serious programming language. -![Javascript code close-up with neon graphic overlay][1] - -JavaScript's humble start began in 1995, when it was [created in just 10 days][2] by Brendan Eich, then an employee with Netscape Communications Corporation. JavaScript has come a long way since then, from a tool to make websites pretty to a serious programming language. - -In its early days, JavaScript was considered a visual tool that made websites a little more fun and attractive. Languages like [Jakarta Server Pages][3] (JSP; formerly JavaServer Pages) used to do all the heavy lifting on rendered web pages, and JavaScript was used to create basic interactions, visual enhancements, and animations. - -For a long time, the demarcations between HTML, CSS, and JavaScript were not clear. Frontend development primarily consists of HTML, CSS, and JavaScript, forming a "[layer cake][4]" of standard web technologies. - -![Layer cake of standard web technologies][5] - -The "[layer cake][4]" of standard web technologies (Mozilla Developers Network, [CC BY-SA 4.0][6]) - -HTML and CSS provide structure, format, and style to content. JavaScript comes into play once a web page does something beyond displaying static content. Ecma International develops JavaScript specifications, and the World Wide Web Consortium (W3C) develops HTML and CSS specifications. - -### How JavaScript gained prominence - -There is a long [history][7] behind how JavaScript came to be the [most popular][8] programming language. Back in the 1990s, Java was king, and comparisons to it were inevitable. Many engineers thought JavaScript was not a good programming language due to lack of support for object-oriented programming. Even though it was not evident, JavaScript's object-model and functional features were already present in its first version. - -After JavaScript's rushed release in 1995, Netscape submitted it to the European Computer Manufacturers Association (ECMA) International for standardization. This led to [ECMAScript][9], a JavaScript standard meant to ensure interoperability of web pages across different web browsers. ECMAScript 1 came out in June 1997 and helped to advance the standardization of JavaScript. - -During this time, PHP and JSP became popular server-side language choices. JSP had gained prominence as the preferred alternative to Common Gateway Interface ([CGI][10]) because it enabled embedding Java code in HTML. While it was popular, developers found it unnatural to have Java inside HTML. In addition, even for the simplest text change on HTML, JSP had to undergo a time-consuming lifecycle. In today's microservice world, JSP-oriented pages are considered technical debt.  - -[PHP][11] works similarly to JSP but the PHP code is processed as a Common Gateway Interface ([CGI][10]) executable. PHP-based web applications are easier to deploy than those based on JSP. Overall, it is easier to get up and running with PHP. Today, PHP and JavaScript are one of the most popular combinations for creating dynamic websites. PHP serves as the server-side scripting and JavaScript as the client-side scripting. - -JavaScript's adoption grew with the release of [jQuery][12], a multi-purpose JavaScript library that simplifies tedious Document Object Model (DOM) management, event handling, and [Ajax][13], in 2006.  - -The turning point for JavaScript came in 2009 when [Node.js][14] was released. Developers could now write server-side scripting with JavaScript. Closely following were frameworks like [Backbone.js][15] and [AngularJS][16], both released in 2010. This led to the concept of full-stack development using a single language. - -In 2015, Ecma International released ECMAScript 6 (ES6), which added significant new syntax for writing complex applications, including class declarations. Other new features included iterators, arrow function expressions, let and const keywords, typed arrays, new collections (maps, sets, and WeakMap), promises, template literals for strings, and many other cool features. Later editions have gone on to add more features that have made JavaScript more robust, streamlined, and reliable. - -### Conclusion - -JavaScript has advanced significantly over the past two decades. Most browsers now compete to meet compliance, so the latest specifications are rolled out faster. - -There are a host of stable JavaScript frameworks to choose from, depending on your project requirements, including the most popular ones: [React][17], [Angular][18], and [Vue.js][19]. In the next article in this series, I'll dive into why JavaScript is so popular. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/10/history-javascript - -作者:[Nimisha Mukherjee][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/nimisha -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/code_javascript.jpg?itok=60evKmGl (Javascript code close-up with neon graphic overlay) -[2]: https://en.wikipedia.org/wiki/JavaScript -[3]: https://en.wikipedia.org/wiki/Jakarta_Server_Pages -[4]: https://developer.mozilla.org/en-US/docs/Learn/JavaScript/First_steps/What_is_JavaScript -[5]: https://opensource.com/sites/default/files/uploads/layercakewebtech.png (Layer cake of standard web technologies) -[6]: https://creativecommons.org/licenses/by-sa/4.0/ -[7]: https://blog.logrocket.com/history-of-frontend-frameworks/ -[8]: https://octoverse.github.com/ -[9]: https://en.wikipedia.org/wiki/ECMAScript -[10]: https://en.wikipedia.org/wiki/Common_Gateway_Interface -[11]: https://en.wikipedia.org/wiki/PHP#:~:text=PHP%20development%20began%20in%201994,Interpreter%22%20or%20PHP%2FFI. -[12]: https://en.wikipedia.org/wiki/JQuery -[13]: https://en.wikipedia.org/wiki/Ajax_(programming) -[14]: https://en.wikipedia.org/wiki/Node.js -[15]: https://en.wikipedia.org/wiki/Backbone.js -[16]: https://en.wikipedia.org/wiki/AngularJS -[17]: https://reactjs.org/ -[18]: https://angular.io/ -[19]: https://vuejs.org/ diff --git a/translated/tech/20201028 How JavaScript became a serious programming language.md b/translated/tech/20201028 How JavaScript became a serious programming language.md new file mode 100644 index 0000000000..b15d5b52c6 --- /dev/null +++ b/translated/tech/20201028 How JavaScript became a serious programming language.md @@ -0,0 +1,82 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: (wxy) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How JavaScript became a serious programming language) +[#]: via: (https://opensource.com/article/20/10/history-javascript) +[#]: author: (Nimisha Mukherjee https://opensource.com/users/nimisha) + +JavaScript 是如何成为一门严肃的编程语言的 +====== + +> 从最开始作为一种使网站变得漂亮的方式,JavaScript 已转变为一种严肃的编程语言。 + +![Javascript 代码特写与霓虹灯图形叠加][1] + +JavaScript 的卑微起步始于 1995 年,是由当时在 Netscape 通信公司工作的 Brendan Eich [在短短 10 天内创建的][2]。从那时起,JavaScript 已经走过了漫长的道路,从一个让网站变得漂亮的工具变成了一种严肃的编程语言。 + +在其早期,JavaScript 被认为是一种视觉工具,它使网站变得更有趣和更有吸引力。像 [Jakarta Server Pages][3](即 JSP,以前称作 JavaServer Pages)这样的语言曾经用来完成渲染网页的繁重工作,而 JavaScript 则被用来创建基本的交互、视觉增强和动画。 + +长期以来,HTML、CSS 和 JavaScript 之间的分界并不明确。前端开发主要由 HTML、CSS 和 JavaScript 组成,形成了标准 Web 技术的“[多层蛋糕][4]”。 + +![标准 Web 技术的多层蛋糕][5] + +*标准网络技术的“[多层蛋糕][4]”(Mozilla 开发者网络,[CC BY-SA 4.0][6])* + +HTML 和 CSS 为内容提供结构、格式和样式。一旦网页要做一些超越了显示静态内容的事情,就是 JavaScript 的用武之地。Ecma 国际部开发了 JavaScript 规范,万维网联盟World Wide Web Consortium(W3C)开发了 HTML 和 CSS 规范。 + +### JavaScript 是如何获得突出地位的 + +JavaScript 是如何成为[最受欢迎的][8]编程语言的,背后有一段漫长的[历史][7]。早在 20 世纪 90 年代,Java 是王者,不可避免的人们会与它进行比较。许多工程师认为 JavaScript 不是一门好的编程语言,因为它缺乏对面向对象编程的支持。尽管当时并不明显,但其实 JavaScript 的对象模型和功能特性在其第一个版本中就已经出现了。 + +1995 年 JavaScript 匆匆发布后,网景公司将其提交给了欧洲计算机制造商协会European Computer Manufacturers Association(ECMA)国际部进行标准化。由此产生了 [ECMAScript][9],这是一个 JavaScript 标准,旨在确保不同 Web 浏览器之间网页的互操作性。ECMAScript 1 于 1997 年 6 月问世,帮助推进了 JavaScript 的标准化。 + +在此期间,PHP 和 JSP 成为了服务器端编程语言的流行选择。JSP 作为通用网关接口Common Gateway Interface([CGI][10])的首选替代方案获得了突出的地位,因为它可以在 HTML 中嵌入 Java 代码。虽然它很受欢迎,但开发人员发现将 Java 嵌入 HTML 中是不自然的。此外,即使是 HTML 上最简单的文本变化,JSP 也必须经历一个耗时的生命周期。在今天的微服务世界里,面向 JSP 的页面被认为是技术债务。  + +[PHP][11] 的工作原理与 JSP 类似,但 PHP 代码以一个通用网关接口([CGI][10])的可执行文件来处理。基于 PHP 的 Web 应用比基于 JSP 的应用更容易部署。总的来说,使用 PHP 更容易上手和运行。今天,PHP 和 JavaScript 是创建动态网站最流行的组合之一:PHP 作为服务器端脚本,JavaScript 作为客户端脚本。 + +伴随着 2006 年 [jQuery][12] 的发布,JavaScript 的应用越来越多。jQuery 是一个多用途的 JavaScript 库,简化了繁琐的文档对象模型Document Object Model(DOM)管理、事件处理和 [Ajax][13]。  + +2009 年 [Node.js][14] 的发布是 JavaScript 发展的转折点。开发者现在可以用 JavaScript 编写服务器端脚本了。紧随其后的是 2010 年发布的 [Backbone.js][15] 和 [AngularJS][16] 等框架。这导致了出现了使用单一语言进行全栈开发的概念。 + +2015 年,Ecma 国际部发布了 ECMAScript 6(ES6),它为编写复杂的应用程序增加了包括类声明在内的重要新语法。其他新特性还包括迭代器、箭头函数表达式、`let` 和 `const` 关键字、类型化数组、新的集合(映射、集合和 WeakMap)、Promise、字符串的模板字元以及许多其它很酷的特性。后来的版本又继续增加了更多的功能,使 JavaScript 更加强大、精简和可靠。 + +### 总结 + +在过去的 20 年里,JavaScript 有了长足的进步。现在大多数浏览器都在争相满足合规性,因此最新的规范推出得更快。 + +根据你的项目需求,有大量稳定的 JavaScript 框架可供选择,包括最流行的 [React][17]、[Angular][18] 和 [Vue.js][19] 等等。在本系列的下一篇文章中,我将深入探讨为什么 JavaScript 如此受欢迎。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/10/history-javascript + +作者:[Nimisha Mukherjee][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/nimisha +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/code_javascript.jpg?itok=60evKmGl (Javascript code close-up with neon graphic overlay) +[2]: https://en.wikipedia.org/wiki/JavaScript +[3]: https://en.wikipedia.org/wiki/Jakarta_Server_Pages +[4]: https://developer.mozilla.org/en-US/docs/Learn/JavaScript/First_steps/What_is_JavaScript +[5]: https://opensource.com/sites/default/files/uploads/layercakewebtech.png (Layer cake of standard web technologies) +[6]: https://creativecommons.org/licenses/by-sa/4.0/ +[7]: https://blog.logrocket.com/history-of-frontend-frameworks/ +[8]: https://octoverse.github.com/ +[9]: https://en.wikipedia.org/wiki/ECMAScript +[10]: https://en.wikipedia.org/wiki/Common_Gateway_Interface +[11]: https://en.wikipedia.org/wiki/PHP#:~:text=PHP%20development%20began%20in%201994,Interpreter%22%20or%20PHP%2FFI. +[12]: https://en.wikipedia.org/wiki/JQuery +[13]: https://en.wikipedia.org/wiki/Ajax_(programming) +[14]: https://en.wikipedia.org/wiki/Node.js +[15]: https://en.wikipedia.org/wiki/Backbone.js +[16]: https://en.wikipedia.org/wiki/AngularJS +[17]: https://reactjs.org/ +[18]: https://angular.io/ +[19]: https://vuejs.org/ From fa0251f86ba47d43dcc530668e1dfabc9e3dc68d Mon Sep 17 00:00:00 2001 From: xiao-song-123 <463020345@qq.com> Date: Mon, 9 Nov 2020 15:10:22 +0800 Subject: [PATCH 123/130] Update 20201102 Understand your Python code with this open source visualization tool.md --- ...ith this open source visualization tool.md | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/sources/tech/20201102 Understand your Python code with this open source visualization tool.md b/sources/tech/20201102 Understand your Python code with this open source visualization tool.md index a2a5773cfa..3a0b32259f 100644 --- a/sources/tech/20201102 Understand your Python code with this open source visualization tool.md +++ b/sources/tech/20201102 Understand your Python code with this open source visualization tool.md @@ -1,13 +1,13 @@ -[#]: collector: (lujun9972) -[#]: translator: (xiao-song-123) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Understand your Python code with this open source visualization tool) -[#]: via: (https://opensource.com/article/20/11/python-code-viztracer) -[#]: author: (Tian Gao https://opensource.com/users/gaogaotiantian) +[#]: collector: "lujun9972" +[#]: translator: "xiao-song-123" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " +[#]: subject: "Understand your Python code with this open source visualization tool" +[#]: via: "https://opensource.com/article/20/11/python-code-viztracer" +[#]: author: "Tian Gao https://opensource.com/users/gaogaotiantian" -Understand your Python code with this open source visualization tool +使用此开源可视化工具来理解您的Python代码 ====== VizTracer visualizes and traces Python code to provide greater insight into how the code works. @@ -100,14 +100,14 @@ via: https://opensource.com/article/20/11/python-code-viztracer [a]: https://opensource.com/users/gaogaotiantian [b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/python_programming_question.png?itok=cOeJW-8r (Python programming language logo with question marks) +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/python_programming_question.png?itok=cOeJW-8r "Python programming language logo with question marks" [2]: https://github.com/gaogaotiantian/viztracer [3]: http://google.github.io/trace-viewer/ [4]: https://en.wikipedia.org/wiki/Monte_Carlo_tree_search -[5]: https://opensource.com/sites/default/files/uploads/viztracer_mcts.png (Monte Carlo tree search visualization) +[5]: https://opensource.com/sites/default/files/uploads/viztracer_mcts.png "Monte Carlo tree search visualization" [6]: https://creativecommons.org/licenses/by-sa/4.0/ -[7]: https://opensource.com/sites/default/files/uploads/viztracer_zoomin.png (Zooming in on VizTracer visualization) -[8]: https://opensource.com/sites/default/files/uploads/viztracer_details.png (Viewing VizTracer details) -[9]: https://opensource.com/sites/default/files/uploads/viztracer_gradient.png (VizTracer gradient descent) +[7]: https://opensource.com/sites/default/files/uploads/viztracer_zoomin.png "Zooming in on VizTracer visualization" +[8]: https://opensource.com/sites/default/files/uploads/viztracer_details.png "Viewing VizTracer details" +[9]: https://opensource.com/sites/default/files/uploads/viztracer_gradient.png "VizTracer gradient descent" [10]: https://docs.python.org/3/library/pdb.html [11]: https://docs.python.org/2/library/profile.html#module-cProfile From 2db19e849961f3da42c3f938886fbb0f9705b47e Mon Sep 17 00:00:00 2001 From: xiao-song-123 <463020345@qq.com> Date: Mon, 9 Nov 2020 17:21:06 +0800 Subject: [PATCH 124/130] translated --- ...ith this open source visualization tool.md | 39 +++++++++---------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/sources/tech/20201102 Understand your Python code with this open source visualization tool.md b/sources/tech/20201102 Understand your Python code with this open source visualization tool.md index 3a0b32259f..8cbaf0b286 100644 --- a/sources/tech/20201102 Understand your Python code with this open source visualization tool.md +++ b/sources/tech/20201102 Understand your Python code with this open source visualization tool.md @@ -7,71 +7,70 @@ [#]: via: "https://opensource.com/article/20/11/python-code-viztracer" [#]: author: "Tian Gao https://opensource.com/users/gaogaotiantian" -使用此开源可视化工具来理解您的Python代码 +使用开源可视化工具来理解您的 Python 代码 ====== -VizTracer visualizes and traces Python code to provide greater insight -into how the code works. +VizTracer 工具可以可视化并跟踪 Python 代码,让您可以更深入地了解其工作原理。 ![Python programming language logo with question marks][1] -It's challenging to understand your Python project as it gets larger and more complex. Even when you write the entire project, it's impossible to know how it works fully. Debugging and profiling your code is essential to better understanding it. +随之 Python 项目变得越来越大、越复杂,理解起它来就变得充满挑战性。即使是您自己独自编写了整个项目,也不可能完全知道项目是如何工作的。为了能更好的理解您的代码,调试和分析代码变得至关重要。 -[VizTracer][2] is a tool to help you understand Python code by tracing and visualizing its execution. Without making any changes to your source code, VizTracer can log function entries/exits, function arguments/returns, and any arbitrary variables, then display the data using an intuitive front-end Google [Trace-Viewer][3]. +[VizTracer][2] 是一个这样的工具,它通过跟踪和可视化 Python 代码的执行过程,来帮助您对代码的理解。无需对源代码进行任何更改,VizTracer 即可记录函数的入口 / 出口,函数参数 / 返回值以及任意变量,然后通过 [Trace-Viewer][3] 使用直观的谷歌前端界面来显示数据。 -Here is an example of running a [Monte Carlo tree search][4]: +下面是一个运行[蒙特卡洛树搜索][4]的例子: ![Monte Carlo tree search visualization][5] (Tian Gao, [CC BY-SA 4.0][6]) -Every function is logged and visualized in stack style on a timeline so that you can see what is happening when you run a program. You can zoom in to see the details at any specific point: +每个函数都在时间线上以堆栈的形式记录和可视化,这样您就可以看到在运行程序时发生了什么。您可以放大查看任意特定点的详细信息: ![Zooming in on VizTracer visualization][7] (Tian Gao, [CC BY-SA 4.0][6]) -VizTracer can also automatically log function arguments and return value; you can click on the function entry and see the detail info: +VizTracer 还可以自动记录函数参数和返回值。您可以单击功能条目并查看详细信息: ![Viewing VizTracer details][8] (Tian Gao, [CC BY-SA 4.0][6]) -Or you can create a whole new signal and use it to log variables. For example, this shows the cost value when you do a gradient descent: +或者您可以创建一个全新的信号,并用它来记录变量。例如,这显示了执行梯度下降时的代价值: ![VizTracer gradient descent][9] (Tian Gao, [CC BY-SA 4.0][6]) -In contrast to other tools with complicated setups, VizTracer is super-easy to use and does not have any dependencies. You can install it from pip with: +与其他设置复杂的工具相比,VizTracer 使用起来非常简单,并且没有任何依赖关系。您可以从 pip 安装它: ``` `pip install viztracer` ``` -And trace your program by entering (where `` is the name of your script): +您也可以通过输入来跟踪你的程序 ( `` 是您脚本的名称): ``` `viztracer ` ``` -VizTracer will generate an HTML report in your working directory that you can open in Chrome. +VizTracer 将在您的工作目录中生成一个 HTML 报告,您可以在 Chrome 浏览器中打开它。 -VizTracer offers other advanced features, such as filters, which you can use to filter out the functions that you do not want to trace so that you'll have a cleaner report. For example, to include only the functions in files, you are interested in: +VizTracer 还提供了其他高级功能,比如过滤器功能,您可以使用它过滤掉不想跟踪的函数,获得更清晰的报告。例如,要仅包含文件中的函数,您需要: ``` `viztracer include_files ./ --run ` ``` -To record the function arguments and return value: +记录函数参数和返回值: ``` `viztracer --log_function_args --log_return_value ` ``` -To log any arbitrary variables matching a certain regex: +记录与某个正则表达式匹配的任意变量: ``` @@ -79,13 +78,13 @@ To log any arbitrary variables matching a certain regex: viztracer --log_var a.* --run <your_script.py> ``` -You can get other features, like custom events to log numeric values and objects, by making minor modifications to your source code. +您可以通过对源代码进行较小的修改来获得其他功能,例如自定义事件来记录数值和对象。 -VizTracer also includes a virtual debugger (vdb) that can debug VizTracer's log file. vdb debugs your executed code (much like [pdb][10]) so that you can understand the code flow. Helpfully, it supports running back in time because it knows everything that happened. +VizTracer 还包括一个虚拟调试器( vdb ),它可以调试 VizTracer 的日志文件。可以用 vdb 调试您运行中的代码 (与 [pdb][10] 非常相似 ) 以便您了解代码流。有用的是,它还支持时间回溯,因为它知道发生的一切。 -Unlike some prototypes, VizTracer implements its core in pure C, which significantly reduces the overhead to a level similar to [cProfile][11]. +与一些原型不同,VizTracer 使用纯 C 语言实现其核心,这将极大地减少开销,使其达到类似于 [cProfile][11] 的水平。 -VizTracer is open source, released under the Apache 2.0 License, and supports all common operating systems platforms (Linux, macOS, and Windows). You can learn more about its features and access its source code on [GitHub][2]. +VizTracer 是开源的,在 Apache 2.0 许可下发布,支持所有常见的操作系统平台(Linux、macOS和Windows)。你可以在 [GitHub][2] 上了解关于它的更多特性并访问源代码。 -------------------------------------------------------------------------------- @@ -93,7 +92,7 @@ via: https://opensource.com/article/20/11/python-code-viztracer 作者:[Tian Gao][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[xiao-song-123](https://github.com/xiao-song-123) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From d51e388f7325c76d5aa00ba432080042d63d8e24 Mon Sep 17 00:00:00 2001 From: xiao-song-123 <463020345@qq.com> Date: Mon, 9 Nov 2020 17:23:11 +0800 Subject: [PATCH 125/130] translated --- ...d your Python code with this open source visualization tool.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20201102 Understand your Python code with this open source visualization tool.md (100%) diff --git a/sources/tech/20201102 Understand your Python code with this open source visualization tool.md b/translated/tech/20201102 Understand your Python code with this open source visualization tool.md similarity index 100% rename from sources/tech/20201102 Understand your Python code with this open source visualization tool.md rename to translated/tech/20201102 Understand your Python code with this open source visualization tool.md From 669c5f9e4c180f18826fe661283cf63fc66de576 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 10 Nov 2020 08:43:59 +0800 Subject: [PATCH 126/130] translated --- ...Detect New LUNs and SCSI Disks on Linux.md | 163 ------------------ ...Detect New LUNs and SCSI Disks on Linux.md | 163 ++++++++++++++++++ 2 files changed, 163 insertions(+), 163 deletions(-) delete mode 100644 sources/tech/20201105 How to Scan-Detect New LUNs and SCSI Disks on Linux.md create mode 100644 translated/tech/20201105 How to Scan-Detect New LUNs and SCSI Disks on Linux.md diff --git a/sources/tech/20201105 How to Scan-Detect New LUNs and SCSI Disks on Linux.md b/sources/tech/20201105 How to Scan-Detect New LUNs and SCSI Disks on Linux.md deleted file mode 100644 index bc63527249..0000000000 --- a/sources/tech/20201105 How to Scan-Detect New LUNs and SCSI Disks on Linux.md +++ /dev/null @@ -1,163 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to Scan/Detect New LUNs and SCSI Disks on Linux) -[#]: via: (https://www.2daygeek.com/scan-detect-luns-scsi-disks-on-redhat-centos-oracle-linux/) -[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) - -How to Scan/Detect New LUNs and SCSI Disks on Linux -====== - -When the Linux system has connected to the SAN (Storage Area Network) you need to rescan the iSCSI service to discover new LUNs. - -To do so, you must provide the WWN number of the Linux host and required LUN size to the storage team. - -The following article will help you [**find the WWN number of a Linux host**][1]. - -Once the storage team has mapped the LUNs with the given Linux host, they will provide you with the new LUN details. - -LUN in storage terms is referred to as serial-hex of LUN. - -You need to scan the SCSI host to find new LUNs assigned by the storage team. - -This can be done in two ways, scan each scsi host device or run the “rescan-scsi-bus.sh” script to detect new disks. - -After scanning they can be found under the “/dev/disk/by-id” directory. - -``` -# ll /dev/disk/by-id - -total 0 -lrwxrwxrwx 1 root root 10 Jul 9 17:52 scsi-60a98000486e542d4f5a2f47694d684b -> ../../sdah -lrwxrwxrwx 1 root root 9 Jul 9 17:52 scsi-60a98000486e542d4f5a2f47694d684c -> ../../sdw -. -. -lrwxrwxrwx 1 root root 10 Jul 9 17:52 scsi-60a98000486e542d4f5a2f47694d684d -> ../../sdjk -lrwxrwxrwx 1 root root 10 Jul 9 17:52 scsi-60a98000486e542d4f5a2f47694d684e -> ../../sdaa -lrwxrwxrwx 1 root root 9 Jul 9 17:52 scsi-60a98000486e542d4f5a2f47694d684f -> ../../sdh -``` - -Also, you can find them using the Multipath command if you already have them configured with Multipath. - -Multipath is mostly configured into the Oracle database server for better performance. - -``` -# multipath -ll - -60a98000486e542d4f5a2f47694d684b dm-37 NETAPP,LUN C-Mode -size=512G features='3 queue_if_no_path pg_init_retries 50' hwhandler='1 alua' wp=rw -|-+- policy='round-robin 0' prio=50 status=active -| |- 1:0:4:18 sdoe 128:416 active ready running -| |- 0:0:4:18 sdpq 131:256 active ready running -| |- 0:0:5:18 sdsr 135:496 active ready running -| `- 1:0:5:18 sdsq 135:480 active ready running -`-+- policy='round-robin 0' prio=10 status=enabled - |- 1:0:1:18 sdfw 131:32 active ready running - |- 1:0:0:18 sdci 69:96 active ready running - |- 0:0:1:18 sdbz 68:208 active ready running - |- 0:0:0:18 sds 65:32 active ready running - |- 1:0:3:18 sdmd 69:336 active ready running - |- 1:0:2:18 sdjj 8:464 active ready running - |- 0:0:3:34 sdjt 65:368 active ready running - `- 0:0:2:34 sdgi 131:224 active ready running -``` - -This procedure works on Red Hat 6.x, 7.x and 8.x (RHEL – Red Hat Enterprise Linux) based systems such as CentOS and Oracle Linux. - -### Method-1: How to Scan New LUNs and SCSI Disks on Linux Using the “/sys” Class File - -The sysfs filesystem is a pseudo-filesystem which provides an interface to kernel data structures. - -The files under sysfs provide information about devices, kernel modules, filesystems, and other kernel components. - -The sysfs filesystem is commonly mounted at “/sys”. Typically, it is mounted automatically by the system. - -You can use the echo command to scan each scsi host device as shown below. - -``` -# echo "- - -" > /sys/class/scsi_host/host[n]/scan -``` - -When you run the above command that rescan everything, the three dash (“- – -“) refers the wildcard option. These values would be as follow. - -``` -# echo "c t l" > /sys/class/scsi_host/host[n]/scan -``` - -where - - * **c –** Channel on the HBA - * **t –** SCSI target ID - * **l –** LUN ID - * **n –** HBA number - - - -Run the below command to find all the host bus number on your system. - -``` -# ls /sys/class/scsi_host -host0 host1 host2 -``` - -Once you get the host bus number, run the following command to discover new disks. - -``` -# echo "- - -" > /sys/class/scsi_host/host0/scan -# echo "- - -" > /sys/class/scsi_host/host1/scan -# echo "- - -" > /sys/class/scsi_host/host2/scan -``` - -Also, it can be scanned using “for loop” with a single command. - -``` -# for host in ls /sys/class/scsi_host/;do echo "- - -" >/sys/class/scsi_host/${host}/scan; done -``` - -You can check them using the **[ls command][2]** as mentioned at the beginning of the article. - -``` -# ls /dev/disk/by-id | grep -i "serial-hex of LUN" -``` - -### Method-2: How to Scan New LUNs and SCSI Disks on Linux Using the rescan-scsi-bus.sh Script - -Make sure you have already installed the “sg3_utils” package to use this script. Otherwise, run the following command to install it. - -For **RHEL/CentOS 6/7** systems, use the **[yum command][3]** to install sg3_utils. - -``` -# yum install -y sg3_utils -``` - -For **RHEL/CentOS 8** and Fedora systems, use the **[dnf command][4]** to install sg3_utils. - -``` -# dnf install -y sg3_utils -``` - -Now you can rescan the LUNs using the rescan-scsi-bus.sh script. - -``` -# ./rescan-scsi-bus.sh -``` - --------------------------------------------------------------------------------- - -via: https://www.2daygeek.com/scan-detect-luns-scsi-disks-on-redhat-centos-oracle-linux/ - -作者:[Magesh Maruthamuthu][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.2daygeek.com/author/magesh/ -[b]: https://github.com/lujun9972 -[1]: https://www.2daygeek.com/how-to-find-wwn-wwnn-wwpn-number-of-hba-card-in-linux/ -[2]: https://www.2daygeek.com/linux-unix-ls-command-display-directory-contents/ -[3]: https://www.2daygeek.com/linux-yum-command-examples-manage-packages-rhel-centos-systems/ -[4]: https://www.2daygeek.com/linux-dnf-command-examples-manage-packages-fedora-centos-rhel-systems/ diff --git a/translated/tech/20201105 How to Scan-Detect New LUNs and SCSI Disks on Linux.md b/translated/tech/20201105 How to Scan-Detect New LUNs and SCSI Disks on Linux.md new file mode 100644 index 0000000000..9fc298c259 --- /dev/null +++ b/translated/tech/20201105 How to Scan-Detect New LUNs and SCSI Disks on Linux.md @@ -0,0 +1,163 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to Scan/Detect New LUNs and SCSI Disks on Linux) +[#]: via: (https://www.2daygeek.com/scan-detect-luns-scsi-disks-on-redhat-centos-oracle-linux/) +[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) + +如何在 Linux 上扫描/检测新的 LUN 和 SCSI 磁盘? +====== + +当 Linux 系统连接到 SAN(存储区域网络)后,你需要重新扫描 iSCSI 服务以发现新的 LUN。 + +要做到这一点,你必须向存储团队提供 Linux 主机的 WWN 号和所需的 LUN 大小。 + +下文将帮助你[**查找 Linux 主机的 WWN 号**][1]。 + +当存储团队将 LUN 与给定的 Linux 主机进行了映射,他们将为你提供新的 LUN 详细信息。 + +LUN 在存储术语中被称为 LUN 的串行十六进制。 + +你需要扫描 SCSI 主机来寻找存储团队分配的新 LUN。 + +这可以通过两种方式进行,扫描每个 scsi 主机设备或运行 “rescan-scsi-bus.sh” 脚本来检测新磁盘。 + +扫描后可以在 “/dev/disk/by-id” 目录下找到它们。 + +``` +# ll /dev/disk/by-id + +total 0 +lrwxrwxrwx 1 root root 10 Jul 9 17:52 scsi-60a98000486e542d4f5a2f47694d684b -> ../../sdah +lrwxrwxrwx 1 root root 9 Jul 9 17:52 scsi-60a98000486e542d4f5a2f47694d684c -> ../../sdw +. +. +lrwxrwxrwx 1 root root 10 Jul 9 17:52 scsi-60a98000486e542d4f5a2f47694d684d -> ../../sdjk +lrwxrwxrwx 1 root root 10 Jul 9 17:52 scsi-60a98000486e542d4f5a2f47694d684e -> ../../sdaa +lrwxrwxrwx 1 root root 9 Jul 9 17:52 scsi-60a98000486e542d4f5a2f47694d684f -> ../../sdh +``` + +另外,如果你已经用 Multipath 配置了它们,那么可以用 Multipath 命令找到。 + +Multipath 主要是配置到 Oracle 数据库服务器中,以提高性能。 + +``` +# multipath -ll + +60a98000486e542d4f5a2f47694d684b dm-37 NETAPP,LUN C-Mode +size=512G features='3 queue_if_no_path pg_init_retries 50' hwhandler='1 alua' wp=rw +|-+- policy='round-robin 0' prio=50 status=active +| |- 1:0:4:18 sdoe 128:416 active ready running +| |- 0:0:4:18 sdpq 131:256 active ready running +| |- 0:0:5:18 sdsr 135:496 active ready running +| `- 1:0:5:18 sdsq 135:480 active ready running +`-+- policy='round-robin 0' prio=10 status=enabled +|- 1:0:1:18 sdfw 131:32 active ready running +|- 1:0:0:18 sdci 69:96 active ready running +|- 0:0:1:18 sdbz 68:208 active ready running +|- 0:0:0:18 sds 65:32 active ready running +|- 1:0:3:18 sdmd 69:336 active ready running +|- 1:0:2:18 sdjj 8:464 active ready running +|- 0:0:3:34 sdjt 65:368 active ready running +`- 0:0:2:34 sdgi 131:224 active ready running +``` + +这个过程适用于基于 Red Hat 6.x、7.x 和 8.x(RHEL - Red Hat Enterprise Linux)的系统,如 CentOS 和 Oracle Linux。 + +### 方法 1:如何使用 “/sys” 类文件在 Linux 上扫描新的 LUN 和 SCSI 磁盘 + +sysfs 文件系统是一个伪文件系统,它为内核数据结构提供了一个接口。 + +sysfs 下的文件提供了关于设备、内核模块、文件系统和其他内核组件的信息。 + +sysfs 文件系统通常被挂载在 “/sys”。通常,它是由系统自动挂载的。 + +你可以使用 echo 命令来扫描每个 scsi 主机设备,如下所示: + +``` +# echo "- - -" > /sys/class/scsi_host/host[n]/scan +``` + +当你运行上面的重新扫描所有的命令时,三个破折号(“- – -“)指的是通配符选项。这些值如下: + +``` +# echo "c t l" > /sys/class/scsi_host/host[n]/scan +``` + +这里: + +* **c –** HBA 上的通道 +* **t –** SCSI 目标 ID +* **l –** LUN ID +* **n –** HBA 编号 + + + +运行下面的命令来查找系统中所有的主机总线编号: + +``` +# ls /sys/class/scsi_host +host0 host1 host2 +``` + +得到主机总线编号后,运行以下命令来发现新的磁盘: + +``` +# echo "- - -" > /sys/class/scsi_host/host0/scan +# echo "- - -" > /sys/class/scsi_host/host1/scan +# echo "- - -" > /sys/class/scsi_host/host2/scan +``` + +另外,还可以用 ”for 循环“用一条命令进行扫描。 + +``` +# for host in ls /sys/class/scsi_host/;do echo "- - -" >/sys/class/scsi_host/${host}/scan; done +``` + +你可以使用文章开头提到的 **[ls 命令][2]**来检查它们。 + +``` +# ls /dev/disk/by-id | grep -i "serial-hex of LUN" +``` + +### 方法 2:如何使用 rescan-scsi-bus.sh 脚本在 Linux 上扫描新的 LUN 和 SCSI 磁盘 + +确保你已经安装了 “sg3_utils” 包来使用这个脚本。否则,运行以下命令来安装它。 + +对于 **RHEL/CentOS 6/7** 系统,使用 **[yum 命令][3]**安装 sg3_utils。 + +``` +# yum install -y sg3_utils +``` + +对于 **RHEL/CentOS 8** 和 Fedora 系统,使用 **[dnf 命令][4]**安装 sg3_utils。 + +``` +# dnf install -y sg3_utils +``` + +现在你可以使用 rescan-scsi-bus.sh 脚本重新扫描 LUN。 + +``` +# ./rescan-scsi-bus.sh +``` + +-------------------------------------------------------------------------------- + +via: https://www.2daygeek.com/scan-detect-luns-scsi-disks-on-redhat-centos-oracle-linux/ + +作者:[Magesh Maruthamuthu][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.2daygeek.com/author/magesh/ +[b]: https://github.com/lujun9972 +[1]: https://www.2daygeek.com/how-to-find-wwn-wwnn-wwpn-number-of-hba-card-in-linux/ +[2]: https://www.2daygeek.com/linux-unix-ls-command-display-directory-contents/ +[3]: https://www.2daygeek.com/linux-yum-command-examples-manage-packages-rhel-centos-systems/ +[4]: https://www.2daygeek.com/linux-dnf-command-examples-manage-packages-fedora-centos-rhel-systems/ \ No newline at end of file From 1a28012bbf1b62dda9341eefd1b67e053a786da9 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 10 Nov 2020 08:53:49 +0800 Subject: [PATCH 127/130] translating --- ...01103 GnuCash- A Powerful Open Source Accounting Software.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20201103 GnuCash- A Powerful Open Source Accounting Software.md b/sources/tech/20201103 GnuCash- A Powerful Open Source Accounting Software.md index 0fb7826743..56be77dbaa 100644 --- a/sources/tech/20201103 GnuCash- A Powerful Open Source Accounting Software.md +++ b/sources/tech/20201103 GnuCash- A Powerful Open Source Accounting Software.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From cd7304a7892aab0827bf8c5fb396e390050fa4da Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 10 Nov 2020 09:24:28 +0800 Subject: [PATCH 128/130] PUB @wxy https://linux.cn/article-12809-1.html --- ...nux Jargon Buster- What are GUI, CLI and TUI in Linux.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) rename {translated/tech => published}/20201103 Linux Jargon Buster- What are GUI, CLI and TUI in Linux.md (97%) diff --git a/translated/tech/20201103 Linux Jargon Buster- What are GUI, CLI and TUI in Linux.md b/published/20201103 Linux Jargon Buster- What are GUI, CLI and TUI in Linux.md similarity index 97% rename from translated/tech/20201103 Linux Jargon Buster- What are GUI, CLI and TUI in Linux.md rename to published/20201103 Linux Jargon Buster- What are GUI, CLI and TUI in Linux.md index 50fade6de8..b75edaa882 100644 --- a/translated/tech/20201103 Linux Jargon Buster- What are GUI, CLI and TUI in Linux.md +++ b/published/20201103 Linux Jargon Buster- What are GUI, CLI and TUI in Linux.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12809-1.html) [#]: subject: (Linux Jargon Buster: What are GUI, CLI and TUI in Linux?) [#]: via: (https://itsfoss.com/gui-cli-tui/) [#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) @@ -10,6 +10,8 @@ Linux 黑话解释:什么是 Linux 中的 GUI、CLI 和 TUI? ====== +![](https://img.linux.net.cn/data/attachment/album/202011/10/092051zw3ofb365a63fahl.jpg) + 当你开始使用 Linux 并关注关于 Linux 的网站和论坛时,你会经常遇到诸如 GUI、CLI 等术语,有时还会遇到 TUI。 这一章的 Linux 黑话解释简要解释了这些术语,以便你作为一个(新的)Linux 用户在使用这些缩写词时能够更好地理解上下文。 From e02155eba76b6ca6a393f5cfe651206abd93228a Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 10 Nov 2020 09:57:26 +0800 Subject: [PATCH 129/130] PRF @geekpi --- ...ol new projects to try in COPR from October 2020.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/translated/tech/20201102 4 cool new projects to try in COPR from October 2020.md b/translated/tech/20201102 4 cool new projects to try in COPR from October 2020.md index de7397e856..739c8cf742 100644 --- a/translated/tech/20201102 4 cool new projects to try in COPR from October 2020.md +++ b/translated/tech/20201102 4 cool new projects to try in COPR from October 2020.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (4 cool new projects to try in COPR from October 2020) @@ -33,13 +33,13 @@ sudo dnf install dialect ### GitHub CLI -[gh][7] 是一个官方的 GitHub 命令行客户端。它在终端提供了快速的访问,并完全控制你的项目问题、拉取请求和发布。问题(和其他东西)也可以在浏览器中轻松查看,以获得更标准的用户界面,或与他人分享。 +[gh][7] 是一个官方的 GitHub 命令行客户端。它在终端提供了快速的访问,并完全控制你的项目问题、拉取请求和发布。议题(和其他东西)也可以在浏览器中轻松查看,以获得更标准的用户界面,或与他人分享。 ![][8] #### 安装说明 -目前[仓库][9]在 Fedora 33 和 Fedora Rawhide 中提供了 _gh_ 。要安装它,请使用下面的命令: +目前[仓库][9]在 Fedora 33 和 Fedora Rawhide 中提供了 `gh` 。要安装它,请使用下面的命令: ``` sudo dnf copr enable jdoss/github-cli @@ -69,7 +69,7 @@ sudo dnf install glide-rs #### 安装说明 -目前[仓库][15]在 Fedora 31、32、33 和 Rawhide 还有 EPEL8 中提供了 _vim-ale_ 。要安装它,请使用下面的命令: +目前[仓库][15]在 Fedora 31、32、33 和 Rawhide 还有 EPEL8 中提供了 `vim-ale` 。要安装它,请使用下面的命令: ``` sudo dnf copr enable praiskup/vim-ale @@ -85,7 +85,7 @@ via: https://fedoramagazine.org/4-cool-new-projects-to-try-in-copr-from-october- 作者:[frostyx][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/) 荣誉推出 From 3b38d490aa378415391e43f8b1d1fbdf51eb24d2 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 10 Nov 2020 09:57:56 +0800 Subject: [PATCH 130/130] PUB @geekpi https://linux.cn/article-12810-1.html --- ...02 4 cool new projects to try in COPR from October 2020.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20201102 4 cool new projects to try in COPR from October 2020.md (98%) diff --git a/translated/tech/20201102 4 cool new projects to try in COPR from October 2020.md b/published/20201102 4 cool new projects to try in COPR from October 2020.md similarity index 98% rename from translated/tech/20201102 4 cool new projects to try in COPR from October 2020.md rename to published/20201102 4 cool new projects to try in COPR from October 2020.md index 739c8cf742..a3e17071d5 100644 --- a/translated/tech/20201102 4 cool new projects to try in COPR from October 2020.md +++ b/published/20201102 4 cool new projects to try in COPR from October 2020.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12810-1.html) [#]: subject: (4 cool new projects to try in COPR from October 2020) [#]: via: (https://fedoramagazine.org/4-cool-new-projects-to-try-in-copr-from-october-2020/) [#]: author: (frostyx https://fedoramagazine.org/author/frostyx/)