mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-03-27 02:30:10 +08:00
Merge remote-tracking branch 'LCTT/master'
This commit is contained in:
commit
290ed8fabd
@ -118,7 +118,7 @@ find /etc -iname "*.service" 1> services.txt 2>&1
|
||||
|
||||
它再次出现:`&` 发信号通知 Bash `1` 是目标文件描述符。
|
||||
|
||||
标准文件描述符的另一个问题是,当你从一个管道传输到另一个时,你执行此操作的顺序有点违反直觉。例如,按照上面的命令。它看起来像是错误的方式。你也行像这样阅读它:“将输出导向到文件,然后将错误导向到标准输出。” 看起来错误输出会在后面,并且在输出到标准输出(`1`)已经完成时才发送。
|
||||
标准文件描述符的另一个问题是,当你从一个管道传输到另一个时,你执行此操作的顺序有点违反直觉。例如,按照上面的命令。它看起来像是错误的方式。你应该像这样阅读它:“将输出导向到文件,然后将错误导向到标准输出。” 看起来错误输出会在后面,并且在输出到标准输出(`1`)已经完成时才发送。
|
||||
|
||||
但这不是文件描述符的工作方式。文件描述符不是文件的占位符,而是文件的输入和(或)输出通道。在这种情况下,当你做 `1> services.txt` 时,你的意思是 “打开一个写管道到 `services.txt` 并保持打开状态”。`1` 是你要使用的管道的名称,它将保持打开状态直到该行的结尾。
|
||||
|
||||
|
@ -0,0 +1,76 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Why CLAs aren't good for open source)
|
||||
[#]: via: (https://opensource.com/article/19/2/cla-problems)
|
||||
[#]: author: (Richard Fontana https://opensource.com/users/fontana)
|
||||
|
||||
Why CLAs aren't good for open source
|
||||
======
|
||||
Few legal topics in open source are as controversial as contributor license agreements.
|
||||

|
||||
|
||||
Few legal topics in open source are as controversial as [contributor license agreements][1] (CLAs). Unless you count the special historical case of the [Fedora Project Contributor Agreement][2] (which I've always seen as an un-CLA), or, like [Karl Fogel][3], you classify the [DCO][4] as a [type of CLA][5], today Red Hat makes no use of CLAs for the projects it maintains.
|
||||
|
||||
It wasn't always so. Red Hat's earliest projects followed the traditional practice I've called "inbound=outbound," in which contributions to a project are simply provided under the project's open source license with no execution of an external, non-FOSS contract required. But in the early 2000s, Red Hat began experimenting with the use of contributor agreements. Fedora started requiring contributors to sign a CLA based on the widely adapted [Apache ICLA][6], while a Free Software Foundation-derived copyright assignment agreement and a pair of bespoke CLAs were inherited from the Cygnus and JBoss acquisitions, respectively. We even took [a few steps][7] towards adopting an Apache-style CLA across the rapidly growing set of Red Hat-led projects.
|
||||
|
||||
This came to an end, in large part because those of us on the Red Hat legal team heard and understood the concerns and objections raised by Red Hat engineers and the wider technical community. We went on to become de facto leaders of what some have called the anti-CLA movement, marked notably by our [opposition to Project Harmony][8] and our [efforts][9] to get OpenStack to replace its CLA with the DCO. (We [reluctantly][10] sign tolerable upstream project CLAs out of practical necessity.)
|
||||
|
||||
### Why CLAs are problematic
|
||||
|
||||
Our choice not to use CLAs is a reflection of our values as an authentic open source company with deep roots in the free software movement. Over the years, many in the open source community have explained why CLAs, and the very similar mechanism of copyright assignment, are a bad policy for open source.
|
||||
|
||||
One reason is the red tape problem. Normally, open source development is characterized by frictionless contribution, which is enabled by inbound=outbound without imposition of further legal ceremony or process. This makes it relatively easy for new contributors to get involved in a project, allowing more effective growth of contributor communities and driving technical innovation upstream. Frictionless contribution is a key part of the advantage open source development holds over proprietary alternatives. But frictionless contribution is negated by CLAs. Having to sign an unusual legal agreement before a contribution can be accepted creates a bureaucratic hurdle that slows down development and discourages participation. This cost persists despite the growing use of automation by CLA-using projects.
|
||||
|
||||
CLAs also give rise to an asymmetry of legal power among a project's participants, which also discourages the growth of strong contributor and user communities around a project. With Apache-style CLAs, the company or organization leading the project gets special rights that other contributors do not receive, while those other contributors must shoulder certain legal obligations (in addition to the red tape burden) from which the project leader is exempt. The problem of asymmetry is most severe in copyleft projects, but it is present even when the outbound license is permissive.
|
||||
|
||||
When assessing the arguments for and against CLAs, bear in mind that today, as in the past, the vast majority of the open source code in any product originates in projects that follow the inbound=outbound practice. The use of CLAs by a relatively small number of projects causes collateral harm to all the others by signaling that, for some reason, open source licensing is insufficient to handle contributions flowing into a project.
|
||||
|
||||
### The case for CLAs
|
||||
|
||||
Since CLAs continue to be a minority practice and originate from outside open source community culture, I believe that CLA proponents should bear the burden of explaining why they are necessary or beneficial relative to their costs. I suspect that most companies using CLAs are merely emulating peer company behavior without critical examination. CLAs have an understandable, if superficial, appeal to risk-averse lawyers who are predisposed to favor greater formality, paper, and process regardless of the business costs. Still, some arguments in favor of CLAs are often advanced and deserve consideration.
|
||||
|
||||
**Easy relicensing:** If administered appropriately, Apache-style CLAs give the project steward effectively unlimited power to sublicense contributions under terms of the steward's choice. This is sometimes seen as desirable because of the potential need to relicense a project under some other open source license. But the value of easy relicensing has been greatly exaggerated by pointing to a few historical cases involving major relicensing campaigns undertaken by projects with an unusually large number of past contributors (all of which were successful without the use of a CLA). There are benefits in relicensing being hard because it results in stable legal expectations around a project and encourages projects to consult their contributor communities before undertaking significant legal policy changes. In any case, most inbound=outbound open source projects never attempt to relicense during their lifetime, and for the small number that do, relicensing will be relatively painless because typically the number of past contributors to contact will not be large.
|
||||
|
||||
**Provenance tracking:** It is sometimes claimed that CLAs enable a project to rigorously track the provenance of contributions, which purportedly has some legal benefit. It is unclear what is achieved by the use of CLAs in this regard that is not better handled through such non-CLA means as preserving Git commit history. And the DCO would seem to be much better suited to tracking contributions, given that it is normally used on a per-commit basis, while CLAs are signed once per contributor and are administratively separate from code contributions. Moreover, provenance tracking is often described as though it were a benefit for the public, yet I know of no case where a project provides transparent, ready public access to CLA acceptance records.
|
||||
|
||||
**License revocation:** Some CLA advocates warn of the prospect that a contributor may someday attempt to revoke a past license grant. To the extent that the concern is about largely judgment-proof individual contributors with no corporate affiliation, it is not clear why an Apache-style CLA provides more meaningful protection against this outcome compared to the use of an open source license. And, as with so many of the legal risks raised in discussions of open source legal policy, this appears to be a phantom risk. I have heard of only a few purported attempts at license revocation over the years, all of which were resolved quickly when the contributor backed down in the face of community pressure.
|
||||
|
||||
**Unauthorized employee contribution:** This is a special case of the license revocation issue and has recently become a point commonly raised by CLA advocates. When an employee contributes to an upstream project, normally the employer owns the copyrights and patents for which the project needs licenses, and only certain executives are authorized to grant such licenses. Suppose an employee contributed proprietary code to a project without approval from the employer, and the employer later discovers this and demands removal of the contribution or sues the project's users. This risk of unauthorized contributions is thought to be minimized by use of something like the [Apache CCLA][11] with its representations and signature requirement, coupled with some adequate review process to ascertain that the CCLA signer likely was authorized to sign (a step which I suspect is not meaningfully undertaken by most CLA-using companies).
|
||||
|
||||
Based on common sense and common experience, I contend that in nearly all cases today, employee contributions are done with the actual or constructive knowledge and consent of the employer. If there were an atmosphere of high litigation risk surrounding open source software, perhaps this risk should be taken more seriously, but litigation arising out of open source projects remains remarkably uncommon.
|
||||
|
||||
More to the point, I know of no case where an allegation of copyright or patent infringement against an inbound=outbound project, not stemming from an alleged open source license violation, would have been prevented by use of a CLA. Patent risk, in particular, is often cited by CLA proponents when pointing to the risk of unauthorized contributions, but the patent license grants in Apache-style CLAs are, by design, quite narrow in scope. Moreover, corporate contributions to an open source project will typically be few in number, small in size (and thus easily replaceable), and likely to be discarded as time goes on.
|
||||
|
||||
### Alternatives
|
||||
|
||||
If your company does not buy into the anti-CLA case and cannot get comfortable with the simple use of inbound=outbound, there are alternatives to resorting to an asymmetric and administratively burdensome Apache-style CLA requirement. The use of the DCO as a complement to inbound=outbound addresses at least some of the concerns of risk-averse CLA advocates. If you must use a true CLA, there is no need to use the Apache model (let alone a [monstrous derivative][10] of it). Consider the non-specification core of the [Eclipse Contributor Agreement][12]—essentially the DCO wrapped inside a CLA—or the Software Freedom Conservancy's [Selenium CLA][13], which merely ceremonializes an inbound=outbound contribution policy.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/19/2/cla-problems
|
||||
|
||||
作者:[Richard Fontana][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/fontana
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/article/18/3/cla-vs-dco-whats-difference
|
||||
[2]: https://opensource.com/law/10/6/new-contributor-agreement-fedora
|
||||
[3]: https://www.red-bean.com/kfogel/
|
||||
[4]: https://developercertificate.org
|
||||
[5]: https://producingoss.com/en/contributor-agreements.html#developer-certificate-of-origin
|
||||
[6]: https://www.apache.org/licenses/icla.pdf
|
||||
[7]: https://www.freeipa.org/page/Why_CLA%3F
|
||||
[8]: https://opensource.com/law/11/7/trouble-harmony-part-1
|
||||
[9]: https://wiki.openstack.org/wiki/OpenStackAndItsCLA
|
||||
[10]: https://opensource.com/article/19/1/cla-proliferation
|
||||
[11]: https://www.apache.org/licenses/cla-corporate.txt
|
||||
[12]: https://www.eclipse.org/legal/ECA.php
|
||||
[13]: https://docs.google.com/forms/d/e/1FAIpQLSd2FsN12NzjCs450ZmJzkJNulmRC8r8l8NYwVW5KWNX7XDiUw/viewform?hl=en_US&formkey=dFFjXzBzM1VwekFlOWFWMjFFRjJMRFE6MQ#gid=0
|
@ -0,0 +1,73 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (What's happening in the OpenStack community?)
|
||||
[#]: via: (https://opensource.com/article/19/3/whats-happening-openstack)
|
||||
[#]: author: (Jonathan Bryce https://opensource.com/users/jonathan-bryce)
|
||||
|
||||
What's happening in the OpenStack community?
|
||||
======
|
||||
|
||||
In many ways, 2018 was a transformative year for the OpenStack Foundation.
|
||||
|
||||

|
||||
|
||||
Since 2010, the OpenStack community has been building open source software to run cloud computing infrastructure. Initially, the focus was public and private clouds, but open infrastructure has been pulled into many new important use cases like telecoms, 5G, and manufacturing IoT.
|
||||
|
||||
As OpenStack software matured and grew in scope to support new technologies like bare metal provisioning and container infrastructure, the community widened its thinking to embrace users who deploy and run the software in addition to the developers who build the software. Questions like, "What problems are users trying to solve?" "Which technologies are users trying to integrate?" and "What are the gaps?" began to drive the community's thinking and decision making.
|
||||
|
||||
In response to those questions, the OSF reorganized its approach and created a new "open infrastructure" framework focused on use cases, including edge, container infrastructure, CI/CD, and private and hybrid cloud. And, for the first time, the OSF is hosting open source projects outside of the OpenStack project.
|
||||
|
||||
Following are three highlights from the [OSF 2018 Annual Report][1]; I encourage you to read the entire report for more detailed information about what's new.
|
||||
|
||||
### Pilot projects
|
||||
|
||||
On the heels of launching [Kata Containers][2] in December 2017, the OSF launched three pilot projects in 2018—[Zuul][3], [StarlingX][4], and [Airship][5]—that help further our goals of taking our technology into additional relevant markets. Each project follows the tenets we consider key to the success of true open source, [the Four Opens][6]: open design, open collaboration, open development, and open source. While these efforts are still new, they have been extremely valuable in helping us learn how we should expand the scope of the OSF, as well as showing others the kind of approach we will take.
|
||||
|
||||
While the OpenStack project remained at the core of the team's focus, pilot projects are helping expand usage of open infrastructure across markets and already benefiting the OpenStack community. This has attracted dozens of new developers to the open infrastructure community, which will ultimately benefit the OpenStack community and users.
|
||||
|
||||
There is direct benefit from these contributors working upstream in OpenStack, such as through StarlingX, as well as indirect benefit from the relationships we've built with the Kubernetes community through the Kata Containers project. Airship is similarly bridging the gaps between the Kubernetes and OpenStack ecosystems. This shows users how the technologies work together. A rise in contributions to Zuul has provided the engine for OpenStack CI and keeps our development running smoothly.
|
||||
|
||||
### Containers collaboration
|
||||
|
||||
In addition to investing in new pilot projects, we continued efforts to work with key adjacent projects in 2018, and we made particularly good progress with Kubernetes. OSF staffer Chris Hoge helps lead the cloud provider special interest group, where he has helped standardize how Kubernetes deployments expect to run on top of various infrastructure. This has clarified OpenStack's place in the Kubernetes ecosystem and led to valuable integration points, like having OpenStack as part of the Kubernetes release testing process.
|
||||
|
||||
Additionally, OpenStack Magnum was certified as a Kubernetes installer by the CNCF. Through the Kata Containers community, we have deepened these relationships into additional areas within the container ecosystem resulting in a number of companies getting involved for the first time.
|
||||
|
||||
### Evolving events
|
||||
|
||||
We knew heading into 2018 that the environment around our events was changing and we needed to respond. During the year, we held two successful project team gatherings (PTGs) in Dublin and Denver, reaching capacity for both events while also including new projects and OpenStack operators. We held OpenStack Summits in Vancouver and Berlin, both experiencing increases in attendance and project diversity since Sydney in 2017, with each Summit including more than 30 open source projects. Recognizing this broader audience and the OSF's evolving strategy, the OpenStack Summit was renamed the [Open Infrastructure Summit][7], beginning with the Denver event coming up in April.
|
||||
|
||||
In 2018, we boosted investment in China, onboarding a China Community Manager based in Shanghai and hosting a strategy day in Beijing with 30+ attendees from Gold and Platinum Members in China. This effort will continue in 2019 as we host our first Summit in China: the [Open Infrastructure Summit Shanghai][8] in November.
|
||||
|
||||
We also worked with the community in 2018 to define a new model for events to maximize participation while saving on travel and expenses for the individuals and companies who are increasingly stretched across multiple open source communities. We arrived at a plan that we will implement and iterate on in 2019 where we will collocate PTGs as standalone events adjacent to our Open Infrastructure Summits.
|
||||
|
||||
### Looking ahead
|
||||
|
||||
We've seen impressive progress, but the biggest accomplishment might be in establishing a framework for the future of the foundation itself. In 2018, we advanced the open infrastructure mission by establishing OSF as an effective place to collaborate for CI/CD, container infrastructure, and edge computing, in addition to the traditional public and private cloud use cases. The open infrastructure approach opened a lot of doors in 2018, from the initial release of software from each pilot project, to live 5G demos, to engagement with hyperscale public cloud providers.
|
||||
|
||||
Ultimately, our value comes from the effectiveness of our communities and the software they produce. As 2019 unfolds, our community is excited to apply learnings from 2018 to the benefit of developers, users, and the commercial ecosystem across all our projects.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/19/3/whats-happening-openstack
|
||||
|
||||
作者:[Jonathan Bryce][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/jonathan-bryce
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.openstack.org/foundation/2018-openstack-foundation-annual-report
|
||||
[2]: https://katacontainers.io/
|
||||
[3]: https://zuul-ci.org/
|
||||
[4]: https://www.starlingx.io/
|
||||
[5]: https://www.airshipit.org/
|
||||
[6]: https://www.openstack.org/four-opens/
|
||||
[7]: https://www.openstack.org/summit/denver-2019/
|
||||
[8]: https://www.openstack.org/summit/shanghai-2019
|
@ -1,5 +1,5 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
@ -1,135 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (An Automated Way To Install Essential Applications On Ubuntu)
|
||||
[#]: via: (https://www.ostechnix.com/an-automated-way-to-install-essential-applications-on-ubuntu/)
|
||||
[#]: author: (SK https://www.ostechnix.com/author/sk/)
|
||||
|
||||
An Automated Way To Install Essential Applications On Ubuntu
|
||||
======
|
||||

|
||||
|
||||
The default Ubuntu installation doesn’t come with all essential applications pre-installed . You may need to spend few hours on Internet or ask any Linux user’s help to find and install the necessary applications for your Ubuntu box. If you’re newbie, then you certainly need to spend more time to learn how to search and install applications either from command line (using apt-get or dpkg) or from the Ubuntu software center. Some users, especially newbies, might want to easily and quickly install every applications they like. If you’re one of them, no worries. In this guide, we will see how to install essential applications on Ubuntu using a simple command line utility called **“Alfred”**.
|
||||
|
||||
Alfred is a free, open source script written in **Python** programming language. It uses **Zenity** to create a simple graphical interface that allows the users to easily select and install the applications of their choice with a few mouse clicks. You need not to spend hours to search for all essential applications, PPAs, debs, AppImage, snaps or flatpaks. Alfred brings all common applications, tools and utilities under one-roof and automatically installs the selected applications. If you’re a newbie who is recently migrated from Windows to Ubuntu Linux, Alfred helps you to do an unattended software installation on a freshly installed Ubuntu system, without much user intervention. Please be mindful that there is also a Mac OS app with similar name, but both serves different purposes.
|
||||
|
||||
### Installing Alfred On Ubuntu
|
||||
|
||||
Alfred installation is easy! Just download the script and launch it. It is that simple.
|
||||
|
||||
```
|
||||
$ wget https://raw.githubusercontent.com/derkomai/alfred/master/alfred.py
|
||||
|
||||
$ python3 alfred.py
|
||||
```
|
||||
|
||||
Alternatively, download the script using wget as shown above and just move the **alfred.py** file to your $PATH:
|
||||
|
||||
```
|
||||
$ sudo cp alfred.py /usr/local/bin/alfred
|
||||
```
|
||||
|
||||
Make it executable:
|
||||
|
||||
```
|
||||
$ sudo chmod +x /usr/local/bin/alfred
|
||||
```
|
||||
|
||||
And, launch it using command:
|
||||
|
||||
```
|
||||
$ alfred
|
||||
```
|
||||
|
||||
### Easily And Quickly Install Essential Applications On Ubuntu Using Alfred Script
|
||||
|
||||
Launch Alfred script as described in the installation section above. This is how Alfred default interface looks like.
|
||||
|
||||
![][2]
|
||||
|
||||
As you can see, Alfred lists a lot of most commonly used application types such as,
|
||||
|
||||
* Web browsers,
|
||||
* Mail clients,
|
||||
* Messengers,
|
||||
* Cloud storage clients,
|
||||
* Hardware drivers,
|
||||
* Codecs,
|
||||
* Developer tools,
|
||||
* Android,
|
||||
* Text editors,
|
||||
* Git,
|
||||
* Kernel update tool,
|
||||
* Audio/video players,
|
||||
* Screenshot tools,
|
||||
* Screen recorders,
|
||||
* Video encoders,
|
||||
* Streaming apps,
|
||||
* 3D modelling and animation tools,
|
||||
* Image viewers and editors,
|
||||
* CAD software,
|
||||
* Pdf tools,
|
||||
* Gaming emulators,
|
||||
* Disk management tools,
|
||||
* Encryption tools,
|
||||
* Password managers,
|
||||
* Archive tools,
|
||||
* Ftp software,
|
||||
* System resource monitors,
|
||||
* Application launchers and many.
|
||||
|
||||
|
||||
|
||||
You can pick any one or multiple applications of your choice and install them at once. Here, I am going to install the ‘Developer bundle’, hence I chose it and click OK button.
|
||||
|
||||
![][3]
|
||||
|
||||
Now, Alfred script will automatically add the necessary repositories, ppas on your Ubuntu system and start installing the selected applications.
|
||||
|
||||
![][4]
|
||||
|
||||
Once the installation is completed, you will see the following message.
|
||||
|
||||
![][5]
|
||||
|
||||
Congratulations! The selected packages have been installed.
|
||||
|
||||
You can [**check recently installed applications**][6] on Ubuntu using the following command:
|
||||
|
||||
```
|
||||
$ grep " install " /var/log/dpkg.log
|
||||
```
|
||||
|
||||
You may need to reboot your system in-order to use some of the installed applications. Similarly, you can install any applications from the list without much hazzle.
|
||||
|
||||
For your information, there is also a similar script named **post_install.sh** written by different developer. It is exactly same as Alfred, but provides a few different set of applications. Please check the following link for more details.
|
||||
|
||||
These two scripts allows the lazy users, especially newbies, to be able to easily and fastly install most common apps, tools, updates, utilities they want to use in their Ubuntu Linux with few mouse clicks away, and stop depending on the help of official or non-official documentations.
|
||||
|
||||
And, that’s all for now. Hope this was useful. More good stuffs to come. Stay tuned!
|
||||
|
||||
Cheers!
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.ostechnix.com/an-automated-way-to-install-essential-applications-on-ubuntu/
|
||||
|
||||
作者:[SK][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.ostechnix.com/author/sk/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
|
||||
[2]: http://www.ostechnix.com/wp-content/uploads/2019/02/alfred-1.png
|
||||
[3]: http://www.ostechnix.com/wp-content/uploads/2019/02/alfred-2.png
|
||||
[4]: http://www.ostechnix.com/wp-content/uploads/2019/02/alfred-4.png
|
||||
[5]: http://www.ostechnix.com/wp-content/uploads/2019/02/alfred-5-1.png
|
||||
[6]: https://www.ostechnix.com/list-installed-packages-sorted-installation-date-linux/
|
@ -0,0 +1,83 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (3 open source behavior-driven development tools)
|
||||
[#]: via: (https://opensource.com/article/19/2/behavior-driven-development-tools)
|
||||
[#]: author: (Christine Ketterlin Fisher https://opensource.com/users/cketterlin)
|
||||
|
||||
3 open source behavior-driven development tools
|
||||
======
|
||||
Having the right motivation is as important as choosing the right tool when implementing BDD.
|
||||

|
||||
|
||||
[Behavior-driven development][1] (BDD) seems very easy. Tests are written in an easily readable format that allows for feedback from product owners, business sponsors, and developers. Those tests are living documentation for your team, so you don't need requirements. The tools are easy to use and allow you to automate your test suite. Reports are generated with each test run to document every step and show you where tests are failing.
|
||||
|
||||
Quick recap: Easily readable! Living documentation! Automation! Reports! What could go wrong, and why isn't everybody doing this?
|
||||
|
||||
### Getting started with BDD
|
||||
|
||||
So, you're ready to jump in and can't wait to pick the right open source tool for your team. You want it to be easy to use, automate all your tests, and provide easily understandable reports for each test run. Great, let's get started!
|
||||
|
||||
Except, not so fast … First, what is your motivation for trying to implement BDD on your team? If the answer is simply to automate tests, go ahead and choose any of the tools listed below because chances are you're going to see minimal success in the long run.
|
||||
|
||||
### My first effort
|
||||
|
||||
I manage a team of business analysts (BA) and quality assurance (QA) engineers, but my background is on the business analysis side. About a year ago, I attended a talk where a developer talked about the benefits of BDD. He said that he and his team had given it a try during their last project. That should have been the first red flag, but I didn't realize it at the time. You cannot simply choose to "give BDD a try." It takes planning, preparation, and forethought into what you want your team to accomplish.
|
||||
|
||||
However, you can try various parts of BDD without a large investment, and I eventually realized he and his team had written feature files and automated those tests using Cucumber. I also learned it was an experiment done solely by the team's developers, not the BA or QA staff, which defeats the purpose of understanding the end user's behavior.
|
||||
|
||||
During the talk we were encouraged to try BDD, so my test analyst and I went to our boss and said we were willing to give it a shot. And then, we didn't know what to do. We had no guidance, no plan in place, and a leadership team who just wanted to automate testing. I don't think I need to tell you how this story ended. Actually, there wasn't even an end, just a slow fizzle after a few initial attempts at writing behavioral scenarios.
|
||||
|
||||
### A fresh start
|
||||
|
||||
Fast-forward a year, and I'm at a different company with a team of my own and BDD on the brain. I knew there was value there, but I also knew it went deeper than what I had initially been sold. I spent a lot of time thinking about how BDD could make a positive impact, not only on my team, but on our entire development team. Then I read [Discovery: Explore Behaviour Using Examples][2] by Gaspar Nagy and Seb Rose, and one of the first things I learned was that automation of tests is a benefit of BDD, but it should not be the main goal. No wonder we failed!
|
||||
|
||||
This book changed how I viewed BDD and helped me start to fill in the pieces I had been missing. We are now on the (hopefully correct!) path to implementing BDD on our team. It involves active involvement from our product owners, business analysts, and manual and automated testers and buy-in and support from our executive leadership. We have a plan in place for our approach and our measures of success.
|
||||
|
||||
We are still writing requirements (don't ever let anyone tell you that these scenarios can completely replace requirements!), but we are doing so with a more critical eye and evaluating where requirements and test scenarios overlap and how we can streamline the two.
|
||||
|
||||
I have told the team we cannot even try to automate these tests for at least two quarters, at which point we'll evaluate and determine whether we're ready to move forward or not. Our current priorities are defining our team's standard language, practicing writing given/when/then scenarios, learning the Gherkin syntax, determining where to store these tests, and investigating how to integrate these tests into our pipeline.
|
||||
|
||||
### 3 BDD tools to choose
|
||||
|
||||
At its core, BDD is a way to help the entire team understand the end user's actions and behaviors, which will lead to more clear requirements, tests, and ultimately higher-quality applications. Before you pick your tool, do your pre-work. Think about your motivation, and understand that while the different parts and pieces of BDD are fairly simple, integrating them into your team is more challenging and needs careful thought and planning. Also, think about where your people fit in.
|
||||
|
||||
Every organization has different roles, and BDD should not belong solely to developers nor test automation engineers. If you don't involve the business side, you're never going to gain the full benefit of this methodology. Once you have a strategy defined and are ready to move forward with automating your BDD scenarios, there are several open source tools for you to choose from.
|
||||
|
||||
#### Cucumber
|
||||
|
||||
[Cucumber][3] is probably the most recognized tool available that supports BDD. It is widely seen as a straightforward tool to learn and is easy to get started with. Cucumber relies on test scenarios that are written in plain text and follow the given/when/then format. Each scenario is an individual test. Scenarios are grouped into features, which is comparable to a test suite. Scenarios must be written in the Gherkin syntax for Cucumber to understand and execute the scenario's steps. The human-readable steps in the scenarios are tied to the step definitions in your code through the Cucumber framework. To successfully write and automate the scenarios, you need the right mix of business knowledge and technical ability. Identify the skill sets on your team to determine who will write and maintain the scenarios and who will automate them; most likely these should be managed by different roles. Because these tests are executed from the step definitions, reporting is very robust and can show you at which exact step your test failed. Cucumber works well with a variety of browser and API automation tools.
|
||||
|
||||
#### JBehave
|
||||
|
||||
[JBehave][4] is very similar to Cucumber. Scenarios are still written in the given/when/then format and are easily understandable by the entire team. JBehave supports Gherkin but also has its own JBehave syntax that can be used. Gherkin is more universal, but either option will work as long as you are consistent in your choice. JBehave has more configuration options than Cucumber, and its reports, although very detailed, need more configuration to get feedback from each step. JBehave is a powerful tool, but because it can be more customized, it is not quite as easy to get started with. Teams need to ask themselves exactly what features they need and whether or not learning the tool's various configurations is worth the time investment.
|
||||
|
||||
#### Gauge
|
||||
|
||||
Where Cucumber and JBehave are specifically designed to work with BDD, [Gauge][5] is not. If automation is your main goal (and not the entire BDD process), it is worth a look. Gauge tests are written in Markdown, which makes them easily readable. However, without a more standard format, such as the given/when/then BDD scenarios, tests can vary widely and, depending on the author, some tests will be much more digestible for business owners than others. Gauge works with multiple languages, so the automation team can leverage what they already use. Gauge also offers reporting with screenshots to show where the tests failed.
|
||||
|
||||
### What are your needs?
|
||||
|
||||
Implementing BDD allows the team to test the users' behaviors. This can be done without automating any tests at all, but when done correctly, can result in a powerful, reusable test suite. As a team, you will need to identify exactly what your automation needs are and whether or not you are truly going to use BDD or if you would rather focus on automating tests that are written in plain text. Either way, open source tools are available for you to use and to help support your testing evolution.
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/19/2/behavior-driven-development-tools
|
||||
|
||||
作者:[Christine Ketterlin Fisher][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/cketterlin
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://en.wikipedia.org/wiki/Behavior-driven_development
|
||||
[2]: https://www.amazon.com/gp/product/1983591254/ref=dbs_a_def_rwt_bibl_vppi_i0
|
||||
[3]: https://cucumber.io/
|
||||
[4]: https://jbehave.org/
|
||||
[5]: https://www.gauge.org/
|
@ -0,0 +1,75 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Connecting a VoIP phone directly to an Asterisk server)
|
||||
[#]: via: (https://feeding.cloud.geek.nz/posts/connecting-voip-phone-directly-to-asterisk-server/)
|
||||
[#]: author: (François Marier https://fmarier.org/)
|
||||
|
||||
Connecting a VoIP phone directly to an Asterisk server
|
||||
======
|
||||
|
||||
On my [Asterisk][1] server, I happen to have two on-board ethernet boards. Since I only used one of these, I decided to move my VoIP phone from the local network switch to being connected directly to the Asterisk server.
|
||||
|
||||
The main advantage is that this phone, running proprietary software of unknown quality, is no longer available on my general home network. Most importantly though, it no longer has access to the Internet, without my having to firewall it manually.
|
||||
|
||||
Here's how I configured everything.
|
||||
|
||||
### Private network configuration
|
||||
|
||||
On the server, I started by giving the second network interface a static IP address in `/etc/network/interfaces`:
|
||||
|
||||
```
|
||||
auto eth1
|
||||
iface eth1 inet static
|
||||
address 192.168.2.2
|
||||
netmask 255.255.255.0
|
||||
```
|
||||
|
||||
On the VoIP phone itself, I set the static IP address to `192.168.2.3` and the DNS server to `192.168.2.2`. I then updated the SIP registrar IP address to `192.168.2.2`.
|
||||
|
||||
The DNS server actually refers to an [unbound daemon][2] running on the Asterisk server. The only configuration change I had to make was to listen on the second interface and allow the VoIP phone in:
|
||||
|
||||
```
|
||||
server:
|
||||
interface: 127.0.0.1
|
||||
interface: 192.168.2.2
|
||||
access-control: 0.0.0.0/0 refuse
|
||||
access-control: 127.0.0.1/32 allow
|
||||
access-control: 192.168.2.3/32 allow
|
||||
```
|
||||
|
||||
Finally, I opened the right ports on the server's firewall in `/etc/network/iptables.up.rules`:
|
||||
|
||||
```
|
||||
-A INPUT -s 192.168.2.3/32 -p udp --dport 5060 -j ACCEPT
|
||||
-A INPUT -s 192.168.2.3/32 -p udp --dport 10000:20000 -j ACCEPT
|
||||
```
|
||||
|
||||
### Accessing the admin page
|
||||
|
||||
Now that the VoIP phone is no longer available on the local network, it's not possible to access its admin page. That's a good thing from a security point of view, but it's somewhat inconvenient.
|
||||
|
||||
Therefore I put the following in my `~/.ssh/config` to make the admin page available on `http://localhost:8081` after I connect to the Asterisk server via ssh:
|
||||
|
||||
```
|
||||
Host asterisk
|
||||
LocalForward 8081 192.168.2.3:80
|
||||
```
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://feeding.cloud.geek.nz/posts/connecting-voip-phone-directly-to-asterisk-server/
|
||||
|
||||
作者:[François Marier][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://fmarier.org/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.asterisk.org/
|
||||
[2]: https://feeding.cloud.geek.nz/posts/setting-up-your-own-dnssec-aware/
|
@ -0,0 +1,161 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (MiyoLinux: A Lightweight Distro with an Old-School Approach)
|
||||
[#]: via: (https://www.linux.com/blog/learn/2019/2/miyolinux-lightweight-distro-old-school-approach)
|
||||
[#]: author: (Jack Wallen https://www.linux.com/users/jlwallen)
|
||||
|
||||
MiyoLinux: A Lightweight Distro with an Old-School Approach
|
||||
======
|
||||

|
||||
|
||||
I must confess, although I often wax poetic about the old ways of the Linux desktop, I much prefer my distributions to help make my daily workflow as efficient as possible. Because of that, my taste in Linux desktop distributions veers very far toward the modern side of things. I want a distribution that integrates apps seamlessly, gives me notifications, looks great, and makes it easy to work with certain services that I use.
|
||||
|
||||
However, every so often it’s nice to dip my toes back into those old-school waters and remind myself why I fell in love with Linux in the first place. That’s precisely what [MiyoLinux][1] did for me recently. This lightweight distribution is based on [Devuan][2] and makes use of the [i3 Tiling Window Manager][3].
|
||||
|
||||
Why is it important that MiyoLinux is based on Devuan? Because that means it doesn’t use systemd. There are many within the Linux community who’d be happy to make the switch to an old-school Linux distribution that opts out of systemd. If that’s you, MiyoLinux might just charm you into submission.
|
||||
|
||||
But don’t think MiyoLinux is going to be as easy to get up and running as, say, Ubuntu Linux, Elementary OS, or Linux Mint. Although it’s not nearly as challenging as Arch or Gentoo, MiyoLinux does approach installation and basic usage a bit differently. Let’s take a look at how this particular distro handles things.
|
||||
|
||||
### Installation
|
||||
|
||||
The installation GUI of MiyoLinux is pretty basic. The first thing you’ll notice is that you are presented with a good amount of notes, regarding the usage of the MiyoLinux desktop. If you happen to be testing MiyoLinux via VirtualBox, you’ll wind up having to deal with the frustration of not being able to resize the window (Figure 1), as the Guest Additions cannot be installed. This also means mouse integration cannot be enabled during the installation, so you’ll have to tab through the windows and use your keyboard cursor keys and Enter key to make selections.
|
||||
|
||||
![MiyoLinux][5]
|
||||
|
||||
Figure 1: The first step in the MiyoLinux installation.
|
||||
|
||||
[Used with permission][6]
|
||||
|
||||
Once you click the Install MiyoLinux button, you’ll be prompted to continue using either ‘su” or sudo. Click the use sudo button to continue with the installation.
|
||||
|
||||
The next screen of importance is the Installation Options window (Figure 2), where you can select various options for MiyoLinux (such as encryption, file system labels, disable automatic login, etc.).
|
||||
|
||||
![Configuration][8]
|
||||
|
||||
Figure 2: Configuration Installation options for MiyoLinux.
|
||||
|
||||
[Used with permission][6]
|
||||
|
||||
The MiyoLinux installation does not include an automatic partition tool. Instead, you’ll be prompted to run either cfdisk or GParted (Figure 3). If you don’t know your way around cfdisk, select GParted and make use of the GUI tool.
|
||||
|
||||
![partitioning ][10]
|
||||
|
||||
Figure 3: Select your partitioning tool for MiyoLinux.
|
||||
|
||||
[Used with permission][6]
|
||||
|
||||
With your disk partitioned (Figure 4), you’ll be required to take care of the following steps:
|
||||
|
||||
* Configure the GRUB bootloader.
|
||||
|
||||
* Select the filesystem for the bootloader.
|
||||
|
||||
* Configure time zone and locales.
|
||||
|
||||
* Configure keyboard, keyboard language, and keyboard layout.
|
||||
|
||||
* Okay the installation.
|
||||
|
||||
|
||||
|
||||
|
||||
Once, you’ve okay’d the installation, all packages will be installed and you will then be prompted to install the bootloader. Following that, you’ll be prompted to configure the following:
|
||||
|
||||
* Hostname.
|
||||
|
||||
* User (Figure 5).
|
||||
|
||||
* Root password.
|
||||
|
||||
|
||||
|
||||
|
||||
With the above completed, reboot and log into your new MiyoLinux installation.
|
||||
|
||||
![hostname][12]
|
||||
|
||||
Figure 5: Configuring hostname and username.
|
||||
|
||||
[Creative Commons Zero][13]
|
||||
|
||||
### Usage
|
||||
|
||||
Once you’ve logged into the MiyoLinux desktop, you’ll find things get a bit less-than-user-friendly. This is by design. You won’t find any sort of mouse menu available anywhere on the desktop. Instead you use keyboard shortcuts to open the different types of menus. The Alt+m key combination will open the PMenu, which is what one would consider a fairly standard desktop mouse menu (Figure 6).
|
||||
|
||||
The Alt+d key combination will open the dmenu, a search tool at the top of the desktop, where you can scroll through (using the cursor keys) or search for an app you want to launch (Figure 7).
|
||||
|
||||
![dmenu][15]
|
||||
|
||||
Figure 7: The dmenu in action.
|
||||
|
||||
[Used with permission][6]
|
||||
|
||||
### Installing Apps
|
||||
|
||||
If you open the PMenu, click System > Synaptic Package Manager. From within that tool you can search for any app you want to install. However, if you find Synaptic doesn’t want to start from the PMenu, open the dmenu, search for terminal, and (once the terminal opens), issue the command sudo synaptic. That will get the package manager open, where you can start installing any applications you want (Figure 8).
|
||||
|
||||
![Synaptic][17]
|
||||
|
||||
Figure 8: The Synaptic Package Manager on MiyoLinux.
|
||||
|
||||
[Used with permission][6]
|
||||
|
||||
Of course, you can always install applications from the command line. MiyoLinux depends upon the Apt package manager, so installing applications is as easy as:
|
||||
|
||||
```
|
||||
sudo apt-get install libreoffice -y
|
||||
```
|
||||
|
||||
Once installed, you can start the new package from either the PMenu or dmenu tools.
|
||||
|
||||
### MiyoLinux Accessories
|
||||
|
||||
If you find you need a bit more from the MiyoLinux desktop, type the keyboard combination Alt+Ctrl+a to open the MiyoLinux Accessories tool (Figure 9). From this tool you can configure a number of options for the desktop.
|
||||
|
||||
![Accessories][19]
|
||||
|
||||
Figure 9: Configure i3, Conky, Compton, your touchpad, and more with the Accessories tool.
|
||||
|
||||
[Used with permission][6]
|
||||
|
||||
All other necessary keyboard shortcuts are listed on the default desktop wallpaper. Make sure to put those shortcuts to memory, as you won’t get very far in the i3 desktop without them.
|
||||
|
||||
### A Nice Nod to Old-School Linux
|
||||
|
||||
If you’re itching to throw it back to a time when Linux offered you a bit of challenge to your daily grind, MiyoLinux might be just the operating system for you. It’s a lightweight operating system that makes good use of a minimal set of tools. Anyone who likes their distributions to be less modern and more streamlined will love this take on the Linux desktop. However, if you prefer your desktop with the standard bells and whistles, found on modern distributions, you’ll probably find MiyoLinux nothing more than a fun distraction from the standard fare.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.linux.com/blog/learn/2019/2/miyolinux-lightweight-distro-old-school-approach
|
||||
|
||||
作者:[Jack Wallen][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.linux.com/users/jlwallen
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://sourceforge.net/p/miyolinux/wiki/Home/
|
||||
[2]: https://devuan.org/
|
||||
[3]: https://i3wm.org/
|
||||
[4]: /files/images/miyo1jpg
|
||||
[5]: https://www.linux.com/sites/lcom/files/styles/rendered_file/public/miyo_1.jpg?itok=5PxRDYRE (MiyoLinux)
|
||||
[6]: /licenses/category/used-permission
|
||||
[7]: /files/images/miyo2jpg
|
||||
[8]: https://www.linux.com/sites/lcom/files/styles/rendered_file/public/miyo_2.jpg?itok=svlVr7VI (Configuration)
|
||||
[9]: /files/images/miyo3jpg
|
||||
[10]: https://www.linux.com/sites/lcom/files/styles/rendered_file/public/miyo_3.jpg?itok=lpNzZBPz (partitioning)
|
||||
[11]: /files/images/miyo5jpg
|
||||
[12]: https://www.linux.com/sites/lcom/files/styles/rendered_file/public/miyo_5.jpg?itok=lijIsgZ2 (hostname)
|
||||
[13]: /licenses/category/creative-commons-zero
|
||||
[14]: /files/images/miyo7jpg
|
||||
[15]: https://www.linux.com/sites/lcom/files/styles/rendered_file/public/miyo_7.jpg?itok=I8Ow3PX6 (dmenu)
|
||||
[16]: /files/images/miyo8jpg
|
||||
[17]: https://www.linux.com/sites/lcom/files/styles/rendered_file/public/miyo_8.jpg?itok=oa502KfM (Synaptic)
|
||||
[18]: /files/images/miyo9jpg
|
||||
[19]: https://www.linux.com/sites/lcom/files/styles/rendered_file/public/miyo_9.jpg?itok=gUM4mxEv (Accessories)
|
143
sources/tech/20190301 Guide to Install VMware Tools on Linux.md
Normal file
143
sources/tech/20190301 Guide to Install VMware Tools on Linux.md
Normal file
@ -0,0 +1,143 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Guide to Install VMware Tools on Linux)
|
||||
[#]: via: (https://itsfoss.com/install-vmware-tools-linux)
|
||||
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
|
||||
|
||||
Guide to Install VMware Tools on Linux
|
||||
======
|
||||
|
||||
**VMware Tools enhances your VM experience by allowing you to share clipboard and folder among other things. Learn how to install VMware tools on Ubuntu and other Linux distributions.**
|
||||
|
||||
In an earlier tutorial, you learned to [install VMware Workstation on Ubuntu][1]. You can further enhance the functionality of your virtual machines by installing VMware Tools.
|
||||
|
||||
If you have already installed a guest OS on VMware, you must have noticed the requirement for [VMware tools][2] – even though not completely aware of what it is needed for.
|
||||
|
||||
In this article, we will highlight the importance of VMware tools, the features it offers, and the method to install VMware tools on Ubuntu or any other Linux distribution.
|
||||
|
||||
### VMware Tools: Overview & Features
|
||||
|
||||
![Installing VMware Tools on Ubuntu][3]Installing VMware Tools on Ubuntu
|
||||
|
||||
For obvious reasons, the virtual machine (your Guest OS) will not behave exactly like the host. There will be certain limitations in terms of its performance and operationg. And, that is why a set of utilities (VMware Tools) was introduced.
|
||||
|
||||
VMware tools help in managing the guest OS in an efficient manner while also improving its performance.
|
||||
|
||||
#### What exactly is VMware tool responsible for?
|
||||
|
||||
![How to Install VMware tools on Linux][4]
|
||||
|
||||
You have got a vague idea of what it does – but let us talk about the details:
|
||||
|
||||
* Synchronize the time between the guest OS and the host to make things easier.
|
||||
* Unlocks the ability to pass messages from host OS to guest OS. For example, you copy a text on the host to your clipboard and you can easily paste it to your guest OS.
|
||||
* Enables sound in guest OS.
|
||||
* Improves video resolution.
|
||||
* Improves the cursor movement.
|
||||
* Fixes incorrect network speed data.
|
||||
* Eliminates inadequate color depth.
|
||||
|
||||
|
||||
|
||||
These are the major changes that happen when you install VMware tools on Guest OS. But, what exactly does it contain / feature in order to unlock/enhance these functionalities? Let’s see..
|
||||
|
||||
#### VMware tools: Core Feature Details
|
||||
|
||||
![Sharing clipboard between guest and host OS with VMware Tools][5]Sharing clipboard between guest and host OS with VMware Tools
|
||||
|
||||
If you do not want to know what it includes to enable the functionalities, you can skip this part. But, for the curious readers, let us briefly discuss about it:
|
||||
|
||||
**VMware device drivers:** It really depends on the OS. Most of the major operating systems do include device drivers by default. So, you do not have to install it separately. This generally involves – memory control driver, mouse driver, audio driver, NIC driver, VGA driver and so on.
|
||||
|
||||
**VMware user process:** This is where things get really interesting. With this, you get the ability to copy-paste and drag-drop between the host and the guest OS. You can basically copy and paste the text from the host to the virtual machine or vice versa.
|
||||
|
||||
You get to drag and drop files as well. In addition, it enables the pointer release/lock when you do not have an SVGA driver installed.
|
||||
|
||||
**VMware tools lifecycle management** : Well, we will take a look at how to install VMware tools below – but this feature helps you easily install/upgrade VMware tools in the virtual machine.
|
||||
|
||||
**Shared Folders** : In addition to these, VMware tools also allow you to have shared folders between the guest OS and the host.
|
||||
|
||||
![Sharing folder between guest and host OS using VMware Tools in Linux][6]Sharing folder between guest and host OS using VMware Tools in Linux
|
||||
|
||||
Of course, what it does and facilitates also depends on the host OS. For example, on Windows, you get a Unity mode on VMware to run programs on virtual machine and operate it from the host OS.
|
||||
|
||||
### How to install VMware Tools on Ubuntu & other Linux distributions
|
||||
|
||||
**Note:** For Linux guest operating systems, you should already have “Open VM Tools” suite installed, eliminating the need of installing VMware tools separately, most of the time.
|
||||
|
||||
Most of the time, when you install a guest OS, you will get a prompt as a software update or a popup telling you to install VMware tools if the operating system supports [Easy Install][7].
|
||||
|
||||
Windows and Ubuntu does support Easy Install. So, even if you are using Windows as your host OS or trying to install VMware tools on Ubuntu, you should first get an option to install the VMware tools easily as popup message. Here’s how it should look like:
|
||||
|
||||
![Pop-up to install VMware Tools][8]Pop-up to install VMware Tools
|
||||
|
||||
This is the easiest way to get it done. So, make sure you have an active network connection when you setup the virtual machine.
|
||||
|
||||
If you do not get any of these pop ups – or options to easily install VMware tools. You have to manually install it. Here’s how to do that:
|
||||
|
||||
1\. Launch VMware Workstation Player.
|
||||
|
||||
2\. From the menu, navigate through **Virtual Machine - > Install VMware tools**. If you already have it installed, and want to repair the installation, you will observe the same option to appear as “ **Re-install VMware tools** “.
|
||||
|
||||
3\. Once you click on that, you will observe a virtual CD/DVD mounted in the guest OS.
|
||||
|
||||
4\. Open that and copy/paste the **tar.gz** file to any location of your choice and extract it, here we choose the **Desktop**.
|
||||
|
||||
![][9]
|
||||
|
||||
5\. After extraction, launch the terminal and navigate to the folder inside by typing in the following command:
|
||||
|
||||
```
|
||||
cd Desktop/VMwareTools-10.3.2-9925305/vmware-tools-distrib
|
||||
```
|
||||
|
||||
You need to check the name of the folder and path in your case – depending on the version and where you extracted – it might vary.
|
||||
|
||||
![][10]
|
||||
|
||||
Replace **Desktop** with your storage location (such as cd Downloads) and the rest should remain the same if you are installing **10.3.2 version**.
|
||||
|
||||
6\. Now, simply type in the following command to start the installation:
|
||||
|
||||
```
|
||||
sudo ./vmware-install.pl -d
|
||||
```
|
||||
|
||||
![][11]
|
||||
|
||||
You will be asked the password for permission to install, type it in and you should be good to go.
|
||||
|
||||
That’s it. You are done. These set of steps should be applicable to almost any Ubuntu-based guest operating system. If you want to install VMware tools on Ubuntu Server, or any other OS.
|
||||
|
||||
**Wrapping Up**
|
||||
|
||||
Installing VMware tools on Ubuntu Linux is pretty easy. In addition to the easy method, we have also explained the manual method to do it. If you still need help, or have a suggestion regarding the installation, let us know in the comments down below.
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/install-vmware-tools-linux
|
||||
|
||||
作者:[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/install-vmware-player-ubuntu-1310/
|
||||
[2]: https://kb.vmware.com/s/article/340
|
||||
[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/02/vmware-tools-downloading.jpg?fit=800%2C531&ssl=1
|
||||
[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/03/install-vmware-tools-linux.png?resize=800%2C450&ssl=1
|
||||
[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/02/vmware-tools-features.gif?resize=800%2C500&ssl=1
|
||||
[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/02/vmware-tools-shared-folder.jpg?fit=800%2C660&ssl=1
|
||||
[7]: https://docs.vmware.com/en/VMware-Workstation-Player-for-Linux/15.0/com.vmware.player.linux.using.doc/GUID-3F6B9D0E-6CFC-4627-B80B-9A68A5960F60.html
|
||||
[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/02/vmware-tools.jpg?fit=800%2C481&ssl=1
|
||||
[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/02/vmware-tools-extraction.jpg?fit=800%2C564&ssl=1
|
||||
[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/02/vmware-tools-folder.jpg?fit=800%2C487&ssl=1
|
||||
[11]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/02/vmware-tools-installation-ubuntu.jpg?fit=800%2C492&ssl=1
|
61
sources/tech/20190301 How to use sudo access in winSCP.md
Normal file
61
sources/tech/20190301 How to use sudo access in winSCP.md
Normal file
@ -0,0 +1,61 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (How to use sudo access in winSCP)
|
||||
[#]: via: (https://kerneltalks.com/tools/how-to-use-sudo-access-in-winscp/)
|
||||
[#]: author: (kerneltalks https://kerneltalks.com)
|
||||
|
||||
How to use sudo access in winSCP
|
||||
======
|
||||
|
||||
Learn how to use sudo access in winSCP with screenshots.
|
||||
|
||||
![How to use sudo access in winSCP][1]sudo access in winSCP
|
||||
|
||||
First of all you need to check where is your SFTP server binary located on server you are trying to connect with winSCP.
|
||||
|
||||
You can check SFTP server binary location with below command –
|
||||
|
||||
```
|
||||
[root@kerneltalks ~]# cat /etc/ssh/sshd_config |grep -i sftp-server
|
||||
Subsystem sftp /usr/libexec/openssh/sftp-server
|
||||
```
|
||||
|
||||
Here you can see sftp server binary is located at `/usr/libexec/openssh/sftp-server`
|
||||
|
||||
Now open winSCP and click `Advanced` button to open up advanced settings.
|
||||
|
||||
![winSCP advance settings][2]
|
||||
winSCP advance settings
|
||||
|
||||
It will open up advanced setting window like one below. Here select `SFTP `under `Environment` on left hand side panel. You will be presented with option on right hand side.
|
||||
|
||||
Now, add SFTP server value here with command `sudo su -c` here as displayed in screenshot below –
|
||||
|
||||
![SFTP server setting in winSCP][3]
|
||||
SFTP server setting in winSCP
|
||||
|
||||
So we added `sudo su -c /usr/libexec/openssh/sftp-server` in settings here. Now click Ok and connect to server as you normally do.
|
||||
|
||||
After connection you will be able to transfer files from directory where you normally need sudo permission to access.
|
||||
|
||||
That’s it! You logged to server using winSCP and sudo access.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://kerneltalks.com/tools/how-to-use-sudo-access-in-winscp/
|
||||
|
||||
作者:[kerneltalks][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://kerneltalks.com
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://i2.wp.com/kerneltalks.com/wp-content/uploads/2019/03/How-to-use-sudo-access-in-winSCP.png?ssl=1
|
||||
[2]: https://i0.wp.com/kerneltalks.com/wp-content/uploads/2019/03/winscp-advanced-settings.jpg?ssl=1
|
||||
[3]: https://i1.wp.com/kerneltalks.com/wp-content/uploads/2019/03/SFTP-server-setting-in-winSCP.jpg?ssl=1
|
@ -0,0 +1,48 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Which Raspberry Pi should you choose?)
|
||||
[#]: via: (https://opensource.com/article/19/3/which-raspberry-pi-choose)
|
||||
[#]: author: (Anderson Silva https://opensource.com/users/ansilva)
|
||||
|
||||
Which Raspberry Pi should you choose?
|
||||
======
|
||||
In the first article in our series on getting started with Raspberry Pi, learn the three criteria for choosing the right model for you.
|
||||

|
||||
|
||||
This is the first article in a 14-day series on getting started with the [Raspberry Pi][1]. Although the series is geared towards people who have never used a Raspberry Pi or Linux or programming, there will definitely be things for more experienced readers—and I encourage those readers to leave comments and tips that build on what I write. If everyone contributes, we can make this series even more useful for beginners, other experienced readers, and even me!
|
||||
|
||||
So, you want to give the Raspberry Pi a shot, but you don't know which model to buy. Maybe you want one for your classroom or your kid, but there are so many options, and you aren't sure which one is right for you.
|
||||
|
||||

|
||||
|
||||
My three main criteria for choosing a new Raspberry Pi are:
|
||||
|
||||
* **Cost:** Don't just consider the cost of the Raspberry Pi board, but also factor the peripherals you will need in order to use it. In the US, the Raspberry Pi's cost varies from $5 (for the Raspberry Pi Zero) to $35 (for the Raspberry Pi 3 B and 3 B+). However, if you pick the Zero you will probably also need a USB hub for your mouse and keyboard, possibly a wireless adapter, and some sort of display adapter. Unless you have most (if not all) of the peripherals needed for whatever you want to do with your Raspberry Pi, make sure to add those to your Pi budget. Also, in some countries, a Raspberry Pi on its own (even without any peripherals) may be a cost burden for many students and teachers.
|
||||
|
||||
* **Availability:** Finding the Raspberry Pi you want can vary depending on your location, as it may be easier (or harder) to get certain versions in some countries. Availability is an even bigger issue after new models are released, and it can take a few days or even weeks for new versions to become available in your market.
|
||||
|
||||
* **Purpose:** Location and cost may not affect everyone, but every buyer must consider why they want a Raspberry Pi. The eight different models vary in RAM, CPU core, CPU speed, physical size, network connectivity, peripheral expansion, etc. For example, if you want the most robust solution with more "horsepower," you probably will want the Raspberry Pi 3 B+, which has the most RAM, fastest CPU, and largest number of cores. If you want something that won't require network connectivity, won't be used for CPU-intensive work, and can be hidden in a small space, you could go with a Raspberry Pi Zero.
|
||||
|
||||
|
||||
[Wikipedia's Raspberry Pi specs chart][2] is an easy way to compare the eight Raspberry Pis models.
|
||||
|
||||
Now that you know what to look for in a Raspberry Pi, in the next article, I will explain how to buy one.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/19/3/which-raspberry-pi-choose
|
||||
|
||||
作者:[Anderson Silva][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/ansilva
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.raspberrypi.org/
|
||||
[2]: https://en.wikipedia.org/wiki/Raspberry_Pi#Specifications
|
@ -0,0 +1,187 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (lujun9972)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Create a Custom System Tray Indicator For Your Tasks on Linux)
|
||||
[#]: via: (https://fosspost.org/tutorials/custom-system-tray-icon-indicator-linux)
|
||||
[#]: author: (M.Hanny Sabbagh https://fosspost.org/author/mhsabbagh)
|
||||
|
||||
Create a Custom System Tray Indicator For Your Tasks on Linux
|
||||
======
|
||||
|
||||
System Tray icons are still considered to be an amazing functionality today. By just right-clicking on the icon, and then selecting which actions you would like to take, you may ease your life a lot and save many unnecessary clicks on daily basis.
|
||||
|
||||
When talking about useful system tray icons, examples like Skype, Dropbox and VLC do come to mind:
|
||||
|
||||
![Create a Custom System Tray Indicator For Your Tasks on Linux 11][1]
|
||||
|
||||
However, system tray icons can actually be quite a lot more useful; By simply building one yourself for your own needs. In this tutorial, we’ll explain how to do that for you in very simple steps.
|
||||
|
||||
### Prerequisites
|
||||
|
||||
We are going to build a custom system tray indicator using Python. Python is probably installed by default on all the major Linux distributions, so just check it’s there (version 2.7). Additionally, we’ll need the gir1.2-appindicator3 package installed. It’s the library allowing us to easily create system tray indicators.
|
||||
|
||||
To install it on Ubuntu/Mint/Debian:
|
||||
|
||||
```
|
||||
sudo apt-get install gir1.2-appindicator3
|
||||
```
|
||||
|
||||
On Fedora:
|
||||
|
||||
```
|
||||
sudo dnf install libappindicator-gtk3
|
||||
```
|
||||
|
||||
For other distributions, just search for any packages containing appindicator.
|
||||
|
||||
On GNOME Shell, system tray icons are removed starting from 3.26. You’ll need to install the [following extension][2] (Or possibly other extensions) to re-enable the feature on your desktop. Otherwise, you won’t be able to see the indicator we are going to create here.
|
||||
|
||||
### Basic Code
|
||||
|
||||
Here’s the basic code of the indicator:
|
||||
|
||||
```
|
||||
#!/usr/bin/python
|
||||
import os
|
||||
from gi.repository import Gtk as gtk, AppIndicator3 as appindicator
|
||||
|
||||
def main():
|
||||
indicator = appindicator.Indicator.new("customtray", "semi-starred-symbolic", appindicator.IndicatorCategory.APPLICATION_STATUS)
|
||||
indicator.set_status(appindicator.IndicatorStatus.ACTIVE)
|
||||
indicator.set_menu(menu())
|
||||
gtk.main()
|
||||
|
||||
def menu():
|
||||
menu = gtk.Menu()
|
||||
|
||||
command_one = gtk.MenuItem('My Notes')
|
||||
command_one.connect('activate', note)
|
||||
menu.append(command_one)
|
||||
|
||||
exittray = gtk.MenuItem('Exit Tray')
|
||||
exittray.connect('activate', quit)
|
||||
menu.append(exittray)
|
||||
|
||||
menu.show_all()
|
||||
return menu
|
||||
|
||||
def note(_):
|
||||
os.system("gedit $HOME/Documents/notes.txt")
|
||||
|
||||
def quit(_):
|
||||
gtk.main_quit()
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
```
|
||||
|
||||
We’ll explain how the code works later. But for know, just save it in a text file under the name tray.py, and run it using Python:
|
||||
|
||||
```
|
||||
python tray.py
|
||||
```
|
||||
|
||||
You’ll see the indicator working as follows:
|
||||
|
||||
![Create a Custom System Tray Indicator For Your Tasks on Linux 13][3]
|
||||
|
||||
Now, to explain how we did the magic:
|
||||
|
||||
* The first 3 lines of the code are nothing more than just specifying the Python path and importing the libraries we are going to use in our indicator.
|
||||
|
||||
* def main() : This is the main function of the indicator. Under it we write the code to initialize and build the indicator.
|
||||
|
||||
* indicator = appindicator.Indicator.new(“customtray”, “semi-starred-symbolic”, appindicator.IndicatorCategory.APPLICATION_STATUS) : Here we are specially creating a new indicator and calling it `customtray` . This is the special name of the indicator so that the system doesn’t mix it with other indicators that may be running. Also, we used the `semi-starred-symbolic` icon name as the default icon for our indicator. You could possibly change thing to any other things; Say `firefox` (if you want to see Firefox icon being used for the indicator), or any other icon name you would like. The last part regarding the `APPLICATION_STATUS` is just ordinary code for the categorization/scope of that indicator.
|
||||
|
||||
* `indicator.set_status(appindicator.IndicatorStatus.ACTIVE)` : This line just turns the indicator on.
|
||||
|
||||
* `indicator.set_menu(menu())` : Here, we are saying that we want to use the `menu()` function (which we’ll define later) for creating the menu items of our indicator. This is important so that when you click on the indicator, you can see a list of possible actions to take.
|
||||
|
||||
* `gtk.main()` : Just run the main GTK loop.
|
||||
|
||||
* Under `menu()` you’ll see that we are creating the actions/items we want to provide using our indicator. `command_one = gtk.MenuItem(‘My Notes’)` simply initializes the first menu item with the text “My notes”, and then `command_one.connect(‘activate’, note)` connects the `activate` signal of that menu item to the `note()` function defined later; In other words, we are telling our system here: “When this menu item is clicked, run the note() function”. Finally, `menu.append(command_one)` adds that menu item to the list.
|
||||
|
||||
* The lines regarding `exittray` are just for creating an exit menu item to close the indicator any time you want.
|
||||
|
||||
* `menu.show_all()` and `return menu` are just ordinary codes for returning the menu list to the indicator.
|
||||
|
||||
* Under `note(_)` you’ll see the code that must be executed when the “My Notes” menu item is clicked. Here, we just wrote `os.system(“gedit $HOME/Documents/notes.txt”)` ; The `os.system` function is a function that allows us to run shell commands from inside Python, so here we wrote a command to open a file called `notes.txt` under the `Documents` folder in our home directory using the `gedit` editor. This for example can be your daily notes taking program from now on!
|
||||
|
||||
### Adding your Needed Tasks
|
||||
|
||||
There are only 2 things you need to touch in the code:
|
||||
|
||||
1. Define a new menu item under `menu()` for your desired task.
|
||||
|
||||
2. Create a new function to run a specific action when that menu item is clicked.
|
||||
|
||||
|
||||
So, let’s say that you want to create a new menu item, which when clicked, plays a specific video/audio file on your hard disk using VLC? To do it, simply add the following 3 lines in line 17:
|
||||
|
||||
```
|
||||
command_two = gtk.MenuItem('Play video/audio')
|
||||
command_two.connect('activate', play)
|
||||
menu.append(command_two)
|
||||
```
|
||||
|
||||
And the following lines in line 30:
|
||||
|
||||
```
|
||||
def play(_):
|
||||
os.system("vlc /home/<username>/Videos/somevideo.mp4")
|
||||
```
|
||||
|
||||
Replace /home/<username>/Videos/somevideo.mp4 with the path to the video/audio file you want. Now save the file and run the indicator again:
|
||||
|
||||
```
|
||||
python tray.py
|
||||
```
|
||||
|
||||
This is how you’ll see it now:
|
||||
|
||||
![Create a Custom System Tray Indicator For Your Tasks on Linux 15][4]
|
||||
|
||||
And when you click on the newly-created menu item, VLC will start playing!
|
||||
|
||||
To create other items/tasks, simply redo the steps again. Just be careful to replace command_two with another name, like command_three, so that no clash between variables happen. And then define new separate functions like what we did with the play(_) function.
|
||||
|
||||
The possibilities are endless from here; I am using this way for example to fetch some data from the web (using the urllib2 library) and display them for me any time. I am also using it for playing an mp3 file in the background using the mpg123 command, and I am defining another menu item to killall mpg123 to stop playing that audio whenever I want. CS:GO on Steam for example takes a huge time to exit (the window doesn’t close automatically), so as a workaround for this, I simply minimize the window and click on a menu item that I created which will execute killall -9 csgo_linux64.
|
||||
|
||||
You can use this indicator for anything: Updating your system packages, possibly running some other scripts any time you want.. Literally anything.
|
||||
|
||||
### Autostart on Boot
|
||||
|
||||
We want our system tray indicator to start automatically on boot, we don’t want to run it manually each time. To do that, simply add the following command to your startup applications (after you replace the path to the tray.py file with yours):
|
||||
|
||||
```
|
||||
nohup python /home/<username>/tray.py &
|
||||
```
|
||||
|
||||
The very next time you reboot your system, the indicator will start working automatically after boot!
|
||||
|
||||
### Conclusion
|
||||
|
||||
You now know how to create your own system tray indicator for any task that you may want. This method should save you a lot of time depending on the nature and number of tasks you need to run on daily basis. Some users may prefer creating aliases from the command line, but this will require you to always open the terminal window or have a drop-down terminal emulator available, while here, the system tray indicator is always working and available for you.
|
||||
|
||||
Have you used this method to run your tasks before? Would love to hear your thoughts.
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://fosspost.org/tutorials/custom-system-tray-icon-indicator-linux
|
||||
|
||||
作者:[M.Hanny Sabbagh][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[lujun9972](https://github.com/lujun9972)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://fosspost.org/author/mhsabbagh
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://i2.wp.com/fosspost.org/wp-content/uploads/2019/02/Screenshot-at-2019-02-28-0808.png?resize=407%2C345&ssl=1 (Create a Custom System Tray Indicator For Your Tasks on Linux 12)
|
||||
[2]: https://extensions.gnome.org/extension/1031/topicons/
|
||||
[3]: https://i2.wp.com/fosspost.org/wp-content/uploads/2019/03/Screenshot-at-2019-03-02-1041.png?resize=434%2C140&ssl=1 (Create a Custom System Tray Indicator For Your Tasks on Linux 14)
|
||||
[4]: https://i2.wp.com/fosspost.org/wp-content/uploads/2019/03/Screenshot-at-2019-03-02-1141.png?resize=440%2C149&ssl=1 (Create a Custom System Tray Indicator For Your Tasks on Linux 16)
|
51
sources/tech/20190302 How to buy a Raspberry Pi.md
Normal file
51
sources/tech/20190302 How to buy a Raspberry Pi.md
Normal file
@ -0,0 +1,51 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (How to buy a Raspberry Pi)
|
||||
[#]: via: (https://opensource.com/article/19/3/how-buy-raspberry-pi)
|
||||
[#]: author: (Anderson Silva https://opensource.com/users/ansilva)
|
||||
|
||||
How to buy a Raspberry Pi
|
||||
======
|
||||
Find out the best ways to get a Raspberry Pi in the second article in our getting started guide
|
||||
|
||||

|
||||
|
||||
The first article in this series on getting started with Raspberry Pi offered some advice on [which model you should buy][1]. Now that you have an idea of which version you want, let's find out how to get one.
|
||||
|
||||
The most obvious—and probably the safest and simplest—way is through the [official Raspberry Pi website][2]. If you click on "Buy a Raspberry Pi" from the homepage, you'll be taken to the organization's [online store][3], where you can find authorized Raspberry Pi sellers in your country where you can place an order. If your country isn't listed, there is a "Rest of the World" option, which should let you put in an international order.
|
||||
|
||||
Second, check Amazon.com or another major online technology retailer in your country that allows smaller shops to sell new and used items. Given the relatively low cost and size of the Raspberry Pi, it should be fairly easy for smaller shop owners to import and export the boards for reselling purposes. Before you place an order, keep an eye on the sellers' reviews though.
|
||||
|
||||
Third, ask your geek friends! You never know if someone has an unused Raspberry Pi gathering dust. I have given at least three Raspberry Pis away to family, not as planned gifts, but because they were just so curious about this mini-computer. I had so many lying around that I just told them to keep one!
|
||||
|
||||
### Don't forget the extras
|
||||
|
||||
One final thought: don't forget that you'll need some peripherals to set up and operate your Raspberry Pi. At a minimum, you'll need a keyboard, an HDMI cable to connect to a display (and a display), a Micro SD card to install the operating system, a power cord, and a mouse will be handy, too.
|
||||
|
||||

|
||||
|
||||
If you don't already have these items, try borrowing them from friends or order them at the same time you buy your Raspberry Pi. You may want to consider one of the starter kits available from the authorized Raspberry Pi vendors—that will avoid the hassle of searching for parts one at a time.
|
||||
|
||||

|
||||
|
||||
Now that you have a Raspberry Pi, in the next article in this series, we'll install the operating system and start using it.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/19/3/how-buy-raspberry-pi
|
||||
|
||||
作者:[Anderson Silva][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/ansilva
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/article/19/2/which-raspberry-pi-should-you-get
|
||||
[2]: https://www.raspberrypi.org/
|
||||
[3]: https://www.raspberrypi.org/products/
|
@ -0,0 +1,94 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (lujun9972)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Manage Your Mirrors with ArchLinux Mirrorlist Manager)
|
||||
[#]: via: (https://itsfoss.com/archlinux-mirrorlist-manager)
|
||||
[#]: author: (John Paul https://itsfoss.com/author/john/)
|
||||
|
||||
Manage Your Mirrors with ArchLinux Mirrorlist Manager
|
||||
======
|
||||
|
||||
**ArchLinux Mirrorlist Manager is a simple GUI program that allows you to easily manage mirrors in your Arch Linux system.**
|
||||
|
||||
For Linux users, it is important to make sure that you keep your mirror list in good shape. Today we will take a quick look at an application designed to help manage your Arch mirror list.
|
||||
|
||||
![ArchLinux Mirrorlist Manager][1]ArchLinux Mirrorlist Manager
|
||||
|
||||
### What is a Mirror?
|
||||
|
||||
For those new to the world of Linux, Linux operating systems depend on a series of servers placed around the world. These servers contain identical copies of all of the packages and software available for a particular distro. This is why they are called “mirrors”.
|
||||
|
||||
The ultimate goal is to have multiple mirrors in each country. This allows local users to quickly update their systems. However, this is not always true. Sometimes mirrors from another country can be faster.
|
||||
|
||||
### ArchLinux Mirrorlist Manager makes managing mirrors simpler in Arch Linux
|
||||
|
||||
![ArchLinux Mirrorlist Manager][2]Main Screen
|
||||
|
||||
[Managing and sorting][3] the available mirrors in Arch is not easy. It involves fairly lengthy commands. Thankfully, someone came up with a solution.
|
||||
|
||||
Last year, [Rizwan Hasan][4] created a little Python and Qt application entitled [ArchLinux Mirrorlist Manager][5]. You might recognize Rizwan’s name because it is not the first time that we featured something he created on this site. Over a year ago, I wrote about a new Arch-based distro that Rizwan created named [MagpieOS][6]. I imagine that Rizwan’s experience with MagpieOS inspired him to create this application.
|
||||
|
||||
There really isn’t much to ArchLinux Mirrorlist Manager. It allows you to rank mirrors by response speed and limit the results by number and country of origin.
|
||||
|
||||
In other words, if you are located in Germany, you can restrict your mirrors to the 3 fastest in Germany.
|
||||
|
||||
### Install ArchLinux Mirrorlist Manager
|
||||
|
||||
```
|
||||
It is only for Arch Linux users
|
||||
|
||||
Pay attention! ArchLinux Mirrorlist Manager is for Arch Linux distribution only. Don’t try to use it on other Arch-based distributions unless you make sure that the distro uses Arch mirrors. Otherwise, you might face issues that I encountered with Manjaro (explained in the section below).
|
||||
```
|
||||
|
||||
```
|
||||
Mirrorlist Manager alternative for Manjaro
|
||||
|
||||
When it comes to using something Archy, my go-to system is Manjaro. In preparation for this article, I decided to install ArchLinux Mirrorlist Manager on my Manjaro machine. It quickly sorted the available mirror and saved them to my mirror list.
|
||||
|
||||
I then proceeded to try to update my system and immediately ran into problems. When ArchLinux Mirrorlist Manager sorted the mirrors my system was using, it replaced all of my Manjaro mirrors with vanilla Arch mirrors. (Manjaro is based on Arch, but has its own mirrors because the dev team tests all package updates before pushing them to the users to ensure there are no system-breaking bugs.) Thankfully, the Manjaro forum helped me fix my mistake.
|
||||
|
||||
If you are a Manjaro user, please do not make the same mistake that I did. ArchLinux Mirrorlist Manager is only for Arch and Arch-based distros that use Arch’s mirrors.
|
||||
|
||||
Luckily, there is an easy to use terminal application that Manjaro users can use to manage their mirror lists. It is called [Pacman-mirrors][7]. Just like ArchLinux Mirrorlist Manager, you can sort by response speed. Just type `sudo pacman-mirrors --fasttrack`. If you want to limit the results to the five fastest mirrors, you can type `sudo pacman-mirrors --fasttrack 5`. To restrict the results to one or more countries, type `sudo pacman-mirrors --country Germany,Spain,Austria`. You can limit the results to your country by typing `sudo pacman-mirrors --geoip`. You can visit the [Manjaro wiki][7] for more information about Pacman-mirrors.
|
||||
|
||||
After you run Pacman-mirrors, you have to synchronize your package database and update your system by typing `sudo pacman -Syyu`.
|
||||
|
||||
Note: Pacman-mirrors is for **Manjaro only**.
|
||||
```
|
||||
|
||||
ArchLinux Mirrorlist Manager is available in the [Arch User Repository][8]. More advanced Arch users can download the PKGBUILD directly from [the GitHub page][9].
|
||||
|
||||
### Final Thoughts on ArchLinux Mirrorlist Manager
|
||||
|
||||
Even though [ArchLinux Mirrorlist Manager][5] isn’t very useful for me, I’m glad it exists. It shows that Linux users are actively trying to make Linux easier to use. As I said earlier, managing a mirror list on Arch is not easy. Rizwan’s little tool will help make Arch more usable by the beginning user.
|
||||
|
||||
Have you ever used ArchLinux Mirrorlist Manager? What is your method to manage your Arch mirrors? Please let us know in the comments below.
|
||||
|
||||
If you found this article interesting, please take a minute to share it on social media, Hacker News or [Reddit][10].
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/archlinux-mirrorlist-manager
|
||||
|
||||
作者:[John Paul][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[lujun9972](https://github.com/lujun9972)
|
||||
校对:[校对者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://i2.wp.com/itsfoss.com/wp-content/uploads/2019/02/mirrorlist-manager2.png?ssl=1
|
||||
[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/02/mirrorlist-manager4.jpg?ssl=1
|
||||
[3]: https://wiki.archlinux.org/index.php/Mirrors
|
||||
[4]: https://github.com/Rizwan-Hasan
|
||||
[5]: https://github.com/Rizwan-Hasan/ArchLinux-Mirrorlist-Manager
|
||||
[6]: https://itsfoss.com/magpieos/
|
||||
[7]: https://wiki.manjaro.org/index.php?title=Pacman-mirrors
|
||||
[8]: https://aur.archlinux.org/packages/mirrorlist-manager
|
||||
[9]: https://github.com/Rizwan-Hasan/MagpieOS-Packages/tree/master/ArchLinux-Mirrorlist-Manager
|
||||
[10]: http://reddit.com/r/linuxusersgroup
|
238
sources/tech/20190304 How to Install MongoDB on Ubuntu.md
Normal file
238
sources/tech/20190304 How to Install MongoDB on Ubuntu.md
Normal file
@ -0,0 +1,238 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (How to Install MongoDB on Ubuntu)
|
||||
[#]: via: (https://itsfoss.com/install-mongodb-ubuntu)
|
||||
[#]: author: (Sergiu https://itsfoss.com/author/sergiu/)
|
||||
|
||||
How to Install MongoDB on Ubuntu
|
||||
======
|
||||
|
||||
**This tutorial presents two ways to install MongoDB on Ubuntu and Ubuntu-based Linux distributions.**
|
||||
|
||||
[MongoDB][1] is an increasingly popular free and open-source NoSQL database that stores data in collections of JSON-like, flexible documents, in contrast to the usual table approach you’ll find in SQL databases.
|
||||
|
||||
You are most likely to find MongoDB used in modern web applications. Its document model makes it very intuitive to access and handle with various programming languages.
|
||||
|
||||
![mongodb Ubuntu][2]
|
||||
|
||||
In this article, I’ll cover two ways you can install MongoDB on your Ubuntu system.
|
||||
|
||||
### Installing MongoDB on Ubuntu based Distributions
|
||||
|
||||
1. Install MongoDB using Ubuntu’s repository. Easy but not the latest version of MongoDB
|
||||
2. Install MongoDB using its official repository. Slightly complicated but you get the latest version of MongoDB.
|
||||
|
||||
|
||||
|
||||
The first installation method is easier, but I recommend the second method if you plan on using the latest release with official support.
|
||||
|
||||
Some people might prefer using snap packages. There are snaps available in the Ubuntu Software Center, but I wouldn’t recommend using them; they’re outdated at the moment and I won’t be covering that.
|
||||
|
||||
#### Method 1. Install MongoDB from Ubuntu Repository
|
||||
|
||||
This is the easy way to install MongoDB on your system, you only need to type in a simple command.
|
||||
|
||||
##### Installing MongoDB
|
||||
|
||||
First, make sure your packages are up-to-date. Open up a terminal and type:
|
||||
|
||||
```
|
||||
sudo apt update && sudo apt upgrade -y
|
||||
```
|
||||
|
||||
Go ahead and install MongoDB with:
|
||||
|
||||
```
|
||||
sudo apt install mongodb
|
||||
```
|
||||
|
||||
That’s it! MongoDB is now installed on your machine.
|
||||
|
||||
The MongoDB service should automatically be started on install, but to check the status type
|
||||
|
||||
```
|
||||
sudo systemctl status mongodb
|
||||
```
|
||||
|
||||
![Check if the MongoDB service is running.][3]
|
||||
|
||||
You can see that the service is **active**.
|
||||
|
||||
##### Running MongoDB
|
||||
|
||||
MongoDB is currently a systemd service, so we’ll use **systemctl** to check and modify it’s state, using the following commands:
|
||||
|
||||
```
|
||||
sudo systemctl status mongodb
|
||||
sudo systemctl stop mongodb
|
||||
sudo systemctl start mongodb
|
||||
sudo systemctl restart mongodb
|
||||
```
|
||||
|
||||
You can also change if MongoDB automatically starts when the system starts up ( **default** : enabled):
|
||||
|
||||
```
|
||||
sudo systemctl disable mongodb
|
||||
sudo systemctl enable mongodb
|
||||
```
|
||||
|
||||
To start working with (creating and editing) databases, type:
|
||||
|
||||
```
|
||||
mongo
|
||||
```
|
||||
|
||||
This will start up the **mongo shell**. Please check out the [manual][4] for detailed information on the available queries and options.
|
||||
|
||||
**Note:** Depending on how you plan to use MongoDB, you might need to adjust your Firewall. That’s unfortunately more involved than what I can cover here and depends on your configuration.
|
||||
|
||||
##### Uninstall MongoDB
|
||||
|
||||
If you installed MongoDB from the Ubuntu Repository and want to uninstall it (maybe to install using the officially supported way), type:
|
||||
|
||||
```
|
||||
sudo systemctl stop mongodb
|
||||
sudo apt purge mongodb
|
||||
sudo apt autoremove
|
||||
```
|
||||
|
||||
This should completely get rid of your MongoDB install. Make sure to **backup** any collections or documents you might want to keep since they will be wiped out!
|
||||
|
||||
#### Method 2. Install MongoDB Community Edition on Ubuntu
|
||||
|
||||
This is the way the recommended way to install MongoDB, using the package manager. You’ll have to type a few more commands and it might be intimidating if you are newer to the Linux world.
|
||||
|
||||
But there’s nothing to be afraid of! We’ll go through the installation process step by step.
|
||||
|
||||
##### Installing MongoDB
|
||||
|
||||
The package maintained by MongoDB Inc. is called **mongodb-org** , not **mongodb** (this is the name of the package in the Ubuntu Repository). Make sure **mongodb** is not installed on your system before applying this steps. The packages will conflict. Let’s get to it!
|
||||
|
||||
First, we’ll have to import the public key:
|
||||
|
||||
```
|
||||
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4
|
||||
```
|
||||
|
||||
Now, you need to add a new repository in your sources list so that you can install MongoDB Community Edition and also get automatic updates:
|
||||
|
||||
```
|
||||
echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu $(lsb_release -cs)/mongodb-org/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list
|
||||
```
|
||||
|
||||
To be able to install **mongodb-org** , we’ll have to update our package database so that your system is aware of the new packages available:
|
||||
|
||||
```
|
||||
sudo apt update
|
||||
```
|
||||
|
||||
Now you can ether install the **latest stable version** of MongoDB:
|
||||
|
||||
```
|
||||
sudo apt install -y mongodb-org
|
||||
```
|
||||
|
||||
or a **specific version** (change the version number after **equal** sign)
|
||||
|
||||
```
|
||||
sudo apt install -y mongodb-org=4.0.6 mongodb-org-server=4.0.6 mongodb-org-shell=4.0.6 mongodb-org-mongos=4.0.6 mongodb-org-tools=4.0.6
|
||||
```
|
||||
|
||||
If you choose to install a specific version, make sure you change the version number everywhere. If you only change it in the **mongodb-org=4.0.6** part, the latest version will be installed.
|
||||
|
||||
By default, when updating using the package manager ( **apt-get** ), MongoDB will be updated to the newest updated version. To stop that from happening (and freezing to the installed version), use:
|
||||
|
||||
```
|
||||
echo "mongodb-org hold" | sudo dpkg --set-selections
|
||||
echo "mongodb-org-server hold" | sudo dpkg --set-selections
|
||||
echo "mongodb-org-shell hold" | sudo dpkg --set-selections
|
||||
echo "mongodb-org-mongos hold" | sudo dpkg --set-selections
|
||||
echo "mongodb-org-tools hold" | sudo dpkg --set-selections
|
||||
```
|
||||
|
||||
You have now successfully installed MongoDB!
|
||||
|
||||
##### Configuring MongoDB
|
||||
|
||||
By default, the package manager will create **/var/lib/mongodb** and **/var/log/mongodb** and MongoDB will run using the **mongodb** user account.
|
||||
|
||||
I won’t go into changing these default settings since that is beyond the scope of this guide. You can check out the [manual][5] for detailed information.
|
||||
|
||||
The settings in **/etc/mongod.conf** are applied when starting/restarting the **mongodb** service instance.
|
||||
|
||||
##### Running MongoDB
|
||||
|
||||
To start the mongodb daemon **mongod** , type:
|
||||
|
||||
```
|
||||
sudo service mongod start
|
||||
```
|
||||
|
||||
Now you should verify that the **mongod** process started successfully. This information is stored (by default) at **/var/log/mongodb/mongod.log**. Let’s check the contents of that file:
|
||||
|
||||
```
|
||||
sudo cat /var/log/mongodb/mongod.log
|
||||
```
|
||||
|
||||
![Check MongoDB logs to see if the process is running properly.][6]
|
||||
|
||||
As long as you get this: **[initandlisten] waiting for connections on port 27017** somewhere in there, the process is running properly.
|
||||
|
||||
**Note: 27017** is the default port of **mongod.**
|
||||
|
||||
To stop/restart **mongod** enter:
|
||||
|
||||
```
|
||||
sudo service mongod stop
|
||||
sudo service mongod restart
|
||||
```
|
||||
|
||||
Now, you can use MongoDB by opening the **mongo shell** :
|
||||
|
||||
```
|
||||
mongo
|
||||
```
|
||||
|
||||
##### Uninstall MongoDB
|
||||
|
||||
Run the following commands
|
||||
|
||||
```
|
||||
sudo service mongod stop
|
||||
sudo apt purge mongodb-org*
|
||||
```
|
||||
|
||||
To remove the **databases** and **log files** (make sure to **backup** what you want to keep!):
|
||||
|
||||
```
|
||||
sudo rm -r /var/log/mongodb
|
||||
sudo rm -r /var/lib/mongodb
|
||||
```
|
||||
|
||||
**Wrapping Up**
|
||||
|
||||
MongoDB is a great NoSQL database, easy to integrate into modern projects. I hope this tutorial helped you to set it up on your Ubuntu machine! Let us know how you plan on using MongoDB in the comments below.
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/install-mongodb-ubuntu
|
||||
|
||||
作者:[Sergiu][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/sergiu/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.mongodb.com/
|
||||
[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/03/mongodb-ubuntu.jpeg?resize=800%2C450&ssl=1
|
||||
[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/02/mongodb_check_status.jpg?fit=800%2C574&ssl=1
|
||||
[4]: https://docs.mongodb.com/manual/tutorial/getting-started/
|
||||
[5]: https://docs.mongodb.com/manual/
|
||||
[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/02/mongodb_org_check_logs.jpg?fit=800%2C467&ssl=1
|
53
sources/tech/20190304 Learn Linux with the Raspberry Pi.md
Normal file
53
sources/tech/20190304 Learn Linux with the Raspberry Pi.md
Normal file
@ -0,0 +1,53 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Learn Linux with the Raspberry Pi)
|
||||
[#]: via: (https://opensource.com/article/19/3/learn-linux-raspberry-pi)
|
||||
[#]: author: (Andersn Silva https://opensource.com/users/ansilva)
|
||||
|
||||
Learn Linux with the Raspberry Pi
|
||||
======
|
||||
The fourth article in our guide to getting started with the Raspberry Pi dives into the Linux command line.
|
||||

|
||||
|
||||
In the [third article][1] in this series on getting started with Raspberry Pi, I shared info on installing Raspbian, the official version of Linux for Raspberry Pi. Now that you've installed Raspbian and booted up your new Pi, you're ready to start learning about Linux.
|
||||
|
||||
It's impossible to tackle a topic as big as "how to use Linux" in a short article like this, so instead I'll give you some ideas about how you can use the Raspberry Pi to learn more about Linux in general.
|
||||
|
||||
Start by spending time on the command line (aka the "terminal"). Linux [window managers][2] and graphical interfaces have come a long way since the mid-'90s. Nowadays you can use Linux by pointing-and-clicking on things, just as easily as you can in other operating systems. In my opinion, there is a difference between just "using Linux" and being "a Linux user," and the latter means at a minimum being able to navigate in the terminal.
|
||||
|
||||

|
||||
|
||||
If you want to become a Linux user, start by trying out the following on the command line:
|
||||
|
||||
* Navigate your home directory with commands like **ls** , **cd** , and **pwd**.
|
||||
* Create, delete, and rename directories using the **mkdir** , **rm** , **mv** , and **cp** commands.
|
||||
* Create a text file with a command line editor such as Vi, Vim, Emacs, or Nano.
|
||||
* Try out some other useful commands, such as **chmod** , **chown** , **w** , **cat** , **more** , **less** , **tail** , **free** , **df** , **ps** , **uname** , and **kill**
|
||||
* Look around **/bin** and **/usr/bin** for other commands.
|
||||
|
||||
|
||||
|
||||
The best way to get help with a command is by reading its "man page" (short for manual); type **man <command>** on the command line to pull it up. And make sure to search the internet for Linux command cheat sheets—you should find a lot of options that will help you learn.
|
||||
|
||||
Raspbian, like most Linux distributions, has many commands and over time you will end up using some commands a lot more than others. I've been using Linux on the command line for over two decades, and there are still some commands that I've never used, even ones that have been around as long as I've been using Linux.
|
||||
|
||||
At the end of the day, you can use your graphical interface environment to get work done faster, but make sure to dive into the Linux command line, for that's where you will get the true power and knowledge of the operating system.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/19/3/learn-linux-raspberry-pi
|
||||
|
||||
作者:[Andersn Silva][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/ansilva
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/article/19/2/how-boot-new-raspberry-pi
|
||||
[2]: https://opensource.com/article/18/8/window-manager
|
@ -0,0 +1,311 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (What you need to know about Ansible modules)
|
||||
[#]: via: (https://opensource.com/article/19/3/developing-ansible-modules)
|
||||
[#]: author: (Jairo da Silva Junior https://opensource.com/users/jairojunior)
|
||||
|
||||
What you need to know about Ansible modules
|
||||
======
|
||||
Learn how and when to develop custom modules for Ansible.
|
||||

|
||||
|
||||
Ansible works by connecting to nodes and sending small programs called modules to be executed remotely. This makes it a push architecture, where configuration is pushed from Ansible to servers without agents, as opposed to the pull model, common in agent-based configuration management systems, where configuration is pulled.
|
||||
|
||||
These modules are mapped to resources and their respective states, which are represented in YAML files. They enable you to manage virtually everything that has an API, CLI, or configuration file you can interact with, including network devices like load balancers, switches, firewalls, container orchestrators, containers themselves, and even virtual machine instances in a hypervisor or in a public (e.g., AWS, GCE, Azure) and/or private (e.g., OpenStack, CloudStack) cloud, as well as storage and security appliances and system configuration.
|
||||
|
||||
With Ansible's batteries-included model, hundreds of modules are included and any task in a playbook has a module behind it.
|
||||
|
||||
The contract for building modules is simple: JSON in the stdout. The configurations declared in YAML files are delivered over the network via SSH/WinRM—or any other connection plugin—as small scripts to be executed in the target server(s). Modules can be written in any language capable of returning JSON, although most Ansible modules (except for Windows PowerShell) are written in Python using the Ansible API (this eases the development of new modules).
|
||||
|
||||
Modules are one way of expanding Ansible capabilities. Other alternatives, like dynamic inventories and plugins, can also increase Ansible's power. It's important to know about them so you know when to use one instead of the other.
|
||||
|
||||
Plugins are divided into several categories with distinct goals, like Action, Cache, Callback, Connection, Filters, Lookup, and Vars. The most popular plugins are:
|
||||
|
||||
* **Connection plugins:** These implement a way to communicate with servers in your inventory (e.g., SSH, WinRM, Telnet); in other words, how automation code is transported over the network to be executed.
|
||||
* **Filters plugins:** These allow you to manipulate data inside your playbook. This is a Jinja2 feature that is harnessed by Ansible to solve infrastructure-as-code problems.
|
||||
* **Lookup plugins:** These fetch data from an external source (e.g., env, file, Hiera, database, HashiCorp Vault).
|
||||
|
||||
|
||||
|
||||
Ansible's official docs are a good resource on [developing plugins][1].
|
||||
|
||||
### When should you develop a module?
|
||||
|
||||
Although many modules are delivered with Ansible, there is a chance that your problem is not yet covered or it's something too specific—for example, a solution that might make sense only in your organization. Fortunately, the official docs provide excellent guidelines on [developing modules][2].
|
||||
|
||||
**IMPORTANT:** Before you start working on something new, always check for open pull requests, ask developers at #ansible-devel (IRC/Freenode), or search the [development list][3] and/or existing [working groups][4] to see if a module exists or is in development.
|
||||
|
||||
Signs that you need a new module instead of using an existing one include:
|
||||
|
||||
* Conventional configuration management methods (e.g., templates, file, get_url, lineinfile) do not solve your problem properly.
|
||||
* You have to use a complex combination of commands, shells, filters, text processing with magic regexes, and API calls using curl to achieve your goals.
|
||||
* Your playbooks are complex, imperative, non-idempotent, and even non-deterministic.
|
||||
|
||||
|
||||
|
||||
In the ideal scenario, the tool or service already has an API or CLI for management, and it returns some sort of structured data (JSON, XML, YAML).
|
||||
|
||||
### Identifying good and bad playbooks
|
||||
|
||||
> "Make love, but don't make a shell script in YAML."
|
||||
|
||||
So, what makes a bad playbook?
|
||||
|
||||
```
|
||||
- name: Read a remote resource
|
||||
command: "curl -v http://xpto/resource/abc"
|
||||
register: resource
|
||||
changed_when: False
|
||||
|
||||
- name: Create a resource in case it does not exist
|
||||
command: "curl -X POST http://xpto/resource/abc -d '{ config:{ client: xyz, url: http://beta, pattern: core.md Dict.md lctt2014.md lctt2016.md lctt2018.md README.md } }'"
|
||||
when: "resource.stdout | 404"
|
||||
|
||||
# Leave it here in case I need to remove it hehehe
|
||||
#- name: Remove resource
|
||||
# command: "curl -X DELETE http://xpto/resource/abc"
|
||||
# when: resource.stdout == 1
|
||||
```
|
||||
|
||||
Aside from being very fragile—what if the resource state includes a 404 somewhere?—and demanding extra code to be idempotent, this playbook can't update the resource when its state changes.
|
||||
|
||||
Playbooks written this way disrespect many infrastructure-as-code principles. They're not readable by human beings, are hard to reuse and parameterize, and don't follow the declarative model encouraged by most configuration management tools. They also fail to be idempotent and to converge to the declared state.
|
||||
|
||||
Bad playbooks can jeopardize your automation adoption. Instead of harnessing configuration management tools to increase your speed, they have the same problems as an imperative automation approach based on scripts and command execution. This creates a scenario where you're using Ansible just as a means to deliver your old scripts, copying what you already have into YAML files.
|
||||
|
||||
Here's how to rewrite this example to follow infrastructure-as-code principles.
|
||||
|
||||
```
|
||||
- name: XPTO
|
||||
xpto:
|
||||
name: abc
|
||||
state: present
|
||||
config:
|
||||
client: xyz
|
||||
url: http://beta
|
||||
pattern: "*.*"
|
||||
```
|
||||
|
||||
The benefits of this approach, based on custom modules, include:
|
||||
|
||||
* It's declarative—resources are properly represented in YAML.
|
||||
* It's idempotent.
|
||||
* It converges from the declared state to the current state.
|
||||
* It's readable by human beings.
|
||||
* It's easily parameterized or reused.
|
||||
|
||||
|
||||
|
||||
### Implementing a custom module
|
||||
|
||||
Let's use [WildFly][5], an open source Java application server, as an example to introduce a custom module for our not-so-good playbook:
|
||||
|
||||
```
|
||||
- name: Read datasource
|
||||
command: "jboss-cli.sh -c '/subsystem=datasources/data-source=DemoDS:read-resource()'"
|
||||
register: datasource
|
||||
|
||||
- name: Create datasource
|
||||
command: "jboss-cli.sh -c '/subsystem=datasources/data-source=DemoDS:add(driver-name=h2, user-name=sa, password=sa, min-pool-size=20, max-pool-size=40, connection-url=.jdbc:h2:mem:demo;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE..)'"
|
||||
when: 'datasource.stdout | outcome => failed'
|
||||
```
|
||||
|
||||
Problems:
|
||||
|
||||
* It's not declarative.
|
||||
* JBoss-CLI returns plaintext in a JSON-like syntax; therefore, this approach is very fragile, since we need a type of parser for this notation. Even a seemingly simple parser can be too complex to treat many [exceptions][6].
|
||||
* JBoss-CLI is just an interface to send requests to the management API (port 9990).
|
||||
* Sending an HTTP request is more efficient than opening a new JBoss-CLI session, connecting, and sending a command.
|
||||
* It does not converge to the desired state; it only creates the resource when it doesn't exist.
|
||||
|
||||
|
||||
|
||||
A custom module for this would look like:
|
||||
|
||||
```
|
||||
- name: Configure datasource
|
||||
jboss_resource:
|
||||
name: "/subsystem=datasources/data-source=DemoDS"
|
||||
state: present
|
||||
attributes:
|
||||
driver-name: h2
|
||||
connection-url: "jdbc:h2:mem:demo;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE"
|
||||
jndi-name: "java:jboss/datasources/DemoDS"
|
||||
user-name: sa
|
||||
password: sa
|
||||
min-pool-size: 20
|
||||
max-pool-size: 40
|
||||
```
|
||||
|
||||
This playbook is declarative, idempotent, more readable, and converges to the desired state regardless of the current state.
|
||||
|
||||
### Why learn to build custom modules?
|
||||
|
||||
Good reasons to learn how to build custom modules include:
|
||||
|
||||
* Improving existing modules
|
||||
* You have bad playbooks and want to improve them, or …
|
||||
* You don't, but want to avoid having bad playbooks.
|
||||
* Knowing how to build a module considerably improves your ability to debug problems in playbooks, thereby increasing your productivity.
|
||||
|
||||
|
||||
|
||||
> "…abstractions save us time working, but they don't save us time learning." —Joel Spolsky, [The Law of Leaky Abstractions][7]
|
||||
|
||||
#### Custom Ansible modules 101
|
||||
|
||||
* JSON (JavaScript Object Notation) in stdout: that's the contract!
|
||||
* They can be written in any language, but …
|
||||
* Python is usually the best option (or the second best)
|
||||
* Most modules delivered with Ansible ( **lib/ansible/modules** ) are written in Python and should support compatible versions.
|
||||
|
||||
|
||||
|
||||
#### The Ansible way
|
||||
|
||||
* First step:
|
||||
|
||||
```
|
||||
git clone https://github.com/ansible/ansible.git
|
||||
```
|
||||
|
||||
* Navigate in **lib/ansible/modules/** and read the existing modules code.
|
||||
|
||||
* Your tools are: Git, Python, virtualenv, pdb (Python debugger)
|
||||
|
||||
* For comprehensive instructions, consult the [official docs][8].
|
||||
|
||||
|
||||
|
||||
|
||||
#### An alternative: drop it in the library directory
|
||||
|
||||
```
|
||||
library/ # if any custom modules, put them here (optional)
|
||||
module_utils/ # if any custom module_utils to support modules, put them here (optional)
|
||||
filter_plugins/ # if any custom filter plugins, put them here (optional)
|
||||
|
||||
site.yml # master playbook
|
||||
webservers.yml # playbook for webserver tier
|
||||
dbservers.yml # playbook for dbserver tier
|
||||
|
||||
roles/
|
||||
common/ # this hierarchy represents a "role"
|
||||
library/ # roles can also include custom modules
|
||||
module_utils/ # roles can also include custom module_utils
|
||||
lookup_plugins/ # or other types of plugins, like lookup in this case
|
||||
```
|
||||
|
||||
* It's easier to start.
|
||||
* Doesn't require anything besides Ansible and your favorite IDE/text editor.
|
||||
* This is your best option if it's something that will be used internally.
|
||||
|
||||
|
||||
|
||||
**TIP:** You can use this directory layout to overwrite existing modules if, for example, you need to patch a module.
|
||||
|
||||
#### First steps
|
||||
|
||||
You could do it in your own—including using another language—or you could use the AnsibleModule class, as it is easier to put JSON in the stdout ( **exit_json()** , **fail_json()** ) in the way Ansible expects ( **msg** , **meta** , **has_changed** , **result** ), and it's also easier to process the input ( **params[]** ) and log its execution ( **log()** , **debug()** ).
|
||||
|
||||
```
|
||||
def main():
|
||||
|
||||
arguments = dict(name=dict(required=True, type='str'),
|
||||
state=dict(choices=['present', 'absent'], default='present'),
|
||||
config=dict(required=False, type='dict'))
|
||||
|
||||
module = AnsibleModule(argument_spec=arguments, supports_check_mode=True)
|
||||
try:
|
||||
if module.check_mode:
|
||||
# Do not do anything, only verifies current state and report it
|
||||
module.exit_json(changed=has_changed, meta=result, msg='Fez alguma coisa ou não...')
|
||||
|
||||
if module.params['state'] == 'present':
|
||||
# Verify the presence of a resource
|
||||
# Desired state `module.params['param_name'] is equal to the current state?
|
||||
module.exit_json(changed=has_changed, meta=result)
|
||||
|
||||
if module.params['state'] == 'absent':
|
||||
# Remove the resource in case it exists
|
||||
module.exit_json(changed=has_changed, meta=result)
|
||||
|
||||
except Error as err:
|
||||
module.fail_json(msg=str(err))
|
||||
```
|
||||
|
||||
**NOTES:** The **check_mode** ("dry run") allows a playbook to be executed or just verifies if changes are required, but doesn't perform them. **** Also, the **module_utils** directory can be used for shared code among different modules.
|
||||
|
||||
For the full Wildfly example, check [this pull request][9].
|
||||
|
||||
### Running tests
|
||||
|
||||
#### The Ansible way
|
||||
|
||||
The Ansible codebase is heavily tested, and every commit triggers a build in its continuous integration (CI) server, [Shippable][10], which includes linting, unit tests, and integration tests.
|
||||
|
||||
For integration tests, it uses containers and Ansible itself to perform the setup and verify phase. Here is a test case (written in Ansible) for our custom module's sample code:
|
||||
|
||||
```
|
||||
- name: Configure datasource
|
||||
jboss_resource:
|
||||
name: "/subsystem=datasources/data-source=DemoDS"
|
||||
state: present
|
||||
attributes:
|
||||
connection-url: "jdbc:h2:mem:demo;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE"
|
||||
...
|
||||
register: result
|
||||
|
||||
- name: assert output message that datasource was created
|
||||
assert:
|
||||
that:
|
||||
- "result.changed == true"
|
||||
- "'Added /subsystem=datasources/data-source=DemoDS' in result.msg"
|
||||
```
|
||||
|
||||
#### An alternative: bundling a module with your role
|
||||
|
||||
Here is a [full example][11] inside a simple role:
|
||||
|
||||
```
|
||||
[*Molecule*]() + [*Vagrant*]() + [*pytest*](): `molecule init` (inside roles/<name>)
|
||||
```
|
||||
|
||||
It offers greater flexibility to choose:
|
||||
|
||||
* Simplified setup
|
||||
* How to spin up your infrastructure: e.g., Vagrant, Docker, OpenStack, EC2
|
||||
* How to verify your infrastructure tests: Testinfra and Goss
|
||||
|
||||
|
||||
|
||||
But your tests would have to be written using pytest with Testinfra or Goss, instead of plain Ansible. If you'd like to learn more about testing Ansible roles, see my article about [using Molecule][12].
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/19/3/developing-ansible-modules
|
||||
|
||||
作者:[Jairo da Silva Junior][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/jairojunior
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://docs.ansible.com/ansible/latest/dev_guide/developing_plugins.html#developing-plugins
|
||||
[2]: https://docs.ansible.com/ansible/latest/dev_guide/developing_modules.html
|
||||
[3]: https://groups.google.com/forum/#!forum/ansible-devel
|
||||
[4]: https://github.com/ansible/community/
|
||||
[5]: http://www.wildfly.org/
|
||||
[6]: https://tools.ietf.org/html/rfc7159
|
||||
[7]: https://en.wikipedia.org/wiki/Leaky_abstraction#The_Law_of_Leaky_Abstractions
|
||||
[8]: https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general.html#developing-modules-general
|
||||
[9]: https://github.com/ansible/ansible/pull/43682/files
|
||||
[10]: https://app.shippable.com/github/ansible/ansible/dashboard
|
||||
[11]: https://github.com/jairojunior/ansible-role-jboss/tree/with_modules
|
||||
[12]: https://opensource.com/article/18/12/testing-ansible-roles-molecule
|
@ -0,0 +1,366 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (5 Ways To Generate A Random/Strong Password In Linux Terminal)
|
||||
[#]: via: (https://www.2daygeek.com/5-ways-to-generate-a-random-strong-password-in-linux-terminal/)
|
||||
[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/)
|
||||
|
||||
5 Ways To Generate A Random/Strong Password In Linux Terminal
|
||||
======
|
||||
|
||||
Recently we had written an article about **[password strength and password score check][1]** in our website.
|
||||
|
||||
It will help you to validate your password strength and score.
|
||||
|
||||
We can manually create few passwords which we required but if you would like to generate a password for multiple users or servers, what will be the solution.
|
||||
|
||||
Yes, there are many utilities are available in Linux to fulfill this requirements. However, I’m going to include the best five password generators in this article.
|
||||
|
||||
These tools are generates a strong random passwords for you. Navigate to the following article if you would like to update the password on multiple users and servers.
|
||||
|
||||
These tools are easy to use, that’s why i preferred to go with it. By default it will generate a strong password and if you would like to generate a super strong password then use the available options.
|
||||
|
||||
It will help you to generate a super strong password in the following combination. It should have minimum 12-15 characters length, that includes Alphabets (Lower case & Upper case), Numbers and Special Characters.
|
||||
|
||||
These tools are below.
|
||||
|
||||
* `pwgen:` The pwgen program generates passwords which are designed to be easily memorized by humans, while being as secure as possible.
|
||||
* `openssl:` The openssl program is a command line tool for using the various cryptography functions of OpenSSL’s crypto library from the shell.
|
||||
* `gpg:` OpenPGP encryption and signing tool
|
||||
* `mkpasswd:` generate new password, optionally apply it to a user
|
||||
* `makepasswd:` makepasswd generates true random passwords using /dev/urandom, with the emphasis on security over pronounceability.
|
||||
* `/dev/urandom file:` The character special files /dev/random and /dev/urandom (present since Linux 1.3.30) provide an interface to the kernel’s random number generator.
|
||||
* `md5sum:` md5sum is a computer program that calculates and verifies 128-bit MD5 hashes.
|
||||
* `sha256sum:` The program sha256sum is designed to verify data integrity using the SHA-256 (SHA-2 family with a digest length of 256 bits).
|
||||
* `sha1pass:` sha1pass creates a SHA1 password hash. In the absence of a salt value on the command line, a random salt vector will be generated.
|
||||
|
||||
|
||||
|
||||
### How To Generate A Random Strong Password In Linux Using pwgen Command?
|
||||
|
||||
The pwgen program generates passwords which are designed to be easily memorized by humans, while being as secure as possible.
|
||||
|
||||
Human-memorable passwords are never going to be as secure as completely completely random passwords.
|
||||
|
||||
Use `-s` option to generate completely random, hard-to-memorize passwords. These should only be used for machine passwords as we can’t memorize.
|
||||
|
||||
For **`Fedora`** system, use **[DNF Command][2]** to install pwgen.
|
||||
|
||||
```
|
||||
$ sudo dnf install pwgen
|
||||
```
|
||||
|
||||
For **`Debian/Ubuntu`** systems, use **[APT-GET Command][3]** or **[APT Command][4]** to install pwgen.
|
||||
|
||||
```
|
||||
$ sudo apt install pwgen
|
||||
```
|
||||
|
||||
For **`Arch Linux`** based systems, use **[Pacman Command][5]** to install pwgen.
|
||||
|
||||
```
|
||||
$ sudo pacman -S pwgen
|
||||
```
|
||||
|
||||
For **`RHEL/CentOS`** systems, use **[YUM Command][6]** to install pwgen.
|
||||
|
||||
```
|
||||
$ sudo yum install pwgen
|
||||
```
|
||||
|
||||
For **`openSUSE Leap`** system, use **[Zypper Command][7]** to install pwgen.
|
||||
|
||||
```
|
||||
$ sudo zypper install pwgen
|
||||
```
|
||||
|
||||
### How To Use pwgen Command In Linux?
|
||||
|
||||
It’s a simple and straight forward method. Use one of the below preferred examples for you. By default, it generates a human memorable password.
|
||||
|
||||
To do so, simple run the `pwgen` command on your terminal. It generates 160 passwords in a single shot. These 160 passwords are printer with 20 rows and 8 columns.
|
||||
|
||||
```
|
||||
$ pwgen
|
||||
ameiK2oo aibi3Cha EPium0Ie aisoh1Ee Nidee9ae uNga0Bee uPh9ieM1 ahn1ooNg
|
||||
oc5ooTea tai7eKid tae2yieS hiecaiR8 wohY2Ohk Uab2maed heC4aXoh Ob6Nieso
|
||||
Shaeriu3 uy9Juk5u hoht7Doo Fah6yah3 faz9Jeew eKiek4ju as0Xuosh Eiwo4epo
|
||||
oot8teeZ Ui1yoohi Aechae7A Ohdi2ael cae5Thoh Au1aeTei ais0aiC2 Cai2quin
|
||||
Oox9ohz4 neev0Che ahza8AQu Ahz7eica meiBeeW0 Av3bo7ah quoiTu3f taeNg3ae
|
||||
Aiko7Aiz SheiGh8E aesaeSh7 haet6Loo AeTel3oN Ath7zeer IeYah4ie UG3ootha
|
||||
Ohch9Och Phuap6su iel5Xu7s diqui7Bu ieF2dier eeluHa1u Thagei0i Ceeth3oh
|
||||
OCei1ahj zei2aiYo Jahgh1ia ooqu1Cej eez2aiPo Wahd5soo noo7Mei9 Hie5ashe
|
||||
Uith4Or2 Xie3uh2b fuF9Eilu eiN2sha9 zae2YaSh oGh5ephi ohvao4Ae aixu6aeM
|
||||
fo4Ierah iephei6A hae9eeGa eiBeiY3g Aic8Kee9 he8AheCh ohM4bid9 eemae3Zu
|
||||
eesh2EiM cheiGa4j PooV2vii ahpeeg5E aezauX2c Xe7aethu Ahvaph7a Joh2heec
|
||||
Ii5EeShi aij7Uo8e ooy2Ahth mieKe2ni eiQuu8fe giedaQu0 eiPhob3E oox1uo2U
|
||||
eehia4Hu ga9Ahw0a ohxuZei7 eV4OoXio Kid2wu1n ku4Ahf5s uigh8uQu AhWoh0po
|
||||
vo1Eeb2u Ahth7ve5 ieje4eiL ieci1Ach Meephie9 iephieY8 Eesoom7u eakai2Bo
|
||||
uo8Ieche Zai3aev5 aGhahf0E Wowoo5th Oraeb0ah Gah3nah0 ieGhah0p aeCh0OhJ
|
||||
ahQu2feZ ahQu0gah foik7Ush cei1Wai1 Aivi3ooY eephei5U MooZae3O quooRoh7
|
||||
aequae5U pae6Ceiv eizahF1k ohmi7ETa ahyaeK1N Mohw2no8 ooc8Oone coo7Ieve
|
||||
eePhei9h Weequ8eV Vie4iezu neeMiim4 ie6aiZoh Queegh2E shahwi3N Inichie8
|
||||
Sid1aeji mohj4Ko7 lieDi0pe Zeemah6a thuevu2E phi4Ohsh paiKeix1 ooz1Ceph
|
||||
ahV4yore ue2laePh fu1eThui qui7aePh Fahth1nu ohk9puLo aiBeez0b Neengai5
|
||||
```
|
||||
|
||||
To generate a secure random password, use `-s` option with pwgen command.
|
||||
|
||||
```
|
||||
$ pwgen -s
|
||||
CU75lgZd 7HzzKgtA 2ktBJDpR F6XJVhBs UjAm3bNL zO7Dw7JJ pxn8fUvp Ka3lLilG
|
||||
ywJX7iJl D9ajxb6N 78c1HOg2 g8vtWCra Jp6pBGBw oYuev9Vl gbA6gHV8 G6XQoVO5
|
||||
uQN98IU4 50GgQfrX FrTsou2t YQorO4x6 UGer8Yi2 O7DB5nw1 1ax370UR 1xVRPkA1
|
||||
RVaGDr2i Nt11ekUd 9Vm3D244 ck8Lnpd0 SjDt8uWn 5ERT4tf8 4EONFzyY Jc6T83jg
|
||||
WZa6bKPW H4HMo1YU bsDDRik3 gBwV7LOW 9H1QRQ4x 3Ak7RcSe IJu2RBF9 e508xrLC
|
||||
SzTrW191 AslxDa6E IkWWov2b iOb6EmTy qHt82OwG 5ZFO7B53 97zmjOPu A4KZuhYV
|
||||
uQpoJR4D 0eKyOiUr Rz96smeO 3HTABu3N 6W0VmEls uPsp5zpw 8UD3VkMG YTct6Rd4
|
||||
VKo0cVmq E07ZX7j9 kQSlvA69 Nm3fpv3i xWvF2xMu yEfcw8uA oQGVX3l9 grTzx7Xj
|
||||
s4GVEYtM uJl5sYMe n3icRPiY ED3Mup4B k3M9KHI7 IkxqoSM0 dt2cxmMU yb2tUkut
|
||||
2Q9wGZQx 8Rpo11s9 I13siOHu 7GV64Fjv 3VONzD8i SCDfVD3F oiPTx239 6BQakoiJ
|
||||
XUEokiC4 ybL7VGmL el2RfvWk zKc7CLcE 3FqNBSyA NjDWrvZ5 KI3NSX4h VFyo6VPr
|
||||
h4q3XeqZ FDYMoX6f uTU5ZzU3 6u4ob4Ep wiYPt05n CZga66qh upzH6Z9y RuVcqbe8
|
||||
taQv11hq 1xsY67a8 EVo9GLXA FCaDLGb1 bZyh0YN8 0nTKo0Qy RRVUwn9t DuU8mwwv
|
||||
x96LWpCb tFLz3fBG dNb4gCKf n6VYcOiH 1ep6QYFZ x8kaJtrY 56PDWuW6 1R0If4kV
|
||||
2XK0NLQK 4XQqhycl Ip08cn6c Bnx9z2Bz 7gjGlON7 CJxLR1U4 mqMwir3j ovGXWu0z
|
||||
MfDjk5m8 4KwM9SAN oz0fZ5eo 5m8iRtco oP5BpLh0 Z5kvwr1W f34O2O43 hXao1Sp8
|
||||
tKoG5VNI f13fuYvm BQQn8MD3 bmFSf6Mf Z4Y0o17U jT4wO1DG cz2clBES Lr4B3qIY
|
||||
ArKQRND6 8xnh4oIs nayiK2zG yWvQCV3v AFPlHSB8 zfx5bnaL t5lFbenk F2dIeBr4
|
||||
C6RqDQMy gKt28c9O ZCi0tQKE 0Ekdjh3P ox2vWOMI 14XF4gwc nYA0L6tV rRN3lekn
|
||||
lmwZNjz1 4ovmJAr7 shPl9o5f FFsuNwj0 F2eVkqGi 7gw277RZ nYE7gCLl JDn05S5N
|
||||
```
|
||||
|
||||
If you would like to generate a strong five passwords with 14 characters length, use the following format.
|
||||
|
||||
```
|
||||
$ pwgen -s 14 5
|
||||
7YxUwDyfxGVTYD em2NT6FceXjPfT u8jlrljbrclcTi IruIX3Xu0TFXRr X8M9cB6wKNot1e
|
||||
```
|
||||
|
||||
If you really want to generate a super strong random twenty passwords, use the following format.
|
||||
|
||||
```
|
||||
$ pwgen -cnys 14 20
|
||||
mQ3E=vfGfZ,5[B #zmj{i5|ZS){jg Ht_8i7OqJ%N`~2 443fa5iJ\W-L?] ?Qs$o=vz2vgQBR
|
||||
^'Ry0Az|J9p2+0 t2oA/n7U_'|QRx EsX*%_(4./QCRJ ACr-,8yF9&eM[* !Xz1C'bw?tv50o
|
||||
8hfv-fK(VxwQGS q!qj?sD7Xmkb7^ N#Zp\_Y2kr%!)~ 4*pwYs{bq]Hh&Y |4u=-Q1!jS~8=;
|
||||
]{$N#FPX1L2B{h I|01fcK.z?QTz" l~]JD_,W%5bp.E +i2=D3;BQ}p+$I n.a3,.D3VQ3~&i
|
||||
```
|
||||
|
||||
### How To Generate A Random Strong Password In Linux Using openssl Command?
|
||||
|
||||
The openssl program is a command line tool for using the various cryptography functions of OpenSSL’s crypto library from the shell.
|
||||
|
||||
Run the openssl command with the following format to generate a random strong password with 14 characters.
|
||||
|
||||
```
|
||||
$ openssl rand -base64 14
|
||||
WjzyDqdkWf3e53tJw/c=
|
||||
```
|
||||
|
||||
If you would like to generate ten random strong password with 14 characters using openssl command then use the following for loop.
|
||||
|
||||
```
|
||||
$ for pw in {1..10}; do openssl rand -base64 14; done
|
||||
6i0hgHDBi3ohZ9Mil8I=
|
||||
gtn+y1bVFJFanpJqWaA=
|
||||
rYu+wy+0nwLf5lk7TBA=
|
||||
xrdNGykIzxaKDiLF2Bw=
|
||||
cltejRkDPdFPC/zI0Pg=
|
||||
G6aroK6d4xVVYFTrZGs=
|
||||
jJEnFoOk1+UTSx/wJrY=
|
||||
TFxVjBmLx9aivXB3yxE=
|
||||
oQtOLPwTuO8df7dIv9I=
|
||||
ktpBpCSQFOD+5kIIe7Y=
|
||||
```
|
||||
|
||||
### How To Generate A Random Strong Password In Linux Using gpg Command?
|
||||
|
||||
gpg is the OpenPGP part of the GNU Privacy Guard (GnuPG). It is a tool to provide digital encryption and signing services using the OpenPGP standard. gpg features complete key management and all the bells and whistles you would expect from a full OpenPGP implementation.
|
||||
|
||||
Run the gpg command with the following format to generate a random strong password with 14 characters.
|
||||
|
||||
```
|
||||
$ gpg --gen-random --armor 1 14
|
||||
or
|
||||
$ gpg2 --gen-random --armor 1 14
|
||||
jq1mtY4gBa6gIuJrggM=
|
||||
```
|
||||
|
||||
If you would like to generate ten random strong password with 14 characters using gpg command then use the following for loop.
|
||||
|
||||
```
|
||||
$ for pw in {1..10}; do gpg --gen-random --armor 1 14; done
|
||||
or
|
||||
$ for pw in {1..10}; do gpg2 --gen-random --armor 1 14; done
|
||||
F5ZzLSUMet2kefG6Ssc=
|
||||
8hh7BFNs8Qu0cnrvHrY=
|
||||
B+PEt28CosR5xO05/sQ=
|
||||
m21bfx6UG1cBDzVGKcE=
|
||||
wALosRXnBgmOC6+++xU=
|
||||
TGpjT5xRxo/zFq/lNeg=
|
||||
ggsKxVgpB/3aSOY15W4=
|
||||
iUlezWxL626CPc9omTI=
|
||||
pYb7xQwI1NTlM2rxaCg=
|
||||
eJjhtA6oHhBrUpLY4fM=
|
||||
```
|
||||
|
||||
### How To Generate A Random Strong Password In Linux Using mkpasswd Command?
|
||||
|
||||
mkpasswd generates passwords and can apply them automatically to users. With no arguments, mkpasswd returns a new password. It’s part of an expect package so, you have to install expect package to use mkpasswd command.
|
||||
|
||||
For **`Fedora`** system, use **[DNF Command][2]** to install mkpasswd.
|
||||
|
||||
```
|
||||
$ sudo dnf install expect
|
||||
```
|
||||
|
||||
For **`Debian/Ubuntu`** systems, use **[APT-GET Command][3]** or **[APT Command][4]** to install mkpasswd.
|
||||
|
||||
```
|
||||
$ sudo apt install expect
|
||||
```
|
||||
|
||||
For **`Arch Linux`** based systems, use **[Pacman Command][5]** to install mkpasswd.
|
||||
|
||||
```
|
||||
$ sudo pacman -S expect
|
||||
```
|
||||
|
||||
For **`RHEL/CentOS`** systems, use **[YUM Command][6]** to install mkpasswd.
|
||||
|
||||
```
|
||||
$ sudo yum install expect
|
||||
```
|
||||
|
||||
For **`openSUSE Leap`** system, use **[Zypper Command][7]** to install mkpasswd.
|
||||
|
||||
```
|
||||
$ sudo zypper install expect
|
||||
```
|
||||
|
||||
Run the `mkpasswd` command in terminal to generate a random password.
|
||||
|
||||
```
|
||||
$ mkpasswd
|
||||
37_slQepD
|
||||
```
|
||||
|
||||
Run the mkpasswd command with the following format to generate a random strong password with 14 characters.
|
||||
|
||||
```
|
||||
$ mkpasswd -l 14
|
||||
W1qP1uv=lhghgh
|
||||
```
|
||||
|
||||
Run the mkpasswd command with the following format to generate a random strong password with 14 characters. It combinations of alphabetic (Lower & Upper case), Numeric number and special characters.
|
||||
|
||||
```
|
||||
$ mkpasswd -l 14 -d 3 -C 3 -s 3
|
||||
3aad!bMWG49"t,
|
||||
```
|
||||
|
||||
If you would like to generate ten random strong password with 14 characters (It combination of alphabetic (Lower & Upper case), Numeric number and special characters) using mkpasswd command then use the following for loop.
|
||||
|
||||
```
|
||||
$ for pw in {1..10}; do mkpasswd -l 14 -d 3 -C 3 -s 3; done
|
||||
zmSwP[q9;P1r6[
|
||||
E42zcvzM"i3%B\
|
||||
8}1#[email protected]
|
||||
0X:zB(mmU22?nj
|
||||
0sqqL44M}ko(O^
|
||||
43tQ(.6jG;ceRq
|
||||
-jB6cp3x1GZ$e=
|
||||
$of?Rj9kb2N(1J
|
||||
9HCf,nn#gjO79^
|
||||
Tu9m56+Ev_Yso(
|
||||
```
|
||||
|
||||
### How To Generate A Random Strong Password In Linux Using makepasswd Command?
|
||||
|
||||
makepasswd generates true random passwords using /dev/urandom, with the emphasis on security over pronounceability. It can also encrypt plaintext passwords given on the command line.
|
||||
|
||||
Run the `makepasswd` command in terminal to generate a random password.
|
||||
|
||||
```
|
||||
$ makepasswd
|
||||
HdCJafVaN
|
||||
```
|
||||
|
||||
Run the makepasswd command with the following format to generate a random strong password with 14 characters.
|
||||
|
||||
```
|
||||
$ makepasswd --chars 14
|
||||
HxJDv5quavrqmU
|
||||
```
|
||||
|
||||
Run the makepasswd command with the following format to generate ten random strong password with 14 characters.
|
||||
|
||||
```
|
||||
$ makepasswd --chars 14 --count 10
|
||||
TqmKVWnRGeoVNr
|
||||
mPV2P98hLRUsai
|
||||
MhMXPwyzYi2RLo
|
||||
dxMGgLmoFpYivi
|
||||
8p0G7JvJjd6qUP
|
||||
7SmX95MiJcQauV
|
||||
KWzrh5npAjvNmL
|
||||
oHPKdq1uA9tU85
|
||||
V1su9GjU2oIGiQ
|
||||
M2TMCEoahzLNYC
|
||||
```
|
||||
|
||||
### How To Generate A Random Strong Password In Linux Using Multiple Commands?
|
||||
|
||||
Still if you are looking other options then you can use the following utilities to generate a random password in Linux.
|
||||
|
||||
**Using md5sum:** md5sum is a computer program that calculates and verifies 128-bit MD5 hashes.
|
||||
|
||||
```
|
||||
$ date | md5sum
|
||||
9baf96fb6e8cbd99601d97a5c3acc2c4 -
|
||||
```
|
||||
|
||||
**Using /dev/urandom:** The character special files /dev/random and /dev/urandom (present since Linux 1.3.30) provide an interface to the kernel’s random number generator. File /dev/random has major device number 1 and minor device number 8. File /dev/urandom has major device number 1 and minor device number 9.
|
||||
|
||||
```
|
||||
$ cat /dev/urandom | tr -dc 'a-zA-Z0-9' | head -c 14
|
||||
15LQB9J84Btnzz
|
||||
```
|
||||
|
||||
**Using sha256sum:** The program sha256sum is designed to verify data integrity using the SHA-256 (SHA-2 family with a digest length of 256 bits).
|
||||
|
||||
```
|
||||
$ date | sha256sum
|
||||
a114ae5c458ae0d366e1b673d558d921bb937e568d9329b525cf32290478826a -
|
||||
```
|
||||
|
||||
**Using sha1pass:** sha1pass creates a SHA1 password hash. In the absence of a salt value on the command line, a random salt vector will be generated.
|
||||
|
||||
```
|
||||
$ sha1pass
|
||||
$4$9+JvykOv$e7U0jMJL2yBOL+RVa2Eke8SETEo$
|
||||
```
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.2daygeek.com/5-ways-to-generate-a-random-strong-password-in-linux-terminal/
|
||||
|
||||
作者:[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-check-password-complexity-strength-and-score-in-linux/
|
||||
[2]: https://www.2daygeek.com/dnf-command-examples-manage-packages-fedora-system/
|
||||
[3]: https://www.2daygeek.com/apt-get-apt-cache-command-examples-manage-packages-debian-ubuntu-systems/
|
||||
[4]: https://www.2daygeek.com/apt-command-examples-manage-packages-debian-ubuntu-systems/
|
||||
[5]: https://www.2daygeek.com/pacman-command-examples-manage-packages-arch-linux-system/
|
||||
[6]: https://www.2daygeek.com/yum-command-examples-manage-packages-rhel-centos-systems/
|
||||
[7]: https://www.2daygeek.com/zypper-command-examples-manage-packages-opensuse-system/
|
@ -0,0 +1,65 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (5 ways to teach kids to program with Raspberry Pi)
|
||||
[#]: via: (https://opensource.com/article/19/3/teach-kids-program-raspberry-pi)
|
||||
[#]: author: (Anderson Silva https://opensource.com/users/ansilva)
|
||||
|
||||
5 ways to teach kids to program with Raspberry Pi
|
||||
======
|
||||
The fifth article in our guide to getting started with the Raspberry Pi explores resources for helping kids learn to program.
|
||||

|
||||
|
||||
As countless schools, libraries, and families have proven, the Raspberry Pi is a great way to expose kids to programming. In the first four articles in this series, you've learned about [purchasing][1], [installing][2], and [configuring][3] a Raspberry Pi. In this fifth article, I'll share some helpful resources to get kids started programming with the Raspberry Pi.
|
||||
|
||||
### Scratch
|
||||
|
||||
[Scratch][4] is a great way to introduce kids to basic programming concepts like variables, boolean logic, loops, and more. It's included in Raspbian, and you can find numerous articles and tutorials about Scratch on the internet, including [Is Scratch today like the Logo of the '80s for teaching kids to code?][5] on Opensource.com.
|
||||
|
||||

|
||||
|
||||
### Code.org
|
||||
|
||||
[Code.org][6] is another great online resource for kids learning to program. The organization's mission is to expose more people to coding through courses, tutorials, and the popular Hour of Code event. Many schools—including my fifth-grade son's—use it to expose more kids to programming and computer science concepts.
|
||||
|
||||
### Reading
|
||||
|
||||
Reading books is another great way to learn how to program. You don't necessarily need to speak English to learn how to program, but the more you know, the easier it will be, as most programming languages use English keywords to describe the commands. If your English is good enough to follow this Raspberry Pi series, you are most likely well-equipped to read books, forums, and other publications about programming. One book I recommend is [Python for Kids: A Playful Introduction to Programming][7] by Jason Biggs.
|
||||
|
||||
### Raspberry Jam
|
||||
|
||||
Another way to get your kids into programming is by helping them interact with others at meetups. The Raspberry Pi Foundation sponsors events called [Raspberry Jams][8] around the world where kids and adults can join forces and learn together on the Raspberry Pi. If there isn't a Raspberry Jam in your area, the foundation has a [guidebook][9] and other resources to help you start one.
|
||||
|
||||
### Gaming
|
||||
|
||||
Last, but not least, there's a version of [Minecraft][10] for the Raspberry Pi. Minecraft has grown from a multi-player "digital Lego"-like game into a programming platform where anyone can use Python and other languages to build on Minecraft's virtual world. Check out [Getting Started with Minecraft Pi][11] and [Minecraft Hour of Code Tutorials][12].
|
||||
|
||||
What are your favorite resources for teaching kids to program with Raspberry Pi? Please share them in the comments.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/19/3/teach-kids-program-raspberry-pi
|
||||
|
||||
作者:[Anderson Silva][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/ansilva
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/article/19/2/how-buy-raspberry-pi
|
||||
[2]: https://opensource.com/article/19/2/how-boot-new-raspberry-pi
|
||||
[3]: https://opensource.com/article/19/3/learn-linux-raspberry-pi
|
||||
[4]: https://scratch.mit.edu/
|
||||
[5]: https://opensource.com/article/17/3/logo-scratch-teach-programming-kids
|
||||
[6]: https://code.org/
|
||||
[7]: https://www.amazon.com/Python-Kids-Playful-Introduction-Programming/dp/1593274076
|
||||
[8]: https://www.raspberrypi.org/jam/#map-section
|
||||
[9]: https://static.raspberrypi.org/files/jam/Raspberry-Jam-Guidebook-2017-04-26.pdf
|
||||
[10]: https://minecraft.net/en-us/edition/pi/
|
||||
[11]: https://projects.raspberrypi.org/en/projects/getting-started-with-minecraft-pi
|
||||
[12]: https://code.org/minecraft
|
@ -0,0 +1,134 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Running the ‘Real Debian’ on Raspberry Pi 3+ [For DIY Enthusiasts])
|
||||
[#]: via: (https://itsfoss.com/debian-raspberry-pi)
|
||||
[#]: author: (Shirish https://itsfoss.com/author/shirish/)
|
||||
|
||||
Running the ‘Real Debian’ on Raspberry Pi 3+ [For DIY Enthusiasts]
|
||||
======
|
||||
|
||||
If you have ever used a Raspberry Pi device, you probably already know that it recommends a Linux distribution called [Raspbian][1].
|
||||
|
||||
Raspbian is a heavily customized form of Debian to run on low-powered ARM processors. It’s not bad. In fact, it’s an excellent OS for Raspberry Pi devices but it’s not the real Debian.
|
||||
|
||||
[Debian purists like me][2] would prefer to run the actual Debian over the Raspberry Pi’s customized Debian version. I trust Debian more than any other distribution to provide me a vast amount of properly vetted free software packages. Moreover, a project like this would help other ARM devices as well.
|
||||
|
||||
Above all, running the official Debian on Raspberry Pi is sort of challenge and I like such challenges.
|
||||
|
||||
![Real Debian on Raspberry Pi][3]
|
||||
|
||||
I am not the only one who thinks like this. There are many other Debian users who share the same feeling and this is why there exists an ongoing project to create a [Debian image for Raspberry Pi][4].
|
||||
|
||||
About two and a half months back, a Debian Developer (DD) named [Gunnar Wolf][5] took over that unofficial Raspberry Pi image generation project.
|
||||
|
||||
I’ll be quickly showing you how can you install this Raspberry Pi Debian Buster preview image on your Raspberry Pi 3 (or higher) devices.
|
||||
|
||||
### Getting Debian on Raspberry Pi [For Experts]
|
||||
|
||||
```
|
||||
Warning
|
||||
|
||||
Be aware this Debian image is very raw and unsupported at the moment. Though it’s very new, I believe experienced Raspberry Pi and Debian users should be able to use it.
|
||||
```
|
||||
|
||||
Now as far as [Debian][6] is concerned, here is the Debian image and instructions that you could use to put the Debian stock image on your Raspberry pi 3 Model B+.
|
||||
|
||||
#### Step 1: Download the Debian Raspberry Pi Buster image
|
||||
|
||||
You can download the preview images using wget command:
|
||||
|
||||
```
|
||||
wget https://people.debian.org/~gwolf/raspberrypi3/20190206/20190206-raspberry-pi-3-buster-PREVIEW.img.xz
|
||||
```
|
||||
|
||||
#### Step 2: Verify checksum (optional)
|
||||
|
||||
It’s optional but you should [verify the checksum][7]. You can do that by downloading the SHA256 hashfile and then comparing it with that of the downloaded Raspberry Pi Debian image.
|
||||
|
||||
At my end I had moved both the .sha256 file as img.xz to a directory to make it easier to check although it’s not necessary.
|
||||
|
||||
```
|
||||
wget https://people.debian.org/~gwolf/raspberrypi3/20190206/20190206-raspberry-pi-3-buster-PREVIEW.img.xz.sha256
|
||||
|
||||
sha256sum -c 20190206-raspberry-pi-3-buster-PREVIEW.img.xz.sha256
|
||||
```
|
||||
|
||||
#### Step 3: Write the image to your SD card
|
||||
|
||||
Once you have verified the image, take a look at it. It is around 400MB in the compressed xzip format. You can extract it to get an image of around 1.5GB in size.
|
||||
|
||||
Insert your SD card. **Before you carry on to the next command please change the sdX to a suitable name that corresponds to your SD card.**
|
||||
|
||||
The command basically extracts the img.xz archive to the SD card. The progress switch/flag enables you to see a progress line with a number as to know how much the archive has extracted.
|
||||
|
||||
```
|
||||
xzcat 20190206-raspberry-pi-3-buster-PREVIEW.img.xz | dd of=/dev/sdX bs=64k oflag=dsync status=progress$ xzcat 20190206-raspberry-pi-3-buster-PREVIEW.img.xz | dd of=/dev/sdX bs=64k oflag=dsync status=progress
|
||||
```
|
||||
|
||||
Once you have successfully flashed your SD card, you should be able test if the installation went ok by sshing into your Raspberry Pi. The default root password is raspberry.
|
||||
|
||||
```
|
||||
ssh root@rpi3
|
||||
```
|
||||
|
||||
If you are curious to know how the Raspberry Pi image was built, you can look at the [build scripts][8].
|
||||
|
||||
You can find more info on the project homepage.
|
||||
|
||||
[DEBIAN RASPBERRY PI IMAGE][15]
|
||||
|
||||
### How to contribute to the Raspberry Pi Buster effort
|
||||
|
||||
There is a mailing list called [debian-arm][9] where people could contribute their efforts and ask questions. As you can see in the list, there is already a new firmware which was released [few days back][10] which might make booting directly a reality instead of the workaround shared above.
|
||||
|
||||
If you want you could make a new image using the raspi3-image-spec shared above or wait for Gunnar to make a new image which might take time.
|
||||
|
||||
Most of the maintainers also hang out at #vmdb2 at #OFTC. You can either use your IRC client or [Riot client][11], register your name at Nickserv and connect with either Gunnar Wolf, Roman Perier or/and Lars Wirzenius, author of [vmdb2][12]. I might do a follow-up on vmdb2 as it’s a nice little tool by itself.
|
||||
|
||||
### The Road Ahead
|
||||
|
||||
If there are enough interest and contributors, for instance, the lowest-hanging fruit would be to make sure that the ARM64 port [wiki page][13] is as current as possible. The benefits are and can be enormous.
|
||||
|
||||
There are a huge number of projects which could benefit from either having a [Pi farm][14] to making your media server or a SiP phone or whatever you want to play/work with.
|
||||
|
||||
Another low-hanging fruit might be synchronization between devices, say an ARM cluster sharing reports to either a Debian desktop by way of notification or on mobile or both ways.
|
||||
|
||||
While I have shared about Raspberry Pi, there are loads of single-board computers on the market already and lot more coming, both from MIPS as well as OpenRISC-V so there is going to plenty of competition in the days ahead.
|
||||
|
||||
Also, OpenRISC-V is and would be open-sourcing lot of its IP so non-free firmware or binary blobs would not be needed. Even MIPS is rumored to be more open which may challenge ARM if MIPS and OpenRISC-V are able to get their logistics and pricing right, but that is a story for another day.
|
||||
|
||||
There are many more vendors, I am just sharing the ones whom I am most interested to see what they come up with.
|
||||
|
||||
I hope the above sheds some light why it makes sense to have Debian on the Raspberry Pi.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/debian-raspberry-pi
|
||||
|
||||
作者:[Shirish][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/shirish/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.raspberrypi.org/downloads/raspbian/
|
||||
[2]: https://itsfoss.com/reasons-why-i-love-debian/
|
||||
[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/03/debian-raspberry-pi.png?resize=800%2C450&ssl=1
|
||||
[4]: https://wiki.debian.org/RaspberryPi3
|
||||
[5]: https://gwolf.org/node/4139
|
||||
[6]: https://www.debian.org/
|
||||
[7]: https://itsfoss.com/checksum-tools-guide-linux/
|
||||
[8]: https://github.com/Debian/raspi3-image-spec
|
||||
[9]: https://lists.debian.org/debian-arm/2019/02/threads.html
|
||||
[10]: https://alioth-lists.debian.net/pipermail/pkg-raspi-maintainers/Week-of-Mon-20190225/000310.html
|
||||
[11]: https://itsfoss.com/riot-desktop/
|
||||
[12]: https://liw.fi/vmdb2/
|
||||
[13]: https://wiki.debian.org/Arm64Port
|
||||
[14]: https://raspi.farm/
|
||||
[15]: https://wiki.debian.org/RaspberryPi3
|
@ -0,0 +1,135 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (An Automated Way To Install Essential Applications On Ubuntu)
|
||||
[#]: via: (https://www.ostechnix.com/an-automated-way-to-install-essential-applications-on-ubuntu/)
|
||||
[#]: author: (SK https://www.ostechnix.com/author/sk/)
|
||||
|
||||
在 Ubuntu 上自动化安装基本应用的方法
|
||||
======
|
||||

|
||||
|
||||
默认的 Ubuntu 安装并未预先安装所有必需的应用。你可能需要在网上花几个小时或者向其他 Linux 用户寻求帮助寻找和安装 Ubuntu 所需的应用。如果你是新手,那么你肯定需要花更多的时间来学习如何从命令行(使用 apt-get 或 dpkg)或从 Ubuntu 软件中心搜索和安装应用。一些用户,特别是新手,可能希望轻松快速地安装他们喜欢的每个应用。如果你是其中之一,不用担心。在本指南中,我们将了解如何使用名为 **“Alfred”** 的简单命令行程序在 Ubuntu 上安装基本应用。
|
||||
|
||||
Alfred是用 **Python** 语言编写的免费开源脚本。它使用 **Zenity** 创建了一个简单的图形界面,用户只需点击几下鼠标即可轻松选择和安装他们选择的应用。你不必花费数小时来搜索所有必要的应用程序、PPA、deb、AppImage、snap 或 flatpak。Alfred 将所有常见的应用、工具和小程序集中在一起,并自动安装所选的应用。如果你是最近从 Windows 迁移到 Ubuntu Linux 的新手,Alfred 会帮助你在新安装的 Ubuntu 系统上进行无人值守的软件安装,而无需太多用户干预。请注意,还有一个名称相似的 Mac OS 应用,但两者有不同的用途。
|
||||
|
||||
### 在 Ubuntu 上安装 Alfred
|
||||
|
||||
Alfred 安装很简单!只需下载脚本并启动它。就这么简单。
|
||||
|
||||
```
|
||||
$ wget https://raw.githubusercontent.com/derkomai/alfred/master/alfred.py
|
||||
|
||||
$ python3 alfred.py
|
||||
```
|
||||
|
||||
或者,使用 wget 下载脚本,如上所示,只需将 **alfred.py** 移动到 $PATH 中:
|
||||
|
||||
```
|
||||
$ sudo cp alfred.py /usr/local/bin/alfred
|
||||
```
|
||||
|
||||
使其可执行:
|
||||
|
||||
```
|
||||
$ sudo chmod +x /usr/local/bin/alfred
|
||||
```
|
||||
|
||||
并使用命令启动它:
|
||||
|
||||
```
|
||||
$ alfred
|
||||
```
|
||||
|
||||
### 使用 Alfred 脚本轻松快速地在 Ubuntu 上安装基本应用程序
|
||||
|
||||
按照上面所说启动 Alfred 脚本。这就是 Alfred 默认界面的样子。
|
||||
|
||||
![][2]
|
||||
|
||||
如你所见,Alfred 列出了许多最常用的应用类型,例如:
|
||||
|
||||
* 网络浏览器,
|
||||
* 邮件客户端,
|
||||
* 短消息,
|
||||
* 云存储客户端,
|
||||
* 硬件驱动程序,
|
||||
* 编解码器,
|
||||
* 开发者工具,
|
||||
* Android,
|
||||
* 文本编辑器,
|
||||
* Git,
|
||||
* 内核更新工具,
|
||||
* 音频/视频播放器,
|
||||
* 截图工具,
|
||||
* 录屏工具,
|
||||
* 视频编码器,
|
||||
* 流媒体应用,
|
||||
* 3D建模和动画工具,
|
||||
* 图像查看器和编辑器,
|
||||
* CAD 软件,
|
||||
* Pdf 工具,
|
||||
* 游戏模拟器,
|
||||
* 磁盘管理工具,
|
||||
* 加密工具,
|
||||
* 密码管理器,
|
||||
* 存档工具,
|
||||
* Ftp 软件,
|
||||
* 系统资源监视器,
|
||||
* 应用启动器等。
|
||||
|
||||
|
||||
|
||||
你可以选择任何一个或多个应用并立即安装它们。在这里,我将安装 “Developer bundle”,因此我选择它并单击 OK 按钮。
|
||||
|
||||
![][3]
|
||||
|
||||
现在,Alfred 脚本将自动你的 Ubuntu 系统上添加必要仓库、PPA 并开始安装所选的应用。
|
||||
|
||||
![][4]
|
||||
|
||||
安装完成后,不将看到以下消息。
|
||||
|
||||
![][5]
|
||||
|
||||
恭喜你!已安装选定的软件包。
|
||||
|
||||
你可以使用以下命令[**在 Ubuntu 上查看最近安装的应用**][6]:
|
||||
|
||||
```
|
||||
$ grep " install " /var/log/dpkg.log
|
||||
```
|
||||
|
||||
你可能需要重启系统才能使用某些已安装的应用。类似地,你可以方便地安装列表中的任何程序。
|
||||
|
||||
提示一下,还有一个由不同的开发人员编写的类似脚本,名为 **post_install.sh**。它与 Alfred 完全相同,但提供了一些不同的应用。请查看以下链接获取更多详细信息。
|
||||
|
||||
这两个脚本能让懒惰的用户,特别是新手,只需点击几下鼠标就能够轻松快速地安装他们想要在 Ubuntu Linux 中使用的大多数常见应用、工具、更新、小程序,而无需依赖官方或者非官方文档的帮助。
|
||||
|
||||
就是这些了。希望这篇文章有用。还有更多好东西。敬请期待!
|
||||
|
||||
干杯!
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.ostechnix.com/an-automated-way-to-install-essential-applications-on-ubuntu/
|
||||
|
||||
作者:[SK][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.ostechnix.com/author/sk/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
|
||||
[2]: http://www.ostechnix.com/wp-content/uploads/2019/02/alfred-1.png
|
||||
[3]: http://www.ostechnix.com/wp-content/uploads/2019/02/alfred-2.png
|
||||
[4]: http://www.ostechnix.com/wp-content/uploads/2019/02/alfred-4.png
|
||||
[5]: http://www.ostechnix.com/wp-content/uploads/2019/02/alfred-5-1.png
|
||||
[6]: https://www.ostechnix.com/list-installed-packages-sorted-installation-date-linux/
|
Loading…
Reference in New Issue
Block a user