[@TimSweeneyEpic][8] will probably like this 😊 [pic.twitter.com/7mt9fXt7TH][9]
+>
+> — Lutris Gaming (@LutrisGaming) [April 17, 2019][10]
+
+As an avid gamer and Linux user, I immediately jumped upon this news and installed Lutris to run Epic Games on it.
+
+**Note:** _I used[Ubuntu 19.04][11] to test Epic Games store for Linux._
+
+### Using Epic Games Store for Linux using Lutris
+
+To install Epic Games Store on your Linux system, make sure that you have [Lutris][4] installed with its pre-requisites Wine and Python 3. So, first [install Wine on Ubuntu][12] or whichever Linux you are using and then [download Lutris from its website][13].
+
+[][14]
+
+Suggested read Ubuntu Mate Will Be Default OS On Entroware Laptops
+
+#### Installing Epic Games Store
+
+Once the installation of Lutris is successful, simply launch it.
+
+While I tried this, I encountered an error (nothing happened when I tried to launch it using the GUI). However, when I typed in “ **lutris** ” on the terminal to launch it otherwise, I noticed an error that looked like this:
+
+![][15]
+
+Thanks to Abhishek, I learned that this is a common issue (you can check that on [GitHub][16]).
+
+So, to fix it, all I had to do was – type in a command in the terminal:
+
+```
+export LC_ALL=C
+```
+
+Just copy it and enter it in your terminal if you face the same issue. And, then, you will be able to open Lutris.
+
+**Note:** _You’ll have to enter this command every time you launch Lutris. So better to add it to your .bashrc or list of environment variable._
+
+Once that is done, simply launch it and search for “ **Epic Games Store** ” as shown in the image below:
+
+![Epic Games Store in Lutris][17]
+
+Here, I have it installed already, so you will get the option to “Install” it and then it will automatically ask you to install the required packages that it needs. You just have to proceed in order to successfully install it. That’s it – no rocket science involved.
+
+#### Playing a Game on Epic Games Store
+
+![Epic Games Store][18]
+
+Now that we have Epic Games store via Lutris on Linux, simply launch it and log in to your account to get started.
+
+But, does it really work?
+
+_Yes, the Epic Games Store does work._ **But, all the games don’t.**
+
+Well, I haven’t tried everything, but I grabbed a free game (Transistor – a turn-based ARPG game) to check if that works.
+
+![Transistor – Epic Games Store][19]
+
+Unfortunately, it didn’t. It says that it is “Running” when I launch it but then again, nothing happens.
+
+As of now, I’m not aware of any solutions to that – so I’ll try to keep you guys updated if I find a fix.
+
+[][20]
+
+Suggested read Alpha Version Of New Skype Client For Linux Is Out Now
+
+**Wrapping Up**
+
+It’s good to see the gaming scene improve on Linux thanks to the solutions like Lutris for users. However, there’s still a lot of work to be done.
+
+For a game to run hassle-free on Linux is still a challenge. There can be issues like this which I encountered or similar. But, it’s going in the right direction – even if it has issues.
+
+What do you think of Epic Games Store on Linux via Lutris? Have you tried it yet? Let us know your thoughts in the comments below.
+
+--------------------------------------------------------------------------------
+
+via: https://itsfoss.com/epic-games-lutris-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/linux-gaming-guide/
+[2]: https://itsfoss.com/steam-play/
+[3]: https://itsfoss.com/steam-play-proton/
+[4]: https://lutris.net/
+[5]: https://itsfoss.com/wp-content/uploads/2019/04/epic-games-store-lutris-linux-800x450.png
+[6]: https://www.epicgames.com/store/en-US/
+[7]: https://twitter.com/EpicGames?ref_src=twsrc%5Etfw
+[8]: https://twitter.com/TimSweeneyEpic?ref_src=twsrc%5Etfw
+[9]: https://t.co/7mt9fXt7TH
+[10]: https://twitter.com/LutrisGaming/status/1118552969816018948?ref_src=twsrc%5Etfw
+[11]: https://itsfoss.com/ubuntu-19-04-release-features/
+[12]: https://itsfoss.com/install-latest-wine/
+[13]: https://lutris.net/downloads/
+[14]: https://itsfoss.com/ubuntu-mate-entroware/
+[15]: https://itsfoss.com/wp-content/uploads/2019/04/lutris-error.jpg
+[16]: https://github.com/lutris/lutris/issues/660
+[17]: https://itsfoss.com/wp-content/uploads/2019/04/lutris-epic-games-store-800x520.jpg
+[18]: https://itsfoss.com/wp-content/uploads/2019/04/epic-games-store-800x450.jpg
+[19]: https://itsfoss.com/wp-content/uploads/2019/04/transistor-game-epic-games-store-800x410.jpg
+[20]: https://itsfoss.com/skpe-alpha-linux/
diff --git a/sources/tech/20190423 How to identify same-content files on Linux.md b/sources/tech/20190423 How to identify same-content files on Linux.md
new file mode 100644
index 0000000000..8d9b34b30a
--- /dev/null
+++ b/sources/tech/20190423 How to identify same-content files on Linux.md
@@ -0,0 +1,260 @@
+[#]: collector: (lujun9972)
+[#]: translator: ( )
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (How to identify same-content files on Linux)
+[#]: via: (https://www.networkworld.com/article/3390204/how-to-identify-same-content-files-on-linux.html#tk.rss_all)
+[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/)
+
+How to identify same-content files on Linux
+======
+Copies of files sometimes represent a big waste of disk space and can cause confusion if you want to make updates. Here are six commands to help you identify these files.
+![Vinoth Chandar \(CC BY 2.0\)][1]
+
+In a recent post, we looked at [how to identify and locate files that are hard links][2] (i.e., that point to the same disk content and share inodes). In this post, we'll check out commands for finding files that have the same _content_ , but are not otherwise connected.
+
+Hard links are helpful because they allow files to exist in multiple places in the file system while not taking up any additional disk space. Copies of files, on the other hand, sometimes represent a big waste of disk space and run some risk of causing some confusion if you want to make updates. In this post, we're going to look at multiple ways to identify these files.
+
+**[ Two-Minute Linux Tips:[Learn how to master a host of Linux commands in these 2-minute video tutorials][3] ]**
+
+### Comparing files with the diff command
+
+Probably the easiest way to compare two files is to use the **diff** command. The output will show you the differences between the two files. The < and > signs indicate whether the extra lines are in the first (<) or second (>) file provided as arguments. In this example, the extra lines are in backup.html.
+
+```
+$ diff index.html backup.html
+2438a2439,2441
+>
+> That's all there is to report.
+>
+```
+
+If diff shows no output, that means the two files are the same.
+
+```
+$ diff home.html index.html
+$
+```
+
+The only drawbacks to diff are that it can only compare two files at a time, and you have to identify the files to compare. Some commands we will look at in this post can find the duplicate files for you.
+
+### Using checksums
+
+The **cksum** (checksum) command computes checksums for files. Checksums are a mathematical reduction of the contents to a lengthy number (like 2819078353 228029). While not absolutely unique, the chance that files that are not identical in content would result in the same checksum is extremely small.
+
+```
+$ cksum *.html
+2819078353 228029 backup.html
+4073570409 227985 home.html
+4073570409 227985 index.html
+```
+
+In the example above, you can see how the second and third files yield the same checksum and can be assumed to be identical.
+
+### Using the find command
+
+While the find command doesn't have an option for finding duplicate files, it can be used to search files by name or type and run the cksum command. For example:
+
+```
+$ find . -name "*.html" -exec cksum {} \;
+4073570409 227985 ./home.html
+2819078353 228029 ./backup.html
+4073570409 227985 ./index.html
+```
+
+### Using the fslint command
+
+The **fslint** command can be used to specifically find duplicate files. Note that we give it a starting location. The command can take quite some time to complete if it needs to run through a large number of files. Here's output from a very modest search. Note how it lists the duplicate files and also looks for other issues, such as empty directories and bad IDs.
+
+```
+$ fslint .
+-----------------------------------file name lint
+-------------------------------Invalid utf8 names
+-----------------------------------file case lint
+----------------------------------DUPlicate files <==
+home.html
+index.html
+-----------------------------------Dangling links
+--------------------redundant characters in links
+------------------------------------suspect links
+--------------------------------Empty Directories
+./.gnupg
+----------------------------------Temporary Files
+----------------------duplicate/conflicting Names
+------------------------------------------Bad ids
+-------------------------Non Stripped executables
+```
+
+You may have to install **fslint** on your system. You will probably have to add it to your search path, as well:
+
+```
+$ export PATH=$PATH:/usr/share/fslint/fslint
+```
+
+### Using the rdfind command
+
+The **rdfind** command will also look for duplicate (same content) files. The name stands for "redundant data find," and the command is able to determine, based on file dates, which files are the originals — which is helpful if you choose to delete the duplicates, as it will remove the newer files.
+
+```
+$ rdfind ~
+Now scanning "/home/shark", found 12 files.
+Now have 12 files in total.
+Removed 1 files due to nonunique device and inode.
+Total size is 699498 bytes or 683 KiB
+Removed 9 files due to unique sizes from list.2 files left.
+Now eliminating candidates based on first bytes:removed 0 files from list.2 files left.
+Now eliminating candidates based on last bytes:removed 0 files from list.2 files left.
+Now eliminating candidates based on sha1 checksum:removed 0 files from list.2 files left.
+It seems like you have 2 files that are not unique
+Totally, 223 KiB can be reduced.
+Now making results file results.txt
+```
+
+You can also run this command in "dryrun" (i.e., only report the changes that might otherwise be made).
+
+```
+$ rdfind -dryrun true ~
+(DRYRUN MODE) Now scanning "/home/shark", found 12 files.
+(DRYRUN MODE) Now have 12 files in total.
+(DRYRUN MODE) Removed 1 files due to nonunique device and inode.
+(DRYRUN MODE) Total size is 699352 bytes or 683 KiB
+Removed 9 files due to unique sizes from list.2 files left.
+(DRYRUN MODE) Now eliminating candidates based on first bytes:removed 0 files from list.2 files left.
+(DRYRUN MODE) Now eliminating candidates based on last bytes:removed 0 files from list.2 files left.
+(DRYRUN MODE) Now eliminating candidates based on sha1 checksum:removed 0 files from list.2 files left.
+(DRYRUN MODE) It seems like you have 2 files that are not unique
+(DRYRUN MODE) Totally, 223 KiB can be reduced.
+(DRYRUN MODE) Now making results file results.txt
+```
+
+The rdfind command also provides options for things such as ignoring empty files (-ignoreempty) and following symbolic links (-followsymlinks). Check out the man page for explanations.
+
+```
+-ignoreempty ignore empty files
+-minsize ignore files smaller than speficied size
+-followsymlinks follow symbolic links
+-removeidentinode remove files referring to identical inode
+-checksum identify checksum type to be used
+-deterministic determiness how to sort files
+-makesymlinks turn duplicate files into symbolic links
+-makehardlinks replace duplicate files with hard links
+-makeresultsfile create a results file in the current directory
+-outputname provide name for results file
+-deleteduplicates delete/unlink duplicate files
+-sleep set sleep time between reading files (milliseconds)
+-n, -dryrun display what would have been done, but don't do it
+```
+
+Note that the rdfind command offers an option to delete duplicate files with the **-deleteduplicates true** setting. Hopefully the command's modest problem with grammar won't irritate you. ;-)
+
+```
+$ rdfind -deleteduplicates true .
+...
+Deleted 1 files. <==
+```
+
+You will likely have to install the rdfind command on your system. It's probably a good idea to experiment with it to get comfortable with how it works.
+
+### Using the fdupes command
+
+The **fdupes** command also makes it easy to identify duplicate files and provides a large number of useful options — like **-r** for recursion. In its simplest form, it groups duplicate files together like this:
+
+```
+$ fdupes ~
+/home/shs/UPGRADE
+/home/shs/mytwin
+
+/home/shs/lp.txt
+/home/shs/lp.man
+
+/home/shs/penguin.png
+/home/shs/penguin0.png
+/home/shs/hideme.png
+```
+
+Here's an example using recursion. Note that many of the duplicate files are important (users' .bashrc and .profile files) and should clearly not be deleted.
+
+```
+# fdupes -r /home
+/home/shark/home.html
+/home/shark/index.html
+
+/home/dory/.bashrc
+/home/eel/.bashrc
+
+/home/nemo/.profile
+/home/dory/.profile
+/home/shark/.profile
+
+/home/nemo/tryme
+/home/shs/tryme
+
+/home/shs/arrow.png
+/home/shs/PNGs/arrow.png
+
+/home/shs/11/files_11.zip
+/home/shs/ERIC/file_11.zip
+
+/home/shs/penguin0.jpg
+/home/shs/PNGs/penguin.jpg
+/home/shs/PNGs/penguin0.jpg
+
+/home/shs/Sandra_rotated.png
+/home/shs/PNGs/Sandra_rotated.png
+```
+
+The fdupe command's many options are listed below. Use the **fdupes -h** command, or read the man page for more details.
+
+```
+-r --recurse recurse
+-R --recurse: recurse through specified directories
+-s --symlinks follow symlinked directories
+-H --hardlinks treat hard links as duplicates
+-n --noempty ignore empty files
+-f --omitfirst omit the first file in each set of matches
+-A --nohidden ignore hidden files
+-1 --sameline list matches on a single line
+-S --size show size of duplicate files
+-m --summarize summarize duplicate files information
+-q --quiet hide progress indicator
+-d --delete prompt user for files to preserve
+-N --noprompt when used with --delete, preserve the first file in set
+-I --immediate delete duplicates as they are encountered
+-p --permissions don't soncider files with different owner/group or
+ permission bits as duplicates
+-o --order=WORD order files according to specification
+-i --reverse reverse order while sorting
+-v --version display fdupes version
+-h --help displays help
+```
+
+The fdupes command is another one that you're like to have to install and work with for a while to become familiar with its many options.
+
+### Wrap-up
+
+Linux systems provide a good selection of tools for locating and potentially removing duplicate files, along with options for where you want to run your search and what you want to do with duplicate files when you find them.
+
+**[ Also see:[Invaluable tips and tricks for troubleshooting Linux][4] ]**
+
+Join the Network World communities on [Facebook][5] and [LinkedIn][6] to comment on topics that are top of mind.
+
+--------------------------------------------------------------------------------
+
+via: https://www.networkworld.com/article/3390204/how-to-identify-same-content-files-on-linux.html#tk.rss_all
+
+作者:[Sandra Henry-Stocker][a]
+选题:[lujun9972][b]
+译者:[译者ID](https://github.com/译者ID)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]: https://www.networkworld.com/author/Sandra-Henry_Stocker/
+[b]: https://github.com/lujun9972
+[1]: https://images.idgesg.net/images/article/2019/04/chairs-100794266-large.jpg
+[2]: https://www.networkworld.com/article/3387961/how-to-identify-duplicate-files-on-linux.html
+[3]: https://www.youtube.com/playlist?list=PL7D2RMSmRO9J8OTpjFECi8DJiTQdd4hua
+[4]: https://www.networkworld.com/article/3242170/linux/invaluable-tips-and-tricks-for-troubleshooting-linux.html
+[5]: https://www.facebook.com/NetworkWorld/
+[6]: https://www.linkedin.com/company/network-world
diff --git a/sources/tech/20190425 Debian has a New Project Leader.md b/sources/tech/20190425 Debian has a New Project Leader.md
new file mode 100644
index 0000000000..00f114b907
--- /dev/null
+++ b/sources/tech/20190425 Debian has a New Project Leader.md
@@ -0,0 +1,106 @@
+[#]: collector: (lujun9972)
+[#]: translator: ( )
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (Debian has a New Project Leader)
+[#]: via: (https://itsfoss.com/debian-project-leader-election/)
+[#]: author: (Shirish https://itsfoss.com/author/shirish/)
+
+Debian has a New Project Leader
+======
+
+Like each year, the Debian Secretary announced a call for nominations for the post of Debian Project Leader (commonly known as DPL) in early March. Soon 5 candidates shared their nomination. One of the DPL candidates backed out due to personal reasons and we had [four candidates][1] as can be seen in the Nomination section of the Vote page.
+
+### Sam Hartman, the new Debian Project Leader
+
+![][2]
+
+While I will not go much into details as Sam already outlined his position on his [platform][3], it is good to see that most Debian developers recognize that it’s no longer just the technical excellence which need to be looked at. I do hope he is able to create more teams which would leave some more time in DPL’s hands and less stress going forward.
+
+As he has shared, he would be looking into also helping the other DPL candidates, all of which presented initiatives to make Debian better.
+
+Apart from this, there had been some excellent suggestions, for example modernizing debian-installer, making lists.debian.org have a [Mailman 3][4] instance, modernizing Debian packaging and many more.
+
+While probably a year is too short a time for any of the deliverables that Debian people are thinking, some sort of push or start should enable Debian to reach greater heights than today.
+
+### A brief history of DPL elections
+
+In the beginning, Debian was similar to many distributions which have a [BDFL][5], although from the very start Debian had a sort of rolling leadership. While I wouldn’t go through the whole history, from October 1998 there was an idea [germinated][6] to have a Debian Constitution.
+
+After quite a bit of discussion between Debian users, contributors, developers etc. [Debian 1.0 Constitution][7] was released on December 2nd, 1998. One of the big changes was that it formalised the selection of Debian Project Leader via elections.
+
+From 1998 till 2019 13 Debian project leaders have been elected till date with Sam Hartman being the latest (2019).
+
+Before Sam, [Chris Lamb][8] was DPL in 2017 and again stood up for re-election in 2018. One of the biggest changes in Chris’s tenure was having more impetus to outreach than ever before. This made it possible to have many more mini-debconfs all around the world and thus increasing more number of Debian users and potential Debian Developers.
+
+[][9]
+
+Suggested read SemiCode OS: A Linux Distribution For Programmers And Web Developers
+
+### Duties and Responsibilities of the Debian Project Leader
+
+![][10]
+
+Debian Project Leader (DPL) is a non-monetary position which means that the DPL doesn’t get a salary or any monetary benefits in the traditional sense but it’s a prestigious position.
+
+Curious what what a DPL does? Here are some of the duties, responsibilities, prestige and perks associated with this position.
+
+#### Travelling
+
+As the DPL is the public face of the project, she/he is supposed to travel to many places in the world to share about Debian. While the travel may be a perk, it is and could be discounted by being not paid for the time spent articulating Debian’s position in various free software and other communities. Also travel, language, politics of free software are also some of the stress points that any DPL would have to go through.
+
+#### Communication
+
+A DPL is expected to have excellent verbal and non-verbal communication skills as she/he is the expected to share Debian’s vision of computing to technical and non-technical people. As she/he is also expected to weigh in many a sensitive matter, the Project Leader has to make choices about which communications should be made public and which should be private.
+
+#### Budgeting
+
+Quite a bit of the time the Debian Project Leader has to look into the finances along with the Secretary and take a call at various initiatives mooted by the larger community. The Project Leader has to ask and then make informed decisions on the same.
+
+#### Delegation
+
+One of the important tasks of the DPL is to delegate different tasks to suitable people. Some sensitive delegations include ftp-master, ftp-assistant, list-managers, debian-mirror, debian-infrastructure and so on.
+
+#### Influence
+
+Last but not the least, just like any other election, the people who contest for DPL have a platform where they share their ideas about where they would like to see the Debian project heading and how they would go about doing it.
+
+This is by no means an exhaustive list. I would suggest to read Lucas Nussbaum’s [mail][11] in which he outlines some more responsibilities as a Debian Project Leader.
+
+[][12]
+
+Suggested read Lightweight Linux Distribution Bodhi Linux 5.0 Released
+
+**In the end…**
+
+I wish Sam Hartman all the luck. I look forward to see how Debian grows under his leadership.
+
+I also hope that you learned a few non-technical thing around Debian. If you are an [ardent Debian user][13], stuff like this make you feel more involved with Debian project. What do you say?
+
+--------------------------------------------------------------------------------
+
+via: https://itsfoss.com/debian-project-leader-election/
+
+作者:[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.debian.org/vote/2019/vote_001
+[2]: https://itsfoss.com/wp-content/uploads/2019/04/Debian-Project-Leader-election-800x450.png
+[3]: https://www.debian.org/vote/2019/platforms/hartmans
+[4]: http://docs.mailman3.org/en/latest/
+[5]: https://en.wikipedia.org/wiki/Benevolent_dictator_for_life
+[6]: https://lists.debian.org/debian-devel/1998/09/msg00506.html
+[7]: https://www.debian.org/devel/constitution.1.0
+[8]: https://www.debian.org/vote/2017/platforms/lamby
+[9]: https://itsfoss.com/semicode-os-linux/
+[10]: https://itsfoss.com/wp-content/uploads/2019/04/leadership-800x450.jpg
+[11]: https://lists.debian.org/debian-vote/2019/03/msg00023.html
+[12]: https://itsfoss.com/bodhi-linux-5/
+[13]: https://itsfoss.com/reasons-why-i-love-debian/
diff --git a/sources/tech/20190426 NomadBSD, a BSD for the Road.md b/sources/tech/20190426 NomadBSD, a BSD for the Road.md
new file mode 100644
index 0000000000..d31f9b4a90
--- /dev/null
+++ b/sources/tech/20190426 NomadBSD, a BSD for the Road.md
@@ -0,0 +1,125 @@
+[#]: collector: (lujun9972)
+[#]: translator: ( )
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (NomadBSD, a BSD for the Road)
+[#]: via: (https://itsfoss.com/nomadbsd/)
+[#]: author: (John Paul https://itsfoss.com/author/john/)
+
+NomadBSD, a BSD for the Road
+======
+
+As regular It’s FOSS readers should know, I like diving into the world of BSDs. Recently, I came across an interesting BSD that is designed to live on a thumb drive. Let’s take a look at NomadBSD.
+
+### What is NomadBSD?
+
+![Nomadbsd Desktop][1]
+
+[NomadBSD][2] is different than most available BSDs. NomadBSD is a live system based on FreeBSD. It comes with automatic hardware detection and an initial config tool. NomadBSD is designed to “be used as a desktop system that works out of the box, but can also be used for data recovery, for educational purposes, or to test FreeBSD’s hardware compatibility.”
+
+This German BSD comes with an [OpenBox][3]-based desktop with the Plank application dock. NomadBSD makes use of the [DSB project][4]. DSB stands for “Desktop Suite (for) (Free)BSD” and consists of a collection of programs designed to create a simple and working environment without needing a ton of dependencies to use one tool. DSB is created by [Marcel Kaiser][5] one of the lead devs of NomadBSD.
+
+Just like the original BSD projects, you can contact the NomadBSD developers via a [mailing list][6].
+
+[][7]
+
+Suggested read Enjoy Netflix? You Should Thank FreeBSD
+
+#### Included Applications
+
+NomadBSD comes with the following software installed:
+
+ * Thunar file manager
+ * Asunder CD ripper
+ * Bash 5.0
+ * Filezilla FTP client
+ * Firefox web browser
+ * Fish Command line
+ * Gimp
+ * Qpdfview
+ * Git
+
+
+ * Hexchat IRC client
+ * Leafpad text editor
+ * Midnight Commander file manager
+ * PaleMoon web browser
+ * PCManFM file manager
+ * Pidgin messaging client
+ * Transmission BitTorrent client
+
+
+ * Redshift
+ * Sakura terminal emulator
+ * Slim login manager
+ * Thunderbird email client
+ * VLC media player
+ * Plank application dock
+ * Z Shell
+
+
+
+You can see a complete of the pre-installed applications in the [MANIFEST file][8].
+
+![Nomadbsd Openbox Menu][9]
+
+#### Version 1.2 Released
+
+NomadBSD recently released version 1.2 on April 21, 2019. This means that NomadBSD is now based on FreeBSD 12.0-p3. TRIM is now enabled by default. One of the biggest changes is that the initial command-line setup was replaced with a Qt graphical interface. They also added a Qt5 tool to install NomadBSD to your hard drive. A number of fixes were included to improve graphics support. They also added support for creating 32-bit images.
+
+[][10]
+
+Suggested read 6 Reasons Why Linux Users Switch to BSD
+
+### Installing NomadBSD
+
+Since NomadBSD is designed to be a live system, we will need to add the BSD to a USB drive. First, you will need to [download it][11]. There are several options to choose from: 64-bit, 32-bit, or 64-bit Mac.
+
+You will be a USB drive that has at least 4GB. The system that you are installing to should have a 1.2 GHz processor and 1GB of RAM to run NomadBSD comfortably. Both BIOS and UEFI are supported.
+
+All of the images available for download are compressed as a `.lzma` file. So, once you have downloaded the file, you will need to extract the `.img` file. On Linux, you can use either of these commands: `lzma -d nomadbsd-x.y.z.img.lzma` or `xzcat nomadbsd-x.y.z.img.lzma`. (Be sure to replace x.y.z with the correct file name you just downloaded.)
+
+Before we proceed, we need to find out the id of your USB drive. (Hopefully, you have inserted it by now.) I use the `lsblk` command to find my USB drive, which in my case is `sdb`. To write the image file, use this command `sudo dd if=nomadbsd-x.y.z.img of=/dev/sdb bs=1M conv=sync`. (Again, don’t forget to correct the file name.) If you are uncomfortable using `dd`, you can use [Etcher][12]. If you have Windows, you will need to use [7-zip][13] to extract the image file and Etcher or [Rufus][14] to write the image to the USB drive.
+
+When you boot from the USB drive, you will encounter a simple config tool. Once you answer the required questions, you will be greeted with a simple Openbox desktop.
+
+### Thoughts on NomadBSD
+
+I first discovered NomadBSD back in January when they released 1.2-RC1. At the time, I had been unable to install [Project Trident][15] on my laptop and was very frustrated with BSDs. I downloaded NomadBSD and tried it out. I initially ran into issues reaching the desktop, but RC2 fixed that issue. However, I was unable to get on the internet, even though I had an Ethernet cable plugged in. Luckily, I found the wifi manager in the menu and was able to connect to my wifi.
+
+Overall, my experience with NomadBSD was pleasant. Once I figured out a few things, I was good to go. I hope that NomadBSD is the first of a new generation of BSDs that focus on mobility and ease of use. BSD has conquered the server world, it’s about time they figured out how to be more user-friendly.
+
+Have you ever used NomadBSD? What is your BSD? 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][16].
+
+--------------------------------------------------------------------------------
+
+via: https://itsfoss.com/nomadbsd/
+
+作者:[John Paul][a]
+选题:[lujun9972][b]
+译者:[译者ID](https://github.com/译者ID)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]: https://itsfoss.com/author/john/
+[b]: https://github.com/lujun9972
+[1]: https://itsfoss.com/wp-content/uploads/2019/04/NomadBSD-desktop-800x500.jpg
+[2]: http://nomadbsd.org/
+[3]: http://openbox.org/wiki/Main_Page
+[4]: https://freeshell.de/%7Emk/projects/dsb.html
+[5]: https://github.com/mrclksr
+[6]: http://nomadbsd.org/contact.html
+[7]: https://itsfoss.com/netflix-freebsd-cdn/
+[8]: http://nomadbsd.org/download/nomadbsd-1.2.manifest
+[9]: https://itsfoss.com/wp-content/uploads/2019/04/NomadBSD-Openbox-menu-800x500.jpg
+[10]: https://itsfoss.com/why-use-bsd/
+[11]: http://nomadbsd.org/download.html
+[12]: https://www.balena.io/etcher/
+[13]: https://www.7-zip.org/
+[14]: https://rufus.ie/
+[15]: https://itsfoss.com/project-trident-interview/
+[16]: http://reddit.com/r/linuxusersgroup
diff --git a/sources/tech/20190427 Monitoring CPU and GPU Temperatures on Linux.md b/sources/tech/20190427 Monitoring CPU and GPU Temperatures on Linux.md
new file mode 100644
index 0000000000..89f942ce66
--- /dev/null
+++ b/sources/tech/20190427 Monitoring CPU and GPU Temperatures on Linux.md
@@ -0,0 +1,166 @@
+[#]: collector: (lujun9972)
+[#]: translator: ( )
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (Monitoring CPU and GPU Temperatures on Linux)
+[#]: via: (https://itsfoss.com/monitor-cpu-gpu-temp-linux/)
+[#]: author: (It's FOSS Community https://itsfoss.com/author/itsfoss/)
+
+Monitoring CPU and GPU Temperatures on Linux
+======
+
+_**Brief: This articles discusses two simple ways of monitoring CPU and GPU temperatures in Linux command line.**_
+
+Because of **[Steam][1]** (including _[Steam Play][2]_ , aka _Proton_ ) and other developments, **GNU/Linux** is becoming the gaming platform of choice for more and more computer users everyday. A good number of users are also going for **GNU/Linux** when it comes to other resource-consuming computing tasks such as [video editing][3] or graphic design ( _Kdenlive_ and _[Blender][4]_ are good examples of programs for these).
+
+Whether you are one of those users or otherwise, you are bound to have wondered how hot your computer’s CPU and GPU can get (even more so if you do overclocking). If that is the case, keep reading. We will be looking at a couple of very simple commands to monitor CPU and GPU temps.
+
+My setup includes a [Slimbook Kymera][5] and two displays (a TV set and a PC monitor) which allows me to use one for playing games and the other to keep an eye on the temperatures. Also, since I use [Zorin OS][6] I will be focusing on **Ubuntu** and **Ubuntu** derivatives.
+
+To monitor the behaviour of both CPU and GPU we will be making use of the useful `watch` command to have dynamic readings every certain number of seconds.
+
+![][7]
+
+### Monitoring CPU Temperature in Linux
+
+For CPU temps, we will combine `watch` with the `sensors` command. An interesting article about a [gui version of this tool has already been covered on It’s FOSS][8]. However, we will use the terminal version here:
+
+```
+watch -n 2 sensors
+```
+
+`watch` guarantees that the readings will be updated every 2 seconds (and this value can — of course — be changed to what best fit your needs):
+
+```
+Every 2,0s: sensors
+
+iwlwifi-virtual-0
+Adapter: Virtual device
+temp1: +39.0°C
+
+acpitz-virtual-0
+Adapter: Virtual device
+temp1: +27.8°C (crit = +119.0°C)
+temp2: +29.8°C (crit = +119.0°C)
+
+coretemp-isa-0000
+Adapter: ISA adapter
+Package id 0: +37.0°C (high = +82.0°C, crit = +100.0°C)
+Core 0: +35.0°C (high = +82.0°C, crit = +100.0°C)
+Core 1: +35.0°C (high = +82.0°C, crit = +100.0°C)
+Core 2: +33.0°C (high = +82.0°C, crit = +100.0°C)
+Core 3: +36.0°C (high = +82.0°C, crit = +100.0°C)
+Core 4: +37.0°C (high = +82.0°C, crit = +100.0°C)
+Core 5: +35.0°C (high = +82.0°C, crit = +100.0°C)
+```
+
+Amongst other things, we get the following information:
+
+ * We have 5 cores in use at the moment (with the current highest temperature being 37.0ºC).
+ * Values higher than 82.0ºC are considered high.
+ * A value over 100.0ºC is deemed critical.
+
+
+
+[][9]
+
+Suggested read Top 10 Command Line Games For Linux
+
+The values above lead us to the conclusion that the computer’s workload is very light at the moment.
+
+### Monitoring GPU Temperature in Linux
+
+Let us turn to the graphics card now. I have never used an **AMD** dedicated graphics card, so I will be focusing on **Nvidia** ones. The first thing to do is download the appropriate, current driver through [additional drivers in Ubuntu][10].
+
+On **Ubuntu** (and its forks such as **Zorin** or **Linux Mint** ), going to _Software & Updates_ > _Additional Drivers_ and selecting the most recent one normally suffices. Additionally, you can add/enable the official _ppa_ for graphics cards (either through the command line or via _Software & Updates_ > _Other Software_ ). After installing the driver you will have at your disposal the _Nvidia X Server_ gui application along with the command line utility _nvidia-smi_ (Nvidia System Management Interface). So we will use `watch` and `nvidia-smi`:
+
+```
+watch -n 2 nvidia-smi
+```
+
+And — the same as for the CPU — we will get updated readings every two seconds:
+
+```
+Every 2,0s: nvidia-smi
+
+Fri Apr 19 20:45:30 2019
++-----------------------------------------------------------------------------+
+| Nvidia-SMI 418.56 Driver Version: 418.56 CUDA Version: 10.1 |
+|-------------------------------+----------------------+----------------------+
+| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
+| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
+|===============================+======================+======================|
+| 0 GeForce GTX 106... Off | 00000000:01:00.0 On | N/A |
+| 0% 54C P8 10W / 120W | 433MiB / 6077MiB | 4% Default |
++-------------------------------+----------------------+----------------------+
+
++-----------------------------------------------------------------------------+
+| Processes: GPU Memory |
+| GPU PID Type Process name Usage |
+|=============================================================================|
+| 0 1557 G /usr/lib/xorg/Xorg 190MiB |
+| 0 1820 G /usr/bin/gnome-shell 174MiB |
+| 0 7820 G ...equest-channel-token=303407235874180773 65MiB |
++-----------------------------------------------------------------------------+
+```
+
+The chart gives the following information about the graphics card:
+
+ * it is using the open source driver version 418.56.
+ * the current temperature of the card is 54.0ºC — with the fan at 0% of its capacity.
+ * the power consumption is very low: only 10W.
+ * out of 6 GB of vram (video random access memory), it is only using 433 MB.
+ * the used vram is being taken by three processes whose IDs are — respectively — 1557, 1820 and 7820.
+
+
+
+[][11]
+
+Suggested read Googler: Now You Can Google From Linux Terminal!
+
+Most of these facts/values show that — clearly — we are not playing any resource-consuming games or dealing with heavy workloads. Should we started playing a game, processing a video — or the like —, the values would start to go up.
+
+#### Conclusion
+
+Althoug there are gui tools, I find these two commands very handy to check on your hardware in real time.
+
+What do you make of them? You can learn more about the utilities involved by reading their man pages.
+
+Do you have other preferences? Share them with us in the comments, ;).
+
+Halof!!! (Have a lot of fun!!!).
+
+![avatar][12]
+
+### Alejandro Egea-Abellán
+
+It’s FOSS Community Contributor
+
+I developed a liking for electronics, linguistics, herpetology and computers (particularly GNU/Linux and FOSS). I am LPIC-2 certified and currently work as a technical consultant and Moodle administrator in the Department for Lifelong Learning at the Ministry of Education in Murcia, Spain. I am a firm believer in lifelong learning, the sharing of knowledge and computer-user freedom.
+
+--------------------------------------------------------------------------------
+
+via: https://itsfoss.com/monitor-cpu-gpu-temp-linux/
+
+作者:[It's FOSS Community][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/itsfoss/
+[b]: https://github.com/lujun9972
+[1]: https://itsfoss.com/install-steam-ubuntu-linux/
+[2]: https://itsfoss.com/steam-play-proton/
+[3]: https://itsfoss.com/best-video-editing-software-linux/
+[4]: https://www.blender.org/
+[5]: https://slimbook.es/
+[6]: https://zorinos.com/
+[7]: https://itsfoss.com/wp-content/uploads/2019/04/monitor-cpu-gpu-temperature-linux-800x450.png
+[8]: https://itsfoss.com/check-laptop-cpu-temperature-ubuntu/
+[9]: https://itsfoss.com/best-command-line-games-linux/
+[10]: https://itsfoss.com/install-additional-drivers-ubuntu/
+[11]: https://itsfoss.com/review-googler-linux/
+[12]: https://itsfoss.com/wp-content/uploads/2019/04/EGEA-ABELLAN-Alejandro.jpg
diff --git a/sources/tech/20190428 Installing Budgie Desktop on Ubuntu -Quick Guide.md b/sources/tech/20190428 Installing Budgie Desktop on Ubuntu -Quick Guide.md
new file mode 100644
index 0000000000..11659592fb
--- /dev/null
+++ b/sources/tech/20190428 Installing Budgie Desktop on Ubuntu -Quick Guide.md
@@ -0,0 +1,116 @@
+[#]: collector: (lujun9972)
+[#]: translator: ( )
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (Installing Budgie Desktop on Ubuntu [Quick Guide])
+[#]: via: (https://itsfoss.com/install-budgie-ubuntu/)
+[#]: author: (Atharva Lele https://itsfoss.com/author/atharva/)
+
+Installing Budgie Desktop on Ubuntu [Quick Guide]
+======
+
+_**Brief: Learn how to install Budgie desktop on Ubuntu in this step-by-step tutorial.**_
+
+Among all the [various Ubuntu versions][1], [Ubuntu Budgie][2] is the most underrated one. It looks elegant and it’s not heavy on resources.
+
+Read this [Ubuntu Budgie review][3] or simply watch this video to see what Ubuntu Budgie 18.04 looks like.
+
+[Subscribe to our YouTube channel for more Linux Videos][4]
+
+If you like [Budgie desktop][5] but you are using some other version of Ubuntu such as the default Ubuntu with GNOME desktop, I have good news for you. You can install Budgie on your current Ubuntu system and switch the desktop environments.
+
+In this post, I’m going to tell you exactly how to do that. But first, a little introduction to Budgie for those who are unaware about it.
+
+Budgie desktop environment is developed mainly by [Solus Linux team.][6] It is designed with focus on elegance and modern usage. Budgie is available for all major Linux distributions for users to try and experience this new desktop environment. Budgie is pretty mature by now and provides a great desktop experience.
+
+Warning
+
+Installing multiple desktops on the same system MAY result in conflicts and you may see some issue like missing icons in the panel or multiple icons of the same program.
+
+You may not see any issue at all as well. It’s your call if you want to try different desktop.
+
+### Install Budgie on Ubuntu
+
+This method is not tested on Linux Mint, so I recommend that you not follow this guide for Mint.
+
+For those on Ubuntu, Budgie is now a part of the Ubuntu repositories by default. Hence, we don’t need to add any PPAs in order to get Budgie.
+
+To install Budgie, simply run this command in terminal. We’ll first make sure that the system is fully updated.
+
+```
+sudo apt update && sudo apt upgrade
+sudo apt install ubuntu-budgie-desktop
+```
+
+When everything is done downloading, you will get a prompt to choose your display manager. Select ‘lightdm’ to get the full Budgie experience.
+
+![Select lightdm][7]
+
+After the installation is complete, reboot your computer. You will be then greeted by the Budgie login screen. Enter your password to go into the homescreen.
+
+![Budgie Desktop Home][8]
+
+### Switching to other desktop environments
+
+![Budgie login screen][9]
+
+You can click the Budgie icon next to your name to get options for login. From there you can select between the installed Desktop Environments (DEs). In my case, I see Budgie and the default Ubuntu (GNOME) DEs.
+
+![Select your DE][10]
+
+Hence whenever you feel like logging into GNOME, you can do so using this menu.
+
+[][11]
+
+Suggested read Get Rid of 'snapd returned status code 400: Bad Request' Error in Ubuntu
+
+### How to Remove Budgie
+
+If you don’t like Budgie or just want to go back to your regular old Ubuntu, you can switch back to your regular desktop as described in the above section.
+
+However, if you really want to remove Budgie and its component, you can follow the following commands to get back to a clean slate.
+
+_**Switch to some other desktop environments before using these commands:**_
+
+```
+sudo apt remove ubuntu-budgie-desktop ubuntu-budgie* lightdm
+sudo apt autoremove
+sudo apt install --reinstall gdm3
+```
+
+After running all the commands successfully, reboot your computer.
+
+Now, you will be back to GNOME or whichever desktop environment you had.
+
+**What you think of Budgie?**
+
+Budgie is one of the [best desktop environments for Linux][12]. Hope this short guide helped you install the awesome Budgie desktop on your Ubuntu system.
+
+If you did install Budgie, what do you like about it the most? Let us know in the comments below. And as usual, any questions or suggestions are always welcome.
+
+--------------------------------------------------------------------------------
+
+via: https://itsfoss.com/install-budgie-ubuntu/
+
+作者:[Atharva Lele][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/atharva/
+[b]: https://github.com/lujun9972
+[1]: https://itsfoss.com/which-ubuntu-install/
+[2]: https://ubuntubudgie.org/
+[3]: https://itsfoss.com/ubuntu-budgie-18-review/
+[4]: https://www.youtube.com/c/itsfoss?sub_confirmation=1
+[5]: https://github.com/solus-project/budgie-desktop
+[6]: https://getsol.us/home/
+[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/04/budgie_install_select_dm.png?fit=800%2C559&ssl=1
+[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/04/budgie_homescreen.jpg?fit=800%2C500&ssl=1
+[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/04/budgie_install_lockscreen.png?fit=800%2C403&ssl=1
+[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/04/budgie_install_lockscreen_select_de.png?fit=800%2C403&ssl=1
+[11]: https://itsfoss.com/snapd-error-ubuntu/
+[12]: https://itsfoss.com/best-linux-desktop-environments/
diff --git a/sources/tech/20190429 Awk utility in Fedora.md b/sources/tech/20190429 Awk utility in Fedora.md
new file mode 100644
index 0000000000..21e40641f7
--- /dev/null
+++ b/sources/tech/20190429 Awk utility in Fedora.md
@@ -0,0 +1,177 @@
+[#]: collector: (lujun9972)
+[#]: translator: ( )
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (Awk utility in Fedora)
+[#]: via: (https://fedoramagazine.org/awk-utility-in-fedora/)
+[#]: author: (Stephen Snow https://fedoramagazine.org/author/jakfrost/)
+
+Awk utility in Fedora
+======
+
+![][1]
+
+Fedora provides _awk_ as part of its default installation, including all its editions, including the immutable ones like Silverblue. But you may be asking, what is _awk_ and why would you need it?
+
+_Awk_ is a data driven programming language that acts when it matches a pattern. On Fedora, and most other distributions, GNU _awk_ or _gawk_ is used. Read on for more about this language and how to use it.
+
+### A brief history of awk
+
+_Awk_ began at Bell Labs in 1977. Its name is an acronym from the initials of the designers: Alfred V. Aho, Peter J. Weinberger, and Brian W. Kernighan.
+
+> The specification for _awk_ in the POSIX Command Language and Utilities standard further clarified the language. Both the _gawk_ designers and the original _awk_ designers at Bell Laboratories provided feedback for the POSIX specification.
+>
+> From [The GNU Awk User’s Guide][2]
+
+For a more in-depth look at how _awk/gawk_ ended up being as powerful and useful as it is, follow the link above. Numerous individuals have contributed to the current state of _gawk_. Among those are:
+
+ * Arnold Robbins and David Trueman, the creators of _gawk_
+ * Michael Brennan, the creator of _mawk_ , which later was merged with _gawk_
+ * Jurgen Kahrs, who added networking capabilities to _gawk_ in 1997
+ * John Hague, who rewrote the _gawk_ internals and added an _awk_ -level debugger in 2011
+
+
+
+### Using awk
+
+The following sections show various ways of using _awk_ in Fedora.
+
+#### At the command line
+
+The simples way to invoke _awk_ is at the command line. You can search a text file for a particular pattern, and if found, print out the line(s) of the file that match the pattern anywhere. As an example, use _cat_ to take a look at the command history file in your home director:
+
+```
+$ cat ~/.bash_history
+```
+
+There are probably many lines scrolling by right now.
+
+_Awk_ helps with this type of file quite easily. Instead of printing the entire file out to the terminal like _cat_ , you can use _awk_ to find something of specific interest. For this example, type the following at the command line if you’re running a standard Fedora edition:
+
+```
+$ awk '/dnf/' ~/.bash_history
+```
+
+If you’re running Silverblue, try this instead:
+
+```
+$ awk '/rpm-ostree/' ~/.bash_history
+```
+
+In both cases, more data likely appears than what you really want. That’s no problem for _awk_ since it can accept regular expressions. Using the previous example, you can change the pattern to more closely match search requirements of wanting to know about installs only. Try changing the search pattern to one of these:
+
+```
+$ awk '/rpm-ostree install/' ~/.bash_history
+$ awk '/dnf install/' ~/.bash_history
+```
+
+All the entries of your bash command line history appear that have the pattern specified at any position along the line. Awk works on one line of a data file at a time. It matches pattern, then performs an action, then moves to next line until the end of file (EOF) is reached.
+
+#### From an _awk_ program
+
+Using awk at the command line as above is not much different than piping output to _grep_ , like this:
+
+```
+$ cat .bash_history | grep 'dnf install'
+```
+
+The end result of printing to standard output ( _stdout_ ) is the same with both methods.
+
+Awk is a programming language, and the command _awk_ is an interpreter of that language. The real power and flexibility of _awk_ is you can make programs with it, and combine them with shell scripts to create even more powerful programs. For more feature rich development with _awk_ , you can also incorporate C or C++ code using [Dynamic-Extensions][3].
+
+Next, to show the power of _awk_ , let’s make a couple of program files to print the header and draw five numbers for the first row of a bingo card. To do this we’ll create two awk program files.
+
+The first file prints out the header of the bingo card. For this example it is called _bingo-title.awk_. Use your favorite editor to save this text as that file name:
+```
+
+```
+
+BEGIN {
+print "B\tI\tN\tG\tO"
+}
+```
+
+```
+
+Now the title program is ready. You could try it out with this command:
+
+```
+$ awk -f bingo-title.awk
+```
+
+The program prints the word BINGO, with a tab space ( _\t_ ) between the characters. For the number selection, let’s use one of awk’s builtin numeric functions called _rand()_ and use two of the control statements, _for_ and _switch._ (Except the editor changed my program, so no switch statement used this time).
+
+The title of the second awk program is _bingo-num.awk_. Enter the following into your favorite editor and save with that file name:
+```
+
+```
+
+@include "bingo-title.awk"
+BEGIN {
+for (i = 1; i < = 5; i++) {
+b = int(rand() * 15) + (15*(i-1))
+printf "%s\t", b
+}
+print
+}
+```
+
+```
+
+The _@include_ statement in the file tells the interpreter to process the included file first. In this case the interpreter processs the _bingo-title.awk_ file so the title prints out first.
+
+#### Running the test program
+
+Now enter the command to pick a row of bingo numbers:
+
+```
+$ awk -f bingo-num.awk
+```
+
+Output appears similar to the following. Note that the _rand()_ function in _awk_ is not ideal for truly random numbers. It’s used here only as for example purposes.
+```
+
+```
+
+$ awk -f bingo-num.awk
+B I N G O
+13 23 34 53 71
+```
+
+```
+
+In the example, we created two programs with only beginning sections that used actions to manipulate data generated from within the awk program. In order to satisfy the rules of Bingo, more work is needed to achieve the desirable results. The reader is encouraged to fix the programs so they can reliably pick bingo numbers, maybe look at the awk function _srand()_ for answers on how that could be done.
+
+### Final examples
+
+_Awk_ can be useful even for mundane daily search tasks that you encounter, like listing all _flatpak’s_ on the _Flathub_ repository from _org.gnome_ (providing you have the Flathub repository setup). The command to do that would be:
+
+```
+$ flatpak remote-ls flathub --system | awk /org.gnome/
+```
+
+A listing appears that shows all output from _remote-ls_ that matches the _org.gnome_ pattern. To see flatpaks already installed from org.gnome, enter this command:
+
+```
+$ flatpak list --system | awk /org.gnome/
+```
+
+Awk is a powerful and flexible programming language that fills a niche with text file manipulation exceedingly well.
+
+--------------------------------------------------------------------------------
+
+via: https://fedoramagazine.org/awk-utility-in-fedora/
+
+作者:[Stephen Snow][a]
+选题:[lujun9972][b]
+译者:[译者ID](https://github.com/译者ID)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]: https://fedoramagazine.org/author/jakfrost/
+[b]: https://github.com/lujun9972
+[1]: https://fedoramagazine.org/wp-content/uploads/2019/04/awk-816x345.jpg
+[2]: https://www.gnu.org/software/gawk/manual/gawk.html#Foreword3
+[3]: https://www.gnu.org/software/gawk/manual/gawk.html#Dynamic-Extensions
diff --git a/sources/tech/20190429 How To Turn On And Shutdown The Raspberry Pi -Absolute Beginner Tip.md b/sources/tech/20190429 How To Turn On And Shutdown The Raspberry Pi -Absolute Beginner Tip.md
new file mode 100644
index 0000000000..ce667a1dff
--- /dev/null
+++ b/sources/tech/20190429 How To Turn On And Shutdown The Raspberry Pi -Absolute Beginner Tip.md
@@ -0,0 +1,111 @@
+[#]: collector: (lujun9972)
+[#]: translator: ( )
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (How To Turn On And Shutdown The Raspberry Pi [Absolute Beginner Tip])
+[#]: via: (https://itsfoss.com/turn-on-raspberry-pi/)
+[#]: author: (Chinmay https://itsfoss.com/author/chinmay/)
+
+How To Turn On And Shutdown The Raspberry Pi [Absolute Beginner Tip]
+======
+
+_**Brief: This quick tip teaches you how to turn on Raspberry Pi and how to shut it down properly afterwards.**_
+
+The [Raspberry Pi][1] is one of the [most popular SBC (Single-Board-Computer)][2]. If you are interested in this topic, I believe that you’ve finally got a Pi device. I also advise to get all the [additional Raspberry Pi accessories][3] to get started with your device.
+
+You’re ready to turn it on and start to tinker around with it. It has it’s own similarities and differences compared to traditional computers like desktops and laptops.
+
+Today, let’s go ahead and learn how to turn on and shutdown a Raspberry Pi as it doesn’t really feature a ‘power button’ of sorts.
+
+For this article I’m using a Raspberry Pi 3B+, but it’s the same for all the Raspberry Pi variants.
+
+Bestseller No. 1
+
+[][4]
+
+[CanaKit Raspberry Pi 3 B+ (B Plus) Starter Kit (32 GB EVO+ Edition, Premium Black Case)][4]
+
+CanaKit - Personal Computers
+
+$79.99 [][5]
+
+Bestseller No. 2
+
+[][6]
+
+[CanaKit Raspberry Pi 3 B+ (B Plus) with Premium Clear Case and 2.5A Power Supply][6]
+
+CanaKit - Personal Computers
+
+$54.99 [][5]
+
+### Turn on Raspberry Pi
+
+![Micro USB port for Power][7]
+
+The micro USB port powers the Raspberry Pi, the way you turn it on is by plugging in the power cable into the micro USB port. But, before you do that you should make sure that you have done the following things.
+
+ * Preparing the micro SD card with Raspbian according to the official [guide][8] and inserting into the micro SD card slot.
+ * Plugging in the HDMI cable, USB keyboard and a Mouse.
+ * Plugging in the Ethernet Cable(Optional).
+
+
+
+Once you have done the above, plug in the power cable. This turns on the Raspberry Pi and the display will light up and load the Operating System.
+
+Bestseller No. 1
+
+[][4]
+
+[CanaKit Raspberry Pi 3 B+ (B Plus) Starter Kit (32 GB EVO+ Edition, Premium Black Case)][4]
+
+CanaKit - Personal Computers
+
+$79.99 [][5]
+
+### Shutting Down the Pi
+
+Shutting down the Pi is pretty straight forward, click the menu button and choose shutdown.
+
+![Turn off Raspberry Pi graphically][9]
+
+Alternatively, you can use the [shutdown command][10] in the terminal:
+
+```
+sudo shutdown now
+```
+
+Once the shutdown process has started **wait** till it completely finishes and then you can cut the power to it. Once the Pi shuts down, there is no real way to turn the Pi back on without turning off and turning on the power. You could the GPIO’s to turn on the Pi from the shutdown state but it’ll require additional modding.
+
+[][2]
+
+Suggested read 12 Single Board Computers: Alternative to Raspberry Pi
+
+_Note: Micro USB ports tend to be fragile, hence turn-off/on the power at source instead of frequently unplugging and plugging into the micro USB port._
+
+Well, that’s about all you should know about turning on and shutting down the Pi, what do you plan to use it for? Let me know in the comments.
+
+--------------------------------------------------------------------------------
+
+via: https://itsfoss.com/turn-on-raspberry-pi/
+
+作者:[Chinmay][a]
+选题:[lujun9972][b]
+译者:[译者ID](https://github.com/译者ID)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]: https://itsfoss.com/author/chinmay/
+[b]: https://github.com/lujun9972
+[1]: https://www.raspberrypi.org/
+[2]: https://itsfoss.com/raspberry-pi-alternatives/
+[3]: https://itsfoss.com/things-you-need-to-get-your-raspberry-pi-working/
+[4]: https://www.amazon.com/CanaKit-Raspberry-Starter-Premium-Black/dp/B07BCC8PK7?SubscriptionId=AKIAJ3N3QBK3ZHDGU54Q&tag=chmod7mediate-20&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B07BCC8PK7&keywords=raspberry%20pi%20kit (CanaKit Raspberry Pi 3 B+ (B Plus) Starter Kit (32 GB EVO+ Edition, Premium Black Case))
+[5]: https://www.amazon.com/gp/prime/?tag=chmod7mediate-20 (Amazon Prime)
+[6]: https://www.amazon.com/CanaKit-Raspberry-Premium-Clear-Supply/dp/B07BC7BMHY?SubscriptionId=AKIAJ3N3QBK3ZHDGU54Q&tag=chmod7mediate-20&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B07BC7BMHY&keywords=raspberry%20pi%20kit (CanaKit Raspberry Pi 3 B+ (B Plus) with Premium Clear Case and 2.5A Power Supply)
+[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/04/raspberry-pi-3-microusb.png?fit=800%2C532&ssl=1
+[8]: https://www.raspberrypi.org/documentation/installation/installing-images/README.md
+[9]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/04/Raspbian-ui-menu.jpg?fit=800%2C492&ssl=1
+[10]: https://linuxhandbook.com/linux-shutdown-command/
diff --git a/sources/tech/20190430 The Awesome Fedora 30 is Here- Check Out the New Features.md b/sources/tech/20190430 The Awesome Fedora 30 is Here- Check Out the New Features.md
new file mode 100644
index 0000000000..3d158c7031
--- /dev/null
+++ b/sources/tech/20190430 The Awesome Fedora 30 is Here- Check Out the New Features.md
@@ -0,0 +1,115 @@
+[#]: collector: (lujun9972)
+[#]: translator: ( )
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (The Awesome Fedora 30 is Here! Check Out the New Features)
+[#]: via: (https://itsfoss.com/fedora-30/)
+[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
+
+The Awesome Fedora 30 is Here! Check Out the New Features
+======
+
+The latest and greatest release of Fedora is here. Fedora 30 brings some visual as well as performance improvements.
+
+Fedora releases a new version every six months and each release is supported for thirteen months.
+
+Before you decide to download or upgrade Fedora, let’s first see what’s new in Fedora 30.
+
+### New Features in Fedora 30
+
+![Fedora 30 Release][1]
+
+Here’s what’s new in the latest release of Fedora.
+
+#### GNOME 3.32 gives a brand new look, features and performance improvement
+
+A lot of visual improvements is brought by the latest release of GNOME.
+
+GNOME 3.32 has refreshed new icons and UI and it almost looks like a brand new version of GNOME.
+
+![Gnome 3.32 icons | Image Credit][2]
+
+GNOME 3.32 also brings several other features like fractional scaling, permission control for each application, granular control on Night Light intensity among many other changes.
+
+GNOME 3.32 also brings some performance improvements. You’ll see faster file and app searches and a smoother scrolling.
+
+#### Improved performance for DNF
+
+Fedora 30 will see a faster [DNF][3] (the default package manager for Fedora) thanks to the [zchunk][4] compression algorithm.
+
+The zchunk algorithm splits the file into independent chunks. This helps in dealing with ‘delta’ or changes as you download only the changed chunks while downloading the new version of a file.
+
+With zcunk, dnf will only download the difference between the metadata of the current version and the earlier versions.
+
+#### Fedora 30 brings two new desktop environments into the fold
+
+Fedora already offers several desktop environment choices. Fedora 30 extends the offering with [elementary OS][5]‘ Pantheon desktop environment and Deepin Linux’ [DeepinDE][6].
+
+So now you can enjoy the looks and feel of elementary OS and Deepin Linux in Fedora. How cool is that!
+
+#### Linux Kernel 5
+
+Fedora 29 has Linux Kernel 5.0.9 version that has improved support for hardware and some performance improvements. You may check out the [features of Linux kernel 5.0 in this article][7].
+
+[][8]
+
+Suggested read The Featureful Release of Nextcloud 14 Has Two New Security Features
+
+#### Updated software
+
+You’ll also get newer versions of software. Some of the major ones are:
+
+ * GCC 9.0.1
+ * [Bash Shell 5.0][9]
+ * GNU C Library 2.29
+ * Ruby 2.6
+ * Golang 1.12
+ * Mesa 19.0.2
+
+
+ * Vagrant 2.2
+ * JDK12
+ * PHP 7.3
+ * Fish 3.0
+ * Erlang 21
+ * Python 3.7.3
+
+
+
+### Getting Fedora 30
+
+If you are already using Fedora 29 then you can upgrade to the latest release from your current install. You may follow this guide to learn [how to upgrade a Fedora version][10].
+
+Fedora 29 users will still get the updates for seven more months so if you don’t feel like upgrading, you may skip it for now. Fedora 28 users have no choice because Fedora 28 reached end of life next month which means there will be no security or maintenance update anymore. Upgrading to a newer version is no longer a choice.
+
+You always has the option to download the ISO of Fedora 30 and install it afresh. You can download Fedora from its official website. It’s only available for 64-bit systems and the ISO is 1.9 GB in size.
+
+[Download Fedora 30 Workstation][11]
+
+What do you think of Fedora 30? Are you planning to upgrade or at least try it out? Do share your thoughts in the comment section.
+
+--------------------------------------------------------------------------------
+
+via: https://itsfoss.com/fedora-30/
+
+作者:[Abhishek Prakash][a]
+选题:[lujun9972][b]
+译者:[译者ID](https://github.com/译者ID)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]: https://itsfoss.com/author/abhishek/
+[b]: https://github.com/lujun9972
+[1]: https://itsfoss.com/wp-content/uploads/2019/04/fedora-30-release-800x450.png
+[2]: https://itsfoss.com/wp-content/uploads/2019/04/gnome-3-32-icons.png
+[3]: https://fedoraproject.org/wiki/DNF?rd=Dnf
+[4]: https://github.com/zchunk/zchunk
+[5]: https://itsfoss.com/elementary-os-juno-features/
+[6]: https://www.deepin.org/en/dde/
+[7]: https://itsfoss.com/linux-kernel-5/
+[8]: https://itsfoss.com/nextcloud-14-release/
+[9]: https://itsfoss.com/bash-5-release/
+[10]: https://itsfoss.com/upgrade-fedora-version/
+[11]: https://getfedora.org/en/workstation/
diff --git a/sources/tech/20190501 3 apps to manage personal finances in Fedora.md b/sources/tech/20190501 3 apps to manage personal finances in Fedora.md
new file mode 100644
index 0000000000..afa5eb889f
--- /dev/null
+++ b/sources/tech/20190501 3 apps to manage personal finances in Fedora.md
@@ -0,0 +1,73 @@
+[#]: collector: (lujun9972)
+[#]: translator: ( )
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (3 apps to manage personal finances in Fedora)
+[#]: via: (https://fedoramagazine.org/3-apps-to-manage-personal-finances-in-fedora/)
+[#]: author: (Paul W. Frields https://fedoramagazine.org/author/pfrields/)
+
+3 apps to manage personal finances in Fedora
+======
+
+![][1]
+
+There are numerous services available on the web for managing your personal finances. Although they may be convenient, they also often mean leaving your most valuable personal data with a company you can’t monitor. Some people are comfortable with this level of trust.
+
+Whether you are or not, you might be interested in an app you can maintain on your own system. This means your data never has to leave your own computer if you don’t want. One of these three apps might be what you’re looking for.
+
+### HomeBank
+
+HomeBank is a fully featured way to manage multiple accounts. It’s easy to set up and keep updated. It has multiple ways to categorize and graph income and liabilities so you can see where your money goes. It’s available through the official Fedora repositories.
+
+![A simple account set up in HomeBank with a few transactions.][2]
+
+To install HomeBank, open the _Software_ app, search for _HomeBank_ , and select the app. Then click _Install_ to add it to your system. HomeBank is also available via a Flatpak.
+
+### KMyMoney
+
+The KMyMoney app is a mature app that has been around for a long while. It has a robust set of features to help you manage multiple accounts, including assets, liabilities, taxes, and more. KMyMoney includes a full set of tools for managing investments and making forecasts. It also sports a huge set of reports for seeing how your money is doing.
+
+![A subset of the many reports available in KMyMoney.][3]
+
+To install, use a software center app, or use the command line:
+
+```
+$ sudo dnf install kmymoney
+```
+
+### GnuCash
+
+One of the most venerable free GUI apps for personal finance is GnuCash. GnuCash is not just for personal finances. It also has functions for managing income, assets, and liabilities for a business. That doesn’t mean you can’t use it for managing just your own accounts. Check out [the online tutorial and guide][4] to get started.
+
+![Checking account records shown in GnuCash.][5]
+
+Open the _Software_ app, search for _GnuCash_ , and select the app. Then click _Install_ to add it to your system. Or use _dnf install_ as above to install the _gnucash_ package.
+
+It’s now available via Flathub which makes installation easy. If you don’t have Flathub support, check out [this article on the Fedora Magazine][6] for how to use it. Then you can also use the _flatpak install GnuCash_ command with a terminal.
+
+* * *
+
+*Photo by _[_Fabian Blank_][7]_ on *[ _Unsplash_][8].
+
+--------------------------------------------------------------------------------
+
+via: https://fedoramagazine.org/3-apps-to-manage-personal-finances-in-fedora/
+
+作者:[Paul W. Frields][a]
+选题:[lujun9972][b]
+译者:[译者ID](https://github.com/译者ID)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]: https://fedoramagazine.org/author/pfrields/
+[b]: https://github.com/lujun9972
+[1]: https://fedoramagazine.org/wp-content/uploads/2019/04/personal-finance-3-apps-816x345.jpg
+[2]: https://fedoramagazine.org/wp-content/uploads/2019/04/Screenshot-from-2019-04-28-16-16-16-1024x637.png
+[3]: https://fedoramagazine.org/wp-content/uploads/2019/04/Screenshot-from-2019-04-28-16-27-10-1-1024x649.png
+[4]: https://www.gnucash.org/viewdoc.phtml?rev=3&lang=C&doc=guide
+[5]: https://fedoramagazine.org/wp-content/uploads/2019/04/Screenshot-from-2019-04-28-16-41-27-1024x631.png
+[6]: https://fedoramagazine.org/install-flathub-apps-fedora/
+[7]: https://unsplash.com/photos/pElSkGRA2NU?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
+[8]: https://unsplash.com/search/photos/money?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
diff --git a/sources/tech/20190501 Looking into Linux modules.md b/sources/tech/20190501 Looking into Linux modules.md
new file mode 100644
index 0000000000..cb431874d3
--- /dev/null
+++ b/sources/tech/20190501 Looking into Linux modules.md
@@ -0,0 +1,219 @@
+[#]: collector: (lujun9972)
+[#]: translator: (bodhix)
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (Looking into Linux modules)
+[#]: via: (https://www.networkworld.com/article/3391362/looking-into-linux-modules.html#tk.rss_all)
+[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/)
+
+Looking into Linux modules
+======
+The lsmod command can tell you which kernel modules are currently loaded on your system, along with some interesting details about their use.
+![Rob Oo \(CC BY 2.0\)][1]
+
+### What are Linux modules?
+
+Kernel modules are chunks of code that are loaded and unloaded into the kernel as needed, thus extending the functionality of the kernel without requiring a reboot. In fact, unless users inquire about modules using commands like **lsmod** , they won't likely know that anything has changed.
+
+One important thing to understand is that there are _lots_ of modules that will be in use on your Linux system at all times and that a lot of details are available if you're tempted to dive into the details.
+
+One of the prime ways that lsmod is used is to examine modules when a system isn't working properly. However, most of the time, modules load as needed and users don't need to be aware of how they are working.
+
+**[ Also see:[Must-know Linux Commands][2] ]**
+
+### Listing modules
+
+The easiest way to list modules is with the **lsmod** command. While this command provides a lot of detail, this is the most user-friendly output.
+
+```
+$ lsmod
+Module Size Used by
+snd_hda_codec_realtek 114688 1
+snd_hda_codec_generic 77824 1 snd_hda_codec_realtek
+ledtrig_audio 16384 2 snd_hda_codec_generic,snd_hda_codec_realtek
+snd_hda_codec_hdmi 53248 1
+snd_hda_intel 40960 2
+snd_hda_codec 131072 4 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel
+ ,snd_hda_codec_realtek
+snd_hda_core 86016 5 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel
+ ,snd_hda_codec,snd_hda_codec_realtek
+snd_hwdep 20480 1 snd_hda_codec
+snd_pcm 102400 4 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda
+ _core
+snd_seq_midi 20480 0
+snd_seq_midi_event 16384 1 snd_seq_midi
+dcdbas 20480 0
+snd_rawmidi 36864 1 snd_seq_midi
+snd_seq 69632 2 snd_seq_midi,snd_seq_midi_event
+coretemp 20480 0
+snd_seq_device 16384 3 snd_seq,snd_seq_midi,snd_rawmidi
+snd_timer 36864 2 snd_seq,snd_pcm
+kvm_intel 241664 0
+kvm 626688 1 kvm_intel
+radeon 1454080 10
+irqbypass 16384 1 kvm
+joydev 24576 0
+input_leds 16384 0
+ttm 102400 1 radeon
+drm_kms_helper 180224 1 radeon
+drm 475136 13 drm_kms_helper,radeon,ttm
+snd 81920 15 snd_hda_codec_generic,snd_seq,snd_seq_device,snd_hda
+ _codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd
+ _hda_codec_realtek,snd_timer,snd_pcm,snd_rawmidi
+i2c_algo_bit 16384 1 radeon
+fb_sys_fops 16384 1 drm_kms_helper
+syscopyarea 16384 1 drm_kms_helper
+serio_raw 20480 0
+sysfillrect 16384 1 drm_kms_helper
+sysimgblt 16384 1 drm_kms_helper
+soundcore 16384 1 snd
+mac_hid 16384 0
+sch_fq_codel 20480 2
+parport_pc 40960 0
+ppdev 24576 0
+lp 20480 0
+parport 53248 3 parport_pc,lp,ppdev
+ip_tables 28672 0
+x_tables 40960 1 ip_tables
+autofs4 45056 2
+raid10 57344 0
+raid456 155648 0
+async_raid6_recov 24576 1 raid456
+async_memcpy 20480 2 raid456,async_raid6_recov
+async_pq 24576 2 raid456,async_raid6_recov
+async_xor 20480 3 async_pq,raid456,async_raid6_recov
+async_tx 20480 5 async_pq,async_memcpy,async_xor,raid456,async_raid6_re
+ cov
+xor 24576 1 async_xor
+raid6_pq 114688 3 async_pq,raid456,async_raid6_recov
+libcrc32c 16384 1 raid456
+raid1 45056 0
+raid0 24576 0
+multipath 20480 0
+linear 20480 0
+hid_generic 16384 0
+psmouse 151552 0
+i2c_i801 32768 0
+pata_acpi 16384 0
+lpc_ich 24576 0
+usbhid 53248 0
+hid 126976 2 usbhid,hid_generic
+e1000e 245760 0
+floppy 81920 0
+```
+
+In the output above:
+
+ * "Module" shows the name of each module
+ * "Size" shows the module size (not how much memory it is using)
+ * "Used by" shows each module's usage count and the referring modules
+
+
+
+Clearly, that's a _lot_ of modules. The number of modules loaded will depend on your system and distribution and what's running. We can count them like this:
+
+```
+$ lsmod | wc -l
+67
+```
+
+To see the number of modules available on the system (not just running), try this command:
+
+```
+$ modprobe -c | wc -l
+41272
+```
+
+### Other commands for examining modules
+
+Linux provides several commands for listing, loading and unloading, examining, and checking the status of modules.
+
+ * depmod -- generates modules.dep and map files
+ * insmod -- a simple program to insert a module into the Linux Kernel
+ * lsmod -- show the status of modules in the Linux Kernel
+ * modinfo -- show information about a Linux Kernel module
+ * modprobe -- add and remove modules from the Linux Kernel
+ * rmmod -- a simple program to remove a module from the Linux Kernel
+
+
+
+### Listing modules that are built in
+
+As mentioned above, the **lsmod** command is the most convenient command for listing modules. There are, however, other ways to examine them. The modules.builtin file lists all modules that are built into the kernel and is used by modprobe when trying to load one of these modules. Note that **$(uname -r)** in the commands below provides the name of the kernel release.
+
+```
+$ more /lib/modules/$(uname -r)/modules.builtin | head -10
+kernel/arch/x86/crypto/crc32c-intel.ko
+kernel/arch/x86/events/intel/intel-uncore.ko
+kernel/arch/x86/platform/intel/iosf_mbi.ko
+kernel/mm/zpool.ko
+kernel/mm/zbud.ko
+kernel/mm/zsmalloc.ko
+kernel/fs/binfmt_script.ko
+kernel/fs/mbcache.ko
+kernel/fs/configfs/configfs.ko
+kernel/fs/crypto/fscrypto.ko
+```
+
+You can get some additional detail on a module by using the **modinfo** command, though nothing that qualifies as an easy explanation of what service the module provides. The omitted details from the output below include a lengthy signature.
+
+```
+$ modinfo floppy | head -16
+filename: /lib/modules/5.0.0-13-generic/kernel/drivers/block/floppy.ko
+alias: block-major-2-*
+license: GPL
+author: Alain L. Knaff
+srcversion: EBEAA26742DF61790588FD9
+alias: acpi*:PNP0700:*
+alias: pnp:dPNP0700*
+depends:
+retpoline: Y
+intree: Y
+name: floppy
+vermagic: 5.0.0-13-generic SMP mod_unload
+sig_id: PKCS#7
+signer:
+sig_key:
+sig_hashalgo: md4
+```
+
+You can load or unload a module using the **modprobe** command. Using a command like the one below, you can locate the kernel object associated with a particular module:
+
+```
+$ find /lib/modules/$(uname -r) -name floppy*
+/lib/modules/5.0.0-13-generic/kernel/drivers/block/floppy.ko
+```
+
+If you needed to load the module, you could use a command like this one:
+
+```
+$ sudo modprobe floppy
+```
+
+### Wrap-up
+
+Clearly the loading and unloading of modules is a big deal. It makes Linux systems considerably more flexible and efficient than if they ran with a one-size-fits-all kernel. It also means you can make significant changes — including adding hardware — without rebooting.
+
+**[ Two-Minute Linux Tips:[Learn how to master a host of Linux commands in these 2-minute video tutorials][3] ]**
+
+Join the Network World communities on [Facebook][4] and [LinkedIn][5] to comment on topics that are top of mind.
+
+--------------------------------------------------------------------------------
+
+via: https://www.networkworld.com/article/3391362/looking-into-linux-modules.html#tk.rss_all
+
+作者:[Sandra Henry-Stocker][a]
+选题:[lujun9972][b]
+译者:[译者ID](https://github.com/译者ID)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]: https://www.networkworld.com/author/Sandra-Henry_Stocker/
+[b]: https://github.com/lujun9972
+[1]: https://images.idgesg.net/images/article/2019/04/modules-100794941-large.jpg
+[2]: https://www.networkworld.com/article/3391029/must-know-linux-commands.html
+[3]: https://www.youtube.com/playlist?list=PL7D2RMSmRO9J8OTpjFECi8DJiTQdd4hua
+[4]: https://www.facebook.com/NetworkWorld/
+[5]: https://www.linkedin.com/company/network-world
diff --git a/sources/tech/20190502 Crowdsourcing license compliance with ClearlyDefined.md b/sources/tech/20190502 Crowdsourcing license compliance with ClearlyDefined.md
new file mode 100644
index 0000000000..fe36e37b9c
--- /dev/null
+++ b/sources/tech/20190502 Crowdsourcing license compliance with ClearlyDefined.md
@@ -0,0 +1,99 @@
+[#]: collector: (lujun9972)
+[#]: translator: ( )
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (Crowdsourcing license compliance with ClearlyDefined)
+[#]: via: (https://opensource.com/article/19/5/license-compliance-clearlydefined)
+[#]: author: (Jeff McAffer https://opensource.com/users/jeffmcaffer)
+
+Crowdsourcing license compliance with ClearlyDefined
+======
+Licensing is what holds open source together, and ClearlyDefined takes
+the mystery out of projects' licenses, copyright, and source location.
+![][1]
+
+Open source use continues to skyrocket, not just in use cases and scenarios but also in volume. It is trivial for a developer to depend on a 1,000 JavaScript packages from a single run of `npm install` or have thousands of packages in a [Docker][2] image. At the same time, there is increased interest in ensuring license compliance.
+
+Without the right license you may not be able to legally use a software component in the way you intend or may have obligations that run counter to your business model. For instance, a JavaScript package could be marked as [MIT license][3], which allows commercial reuse, while one of its dependencies is licensed has a [copyleft license][4] that requires you give your software away under the same license. Complying means finding the applicable license(s), and assessing and adhering to the terms, which is not too bad for individual components adn can be daunting for large initiatives.
+
+Fortunately, this open source challenge has an open source solution: [ClearlyDefined][5]. ClearlyDefined is a crowdsourced, open source, [Open Source Initiative][6] (OSI) effort to gather, curate, and upstream/normalize data about open source components, such as license, copyright, and source location. This data is the cornerstone of reducing the friction in open source license compliance.
+
+The premise behind ClearlyDefined is simple: we are all struggling to find and understand key information related to the open source we use—whether it is finding the license, knowing who to attribute, or identifying the source that goes with a particular package. Rather than struggling independently, ClearlyDefined allows us to collaborate and share the compliance effort. Moreover, the ClearlyDefined community seeks to upstream any corrections so future releases are more clearly defined and make conventions more explicit to improve community understanding of project intent.
+
+### How it works
+
+![ClearlyDefined's harvest, curate, upstream process][7]
+
+ClearlyDefined monitors the open source ecosystem and automatically harvests relevant data from open source components using a host of open source tools such as [ScanCode][8], [FOSSology][9], and [Licensee][10]. The results are summarized and aggregated to create a _definition_ , which is then surfaced to users via an API and a UI. Each definition includes:
+
+ * Declared license of the component
+ * Licenses and copyrights discovered across all files
+ * Exact source code location to the commit level
+ * Release date
+ * List of embedded components
+
+
+
+Coincidentally (well, not really), this is exactly the data you need to do license compliance.
+
+### Curating
+
+Any given definition may have gaps or imperfections due to tool issues or the data being missing or incorrect at the origin. ClearlyDefined enables users to curate the results by refining the values and filling in the gaps. These contributions are reviewed and merged, as with any open source project. The result is an improved dataset for all to use.
+
+### Getting ahead
+
+To a certain degree, this process is still chasing the problem—analyzing and curating after the packages have already been published. To get ahead of the game, the ClearlyDefined community also feeds merged curations back to the originating projects as pull requests (e.g., adding a license file, clarifying a copyright). This increases the clarity of future release and sets up a virtuous cycle.
+
+### Adapting, not mandating
+
+In doing the analysis, we've found quite a number of approaches to expressing license-related data. Different communities put LICENSE files in different places or have different practices around attribution. The ClearlyDefined philosophy is to discover these conventions and adapt to them rather than asking the communities to do something different. A side benefit of this is that implicit conventions can be made more explicit, improving clarity for all.
+
+Related to this, ClearlyDefined is careful to not look too hard for this interesting data. If we have to be too smart and infer too much to find the data, then there's a good chance the origin is not all that clear. Instead, we prefer to work with the community to better understand and clarify the conventions being used. From there, we can update the tools accordingly and make it easier to be "clearly defined."
+
+#### NOTICE files
+
+As an added bonus for users, we set up an API and UI for generating NOTICE files, making it trivial for you to comply with the attribution requirements found in most open source licenses. You can give ClearlyDefined a list of components (e.g., _drag and drop an npm package-lock.json file on the UI_ ) and get back a fully formed NOTICE file rendered by one of several renderers (e.g., text, HTML, Handlebars.js template). This is a snap, given that we already have all the compliance data. Big shout out to the [OSS Attribution Builder project][11] for making a simple and pluggable NOTICE renderer we could just pop into the ClearlyDefined service.
+
+### Getting involved
+
+You can get involved with ClearlyDefined in several ways:
+
+ * Become an active user, contributing to your compliance workflow
+ * Review other people's curations using the interface
+ * Get involved in [the code][12] (Node and React)
+ * Ask and answer questions on [our mailing list][13] or [Discord channel][14]
+ * Contribute money to the OSI targeted to ClearlyDefined. We'll use that to fund development and curation.
+
+
+
+We are excited to continue to grow our community of contributors so that licensing can continue to become an understable part of any team's open source adoption. For more information, check out [https://clearlydefined.io][15].
+
+--------------------------------------------------------------------------------
+
+via: https://opensource.com/article/19/5/license-compliance-clearlydefined
+
+作者:[Jeff McAffer][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/jeffmcaffer
+[b]: https://github.com/lujun9972
+[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_Crowdfunding_520x292_9597717_0612CM.png?itok=lxSKyFXU
+[2]: https://opensource.com/resources/what-docker
+[3]: /article/19/4/history-mit-license
+[4]: /resources/what-is-copyleft
+[5]: https://clearlydefined.io
+[6]: https://opensource.org
+[7]: https://opensource.com/sites/default/files/uploads/clearlydefined.png (ClearlyDefined's harvest, curate, upstream process)
+[8]: https://github.com/nexB/scancode-toolkit
+[9]: https://www.fossology.org/
+[10]: https://github.com/licensee/licensee
+[11]: https://github.com/amzn/oss-attribution-builder
+[12]: https://github.com/clearlydefined
+[13]: mailto:clearlydefined@googlegroups.com
+[14]: %C2%A0https://clearlydefined.io/discord)
+[15]: https://clearlydefined.io/
diff --git a/sources/tech/20190502 The making of the Breaking the Code electronic book.md b/sources/tech/20190502 The making of the Breaking the Code electronic book.md
new file mode 100644
index 0000000000..6786df8549
--- /dev/null
+++ b/sources/tech/20190502 The making of the Breaking the Code electronic book.md
@@ -0,0 +1,62 @@
+[#]: collector: (lujun9972)
+[#]: translator: ( )
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (The making of the Breaking the Code electronic book)
+[#]: via: (https://opensource.com/article/19/5/code-book)
+[#]: author: (Alicia Gibb https://opensource.com/users/aliciagibb/users/don-watkins)
+
+The making of the Breaking the Code electronic book
+======
+Offering a safe space for middle school girls to learn technology speaks
+volumes about who should be sitting around the tech table.
+![Open hardware electronic book][1]
+
+I like a good challenge. The [Open Source Stories team][2] came to me with a great one: Create a hardware project where students could create their own thing that would be put together as a larger thing. The students would be middle school girls. My job was to figure out the hardware and make this thing make sense.
+
+After days of sketching out concepts, I was wandering through my local public library, and it dawned on me that the perfect piece of hardware where everyone could design their own part to create something whole is a book! The idea of a book using paper electronics was exciting, simple enough to be taught in a day, and fit the criteria of needing no special equipment, like soldering irons.
+
+!["Breaking the Code" book cover][3]
+
+I designed two parts to the electronics within the book. Half the circuits were developed with copper tape, LEDs, and DIY buttons, and half were developed with LilyPad Arduino microcontrollers, sensors, LEDs, and DIY buttons. Using the electronics in the book, the girls could make pages light up, buzz, or play music using various inputs such as button presses, page turns, or tilting the book.
+
+!['Breaking the Code' interior pages][4]
+
+We worked with young adult author [Lauren Sabel][5] to come up with the story, which features two girls who get locked in the basement of their school and have to solve puzzles to get out. Setting the scene in the basement gave us lots of opportunities to use lights! Along with the story, we received illustrations that the girls enhanced with electronics. The girls got creative, for example, using lights as the skeleton's eyes, not just for the obvious light bulb in the room.
+
+Creating a curriculum that was flexible enough to empower each girl to build her own successfully functioning circuit was a vital piece of the user experience. We chose components so the circuit wouldn't need to be over-engineered. We also used breakout boards and LEDs with built-in resistors so that the circuits allowed flexibility and functioned with only basic knowledge of circuit design—without getting too muddled in the deep end.
+
+!['Breaking the Code' interior pages][6]
+
+The project curriculum gave girls the confidence and skills to understand electronics by building two circuits, in the process learning circuit layout, directional aspects, cause-and-effect through inputs and outputs, and how to identify various components. Controlling electrons by pushing them through a circuit feels a bit like you're controlling a tiny part of the universe. And seeing the girls' faces light up is like seeing a universe of opportunities open in front of them.
+
+!['Breaking the Code' interior pages][7]
+
+The girls were ecstatic to see their work as a completed book, taking pride in their pages and showing others what they had built.
+
+![About 'Breaking the Code'][8]
+
+Teaching them my little corner of the world for the day was a truly empowering experience for me. As a woman in tech, I think this is the right approach for companies trying to change the gender inequalities we see in tech. Offering a safe space to learn—with lots of people in the room who look like you as mentors—speaks volumes about who should be sitting around the tech table.
+
+--------------------------------------------------------------------------------
+
+via: https://opensource.com/article/19/5/code-book
+
+作者:[Alicia Gibb][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/aliciagibb/users/don-watkins
+[b]: https://github.com/lujun9972
+[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/code_book_electronics_hardware.jpg?itok=zb-zaiwz (Open hardware electronic book)
+[2]: https://www.redhat.com/en/open-source-stories
+[3]: https://opensource.com/sites/default/files/uploads/codebook_cover.jpg ("Breaking the Code" book cover)
+[4]: https://opensource.com/sites/default/files/uploads/codebook_38-39.jpg ('Breaking the Code' interior pages)
+[5]: https://www.amazon.com/Lauren-Sabel/e/B01M0FW223
+[6]: https://opensource.com/sites/default/files/uploads/codebook_lightbulb.jpg ('Breaking the Code' interior pages)
+[7]: https://opensource.com/sites/default/files/uploads/codebook_10-11.jpg ('Breaking the Code' interior pages)
+[8]: https://opensource.com/sites/default/files/uploads/codebook_pg1.jpg (About 'Breaking the Code')
diff --git a/sources/tech/20190503 API evolution the right way.md b/sources/tech/20190503 API evolution the right way.md
new file mode 100644
index 0000000000..087c71eead
--- /dev/null
+++ b/sources/tech/20190503 API evolution the right way.md
@@ -0,0 +1,735 @@
+[#]: collector: (lujun9972)
+[#]: translator: (MjSeven)
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (API evolution the right way)
+[#]: via: (https://opensource.com/article/19/5/api-evolution-right-way)
+[#]: author: (A. Jesse https://opensource.com/users/emptysquare)
+
+API evolution the right way
+======
+Ten covenants that responsible library authors keep with their users.
+![Browser of things][1]
+
+Imagine you are a creator deity, designing a body for a creature. In your benevolence, you wish for the creature to evolve over time: first, because it must respond to changes in its environment, and second, because your wisdom grows and you think of better designs for the beast. It shouldn't remain in the same body forever!
+
+![Serpents][2]
+
+The creature, however, might be relying on features of its present anatomy. You can't add wings or change its scales without warning. It needs an orderly process to adapt its lifestyle to its new body. How can you, as a responsible designer in charge of this creature's natural history, gently coax it toward ever greater improvements?
+
+It's the same for responsible library maintainers. We keep our promises to the people who depend on our code: we release bugfixes and useful new features. We sometimes delete features if that's beneficial for the library's future. We continue to innovate, but we don't break the code of people who use our library. How can we fulfill all those goals at once?
+
+### Add useful features
+
+Your library shouldn't stay the same for eternity: you should add features that make your library better for your users. For example, if you have a Reptile class and it would be useful to have wings for flying, go for it.
+
+
+```
+class Reptile:
+@property
+def teeth(self):
+return 'sharp fangs'
+
+# If wings are useful, add them!
+@property
+def wings(self):
+return 'majestic wings'
+```
+
+But beware, features come with risk. Consider the following feature in the Python standard library, and see what went wrong with it.
+
+
+```
+bool(datetime.time(9, 30)) == True
+bool(datetime.time(0, 0)) == False
+```
+
+This is peculiar: converting any time object to a boolean yields True, except for midnight. (Worse, the rules for timezone-aware times are even stranger.)
+
+I've been writing Python for more than a decade but I didn't discover this rule until last week. What kind of bugs can this odd behavior cause in users' code?
+
+Consider a calendar application with a function that creates events. If an event has an end time, the function requires it to also have a start time.
+
+
+```
+def create_event(day,
+start_time=None,
+end_time=None):
+if end_time and not start_time:
+raise ValueError("Can't pass end_time without start_time")
+
+# The coven meets from midnight until 4am.
+create_event(datetime.date.today(),
+datetime.time(0, 0),
+datetime.time(4, 0))
+```
+
+Unfortunately for witches, an event starting at midnight fails this validation. A careful programmer who knows about the quirk at midnight can write this function correctly, of course.
+
+
+```
+def create_event(day,
+start_time=None,
+end_time=None):
+if end_time is not None and start_time is None:
+raise ValueError("Can't pass end_time without start_time")
+```
+
+But this subtlety is worrisome. If a library creator wanted to make an API that bites users, a "feature" like the boolean conversion of midnight works nicely.
+
+![Man being chased by an alligator][3]
+
+The responsible creator's goal, however, is to make your library easy to use correctly.
+
+This feature was written by Tim Peters when he first made the datetime module in 2002. Even founding Pythonistas like Tim make mistakes. [The quirk was removed][4], and all times are True now.
+
+
+```
+# Python 3.5 and later.
+
+bool(datetime.time(9, 30)) == True
+bool(datetime.time(0, 0)) == True
+```
+
+Programmers who didn't know about the oddity of midnight are saved from obscure bugs, but it makes me nervous to think about any code that relies on the weird old behavior and didn't notice the change. It would have been better if this bad feature were never implemented at all. This leads us to the first promise of any library maintainer:
+
+#### First covenant: Avoid bad features
+
+The most painful change to make is when you have to delete a feature. One way to avoid bad features is to add few features in general! Make no public method, class, function, or property without a good reason. Thus:
+
+#### Second covenant: Minimize features
+
+Features are like children: conceived in a moment of passion, they must be supported for years. Don't do anything silly just because you can. Don't add feathers to a snake!
+
+![Serpents with and without feathers][5]
+
+But of course, there are plenty of occasions when users need something from your library that it does not yet offer. How do you choose the right feature to give them? Here's another cautionary tale.
+
+### A cautionary tale from asyncio
+
+As you may know, when you call a coroutine function, it returns a coroutine object:
+
+
+```
+async def my_coroutine():
+pass
+
+print(my_coroutine())
+
+[/code] [code]``
+```
+
+Your code must "await" this object to run the coroutine. It's easy to forget this, so asyncio's developers wanted a "debug mode" that catches this mistake. Whenever a coroutine is destroyed without being awaited, the debug mode prints a warning with a traceback to the line where it was created.
+
+When Yury Selivanov implemented the debug mode, he added as its foundation a "coroutine wrapper" feature. The wrapper is a function that takes in a coroutine and returns anything at all. Yury used it to install the warning logic on each coroutine, but someone else could use it to turn coroutines into the string "hi!"
+
+
+```
+import sys
+
+def my_wrapper(coro):
+return 'hi!'
+
+sys.set_coroutine_wrapper(my_wrapper)
+
+async def my_coroutine():
+pass
+
+print(my_coroutine())
+
+[/code] [code]`hi!`
+```
+
+That is one hell of a customization. It changes the very meaning of "async." Calling set_coroutine_wrapper once will globally and permanently change all coroutine functions. It is, [as Nathaniel Smith wrote][6], "a problematic API" that is prone to misuse and had to be removed. The asyncio developers could have avoided the pain of deleting the feature if they'd better shaped it to its purpose. Responsible creators must keep this in mind:
+
+#### Third covenant: Keep features narrow
+
+Luckily, Yury had the good judgment to mark this feature provisional, so asyncio users knew not to rely on it. Nathaniel was free to replace **set_coroutine_wrapper** with a narrower feature that only customized the traceback depth.
+
+
+```
+import sys
+
+sys.set_coroutine_origin_tracking_depth(2)
+
+async def my_coroutine():
+pass
+
+print(my_coroutine())
+
+[/code] [code]
+
+
+
+RuntimeWarning:'my_coroutine' was never awaited
+
+Coroutine created at (most recent call last)
+File "script.py", line 8, in
+print(my_coroutine())
+```
+
+This is much better. There's no more global setting that can change coroutines' type, so asyncio users need not code as defensively. Deities should all be as farsighted as Yury.
+
+#### Fourth covenant: Mark experimental features "provisional"
+
+If you have merely a hunch that your creature wants horns and a quadruple-forked tongue, introduce the features but mark them "provisional."
+
+![Serpent with horns][7]
+
+You might discover that the horns are extraneous but the quadruple-forked tongue is useful after all. In the next release of your library, you can delete the former and mark the latter official.
+
+### Deleting features
+
+No matter how wisely we guide our creature's evolution, there may come a time when it's best to delete an official feature. For example, you might have created a lizard, and now you choose to delete its legs. Perhaps you want to transform this awkward creature into a sleek and modern python.
+
+![Lizard transformed to snake][8]
+
+There are two main reasons to delete features. First, you might discover a feature was a bad idea, through user feedback or your own growing wisdom. That was the case with the quirky behavior of midnight. Or, the feature might have been well-adapted to your library's environment at first, but the ecology changes. Perhaps another deity invents mammals. Your creature wants to squeeze into the mammals' little burrows and eat the tasty mammal filling, so it has to lose its legs.
+
+![A mouse][9]
+
+Similarly, the Python standard library deletes features in response to changes in the language itself. Consider asyncio's Lock. It has been awaitable ever since "await" was added as a keyword:
+
+
+```
+lock = asyncio.Lock()
+
+async def critical_section():
+await lock
+try:
+print('holding lock')
+finally:
+lock.release()
+```
+
+But now, we can do "async with lock."
+
+
+```
+lock = asyncio.Lock()
+
+async def critical_section():
+async with lock:
+print('holding lock')
+```
+
+The new style is much better! It's short and less prone to mistakes in a big function with other try-except blocks. Since "there should be one and preferably only one obvious way to do it," [the old syntax is deprecated in Python 3.7][10] and it will be banned soon.
+
+It's inevitable that ecological change will have this effect on your code, too, so learn to delete features gently. Before you do so, consider the cost or benefit of deleting it. Responsible maintainers are reluctant to make their users change a large amount of their code or change their logic. (Remember how painful it was when Python 3 removed the "u" string prefix, before it was added back.) If the code changes are mechanical, however, like a simple search-and-replace, or if the feature is dangerous, it may be worth deleting.
+
+#### Whether to delete a feature
+
+![Balance scales][11]
+
+Con | Pro
+---|---
+Code must change | Change is mechanical
+Logic must change | Feature is dangerous
+
+In the case of our hungry lizard, we decide to delete its legs so it can slither into a mouse's hole and eat it. How do we go about this? We could just delete the **walk** method, changing code from this:
+
+
+```
+class Reptile:
+def walk(self):
+print('step step step')
+```
+
+to this:
+
+
+```
+class Reptile:
+def slither(self):
+print('slide slide slide')
+```
+
+That's not a good idea; the creature is accustomed to walking! Or, in terms of a library, your users have code that relies on the existing method. When they upgrade to the latest version of your library, their code will break.
+
+
+```
+# User's code. Oops!
+Reptile.walk()
+```
+
+Therefore, responsible creators make this promise:
+
+#### Fifth covenant: Delete features gently
+
+There are a few steps involved in deleting a feature gently. Starting with a lizard that walks with its legs, you first add the new method, "slither." Next, deprecate the old method.
+
+
+```
+import warnings
+
+class Reptile:
+def walk(self):
+warnings.warn(
+"walk is deprecated, use slither",
+DeprecationWarning, stacklevel=2)
+print('step step step')
+
+def slither(self):
+print('slide slide slide')
+```
+
+The Python warnings module is quite powerful. By default it prints warnings to stderr, only once per code location, but you can silence warnings or turn them into exceptions, among other options.
+
+As soon as you add this warning to your library, PyCharm and other IDEs render the deprecated method with a strikethrough. Users know right away that the method is due for deletion.
+
+`Reptile().walk()`
+
+What happens when they run their code with the upgraded library?
+
+
+```
+$ python3 script.py
+
+DeprecationWarning: walk is deprecated, use slither
+script.py:14: Reptile().walk()
+
+step step step
+```
+
+By default, they see a warning on stderr, but the script succeeds and prints "step step step." The warning's traceback shows what line of the user's code must be fixed. (That's what the "stacklevel" argument does: it shows the call site that users need to change, not the line in your library where the warning is generated.) Notice that the error message is instructive, it describes what a library user must do to migrate to the new version.
+
+Your users will want to test their code and prove they call no deprecated library methods. Warnings alone won't make unit tests fail, but exceptions will. Python has a command-line option to turn deprecation warnings into exceptions.
+
+
+```
+> python3 -Werror::DeprecationWarning script.py
+
+Traceback (most recent call last):
+File "script.py", line 14, in
+Reptile().walk()
+File "script.py", line 8, in walk
+DeprecationWarning, stacklevel=2)
+DeprecationWarning: walk is deprecated, use slither
+```
+
+Now, "step step step" is not printed, because the script terminates with an error.
+
+So, once you've released a version of your library that warns about the deprecated "walk" method, you can delete it safely in the next release. Right?
+
+Consider what your library's users might have in their projects' requirements.
+
+
+```
+# User's requirements.txt has a dependency on the reptile package.
+reptile
+```
+
+The next time they deploy their code, they'll install the latest version of your library. If they haven't yet handled all deprecations, then their code will break, because it still depends on "walk." You need to be gentler than this. There are three more promises you must keep to your users: maintain a changelog, choose a version scheme, and write an upgrade guide.
+
+#### Sixth covenant: Maintain a changelog
+
+Your library must have a changelog; its main purpose is to announce when a feature that your users rely on is deprecated or deleted.
+
+#### Changes in Version 1.1
+
+**New features**
+
+ * New function Reptile.slither()
+
+
+
+**Deprecations**
+
+ * Reptile.walk() is deprecated and will be removed in version 2.0, use slither()
+
+
+---
+
+Responsible creators use version numbers to express how a library has changed so users can make informed decisions about upgrading. A "version scheme" is a language for communicating the pace of change.
+
+#### Seventh covenant: Choose a version scheme
+
+There are two schemes in widespread use, [semantic versioning][12] and time-based versioning. I recommend semantic versioning for nearly any library. The Python flavor thereof is defined in [PEP 440][13], and tools like **pip** understand semantic version numbers.
+
+If you choose semantic versioning for your library, you can delete its legs gently with version numbers like:
+
+> 1.0: First "stable" release, with walk()
+> 1.1: Add slither(), deprecate walk()
+> 2.0: Delete walk()
+
+Your users should depend on a range of your library's versions, like so:
+
+
+```
+# User's requirements.txt.
+reptile>=1,<2
+```
+
+This allows them to upgrade automatically within a major release, receiving bugfixes and potentially raising some deprecation warnings, but not upgrading to the _next_ major release and risking a change that breaks their code.
+
+If you follow time-based versioning, your releases might be numbered thus:
+
+> 2017.06.0: A release in June 2017
+> 2018.11.0: Add slither(), deprecate walk()
+> 2019.04.0: Delete walk()
+
+And users can depend on your library like:
+
+
+```
+# User's requirements.txt for time-based version.
+reptile==2018.11.*
+```
+
+This is terrific, but how do your users know your versioning scheme and how to test their code for deprecations? You have to advise them how to upgrade.
+
+#### Eighth covenant: Write an upgrade guide
+
+Here's how a responsible library creator might guide users:
+
+#### Upgrading to 2.0
+
+**Migrate from Deprecated APIs**
+
+See the changelog for deprecated features.
+
+**Enable Deprecation Warnings**
+
+Upgrade to 1.1 and test your code with:
+
+`python -Werror::DeprecationWarning`
+
+Now it's safe to upgrade.
+
+---
+
+You must teach users how to handle deprecation warnings by showing them the command line options. Not all Python programmers know this—I certainly have to look up the syntax each time. And take note, you must _release_ a version that prints warnings from each deprecated API so users can test with that version before upgrading again. In this example, version 1.1 is the bridge release. It allows your users to rewrite their code incrementally, fixing each deprecation warning separately until they have entirely migrated to the latest API. They can test changes to their code and changes in your library, independently from each other, and isolate the cause of bugs.
+
+If you chose semantic versioning, this transitional period lasts until the next major release, from 1.x to 2.0, or from 2.x to 3.0, and so on. The gentle way to delete a creature's legs is to give it at least one version in which to adjust its lifestyle. Don't remove the legs all at once!
+
+![A skink][14]
+
+Version numbers, deprecation warnings, the changelog, and the upgrade guide work together to gently evolve your library without breaking the covenant with your users. The [Twisted project's Compatibility Policy][15] explains this beautifully:
+
+> "The First One's Always Free"
+>
+> Any application which runs without warnings may be upgraded one minor version of Twisted.
+>
+> In other words, any application which runs its tests without triggering any warnings from Twisted should be able to have its Twisted version upgraded at least once with no ill effects except the possible production of new warnings.
+
+Now, we creator deities have gained the wisdom and power to add features by adding methods and to delete them gently. We can also add features by adding parameters, but this brings a new level of difficulty. Are you ready?
+
+### Adding parameters
+
+Imagine that you just gave your snake-like creature a pair of wings. Now you must allow it the choice whether to move by slithering or flying. Currently its "move" function takes one parameter.
+
+
+```
+# Your library code.
+def move(direction):
+print(f'slither {direction}')
+
+# A user's application.
+move('north')
+```
+
+You want to add a "mode" parameter, but this breaks your users' code if they upgrade, because they pass only one argument.
+
+
+```
+# Your library code.
+def move(direction, mode):
+assert mode in ('slither', 'fly')
+print(f'{mode} {direction}')
+
+# A user's application. Error!
+move('north')
+```
+
+A truly wise creator promises not to break users' code this way.
+
+#### Ninth covenant: Add parameters compatibly
+
+To keep this covenant, add each new parameter with a default value that preserves the original behavior.
+
+
+```
+# Your library code.
+def move(direction, mode='slither'):
+assert mode in ('slither', 'fly')
+print(f'{mode} {direction}')
+
+# A user's application.
+move('north')
+```
+
+Over time, parameters are the natural history of your function's evolution. They're listed oldest first, each with a default value. Library users can pass keyword arguments to opt into specific new behaviors and accept the defaults for all others.
+
+
+```
+# Your library code.
+def move(direction,
+mode='slither',
+turbo=False,
+extra_sinuous=False,
+hail_lyft=False):
+# ...
+
+# A user's application.
+move('north', extra_sinuous=True)
+```
+
+There is a danger, however, that a user might write code like this:
+
+
+```
+# A user's application, poorly-written.
+move('north', 'slither', False, True)
+```
+
+What happens if, in the next major version of your library, you get rid of one of the parameters, like "turbo"?
+
+
+```
+# Your library code, next major version. "turbo" is deleted.
+def move(direction,
+mode='slither',
+extra_sinuous=False,
+hail_lyft=False):
+# ...
+
+# A user's application, poorly-written.
+move('north', 'slither', False, True)
+```
+
+The user's code still compiles, and this is a bad thing. The code stopped moving extra-sinuously and started hailing a Lyft, which was not the intention. I trust that you can predict what I'll say next: Deleting a parameter requires several steps. First, of course, deprecate the "turbo" parameter. I like a technique like this one, which detects whether any user's code relies on this parameter.
+
+
+```
+# Your library code.
+_turbo_default = object()
+
+def move(direction,
+mode='slither',
+turbo=_turbo_default,
+extra_sinuous=False,
+hail_lyft=False):
+if turbo is not _turbo_default:
+warnings.warn(
+"'turbo' is deprecated",
+DeprecationWarning,
+stacklevel=2)
+else:
+# The old default.
+turbo = False
+```
+
+But your users might not notice the warning. Warnings are not very loud: they can be suppressed or lost in log files. Users might heedlessly upgrade to the next major version of your library, the version that deletes "turbo." Their code will run without error and silently do the wrong thing! As the Zen of Python says, "Errors should never pass silently." Indeed, reptiles hear poorly, so you must correct them very loudly when they make mistakes.
+
+![Woman riding an alligator][16]
+
+The best way to protect your users is with Python 3's star syntax, which requires callers to pass keyword arguments.
+
+
+```
+# Your library code.
+# All arguments after "*" must be passed by keyword.
+def move(direction,
+*,
+mode='slither',
+turbo=False,
+extra_sinuous=False,
+hail_lyft=False):
+# ...
+
+# A user's application, poorly-written.
+# Error! Can't use positional args, keyword args required.
+move('north', 'slither', False, True)
+```
+
+With the star in place, this is the only syntax allowed:
+
+
+```
+# A user's application.
+move('north', extra_sinuous=True)
+```
+
+Now when you delete "turbo," you can be certain any user code that relies on it will fail loudly. If your library also supports Python 2, there's no shame in that; you can simulate the star syntax thus ([credit to Brett Slatkin][17]):
+
+
+```
+# Your library code, Python 2 compatible.
+def move(direction, **kwargs):
+mode = kwargs.pop('mode', 'slither')
+turbo = kwargs.pop('turbo', False)
+sinuous = kwargs.pop('extra_sinuous', False)
+lyft = kwargs.pop('hail_lyft', False)
+
+if kwargs:
+raise TypeError('Unexpected kwargs: %r'
+% kwargs)
+
+# ...
+```
+
+Requiring keyword arguments is a wise choice, but it requires foresight. If you allow an argument to be passed positionally, you cannot convert it to keyword-only in a later release. So, add the star now. You can observe in the asyncio API that it uses the star pervasively in constructors, methods, and functions. Even though "Lock" only takes one optional parameter so far, the asyncio developers added the star right away. This is providential.
+
+
+```
+# In asyncio.
+class Lock:
+def __init__(self, *, loop=None):
+# ...
+```
+
+Now we've gained the wisdom to change methods and parameters while keeping our covenant with users. The time has come to try the most challenging kind of evolution: changing behavior without changing either methods or parameters.
+
+### Changing behavior
+
+Let's say your creature is a rattlesnake, and you want to teach it a new behavior.
+
+![Rattlesnake][18]
+
+Sidewinding! The creature's body will appear the same, but its behavior will change. How can we prepare it for this step of its evolution?
+
+![][19]
+
+Image by HCA [[CC BY-SA 4.0][20]], [via Wikimedia Commons][21], modified by Opensource.com
+
+A responsible creator can learn from the following example in the Python standard library, when behavior changed without a new function or parameters. Once upon a time, the os.stat function was introduced to get file statistics, like the creation time. At first, times were always integers.
+
+
+```
+>>> os.stat('file.txt').st_ctime
+1540817862
+```
+
+One day, the core developers decided to use floats for os.stat times to give sub-second precision. But they worried that existing user code wasn't ready for the change. They created a setting in Python 2.3, "stat_float_times," that was false by default. A user could set it to True to opt into floating-point timestamps.
+
+
+```
+>>> # Python 2.3.
+>>> os.stat_float_times(True)
+>>> os.stat('file.txt').st_ctime
+1540817862.598021
+```
+
+Starting in Python 2.5, float times became the default, so any new code written for 2.5 and later could ignore the setting and expect floats. Of course, you could set it to False to keep the old behavior or set it to True to ensure the new behavior in all Python versions, and prepare your code for the day when stat_float_times is deleted.
+
+Ages passed. In Python 3.1, the setting was deprecated to prepare people for the distant future and finally, after its decades-long journey, [the setting was removed][22]. Float times are now the only option. It's a long road, but responsible deities are patient because we know this gradual process has a good chance of saving users from unexpected behavior changes.
+
+#### Tenth covenant: Change behavior gradually
+
+Here are the steps:
+
+ * Add a flag to opt into the new behavior, default False, warn if it's False
+ * Change default to True, deprecate flag entirely
+ * Remove the flag
+
+
+
+If you follow semantic versioning, the versions might be like so:
+
+Library version | Library API | User code
+---|---|---
+| |
+1.0 | No flag | Expect old behavior
+1.1 | Add flag, default False,
+warn if it's False | Set flag True,
+handle new behavior
+2.0 | Change default to True,
+deprecate flag entirely | Handle new behavior
+3.0 | Remove flag | Handle new behavior
+
+You need _two_ major releases to complete the maneuver. If you had gone straight from "Add flag, default False, warn if it's False" to "Remove flag" without the intervening release, your users' code would be unable to upgrade. User code written correctly for 1.1, which sets the flag to True and handles the new behavior, must be able to upgrade to the next release with no ill effect except new warnings, but if the flag were deleted in the next release, that code would break. A responsible deity never violates the Twisted policy: "The First One's Always Free."
+
+### The responsible creator
+
+![Demeter][23]
+
+Our 10 covenants belong loosely in three categories:
+
+**Evolve cautiously**
+
+ 1. Avoid bad features
+ 2. Minimize features
+ 3. Keep features narrow
+ 4. Mark experimental features "provisional"
+ 5. Delete features gently
+
+
+
+**Record history rigorously**
+
+ 1. Maintain a changelog
+ 2. Choose a version scheme
+ 3. Write an upgrade guide
+
+
+
+**Change slowly and loudly**
+
+ 1. Add parameters compatibly
+ 2. Change behavior gradually
+
+
+
+If you keep these covenants with your creature, you'll be a responsible creator deity. Your creature's body can evolve over time, forever improving and adapting to changes in its environment but without sudden changes the creature isn't prepared for. If you maintain a library, keep these promises to your users and you can innovate your library without breaking the code of the people who rely on you.
+
+* * *
+
+_This article originally appeared on[A. Jesse Jiryu Davis's blog][24] and is republished with permission._
+
+Illustration credits:
+
+ * [The World's Progress, The Delphian Society, 1913][25]
+ * [Essay Towards a Natural History of Serpents, Charles Owen, 1742][26]
+ * [On the batrachia and reptilia of Costa Rica: With notes on the herpetology and ichthyology of Nicaragua and Peru, Edward Drinker Cope, 1875][27]
+ * [Natural History, Richard Lydekker et. al., 1897][28]
+ * [Mes Prisons, Silvio Pellico, 1843][29]
+ * [Tierfotoagentur / m.blue-shadow][30]
+ * [Los Angeles Public Library, 1930][31]
+
+
+
+--------------------------------------------------------------------------------
+
+via: https://opensource.com/article/19/5/api-evolution-right-way
+
+作者:[A. Jesse][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/emptysquare
+[b]: https://github.com/lujun9972
+[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_desktop_website_checklist_metrics.png?itok=OKKbl1UR (Browser of things)
+[2]: https://opensource.com/sites/default/files/uploads/praise-the-creator.jpg (Serpents)
+[3]: https://opensource.com/sites/default/files/uploads/bite.jpg (Man being chased by an alligator)
+[4]: https://bugs.python.org/issue13936
+[5]: https://opensource.com/sites/default/files/uploads/feathers.jpg (Serpents with and without feathers)
+[6]: https://bugs.python.org/issue32591
+[7]: https://opensource.com/sites/default/files/uploads/horns.jpg (Serpent with horns)
+[8]: https://opensource.com/sites/default/files/uploads/lizard-to-snake.jpg (Lizard transformed to snake)
+[9]: https://opensource.com/sites/default/files/uploads/mammal.jpg (A mouse)
+[10]: https://bugs.python.org/issue32253
+[11]: https://opensource.com/sites/default/files/uploads/scale.jpg (Balance scales)
+[12]: https://semver.org
+[13]: https://www.python.org/dev/peps/pep-0440/
+[14]: https://opensource.com/sites/default/files/uploads/skink.jpg (A skink)
+[15]: https://twistedmatrix.com/documents/current/core/development/policy/compatibility-policy.html
+[16]: https://opensource.com/sites/default/files/uploads/loudly.jpg (Woman riding an alligator)
+[17]: http://www.informit.com/articles/article.aspx?p=2314818
+[18]: https://opensource.com/sites/default/files/uploads/rattlesnake.jpg (Rattlesnake)
+[19]: https://opensource.com/sites/default/files/articles/neonate_sidewinder_sidewinding_with_tracks_unlabeled.png
+[20]: https://creativecommons.org/licenses/by-sa/4.0
+[21]: https://commons.wikimedia.org/wiki/File:Neonate_sidewinder_sidewinding_with_tracks_unlabeled.jpg
+[22]: https://bugs.python.org/issue31827
+[23]: https://opensource.com/sites/default/files/uploads/demeter.jpg (Demeter)
+[24]: https://emptysqua.re/blog/api-evolution-the-right-way/
+[25]: https://www.gutenberg.org/files/42224/42224-h/42224-h.htm
+[26]: https://publicdomainreview.org/product-att/artist/charles-owen/
+[27]: https://archive.org/details/onbatrachiarepti00cope/page/n3
+[28]: https://www.flickr.com/photos/internetarchivebookimages/20556001490
+[29]: https://www.oldbookillustrations.com/illustrations/stationery/
+[30]: https://www.alamy.com/mediacomp/ImageDetails.aspx?ref=D7Y61W
+[31]: https://www.vintag.es/2013/06/riding-alligator-c-1930s.html
diff --git a/sources/tech/20190503 Mirror your System Drive using Software RAID.md b/sources/tech/20190503 Mirror your System Drive using Software RAID.md
new file mode 100644
index 0000000000..1b5936dfa0
--- /dev/null
+++ b/sources/tech/20190503 Mirror your System Drive using Software RAID.md
@@ -0,0 +1,306 @@
+[#]: collector: (lujun9972)
+[#]: translator: ( )
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (Mirror your System Drive using Software RAID)
+[#]: via: (https://fedoramagazine.org/mirror-your-system-drive-using-software-raid/)
+[#]: author: (Gregory Bartholomew https://fedoramagazine.org/author/glb/)
+
+Mirror your System Drive using Software RAID
+======
+
+![][1]
+
+Nothing lasts forever. When it comes to the hardware in your PC, most of it can easily be replaced. There is, however, one special-case hardware component in your PC that is not as easy to replace as the rest — your hard disk drive.
+
+### Drive Mirroring
+
+Your hard drive stores your personal data. Some of your data can be backed up automatically by scheduled backup jobs. But those jobs scan the files to be backed up for changes and trying to scan an entire drive would be very resource intensive. Also, anything that you’ve changed since your last backup will be lost if your drive fails. [Drive mirroring][2] is a better way to maintain a secondary copy of your entire hard drive. With drive mirroring, a secondary copy of _all the data_ on your hard drive is maintained _in real time_.
+
+An added benefit of live mirroring your hard drive to a secondary hard drive is that it can [increase your computer’s performance][3]. Because disk I/O is one of your computer’s main performance [bottlenecks][4], the performance improvement can be quite significant.
+
+Note that a mirror is not a backup. It only protects your data from being lost if one of your physical drives fail. Types of failures that drive mirroring, by itself, does not protect against include:
+
+ * [File System Corruption][5]
+ * [Bit Rot][6]
+ * Accidental File Deletion
+ * Simultaneous Failure of all Mirrored Drives (highly unlikely)
+
+
+
+Some of the above can be addressed by other file system features that can be used in conjunction with drive mirroring. File system features that address the above types of failures include:
+
+ * Using a [Journaling][7] or [Log-Structured][8] file system
+ * Using [Checksums][9] ([ZFS][10] , for example, does this automatically and transparently)
+ * Using [Snapshots][11]
+ * Using [BCVs][12]
+
+
+
+This guide will demonstrate one method of mirroring your system drive using the Multiple Disk and Device Administration (mdadm) toolset. Just for fun, this guide will show how to do the conversion without using any extra boot media (CDs, USB drives, etc). For more about the concepts and terminology related to the multiple device driver, you can skim the _md_ man page:
+
+```
+$ man md
+```
+
+### The Procedure
+
+ 1. **Use** [**sgdisk**][13] **to (re)partition the _extra_ drive that you have added to your computer** :
+
+```
+ $ sudo -i
+# MY_DISK_1=/dev/sdb
+# sgdisk --zap-all $MY_DISK_1
+# test -d /sys/firmware/efi/efivars || sgdisk -n 0:0:+1MiB -t 0:ef02 -c 0:grub_1 $MY_DISK_1
+# sgdisk -n 0:0:+1GiB -t 0:ea00 -c 0:boot_1 $MY_DISK_1
+# sgdisk -n 0:0:+4GiB -t 0:fd00 -c 0:swap_1 $MY_DISK_1
+# sgdisk -n 0:0:0 -t 0:fd00 -c 0:root_1 $MY_DISK_1
+```
+
+– If the drive that you will be using for the second half of the mirror in step 12 is smaller than this drive, then you will need to adjust down the size of the last partition so that the total size of all the partitions is not greater than the size of your second drive.
+– A few of the commands in this guide are prefixed with a test for the existence of an _efivars_ directory. This is necessary because those commands are slightly different depending on whether your computer is BIOS-based or UEFI-based.
+
+ 2. **Use** [**mdadm**][14] **to create RAID devices that use the new partitions to store their data** :
+
+```
+ # mdadm --create /dev/md/boot --homehost=any --metadata=1.0 --level=1 --raid-devices=2 /dev/disk/by-partlabel/boot_1 missing
+# mdadm --create /dev/md/swap --homehost=any --metadata=1.0 --level=1 --raid-devices=2 /dev/disk/by-partlabel/swap_1 missing
+# mdadm --create /dev/md/root --homehost=any --metadata=1.0 --level=1 --raid-devices=2 /dev/disk/by-partlabel/root_1 missing
+
+# cat << END > /etc/mdadm.conf
+MAILADDR root
+AUTO +all
+DEVICE partitions
+END
+
+# mdadm --detail --scan >> /etc/mdadm.conf
+```
+
+– The _missing_ parameter tells mdadm to create an array with a missing member. You will add the other half of the mirror in step 14.
+– You should configure [sendmail][15] so you will be notified if a drive fails.
+– You can configure [Evolution][16] to [monitor a local mail spool][17].
+
+ 3. **Use** [**dracut**][18] **to update the initramfs** :
+
+```
+# dracut -f --add mdraid --add-drivers xfs
+```
+
+– Dracut will include the /etc/mdadm.conf file you created in the previous section in your initramfs _unless_ you build your initramfs with the _hostonly_ option set to _no_. If you build your initramfs with the hostonly option set to no, then you should either manually include the /etc/mdadm.conf file, manually specify the UUID’s of the RAID arrays to assemble at boot time with the _rd.md.uuid_ kernel parameter, or specify the _rd.auto_ kernel parameter to have all RAID arrays automatically assembled and started at boot time. This guide will demonstrate the _rd.auto_ option since it is the most generic.
+
+ 4. **Format the RAID devices** :
+
+```
+ # mkfs -t vfat /dev/md/boot
+# mkswap /dev/md/swap
+# mkfs -t xfs /dev/md/root
+```
+
+– The new [Boot Loader Specification][19] states “if the OS is installed on a disk with GPT disk label, and no ESP partition exists yet, a new suitably sized (let’s say 500MB) ESP should be created and should be used as $BOOT” and “$BOOT must be a VFAT (16 or 32) file system”.
+
+ 5. **Reboot and set the _rd.auto_ , _rd.break_ and _single_ kernel parameters** :
+
+```
+# reboot
+```
+
+– You may need to [set your root password][20] before rebooting so that you can get into _single-user mode_ in step 7.
+– See “[Making Temporary Changes to a GRUB 2 Menu][21]” for directions on how to set kernel parameters on compters that use the GRUB 2 boot loader.
+
+ 6. **Use** [**the dracut shell**][18] **to copy the root file system** :
+
+```
+ # mkdir /newroot
+# mount /dev/md/root /newroot
+# shopt -s dotglob
+# cp -ax /sysroot/* /newroot
+# rm -rf /newroot/boot/*
+# umount /newroot
+# exit
+```
+
+– The _dotglob_ flag is set for this bash session so that the [wildcard character][22] will match hidden files.
+– Files are removed from the _boot_ directory because they will be copied to a separate partition in the next step.
+– This copy operation is being done from the dracut shell to insure that no processes are accessing the files while they are being copied.
+
+ 7. **Use _single-user mode_ to copy the non-root file systems** :
+
+```
+ # mkdir /newroot
+# mount /dev/md/root /newroot
+# mount /dev/md/boot /newroot/boot
+# shopt -s dotglob
+# cp -Lr /boot/* /newroot/boot
+# test -d /newroot/boot/efi/EFI && mv /newroot/boot/efi/EFI/* /newroot/boot/efi && rmdir /newroot/boot/efi/EFI
+# test -d /sys/firmware/efi/efivars && ln -sfr /newroot/boot/efi/fedora/grub.cfg /newroot/etc/grub2-efi.cfg
+# cp -ax /home/* /newroot/home
+# exit
+```
+
+– It is OK to run these commands in the dracut shell shown in the previous section instead of doing it from single-user mode. I’ve demonstrated using single-user mode to avoid having to explain how to mount the non-root partitions from the dracut shell.
+– The parameters being past to the _cp_ command for the _boot_ directory are a little different because the VFAT file system doesn’t support symbolic links or Unix-style file permissions.
+– In rare cases, the _rd.auto_ parameter is known to cause LVM to fail to assemble due to a [race condition][23]. If you see errors about your _swap_ or _home_ partition failing to mount when entering single-user mode, simply try again by repeating step 5 but omiting the _rd.break_ paramenter so that you will go directly to single-user mode.
+
+ 8. **Update _fstab_ on the new drive** :
+
+```
+ # cat << END > /newroot/etc/fstab
+/dev/md/root / xfs defaults 0 0
+/dev/md/boot /boot vfat defaults 0 0
+/dev/md/swap swap swap defaults 0 0
+END
+```
+
+ 9. **Configure the boot loader on the new drive** :
+
+```
+ # NEW_GRUB_CMDLINE_LINUX=$(cat /etc/default/grub | sed -n 's/^GRUB_CMDLINE_LINUX="\(.*\)"/\1/ p')
+# NEW_GRUB_CMDLINE_LINUX=${NEW_GRUB_CMDLINE_LINUX//rd.lvm.*([^ ])}
+# NEW_GRUB_CMDLINE_LINUX=${NEW_GRUB_CMDLINE_LINUX//resume=*([^ ])}
+# NEW_GRUB_CMDLINE_LINUX+=" selinux=0 rd.auto"
+# sed -i "/^GRUB_CMDLINE_LINUX=/s/=.*/=\"$NEW_GRUB_CMDLINE_LINUX\"/" /newroot/etc/default/grub
+```
+
+– You can re-enable selinux after this procedure is complete. But you will have to [relabel your file system][24] first.
+
+ 10. **Install the boot loader on the new drive** :
+
+```
+ # sed -i '/^GRUB_DISABLE_OS_PROBER=.*/d' /newroot/etc/default/grub
+# echo "GRUB_DISABLE_OS_PROBER=true" >> /newroot/etc/default/grub
+# MY_DISK_1=$(mdadm --detail /dev/md/boot | grep active | grep -m 1 -o "/dev/sd.")
+# for i in dev dev/pts proc sys run; do mount -o bind /$i /newroot/$i; done
+# chroot /newroot env MY_DISK_1=$MY_DISK_1 bash --login
+# test -d /sys/firmware/efi/efivars || MY_GRUB_DIR=/boot/grub2
+# test -d /sys/firmware/efi/efivars && MY_GRUB_DIR=$(find /boot/efi -type d -name 'fedora' -print -quit)
+# test -e /usr/sbin/grub2-switch-to-blscfg && grub2-switch-to-blscfg --grub-directory=$MY_GRUB_DIR
+# grub2-mkconfig -o $MY_GRUB_DIR/grub.cfg \;
+# test -d /sys/firmware/efi/efivars && test /boot/grub2/grubenv -nt $MY_GRUB_DIR/grubenv && cp /boot/grub2/grubenv $MY_GRUB_DIR/grubenv
+# test -d /sys/firmware/efi/efivars || grub2-install "$MY_DISK_1"
+# logout
+# for i in run sys proc dev/pts dev; do umount /newroot/$i; done
+# test -d /sys/firmware/efi/efivars && efibootmgr -c -d "$MY_DISK_1" -p 1 -l "$(find /newroot/boot -name shimx64.efi -printf '/%P\n' -quit | sed 's!/!\\!g')" -L "Fedora RAID Disk 1"
+```
+
+– The _grub2-switch-to-blscfg_ command is optional. It is only supported on Fedora 29+.
+– The _cp_ command above should not be necessary, but there appears to be a bug in the current version of grub which causes it to write to $BOOT/grub2/grubenv instead of $BOOT/efi/fedora/grubenv on UEFI systems.
+– You can use the following command to verify the contents of the _grub.cfg_ file right after running the _grub2-mkconfig_ command above:
+
+```
+# sed -n '/BEGIN .*10_linux/,/END .*10_linux/ p' $MY_GRUB_DIR/grub.cfg
+```
+
+– You should see references to _mdraid_ and _mduuid_ in the output from the above command if the RAID array was detected properly.
+
+ 11. **Boot off of the new drive** :
+
+```
+# reboot
+```
+
+– How to select the new drive is system-dependent. It usually requires pressing one of the **F12** , **F10** , **Esc** or **Del** keys when you hear the [System OK BIOS beep code][25].
+– On UEFI systems the boot loader on the new drive should be labeled “Fedora RAID Disk 1”.
+
+ 12. **Remove all the volume groups and partitions from your old drive** :
+
+```
+ # MY_DISK_2=/dev/sda
+# MY_VOLUMES=$(pvs | grep $MY_DISK_2 | awk '{print $2}' | tr "\n" " ")
+# test -n "$MY_VOLUMES" && vgremove $MY_VOLUMES
+# sgdisk --zap-all $MY_DISK_2
+```
+
+– **WARNING** : You want to make certain that everything is working properly on your new drive before you do this. A good way to verify that your old drive is no longer being used is to try booting your computer once without the old drive connected.
+– You can add another new drive to your computer instead of erasing your old one if you prefer.
+
+ 13. **Create new partitions on your old drive to match the ones on your new drive** :
+
+```
+ # test -d /sys/firmware/efi/efivars || sgdisk -n 0:0:+1MiB -t 0:ef02 -c 0:grub_2 $MY_DISK_2
+# sgdisk -n 0:0:+1GiB -t 0:ea00 -c 0:boot_2 $MY_DISK_2
+# sgdisk -n 0:0:+4GiB -t 0:fd00 -c 0:swap_2 $MY_DISK_2
+# sgdisk -n 0:0:0 -t 0:fd00 -c 0:root_2 $MY_DISK_2
+```
+
+– It is important that the partitions match in size and type. I prefer to use the _parted_ command to display the partition table because it supports setting the display unit:
+
+```
+ # parted /dev/sda unit MiB print
+# parted /dev/sdb unit MiB print
+```
+
+ 14. **Use mdadm to add the new partitions to the RAID devices** :
+
+```
+ # mdadm --manage /dev/md/boot --add /dev/disk/by-partlabel/boot_2
+# mdadm --manage /dev/md/swap --add /dev/disk/by-partlabel/swap_2
+# mdadm --manage /dev/md/root --add /dev/disk/by-partlabel/root_2
+```
+
+ 15. **Install the boot loader on your old drive** :
+
+```
+ # test -d /sys/firmware/efi/efivars || grub2-install "$MY_DISK_2"
+# test -d /sys/firmware/efi/efivars && efibootmgr -c -d "$MY_DISK_2" -p 1 -l "$(find /boot -name shimx64.efi -printf "/%P\n" -quit | sed 's!/!\\!g')" -L "Fedora RAID Disk 2"
+```
+
+ 16. **Use mdadm to test that email notifications are working** :
+
+```
+# mdadm --monitor --scan --oneshot --test
+```
+
+
+
+
+As soon as your drives have finished synchronizing, you should be able to select either drive when restarting your computer and you will receive the same live-mirrored operating system. If either drive fails, mdmonitor will send an email notification. Recovering from a drive failure is now simply a matter of swapping out the bad drive with a new one and running a few _sgdisk_ and _mdadm_ commands to re-create the mirrors (steps 13 through 15). You will no longer have to worry about losing any data if a drive fails!
+
+### Video Demonstrations
+
+Converting a UEFI PC to RAID1
+
+Converting a BIOS PC to RAID1
+
+ * TIP: Set the the quality to 720p on the above videos for best viewing.
+
+
+
+--------------------------------------------------------------------------------
+
+via: https://fedoramagazine.org/mirror-your-system-drive-using-software-raid/
+
+作者:[Gregory Bartholomew][a]
+选题:[lujun9972][b]
+译者:[译者ID](https://github.com/译者ID)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]: https://fedoramagazine.org/author/glb/
+[b]: https://github.com/lujun9972
+[1]: https://fedoramagazine.org/wp-content/uploads/2019/05/raid_mirroring-816x345.jpg
+[2]: https://en.wikipedia.org/wiki/Disk_mirroring
+[3]: https://en.wikipedia.org/wiki/Disk_mirroring#Additional_benefits
+[4]: https://en.wikipedia.org/wiki/Bottleneck_(software)
+[5]: https://en.wikipedia.org/wiki/Data_corruption
+[6]: https://en.wikipedia.org/wiki/Data_degradation
+[7]: https://en.wikipedia.org/wiki/Journaling_file_system
+[8]: https://www.quora.com/What-is-the-difference-between-a-journaling-vs-a-log-structured-file-system
+[9]: https://en.wikipedia.org/wiki/File_verification
+[10]: https://en.wikipedia.org/wiki/ZFS#Summary_of_key_differentiating_features
+[11]: https://en.wikipedia.org/wiki/Snapshot_(computer_storage)#File_systems
+[12]: https://en.wikipedia.org/wiki/Business_continuance_volume
+[13]: https://fedoramagazine.org/managing-partitions-with-sgdisk/
+[14]: https://fedoramagazine.org/managing-raid-arrays-with-mdadm/
+[15]: https://fedoraproject.org/wiki/QA:Testcase_Sendmail
+[16]: https://en.wikipedia.org/wiki/Evolution_(software)
+[17]: https://dotancohen.com/howto/root_email.html
+[18]: https://fedoramagazine.org/initramfs-dracut-and-the-dracut-emergency-shell/
+[19]: https://systemd.io/BOOT_LOADER_SPECIFICATION#technical-details
+[20]: https://docs.fedoraproject.org/en-US/Fedora/26/html/System_Administrators_Guide/sec-Changing_and_Resetting_the_Root_Password.html
+[21]: https://docs.fedoraproject.org/en-US/fedora/rawhide/system-administrators-guide/kernel-module-driver-configuration/Working_with_the_GRUB_2_Boot_Loader/#sec-Making_Temporary_Changes_to_a_GRUB_2_Menu
+[22]: https://en.wikipedia.org/wiki/Wildcard_character#File_and_directory_patterns
+[23]: https://en.wikipedia.org/wiki/Race_condition
+[24]: https://wiki.centos.org/HowTos/SELinux#head-867ca18a09f3103705cdb04b7d2581b69cd74c55
+[25]: https://en.wikipedia.org/wiki/Power-on_self-test#Original_IBM_POST_beep_codes
diff --git a/sources/tech/20190503 SuiteCRM- An Open Source CRM Takes Aim At Salesforce.md b/sources/tech/20190503 SuiteCRM- An Open Source CRM Takes Aim At Salesforce.md
new file mode 100644
index 0000000000..63802d4976
--- /dev/null
+++ b/sources/tech/20190503 SuiteCRM- An Open Source CRM Takes Aim At Salesforce.md
@@ -0,0 +1,105 @@
+[#]: collector: (lujun9972)
+[#]: translator: ( )
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (SuiteCRM: An Open Source CRM Takes Aim At Salesforce)
+[#]: via: (https://itsfoss.com/suitecrm-ondemand/)
+[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
+
+SuiteCRM: An Open Source CRM Takes Aim At Salesforce
+======
+
+SuiteCRM is one of the most popular open source CRM (Customer Relationship Management) software available. With its unique-priced managed CRM hosting service, SuiteCRM is aiming to challenge enterprise CRMs like Salesforce.
+
+### SuiteCRM: An Open Source CRM Software
+
+CRM stands for Customer Relationship Management. It is used by businesses to manage the interaction with customers, keep track of services, supplies and other things that help the business manage their customers.
+
+![][1]
+
+[SuiteCRM][2] came into existence after the hugely popular [SugarCRM][3] decided to stop developing its open source version. The open source version of SugarCRM was then forked into SuiteCRM by UK-based [SalesAgility][4] team.
+
+In just a couple of years, SuiteCRM became immensely popular and started to be considered the best open source CRM software out there. You can gauge its popularity from the fact that it’s nearing a million download and it has over 100,000 community members. There are around 4 million SuiteCRM users worldwide (a CRM software usually has more than one user) and it is available in several languages. It’s even used by National Health Service ([NHS][5]) in UK.
+
+Since SuiteCRM is a free and open source software, you are free to download it and deploy it on your cloud server such as [UpCloud][6] (we at It’s FOSS use it), [DigitalOcean][7], [AWS][8] or any Linux server of our own.
+
+But configuring the software, deploying it and managing it a tiresome job and requires certain skill level or a the services of a sysadmin. This is why business oriented open source software provide a hosted version of their software.
+
+This enables you to enjoy the open source software without the additional headache and the team behind the software has a way to generate revenue and continue the development of their software.
+
+### Suite:OnDemand – Cost effective managed hosting of SuiteCRM
+
+So, recently, [SalesAgility][4] – the creators/maintainers of SuiteCRM, decided to challenge [Salesforce][9] and other enterprise CRMs by introducing [Suite:OnDemand][10] , a hosted version of SuiteCRM.
+
+[][11]
+
+Suggested read Papyrus: An Open Source Note Manager
+
+Normally, you will observe pricing plans on the basis of number of users. But, with SuiteCRM’s OnDemand cloud hosting plans, they are trying to give businesses an affordable solution on a “per-server” basis instead of paying for every user you add.
+
+In other words, they want you to pay extra only for advanced features, not for more users.
+
+Here’s what SalesAgility mentioned in their [press release][12]:
+
+> Unlike Salesforce and other enterprise CRM vendors, the practice of pricing per user has been abandoned in favour of per-server hosting packages all of which will support unlimited users. In addition, there’s no increase in cost for access to advanced features. With Suite:OnDemand every feature and benefit is available with each hosting package.
+
+Of course, unlimited users does not mean that you will have to abuse the term. So, there’s a recommended number of users for every hosting plan you opt for.
+
+![Suitecrm Hosting][13]
+
+The CEO of SalesAgility also had to describe their goals for this step:
+
+“ _We want SuiteCRM to be available to all businesses and to all users within a business,_ ”said **Dale Murray CEO** of **SalesAgility**.
+
+In addition to that, they also mentioned that they want to revolutionize the way enterprise-class CRM is being currently offered in order to make it more accessible to businesses and organizations:
+
+> “Many organisations do not have the experience to run and support our product on-premise or it is not part of their technology strategy to do so. With Suite:OnDemand we are providing our customers with a quick and easy solution to access all the features of SuiteCRM without a per user cost. We’re also saying to Salesforce that enterprise-class CRM can be delivered, enhanced, maintained and supported without charging mouth-wateringly expensive monthly fees. Our aim is to transform the CRM market to enable users to make CRM pervasive within their organisations.”
+>
+> Dale Murray, CEO of SalesAgility
+
+### Why is this a big deal?
+
+This is a huge relief for small business owners and startups because other CRMs like Saleforce and SugarCRM charge $30-$40 per month per user. If you have 10 members in your team, this will increase the cost to $300-$400 per month.
+
+[][14]
+
+Suggested read Winds Beautifully Combines Feed Reader and Podcast Player in One Single App
+
+This is also a good news for the open source community that we will have an affordable alternative to Salesforce.
+
+In addition to this, SuiteCRM is fully open source meaning there are no license fees or vendor lock-in – as they mention. You are always free to use it on your own.
+
+It is interesting to see different strategies and solutions being applied for an open source CRM software to take an aim at Salesforce directly.
+
+What do you think? Let us know your thoughts in the comments below.
+
+_With inputs from Abhishek Prakash._
+
+--------------------------------------------------------------------------------
+
+via: https://itsfoss.com/suitecrm-ondemand/
+
+作者:[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/wp-content/uploads/2019/05/suite-crm-800x450.png
+[2]: https://suitecrm.com/
+[3]: https://www.sugarcrm.com/
+[4]: https://salesagility.com/
+[5]: https://www.nhs.uk/
+[6]: https://www.upcloud.com/register/?promo=itsfoss
+[7]: https://m.do.co/c/d58840562553
+[8]: https://aws.amazon.com/
+[9]: https://www.salesforce.com
+[10]: https://suitecrm.com/suiteondemand/
+[11]: https://itsfoss.com/papyrus-open-source-note-manager/
+[12]: https://suitecrm.com/sod-pr/
+[13]: https://itsfoss.com/wp-content/uploads/2019/05/suitecrm-hosting-800x457.jpg
+[14]: https://itsfoss.com/winds-podcast-feedreader/
diff --git a/sources/tech/20190503 Tutanota Launches New Encrypted Tool to Support Press Freedom.md b/sources/tech/20190503 Tutanota Launches New Encrypted Tool to Support Press Freedom.md
new file mode 100644
index 0000000000..692b4ecba8
--- /dev/null
+++ b/sources/tech/20190503 Tutanota Launches New Encrypted Tool to Support Press Freedom.md
@@ -0,0 +1,85 @@
+[#]: collector: (lujun9972)
+[#]: translator: ( )
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (Tutanota Launches New Encrypted Tool to Support Press Freedom)
+[#]: via: (https://itsfoss.com/tutanota-secure-connect/)
+[#]: author: (John Paul https://itsfoss.com/author/john/)
+
+Tutanota Launches New Encrypted Tool to Support Press Freedom
+======
+
+A secure email provider has announced the release of a new product designed to help whistleblowers get their information to the media. The tool is free for journalists.
+
+### Tutanota helps you protect your privacy
+
+![][1]
+
+[Tutanota][2] is a German-based company that provides “world’s most secure email service, easy to use and private by design.” They offer end-to-end encryption for their [secure email service][3]. Recently Tutanota announced a [desktop app for their email service][4].
+
+They also make use of two-factor authentication and [open source the code][5] that they use.
+
+While you can get an account for free, you don’t have to worry about your information being sold or seeing ads. Tutanota makes money by charging for extra features and storage. They also offer solutions for non-profit organizations.
+
+Tutanota has launched a new service to further help journalists, social activists and whistleblowers in communicating securely.
+
+[][6]
+
+Suggested read Purism's New Offering is a Dream Come True for Privacy Concerned People
+
+### Secure Connect: An encrypted form for websites
+
+![][7]
+
+Tutanota has released a new piece of software named Secure Connect. Secure Connect is “an open source encrypted contact form for news sites”. The goal of the project is to create a way so that “whistleblowers can get in touch with journalists securely”. Tutanota picked the right day because May 3rd is the [Day of Press Freedom][8].
+
+According to Tutanota, Secure Connect is designed to be easily added to websites, but can also work on any blog to ensure access by smaller news agencies. A whistleblower would access Secure Connect app on a news site, preferably using Tor, and type in any information that they want to bring to light. The whistleblower would also be able to upload files. Once they submit the information, Secure Connect will assign a random address and password, “which lets the whistleblower re-access his sent message at a later stage and check for replies from the news site.”
+
+![Secure Connect Encrypted Contact Form][9]
+
+While Tutanota will be offering Secure Connect to journalists for free, they know that someone will have to foot the bill. They plan to pay for further development of the project by selling it to businesses, such as “lawyers, financial institutions, medical institutions, educational institutions, and the authorities”. Non-journalists would have to pay €24 per month.
+
+You can see a demo of Secure Connect, by clicking [here][10]. If you are a journalist interested in adding Secure Connect to your website or blog, you can contact them at [[email protected]][11] Be sure to include a link to your website.
+
+[][12]
+
+Suggested read 8 Privacy Oriented Alternative Search Engines To Google in 2019
+
+### Final Thoughts on Secure Connect
+
+I have read repeatedly about whistleblowers whose identities were accidentally exposed, either by themselves or others. Tutanota’s project looks like it would remove that possibility by making it impossible for others to discover their identity. It also gives both parties an easy way to exchange information without having to worry about encryption or PGP keys.
+
+I understand that it’s not the same as [Firefox Send][13], another encrypted file sharing program from Mozilla. The only question I have is whose servers will the whistleblowers’ information be sitting on?
+
+Do you think that Tutanota’s Secure Connect will be a boon for whistleblowers and activists? 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][14].
+
+--------------------------------------------------------------------------------
+
+via: https://itsfoss.com/tutanota-secure-connect/
+
+作者:[John Paul][a]
+选题:[lujun9972][b]
+译者:[译者ID](https://github.com/译者ID)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]: https://itsfoss.com/author/john/
+[b]: https://github.com/lujun9972
+[1]: https://itsfoss.com/wp-content/uploads/2018/02/tutanota-featured-800x450.png
+[2]: https://tutanota.com/
+[3]: https://itsfoss.com/tutanota-review/
+[4]: https://itsfoss.com/tutanota-desktop/
+[5]: https://tutanota.com/blog/posts/open-source-email
+[6]: https://itsfoss.com/librem-one/
+[7]: https://itsfoss.com/wp-content/uploads/2019/05/secure-communication.jpg
+[8]: https://en.wikipedia.org/wiki/World_Press_Freedom_Day
+[9]: https://itsfoss.com/wp-content/uploads/2019/05/secure-connect-encrypted-contact-form.png
+[10]: https://secureconnect.tutao.de/contactform/demo
+[11]: /cdn-cgi/l/email-protection
+[12]: https://itsfoss.com/privacy-search-engines/
+[13]: https://itsfoss.com/firefox-send/
+[14]: http://reddit.com/r/linuxusersgroup
diff --git a/sources/tech/20190504 May the fourth be with you- How Star Wars (and Star Trek) inspired real life tech.md b/sources/tech/20190504 May the fourth be with you- How Star Wars (and Star Trek) inspired real life tech.md
new file mode 100644
index 0000000000..a05f9a6b4f
--- /dev/null
+++ b/sources/tech/20190504 May the fourth be with you- How Star Wars (and Star Trek) inspired real life tech.md
@@ -0,0 +1,93 @@
+[#]: collector: (lujun9972)
+[#]: translator: ( )
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (May the fourth be with you: How Star Wars (and Star Trek) inspired real life tech)
+[#]: via: (https://opensource.com/article/19/5/may-the-fourth-star-wars-trek)
+[#]: author: (Jeff Macharyas https://opensource.com/users/jeffmacharyas)
+
+May the fourth be with you: How Star Wars (and Star Trek) inspired real life tech
+======
+The technologies may have been fictional, but these two acclaimed sci-fi
+series have inspired open source tech.
+![Triangulum galaxy, NASA][1]
+
+Conventional wisdom says you can either be a fan of _Star Trek_ or of _Star Wars_ , but mixing the two is like mixing matter and anti-matter. I'm not sure that's true, but even if the laws of physics cannot be changed, these two acclaimed sci-fi series have influenced the open source universe and created their own open source multi-verses.
+
+For example, fans have used the original _Star Trek_ as "source code" to create fan-made films, cartoons, and games. One of the more notable fan creations was the web series _Star Trek Continues_ , which faithfully adapted Gene Roddenberry's universe and redistributed it to the world.
+
+"Eventually we realized that there is no more profound way in which people could express what _Star Trek_ has meant to them than by creating their own very personal _Star Trek_ things," [Roddenberry said][2]. However, due to copyright restrictions, this "open source" channel [has since been curtailed][3].
+
+_Star Wars_ has a different approach to open sourcing its universe. [Jess Paguaga writes][4] on FanSided: "With a variety [of] fan film awards dating back to 2002, the _Star Wars_ brand has always supported and encouraged the creation of short films that help expand the universe of a galaxy far, far away."
+
+But, _Star Wars_ is not without its own copyright prime directives. In one case, a Darth Vader film by a YouTuber called Star Wars Theory has drawn a copyright claim from Disney. The claim does not stop production of the film, but diverts monetary gains from it, [reports James Richards][5] on FanSided.
+
+This could be one of the [Ferengi Rules of Acquisition][6], perhaps.
+
+But if you can't watch your favorite fan film, you can still get your [_Star Wars_ fix right in the Linux terminal][7] by entering:
+
+
+```
+`telnet towel.blinkenlights.nl`
+```
+
+And _Star Trek_ fans can also interact with the Federation with the original text-based video game from 1971. While a high-school senior, Mike Mayfield ported the game from punch cards to HP BASIC. If you'd like to go old school and battle Klingons, the source code is available at the [Code Project][8].
+
+### Real-life star tech
+
+Both _Star Wars_ and _Star Trek_ have inspired real-life technologies. Although those technologies were fictional, many have become the practical, open technology we use today. Some of them inspired technologies that are still in development now.
+
+In the early 1970s, Motorola engineer Martin Cooper was trying to beat AT&T at the car-phone game. He says he was watching Captain Kirk use a "communicator" on an episode of _Star Trek_ and had a eureka moment. His team went on to create the first portable cellular 800MHz phone prototype in 90 days.
+
+In _Star Wars_ , scout stormtroopers of the Galactic Empire rode the Aratech 74-Z Speeder Bike, and a real-life counterpart is the [Aero-X][9] being developed by California's Aerofex.
+
+Perhaps the most visible _Star Wars_ tech to enter our lives is droids. We first encountered R2-D2 back in the 1970s, but now we have droids vacuuming our carpets and mowing our lawns, from Roombas to the [Worx Landroid][10] lawnmower.
+
+And, in _Star Wars_ , Princess Leia appeared to Obi-Wan Kenobi as a hologram, and in Star Trek: Voyager, the ship's chief medical officer was an interactive hologram that could diagnose and treat patients. The technology to bring characters like these to "life" is still a ways off, but there are some interesting open source developments that hint of things to come. [OpenHolo][11], "an open source library containing algorithms and software implementations for holograms in various fields," is one such project.
+
+### Where's the beef?
+
+> "She handled… real meat… touched it, and cut it?" —Keiko O'Brien, Star Trek: The Next Generation
+
+In the _Star Trek_ universe, crew members get their meals by simply ordering a replicator to produce whatever food they desire. That could one day become a reality thanks to a concept created by two German students for an open source "meat-printer" they call the [Cultivator][12]. It would use bio-printing to produce something that appears to be meat; the user could even select its mineral and fat content. Perhaps with more collaboration and development, the Cultivator could become the replicator in tomorrow's kitchen!
+
+### The 501st
+
+Cosplayers, people from all walks of life who dress as their favorite characters, are the "open source embodiment" of their favorite universes. The [501st][13] [Legion][13] is an all-volunteer _Star Wars_ fan organization "formed for the express purpose of bringing together costume enthusiasts under a collective identity within which to operate," according to its charter.
+
+Jon Stallard, a member of Garrison Tyranus, the Central Virginia chapter of the 501st Legion says, "Everybody wanted to be something else when they were a kid, right? Whether it was Neil Armstrong, Batman, or the Six Million Dollar Man. Every backyard playdate was some kind of make-believe. The 501st lets us participate in our fan communities while contributing to the community at large."
+
+Are cosplayers really "open source characters"? Well, that depends. The copyright laws around cosplay and using unique props, costumes, and more are very complex, [writes Meredith Filak Rose][14] for _Public Knowledge_. "We're lucky to be living in a time where fandom generally enjoys a positive relationship with the creators whose work it admires," Rose concludes.
+
+So, it is safe to say that stormtroopers, Ferengi, Vulcans, and Yoda are all here to stay for a long, long time, near, and far, far away.
+
+Live long and prosper, you shall.
+
+--------------------------------------------------------------------------------
+
+via: https://opensource.com/article/19/5/may-the-fourth-star-wars-trek
+
+作者:[Jeff Macharyas ][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/jeffmacharyas
+[b]: https://github.com/lujun9972
+[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/triangulum_galaxy_nasa_stars.jpg?itok=NdS19A7m
+[2]: https://fanlore.org/wiki/Gene_Roddenberry#His_Views_Regarding_Fanworks
+[3]: https://trekmovie.com/2016/06/23/cbs-and-paramount-release-fan-film-guidelines/
+[4]: https://dorksideoftheforce.com/2019/01/17/star-wars-fan-films/
+[5]: https://dorksideoftheforce.com/2019/01/16/disney-claims-copyright-star-wars-theory/
+[6]: https://en.wikipedia.org/wiki/Rules_of_Acquisition
+[7]: https://itsfoss.com/star-wars-linux/
+[8]: https://www.codeproject.com/Articles/28228/Star-Trek-1971-Text-Game
+[9]: https://www.livescience.com/58943-real-life-star-wars-technology.html
+[10]: https://www.digitaltrends.com/cool-tech/best-robot-lawnmowers/
+[11]: http://openholo.org/
+[12]: https://www.pastemagazine.com/articles/2016/05/the-future-is-vegan-according-to-star-trek.html
+[13]: https://www.501st.com/
+[14]: https://www.publicknowledge.org/news-blog/blogs/copyright-and-cosplay-working-with-an-awkward-fit
diff --git a/sources/tech/20190505 -Review- Void Linux, a Linux BSD Hybrid.md b/sources/tech/20190505 -Review- Void Linux, a Linux BSD Hybrid.md
new file mode 100644
index 0000000000..cc8a660252
--- /dev/null
+++ b/sources/tech/20190505 -Review- Void Linux, a Linux BSD Hybrid.md
@@ -0,0 +1,136 @@
+[#]: collector: (lujun9972)
+[#]: translator: ( )
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: ([Review] Void Linux, a Linux BSD Hybrid)
+[#]: via: (https://itsfoss.com/void-linux/)
+[#]: author: (John Paul https://itsfoss.com/author/john/)
+
+[Review] Void Linux, a Linux BSD Hybrid
+======
+
+There are distros that follow the crowd and there are others that try to make their own path through the tall weed. Today, we’ll be looking at a small distro that looks to challenge how a distro should work. We’ll be looking at Void Linux.
+
+### What is Void Linux?
+
+[Void Linux][1] is a “general purpose operating system, based on the monolithic Linux kernel. Its package system allows you to quickly install, update and remove software; software is provided in binary packages or can be built directly from sources with the help of the XBPS source packages collection.”
+
+![Void Linux Neofetch][2]
+
+Like Solus, Void Linux is written from scratch and does not depend on any other operating system. It is a rolling release. Unlike the majority of Linux distros, Void does not use [systemd][3]. Instead, it uses [runit][4]. Another thing that separates Void from the rest of Linux distros is the fact that they use LibreSSL instead of OpenSSL. Void also offers support for the [musl C library][5]. In fact, when you download a .iso file, you can choose between `glibc` and `musl`.
+
+The homegrown package manager that Void uses is named X Binary Package System (or xbps). According to the [Void wiki][6], xbps has the following features:
+
+ * Supports multiple local and remote repositories (HTTP/HTTPS/FTP).
+ * RSA signed remote repositories
+ * SHA256 hashes for package metadata, files, and binary packages
+ * Supports package states (ala dpkg) to mitigate broken package * installs/updates
+ * Ability to resume partial package install/updates
+ * Ability to unpack only files that have been modified in * package updates
+ * Ability to use virtual packages
+ * Ability to check for incompatible shared libraries in reverse dependencies
+ * Ability to replace packages
+ * Ability to put packages on hold (to never update them)
+ * Ability to preserve/update configuration files
+ * Ability to force reinstallation of any installed package
+ * Ability to downgrade any installed package
+ * Ability to execute pre/post install/remove/update scriptlets
+ * Ability to check package integrity: missing files, hashes, missing or unresolved (reverse)dependencies, dangling or modified symlinks, etc.
+
+
+
+#### System Requirements
+
+According to the [Void Linux download page][7], the system requirements differ based on the architecture you choose. 64-bit images require “EM64T CPU, 96MB RAM, 350MB disk, Ethernet/WiFi for network installation”. 32-bit images require “Pentium 4 CPU (SSE2), 96MB RAM, 350MB disk, Ethernet / WiFi for network installation”. The [Void Linux handbook][8] recommends 700 MB for storage and also notes that “Flavor installations require more resources. How much more depends on the flavor.”
+
+Void also supports ARM devices. You can download [ready to boot images][9] for Raspberry Pi and several other [Raspberry Pi alternatives][10].
+
+[][11]
+
+Suggested read NomadBSD, a BSD for the Road
+
+### Void Linux Installation
+
+NOTE: you can either install [Void Linux download page][7] via a live image or use a net installer. I used a live image.
+
+I was able to successfully install Void Linux on my Dell Latitude D630. This laptop has an Intel Centrino Duo Core processor running at 2.00 GHz, NVIDIA Quadro NVS 135M graphics chip, and 4 GB of RAM.
+
+![Void Linux Mate][12]
+
+After I `dd`ed the 800 MB Void Linux MATE image to my thumb drive and inserted it, I booted my computer. I was very quickly presented with a vanilla MATE desktop. To start installing Void, I opened up a terminal and typed `sudo void-installer`. After using the default password `voidlinux`, the installer started. The installer reminded me a little bit of the terminal Debian installer, but it was laid out more like FreeBSD. It was divided into keyboard, network, source, hostname, locale, timezone, root password, user account, bootloader, partition, and filesystems sections.
+
+Most of the sections where self-explanatory. In the source section, you could choose whether to install the packages from the local image or grab them from the web. I chose local because I did not want to eat up bandwidth or take longer than I had to. The partition and filesystems sections are usually handled automatically by most installers, but not on Void. In this case, the first section allows you to use `cfdisk` to create partitions and the second allows to specify what filesystems will be used in those partitions. I followed the partition layout on [this page][13].
+
+If you install Void Linux from the local image, you definitely need to update your system. The [Void wiki][14] recommends running `xbps-install -Suv` until there are no more updates to install. It would probably be a good idea to reboot between batches of updates.
+
+### Experience with Void Linux
+
+So far in my Linux journey, Void Linux has been by far the most difficult. It feels more like I’m [using a BSD than a Linux distro][15]. (I guess that should not be surprising since Void was created by a former [NetBSD][16] developer who wanted to experiment with his own package manager.) The steps in the command line installer are closer to that of [FreeBSD][17] than Debian.
+
+Once Void was installed and updated, I went to work installing apps. Unfortunately, I ran into an issue with missing applications. Most of these applications come preinstalled on other distros. I had to install wget, unzip, git, nano, LibreOffice to name just a few.
+
+Void does not come with a graphical package manager. There are three unofficial frontends for the xbps package manager and [one is based on qt][18]. I ran into issues getting one of the Bash-based tools to work. It hadn’t been updated in 4-5 years.
+
+![Octoxbps][19]
+
+The xbps package manager is kinda interesting. It downloads the package and its signature to verify it. You can see the [terminal print out][20] from when I installed Mcomix. Xbps does not use the normal naming convention used in most package managers (ie `apt install` or `pacman -R`), instead, it uses `xbps-install`, `xbps-query`, `xbps-remove`. Luckily, the Void wiki had a [page][21] to show what xbps command relates to apt or dnf commands.
+
+[][22]
+
+Suggested read How To Solve: error: no such partition grub rescue in Ubuntu Linux
+
+The main repo for Void is located in Germany, so I decided to switch to a more local server to ease the burden on that server and to download packages quicker. Switching to a local mirror took a couple of tries because the documentation was not very clear. Documentation for Void is located in two different places: the [wiki][23] and the [handbook][24]. For me, the wiki’s [explanation][25] was confusing and I ran into issues. So, I searched for an answer on DuckDuckGo. From there I stumbled upon the [handbook’s instructions][26], which were much clearer. (The handbook is not linked on the Void Linux website and I had to stumble across it via search.)
+
+One of the nice things about Void is the speed of the system once everything was installed. It had the quickest boot time I have ever encountered. Overall, the system was very responsive. I did not run into any system crashes.
+
+### Final Thoughts
+
+Void Linux took more work to get to a useable state than any other distro I have tried. Even the BSDs I tried felt more polished than Void. I think the tagline “General purpose Linux” is misleading. It should be “Linux with hackers and tinkerers in mind”. Personally, I prefer using distros that are ready for me to use after installing. While it is an interesting combination of Linux and BSD ideas, I don’t think I’ll add Void to my short list of go-to distros.
+
+If you like tinkering with your Linux system or like building it from scratch, give [Void Linux][7] a try.
+
+Have you ever used Void Linux? What is your favorite Debian-based distro? 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][27].
+
+--------------------------------------------------------------------------------
+
+via: https://itsfoss.com/void-linux/
+
+作者:[John Paul][a]
+选题:[lujun9972][b]
+译者:[译者ID](https://github.com/译者ID)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]: https://itsfoss.com/author/john/
+[b]: https://github.com/lujun9972
+[1]: https://voidlinux.org/
+[2]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/04/Void-Linux-Neofetch.png?resize=800%2C562&ssl=1
+[3]: https://en.wikipedia.org/wiki/Systemd
+[4]: http://smarden.org/runit/
+[5]: https://www.musl-libc.org/
+[6]: https://wiki.voidlinux.org/XBPS
+[7]: https://voidlinux.org/download/
+[8]: https://docs.voidlinux.org/installation/base-requirements.html
+[9]: https://voidlinux.org/download/#download-ready-to-boot-images-for-arm
+[10]: https://itsfoss.com/raspberry-pi-alternatives/
+[11]: https://itsfoss.com/nomadbsd/
+[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/04/Void-Linux-Mate.png?resize=800%2C640&ssl=1
+[13]: https://wiki.voidlinux.org/Disks#Filesystems
+[14]: https://wiki.voidlinux.org/Post_Installation#Updates
+[15]: https://itsfoss.com/why-use-bsd/
+[16]: https://itsfoss.com/netbsd-8-release/
+[17]: https://www.freebsd.org/
+[18]: https://github.com/aarnt/octoxbps
+[19]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/04/OctoXBPS.jpg?resize=800%2C534&ssl=1
+[20]: https://pastebin.com/g31n1bFT
+[21]: https://wiki.voidlinux.org/Rosetta_stone
+[22]: https://itsfoss.com/solve-error-partition-grub-rescue-ubuntu-linux/
+[23]: https://wiki.voidlinux.org/
+[24]: https://docs.voidlinux.org/
+[25]: https://wiki.voidlinux.org/XBPS#Official_Repositories
+[26]: https://docs.voidlinux.org/xbps/repositories/mirrors/changing.html
+[27]: http://reddit.com/r/linuxusersgroup
diff --git a/sources/tech/20190505 Blockchain 2.0 - An Introduction To Hyperledger Project (HLP) -Part 8.md b/sources/tech/20190505 Blockchain 2.0 - An Introduction To Hyperledger Project (HLP) -Part 8.md
new file mode 100644
index 0000000000..bb1d187ea4
--- /dev/null
+++ b/sources/tech/20190505 Blockchain 2.0 - An Introduction To Hyperledger Project (HLP) -Part 8.md
@@ -0,0 +1,88 @@
+[#]: collector: (lujun9972)
+[#]: translator: ( )
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (Blockchain 2.0 – An Introduction To Hyperledger Project (HLP) [Part 8])
+[#]: via: (https://www.ostechnix.com/blockchain-2-0-an-introduction-to-hyperledger-project-hlp/)
+[#]: author: (editor https://www.ostechnix.com/author/editor/)
+
+Blockchain 2.0 – An Introduction To Hyperledger Project (HLP) [Part 8]
+======
+
+![Introduction To Hyperledger Project][1]
+
+Once a new technology platform reaches a threshold level of popularity in terms of active development and commercial interests, major global companies and smaller start-ups alike rush to catch a slice of the pie. **Linux** was one such platform back in the day. Once the ubiquity of its applications was realized individuals, firms, and institutions started displaying their interest in it and by 2000 the **Linux foundation** was formed.
+
+The Linux foundation aims to standardize and develop Linux as a platform by sponsoring their development team. The Linux Foundation is a non-profit organization that is supported by software and IT behemoths such as Microsoft, Oracle, Samsung, Cisco, IBM, Intel among others[1]. This is excluding the hundreds of individual developers who offer their services for the betterment of the platform. Over the years the Linux foundation has taken many projects under its roof. The **Hyperledger Project** is their fastest growing one till date.
+
+Such consortium led development have a lot of advantages when it comes to furthering tech into usable useful forms. Developing the standards, libraries and all the back-end protocols for large scale projects are expensive and resource intensive without a shred of income generating from it. Hence, it makes sense for companies to pool in their resources to develop the common “boring” parts by supporting such organizations and later upon completing work on these standard parts to simply plug & play and customize their products afterwards. Apart from the economics of the model, such collaborative efforts also yield standards allowing for easier use and integration into aspiring products and services.
+
+Other major innovations that were once or are currently being developed following the said consortium model include standards for WiFi (The Wi-Fi alliance), Mobile Telephony etc.
+
+### Introduction to Hyperledger Project (HLP)
+
+The Hyperledger project was launched in December 2015 by the Linux foundation as is currently among the fastest growing project they’ve incubated. It’s an umbrella organization for collaborative efforts into developing and advancing tools & standards for [**blockchain**][2] based distributed ledger technologies(DLT). Major industry players supporting the project include **IBM** , **Intel** and **SAP Ariba** among [**others**][3]. The HLP aims to create frameworks for individuals and companies to create shared as well as closed blockchains as required to further their own requirements. The design principles include a strong tilt toward developing a globally deployable, scalable, robust platform with a focus on privacy, and future auditability[2]. It is also important to note that most of the blockchains proposed and the frame.
+
+### Development goals and structure: Making it plug & play
+
+Although enterprise facing platforms exist from the likes of the Ethereum alliance, HLP is by definition business facing and supported by industry behemoths who contribute and further development in the many modules that come under the HLP banner. The HLP incubates projects in development after their induction into the cause and after finishing work on it and correcting the knick-knacks rolls it out for the public. Members of the Hyperledger project contribute their own work such as how IBM contributed their Fabric platform for collaborative development. The codebase is absorbed and developed in house by the group in the project and rolled out for all members equally for their use.
+
+Such processes make the modules in HLP highly flexible plug-in frameworks which will support rapid development and roll-outs in enterprise settings. Furthermore, other comparable platforms are open **permission-less blockchains** or rather **public chains** by default and even though it is possible to adapt them to specific applications, HLP modules support the feature natively.
+
+The differences and use cases of public & private blockchains are covered more [**here**][4] in this comparative primer on the same.
+
+The Hyperledger project’s mission is four-fold according to **Brian Behlendorf** , the executive director of the project.
+
+They are:
+
+ 1. To create an enterprise grade DLT framework and standards which anyone can port to suit their specific industrial or personal needs.
+ 2. To give rise to a robust open source community to aid the ecosystem.
+ 3. To promote and further participation of industry members of the said ecosystem such as member firms.
+ 4. To host a neutral unbiased infrastructure for the HLP community to gather and share updates and developments regarding the same.
+
+
+
+The original document can be accessed [**here**][5]****.
+
+### Structure of the HLP
+
+The **HLP consists of 12 projects** that are classified as independent modules, each usually structured and working independently to develop their module. These are first studied for their capabilities and viability before being incubated. Proposals for additions can be made by any member of the organization. After the project is incubated active development ensues after which it is rolled out. The interoperability between these modules are given a high priority, hence regular communication between these groups are maintained by the community. Currently 4 of these projects are categorized as active. The active tag implies these are ready for use but not ready for a major release yet. These 4 are arguably the most significant or rather fundamental modules to furthering the blockchain revolution. We’ll look at the individual modules and their functionalities at a later time in detail. However, a brief description of a the Hyperledger Fabric platform, arguably the most popular among them follows.
+
+### Hyperledger Fabric
+
+The **Hyperledger Fabric** [2] is a fully open-source, permissioned (non-public) blockchain-based DLT platform that is designed keeping enterprise uses in mind. The platform provides features and is structured to fit the enterprise environment. It is highly modular allowing its developers to choose from different consensus protocols, **chain code protocols ([smart contracts][6])** , or identity management systems etc., as they go along. **It is a permissioned blockchain based platform** that’s makes use of an identity management system, meaning participants will be aware of each other’s identities which is required in an enterprise setting. Fabric allows for smart contract ( _ **“chaincode”, is the term that the Hyperledger team uses**_ ) development in a variety of mainstream programming languages including **Java** , **Javascript** , **Go** etc. This allows institutions and enterprises to make use of their existing talent in the area without hiring or re-training developers to develop their own smart contracts. Fabric also uses an execute-order-validate system to handle smart contracts for better reliability compared to the standard order-validate system that is used by other platforms providing smart contract functionality. Pluggable performance, identity management systems, DBMS, Consensus platforms etc. are other features of Fabric that keeps it miles ahead of its competition.
+
+### Conclusion
+
+Projects such as the Hyperledger Fabric platforms enable a faster rate of adoption of blockchain technology in mainstream use-cases. The Hyperledger community structure itself supports open governance principles and since all the projects are led as open source platforms, this improves the security and accountability that the teams exhibit in pushing out commitments.
+
+Since major applications of such projects involve working with enterprises to further development of platforms and standards, the Hyperledger project is currently at a great position with respect to comparable projects by others.
+
+**References:**
+
+ * **[1][Samsung takes a seat with Intel and IBM at the Linux Foundation | TheINQUIRER][7]**
+ * **[2] E. Androulaki et al., “Hyperledger Fabric: A Distributed Operating System for Permissioned Blockchains,” 2018.**
+
+
+
+--------------------------------------------------------------------------------
+
+via: https://www.ostechnix.com/blockchain-2-0-an-introduction-to-hyperledger-project-hlp/
+
+作者:[editor][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/editor/
+[b]: https://github.com/lujun9972
+[1]: https://www.ostechnix.com/wp-content/uploads/2019/04/Introduction-To-Hyperledger-Project-720x340.png
+[2]: https://www.ostechnix.com/blockchain-2-0-an-introduction/
+[3]: https://www.hyperledger.org/members
+[4]: https://www.ostechnix.com/blockchain-2-0-public-vs-private-blockchain-comparison/
+[5]: http://www.hitachi.com/rev/archive/2017/r2017_01/expert/index.html
+[6]: https://www.ostechnix.com/blockchain-2-0-explaining-smart-contracts-and-its-types/
+[7]: https://www.theinquirer.net/inquirer/news/2182438/samsung-takes-seat-intel-ibm-linux-foundation
diff --git a/sources/tech/20190505 Blockchain 2.0 - Public Vs Private Blockchain Comparison -Part 7.md b/sources/tech/20190505 Blockchain 2.0 - Public Vs Private Blockchain Comparison -Part 7.md
new file mode 100644
index 0000000000..a954e8514e
--- /dev/null
+++ b/sources/tech/20190505 Blockchain 2.0 - Public Vs Private Blockchain Comparison -Part 7.md
@@ -0,0 +1,106 @@
+[#]: collector: (lujun9972)
+[#]: translator: ( )
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (Blockchain 2.0 – Public Vs Private Blockchain Comparison [Part 7])
+[#]: via: (https://www.ostechnix.com/blockchain-2-0-public-vs-private-blockchain-comparison/)
+[#]: author: (editor https://www.ostechnix.com/author/editor/)
+
+Blockchain 2.0 – Public Vs Private Blockchain Comparison [Part 7]
+======
+
+![Public vs Private blockchain][1]
+
+The previous part of the [**Blockchain 2.0**][2] series explored the [**the state of Smart contracts**][3] now. This post intends to throw some light on the different types of blockchains that can be created. Each of these are used for vastly different applications and depending on the use cases, the protocol followed by each of these differ. Now let us go ahead and learn about **Public vs Private blockchain comparison** with Open source and proprietary technology.
+
+The fundamental three-layer structure of a blockchain based distributed ledger as we know is as follows:
+
+![][4]
+
+Figure 1 – Fundamental structure of Blockchain-based ledgers
+
+The differences between the types mentioned here is attributable primarily to the protocol that rests on the underlying blockchain. The protocol dictates rules for the participants and the behavior of the blockchain in response to the said participation.
+
+Remember to keep the following things in mind while reading through this article:
+
+ * Platforms such as these are always created to solve a use-case requirement. There is no one direction that the technology should take that is best. Blockchains for instance have tremendous applications and some of these might require dropping features that seem significant in other settings. **Decentralized storage** is a major example in this regard.
+ * Blockchains are basically database systems keeping track of information by timestamping and organizing data in the form of blocks. Creators of such blockchains can choose who has the right to make these blocks and perform alterations.
+ * Blockchains can be “centralized” as well, and participation in varying extents can be limited to those who this “central authority” deems eligible.
+
+
+
+Most blockchains are either **public** or **private**. Broadly speaking, public blockchains can be considered as being the equivalent of open source software and most private blockchains can be seen as proprietary platforms deriving from the public ones. The figure below should make the basic difference obvious to most of you.
+
+![][5]
+
+Figure 2 – Public vs Private blockchain comparison with Open source and Proprietary Technology
+
+This is not to say that all private blockchains are derived from open public ones. The most popular ones however usually are though.
+
+### Public Blockchains
+
+A public blockchain can be considered as a **permission-less platform** or **network**. Anyone with the knowhow and computing resources can participate in it. This will have the following implications:
+
+ * Anyone can join and participate in a public blockchain network. All the “participant” needs is a stable internet connection along with computing resources.
+ * Participation will include reading, writing, verifying, and providing consensus during transactions. An example for participating individuals would be **Bitcoin miners**. In exchange for participating in the network the miners are paid back in Bitcoins in this case.
+ * The platform is decentralized completely and fully redundant.
+ * Because of the decentralized nature, no one entity has complete control over the data recorded in the ledger. To validate a block all (or most) participants need to vet the data.
+ * This means that once information is verified and recorded, it cannot be altered easily. Even if it is, its impossible to not leave marks.
+ * The identity of participants remains anonymous by design in platforms such as **BITCOIN** and **LITECOIN**. These platforms by design aim for protecting and securing user identities. This is primarily a feature provided by the overlying protocol stack.
+ * Examples for public blockchain networks are **BITCOIN** , **LITECOIN** , **ETHEREUM** etc.
+ * Extensive decentralizations mean that gaining consensus on transactions might take a while compared to what is typically possible over blockchain ledger networks and throughput can be a challenge for large enterprises aiming for pushing a very high number of transactions every instant.
+ * The open participation and often the high number of such participants in open chains such as bitcoin add up to considerable initial investments in computing equipment and energy costs.
+
+
+
+### Private Blockchain
+
+In contrast, a private blockchain is a **permissioned blockchain**. Meaning:
+
+ * Permission to participate in the network is restricted and is presided over by the owner or institution overseeing the network. Meaning even though an individual will be able to store data and transact (send and receive payments for example), the validation and storage of these transactions will be done only by select participants.
+ * Participation even once permission is given by the central authority will be limited by terms. For instance, in case of a private blockchain network run by a financial institution, not every customer will have access to the entire blockchain ledger, and even among those with the permission, not everyone will be able to access everything. Permissions to access select services will be given by the central figure in this case. This is often referred to as **“channeling”**.
+ * Such systems have significantly larger throughput capabilities and also showcase much faster transaction speeds compared to their public counterparts because a block of information only needs to be validated by a select few.
+ * Security by design is something the public blockchains are renowned for. They achieve this
+by:
+ * Anonymizing participants,
+ * Distributed & redundant but encrypted storage on multiple nodes,
+ * Mass consensus required for creating and altering data.
+
+
+
+Private blockchains usually don’t feature any of these in their protocol. This makes the system only as secure as most cloud-based database systems currently in use.
+
+### A note for the wise
+
+An important point to note is this, the fact that they’re named public or private (or open or closed) has nothing to do with the underlying code base. The code or the literal foundations on which the platforms are based on may or may not be publicly available and or developed in either of these cases. **R3** is a **DLT** ( **D** istributed **L** edger **T** echnology) company that leads a public consortium of over 200 multinational institutions. Their aim is to further development of blockchain and related distributed ledger technology in the domain of finance and commerce. **Corda** is the product of this joint effort. R3 defines corda as a blockchain platform that is built specially for businesses. The codebase for the same is open source and developers all over the world are encouraged to contribute to the project. However, given its business facing nature and the needs it is meant to address, corda would be categorized as a permissioned closed blockchain platform. Meaning businesses can choose the participants of the network once it is deployed and choose the kind of information these participants can access through the use of natively available smart contract tools.
+
+While it is a reality that public platforms like Bitcoin and Ethereum are responsible for the widespread awareness and development going on in the space, it can still be argued that private blockchains designed for specific use cases in enterprise or business settings is what will lead monetary investments in the short run. These are the platforms most of us will see implemented the near future in practical ways.
+
+Read the next guide about Hyperledger project in this series.
+
+ * [**Blockchain 2.0 – An Introduction To Hyperledger Project (HLP)**][6]
+
+
+
+We are working on many interesting topics on Blockchain technology. Stay tuned!
+
+--------------------------------------------------------------------------------
+
+via: https://www.ostechnix.com/blockchain-2-0-public-vs-private-blockchain-comparison/
+
+作者:[editor][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/editor/
+[b]: https://github.com/lujun9972
+[1]: https://www.ostechnix.com/wp-content/uploads/2019/04/Public-Vs-Private-Blockchain-720x340.png
+[2]: https://www.ostechnix.com/blockchain-2-0-an-introduction/
+[3]: https://www.ostechnix.com/blockchain-2-0-ongoing-projects-the-state-of-smart-contracts-now/
+[4]: http://www.ostechnix.com/wp-content/uploads/2019/04/blockchain-architecture.png
+[5]: http://www.ostechnix.com/wp-content/uploads/2019/04/Public-vs-Private-blockchain-comparison.png
+[6]: https://www.ostechnix.com/blockchain-2-0-an-introduction-to-hyperledger-project-hlp/
diff --git a/sources/tech/20190505 Blockchain 2.0 - What Is Ethereum -Part 9.md b/sources/tech/20190505 Blockchain 2.0 - What Is Ethereum -Part 9.md
new file mode 100644
index 0000000000..a4669a2eb0
--- /dev/null
+++ b/sources/tech/20190505 Blockchain 2.0 - What Is Ethereum -Part 9.md
@@ -0,0 +1,83 @@
+[#]: collector: (lujun9972)
+[#]: translator: ( )
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (Blockchain 2.0 – What Is Ethereum [Part 9])
+[#]: via: (https://www.ostechnix.com/blockchain-2-0-what-is-ethereum/)
+[#]: author: (editor https://www.ostechnix.com/author/editor/)
+
+Blockchain 2.0 – What Is Ethereum [Part 9]
+======
+
+![Ethereum][1]
+
+In the previous guide of this series, we discussed about [**Hyperledger Project (HLP)**][2], a fastest growing product developed by **Linux Foundation**. In this guide, we are going to discuss about what is **Ethereum** and its features in detail. Many researchers opine that the future of the internet will be based on principles of decentralized computing. Decentralized computing was in fact among one of the broader objectives of having the internet in the first place. However, the internet took another turn owing to differences in computing capabilities available. While modern server capabilities make the case for server-side processing and execution, lack of decent mobile networks in large parts of the world make the case for the same on the client side. Modern smartphones now have **SoCs** (system on a chip or system on chip) capable of handling many such operations on the client side itself, however, limitations owing to retrieving and storing data securely still pushes developers to have server-side computing and data management. Hence, a bottleneck in regards to data transfer capabilities is currently observed.
+
+All of that might soon change because of advancements in distributed data storage and program execution platforms. [**The blockchain**][3], for the first time in the history of the internet, basically allows for secure data management and program execution on a distributed network of users as opposed to central servers.
+
+**Ethereum** is one such blockchain platform that gives developers access to frameworks and tools used to build and run applications on such a decentralized network. Though more popularly known in general for its cryptocurrency, Ethereum is more than just **ethers** (the cryptocurrency). It’s a full **Turing complete programming language** that is designed to develop and deploy **DApps** or **Distributed APPlications** [1]. We’ll look at DApps in more detail in one of the upcoming posts.
+
+Ethereum is an open-source, supports by default a public (non-permissioned) blockchain, and features an extensive smart contract platform **(Solidity)** underneath. Ethereum provides a virtual computing environment called the **Ethereum virtual machine** to run applications and [**smart contracts**][4] as well[2]. The Ethereum virtual machine runs on thousands of participating nodes all over the world, meaning the application data while being secure, is almost impossible to be tampered with or lost.
+
+### Getting behind Ethereum: What sets it apart
+
+In 2017, a 30 plus group of the who’s who of the tech and financial world got together to leverage the Ethereum blockchain’s capabilities. Thus, the **Ethereum Enterprise Alliance (EEA)** was formed by a long list of supporting members including _Microsoft_ , _JP Morgan_ , _Cisco Systems_ , _Deloitte_ , and _Accenture_. JP Morgan already has **Quorum** , a decentralized computing platform for financial services based on Ethereum currently in operation, while Microsoft has Ethereum based cloud services it markets through its Azure cloud business[3].
+
+### What is ether and how is it related to Ethereum
+
+Ethereum creator **Vitalik Buterin** understood the true value of a decentralized processing platform and the underlying blockchain tech that powered bitcoin. He failed to gain majority agreement for his idea of proposing that Bitcoin should be developed to support running distributed applications (DApps) and programs (now referred to as smart contracts).
+
+Hence in 2013, he proposed the idea of Ethereum in a white paper he published. The original white paper is still maintained and available for readers **[here][5]**. The idea was to develop a blockchain based platform to run smart contracts and applications designed to run on nodes and user devices instead of servers.
+
+The Ethereum system is often mistaken to just mean the cryptocurrency ether, however, it has to be reiterated that Ethereum is a full stack platform for developing applications and executing them as well and has been so since inception whereas bitcoin isn’t. **Ether is currently the second biggest cryptocurrency** by market capitalization and trades at an average of $170 per ether at the time of writing this article[4].
+
+### Features and technicalities of the platform[5]
+
+ * As we’ve already mentioned, the cryptocurrency called ether is simply one of the things the platform features. The purpose of the system is more than taking care of financial transactions. In fact, the key difference between the Ethereum platform and Bitcoin is in their scripting capabilities. Ethereum is developed in a Turing complete programming language which means it has scripting and application capabilities similar to other major programming languages. Developers require this feature to create DApps and complex smart contracts on the platform, a feature that bitcoin misses on.
+ * The “mining” process of ether is more stringent and complex. While specialized ASICs may be used to mine bitcoin, the basic hashing algorithm used by Ethereum **(EThash)** reduces the advantage that ASICs have in this regard.
+ * The transaction fees itself to be paid as an incentive to miners and node operators for running the network is calculated using a computational token called **Gas**. Gas improves the system’s resilience and resistance to external hacks and attacks by requiring the initiator of the transaction to pay ethers proportionate to the number of computational resources that are required to carry out that transaction. This is in contrast to other platforms such as Bitcoin where the transaction fee is measured in tandem with the transaction size. As such, the average transaction costs in Ethereum is radically less than Bitcoin. This also implies that running applications running on the Ethereum virtual machine will require a fee depending straight up on the computational problems that the application is meant to solve. Basically, the more complex an execution, the more the fee.
+ * The block time for Ethereum is estimated to be around _**10-15 seconds**_. The block time is the average time that is required to timestamp and create a block on the blockchain network. Compared to the 10+ minutes the same transaction will take on the bitcoin network, it becomes apparent that _**Ethereum is much faster**_ with respect to transactions and verification of blocks.
+ * _It is also interesting to note that there is no hard cap on the amount of ether that can be mined or the rate at which ether can be mined leading to less radical system design than bitcoin._
+
+
+
+### Conclusion
+
+While Ethereum is comparable and far outpaces similar platforms, the platform itself lacked a definite path for development until the Ethereum enterprise alliance started pushing it. While the definite push for enterprise developments are made by the Ethereum platform, it has to be noted that Ethereum also caters to small-time developers and individuals as well. As such developing the platform for end users and enterprises leave a lot of specific functionality out of the loop for Ethereum. Also, the blockchain model proposed and developed by the Ethereum foundation is a public model whereas the one proposed by projects such as the Hyperledger project is private and permissioned.
+
+While only time can tell which platform among the ones put forward by Ethereum, Hyperledger, and R3 Corda among others will find the most fans in real-world use cases, such systems do prove the validity behind the claim of a blockchain powered future.
+
+**References:**
+
+ * [1] [**Gabriel Nicholas, “Ethereum Is Coding’s New Wild West | WIRED,” Wired , 2017**][6].
+ * [2] [**What is Ethereum? — Ethereum Homestead 0.1 documentation**][7].
+ * [3] [**Ethereum, a Virtual Currency, Enables Transactions That Rival Bitcoin’s – The New York Times**][8].
+ * [4] [**Cryptocurrency Market Capitalizations | CoinMarketCap**][9].
+ * [5] [**Introduction — Ethereum Homestead 0.1 documentation**][10].
+
+
+
+--------------------------------------------------------------------------------
+
+via: https://www.ostechnix.com/blockchain-2-0-what-is-ethereum/
+
+作者:[editor][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/editor/
+[b]: https://github.com/lujun9972
+[1]: https://www.ostechnix.com/wp-content/uploads/2019/04/Ethereum-720x340.png
+[2]: https://www.ostechnix.com/blockchain-2-0-an-introduction-to-hyperledger-project-hlp/
+[3]: https://www.ostechnix.com/blockchain-2-0-an-introduction/
+[4]: https://www.ostechnix.com/blockchain-2-0-explaining-smart-contracts-and-its-types/
+[5]: https://github.com/ethereum/wiki/wiki/White-Paper
+[6]: https://www.wired.com/story/ethereum-is-codings-new-wild-west/
+[7]: http://www.ethdocs.org/en/latest/introduction/what-is-ethereum.html#ethereum-virtual-machine
+[8]: https://www.nytimes.com/2016/03/28/business/dealbook/ethereum-a-virtual-currency-enables-transactions-that-rival-bitcoins.html
+[9]: https://coinmarketcap.com/
+[10]: http://www.ethdocs.org/en/latest/introduction/index.html
diff --git a/sources/tech/20190505 Duc - A Collection Of Tools To Inspect And Visualize Disk Usage.md b/sources/tech/20190505 Duc - A Collection Of Tools To Inspect And Visualize Disk Usage.md
new file mode 100644
index 0000000000..edba21d327
--- /dev/null
+++ b/sources/tech/20190505 Duc - A Collection Of Tools To Inspect And Visualize Disk Usage.md
@@ -0,0 +1,261 @@
+[#]: collector: (lujun9972)
+[#]: translator: ( )
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (Duc – A Collection Of Tools To Inspect And Visualize Disk Usage)
+[#]: via: (https://www.ostechnix.com/duc-a-collection-of-tools-to-inspect-and-visualize-disk-usage/)
+[#]: author: (sk https://www.ostechnix.com/author/sk/)
+
+Duc – A Collection Of Tools To Inspect And Visualize Disk Usage
+======
+
+![Duc - A Collection Of Tools To Inspect And Visualize Disk Usage][1]
+
+**Duc** is a collection of tools that can be used to index, inspect and visualize disk usage on Unix-like operating systems. Don’t think of it as a simple CLI tool that merely displays a fancy graph of your disk usage. It is built to scale quite well on huge filesystems. Duc has been tested on systems that consisted of more than 500 million files and several petabytes of storage without any problems.
+
+Duc is quite fast and versatile tool. It stores your disk usage in an optimized database, so you can quickly find where your bytes are as soon as the index is completed. In addition, it comes with various user interfaces and back-ends to access the database and draw the graphs.
+
+Here is the list of currently supported user interfaces (UI):
+
+ 1. Command line interface (ls),
+ 2. Ncurses console interface (ui),
+ 3. X11 GUI (duc gui),
+ 4. OpenGL GUI (duc gui).
+
+
+
+List of supported database back-ends:
+
+ * Tokyocabinet,
+ * Leveldb,
+ * Sqlite3.
+
+
+
+Duc uses **Tokyocabinet** as default database backend.
+
+### Install Duc
+
+Duc is available in the default repositories of Debian and its derivatives such as Ubuntu. So installing Duc on DEB-based systems is a piece of cake.
+
+```
+$ sudo apt-get install duc
+```
+
+On other Linux distributions, you may need to manually compile and install Duc from source as shown below.
+
+Download latest duc source .tgz file from the [**releases**][2] page on github. As of writing this guide, the latest version was **1.4.4**.
+
+```
+$ wget https://github.com/zevv/duc/releases/download/1.4.4/duc-1.4.4.tar.gz
+```
+
+Then run the following commands one by one to install DUC.
+
+```
+$ tar -xzf duc-1.4.4.tar.gz
+$ cd duc-1.4.4
+$ ./configure
+$ make
+$ sudo make install
+```
+
+### Duc Usage
+
+The typical usage of duc is:
+
+```
+$ duc
+```
+
+You can view the list of general options and sub-commands by running the following command:
+
+```
+$ duc help
+```
+
+You can also know the the usage of a specific subcommand as below.
+
+```
+$ duc help
+```
+
+To view the extensive list of all commands and their options, simply run:
+
+```
+$ duc help --all
+```
+
+Let us now se some practical use cases of duc utility.
+
+### Create Index (database)
+
+First of all, you need to create an index file (database) of your filesystem. To create an index file, use “duc index” command.
+
+For example, to create an index of your **/home** directory, simply run:
+
+```
+$ duc index /home
+```
+
+The above command will create the index of your /home/ directory and save it in **$HOME/.duc.db** file. If you have added new files/directories in the /home directory in future, just re-run the above command at any time later to rebuild the index.
+
+### Query Index
+
+Duc has various sub-commands to query and explore the index.
+
+To view the list of available indexes, run:
+
+```
+$ duc info
+```
+
+**Sample output:**
+
+```
+Date Time Files Dirs Size Path
+2019-04-09 15:45:55 3.5K 305 654.6M /home
+```
+
+As you see in the above output, I have already indexed the /home directory.
+
+To list all files and directories in the current working directory, you can do:
+
+```
+$ duc ls
+```
+
+To list files/directories in a specific directory, for example **/home/sk/Downloads** , just pass the path as argument like below.
+
+```
+$ duc ls /home/sk/Downloads
+```
+
+Similarly, run **“duc ui”** command to open a **ncurses** based console user interface for exploring the file system usage and run **“duc gui”** to start a **graphical (X11)** interface to explore the file system.
+
+To know more about a sub-command usage, simply refer the help section.
+
+```
+$ duc help ls
+```
+
+The above command will display the help section of “ls” subcommand.
+
+### Visualize Disk Usage
+
+In the previous section, we have seen how to list files and directories using duc subcommands. In addition, you can even show the file sizes in a fancy graph.
+
+To show the graph of a given path, use “ls” subcommand like below.
+
+```
+$ duc ls -Fg /home/sk
+```
+
+Sample output:
+
+![][3]
+
+Visualize disk usage using “duc ls” command
+
+As you see in the above output, the “ls” subcommand queries the duc database and lists the inclusive size of all
+files and directories of the given path i.e **/home/sk/** in this case.
+
+Here, the **“-F”** option is used to append file type indicator (one of */) to entries and the **“-g”** option is used to draw graph with relative size for each entry.
+
+Please note that if no path is given, the current working directory is explored.
+
+You can use **-R** option to view the disk usage result in [**tree**][4] structure.
+
+```
+$ duc ls -R /home/sk
+```
+
+![][5]
+
+Visualize disk usage in tree structure
+
+To query the duc database and open a **ncurses** based console user interface for exploring the disk usage of given path, use **“ui”** subcommand like below.
+
+```
+$ duc ui /home/sk
+```
+
+![][6]
+
+Similarly, we use **“gui”** subcommand to query the duc database and start a **graphical (X11)** interface to explore the disk usage of the given path:
+
+```
+$ duc gui /home/sk
+```
+
+![][7]
+
+Like I already mentioned earlier, we can learn more about a subcommand usage like below.
+
+```
+$ duc help
+```
+
+I covered the basic usage part only. Refer man pages for more details about “duc” tool.
+
+```
+$ man duc
+```
+
+* * *
+
+**Related read:**
+
+ * [**Filelight – Visualize Disk Usage On Your Linux System**][8]
+ * [**Some Good Alternatives To ‘du’ Command**][9]
+ * [**How To Check Disk Space Usage In Linux Using Ncdu**][10]
+ * [**Agedu – Find Out Wasted Disk Space In Linux**][11]
+ * [**How To Find The Size Of A Directory In Linux**][12]
+ * [**The df Command Tutorial With Examples For Beginners**][13]
+
+
+
+* * *
+
+### Conclusion
+
+Duc is simple yet useful disk usage viewer. If you want to quickly and easily know which files/directories are eating up your disk space, Duc might be a good choice. What are you waiting for? Go get this tool already, scan your filesystem and get rid of unused files/directories.
+
+And, that’s all for now. Hope this was useful. More good stuffs to come. Stay tuned!
+
+Cheers!
+
+**Resource:**
+
+ * [**Duc website**][14]
+
+
+
+--------------------------------------------------------------------------------
+
+via: https://www.ostechnix.com/duc-a-collection-of-tools-to-inspect-and-visualize-disk-usage/
+
+作者:[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]: https://www.ostechnix.com/wp-content/uploads/2019/04/duc-720x340.png
+[2]: https://github.com/zevv/duc/releases
+[3]: http://www.ostechnix.com/wp-content/uploads/2019/04/duc-1-1.png
+[4]: https://www.ostechnix.com/view-directory-tree-structure-linux/
+[5]: http://www.ostechnix.com/wp-content/uploads/2019/04/duc-2.png
+[6]: http://www.ostechnix.com/wp-content/uploads/2019/04/duc-3.png
+[7]: http://www.ostechnix.com/wp-content/uploads/2019/04/duc-4.png
+[8]: https://www.ostechnix.com/filelight-visualize-disk-usage-on-your-linux-system/
+[9]: https://www.ostechnix.com/some-good-alternatives-to-du-command/
+[10]: https://www.ostechnix.com/check-disk-space-usage-linux-using-ncdu/
+[11]: https://www.ostechnix.com/agedu-find-out-wasted-disk-space-in-linux/
+[12]: https://www.ostechnix.com/find-size-directory-linux/
+[13]: https://www.ostechnix.com/the-df-command-tutorial-with-examples-for-beginners/
+[14]: https://duc.zevv.nl/
diff --git a/sources/tech/20190505 Five Methods To Check Your Current Runlevel In Linux.md b/sources/tech/20190505 Five Methods To Check Your Current Runlevel In Linux.md
new file mode 100644
index 0000000000..2169f04e51
--- /dev/null
+++ b/sources/tech/20190505 Five Methods To Check Your Current Runlevel In Linux.md
@@ -0,0 +1,183 @@
+[#]: collector: (lujun9972)
+[#]: translator: ( )
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (Five Methods To Check Your Current Runlevel In Linux?)
+[#]: via: (https://www.2daygeek.com/check-current-runlevel-in-linux/)
+[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/)
+
+Five Methods To Check Your Current Runlevel In Linux?
+======
+
+A run level is an operating system state on Linux system.
+
+There are seven runlevels exist, numbered from zero to six.
+
+A system can be booted into any of the given runlevel. Run levels are identified by numbers.
+
+Each runlevel designates a different system configuration and allows access to a different combination of processes.
+
+By default Linux boots either to runlevel 3 or to runlevel 5.
+
+Only one runlevel is executed at a time on startup. It doesn’t execute one after another.
+
+The default runlevel for a system is specified in the /etc/inittab file for SysVinit system.
+
+But systemd systems doesn’t read this file and it uses the following file `/etc/systemd/system/default.target` to get default runlevel information.
+
+We can check the Linux system current runlevel using the below five methods.
+
+ * **`runlevel Command:`** runlevel prints the previous and current runlevel of the system.
+ * **`who Command:`** Print information about users who are currently logged in. It will print the runlevel information with “-r” option.
+ * **`systemctl Command:`** It controls the systemd system and service manager.
+ * **`Using /etc/inittab File:`** The default runlevel for a system is specified in the /etc/inittab file for SysVinit System.
+ * **`Using /etc/systemd/system/default.target File:`** The default runlevel for a system is specified in the /etc/systemd/system/default.target file for systemd System.
+
+
+
+Detailed runlevels information is described in the below table.
+
+**Runlevel** | **SysVinit System** | **systemd System**
+---|---|---
+0 | Shutdown or Halt the system | shutdown.target
+1 | Single user mode | rescue.target
+2 | Multiuser, without NFS | multi-user.target
+3 | Full multiuser mode | multi-user.target
+4 | unused | multi-user.target
+5 | X11 (Graphical User Interface) | graphical.target
+6 | reboot the system | reboot.target
+
+The system will execute the programs/service based on the runlevel.
+
+For SysVinit system, it will be execute from the following location.
+
+ * Run level 0 – /etc/rc.d/rc0.d/
+ * Run level 1 – /etc/rc.d/rc1.d/
+ * Run level 2 – /etc/rc.d/rc2.d/
+ * Run level 3 – /etc/rc.d/rc3.d/
+ * Run level 4 – /etc/rc.d/rc4.d/
+ * Run level 5 – /etc/rc.d/rc5.d/
+ * Run level 6 – /etc/rc.d/rc6.d/
+
+
+
+For systemd system, it will be execute from the following location.
+
+ * runlevel1.target – /etc/systemd/system/rescue.target
+ * runlevel2.target – /etc/systemd/system/multi-user.target.wants
+ * runlevel3.target – /etc/systemd/system/multi-user.target.wants
+ * runlevel4.target – /etc/systemd/system/multi-user.target.wants
+ * runlevel5.target – /etc/systemd/system/graphical.target.wants
+
+
+
+### 1) How To Check Your Current Runlevel In Linux Using runlevel Command?
+
+runlevel prints the previous and current runlevel of the system.
+
+```
+$ runlevel
+N 5
+```
+
+ * **`N:`** “N” indicates that the runlevel has not been changed since the system was booted.
+ * **`5:`** “5” indicates the current runlevel of the system.
+
+
+
+### 2) How To Check Your Current Runlevel In Linux Using who Command?
+
+Print information about users who are currently logged in. It will print the runlevel information with `-r` option.
+
+```
+$ who -r
+ run-level 5 2019-04-22 09:32
+```
+
+### 3) How To Check Your Current Runlevel In Linux Using systemctl Command?
+
+systemctl is used to controls the systemd system and service manager. systemd is system and service manager for Unix like operating systems.
+
+It can work as a drop-in replacement for sysvinit system. systemd is the first process get started by kernel and holding PID 1.
+
+systemd uses `.service` files Instead of bash scripts (SysVinit uses). systemd sorts all daemons into their own Linux cgroups and you can see the system hierarchy by exploring `/cgroup/systemd` file.
+
+```
+$ systemctl get-default
+graphical.target
+```
+
+### 4) How To Check Your Current Runlevel In Linux Using /etc/inittab File?
+
+The default runlevel for a system is specified in the /etc/inittab file for SysVinit System but systemd systemd doesn’t read the files.
+
+So, it will work only on SysVinit system and not in systemd system.
+
+```
+$ cat /etc/inittab
+# inittab is only used by upstart for the default runlevel.
+#
+# ADDING OTHER CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM.
+#
+# System initialization is started by /etc/init/rcS.conf
+#
+# Individual runlevels are started by /etc/init/rc.conf
+#
+# Ctrl-Alt-Delete is handled by /etc/init/control-alt-delete.conf
+#
+# Terminal gettys are handled by /etc/init/tty.conf and /etc/init/serial.conf,
+# with configuration in /etc/sysconfig/init.
+#
+# For information on how to write upstart event handlers, or how
+# upstart works, see init(5), init(8), and initctl(8).
+#
+# Default runlevel. The runlevels used are:
+# 0 - halt (Do NOT set initdefault to this)
+# 1 - Single user mode
+# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)
+# 3 - Full multiuser mode
+# 4 - unused
+# 5 - X11
+# 6 - reboot (Do NOT set initdefault to this)
+#
+id:5:initdefault:
+```
+
+### 5) How To Check Your Current Runlevel In Linux Using /etc/systemd/system/default.target File?
+
+The default runlevel for a system is specified in the /etc/systemd/system/default.target file for systemd System.
+
+It doesn’t work on SysVinit system.
+
+```
+$ cat /etc/systemd/system/default.target
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Graphical Interface
+Documentation=man:systemd.special(7)
+Requires=multi-user.target
+Wants=display-manager.service
+Conflicts=rescue.service rescue.target
+After=multi-user.target rescue.service rescue.target display-manager.service
+AllowIsolate=yes
+```
+--------------------------------------------------------------------------------
+
+via: https://www.2daygeek.com/check-current-runlevel-in-linux/
+
+作者:[Magesh Maruthamuthu][a]
+选题:[lujun9972][b]
+译者:[译者ID](https://github.com/译者ID)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]: https://www.2daygeek.com/author/magesh/
+[b]: https://github.com/lujun9972
diff --git a/sources/tech/20190505 How To Navigate Directories Faster In Linux.md b/sources/tech/20190505 How To Navigate Directories Faster In Linux.md
new file mode 100644
index 0000000000..e0979b3915
--- /dev/null
+++ b/sources/tech/20190505 How To Navigate Directories Faster In Linux.md
@@ -0,0 +1,350 @@
+[#]: collector: (lujun9972)
+[#]: translator: ( )
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (How To Navigate Directories Faster In Linux)
+[#]: via: (https://www.ostechnix.com/navigate-directories-faster-linux/)
+[#]: author: (sk https://www.ostechnix.com/author/sk/)
+
+How To Navigate Directories Faster In Linux
+======
+
+![Navigate Directories Faster In Linux][1]
+
+Today we are going to learn some command line productivity hacks. As you already know, we use “cd” command to move between a stack of directories in Unix-like operating systems. In this guide I am going to teach you how to navigate directories faster without having to use “cd” command often. There could be many ways, but I only know the following five methods right now! I will keep updating this guide when I came across any methods or utilities to achieve this task in the days to come.
+
+### Five Different Methods To Navigate Directories Faster In Linux
+
+##### Method 1: Using “Pushd”, “Popd” And “Dirs” Commands
+
+This is the most frequent method that I use everyday to navigate between a stack of directories. The “Pushd”, “Popd”, and “Dirs” commands comes pre-installed in most Linux distributions, so don’t bother with installation. These trio commands are quite useful when you’re working in a deep directory structure and scripts. For more details, check our guide in the link given below.
+
+ * **[How To Use Pushd, Popd And Dirs Commands For Faster CLI Navigation][2]**
+
+
+
+##### Method 2: Using “bd” utility
+
+The “bd” utility also helps you to quickly go back to a specific parent directory without having to repeatedly typing “cd ../../.” on your Bash.
+
+Bd is also available in the [**Debian extra**][3] and [**Ubuntu universe**][4] repositories. So, you can install it using “apt-get” package manager in Debian, Ubuntu and other DEB based systems as shown below:
+
+```
+$ sudo apt-get update
+
+$ sudo apt-get install bd
+```
+
+For other distributions, you can install as shown below.
+
+```
+$ sudo wget --no-check-certificate -O /usr/local/bin/bd https://raw.github.com/vigneshwaranr/bd/master/bd
+
+$ sudo chmod +rx /usr/local/bin/bd
+
+$ echo 'alias bd=". bd -si"' >> ~/.bashrc
+
+$ source ~/.bashrc
+```
+
+To enable auto completion, run:
+
+```
+$ sudo wget -O /etc/bash_completion.d/bd https://raw.github.com/vigneshwaranr/bd/master/bash_completion.d/bd
+
+$ source /etc/bash_completion.d/bd
+```
+
+The Bd utility has now been installed. Let us see few examples to understand how to quickly move through stack of directories using this tool.
+
+Create some directories.
+
+```
+$ mkdir -p dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/dir9/dir10
+```
+
+The above command will create a hierarchy of directories. Let us check [**directory structure**][5] using command:
+
+```
+$ tree dir1/
+dir1/
+└── dir2
+ └── dir3
+ └── dir4
+ └── dir5
+ └── dir6
+ └── dir7
+ └── dir8
+ └── dir9
+ └── dir10
+
+9 directories, 0 files
+```
+
+Alright, we have now 10 directories. Let us say you’re currently in 7th directory i.e dir7.
+
+```
+$ pwd
+/home/sk/dir1/dir2/dir3/dir4/dir5/dir6/dir7
+```
+
+You want to move to dir3. Normally you would type:
+
+```
+$ cd /home/sk/dir1/dir2/dir3
+```
+
+Right? yes! But it not necessary though! To go back to dir3, just type:
+
+```
+$ bd dir3
+```
+
+Now you will be in dir3.
+
+![][6]
+
+Navigate Directories Faster In Linux Using “bd” Utility
+
+Easy, isn’t it? It supports auto complete, so you can just type the partial name of a directory and hit the tab key to auto complete the full path.
+
+To check the contents of a specific parent directory, you don’t need to inside that particular directory. Instead, just type:
+
+```
+$ ls `bd dir1`
+```
+
+The above command will display the contents of dir1 from your current working directory.
+
+For more details, check out the following GitHub page.
+
+ * [**bd GitHub repository**][7]
+
+
+
+##### Method 3: Using “Up” Shell script
+
+The “Up” is a shell script allows you to move quickly to your parent directory. It works well on many popular shells such as Bash, Fish, and Zsh etc. Installation is absolutely easy too!
+
+To install “Up” on **Bash** , run the following commands one bye:
+
+```
+$ curl --create-dirs -o ~/.config/up/up.sh https://raw.githubusercontent.com/shannonmoeller/up/master/up.sh
+
+$ echo 'source ~/.config/up/up.sh' >> ~/.bashrc
+```
+
+The up script registers the “up” function and some completion functions via your “.bashrc” file.
+
+Update the changes using command:
+
+```
+$ source ~/.bashrc
+```
+
+On **zsh** :
+
+```
+$ curl --create-dirs -o ~/.config/up/up.sh https://raw.githubusercontent.com/shannonmoeller/up/master/up.sh
+
+$ echo 'source ~/.config/up/up.sh' >> ~/.zshrc
+```
+
+The up script registers the “up” function and some completion functions via your “.zshrc” file.
+
+Update the changes using command:
+
+```
+$ source ~/.zshrc
+```
+
+On **fish** :
+
+```
+$ curl --create-dirs -o ~/.config/up/up.fish https://raw.githubusercontent.com/shannonmoeller/up/master/up.fish
+
+$ source ~/.config/up/up.fish
+```
+
+The up script registers the “up” function and some completion functions via “funcsave”.
+
+Now it is time to see some examples.
+
+Let us create some directories.
+
+```
+$ mkdir -p dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/dir9/dir10
+```
+
+Let us say you’re in 7th directory i.e dir7.
+
+```
+$ pwd
+/home/sk/dir1/dir2/dir3/dir4/dir5/dir6/dir7
+```
+
+You want to move to dir3. Using “cd” command, we can do this by typing the following command:
+
+```
+$ cd /home/sk/dir1/dir2/dir3
+```
+
+But it is really easy to go back to dir3 using “up” script:
+
+```
+$ up dir3
+```
+
+That’s it. Now you will be in dir3. To go one directory up, just type:
+
+```
+$ up 1
+```
+
+To go back two directory type:
+
+```
+$ up 2
+```
+
+It’s that simple. Did I type the full path? Nope. Also it supports tab completion. So just type the partial directory name and hit the tab to complete the full path.
+
+For more details, check out the GitHub page.
+
+ * [**Up GitHub Repository**][8]
+
+
+
+Please be mindful that “bd” and “up” tools can only help you to go backward i.e to the parent directory of the current working directory. You can’t move forward. If you want to switch to dir10 from dir5, you can’t! Instead, you need to use “cd” command to switch to dir10. These two utilities are meant for quickly moving you to the parent directory!
+
+##### Method 4: Using “Shortcut” tool
+
+This is yet another handy method to switch between different directories quickly and easily. This is somewhat similar to [**alias**][9] command. In this method, we create shortcuts to frequently used directories and use the shortcut name to go to that respective directory without having to type the path. If you’re working in deep directory structure and stack of directories, this method will greatly save some time. You can learn how it works in the guide given below.
+
+ * [**Create Shortcuts To The Frequently Used Directories In Your Shell**][10]
+
+
+
+##### Method 5: Using “CDPATH” Environment variable
+
+This method doesn’t require any installation. **CDPATH** is an environment variable. It is somewhat similar to **PATH** variable which contains many different paths concatenated using **‘:’** (colon). The main difference between PATH and CDPATH variables is the PATH variable is usable with all commands whereas CDPATH works only for **cd** command.
+
+I have the following directory structure.
+
+![][11]
+
+Directory structure
+
+As you see, there are four child directories under a parent directory named “ostechnix”.
+
+Now add this parent directory to CDPATH using command:
+
+```
+$ export CDPATH=~/ostechnix
+```
+
+You now can instantly cd to the sub-directories of the parent directory (i.e **~/ostechnix** in our case) from anywhere in the filesystem.
+
+For instance, currently I am in **/var/mail/** location.
+
+![][12]
+
+To cd into **~/ostechnix/Linux/** directory, we don’t have to use the full path of the directory as shown below:
+
+```
+$ cd ~/ostechnix/Linux
+```
+
+Instead, just mention the name of the sub-directory you want to switch to:
+
+```
+$ cd Linux
+```
+
+It will automatically cd to **~/ostechnix/Linux** directory instantly.
+
+![][13]
+
+As you can see in the above output, I didn’t use “cd ”. Instead, I just used “cd ” command.
+
+Please note that CDPATH will allow you to quickly navigate to only one child directory of the parent directory set in CDPATH variable. It doesn’t much help for navigating a stack of directories (directories inside sub-directories, of course).
+
+To find the values of CDPATH variable, run:
+
+```
+$ echo $CDPATH
+```
+
+Sample output would be:
+
+```
+/home/sk/ostechnix
+```
+
+**Set multiple values to CDPATH**
+
+Similar to PATH variable, we can also set multiple values (more than one directory) to CDPATH separated by colon (:).
+
+```
+$ export CDPATH=.:~/ostechnix:/etc:/var:/opt
+```
+
+**Make the changes persistent**
+
+As you already know, the above command (export) will only keep the values of CDPATH until next reboot. To permanently set the values of CDPATH, just add them to your **~/.bashrc** or **~/.bash_profile** files.
+
+```
+$ vi ~/.bash_profile
+```
+
+Add the values:
+
+```
+export CDPATH=.:~/ostechnix:/etc:/var:/opt
+```
+
+Hit **ESC** key and type **:wq** to save and exit.
+
+Apply the changes using command:
+
+```
+$ source ~/.bash_profile
+```
+
+**Clear CDPATH**
+
+To clear the values of CDPATH, use **export CDPATH=””**. Or, simply delete the entire line from **~/.bashrc** or **~/.bash_profile** files.
+
+In this article, you have learned the different ways to navigate directory stack faster and easier in Linux. As you can see, it’s not that difficult to browse a pile of directories faster. Now stop typing “cd ../../..” endlessly by using these tools. If you know any other worth trying tool or method to navigate directories faster, feel free to let us know in the comment section below. I will review and add them in this guide.
+
+And, that’s all for now. Hope this helps. More good stuffs to come. Stay tuned!
+
+Cheers!
+
+--------------------------------------------------------------------------------
+
+via: https://www.ostechnix.com/navigate-directories-faster-linux/
+
+作者:[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]: https://www.ostechnix.com/wp-content/uploads/2017/12/Navigate-Directories-Faster-In-Linux-720x340.png
+[2]: https://www.ostechnix.com/use-pushd-popd-dirs-commands-faster-cli-navigation/
+[3]: https://tracker.debian.org/pkg/bd
+[4]: https://launchpad.net/ubuntu/+source/bd
+[5]: https://www.ostechnix.com/view-directory-tree-structure-linux/
+[6]: http://www.ostechnix.com/wp-content/uploads/2017/12/Navigate-Directories-Faster-1.png
+[7]: https://github.com/vigneshwaranr/bd
+[8]: https://github.com/shannonmoeller/up
+[9]: https://www.ostechnix.com/the-alias-and-unalias-commands-explained-with-examples/
+[10]: https://www.ostechnix.com/create-shortcuts-frequently-used-directories-shell/
+[11]: http://www.ostechnix.com/wp-content/uploads/2018/12/tree-command-output.png
+[12]: http://www.ostechnix.com/wp-content/uploads/2018/12/pwd-command.png
+[13]: http://www.ostechnix.com/wp-content/uploads/2018/12/cdpath.png
diff --git a/sources/tech/20190506 Use udica to build SELinux policy for containers.md b/sources/tech/20190506 Use udica to build SELinux policy for containers.md
new file mode 100644
index 0000000000..4e31288a43
--- /dev/null
+++ b/sources/tech/20190506 Use udica to build SELinux policy for containers.md
@@ -0,0 +1,199 @@
+[#]: collector: (lujun9972)
+[#]: translator: ( )
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (Use udica to build SELinux policy for containers)
+[#]: via: (https://fedoramagazine.org/use-udica-to-build-selinux-policy-for-containers/)
+[#]: author: (Lukas Vrabec https://fedoramagazine.org/author/lvrabec/)
+
+Use udica to build SELinux policy for containers
+======
+
+![][1]
+
+While modern IT environments move towards Linux containers, the need to secure these environments is as relevant as ever. Containers are a process isolation technology. While containers can be a defense mechanism, they only excel when combined with SELinux.
+
+Fedora SELinux engineering built a new standalone tool, **udica** , to generate SELinux policy profiles for containers by automatically inspecting them. This article focuses on why _udica_ is needed in the container world, and how it makes SELinux and containers work better together. You’ll find examples of SELinux separation for containers that let you avoid turning protection off because the generic SELinux type _container_t_ is too tight. With _udica_ you can easily customize the policy with limited SELinux policy writing skills.
+
+### SELinux technology
+
+SELinux is a security technology that brings proactive security to Linux systems. It’s a labeling system that assigns a label to all _subjects_ (processes and users) and _objects_ (files, directories, sockets, etc.). These labels are then used in a security policy that controls access throughout the system. It’s important to mention that what’s not allowed in an SELinux security policy is denied by default. The policy rules are enforced by the kernel. This security technology has been in use on Fedora for several years. A real example of such a rule is:
+
+```
+allow httpd_t httpd_log_t: file { append create getattr ioctl lock open read setattr };
+```
+
+The rule allows any process labeled as _httpd_t_ ****to create, append, read and lock files labeled as _httpd_log_t_. Using the _ps_ command, you can list all processes with their labels:
+
+```
+$ ps -efZ | grep httpd
+system_u:system_r:httpd_t:s0 root 13911 1 0 Apr14 ? 00:05:14 /usr/sbin/httpd -DFOREGROUND
+...
+```
+
+To see which objects are labeled as httpd_log_t, use _semanage_ :
+
+```
+# semanage fcontext -l | grep httpd_log_t
+/var/log/httpd(/.)? all files system_u:object_r:httpd_log_t:s0
+/var/log/nginx(/.)? all files system_u:object_r:httpd_log_t:s0
+...
+```
+
+The SELinux security policy for Fedora is shipped in the _selinux-policy_ RPM package.
+
+### SELinux vs. containers
+
+In Fedora, the _container-selinux_ RPM package provides a generic SELinux policy for all containers started by engines like _podman_ or _docker_. Its main purposes are to protect the host system against a container process, and to separate containers from each other. For instance, containers confined by SELinux with the process type _container_t_ can only read/execute files in _/usr_ and write to _container_file_t_ ****files type on host file system. To prevent attacks by containers on each other, Multi-Category Security (MCS) is used.
+
+Using only one generic policy for containers is problematic, because of the huge variety of container usage. On one hand, the default container type ( _container_t_ ) is often too strict. For example:
+
+ * [Fedora SilverBlue][2] needs containers to read/write a user’s home directory
+ * [Fluentd][3] project needs containers to be able to read logs in the _/var/log_ directory
+
+
+
+On the other hand, the default container type could be too loose for certain use cases:
+
+ * It has no SELinux network controls — all container processes can bind to any network port
+ * It has no SELinux control on [Linux capabilities][4] — all container processes can use all capabilities
+
+
+
+There is one solution to handle both use cases: write a custom SELinux security policy for the container. This can be tricky, because SELinux expertise is required. For this purpose, the _udica_ tool was created.
+
+### Introducing udica
+
+Udica generates SELinux security profiles for containers. Its concept is based on the “block inheritance” feature inside the [common intermediate language][5] (CIL) supported by SELinux userspace. The tool creates a policy that combines:
+
+ * Rules inherited from specified CIL blocks (templates), and
+ * Rules discovered by inspection of container JSON file, which contains mountpoints and ports definitions
+
+
+
+You can load the final policy immediately, or move it to another system to load into the kernel. Here’s an example, using a container that:
+
+ * Mounts _/home_ as read only
+ * Mounts _/var/spool_ as read/write
+ * Exposes port _tcp/21_
+
+
+
+The container starts with this command:
+
+```
+# podman run -v /home:/home:ro -v /var/spool:/var/spool:rw -p 21:21 -it fedora bash
+```
+
+The default container type ( _container_t_ ) doesn’t allow any of these three actions. To prove it, you could use the _sesearch_ tool to query that the _allow_ rules are present on system:
+
+```
+# sesearch -A -s container_t -t home_root_t -c dir -p read
+```
+
+There’s no _allow_ rule present that lets a process labeled as _container_t_ access a directory labeled _home_root_t_ (like the _/home_ directory). The same situation occurs with _/var/spool_ , which is labeled _var_spool_t:_
+
+```
+# sesearch -A -s container_t -t var_spool_t -c dir -p read
+```
+
+On the other hand, the default policy completely allows network access.
+
+```
+# sesearch -A -s container_t -t port_type -c tcp_socket
+allow container_net_domain port_type:tcp_socket { name_bind name_connect recv_msg send_msg };
+allow sandbox_net_domain port_type:tcp_socket { name_bind name_connect recv_msg send_msg };
+```
+
+### Securing the container
+
+It would be great to restrict this access and allow the container to bind just on TCP port _21_ or with the same label. Imagine you find an example container using _podman ps_ whose ID is _37a3635afb8f_ :
+
+```
+# podman ps -q
+37a3635afb8f
+```
+
+You can now inspect the container and pass the inspection file to the _udica_ tool. The name for the new policy is _my_container_.
+
+```
+# podman inspect 37a3635afb8f > container.json
+# udica -j container.json my_container
+Policy my_container with container id 37a3635afb8f created!
+
+Please load these modules using:
+ # semodule -i my_container.cil /usr/share/udica/templates/{base_container.cil,net_container.cil,home_container.cil}
+
+Restart the container with: "--security-opt label=type:my_container.process" parameter
+```
+
+That’s it! You just created a custom SELinux security policy for the example container. Now you can load this policy into the kernel and make it active. The _udica_ output above even tells you the command to use:
+
+```
+# semodule -i my_container.cil /usr/share/udica/templates/{base_container.cil,net_container.cil,home_container.cil}
+```
+
+Now you must restart the container to allow the container engine to use the new custom policy:
+
+```
+# podman run --security-opt label=type:my_container.process -v /home:/home:ro -v /var/spool:/var/spool:rw -p 21:21 -it fedora bash
+```
+
+The example container is now running in the newly created _my_container.process_ SELinux process type:
+
+```
+# ps -efZ | grep my_container.process
+unconfined_u:system_r:container_runtime_t:s0-s0:c0.c1023 root 2275 434 1 13:49 pts/1 00:00:00 podman run --security-opt label=type:my_container.process -v /home:/home:ro -v /var/spool:/var/spool:rw -p 21:21 -it fedora bash
+system_u:system_r:my_container.process:s0:c270,c963 root 2317 2305 0 13:49 pts/0 00:00:00 bash
+```
+
+### Seeing the results
+
+The command _sesearch_ now shows _allow_ rules for accessing _/home_ and _/var/spool:_
+
+```
+# sesearch -A -s my_container.process -t home_root_t -c dir -p read
+allow my_container.process home_root_t:dir { getattr ioctl lock open read search };
+# sesearch -A -s my_container.process -t var_spool_t -c dir -p read
+allow my_container.process var_spool_t:dir { add_name getattr ioctl lock open read remove_name search write }
+```
+
+The new custom SELinux policy also allows _my_container.process_ to bind only to TCP/UDP ports labeled the same as TCP port 21:
+
+```
+# semanage port -l | grep 21 | grep ftp
+ ftp_port_t tcp 21, 989, 990
+# sesearch -A -s my_container.process -c tcp_socket -p name_bind
+ allow my_container.process ftp_port_t:tcp_socket name_bind;
+```
+
+### Conclusion
+
+The _udica_ tool helps you create SELinux policies for containers based on an inspection file without any SELinux expertise required. Now you can increase the security of containerized environments. Sources are available on [GitHub][6], and an RPM package is available in Fedora repositories for Fedora 28 and later.
+
+* * *
+
+*Photo by _[_Samuel Zeller_][7]_ on *[ _Unsplash_.][8]
+
+--------------------------------------------------------------------------------
+
+via: https://fedoramagazine.org/use-udica-to-build-selinux-policy-for-containers/
+
+作者:[Lukas Vrabec][a]
+选题:[lujun9972][b]
+译者:[译者ID](https://github.com/译者ID)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]: https://fedoramagazine.org/author/lvrabec/
+[b]: https://github.com/lujun9972
+[1]: https://fedoramagazine.org/wp-content/uploads/2019/05/udica-816x345.jpg
+[2]: https://silverblue.fedoraproject.org
+[3]: https://www.fluentd.org
+[4]: http://man7.org/linux/man-pages/man7/capabilities.7.html
+[5]: https://en.wikipedia.org/wiki/Common_Intermediate_Language
+[6]: https://github.com/containers/udica
+[7]: https://unsplash.com/photos/KVG-XMOs6tw?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
+[8]: https://unsplash.com/search/photos/lockers?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
diff --git a/sources/tech/20190508 Innovations on the Linux desktop- A look at Fedora 30-s new features.md b/sources/tech/20190508 Innovations on the Linux desktop- A look at Fedora 30-s new features.md
new file mode 100644
index 0000000000..083a8c9768
--- /dev/null
+++ b/sources/tech/20190508 Innovations on the Linux desktop- A look at Fedora 30-s new features.md
@@ -0,0 +1,140 @@
+[#]: collector: (lujun9972)
+[#]: translator: ( )
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (Innovations on the Linux desktop: A look at Fedora 30's new features)
+[#]: via: (https://opensource.com/article/19/5/fedora-30-features)
+[#]: author: (Anderson Silva https://opensource.com/users/ansilva/users/marcobravo/users/alanfdoss/users/ansilva)
+
+Innovations on the Linux desktop: A look at Fedora 30's new features
+======
+Learn about some of the highlights in the latest version of Fedora
+Linux.
+![Fedora Linux distro on laptop][1]
+
+The latest version of Fedora Linux was released at the end of April. As a full-time Fedora user since its original release back in 2003 and an active contributor since 2007, I always find it satisfying to see new features and advancements in the community.
+
+If you want a TL;DR version of what's has changed in [Fedora 30][2], feel free to ignore this article and jump straight to Fedora's [ChangeSet][3] wiki page. Otherwise, keep on reading to learn about some of the highlights in the new version.
+
+### Upgrade vs. fresh install
+
+I upgraded my Lenovo ThinkPad T series from Fedora 29 to 30 using the [DNF system upgrade instructions][4], and so far it is working great!
+
+I also had the chance to do a fresh install on another ThinkPad, and it was a nice surprise to see a new boot screen on Fedora 30—it even picked up the Lenovo logo. I did not see this new and improved boot screen on the upgrade above; it was only on the fresh install.
+
+![Fedora 30 boot screen][5]
+
+### Desktop changes
+
+If you are a GNOME user, you'll be happy to know that Fedora 30 comes with the latest version, [GNOME 3.32][6]. It has an improved on-screen keyboard (handy for touch-screen laptops), brand new icons for core applications, and a new "Applications" panel under Settings that allows users to gain a bit more control on GNOME default handlers, access permissions, and notifications. Version 3.32 also improves Google Drive performance so that Google files and calendar appointments will be integrated with GNOME.
+
+![Applications panel in GNOME Settings][7]
+
+The new Applications panel in GNOME Settings
+
+Fedora 30 also introduces two new Desktop environments: Pantheon and Deepin. Pantheon is [ElementaryOS][8]'s default desktop environment and can be installed with a simple:
+
+
+```
+`$ sudo dnf groupinstall "Pantheon Desktop"`
+```
+
+I haven't used Pantheon yet, but I do use [Deepin][9]. Installation is simple; just run:
+
+
+```
+`$ sudo dnf install deepin-desktop`
+```
+
+then log out of GNOME and log back in, choosing "Deepin" by clicking on the gear icon on the login screen.
+
+![Deepin desktop on Fedora 30][10]
+
+Deepin desktop on Fedora 30
+
+Deepin appears as a very polished, user-friendly desktop environment that allows you to control many aspects of your environment with a click of a button. So far, the only issue I've had is that it can take a few extra seconds to complete login and return control to your mouse pointer. Other than that, it is brilliant! It is the first desktop environment I've used that seems to do high dots per inch (HiDPI) properly—or at least close to correctly.
+
+### Command line
+
+Fedora 30 upgrades the Bourne Again Shell (aka Bash) to version 5.0.x. If you want to find out about every change since its last stable version (4.4), read this [description][11]. I do want to mention that three new environments have been introduced in Bash 5:
+
+
+```
+$ echo $EPOCHSECONDS
+1556636959
+$ echo $EPOCHREALTIME
+1556636968.012369
+$ echo $BASH_ARGV0
+bash
+```
+
+Fedora 30 also updates the [Fish shell][12], a colorful shell with auto-suggestion, which can be very helpful for beginners. Fedora 30 comes with [Fish version 3][13], and you can even [try it out in a browser][14] without having to install it on your machine.
+
+(Note that Fish shell is not the same as guestfish for mounting virtual machine images, which comes with the libguestfs-tools package.)
+
+### Development
+
+Fedora 30 brings updates to the following languages: [C][15], [Boost (C++)][16], [Erlang][17], [Go][18], [Haskell][19], [Python][20], [Ruby][21], and [PHP][22].
+
+Regarding these updates, the most important thing to know is that Python 2 is deprecated in Fedora 30. The community and Fedora leadership are requesting that all package maintainers that still depend on Python 2 port their packages to Python 3 as soon as possible, as the plan is to remove virtually all Python 2 packages in Fedora 31.
+
+### Containers
+
+If you would like to run Fedora as an immutable OS for a container, kiosk, or appliance-like environment, check out [Fedora Silverblue][23]. It brings you all of Fedora's technology managed by [rpm-ostree][24], which is a hybrid image/package system that allows automatic updates and easy rollbacks for developers. It is a great option for anyone who wants to learn more and play around with [Flatpak deployments][25].
+
+Fedora Atomic is no longer available under Fedora 30, but you can still [download it][26]. If your jam is containers, don't despair: even though Fedora Atomic is gone, a brand new [Fedora CoreOS][27] is under development and should be going live soon!
+
+### What else is new?
+
+As of Fedora 30, **/usr/bin/gpg** points to [GnuPG][28] v2 by default, and [NFS][29] server configuration is now located at **/etc/nfs.conf** instead of **/etc/sysconfig/nfs**.
+
+There have also been a [few changes][30] for installation and boot time.
+
+Last but not least, check out [Fedora Spins][31] for a spin of Fedora that defaults to your favorite Window manager and [Fedora Labs][32] for functionally curated software bundles built on Fedora 30 (i.e. astronomy, security, and gaming).
+
+--------------------------------------------------------------------------------
+
+via: https://opensource.com/article/19/5/fedora-30-features
+
+作者:[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/users/marcobravo/users/alanfdoss/users/ansilva
+[b]: https://github.com/lujun9972
+[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/fedora_on_laptop_lead.jpg?itok=XMc5wo_e (Fedora Linux distro on laptop)
+[2]: https://getfedora.org/
+[3]: https://fedoraproject.org/wiki/Releases/30/ChangeSet
+[4]: https://fedoraproject.org/wiki/DNF_system_upgrade#How_do_I_use_it.3F
+[5]: https://opensource.com/sites/default/files/uploads/fedora30_fresh-boot.jpg (Fedora 30 boot screen)
+[6]: https://help.gnome.org/misc/release-notes/3.32/
+[7]: https://opensource.com/sites/default/files/uploads/fedora10_gnome.png (Applications panel in GNOME Settings)
+[8]: https://elementary.io/
+[9]: https://www.deepin.org/en/dde/
+[10]: https://opensource.com/sites/default/files/uploads/fedora10_deepin.png (Deepin desktop on Fedora 30)
+[11]: https://git.savannah.gnu.org/cgit/bash.git/tree/NEWS
+[12]: https://fishshell.com/
+[13]: https://fishshell.com/release_notes.html
+[14]: https://rootnroll.com/d/fish-shell/
+[15]: https://docs.fedoraproject.org/en-US/fedora/f30/release-notes/developers/Development_C/
+[16]: https://docs.fedoraproject.org/en-US/fedora/f30/release-notes/developers/Development_Boost/
+[17]: https://docs.fedoraproject.org/en-US/fedora/f30/release-notes/developers/Development_Erlang/
+[18]: https://docs.fedoraproject.org/en-US/fedora/f30/release-notes/developers/Development_Go/
+[19]: https://docs.fedoraproject.org/en-US/fedora/f30/release-notes/developers/Development_Haskell/
+[20]: https://docs.fedoraproject.org/en-US/fedora/f30/release-notes/developers/Development_Python/
+[21]: https://docs.fedoraproject.org/en-US/fedora/f30/release-notes/developers/Development_Ruby/
+[22]: https://docs.fedoraproject.org/en-US/fedora/f30/release-notes/developers/Development_Web/
+[23]: https://silverblue.fedoraproject.org/
+[24]: https://rpm-ostree.readthedocs.io/en/latest/
+[25]: https://flatpak.org/setup/Fedora/
+[26]: https://getfedora.org/en/atomic/
+[27]: https://coreos.fedoraproject.org/
+[28]: https://gnupg.org/index.html
+[29]: https://en.wikipedia.org/wiki/Network_File_System
+[30]: https://docs.fedoraproject.org/en-US/fedora/f30/release-notes/sysadmin/Installation/
+[31]: https://spins.fedoraproject.org
+[32]: https://labs.fedoraproject.org/
diff --git a/sources/tech/20190508 Why startups should release their code as open source.md b/sources/tech/20190508 Why startups should release their code as open source.md
new file mode 100644
index 0000000000..f877964b5f
--- /dev/null
+++ b/sources/tech/20190508 Why startups should release their code as open source.md
@@ -0,0 +1,79 @@
+[#]: collector: (lujun9972)
+[#]: translator: ( )
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (Why startups should release their code as open source)
+[#]: via: (https://opensource.com/article/19/5/startups-release-code)
+[#]: author: (Clément Flipo https://opensource.com/users/cl%C3%A9ment-flipo)
+
+Why startups should release their code as open source
+======
+Dokit wondered whether giving away its knowledge as open source was a
+bad business decision, but that choice has been the foundation of its
+success.
+![open source button on keyboard][1]
+
+It's always hard to recall exactly how a project started, but sometimes that can help you understand that project more clearly. When I think about it, our platform for creating user guides and documentation, [Dokit][2], came straight out of my childhood. Growing up in a house where my toys were Meccano and model airplane kits, the idea of making things, taking individual pieces and putting them together to create a new whole, was always a fundamental part of what it meant to play. My father worked for a DIY company, so there were always signs of building, repair, and instruction manuals around the house. When I was young, my parents sent me to join the Boy Scouts, where we made tables, tents and mud ovens, which helped foster my enjoyment of shared learning that I later found in the open source movement.
+
+The art of repairing things and recycling products that I learned in childhood became part of what I did for a job. Then it became my ambition to take the reassuring feel of learning how to make and do and repair at home or in a group—but put it online. That inspired Dokit's creation.
+
+### The first months
+
+It hasn't always been easy, but since founding our company in 2017, I've realized that the biggest and most worthwhile goals are generally always difficult. If we were to achieve our plan to revolutionize the way [old-fashioned manuals and user guides are created and published][3], and maximize our impact in what we knew all along would be a niche market, we knew that a guiding mission was crucial to how we organized everything else. It was from there that we reached our first big decision: to [quickly launch a proof of concept using an existing open source framework][4], MediaWiki, and from there to release all of our code as open source.
+
+In retrospect, this decision was made easier by the fact that [MediaWiki][5] was already up and running. With 15,000 developers already active around the world and on a platform that included 90% of the features we needed to meet our minimum viable product (MVP), things would have no doubt been harder without support from the engine that made its name by powering Wikipedia. Confluence, a documentation platform in use by many enterprises, offers some good features, but in the end, it was an easy choice between the two.
+
+Placing our faith in the community, we put the first version of our platform straight onto GitHub. The excitement of watching the world's makers start using our platform, even before we'd done any real advertising, felt like an early indication that we were on the right track. Although the [maker and Fablab movements][6] encourage users to share instructions, and even sets out this expectation in the [Fablab charter][7] (as stated by MIT), in reality, there is a lack of real documentation.
+
+The first and most significant reason people like using our platform is that it responds to the very real problem of poor documentation inside an otherwise great movement—one that we knew could be even better. To us, it felt a bit like we were repairing a gap in the community of makers and DIY. Within a year of our launch, Fablabs, [Wikifab][8], [Open Source Ecology][9], [Les Petits Debrouillards][10], [Ademe][11], and [Low-Tech Lab][12] had installed our tool on their servers for creating step-by-step tutorials.
+
+Before even putting out a press release, one of our users, Wikifab, began to get praise in national media as "[the Wikipedia of DIY][13]." In just two years, we've seen hundreds of communities launched on their own Dokits, ranging from the fun to the funny to the more formal product guides. Again, the power of the community is the force we want to harness, and it's constantly amazing to see projects—ranging from wind turbines to pet feeders—develop engaging product manuals using the platform we started.
+
+### Opening up open source
+
+Looking back at such a successful first two years, it's clear to us that our choice to use open source was fundamental to how we got where we are as fast as we did. The ability to gather feedback in open source is second-to-none. If a piece of code didn't work, [someone could tell us right away][14]. Why wait on appointments with consultants if you can learn along with those who are already using the service you created?
+
+The level of engagement from the community also revealed the potential (including the potential interest) in our market. [Paris has a good and growing community of developers][15], but open source took us from a pool of a few thousand locally, and brought us to millions of developers all around the world who could become a part of what we were trying to make happen. The open availability of our code also proved reassuring to our users and customers who felt safe that, even if our company went away, the code wouldn't.
+
+If that was most of what we thought might happen as a result of using open source, there were also surprises along the way. By adopting an open method, we found ourselves gaining customers, reputation, and perfectly targeted advertising that we didn't have to pay for out of our limited startup budget. We found that the availability of our code helped improve our recruitment process because we were able to test candidates using our code before we made hires, and this also helped simplify the onboarding journey for those we did hire.
+
+In what we see as a mixture of embarrassment and solidarity, the totally public nature of developers creating code in an open setting also helped drive up quality. People can share feedback with one another, but the public nature of the work also seems to encourage people to do their best. In the spirit of constant improvement and of continually building and rebuilding how Dokit works, supporting the community is something that we know we'd like to do more of and get better at in future.
+
+### Where to next?
+
+Even with the faith we've always had in what we were doing, and seeing the great product manuals that have been developed using our software, it never stops being exciting to see our project grow, and we're certain that the future has good things in store.
+
+In the early days, we found ourselves living a lot under the fear of distributing our knowledge for free. In reality, it was the opposite—open source gave us the ability to very rapidly build a startup that was sustainable from the beginning. Dokit is a platform designed to give its users the confidence to build, assemble, repair, and create entirely new inventions with the support of a community. In hindsight, we found we were doing the same thing by using open source to build a platform.
+
+Just like when doing a repair or assembling a physical product, it's only when you have confidence in your methods that things truly begin to feel right. Now, at the beginning of our third year, we're starting to see growing global interest as the industry responds to [new generations of customers who want to use, reuse, and assemble products][16] that respond to changing homes and lifestyles. By providing the support of an online community, we think we're helping to create circumstances in which people feel more confident in doing things for themselves.
+
+--------------------------------------------------------------------------------
+
+via: https://opensource.com/article/19/5/startups-release-code
+
+作者:[Clément Flipo][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/cl%C3%A9ment-flipo
+[b]: https://github.com/lujun9972
+[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/button_push_open_keyboard_file_organize.png?itok=KlAsk1gx (open source button on keyboard)
+[2]: https://dokit.io/
+[3]: https://dokit.io/9-reasons-to-stop-writing-your-user-manuals-or-work-instructions-with-word-processors/
+[4]: https://medium.com/@gofloaters/5-cheap-ways-to-build-your-mvp-71d6170d5250
+[5]: https://en.wikipedia.org/wiki/MediaWiki
+[6]: https://en.wikipedia.org/wiki/Maker_culture
+[7]: http://fab.cba.mit.edu/about/charter/
+[8]: https://wikifab.org/
+[9]: https://www.opensourceecology.org/
+[10]: http://www.lespetitsdebrouillards.org/
+[11]: https://www.ademe.fr/en
+[12]: http://lowtechlab.org/
+[13]: https://www.20minutes.fr/magazine/economie-collaborative-mag/2428995-20160919-pour-construire-leurs-meubles-eux-memes-ils-creent-le-wikipedia-du-bricolage
+[14]: https://opensource.guide/how-to-contribute/
+[15]: https://www.rudebaguette.com/2013/03/here-are-the-details-on-the-new-developer-school-that-xavier-niel-is-launching-tomorrow/?lang=en
+[16]: https://www.inc.com/ari-zoldan/why-now-is-the-best-time-to-start-a-diy-home-based.html
diff --git a/sources/tech/20190509 5 essential values for the DevOps mindset.md b/sources/tech/20190509 5 essential values for the DevOps mindset.md
new file mode 100644
index 0000000000..4746d2ffaa
--- /dev/null
+++ b/sources/tech/20190509 5 essential values for the DevOps mindset.md
@@ -0,0 +1,85 @@
+[#]: collector: (lujun9972)
+[#]: translator: ( )
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (5 essential values for the DevOps mindset)
+[#]: via: (https://opensource.com/article/19/5/values-devops-mindset)
+[#]: author: (Brent Aaron Reed https://opensource.com/users/brentaaronreed/users/wpschaub/users/wpschaub/users/wpschaub/users/cobiacomm/users/marcobravo/users/brentaaronreed)
+
+5 essential values for the DevOps mindset
+======
+People and process take more time but are more important than any
+technology "silver bullet" in solving business problems.
+![human head, brain outlined with computer hardware background][1]
+
+Many IT professionals today struggle with adapting to change and disruption. Are you struggling with just trying to keep the lights on, so to speak? Do you feel overwhelmed? This is not uncommon. Today, the status quo is not enough, so IT constantly tries to re-invent itself.
+
+With over 30 years of combined IT experience, we have witnessed how important people and relationships are to IT's ability to be effective and help the business thrive. However, most of the time, our conversations about IT solutions start with technology rather than people and process. The propensity to look for a "silver bullet" to address business and IT challenges is far too common. But you can't just buy innovation, DevOps, or effective teams and ways of working; they need to be nurtured, supported, and guided.
+
+With disruption so prevalent and there being such a critical demand for speed of change, we need both discipline and guardrails. The five essential values for the DevOps mindset, described below, will support the practices that will get us there. These values are not new ideas; they are refactored as we've learned from our experience. Some of the values may be interchangeable, they are flexible, and they guide overall principles that support (like a pillar) these five values.
+
+![5 essential values for the DevOps mindset][2]
+
+### 1\. Feedback from stakeholders is essential
+
+How do we know if we are creating more value for us than for our stakeholders? We need persistent quality data to analyze, inform, and drive better decisions. Relevant information from trusted sources is vital for any business to thrive. We need to listen to and understand what our stakeholders are saying—and not saying—and we need to implement changes in a way that enables us to adjust our thinking—and our processes and technologies—and adapt them as needed to delight our stakeholders. Too often, we see little change, or lots of change for the wrong reasons, because of incorrect information (data). Therefore, aligning change to our stakeholders' feedback is an essential value and helps us focus on what is most important to making our company successful.
+
+> Focus on our stakeholders and their feedback rather than simply changing for the sake of change.
+
+### 2\. Improve beyond the limits of today's processes
+
+We want our products and services to continuously delight our customers—our most important stakeholders—therefore, we need to improve continually. This is not only about quality; it could also mean costs, availability, relevance, and many other goals and factors. Creating repeatable processes or utilizing a common framework is great—they can improve governance and a host of other issues—however, that should not be our end goal. As we look for ways to improve, we must adjust our processes, complemented by the right tech and tools. There may be reasons to throw out a "so-called" framework because not doing so could add waste—or worse, simply "cargo culting" (doing something with of no value or purpose).
+
+> Strive to always innovate and improve beyond repeatable processes and frameworks.
+
+### 3\. No new silos to break down silos
+
+Silos and DevOps are incompatible. We see this all the time: an IT director brings in so-called "experts" to implement agile and DevOps, and what do they do? These "experts" create a new problem on top of the existing problem, which is another silo added to an IT department and a business riddled with silos. Creating "DevOps" titles goes against the very principles of agile and DevOps, which are based on the concept of breaking down silos. In both agile and DevOps, teamwork is essential, and if you don't work in a self-organizing team, you're doing neither of them.
+
+> Inspire and share collaboratively instead of becoming a hero or creating a silo.
+
+### 4\. Knowing your customer means cross-organization collaboration
+
+No part of the business is an independent entity because they all have stakeholders, and the primary stakeholder is always the customer. "The customer is always right" (or the king, as I like to say). The point is, without the customer, there really is no business, and to stay in business today, we need to "differentiate" from our competitors. We also need to know how our customers feel about us and what they want from us. Knowing what the customer wants is imperative and requires timely feedback to ensure the business addresses these primary stakeholders' needs and concerns quickly and responsibly.
+
+![Minimize time spent with build-measure-learn process][3]
+
+Whether it comes from an idea, a concept, an assumption, or direct stakeholder feedback, we need to identify and measure the feature or service our product delivers by using the explore, build, test, deliver lifecycle. Fundamentally, this means that we need to be "plugged into" our organization across the organization. There are no borders in continuous innovation, learning, and DevOps. Thus when we measure across the enterprise, we can understand the whole and take actionable, meaningful steps to improve.
+
+> Measure performance across the organization, not just in a line of business.
+
+### 5\. Inspire adoption through enthusiasm
+
+Not everyone is driven to learn, adapt, and change; however, just like smiles can be infectious, so can learning and wanting to be part of a culture of change. Adapting and evolving within a culture of learning provides a natural mechanism for a group of people to learn and pass on information (i.e., cultural transmission). Learning styles, attitudes, methods, and processes continually evolve so we can improve upon them. The next step is to apply what was learned and improved and share the information with colleagues. Learning does not happen automatically; it takes effort, evaluation, discipline, awareness, and especially communication; unfortunately these are things that tools and automation alone will not provide. Review your processes, automation, tool strategies, and implementation work, make it transparent, and collaborate with your colleagues on reuse and improvement.
+
+> Promote a culture of learning through lean quality deliverables, not just tools and automation.
+
+### Summary
+
+![Continuous goals of DevOps mindset][4]
+
+As our companies adopt DevOps, we continue to champion these five values over any book, website, or automation software. It takes time to adopt this mindset, and this is very different than what we used to do as sysadmins. It's a wholly new way of working that will take many years to mature. Do these principles align with your own? Share them in the comments or on our website, [Agents of chaos][5].
+
+* * *
+
+Can you really do DevOps without sharing scripts or code? DevOps manifesto proponents value cross-...
+
+--------------------------------------------------------------------------------
+
+via: https://opensource.com/article/19/5/values-devops-mindset
+
+作者:[Brent Aaron Reed][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/brentaaronreed/users/wpschaub/users/wpschaub/users/wpschaub/users/cobiacomm/users/marcobravo/users/brentaaronreed
+[b]: https://github.com/lujun9972
+[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/brain_data.png?itok=RH6NA32X (human head, brain outlined with computer hardware background)
+[2]: https://opensource.com/sites/default/files/uploads/devops_mindset_values.png (5 essential values for the DevOps mindset)
+[3]: https://opensource.com/sites/default/files/uploads/devops_mindset_minimze-time.jpg (Minimize time spent with build-measure-learn process)
+[4]: https://opensource.com/sites/default/files/uploads/devops_mindset_continuous.png (Continuous goals of DevOps mindset)
+[5]: http://agents-of-chaos.org
diff --git a/sources/tech/20190509 A day in the life of an open source performance engineering team.md b/sources/tech/20190509 A day in the life of an open source performance engineering team.md
new file mode 100644
index 0000000000..373983e8bc
--- /dev/null
+++ b/sources/tech/20190509 A day in the life of an open source performance engineering team.md
@@ -0,0 +1,138 @@
+[#]: collector: (lujun9972)
+[#]: translator: ( )
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (A day in the life of an open source performance engineering team)
+[#]: via: (https://opensource.com/article/19/5/life-performance-engineer)
+[#]: author: (Aakarsh Gopi https://opensource.com/users/aakarsh/users/portante/users/anaga/users/gameloid)
+
+A day in the life of an open source performance engineering team
+======
+Collaborating with the community enables performance engineering to
+address the confusion and complexity that come with working on a broad
+spectrum of products.
+![Team checklist and to dos][1]
+
+In today's world, open source software solutions are a collaborative effort of the community. Can a performance engineering team operate the same way, by collaborating with the community to address the confusion and complexity that come with working on a broad spectrum of products?
+
+To answer that question, we need to explore some basic questions:
+
+ * What does a performance engineering team do?
+ * How does a performance engineering team fulfill its responsibilities?
+ * How are open source tools developed or leveraged for performance analysis?
+
+
+
+The term "performance engineering" has different meanings, which causes difficulty in figuring out a performance engineering team's responsibilities. Adding to the confusion, a team may be charged with working on a broad spectrum of products, ranging from an operating system like RHEL, whose performance can be significantly impacted by hardware components (CPU caches, network interface controllers, disk technologies, etc.), to something much higher up in the stack like Kubernetes, which comes with the added challenges of operating at scale without compromising on performance.
+
+Performance engineering has progressed a lot since the days of running manual A/B testing and single-system benchmarks. Now, these teams test cloud infrastructures and add machine learning classifiers as a component in the CI/CD pipeline for identifying performance regression in releases of products.
+
+### What does a performance engineering team do?
+
+A performance engineering team is generally responsible for the following (among other things):
+
+ * Identifying potential performance issues
+ * Identifying any scale issues that could occur
+ * Developing tuning guides and/or tools that would enable the user to achieve the most out of a product
+ * Developing guides and/or working with customers to help with capacity planning
+ * Providing customers with performance expectations for different use cases of the product
+
+
+
+The mission of our specific team is to:
+
+ * Establish performance and scale leadership of the Red Hat portfolio; the scope includes component level, system, and solution analysis
+ * Collaborate with engineering, product management, product marketing, and Customer Experience and Engagement (CEE), as well as hardware and software partners
+ * Deliver public-facing guidance, internal enablement, and continuous integration tests
+
+
+
+Our team fulfills our mission in the following ways:
+
+ * We work with product teams to set performance goals and develop performance tests to run against those products deployed to see how they measure up to those goals.
+ * We also work to re-run performance tests to ensure there are no regressions in behaviors.
+ * We develop open source tooling to achieve our product performance goals, making them available to the communities where the products are derived to re-create what we do.
+ * We work to be transparent and open about how we do performance engineering; sharing these methods and approaches benefits communities, allowing them to reuse our work, and benefits us by leveraging the work they contribute with these tools.
+
+
+
+### How does a performance engineering team fulfill its responsibilities?
+
+Meeting these responsibilities requires collaboration with other teams, such as product management, development, QA/QE, documentation, and consulting, and with the communities.
+
+_Collaboration_ allows a team to be successful by pulling together team members' diverse knowledge and experience. A performance engineering team builds tools to share their knowledge both within the team and with the community, furthering the value of collaboration.
+
+Our performance engineering team achieves success through:
+
+ * **Collaboration:** _Intra_ -team collaboration is as important as _inter_ -team collaboration for our performance engineering team
+ * Most performance engineers tend to create a niche for themselves in one or more sub-disciplines of performance engineering via tooling, performance analysis, systems knowledge, systems configuration, and such. Our team is composed of engineers with knowledge of setting up/configuring systems across the product stack, those who know how a configuration option would affect the system's performance, and so on. Our team's success is heavily reliant on effective collaboration between performance engineers on the team.
+ * Our team works closely with other organizations at various levels within Red Hat and the communities where our products are derived.
+ * **Knowledge:** To understand the performance implications of configuration and/or system changes, deep knowledge of the product alone is not sufficient.
+ * Our team has the knowledge to cover performance across all levels of the stack:
+ * Hardware setup and configuration
+ * Networking and scale considerations
+ * Operating system setup and configuration (Linux kernel, userspace stack)
+ * Storage sub-systems (Ceph)
+ * Cloud infrastructure (OpenStack, RHV)
+ * Cloud deployments (OpenShift/Kubernetes)
+ * Product architectures
+ * Software technologies (databases like Postgres; software-defined networking and storage)
+ * Product interactions with the underlying hardware
+ * Tooling to monitor and accomplish repeatable benchmarking
+ * **Tooling:** The differentiator for our performance engineering team is the data collected through its tools to help tackle performance analysis complexity in the environments where our products are deployed.
+
+
+
+### How are open source tools developed or leveraged for performance analysis?
+
+Tooling is no longer a luxury but a need for today's performance engineering teams. With today's product solutions being so complex (and increasing in complexity as more solutions are composed to solve ever-larger problems), we need tools to help us run performance test suites in a repeatable manner, collect data about those runs, and help us distill that data so it becomes understandable and usable.
+
+Yet, no performance engineering team is judged on how performance analysis is done, but rather on the results achieved from this analysis.
+
+This tension can be resolved by collaboratively developing tools. A performance engineering team can't spend all its time developing tools, since that would prevent it from effectively collecting data. By developing its tools in a collaborative manner, a team can leverage work from the community to make further progress while still generating the result by which they will be measured.
+
+Tooling is the backbone of our performance engineering team, and we strive to use the tools already available upstream. When no tools are available in the community that fit our needs, we've built tools that help us achieve our goals and made them available to the community. Open sourcing our tools has helped us immensely because we receive contributions from our competitors and partners, allowing us to solve problems collectively through collaboration.
+
+![Performance Engineering Tools][2]
+
+Following are some of the tools our team has contributed to and rely upon for our work:
+
+ * **[Perf-c2c][3]:** Is your performance impacted by false sharing in CPU caches? The perf-c2c tool can help you tackle this problem by helping you inspect the cache lines where false sharing is detected and understand the readers/writers accessing those cache lines along with the offsets where those accesses occurred. You can read more about this tool on [Joe Mario's blog][4].
+ * **[Pbench][5]:** Do you repeat the same steps when collecting data about performance, but fail to do it consistently? Or do you find it difficult to compare results with others because you're collecting different configuration data? Pbench is a tool that attempts to standardize the way data is collected for performance so comparisons and historical reviews are much easier. Pbench is at the heart of our tooling efforts, as most of the other tools consume it in some form. Pbench is a Swiss Army Knife, as it allows the user to run benchmarks such as fio, uperf, or custom, user-defined tests while gathering metrics through tools such as sar, iostat, and pidstat, standardizing the methods of collecting configuration data about the environment. Pbench provides a dashboard UI to help review and analyze the data collected.
+ * **[Browbeat][6]:** Do you want to monitor a complex environment such as an OpenStack cluster while running tests? Browbeat is the solution, and its power lies in its ability to collect comprehensive data, ranging from logs to system metrics, about an OpenStack cluster while it orchestrates workloads. Browbeat can also monitor the OpenStack cluster while users run test/workloads of their choice either manually or through their own automation.
+ * **[Ripsaw][7]:** Do you want to compare the performance of different Kubernetes distros against the same platform? Do you want to compare the performance of the same Kubernetes distros deployed on different platforms? Ripsaw is a relatively new tool created to run workloads through Kubernetes native calls using the Ansible operator framework to provide solutions to the above questions. Ripsaw's unique selling point is that it can run against any kind of Kubernetes distribution, thus it would run the same against a Kubernetes cluster, on Minikube, or on an OpenShift cluster deployed on OpenStack or bare metal.
+ * **[ClusterLoader][8]:** Ever wondered how an OpenShift component would perform under different cluster states? If you are looking for an answer that can stress the cluster, ClusterLoader will help. The team has generalized the tool so it can be used with any Kubernetes distro. It is currently hosted in the [perf-tests repository][9].
+
+
+
+### Bottom line
+
+Given the scale at which products are evolving rapidly, performance engineering teams need to build tooling to help them keep up with products' evolution and diversification.
+
+Open source-based software solutions are a collaborative effort of the community. Our performance engineering team operates in the same way, collaborating with the community to address the confusion and complexity that comes with working on a broad spectrum of products. By developing our tools in a collaborative manner and using tools from the community, we are leveraging the community's work to make progress, while still generating the results we are measured on.
+
+_Collaboration_ is our key to accomplish our goals and ensure the success of our team.
+
+--------------------------------------------------------------------------------
+
+via: https://opensource.com/article/19/5/life-performance-engineer
+
+作者:[Aakarsh Gopi ][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/aakarsh/users/portante/users/anaga/users/gameloid
+[b]: https://github.com/lujun9972
+[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/todo_checklist_team_metrics_report.png?itok=oB5uQbzf (Team checklist and to dos)
+[2]: https://opensource.com/sites/default/files/uploads/performanceengineeringtools.png (Performance Engineering Tools)
+[3]: http://man7.org/linux/man-pages/man1/perf-c2c.1.html
+[4]: https://joemario.github.io/blog/2016/09/01/c2c-blog/
+[5]: https://github.com/distributed-system-analysis/pbench
+[6]: https://github.com/openstack/browbeat
+[7]: https://github.com/cloud-bulldozer/ripsaw
+[8]: https://github.com/openshift/origin/tree/master/test/extended/cluster
+[9]: https://github.com/kubernetes/perf-tests/tree/master/clusterloader
diff --git a/sources/tech/20190509 Query freely available exchange rate data with ExchangeRate-API.md b/sources/tech/20190509 Query freely available exchange rate data with ExchangeRate-API.md
new file mode 100644
index 0000000000..3db9708c81
--- /dev/null
+++ b/sources/tech/20190509 Query freely available exchange rate data with ExchangeRate-API.md
@@ -0,0 +1,162 @@
+[#]: collector: (lujun9972)
+[#]: translator: ( )
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (Query freely available exchange rate data with ExchangeRate-API)
+[#]: via: (https://opensource.com/article/19/5/exchange-rate-data)
+[#]: author: (Chris Hermansen https://opensource.com/users/clhermansen)
+
+Query freely available exchange rate data with ExchangeRate-API
+======
+In this interview, ExchangeRate-API's founder explains why exchange rate
+data should be freely accessible to developers who want to build useful
+stuff.
+![scientific calculator][1]
+
+Last year, [I wrote about][2] using the Groovy programming language to access foreign exchange rate data from an API to simplify my expense records. I showed how two exchange rate sites, [fixer.io][3] and apilayer.net (now [apilayer.com][4]), could provide the data I needed, allowing me to convert between Indian rupees (INR) and Canadian dollars (CAD) using the former, and Chilean pesos (CLP) and Canadian dollars using the latter.
+
+Recently, David over at [ExchangeRate-API.com][5] reached out to me to say, "the free API you mentioned (Fixer) has been bought by CurrencyLayer and had its no-signup/unlimited access deprecated." He also told me, "I run a free API called ExchangeRate-API.com that has the same JSON format as the original Fixer, doesn't require any signup, and allows unlimited requests."
+
+After exchanging a few emails, we decided to turn our conversation into an interview. Below the interview, you can find scripts and usage instructions. (The interview has been edited slightly for clarity.)
+
+### About ExchangeRate-API
+
+_**Chris:** How is ExchangeRate-API different from other online exchange-rate services? What motivates you to provide this service?_
+
+**David:** When I started ExchangeRate-API with a friend in 2010, we built and released it for free because we really needed this service for another project and couldn't find one despite extensive googling. There are now around 20 such APIs offering quite a few different approaches. Over the years, I've tried a number of different approaches, but offering quality data for free has always proven the most popular. I'm also motivated by the thought that this data should be freely accessible to developers who want to build useful stuff even if they don't have a budget.
+
+Thus, the main difference with our currency conversion API is that it's unlimited and requires no signup. This also makes starting to use it really fast—you literally just copy the endpoint URL and you're good to go.
+
+There are one or two other free and unlimited APIs, but these typically just serve the daily reference rates provided by the European Central Bank. ExchangeRate-API collects the public reference rates from a number of central banks and then blends them to reduce the risk of outlying values. It also does acceptance checking to ensure the rates aren't wildly wrong (for instance an inverted data capture recording US dollars to CLP instead of CLP to USD) and weights different sources based on their historical accuracy. This makes the service quite reliable. I'm currently working on a transparency project to compare and show the accuracy of this public reference rate blend against a proprietary data source so potential users can make more informed decisions on what type of currency data service is right for them.
+
+_**Chris:** I'm delighted that you've included Canadian dollars and Indian rupees, as that is one problem I need to solve. I'm sad to see that you don't have Chilean pesos (another problem I need to solve). Can you tell us how you select the list of currencies? Do you anticipate adding other currencies to your list?_
+
+**David:** Since my main aim for this service is to offer stable and reliable exchange rate data, I only include currencies when there is more than one data source for that currency code. For instance, after you mentioned that you're looking for CLP data, I added the daily reference rates published by the Central Bank of Chile to our system. If I can find another source that includes CLP, it would be included in our list of supported currencies, but until then, unfortunately not. The goal is to support as many currencies as possible.
+
+One thing to note is that, for some currencies, the service has the minimum two sources, but a few currency pairs (for instance USD/EUR) are included in almost every set of public reference rates. The transparent accuracy project I mentioned will hopefully make this difference clear so that users can understand why our USD/EUR rate might be more accurate than less common pairs like CLP/INR and also the degree of variance in accuracy between the pairs. It will take some work to make showing this information quick and easy to understand.
+
+### The API's architecture
+
+_**Chris:** Can you tell us a bit about your API's architecture? Do you use open source components to deliver your service?_
+
+**David:** I exclusively use open source software to run ExchangeRate-API. I'm definitely an open source enthusiast and am always getting friends to switch to open source, explaining licenses, and donating when I can to the projects I use most. I also try to email maintainers of projects I use to say thanks, but I don't do this enough.
+
+The stack is currently Ubuntu LTS, MariaDB, Nginx, PHP 7, and Memcached. I also use Bootstrap and Picnic open source CSS frameworks. I use Let's Encrypt for HTTPS certificates via the Electronic Frontier Foundation's open source ACME client, [Certbot][6]. The service makes extensive use of classic tools like UFW/iptables, cURL, OpenSSH, and Git.
+
+My approach is typically to keep everything as simple as possible while using the tried-and-tested open source building blocks. For a project that aims to _always_ be available for users to convert currencies, this feels like the best route to reliability. I love reading about innovative new projects that could be useful for a project like this (for example, CockroachDB), but I wouldn't use them until they are considered really bulletproof. Obviously, things like [Heartbleed][7] show that there are risks with "boring" projects too—but I think these are easier to manage than the potential for unknown risks with newer, cutting-edge projects.
+
+In terms of the infrastructure setup, I've steadily built and improved the system over the last nine years, and it now comprises roughly three tiers. The main cluster runs on Amazon Web Services (AWS) and consists of Ubuntu EC2 servers and a high-availability MariaDB relational database service (RDS) instance. The EC2 instances are spread across multiple AWS Availability Zones and fronted by the managed AWS Elastic Load Balancing (ELB) service. Between the RDS database instance with automated cross-zone failover and the ELB-fronted EC2 instances spread across availability zones, this setup is exceptionally available. It is, however, only in one locale. So I've set up a second tier of virtual private server (VPS) instances in different geographic locations to reduce latency and distribute the load away from the more expensive AWS infrastructure. These are currently with Linode, but I have also used DigitalOcean and Vultr recently.
+
+Finally, this is all protected behind Cloudflare. With a free service, it's inevitable that some users will choose to abuse the system, and Cloudflare is an amazing product that's vital to ExchangeRate-API. Our servers can be protected and our users get low-latency, in-region caches. Cloudflare is set up with both the load balancing and traffic steering products to reduce latency and instantly shift traffic from unhealthy parts of the infrastructure to available origins.
+
+With this very redundant approach, there hasn't been downtime as a result of infrastructure problems or user load for around three years. The few periods of degraded service experienced in this time are all due to issues with code, deployment strategy, or config mistakes. The setup currently handles hundreds of millions of requests per month with low load levels and manageable costs, so there's plenty of room for growth.
+
+The actual application code is PHP with heavy use of Memcached. Memcached is an amazing open source project started by Brad Fitzpatrick in 2003. It's not particularly glamorous, but it is an incredibly reliable and performant distributed in-memory key value store.
+
+### Engaging with the open source community
+
+_**Chris:** There is an impressive amount of open source in your configuration. How do you engage with the broader community of users in these projects?_
+
+**David:** I really struggle with the best way to be a good open source citizen while running a side project SaaS. I've considered building an open source library of some sort and releasing it, but I haven't thought of something that hasn't already been done and that I would be able to make the time commitment to reliably maintain. I'd only start a project like this if I could be confident I'd have the time to ensure users who choose the project wouldn't suddenly find themselves depending on abandonware. I've also looked into contributing to the projects that ExchangeRate-API depends on, but since I only use the biggest, most established options, I lack the expertise to make a meaningful contribution to such serious projects.
+
+I'm currently working on a new "Pro" plan for the service and I'm going to set a percentage of this income to donate to my open source dependencies. This still feels like a bandage though—answering this question makes me realize I need to put more time into starting an open source project that calls ExchangeRate-API home!
+
+### Looking ahead
+
+_**Chris:** We can only query the latest exchange rate, but it appears that you may be offering historical rates sometime later this year. Can you tell us more about the technical challenges with serving up historical data?_
+
+**David:** There is a dataset of historical rates blended using our same algorithm from multiple central bank reference sets. However, I stopped new signups for it due to some issues with the data quality. The dataset reaches back to 1990, and there were a few earlier periods that need better data validation. As such, I'm building a better system for checking and comparing the data as it's ingested as well as adding an additional data source. The plan is to have a clean and more comprehensively verified-as-accurate dataset available later this year.
+
+In terms of the technical side of things, historical data is slightly more complex than live data. Compared to the live dataset (which is just a few bytes) the historical data is millions of database rows. This data was originally served from the database infrastructure with a long time-to-live (TTL) intermediary-caching layer. This was largely performant but struggled in situations where users wanted to dump the entire dataset as fast as the network could handle it. If the cache was sufficiently warm, this was fine, but if reboots, new server deployments, etc. had taken place recently, these big request sets would "miss" enough on the cache that the database would have problematic load spikes.
+
+Obviously, the goal is an infrastructure that can handle even aggressive use cases with normal performance, so the new historical rates dataset will be accompanied by a preemptive in-memory cache rather than a request-driven one. Thankfully, RAM is cheap these days, and putting a couple hundred megabytes of data entirely into RAM is a plausible approach even for a small project like ExchangeRate-API.com.
+
+_**Chris:** It sounds like you've been through quite a few iterations of this service to get to where it is today! Where do you see it going in the next few years?_
+
+**David:** I'd aim for it to have reached coverage of every world currency so that anyone looking for this sort of software can easily and programmatically get the exchange rates they need for free.
+
+I'd also definitely like to have an affordable Pro plan that really resonates with users. Getting this right would mean better infrastructure and lower latency for free users as well.
+
+Finally, I'd like to have some sort of useful open source library under the ExchangeRate-API banner. Starting a small project that finds an enthusiastic community would be really rewarding. It's great to run something that's free-as-in-beer, but it would be even better if part of it was free-as-in-speech, as well.
+
+### How to use the service
+
+It's easy enough to test out the service using **wget** , as follows:
+
+
+```
+clh@marseille:~$ wget -O -
+\--2019-04-26 13:48:23--
+Resolving api.exchangerate-api.com (api.exchangerate-api.com)... 2606:4700:20::681a:c80, 2606:4700:20::681a:d80, 104.26.13.128, ...
+Connecting to api.exchangerate-api.com (api.exchangerate-api.com)|2606:4700:20::681a:c80|:443... connected.
+HTTP request sent, awaiting response... 200 OK
+Length: unspecified [application/json]
+Saving to: ‘STDOUT’
+
+\- [<=>
+] 0 --.-KB/s {"base":"INR","date":"2019-04-26","time_last_updated":1556236800,"rates":{"INR":1,"AUD":0.020343,"BRL":0.056786,"CAD":0.019248,"CHF":0.014554,"CNY":0.096099,"CZK":0.329222,"DKK":0.095497,"EUR":0.012789,"GBP":0.011052,"HKD":0.111898,"HUF":4.118615,"IDR":199.61769,"ILS":0.051749,"ISK":1.741659,"JPY":1.595527,"KRW":16.553091,"MXN":0.272383,"MYR":0.058964,"NOK":0.123365,"NZD":0.02161,"PEN":0.047497,"PHP":0.744974,"PLN":0.054927,"RON":0.060923,"RUB":0.921808,"SAR":0.053562,"SEK":0.135226,"SGD":0.019442,"THB":0.457501,"TRY":0- [ <=> ] 579 --.-KB/s in 0s
+
+2019-04-26 13:48:23 (15.5 MB/s) - written to stdout [579]
+
+clh@marseille:~$
+```
+
+The result is returned as a JSON payload, giving conversion rates from Indian rupees (the currency I requested in the URL) to all the currencies handled by ExchangeRate-API.
+
+The Groovy shell can access the API:
+
+
+```
+clh@marseille:~$ groovysh
+Groovy Shell (2.5.3, JVM: 1.8.0_212)
+Type ':help' or ':h' for help.
+\----------------------------------------------------------------------------------------------------------------------------------
+groovy:000> import groovy.json.JsonSlurper
+===> groovy.json.JsonSlurper
+groovy:000> result = (new JsonSlurper()).parse(
+groovy:001> new InputStreamReader((new URL('))
+groovy:002> )
+===> [base:INR, date:2019-04-26, time_last_updated:1556236800, rates:[INR:1, AUD:0.020343, BRL:0.056786, CAD:0.019248, CHF:0.014554, CNY:0.096099, CZK:0.329222, DKK:0.095497, EUR:0.012789, GBP:0.011052, HKD:0.111898, HUF:4.118615, IDR:199.61769, ILS:0.051749, ISK:1.741659, JPY:1.595527, KRW:16.553091, MXN:0.272383, MYR:0.058964, NOK:0.123365, NZD:0.02161, PEN:0.047497, PHP:0.744974, PLN:0.054927, RON:0.060923, RUB:0.921808, SAR:0.053562, SEK:0.135226, SGD:0.019442, THB:0.457501, TRY:0.084362, TWD:0.441385, USD:0.014255, ZAR:0.206271]]
+groovy:000>
+```
+
+The same JSON payload is returned as a result of the Groovy JSON slurper operating on the URL. Of course, since this is Groovy, the JSON is converted into a Map, so you can do stuff like this:
+
+
+```
+groovy:000> println result.base
+INR
+===> null
+groovy:000> println result.date
+2019-04-26
+===> null
+groovy:000> println result.rates.CAD
+0.019248
+===> null
+```
+
+And that's it!
+
+Do you use ExchangeRate-API or a similar service? Share how you use exchange rate data in the comments.
+
+--------------------------------------------------------------------------------
+
+via: https://opensource.com/article/19/5/exchange-rate-data
+
+作者:[Chris Hermansen ][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/clhermansen
+[b]: https://github.com/lujun9972
+[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/calculator_money_currency_financial_tool.jpg?itok=2QMa1y8c (scientific calculator)
+[2]: https://opensource.com/article/18/3/groovy-calculate-foreign-exchange
+[3]: https://fixer.io/
+[4]: https://apilayer.com/
+[5]: https://www.exchangerate-api.com/
+[6]: https://certbot.eff.org/
+[7]: https://en.wikipedia.org/wiki/Heartbleed
diff --git a/sources/tech/20190510 5 open source hardware products for the great outdoors.md b/sources/tech/20190510 5 open source hardware products for the great outdoors.md
new file mode 100644
index 0000000000..357fbfdcb8
--- /dev/null
+++ b/sources/tech/20190510 5 open source hardware products for the great outdoors.md
@@ -0,0 +1,96 @@
+[#]: collector: (lujun9972)
+[#]: translator: ( )
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (5 open source hardware products for the great outdoors)
+[#]: via: (https://opensource.com/article/19/5/hardware-outdoors)
+[#]: author: (Michael Weinberg https://opensource.com/users/mweinberg/users/aliciagibb)
+
+5 open source hardware products for the great outdoors
+======
+Here's some equipment you can buy or make yourself for hitting the great
+outdoors, no generators or batteries required.
+![Tree clouds][1]
+
+When people think about open source hardware, they often think about the general category of electronics that can be soldered and needs batteries. While there are [many][2] fantastic open source pieces of electronics, the overall category of open source hardware is much broader. This month we take a look at open source hardware that you can take out into the world, no power outlet or batteries required.
+
+### Hummingbird Hammocks
+
+[Hummingbird Hammocks][3] offers an entire line of open source camping gear. You can set up an open source [rain tarp][4]...
+
+![An open source rain tarp from Hummingbird Hammocks][5]
+
+...with open source [friction adjusters][6]
+
+![Open source friction adjusters from Hummingbird Hammocks.][7]
+
+Open source friction adjusters from Hummingbird Hammocks.
+
+...over your open source [hammock][8]
+
+![An open source hammock from Hummingbird Hammocks.][9]
+
+An open source hammock from Hummingbird Hammocks.
+
+...hung with open source [tree straps][10].
+
+![Open source tree straps from Hummingbird Hammocks.][11]
+
+Open source tree straps from Hummingbird Hammocks.
+
+The design for each of these items is fully documented, so you can even use them as a starting point for making your own outdoor gear (if you are willing to trust friction adjusters you design yourself).
+
+### Openfoil
+
+[Openfoil][12] is an open source hydrofoil for kitesurfing. Hydrofoils are attached to the bottom of kiteboards and allow the rider to rise out of the water. This aspect of the design makes riding in low wind situations and with smaller kites easier. It can also reduce the amount of noise the board makes on the water, making for a quieter experience. Because this hydrofoil is open source you can customize it to your needs and adventure tolerance.
+
+![Openfoil, an open source hydrofoil for kitesurfing.][13]
+
+Openfoil, an open source hydrofoil for kitesurfing.
+
+### Solar water heater
+
+If you prefer your outdoors-ing a bit closer to home, you could build this open source [solar water heater][14] created by the [Anisa Foundation][15]. This appliance focuses energy from the sun to heat water that can then be used in your home, letting you reduce your carbon footprint without having to give up long, hot showers. Of course, you can also [monitor its temperature ][16]over the internet if you need to feel connected.
+
+![An open source solar water heater from the Anisa Foundation.][17]
+
+An open source solar water heater from the Anisa Foundation.
+
+## Wrapping up
+
+As these projects make clear, open source hardware is more than just electronics. You can take it with you to the woods, to the beach, or just to your roof. Next month we’ll talk about open source instruments and musical gear. Until then, [certify][18] your open source hardware!
+
+Learn how and why you may want to start using the Open Source Hardware Certification logo on an...
+
+--------------------------------------------------------------------------------
+
+via: https://opensource.com/article/19/5/hardware-outdoors
+
+作者:[Michael Weinberg][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/mweinberg/users/aliciagibb
+[b]: https://github.com/lujun9972
+[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/life_tree_clouds.png?itok=b_ftihhP (Tree clouds)
+[2]: https://certification.oshwa.org/list.html
+[3]: https://hummingbirdhammocks.com/
+[4]: https://certification.oshwa.org/us000102.html
+[5]: https://opensource.com/sites/default/files/uploads/01-hummingbird_hammocks_rain_tarp.png (An open source rain tarp from Hummingbird Hammocks)
+[6]: https://certification.oshwa.org/us000105.html
+[7]: https://opensource.com/sites/default/files/uploads/02-hummingbird_hammocks_friction_adjusters_400_px.png (Open source friction adjusters from Hummingbird Hammocks.)
+[8]: https://certification.oshwa.org/us000095.html
+[9]: https://opensource.com/sites/default/files/uploads/03-hummingbird_hammocks_hammock_400_px.png (An open source hammock from Hummingbird Hammocks.)
+[10]: https://certification.oshwa.org/us000098.html
+[11]: https://opensource.com/sites/default/files/uploads/04-hummingbird_hammocks_tree_straps_400_px_0.png (Open source tree straps from Hummingbird Hammocks.)
+[12]: https://certification.oshwa.org/fr000004.html
+[13]: https://opensource.com/sites/default/files/uploads/05-openfoil-original_size.png (Openfoil, an open source hydrofoil for kitesurfing.)
+[14]: https://certification.oshwa.org/mx000002.html
+[15]: http://www.fundacionanisa.org/index.php?lang=en
+[16]: https://thingspeak.com/channels/72565
+[17]: https://opensource.com/sites/default/files/uploads/06-solar_water_heater_500_px.png (An open source solar water heater from the Anisa Foundation.)
+[18]: https://certification.oshwa.org/
diff --git a/sources/tech/20190510 Check storage performance with dd.md b/sources/tech/20190510 Check storage performance with dd.md
new file mode 100644
index 0000000000..8cdea81f69
--- /dev/null
+++ b/sources/tech/20190510 Check storage performance with dd.md
@@ -0,0 +1,432 @@
+[#]: collector: (lujun9972)
+[#]: translator: ( )
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (Check storage performance with dd)
+[#]: via: (https://fedoramagazine.org/check-storage-performance-with-dd/)
+[#]: author: (Gregory Bartholomew https://fedoramagazine.org/author/glb/)
+
+Check storage performance with dd
+======
+
+![][1]
+
+This article includes some example commands to show you how to get a _rough_ estimate of hard drive and RAID array performance using the _dd_ command. Accurate measurements would have to take into account things like [write amplification][2] and [system call overhead][3], which this guide does not. For a tool that might give more accurate results, you might want to consider using [hdparm][4].
+
+To factor out performance issues related to the file system, these examples show how to test the performance of your drives and arrays at the block level by reading and writing directly to/from their block devices. **WARNING** : The _write_ tests will destroy any data on the block devices against which they are run. **Do not run them against any device that contains data you want to keep!**
+
+### Four tests
+
+Below are four example dd commands that can be used to test the performance of a block device:
+
+ 1. One process reading from $MY_DISK:
+
+```
+# dd if=$MY_DISK of=/dev/null bs=1MiB count=200 iflag=nocache
+```
+
+ 2. One process writing to $MY_DISK:
+
+```
+# dd if=/dev/zero of=$MY_DISK bs=1MiB count=200 oflag=direct
+```
+
+ 3. Two processes reading concurrently from $MY_DISK:
+
+```
+# (dd if=$MY_DISK of=/dev/null bs=1MiB count=200 iflag=nocache &); (dd if=$MY_DISK of=/dev/null bs=1MiB count=200 iflag=nocache skip=200 &)
+```
+
+ 4. Two processes writing concurrently to $MY_DISK:
+
+```
+# (dd if=/dev/zero of=$MY_DISK bs=1MiB count=200 oflag=direct &); (dd if=/dev/zero of=$MY_DISK bs=1MiB count=200 oflag=direct skip=200 &)
+```
+
+
+
+
+– The _iflag=nocache_ and _oflag=direct_ parameters are important when performing the read and write tests (respectively) because without them the dd command will sometimes show the resulting speed of transferring the data to/from [RAM][5] rather than the hard drive.
+
+– The values for the _bs_ and _count_ parameters are somewhat arbitrary and what I have chosen should be large enough to provide a decent average in most cases for current hardware.
+
+– The _null_ and _zero_ devices are used for the destination and source (respectively) in the read and write tests because they are fast enough that they will not be the limiting factor in the performance tests.
+
+– The _skip=200_ parameter on the second dd command in the concurrent read and write tests is to ensure that the two copies of dd are operating on different areas of the hard drive.
+
+### 16 examples
+
+Below are demonstrations showing the results of running each of the above four tests against each of the following four block devices:
+
+ 1. MY_DISK=/dev/sda2 (used in examples 1-X)
+ 2. MY_DISK=/dev/sdb2 (used in examples 2-X)
+ 3. MY_DISK=/dev/md/stripped (used in examples 3-X)
+ 4. MY_DISK=/dev/md/mirrored (used in examples 4-X)
+
+
+
+A video demonstration of the these tests being run on a PC is provided at the end of this guide.
+
+Begin by putting your computer into _rescue_ mode to reduce the chances that disk I/O from background services might randomly affect your test results. **WARNING** : This will shutdown all non-essential programs and services. Be sure to save your work before running these commands. You will need to know your _root_ password to get into rescue mode. The _passwd_ command, when run as the root user, will prompt you to (re)set your root account password.
+
+```
+$ sudo -i
+# passwd
+# setenforce 0
+# systemctl rescue
+```
+
+You might also want to temporarily disable logging to disk:
+
+```
+# sed -r -i.bak 's/^#?Storage=.*/Storage=none/' /etc/systemd/journald.conf
+# systemctl restart systemd-journald.service
+```
+
+If you have a swap device, it can be temporarily disabled and used to perform the following tests:
+
+```
+# swapoff -a
+# MY_DEVS=$(mdadm --detail /dev/md/swap | grep active | grep -o "/dev/sd.*")
+# mdadm --stop /dev/md/swap
+# mdadm --zero-superblock $MY_DEVS
+```
+
+#### Example 1-1 (reading from sda)
+
+```
+# MY_DISK=$(echo $MY_DEVS | cut -d ' ' -f 1)
+# dd if=$MY_DISK of=/dev/null bs=1MiB count=200 iflag=nocache
+```
+
+```
+200+0 records in
+200+0 records out
+209715200 bytes (210 MB, 200 MiB) copied, 1.7003 s, 123 MB/s
+```
+
+#### Example 1-2 (writing to sda)
+
+```
+# MY_DISK=$(echo $MY_DEVS | cut -d ' ' -f 1)
+# dd if=/dev/zero of=$MY_DISK bs=1MiB count=200 oflag=direct
+```
+
+```
+200+0 records in
+200+0 records out
+209715200 bytes (210 MB, 200 MiB) copied, 1.67117 s, 125 MB/s
+```
+
+#### Example 1-3 (reading concurrently from sda)
+
+```
+# MY_DISK=$(echo $MY_DEVS | cut -d ' ' -f 1)
+# (dd if=$MY_DISK of=/dev/null bs=1MiB count=200 iflag=nocache &); (dd if=$MY_DISK of=/dev/null bs=1MiB count=200 iflag=nocache skip=200 &)
+```
+
+```
+200+0 records in
+200+0 records out
+209715200 bytes (210 MB, 200 MiB) copied, 3.42875 s, 61.2 MB/s
+200+0 records in
+200+0 records out
+209715200 bytes (210 MB, 200 MiB) copied, 3.52614 s, 59.5 MB/s
+```
+
+#### Example 1-4 (writing concurrently to sda)
+
+```
+# MY_DISK=$(echo $MY_DEVS | cut -d ' ' -f 1)
+# (dd if=/dev/zero of=$MY_DISK bs=1MiB count=200 oflag=direct &); (dd if=/dev/zero of=$MY_DISK bs=1MiB count=200 oflag=direct skip=200 &)
+```
+
+```
+200+0 records out
+209715200 bytes (210 MB, 200 MiB) copied, 3.2435 s, 64.7 MB/s
+200+0 records in
+200+0 records out
+209715200 bytes (210 MB, 200 MiB) copied, 3.60872 s, 58.1 MB/s
+```
+
+#### Example 2-1 (reading from sdb)
+
+```
+# MY_DISK=$(echo $MY_DEVS | cut -d ' ' -f 2)
+# dd if=$MY_DISK of=/dev/null bs=1MiB count=200 iflag=nocache
+```
+
+```
+200+0 records in
+200+0 records out
+209715200 bytes (210 MB, 200 MiB) copied, 1.67285 s, 125 MB/s
+```
+
+#### Example 2-2 (writing to sdb)
+
+```
+# MY_DISK=$(echo $MY_DEVS | cut -d ' ' -f 2)
+# dd if=/dev/zero of=$MY_DISK bs=1MiB count=200 oflag=direct
+```
+
+```
+200+0 records in
+200+0 records out
+209715200 bytes (210 MB, 200 MiB) copied, 1.67198 s, 125 MB/s
+```
+
+#### Example 2-3 (reading concurrently from sdb)
+
+```
+# MY_DISK=$(echo $MY_DEVS | cut -d ' ' -f 2)
+# (dd if=$MY_DISK of=/dev/null bs=1MiB count=200 iflag=nocache &); (dd if=$MY_DISK of=/dev/null bs=1MiB count=200 iflag=nocache skip=200 &)
+```
+
+```
+200+0 records in
+200+0 records out
+209715200 bytes (210 MB, 200 MiB) copied, 3.52808 s, 59.4 MB/s
+200+0 records in
+200+0 records out
+209715200 bytes (210 MB, 200 MiB) copied, 3.57736 s, 58.6 MB/s
+```
+
+#### Example 2-4 (writing concurrently to sdb)
+
+```
+# MY_DISK=$(echo $MY_DEVS | cut -d ' ' -f 2)
+# (dd if=/dev/zero of=$MY_DISK bs=1MiB count=200 oflag=direct &); (dd if=/dev/zero of=$MY_DISK bs=1MiB count=200 oflag=direct skip=200 &)
+```
+
+```
+200+0 records in
+200+0 records out
+209715200 bytes (210 MB, 200 MiB) copied, 3.7841 s, 55.4 MB/s
+200+0 records in
+200+0 records out
+209715200 bytes (210 MB, 200 MiB) copied, 3.81475 s, 55.0 MB/s
+```
+
+#### Example 3-1 (reading from RAID0)
+
+```
+# mdadm --create /dev/md/stripped --homehost=any --metadata=1.0 --level=0 --raid-devices=2 $MY_DEVS
+# MY_DISK=/dev/md/stripped
+# dd if=$MY_DISK of=/dev/null bs=1MiB count=200 iflag=nocache
+```
+
+```
+200+0 records in
+200+0 records out
+209715200 bytes (210 MB, 200 MiB) copied, 0.837419 s, 250 MB/s
+```
+
+#### Example 3-2 (writing to RAID0)
+
+```
+# MY_DISK=/dev/md/stripped
+# dd if=/dev/zero of=$MY_DISK bs=1MiB count=200 oflag=direct
+```
+
+```
+200+0 records in
+200+0 records out
+209715200 bytes (210 MB, 200 MiB) copied, 0.823648 s, 255 MB/s
+```
+
+#### Example 3-3 (reading concurrently from RAID0)
+
+```
+# MY_DISK=/dev/md/stripped
+# (dd if=$MY_DISK of=/dev/null bs=1MiB count=200 iflag=nocache &); (dd if=$MY_DISK of=/dev/null bs=1MiB count=200 iflag=nocache skip=200 &)
+```
+
+```
+200+0 records in
+200+0 records out
+209715200 bytes (210 MB, 200 MiB) copied, 1.31025 s, 160 MB/s
+200+0 records in
+200+0 records out
+209715200 bytes (210 MB, 200 MiB) copied, 1.80016 s, 116 MB/s
+```
+
+#### Example 3-4 (writing concurrently to RAID0)
+
+```
+# MY_DISK=/dev/md/stripped
+# (dd if=/dev/zero of=$MY_DISK bs=1MiB count=200 oflag=direct &); (dd if=/dev/zero of=$MY_DISK bs=1MiB count=200 oflag=direct skip=200 &)
+```
+
+```
+200+0 records in
+200+0 records out
+209715200 bytes (210 MB, 200 MiB) copied, 1.65026 s, 127 MB/s
+200+0 records in
+200+0 records out
+209715200 bytes (210 MB, 200 MiB) copied, 1.81323 s, 116 MB/s
+```
+
+#### Example 4-1 (reading from RAID1)
+
+```
+# mdadm --stop /dev/md/stripped
+# mdadm --create /dev/md/mirrored --homehost=any --metadata=1.0 --level=1 --raid-devices=2 --assume-clean $MY_DEVS
+# MY_DISK=/dev/md/mirrored
+# dd if=$MY_DISK of=/dev/null bs=1MiB count=200 iflag=nocache
+```
+
+```
+200+0 records in
+200+0 records out
+209715200 bytes (210 MB, 200 MiB) copied, 1.74963 s, 120 MB/s
+```
+
+#### Example 4-2 (writing to RAID1)
+
+```
+# MY_DISK=/dev/md/mirrored
+# dd if=/dev/zero of=$MY_DISK bs=1MiB count=200 oflag=direct
+```
+
+```
+200+0 records in
+200+0 records out
+209715200 bytes (210 MB, 200 MiB) copied, 1.74625 s, 120 MB/s
+```
+
+#### Example 4-3 (reading concurrently from RAID1)
+
+```
+# MY_DISK=/dev/md/mirrored
+# (dd if=$MY_DISK of=/dev/null bs=1MiB count=200 iflag=nocache &); (dd if=$MY_DISK of=/dev/null bs=1MiB count=200 iflag=nocache skip=200 &)
+```
+
+```
+200+0 records in
+200+0 records out
+209715200 bytes (210 MB, 200 MiB) copied, 1.67171 s, 125 MB/s
+200+0 records in
+200+0 records out
+209715200 bytes (210 MB, 200 MiB) copied, 1.67685 s, 125 MB/s
+```
+
+#### Example 4-4 (writing concurrently to RAID1)
+
+```
+# MY_DISK=/dev/md/mirrored
+# (dd if=/dev/zero of=$MY_DISK bs=1MiB count=200 oflag=direct &); (dd if=/dev/zero of=$MY_DISK bs=1MiB count=200 oflag=direct skip=200 &)
+```
+
+```
+200+0 records in
+200+0 records out
+209715200 bytes (210 MB, 200 MiB) copied, 4.09666 s, 51.2 MB/s
+200+0 records in
+200+0 records out
+209715200 bytes (210 MB, 200 MiB) copied, 4.1067 s, 51.1 MB/s
+```
+
+#### Restore your swap device and journald configuration
+
+```
+# mdadm --stop /dev/md/stripped /dev/md/mirrored
+# mdadm --create /dev/md/swap --homehost=any --metadata=1.0 --level=1 --raid-devices=2 $MY_DEVS
+# mkswap /dev/md/swap
+# swapon -a
+# mv /etc/systemd/journald.conf.bak /etc/systemd/journald.conf
+# systemctl restart systemd-journald.service
+# reboot
+```
+
+### Interpreting the results
+
+Examples 1-1, 1-2, 2-1, and 2-2 show that each of my drives read and write at about 125 MB/s.
+
+Examples 1-3, 1-4, 2-3, and 2-4 show that when two reads or two writes are done in parallel on the same drive, each process gets at about half the drive’s bandwidth (60 MB/s).
+
+The 3-x examples show the performance benefit of putting the two drives together in a RAID0 (data stripping) array. The numbers, in all cases, show that the RAID0 array performs about twice as fast as either drive is able to perform on its own. The trade-off is that you are twice as likely to lose everything because each drive only contains half the data. A three-drive array would perform three times as fast as a single drive (all drives being equal) but it would be thrice as likely to suffer a [catastrophic failure][6].
+
+The 4-x examples show that the performance of the RAID1 (data mirroring) array is similar to that of a single disk except for the case where multiple processes are concurrently reading (example 4-3). In the case of multiple processes reading, the performance of the RAID1 array is similar to that of the RAID0 array. This means that you will see a performance benefit with RAID1, but only when processes are reading concurrently. For example, if a process tries to access a large number of files in the background while you are trying to use a web browser or email client in the foreground. The main benefit of RAID1 is that your data is unlikely to be lost [if a drive fails][7].
+
+### Video demo
+
+Testing storage throughput using dd
+
+### Troubleshooting
+
+If the above tests aren’t performing as you expect, you might have a bad or failing drive. Most modern hard drives have built-in Self-Monitoring, Analysis and Reporting Technology ([SMART][8]). If your drive supports it, the _smartctl_ command can be used to query your hard drive for its internal statistics:
+
+```
+# smartctl --health /dev/sda
+# smartctl --log=error /dev/sda
+# smartctl -x /dev/sda
+```
+
+Another way that you might be able to tune your PC for better performance is by changing your [I/O scheduler][9]. Linux systems support several I/O schedulers and the current default for Fedora systems is the [multiqueue][10] variant of the [deadline][11] scheduler. The default performs very well overall and scales extremely well for large servers with many processors and large disk arrays. There are, however, a few more specialized schedulers that might perform better under certain conditions.
+
+To view which I/O scheduler your drives are using, issue the following command:
+
+```
+$ for i in /sys/block/sd?/queue/scheduler; do echo "$i: $(<$i)"; done
+```
+
+You can change the scheduler for a drive by writing the name of the desired scheduler to the /sys/block//queue/scheduler file:
+
+```
+# echo bfq > /sys/block/sda/queue/scheduler
+```
+
+You can make your changes permanent by creating a [udev rule][12] for your drive. The following example shows how to create a udev rule that will set all [rotational drives][13] to use the [BFQ][14] I/O scheduler:
+
+```
+# cat << END > /etc/udev/rules.d/60-ioscheduler-rotational.rules
+ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="1", ATTR{queue/scheduler}="bfq"
+END
+```
+
+Here is another example that sets all [solid-state drives][15] to use the [NOOP][16] I/O scheduler:
+
+```
+# cat << END > /etc/udev/rules.d/60-ioscheduler-solid-state.rules
+ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="none"
+END
+```
+
+Changing your I/O scheduler won’t affect the raw throughput of your devices, but it might make your PC seem more responsive by prioritizing the bandwidth for the foreground tasks over the background tasks or by eliminating unnecessary block reordering.
+
+* * *
+
+_Photo by _[ _James Donovan_][17]_ on _[_Unsplash_][18]_._
+
+--------------------------------------------------------------------------------
+
+via: https://fedoramagazine.org/check-storage-performance-with-dd/
+
+作者:[Gregory Bartholomew][a]
+选题:[lujun9972][b]
+译者:[译者ID](https://github.com/译者ID)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]: https://fedoramagazine.org/author/glb/
+[b]: https://github.com/lujun9972
+[1]: https://fedoramagazine.org/wp-content/uploads/2019/04/dd-performance-816x345.jpg
+[2]: https://www.ibm.com/developerworks/community/blogs/ibmnas/entry/misalignment_can_be_twice_the_cost1?lang=en
+[3]: https://eklitzke.org/efficient-file-copying-on-linux
+[4]: https://en.wikipedia.org/wiki/Hdparm
+[5]: https://en.wikipedia.org/wiki/Random-access_memory
+[6]: https://blog.elcomsoft.com/2019/01/why-ssds-die-a-sudden-death-and-how-to-deal-with-it/
+[7]: https://www.computerworld.com/article/2484998/ssds-do-die--as-linus-torvalds-just-discovered.html
+[8]: https://en.wikipedia.org/wiki/S.M.A.R.T.
+[9]: https://en.wikipedia.org/wiki/I/O_scheduling
+[10]: https://lwn.net/Articles/552904/
+[11]: https://en.wikipedia.org/wiki/Deadline_scheduler
+[12]: http://www.reactivated.net/writing_udev_rules.html
+[13]: https://en.wikipedia.org/wiki/Hard_disk_drive_performance_characteristics
+[14]: http://algo.ing.unimo.it/people/paolo/disk_sched/
+[15]: https://en.wikipedia.org/wiki/Solid-state_drive
+[16]: https://en.wikipedia.org/wiki/Noop_scheduler
+[17]: https://unsplash.com/photos/0ZBRKEG_5no?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
+[18]: https://unsplash.com/search/photos/speed?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
diff --git a/sources/tech/20190510 Keeping an open source project alive when people leave.md b/sources/tech/20190510 Keeping an open source project alive when people leave.md
new file mode 100644
index 0000000000..31a0ab7412
--- /dev/null
+++ b/sources/tech/20190510 Keeping an open source project alive when people leave.md
@@ -0,0 +1,180 @@
+[#]: collector: (lujun9972)
+[#]: translator: ( )
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (Keeping an open source project alive when people leave)
+[#]: via: (https://opensource.com/article/19/5/code-missing-community-management)
+[#]: author: (Rodrigo Duarte Sousa https://opensource.com/users/rodrigods/users/tellesnobrega)
+
+Keeping an open source project alive when people leave
+======
+How to find out what's done, what's not, and what's missing.
+![][1]
+
+Suppose you wake up one day and decide to finally use that recipe video you keep watching all over social media. You get the ingredients, organize the necessary utensils, and start to follow the recipe steps. You cut this, cut that, then start heating the oven at the same time you put butter and onions in a pan. Then, your phone reminds you: you have a dinner appointment with your boss, and you're already late! You turn off everything and leave immediately, stopping the cooking process somewhere near the end.
+
+Some minutes later, your roommate arrives at home ready to have dinner and finds only the _ongoing work_ in the kitchen. They have the following options:
+
+ 1. Clean up the mess and start cooking something from scratch.
+ 2. Order dinner and don’t bother to cook and/or fix the mess you left.
+ 3. Start cooking “around” the mess you left, which will probably take more time since most of the utensils are dirty and there isn’t much space left in the kitchen.
+
+
+
+If you left the printed version of the recipe somewhere, your roommate also has a fourth option. They could finish what you started! The problem is that they have no idea what's missing. It is not like you crossed out each completed step. Their best bet is either to call you or to examine all of your _changes_ to infer what is missing.
+
+In this example, the kitchen is like a software project, the utensils are the code, and the recipe is a new feature being implemented. Leaving something behind is not usually doable in a company's private project since you're accountable for your work and—in a scenario where you need to leave—it's almost certain that there is someone tracking/following the project, so they avoid having a "single point of failure." With open source projects, though, this continuity rarely happens. So how can we in the open source community deal with legacy, unfinished code, or code that is completed but no one dares touch it?
+
+### Knowledge legacy in open source projects
+
+We have always felt that open source is one of the best ways for an inexperienced software engineer to improve her skills. For many, open source projects offer their first hands-on experience with particular tools. [Version control systems][2], [unit][3] and [integration][4] tests, [continuous delivery][5], [code reviews][6], [features planning][7], [bug reporting/fixing][8], and more.
+
+In addition to learning opportunities, we can also view open source projects as a career opportunity—many senior engineers in the community get paid to be there, and you can add your contributions to your resume. That’s pretty cool. There's nothing like learning while improving your resume and getting potential employers' attention so you can pay your rent.
+
+Is this whole situation an infinite loop where everyone wins? The answer is obviously no. This post focuses on one of the main issues that arise in any project: the [bus/truck factor][9]. In the open source context, specifically, when people experience major changes such as a new job or other more personal factors, they tend to leave the community. We will first describe the problems that can arise from people leaving their _recipes_ unfinished by using [OpenStack][10] as an example. Then, we'll try to discuss some ideas to try to mitigate the issues.
+
+### Common problems
+
+In the past few years, we've seen a lot of changes in the [OpenStack][11] community, where some projects lost some portion of their active contributors team. These losses led to incomplete work and even finished modules without clear maintainers. Below are other examples of what happens when people suddenly leave. While this article uses OpenStack terms, such as “specs,” these issues easily apply to software development in general:
+
+ * **Broken documentation:** A new API or setting either wasn't documented, or it was documented but not implemented.
+ * **Hard to resolve knowledge deficits:** For example, a new requirement and/or feature requires part of the code to be refactored but no one has the necessary expertise.
+ * **Incomplete features:** What are the missing tasks required for each feature? Which tasks were completed?
+ * **Debugging drama:** If the person who wrote the code isn't there, meaning that it takes a lot of engineering hours just to decrypt—so to speak—the code path that needs to be fixed.
+
+
+
+To illustrate, we will use the [Project Tree Deletion][12] feature. Project Tree Deletion is a tiny feature that one of us proposed more than three years ago and couldn’t complete. Basically, the main goal was to enable an OpenStack user/operator to erase a whole branch of projects without having to manually disable/delete every single of them starting from the leaves. Very straightforward, right? The PTD spec has been merged and has the following _work items_ :
+
+ * Update API spec documentation.
+ * Add new rules to the file **policy.json**.
+ * Add new endpoints to mirror the new features.
+ * Implement the new deletion/disabling behavior for the project’s hierarchy.
+
+
+
+What about the sequence of steps (roadmap) to get these work items done? How do we know where to start and when what to tackle next? Are there any logical dependencies between the work items? How do we know where to start, and with what?
+
+Also, how do we know which work has been completed (if any)? One of the things that we do is look in the [blueprint][13] and/or the new [bug tracker][14], for example:
+
+ * Recursive deletion and project disabling: (merged)
+ * API changes for Reseller: (merged)
+ * Add parent_id to GET /projects: (merged)
+ * Manager support for project cascade update: (merged)
+ * API support for cascade update: (abandoned)
+ * Manager support for project delete cascade: (merged)
+ * API support for project cascade delete: (abandoned)
+ * Add backend support for deleting a projects list: (merged)
+ * Test list project hierarchy is correct for a large tree: (merged)
+ * Fix cascade operations documentation: (merged)
+ * Revert “Fix cascade operations documentation”: (merged)
+ * Remove the APIs from the doc that aren't supported yet: (merged)
+
+
+
+Here we can see a lot of merged patches, but also that some were abandoned, and that some include the words Revert and Remove in their titles. Now we have strong evidence that this work is not completed, but at least some work was started to clean it up and avoid exposing something incomplete in the service API. Let’s dig a little bit deeper and look at the [_current_ delete project code][15].
+
+There, we can see an added **cascade** argument (“cascade” resembles deleting related things together, so this argument must be somehow related to the proposed feature), and that it has a special block to treat the cases for the possible values of **cascade** :
+
+
+```
+`def _delete_project(self, project, initiator=None, cascade=False):`[/code] [code]
+
+if cascade:
+# Getting reversed project's subtrees list, i.e. from the leaves
+# to the root, so we do not break parent_id FK.
+subtree_list = self.list_projects_in_subtree(project_id)
+subtree_list.reverse()
+if not self._check_whole_subtree_is_disabled(
+project_id, subtree_list=subtree_list):
+raise exception.ForbiddenNotSecurity(
+_('Cannot delete project %(project_id)s since its subtree '
+'contains enabled projects.')
+% {'project_id': project_id})
+
+project_list = subtree_list + [project]
+projects_ids = [x['id'] for x in project_list]
+
+ret = self.driver.delete_projects_from_ids(projects_ids)
+for prj in project_list:
+self._post_delete_cleanup_project(prj['id'], prj, initiator)
+else:
+ret = self.driver.delete_project(project_id)
+self._post_delete_cleanup_project(project_id, project, initiator)
+```
+
+What about the callers of this function? Do they use **cascade** at all? If we search for it, we only find occurrences in the backend tests:
+
+
+```
+$ git grep "delete_project" | grep "cascade" | grep -v "def"
+keystone/tests/unit/resource/test_backends.py: PROVIDERS.resource_api.delete_project(root_project['id'], cascade=True)
+keystone/tests/unit/resource/test_backends.py: PROVIDERS.resource_api.delete_project(p1['id'], cascade=True)
+```
+
+We can also confirm this finding by looking at the [delete projects API implementation][16].
+
+So it seems that we have a problem here, something simple that I started was left behind a very long time ago. How could the community or I have prevented this from happening?
+
+From the example above, one of the most apparent problems is the lack of a clear roadmap and list of completed tasks somewhere. To follow the actual implementation status, we had to dig into the blueprint/bug comments and the code.
+
+Based on this issue, we can sketch an idea: for each new feature, we need a roadmap stored somewhere to reflect the implementation status. Once the roadmap is defined within a spec, we can track each step as a [Launchpad][17] entry, for example, and have a better view of the progress status of that spec.
+
+Of course, these steps won’t prevent unfinished projects and they add a little bit of process, but following them can give a better view of what's missing so someone else from the community could finish or even revert what's there.
+
+### That’s not all
+
+What about other aspects of the project besides feature completion? We shouldn’t expect that every person on the core team is an expert in every single project module. This issue highlights another very important aspect of any open source community: mentoring.
+
+New people come to the community all the time and many have an incentive to continuing coming back as we discussed earlier. However, are our current community members willing to mentor them? How many times have you participated as a mentor in a program such as [Outreachy ][18]or [Google Summer of Code][19], or taken time to answer questions in the project’s chat?
+
+We also know that people eventually move on to other open source communities, so we have the chance of not leaving what we learned behind. We can always transmit that knowledge directly to those who are currently interested and actively asking questions, or indirectly, by writing documentation, blog posts, giving talks, and so forth.
+
+In order to have a healthy open source community, knowledge can’t be dominated by few people. We need to make an effort to have as many people capable of moving the project forward as possible. Also, a key aspect of mentoring is not only related to coding, but also to leadership skills. Preparing people to take roles like Project Team Lead, joining the Technical Committee, and so on is crucial if we intend to see the community grow even when we're not around anymore.
+
+Needless to say, mentoring is also an important skill for climbing the engineering ladder in most companies. Consider that another motivation.
+
+### To conclude
+
+Open source should not be treated as only the means to an end. Collaboration is a crucial part of these projects, and alongside mentoring, should always be treated as a first citizen in any open source community. And, of course, we will fix the unfinished spec used as this article's example.
+
+If you are part of an open source community, it is your responsibility to be focusing on sharing your knowledge while you are still around. Chances are that no one is going to tell you to do so, it should be part of the routine of any open source collaborator.
+
+What are other ways of sharing knowledge? What are your thoughts and ideas about the issue?
+
+_This original article was posted on[rodrigods][20]._
+
+--------------------------------------------------------------------------------
+
+via: https://opensource.com/article/19/5/code-missing-community-management
+
+作者:[Rodrigo Duarte Sousa][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/rodrigods/users/tellesnobrega
+[b]: https://github.com/lujun9972
+[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/BIZ_question_B.png?itok=f88cyt00
+[2]: https://en.wikipedia.org/wiki/Version_control
+[3]: https://en.wikipedia.org/wiki/Unit_testing
+[4]: https://en.wikipedia.org/wiki/Integration_testing
+[5]: https://en.wikipedia.org/wiki/Continuous_delivery
+[6]: https://en.wikipedia.org/wiki/Code_review
+[7]: https://www.agilealliance.org/glossary/sprint-planning/
+[8]: https://www.softwaretestinghelp.com/how-to-write-good-bug-report/
+[9]: https://en.wikipedia.org/wiki/Bus_factor
+[10]: https://www.openstack.org/
+[11]: /resources/what-is-openstack
+[12]: https://review.opendev.org/#/c/148730/35
+[13]: https://blueprints.launchpad.net/keystone/+spec/project-tree-deletion
+[14]: https://bugs.launchpad.net/keystone/+bug/1816105
+[15]: https://github.com/openstack/keystone/blob/master/keystone/resource/core.py#L475-L519
+[16]: https://github.com/openstack/keystone/blob/master/keystone/api/projects.py#L202-L214
+[17]: https://launchpad.net
+[18]: https://www.outreachy.org/
+[19]: https://summerofcode.withgoogle.com/
+[20]: https://blog.rodrigods.com/knowledge-legacy-the-issue-of-passing-the-baton/
diff --git a/sources/tech/20190510 Learn to change history with git rebase.md b/sources/tech/20190510 Learn to change history with git rebase.md
new file mode 100644
index 0000000000..cf8f9351d9
--- /dev/null
+++ b/sources/tech/20190510 Learn to change history with git rebase.md
@@ -0,0 +1,594 @@
+[#]: collector: (lujun9972)
+[#]: translator: ( )
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (Learn to change history with git rebase!)
+[#]: via: (https://git-rebase.io/)
+[#]: author: (git-rebase https://git-rebase.io/)
+
+Learn to change history with git rebase!
+======
+One of Git 's core value-adds is the ability to edit history. Unlike version control systems that treat the history as a sacred record, in git we can change history to suit our needs. This gives us a lot of powerful tools and allows us to curate a good commit history in the same way we use refactoring to uphold good software design practices. These tools can be a little bit intimidating to the novice or even intermediate git user, but this guide will help to demystify the powerful git-rebase .
+
+```
+A word of caution : changing the history of public, shared, or stable branches is generally advised against. Editing the history of feature branches and personal forks is fine, and editing commits that you haven't pushed yet is always okay. Use git push -f to force push your changes to a personal fork or feature branch after editing your commits.
+```
+
+Despite the scary warning, it's worth mentioning that everything mentioned in this guide is a non-destructive operation. It's actually pretty difficult to permanently lose data in git. Fixing things when you make mistakes is covered at the end of this guide.
+
+### Setting up a sandbox
+
+We don't want to mess up any of your actual repositories, so throughout this guide we'll be working with a sandbox repo. Run these commands to get started:
+
+```
+git init /tmp/rebase-sandbox
+cd /tmp/rebase-sandbox
+git commit --allow-empty -m"Initial commit"
+```
+
+If you run into trouble, just run rm -rf /tmp/rebase-sandbox and run these steps again to start over. Each step of this guide can be run on a fresh sandbox, so it's not necessary to re-do every task.
+
+
+### Amending your last commit
+
+Let's start with something simple: fixing your most recent commit. Let's add a file to our sandbox - and make a mistake:
+
+```
+echo "Hello wrold!" >greeting.txt
+ git add greeting.txt
+ git commit -m"Add greeting.txt"
+```
+
+Fixing this mistake is pretty easy. We can just edit the file and commit with `--amend`, like so:
+
+```
+echo "Hello world!" >greeting.txt
+ git commit -a --amend
+```
+
+Specifying `-a` automatically stages (i.e. `git add`'s) all files that git already knows about, and `--amend` will squash the changes into the most recent commit. Save and quit your editor (you have a chance to change the commit message now if you'd like). You can see the fixed commit by running `git show`:
+
+```
+commit f5f19fbf6d35b2db37dcac3a55289ff9602e4d00 (HEAD -> master)
+Author: Drew DeVault
+Date: Sun Apr 28 11:09:47 2019 -0400
+
+ Add greeting.txt
+
+diff --git a/greeting.txt b/greeting.txt
+new file mode 100644
+index 0000000..cd08755
+--- /dev/null
++++ b/greeting.txt
+@@ -0,0 +1 @@
++Hello world!
+```
+
+### Fixing up older commits
+
+Amending only works for the most recent commit. What happens if you need to correct an older commit? Let's start by setting up our sandbox accordingly:
+
+```
+echo "Hello!" >greeting.txt
+git add greeting.txt
+git commit -m"Add greeting.txt"
+
+echo "Goodbye world!" >farewell.txt
+git add farewell.txt
+git commit -m"Add farewell.txt"
+```
+
+Looks like `greeting.txt` is missing "world". Let's write a commit normally which fixes that:
+
+```
+echo "Hello world!" >greeting.txt
+git commit -a -m"fixup greeting.txt"
+```
+
+So now the files look correct, but our history could be better - let's use the new commit to "fixup" the last one. For this, we need to introduce a new tool: the interactive rebase. We're going to edit the last three commits this way, so we'll run `git rebase -i HEAD~3` (`-i` for interactive). This'll open your text editor with something like this:
+
+```
+pick 8d3fc77 Add greeting.txt
+pick 2a73a77 Add farewell.txt
+pick 0b9d0bb fixup greeting.txt
+
+# Rebase f5f19fb..0b9d0bb onto f5f19fb (3 commands)
+#
+# Commands:
+# p, pick = use commit
+# f, fixup = like "squash", but discard this commit's log message
+```
+
+This is the rebase plan, and by editing this file you can instruct git on how to edit history. I've trimmed the summary to just the details relevant to this part of the rebase guide, but feel free to skim the full summary in your text editor.
+
+When we save and close our editor, git is going to remove all of these commits from its history, then execute each line one at a time. By default, it's going to pick each commit, summoning it from the heap and adding it to the branch. If we don't edit this file at all, we'll end up right back where we started, picking every commit as-is. We're going to use one of my favorite features now: fixup. Edit the third line to change the operation from "pick" to "fixup" and move it to immediately after the commit we want to "fix up":
+
+```
+pick 8d3fc77 Add greeting.txt
+fixup 0b9d0bb fixup greeting.txt
+pick 2a73a77 Add farewell.txt
+```
+
+**Tip** : We can also abbreviate this with just "f" to speed things up next time.
+
+Save and quit your editor - git will run these commands. We can check the log to verify the result:
+
+```
+$ git log -2 --oneline
+fcff6ae (HEAD -> master) Add farewell.txt
+a479e94 Add greeting.txt
+```
+
+### Squashing several commits into one
+
+As you work, you may find it useful to write lots of commits as you reach small milestones or fix bugs in previous commits. However, it may be useful to "squash" these commits together, to make a cleaner history before merging your work into master. For this, we'll use the "squash" operation. Let's start by writing a bunch of commits - just copy and paste this if you want to speed it up:
+
+```
+git checkout -b squash
+for c in H e l l o , ' ' w o r l d; do
+ echo "$c" >>squash.txt
+ git add squash.txt
+ git commit -m"Add '$c' to squash.txt"
+done
+```
+
+That's a lot of commits to make a file that says "Hello, world"! Let's start another interactive rebase to squash them together. Note that we checked out a branch to try this on, first. Because of that, we can quickly rebase all of the commits since we branched by using `git rebase -i master`. The result:
+
+```
+pick 1e85199 Add 'H' to squash.txt
+pick fff6631 Add 'e' to squash.txt
+pick b354c74 Add 'l' to squash.txt
+pick 04aaf74 Add 'l' to squash.txt
+pick 9b0f720 Add 'o' to squash.txt
+pick 66b114d Add ',' to squash.txt
+pick dc158cd Add ' ' to squash.txt
+pick dfcf9d6 Add 'w' to squash.txt
+pick 7a85f34 Add 'o' to squash.txt
+pick c275c27 Add 'r' to squash.txt
+pick a513fd1 Add 'l' to squash.txt
+pick 6b608ae Add 'd' to squash.txt
+
+# Rebase 1af1b46..6b608ae onto 1af1b46 (12 commands)
+#
+# Commands:
+# p, pick = use commit
+# s, squash = use commit, but meld into previous commit
+```
+
+**Tip** : your local master branch evolves independently of the remote master branch, and git stores the remote branch as `origin/master`. Combined with this trick, `git rebase -i origin/master` is often a very convenient way to rebase all of the commits which haven't been merged upstream yet!
+
+We're going to squash all of these changes into the first commit. To do this, change every "pick" operation to "squash", except for the first line, like so:
+
+```
+pick 1e85199 Add 'H' to squash.txt
+squash fff6631 Add 'e' to squash.txt
+squash b354c74 Add 'l' to squash.txt
+squash 04aaf74 Add 'l' to squash.txt
+squash 9b0f720 Add 'o' to squash.txt
+squash 66b114d Add ',' to squash.txt
+squash dc158cd Add ' ' to squash.txt
+squash dfcf9d6 Add 'w' to squash.txt
+squash 7a85f34 Add 'o' to squash.txt
+squash c275c27 Add 'r' to squash.txt
+squash a513fd1 Add 'l' to squash.txt
+squash 6b608ae Add 'd' to squash.txt
+```
+
+When you save and close your editor, git will think about this for a moment, then open your editor again to revise the final commit message. You'll see something like this:
+
+```
+# This is a combination of 12 commits.
+# This is the 1st commit message:
+
+Add 'H' to squash.txt
+
+# This is the commit message #2:
+
+Add 'e' to squash.txt
+
+# This is the commit message #3:
+
+Add 'l' to squash.txt
+
+# This is the commit message #4:
+
+Add 'l' to squash.txt
+
+# This is the commit message #5:
+
+Add 'o' to squash.txt
+
+# This is the commit message #6:
+
+Add ',' to squash.txt
+
+# This is the commit message #7:
+
+Add ' ' to squash.txt
+
+# This is the commit message #8:
+
+Add 'w' to squash.txt
+
+# This is the commit message #9:
+
+Add 'o' to squash.txt
+
+# This is the commit message #10:
+
+Add 'r' to squash.txt
+
+# This is the commit message #11:
+
+Add 'l' to squash.txt
+
+# This is the commit message #12:
+
+Add 'd' to squash.txt
+
+# Please enter the commit message for your changes. Lines starting
+# with '#' will be ignored, and an empty message aborts the commit.
+#
+# Date: Sun Apr 28 14:21:56 2019 -0400
+#
+# interactive rebase in progress; onto 1af1b46
+# Last commands done (12 commands done):
+# squash a513fd1 Add 'l' to squash.txt
+# squash 6b608ae Add 'd' to squash.txt
+# No commands remaining.
+# You are currently rebasing branch 'squash' on '1af1b46'.
+#
+# Changes to be committed:
+# new file: squash.txt
+#
+```
+
+This defaults to a combination of all of the commit messages which were squashed, but leaving it like this is almost always not what you want. The old commit messages may be useful for reference when writing the new one, though.
+
+**Tip** : the "fixup" command you learned about in the previous section can be used for this purpose, too - but it discards the messages of the squashed commits.
+
+Let's delete everything and replace it with a better commit message, like this:
+
+```
+Add squash.txt with contents "Hello, world"
+
+# Please enter the commit message for your changes. Lines starting
+# with '#' will be ignored, and an empty message aborts the commit.
+#
+# Date: Sun Apr 28 14:21:56 2019 -0400
+#
+# interactive rebase in progress; onto 1af1b46
+# Last commands done (12 commands done):
+# squash a513fd1 Add 'l' to squash.txt
+# squash 6b608ae Add 'd' to squash.txt
+# No commands remaining.
+# You are currently rebasing branch 'squash' on '1af1b46'.
+#
+# Changes to be committed:
+# new file: squash.txt
+#
+```
+
+Save and quit your editor, then examine your git log - success!
+
+```
+commit c785f476c7dff76f21ce2cad7c51cf2af00a44b6 (HEAD -> squash)
+Author: Drew DeVault
+Date: Sun Apr 28 14:21:56 2019 -0400
+
+ Add squash.txt with contents "Hello, world"
+```
+
+Before we move on, let's pull our changes into the master branch and get rid of this scratch one. We can use `git rebase` like we use `git merge`, but it avoids making a merge commit:
+
+```
+git checkout master
+git rebase squash
+git branch -D squash
+```
+
+We generally prefer to avoid using git merge unless we're actually merging unrelated histories. If you have two divergent branches, a git merge is useful to have a record of when they were... merged. In the course of your normal work, rebase is often more appropriate.
+
+### Splitting one commit into several
+
+Sometimes the opposite problem happens - one commit is just too big. Let's look into splitting it up. This time, let's write some actual code. Start with a simple C program2 (you can still copy+paste this snippet into your shell to do this quickly):
+
+```
+cat <main.c
+int main(int argc, char *argv[]) {
+ return 0;
+}
+EOF
+```
+
+We'll commit this first.
+
+```
+git add main.c
+git commit -m"Add C program skeleton"
+```
+
+Next, let's extend the program a bit:
+
+```
+cat <main.c
+#include <stdio.h>
+
+const char *get_name() {
+ static char buf[128];
+ scanf("%s", buf);
+ return buf;
+}
+
+int main(int argc, char *argv[]) {
+ printf("What's your name? ");
+ const char *name = get_name();
+ printf("Hello, %s!\n", name);
+ return 0;
+}
+EOF
+```
+
+After we commit this, we'll be ready to learn how to split it up.
+
+```
+git commit -a -m"Flesh out C program"
+```
+
+The first step is to start an interactive rebase. Let's rebase both commits with `git rebase -i HEAD~2`, giving us this rebase plan:
+
+```
+pick 237b246 Add C program skeleton
+pick b3f188b Flesh out C program
+
+# Rebase c785f47..b3f188b onto c785f47 (2 commands)
+#
+# Commands:
+# p, pick = use commit
+# e, edit = use commit, but stop for amending
+```
+
+Change the second commit's command from "pick" to "edit", then save and close your editor. Git will think about this for a second, then present you with this:
+
+```
+Stopped at b3f188b... Flesh out C program
+You can amend the commit now, with
+
+ git commit --amend
+
+Once you are satisfied with your changes, run
+
+ git rebase --continue
+```
+
+We could follow these instructions to add new changes to the commit, but instead let's do a "soft reset"3 by running `git reset HEAD^`. If you run `git status` after this, you'll see that it un-commits the latest commit and adds its changes to the working tree:
+
+```
+Last commands done (2 commands done):
+ pick 237b246 Add C program skeleton
+ edit b3f188b Flesh out C program
+No commands remaining.
+You are currently splitting a commit while rebasing branch 'master' on 'c785f47'.
+ (Once your working directory is clean, run "git rebase --continue")
+
+Changes not staged for commit:
+ (use "git add ..." to update what will be committed)
+ (use "git checkout -- ..." to discard changes in working directory)
+
+ modified: main.c
+
+no changes added to commit (use "git add" and/or "git commit -a")
+```
+
+To split this up, we're going to do an interactive commit. This allows us to selectively commit only specific changes from the working tree. Run `git commit -p` to start this process, and you'll be presented with the following prompt:
+
+```
+diff --git a/main.c b/main.c
+index b1d9c2c..3463610 100644
+--- a/main.c
++++ b/main.c
+@@ -1,3 +1,14 @@
++#include <stdio.h>
++
++const char *get_name() {
++ static char buf[128];
++ scanf("%s", buf);
++ return buf;
++}
++
+ int main(int argc, char *argv[]) {
++ printf("What's your name? ");
++ const char *name = get_name();
++ printf("Hello, %s!\n", name);
+ return 0;
+ }
+Stage this hunk [y,n,q,a,d,s,e,?]?
+```
+
+Git has presented you with just one "hunk" (i.e. a single change) to consider committing. This one is too big, though - let's use the "s" command to "split" up the hunk into smaller parts.
+
+```
+Split into 2 hunks.
+@@ -1 +1,9 @@
++#include
++
++const char *get_name() {
++ static char buf[128];
++ scanf("%s", buf);
++ return buf;
++}
++
+ int main(int argc, char *argv[]) {
+Stage this hunk [y,n,q,a,d,j,J,g,/,e,?]?
+```
+
+**Tip** : If you're curious about the other options, press "?" to summarize them.
+
+This hunk looks better - a single, self-contained change. Let's hit "y" to answer the question (and stage that "hunk"), then "q" to "quit" the interactive session and proceed with the commit. Your editor will pop up to ask you to enter a suitable commit message.
+
+```
+Add get_name function to C program
+
+# Please enter the commit message for your changes. Lines starting
+# with '#' will be ignored, and an empty message aborts the commit.
+#
+# interactive rebase in progress; onto c785f47
+# Last commands done (2 commands done):
+# pick 237b246 Add C program skeleton
+# edit b3f188b Flesh out C program
+# No commands remaining.
+# You are currently splitting a commit while rebasing branch 'master' on 'c785f47'.
+#
+# Changes to be committed:
+# modified: main.c
+#
+# Changes not staged for commit:
+# modified: main.c
+#
+```
+
+Save and close your editor, then we'll make the second commit. We could do another interactive commit, but since we just want to include the rest of the changes in this commit we'll just do this:
+
+```
+git commit -a -m"Prompt user for their name"
+git rebase --continue
+```
+
+That last command tells git that we're done editing this commit, and to continue to the next rebase command. That's it! Run `git log` to see the fruits of your labor:
+
+```
+$ git log -3 --oneline
+fe19cc3 (HEAD -> master) Prompt user for their name
+659a489 Add get_name function to C program
+237b246 Add C program skeleton
+```
+
+### Reordering commits
+
+This one is pretty easy. Let's start by setting up our sandbox:
+
+```
+echo "Goodbye now!" >farewell.txt
+git add farewell.txt
+git commit -m"Add farewell.txt"
+
+echo "Hello there!" >greeting.txt
+git add greeting.txt
+git commit -m"Add greeting.txt"
+
+echo "How're you doing?" >inquiry.txt
+git add inquiry.txt
+git commit -m"Add inquiry.txt"
+```
+
+The git log should now look like this:
+
+```
+f03baa5 (HEAD -> master) Add inquiry.txt
+a4cebf7 Add greeting.txt
+90bb015 Add farewell.txt
+```
+
+Clearly, this is all out of order. Let's do an interactive rebase of the past 3 commits to resolve this. Run `git rebase -i HEAD~3` and this rebase plan will appear:
+
+```
+pick 90bb015 Add farewell.txt
+pick a4cebf7 Add greeting.txt
+pick f03baa5 Add inquiry.txt
+
+# Rebase fe19cc3..f03baa5 onto fe19cc3 (3 commands)
+#
+# Commands:
+# p, pick = use commit
+#
+# These lines can be re-ordered; they are executed from top to bottom.
+```
+
+The fix is now straightforward: just reorder these lines in the order you wish for the commits to appear. Should look something like this:
+
+```
+pick a4cebf7 Add greeting.txt
+pick f03baa5 Add inquiry.txt
+pick 90bb015 Add farewell.txt
+```
+
+Save and close your editor and git will do the rest for you. Note that it's possible to end up with conflicts when you do this in practice - click here for help resolving conflicts.
+
+### git pull --rebase
+
+If you've been writing some commits on a branch which has been updated upstream, normally `git pull` will create a merge commit. In this respect, `git pull`'s behavior by default is equivalent to:
+
+```
+git fetch origin
+git merge origin/master
+```
+
+There's another option, which is often more useful and leads to a much cleaner history: `git pull --rebase`. Unlike the merge approach, this is equivalent to the following:
+
+```
+git fetch origin
+git rebase origin/master
+```
+
+The merge approach is simpler and easier to understand, but the rebase approach is almost always what you want to do if you understand how to use git rebase. If you like, you can set it as the default behavior like so:
+
+```
+git config --global pull.rebase true
+```
+
+When you do this, technically you're applying the procedure we discuss in the next section... so let's explain what it means to do that deliberately, too.
+
+### Using git rebase to... rebase
+
+Ironically, the feature of git rebase that I use the least is the one it's named for: rebasing branches. Say you have the following branches:
+
+```
+o--o--o--o--> master
+ \--o--o--> feature-1
+ \--o--> feature-2
+```
+
+It turns out feature-2 doesn't depend on any of the changes in feature-1, so you can just base it off of master. The fix is thus:
+
+```
+git checkout feature-2
+git rebase master
+```
+
+The non-interactive rebase does the default operation for all implicated commits ("pick")4, which simply rolls your history back to the last common anscestor and replays the commits from both branches. Your history now looks like this:
+
+```
+o--o--o--o--> master
+ | \--o--> feature-2
+ \--o--o--> feature-1
+```
+
+### Resolving conflicts
+
+The details on resolving merge conflicts are beyond the scope of this guide - keep your eye out for another guide for this in the future. Assuming you're familiar with resolving conflicts in general, here are the specifics that apply to rebasing.
+
+The details on resolving merge conflicts are beyond the scope of this guide - keep your eye out for another guide for this in the future. Assuming you're familiar with resolving conflicts in general, here are the specifics that apply to rebasing.
+
+Sometimes you'll get a merge conflict when doing a rebase, which you can handle just like any other merge conflict. Git will set up the conflict markers in the affected files, `git status` will show you what you need to resolve, and you can mark files as resolved with `git add` or `git rm`. However, in the context of a git rebase, there are two options you should be aware of.
+
+The first is how you complete the conflict resolution. Rather than `git commit` like you'll use when addressing conflicts that arise from `git merge`, the appropriate command for rebasing is `git rebase --continue`. However, there's another option available to you: `git rebase --skip`. This will skip the commit you're working on, and it won't be included in the rebase. This is most common when doing a non-interactive rebase, when git doesn't realize that a commit it's pulled from the "other" branch is an updated version of the commit that it conflicts with on "our" branch.
+
+### Help! I broke it!
+
+No doubt about it - rebasing can be hard sometimes. If you've made a mistake and in so doing lost commits which you needed, then `git reflog` is here to save the day. Running this command will show you every operation which changed a ref, or reference - that is, branches and tags. Each line shows you what the old reference pointed to, and you can `git cherry-pick`, `git checkout`, `git show`, or use any other operation on git commits once thought lost.
+
+
+--------------------------------------------------------------------------------
+
+via: https://git-rebase.io/
+
+作者:[git-rebase][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://git-rebase.io/
+[b]: https://github.com/lujun9972
diff --git a/sources/tech/20190513 Blockchain 2.0 - Introduction To Hyperledger Fabric -Part 10.md b/sources/tech/20190513 Blockchain 2.0 - Introduction To Hyperledger Fabric -Part 10.md
new file mode 100644
index 0000000000..c685af487c
--- /dev/null
+++ b/sources/tech/20190513 Blockchain 2.0 - Introduction To Hyperledger Fabric -Part 10.md
@@ -0,0 +1,81 @@
+[#]: collector: (lujun9972)
+[#]: translator: ( )
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (Blockchain 2.0 – Introduction To Hyperledger Fabric [Part 10])
+[#]: via: (https://www.ostechnix.com/blockchain-2-0-introduction-to-hyperledger-fabric/)
+[#]: author: (sk https://www.ostechnix.com/author/sk/)
+
+Blockchain 2.0 – Introduction To Hyperledger Fabric [Part 10]
+======
+
+![Hyperledger Fabric][1]
+
+### Hyperledger Fabric
+
+The [**Hyperledger project**][2] is an umbrella organization of sorts featuring many different modules and systems under development. Among the most popular among these individual sub-projects is the **Hyperledger Fabric**. This post will explore the features that would make the Fabric almost indispensable in the near future once blockchain systems start proliferating into main stream use. Towards the end we will also take a quick look at what developers and enthusiasts need to know regarding the technicalities of the Hyperledger Fabric.
+
+### Inception
+
+In the usual fashion for the Hyperledger project, Fabric was “donated” to the organization by one of its core members, **IBM** , who was previously the principle developer of the same. The technology platform shared by IBM was put to joint development at the Hyperledger project with contributions from over a 100 member companies and institutions.
+
+Currently running on **v1.4** of the LTS version, Fabric has come a long way and is currently seen as the go to enterprise solution for managing business data. The core vision that surrounds the Hyperledger project inevitably permeates into the Fabric as well. The Hyperledger Fabric system carries forward all the enterprise ready and scalable features that are hard coded into all projects under the Hyperledger organization.
+
+### Highlights Of Hyperledger Fabric
+
+Hyperledger Fabric offers a wide variety of features and standards that are built around the mission of supporting fast development and modular architectures. Furthermore, compared to its competitors (primarily **Ripple** and [**Ethereum**][3]), Fabric takes an explicit stance toward closed and [**permissioned blockchains**][4]. Their core objective here is to develop a set of tools which will aid blockchain developers in creating customized solutions and not to create a standalone ecosystem or a product.
+
+Some of the highlights of the Hyperledger Fabric are given below:
+
+ * **Permissioned blockchain systems**
+
+
+
+This is a category where other platforms such as Ethereum and Ripple differ quite a lot with Hyperledger Fabric. The Fabric by default is a tool designed to implement a private permissioned blockchain. Such blockchains cannot be accessed by everyone and the nodes working to offer consensus or to verify transactions are chosen by a central authority. This might be important for some applications such as banking and insurance, where transactions have to be verified by the central authority rather than participants.
+
+ * **Confidential and controlled information flow**
+
+
+
+The Fabric has built in permission systems that will restrict information flow within a specific group or certain individuals as the case may be. Unlike a public blockchain where anyone and everyone who runs a node will have a copy and selective access to data stored in the blockchain, the admin of the system can choose how to and who to share access to the information. There are also subsystems which will encrypt the stored data at better security standards compared to existing competition.
+
+ * **Plug and play architecture**
+
+
+
+Hyperledger Fabric has a plug and play type architecture. Individual components of the system may be chosen to be implemented and components of the system that developers don’t see a use for maybe discarded. The Fabric takes a highly modular and customizable route to development rather than a one size fits all approach taken by its competitors. This is especially attractive for firms and companies looking to build a lean system fast. This combined with the interoperability of the Fabric with other Hyperledger components implies that developers and designers now have access to a diverse set of standardized tools instead of having to pull code from different sources and integrate them afterwards. It also presents a rather fail-safe way to build robust modular systems.
+
+ * **Smart contracts and chaincode**
+
+
+
+A distributed application running on a blockchain is called a [**Smart contract**][5]. While the smart contract term is more or less associated with the Ethereum platform, chaincode is the name given to the same in the Hyperledger camp. Apart from possessing all the benefits of **DApps** being present in chaincode applications, what sets Hyperledger apart is the fact that the code for the same may be written in multiple high-level programming language. It supports [**Go**][6] and **JavaScript** out of the box and supports many other after integration with appropriate compiler modules as well. Though this fact might not mean much at this point, the fact remains that if existing talent can be used for ongoing projects involving blockchain that has the potential to save companies billions of dollars in personnel training and management in the long run. Developers can code in languages they’re comfortable in to start building applications on the Hyperledger Fabric and need not learn nor train in platform specific languages and syntax. This presents flexibility which current competitors of the Hyperledger Fabric do not offer.
+
+ * The Hyperledger Fabric is a back-end driver platform and is mainly aimed at integration projects where a blockchain or another distributed ledger technology is required. As such it does not provide any user facing services except for minor scripting capabilities. (Think of it to be more like a scripting language.)
+ * Hyperledger Fabric supports building sidechains for specific use-cases. In case, the developer wishes to isolate a set of users or participants to a specific part or functionality of the application, they may do so by implementing side-chains. Side-chains are blockchains that derive from a main parent, but form a different chain after their initial block. This block which gives rise to the new chain will stay immune to further changes in the new chain and the new chain remains immutable even if new information is added to the original chain. This functionality will aid in scaling the platform being developed and usher in user specific and case specific processing capabilities.
+ * The previous feature also means that not all users will have an “exact” copy of all the data in the blockchain as is expected usually from public chains. Participating nodes will have a copy of data that is only relevant to them. For instance, consider an application similar to PayTM in India. The app has wallet functionality as well as an e-commerce end. However, not all its wallet users use PayTM to shop online. In this scenario, only active shoppers will have the corresponding chain of transactions on the PayTM e-commerce site, whereas the wallet users will just have a copy of the chain that stores wallet transactions. This flexible architecture for data storage and retrieval is important while scaling, since massive singular blockchains have been shown to increase lead times for processing transactions. The chain can be kept lean and well categorised this way.
+
+
+
+We will look at other modules under the Hyperledger Project in detail in upcoming posts.
+
+--------------------------------------------------------------------------------
+
+via: https://www.ostechnix.com/blockchain-2-0-introduction-to-hyperledger-fabric/
+
+作者:[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]: https://www.ostechnix.com/blockchain-2-0-an-introduction-to-hyperledger-project-hlp/
+[3]: https://www.ostechnix.com/blockchain-2-0-what-is-ethereum/
+[4]: https://www.ostechnix.com/blockchain-2-0-public-vs-private-blockchain-comparison/
+[5]: https://www.ostechnix.com/blockchain-2-0-explaining-smart-contracts-and-its-types/
+[6]: https://www.ostechnix.com/install-go-language-linux/
diff --git a/sources/tech/20190513 How To Check Whether The Given Package Is Installed Or Not On Debian-Ubuntu System.md b/sources/tech/20190513 How To Check Whether The Given Package Is Installed Or Not On Debian-Ubuntu System.md
new file mode 100644
index 0000000000..dfc3e62dce
--- /dev/null
+++ b/sources/tech/20190513 How To Check Whether The Given Package Is Installed Or Not On Debian-Ubuntu System.md
@@ -0,0 +1,141 @@
+[#]: collector: (lujun9972)
+[#]: translator: ( )
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (How To Check Whether The Given Package Is Installed Or Not On Debian/Ubuntu System?)
+[#]: via: (https://www.2daygeek.com/how-to-check-whether-the-given-package-is-installed-or-not-on-ubuntu-debian-system/)
+[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/)
+
+How To Check Whether The Given Package Is Installed Or Not On Debian/Ubuntu System?
+======
+
+We have recently published an article about bulk package installation.
+
+While doing that, i was struggled to get the installed package information and did a small google search and found few methods about it.
+
+I would like to share it in our website so, that it will be helpful for others too.
+
+There are numerous ways we can achieve this.
+
+I have add seven ways to achieve this. However, you can choose the preferred method for you.
+
+Those methods are listed below.
+
+ * **`apt-cache Command:`** apt-cache command is used to query the APT cache or package metadata.
+ * **`apt Command:`** APT is a powerful command-line tool for installing, downloading, removing, searching and managing packages on Debian based systems.
+ * **`dpkg-query Command:`** dpkg-query is a tool to query the dpkg database.
+ * **`dpkg Command:`** dpkg is a package manager for Debian based systems.
+ * **`which Command:`** The which command returns the full path of the executable that would have been executed when the command had been entered in terminal.
+ * **`whereis Command:`** The whereis command used to search the binary, source, and man page files for a given command.
+ * **`locate Command:`** locate command works faster than the find command because it uses updatedb database, whereas the find command searches in the real system.
+
+
+
+### Method-1 : How To Check Whether The Given Package Is Installed Or Not On Ubuntu System Using apt-cache Command?
+
+apt-cache command is used to query the APT cache or package metadata from APT’s internal database.
+
+It will search and display an information about the given package. It shows whether the package is installed or not, installed package version, source repository information.
+
+The below output clearly showing that `nano` package has already installed in the system. Since installed part is showing the installed version of nano package.
+
+```
+# apt-cache policy nano
+nano:
+ Installed: 2.9.3-2
+ Candidate: 2.9.3-2
+ Version table:
+ *** 2.9.3-2 500
+ 500 http://in.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
+ 100 /var/lib/dpkg/status
+```
+
+### Method-2 : How To Check Whether The Given Package Is Installed Or Not On Ubuntu System Using apt Command?
+
+APT is a powerful command-line tool for installing, downloading, removing, searching and managing as well as querying information about packages as a low-level access to all features of the libapt-pkg library. It’s contains some less used command-line utilities related to package management.
+
+```
+# apt -qq list nano
+nano/bionic,now 2.9.3-2 amd64 [installed]
+```
+
+### Method-3 : How To Check Whether The Given Package Is Installed Or Not On Ubuntu System Using dpkg-query Command?
+
+dpkg-query is a tool to show information about packages listed in the dpkg database.
+
+In the below output first column showing `ii`. It means, the given package has already installed in the system.
+
+```
+# dpkg-query --list | grep -i nano
+ii nano 2.9.3-2 amd64 small, friendly text editor inspired by Pico
+```
+
+### Method-4 : How To Check Whether The Given Package Is Installed Or Not On Ubuntu System Using dpkg Command?
+
+DPKG stands for Debian Package is a tool to install, build, remove and manage Debian packages, but unlike other package management systems, it cannot automatically download and install packages or their dependencies.
+
+In the below output first column showing `ii`. It means, the given package has already installed in the system.
+
+```
+# dpkg -l | grep -i nano
+ii nano 2.9.3-2 amd64 small, friendly text editor inspired by Pico
+```
+
+### Method-5 : How To Check Whether The Given Package Is Installed Or Not On Ubuntu System Using which Command?
+
+The which command returns the full path of the executable that would have been executed when the command had been entered in terminal.
+
+It’s very useful when you want to create a desktop shortcut or symbolic link for executable files.
+
+Which command searches the directories listed in the current user’s PATH environment variable not for all the users. I mean, when you are logged in your own account and you can’t able to search for root user file or directory.
+
+If the following output shows the given package binary or executable file location then the given package has already installed in the system. If not, the package is not installed in system.
+
+```
+# which nano
+/bin/nano
+```
+
+### Method-6 : How To Check Whether The Given Package Is Installed Or Not On Ubuntu System Using whereis Command?
+
+The whereis command used to search the binary, source, and man page files for a given command.
+
+If the following output shows the given package binary or executable file location then the given package has already installed in the system. If not, the package is not installed in system.
+
+```
+# whereis nano
+nano: /bin/nano /usr/share/nano /usr/share/man/man1/nano.1.gz /usr/share/info/nano.info.gz
+```
+
+### Method-7 : How To Check Whether The Given Package Is Installed Or Not On Ubuntu System Using locate Command?
+
+locate command works faster than the find command because it uses updatedb database, whereas the find command searches in the real system.
+
+It uses a database rather than hunting individual directory paths to get a given file.
+
+locate command doesn’t pre-installed in most of the distributions so, use your distribution package manager to install it.
+
+The database is updated regularly through cron. Even, we can update it manually.
+
+If the following output shows the given package binary or executable file location then the given package has already installed in the system. If not, the package is not installed in system.
+
+```
+# locate --basename '\nano'
+/usr/bin/nano
+/usr/share/nano
+/usr/share/doc/nano
+```
+--------------------------------------------------------------------------------
+
+via: https://www.2daygeek.com/how-to-check-whether-the-given-package-is-installed-or-not-on-ubuntu-debian-system/
+
+作者:[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
diff --git a/sources/tech/20190513 How To Set Password Complexity On Linux.md b/sources/tech/20190513 How To Set Password Complexity On Linux.md
new file mode 100644
index 0000000000..e9a3171c6b
--- /dev/null
+++ b/sources/tech/20190513 How To Set Password Complexity On Linux.md
@@ -0,0 +1,243 @@
+[#]: collector: (lujun9972)
+[#]: translator: ( )
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (How To Set Password Complexity On Linux?)
+[#]: via: (https://www.2daygeek.com/how-to-set-password-complexity-policy-on-linux/)
+[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/)
+
+How To Set Password Complexity On Linux?
+======
+
+User management is one of the important task of Linux system administration.
+
+There are many aspect is involved in this and implementing the strong password policy is one of them.
+
+Navigate to the following URL, if you would like to **[generate a strong password on Linux][1]**.
+
+It will Restrict unauthorized access to systems.
+
+By default Linux is secure that everybody know. however, we need to make necessary tweak on this to make it more secure.
+
+Insecure password will leads to breach security. So, take additional care on this.
+
+Navigate to the following URL, if you would like to see the **[password strength and score][2]** of the generated strong password.
+
+In this article, we will teach you, how to implement the best security policy on Linux.
+
+We can use PAM (the “pluggable authentication module”) to enforce password policy On most Linux systems.
+
+The file can be found in the following location.
+
+For Redhat based systems @ `/etc/pam.d/system-auth` and Debian based systems @ `/etc/pam.d/common-password`.
+
+The default password aging details can be found in the `/etc/login.defs` file.
+
+I have trimmed this file for better understanding.
+
+```
+# vi /etc/login.defs
+
+PASS_MAX_DAYS 99999
+PASS_MIN_DAYS 0
+PASS_MIN_LEN 5
+PASS_WARN_AGE 7
+```
+
+**Details:**
+
+ * **`PASS_MAX_DAYS:`**` ` Maximum number of days a password may be used.
+ * **`PASS_MIN_DAYS:`**` ` Minimum number of days allowed between password changes.
+ * **`PASS_MIN_LEN:`**` ` Minimum acceptable password length.
+ * **`PASS_WARN_AGE:`**` ` Number of days warning given before a password expires.
+
+
+
+We will show you, how to implement the below eleven password policies in Linux.
+
+ * Password Max days
+ * Password Min days
+ * Password warning days
+ * Password history or Deny Re-Used Passwords
+ * Password minimum length
+ * Minimum upper case characters
+ * Minimum lower case characters
+ * Minimum digits in password
+ * Minimum other characters (Symbols)
+ * Account lock – retries
+ * Account unlock time
+
+
+
+### What Is Password Max days?
+
+This parameter limits the maximum number of days a password can be used. It’s mandatory for user to change his/her account password before expiry.
+
+If they forget to change, they are not allowed to login into the system. They need to work with admin team to get rid of it.
+
+It can be set in `/etc/login.defs` file. I’m going to set `90 days`.
+
+```
+# vi /etc/login.defs
+
+PASS_MAX_DAYS 90
+```
+
+### What Is Password Min days?
+
+This parameter limits the minimum number of days after password can be changed.
+
+Say for example, if this parameter is set to 15 and user changed password today. Then he won’t be able to change the password again before 15 days from now.
+
+It can be set in `/etc/login.defs` file. I’m going to set `15 days`.
+
+```
+# vi /etc/login.defs
+
+PASS_MIN_DAYS 15
+```
+
+### What Is Password Warning Days?
+
+This parameter controls the password warning days and it will warn the user when the password is going to expires.
+
+A warning will be given to the user regularly until the warning days ends. This can helps user to change their password before expiry. Otherwise we need to work with admin team for unlock the password.
+
+It can be set in `/etc/login.defs` file. I’m going to set `10 days`.
+
+```
+# vi /etc/login.defs
+
+PASS_WARN_AGE 10
+```
+
+**Note:** All the above parameters only applicable for new accounts and not for existing accounts.
+
+### What Is Password History Or Deny Re-Used Passwords?
+
+This parameter keep controls of the password history. Keep history of passwords used (the number of previous passwords which cannot be reused).
+
+When the users try to set a new password, it will check the password history and warn the user when they set the same old password.
+
+It can be set in `/etc/pam.d/system-auth` file. I’m going to set `5` for history of password.
+
+```
+# vi /etc/pam.d/system-auth
+
+password sufficient pam_unix.so md5 shadow nullok try_first_pass use_authtok remember=5
+```
+
+### What Is Password Minimum Length?
+
+This parameter keeps the minimum password length. When the users set a new password, it will check against this parameter and warn the user if they try to set the password length less than that.
+
+It can be set in `/etc/pam.d/system-auth` file. I’m going to set `12` character for minimum password length.
+
+```
+# vi /etc/pam.d/system-auth
+
+password requisite pam_cracklib.so try_first_pass retry=3 minlen=12
+```
+
+**try_first_pass retry=3** : Allow users to set a good password before the passwd command aborts.
+
+### Set Minimum Upper Case Characters?
+
+This parameter keeps, how many upper case characters should be added in the password. These are password strengthening parameters ,which increase the password strength.
+
+When the users set a new password, it will check against this parameter and warn the user if they are not including any upper case characters in the password.
+
+It can be set in `/etc/pam.d/system-auth` file. I’m going to set `1` character for minimum password length.
+
+```
+# vi /etc/pam.d/system-auth
+
+password requisite pam_cracklib.so try_first_pass retry=3 minlen=12 ucredit=-1
+```
+
+### Set Minimum Lower Case Characters?
+
+This parameter keeps, how many lower case characters should be added in the password. These are password strengthening parameters ,which increase the password strength.
+
+When the users set a new password, it will check against this parameter and warn the user if they are not including any lower case characters in the password.
+
+It can be set in `/etc/pam.d/system-auth` file. I’m going to set `1` character.
+
+```
+# vi /etc/pam.d/system-auth
+
+password requisite pam_cracklib.so try_first_pass retry=3 minlen=12 lcredit=-1
+```
+
+### Set Minimum Digits In Password?
+
+This parameter keeps, how many digits should be added in the password. These are password strengthening parameters ,which increase the password strength.
+
+When the users set a new password, it will check against this parameter and warn the user if they are not including any digits in the password.
+
+It can be set in `/etc/pam.d/system-auth` file. I’m going to set `1` character.
+
+```
+# vi /etc/pam.d/system-auth
+
+password requisite pam_cracklib.so try_first_pass retry=3 minlen=12 dcredit=-1
+```
+
+### Set Minimum Other Characters (Symbols) In Password?
+
+This parameter keeps, how many Symbols should be added in the password. These are password strengthening parameters ,which increase the password strength.
+
+When the users set a new password, it will check against this parameter and warn the user if they are not including any Symbol in the password.
+
+It can be set in `/etc/pam.d/system-auth` file. I’m going to set `1` character.
+
+```
+# vi /etc/pam.d/system-auth
+
+password requisite pam_cracklib.so try_first_pass retry=3 minlen=12 ocredit=-1
+```
+
+### Set Account Lock?
+
+This parameter controls users failed attempts. It locks user account after reaches the given number of failed login attempts.
+
+It can be set in `/etc/pam.d/system-auth` file.
+
+```
+# vi /etc/pam.d/system-auth
+
+auth required pam_tally2.so onerr=fail audit silent deny=5
+account required pam_tally2.so
+```
+
+### Set Account Unlock Time?
+
+This parameter keeps users unlock time. If the user account is locked after consecutive failed authentications.
+
+It’s unlock the locked user account after reaches the given time. Sets the time (900 seconds = 15 minutes) for which the account should remain locked.
+
+It can be set in `/etc/pam.d/system-auth` file.
+
+```
+# vi /etc/pam.d/system-auth
+
+auth required pam_tally2.so onerr=fail audit silent deny=5 unlock_time=900
+account required pam_tally2.so
+```
+
+--------------------------------------------------------------------------------
+
+via: https://www.2daygeek.com/how-to-set-password-complexity-policy-on-linux/
+
+作者:[Magesh Maruthamuthu][a]
+选题:[lujun9972][b]
+译者:[译者ID](https://github.com/译者ID)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]: https://www.2daygeek.com/author/magesh/
+[b]: https://github.com/lujun9972
+[1]: https://www.2daygeek.com/5-ways-to-generate-a-random-strong-password-in-linux-terminal/
+[2]: https://www.2daygeek.com/how-to-check-password-complexity-strength-and-score-in-linux/
diff --git a/sources/tech/20190513 How to SSH into a Raspberry Pi -Beginner-s Tip.md b/sources/tech/20190513 How to SSH into a Raspberry Pi -Beginner-s Tip.md
new file mode 100644
index 0000000000..d1bcf06138
--- /dev/null
+++ b/sources/tech/20190513 How to SSH into a Raspberry Pi -Beginner-s Tip.md
@@ -0,0 +1,130 @@
+[#]: collector: (lujun9972)
+[#]: translator: ( )
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (How to SSH into a Raspberry Pi [Beginner’s Tip])
+[#]: via: (https://itsfoss.com/ssh-into-raspberry/)
+[#]: author: (Chinmay https://itsfoss.com/author/chinmay/)
+
+How to SSH into a Raspberry Pi [Beginner’s Tip]
+======
+
+_**In this Raspberry Pi article series, you’ll learn how to enable SSH in Raspberry Pi and then how to SSH into a Raspberry Pi device.**_
+
+Out of all the things you can do with [Raspberry Pi][1], using it as a server in a home network is very popular. The tiny footprint and low power consumption makes it a perfect device to run light weight servers.
+
+One of the things you should be able to do in such a case is run commands on your Raspberry Pi without needing to plug in a display, keyboard, mouse and having to move yourself to the location of your Raspberry Pi each time.
+
+You achieve this by logging into your Raspberry Pi via SSH ([Secure Shell][2]) from any other computer, your laptop, desktop or even your phone. Let me show you how
+
+### How to SSH into Raspberry Pi
+
+![][3]
+
+I assume that you are [running Raspbian on your Pi][4] and have successfully connected to a network via Ethernet or WiFi. It’s important that your Raspberry Pi is connected to a network otherwise you won’t be able to connect to it via SSH (sorry for stating the obvious).
+
+#### Step 1: Enable SSH on Raspberry Pi
+
+SSH is disabled by default in Raspberry Pi, hence you’ll have to enable it when you turn on the Pi after a fresh installation of Raspbian.
+
+First go to the Raspberry Pi configuration window by navigating through the menu.
+
+![Raspberry Pi Menu, Raspberry Pi Configuration][5]
+
+Now, go to the interfaces tab, enable SSH and restart your Pi.
+
+![Enable SSH on Raspberry Pi][6]
+
+You can also enable SSH without via the terminal. Just enter the command _**sudo raspi-config**_ and then go to Advanced Options to enable SSH.
+
+#### Step 2. Find the IP Address of Raspberry Pi
+
+In most cases your Raspberry Pi will be assigned a local IP address which looks like **192.168.x.x** or **10.x.x.x**. You can [use various Linux commands to find the IP address][7].
+
+[][8]
+
+Suggested read This Linux Malware Targets Unsecure Raspberry Pi Devices
+
+I am using the good old ifconfig command here but you can also use _**ip address**_.
+
+```
+ifconfig
+```
+
+![Raspberry Pi Network Configuration][9]
+
+This command shows all the list of active network adapters and their configuration. The first entry( **eth0** ) shows IP address as **192.168.2.105** which is valid.I have used Ethernet to connect my Raspberry Pi to the network, hence it is under **eth0**. If you use WiFi check under the entry named ‘ **wlan0** ‘ .
+
+You can also find out the IP address by other means like checking the network devices list on your router/modem.
+
+#### Step 3. SSH into your Raspberry Pi
+
+Now that you have enabled SSH and found out your IP address you can go ahead and SSH into your Raspberry Pi from any other computer. You’ll also need the username and the password for the Raspberry Pi.
+
+Default Username and Password is:
+
+ * username: pi
+ * password: raspberry
+
+
+
+If you have changed the default password then use the new password instead of the above. Ideally you must change the default password. In the past, a [malware infected thousands of Raspberry Pi devices that were using the default username and password][8].
+
+Open a terminal (on Mac and Linux) on the computer from which you want to SSH into your Pi and type the command below. On Windows, you can use a SSH client like [Putty][10].
+
+Here, use the IP address you found out in the previous step.
+
+```
+ssh [email protected]
+```
+
+_**Note: Make sure your Raspberry Pi and the computer you are using to SSH into your Raspberry Pi are connected to the same network**_.
+
+![SSH through terminal][11]
+
+You’ll see a warning the first time, type **yes** and press enter.
+
+![Type the password \(default is ‘raspberry‘\)][12]
+
+Now, type in the password and press enter.
+
+![Successful Login via SSH][13]
+
+On a successful login you’ll be presented with the terminal of your Raspberry Pi. Now you can any commands on your Raspberry Pi through this terminal remotely(within the current network) without having to access your Raspberry Pi physically.
+
+[][14]
+
+Suggested read Speed Up Ubuntu Unity On Low End Systems [Quick Tip]
+
+Furthermore you can also set up SSH-Keys so that you don’t have to type in the password every time you log in via SSH, but that’s a different topic altogether.
+
+I hope you were able to SSH into your Raspberry Pi after following this tutorial. Let me know how you plan to use your Raspberry Pi in the comments below!
+
+--------------------------------------------------------------------------------
+
+via: https://itsfoss.com/ssh-into-raspberry/
+
+作者:[Chinmay][a]
+选题:[lujun9972][b]
+译者:[译者ID](https://github.com/译者ID)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]: https://itsfoss.com/author/chinmay/
+[b]: https://github.com/lujun9972
+[1]: https://www.raspberrypi.org/
+[2]: https://en.wikipedia.org/wiki/Secure_Shell
+[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/05/ssh-into-raspberry-pi.png?resize=800%2C450&ssl=1
+[4]: https://itsfoss.com/tutorial-how-to-install-raspberry-pi-os-raspbian-wheezy/
+[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/05/Raspberry-pi-configuration.png?ssl=1
+[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/05/enable-ssh-raspberry-pi.png?ssl=1
+[7]: https://linuxhandbook.com/find-ip-address/
+[8]: https://itsfoss.com/raspberry-pi-malware-threat/
+[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/05/ifconfig-rapberry-pi.png?ssl=1
+[10]: https://itsfoss.com/putty-linux/
+[11]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/05/SSH-into-pi-warning.png?fit=800%2C199&ssl=1
+[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/05/SSH-into-pi-password.png?fit=800%2C202&ssl=1
+[13]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/05/SSH-into-Pi-successful-login.png?fit=800%2C306&ssl=1
+[14]: https://itsfoss.com/speed-up-ubuntu-unity-on-low-end-system/
diff --git a/sources/tech/20190513 Manage business documents with OpenAS2 on Fedora.md b/sources/tech/20190513 Manage business documents with OpenAS2 on Fedora.md
new file mode 100644
index 0000000000..c8e82151ef
--- /dev/null
+++ b/sources/tech/20190513 Manage business documents with OpenAS2 on Fedora.md
@@ -0,0 +1,153 @@
+[#]: collector: (lujun9972)
+[#]: translator: ( )
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (Manage business documents with OpenAS2 on Fedora)
+[#]: via: (https://fedoramagazine.org/manage-business-documents-with-openas2-on-fedora/)
+[#]: author: (Stuart D Gathman https://fedoramagazine.org/author/sdgathman/)
+
+Manage business documents with OpenAS2 on Fedora
+======
+
+![][1]
+
+Business documents often require special handling. Enter Electronic Document Interchange, or **EDI**. EDI is more than simply transferring files using email or http (or ftp), because these are documents like orders and invoices. When you send an invoice, you want to be sure that:
+
+1\. It goes to the right destination, and is not intercepted by competitors.
+2\. Your invoice cannot be forged by a 3rd party.
+3\. Your customer can’t claim in court that they never got the invoice.
+
+The first two goals can be accomplished by HTTPS or email with S/MIME, and in some situations, a simple HTTPS POST to a web API is sufficient. What EDI adds is the last part.
+
+This article does not cover the messy topic of formats for the files exchanged. Even when using a standardized format like ANSI or EDIFACT, it is ultimately up to the business partners. It is not uncommon for business partners to use an ad-hoc CSV file format. This article shows you how to configure Fedora to send and receive in an EDI setup.
+
+### Centralized EDI
+
+The traditional solution is to use a Value Added Network, or **VAN**. The VAN is a central hub that transfers documents between their customers. Most importantly, it keeps a secure record of the documents exchanged that can be used as evidence in disputes. The VAN can use different transfer protocols for each of its customers
+
+### AS Protocols and MDN
+
+The AS protocols are a specification for adding a digital signature with optional encryption to an electronic document. What it adds over HTTPS or S/MIME is the Message Disposition Notification, or **MDN**. The MDN is a signed and dated response that says, in essence, “We got your invoice.” It uses a secure hash to identify the specific document received. This addresses point #3 without involving a third party.
+
+The [AS2 protocol][2] uses HTTP or HTTPS for transport. Other AS protocols target [FTP][3] and [SMTP][4]. AS2 is used by companies big and small to avoid depending on (and paying) a VAN.
+
+### OpenAS2
+
+OpenAS2 is an open source Java implemention of the AS2 protocol. It is available in Fedora since 28, and installed with:
+
+```
+$ sudo dnf install openas2
+$ cd /etc/openas2
+```
+
+Configuration is done with a text editor, and the config files are in XML. The first order of business before starting OpenAS2 is to change the factory passwords.
+
+Edit _/etc/openas2/config.xml_ and search for _ChangeMe_. Change those passwords. The default password on the certificate store is _testas2_ , but that doesn’t matter much as anyone who can read the certificate store can read _config.xml_ and get the password.
+
+### What to share with AS2 partners
+
+There are 3 things you will exchange with an AS2 peer.
+
+#### AS2 ID
+
+Don’t bother looking up the official AS2 standard for legal AS2 IDs. While OpenAS2 implements the standard, your partners will likely be using a proprietary product which doesn’t. While AS2 allows much longer IDs, many implementations break with more than 16 characters. Using otherwise legal AS2 ID chars like ‘:’ that can appear as path separators on a proprietary OS is also a problem. Restrict your AS2 ID to upper and lower case alpha, digits, and ‘_’ with no more than 16 characters.
+
+#### SSL certificate
+
+For real use, you will want to generate a certificate with SHA256 and RSA. OpenAS2 ships with two factory certs to play with. Don’t use these for anything real, obviously. The certificate file is in PKCS12 format. Java ships with _keytool_ which can maintain your PKCS12 “keystore,” as Java calls it. This article skips using _openssl_ to generate keys and certificates. Simply note that _sudo keytool -list -keystore as2_certs.p12_ will list the two factory practice certs.
+
+#### AS2 URL
+
+This is an HTTP URL that will access your OpenAS2 instance. HTTPS is also supported, but is redundant. To use it you have to uncomment the https module configuration in _config.xml_ , and supply a certificate signed by a public CA. This requires another article and is entirely unnecessary here.
+
+By default, OpenAS2 listens on 10080 for HTTP and 10443 for HTTPS. OpenAS2 can talk to itself, so it ships with two partnerships using __ as the AS2 URL. If you don’t find this a convincing demo, and can install a second instance (on a VM, for instance), you can use private IPs for the AS2 URLs. Or install [Cjdns][5] to get IPv6 mesh addresses that can be used anywhere, resulting in AS2 URLs like _http://[fcbf:fc54:e597:7354:8250:2b2e:95e6:d6ba]:10080_.
+
+Most businesses will also want a list of IPs to add to their firewall. This is actually [bad practice][6]. An AS2 server has the same security risk as a web server, meaning you should isolate it in a VM or container. Also, the difficulty of keeping mutual lists of IPs up to date grows with the list of partners. The AS2 server rejects requests not signed by a configured partner.
+
+### OpenAS2 Partners
+
+With that in mind, open _partnerships.xml_ in your editor. At the top is a list of “partners.” Each partner has a name (referenced by the partnerships below as “sender” or “receiver”), AS2 ID, certificate, and email. You need a partner definition for yourself and those you exchange documents with. You can define multiple partners for yourself. OpenAS2 ships with two partners, OpenAS2A and OpenAS2B, which you’ll use to send a test document.
+
+### OpenAS2 Partnerships
+
+Next is a list of “partnerships,” one for each direction. Each partnership configuration includes the sender, receiver, and the AS2 URL used to send the documents. By default, partnerships use synchronous MDN. The MDN is returned on the same HTTP transaction. You could uncomment the _as2_receipt_option_ for asynchronous MDN, which is sent some time later. Use synchronous MDN whenever possible, as tracking pending MDNs adds complexity to your application.
+
+The other partnership options select encryption, signature hash, and other protocol options. A fully implemented AS2 receiver can handle any combination of options, but AS2 partners may have incomplete implementations or policy requirements. For example, DES3 is a comparatively weak encryption algorithm, and may not be acceptable. It is the default because it is almost universally implemented.
+
+If you went to the trouble to set up a second physical or virtual machine for this test, designate one as OpenAS2A and the other as OpenAS2B. Modify the _as2_url_ on the OpenAS2A-to-OpenAS2B partnership to use the IP (or hostname) of OpenAS2B, and vice versa for the OpenAS2B-to-OpenAS2A partnership. Unless they are using the FedoraWorkstation firewall profile, on both machines you’ll need:
+
+```
+# sudo firewall-cmd --zone=public --add-port=10080/tcp
+```
+
+Now start the _openas2_ service (on both machines if needed):
+
+```
+# sudo systemctl start openas2
+```
+
+### Resetting the MDN password
+
+This initializes the MDN log database with the factory password, not the one you changed it to. This is a packaging bug to be fixed in the next release. To avoid frustration, here’s how to change the h2 database password:
+
+```
+$ sudo systemctl stop openas2
+$ cat >h2passwd <<'DONE'
+#!/bin/bash
+AS2DIR="/var/lib/openas2"
+java -cp "$AS2DIR"/lib/h2* org.h2.tools.Shell \
+ -url jdbc:h2:"$AS2DIR"/db/openas2 \
+ -user sa -password "$1" <testdoc <<'DONE'
+This is not a real EDI format, but is nevertheless a document.
+DONE
+$ sudo chown openas2 testdoc
+$ sudo mv testdoc /var/spool/openas2/toOpenAS2B
+$ sudo journalctl -f -u openas2
+... log output of sending file, Control-C to stop following log
+^C
+```
+
+OpenAS2 does not send a document until it is writable by the _openas2_ user or group. As a consequence, your actual business application will copy, or generate in place, the document. Then it changes the group or permissions to send it on its way, to avoid sending a partial document.
+
+Now, on the OpenAS2B machine, _/var/spool/openas2/OpenAS2A_OID-OpenAS2B_OID/inbox_ shows the message received. That should get you started!
+
+* * *
+
+_Photo by _[ _Beatriz Pérez Moya_][7]_ on _[_Unsplash_][8]_._
+
+--------------------------------------------------------------------------------
+
+via: https://fedoramagazine.org/manage-business-documents-with-openas2-on-fedora/
+
+作者:[Stuart D Gathman][a]
+选题:[lujun9972][b]
+译者:[译者ID](https://github.com/译者ID)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]: https://fedoramagazine.org/author/sdgathman/
+[b]: https://github.com/lujun9972
+[1]: https://fedoramagazine.org/wp-content/uploads/2019/05/openas2-816x345.jpg
+[2]: https://en.wikipedia.org/wiki/AS2
+[3]: https://en.wikipedia.org/wiki/AS3_(networking)
+[4]: https://en.wikipedia.org/wiki/AS1_(networking)
+[5]: https://fedoramagazine.org/decentralize-common-fedora-apps-cjdns/
+[6]: https://www.ld.com/as2-part-2-best-practices/
+[7]: https://unsplash.com/photos/XN4T2PVUUgk?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
+[8]: https://unsplash.com/search/photos/documents?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
diff --git a/sources/tech/20190513 When to be concerned about memory levels on Linux.md b/sources/tech/20190513 When to be concerned about memory levels on Linux.md
new file mode 100644
index 0000000000..3306793c9f
--- /dev/null
+++ b/sources/tech/20190513 When to be concerned about memory levels on Linux.md
@@ -0,0 +1,121 @@
+[#]: collector: (lujun9972)
+[#]: translator: ( )
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (When to be concerned about memory levels on Linux)
+[#]: via: (https://www.networkworld.com/article/3394603/when-to-be-concerned-about-memory-levels-on-linux.html)
+[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/)
+
+When to be concerned about memory levels on Linux
+======
+Memory management on Linux systems is complicated. Seeing high usage doesn’t necessarily mean there’s a problem. There are other things you should also consider.
+![Qfamily \(CC BY 2.0\)][1]
+
+Running out of memory on a Linux system is generally _not_ a sign that there's a serious problem. Why? Because a healthy Linux system will cache disk activity in memory, basically gobbling memory that isn't being used, which is a very good thing.
+
+In other words, it doesn't allow memory to go to waste. It uses the spare memory to increase disk access speed, and it does this _without_ taking memory away from running applications. This memory caching, as you might well imagine, is hundreds of times faster than working directly with the hard-disk drives (HDD) and significantly faster than solid-state drives. Full or near full memory normally means that a system is running as efficiently as it can — not that it's running into problems.
+
+**[ Also see:[Must-know Linux Commands][2] ]**
+
+### How caching works
+
+Disk caching simply means that a system is taking advantage of unused resources (free memory) to speed up disk reads and writes. Applications don't lose anything and most of the time can acquire more memory whenever they need it. In addition, disk caching does not cause applications to resort to using swap. Instead, memory used for disk caching is always returned immediately when needed and disk content updated.
+
+### Major and minor page faults
+
+Linux systems allocate memory to processes by breaking physical memory into chunks called "pages" and then mapping those pages into process virtual memory. Pages that appear to no longer be used may be removed from memory — even if the related process is still running. When a process needs a page that is no longer mapped or no longer in memory, a fault is generated. So, "fault" does not mean "error" but instead means "unavailable," and faults play an important role in memory management.
+
+A minor fault means the page is in memory but not allocated to the requesting process or not marked as present in the memory management unit. A major fault means the page in no longer in memory.
+
+If you'd like to get a feel for how often minor and major page faults occur, try a **ps** command like this one. Note that we're asking for the fields related to page faults and the commands to be listed. Numerous lines were omitted from the output. The MINFL displays the number of minor faults, while MAJFL represents the number of major faults.
+
+```
+$ ps -eo min_flt,maj_flt,cmd
+ MINFL MAJFL CMD
+230760 150 /usr/lib/systemd/systemd --switched-root --system --deserialize 18
+ 0 0 [kthreadd]
+ 0 0 [rcu_gp]
+ 0 0 [rcu_par_gp]
+ 0 0 [kworker/0:0H-kblockd]
+ ...
+ 166 20 gpg-agent --homedir /var/lib/fwupd/gnupg --use-standard-socket --daemon
+ 525 1 /usr/libexec/gvfsd-trash --spawner :1.16 /org/gtk/gvfs/exec_spaw/0
+ 4966 4 /usr/libexec/gnome-terminal-server
+ 3617 0 bash
+ 0 0 [kworker/1:0H-kblockd]
+ 927 0 gdm-session-worker [pam/gdm-password]
+```
+
+To report on a single process, you might try a command like this:
+
+```
+$ ps -o min_flt,maj_flt 1
+ MINFL MAJFL
+230064 150
+```
+
+You can also add other fields such as the process owner's UID and GID.
+
+```
+$ ps -o min_flt,maj_flt,cmd,args,uid,gid 1
+ MINFL MAJFL CMD COMMAND UID GID
+230064 150 /usr/lib/systemd/systemd -- /usr/lib/systemd/systemd -- 0 0
+```
+
+### How full is full?
+
+One way to get a better handle on how memory is being used is with the **free -m** command. The **-m** option reports the numbers in mebibytes (MiBs) instead of bytes.
+
+```
+$ free -m
+ total used free shared buff/cache available
+Mem: 3244 3069 35 49 140 667
+Swap: 3535 0 3535
+```
+
+Note that "free" (unused) memory can be running low while "available" (available for starting new applications) might report a larger number. The distinction between these two fields is well worth paying attention to. Available means that it can be recovered and used when needed, while free means that it's available now.
+
+### When to worry
+
+If performance on a Linux systems appears to be good — applications are responsive, the command line shows no indications of a problem — chances are the system's in good shape. Keep in mind that some application might be slowed down for some reason that doesn't affect the overall system.
+
+An excessive number of hard faults may indeed indicate a problem, but balance this with observed performance.
+
+A good rule of thumb is to worry when available memory is close to zero or when the "swap used" field grows or fluctuates noticeably. Don't worry if the "available" figure is a reasonable percentage of the total memory available as it is in the example from above repeated here:
+
+```
+$ free -m
+ total used free shared buff/cache available
+Mem: 3244 3069 35 49 140 667
+Swap: 3535 0 3535
+```
+
+### Linux performance is complicated
+
+All that aside, memory on a Linux system can fill up and performance can slow down. Just don't take one report on memory usage as an indication that your system's in trouble.
+
+Memory management on Linux systems is complicated because of the measures taken to ensure the best use of system resources. Don't let the initial appearance of full memory trick you into believing that your system is in trouble when it isn't.
+
+**[ Two-Minute Linux Tips:[Learn how to master a host of Linux commands in these 2-minute video tutorials][3] ]**
+
+Join the Network World communities on [Facebook][4] and [LinkedIn][5] to comment on topics that are top of mind.
+
+--------------------------------------------------------------------------------
+
+via: https://www.networkworld.com/article/3394603/when-to-be-concerned-about-memory-levels-on-linux.html
+
+作者:[Sandra Henry-Stocker][a]
+选题:[lujun9972][b]
+译者:[译者ID](https://github.com/译者ID)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]: https://www.networkworld.com/author/Sandra-Henry_Stocker/
+[b]: https://github.com/lujun9972
+[1]: https://images.idgesg.net/images/article/2019/05/full-swimming-pool-100796221-large.jpg
+[2]: https://www.networkworld.com/article/3391029/must-know-linux-commands.html
+[3]: https://www.youtube.com/playlist?list=PL7D2RMSmRO9J8OTpjFECi8DJiTQdd4hua
+[4]: https://www.facebook.com/NetworkWorld/
+[5]: https://www.linkedin.com/company/network-world
diff --git a/sources/tech/20190515 How to manage access control lists with Ansible.md b/sources/tech/20190515 How to manage access control lists with Ansible.md
new file mode 100644
index 0000000000..692dd70599
--- /dev/null
+++ b/sources/tech/20190515 How to manage access control lists with Ansible.md
@@ -0,0 +1,139 @@
+[#]: collector: (lujun9972)
+[#]: translator: ( )
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (How to manage access control lists with Ansible)
+[#]: via: (https://opensource.com/article/19/5/manage-access-control-lists-ansible)
+[#]: author: (Taz Brown https://opensource.com/users/heronthecli)
+
+How to manage access control lists with Ansible
+======
+Automating ACL management with Ansible's ACL module is a smart way to
+strengthen your security strategy.
+![Data container block with hexagons][1]
+
+Imagine you're a new DevOps engineer in a growing agile environment, and recently your company has experienced phenomenal growth. To support expansion, the company increased hiring by 25% over the last quarter and added 5,000 more servers and network devices to its infrastructure. The company now has over 13,000 users, and you need a tool to scale the existing infrastructure and manage your large number of users and their thousands of files and directories. The company decided to adopt [Ansible][2] company-wide to manage [access control lists (ACLs)][3] and answer the call of effectively managing files and directories and permissions.
+
+Ansible can be used for a multitude of administration and maintenance tasks and, as a DevOps engineer or administrator, it's likely you've been tasked with using it to manage ACLs.
+
+### About managing ACLs
+
+ACLs allow regular users to share their files and directories selectively with other users and groups. With ACLs, a user can grant others the ability to read, write, and execute files and directories without leaving those filesystem elements open.
+
+ACLs are set and removed at the command line using the **setfacl** utility. The command is usually followed by the name of a file or directory. To set permissions, you would use the Linux command **setfacl -m d ⭕rx ** (e.g., **setfacl -m d ⭕rx Music/**). To view the current permissions on a directory, you would use the command **getfacl ** (e.g., **getfacl Music/** ). To remove an ACL from a file or directory, you would type the command, **# setfacl -x ** (to remove only the specified ACL from the file/directory) or **# setfacl -b ** (to remove all ACLs from the file/directory).
+
+Only the owner assigned to the file or directory can set ACLs. (It's important to understand this before you, as the admin, take on Ansible to manage your ACLs.) There are also default ACLs, which control directory access; if a file inside a directory has no ACL, then the default ACL is applied.
+
+
+```
+sudo setfacl -m d⭕rx Music
+getfacl Music/
+# file: Music/
+# owner: root
+# group: root
+user::rwx
+group::---
+other::---
+default:user::rwx
+default:group::---
+default:other::r-x
+```
+
+### Enter Ansible
+
+So how can Ansible, in all its wisdom, tackle the task of applying permissions to users, files, directories, and more? Ansible can play nicely with ACLs, just as it does with a lot of features, utilities, APIs, etc. Ansible has an out-of-the-box [ACL module][3] that allows you to create playbooks/roles around granting a user access to a file, removing ACLs for users on a specific file, setting default ACLs for users on files, or obtaining ACLs on particular files.
+
+Anytime you are administering ACLs, you should use the best practice of "least privilege," meaning you should give a user access only to what they need to perform their role or execute a task, and no more. Restraint and minimizing the attack surface are critical. The more access extended, the higher the risk of unauthorized access to company assets.
+
+Here's an example Ansible playbook:
+
+![Ansible playbook][4]
+
+As an admin, automating ACL management demands that your Ansible playbooks can scale across your infrastructure to increase speed, improve efficiency, and reduce the time it takes to achieve your goals. There will be times when you need to determine the ACL for a specific file. This is essentially the same as using **getfacl ** in Linux. If you want to determine the ACLs of many, specific files, start with a playbook that looks like this:
+
+
+```
+\---
+\- hosts: all
+tasks:
+\- name: obtain the acl for a specific file
+acl:
+path: /etc/logrotate.d
+user_nfsv4_acls: true
+register: acl_info
+```
+
+You can use the following playbook to set permissions on files/directories:
+
+![Ansible playbook][5]
+
+This playbook grants user access to a file:
+
+
+```
+\- hosts:
+become: yes
+gather_facts: no
+tasks:
+\- name: Grant user Shirley read access to a file
+acl:
+path: /etc/foo.conf
+entity: shirley
+etype: user
+permissions: r
+state: present
+```
+
+And this playbook grants user access to a directory:
+
+
+```
+\---
+\- hosts: all
+become: yes
+gather_facts: no
+tasks:
+\- name: setting permissions on directory and user
+acl:
+path: /path/to/scripts/directory
+entity: "{{ item }}"
+etype: user
+permissions: rwx
+state: present
+loop:
+\- www-data
+\- root
+```
+
+### Security realized?
+
+Applying ACLs to files and users is a practice you should take seriously in your role as a DevOps engineer. Security best practices and formal compliance often get little or no attention. When you allow access to files with sensitive data, you are always risking that the data will be tampered with, stolen, or deleted. Therefore, data protection must be a focal point in your security strategy. Ansible can be part of your security automation strategy, as demonstrated here, and your ACL application is as good a place to start as any.
+
+Automating your security practices will, of course, go beyond just managing ACLs; it might also involve [SELinux][6] configuration, cryptography, security, and compliance. Remember that Ansible also allows you to define your systems for security, whether it's locking down users and groups (e.g., managing ACLs), setting firewall rules, or applying custom security policies.
+
+Your security strategy should start with a baseline plan. As a DevOps engineer or admin, you should examine the current security strategy (or the lack thereof), then chart your plan for automating security in your environment.
+
+### Conclusion
+
+Using Ansible to manage your ACLs as part of your overall security automation strategy depends on the size of both the company you work for and the infrastructure you manage. Permissions, users, and files can quickly get out of control, potentially placing your security in peril and putting the company in a position you definitely don't want to it be.
+
+--------------------------------------------------------------------------------
+
+via: https://opensource.com/article/19/5/manage-access-control-lists-ansible
+
+作者:[Taz Brown ][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/heronthecli
+[b]: https://github.com/lujun9972
+[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/data_container_block.png?itok=S8MbXEYw (Data container block with hexagons)
+[2]: https://opensource.com/article/19/2/quickstart-guide-ansible
+[3]: https://docs.ansible.com/ansible/latest/modules/acl_module.html
+[4]: https://opensource.com/sites/default/files/images/acl.yml_.png (Ansible playbook)
+[5]: https://opensource.com/sites/default/files/images/set_filedir_permissions.png (Ansible playbook)
+[6]: https://opensource.com/article/18/8/cheat-sheet-selinux
diff --git a/sources/tech/20190516 Building Smaller Container Images.md b/sources/tech/20190516 Building Smaller Container Images.md
new file mode 100644
index 0000000000..49700ce58a
--- /dev/null
+++ b/sources/tech/20190516 Building Smaller Container Images.md
@@ -0,0 +1,117 @@
+[#]: collector: (lujun9972)
+[#]: translator: (geekpi)
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (Building Smaller Container Images)
+[#]: via: (https://fedoramagazine.org/building-smaller-container-images/)
+[#]: author: (Muayyad Alsadi https://fedoramagazine.org/author/alsadi/)
+
+Building Smaller Container Images
+======
+
+![][1]
+
+Linux Containers have become a popular topic, making sure that a container image is not bigger than it should be is considered as a good practice. This article give some tips on how to create smaller Fedora container images.
+
+### microdnf
+
+Fedora’s DNF is written in Python and and it’s designed to be extensible as it has wide range of plugins. But Fedora has an alternative base container image which uses an smaller package manager called [microdnf][2] written in C. To use this minimal image in a Dockerfile the FROM line should look like this:
+
+```
+FROM registry.fedoraproject.org/fedora-minimal:30
+```
+
+This is an important saving if your image does not need typical DNF dependencies like Python. For example, if you are making a NodeJS image.
+
+### Install and Clean up in one layer
+
+To save space it’s important to remove repos meta data using _dnf clean all_ or its microdnf equivalent _microdnf clean all_. But you should not do this in two steps because that would actually store those files in a container image layer then mark them for deletion in another layer. To do it properly you should do the installation and cleanup in one step like this
+
+```
+FROM registry.fedoraproject.org/fedora-minimal:30
+RUN microdnf install nodejs && microdnf clean all
+```
+
+### Modularity with microdnf
+
+Modularity is a way to offer you different versions of a stack to choose from. For example you might want non-LTS NodeJS version 11 for a project and old LTS NodeJS version 8 for another and latest LTS NodeJS version 10 for another. You can specify which stream using colon
+
+```
+# dnf module list
+# dnf module install nodejs:8
+```
+
+The _dnf module install_ command implies two commands one that enables the stream and one that install nodejs from it.
+
+```
+# dnf module enable nodejs:8
+# dnf install nodejs
+```
+
+Although microdnf does not offer any command related to modularity, it is possible to enable a module with a configuation file, and libdnf (which microdnf uses) [seems][3] to support modularity streams. The file looks like this
+
+```
+/etc/dnf/modules.d/nodejs.module
+[nodejs]
+name=nodejs
+stream=8
+profiles=
+state=enabled
+```
+
+A full Dockerfile using modularity with microdnf looks like this:
+
+```
+FROM registry.fedoraproject.org/fedora-minimal:30
+RUN \
+ echo -e "[nodejs]\nname=nodejs\nstream=8\nprofiles=\nstate=enabled\n" > /etc/dnf/modules.d/nodejs.module && \
+ microdnf install nodejs zopfli findutils busybox && \
+ microdnf clean all
+```
+
+### Multi-staged builds
+
+In many cases you might have tons of build-time dependencies that are not needed to run the software for example building a Go binary, which statically link dependencies. Multi-stage build are an efficient way to separate the application build and the application runtime.
+
+For example the Dockerfile below builds [confd][4] a Go application.
+
+```
+# building container
+FROM registry.fedoraproject.org/fedora-minimal AS build
+RUN mkdir /go && microdnf install golang && microdnf clean all
+WORKDIR /go
+RUN export GOPATH=/go; CGO_ENABLED=0 go get github.com/kelseyhightower/confd
+
+FROM registry.fedoraproject.org/fedora-minimal
+WORKDIR /
+COPY --from=build /go/bin/confd /usr/local/bin
+CMD ["confd"]
+```
+
+The multi-stage build is done by adding _AS_ after the _FROM_ instruction and by having another _FROM_ from a base container image then using C _OPY –from=_ instruction to copy content from the _build_ container to the second container.
+
+This Dockerfile can then be built and run using podman
+
+```
+$ podman build -t myconfd .
+$ podman run -it myconfd
+```
+
+--------------------------------------------------------------------------------
+
+via: https://fedoramagazine.org/building-smaller-container-images/
+
+作者:[Muayyad Alsadi][a]
+选题:[lujun9972][b]
+译者:[译者ID](https://github.com/译者ID)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]: https://fedoramagazine.org/author/alsadi/
+[b]: https://github.com/lujun9972
+[1]: https://fedoramagazine.org/wp-content/uploads/2019/05/smaller-container-images-816x345.jpg
+[2]: https://github.com/rpm-software-management/microdnf
+[3]: https://bugzilla.redhat.com/show_bug.cgi?id=1575626
+[4]: https://github.com/kelseyhightower/confd
diff --git a/sources/tech/20190516 Create flexible web content with a headless management system.md b/sources/tech/20190516 Create flexible web content with a headless management system.md
new file mode 100644
index 0000000000..df58e96d0d
--- /dev/null
+++ b/sources/tech/20190516 Create flexible web content with a headless management system.md
@@ -0,0 +1,113 @@
+[#]: collector: (lujun9972)
+[#]: translator: ( )
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (Create flexible web content with a headless management system)
+[#]: via: (https://opensource.com/article/19/5/headless-cms)
+[#]: author: (Sam Bocetta https://opensource.com/users/sambocetta)
+
+Create flexible web content with a headless management system
+======
+Get the versatility and freedom to deliver content however you think is
+best.
+![Browser of things][1]
+
+In recent years, we’ve witnessed an explosion in the number of technological devices that deliver web-based content to users. Smartphones, tablets, smartwatches, and more—all with progressively advancing technical capabilities and support for an ever-widening list of operating systems and web browsers—swarm anew onto the market each year.
+
+What does this trend have to do with web development and headless versus traditional Content Management Systems (CMS)? Quite a lot.
+
+### CMS creates the internet
+
+A CMS is an application or set of computer programs used to manage digital content like images, videos, blog posts—essentially anything you would post on a website. An obvious example of a CMS is [WordPress][2].
+
+The word "manage" is used broadly here. It can refer to creating, editing, or updating any kind of digital content on a website, as well as indexing the site to make it easily searchable.
+
+So, a CMS essentially separates the content displayed on a website from how that content is displayed. It also allows you, the website administrator, to set permissions on who can access, edit, modify, or otherwise manage that content.
+
+Suppose you want to post a new blog entry, update or correct something in an old post, write on your Facebook page, share a social media link to a video or article, or embed a video, music file, or pre-written set of text into a page on your website. If you have ever done anything like this, you have made use of CMS features.
+
+### Traditional CMS architecture: Benefits and flaws
+
+There are two major components that make up a CMS: the Content Management Application (CMA) and the Content Delivery Application (CDA). The CMA pertains to the front-end portion of the website. This is what allows authors or other content managers to edit and create content without help from a web developer. The CDA pertains to the back end portion of a website. By organizing and compiling content to make website content updates possible, it automates the function of a website administrator.
+
+Traditionally, these two pieces are joined into a single unit as a "coupled" CMS architecture. A **coupled CMS** uses a specific front-end delivery system (CMA) built into the application itself. The term "coupled" comes from the fact that the front-end framework—the templates and layout of the pages and how those pages respond to being opened in certain browsers—is coupled to the website’s content. In other words, in a coupled CMS architecture the Content Management Application (CMA) and Content Delivery Application (CDA) are inseparably merged.
+
+#### Benefits of the traditional CMS
+
+Coupled architecture does offer advantages, mainly in simplicity and ease of use for those who are not technically sophisticated. This fact explains why a platform like WordPress, which retains a traditional CMS setup, [remains so popular][3] for those who create websites or blogs.
+
+Further simplifying the web development process [are website builder applications][4], such as [Wix][5] and [Squarespace][6], which allow you to build drag-and-drop websites. The most popular of these builders use open source libraries but are themselves closed source. These sites allow almost anyone who can find the internet to put a website together without wading through the relatively short weeds of a CMS environment. While builder applications were [the object of derision][7] not so long ago amongst many in the open source community—mainly because they tended to give websites a generic and pre-packaged look and feel—they have grown increasingly functional and variegated.
+
+#### Security is an issue
+
+However, for all but the simplest web apps, a traditional CMS architecture results in inflexible technology. Modifying a static website or web app with a traditional CMS requires tremendous time and effort to produce updates, patches, and installations, preventing developers from keeping up with the growing number of devices and browsers.
+
+Furthermore, coupled CMSs have two built-in security flaws:
+
+**Risk #1** : Since content management and delivery are bound together, hackers who breach your website through the front end automatically gain access to the back-end database. This lack of separation between data and its presentation increases the likelihood that data will be stolen. Depending on the kind of user data stored on your website’s servers, a large-scale theft could be catastrophic.
+
+**Risk #2** : The risk of successful [Distributed Denial of Service][8] (DDoS) attacks increases without a separate system for delivering content to your website. DDoS attacks flood content delivery networks with so many traffic requests that they become overwhelmed and go offline. If your content delivery network is separated from your actual web servers, attackers will be less able to bring down your site.
+
+To avoid these problems, developers have introduced headless and decoupled CMSs.
+
+### Comparing headless and decoupled CMSs
+
+The "head" of a CMS is a catch-all term for the Content Delivery Application. Therefore, a CMS without one—and so with no way of delivering content to a user—is called "headless."
+
+This lack of an established delivery method gives headless CMSs enormous versatility. Without a CDA there is no pre-established delivery method, so developers can design separate frameworks as the need arises. The problem of constantly patching your website, web apps, and other code to guarantee compatibility disappears.
+
+Another option, a **decoupled CMS** , includes many of the same features and benefits as a headless CMS, but there is one crucial difference. Where a headless CMS leaves it entirely to the developer to deliver and present content to their users, a decoupled CMS offers pre-established delivery tools that developers can either take or leave. Decoupled CMSs thus offer both the simplicity of the traditional CMS and the versatility of the headless ones.
+
+In short, a decoupled CMS is sometimes called a **hybrid CMS ****since it's a hybrid of the coupled and headless designs. Decoupled CMSs are not a new concept. As far back as 2015, PHP core repository developer David Buchmann was [calling on devs][9] to decouple their CMSs to meet a wider set of challenges.
+
+### Security improvements with a headless CMS
+
+Perhaps the most important point to make about headless versus decoupled content management architectures, and how they both differ from traditional architecture, is the added security benefit. In both the headless and decoupled designs, content and user data are located on a separate back-end system protected by a firewall. The user can’t access the content management application itself.
+
+However, it's important to keep in mind that the major consequence of this change in architectures is that since the architecture is fragmented, developers have to fill in the gaps and design content delivery and presentation mechanisms on their own. This means that whether you opt to go headless or decoupled, your developer needs to understand security. While separating content management and content delivery gives hackers one fewer vector through which to attack, this isn’t a security benefit in itself. The burden will be on your devs to properly secure your resulting CDA.
+
+A firewall protecting the back end provides a [crucial layer of security][10]. Headless and decoupled architectures can distribute your content among multiple databases, so if you take advantage of this possibility you can lower the chance of successful DDoS attacks even further. Open source headless CMS can also benefit from the installation of a [Linux VPN][11] or Linux kernel firewall management tool like [iptables][12]. All of these options combine to provide the added security developers need to create no matter what kind of CDA or back end setup they choose.
+
+Benefits aside, keep in mind that headless CMS platforms are a fairly new tech. Before making the switch to headless or decoupled, consider whether the host you’re using can support your added security so that you can host your application behind network security systems to block attempts at unauthorized access. If they cannot, a host change might be in order. When evaluating new hosts, also consider any existing contracts or security and compliance restrictions in place (GDPR, CCPA, etc.) which could cause migration troubles.
+
+### Open source options
+
+As you can see, headless architecture offers designers the versatility and freedom to deliver content however they think best. This spirit of freedom fits naturally with the open source paradigm in software design, in which all source code is available to public view and may be taken and modified by anyone for any reason.
+
+There are a number of open source headless CMS platforms that allow developers to do just that: [Mura,][13] [dotCMS][14], and [Cockpit CMS][15] to name a few. For a deeper dive into the world of open source headless CMS platforms, [check out this article][16].
+
+### Final thoughts
+
+For web designers and developers, the idea of a headless CMS marks a significant rethinking of how sites are built and delivered. Moving to this architecture is a great way to future-proof your website against changing preferences and whatever tricks future hackers may cook up, while at the same time creating a seamless user experience no matter what device or browser is used. You might also take a look at [this guide][17] for UX tips on designing your website in a way that meshes with headless and decoupled architectures.
+
+--------------------------------------------------------------------------------
+
+via: https://opensource.com/article/19/5/headless-cms
+
+作者:[Sam Bocetta][a]
+选题:[lujun9972][b]
+译者:[译者ID](https://github.com/译者ID)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]: https://opensource.com/users/sambocetta
+[b]: https://github.com/lujun9972
+[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_desktop_website_checklist_metrics.png?itok=OKKbl1UR (Browser of things)
+[2]: https://wordpress.org/
+[3]: https://kinsta.com/wordpress-market-share/
+[4]: https://hostingcanada.org/website-builders/
+[5]: https://www.wix.com/
+[6]: https://www.squarespace.com
+[7]: https://arstechnica.com/information-technology/2016/11/wordpress-and-wix-trade-shots-over-alleged-theft-of-open-source-code/
+[8]: https://www.cloudflare.com/learning/ddos/what-is-a-ddos-attack/
+[9]: https://opensource.com/business/15/3/decoupling-your-cms
+[10]: https://www.hostpapa.com/blog/security/why-your-small-business-needs-a-firewall/
+[11]: https://surfshark.com/download/linux
+[12]: https://www.linode.com/docs/security/firewalls/control-network-traffic-with-iptables/
+[13]: https://www.getmura.com/
+[14]: https://dotcms.com/
+[15]: https://getcockpit.com/
+[16]: https://www.cmswire.com/web-cms/13-headless-cmss-to-put-on-your-radar/
+[17]: https://medium.com/@mat_walker/tips-for-content-modelling-with-the-headless-cms-contentful-7e886a911962
diff --git a/sources/tech/20190516 Querying 10 years of GitHub data with GHTorrent and Libraries.io.md b/sources/tech/20190516 Querying 10 years of GitHub data with GHTorrent and Libraries.io.md
new file mode 100644
index 0000000000..c7ec1de513
--- /dev/null
+++ b/sources/tech/20190516 Querying 10 years of GitHub data with GHTorrent and Libraries.io.md
@@ -0,0 +1,164 @@
+[#]: collector: (lujun9972)
+[#]: translator: ( )
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (Querying 10 years of GitHub data with GHTorrent and Libraries.io)
+[#]: via: (https://opensource.com/article/19/5/chaossearch-github-ghtorrent)
+[#]: author: (Pete Cheslock https://opensource.com/users/petecheslock/users/ghaff/users/payalsingh/users/davidmstokes)
+
+Querying 10 years of GitHub data with GHTorrent and Libraries.io
+======
+There is a way to explore GitHub data without any local infrastructure
+using open source datasets.
+![magnifying glass on computer screen][1]
+
+I’m always on the lookout for new datasets that we can use to show off the power of my team's work. [**CHAOS** SEARCH][2] turns your [Amazon S3][3] object storage data into a fully searchable [Elasticsearch][4]-like cluster. With the Elasticsearch API or tools like [Kibana][5], you can then query whatever data you find.
+
+I was excited when I found the [GHTorrent][6] project to explore. GHTorrent aims to build an offline version of all data available through the GitHub APIs. If datasets are your thing, this is a project worth checking out or even consider [donating one of your GitHub API keys][7].
+
+### Accessing GHTorrent data
+
+There are many ways to gain access to and use [GHTorrent’s data][8], which is available in [NDJSON][9]** **format. This project does a great job making the data available in multiple forms, including[CSV][10] for restoring into a [MySQL][11] database, [MongoDB][12] dumps of all objects, and Google Big Query** **(free) for exporting data directly into Google’s object storage. There is one caveat: this dataset has a nearly complete dataset from 2008 to 2017 but is not as complete from 2017 to today. That will impact our ability to query with certainty, but it is still an exciting amount of information.
+
+I chose Google Big Query to avoid running any database myself, so I was quickly able to download a full corpus of data including users and projects. **CHAOS** SEARCH can natively analyze the NDJSON format, so after uploading the data to Amazon S3 I was able to index it in just a few minutes. The **CHAOS** SEARCH platform doesn’t require users to set up index schemas or define mappings for their data, so it discovered all of the fields—strings, integers, etc.—itself.
+
+With my data fully indexed and ready for search and aggregation, I wanted to dive in and see what insights we can learn, like which software languages are the most popular for GitHub projects.
+
+(A note on formatting: this is a valid JSON query that we won't format correctly here to avoid scroll fatigue. To properly format it, you can copy it locally and send to a command-line utility like [jq][13].)
+
+
+```
+`{"aggs":{"2":{"date_histogram":{"field":"root.created_at","interval":"1M","time_zone":"America/New_York","min_doc_count":1}}},"size":0,"_source":{"excludes":[]},"stored_fields":["*"],"script_fields":{},"docvalue_fields":["root.created_at","root.updated_at"],"query":{"bool":{"must":[],"filter":[{"match_all":{}}],"should":[],"must_not":[{"match_phrase":{"root.language":{"query":""}}}]}}}`
+```
+
+This result is of little surprise to anyone who’s followed the state of open source languages over recent years.
+
+![Which software languages are the most popular on GitHub.][14]
+
+[JavaScript][15] is still the reigning champion, and while some believe JavaScript is on its way out, it remains the 800-pound gorilla and is likely to remain that way for some time. [Java][16] faces similar rumors and this data shows that it's a major part of the open source ecosystem.
+
+Given the popularity of projects like [Docker][17] and [Kubernetes][18], you might be wondering, “What about Go ([Golang][19])?” This is a good time for a reminder that the GitHub dataset discussed here contains some gaps, most significantly after 2017, which is about when I saw Golang projects popping up everywhere. I hope to repeat this search with a complete GitHub dataset and see if it changes the rankings at all.
+
+Now let's explore the rate of project creation. (Reminder: this is valid JSON consolidated for readability.)
+
+
+```
+`{"aggs":{"2":{"date_histogram":{"field":"root.created_at","interval":"1M","time_zone":"America/New_York","min_doc_count":1}}},"size":0,"_source":{"excludes":[]},"stored_fields":["*"],"script_fields":{},"docvalue_fields":["root.created_at","root.updated_at"],"query":{"bool":{"must":[],"filter":[{"match_all":{}}],"should":[],"must_not":[{"match_phrase":{"root.language":{"query":""}}}]}}}`
+```
+
+Seeing the rate at which new projects are created would be fun impressive as well, with tremendous growth starting around 2012:
+
+![The rate at which new projects are created on GitHub.][20]
+
+Now that I knew the rate of projects created as well as the most popular languages used to create these projects, I wanted to find out what open source licenses these projects chose. Unfortunately, this data doesn’t exist in the GitHub projects dataset, but the fantastic team over at [Tidelift][21] publishes a detailed list of GitHub projects, licenses used, and other details regarding the state of open source software in their [Libraries.io][22][ data][23]. Ingesting this dataset into **CHAOS** SEARCH took just minutes, letting me see which open source software licenses are the most popular on GitHub:
+
+(Reminder: this is valid JSON consolidated for readability.)
+
+
+```
+`{"aggs":{"2":{"terms":{"field":"Repository License","size":10,"order":{"_count":"desc"}}}},"size":0,"_source":{"excludes":[]},"stored_fields":["*"],"script_fields":{},"docvalue_fields":["Created Timestamp","Last synced Timestamp","Latest Release Publish Timestamp","Updated Timestamp"],"query":{"bool":{"must":[],"filter":[{"match_all":{}}],"should":[],"must_not":[{"match_phrase":{"Repository License":{"query":""}}}]}}}`
+```
+
+The results show some significant outliers:
+
+![Which open source software licenses are the most popular on GitHub.][24]
+
+As you can see, the [MIT license][25] and the [Apache 2.0 license][26] by far outweighs most of the other open source licenses used for these projects, while [various BSD and GPL licenses][27] follow far behind. I can’t say that I’m surprised by these results given GitHub’s open model. I would guess that users, not companies, create most projects and that they use the MIT license to make it simple for other people to use, share, and contribute. That Apache 2.0** **licensing is right behind also makes sense, given just how many companies want to ensure their trademarks are respected and have an open source component to their businesses.
+
+Now that I identified the most popular licenses, I was curious to see the least used ones. By adjusting my last query, I reversed the top 10 into the bottom 10 and was able to find just two projects using the [University of Illinois—NCSA Open Source License][28]. I had never heard of this license before, but it’s pretty close to Apache 2.0. It’s interesting to see just how many different software licenses are in use across all GitHub projects.
+
+![The University of Illinois/NCSA open source license.][29]
+
+The University of Illinois/NCSA open source license.
+
+After that, I dove into a specific language (JavaScript) to see the most popular license used there. (Reminder: this is valid JSON consolidated for readability.)
+
+
+```
+`{"aggs":{"2":{"terms":{"field":"Repository License","size":10,"order":{"_count":"desc"}}}},"size":0,"_source":{"excludes":[]},"stored_fields":["*"],"script_fields":{},"docvalue_fields":["Created Timestamp","Last synced Timestamp","Latest Release Publish Timestamp","Updated Timestamp"],"query":{"bool":{"must":[{"match_phrase":{"Repository Language":{"query":"JavaScript"}}}],"filter":[{"match_all":{}}],"should":[],"must_not":[{"match_phrase":{"Repository License":{"query":""}}}]}}}`
+```
+
+There were some surprises in this output.
+
+![The most popular open source licenses used for GitHub JavaScript projects.][30]
+
+Even though the default license for [NPM][31] modules when created with **npm init **is the one from [Internet Systems Consortium (ISC)][32], you can see that a considerable number of these projects use MIT as well as Apache 2.0 for their open source license.
+
+Since the Libraries.io dataset is rich in open source project content, and since the GHTorrent data is missing the last few years’ data (and thus missing any details about Golang projects), I decided to run a similar query to see how Golang projects license their code.
+
+(Reminder: this is valid JSON consolidated for readability.)
+
+
+```
+`{"aggs":{"2":{"terms":{"field":"Repository License","size":10,"order":{"_count":"desc"}}}},"size":0,"_source":{"excludes":[]},"stored_fields":["*"],"script_fields":{},"docvalue_fields":["Created Timestamp","Last synced Timestamp","Latest Release Publish Timestamp","Updated Timestamp"],"query":{"bool":{"must":[{"match_phrase":{"Repository Language":{"query":"Go"}}}],"filter":[{"match_all":{}}],"should":[],"must_not":[{"match_phrase":{"Repository License":{"query":""}}}]}}}`
+```
+
+The results were quite different than Javascript.
+
+![How Golang projects license their GitHub code.][33]
+
+Golang offers a stunning reversal from JavaScript—nearly three times as many Golang projects are licensed with Apache 2.0 over MIT. While it’s hard precisely explain why this is the case, over the last few years there’s been massive growth in Golang, especially among companies building projects and software offerings, both open source and commercially.
+
+As we learned above, many of these companies want to enforce their trademarks, thus the move to the Apache 2.0 license makes sense.
+
+#### Conclusion
+
+In the end, I found some interesting results by diving into the GitHub users and projects data dump. Some of these I definitely would have guessed, but a few results were surprises to me as well, especially the outliers like the rarely-used NCSA license.
+
+All in all, you can see how quickly and easily the **CHAOS** SEARCH platform lets us find complicated answers to interesting questions. I dove into this dataset and received deep analytics without having to run any databases myself, and even stored the data inexpensively on Amazon S3—so there’s little maintenance involved. Now I can ask any other questions regarding the data anytime I want.
+
+What other questions are you asking your data, and what data sets do you use? Let me know in the comments or on Twitter [@petecheslock][34].
+
+_A version of this article was originally posted on[ **CHAOS** SEARCH][35]._
+
+* * *
+
+--------------------------------------------------------------------------------
+
+via: https://opensource.com/article/19/5/chaossearch-github-ghtorrent
+
+作者:[Pete Cheslock][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/petecheslock/users/ghaff/users/payalsingh/users/davidmstokes
+[b]: https://github.com/lujun9972
+[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/search_find_code_issue_bug_programming.png?itok=XPrh7fa0 (magnifying glass on computer screen)
+[2]: https://chaossearch.io/
+[3]: https://aws.amazon.com/s3/
+[4]: https://www.elastic.co/
+[5]: https://www.elastic.co/products/kibana
+[6]: http://ghtorrent.org
+[7]: http://ghtorrent.org/services.html
+[8]: http://ghtorrent.org/downloads.html
+[9]: http://ndjson.org
+[10]: https://en.wikipedia.org/wiki/Comma-separated_values
+[11]: https://en.wikipedia.org/wiki/MySQL
+[12]: https://www.mongodb.com/
+[13]: https://stedolan.github.io/jq/
+[14]: https://opensource.com/sites/default/files/uploads/github-1_500.png (Which software languages are the most popular on GitHub.)
+[15]: https://en.wikipedia.org/wiki/JavaScript
+[16]: /resources/java
+[17]: /resources/what-docker
+[18]: /resources/what-is-kubernetes
+[19]: https://golang.org/
+[20]: https://opensource.com/sites/default/files/uploads/github-2_500.png (The rate at which new projects are created on GitHub.)
+[21]: https://tidelift.com
+[22]: http://libraries.io/
+[23]: https://libraries.io/data
+[24]: https://opensource.com/sites/default/files/uploads/github-3_500.png (Which open source software licenses are the most popular on GitHub.)
+[25]: https://opensource.org/licenses/MIT
+[26]: https://opensource.org/licenses/Apache-2.0
+[27]: https://opensource.org/licenses
+[28]: https://tldrlegal.com/license/university-of-illinois---ncsa-open-source-license-(ncsa)
+[29]: https://opensource.com/sites/default/files/uploads/github-4_500_0.png (The University of Illinois/NCSA open source license.)
+[30]: https://opensource.com/sites/default/files/uploads/github-5_500_0.png (The most popular open source licenses used for GitHub JavaScript projects.)
+[31]: https://www.npmjs.com/
+[32]: https://en.wikipedia.org/wiki/ISC_license
+[33]: https://opensource.com/sites/default/files/uploads/github-6_500.png (How Golang projects license their GitHub code.)
+[34]: https://twitter.com/petecheslock
+[35]: https://chaossearch.io/blog/where-are-the-github-users-part-1/
diff --git a/sources/tech/20190516 System76-s secret sauce for success.md b/sources/tech/20190516 System76-s secret sauce for success.md
new file mode 100644
index 0000000000..9409de535f
--- /dev/null
+++ b/sources/tech/20190516 System76-s secret sauce for success.md
@@ -0,0 +1,71 @@
+[#]: collector: (lujun9972)
+[#]: translator: ( )
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (System76's secret sauce for success)
+[#]: via: (https://opensource.com/article/19/5/system76-secret-sauce)
+[#]: author: (Don Watkins https://opensource.com/users/don-watkins/users/don-watkins)
+
+System76's secret sauce for success
+======
+Linux computer maker's approach to community-informed software and
+hardware development embodies the open source way.
+![][1]
+
+In [_The Open Organization_][2], Jim Whitehurst says, "show passion for the purpose of your organization and constantly drive interest in it. People are drawn to and generally, want to follow passionate people." Carl Richell, the founder and CEO of Linux hardware maker [System76][3], pours that secret sauce to propel his company in the world of open hardware, Linux, and open source.
+
+Carl demonstrates quiet confidence and engages the team at System76 in a way that empowers their creative synergy. During a recent visit to System76's Denver factory, I could immediately tell that the employees love what they do, what they produce, and their interaction with each other and their customers, and Carl sets that example. They are as they [describe themselves][4]: a diverse team of creators, makers, and builders; a small company innovating the next big things; and a group of extremely hard-core nerds.
+
+### A revolutionary approach
+
+In 2005, Carl had a vision, which began as talk over some beers, to produce desktop and laptop computers that come installed with Linux. He's transformed that idea into a highly successful company founded on the [belief][5] that "the computer and operating system are the most powerful and versatile tools ever created." And by producing the best tools, System76 can inspire the curious to make their greatest discovery or complete their greatest project.
+
+![System 76 founder and CEO Carl Richell][6]
+
+Carl Richell's enthusiasm was obvious at System 76's [Thelio launch event][7].
+
+System76 lives up to its name, which was inspired by the American Revolution of 1776. The company views itself as a leader in the open source revolution, granting people freedom and independence from proprietary hardware and software.
+
+But the revolution does not end there; it continues with the company's business practices and diverse environment that aims to close the gender gap in technology leadership. Eight of the company's 28 employees are women, including vice president of marketing Louisa Bisio, creative manager Kate Hazen, purchasing manager May Liu, head of technical support Emma Marshall, and manufacturing control and logistics manager Sarah Zinger.
+
+### Community-informed design
+
+The staff members' passion and ingenuity for making the Linux experience enjoyable for customers creates an outstanding culture. Because the company believes the Linux desktop deserves a dedicated PC manufacturer, in 2018, it brought manufacturing in-house. This allows System76's engineers to make design changes more quickly, based on their frequent interactions with Linux users to learn about their needs and wants. It also opens up its parts and process to the public, including publishing design files under GPL on [GitHub][8], consistent with its commitment to openness and open source.
+
+For example, when System76 decided to create its own version of Linux, [Pop!_OS][9], it hosted online meetings to discuss and learn what features and software its customers wanted. This decision to work closely with the community has been instrumental in making Pop!_OS successful.
+
+System76 again turned to the community when it began developing [Thelio][10], its new line of desktop computers. Marketing VP Louisa Bisio says, "Taking a similar approach to open hardware has been great. We started in-house design in 2016, prototyping different desktop designs. Then we moved from prototyping acrylic to sheet metal. Then the first few prototypes of Thelio were presented to our [Superfan][11] attendees in 2017, and their feedback was really important in adjusting the desktop designs and progressing Thelio iterations forward."
+
+Thelio is the product of research and development focusing on high-quality components and design. It features a unique cabling layout, innovative airflow within the computer case, and the Thelio Io open hardware SATA controller. Many of System76's customers use platforms like [CUDA][12] to do their work; to support them, System76 works backward and pulls out proprietary functionality, piece by piece, until everything is open.
+
+### Open roads ahead
+
+Manufacturing open laptops are on the long-range roadmap, but the company is actively working on an open motherboard and maintaining Pop!_OS and System76 drivers, which are open. This commitment to openness, customer-driven design, and culture give System 76 a unique place in computer manufacturing. All of this stems from founder Carl Richell and his philosophy "that technology should be open and accessible to everyone." [As Carl says][13], "open hardware benefits all of us. It's how we further advance technology and make it more available to everyone."
+
+--------------------------------------------------------------------------------
+
+via: https://opensource.com/article/19/5/system76-secret-sauce
+
+作者:[Don Watkins ][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/don-watkins/users/don-watkins
+[b]: https://github.com/lujun9972
+[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/bubblehands_fromRHT_520_0612LL.png?itok=_iQ2dO3S
+[2]: https://www.amazon.com/Open-Organization-Igniting-Passion-Performance/dp/1511392460
+[3]: https://system76.com/
+[4]: https://system76.com/about
+[5]: https://system76.com/pop
+[6]: https://opensource.com/sites/default/files/uploads/carl_richell.jpg (System 76 founder and CEO Carl Richell)
+[7]: https://trevgstudios.smugmug.com/System76/121418-Thelio-Press-Event/i-w6XNmKS
+[8]: https://github.com/system76
+[9]: https://opensource.com/article/18/1/behind-scenes-popos-linux
+[10]: https://system76.com/desktops
+[11]: https://system76.com/superfan
+[12]: https://en.wikipedia.org/wiki/CUDA
+[13]: https://opensource.com/article/19/4/system76-hardware
diff --git a/sources/tech/20190517 10 Places Where You Can Buy Linux Computers.md b/sources/tech/20190517 10 Places Where You Can Buy Linux Computers.md
new file mode 100644
index 0000000000..36e3a0972b
--- /dev/null
+++ b/sources/tech/20190517 10 Places Where You Can Buy Linux Computers.md
@@ -0,0 +1,311 @@
+[#]: collector: (lujun9972)
+[#]: translator: ( )
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (10 Places Where You Can Buy Linux Computers)
+[#]: via: (https://itsfoss.com/get-linux-laptops/)
+[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
+
+10 Places Where You Can Buy Linux Computers
+======
+
+_**Looking for Linux laptops? Here I list some online shops that either sell Linux computers or specialize only in Linux systems.**_
+
+Almost all the computers (except Apple) sold these days come with Windows preinstalled on it. The standard procedure for Linux users is to buy such a computer and then either remove Windows and install Linux or [dual boot Linux with Windows][1].
+
+But you don’t always have to go through Windows. You can buy Linux computers as well.
+
+But why buy a computer preinstalled with Linux when you can easily install Linux on any computer? Here are some reasons:
+
+ * A computer with Windows always has an extra cost for the Windows license. You can avoid that.
+ * Computers preinstalled with Linux are well-tested for hardware compatibility. You can be sure that your system will have WiFi and Bluetooth working instead of figuring these things on your own.
+ * Buying Linux laptops and desktops supports Linux indirectly. More sale indicates that there is a demand for Linux products and thus more vendors may incline to provide Linux as a choice of operating system.
+
+
+
+If you are looking to get a new Linux laptop, let me suggest you a few manufacturers and vendors that provide ready-to-use Linux systems.
+
+![][2]
+
+### 10 places to buy Linux laptops and computers
+
+A couple of disclaimer/information before you see the list of shops offering computers with Linux preloaded.
+
+Please make a purchase on your own decision. I am simply listing the Linux computer sellers here, I cannot vouch for their product quality, after sale service or other such things.
+
+This is not a ranking list. The items listed here are in no particular order. The numbers are used for the purpose of counting the items, not ranking them.
+
+Let’s see from where you can get desktops and laptops with Linux preinstalled.
+
+#### 1\. Dell
+
+![Dell XPS Ubuntu | Image Credit: Lifehacker][3]
+
+Dell has been offering Ubuntu laptops for several years now. Their flagship product XPS features a Developer Edition series that comes with Ubuntu preinstalled.
+
+If you read my [review of Dell XPS Ubuntu edition][4], you know that I loved this laptop. It’s been more than two years and this laptop is still in great condition and performance has not deteriorated.
+
+Dell XPS is an expensive device with a price tag of over $1000. If that’s out of your budget, Dell also has inexpensive offering in its Inspiron laptop range.
+
+Do note that Dell doesn’t display the Ubuntu/Linux laptops on its website. Unless you already know that Linux laptops are offered by Dell, you wouldn’t be able to find them.
+
+So, go to Dell’s website and enter Ubuntu in its search box to see the products that ship with Ubuntu Linux preinstalled.
+
+**Availability** : Most part of the world.
+
+[Dell][5]
+
+#### 2\. System76
+
+[System76][6] is a prominent name in the Linux computers world. This US-based company specializes in high-end computing devices that run Linux. Their targeted user-base is software developers.
+
+Initially, System76 used to offer Ubuntu on their machines. In 2017, they released their own Linux distribution [Pop!_OS][7] based on Ubuntu. Since then, Pop!_OS is the default OS on their machine with Ubuntu still available as a choice.
+
+Apart from performance, System76 has put a great emphasis on the design of its computer. Their [Thelio desktop series][8] has a handcrafted wooden design.
+
+![System76 Thelio Desktop][9]
+
+You may check their Linux laptops offering [here][10]. They also offer [Linux-based mini PCs][11] and [servers][12].
+
+Did I mention that System76 manufactures its computers in America instead of the obvious choice of China and Taiwan? The products are on the expensive side, perhaps for this reason.
+
+**Availability** : USA and 60 other countries. Extra custom duty may be applicable outside the US. More info [here][13].
+
+[System76][6]
+
+#### 3\. Purism
+
+Purism is a US-based company that takes pride in creating products and services that help you secure your data and privacy. That’s the reason why Purism calls itself a ‘Social Purpose Corporation’.
+
+[][14]
+
+Suggested read How To Use Google Drive In Linux
+
+Purism started with a crowdfunding campaign for creating a high-end open source laptop with (almost) no proprietary software. The [successful $250,000 crowdfunding campaign][15] gave birth to [Librem 15][16] laptop in 2015.
+
+![Purism Librem 13][17]
+
+Later Purism released a 13″ version called [Librem 13][18]. Purism also created a Linux distribution [Pure OS][19] keeping privacy and security in mind.
+
+[Pure OS can run on both desktop and mobile devices][20] and it is the default choice of operating system on its Librem laptops and [Librem 5 Linux phone][21].
+
+Purism gets its components from China, Taiwan, Japan, and the United States and builds/assemble them in the US. All their devices have hardware kill switches to turn off the microphone/camera and wireless/bluetooth.
+
+**Availability** : Worldwide with free international shipping. Custom duty may cost extra.
+
+[Purism][22]
+
+#### 4\. Slimbook
+
+Slimbook is a Linux computer vendor based in Spain. Slimbook came to limelight after launching the [first KDE branded laptop][23].
+
+Their offering is not limited to just KDE Neon. They offer Ubuntu, Kubuntu, Ubuntu MATE, Linux Mint and Spanish distributions like [Lliurex][24] and [Max][25]. You can also choose Windows at an additional cost or opt for no operating system at all.
+
+Slimbook has a wide variety of Linux laptops, desktops and mini PCs available. An iMac like 24″ [curved monitor that has in-built CPU][26] is an awesome addition to their collection.
+
+![Slimbook Kymera Aqua Liquid Cool Linux Computer][27]
+
+Want a liquid cooled Linux computer? Slimbook’s [Kymera Aqua][28] is for you.
+
+**Availability** : Worldwide but may cost extra in shipping and custom duty
+
+[Slimbook][29]
+
+#### 5\. TUXEDO Computers
+
+Another European candidate in this list of Linux computer vendors. [TUXEDO Computers][30] is based out of Germany and mainly focuses on German users and then European users.
+
+TUXEDO Computers only uses Linux and the computers are ‘manufactured in Germany’ and come with 5 years of guarantee and lifetime support.
+
+TUXEDO Computers has put up some real good effort in customizing its hardware to run on Linux. And if you ever run into trouble or want to start afresh, you have the system recovery option to restore factory settings automatically.
+
+![Tuxedo Computers supports a wide variety of distributions][31]
+
+TUXEDO Computers has a number of Linux laptops, desktops, mini-PCs available. They have both Intel and AMD processors. Apart from the computers, TUXEDO Computers also has a range of Linux supported accessories like docking stations, DVD/Blue-Ray burners, power bank and other peripheral devices.
+
+**Availability** : Free shipping in Germany and Europe (for orders above 150 Euro). Extra shipping charges and custom duty for non-EU countries. More info [here][32].
+
+[TUXEDO Computers][33]
+
+#### 6\. Vikings
+
+[Vikings][34] is based in Germany (instead of Scandinavia :D). Certified by [Free Software Foundation][35], Vikings focuses exclusively on Libre-friendly hardware.
+
+![Vikings’s products are certified by Free Software Foundation][36]
+
+The Linux laptops and desktops by Vikings come with [coreboot][37] or [Libreboot][38] instead of proprietary boot systems like BIOS and UEFI. You can also buy [server hardware][39] running no proprietary software.
+
+Vikings also has other accessories like router, docking station etc. The products are assembled in Germany.
+
+**Availability** : Worldwide (except North Korea). Non-EU countries may charge custom duty. More information [here][40].
+
+[Vikings][41]
+
+#### 7\. Ubuntushop.be
+
+No! It’s not the official Ubuntu Shop even though it has Ubuntu in its name. Ubuntushop is based in Belgium and originally started selling computers installed with Ubuntu.
+
+Today, you can get laptops preloaded with Linux distributions like Mint, Manjaro, elementrayOS. You can also request a distribution of your choice to be installed on the system you buy.
+
+![][42]
+
+One unique thing about Ubuntushop is that all of its computers come with default Tails OS live option. So even if it has a Linux distribution installed for regular use, you can always choose to boot into the Tails OS (without live USB). [Tails OS][43] is a Debian based distribution that deletes all traces of its use after logging out and it uses Tor network by default.
+
+[][44]
+
+Suggested read Things to do After Installing Ubuntu 18.04 and 18.10
+
+Unlike many other big players on this list, I feel that Ubuntushop is more of a ‘domestic operation’ where someone manually assembles your computer and installs Linux on it. But they have done quite some job on providing options like easy re-install, own cloud server etc.
+
+Got an old PC, send it to them while buying a new Linux computer and they will send it back to you after installing [lightweight Linux][45] on it so that the old computer is recycled and can still be put to some use.
+
+**Availability** : Belgium and rest of Europe.
+
+[Ubuntushop.be][46]
+
+#### 8\. Minifree
+
+[Minifree][47], short for Ministry of Freedom, is a company registered in England.
+
+You can guess that Minifree focuses on the freedom. It provides secure and privacy-respcting computers that come with [Libreboot][38] instead of BIOS or UEFI.
+
+Minifree devices are certified by [Free Software Foundation][48] which means that you can be sure that your computer adhere to guidelines and principals of Free and Open Source Software.
+
+![][49]
+
+Unlike many other Linux laptops vendors on this list, computers from Minifree are not super-expensive. You can get a Libreboot Linux laptop running [Trisquel GNU/Linux][50] from 200 euro.
+
+Apart from laptops, Minifree also has a range of accessories like a Libre Router, tablet, docking station, batteries, keyboard, mouse etc.
+
+If you care to run only 100% free software like [Richard Stallman][51], Minifree is for you.
+
+**Availability** : Worldwide. Shipping information is available [here][52].
+
+[Minifree][47]
+
+#### 9\. Entroware
+
+[Entroware][53] is another UK-based vendor that specializes in Linux-based laptops, desktop and servers.
+
+Like many others on the list, Entroware also has Ubuntu as its choice of Linux distribution. [Ubuntu MATE is also available as a choice on Entroware Linux laptops][54].
+
+![][55]
+
+Apart from laptops, desktop and servers, Entroware also has their [mini-PC Aura][56] and the iMac style [monitor with built-in CPU Ares][57].
+
+Availability: UK, Ireland France, Germany, Italy, Spain
+
+[Entroware][58]
+
+#### 10\. Juno Computers
+
+This is a new Linux laptop vendor on our list. Juno Computers is also based in UK and offers computers preinstalled with Linux. elementary OS, Ubuntu and Solus OS are the choices of Linux distributions here.
+
+Juno offers a range of laptops and a mini-PC called Olympia. Like almost all the mini-PCs offered by other vendors here, Olympia is also basically [Intel NUC][59].
+
+The main highlight from Juno Computers is a low-cost Chromebook alternative, Juve that costs £299. It runs a dual-booted system with Solus/elementray with an Android-based desktop operating system, [Prime OS][60].
+
+![Juve With Android-based Prime Os][61]
+
+Availability: UK, USA, Canada, Mexico, Most part of South America and Europe, Australia, New Zealand, some part of Asia and Africa. More information [here][62].
+
+[Juno Computers][63]
+
+#### Honorable mentions
+
+I have listed 10 places to get Linux computers but there are several other such shops available. I cannot include all of them in the main list and a couple of them seem to be out of stock for most products. However, I am going to mention them here so that you may check them on your own:
+
+ * [ZaReason][64]
+ * [Libiquity][65]
+ * [StationX][66]
+ * [Linux Certified][67]
+ * [Think Penguin][68]
+
+
+
+Other mainstream computer manufacturers like Acer, Lenovo etc may also have some Linux systems in their catalog so you may check their products as well.
+
+Have you ever bought a Linux computer? Where did you buy it? How’s your experience with it? Is it worth buying a Linux laptop? Do share your thoughts.
+
+--------------------------------------------------------------------------------
+
+via: https://itsfoss.com/get-linux-laptops/
+
+作者:[Abhishek Prakash][a]
+选题:[lujun9972][b]
+译者:[译者ID](https://github.com/译者ID)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]: https://itsfoss.com/author/abhishek/
+[b]: https://github.com/lujun9972
+[1]: https://itsfoss.com/guide-install-linux-mint-16-dual-boot-windows/
+[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/05/buy-linux-laptops.jpeg?resize=800%2C450&ssl=1
+[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/05/dell-xps-ubuntu.jpg?resize=800%2C450&ssl=1
+[4]: https://itsfoss.com/dell-xps-13-ubuntu-review/
+[5]: https://www.dell.com
+[6]: https://system76.com/
+[7]: https://itsfoss.com/pop-os-linux-review/
+[8]: https://system76.com/desktops
+[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/05/system76-thelio-desktop.jpg?ssl=1
+[10]: https://system76.com/laptops
+[11]: https://itsfoss.com/4-linux-based-mini-pc-buy-2015/
+[12]: https://system76.com/servers
+[13]: https://system76.com/shipping
+[14]: https://itsfoss.com/use-google-drive-linux/
+[15]: https://www.crowdsupply.com/purism/librem-15
+[16]: https://puri.sm/products/librem-15/
+[17]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/05/purism-librem-13.jpg?resize=800%2C471&ssl=1
+[18]: https://puri.sm/products/librem-13/
+[19]: https://www.pureos.net/
+[20]: https://itsfoss.com/pureos-convergence/
+[21]: https://itsfoss.com/librem-linux-phone/
+[22]: https://puri.sm/
+[23]: https://itsfoss.com/slimbook-kde/
+[24]: https://distrowatch.com/table.php?distribution=lliurex
+[25]: https://en.wikipedia.org/wiki/MAX_(operating_system)
+[26]: https://slimbook.es/en/aio-curve-all-in-one-for-gnu-linux
+[27]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/05/Slimbook-Kymera-Aqua-Liquid-Cool-Linux-Computer.jpg?ssl=1
+[28]: https://slimbook.es/en/kymera-aqua-the-gnu-linux-computer-with-custom-water-cooling
+[29]: https://slimbook.es/en/
+[30]: https://www.tuxedocomputers.com/
+[31]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/05/tuxedo-computers.jpeg?resize=800%2C400&ssl=1
+[32]: https://www.tuxedocomputers.com/en/Shipping-Returns.tuxedo
+[33]: https://www.tuxedocomputers.com/en#
+[34]: https://store.vikings.net/index.php?route=common/home
+[35]: https://www.fsf.org
+[36]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/05/vikings-computer.jpeg?resize=800%2C450&ssl=1
+[37]: https://www.coreboot.org/
+[38]: https://libreboot.org/
+[39]: https://store.vikings.net/libre-friendly-hardware/the-server-1u
+[40]: https://store.vikings.net/index.php?route=information/information&information_id=8
+[41]: https://store.vikings.net/libre-friendly-hardware
+[42]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/05/manjarobook-by-ubuntushop.jpeg?ssl=1
+[43]: https://tails.boum.org/
+[44]: https://itsfoss.com/things-to-do-after-installing-ubuntu-18-04/
+[45]: https://itsfoss.com/lightweight-linux-beginners/
+[46]: https://www.ubuntushop.be/index.php/en/
+[47]: https://minifree.org/
+[48]: https://www.fsf.org/
+[49]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/05/minifree.jpg?resize=800%2C550&ssl=1
+[50]: https://trisquel.info/
+[51]: https://en.wikipedia.org/wiki/Richard_Stallman
+[52]: https://minifree.org/shipping-costs/
+[53]: https://www.entroware.com/
+[54]: https://itsfoss.com/ubuntu-mate-entroware/
+[55]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/05/entroware.jpg?resize=800%2C450&ssl=1
+[56]: https://itsfoss.com/ubuntu-entroware-aura-mini-pc/
+[57]: https://www.entroware.com/store/ares
+[58]: https://www.entroware.com/store/index.php?route=common/home
+[59]: https://www.amazon.com/Intel-NUC-Mainstream-Kit-NUC8i3BEH/dp/B07GX4X4PW?psc=1&SubscriptionId=AKIAJ3N3QBK3ZHDGU54Q&tag=chmod7mediate-20&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B07GX4X4PW (Intel NUC)
+[60]: https://primeos.in/
+[61]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/05/juve-with-prime-os.jpeg?ssl=1
+[62]: https://junocomputers.com/shipping
+[63]: https://junocomputers.com/
+[64]: https://zareason.com/
+[65]: https://libiquity.com/
+[66]: https://stationx.rocks/
+[67]: https://www.linuxcertified.com/linux_laptops.html
+[68]: https://www.thinkpenguin.com/
diff --git a/sources/tech/20190517 Announcing Enarx for running sensitive workloads.md b/sources/tech/20190517 Announcing Enarx for running sensitive workloads.md
new file mode 100644
index 0000000000..81d021f7d7
--- /dev/null
+++ b/sources/tech/20190517 Announcing Enarx for running sensitive workloads.md
@@ -0,0 +1,83 @@
+[#]: collector: (lujun9972)
+[#]: translator: ( )
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (Announcing Enarx for running sensitive workloads)
+[#]: via: (https://opensource.com/article/19/5/enarx-security)
+[#]: author: (Mike Bursell https://opensource.com/users/mikecamel/users/wgarry155)
+
+Announcing Enarx for running sensitive workloads
+======
+Enarx leverages the capabilities of a TEE to change the trust model for
+your application.
+![cubes coming together to create a larger cube][1]
+
+Running software is something that most of us do without thinking about it. We run in "on premises"—our own machines—or we run it in the cloud - on somebody else's machines. We don't always think about what those differences mean, or about what assumptions we're making about the securtiy of the data that's being processed, or even of the software that's doing that processing. Specifically, when you run software (a "workload") on a system (a "host") on the cloud or on your own premises, there are lots and lots of layers. You often don't see those layers, but they're there.
+
+Here's an example of the layers that you might see in a standard cloud virtualisation architecture. The different colours represent different entities that "own" different layers or sets of layers.
+
+![Layers in a standard cloud virtualisation architecture][2]
+
+Here's a similar diagram depicting a standard cloud container architecture. As before, each different colour represents a different "owner" of a layer or set of layers.
+
+![Standard cloud container architecture][3]
+
+These owners may be of very different types, from hardware vendors to OEMs to cloud service providers (CSPs) to middleware vendors to operating system vendors to application vendors to you, the workload owner. And for each workload that you run, on each host, the exact list of layers is likely to be different. And even when they're the same, the versions of the layers instances may be different, whether it's a different BIOS version, a different bootloader, a different kernel version, or whatever else.
+
+Now, in many contexts, you might not worry about this, and your CSP goes out of its way to abstract these layers and their version details away from you. But this is a security article, for security people, and that means that anybody who's reading this probably does care.
+
+The reason we care is not just the different versions and the different layers, but the number of different things—and different entities—that we need to trust if we're going to be happy running any sort of sensitive workload on these types of stacks. I need to trust every single layer, and the owner of every single layer, not only to do what they say they will do, but also not to be compromised. This is a _big_ stretch when it comes to running my sensitive workloads.
+
+### What's Enarx?
+
+Enarx is a new project that is trying to address this problem of having to trust all of those layers. A few of us at Red Hat have been working on it for a few months now. My colleague Nathaniel McCallum demoed an early incarnation of it at [Red Hat Summit 2019][4] in Boston, and we're ready to start announcing it to the world. We have code, we have a demo, we have a GitHub repository, we have a logo: what more could a project want? Well, people—but we'll get to that.
+
+![Enarx logo][5]
+
+With Enarx, we made the decision that we wanted to allow people running workloads to be able to reduce the number of layers—and owners—that they need to trust to the absolute minimum. We plan to use trusted execution environments ("TEEs"—see "[Oh, how I love my TEE (or do I?)][6]") to provide an architecture that looks a little more like this:
+
+![Enarx architecture][7]
+
+In a world like this, you have to trust the CPU and firmware, and you need to trust some middleware—of which Enarx is part—but you don't need to trust all of the other layers, because we will leverage the capabilities of the TEE to ensure the integrity and confidentiality of your application. The Enarx project will provide attestation of the TEE, so that you know you're running on a true and trusted TEE, and will provide open source, auditable code to help you trust the layer directly beneath your application.
+
+The initial code is out there—working on AMD's SEV TEE at the momen—and enough of it works now that we're ready to tell you about it.
+
+Making sure that your application meets your own security requirements is down to you. :-)
+
+### How do I find out more?
+
+The easiest way to learn more is to visit the [Enarx GitHub][8].
+
+We'll be adding more information there—it's currently just code—but bear with us: there are only a few of us on the project at the moment. A blog is on the list of things we'd like to have, but we wanted to get things started.
+
+We'd love to have people in the community getting involved in the project. It's currently quite low-level and requires quite a lot of knowledge to get running, but we'll work on that. You will need some specific hardware to make it work, of course. Oh, and if you're an early boot or a low-level KVM hacker, we're _particularly_ interested in hearing from you.
+
+I will, of course, respond to comments on this article.
+
+* * *
+
+_This article was originally published on[Alice, Eve, and Bob][9] and is reprinted with the author's permission._
+
+--------------------------------------------------------------------------------
+
+via: https://opensource.com/article/19/5/enarx-security
+
+作者:[Mike Bursell ][a]
+选题:[lujun9972][b]
+译者:[译者ID](https://github.com/译者ID)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]: https://opensource.com/users/mikecamel/users/wgarry155
+[b]: https://github.com/lujun9972
+[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/cube_innovation_process_block_container.png?itok=vkPYmSRQ (cubes coming together to create a larger cube)
+[2]: https://opensource.com/sites/default/files/uploads/classic-cloud-virt-arch-1.png (Layers in a standard cloud virtualisation architecture)
+[3]: https://opensource.com/sites/default/files/uploads/cloud-container-arch.png (Standard cloud container architecture)
+[4]: https://www.redhat.com/en/summit/2019
+[5]: https://opensource.com/sites/default/files/uploads/enarx.png (Enarx logo)
+[6]: https://aliceevebob.com/2019/02/26/oh-how-i-love-my-tee-or-do-i/
+[7]: https://opensource.com/sites/default/files/uploads/reduced-arch.png (Enarx architecture)
+[8]: https://github.com/enarx
+[9]: https://aliceevebob.com/2019/05/07/announcing-enarx/
diff --git a/sources/tech/20190517 Using Testinfra with Ansible to verify server state.md b/sources/tech/20190517 Using Testinfra with Ansible to verify server state.md
new file mode 100644
index 0000000000..c14652a7f4
--- /dev/null
+++ b/sources/tech/20190517 Using Testinfra with Ansible to verify server state.md
@@ -0,0 +1,168 @@
+[#]: collector: (lujun9972)
+[#]: translator: ( )
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (Using Testinfra with Ansible to verify server state)
+[#]: via: (https://opensource.com/article/19/5/using-testinfra-ansible-verify-server-state)
+[#]: author: (Clement Verna https://opensource.com/users/cverna/users/paulbischoff/users/dcritch/users/cobiacomm/users/wgarry155/users/kadinroob/users/koreyhilpert)
+
+Using Testinfra with Ansible to verify server state
+======
+Testinfra is a powerful library for writing tests to verify an
+infrastructure's state. Coupled with Ansible and Nagios, it offers a
+simple solution to enforce infrastructure as code.
+![Terminal command prompt on orange background][1]
+
+By design, [Ansible][2] expresses the desired state of a machine to ensure that the content of an Ansible playbook or role is deployed to the targeted machines. But what if you need to make sure all the infrastructure changes are in Ansible? Or verify the state of a server at any time?
+
+[Testinfra][3] is an infrastructure testing framework that makes it easy to write unit tests to verify the state of a server. It is a Python library and uses the powerful [pytest][4] test engine.
+
+### Getting started with Testinfra
+
+Testinfra can be easily installed using the Python package manager (pip) and a Python virtual environment.
+
+
+```
+$ python3 -m venv venv
+$ source venv/bin/activate
+(venv) $ pip install testinfra
+```
+
+Testinfra is also available in the package repositories of Fedora and CentOS using the EPEL repository. For example, on CentOS 7 you can install it with the following commands:
+
+
+```
+$ yum install -y epel-release
+$ yum install -y python-testinfra
+```
+
+#### A simple test script
+
+Writing tests in Testinfra is easy. Using the code editor of your choice, add the following to a file named **test_simple.py** :
+
+
+```
+import testinfra
+
+def test_os_release(host):
+assert host.file("/etc/os-release").contains("Fedora")
+
+def test_sshd_inactive(host):
+assert host.service("sshd").is_running is False
+```
+
+By default, Testinfra provides a host object to the test case; this object gives access to different helper modules. For example, the first test uses the **file** module to verify the content of the file on the host, and the second test case uses the **service** module to check the state of a systemd service.
+
+To run these tests on your local machine, execute the following command:
+
+
+```
+(venv)$ pytest test_simple.py
+================================ test session starts ================================
+platform linux -- Python 3.7.3, pytest-4.4.1, py-1.8.0, pluggy-0.9.0
+rootdir: /home/cverna/Documents/Python/testinfra
+plugins: testinfra-3.0.0
+collected 2 items
+test_simple.py ..
+
+================================ 2 passed in 0.05 seconds ================================
+```
+
+For a full list of Testinfra's APIs, you can consult the [documentation][5].
+
+### Testinfra and Ansible
+
+One of Testinfra's supported backends is Ansible, which means Testinfra can directly use Ansible's inventory file and a group of machines defined in the inventory to run tests against them.
+
+Let's use the following inventory file as an example:
+
+
+```
+[web]
+app-frontend01
+app-frontend02
+
+[database]
+db-backend01
+```
+
+We want to make sure that our Apache web server service is running on **app-frontend01** and **app-frontend02**. Let's write the test in a file called **test_web.py** :
+
+
+```
+def check_httpd_service(host):
+"""Check that the httpd service is running on the host"""
+assert host.service("httpd").is_running
+```
+
+To run this test using Testinfra and Ansible, use the following command:
+
+
+```
+(venv) $ pip install ansible
+(venv) $ py.test --hosts=web --ansible-inventory=inventory --connection=ansible test_web.py
+```
+
+When invoking the tests, we use the Ansible inventory **[web]** group as the targeted machines and also specify that we want to use Ansible as the connection backend.
+
+#### Using the Ansible module
+
+Testinfra also provides a nice API to Ansible that can be used in the tests. The Ansible module enables access to run Ansible plays inside a test and makes it easy to inspect the result of the play.
+
+
+```
+def check_ansible_play(host):
+"""
+Verify that a package is installed using Ansible
+package module
+"""
+assert not host.ansible("package", "name=httpd state=present")["changed"]
+```
+
+By default, Ansible's [Check Mode][6] is enabled, which means that Ansible will report what would change if the play were executed on the remote host.
+
+### Testinfra and Nagios
+
+Now that we can easily run tests to validate the state of a machine, we can use those tests to trigger alerts on a monitoring system. This is a great way to catch unexpected changes.
+
+Testinfra offers an integration with [Nagios][7], a popular monitoring solution. By default, Nagios uses the [NRPE][8] plugin to execute checks on remote hosts, but using Testinfra allows you to run the tests directly from the Nagios master.
+
+To get a Testinfra output compatible with Nagios, we have to use the **\--nagios** flag when triggering the test. We also use the **-qq** pytest flag to enable pytest's **quiet** mode so all the test details will not be displayed.
+
+
+```
+(venv) $ py.test --hosts=web --ansible-inventory=inventory --connection=ansible --nagios -qq line test.py
+TESTINFRA OK - 1 passed, 0 failed, 0 skipped in 2.55 seconds
+```
+
+Testinfra is a powerful library for writing tests to verify an infrastructure's state. Coupled with Ansible and Nagios, it offers a simple solution to enforce infrastructure as code. It is also a key component of adding testing during the development of your Ansible roles using [Molecule][9].
+
+* * *
+
+Sysadmins who think the cloud is a buzzword and a bunch of hype should check out Ansible.
+
+Can you really do DevOps without sharing scripts or code? DevOps manifesto proponents value cross-...
+
+--------------------------------------------------------------------------------
+
+via: https://opensource.com/article/19/5/using-testinfra-ansible-verify-server-state
+
+作者:[Clement Verna][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/cverna/users/paulbischoff/users/dcritch/users/cobiacomm/users/wgarry155/users/kadinroob/users/koreyhilpert
+[b]: https://github.com/lujun9972
+[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/terminal_command_linux_desktop_code.jpg?itok=p5sQ6ODE (Terminal command prompt on orange background)
+[2]: https://www.ansible.com/
+[3]: https://testinfra.readthedocs.io/en/latest/
+[4]: https://pytest.org/
+[5]: https://testinfra.readthedocs.io/en/latest/modules.html#modules
+[6]: https://docs.ansible.com/ansible/playbooks_checkmode.html
+[7]: https://www.nagios.org/
+[8]: https://en.wikipedia.org/wiki/Nagios#NRPE
+[9]: https://github.com/ansible/molecule
diff --git a/sources/tech/20190520 Blockchain 2.0 - Explaining Distributed Computing And Distributed Applications -Part 11.md b/sources/tech/20190520 Blockchain 2.0 - Explaining Distributed Computing And Distributed Applications -Part 11.md
new file mode 100644
index 0000000000..c34effe6be
--- /dev/null
+++ b/sources/tech/20190520 Blockchain 2.0 - Explaining Distributed Computing And Distributed Applications -Part 11.md
@@ -0,0 +1,88 @@
+[#]: collector: (lujun9972)
+[#]: translator: ( )
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (Blockchain 2.0 – Explaining Distributed Computing And Distributed Applications [Part 11])
+[#]: via: (https://www.ostechnix.com/blockchain-2-0-explaining-distributed-computing-and-distributed-applications/)
+[#]: author: (editor https://www.ostechnix.com/author/editor/)
+
+Blockchain 2.0 – Explaining Distributed Computing And Distributed Applications [Part 11]
+======
+
+![Explaining Distributed Computing And Distributed Applications][1]
+
+### How DApps serve the purpose of [Blockchain 2.0][2]
+
+**Blockchain 1.0** was about introducing the “blockchain” into the list of modern buzzwords along with the advent of **bitcoin**. Multiple white papers detailing bitcoin’s underlying blockchain network specified the use of the blockchain for other uses as well. Although most of the said uses was around the basic concept of using the blockchain as a **decentralized medium** for storage, a use that stems from this property is utilizing it for carrying out **Distributed computing** on top of this layer.
+
+**DApps** or **Distributed Applications** are computer programs that are stored and run on a distributed storage system such as the [**Ethereum**][3] blockchain for instance. To understand how DApps function and how they’re different from traditional applications on your desktop or phone, we’ll need to delve into what distributed computing is. This post will explore some fundamental concepts of distributed computing and the role of blockchains in executing the said objective. Furthermore, well also look at a few applications or DApps, in blockchain lingo, to get a hang of things.
+
+### What is Distributed Computing?
+
+We’re assuming many readers are familiar with multi-threaded applications and multi-threading in general. Multi-threading is the reason why processor manufacturers are forever hell bent on increasing the core count on their products. Fundamentally speaking, some applications such as video rendering software suites are capable of dividing their work (in this case rendering effects and video styles) into multiple chunks and parallelly get them processed from a supporting computing system. This reduces the lead time on getting the work done and is generally more efficient in terms of time, money and energy usage. Applications such as some games however, cannot make use of this system since processing and responses need to be obtained real time based on user inputs rather than via planned execution. Nonetheless, the fact that more processing power may be exploited from existing hardware using these computing methods remains true and significant.
+
+Even supercomputers are basically a bunch of powerful CPUs all tied up together in a circuit to enable faster processing as mentioned above. The average core count on flagship CPUs from the lead manufacturers AMD and Intel have in fact gone up in the last few years, because increasing core count has recently been the only method to claim better processing and claim upgrades to their product lines. This information notwithstanding, the fact remains that distributed computing and related concepts of parallel computing are the only legitimate ways to improve processing capabilities in the near future. There are minor differences between distributed and parallel computing models as well, however that is beyond the scope off this post.
+
+Another method to get many computers executing programs simultaneously is to connect them through the internet and have a cloud-based program to be implemented in parts by all of the participating systems. This is the basic fundamental behind distributed applications.
+
+For a more detailed account and primer regarding what and how parallel computing works, interested readers may visit [this][4] webpage. For a more detailed study of the topic, for people who have a background in computer science, you may refer to [this][5] website and the accompanying book.
+
+### What are DApps or Distributed Applications
+
+Application that can make use of the capabilities offered by a distributed computing system is called a **distributed application**. The execution and structure of such an application’s back end needs to be carefully designed in order to be compatible with the system.
+
+The blockchain presents an opportunity to store data in a distributed system of participating nodes. Stepping up from this opportunity we can logically build systems and applications running on such a network (think about how you used to download files via the Torrent protocol).
+
+Such decentralized applications present a lot of benefits over conventional applications that typically run from a central server. Some highlights are:
+
+ * DApps run on a network of such participating nodes and any user request is parsed through such network nodes to provide the user with the requested functionality. _**Program is executed on the network instead of a single computer or a server**_.
+ * DApps will have codified methods of filtering through requests and executing them so as to always be fair and transparent when users interact with it. To create a new block of data in the chain, the same has to be approved via a **consensus algorithm** by the participating nodes. This fundamental idea of peer to peer approval applies for DApps as well. This essentially means that DApps cannot by extension of this principle provide different outputs to the same query or input. All users will be given the same priority unless it is explicitly mentioned and all users will receive similar results from the DApp as well. This will prove to be important in developing better industry practices for insurance and finance companies for instance. A DApp that specializes in microlending, for instance, cannot differentiate and offer different interest rates for different borrowers other than their credit history. This also means that all users will eventually end up paying for their required operations uniformly depending on the computational complexity of the task they passed on to the application. For instance, combing through 10000 entries of data will cost proportionately more than combing through say 100. The payment or incentivisation system might be different for different applications and blockchain protocols though.
+ * Most DApps are by default redundant and fail safe. If you’re using a service which is run on a central server, a failure from the server end will freeze the application. Think of a service such as PayPal for instance. If the PayPal server in your immediate region fails due to some reason and somehow the central server cannot re route your request, your payment will not go through. However, even in case multiple participating nodes in the blockchain dies, you will still find the application live and running provided at least one node is live. This presents a use case for applications which are by definition supposed to be live all the time. Emergency services, insurance, communications etc., are some key areas where investors hope such DApps will bring in much needed reliability.
+ * DApps are usually cost-effective owing to them not requiring a central server to be maintained for their functionality. Once they become mainstream, the mean computing cost of running tasks on the same is also supposed to decrease.
+ * DApps will as mentioned exist till eternity at least until one participant is live on the chain. This essentially means that DApps cannot be censored or hacked into bowing and shutting down.
+
+
+
+The above list of features seems very few, however, combine that with all the other capabilities of the blockchain, the advancement of wireless network access, and, the increasing capabilities of millions of smartphones and here we have in our hands nothing less than a paradigm shift in how the apps that we rely on work.
+
+We will look deeper into how DApps function and how you can make your own DApps on the Ethereum blockchain in a proceeding post. To give you an idea of the DApp environment right now, we present 4 carefully chosen examples that are fairly advanced and popular.
+
+##### 1\. BITCOIN (or any Cryptocurrency)
+
+We’re very sure that readers did not expect BITCOIN to be one among a list of applications in this post. The point we’re trying to make here however, is that any cryptocurrency currently running on a blockchain backbone can be termed as a DApp. Cryptocurrencies are in fact the most popular DApp format out there and a revolutionary one at that too.
+
+##### 2\. [MELON][6]
+
+We’ve talked about how asset management can be an easier task utilizing blockchain and [**smart contracts**][7]. **Melon** is a company that aims to provide its users with usable relevant tools to manage and maximize their returns from the assets they own. They specialize in cryptographic assets as of now with plans to turn to real digitized assets in the future.
+
+##### 3\. [Request][8]
+
+**Request** is primarily a ledger system that handles financial transactions, invoicing, and taxation among other things. Working with other compatible databases and systems it is also capable of verifying payer data and statistics. Large corporations which typically have a significant number of defaulting customers will find it easier to handle their operations with a system such as this.
+
+##### 4\. [CryptoKitties][9]
+
+Known the world over as the video game that broke the Ethereum blockchain, **CryptoKitties** is a video game that runs on the Ethereum blockchain. The video game identifies each user individually by building your own digital profiles and gives you unique **virtual cats** in return. The game went viral and due to the sheer number of users it actually managed to slow down the Ethereum blockchain and its transaction capabilities. Transactions took longer than usual with users having to pay significantly extra money for simple transactions even. Concerns regarding scalability of the Ethereum blockchain have been raised by several stakeholders since then.
+
+--------------------------------------------------------------------------------
+
+via: https://www.ostechnix.com/blockchain-2-0-explaining-distributed-computing-and-distributed-applications/
+
+作者:[editor][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/editor/
+[b]: https://github.com/lujun9972
+[1]: https://www.ostechnix.com/wp-content/uploads/2019/05/Distributed-Computing-720x340.png
+[2]: https://www.ostechnix.com/blockchain-2-0-an-introduction/
+[3]: https://www.ostechnix.com/blockchain-2-0-what-is-ethereum/
+[4]: https://www.techopedia.com/definition/7/distributed-computing-system
+[5]: https://www.distributed-systems.net/index.php/books/distributed-systems-3rd-edition-2017/
+[6]: https://melonport.com/
+[7]: https://www.ostechnix.com/blockchain-2-0-explaining-smart-contracts-and-its-types/
+[8]: https://request.network/en/use-cases/
+[9]: https://www.cryptokitties.co/
diff --git a/sources/tech/20190520 Getting Started With Docker.md b/sources/tech/20190520 Getting Started With Docker.md
new file mode 100644
index 0000000000..873173e4ad
--- /dev/null
+++ b/sources/tech/20190520 Getting Started With Docker.md
@@ -0,0 +1,499 @@
+[#]: collector: (lujun9972)
+[#]: translator: ( )
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (Getting Started With Docker)
+[#]: via: (https://www.ostechnix.com/getting-started-with-docker/)
+[#]: author: (sk https://www.ostechnix.com/author/sk/)
+
+Getting Started With Docker
+======
+
+![Getting Started With Docker][1]
+
+In our previous tutorial, we have explained **[how to install Docker in Ubuntu][2]** , and how to [**install Docker in CentOS**][3]. Today, we will see the basic usage of Docker. This guide covers the Docker basics, such as how to create a new container, how to run the container, remove a container, how to build your own Docker image from the Container and so on. Let us get started! All steps given below are tested in Ubuntu 18.04 LTS server edition.
+
+### Getting Started With Docker
+
+Before exploring the Docker basics, don’t confuse with Docker images and Docker Containers. As I already explained in the previous tutorial, Docker Image is the file that decides how a Container should behave, and Docker Container is the running or stopped stage of a Docker image.
+
+##### 1\. Search Docker images
+
+We can get the images from either from the registry, for example [**Docker hub**][4], or create our own, For those wondering, Docker hub is cloud hosted place where all Docker users build, test, and save their Docker images.
+
+Docker hub has tens of thousands of Docker images. You can search for the any Docker images with **“docker search”** command.
+
+For instance, to search for docker images based on Ubuntu, run:
+
+```
+$ sudo docker search ubuntu
+```
+
+**Sample output:**
+
+![][5]
+
+To search images based on CentOS, run:
+
+```
+$ sudo docker search ubuntu
+```
+
+To search images for AWS, run:
+
+```
+$ sudo docker search aws
+```
+
+For wordpress:
+
+```
+$ sudo docker search wordpress
+```
+
+Docker hub has almost all kind of images. Be it an operating system, application, or anything, you will find pre-built Docker images in Docker hub. If something you’re looking for is not available, you can build it and make it available for public or keep it private for your own use.
+
+##### 2\. Download Docker image
+
+To download Docker image for Ubuntu OS, run the following command from the Terminal:
+
+```
+$ sudo docker pull ubuntu
+```
+
+The above command will download the latest Ubuntu image from the **Docker hub**.
+
+**Sample output:**
+
+```
+Using default tag: latest
+latest: Pulling from library/ubuntu
+6abc03819f3e: Pull complete
+05731e63f211: Pull complete
+0bd67c50d6be: Pull complete
+Digest: sha256:f08638ec7ddc90065187e7eabdfac3c96e5ff0f6b2f1762cf31a4f49b53000a5
+Status: Downloaded newer image for ubuntu:latest
+```
+
+![][6]
+
+Download docker images
+
+You can also download a specific version of Ubuntu image using command:
+
+```
+$ docker pull ubuntu:18.04
+```
+
+Docker allows us to download any images and start the container regardless of the host OS.
+
+For example, to download CentOS image, run:
+
+```
+$ sudo docker pull centos
+```
+
+All downloaded Docker images will be saved in **/var/lib/docker/** directory.
+
+To view the list of downloaded Docker images, run:
+
+```
+$ sudo docker images
+```
+
+**Sample output:**
+
+```
+REPOSITORY TAG IMAGE ID CREATED SIZE
+ubuntu latest 7698f282e524 14 hours ago 69.9MB
+centos latest 9f38484d220f 2 months ago 202MB
+hello-world latest fce289e99eb9 4 months ago 1.84kB
+```
+
+As you see above, I have downloaded three Docker images – **Ubuntu** , **CentOS** and **hello-world**.
+
+Now, let us go ahead and see how to start or run the containers based on the downloaded images.
+
+##### 3\. Run Docker Containers
+
+We can start the containers in two methods. We can start a container either using its **TAG** or **IMAGE ID**. **TAG** refers to a particular snapshot of the image and the **IMAGE ID** is the corresponding unique identifier for that image.
+
+As you in the above results **“latest”** is the TAG for all containers, and **7698f282e524** is the IMAGE ID of **Ubuntu** Docker image, **9f38484d220f** is the image id of CentOS Docker image and **fce289e99eb9** is the image id of **hello_world** Docker image.
+
+Once you downloaded the Docker images of your choice, run the following command to start a Docker container by using its TAG.
+
+```
+$ sudo docker run -t -i ubuntu:latest /bin/bash
+```
+
+Here,
+
+ * **-t** : Assigns a new Terminal inside the Ubuntu container.
+ * **-i** : Allows us to make an interactive connection by grabbing the standard in (STDIN) of the container.
+ * **ubuntu:latest** : Ubuntu container with TAG “latest”.
+ * **/bin/bash** : BASH shell for the new container.
+
+
+
+Or, you can start the container using IMAGE ID as shown below:
+
+```
+sudo docker run -t -i 7698f282e524 /bin/bash
+```
+
+Here,
+
+ * **7698f282e524** – Image id
+
+
+
+After starting the container, you’ll be landed automatically into the Container’s shell (Command prompt):
+
+![][7]
+
+Docker container’s shell
+
+To return back to the host system’s Terminal (In my case, it is Ubuntu 18.04 LTS) without terminating the Container (guest os), press **CTRL+P** followed by **CTRL+Q**. Now, you’ll be safely return back to your original host computer’s terminal window. Please note that the container is still running in the background and we didn’t terminate it yet.
+
+To view the list running of containers, run the following command:
+
+```
+$ sudo docker ps
+```
+
+**Sample output:**
+
+```
+CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
+32fc32ad0d54 ubuntu:latest "/bin/bash" 7 minutes ago Up 7 minutes modest_jones
+```
+
+![][8]
+
+List running containers
+
+Here,
+
+ * **32fc32ad0d54** – Container ID
+ * **ubuntu:latest** – Docker image
+
+
+
+Please note that **Container ID and Docker image ID are different**.
+
+To list all available ( either running or stopped) containers:
+
+```
+$ sudo docker ps -a
+```
+
+To stop (power off the container) from the host’s shell, run the following command:
+
+```
+$ sudo docker stop
+```
+
+**Example:**
+
+```
+$ sudo docker stop 32fc32ad0d54
+```
+
+To login back to or attach to the running container, just run:
+
+```
+$ sudo docker attach 32fc32ad0d54
+```
+
+As you already know, **32fc32ad0d54** is the container’s ID.
+
+To power off a Container from inside it’s shell by typing the following command:
+
+```
+# exit
+```
+
+You can verify the list of running containers with command:
+
+```
+$ sudo docker ps
+```
+
+##### 4\. Build your custom Docker images
+
+Docker is not just for downloading and using the existing containers. You can create your own custom docker image as well.
+
+To do so, start any one the downloaded container:
+
+```
+$ sudo docker run -t -i ubuntu:latest /bin/bash
+```
+
+Now, you will be in the container’s shell.
+
+Then, install any software or do what ever you want to do in the container.
+
+For example, let us install **Apache web server** in the container.
+
+Once you did all tweaks, installed all necessary software, run the following command to build your custom Docker image:
+
+```
+# apt update
+# apt install apache2
+```
+
+Similarly, install and test any software of your choice in the Container.
+
+Once you all set, return back to the host system’s shell. Do not stop or poweroff the Container. To switch to the host system’s shell without stopping Container, press CTRL+P followed by CTRL+Q.
+
+From your host computer’s shell, run the following command to find the container ID:
+
+```
+$ sudo docker ps
+```
+
+Finally, create a Docker image of the running Container using command:
+
+```
+$ sudo docker commit 3d24b3de0bfc ostechnix/ubuntu_apache
+```
+
+**Sample Output:**
+
+```
+sha256:ce5aa74a48f1e01ea312165887d30691a59caa0d99a2a4aa5116ae124f02f962
+```
+
+Here,
+
+ * **3d24b3de0bfc** – Ubuntu container ID. As you already, we can
+ * **ostechnix** – Name of the user who created the container.
+ * **ubuntu_apache** – Name of the docker image created by user ostechnix.
+
+
+
+Let us check whether the new Docker image is created or not with command:
+
+```
+$ sudo docker images
+```
+
+**Sample output:**
+
+```
+REPOSITORY TAG IMAGE ID CREATED SIZE
+ostechnix/ubuntu_apache latest ce5aa74a48f1 About a minute ago 191MB
+ubuntu latest 7698f282e524 15 hours ago 69.9MB
+centos latest 9f38484d220f 2 months ago 202MB
+hello-world latest fce289e99eb9 4 months ago 1.84kB
+```
+
+![][9]
+
+List docker images
+
+As you see in the above output, the new Docker image has been created in our localhost system from the running Container.
+
+Now, you can create a new Container from the newly created Docker image as usual suing command:
+
+```
+$ sudo docker run -t -i ostechnix/ubuntu_apache /bin/bash
+```
+
+##### 5\. Removing Containers
+
+Once you’re done all R&D with Docker containers, you can delete if you don’t want them anymore.
+
+To do so, First we have to stop (power off) the running Containers.
+
+Let us find out the running containers with command:
+
+```
+$ sudo docker ps
+```
+
+**Sample output:**
+
+```
+CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
+3d24b3de0bfc ubuntu:latest "/bin/bash" 28 minutes ago Up 28 minutes goofy_easley
+```
+
+Stop the running container by using it’s ID:
+
+```
+$ sudo docker stop 3d24b3de0bfc
+```
+
+Now, delete the container using command:
+
+```
+$ sudo docker rm 3d24b3de0bfc
+```
+
+Similarly, stop all containers and delete them if they are no longer required.
+
+Deleting multiple containers one by one can be a tedious task. So, we can delete all stopped containers in one go, just run:
+
+```
+$ sudo docker container prune
+```
+
+Type **“Y”** and hit ENTER key to delete the containers.
+
+```
+WARNING! This will remove all stopped containers.
+Are you sure you want to continue? [y/N] y
+Deleted Containers:
+32fc32ad0d5445f2dfd0d46121251c7b5a2aea06bb22588fb2594ddbe46e6564
+5ec614e0302061469ece212f0dba303c8fe99889389749e6220fe891997f38d0
+
+Total reclaimed space: 5B
+```
+
+This command will work only with latest Docker versions.
+
+##### 6\. Removing Docker images
+
+Once you removed containers, you can delete the Docker images that you no longer need.
+
+To find the list of the Downloaded Docker images:
+
+```
+$ sudo docker images
+```
+
+**Sample output:**
+
+```
+REPOSITORY TAG IMAGE ID CREATED SIZE
+ostechnix/ubuntu_apache latest ce5aa74a48f1 5 minutes ago 191MB
+ubuntu latest 7698f282e524 15 hours ago 69.9MB
+centos latest 9f38484d220f 2 months ago 202MB
+hello-world latest fce289e99eb9 4 months ago 1.84kB
+```
+
+As you see above, we have three Docker images in our host system.
+
+Let us delete them by using their IMAGE id:
+
+```
+$ sudo docker rmi ce5aa74a48f1
+```
+
+**Sample output:**
+
+```
+Untagged: ostechnix/ubuntu_apache:latest
+Deleted: sha256:ce5aa74a48f1e01ea312165887d30691a59caa0d99a2a4aa5116ae124f02f962
+Deleted: sha256:d21c926f11a64b811dc75391bbe0191b50b8fe142419f7616b3cee70229f14cd
+```
+
+##### Troubleshooting
+
+Docker won’t let you to delete the Docker images if they are used by any running or stopped containers.
+
+For example, when I try to delete a Docker Image with ID **b72889fa879c** , from one of my old Ubuntu server. I got the following error:
+
+```
+Error response from daemon: conflict: unable to delete b72889fa879c (must be forced) - image is being used by stopped container dde4dd285377
+```
+
+This is because the Docker image that you want to delete is currently being used by another Container.
+
+So, let us check the running Container using command:
+
+```
+$ sudo docker ps
+```
+
+**Sample output:**
+
+![][10]
+
+Oops! There is no running container.
+
+Let us again check for all containers (Running and stopped) with command:
+
+```
+$ sudo docker ps -a
+```
+
+**Sample output:**
+
+![][11]
+
+As you see there are still some stopped containers are using one of the Docker images. So, let us delete all of the containers.
+
+**Example:**
+
+```
+$ sudo docker rm 12e892156219
+```
+
+Similarly, remove all containers as shown above using their respective container’s ID.
+
+Once you deleted all Containers, finally remove the Docker images.
+
+**Example:**
+
+```
+$ sudo docker rmi b72889fa879c
+```
+
+That’s it. Let us verify is there any other Docker images in the host with command:
+
+```
+$ sudo docker images
+```
+
+For more details, refer the official resource links given at the end of this guide or drop a comment in the comment section below.
+
+Also, download and use the following Docker Ebooks to get to know more about it.
+
+** **Download** – [**Free eBook: “Docker Containerization Cookbook”**][12]
+
+** **Download** – [**Free Guide: “Understanding Docker”**][13]
+
+** **Download** – [**Free Guide: “What is Docker and Why is it So Popular?”**][14]
+
+** **Download** – [**Free Guide: “Introduction to Docker”**][15]
+
+** **Download** – [**Free Guide: “Docker in Production”**][16]
+
+And, that’s all for now. Hope you a got the basic idea about Docker usage.
+
+More good stuffs to come. Stay tuned!
+
+Cheers!!
+
+--------------------------------------------------------------------------------
+
+via: https://www.ostechnix.com/getting-started-with-docker/
+
+作者:[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]: https://www.ostechnix.com/wp-content/uploads/2016/04/docker-basics-720x340.png
+[2]: http://www.ostechnix.com/install-docker-ubuntu/
+[3]: https://www.ostechnix.com/install-docker-centos/
+[4]: https://hub.docker.com/
+[5]: http://www.ostechnix.com/wp-content/uploads/2016/04/Search-Docker-images.png
+[6]: http://www.ostechnix.com/wp-content/uploads/2016/04/Download-docker-images.png
+[7]: http://www.ostechnix.com/wp-content/uploads/2016/04/Docker-containers-shell.png
+[8]: http://www.ostechnix.com/wp-content/uploads/2016/04/List-running-containers.png
+[9]: http://www.ostechnix.com/wp-content/uploads/2016/04/List-docker-images.png
+[10]: http://www.ostechnix.com/wp-content/uploads/2016/04/sk@sk-_005-1-1.jpg
+[11]: http://www.ostechnix.com/wp-content/uploads/2016/04/sk@sk-_006-1.jpg
+[12]: https://ostechnix.tradepub.com/free/w_java39/prgm.cgi?a=1
+[13]: https://ostechnix.tradepub.com/free/w_pacb32/prgm.cgi?a=1
+[14]: https://ostechnix.tradepub.com/free/w_pacb31/prgm.cgi?a=1
+[15]: https://ostechnix.tradepub.com/free/w_pacb29/prgm.cgi?a=1
+[16]: https://ostechnix.tradepub.com/free/w_pacb28/prgm.cgi?a=1
diff --git a/sources/tech/20190520 How To Map Oracle ASM Disk Against Physical Disk And LUNs In Linux.md b/sources/tech/20190520 How To Map Oracle ASM Disk Against Physical Disk And LUNs In Linux.md
new file mode 100644
index 0000000000..4e9df8a0ff
--- /dev/null
+++ b/sources/tech/20190520 How To Map Oracle ASM Disk Against Physical Disk And LUNs In Linux.md
@@ -0,0 +1,229 @@
+[#]: collector: (lujun9972)
+[#]: translator: ( )
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (How To Map Oracle ASM Disk Against Physical Disk And LUNs In Linux?)
+[#]: via: (https://www.2daygeek.com/shell-script-map-oracle-asm-disks-physical-disk-lun-in-linux/)
+[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/)
+
+How To Map Oracle ASM Disk Against Physical Disk And LUNs In Linux?
+======
+
+You might already know about ASM, Device Mapper Multipathing (DM-Multipathing) if you are working quit long time as a Linux administrator.
+
+There are multiple ways to check these information. However, you will be getting part of the information when you use the default commands.
+
+It doesn’t show you all together in the single output.
+
+If you want to check all together in the single output then we need to write a small shell script to achieve this.
+
+We have added two shell script to get those information and you can use which one is suitable for you.
+
+Major and Minor numbers can be used to match the physical devices in Linux system.
+
+This tutorial helps you to find which ASM disk maps to which Linux partition or DM Device.
+
+If you want to **[manage Oracle ASM disks][1]** (such as start, enable, stop, list, query and etc) then navigate to following URL.
+
+### What Is ASMLib?
+
+ASMLib is an optional support library for the Automatic Storage Management feature of the Oracle Database.
+
+Automatic Storage Management (ASM) simplifies database administration and greatly reduces kernel resource usage (e.g. the number of open file descriptors).
+
+It eliminates the need for the DBA to directly manage potentially thousands of Oracle database files, requiring only the management of groups of disks allocated to the Oracle Database.
+
+ASMLib allows an Oracle Database using ASM more efficient and capable access to the disk groups it is using.
+
+### What Is Device Mapper Multipathing (DM-Multipathing)?
+
+Device Mapper Multipathing or DM-multipathing is a Linux host-side native multipath tool, which allows us to configure multiple I/O paths between server nodes and storage arrays into a single device by utilizing device-mapper.
+
+### Method-1 : Shell Script To Map ASM Disks To Physical Devices?
+
+In this shell script we are using for loop to achieve the results.
+
+Also, we are not using any ASM related commands.
+
+```
+# vi asm_disk_mapping.sh
+
+#!/bin/bash
+
+ls -lh /dev/oracleasm/disks > /tmp/asmdisks1.txt
+
+for ASMdisk in `cat /tmp/asmdisks1.txt | tail -n +2 | awk '{print $10}'`
+
+do
+
+minor=$(grep -i "$ASMdisk" /tmp/asmdisks1.txt | awk '{print $6}')
+
+major=$(grep -i "$ASMdisk" /tmp/asmdisks1.txt | awk '{print $5}' | cut -d"," -f1)
+
+phy_disk=$(ls -l /dev/* | grep ^b | grep "$major, *$minor" | awk '{print $10}')
+
+echo "ASM disk $ASMdisk is associated on $phy_disk [$major, $minor]"
+
+done
+```
+
+Set an executable permission to port_scan.sh file.
+
+```
+$ chmod +x asm_disk_mapping.sh
+```
+
+Finally run the script to achieve this.
+
+```
+# sh asm_disk_mapping.sh
+
+ASM disk MP4E6D_DATA01 is associated on /dev/dm-1
+3600a0123456789012345567890234q11 [253, 1]
+ASM disk MP4E6E_DATA02 is associated on /dev/dm-2
+3600a0123456789012345567890234q12 [253, 2]
+ASM disk MP4E6F_DATA03 is associated on /dev/dm-3
+3600a0123456789012345567890234q13 [253, 3]
+ASM disk MP4E70_DATA04 is associated on /dev/dm-4
+3600a0123456789012345567890234q14 [253, 4]
+ASM disk MP4E71_DATA05 is associated on /dev/dm-5
+3600a0123456789012345567890234q15 [253, 5]
+ASM disk MP4E72_DATA06 is associated on /dev/dm-6
+3600a0123456789012345567890234q16 [253, 6]
+ASM disk MP4E73_DATA07 is associated on /dev/dm-7
+3600a0123456789012345567890234q17 [253, 7]
+```
+
+### Method-2 : Shell Script To Map ASM Disks To Physical Devices?
+
+In this shell script we are using while loop to achieve the results.
+
+Also, we are using ASM related commands.
+
+```
+# vi asm_disk_mapping_1.sh
+
+#!/bin/bash
+
+/etc/init.d/oracleasm listdisks > /tmp/asmdisks.txt
+
+while read -r ASM_disk
+
+do
+
+major="$(/etc/init.d/oracleasm querydisk -d $ASM_disk | awk -F[ '{ print $2 }'| awk -F] '{ print $1 }' | cut -d"," -f1)"
+
+minor="$(/etc/init.d/oracleasm querydisk -d $ASM_disk | awk -F[ '{ print $2 }'| awk -F] '{ print $1 }' | cut -d"," -f2)"
+
+phy_disk="$(ls -l /dev/* | grep ^b | grep "$major, *$minor" | awk '{ print $10 }')"
+
+echo "ASM disk $ASM_disk is associated on $phy_disk [$major, $minor]"
+
+done < /tmp/asmdisks.txt
+```
+
+Set an executable permission to port_scan.sh file.
+
+```
+$ chmod +x asm_disk_mapping_1.sh
+```
+
+Finally run the script to achieve this.
+
+```
+# sh asm_disk_mapping_1.sh
+
+ASM disk MP4E6D_DATA01 is associated on /dev/dm-1
+3600a0123456789012345567890234q11 [253, 1]
+ASM disk MP4E6E_DATA02 is associated on /dev/dm-2
+3600a0123456789012345567890234q12 [253, 2]
+ASM disk MP4E6F_DATA03 is associated on /dev/dm-3
+3600a0123456789012345567890234q13 [253, 3]
+ASM disk MP4E70_DATA04 is associated on /dev/dm-4
+3600a0123456789012345567890234q14 [253, 4]
+ASM disk MP4E71_DATA05 is associated on /dev/dm-5
+3600a0123456789012345567890234q15 [253, 5]
+ASM disk MP4E72_DATA06 is associated on /dev/dm-6
+3600a0123456789012345567890234q16 [253, 6]
+ASM disk MP4E73_DATA07 is associated on /dev/dm-7
+3600a0123456789012345567890234q17 [253, 7]
+```
+
+### How To List Oracle ASM Disks?
+
+If you would like to list only Oracle ASM disk then use the below command to List available/created Oracle ASM disks in Linux.
+
+```
+# oracleasm listdisks
+
+ASM_Disk1
+ASM_Disk2
+ASM_Disk3
+ASM_Disk4
+ASM_Disk5
+ASM_Disk6
+ASM_Disk7
+```
+
+### How To List Oracle ASM Disks Against Major And Minor Number?
+
+If you would like to map Oracle ASM disks against major and minor number then use the below commands to List available/created Oracle ASM disks in Linux.
+
+```
+# for ASMdisk in `oracleasm listdisks`; do /etc/init.d/oracleasm querydisk -d $ASMdisk; done
+
+Disk "ASM_Disk1" is a valid Disk on device [253, 1]
+Disk "ASM_Disk2" is a valid Disk on device [253, 2]
+Disk "ASM_Disk3" is a valid Disk on device [253, 3]
+Disk "ASM_Disk4" is a valid Disk on device [253, 4]
+Disk "ASM_Disk5" is a valid Disk on device [253, 5]
+Disk "ASM_Disk6" is a valid Disk on device [253, 6]
+Disk "ASM_Disk7" is a valid Disk on device [253, 7]
+```
+
+Alternatively, we can get the same results using the ls command.
+
+```
+# ls -lh /dev/oracleasm/disks
+
+total 0
+brw-rw---- 1 oracle oinstall 253, 1 May 19 14:44 ASM_Disk1
+brw-rw---- 1 oracle oinstall 253, 2 May 19 14:44 ASM_Disk2
+brw-rw---- 1 oracle oinstall 253, 3 May 19 14:44 ASM_Disk3
+brw-rw---- 1 oracle oinstall 253, 4 May 19 14:44 ASM_Disk4
+brw-rw---- 1 oracle oinstall 253, 5 May 19 14:44 ASM_Disk5
+brw-rw---- 1 oracle oinstall 253, 6 May 19 14:44 ASM_Disk6
+brw-rw---- 1 oracle oinstall 253, 7 May 19 14:44 ASM_Disk7
+```
+
+### How To List Physical Disks Against LUNs?
+
+If you would like to map physical disks against LUNs then use the below command.
+
+```
+# multipath -ll | grep NETAPP
+
+3600a0123456789012345567890234q11 dm-1 NETAPP,LUN C-Mode
+3600a0123456789012345567890234q12 dm-2 NETAPP,LUN C-Mode
+3600a0123456789012345567890234q13 dm-3 NETAPP,LUN C-Mode
+3600a0123456789012345567890234q14 dm-4 NETAPP,LUN C-Mode
+3600a0123456789012345567890234q15 dm-5 NETAPP,LUN C-Mode
+3600a0123456789012345567890234q16 dm-6 NETAPP,LUN C-Mode
+3600a0123456789012345567890234q17 dm-7 NETAPP,LUN C-Mode
+```
+
+--------------------------------------------------------------------------------
+
+via: https://www.2daygeek.com/shell-script-map-oracle-asm-disks-physical-disk-lun-in-linux/
+
+作者:[Magesh Maruthamuthu][a]
+选题:[lujun9972][b]
+译者:[译者ID](https://github.com/译者ID)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]: https://www.2daygeek.com/author/magesh/
+[b]: https://github.com/lujun9972
+[1]: https://www.2daygeek.com/start-stop-restart-enable-reload-oracleasm-service-linux-create-scan-list-query-rename-delete-configure-oracleasm-disk/
diff --git a/sources/tech/20190520 PiShrink - Make Raspberry Pi Images Smaller.md b/sources/tech/20190520 PiShrink - Make Raspberry Pi Images Smaller.md
new file mode 100644
index 0000000000..ab26d62d93
--- /dev/null
+++ b/sources/tech/20190520 PiShrink - Make Raspberry Pi Images Smaller.md
@@ -0,0 +1,123 @@
+[#]: collector: (lujun9972)
+[#]: translator: ( )
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (PiShrink – Make Raspberry Pi Images Smaller)
+[#]: via: (https://www.ostechnix.com/pishrink-make-raspberry-pi-images-smaller/)
+[#]: author: (sk https://www.ostechnix.com/author/sk/)
+
+PiShrink – Make Raspberry Pi Images Smaller
+======
+
+![Make Raspberry Pi Images Smaller With PiShrink In Linux][1]
+
+**Raspberry Pi** requires no introduction. It is a small, affordable and credit-card sized computer that can be connected to a Monitor or TV. We can attach a standard keyboard and mouse and use it as a full-blown desktop computer to do everyday tasks, such Internet browsing, playing videos/games, word processing and spreadsheet making and a lot more. It has been mainly developed for teaching Computer science in schools. Nowadays, Raspberry Pi is widely being used in colleges, small-medium organizations and institutes to teach coding. If you own a Raspberry Pi device, you might want to check out a bash script named **“PiShrink”** , which is used to make Raspberry Pi Images smaller. PiShrink will automatically shrink a pi image that will then resize to the max size of the SD card on boot. This will make putting the image back onto the SD card faster and the shrunk images will compress better. This can be useful to fit the large size images in your SD card. In this brief guide, we are going to learn to shrink Raspberry images to smaller size in Unix-like systems.
+
+### Installing PiShrink
+
+To install PiShrink on your Linux box, first download the latest version using command:
+
+```
+$ wget https://raw.githubusercontent.com/Drewsif/PiShrink/master/pishrink.sh
+```
+
+Next, make the downloaded PiShrink binary as executable:
+
+```
+$ chmod +x pishrink.sh
+```
+
+Finally, move it your path:
+
+```
+$ sudo mv pishrink.sh /usr/local/bin/
+```
+
+### Make Raspberry Pi Images Smaller
+
+As you may already know, **Raspbian** is the official operating system for all models of Raspberry Pi. The Raspberry foundation has developed **Raspberry Pi Desktop** version for PC and Mac. You can create a live cd, run it in virtual machine and even install it in your desktop as well. There are also few unofficial OS images available for Raspberry Pi. For the purpose of testing, I’ve downloaded the official Raspbian OS from the [**official download page**][2].
+
+Unzip the downloaded OS image:
+
+```
+$ unzip 2019-04-08-raspbian-stretch-lite.zip
+```
+
+The above command will extract contents of **2019-04-08-raspbian-stretch-lite.zip** file in the current working directory.
+
+Let check the actual size of the extracted file:
+
+```
+$ du -h 2019-04-08-raspbian-stretch-lite.img
+1.7G 2019-04-08-raspbian-stretch-lite.img
+```
+
+As you can see, the size of the extracted Raspberry OS img file is **1.7G**.
+
+Now, shrink this file’s size using PiShrink like below:
+
+```
+$ sudo pishrink.sh 2019-04-08-raspbian-stretch-lite.img
+```
+
+Sample output:
+
+```
+Creating new /etc/rc.local
+rootfs: 39795/107072 files (0.1% non-contiguous), 239386/428032 blocks
+resize2fs 1.45.0 (6-Mar-2019)
+resize2fs 1.45.0 (6-Mar-2019)
+Resizing the filesystem on /dev/loop1 to 280763 (4k) blocks.
+Begin pass 3 (max = 14)
+Scanning inode table XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+Begin pass 4 (max = 3728)
+Updating inode references XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+The filesystem on /dev/loop1 is now 280763 (4k) blocks long.
+
+Shrunk 2019-04-08-raspbian-stretch-lite.img from 1.7G to 1.2G
+```
+
+[![Make Raspberry Pi Images Smaller Using PiShrink][1]][3]
+
+Make Raspberry Pi Images Smaller Using PiShrink
+
+As you see in the above output, the size of the Rasberry Pi image has been reduced to **1.2G**.
+
+You can also use **-s** flag to skip the autoexpanding part of the process.
+
+```
+$ sudo pishrink.sh -s 2019-04-08-raspbian-stretch-lite.img newpi.img
+```
+
+This will create a copy of source img file (i.e 2019-04-08-raspbian-stretch-lite.img) into a new img file (newpi.img) and work on it. For more details, check the official GitHub page given at the end.
+
+And, that’s all for now. Hope this was useful. More good stuffs to come. Stay tuned!
+
+And, that’s all for now.
+
+**Resource:**
+
+ * [**PiShrink GitHub Repository**][4]
+ * [**Raspberry Pi website**][5]
+
+
+
+--------------------------------------------------------------------------------
+
+via: https://www.ostechnix.com/pishrink-make-raspberry-pi-images-smaller/
+
+作者:[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]: https://www.ostechnix.com/wp-content/uploads/2019/05/pishrink-720x340.png
+[2]: https://www.raspberrypi.org/downloads/
+[3]: http://www.ostechnix.com/wp-content/uploads/2019/05/pishrink-1.png
+[4]: https://github.com/Drewsif/PiShrink
+[5]: https://www.raspberrypi.org/
diff --git a/sources/tech/20190718 3 Emacs modes for taking notes.md b/sources/tech/20190718 3 Emacs modes for taking notes.md
deleted file mode 100644
index 2627357182..0000000000
--- a/sources/tech/20190718 3 Emacs modes for taking notes.md
+++ /dev/null
@@ -1,74 +0,0 @@
-[#]: collector: (lujun9972)
-[#]: translator: ( )
-[#]: reviewer: ( )
-[#]: publisher: ( )
-[#]: url: ( )
-[#]: subject: (3 Emacs modes for taking notes)
-[#]: via: (https://opensource.com/article/18/7/emacs-modes-note-taking)
-[#]: author: (Scott Nesbitt https://opensource.com/users/scottnesbitt)
-
-3 Emacs modes for taking notes
-======
-Keep track of information easily with these Emacs modes.
-
-
-No matter what line of work you're in, it's inevitable you have to take a few notes. Often, more than a few. If you're like many people in this day and age, you take your notes digitally.
-
-Open source enthusiasts have a variety of options for jotting down their ideas, thoughts, and research in electronic format. You might use a [web-based tool][1]. You might go for a [desktop application][2]. Or, you might [turn to the command line][3].
-
-If you use [Emacs][4], that wonderful operating system disguised as a text editor, there are modes that can help you take notes more efficiently. Let's look at three of them.
-
-### Deft
-
-
-On those rare occasions I'm forced to use a Mac, there's one tool I can't do without: the [nvALT][5] note-taking application. [Deft mode][6] brings the nvALT experience to Emacs.
-
-Deft stores your notes as text files in a single folder on your computer. When you enter Deft mode, it displays a list of your notes along with a short summary. The summary is taken from the first line of the text file. If you add, say, Markdown, LaTeX, or even Emacs Org mode formatting to the first line, Deft ignores the formatting and displays only the text.
-
-To open a note, just scroll down to it and press Enter. Deft does a bit more, though. According to Deft's developer, Jason Blevins, its _primary operation is searching and filtering_. Deft does that simply but efficiently. Type a keyword and Deft displays only the notes that have that keyword in their title. That's useful if you have a lot of notes and want to find one quickly.
-
-### Org mode
-
-
-There would be a couple or three people who would have jumped all over me if I didn't include [Org mode][7] in this article. Why? It's arguably the most flexible and the most widely used Emacs mode for taking notes. Used in the right way, Org mode can supercharge your note-taking.
-
-Org mode's main strength is how it organizes your notes. In Org mode, a note file is set up as a large outline. Each section is a node in the outline, which you can expand and collapse. Those sections can have subsections, which also expand and collapse. That not only lets you focus on one section at a time, but it also gives you an at-a-glance overview of the information you have.
-
-You can [link][8] between sections of your notes, quickly move sections without cutting and pasting, and [attach files][9] to your notes. Org mode supports character formatting and tables. If you need to convert your notes to something else, Org mode has a number of [export options][10].
-
-### Howm
-
-
-
-When I started using Emacs regularly, [howm][11] quickly became one of the modes I leaned heavily on. And even though I'm deep into using Org mode, I still have a soft spot for howm.
-
-Howm acts like a small wiki. You can create notes and task lists and link between them. By typing or clicking a link, you can jump between notes. If you need to, you can also tag your notes with a keyword. On top of that, you can search, sort, and concatenate your notes.
-
-Howm isn't the prettiest Emacs mode, and it doesn't have the best UX. It takes a bit of getting used to. Once you do, taking and maneuvering around notes is a breeze.
-
-Do you have a favorite Emacs mode for taking notes? Feel free to share it by leaving a comment.
-
---------------------------------------------------------------------------------
-
-via: https://opensource.com/article/18/7/emacs-modes-note-taking
-
-作者:[Scott Nesbitt][a]
-选题:[lujun9972][b]
-译者:[译者ID](https://github.com/译者ID)
-校对:[校对者ID](https://github.com/校对者ID)
-
-本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
-
-[a]: https://opensource.com/users/scottnesbitt
-[b]: https://github.com/lujun9972
-[1]: https://opensource.com/alternatives/evernote
-[2]: https://opensource.com/life/16/9/4-desktop-note-taking-applications
-[3]: https://opensource.com/article/18/3/command-line-note-taking-applications
-[4]: https://www.gnu.org/software/emacs/
-[5]: http://brettterpstra.com/projects/nvalt/
-[6]: https://jblevins.org/projects/deft/
-[7]: https://orgmode.org/
-[8]: https://orgmode.org/org.html#Hyperlinks
-[9]: https://orgmode.org/org.html#Attachments
-[10]: https://orgmode.org/org.html#Exporting
-[11]: https://howm.osdn.jp/
diff --git a/translated/tech/20150616 Computer Laboratory - Raspberry Pi- Lesson 11 Input02.md b/translated/tech/20150616 Computer Laboratory - Raspberry Pi- Lesson 11 Input02.md
deleted file mode 100644
index 6b5db8b104..0000000000
--- a/translated/tech/20150616 Computer Laboratory - Raspberry Pi- Lesson 11 Input02.md
+++ /dev/null
@@ -1,911 +0,0 @@
-[#]: collector: (lujun9972)
-[#]: translator: (guevaraya )
-[#]: reviewer: ( )
-[#]: publisher: ( )
-[#]: url: ( )
-[#]: subject: (Computer Laboratory – Raspberry Pi: Lesson 11 Input02)
-[#]: via: (https://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/os/input02.html)
-[#]: author: (Alex Chadwick https://www.cl.cam.ac.uk)
-
-计算机实验室 – 树莓派开发: 课程11 输入02
-======
-
-课程输入02是以课程输入01基础讲解的,通过一个简单的命令行实现用户的命令输入和计算机的处理和显示。本文假设你已经具备 [课程11:输入01][1] 的操作系统代码基础。
-
-### 1 终端
-
-```
-早期的计算一般是在一栋楼里的一个巨型计算机系统,他有很多可以输命令的'终端'。计算机依次执行不同来源的命令。
-```
-
-几乎所有的操作系统都是以字符终端显示启动的。经典的黑底白字,通过键盘输入计算机要执行的命令,然后会提示你拼写错误,或者恰好得到你想要的执行结果。这种方法有两个主要优点:键盘和显示器可以提供简易,健壮的计算机交互机制,几乎所有的计算机系统都采用这个机制,这个也广泛被系统管理员应用。
-
-让我们分析下真正想要哪些信息:
-
-1. 计算机打开后,显示欢迎信息
-2. 计算机启动后可以接受输入标志
-3. 用户从键盘输入带参数的命令
-4. 用户输入回车键或提交按钮
-5. 计算机解析命令后执行可用的命令
-6. 计算机显示命令的执行结果,过程信息
-7. 循环跳转到步骤2
-
-
-这样的终端被定义为标准的输入输出设备。用于输入的屏幕和输出打印的屏幕是同一个。也就是说终端是对字符显示的一个抽象。字符显示中,单个字符是最小的单元,而不是像素。屏幕被划分成固定数量不同颜色的字符。我们可以在现有的屏幕代码基础上,先存储字符和对应的颜色,然后再用方法 DrawCharacter 把其推送到屏幕上。一旦我们需要字符显示,就只需要在屏幕上画出一行字符串。
-
-新建文件名为 terminal.s 如下:
-```
-.section .data
-.align 4
-terminalStart:
-.int terminalBuffer
-terminalStop:
-.int terminalBuffer
-terminalView:
-.int terminalBuffer
-terminalColour:
-.byte 0xf
-.align 8
-terminalBuffer:
-.rept 128*128
-.byte 0x7f
-.byte 0x0
-.endr
-terminalScreen:
-.rept 1024/8 core.md Dict.md lctt2014.md lctt2016.md lctt2018.md LICENSE published README.md scripts sources translated 768/16
-.byte 0x7f
-.byte 0x0
-.endr
-```
-这是文件终端的配置数据文件。我们有两个主要的存储变量:terminalBuffer 和 terminalScreen。terminalBuffer保存所有显示过的字符。它保存128行字符文本(1行包含128个字符)。每个字符有一个 ASCII 字符和颜色单元组成,初始值为0x7f(ASCII的删除键)和 0(前景色和背景色为黑)。terminalScreen 保存当前屏幕显示的字符。它保存128x48的字符,与 terminalBuffer 初始化值一样。你可能会想我仅需要terminalScreen就够了,为什么还要terminalBuffer,其实有两个好处:
-
- 1. 我们可以很容易看到字符串的变化,只需画出有变化的字符。
- 2. 我们可以回滚终端显示的历史字符,也就是缓冲的字符(有限制)
-
-
-你总是需要尝试去设计一个高效的系统,如果很少变化的条件这个系统会运行的更快。
-
-独特的技巧在低功耗系统里很常见。画屏是很耗时的操作,因此我们仅在不得已的时候才去执行这个操作。在这个系统里,我们可以任意改变terminalBuffer,然后调用一个仅拷贝屏幕上字节变化的方法。也就是说我们不需要持续画出每个字符,这样可以节省一大段跨行文本的操作时间。
-
-其他在 .data 段的值得含义如下:
-
- * terminalStart
- 写入到 terminalBuffer 的第一个字符
- * terminalStop
- 写入到 terminalBuffer 的最后一个字符
- * terminalView
- 表示当前屏幕的第一个字符,这样我们可以控制滚动屏幕
- * temrinalColour
- 即将被描画的字符颜色
-
-
-```
-循环缓冲区是**数据结构**一个例子。这是一个组织数据的思路,有时我们通过软件实现这种思路。
-```
-
-![显示 Hellow world 插入到大小为5的循环缓冲区的示意图。][2]
-terminalStart 需要保存起来的原因是 termainlBuffer 是一个循环缓冲区。意思是当缓冲区变满时,末尾地方会回滚覆盖开始位置,这样最后一个字符变成了第一个字符。因此我们需要将 terminalStart 往前推进,这样我们知道我们已经占满它了。如何实现缓冲区检测:如果索引越界到缓冲区的末尾,就将索引指向缓冲区的开始位置。循环缓冲区是一个比较常见的高明的存储大量数据的方法,往往这些数据的最近部分比较重要。它允许无限制的写入,只保证最近一些特定数据有效。这个常常用于信号处理和数据压缩算法。这样的情况,可以允许我们存储128行终端记录,超过128行也不会有问题。如果不是这样,当超过第128行时,我们需要把127行分别向前拷贝一次,这样很浪费时间。
-
-之前已经提到过 terminalColour 几次了。你可以根据你的想法实现终端颜色,但这个文本终端有16个前景色和16个背景色(这里相当于有16²=256种组合)。[CGA][3]终端的颜色定义如下:
-
-表格 1.1 - CGA 颜色编码
-
-| 序号 | 颜色 (R, G, B) |
-| ------ | ------------------------|
-| 0 | 黑 (0, 0, 0) |
-| 1 | 蓝 (0, 0, ⅔) |
-| 2 | 绿 (0, ⅔, 0) |
-| 3 | 青色 (0, ⅔, ⅔) |
-| 4 | 红色 (⅔, 0, 0) |
-| 5 | 品红 (⅔, 0, ⅔) |
-| 6 | 棕色 (⅔, ⅓, 0) |
-| 7 | 浅灰色 (⅔, ⅔, ⅔) |
-| 8 | 灰色 (⅓, ⅓, ⅓) |
-| 9 | 淡蓝色 (⅓, ⅓, 1) |
-| 10 | 淡绿色 (⅓, 1, ⅓) |
-| 11 | 淡青色 (⅓, 1, 1) |
-| 12 | 淡红色 (1, ⅓, ⅓) |
-| 13 | 浅品红 (1, ⅓, 1) |
-| 14 | 黄色 (1, 1, ⅓) |
-| 15 | 白色 (1, 1, 1) |
-
-```
-棕色作为替代色(黑黄色)既不吸引人也没有什么用处。
-```
-我们将前景色保存到颜色的低字节,背景色保存到颜色高字节。除过棕色,其他这些颜色遵循一种模式如二进制的高位比特代表增加 ⅓ 到每个组件,其他比特代表增加⅔到各自组件。这样很容易进行RGB颜色转换。
-
-我们需要一个方法从TerminalColour读取颜色编码的四个比特,然后用16比特等效参数调用 SetForeColour。尝试实现你自己实现。如果你感觉麻烦或者还没有完成屏幕系列课程,我们的实现如下:
-
-```
-.section .text
-TerminalColour:
-teq r0,#6
-ldreq r0,=0x02B5
-beq SetForeColour
-
-tst r0,#0b1000
-ldrne r1,=0x52AA
-moveq r1,#0
-tst r0,#0b0100
-addne r1,#0x15
-tst r0,#0b0010
-addne r1,#0x540
-tst r0,#0b0001
-addne r1,#0xA800
-mov r0,r1
-b SetForeColour
-```
-### 2 文本显示
-
-我们的终端第一个真正需要的方法是 TerminalDisplay,它用来把当前的数据从 terminalBuffe r拷贝到 terminalScreen 和实际的屏幕。如上所述,这个方法必须是最小开销的操作,因为我们需要频繁调用它。它主要比较 terminalBuffer 与 terminalDisplay的文本,然后只拷贝有差异的字节。请记住 terminalBuffer 是循环缓冲区运行的,这种情况,从 terminalView 到 terminalStop 或者 128*48 字符集,哪个来的最快。如果我们遇到 terminalStop,我们将会假定在这之后的所有字符是7f16 (ASCII delete),背景色为0(黑色前景色和背景色)。
-
-让我们看看必须要做的事情:
-
- 1. 加载 terminalView ,terminalStop 和 terminalDisplay 的地址。
- 2. 执行每一行:
- 1. 执行每一列:
- 1. 如果 terminalView 不等于 terminalStop,根据 terminalView 加载当前字符和颜色
- 2. 否则加载 0x7f 和颜色 0
- 3. 从 terminalDisplay 加载当前的字符
- 4. 如果字符和颜色相同,直接跳转到10
- 5. 存储字符和颜色到 terminalDisplay
- 6. 用 r0 作为背景色参数调用 TerminalColour
- 7. 用 r0 = 0x7f (ASCII 删除键, 一大块), r1 = x, r2 = y 调用 DrawCharacter
- 8. 用 r0 作为前景色参数调用 TerminalColour
- 9. 用 r0 = 字符, r1 = x, r2 = y 调用 DrawCharacter
- 10. 对位置参数 terminalDisplay 累加2
- 11. 如果 terminalView 不等于 terminalStop不能相等 terminalView 位置参数累加2
- 12. 如果 terminalView 位置已经是文件缓冲器的末尾,将他设置为缓冲区的开始位置
- 13. x 坐标增加8
- 2. y 坐标增加16
-
-
-Try to implement this yourself. If you get stuck, my solution is given below:
-尝试去自己实现吧。如果你遇到问题,我们的方案下面给出来了:
-
-1.
-```
-.globl TerminalDisplay
-TerminalDisplay:
-push {r4,r5,r6,r7,r8,r9,r10,r11,lr}
-x .req r4
-y .req r5
-char .req r6
-col .req r7
-screen .req r8
-taddr .req r9
-view .req r10
-stop .req r11
-
-ldr taddr,=terminalStart
-ldr view,[taddr,#terminalView - terminalStart]
-ldr stop,[taddr,#terminalStop - terminalStart]
-add taddr,#terminalBuffer - terminalStart
-add taddr,#128*128*2
-mov screen,taddr
-```
-
-我这里的变量有点乱。为了方便起见,我用 taddr 存储 textBuffer 的末尾位置。
-
-2.
-```
-mov y,#0
-yLoop$:
-```
-从yLoop开始运行。
-
- 1.
- ```
- mov x,#0
- xLoop$:
- ```
- 从yLoop开始运行。
-
- 1.
- ```
- teq view,stop
- ldrneh char,[view]
- ```
- 为了方便起见,我把字符和颜色同时加载到 char 变量了
-
- 2.
- ```
- moveq char,#0x7f
- ```
- 这行是对上面一行的补充说明:读取黑色的Delete键
-
- 3.
- ```
- ldrh col,[screen]
- ```
- 为了简便我把字符和颜色同时加载到 col 里。
-
- 4.
- ```
- teq col,char
- beq xLoopContinue$
- ```
- 现在我用teq指令检查是否有数据变化
-
- 5.
- ```
- strh char,[screen]
- ```
- 我可以容易的保存当前值
-
- 6.
- ```
- lsr col,char,#8
- and char,#0x7f
- lsr r0,col,#4
- bl TerminalColour
- ```
- 我用 bitshift(比特偏移) 指令和 and 指令从 char 变量中分离出颜色到 col 变量和字符到 char变量,然后再用bitshift(比特偏移)指令后调用TerminalColour 获取背景色。
-
- 7.
- ```
- mov r0,#0x7f
- mov r1,x
- mov r2,y
- bl DrawCharacter
- ```
- 写入一个彩色的删除字符块
-
- 8.
- ```
- and r0,col,#0xf
- bl TerminalColour
- ```
- 用 and 指令获取 col 变量的最低字节,然后调用TerminalColour
-
- 9.
- ```
- mov r0,char
- mov r1,x
- mov r2,y
- bl DrawCharacter
- ```
- 写入我们需要的字符
-
- 10.
- ```
- xLoopContinue$:
- add screen,#2
- ```
- 自增屏幕指针
-
- 11.
- ```
- teq view,stop
- addne view,#2
- ```
- 如果可能自增view指针
-
- 12.
- ```
- teq view,taddr
- subeq view,#128*128*2
- ```
- 很容易检测 view指针是否越界到缓冲区的末尾,因为缓冲区的地址保存在 taddr 变量里
-
- 13.
- ```
- add x,#8
- teq x,#1024
- bne xLoop$
- ```
- 如果还有字符需要显示,我们就需要自增 x 变量然后循环到 xLoop 执行
-
- 2.
- ```
- add y,#16
- teq y,#768
- bne yLoop$
- ```
- 如果还有更多的字符显示我们就需要自增 y 变量,然后循环到 yLoop 执行
-
-```
-pop {r4,r5,r6,r7,r8,r9,r10,r11,pc}
-.unreq x
-.unreq y
-.unreq char
-.unreq col
-.unreq screen
-.unreq taddr
-.unreq view
-.unreq stop
-```
-不要忘记最后清除变量
-
-
-### 3 行打印
-
-现在我有了自己 TerminalDisplay方法,它可以自动显示 terminalBuffer 到 terminalScreen,因此理论上我们可以画出文本。但是实际上我们没有任何基于字符显示的实例。 首先快速容易上手的方法便是 TerminalClear, 它可以彻底清除终端。这个方法没有循环很容易实现。可以尝试分析下面的方法应该不难:
-
-```
-.globl TerminalClear
-TerminalClear:
-ldr r0,=terminalStart
-add r1,r0,#terminalBuffer-terminalStart
-str r1,[r0]
-str r1,[r0,#terminalStop-terminalStart]
-str r1,[r0,#terminalView-terminalStart]
-mov pc,lr
-```
-
-现在我们需要构造一个字符显示的基础方法:打印函数。它将保存在 r0 的字符串和 保存在 r1 字符串长度简易的写到屏幕上。有一些特定字符需要特别的注意,这些特定的操作是确保 terminalView 是最新的。我们来分析一下需要做啥:
-
- 1. 检查字符串的长度是否为0,如果是就直接返回
- 2. 加载 terminalStop 和 terminalView
- 3. 计算出 terminalStop 的 x 坐标
- 4. 对每一个字符的操作:
- 1. 检查字符是否为新起一行
- 2. 如果是的话,自增 bufferStop 到行末,同时写入黑色删除键
- 3. 否则拷贝当前 terminalColour 的字符
- 4. 加成是在行末
- 5. 如果是,检查从 terminalView 到 terminalStop 之间的字符数是否大于一屏
- 6. 如果是,terminalView 自增一行
- 7. 检查 terminalView 是否为缓冲区的末尾,如果是的话将其替换为缓冲区的起始位置
- 8. 检查 terminalStop 是否为缓冲区的末尾,如果是的话将其替换为缓冲区的起始位置
- 9. 检查 terminalStop 是否等于 terminalStart, 如果是的话 terminalStart 自增一行。
- 10. 检查 terminalStart 是否为缓冲区的末尾,如果是的话将其替换为缓冲区的起始位置
- 5. 存取 terminalStop 和 terminalView
-
-
-试一下自己去实现。我们的方案提供如下:
-
-1.
-```
-.globl Print
-Print:
-teq r1,#0
-moveq pc,lr
-```
-这个是打印函数开始快速检查字符串为0的代码
-
-2.
-```
-push {r4,r5,r6,r7,r8,r9,r10,r11,lr}
-bufferStart .req r4
-taddr .req r5
-x .req r6
-string .req r7
-length .req r8
-char .req r9
-bufferStop .req r10
-view .req r11
-
-mov string,r0
-mov length,r1
-
-ldr taddr,=terminalStart
-ldr bufferStop,[taddr,#terminalStop-terminalStart]
-ldr view,[taddr,#terminalView-terminalStart]
-ldr bufferStart,[taddr]
-add taddr,#terminalBuffer-terminalStart
-add taddr,#128*128*2
-```
-
-这里我做了很多配置。 bufferStart 代表 terminalStart, bufferStop代表terminalStop, view 代表 terminalView,taddr 代表 terminalBuffer 的末尾地址。
-
-3.
-```
-and x,bufferStop,#0xfe
-lsr x,#1
-```
-和通常一样,巧妙的对齐技巧让许多事情更容易。由于需要对齐 terminalBuffer,每个字符的 x 坐标需要8位要除以2。
-
- 4.
- 1.
- ```
- charLoop$:
- ldrb char,[string]
- and char,#0x7f
- teq char,#'\n'
- bne charNormal$
- ```
- 我们需要检查新行
-
- 2.
- ```
- mov r0,#0x7f
- clearLine$:
- strh r0,[bufferStop]
- add bufferStop,#2
- add x,#1
- teq x,#128 blt clearLine$
-
- b charLoopContinue$
- ```
- 循环执行值到行末写入 0x7f;黑色删除键
-
- 3.
- ```
- charNormal$:
- strb char,[bufferStop]
- ldr r0,=terminalColour
- ldrb r0,[r0]
- strb r0,[bufferStop,#1]
- add bufferStop,#2
- add x,#1
- ```
- 存储字符串的当前字符和 terminalBuffer 末尾的 terminalColour然后将它和 x 变量自增
-
- 4.
- ```
- charLoopContinue$:
- cmp x,#128
- blt noScroll$
- ```
- 检查 x 是否为行末;128
-
- 5.
- ```
- mov x,#0
- subs r0,bufferStop,view
- addlt r0,#128*128*2
- cmp r0,#128*(768/16)*2
- ```
- 这是 x 为 0 然后检查我们是否已经显示超过1屏。请记住,我们是用的循环缓冲区,因此如果 bufferStop 和 view 之前差是负值,我们实际使用是环绕缓冲区。
-
- 6.
- ```
- addge view,#128*2
- ```
- 增加一行字节到 view 的地址
-
- 7.
- ```
- teq view,taddr
- subeq view,taddr,#128*128*2
- ```
- 如果 view 地址是缓冲区的末尾,我们就从它上面减去缓冲区的长度,让其指向开始位置。我会在开始的时候设置 taddr 为缓冲区的末尾地址。
-
- 8.
- ```
- noScroll$:
- teq bufferStop,taddr
- subeq bufferStop,taddr,#128*128*2
- ```
- 如果 stop 的地址在缓冲区末尾,我们就从它上面减去缓冲区的长度,让其指向开始位置。我会在开始的时候设置 taddr 为缓冲区的末尾地址。
-
- 9.
- ```
- teq bufferStop,bufferStart
- addeq bufferStart,#128*2
- ```
- 检查 bufferStop 是否等于 bufferStart。 如果等于增加一行到 bufferStart。
-
- 10.
- ```
- teq bufferStart,taddr
- subeq bufferStart,taddr,#128*128*2
- ```
- 如果 start 的地址在缓冲区的末尾,我们就从它上面减去缓冲区的长度,让其指向开始位置。我会在开始的时候设置 taddr 为缓冲区的末尾地址。
-
-```
-subs length,#1
-add string,#1
-bgt charLoop$
-```
-循环执行知道字符串结束
-
-5.
-```
-charLoopBreak$:
-sub taddr,#128*128*2
-sub taddr,#terminalBuffer-terminalStart
-str bufferStop,[taddr,#terminalStop-terminalStart]
-str view,[taddr,#terminalView-terminalStart]
-str bufferStart,[taddr]
-
-pop {r4,r5,r6,r7,r8,r9,r10,r11,pc}
-.unreq bufferStart
-.unreq taddr
-.unreq x
-.unreq string
-.unreq length
-.unreq char
-.unreq bufferStop
-.unreq view
-```
-保存变量然后返回
-
-
-这个方法允许我们打印任意字符到屏幕。然而我们用了颜色变量,但实际上没有设置它。一般终端用特性的组合字符去行修改颜色。如ASCII转移(1b16)后面跟着一个0-f的16进制的书,就可以设置前景色为 CGA颜色。如果你自己想尝试实现;在下载页面有一个我的详细的例子。
-
-
-### 4 标志输入
-
-```
-按照惯例,许多编程语言中,任意程序可以访问 stdin 和 stdin,他们可以连接到终端的输入和输出流。在图形程序其实也可以进行同样操作,但实际几乎不用。
-```
-
-现在我们有一个可以打印和显示文本的输出终端。这仅仅是说了一半,我们需要输入。我们想实现一个方法:Readline,可以保存文件的一行文本,文本位置有 r0 给出,最大的长度由 r1 给出,返回 r0 里面的字符串长度。棘手的是用户输出字符的时候要回显功能,同时想要退格键的删除功能和命令回车执行功能。他们还想需要一个闪烁的下划线代表计算机需要输入。这些完全合理的要求让构造这个方法更具有挑战性。有一个方法完成这些需求就是存储用户输入的文本和文件大小到内存的某个地方。然后当调用 ReadLine 的时候,移动 terminalStop 的地址到它开始的地方然后调用 Print。也就是说我们只需要确保在内存维护一个字符串,然后构造一个我们自己的打印函数。
-
-让我们看看 ReadLine做了哪些事情:
-
- 1. 如果字符串可保存的最大长度为0,直接返回
- 2. 检索 terminalStop 和 terminalStop 的当前值
- 3. 如果字符串的最大长度大约缓冲区的一半,就设置大小为缓冲区的一半
- 4. 从最大长度里面减去1来确保输入的闪烁字符或结束符
- 5. 向字符串写入一个下划线
- 6. 写入一个 terminalView 和 terminalStop 的地址到内存
- 7. 调用 Print 大约当前字符串
- 8. 调用 TerminalDisplay
- 9. 调用 KeyboardUpdate
- 10. 调用 KeyboardGetChar
- 11. 如果为一个新行直接跳转到16
- 12. 如果是一个退格键,将字符串长度减一(如果其大约0)
- 13. 如果是一个普通字符,将他写入字符串(字符串大小确保小于最大值)
- 14. 如果字符串是以下划线结束,写入一个空格,否则写入下划线
- 15. 跳转到6
- 16. 字符串的末尾写入一个新行
- 17. 调用 Print 和 TerminalDisplay
- 18. 用结束符替换新行
- 19. 返回字符串的长度
-
-
-
-为了方便读者理解,然后然后自己去实现,我们的实现提供如下:
-
-1.
-```
-.globl ReadLine
-ReadLine:
-teq r1,#0
-moveq r0,#0
-moveq pc,lr
-```
-快速处理长度为0的情况
-
-2.
-```
-string .req r4
-maxLength .req r5
-input .req r6
-taddr .req r7
-length .req r8
-view .req r9
-
-push {r4,r5,r6,r7,r8,r9,lr}
-
-mov string,r0
-mov maxLength,r1
-ldr taddr,=terminalStart
-ldr input,[taddr,#terminalStop-terminalStart]
-ldr view,[taddr,#terminalView-terminalStart]
-mov length,#0
-```
-考虑到常见的场景,我们初期做了很多初始化动作。input 代表 terminalStop 的值,view 代表 terminalView。Length 默认为 0.
-
-3.
-```
-cmp maxLength,#128*64
-movhi maxLength,#128*64
-```
-我们必须检查异常大的读操作,我们不能处理超过 terminalBuffer 大小的输入(理论上可行,但是terminalStart 移动越过存储的terminalStop,会有很多问题)。
-
-4.
-```
-sub maxLength,#1
-```
-由于用户需要一个闪烁的光标,我们需要一个备用字符在理想状况在这个字符串后面放一个结束符。
-
-5.
-```
-mov r0,#'_'
-strb r0,[string,length]
-```
-写入一个下划线让用户知道我们可以输入了。
-
-6.
-```
-readLoop$:
-str input,[taddr,#terminalStop-terminalStart]
-str view,[taddr,#terminalView-terminalStart]
-```
-保存 terminalStop 和 terminalView。这个对重置一个终端很重要,它会修改这些变量。严格讲也可以修改 terminalStart,但是不可逆。
-
-7.
-```
-mov r0,string
-mov r1,length
-add r1,#1
-bl Print
-```
-写入当前的输入。由于下划线因此字符串长度加1
-8.
-```
-bl TerminalDisplay
-```
-拷贝下一个文本到屏幕
-
-9.
-```
-bl KeyboardUpdate
-```
-获取最近一次键盘输入
-
-10.
-```
-bl KeyboardGetChar
-```
-检索键盘输入键值
-
-11.
-```
-teq r0,#'\n'
-beq readLoopBreak$
-teq r0,#0
-beq cursor$
-teq r0,#'\b'
-bne standard$
-```
-
-如果我们有一个回车键,循环中断。如果有结束符和一个退格键也会同样跳出选好。
-
-12.
-```
-delete$:
-cmp length,#0
-subgt length,#1
-b cursor$
-```
-从 length 里面删除一个字符
-
-13.
-```
-standard$:
-cmp length,maxLength
-bge cursor$
-strb r0,[string,length]
-add length,#1
-```
-写回一个普通字符
-
-14.
-```
-cursor$:
-ldrb r0,[string,length]
-teq r0,#'_'
-moveq r0,#' '
-movne r0,#'_'
-strb r0,[string,length]
-```
-加载最近的一个字符,如果不是下换线则修改为下换线,如果是空格则修改为下划线
-
-15.
-```
-b readLoop$
-readLoopBreak$:
-```
-循环执行值到用户输入按下
-
-16.
-```
-mov r0,#'\n'
-strb r0,[string,length]
-```
-在字符串的结尾处存入一新行
-
-17.
-```
-str input,[taddr,#terminalStop-terminalStart]
-str view,[taddr,#terminalView-terminalStart]
-mov r0,string
-mov r1,length
-add r1,#1
-bl Print
-bl TerminalDisplay
-```
-重置 terminalView 和 terminalStop 然后调用 Print 和 TerminalDisplay 输入回显
-
-
-18.
-```
-mov r0,#0
-strb r0,[string,length]
-```
-写入一个结束符
-
-19.
-```
-mov r0,length
-pop {r4,r5,r6,r7,r8,r9,pc}
-.unreq string
-.unreq maxLength
-.unreq input
-.unreq taddr
-.unreq length
-.unreq view
-```
-返回长度
-
-
-
-
-### 5 终端: 机器进化
-
-现在我们理论用终端和用户可以交互了。最显而易见的事情就是拿去测试了!在 'main.s' 里UsbInitialise后面的删除代码如下
-
-```
-reset$:
- mov sp,#0x8000
- bl TerminalClear
-
- ldr r0,=welcome
- mov r1,#welcomeEnd-welcome
- bl Print
-
-loop$:
- ldr r0,=prompt
- mov r1,#promptEnd-prompt
- bl Print
-
- ldr r0,=command
- mov r1,#commandEnd-command
- bl ReadLine
-
- teq r0,#0
- beq loopContinue$
-
- mov r4,r0
-
- ldr r5,=command
- ldr r6,=commandTable
-
- ldr r7,[r6,#0]
- ldr r9,[r6,#4]
- commandLoop$:
- ldr r8,[r6,#8]
- sub r1,r8,r7
-
- cmp r1,r4
- bgt commandLoopContinue$
-
- mov r0,#0
- commandName$:
- ldrb r2,[r5,r0]
- ldrb r3,[r7,r0]
- teq r2,r3
- bne commandLoopContinue$
- add r0,#1
- teq r0,r1
- bne commandName$
-
- ldrb r2,[r5,r0]
- teq r2,#0
- teqne r2,#' '
- bne commandLoopContinue$
-
- mov r0,r5
- mov r1,r4
- mov lr,pc
- mov pc,r9
- b loopContinue$
-
- commandLoopContinue$:
- add r6,#8
- mov r7,r8
- ldr r9,[r6,#4]
- teq r9,#0
- bne commandLoop$
-
- ldr r0,=commandUnknown
- mov r1,#commandUnknownEnd-commandUnknown
- ldr r2,=formatBuffer
- ldr r3,=command
- bl FormatString
-
- mov r1,r0
- ldr r0,=formatBuffer
- bl Print
-
-loopContinue$:
- bl TerminalDisplay
- b loop$
-
-echo:
- cmp r1,#5
- movle pc,lr
-
- add r0,#5
- sub r1,#5
- b Print
-
-ok:
- teq r1,#5
- beq okOn$
- teq r1,#6
- beq okOff$
- mov pc,lr
-
- okOn$:
- ldrb r2,[r0,#3]
- teq r2,#'o'
- ldreqb r2,[r0,#4]
- teqeq r2,#'n'
- movne pc,lr
- mov r1,#0
- b okAct$
-
- okOff$:
- ldrb r2,[r0,#3]
- teq r2,#'o'
- ldreqb r2,[r0,#4]
- teqeq r2,#'f'
- ldreqb r2,[r0,#5]
- teqeq r2,#'f'
- movne pc,lr
- mov r1,#1
-
- okAct$:
-
- mov r0,#16
- b SetGpio
-
-.section .data
-.align 2
-welcome: .ascii "Welcome to Alex's OS - Everyone's favourite OS"
-welcomeEnd:
-.align 2
-prompt: .ascii "\n> "
-promptEnd:
-.align 2
-command:
- .rept 128
- .byte 0
- .endr
-commandEnd:
-.byte 0
-.align 2
-commandUnknown: .ascii "Command `%s' was not recognised.\n"
-commandUnknownEnd:
-.align 2
-formatBuffer:
- .rept 256
- .byte 0
- .endr
-formatEnd:
-
-.align 2
-commandStringEcho: .ascii "echo"
-commandStringReset: .ascii "reset"
-commandStringOk: .ascii "ok"
-commandStringCls: .ascii "cls"
-commandStringEnd:
-
-.align 2
-commandTable:
-.int commandStringEcho, echo
-.int commandStringReset, reset$
-.int commandStringOk, ok
-.int commandStringCls, TerminalClear
-.int commandStringEnd, 0
-```
-这块代码集成了一个简易的命令行操作系统。支持命令:echo,reset,ok 和 cls。echo 拷贝任意文本到终端,reset命令会在系统出现问题的是复位操作系统,ok 有两个功能:设置 OK 灯亮灭,最后 cls 调用 TerminalClear 清空终端。
-
-试试树莓派的代码吧。如果遇到问题,请参照问题集锦页面吧。
-
-如果运行正常,祝贺你完成了一个操作系统基本终端和输入系列的课程。很遗憾这个教程先讲到这里,但是我希望将来能制作更多教程。有问题请反馈至awc32@cam.ac.uk。
-
-你已经在建立了一个简易的终端操作系统。我们的代码在 commandTable 构造了一个可用的命令表格。每个表格的入口是一个整型数字,用来表示字符串的地址,和一个整型数字表格代码的执行入口。 最后一个入口是 为 0 的commandStringEnd。尝试实现你自己的命令,可以参照已有的函数,建立一个新的。函数的参数 r0 是用户输入的命令地址,r1是其长度。你可以用这个传递你输入值到你的命令。也许你有一个计算器程序,或许是一个绘图程序或国际象棋。不管你的什么电子,让它跑起来!
-
-
---------------------------------------------------------------------------------
-
-via: https://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/os/input02.html
-
-作者:[Alex Chadwick][a]
-选题:[lujun9972][b]
-译者:[译者ID](https://github.com/guevaraya)
-校对:[校对者ID](https://github.com/校对者ID)
-
-本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
-
-[a]: https://www.cl.cam.ac.uk
-[b]: https://github.com/lujun9972
-[1]: https://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/os/input01.html
-[2]: https://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/os/images/circular_buffer.png
-[3]: https://en.wikipedia.org/wiki/Color_Graphics_Adapter
diff --git a/translated/tech/20190204 7 Best VPN Services For 2019.md b/translated/tech/20190204 7 Best VPN Services For 2019.md
deleted file mode 100644
index 03ef3472a7..0000000000
--- a/translated/tech/20190204 7 Best VPN Services For 2019.md
+++ /dev/null
@@ -1,77 +0,0 @@
-[#]: collector: (lujun9972)
-[#]: translator: (Modrisco)
-[#]: reviewer: ( )
-[#]: publisher: ( )
-[#]: url: ( )
-[#]: subject: (7 Best VPN Services For 2019)
-[#]: via: (https://www.ostechnix.com/7-best-opensource-vpn-services-for-2019/)
-[#]: author: (Editor https://www.ostechnix.com/author/editor/)
-
-2019 年最好的 7 款 VPN 服务
-======
-
-在过去三年中,全球至少有 67% 的企业面临着数据泄露,亿万用户受到影响。研究表明,如果事先对数据安全采取最基本的保护措施,那么预计有 93% 的漏洞是可以避免的。
-
-糟糕的数据安全会带来极大的代价,特别是对企业而言。它会迅速造成破坏并损坏您的品牌声誉。尽管有些企业可以艰难地收拾残局,但仍有一些企业无法从事故中完全恢复。不过现在,您很幸运地可以得到数据及网络安全软件。
-
-
-
-到了 2019 年,您可以通过**虚拟私人网络**,也就是我们熟知的 **VPN** 来保护您免受网络攻击。当涉及到在线隐私和安全时,常常存在许多不确定因素。有数百个不同的 VPN 提供商,选择合适的供应商也同时意味着在定价、服务和易用性之间谋取恰当的平衡。
-
-如果您正在寻找一个可靠的 100% 经过测试和安全的 VPN,您可能需要进行详尽的调查并作出最佳选择。这里为您提供在 2019 年 7 款最好用并经过测试的 VPN 服务。
-
-### 1. Vpnunlimitedapp
-
-通过这款不限流量的 VPN ,您的数据安全将得到全面的保障。此 VPN 允许您连接任何 WiFi ,而无需担心您的个人数据可能被泄露。您的数据通过 AES-256 算法加密,保护您不受第三方和黑客的窥探。无论您身处何处,这款 VPN 都可确保您在所有网站上保持匿名且不受跟踪。它提供 7 天的免费试用和多种协议选项:openvpn、IKEv2 和 KeepSolidWise。有特殊需求的用户会获得特殊的额外服务,如个人服务器、终身 VPN 订阅和个人 IP 选项。
-
-### 2. VPN Lite
-
-VPN Lite 是一款易于使用而且**免费**的用于上网的 VPN 服务。您可以通过它在网络上保持匿名并保护您的个人隐私。它会模糊您的 IP 并加密您的数据,这意味着第三方无法跟踪您的所有线上活动。您还可以访问网络上的全部内容。使用 VPN Lite,您可以访问在您所在国家被拦截的网站。您还放心地可以访问公共 WiFi 而不必担心敏感信息被间谍软件窃取和来自黑客的跟踪和攻击。
-
-### 3. HotSpot Shield
-
-这是一款在 2005 年推出的大受欢迎的 VPN。这套 VPN 协议整合了至少全球 70% 的数据安全公司,并在全球有数千台服务器。它提供两种免费模式:一种为完全免费,但会有线上广告;另一种则为七天试用。它提供军事级的数据加密和恶意软件防护。HotSpot Shield 保证网络安全并保证高速网络。
-
-### 4. TunnelBear
-
-如果您是一名 VPN 新手,那么 TunnelBear 将是您的最佳选择。它带有一个用户友好的界面,并配有动画熊引导。您可以在 TunnelBear 的帮助下以极快的速度连接至少 22 个国家的服务器。它使用 **AES 256-bit** 加密算法,保证无登陆记录并保护数据。您还可以在最多五台设备上获得无限流量。
-
-### 5. ProtonVPN
-
-这款 VPN 为您提供强大的优质服务。您的连接速度可能会受到影响,但您也可以享受到无限流量。它具有易于使用的用户界面,提供多平台兼容。 ProtonVPN 的服务据说是因为为种子下载提供了优化因而无法访问 Netflix。您可以获得如协议和加密等安全功能来保证您的网络安全。
-
-### 6. ExpressVPN
-
-ExpressVPN 被认为是最好的用于接触封锁和保护隐私的离岸 VPN。凭借强大的客户支持和快速的速度,它已成为全球顶尖的 VPN 服务。它提供带有浏览器扩展和自定义固件的路由。 ExpressVPN 拥有一系列令人赞叹高质量应用程序,配有大量的服务器,并且最多只能支持三台设备。
-
-ExpressVPN 并不是完全免费的,恰恰相反,正是由于它所提供的高质量服务而使之成为了市场上最贵的 VPN 之一。ExpressVPN 有 30 天内退款保证,因此您可以免费试用一个月。好消息是,这是完全没有风险的。例如,如果您在短时间内需要 VPN 来绕过在线审查,这可能是您的首选解决方案。您当然不会随意想给一个会发送垃圾邮件、缓慢的免费的程序进行试验。
-
-ExpressVPN 也是享受在线流媒体和户外安全的最佳方式之一。如果您需要继续使用它,您只需要续订或取消您的免费试用。ExpressVPN 在 90 多个国家架设有 2000 多台服务器,可以解锁 Netflix,提供快速连接,并为用户提供完全隐私。
-
-### 7. PureVPN
-
-虽然 PureVPN 可能不是完全免费的,但它却是此列表中最实惠的一个。用户可以注册获得 7 天的免费试用,并在之后选择任一付费计划。通过这款 VPN,您可以访问到至少 140 个国家中的 750 余台服务器。它还可以在几乎所有设备上轻松安装。它的所有付费特性仍然可以在免费试用期间使用。包括无限数据流量、IP泄漏保护和ISP不可见性。它支持的系统有 iOS、Android、Windows、Linux和 macOS。
-
-### 总结
-
-如今,可用的免费 VPN 服务越来越多,为什么不抓住这个机会来保护您自己和您的客户呢?在了解到有那么多优秀的 VPN 服务后,我们知道即使是最安全的免费服务也不一定就完全没有风险。您可能需要付费升级到高级版以增强保护。Premium VPN 为您提供了免费试用,提供无风险退款保证。无论您打算花钱购买 VPN 还是准备使用免费 VPN,我们都强烈建议您使用它。
-
-**关于作者:**
-
-**Renetta K. Molina** 是一个技术爱好者和健身爱好者。她撰写有关技术、应用程序、 WordPress 和其他任何领域的文章。她喜欢在空余时间打高尔夫球和读书。她喜欢学习和尝试新事物。
-
-
-
---------------------------------------------------------------------------------
-
-via: https://www.ostechnix.com/7-best-opensource-vpn-services-for-2019/
-
-作者:[Editor][a]
-选题:[lujun9972][b]
-译者:[Modrisco](https://github.com/Modrisco)
-校对:[校对者ID](https://github.com/校对者ID)
-
-本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
-
-[a]: https://www.ostechnix.com/author/editor/
-[b]: https://github.com/lujun9972
diff --git a/translated/tech/20190308 Virtual filesystems in Linux- Why we need them and how they work.md b/translated/tech/20190308 Virtual filesystems in Linux- Why we need them and how they work.md
new file mode 100644
index 0000000000..cac4eb99b7
--- /dev/null
+++ b/translated/tech/20190308 Virtual filesystems in Linux- Why we need them and how they work.md
@@ -0,0 +1,211 @@
+[#]: collector: (lujun9972)
+[#]: translator: (wxy)
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (Virtual filesystems in Linux: Why we need them and how they work)
+[#]: via: (https://opensource.com/article/19/3/virtual-filesystems-linux)
+[#]: author: (Alison Chariken )
+
+Linux 中的虚拟文件系统
+======
+
+> 虚拟文件系统是一种神奇的抽象,它使得 “一切皆文件” 哲学在 Linux 中成为了可能。
+
+
+
+什么是文件系统?根据早期的 Linux 贡献者和作家 [Robert Love][1] 所说,“文件系统是一个遵循特定结构的数据的分层存储。” 不过,这种描述也同样适用于 VFAT(虚拟文件分配表)、Git 和[Cassandra][2](一种 [NoSQL 数据库][3])。那么如何区别文件系统呢?
+
+### 文件系统基础概念
+
+Linux 内核要求文件系统必须是实体,它还必须在持久对象上实现 `open()`、`read()` 和 `write()` 方法,并且这些实体需要有与之关联的名字。从 [面向对象编程][4] 的角度来看,内核将通用文件系统视为一个抽象接口,这三大函数是“虚拟”的,没有默认定义。因此,内核的默认文件系统实现被称为虚拟文件系统(VFS)。
+
+![][5]
+
+如果我们能够 `open()`、`read()` 和 `write()`,它就是一个文件,如这个主控台会话所示。
+
+VFS 是著名的类 Unix 系统中 “一切皆文件” 的基础。让我们看一下它有多奇怪,上面的小演示体现了字符设备 `/dev/console` 实际的工作。该图显示了一个在虚拟电传打字(tty)上的交互式 Bash 会话。将一个字符串发送到虚拟控制台设备会使其显示在虚拟屏幕上。而 VFS 甚至还有其它更奇怪的属性。例如,它[可以在其中寻址][6]。
+
+熟悉的文件系统如 ext4、NFS 和 /proc 在名为 [file_operations] [7] 的 C 语言数据结构中都提供了三大函数的定义。此外,特定的文件系统会以熟悉的面向对象的方式扩展和覆盖了 VFS 功能。正如 Robert Love 指出的那样,VFS 的抽象使 Linux 用户可以轻松地将文件复制到(复制自)外部操作系统或抽象实体(如管道),而无需担心其内部数据格式。在用户空间,通过系统调用,进程可以使用一个文件系统的 `read()`方法从文件复制到内核的数据结构中,然后使用另一种文件系统的 `write()` 方法输出数据。
+
+属于 VFS 基本类型的函数定义本身可以在内核源代码的 [fs/*.c 文件][8] 中找到,而 `fs/` 的子目录中包含了特定的文件系统。内核还包含了类似文件系统的实体,例如 cgroup、`/dev` 和 tmpfs,它们在引导过程的早期需要,因此定义在内核的 `init/` 子目录中。请注意,cgroup、`/dev` 和 tmpfs 不会调用 `file_operations` 的三大函数,而是直接读取和写入内存。
+
+下图大致说明了用户空间如何访问通常挂载在 Linux 系统上的各种类型的文件系统。未显示的是像管道、dmesg 和 POSIX 时钟这样的结构,它们也实现了 `struct file_operations`,并且因此其访问要通过 VFS 层。
+
+![How userspace accesses various types of filesystems][9]
+
+VFS 是系统调用和特定 `file_operations` 的实现(如 ext4 和 procfs)之间的“垫片层”。然后,`file_operations` 函数可以与特定于设备的驱动程序或内存访问器进行通信。tmpfs、devtmpfs 和 cgroup 不使用 `file_operations` 而是直接访问内存。
+
+VFS 的存在促进了代码重用,因为与文件系统相关的基本方法不需要由每种文件系统类型重新实现。代码重用是一种被广泛接受的软件工程最佳实践!唉,如果重用的代码[引入了严重的错误][10],那么继承常用方法的所有实现都会受到影响。
+
+### /tmp:一个小提示
+
+找出系统中存在的 VFS 的简单方法是键入 `mount | grep -v sd | grep -v :/`,在大多数计算机上,它将列出所有未驻留在磁盘上也不是 NFS 的已挂载文件系统。其中一个列出的 VFS 挂载肯定是 `/ tmp`,对吧?
+
+![Man with shocked expression][11]
+
+*每个人都知道把 /tmp 放在物理存储设备上简直是疯了!图片:*
+
+为什么把 `/tmp` 留在存储设备上是不可取的?因为 `/tmp` 中的文件是临时的(!),并且存储设备比内存慢,所以创建了 tmpfs 这种文件系统。此外,比起内存,物理设备频繁写入更容易磨损。最后,`/tmp` 中的文件可能包含敏感信息,因此在每次重新启动时让它们消失是一项功能。
+
+不幸的是,默认情况下,某些 Linux 发行版的安装脚本仍会在存储设备上创建 /tmp。如果你的系统出现这种情况,请不要绝望。按照一直优秀的 [Arch Wiki][12] 上的简单说明来解决问题就行,记住分配给 tmpfs 的内存不能用于其他目的。换句话说,带有巨大 tmpfs 并且其中包含大文件的系统可能会耗尽内存并崩溃。另一个提示:编辑 `/etc/fstab` 文件时,请务必以换行符结束,否则系统将无法启动。(猜猜我怎么知道。)
+
+### /proc 和 /sys
+
+除了 `/tmp` 之外,大多数 Linux 用户最熟悉的 VFS 是 `/proc` 和 `/sys`。(`/dev` 依赖于共享内存,没有 `file_operations`)。为什么有两种?让我们来看看更多细节。
+
+procfs 提供了内核的瞬时状态及其为用户空间控制的进程的快照。在 `/proc` 中,内核发布有关其提供的工具的信息,如中断、虚拟内存和调度程序。此外,`/proc/sys` 是存放可以通过 [sysctl 命令][13]配置的设置的地方,可供用户空间访问。单个进程的状态和统计信息在 `/proc/` 目录中报告。
+
+![Console][14]
+
+*/proc/meminfo 是一个空文件,但仍包含有价值的信息。*
+
+`/proc` 文件的行为说明了 VFS 可以与磁盘上的文件系统不同。一方面,`/proc/meminfo` 包含命令 `free` 提供的信息。另一方面,它还是空的!怎么会这样?这种情况让人联想起康奈尔大学物理学家 N. David Mermin 在 1985 年写的一篇名为“[没有人看见月亮的情况吗?][15]现实和量子理论。”事实是当进程从 `/proc` 请求内存时内核再收集有关内存的统计信息,并且当没有人在查看时,`/proc` 中的文件实际上没有任何内容。正如 [Mermin 所说][16],“这是一个基本的量子学说,一般来说,测量不会揭示被测属性的预先存在的价值。”(关于月球的问题的答案留作练习。)
+
+![Full moon][17]
+
+*当没有进程访问它们时,/proc 中的文件为空。([来源][18])*
+
+procfs 的空文件是有道理的,因为那里可用的信息是动态的。sysfs 的情况不同。让我们比较一下 `/proc` 与 `/sys` 中不为空的文件数量。
+
+
+
+procfs 只有一个,即导出的内核配置,这是一个例外,因为每次启动只需要生成一次。另一方面,`/sys` 有许多较大的文件,其中大多数包含一页内存。通常,sysfs 文件只包含一个数字或字符串,与通过读取 `/proc/meminfo` 等文件生成的信息表格形成鲜明对比。
+
+sysfs 的目的是将内核称为“kobjects”的可读写属性公开给用户空间。kobjects 的唯一目的是引用计数:当删除对 kobject 的最后一个引用时,系统将回收与之关联的资源。然而,`/sys` 构成了内核著名的“[到用户空间的稳定 ABI][19]”,它的大部分内容[在任何情况下都没有人会“破坏”][20]。这并不意味着 sysfs 中的文件是静态,这与易失性对象的引用计数相反。
+
+内核的稳定 ABI 反而限制了 `/sys` 中可能出现的内容,而不是任何给定时刻实际存在的内容。列出 sysfs 中文件的权限可以了解如何设置或读取设备、模块、文件系统等的可配置、可调参数。Logic 强调 procfs 也是内核稳定 ABI 的一部分的结论,尽管内核的[文档][19]没有明确说明。
+
+![Console][21]
+
+*sysfs 中的文件恰好描述了实体的每个属性,并且可以是可读的、可写的或两者兼而有之。文件中的“0”表示 SSD 不可移动的存储设备。*
+
+### 用 eBPF 和 bcc 工具一窥 VFS 内部
+
+了解内核如何管理 sysfs 文件的最简单方法是观察它的运行情况,在 ARM64 或 x86_64 上观看的最简单方法是使用 eBPF。eBPF(扩展的伯克利数据包过滤器)由[在内核中运行的虚拟机][22]组成,特权用户可以从命令行进行查询。内核源代码告诉读者内核可以做什么;在一个启动的系统上运行 eBPF 工具会显示内核实际上做了什么。
+
+令人高兴的是,通过 [bcc][23] 工具入门使用 eBPF 非常容易,这些工具在[主要 Linux 发行版的软件包][24] 中都有,并且已经由 Brendan Gregg [充分地给出了文档说明][25]。bcc 工具是带有小段嵌入式 C 语言片段的 Python 脚本,这意味着任何对这两种语言熟悉的人都可以轻松修改它们。当前统计,[bcc/tools 中有 80 个 Python 脚本][26],使系统管理员或开发人员很有可能能够找到与她/他的需求相关的现有脚本。
+
+要了解 VFS 在正在运行的系统上的工作情况,请尝试使用简单的 [vfscount][27] 或 [vfsstat][28],这表明每秒都会发生数十次对 `vfs_open()` 及其相关的调用
+
+
+![Console - vfsstat.py][29]
+
+*vfsstat.py 是一个带有嵌入式 C 片段的 Python 脚本,它只是计数 VFS 函数调用。*
+
+作为一个不太重要的例子,让我们看一下在运行的系统上插入 USB 记忆棒时 sysfs 中会发生什么。
+
+
+![Console when USB is inserted][30]
+
+*用 eBPF 观察插入 USB 记忆棒时 /sys 中会发生什么,简单的和复杂的例子。*
+
+在上面的第一个简单示例中,只要 `sysfs_create_files()` 命令运行,[trace.py][31] bcc 工具脚本就会打印出一条消息。我们看到 `sysfs_create_files()` 由一个 kworker 线程启动,以响应 USB 棒插入事件,但是它创建了什么文件?第二个例子说明了 eBPF 的强大能力。这里,`trace.py` 正在打印内核回溯(`-K` 选项)以及 `sysfs_create_files()` 创建的文件的名称。单引号内的代码段是一些 C 源代码,包括一个易于识别的格式字符串,提供的 Python 脚本[引入 LLVM 即时编译器(JIT)][32] 在内核虚拟机内编译和执行它。必须在第二个命令中重现完整的 `sysfs_create_files()` 函数签名,以便格式字符串可以引用其中一个参数。在此 C 片段中出错会导致可识别的 C 编译器错误。例如,如果省略 `-I` 参数,则结果为“无法编译 BPF 文本”。熟悉 C 或 Python 的开发人员会发现 bcc 工具易于扩展和修改。
+
+插入 USB 记忆棒后,内核回溯显示 PID 7711 是一个 kworker 线程,它在 sysfs 中创建了一个名为 `events` 的文件。使用 `sysfs_remove_files()` 进行相应的调用表明,删除 USB 记忆棒会导致删除该 `events` 文件,这与引用计数的想法保持一致。在 USB 棒插入期间(未显示)在 eBPF 中观察 `sysfs_create_link()` 表明创建了不少于 48 个符号链接。
+
+无论如何,`events` 文件的目的是什么?使用 [cscope][33] 查找函数 [`__device_add_disk()`][34] 显示它调用 `disk_add_events()`,并且可以将 “media_change” 或 “eject_request” 写入到该文件。这里,内核的块层通知用户空间 “磁盘” 的出现和消失。考虑一下这种调查 USB 棒插入工作原理的方法与试图仅从源头中找出该过程的速度有多快。
+
+### 只读根文件系统使得嵌入式设备成为可能
+
+确实,没有人通过拔出电源插头来关闭服务器或桌面系统。为什么?因为物理存储设备上挂载的文件系统可能有挂起的(未完成的)写入,并且记录其状态的数据结构可能与写入存储器的内容不同步。当发生这种情况时,系统所有者将不得不在下次启动时等待 [fsck 文件系统恢复工具][35] 运行完成,在最坏的情况下,实际上会丢失数据。
+
+然而,狂热爱好者会听说许多物联网和嵌入式设备,如路由器、恒温器和汽车现在都运行 Linux。许多这些设备几乎完全没有用户界面,并且没有办法干净地“解除启动”它们。想一想使用启动电池耗尽的汽车,其中[运行 Linux 的主机设备][36] 的电源会不断加电断电。当引擎最终开始运行时,系统如何在没有长时间 fsck 的情况下启动呢?答案是嵌入式设备依赖于[只读根文件系统][37](简称 ro-rootfs)。
+
+
+![Photograph of a console][38]
+
+*ro-rootfs 是嵌入式系统不经常需要 fsck 的原因。 来源:*
+
+ro-rootfs 提供了许多优点,虽然这些优点不如耐用性那么显然。一个是,如果没有 Linux 进程可以写入,那么恶意软件无法写入 `/usr` 或 `/lib`。另一个是,基本上不可变的文件系统对于远程设备的现场支持至关重要,因为支持人员拥有名义上与现场相同的本地系统。也许最重要(但也是最微妙)的优势是 ro-rootfs 迫使开发人员在项目的设计阶段就决定哪些系统对象是不可变的。处理 ro-rootfs 可能经常是不方便甚至是痛苦的,[编程语言中的常量变量][39]经常就是这样,但带来的好处很容易偿还额外的开销。
+
+对于嵌入式开发人员,创建只读根文件系统确实需要做一些额外的工作,而这正是 VFS 的用武之地。Linux 需要 `/var` 中的文件可写,此外,嵌入式系统运行的许多流行应用程序将尝试在 `$HOME` 中创建配置点文件。放在家目录中的配置文件的一种解决方案通常是预生成它们并将它们构建到 rootfs 中。对于 `/var`,一种方法是将其挂载在单独的可写分区上,而 `/` 本身以只读方式挂载。使用绑定或叠加挂载是另一种流行的替代方案。
+
+### 绑定和叠加挂载以及在容器中的使用
+
+运行 [man mount][40] 是了解绑定挂载和叠加挂载的最好办法,这使嵌入式开发人员和系统管理员能够在一个路径位置创建文件系统,然后在另外一个路径将其提供给应用程序。对于嵌入式系统,这代表着可以将文件存储在 `/var` 中的不可写闪存设备上,但是在启动时将 tmpfs 中的路径叠加挂载或绑定挂载到 `/var` 路径上,这样应用程序就可以在那里随意写它们的内容了。下次加电时,`/var` 中的变化将会消失。叠加挂载提供了 tmpfs 和底层文件系统之间的联合,允许对 ro-rootfs 中的现有文件进行直接修改,而绑定挂载可以使新的空 tmpfs 目录在 ro-rootfs 路径中显示为可写。虽然叠加文件系统是一种适当的文件系统类型,但绑定挂载由 [VFS 命名空间工具][41] 实现的。
+
+根据叠加挂载和绑定挂载的描述,没有人会对 [Linux容器][42] 大量使用它们感到惊讶。让我们通过运行 bcc 的 `mountsnoop` 工具监视当使用 [systemd-nspawn][43] 启动容器时会发生什么:
+
+![Console - system-nspawn invocation][44]
+
+*在 mountsnoop.py 运行的同时,system-nspawn 调用启动容器。*
+
+让我们看看发生了什么:
+
+![Console - Running mountsnoop][45]
+
+在容器 “启动” 期间运行 `mountsnoop` 可以看到容器运行时很大程度上依赖于绑定挂载。(仅显示冗长输出的开头)
+
+这里,`systemd-nspawn` 将主机的 procfs 和 sysfs 中的选定文件其 rootfs 中的路径提供给容器按。除了设置绑定挂载时的 `MS_BIND` 标志之外,`mount` 系统调用的一些其他标志用于确定主机命名空间和容器中的更改之间的关系。例如,绑定挂载可以将 `/proc` 和 `/sys` 中的更改传播到容器,也可以隐藏它们,具体取决于调用。
+
+### 总结
+
+理解 Linux 内部结构似乎是一项不可能完成的任务,因为除了 Linux 用户空间应用程序和 glibc 这样的 C 库中的系统调用接口,内核本身也包含大量代码。取得进展的一种方法是阅读一个内核子系统的源代码,重点是理解面向用户空间的系统调用和头文件以及主要的内核内部接口,这里以 `file_operations` 表为例的。`file_operations` 使得“一切都是文件”可以实际工作,因此掌握它们收获特别大。顶级 `fs/` 目录中的内核 C 源文件构成了虚拟文件系统的实现,虚拟文件系统是支持流行的文件系统和存储设备的广泛且相对简单的互操作性的垫片层。通过 Linux 命名空间进行绑定挂载和覆盖挂载是 VFS 魔术,它使容器和只读根文件系统成为可能。结合对源代码的研究,eBPF 内核工具及其 bcc 接口使得探测内核比以往任何时候都更简单。
+
+非常感谢 [Akkana Peck][46] 和 [Michael Eager][47] 的评论和指正。
+
+Alison Chaiken 也于 3 月 7 日至 10 日在加利福尼亚州帕萨迪纳举行的第 17 届南加州 Linux 博览会([SCaLE 17x][49])上演讲了[本主题][48]。
+
+--------------------------------------------------------------------------------
+
+via: https://opensource.com/article/19/3/virtual-filesystems-linux
+
+作者:[Alison Chariken][a]
+选题:[lujun9972][b]
+译者:[wxy](https://github.com/wxy)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]: https://opensource.com/users/chaiken
+[b]: https://github.com/lujun9972
+[1]: https://www.pearson.com/us/higher-education/program/Love-Linux-Kernel-Development-3rd-Edition/PGM202532.html
+[2]: http://cassandra.apache.org/
+[3]: https://en.wikipedia.org/wiki/NoSQL
+[4]: http://lwn.net/Articles/444910/
+[5]: https://opensource.com/sites/default/files/uploads/virtualfilesystems_1-console.png (Console)
+[6]: https://lwn.net/Articles/22355/
+[7]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/fs.h
+[8]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/fs
+[9]: https://opensource.com/sites/default/files/uploads/virtualfilesystems_2-shim-layer.png (How userspace accesses various types of filesystems)
+[10]: https://lwn.net/Articles/774114/
+[11]: https://opensource.com/sites/default/files/uploads/virtualfilesystems_3-crazy.jpg (Man with shocked expression)
+[12]: https://wiki.archlinux.org/index.php/Tmpfs
+[13]: http://man7.org/linux/man-pages/man8/sysctl.8.html
+[14]: https://opensource.com/sites/default/files/uploads/virtualfilesystems_4-proc-meminfo.png (Console)
+[15]: http://www-f1.ijs.si/~ramsak/km1/mermin.moon.pdf
+[16]: https://en.wikiquote.org/wiki/David_Mermin
+[17]: https://opensource.com/sites/default/files/uploads/virtualfilesystems_5-moon.jpg (Full moon)
+[18]: https://commons.wikimedia.org/wiki/Moon#/media/File:Full_Moon_Luc_Viatour.jpg
+[19]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/ABI/stable
+[20]: https://lkml.org/lkml/2012/12/23/75
+[21]: https://opensource.com/sites/default/files/uploads/virtualfilesystems_7-sysfs.png (Console)
+[22]: https://events.linuxfoundation.org/sites/events/files/slides/bpf_collabsummit_2015feb20.pdf
+[23]: https://github.com/iovisor/bcc
+[24]: https://github.com/iovisor/bcc/blob/master/INSTALL.md
+[25]: http://brendangregg.com/ebpf.html
+[26]: https://github.com/iovisor/bcc/tree/master/tools
+[27]: https://github.com/iovisor/bcc/blob/master/tools/vfscount_example.txt
+[28]: https://github.com/iovisor/bcc/blob/master/tools/vfsstat.py
+[29]: https://opensource.com/sites/default/files/uploads/virtualfilesystems_8-vfsstat.png (Console - vfsstat.py)
+[30]: https://opensource.com/sites/default/files/uploads/virtualfilesystems_9-ebpf.png (Console when USB is inserted)
+[31]: https://github.com/iovisor/bcc/blob/master/tools/trace_example.txt
+[32]: https://events.static.linuxfound.org/sites/events/files/slides/bpf_collabsummit_2015feb20.pdf
+[33]: http://northstar-www.dartmouth.edu/doc/solaris-forte/manuals/c/user_guide/cscope.html
+[34]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/block/genhd.c#n665
+[35]: http://www.man7.org/linux/man-pages/man8/fsck.8.html
+[36]: https://wiki.automotivelinux.org/_media/eg-rhsa/agl_referencehardwarespec_v0.1.0_20171018.pdf
+[37]: https://elinux.org/images/1/1f/Read-only_rootfs.pdf
+[38]: https://opensource.com/sites/default/files/uploads/virtualfilesystems_10-code.jpg (Photograph of a console)
+[39]: https://www.meetup.com/ACCU-Bay-Area/events/drpmvfytlbqb/
+[40]: http://man7.org/linux/man-pages/man8/mount.8.html
+[41]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/filesystems/sharedsubtree.txt
+[42]: https://coreos.com/os/docs/latest/kernel-modules.html
+[43]: https://www.freedesktop.org/software/systemd/man/systemd-nspawn.html
+[44]: https://opensource.com/sites/default/files/uploads/virtualfilesystems_11-system-nspawn.png (Console - system-nspawn invocation)
+[45]: https://opensource.com/sites/default/files/uploads/virtualfilesystems_12-mountsnoop.png (Console - Running mountsnoop)
+[46]: http://shallowsky.com/
+[47]: http://eagercon.com/
+[48]: https://www.socallinuxexpo.org/scale/17x/presentations/virtual-filesystems-why-we-need-them-and-how-they-work
+[49]: https://www.socallinuxexpo.org/
diff --git a/translated/tech/20190311 Learn about computer security with the Raspberry Pi and Kali Linux.md b/translated/tech/20190311 Learn about computer security with the Raspberry Pi and Kali Linux.md
deleted file mode 100644
index 35089a3272..0000000000
--- a/translated/tech/20190311 Learn about computer security with the Raspberry Pi and Kali Linux.md
+++ /dev/null
@@ -1,62 +0,0 @@
-[#]: collector: (lujun9972)
-[#]: translator: (hopefully2333)
-[#]: reviewer: ( )
-[#]: publisher: ( )
-[#]: url: ( )
-[#]: subject: (Learn about computer security with the Raspberry Pi and Kali Linux)
-[#]: via: (https://opensource.com/article/19/3/computer-security-raspberry-pi)
-[#]: author: (Anderson Silva https://opensource.com/users/ansilva)
-
-通过树莓派和 kali Linux 学习计算机安全
-======
-树莓派是学习计算机安全的一个好方法。在我们入门系列的第 11 篇文章中会进行学习。
-
-
-是否有比保护你的计算机更热门的技术?一些专家会告诉你,没有绝对安全的系统。他们开玩笑说,如果你想要你的服务器或者应用程序真正的安全,就关掉你的服务器,从网络上断线,然后把它放在一个安全的地方。但问题是显而易见的:没人能用的应用程序或者服务器有什么用?
-
-这是围绕安全的一个难题,我们如何才能在保证安全性的同时,让服务器或应用程序依然可用且有价值?我无论如何都不是一个安全专家,虽然我希望有一天我能是。考虑到这一点,对于你能用树莓派做什么,分享和这有关的想法来学习计算机安全,我认为是有意义的。
-
-我会注意到,就像本系列中其他写给树莓派初学者的文章一样,我的目标不是深入研究,而是起个头,让你有兴趣去了解更多与这些主题相关的东西。
-
-### Kali Linux
-
-当我们谈到“做一些安全方面的事”的时候,出现在脑海中的一个 Linux 发行版就是 Kali Linux。kali Linux 的开发主要集中在调查取证和渗透测试方面。它有超过 600 个已经预先安装好了的渗透测试工具来测试你的计算机的安全性,以及取证模式,它可以防止自己接触到内部的硬盘驱动器或是被检查系统的交换空间。
-
-
-
-就像 Raspbian 一样,Kali Linux 基于 Debian 的发行版,你可以在 kali 的主文档门户网页上找到将它安装在树莓派上的文档(译者注:截至到翻译时,该网页是这个:https://docs.kali.org/kali-on-arm/install-kali-linux-arm-raspberry-pi)。如果你已经在你的树莓派上安装了 Raspbian 或者是其他的 Linux 发行版。那么你装 Kali 应该是没问题的,Kali 的创造者甚至将培训、研讨会和职业认证整合到了一起,以此来帮助提升你在安全领域内的职业生涯。
-
-### 其他的 Linux 发行版
-
-大多数的标准 Linux 发行版,比如 Raspbian,Ubuntu 和 Fedora 这些,在它们的仓库里同样也有很多可用的安全工具。一些很棒的探测工具包括 Nmap,Wireshark,auditctl,和 SELinux。
-
-### 项目
-
-你可以在树莓派上运行很多其他的安全相关的项目,例如蜜罐,广告拦截器和 USB 清洁器。花些时间了解它们!
-
---------------------------------------------------------------------------------
-
-via: https://opensource.com/article/19/3/computer-security-raspberry-pi
-
-作者:[Anderson Silva][a]
-选题:[lujun9972][b]
-译者:[hopefully2333](https://github.com/hopefully2333)
-校对:[校对者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.kali.org/
-[2]: https://en.wikipedia.org/wiki/Kali_Linux#Development
-[3]: https://docs.kali.org/general-use/kali-linux-forensics-mode
-[4]: https://docs.kali.org/kali-on-arm/install-kali-linux-arm-raspberry-pi
-[5]: https://www.kali.org/penetration-testing-with-kali-linux/
-[6]: https://linuxblog.darkduck.com/2019/02/9-best-linux-based-security-tools.html
-[7]: https://nmap.org/
-[8]: https://www.wireshark.org/
-[9]: https://linux.die.net/man/8/auditctl
-[10]: https://opensource.com/article/18/7/sysadmin-guide-selinux
-[11]: https://trustfoundry.net/honeypi-easy-honeypot-raspberry-pi/
-[12]: https://pi-hole.net/
-[13]: https://www.circl.lu/projects/CIRCLean/
diff --git a/translated/tech/20190314 14 days of celebrating the Raspberry Pi.md b/translated/tech/20190314 14 days of celebrating the Raspberry Pi.md
deleted file mode 100644
index 64836429b9..0000000000
--- a/translated/tech/20190314 14 days of celebrating the Raspberry Pi.md
+++ /dev/null
@@ -1,77 +0,0 @@
-[#]: collector: (lujun9972)
-[#]: translator: (geekpi)
-[#]: reviewer: ( )
-[#]: publisher: ( )
-[#]: url: ( )
-[#]: subject: (14 days of celebrating the Raspberry Pi)
-[#]: via: (https://opensource.com/article/19/3/happy-pi-day)
-[#]: author: (Anderson Silva (Red Hat) https://opensource.com/users/ansilva)
-
-庆祝 Raspberry Pi 的 14 天
-======
-
-在我们关于树莓派入门系列的第 14 篇也是最后一篇文章中,回顾一下我们学到的所有东西。
-
-![][1]
-
-**派节快乐!**
-
-每年的 3 月 14 日,我们这些极客都会庆祝派节。我们用这种方式缩写日期 MMDD,March 14 于是写成 03/14,它的数字上提醒我们 3.14,或者说 [π][2] 的前三位数字。许多美国人没有意识到的是,世界上几乎没有其他国家使用这种[日期格式][3],因此派节几乎只适用于美国,尽管它在全球范围内得到了庆祝。
-
-无论你身在何处,让我们一起庆祝树莓派,并通过回顾过去两周我们所涉及的主题来结束本系列:
-
- * 第 1 天:[你应该选择哪种树莓派?][4]
- * 第 2 天:[如何购买树莓派][5]
- * 第 3 天:[如何启动新的树莓派][6]
- * 第 4 天:[用树莓派学习 Linux][7]
- * 第 5 天:[5 种教孩子用树莓派编程的方法][8]
- * 第 6 天:[你可以用树莓派学习的 3 种流行编程语言][9]
- * 第 7 天:[如何更新树莓派][10]
- * 第 8 天:[如何使用树莓派娱乐][11]
- * 第 9 天:[在树莓派上玩游戏][12]
- * 第 10 天:[让我们实物化:如何在树莓派上使用 GPIO 引脚][13]
- * 第 11 天:[通过树莓派了解计算机安全][14]
- * 第 12 天:[在树莓派上使用 Mathematica 进行高级数学运算][15]
- * 第 13 天:[为树莓派社区做出贡献][16]
-
-
-
-![Pi Day illustration][18]
-
-我将结束本系列,感谢所有关注的人,尤其是那些在过去 14 天里从中学到了东西的人!我还想鼓励大家不断扩展他们对树莓派以及围绕它构建的所有开源(和闭源)技术的了解。
-
-我还鼓励你了解其他文化、哲学、宗教和世界观。让我们成为人类的是这种惊人的 (有时是有趣的) 能力,我们不仅要适应外部环境,而且要适应智力环境。
-
-不管你做什么,保持学习!
-
---------------------------------------------------------------------------------
-
-via: https://opensource.com/article/19/3/happy-pi-day
-
-作者:[Anderson Silva (Red Hat)][a]
-选题:[lujun9972][b]
-译者:[geekpi](https://github.com/geekpi)
-校对:[校对者ID](https://github.com/校对者ID)
-
-本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
-
-[a]:
-[b]: https://github.com/lujun9972
-[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/raspberry-pi-juggle.png?itok=oTgGGSRA
-[2]: https://www.piday.org/million/
-[3]: https://en.wikipedia.org/wiki/Date_format_by_country
-[4]: https://opensource.com/article/19/3/which-raspberry-pi-choose
-[5]: https://opensource.com/article/19/3/how-buy-raspberry-pi
-[6]: https://opensource.com/article/19/3/how-boot-new-raspberry-pi
-[7]: https://opensource.com/article/19/3/learn-linux-raspberry-pi
-[8]: https://opensource.com/article/19/3/teach-kids-program-raspberry-pi
-[9]: https://opensource.com/article/19/3/programming-languages-raspberry-pi
-[10]: https://opensource.com/article/19/3/how-raspberry-pi-update
-[11]: https://opensource.com/article/19/3/raspberry-pi-entertainment
-[12]: https://opensource.com/article/19/3/play-games-raspberry-pi
-[13]: https://opensource.com/article/19/3/gpio-pins-raspberry-pi
-[14]: https://opensource.com/article/19/3/learn-about-computer-security-raspberry-pi
-[15]: https://opensource.com/article/19/3/do-math-raspberry-pi
-[16]: https://opensource.com/article/19/3/contribute-raspberry-pi-community
-[17]: /file/426561
-[18]: https://opensource.com/sites/default/files/uploads/raspberrypi_14_piday.jpg (Pi Day illustration)
diff --git a/translated/tech/20190415 Kubernetes on Fedora IoT with k3s.md b/translated/tech/20190415 Kubernetes on Fedora IoT with k3s.md
new file mode 100644
index 0000000000..82729f24a3
--- /dev/null
+++ b/translated/tech/20190415 Kubernetes on Fedora IoT with k3s.md
@@ -0,0 +1,209 @@
+[#]: collector: (lujun9972)
+[#]: translator: (StdioA)
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (Kubernetes on Fedora IoT with k3s)
+[#]: via: (https://fedoramagazine.org/kubernetes-on-fedora-iot-with-k3s/)
+[#]: author: (Lennart Jern https://fedoramagazine.org/author/lennartj/)
+
+使用 k3s 在 Fedora IoT 上运行 Kubernetes
+======
+
+![][1]
+
+Fedora IoT 是一个即将发布的、面相物联网的 Fedora 版本。去年 Fedora Magazine 中的《如何使用 Fedora IOT 点亮 LED》一文,第一次介绍了它。从那以后,它与 Fedora Silverblue 一起不断改进,以提供针对面相容器的工作流程的不可变基础操作系统。
+
+Kubernetes 是一个颇受欢迎的容器编排系统。它可能最常用在那些能够处理巨大负载的强劲硬件上。不过,它也能在像树莓派 3 这样轻量级的设备上运行。我们继续阅读,来了解如何运行它。
+
+### 为什么用 Kubernetes?
+
+虽然 Kubernetes 在云计算领域风靡一时,但让它在小型单板机上运行可能并不是显而易见的。不过,我们有非常明确的理由来做这件事。首先,这是一个不需要昂贵硬件就可以学习并熟悉 Kubernetes 的好方法;其次,由于它的流行性,市面上有[大量应用][2]进行了预先打包,以用于在 Kubernetes 集群中运行。更不用说,当你遇到问题时,会有大规模的社区用户为你提供帮助。
+
+最后但同样重要的是,即使是在家庭实验室这样的小规模环境中,容器编排也确实能事情变得更加简单。虽然在学习曲线方面,这一点并不明显,但这些技能在你将来与任何集群打交道的时候都会有帮助。不管你面对的是一个单节点树莓派集群,还是一个大规模的机器学习场,它们的操作方式都是类似的。
+
+#### K3s - 轻量级的 Kubernetes
+
+一个 Kubernetes 的“正常”安装(如果有这么一说的话)对于物联网来说有点沉重。K8s 的推荐内存配置,是每台机器 2GB!不过,我们也有一些替代品,其中一个新人是 [k3s][4]——一个轻量级的 Kubernetes 发行版。
+
+K3s 非常特殊,因为它将 etcd 替换成了 SQLite 以满足键值存储需求。还有一点,在于整个 k3s 将使用一个二进制文件分发,而不是每个组件一个。这减少了内存占用并简化了安装过程。基于上述原因,我们只需要 512MB 内存即可运行 k3s,简直适合小型单板电脑!
+
+### 你需要的东西
+
+1. 在虚拟机或实体设备中运行的 Fedora IoT。在[这里][5]可以看到优秀的入门指南。一台机器就足够了,不过两台可以用来测试向集群添加更多节点。
+2. [配置防火墙][6],允许 6443 和 8372 端口的通信。或者,你也可以简单地运行“systemctl stop firewalld”来为这次实验关闭防火墙。
+
+### 安装 k3s
+
+安装 k3s 非常简单。直接运行安装脚本:
+
+```
+curl -sfL https://get.k3s.io | sh -
+```
+
+它会下载、安装并启动 k3s。安装完成后,运行以下命令来从服务器获取节点列表:
+
+```
+kubectl get nodes
+```
+
+需要注意的是,有几个选项可以通过环境变量传递给安装脚本。这些选项可以在[文档][7]中找到。当然,你也完全可以直接下载二进制文件来手动安装 k3s。
+
+对于实验和学习来说,这样已经很棒了,不过单节点的集群也不是一个集群。幸运的是,添加另一个节点并不比设置第一个节点要难。只需要向安装脚本传递两个环境变量,它就可以找到第一个节点,避免运行 k3s 的服务器部分。
+
+```
+curl -sfL https://get.k3s.io | K3S_URL=https://example-url:6443 \
+ K3S_TOKEN=XXX sh -
+```
+
+上面的 example-url 应被替换为第一个节点的 IP 地址,或一个经过完全限定的域名。在该节点中,(用 XXX 表示的)令牌可以在 /var/lib/rancher/k3s/server/node-token 文件中找到。
+
+### 部署一些容器
+
+现在我们有了一个 Kubernetes 集群,我们可以真正做些什么呢?让我们从部署一个简单的 Web 服务器开始吧。
+
+```
+kubectl create deployment my-server --image nginx
+```
+
+这会从名为“nginx”的容器镜像中创建出一个名叫“my-server”的 [Deployment][8](镜像名默认使用 docker hub 注册中心,以及 latest 标签)。
+
+```
+kubectl get pods
+```
+
+为了接触到 pod 中运行的 nginx 服务器,首先将 Deployment 通过一个 [Service][9] 来进行暴露。以下命令将创建一个与 Deployment 同名的 Service。
+
+```
+kubectl expose deployment my-server --port 80
+```
+
+Service 将作为一种负载均衡器和 Pod 的 DNS 记录来工作。比如,当运行第二个 Pod 时,我们只需指定 _my-server_(Service 名称)就可以通过 _curl_ 访问 nginx 服务器。有关如何操作,可以看下面的实例。
+
+```
+# 启动一个 pod,在里面以交互方式运行 bash
+kubectl run debug --generator=run-pod/v1 --image=fedora -it -- bash
+# 等待 bash 提示符出现
+curl my-server
+# 你可以看到“Welcome to nginx!”的输出页面
+```
+
+### Ingress 控制器及外部 IP
+
+默认状态下,一个 Service 只能获得一个 ClusterIP(只能从集群内部访问),但你也可以通过把它的类型设置为 [LoadBalancer][10] 为服务申请一个外部 IP。不过,并非所有应用都需要自己的 IP 地址。相反,通常可以通过基于 Host 请求头部或请求路径进行路由,从而使多个服务共享一个 IP 地址。你可以在 Kubernetes 使用 [Ingress][11] 完成此操作,而这也是我们要做的。Ingress 也提供了额外的功能,比如无需配置应用,即可对流量进行 TLS 加密。
+
+Kubernetes 需要入口控制器来使 Ingress 资源工作,k3s 包含 [Traefik][12] 正是出于此目的。它还包含了一个简单的服务负载均衡器,可以为集群中的服务提供外部 IP。这篇[文档][13]描述了这种服务:
+
+> k3s 包含一个使用可用主机端口的基础服务负载均衡器。比如,如果你尝试创建一个监听 80 端口的负载均衡器,它会尝试在集群中寻找一个 80 端口空闲的节点。如果没有可用端口,那么负载均衡器将保持在 Pending 状态。
+>
+> k3s README
+
+入口控制器已经通过这个负载均衡器暴露在外。你可以使用以下命令找到它正在使用的 IP 地址。
+
+```
+$ kubectl get svc --all-namespaces
+NAMESPACE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
+ default kubernetes ClusterIP 10.43.0.1 443/TCP 33d
+ default my-server ClusterIP 10.43.174.38 80/TCP 30m
+ kube-system kube-dns ClusterIP 10.43.0.10 53/UDP,53/TCP,9153/TCP 33d
+ kube-system traefik LoadBalancer 10.43.145.104 10.0.0.8 80:31596/TCP,443:31539/TCP 33d
+```
+
+找到名为 traefik 的 Service。在上面的例子中,我们感兴趣的 IP 是 10.0.0.8。
+
+### 路由传入的请求
+
+让我们创建一个 Ingress,使它通过基于 Host 头部的路由规则将请求路由至我们的服务器。这个例子中我们使用 [xip.io][14] 来避免必要的 DNS 记录配置工作。它的工作原理是将 IP 地址作为子域包含,以使用10.0.0.8.xip.io的任何子域来达到IP 10.0.0.8。换句话说,my-server.10.0.0.8.xip.io 被用于访问集群中的入口控制器。你现在就可以尝试(使用你自己的 IP,而不是 10.0.0.8)。如果没有入口,你应该会访问到“默认后端”,只是一个写着“404 page not found”的页面。
+
+我们可以使用以下 Ingress 让入口控制器将请求路由到我们的 Web 服务器 Service。
+
+```
+apiVersion: extensions/v1beta1
+kind: Ingress
+metadata:
+ name: my-server
+spec:
+ rules:
+ - host: my-server.10.0.0.8.xip.io
+ http:
+ paths:
+ - path: /
+ backend:
+ serviceName: my-server
+ servicePort: 80
+```
+
+将以上片段保存到 _my-ingress.yaml_ 文件中,然后运行以下命令将其加入集群:
+
+```
+kubectl apply -f my-ingress.yaml
+```
+
+你现在应该能够在你选择的完全限定域名中访问到 nginx 的默认欢迎页面了。在我的例子中,它是 my-server.10.0.0.8.xip.io。入口控制器会通过 Ingress 中包含的信息来路由请求。对 my-server.10.0.0.8.xip.io 的请求将被路由到 Ingress 中定义为“后端”的 Service 和端口(在本例中为 my-server 和 80)。
+
+### 那么,物联网呢?
+
+想象如下场景:你的家伙农场周围有很多的设备。它是一个具有各种硬件功能,传感器和执行器的物联网设备的异构集合。也许某些设备拥有摄像头,天气或光线传感器。其它设备可能会被连接起来,用来控制通风、灯光、百叶窗或闪烁的LED。
+
+这种情况下,你想从所有传感器中收集数据,在最终使用它来制定决策和控制执行器之前,也可能会对其进行处理和分析。除此之外,你可能还想配置一个仪表盘来可视化那些正在发生的事情。那么 Kubernetes 如何帮助我们来管理这样的事情呢?我们怎么保证 Pod 在合适的设备上运行?
+
+简单的答案就是“标签”。你可以根据功能来标记节点,如下所示:
+
+```
+kubectl label nodes =
+# 举例
+kubectl label nodes node2 camera=available
+```
+
+一旦它们被打上标签,我们就可以轻松地使用 [nodeSelector][15] 为你的工作负载选择合适的节点。拼图的最后一块:如果你想在_所有_合适的节点上运行 Pod,那应该使用 [DaemonSet][16] 而不是 Deployment。换句话说,应为每个使用唯一传感器的数据收集应用程序创建一个 DaemonSet,并使用 nodeSelectors 确保它们仅在具有适当硬件的节点上运行。
+
+服务发现功能允许 Pod 通过 Service 名称来寻找彼此,这项功能使得这类分布式系统的管理工作变得易如反掌。你不需要为应用配置 IP 地址或自定义端口,也不需要知道它们。相反,它们可以通过集群中的具名 Service 轻松找到彼此。
+
+#### 充分利用空闲资源
+
+随着集群的启动并运行,收集数据并控制灯光和气候可能使你觉得你已经把它完成了。不过,集群中还有大量的计算资源可以用于其它项目。这才是 Kubernetes 真正出彩的地方。
+
+你不必担心这些资源的确切位置,或者去计算是否有足够的内存来容纳额外的应用程序。这正是编排系统所解决的问题!你可以轻松地在集群中部署更多的应用,让 Kubernetes 来找出适合运行它们的位置(或是否适合运行它们)。
+
+为什么不运行一个你自己的 [NextCloud][17] 实例呢?或者运行 [gitea][18]?你还可以为你所有的物联网容器设置一套 CI/CD 流水线。毕竟,如果你可以在集群中进行本地构建,为什么还要在主计算机上构建并交叉编译它们呢?
+
+这里的要点是,Kubernetes 可以更容易地利用那些你可能浪费掉的“隐藏”资源。Kubernetes 根据可用资源和容错处理规则来调度 Pod,因此你也无需手动完成这些工作。但是,为了帮助 Kubernetes 做出合理的决定,你绝对应该为你的工作负载添加[资源请求][19]配置。
+
+### 总结
+
+尽管 Kuberenetes 或一般的容器编排平台通常不会与物联网相关联,但在管理分布式系统时,使用一个编排系统肯定是有意义的。你不仅可以使用统一的方式来处理多样化和异构的设备,还可以简化它们的通信方式。此外,Kubernetes 还可以更好地对闲置资源加以利用。
+
+容器技术使构建“随处运行”应用的想法成为可能。现在,Kubernetes 可以更轻松地来负责“随处”的部分。作为构建一切的不可变基础,我们使用 Fedora IoT。
+
+--------------------------------------------------------------------------------
+
+via: https://fedoramagazine.org/kubernetes-on-fedora-iot-with-k3s/
+
+作者:[Lennart Jern][a]
+选题:[lujun9972][b]
+译者:[StdioA](https://github.com/StdioA)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]: https://fedoramagazine.org/author/lennartj/
+[b]: https://github.com/lujun9972
+[1]: https://fedoramagazine.org/wp-content/uploads/2019/04/k3s-1-816x345.png
+[2]: https://fedoramagazine.org/turnon-led-fedora-iot/
+[3]: https://hub.helm.sh/
+[4]: https://k3s.io
+[5]: https://docs.fedoraproject.org/en-US/iot/getting-started/
+[6]: https://github.com/rancher/k3s#open-ports--network-security
+[7]: https://github.com/rancher/k3s#systemd
+[8]: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/
+[9]: https://kubernetes.io/docs/concepts/services-networking/service/
+[10]: https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer
+[11]: https://kubernetes.io/docs/concepts/services-networking/ingress/
+[12]: https://traefik.io/
+[13]: https://github.com/rancher/k3s/blob/master/README.md#service-load-balancer
+[14]: http://xip.io/
+[15]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
+[16]: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
+[17]: https://nextcloud.com/
+[18]: https://gitea.io/en-us/
+[19]: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
diff --git a/translated/tech/20190416 Detecting malaria with deep learning.md b/translated/tech/20190416 Detecting malaria with deep learning.md
new file mode 100644
index 0000000000..2089636e6a
--- /dev/null
+++ b/translated/tech/20190416 Detecting malaria with deep learning.md
@@ -0,0 +1,791 @@
+[#]: collector: (lujun9972)
+[#]: translator: (warmfrog)
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (Detecting malaria with deep learning)
+[#]: via: (https://opensource.com/article/19/4/detecting-malaria-deep-learning)
+[#]: author: (Dipanjan Sarkar https://opensource.com/users/djsarkar)
+
+使用深度学习检测疟疾
+==================
+人工智能结合开源硬件工具能够提升严重传染病疟疾的诊断。
+![][1]
+
+人工智能(AI)和开源工具,技术,和框架是促进社会进步的强有力的结合。_“健康就是财富”_可能有点陈词滥调,但它却是非常准确的!在本篇文章,我们将测试 AI 是如何与低花费,有效,精确的开源深度学习方法一起被利用来检测致死的传染病疟疾。
+
+我既不是一个医生,也不是一个医疗保健研究者,我也绝不像他们那样合格,我只是对将 AI 应用到医疗保健研究感兴趣。在这片文章中我的想法是展示 AI 和开源解决方案如何帮助疟疾检测和减少人工劳动的方法。
+
+![Python and TensorFlow][2]
+
+Python and TensorFlow: 一个构建开源深度学习方法的很棒的结合
+
+感谢 Python 的强大 和像 TensorFlow 这样的深度学习框架,我们能够构建鲁棒的,大规模的,有效的深度学习方法。因为这些工具是自由和开源的,我们能够构建低成本的能够轻易被任何人采纳和使用的解决方案。让我们开始吧!
+
+### 项目动机
+
+疟疾是由_疟原虫_造成的致死的,有传染性的,蚊子传播的疾病,主要通过受感染的雌性按蚊叮咬传播。共有五种寄生虫能够造成疟疾,但是样例中的大多数是这两种类型- _恶性疟原虫_ 和 _间日疟原虫_ 造成的。
+
+![疟疾热图][3]
+
+这个地图显示了疟疾在全球传播分布形势,尤其在热带地区,但疾病的性质和致命性是该项目的主要动机。
+
+如果一个雌性蚊子咬了你,蚊子携带的寄生虫进入你的血液并且开始破坏携带氧气的红细胞(RBC)。通常,疟疾的最初症状类似于流感病毒,在蚊子叮咬后,他们通常在几天或几周内发作。然而,这些致死的寄生虫可以在你的身体里生存长达一年并且不会造成任何症状,延迟治疗可能造成并发症甚至死亡。因此,早期的检查能够挽救生命。
+
+世界健康组织(WHO)的[疟疾事件][4]暗示世界近乎一半的人口面临疟疾的风险,有超过 2 亿 的疟疾病例,每年由于疟疾造成的死亡近乎 40 万。这是使疟疾检测和诊断快速,简单和有效的一个动机。
+
+### 检测疟疾的方法
+
+有几种方法能够用来检测和诊断疟疾。该文中的项目就是基于 Rajaraman,et al. 的论文:“[预先训练的卷积神经网络作为特征提取器,用于改善薄血涂片图像中的疟疾寄生虫检测][5]”,介绍了一些方法,包含聚合酶链反应(PCR)和快速诊断测试(RDT)。这两种测试通常在高质量的显微镜下使用,但这样的设备不是轻易能够获得的。
+
+标准的疟疾诊断通常使基于血液涂片工作流的,根据 Carlos Ariza 的文章“[Malaria Hero: 一个更快诊断疟原虫的网络应用][6]”,我从中了解到 Adrian Rosebrock 的“[使用 Keras 的深度学习和医学图像分析][7]”。我感激这些优秀的资源的作者,让我在疟原虫预防,诊断和治疗方面有了更多的想法。
+
+![疟原虫检测的血涂片工作流程][8]
+
+一个疟原虫检测的血涂片工作流程
+
+根据 WHO 草案,诊断通常包括对放大 100 倍的血涂片的集中检测。训练人们人工计数在 5000 个细胞中有多少红细胞中包含疟原虫。正如上述解释中引用的 Rajaraman, et al. 的论文:
+
+> 薄血涂片帮助检测疟原虫的存在性并且帮助识别造成传染(疾病控制和抑制中心,2012)的物种。诊断准确性在很大程度上取决于人类的专业知识,并且可能受到观察者间差异和疾病流行/资源受限区域大规模诊断所造成的不利影响(Mitiku, Mengistu, and Gelaw, 2003)。可替代的技术是使用聚合酶链反应(PCR)和快速诊断测试(RDT);然而,PCR 分析受限于它的性能(Hommelsheim, et al., 2014),RDT 在疾病流行的地区成本效益低(Hawkes,Katsuva, and Masumbuko, 2009)。
+
+因此,疟疾检测可能受益于使用机器学习的自动化。
+
+### 疟原虫检测的深度学习
+
+人工诊断血涂片是一个加强的人工过程,需要专业知识来分类和计数被寄生虫感染的和未感染的细胞。这个过程可能不能很好的规模化,尤其在那些专业人士不足的地区。在利用最先进的图像处理和分析技术提取人工选取特征和构建基于机器学习的分类模型方面取得了一些进展。然而,这些模型不能大规模推广,因为没有更多的数据用来训练,并且人工选取特征需要花费很长时间。
+
+深度学习模型,或者更具体地讲,卷积神经网络(CNNs),已经被证明在各种计算机视觉任务中非常有效。(如果你想有额外的关于 CNNs 的背景知识,我推荐你阅读[视觉识别的 CS2331n 卷积神经网络][9]。)简单地讲,CNN 模型的关键层包含卷积和池化层,正如下面图像显示。
+
+![A typical CNN architecture][10]
+
+一个典型的 CNN 架构
+
+卷积层从数据中学习空间层级模式,它是平移不变的,因此它们能够学习不同方面的图像。例如,第一个卷积层将学习小的和本地图案,例如边缘和角落,第二个卷积层学习基于第一层的特征的更大的图案,等等。这允许 CNNs 自动化提取特征并且学习对于新数据点通用的有效的特征。池化层帮助下采样和降维。
+
+因此,CNNs 帮助自动化和规模化的特征工程。同样,在模型末尾加上密集层允许我们执行像图像分类这样的任务。使用像 CNNs 者的深度学习模型自动的疟疾检测可能非常有效,便宜和具有规模性,尤其是迁移学习和预训练模型效果非常好,甚至在少量数据的约束下。
+
+Rajaraman, et al. 的论文在一个数据集上利用六个预训练模型在检测疟疾 vs 无感染样本获取到令人吃惊的 95.9% 的准确率。我们的关注点是从头开始尝试一些简单的 CNN 模型和用一个预训练的训练模型使用迁移学习来查看我们能够从相同的数据集中得到什么。我们将使用开源工具和框架,包括 Python 和 TensorFlow,来构建我们的模型。
+
+### 数据集
+
+我们分析的数据来自 Lister Hill 国家生物医学交流中心(LHNCBC),国家医学图书馆(NLM)的一部分,他们细心收集和标记了健康和受感染的血涂片图像的[公众可获得的数据集][11]。这些研究者已经开发了一个运行在 Android 智能手机的移动[疟疾检测应用][12],连接到一个传统的光学显微镜。它们使用 吉姆萨染液 将 150 个受恶性疟原虫感染的和 50 个健康病人的薄血涂片染色,这些薄血涂片是在孟加拉的吉大港医学院附属医院收集和照相的。使用智能手机的内置相机获取每个显微镜视窗内的图像。这些图片由在泰国曼谷的马希多-牛津热带医学研究所的一个专家使用幻灯片阅读器标记的。
+
+让我们简洁的查看数据集的结构。首先,我将安装一些基础的依赖(基于使用的操作系统)。
+
+![Installing dependencies][13]
+
+我使用的是云上的带有一个 GPU 的基于 Debian 的操作系统,这样我能更快的运行我的模型。为了查看目录结构,我们必须安装 tree 依赖(如果我们没有安装的话)使用 **sudo apt install tree**。
+
+![Installing the tree dependency][14]
+
+我们有两个文件夹包含血细胞的图像,包括受感染的和健康的。我们可以获取关于图像总数更多的细节通过输入:
+
+
+```
+import os
+import glob
+
+base_dir = os.path.join('./cell_images')
+infected_dir = os.path.join(base_dir,'Parasitized')
+healthy_dir = os.path.join(base_dir,'Uninfected')
+
+infected_files = glob.glob(infected_dir+'/*.png')
+healthy_files = glob.glob(healthy_dir+'/*.png')
+len(infected_files), len(healthy_files)
+
+# Output
+(13779, 13779)
+```
+
+看起来我们有一个平衡的 13,779 张疟疾的 和 13,779 张非疟疾的(健康的)血细胞图像。让我们根据这些构建数据帧,我们将用这些数据帧来构建我们的数据集。
+
+
+```
+import numpy as np
+import pandas as pd
+
+np.random.seed(42)
+
+files_df = pd.DataFrame({
+'filename': infected_files + healthy_files,
+'label': ['malaria'] * len(infected_files) + ['healthy'] * len(healthy_files)
+}).sample(frac=1, random_state=42).reset_index(drop=True)
+
+files_df.head()
+```
+
+![Datasets][15]
+
+### 构建和参所图像数据集
+
+为了构建深度学习模型,我们需要训练数据,但是我们还需要使用不可见的数据测试模型的性能。相应的,我们将使用 60:10:30 的划分用于训练,验证和测试数据集。我们将在训练期间应用训练和验证数据集并用测试数据集来检查模型的性能。
+
+
+```
+from sklearn.model_selection import train_test_split
+from collections import Counter
+
+train_files, test_files, train_labels, test_labels = train_test_split(files_df['filename'].values,
+files_df['label'].values,
+test_size=0.3, random_state=42)
+train_files, val_files, train_labels, val_labels = train_test_split(train_files,
+train_labels,
+test_size=0.1, random_state=42)
+
+print(train_files.shape, val_files.shape, test_files.shape)
+print('Train:', Counter(train_labels), '\nVal:', Counter(val_labels), '\nTest:', Counter(test_labels))
+
+# Output
+(17361,) (1929,) (8268,)
+Train: Counter({'healthy': 8734, 'malaria': 8627})
+Val: Counter({'healthy': 970, 'malaria': 959})
+Test: Counter({'malaria': 4193, 'healthy': 4075})
+```
+
+这些图片维度并不相同,因此血涂片和细胞图像是基于人类,测试方法,图片的朝向。让我们总结我们的训练数据集的统计信息来决定最佳的图像维度(牢记,我们根本不会碰测试数据集)。
+
+
+```
+import cv2
+from concurrent import futures
+import threading
+
+def get_img_shape_parallel(idx, img, total_imgs):
+if idx % 5000 == 0 or idx == (total_imgs - 1):
+print('{}: working on img num: {}'.format(threading.current_thread().name,
+idx))
+return cv2.imread(img).shape
+
+ex = futures.ThreadPoolExecutor(max_workers=None)
+data_inp = [(idx, img, len(train_files)) for idx, img in enumerate(train_files)]
+print('Starting Img shape computation:')
+train_img_dims_map = ex.map(get_img_shape_parallel,
+[record[0] for record in data_inp],
+[record[1] for record in data_inp],
+[record[2] for record in data_inp])
+train_img_dims = list(train_img_dims_map)
+print('Min Dimensions:', np.min(train_img_dims, axis=0))
+print('Avg Dimensions:', np.mean(train_img_dims, axis=0))
+print('Median Dimensions:', np.median(train_img_dims, axis=0))
+print('Max Dimensions:', np.max(train_img_dims, axis=0))
+
+# Output
+Starting Img shape computation:
+ThreadPoolExecutor-0_0: working on img num: 0
+ThreadPoolExecutor-0_17: working on img num: 5000
+ThreadPoolExecutor-0_15: working on img num: 10000
+ThreadPoolExecutor-0_1: working on img num: 15000
+ThreadPoolExecutor-0_7: working on img num: 17360
+Min Dimensions: [46 46 3]
+Avg Dimensions: [132.77311215 132.45757733 3.]
+Median Dimensions: [130. 130. 3.]
+Max Dimensions: [385 394 3]
+```
+
+我们应用并行处理来加速图像读取,并且在总结统计时,我们将重新调整每幅图片到 125x125 像素。让我们载入我们所有的图像并重新调整它们为这些固定的大小。
+
+
+```
+IMG_DIMS = (125, 125)
+
+def get_img_data_parallel(idx, img, total_imgs):
+if idx % 5000 == 0 or idx == (total_imgs - 1):
+print('{}: working on img num: {}'.format(threading.current_thread().name,
+idx))
+img = cv2.imread(img)
+img = cv2.resize(img, dsize=IMG_DIMS,
+interpolation=cv2.INTER_CUBIC)
+img = np.array(img, dtype=np.float32)
+return img
+
+ex = futures.ThreadPoolExecutor(max_workers=None)
+train_data_inp = [(idx, img, len(train_files)) for idx, img in enumerate(train_files)]
+val_data_inp = [(idx, img, len(val_files)) for idx, img in enumerate(val_files)]
+test_data_inp = [(idx, img, len(test_files)) for idx, img in enumerate(test_files)]
+
+print('Loading Train Images:')
+train_data_map = ex.map(get_img_data_parallel,
+[record[0] for record in train_data_inp],
+[record[1] for record in train_data_inp],
+[record[2] for record in train_data_inp])
+train_data = np.array(list(train_data_map))
+
+print('\nLoading Validation Images:')
+val_data_map = ex.map(get_img_data_parallel,
+[record[0] for record in val_data_inp],
+[record[1] for record in val_data_inp],
+[record[2] for record in val_data_inp])
+val_data = np.array(list(val_data_map))
+
+print('\nLoading Test Images:')
+test_data_map = ex.map(get_img_data_parallel,
+[record[0] for record in test_data_inp],
+[record[1] for record in test_data_inp],
+[record[2] for record in test_data_inp])
+test_data = np.array(list(test_data_map))
+
+train_data.shape, val_data.shape, test_data.shape
+
+# Output
+Loading Train Images:
+ThreadPoolExecutor-1_0: working on img num: 0
+ThreadPoolExecutor-1_12: working on img num: 5000
+ThreadPoolExecutor-1_6: working on img num: 10000
+ThreadPoolExecutor-1_10: working on img num: 15000
+ThreadPoolExecutor-1_3: working on img num: 17360
+
+Loading Validation Images:
+ThreadPoolExecutor-1_13: working on img num: 0
+ThreadPoolExecutor-1_18: working on img num: 1928
+
+Loading Test Images:
+ThreadPoolExecutor-1_5: working on img num: 0
+ThreadPoolExecutor-1_19: working on img num: 5000
+ThreadPoolExecutor-1_8: working on img num: 8267
+((17361, 125, 125, 3), (1929, 125, 125, 3), (8268, 125, 125, 3))
+```
+
+我们再次应用并行处理来加速有关图像载入和重新调整大小。最终,我们获得了想要的维度的图片张量,正如之前描述的。我们现在查看一些血细胞图像样本来对我们的数据什么样有个印象。
+
+
+```
+import matplotlib.pyplot as plt
+%matplotlib inline
+
+plt.figure(1 , figsize = (8 , 8))
+n = 0
+for i in range(16):
+n += 1
+r = np.random.randint(0 , train_data.shape[0] , 1)
+plt.subplot(4 , 4 , n)
+plt.subplots_adjust(hspace = 0.5 , wspace = 0.5)
+plt.imshow(train_data[r[0]]/255.)
+plt.title('{}'.format(train_labels[r[0]]))
+plt.xticks([]) , plt.yticks([])
+```
+
+![Malaria cell samples][16]
+
+基于这些样本图像,我们看到一些疟疾和健康细胞图像的细微不同。我们将使我们的深度学习模型试图在模型训练中学习这些模式。
+
+开始我们的模型训练前,我们必须建立一些基础的配置设置。
+
+
+```
+BATCH_SIZE = 64
+NUM_CLASSES = 2
+EPOCHS = 25
+INPUT_SHAPE = (125, 125, 3)
+
+train_imgs_scaled = train_data / 255.
+val_imgs_scaled = val_data / 255.
+
+# encode text category labels
+from sklearn.preprocessing import LabelEncoder
+
+le = LabelEncoder()
+le.fit(train_labels)
+train_labels_enc = le.transform(train_labels)
+val_labels_enc = le.transform(val_labels)
+
+print(train_labels[:6], train_labels_enc[:6])
+
+# Output
+['malaria' 'malaria' 'malaria' 'healthy' 'healthy' 'malaria'] [1 1 1 0 0 1]
+```
+
+我们修复我们的图像维度,批大小,和历元并编码我们的分类类标签。TensorFlow 2.0 于 2019 年三月发布,这个练习是非常好的借口来试用它。
+
+
+```
+import tensorflow as tf
+
+# Load the TensorBoard notebook extension (optional)
+%load_ext tensorboard.notebook
+
+tf.random.set_seed(42)
+tf.__version__
+
+# Output
+'2.0.0-alpha0'
+```
+
+### 深度学习训练
+
+在模型训练阶段,我们将构建三个深度训练模型,使用我们的训练集训练,使用验证数据比较它们的性能。我们然后保存这些模型并在之后的模型评估阶段使用它们。
+
+#### 模型 1:从头开始的 CNN
+
+我们的第一个疟疾检测模型将从头开始构建和训练一个基础的 CNN。首先,让我们定义我们的模型架构,
+
+
+```
+inp = tf.keras.layers.Input(shape=INPUT_SHAPE)
+
+conv1 = tf.keras.layers.Conv2D(32, kernel_size=(3, 3),
+activation='relu', padding='same')(inp)
+pool1 = tf.keras.layers.MaxPooling2D(pool_size=(2, 2))(conv1)
+conv2 = tf.keras.layers.Conv2D(64, kernel_size=(3, 3),
+activation='relu', padding='same')(pool1)
+pool2 = tf.keras.layers.MaxPooling2D(pool_size=(2, 2))(conv2)
+conv3 = tf.keras.layers.Conv2D(128, kernel_size=(3, 3),
+activation='relu', padding='same')(pool2)
+pool3 = tf.keras.layers.MaxPooling2D(pool_size=(2, 2))(conv3)
+
+flat = tf.keras.layers.Flatten()(pool3)
+
+hidden1 = tf.keras.layers.Dense(512, activation='relu')(flat)
+drop1 = tf.keras.layers.Dropout(rate=0.3)(hidden1)
+hidden2 = tf.keras.layers.Dense(512, activation='relu')(drop1)
+drop2 = tf.keras.layers.Dropout(rate=0.3)(hidden2)
+
+out = tf.keras.layers.Dense(1, activation='sigmoid')(drop2)
+
+model = tf.keras.Model(inputs=inp, outputs=out)
+model.compile(optimizer='adam',
+loss='binary_crossentropy',
+metrics=['accuracy'])
+model.summary()
+
+# Output
+Model: "model"
+_________________________________________________________________
+Layer (type) Output Shape Param #
+=================================================================
+input_1 (InputLayer) [(None, 125, 125, 3)] 0
+_________________________________________________________________
+conv2d (Conv2D) (None, 125, 125, 32) 896
+_________________________________________________________________
+max_pooling2d (MaxPooling2D) (None, 62, 62, 32) 0
+_________________________________________________________________
+conv2d_1 (Conv2D) (None, 62, 62, 64) 18496
+_________________________________________________________________
+...
+...
+_________________________________________________________________
+dense_1 (Dense) (None, 512) 262656
+_________________________________________________________________
+dropout_1 (Dropout) (None, 512) 0
+_________________________________________________________________
+dense_2 (Dense) (None, 1) 513
+=================================================================
+Total params: 15,102,529
+Trainable params: 15,102,529
+Non-trainable params: 0
+_________________________________________________________________
+```
+
+基于这些代码的架构,我们的 CNN 模型有三个卷积和一个池化层,跟随两个致密层,以及用于正则化的丢失。让我们训练我们的模型。
+
+
+```
+import datetime
+
+logdir = os.path.join('/home/dipanzan_sarkar/projects/tensorboard_logs',
+datetime.datetime.now().strftime("%Y%m%d-%H%M%S"))
+tensorboard_callback = tf.keras.callbacks.TensorBoard(logdir, histogram_freq=1)
+reduce_lr = tf.keras.callbacks.ReduceLROnPlateau(monitor='val_loss', factor=0.5,
+patience=2, min_lr=0.000001)
+callbacks = [reduce_lr, tensorboard_callback]
+
+history = model.fit(x=train_imgs_scaled, y=train_labels_enc,
+batch_size=BATCH_SIZE,
+epochs=EPOCHS,
+validation_data=(val_imgs_scaled, val_labels_enc),
+callbacks=callbacks,
+verbose=1)
+
+
+# Output
+Train on 17361 samples, validate on 1929 samples
+Epoch 1/25
+17361/17361 [====] - 32s 2ms/sample - loss: 0.4373 - accuracy: 0.7814 - val_loss: 0.1834 - val_accuracy: 0.9393
+Epoch 2/25
+17361/17361 [====] - 30s 2ms/sample - loss: 0.1725 - accuracy: 0.9434 - val_loss: 0.1567 - val_accuracy: 0.9513
+...
+...
+Epoch 24/25
+17361/17361 [====] - 30s 2ms/sample - loss: 0.0036 - accuracy: 0.9993 - val_loss: 0.3693 - val_accuracy: 0.9565
+Epoch 25/25
+17361/17361 [====] - 30s 2ms/sample - loss: 0.0034 - accuracy: 0.9994 - val_loss: 0.3699 - val_accuracy: 0.9559
+```
+
+我们获得了 95.6% 的验证精确率,这很好,尽管我们的模型看起来有些过拟合(通过查看我们的训练精确度,是 99.9%)。通过绘制训练和验证的精度和损失曲线,我们可以清楚地看到这一点。
+
+
+```
+f, (ax1, ax2) = plt.subplots(1, 2, figsize=(12, 4))
+t = f.suptitle('Basic CNN Performance', fontsize=12)
+f.subplots_adjust(top=0.85, wspace=0.3)
+
+max_epoch = len(history.history['accuracy'])+1
+epoch_list = list(range(1,max_epoch))
+ax1.plot(epoch_list, history.history['accuracy'], label='Train Accuracy')
+ax1.plot(epoch_list, history.history['val_accuracy'], label='Validation Accuracy')
+ax1.set_xticks(np.arange(1, max_epoch, 5))
+ax1.set_ylabel('Accuracy Value')
+ax1.set_xlabel('Epoch')
+ax1.set_title('Accuracy')
+l1 = ax1.legend(loc="best")
+
+ax2.plot(epoch_list, history.history['loss'], label='Train Loss')
+ax2.plot(epoch_list, history.history['val_loss'], label='Validation Loss')
+ax2.set_xticks(np.arange(1, max_epoch, 5))
+ax2.set_ylabel('Loss Value')
+ax2.set_xlabel('Epoch')
+ax2.set_title('Loss')
+l2 = ax2.legend(loc="best")
+```
+
+![Learning curves for basic CNN][17]
+
+基础 CNN 学习曲线
+
+我们可以看在在第五个历元,情况并没有改善很多。让我们保存这个模型用于将来的评估。
+
+
+```
+`model.save('basic_cnn.h5')`
+```
+
+#### 深度迁移学习
+
+就像人类有与生俱来的能力在不同任务间传输知识,迁移学习允许我们利用从以前任务学到的知识用到新的任务,相关的任务,甚至在机器学习或深度学习的上下文中。如果想深入探究迁移学习,你应该看我的文章“[一个易于理解与现实应用一起学习深度学习中的迁移学习的指导实践][18]”和我的书[ Python 迁移学习实践][19]。
+
+![深度迁移学习的想法][20]
+
+在这篇实践中我们想要探索的想法是:
+
+> 在我们的问题上下文中,我们能够利用一个预训练深度学习模型(在大数据集上训练的,像 ImageNet)通过应用和迁移知识来解决疟疾检测的问题吗?
+
+我们将应用两个深度迁移学习的最流行的策略。
+
+ * 预训练模型作为特征提取器
+ * 微调的预训练模型
+
+
+
+我们将使用预训练的 VGG-19 深度训练模型,由剑桥大学的视觉几何组(VGG)开发,作为我们的实验。一个像 VGG-19 的预训练模型在一个大的数据集上使用了很多不同的图像分类训练([Imagenet][21])。因此,这个模型应该已经学习到了鲁棒的特征层级结构,相对于你的 CNN 模型学到的特征,是空间不变的,转动不变的,平移不变的。因此,这个模型,已经从百万幅图片中学习到了一个好的特征显示,对于像疟疾检测这样的计算机视觉问题,可以作为一个好的合适新图像的特征提取器。在我们的问题中释放迁移学习的能力之前,让我们先讨论 VGG-19 模型。
+
+##### 理解 VGG-19 模型
+
+VGG-19 模型是一个构建在 ImageNet 数据库之上的 19 层(卷积和全连接的)的深度学习网络,该数据库为了图像识别和分类的目的而开发。该模型由 Karen Simonyan 和 Andrew Zisserman 构建,在它们的论文”[大规模图像识别的非常深的卷积网络][22]“中描述。VGG-19 的架构模型是:
+
+![VGG-19 模型架构][23]
+
+你可以看到我们总共有 16 个使用 3x3 卷积过滤器的卷积层,与最大的池化层来下采样,和由 4096 个单元组成的两个全连接的隐藏层,每个隐藏层之后跟随一个由 1000 个单元组成的致密层,每个单元代表 ImageNet 数据库中的一个分类。我们不需要最后三层,因为我们将使用我们自己的全连接致密层来预测疟疾。我们更关心前五块,因此我们可以利用 VGG 模型作为一个有效的特征提取器。
+
+我们将使用模型之一作为一个简单的特征提取器通过冻结五个卷积块的方式来确保它们的位权在每个时期后不会更新。对于最后一个模型,我们会应用微调到 VGG 模型,我们会解冻最后两个块(第 4 和第 5)因此当我们训练我们的模型时,它们的位权在每个时期(每批数据)被更新。
+
+#### 模型 2:预训练的模型作为一个特征提取器
+
+为了构建这个模型,我们将利用 TensorFlow 载入 VGG-19 模型并且冻结卷积块因此我们用够将他们用作特征提取器。我们插入我们自己的致密层在末尾来执行分类任务。
+
+
+```
+vgg = tf.keras.applications.vgg19.VGG19(include_top=False, weights='imagenet',
+input_shape=INPUT_SHAPE)
+vgg.trainable = False
+# Freeze the layers
+for layer in vgg.layers:
+layer.trainable = False
+
+base_vgg = vgg
+base_out = base_vgg.output
+pool_out = tf.keras.layers.Flatten()(base_out)
+hidden1 = tf.keras.layers.Dense(512, activation='relu')(pool_out)
+drop1 = tf.keras.layers.Dropout(rate=0.3)(hidden1)
+hidden2 = tf.keras.layers.Dense(512, activation='relu')(drop1)
+drop2 = tf.keras.layers.Dropout(rate=0.3)(hidden2)
+
+out = tf.keras.layers.Dense(1, activation='sigmoid')(drop2)
+
+model = tf.keras.Model(inputs=base_vgg.input, outputs=out)
+model.compile(optimizer=tf.keras.optimizers.RMSprop(lr=1e-4),
+loss='binary_crossentropy',
+metrics=['accuracy'])
+model.summary()
+
+# Output
+Model: "model_1"
+_________________________________________________________________
+Layer (type) Output Shape Param #
+=================================================================
+input_2 (InputLayer) [(None, 125, 125, 3)] 0
+_________________________________________________________________
+block1_conv1 (Conv2D) (None, 125, 125, 64) 1792
+_________________________________________________________________
+block1_conv2 (Conv2D) (None, 125, 125, 64) 36928
+_________________________________________________________________
+...
+...
+_________________________________________________________________
+block5_pool (MaxPooling2D) (None, 3, 3, 512) 0
+_________________________________________________________________
+flatten_1 (Flatten) (None, 4608) 0
+_________________________________________________________________
+dense_3 (Dense) (None, 512) 2359808
+_________________________________________________________________
+dropout_2 (Dropout) (None, 512) 0
+_________________________________________________________________
+dense_4 (Dense) (None, 512) 262656
+_________________________________________________________________
+dropout_3 (Dropout) (None, 512) 0
+_________________________________________________________________
+dense_5 (Dense) (None, 1) 513
+=================================================================
+Total params: 22,647,361
+Trainable params: 2,622,977
+Non-trainable params: 20,024,384
+_________________________________________________________________
+```
+
+输出是很明白的,在我们的模型中我们有了很多层,我们将只利用 VGG-19 模型的冻结层作为特征提取器。你可以使用下列代码来验证我们的模型有多少层是实际训练的,我们的网络中总共存在多少层。
+
+
+```
+print("Total Layers:", len(model.layers))
+print("Total trainable layers:",
+sum([1 for l in model.layers if l.trainable]))
+
+# Output
+Total Layers: 28
+Total trainable layers: 6
+```
+
+我们将使用和我们之前的模型相似的配置和回调来训练我们的模型。参考 [我的 GitHub 仓库][24] 获取训练模型的完整代码。我们观察下列显示模型精确度和损失曲线。
+
+![Learning curves for frozen pre-trained CNN][25]
+
+冻结的预训练的 CNN 的学习曲线
+
+这显示了我们的模型没有像我们的基础 CNN 模型那样过拟合,但是性能有点不如我们的基础的 CNN 模型。让我们保存这个模型用户将来的评估。
+
+
+```
+`model.save('vgg_frozen.h5')`
+```
+
+#### 模型 3:使用图像增强来微调预训练的模型
+
+在我们的最后一个模型中,我们微调预定义好的 VGG-19 模型的最后两个块中层的位权。我们同样引入图像增强的概念。图像增强背后的想法和名字一样。我们从训练数据集中载入已存在的图像,并且应用转换操作,例如旋转,裁剪,转换,放大缩小,等等,来产生新的,改变的版本。由于这些随机的转换,我们每次获取到的图像不一样。我们将应用一个在 **tf.keras** 的优秀的工具叫做 **ImageDataGenerator** 来帮助构建图像增强器。
+
+
+```
+train_datagen = tf.keras.preprocessing.image.ImageDataGenerator(rescale=1./255,
+zoom_range=0.05,
+rotation_range=25,
+width_shift_range=0.05,
+height_shift_range=0.05,
+shear_range=0.05, horizontal_flip=True,
+fill_mode='nearest')
+
+val_datagen = tf.keras.preprocessing.image.ImageDataGenerator(rescale=1./255)
+
+# build image augmentation generators
+train_generator = train_datagen.flow(train_data, train_labels_enc, batch_size=BATCH_SIZE, shuffle=True)
+val_generator = val_datagen.flow(val_data, val_labels_enc, batch_size=BATCH_SIZE, shuffle=False)
+```
+
+我们不会应用任何转换在我们的验证数据集上(除非是调整大小,它是强制性适应的)因为我们将在每个时期来评估我们的模型性能。对于在传输学习上下文中的图像增强的详细解释,请自由查看我们上述引用的[文章][18]。让我们从一批图像增强转换中查看一些样本结果。
+
+
+```
+img_id = 0
+sample_generator = train_datagen.flow(train_data[img_id:img_id+1], train_labels[img_id:img_id+1],
+batch_size=1)
+sample = [next(sample_generator) for i in range(0,5)]
+fig, ax = plt.subplots(1,5, figsize=(16, 6))
+print('Labels:', [item[1][0] for item in sample])
+l = [ax[i].imshow(sample[i][0][0]) for i in range(0,5)]
+```
+
+![Sample augmented images][26]
+
+你可以清晰的看到与之前的输出中我们图像的轻微变化。我们现在构建我们的学习模型,确保 VGG-19 模型的最后两块是可以训练的。
+
+
+```
+vgg = tf.keras.applications.vgg19.VGG19(include_top=False, weights='imagenet',
+input_shape=INPUT_SHAPE)
+# Freeze the layers
+vgg.trainable = True
+
+set_trainable = False
+for layer in vgg.layers:
+if layer.name in ['block5_conv1', 'block4_conv1']:
+set_trainable = True
+if set_trainable:
+layer.trainable = True
+else:
+layer.trainable = False
+
+base_vgg = vgg
+base_out = base_vgg.output
+pool_out = tf.keras.layers.Flatten()(base_out)
+hidden1 = tf.keras.layers.Dense(512, activation='relu')(pool_out)
+drop1 = tf.keras.layers.Dropout(rate=0.3)(hidden1)
+hidden2 = tf.keras.layers.Dense(512, activation='relu')(drop1)
+drop2 = tf.keras.layers.Dropout(rate=0.3)(hidden2)
+
+out = tf.keras.layers.Dense(1, activation='sigmoid')(drop2)
+
+model = tf.keras.Model(inputs=base_vgg.input, outputs=out)
+model.compile(optimizer=tf.keras.optimizers.RMSprop(lr=1e-5),
+loss='binary_crossentropy',
+metrics=['accuracy'])
+
+print("Total Layers:", len(model.layers))
+print("Total trainable layers:", sum([1 for l in model.layers if l.trainable]))
+
+# Output
+Total Layers: 28
+Total trainable layers: 16
+```
+
+在我们的模型中我们降低了学习率,因为我们微调的时候不想在预训练的数据集上做大的位权更新。模型的训练过程可能有轻微的不同,因为我们使用了数据生成器,因此我们应用了 **fit_generator(...)** 函数。
+
+
+```
+tensorboard_callback = tf.keras.callbacks.TensorBoard(logdir, histogram_freq=1)
+reduce_lr = tf.keras.callbacks.ReduceLROnPlateau(monitor='val_loss', factor=0.5,
+patience=2, min_lr=0.000001)
+
+callbacks = [reduce_lr, tensorboard_callback]
+train_steps_per_epoch = train_generator.n // train_generator.batch_size
+val_steps_per_epoch = val_generator.n // val_generator.batch_size
+history = model.fit_generator(train_generator, steps_per_epoch=train_steps_per_epoch, epochs=EPOCHS,
+validation_data=val_generator, validation_steps=val_steps_per_epoch,
+verbose=1)
+
+# Output
+Epoch 1/25
+271/271 [====] - 133s 489ms/step - loss: 0.2267 - accuracy: 0.9117 - val_loss: 0.1414 - val_accuracy: 0.9531
+Epoch 2/25
+271/271 [====] - 129s 475ms/step - loss: 0.1399 - accuracy: 0.9552 - val_loss: 0.1292 - val_accuracy: 0.9589
+...
+...
+Epoch 24/25
+271/271 [====] - 128s 473ms/step - loss: 0.0815 - accuracy: 0.9727 - val_loss: 0.1466 - val_accuracy: 0.9682
+Epoch 25/25
+271/271 [====] - 128s 473ms/step - loss: 0.0792 - accuracy: 0.9729 - val_loss: 0.1127 - val_accuracy: 0.9641
+```
+
+这看起来是我们的最好的模型。它给了我们近乎 96.5% 的验证精确率,基于训练精度,它看起来不像我们的第一个模型那样过拟合。这可以通过下列的学习曲线验证。
+
+![Learning curves for fine-tuned pre-trained CNN][27]
+
+微调预训练的 CNN 的学习曲线
+
+让我们保存这个模型,因此我们能够在测试集上使用。
+
+
+```
+`model.save('vgg_finetuned.h5')`
+```
+
+这完成了我们的模型训练阶段。我们准备好在测试集上测试我们模型的性能。
+
+### 深度学习模型性能评估
+
+我们将评估我们在训练阶段构建的三个模型,通过在我们的测试集上做预测,因为仅仅验证是不够的!我们同样构建了一个检测工具模块叫做 **model_evaluation_utils**,我们可以使用相关分类指标用来评估使用我们深度学习模型的性能。第一步是测量我们的数据集。
+
+
+```
+test_imgs_scaled = test_data / 255.
+test_imgs_scaled.shape, test_labels.shape
+
+# Output
+((8268, 125, 125, 3), (8268,))
+```
+
+下一步包括载入我们保存的深度学习模型,在测试集上预测。
+
+
+```
+# Load Saved Deep Learning Models
+basic_cnn = tf.keras.models.load_model('./basic_cnn.h5')
+vgg_frz = tf.keras.models.load_model('./vgg_frozen.h5')
+vgg_ft = tf.keras.models.load_model('./vgg_finetuned.h5')
+
+# Make Predictions on Test Data
+basic_cnn_preds = basic_cnn.predict(test_imgs_scaled, batch_size=512)
+vgg_frz_preds = vgg_frz.predict(test_imgs_scaled, batch_size=512)
+vgg_ft_preds = vgg_ft.predict(test_imgs_scaled, batch_size=512)
+
+basic_cnn_pred_labels = le.inverse_transform([1 if pred > 0.5 else 0
+for pred in basic_cnn_preds.ravel()])
+vgg_frz_pred_labels = le.inverse_transform([1 if pred > 0.5 else 0
+for pred in vgg_frz_preds.ravel()])
+vgg_ft_pred_labels = le.inverse_transform([1 if pred > 0.5 else 0
+for pred in vgg_ft_preds.ravel()])
+```
+
+下一步是应用我们的 **model_evaluation_utils** 模块根据相应分类指标来检查每个模块的性能。
+
+
+```
+import model_evaluation_utils as meu
+import pandas as pd
+
+basic_cnn_metrics = meu.get_metrics(true_labels=test_labels, predicted_labels=basic_cnn_pred_labels)
+vgg_frz_metrics = meu.get_metrics(true_labels=test_labels, predicted_labels=vgg_frz_pred_labels)
+vgg_ft_metrics = meu.get_metrics(true_labels=test_labels, predicted_labels=vgg_ft_pred_labels)
+
+pd.DataFrame([basic_cnn_metrics, vgg_frz_metrics, vgg_ft_metrics],
+index=['Basic CNN', 'VGG-19 Frozen', 'VGG-19 Fine-tuned'])
+```
+
+![Model accuracy][28]
+
+看起来我们的第三个模型在我们的测试集上执行的最好,给出了一个模型精确性为 96% 的 F1得分,比起上述我们早期引用的研究论文和文章中提及的复杂的模型是相当好的。
+
+### 总结
+
+疟疾检测不是一个简单的程序,全球的合格的人员的可获得性在样例诊断和治疗当中是一个严重的问题。我们看到一个关于疟疾的有趣的真实世界的医学影像案例。易于构建的,开源的技术利用 AI 在检测疟疾方面可以给我们最先进的精确性,因此允许 AI 对社会是有益的。
+
+我鼓励你检查这片文章中提到的文章和研究论文,没有它们,我就不能形成概念并写出来。如果你对运行和采纳这些技术感兴趣,本篇文章所有的代码都可以在[我的 GitHub 仓库][24]获得。记得从[官方网站][11]下载数据。
+
+让我们希望在健康医疗方面更多的采纳开源的 AI 能力,使它在世界范围内变得便宜些,易用些。
+
+--------------------------------------------------------------------------------
+
+via: https://opensource.com/article/19/4/detecting-malaria-deep-learning
+
+作者:[Dipanjan (DJ) Sarkar (Red Hat)][a]
+选题:[lujun9972][b]
+译者:[warmfrog](https://github.com/warmfrog)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]: https://opensource.com/users/djsarkar
+[b]: https://github.com/lujun9972
+[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc_520x292_opensourcedoctor.png?itok=fk79NwpC
+[2]: https://opensource.com/sites/default/files/uploads/malaria1_python-tensorflow.png (Python and TensorFlow)
+[3]: https://opensource.com/sites/default/files/uploads/malaria2_malaria-heat-map.png (Malaria heat map)
+[4]: https://www.who.int/features/factfiles/malaria/en/
+[5]: https://peerj.com/articles/4568/
+[6]: https://blog.insightdatascience.com/https-blog-insightdatascience-com-malaria-hero-a47d3d5fc4bb
+[7]: https://www.pyimagesearch.com/2018/12/03/deep-learning-and-medical-image-analysis-with-keras/
+[8]: https://opensource.com/sites/default/files/uploads/malaria3_blood-smear.png (Blood smear workflow for Malaria detection)
+[9]: http://cs231n.github.io/convolutional-networks/
+[10]: https://opensource.com/sites/default/files/uploads/malaria4_cnn-architecture.png (A typical CNN architecture)
+[11]: https://ceb.nlm.nih.gov/repositories/malaria-datasets/
+[12]: https://www.ncbi.nlm.nih.gov/pubmed/29360430
+[13]: https://opensource.com/sites/default/files/uploads/malaria5_dependencies.png (Installing dependencies)
+[14]: https://opensource.com/sites/default/files/uploads/malaria6_tree-dependency.png (Installing the tree dependency)
+[15]: https://opensource.com/sites/default/files/uploads/malaria7_dataset.png (Datasets)
+[16]: https://opensource.com/sites/default/files/uploads/malaria8_cell-samples.png (Malaria cell samples)
+[17]: https://opensource.com/sites/default/files/uploads/malaria9_learningcurves.png (Learning curves for basic CNN)
+[18]: https://towardsdatascience.com/a-comprehensive-hands-on-guide-to-transfer-learning-with-real-world-applications-in-deep-learning-212bf3b2f27a
+[19]: https://github.com/dipanjanS/hands-on-transfer-learning-with-python
+[20]: https://opensource.com/sites/default/files/uploads/malaria10_transferideas.png (Ideas for deep transfer learning)
+[21]: http://image-net.org/index
+[22]: https://arxiv.org/pdf/1409.1556.pdf
+[23]: https://opensource.com/sites/default/files/uploads/malaria11_vgg-19-model-architecture.png (VGG-19 Model Architecture)
+[24]: https://nbviewer.jupyter.org/github/dipanjanS/data_science_for_all/tree/master/os_malaria_detection/
+[25]: https://opensource.com/sites/default/files/uploads/malaria12_learningcurves.png (Learning curves for frozen pre-trained CNN)
+[26]: https://opensource.com/sites/default/files/uploads/malaria13_sampleimages.png (Sample augmented images)
+[27]: https://opensource.com/sites/default/files/uploads/malaria14_learningcurves.png (Learning curves for fine-tuned pre-trained CNN)
+[28]: https://opensource.com/sites/default/files/uploads/malaria15_modelaccuracy.png (Model accuracy)
diff --git a/translated/tech/20190503 Check your spelling at the command line with Ispell.md b/translated/tech/20190503 Check your spelling at the command line with Ispell.md
new file mode 100644
index 0000000000..1bc80a0019
--- /dev/null
+++ b/translated/tech/20190503 Check your spelling at the command line with Ispell.md
@@ -0,0 +1,80 @@
+[#]: collector: (lujun9972)
+[#]: translator: (geekpi)
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (Check your spelling at the command line with Ispell)
+[#]: via: (https://opensource.com/article/19/5/spelling-command-line-ispell)
+[#]: author: (Scott Nesbitt https://opensource.com/users/scottnesbitt)
+
+使用 Ispell 在命令行中检查拼写
+======
+Ispell 可以帮助你在纯文本中消除超过 50 种语言的拼写错误。
+![Command line prompt][1]
+
+好的拼写是一种技巧。它是一项需要时间学习和掌握的技能。也就是说,有些人从来没有完全掌握这种技能,我知道有两三个出色的作家无法完全掌握拼写。
+
+即使你拼写得很好,偶尔也会输入错字。特别是在最后期限前如果你快速敲击键盘,那就更是如此。无论你的拼写的是什么,通过拼写检查器检查你所写的内容总是一个好主意。
+
+我用[纯文本][2]完成了我的大部分写作,并经常使用名为 [Aspell][3] 的命令行拼写检查器来完成这项工作。Aspell 不是唯一的工具。你可能还想要看下不错的 [Ispell][4]。
+
+### 入门
+
+自 1971 年以来,Ispell 以各种形式出现过。不要被它的年龄欺骗。Ispell 仍然是一个可以在 21 世纪高效使用的应用。
+
+在开始之前,请打开终端窗口并输入**which ispell** 来检查计算机上是否安装了 Ispell。如果未安装,请打开发行版的软件包管理器并从那里安装 Ispell。
+
+不要忘记为你使用的语言安装词典。我唯一使用的语言是英语,所以我只需下载美国和英国英语字典。你可以不局限于我的(也是唯一的)母语。Ispell 有[超过 50 种语言的词典][5]。
+
+![Installing Ispell dictionaries][6]
+
+### 使用 Ispell
+
+如果你还没有猜到,Ispell 只能用在文本文件。这包括用 HTML、LaTeX 和 [nroff 或 troff][7] 标记的文档。之后会有更多相关内容。
+
+要开始使用,请打开终端窗口并进入包含要运行拼写检查的文件的目录。输入 **ispell** 后跟文件名,然后按回车键。
+
+![Checking spelling with Ispell][8]
+
+Ispell 高亮了它无法识别的第一个词。如果单词拼写错误,Ispell 通常会提供一个或多个备选方案。按下 **R**,然后按下正确选择旁边的数字。在上面的截图中,我按了 **R** 和 **0** 来修复错误。
+
+另一方面,如果单词拼写正确,请按下 **A** 然后移动到下一个拼写错误的单词。
+
+继续这样做直到到达文件的末尾。Ispell 会保存你的更改,创建你刚检查的文件的备份(扩展名为 _.bak_),然后关闭。
+
+### 其他几个选项
+
+此示例说明了 Ispell 的基本用法。这个程序有[很多选项][9],有些你_可能_会用到,而另一些你_可能永远_不会使用。让我们快速看下我经常使用的一些。
+
+之前我提到过 Ispell 可以用于某些标记语言。你需要告诉它文件的格式。启动 Ispell 时,为 TeX 或 LaTeX 文件添加 **-t**,为 HTML 文件添加 **-H**,对于 groff 或 troff 文件添加 **-n**。例如,如果输入 **ispell -t myReport.tex**,Ispell 将忽略所有标记。
+
+如果你不想在检查文件后创建备份文件,请将 **-x** 添加到命令行。例如,**ispell -x myFile.txt**。
+
+如果 Ispell 遇到拼写正确但不在其字典中的单词,像是名字,会发生什么?你可以按 **I** 将该单词添加到个人单词列表中。这会将单词保存到 _/home_ 家目录下的 _.ispell_default_ 的文件中。
+
+这些是我在使用 Ispel l时最有用的选项,但请查看 [Ispell 的手册页][9]以了解其所有选项。
+
+Ispell 比 Aspell 或其他命令行拼写检查器更好或者更快么?我会说它不比其他的差或者慢。Ispell 不是适合所有人。它也许也不适合你。但有更多选择也不错,不是么?
+
+--------------------------------------------------------------------------------
+
+via: https://opensource.com/article/19/5/spelling-command-line-ispell
+
+作者:[Scott Nesbitt ][a]
+选题:[lujun9972][b]
+译者:[geekpi](https://github.com/geekpi)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]: https://opensource.com/users/scottnesbitt
+[b]: https://github.com/lujun9972
+[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/command_line_prompt.png?itok=wbGiJ_yg (Command line prompt)
+[2]: https://plaintextproject.online
+[3]: https://opensource.com/article/18/2/how-check-spelling-linux-command-line-aspell
+[4]: https://www.cs.hmc.edu/~geoff/ispell.html
+[5]: https://www.cs.hmc.edu/~geoff/ispell-dictionaries.html
+[6]: https://opensource.com/sites/default/files/uploads/ispell-install-dictionaries.png (Installing Ispell dictionaries)
+[7]: https://opensource.com/article/18/2/how-format-academic-papers-linux-groff-me
+[8]: https://opensource.com/sites/default/files/uploads/ispell-checking.png (Checking spelling with Ispell)
+[9]: https://www.cs.hmc.edu/~geoff/ispell-man.html
diff --git a/translated/tech/20190504 Add methods retroactively in Python with singledispatch.md b/translated/tech/20190504 Add methods retroactively in Python with singledispatch.md
new file mode 100644
index 0000000000..40fae67d1a
--- /dev/null
+++ b/translated/tech/20190504 Add methods retroactively in Python with singledispatch.md
@@ -0,0 +1,106 @@
+[#]: collector: (lujun9972)
+[#]: translator: (geekpi)
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (Add methods retroactively in Python with singledispatch)
+[#]: via: (https://opensource.com/article/19/5/python-singledispatch)
+[#]: author: (Moshe Zadka https://opensource.com/users/moshez)
+
+使用 singledispatch 在 Python 中追溯地添加方法
+======
+在我们覆盖 7 个 PyPI 库的系列文章中了解更多解决 Python 问题的信息。
+![][1]
+
+Python 是当今使用最多[流行的编程语言][2]之一,因为:它是开源的,它具有广泛的用途(例如 Web 编程、业务应用、游戏、科学编程等等),它有一个充满活力和专注的社区支持它。这个社区是我们在 [Python Package Index][3](PyPI)中提供如此庞大、多样化的软件包的原因,用以扩展和改进 Python。并解决不可避免的问题。
+
+在本系列中,我们将介绍七个可以帮助你解决常见 Python 问题的 PyPI 库。今天,我们将研究 [**singledispatch**][4],这是一个能让你追溯地向 Python 库添加方法的库。
+
+### singledispatch
+
+想象一下,你有一个有 **Circle**、**Square** 等类的“形状”库。
+
+**Circle** 类有**半径**、**Square** 有 **边**、**Rectangle**有**高**和**宽**。我们的库已经存在,我们不想改变它。
+
+然而,我们想给库添加一个**面积**计算。如果我们不会和其他人共享这个库,我们只需添加 **area** 方法,这样我们就能调用 **shape.area()** 而无需关心是什么形状。
+
+虽然可以进入类并添加一个方法,但这是一个坏主意:没有人希望他们的类会被添加新的方法,程序因奇怪的方式出错。
+
+相反,**functools** 中的 **singledispatch** 函数可以帮助我们。
+
+
+```
+@singledispatch
+def get_area(shape):
+ raise NotImplementedError("cannot calculate area for unknown shape",
+ shape)
+```
+
+**get_area** 函数的“基类”实现会报错。这保证了如果我们出现一个新的形状时,我们会明确地报错而不是返回一个无意义的结果。
+
+
+```
+@get_area.register(Square)
+def _get_area_square(shape):
+ return shape.side ** 2
+@get_area.register(Circle)
+def _get_area_circle(shape):
+ return math.pi * (shape.radius ** 2)
+```
+
+这种方式的好处是如果某人写了一个匹配我们代码的_新_形状,它们可以自己实现 **get_area**。
+
+
+```
+from area_calculator import get_area
+
+@attr.s(auto_attribs=True, frozen=True)
+class Ellipse:
+ horizontal_axis: float
+ vertical_axis: float
+
+@get_area.register(Ellipse)
+def _get_area_ellipse(shape):
+ return math.pi * shape.horizontal_axis * shape.vertical_axis
+```
+
+_调用_ **get_area** 很直接。
+
+
+```
+`print(get_area(shape))`
+```
+
+这意味着我们可以将有大量 **if isintance()/elif isinstance()** 的代码以这种方式修改,而无需修改接口。下一次你要修改 **if isinstance**,你试试 **singledispatch**!
+
+在本系列的下一篇文章中,我们将介绍 **tox**,一个用于自动化 Python 代码测试的工具。
+
+
+#### 回顾本系列的前几篇文章:
+
+ * [Cython][5]
+ * [Black][6]
+ * [attrs][7]
+
+
+
+--------------------------------------------------------------------------------
+
+via: https://opensource.com/article/19/5/python-singledispatch
+
+作者:[Moshe Zadka ][a]
+选题:[lujun9972][b]
+译者:[geekpi](https://github.com/geekpi)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]: https://opensource.com/users/moshez
+[b]: https://github.com/lujun9972
+[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/computer_code_programming_laptop.jpg?itok=ormv35tV
+[2]: https://opensource.com/article/18/5/numbers-python-community-trends
+[3]: https://pypi.org/
+[4]: https://pypi.org/project/singledispatch/
+[5]: https://opensource.com/article/19/4/7-python-problems-solved-cython
+[6]: https://opensource.com/article/19/4/python-problems-solved-black
+[7]: https://opensource.com/article/19/4/python-problems-solved-attrs
diff --git a/translated/tech/20190505 How To Install-Uninstall Listed Packages From A File In Linux.md b/translated/tech/20190505 How To Install-Uninstall Listed Packages From A File In Linux.md
new file mode 100644
index 0000000000..b825435dcb
--- /dev/null
+++ b/translated/tech/20190505 How To Install-Uninstall Listed Packages From A File In Linux.md
@@ -0,0 +1,343 @@
+[#]: collector: (lujun9972)
+[#]: translator: (way-ww)
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (How To Install/Uninstall Listed Packages From A File In Linux?)
+[#]: via: (https://www.2daygeek.com/how-to-install-uninstall-listed-packages-from-a-file-in-linux/)
+[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/)
+
+如何在 Linux 上安装/卸载一个文件中列出的软件包?
+======
+
+在某些情况下,你可能想要将一个服务器上的软件包列表安装到另一个服务器上。
+
+例如,你已经在服务器A 上安装了 15 个软件包并且这些软件包也需要被安装到服务器B,服务器C 上等等。
+
+我们可以手动去安装这些软件但是这将花费大量的时间。
+
+你可以手动安装一俩个服务器,但是试想如果你有大概十个服务器呢。
+
+在这种情况下你无法手动完成工作,那么怎样才能解决问题呢?
+
+不要担心我们可以帮你摆脱这样的情况和场景。
+
+我们在这篇文章中增加了四种方法来克服困难。
+
+我希望这可以帮你解决问题。我已经在 Centos7 和 Ubuntu 18.04 上测试了这些命令。
+
+我也希望这可以在其他发行版上工作。这仅仅需要使用该发行版的官方包管理器命令替代本文中的包管理器命令就行了。
+
+如果想要 **[检查 Linux 系统上已安装的软件包列表][1]** 请点击链接。
+
+例如,如果你想要在基于 RHEL 系统上创建软件包列表请使用以下步骤。其他发行版也一样。
+
+```
+# rpm -qa --last | head -15 | awk '{print $1}' > /tmp/pack1.txt
+
+# cat /tmp/pack1.txt
+mariadb-server-5.5.60-1.el7_5.x86_64
+perl-DBI-1.627-4.el7.x86_64
+perl-DBD-MySQL-4.023-6.el7.x86_64
+perl-PlRPC-0.2020-14.el7.noarch
+perl-Net-Daemon-0.48-5.el7.noarch
+perl-IO-Compress-2.061-2.el7.noarch
+perl-Compress-Raw-Zlib-2.061-4.el7.x86_64
+mariadb-5.5.60-1.el7_5.x86_64
+perl-Data-Dumper-2.145-3.el7.x86_64
+perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64
+httpd-2.4.6-88.el7.centos.x86_64
+mailcap-2.1.41-2.el7.noarch
+httpd-tools-2.4.6-88.el7.centos.x86_64
+apr-util-1.5.2-6.el7.x86_64
+apr-1.4.8-3.el7_4.1.x86_64
+```
+
+### 方法一 : 如何在 Linux 上使用 cat 命令安装文件中列出的包?
+
+为实现这个目标,我将使用简单明了的第一种方法。
+
+为此,创建一个文件并添加上你想要安装的包列表。
+
+出于测试的目的,我们将只添加以下的三个软件包名到文件中。
+
+```
+# cat /tmp/pack1.txt
+
+apache2
+mariadb-server
+nano
+```
+
+只要简单的运行 **[apt 命令][2]** 就能在 Ubuntu/Debian 系统上一次性安装所有的软件包。
+
+```
+# apt -y install $(cat /tmp/pack1.txt)
+
+Reading package lists... Done
+Building dependency tree
+Reading state information... Done
+The following packages were automatically installed and are no longer required:
+ libopts25 sntp
+Use 'sudo apt autoremove' to remove them.
+Suggested packages:
+ apache2-doc apache2-suexec-pristine | apache2-suexec-custom spell
+The following NEW packages will be installed:
+ apache2 mariadb-server nano
+0 upgraded, 3 newly installed, 0 to remove and 24 not upgraded.
+Need to get 339 kB of archives.
+After this operation, 1,377 kB of additional disk space will be used.
+Get:1 http://in.archive.ubuntu.com/ubuntu bionic-updates/main amd64 apache2 amd64 2.4.29-1ubuntu4.6 [95.1 kB]
+Get:2 http://in.archive.ubuntu.com/ubuntu bionic/main amd64 nano amd64 2.9.3-2 [231 kB]
+Get:3 http://in.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 mariadb-server all 1:10.1.38-0ubuntu0.18.04.1 [12.9 kB]
+Fetched 339 kB in 19s (18.0 kB/s)
+Selecting previously unselected package apache2.
+(Reading database ... 290926 files and directories currently installed.)
+Preparing to unpack .../apache2_2.4.29-1ubuntu4.6_amd64.deb ...
+Unpacking apache2 (2.4.29-1ubuntu4.6) ...
+Selecting previously unselected package nano.
+Preparing to unpack .../nano_2.9.3-2_amd64.deb ...
+Unpacking nano (2.9.3-2) ...
+Selecting previously unselected package mariadb-server.
+Preparing to unpack .../mariadb-server_1%3a10.1.38-0ubuntu0.18.04.1_all.deb ...
+Unpacking mariadb-server (1:10.1.38-0ubuntu0.18.04.1) ...
+Processing triggers for ufw (0.36-0ubuntu0.18.04.1) ...
+Setting up apache2 (2.4.29-1ubuntu4.6) ...
+Processing triggers for ureadahead (0.100.0-20) ...
+Processing triggers for install-info (6.5.0.dfsg.1-2) ...
+Setting up nano (2.9.3-2) ...
+update-alternatives: using /bin/nano to provide /usr/bin/editor (editor) in auto mode
+update-alternatives: using /bin/nano to provide /usr/bin/pico (pico) in auto mode
+Processing triggers for systemd (237-3ubuntu10.20) ...
+Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
+Setting up mariadb-server (1:10.1.38-0ubuntu0.18.04.1) ...
+```
+
+至于删除,需要使用相同的命令格式和适当的选项。
+
+```
+# apt -y remove $(cat /tmp/pack1.txt)
+Reading package lists... Done
+Building dependency tree
+Reading state information... Done
+The following packages were automatically installed and are no longer required:
+ apache2-bin apache2-data apache2-utils galera-3 libaio1 libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libconfig-inifiles-perl libdbd-mysql-perl libdbi-perl libjemalloc1 liblua5.2-0
+ libmysqlclient20 libopts25 libterm-readkey-perl mariadb-client-10.1 mariadb-client-core-10.1 mariadb-common mariadb-server-10.1 mariadb-server-core-10.1 mysql-common sntp socat
+Use 'apt autoremove' to remove them.
+The following packages will be REMOVED:
+ apache2 mariadb-server nano
+0 upgraded, 0 newly installed, 3 to remove and 24 not upgraded.
+After this operation, 1,377 kB disk space will be freed.
+(Reading database ... 291046 files and directories currently installed.)
+Removing apache2 (2.4.29-1ubuntu4.6) ...
+Removing mariadb-server (1:10.1.38-0ubuntu0.18.04.1) ...
+Removing nano (2.9.3-2) ...
+update-alternatives: using /usr/bin/vim.tiny to provide /usr/bin/editor (editor) in auto mode
+Processing triggers for ufw (0.36-0ubuntu0.18.04.1) ...
+Processing triggers for install-info (6.5.0.dfsg.1-2) ...
+Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
+```
+
+使用 **[yum 命令][3]** 在基于 RHEL (如 Centos,RHEL (Redhat) 和 OEL (Oracle Enterprise Linux)) 的系统上安装文件中列出的软件包。
+
+
+```
+# yum -y install $(cat /tmp/pack1.txt)
+```
+
+使用以命令在基于 RHEL (如 Centos,RHEL (Redhat) 和 OEL (Oracle Enterprise Linux)) 的系统上卸载文件中列出的软件包。
+
+```
+# yum -y remove $(cat /tmp/pack1.txt)
+```
+
+使用以下 **[dnf 命令][4]** 在 Fedora 系统上安装文件中列出的软件包。
+
+```
+# dnf -y install $(cat /tmp/pack1.txt)
+```
+
+使用以下命令在 Fedora 系统上卸载文件中列出的软件包。
+
+```
+# dnf -y remove $(cat /tmp/pack1.txt)
+```
+
+使用以下 **[zypper 命令][5]** 在 openSUSE 系统上安装文件中列出的软件包。
+
+```
+# zypper -y install $(cat /tmp/pack1.txt)
+```
+
+使用以下命令从 openSUSE 系统上卸载文件中列出的软件包。
+
+```
+# zypper -y remove $(cat /tmp/pack1.txt)
+```
+
+使用以下 **[pacman 命令][6]** 在基于 Arch Linux (如 Manjaro 和 Antergos) 的系统上安装文件中列出的软件包。
+
+```
+# pacman -S $(cat /tmp/pack1.txt)
+```
+
+使用以下命令从基于 Arch Linux (如 Manjaro 和 Antergos) 的系统中卸载文件中列出的软件包。
+
+
+```
+# pacman -Rs $(cat /tmp/pack1.txt)
+```
+
+### 方法二 : 如何使用 cat 和 xargs 命令在 Linux 中安装文件中列出的软件包。
+
+甚至,我更喜欢使用这种方法,因为这是一种非常简单直接的方法。
+
+使用以下 apt 命令在基于 Debian 的系统 (如 Debian,Ubuntu和Linux Mint) 上安装文件中列出的软件包。
+
+
+```
+# cat /tmp/pack1.txt | xargs apt -y install
+```
+
+使用以下 apt 命令 从基于 Debian 的系统 (如 Debian,Ubuntu和Linux Mint) 上卸载文件中列出的软件包。
+
+```
+# cat /tmp/pack1.txt | xargs apt -y remove
+```
+
+使用以下 yum 命令在基于 RHEL (如 Centos,RHEL (Redhat) 和 OEL (Oracle Enterprise Linux)) 的系统上安装文件中列出的软件包。
+
+```
+# cat /tmp/pack1.txt | xargs yum -y install
+```
+
+使用以命令从基于 RHEL (如 Centos,RHEL (Redhat) 和 OEL (Oracle Enterprise Linux)) 的系统上卸载文件中列出的软件包。
+
+```
+# cat /tmp/pack1.txt | xargs yum -y remove
+```
+
+使用以下 dnf 命令在 Fedora 系统上安装文件中列出的软件包。
+
+```
+# cat /tmp/pack1.txt | xargs dnf -y install
+```
+
+使用以下命令从 Fedora 系统上卸载文件中列出的软件包。
+
+```
+# cat /tmp/pack1.txt | xargs dnf -y remove
+```
+
+使用以下 zypper 命令在 openSUSE 系统上安装文件中列出的软件包。
+
+
+```
+# cat /tmp/pack1.txt | xargs zypper -y install
+```
+
+使用以下命令从 openSUSE 系统上卸载文件中列出的软件包。
+
+```
+# cat /tmp/pack1.txt | xargs zypper -y remove
+```
+
+使用以下 pacman 命令在基于 Arch Linux (如 Manjaro 和 Antergos) 的系统上安装文件中列出的软件包。
+
+```
+# cat /tmp/pack1.txt | xargs pacman -S
+```
+
+使用下以命令从基于 Arch Linux (如 Manjaro 和 Antergos) 的系统上卸载文件中列出的软件包。
+
+```
+# cat /tmp/pack1.txt | xargs pacman -Rs
+```
+
+### 方法三 : 如何使用 For Loop 在 Linux 上安装文件中列出的软件包?
+我们也可以使用 For 循环命令来实现此目的。
+
+安装批量包可以使用以下一条 For 循环的命令。
+
+```
+# for pack in `cat /tmp/pack1.txt` ; do apt -y install $i; done
+```
+
+要使用 shell 脚本安装批量包,请使用以下 For 循环。
+
+
+```
+# vi /opt/scripts/bulk-package-install.sh
+
+#!/bin/bash
+for pack in `cat /tmp/pack1.txt`
+do apt -y remove $pack
+done
+```
+
+为 bulk-package-install.sh 设置可执行权限。
+
+```
+# chmod + bulk-package-install.sh
+```
+
+最后运行这个脚本。
+
+```
+# sh bulk-package-install.sh
+```
+
+### 方法四 : 如何使用 While 循环在 Linux 上安装文件中列出的软件包。
+
+我们也可以使用 While 循环命令来实现目的。
+
+安装批量包可以使用以下一条 While 循环的命令。
+
+```
+# file="/tmp/pack1.txt"; while read -r pack; do apt -y install $pack; done < "$file"
+```
+
+要使用 shell 脚本安装批量包,请使用以下 While 循环。
+
+```
+# vi /opt/scripts/bulk-package-install.sh
+
+#!/bin/bash
+file="/tmp/pack1.txt"
+while read -r pack
+do apt -y remove $pack
+done < "$file"
+```
+
+为 bulk-package-install.sh 设置可执行权限。
+
+```
+# chmod + bulk-package-install.sh
+```
+
+最后运行这个脚本。
+
+```
+# sh bulk-package-install.sh
+```
+
+--------------------------------------------------------------------------------
+
+via: https://www.2daygeek.com/how-to-install-uninstall-listed-packages-from-a-file-in-linux/
+
+作者:[Magesh Maruthamuthu][a]
+选题:[lujun9972][b]
+译者:[way-ww](https://github.com/way-ww)
+校对:[校对者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/check-installed-packages-in-rhel-centos-fedora-debian-ubuntu-opensuse-arch-linux/
+[2]: https://www.2daygeek.com/apt-command-examples-manage-packages-debian-ubuntu-systems/
+[3]: https://www.2daygeek.com/yum-command-examples-manage-packages-rhel-centos-systems/
+[4]: https://www.2daygeek.com/dnf-command-examples-manage-packages-fedora-system/
+[5]: https://www.2daygeek.com/zypper-command-examples-manage-packages-opensuse-system/
+[6]: https://www.2daygeek.com/pacman-command-examples-manage-packages-arch-linux-system/
+
diff --git a/translated/tech/20190518 Change Power Modes in Ubuntu with Slimbook Battery Optimizer.md b/translated/tech/20190518 Change Power Modes in Ubuntu with Slimbook Battery Optimizer.md
new file mode 100644
index 0000000000..bf57e58d12
--- /dev/null
+++ b/translated/tech/20190518 Change Power Modes in Ubuntu with Slimbook Battery Optimizer.md
@@ -0,0 +1,104 @@
+[#]: collector: (lujun9972)
+[#]: translator: (zhs852)
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (Change Power Modes in Ubuntu with Slimbook Battery Optimizer)
+[#]: via: (https://itsfoss.com/slimbook-battry-optimizer-ubuntu/)
+[#]: author: Abhishek Prakash https://itsfoss.com/author/abhishek/)
+
+在 Ubuntu 中使用 Slimbook Battery Optimizer 切换电源模式
+======
+
+> Slimbook Battery Optimizer 是一个美观实用的指示器小程序,它可以让你你在安装 Linux 的笔记本上快速切换电源模式来延长续航时间。
+
+[Slimbook][1] 是一个销售 [预装 Linux 的笔电][2] 的西班牙电脑制造商,他们发布了一款好用的小程序,用来在基于 Ubuntu 的 Linux 发行版下调整电池性能。
+
+因为 Slimbook 销售他们自己的 Linux 系统,所以他们制作了一些在 Linux 上用于调整他们自己硬件性能的小工具。Battery Optimizer 就是这样一个工具。
+
+要使用这个实用小程序,你不必购买 Slimbook 的产品,因为 Slimbook 已经将它在 [他们的官方 PPA 源][3] 发行了。
+
+### Slimbook Battery Optimizer 简介
+
+这个程序叫 Slimbook Battery。它是一个常驻顶栏的指示器小程序,使得你可以快速切换电源模式。
+
+![Slimbook Battery Mode Ubuntu][4]
+
+你可能在 Windows 中见过类似的程序。Slimbook Battery 和它们一样,提供了类似的电源计划:
+
+ * 节能:最大程度延长电池续航时间
+ * 平衡:性能与节能间的最佳平衡
+ * 高性能:最大程度提高性能
+
+你可以在高级模式中配置这些模式:
+
+![配置多种多样的电源模式][5]
+
+如果你觉得你把设置调乱了,你可以用“恢复默认设置”的按钮还原它。
+
+你也可以修改像程序自启或默认电源模式这样的通用设置。
+
+![Slimbook Battery 通用设置][6]
+
+Slimbook 有专门为多种电源管理参数提供的页面。如果你希望自己配置,请参照 [此页][7]。
+
+不过,我认为 Slimbook 的界面需要一些改进。例如,某些页面上的“问题标记”的图标应该改为可点击的,以此提供更多信息。然而,在我写这篇文章时,那个标记仍然无法点击。
+
+总的来说,Slimbook Battery 是一个小巧精美的软件,你可以用它来快速切换电源模式。如果你决定在 Ubuntu 及其衍生发行版上(比如 Linux Mint 或 elementary OS 等),你可以使用官方 [PPA 源][8]。
+
+说个题外话,推荐阅读大家阅读 [Ubuntu 论坛被入侵,用户数据被盗取][9] 这篇文章。
+
+#### 在基于 Ubuntu 的发行版上安装 Slimbook Battery
+
+打开终端,一步一步地使用以下命令:
+
+```
+sudo add-apt-repository ppa:slimbook/slimbook
+sudo apt update
+sudo apt install slimbookbattery
+```
+
+安装好之后,在菜单中搜索 Slimbook Battery:
+
+![启动 Slimbook Battery Optimizer][10]
+
+在你点击它之后,你会发现它出现在了顶栏。你可以在这里选择你希望使用的电源模式。
+
+![Slimbook Battery 电源模式][4]
+
+#### 卸载 Slimbook Battery
+
+如果你不再使用它,你可以通过以下命令来卸载它:
+
+```
+sudo apt remove slimbookbattery
+sudo add-apt-repository -r ppa:slimbook/slimbook
+```
+
+在我看来,这样的应用程序为某些特定的目的服务,这是值得鼓励的。这个工具给了你一条调整电源模式的捷径,和调整性能的更多选项。
+
+你用过 Slimbook Battery 吗?你觉得它如何?
+
+--------------------------------------------------------------------------------
+
+via: https://itsfoss.com/slimbook-battry-optimizer-ubuntu/
+
+作者:[Abhishek Prakash][a]
+选题:[lujun9972][b]
+译者:[zhs852](https://github.com/zhs852)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]: https://itsfoss.com/author/abhishek/
+[b]: https://github.com/lujun9972
+[1]: https://slimbook.es/en/
+[2]: https://itsfoss.com/get-linux-laptops/
+[3]: https://launchpad.net/~slimbook/+archive/ubuntu/slimbook
+[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/05/slimbook-battery-mode-ubuntu.jpg?resize=800%2C400&ssl=1
+[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/05/slimbook-battery-optimizer-2.jpg?ssl=1
+[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/05/slimbook-battery-optimizer-1.jpg?ssl=1
+[7]: https://slimbook.es/en/tutoriales/aplicaciones-slimbook/398-slimbook-battery-3-application-for-optimize-battery-of-your-laptop
+[8]: https://itsfoss.com/ppa-guide/
+[9]: https://itsfoss.com/ubuntu-forums-hacked-again/
+[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/05/slimbook-battery-optimizer.jpg?ssl=1
diff --git a/translated/tech/20190520 xsos - A Tool To Read SOSReport In Linux.md b/translated/tech/20190520 xsos - A Tool To Read SOSReport In Linux.md
new file mode 100644
index 0000000000..a37a77b769
--- /dev/null
+++ b/translated/tech/20190520 xsos - A Tool To Read SOSReport In Linux.md
@@ -0,0 +1,394 @@
+[#]: collector: (lujun9972)
+[#]: translator: (wxy)
+[#]: reviewer: ( )
+[#]: publisher: ( )
+[#]: url: ( )
+[#]: subject: (xsos – A Tool To Read SOSReport In Linux)
+[#]: via: (https://www.2daygeek.com/xsos-a-tool-to-read-sosreport-in-linux/)
+[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/)
+
+xsos:一个在 Linux 上阅读 SOSReport 的工具
+======
+
+我们都已经知道 [sosreport][1]。它用来收集可用于诊断的系统信息。Redhat 支持建议我们在提交案例时提供 sosreport 来分析当前的系统状态。
+
+它收集全部类型的报告,以帮助用户找出问题的根本原因。我们可以轻松地提取和阅读 sosreport,但它很难阅读。因为它给每个部分都创建了一个单独的文件。
+
+那么,在 Linux 中使用语法高亮显示阅读所有这些内容的最佳方法是什么。是的,这可以通过 xsos 工具做到。
+
+### sosreport
+
+`sosreport` 命令是一个从运行中的系统(尤其是 RHEL 和 OEL 系统)收集大量配置细节、系统信息和诊断信息的工具。它可以帮助技术支持工程师在很多方面分析系统。
+
+此报告包含有关系统的大量信息,例如引导信息、文件系统、内存、主机名、已安装的 rpm、系统 IP、网络详细信息、操作系统版本、已安装的内核、已加载的内核模块、打开的文件列表、PCI 设备列表、挂载点及其细节、运行中的进程信息、进程树输出、系统路由、位于 `/etc` 文件夹中的所有配置文件,以及位于 `/var` 文件夹中的所有日志文件。
+
+这将需要一段时间来生成报告,这取决于您的系统安装和配置。
+
+完成后,`sosreport` 将在 `/tmp` 目录下生成一个压缩的归档文件。
+
+### xsos
+
+[xsos][3] 是一个帮助用户轻松读取 Linux 系统上的 `sosreport` 的工具。另一方面,我们可以说它是 `sosreport` 考官。
+
+它可以立即从 `sosreport` 或正在运行的系统中汇总系统信息。
+
+`xsos` 将尝试简化、解析、计算和格式化来自数十个文件(和命令)的数据,以便为你提供有关系统的详细概述。
+
+你可以通过运行以下命令立即汇总系统信息。
+
+```
+# curl -Lo ./xsos bit.ly/xsos-direct; chmod +x ./xsos; ./xsos -ya
+```
+
+![][5]
+
+### 如何在 Linux 上安装 xsos
+
+我们可以使用以下两种方法轻松安装 `xsos`。
+
+如果你正在寻找最新的前沿版本。使用以下步骤:
+
+```
+# curl -Lo /usr/local/bin/xsos bit.ly/xsos-direct
+# chmod +x /usr/local/bin/xsos
+```
+
+下面是安装 `xsos` 的推荐方法。它将从 rpm 文件安装 `xsos`。
+
+```
+# yum install http://people.redhat.com/rsawhill/rpms/latest-rsawaroha-release.rpm
+# yum install xsos
+```
+
+### 如何在 Linux 上使用 xsos
+
+一旦通过上述方法之一安装了 xsos。只需运行 `xsos` 命令,不带任何选项,它们会显示有关系统的基本信息。
+
+```
+# xsos
+
+OS
+ Hostname: CentOS7.2daygeek.com
+ Distro: [redhat-release] CentOS Linux release 7.6.1810 (Core)
+ [centos-release] CentOS Linux release 7.6.1810 (Core)
+ [os-release] CentOS Linux 7 (Core) 7 (Core)
+ RHN: (missing)
+ RHSM: (missing)
+ YUM: 2 enabled plugins: fastestmirror, langpacks
+ Runlevel: N 5 (default graphical)
+ SELinux: enforcing (default enforcing)
+ Arch: mach=x86_64 cpu=x86_64 platform=x86_64
+ Kernel:
+ Booted kernel: 3.10.0-957.el7.x86_64
+ GRUB default: 3.10.0-957.el7.x86_64
+ Build version:
+ Linux version 3.10.0-957.el7.x86_64 ([email protected]) (gcc version 4.8.5 20150623 (Red
+ Hat 4.8.5-36) (GCC) ) #1 SMP Thu Nov 8 23:39:32 UTC 2018
+ Booted kernel cmdline:
+ root=/dev/mapper/centos-root ro crashkernel=auto rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet
+ LANG=en_US.UTF-8
+ GRUB default kernel cmdline:
+ root=/dev/mapper/centos-root ro crashkernel=auto rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet
+ LANG=en_US.UTF-8
+ Taint-check: 0 (kernel untainted)
+ - - - - - - - - - - - - - - - - - - -
+ Sys time: Sun May 12 10:05:21 CDT 2019
+ Boot time: Sun May 12 09:50:20 CDT 2019 (epoch: 1557672620)
+ Time Zone: America/Chicago
+ Uptime: 15 min, 1 user
+ LoadAvg: [1 CPU] 0.00 (0%), 0.04 (4%), 0.09 (9%)
+ /proc/stat:
+ procs_running: 2 procs_blocked: 0 processes [Since boot]: 6423
+ cpu [Utilization since boot]:
+ us 1%, ni 0%, sys 1%, idle 99%, iowait 0%, irq 0%, sftirq 0%, steal 0%
+```
+
+### 如何使用 xsos 命令在 Linux 中查看生成的 sosreport 输出?
+
+我们需要份 sosreport 以使用 `xsos` 命令进一步阅读。
+
+是的,我已经生成了一个 sosreport,文件如下。
+
+```
+# ls -lls -lh /var/tmp/sosreport-CentOS7-01-1005-2019-05-12-pomeqsa.tar.xz
+9.8M -rw-------. 1 root root 9.8M May 12 10:13 /var/tmp/sosreport-CentOS7-01-1005-2019-05-12-pomeqsa.tar.xz
+```
+
+运行如下命令解开它。
+
+```
+# tar xf sosreport-CentOS7-01-1005-2019-05-12-pomeqsa.tar.xz
+```
+
+要查看全部信息,带上 `-a` 或 `--all` 开关运行 `xsos`:
+
+```
+# xsos --all /var/tmp/sosreport-CentOS7-01-1005-2019-05-12-pomeqsa
+```
+
+要查看 bios 信息,带上 `-b` 或 `--bios` 开关运行 `xsos`。
+
+```
+# xsos --bios /var/tmp/sosreport-CentOS7-01-1005-2019-05-12-pomeqsa
+DMIDECODE
+ BIOS:
+ Vend: innotek GmbH
+ Vers: VirtualBox
+ Date: 12/01/2006
+ BIOS Rev:
+ FW Rev:
+ System:
+ Mfr: innotek GmbH
+ Prod: VirtualBox
+ Vers: 1.2
+ Ser: 0
+ UUID: 002f47b8-2af2-48f5-be1d-67b67e03514c
+ CPU:
+ 0 of 0 CPU sockets populated, 0 cores/0 threads per CPU
+ 0 total cores, 0 total threads
+ Mfr:
+ Fam:
+ Freq:
+ Vers:
+ Memory:
+ Total: 0 MiB (0 GiB)
+ DIMMs: 0 of 0 populated
+ MaxCapacity: 0 MiB (0 GiB / 0.00 TiB)
+```
+
+要查看系统基本信息,如主机名、发行版、SELinux、内核信息、正常运行时间等,请使用 `-o` 或 `--os` 开关运行 `xsos`。
+
+```
+# xsos --os /var/tmp/sosreport-CentOS7-01-1005-2019-05-12-pomeqsa
+OS
+ Hostname: CentOS7.2daygeek.com
+ Distro: [redhat-release] CentOS Linux release 7.6.1810 (Core)
+ [centos-release] CentOS Linux release 7.6.1810 (Core)
+ [os-release] CentOS Linux 7 (Core) 7 (Core)
+ RHN: (missing)
+ RHSM: (missing)
+ YUM: 2 enabled plugins: fastestmirror, langpacks
+ SELinux: enforcing (default enforcing)
+ Arch: mach=x86_64 cpu=x86_64 platform=x86_64
+ Kernel:
+ Booted kernel: 3.10.0-957.el7.x86_64
+ GRUB default: 3.10.0-957.el7.x86_64
+ Build version:
+ Linux version 3.10.0-957.el7.x86_64 ([email protected]) (gcc version 4.8.5 20150623 (Red
+ Hat 4.8.5-36) (GCC) ) #1 SMP Thu Nov 8 23:39:32 UTC 2018
+ Booted kernel cmdline:
+ root=/dev/mapper/centos-root ro crashkernel=auto rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet
+ LANG=en_US.UTF-8
+ GRUB default kernel cmdline:
+ root=/dev/mapper/centos-root ro crashkernel=auto rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet
+ LANG=en_US.UTF-8
+ Taint-check: 536870912 (see https://access.redhat.com/solutions/40594)
+ 29 TECH_PREVIEW: Technology Preview code is loaded
+ - - - - - - - - - - - - - - - - - - -
+ Sys time: Sun May 12 10:12:22 CDT 2019
+ Boot time: Sun May 12 09:50:20 CDT 2019 (epoch: 1557672620)
+ Time Zone: America/Chicago
+ Uptime: 22 min, 1 user
+ LoadAvg: [1 CPU] 1.19 (119%), 0.27 (27%), 0.14 (14%)
+ /proc/stat:
+ procs_running: 8 procs_blocked: 2 processes [Since boot]: 9005
+ cpu [Utilization since boot]:
+ us 1%, ni 0%, sys 1%, idle 99%, iowait 0%, irq 0%, sftirq 0%, steal 0%
+```
+
+要查看 kdump 配置,请使用 `-k` 或 `--kdump` 开关运行 `xsos`。
+
+```
+# xsos --kdump /var/tmp/sosreport-CentOS7-01-1005-2019-05-12-pomeqsa
+KDUMP CONFIG
+ kexec-tools rpm version:
+ kexec-tools-2.0.15-21.el7.x86_64
+ Service enablement:
+ UNIT STATE
+ kdump.service enabled
+ kdump initrd/initramfs:
+ 13585734 Feb 19 05:51 initramfs-3.10.0-957.el7.x86_64kdump.img
+ Memory reservation config:
+ /proc/cmdline { crashkernel=auto }
+ GRUB default { crashkernel=auto }
+ Actual memory reservation per /proc/iomem:
+ 2a000000-340fffff : Crash kernel
+ kdump.conf:
+ path /var/crash
+ core_collector makedumpfile -l --message-level 1 -d 31
+ kdump.conf "path" available space:
+ System MemTotal (uncompressed core size) { 1.80 GiB }
+ Available free space on target path's fs { 22.68 GiB } (fs=/)
+ Panic sysctls:
+ kernel.sysrq [bitmask] = "16" (see proc man page)
+ kernel.panic [secs] = 0 (no autoreboot on panic)
+ kernel.hung_task_panic = 0
+ kernel.panic_on_oops = 1
+ kernel.panic_on_io_nmi = 0
+ kernel.panic_on_unrecovered_nmi = 0
+ kernel.panic_on_stackoverflow = 0
+ kernel.softlockup_panic = 0
+ kernel.unknown_nmi_panic = 0
+ kernel.nmi_watchdog = 1
+ vm.panic_on_oom [0-2] = 0 (no panic)
+```
+
+要查看有关 CPU 的信息,请使用 `-c` 或 `--cpu` 开关运行 `xsos`。
+
+```
+# xsos --cpu /var/tmp/sosreport-CentOS7-01-1005-2019-05-12-pomeqsa
+CPU
+ 1 logical processors
+ 1 Intel Core i7-6700HQ CPU @ 2.60GHz (flags: aes,constant_tsc,ht,lm,nx,pae,rdrand)
+```
+
+To view about memory utilization, run xsos with `-m, --mem` switch.
+
+```
+# xsos --mem /var/tmp/sosreport-CentOS7-01-1005-2019-05-12-pomeqsa
+MEMORY
+ Stats graphed as percent of MemTotal:
+ MemUsed ▊▊▊▊▊▊▊▊▊▊▊▊▊▊▊▊▊▊▊▊▊▊▊▊▊▊▊▊▊..................... 58.8%
+ Buffers .................................................. 0.6%
+ Cached ▊▊▊▊▊▊▊▊▊▊▊▊▊▊▊................................... 29.9%
+ HugePages .................................................. 0.0%
+ Dirty .................................................. 0.7%
+ RAM:
+ 1.8 GiB total ram
+ 1.1 GiB (59%) used
+ 0.5 GiB (28%) used excluding Buffers/Cached
+ 0.01 GiB (1%) dirty
+ HugePages:
+ No ram pre-allocated to HugePages
+ LowMem/Slab/PageTables/Shmem:
+ 0.09 GiB (5%) of total ram used for Slab
+ 0.02 GiB (1%) of total ram used for PageTables
+ 0.01 GiB (1%) of total ram used for Shmem
+ Swap:
+ 0 GiB (0%) used of 2 GiB total
+```
+
+要查看添加的磁盘信息,请使用 `-d` 和 `-disks` 开关运行 `xsos`。
+
+```
+# xsos --disks /var/tmp/sosreport-CentOS7-01-1005-2019-05-12-pomeqsa
+STORAGE
+ Whole Disks from /proc/partitions:
+ 2 disks, totaling 40 GiB (0.04 TiB)
+ - - - - - - - - - - - - - - - - - - - - -
+ Disk Size in GiB
+ ---- -----------
+ sda 30
+ sdb 10
+```
+
+要查看网络接口配置,请使用 `-e` 或 `--ethtool` 开关运行 `xsos`。
+
+```
+# xsos --ethtool /var/tmp/sosreport-CentOS7-01-1005-2019-05-12-pomeqsa
+ETHTOOL
+ Interface Status:
+ enp0s10 0000:00:0a.0 link=up 1000Mb/s full (autoneg=Y) rx ring 256/4096 drv e1000 v7.3.21-k8-NAPI / fw UNKNOWN
+ enp0s9 0000:00:09.0 link=up 1000Mb/s full (autoneg=Y) rx ring 256/4096 drv e1000 v7.3.21-k8-NAPI / fw UNKNOWN
+ virbr0 N/A link=DOWN rx ring UNKNOWN drv bridge v2.3 / fw N/A
+ virbr0-nic tap link=DOWN rx ring UNKNOWN drv tun v1.6 / fw UNKNOWN
+```
+
+要查看有关 IP 地址的信息,请使用 `-i` 或 `--ip` 开关运行 `xsos`。
+
+```
+# xsos --ip /var/tmp/sosreport-CentOS7-01-1005-2019-05-12-pomeqsa
+IP4
+ Interface Master IF MAC Address MTU State IPv4 Address
+ ========= ========= ================= ====== ===== ==================
+ lo - - 65536 up 127.0.0.1/8
+ enp0s9 - 08:00:27:0b:bc:e9 1500 up 192.168.1.8/24
+ enp0s10 - 08:00:27:b2:08:91 1500 up 192.168.1.9/24
+ virbr0 - 52:54:00:ae:01:94 1500 up 192.168.122.1/24
+ virbr0-nic virbr0 52:54:00:ae:01:94 1500 DOWN -
+
+IP6
+ Interface Master IF MAC Address MTU State IPv6 Address Scope
+ ========= ========= ================= ====== ===== =========================================== =====
+ lo - - 65536 up ::1/128 host
+ enp0s9 - 08:00:27:0b:bc:e9 1500 up fe80::945b:8333:f4bc:9723/64 link
+ enp0s10 - 08:00:27:b2:08:91 1500 up fe80::7ed4:1fab:23c3:3790/64 link
+ virbr0 - 52:54:00:ae:01:94 1500 up - -
+ virbr0-nic virbr0 52:54:00:ae:01:94 1500 DOWN - -
+```
+
+要通过 `ps` 查看正在运行的进程,请使用 `-p` 或 `--ps` 开关运行 `xsos`。
+
+```
+# xsos --ps /var/tmp/sosreport-CentOS7-01-1005-2019-05-12-pomeqsa
+PS CHECK
+ Total number of threads/processes:
+ 501 / 171
+ Top users of CPU & MEM:
+ USER %CPU %MEM RSS
+ root 20.6% 14.1% 0.30 GiB
+ gdm 0.3% 16.8% 0.33 GiB
+ postfix 0.0% 0.6% 0.01 GiB
+ polkitd 0.0% 0.6% 0.01 GiB
+ daygeek 0.0% 0.2% 0.00 GiB
+ colord 0.0% 0.4% 0.01 GiB
+ Uninteruptible sleep threads/processes (0/0):
+ [None]
+ Defunct zombie threads/processes (0/0):
+ [None]
+ Top CPU-using processes:
+ USER PID %CPU %MEM VSZ-MiB RSS-MiB TTY STAT START TIME COMMAND
+ root 6542 15.6 4.2 875 78 pts/0 Sl+ 10:11 0:07 /usr/bin/python /sbin/sosreport
+ root 7582 3.0 0.1 10 2 pts/0 S 10:12 0:00 /bin/bash /usr/sbin/dracut --print-cmdline
+ root 7969 0.7 0.1 95 4 ? Ss 10:12 0:00 /usr/sbin/certmonger -S -p
+ root 7889 0.4 0.2 24 4 ? Ss 10:12 0:00 /usr/lib/systemd/systemd-hostnamed
+ gdm 3866 0.3 7.1 2856 131 ? Sl 09:50 0:04 /usr/bin/gnome-shell
+ root 8553 0.2 0.1 47 3 ? S 10:12 0:00 /usr/lib/systemd/systemd-udevd
+ root 6971 0.2 0.4 342 9 ? Sl 10:12 0:00 /usr/sbin/abrt-dbus -t133
+ root 3200 0.2 0.9 982 18 ? Ssl 09:50 0:02 /usr/sbin/libvirtd
+ root 2855 0.1 0.1 88 3 ? Ss 09:50 0:01 /sbin/rngd -f
+ rtkit 2826 0.0 0.0 194 2 ? SNsl 09:50 0:00 /usr/libexec/rtkit-daemon
+ Top MEM-using processes:
+ USER PID %CPU %MEM VSZ-MiB RSS-MiB TTY STAT START TIME COMMAND
+ gdm 3866 0.3 7.1 2856 131 ? Sl 09:50 0:04 /usr/bin/gnome-shell
+ root 6542 15.6 4.2 875 78 pts/0 Sl+ 10:11 0:07 /usr/bin/python /sbin/sosreport
+ root 3264 0.0 1.2 271 23 tty1 Ssl+ 09:50 0:00 /usr/bin/X :0 -background
+ root 3200 0.2 0.9 982 18 ? Ssl 09:50 0:02 /usr/sbin/libvirtd
+ root 3189 0.0 0.9 560 17 ? Ssl 09:50 0:00 /usr/bin/python2 -Es /usr/sbin/tuned
+ gdm 4072 0.0 0.9 988 17 ? Sl 09:50 0:00 /usr/libexec/gsd-media-keys
+ gdm 4076 0.0 0.8 625 16 ? Sl 09:50 0:00 /usr/libexec/gsd-power
+ gdm 4056 0.0 0.8 697 16 ? Sl 09:50 0:00 /usr/libexec/gsd-color
+ root 2853 0.0 0.7 622 14 ? Ssl 09:50 0:00 /usr/sbin/NetworkManager --no-daemon
+ gdm 4110 0.0 0.7 544 14 ? Sl 09:50 0:00 /usr/libexec/gsd-wacom
+ Top thread-spawning processes:
+ # USER PID %CPU %MEM VSZ-MiB RSS-MiB TTY STAT START TIME COMMAND
+ 17 root 3200 0.2 0.9 982 18 ? - 09:50 0:02 /usr/sbin/libvirtd
+ 12 root 6542 16.1 4.5 876 83 pts/0 - 10:11 0:07 /usr/bin/python /sbin/sosreport
+ 10 gdm 3866 0.3 7.1 2856 131 ? - 09:50 0:04 /usr/bin/gnome-shell
+ 7 polkitd 2864 0.0 0.6 602 13 ? - 09:50 0:01 /usr/lib/polkit-1/polkitd --no-debug
+ 6 root 2865 0.0 0.0 203 1 ? - 09:50 0:00 /usr/sbin/gssproxy -D
+ 5 root 3189 0.0 0.9 560 17 ? - 09:50 0:00 /usr/bin/python2 -Es /usr/sbin/tuned
+ 5 root 2823 0.0 0.3 443 6 ? - 09:50 0:00 /usr/libexec/udisks2/udisksd
+ 5 gdm 4102 0.0 0.2 461 5 ? - 09:50 0:00 /usr/libexec/gsd-smartcard
+ 4 root 3215 0.0 0.2 470 4 ? - 09:50 0:00 /usr/sbin/gdm
+ 4 gdm 4106 0.0 0.2 444 5 ? - 09:50 0:00 /usr/libexec/gsd-sound
+```
+
+--------------------------------------------------------------------------------
+
+via: https://www.2daygeek.com/xsos-a-tool-to-read-sosreport-in-linux/
+
+作者:[Magesh Maruthamuthu][a]
+选题:[lujun9972][b]
+译者:[wxy](https://github.com/wxy)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]: https://www.2daygeek.com/author/magesh/
+[b]: https://github.com/lujun9972
+[1]: https://www.2daygeek.com/how-to-create-collect-sosreport-in-linux/
+[2]: https://www.2daygeek.com/oswbb-how-to-install-and-configure-oswatcher-black-box-for-system-diagnostics/
+[3]: https://github.com/ryran/xsos
+[4]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
+[5]: https://www.2daygeek.com/wp-content/uploads/2019/05/xsos-a-tool-to-read-sosreport-in-linux-1.jpg