diff --git a/translated/tech/20200408 How to Create Templates in LibreOffice to Save Time and Increase Productivity.md b/published/20200408 How to Create Templates in LibreOffice to Save Time and Increase Productivity.md similarity index 71% rename from translated/tech/20200408 How to Create Templates in LibreOffice to Save Time and Increase Productivity.md rename to published/20200408 How to Create Templates in LibreOffice to Save Time and Increase Productivity.md index e0f4ae64ea..1377f03523 100644 --- a/translated/tech/20200408 How to Create Templates in LibreOffice to Save Time and Increase Productivity.md +++ b/published/20200408 How to Create Templates in LibreOffice to Save Time and Increase Productivity.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) -[#]: translator: (qfzy1233 ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: translator: (qfzy1233) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12118-1.html) [#]: subject: (How to Create Templates in LibreOffice to Save Time and Increase Productivity) [#]: via: (https://itsfoss.com/create-templates-libreoffice/) [#]: author: (Dimitrios Savvopoulos https://itsfoss.com/author/dimitrios/) @@ -10,7 +10,9 @@ 如何在 LibreOffice 中创建模板以实现省时高效 ====== -在 [LibreOffice][1] 中为你经常使用的文档创建模板可以为你节省一些时间。它可以是信件,是财务表格抑或是简报。 +![](https://img.linux.net.cn/data/attachment/album/202004/16/214314y17oww0ymfylyn1m.jpg) + +在 [LibreOffice][1] 中为你经常使用的文档创建模板可以为你节省一些时间。它可以是信件、财务表格抑或是简报。 模板不仅可以为你节省时间,另一方面它可以保证在同一机构内参与统一项目的小组成员文档的一致性。 @@ -20,11 +22,11 @@ LibreOffice 默认情况下提供了一些模板,但并不仅仅局限于使 我认为模板是每个用户都应该了解的 [LibreOffice 基础技巧之一][2]。下面我将为你演示如何使用。 -###如何在 LibreOffice 中创建一个模板 +### 如何在 LibreOffice 中创建一个模板 首先,创建你希望通过最少的编辑就可以重复使用的文档。它可以是文档、电子表格或演示文稿。我在示例中使用的是 word 文档,但是所有步骤都是相同的。 -然后转到文件选项卡并选择存储为模板。你将被提示输入名称及选择类别,再单击保存。 +然后转到“文件”选项卡并选择“存储为模板”。你将被提示输入“名称”及选择“类别”,再单击“保存”。 ![Creating a new template in LibreOffice][3] @@ -40,31 +42,23 @@ LibreOffice 默认情况下提供了一些模板,但并不仅仅局限于使 选择模板后,单击打开。你就可以随意编辑了。 -### 如何在LibreOffice中更改模板 +### 如何在 LibreOffice 中更改模板 我们需求可能会不时变化,所以需要对模板进行相应。 -编辑一个现有的模板,单击文件>然后右键单击所需的模板,然后单击编辑。 +编辑一个现有的模板,单击“文件” -> “模板”,然后右键单击所需的模板,然后单击“编辑”。 ![edit Template][5] -当您完成对模板的编辑时,单保存以使更改生效。 - -**推荐阅读:** - -![][6] - -#### [7 个高效使用 LibreOffice 的小技巧][2] - -LibreOffice 是一个优秀的办公套件。这些 LibreOffice 技巧将帮助你使用时更为高效。 +当你完成对模板的编辑时,单击“保存”以使更改生效。 总之,模板不仅可以减少重复任务的工作量,还可以防止用户出错。你可以利用电脑优势来灵活的处理重复性的任务,并以此提高你的效率。 -福利小贴士 +> 福利小贴士 -你可以在[LibreOffice网站][7]上找到大量的附加模板。你可以搜索你需要的,下载并使用它们。请注意,这些模板来自第三方和未经验证的用户。所以使用它们的风险需要自己承担。 +你可以在 [LibreOffice 网站][7]上找到大量的附加模板。你可以搜索你需要的,下载并使用它们。请注意,这些模板来自第三方和未经验证的用户。所以使用它们的风险需要自己承担。 -之后我会继续分享更多这样的技巧。同时,您还可以学习如何创建模板[在GNOME的右键菜单上下文中添加“创建新文档”选项][8]。 +之后我会继续分享更多这样的技巧。同时,你还可以学习一下如何创建模板[在 GNOME 的右键菜单上下文中添加“创建新文档”选项][8]。 -------------------------------------------------------------------------------- @@ -73,8 +67,8 @@ via: https://itsfoss.com/create-templates-libreoffice/ 作者:[Dimitrios Savvopoulos][a] 选题:[lujun9972][b] -译者:[qfzy1233](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) +译者:[qfzy1233](https://github.com/qfzy1233) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/sources/news/20200416 State of software engineering, JavaScript is the future, and more industry trends.md b/sources/news/20200416 State of software engineering, JavaScript is the future, and more industry trends.md new file mode 100644 index 0000000000..201d0242e8 --- /dev/null +++ b/sources/news/20200416 State of software engineering, JavaScript is the future, and more industry trends.md @@ -0,0 +1,53 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (State of software engineering, JavaScript is the future, and more industry trends) +[#]: via: (https://opensource.com/article/20/4/state-software-engineering-javascript-and-more-industry-trends) +[#]: author: (Tim Hildred https://opensource.com/users/thildred) + +State of software engineering, JavaScript is the future, and more industry trends +====== +A weekly look at open source community and industry trends. +![Person standing in front of a giant computer screen with numbers, data][1] + +As part of my role as a senior product marketing manager at an enterprise software company with an open source development model, I publish a regular update about open source community, market, and industry trends for product marketers, managers, and other influencers. Here are five of my and their favorite articles from that update. + +## [State of Software Engineering in 2020][2] + +> Software is moving fast, and it is fusing into all other areas of industry. As it is a growing field, learning to program and improving your skills in software engineering can have get you great returns in the future. Moreover, identifying the fastest growing areas of software and investing your time into them can get you to even better places. Keep learning and try to find opportunities that you can capitalize on or products that can serve a niche in a growing field of software. When that niche becomes mainstream, you can end up with a successful product in your hands, which can become your future success. If it fails, it will be an immense experience on the path to becoming a product person. + +**The impact**: Learn COBOL, see the world! + +## [Why JavaScript is the programming language of the future][3] + +> JavaScript has one of the most mature – if not THE most mature – ecosystems a programming language could ever have. The community for JavaScript is vast, and the entry barrier is extremely low. + +**The impact**: The only knowledge I have of the veracity of this statement comes from the JavaScript people I follow on Twitter. If you can indeed extrapolate from them, then JavaScript has a pretty good shot. + +## [Why Linux containers are a CIO's best friend][4] + +> "A big take-away for CIOs is that fit enterprises increasingly view IT as a point of leverage for the business. Having a clear and consistent overall business strategy ranks as one of the most distinctive traits of fit enterprises," said Gartner VP and Distinguished Analyst Andy Roswell-Jones, in Gartner's report on the survey. "In such organizations, digital technology will drive that strategy." + +**The impact**: Point of leverage meaning that if the IT an organization is selected in reference to and in support of that organization's overall strategy there will be an outsized lift on execution against that strategy. The corollary is that without a clear and consistent business strategy no technology can save your enterprise. + +_I hope you enjoyed this list and come back next week for more open source community, market, and industry trends._ + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/state-software-engineering-javascript-and-more-industry-trends + +作者:[Tim Hildred][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/thildred +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/data_metrics_analytics_desktop_laptop.png?itok=9QXd7AUr (Person standing in front of a giant computer screen with numbers, data) +[2]: https://quanticdev.com/articles/software-engineering-in-2020/ +[3]: https://www.freecodecamp.org/news/future-of-javascript/ +[4]: https://www.ciodive.com/news/linux-containers-kubernetes/575506/ diff --git a/sources/talk/20200416 Contact tracing via Bluetooth could help track COVID-19 transmission.md b/sources/talk/20200416 Contact tracing via Bluetooth could help track COVID-19 transmission.md new file mode 100644 index 0000000000..86fa318f1c --- /dev/null +++ b/sources/talk/20200416 Contact tracing via Bluetooth could help track COVID-19 transmission.md @@ -0,0 +1,55 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Contact tracing via Bluetooth could help track COVID-19 transmission) +[#]: via: (https://www.networkworld.com/article/3538333/contact-tracing-via-bluetooth-could-help-track-covid-19-transmission.html) +[#]: author: (Jon Gold https://www.networkworld.com/author/Jon-Gold/) + +Contact tracing via Bluetooth could help track COVID-19 transmission +====== + +Thinkstock + +[[Get regularly scheduled insights by signing up for Network World newsletters.]][1] + +A team of researchers from MIT has developed a novel method of tracking COVID-19 transmission among the population, using Bluetooth “chirps” that could automatically trace COVID-positive contacts and warn those who have potentially become infected, without violating their privacy. + +The system is called PACT, or Private Automated Contact Tracing. It works by sending random strings of numbers via low-power Bluetooth from a user’s smartphone to other nearby devices using the system, creating a coded list of smartphones that a given user has been close to in the past 14 days. + +If the user subsequently tests positive for COVID, he or she can upload that list of “chirps” to the database, so that other users can run a check to determine whether they might have exposed. + +MIT said that the system uses advanced privacy protection methods to ensure the privacy of both COVID sufferers and those checking to see whether they’ve been exposed. People would need to opt in, and researchers specifically highlighted that PACT does not use any GPS, wireless location or phone ID information. + +“For these broadcasts, we’re using cryptographic techniques to generate random, rotating numbers that are not just anonymous, but pseudonymous, constantly changing their ‘ID,’ and that can’t be traced back to an individual,” said MIT institute professor Ron Rivest, who led the project. (Rivest knows a  thing or two about cryptography: he’s the R in RSA, the first publicly available public-key cryptosystem.) + +The idea behind PACT is to make sure that the system isn’t tracking any individuals specifically. Rather, it’s meant to be a yes/no resource for those wondering whether they may have been in proximity to someone with COVID. It’s currently at the proof-of-concept stage – the team recently overcame the hurdle of getting Androids and iPhones to speak to each other – and overtures have been made to smartphone makers, Apple, Google and Microsoft to try and get the system into the public’s hands as quickly as possible. + +“The aim of the prototype is to prove to these developers that this is feasible for them to implement,” said Rivest. + +**[ [Take this mobile device management course from PluralSight and learn how to secure devices in your company without degrading the user experience.][2] ]** + +The team hopes that if PACT comes into widespread use it would enable a much more selective approach to quarantine and give communities the ability to return to normalcy more quickly. Tracking the spread of a disease like COVID with more speed and precision could let public health authorities suggest testing to specific groups of people if they notice a pattern emerging. + +MIT also said that the team has demonstrated PACT to various government agencies, and coordinating similar efforts elsewhere in the U.S., as well as in Europe. + +Join the Network World communities on [Facebook][3] and [LinkedIn][4] to comment on topics that are top of mind. + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3538333/contact-tracing-via-bluetooth-could-help-track-covid-19-transmission.html + +作者:[Jon Gold][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/Jon-Gold/ +[b]: https://github.com/lujun9972 +[1]: https://www.networkworld.com/newsletters/signup.html +[2]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fcourses%2Fmobile-device-management-big-picture +[3]: https://www.facebook.com/NetworkWorld/ +[4]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200416 Harvesting ambient energy will power IoT, scientists say.md b/sources/talk/20200416 Harvesting ambient energy will power IoT, scientists say.md new file mode 100644 index 0000000000..8831fcbfbe --- /dev/null +++ b/sources/talk/20200416 Harvesting ambient energy will power IoT, scientists say.md @@ -0,0 +1,66 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Harvesting ambient energy will power IoT, scientists say) +[#]: via: (https://www.networkworld.com/article/3536697/harvesting-ambient-energy-will-power-iot-scientists-say.html) +[#]: author: (Patrick Nelson https://www.networkworld.com/author/Patrick-Nelson/) + +Harvesting ambient energy will power IoT, scientists say +====== +Magnetic fields found naturally around electrical devices could be diverted and converted into electricity to power the IoT. +Thinkstock + +Stray, ambient magnetic fields that are naturally created from electricity usage should be captured, diverted, and converted into power for Internet of Things sensors, researchers say. + +"Just like sunlight is a free source of energy we try to harvest, so are magnetic fields," said Shashank Priya, professor of materials science and engineering and associate vice president for research at Penn State, in a statement published [on the university's web site][1]. "We have this ubiquitous energy present in our homes, office spaces, work spaces and cars. It's everywhere, and we have an opportunity to harvest this background noise and convert it to useable electricity." + +Electricity produces tiny magnetic fields around common power cables, computers and lighting found in factories, homes and offices. That energy, if harnessed, could power sensors and small data-sending radios, the academics think. Penn State is attempting to design ambient power receptors for IoT. + +### Materials science + +The group at Penn State has been having some success getting it to work. Experimental devices that are thin and about 1.5 inches long are being tested. Placing the capture-device around or on common appliances does produce electricity, the researchers claim. The key is to put the device where the magnetic field is the strongest. In one experiment, the researchers were able to generate enough power to run 180 LED lighting arrays with a device placed about 4 inches from a space heater. At 8 inches, the device produced enough electricity to operate a clock. + +"These results provide significant advancements toward sustainable power for integrated sensors and wireless communication systems," said Min Gyu Kang, an assistant research professor at Penn State and joint lead author of the study. + +Electricity and magnetism have always gone hand in hand. Magnetism is created by a moving electric charge. It's that movement which creates the magnetic field. That's why low-level magnetism is manifested in electrical wires generally, for example—the electricity is moving along the cable. + +In this case, the scientists are converting the magnetic field, which is caused by the moving electricity, into a separate electrical current. They're doing it with materials science by combining two materials. One of the materials is a magnetostrictor – it converts the magnetic field into stress-generating vibrations. The another material is piezoelectric, which grabs the vibrations and translates that energy into electricity. + +[][2] + +### How to power sensors + +Producing usable power from stray magnetic fields is just one stab at powering the IoT. Just how one goes about producing power for the millions, and possibly billions, of environmental, factory process and other sensors that are expected to come on stream as IoT takes off is up for grabs. + +Batteries have limitations—they need to be changed or charged, for example. Ambient humidity is one possibility I [wrote about recently][3]. In that case, bio-electronics have been proven to capture half-a-volt from ambient air, scientists claim. That's enough to operate rudimentary sensors. Waste heat, too, is another possible source: Researchers are [exploring ways to convert excess heat][4], such as is found in data centers, into light, and then turn that light into electricity. + +Other angles include simply reducing energy consumption through more efficient chips or streamlined wireless communications hardware. Other parasitic techniques are being tried. They include [turning existing wireless noise into a data carrier][5]. It's efficient because one doesn't have to make so much power for radio transceivers—the carrier already exists. + +In the case of the Penn State work, less obvious benefits might exist, too. + +"In buildings, it's known that if you automate a lot of functions, you could actually improve the energy efficiency very significantly," Priya said. “Buildings are one of the largest consumers of electricity in the United States. So even a few percent drop in energy consumption could represent or translate into megawatts of savings. Sensors are what will make it possible to automate these controls, and this technology is a realistic way to power those sensors." + +Join the Network World communities on [Facebook][6] and [LinkedIn][7] to comment on topics that are top of mind. + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3536697/harvesting-ambient-energy-will-power-iot-scientists-say.html + +作者:[Patrick Nelson][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.networkworld.com/author/Patrick-Nelson/ +[b]: https://github.com/lujun9972 +[1]: https://news.psu.edu/story/613154/2020/03/31/research/scientists-tap-unused-energy-source-power-smart-sensor-networks +[2]: https://www.networkworld.com/blog/itaas-and-the-corporate-storage-technology/?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE22140&utm_content=sidebar (ITAAS and Corporate Storage Strategy) +[3]: https://www.networkworld.com/article/3529893/seawater-humidity-inspire-new-ways-to-generate-power.html +[4]: https://www.networkworld.com/article/3410578/data-centers-may-soon-recycle-heat-into-electricity.html +[5]: https://www.networkworld.com/article/3449819/wireless-noise-protocol-can-extend-iot-range.html +[6]: https://www.facebook.com/NetworkWorld/ +[7]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200416 How I-ve adjusted my work-from-home habits.md b/sources/talk/20200416 How I-ve adjusted my work-from-home habits.md new file mode 100644 index 0000000000..251e9a7b9e --- /dev/null +++ b/sources/talk/20200416 How I-ve adjusted my work-from-home habits.md @@ -0,0 +1,86 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How I've adjusted my work-from-home habits) +[#]: via: (https://opensource.com/article/20/4/healthy-remote-work-habits) +[#]: author: (Will Kelly https://opensource.com/users/willkelly) + +How I've adjusted my work-from-home habits +====== +WFH newbs and veterans alike have to adjust to self-quarantine; here's +how to maintain some balance. +![Oatmeal and a laptop.][1] + +I've been a remote worker during various chapters in my career, and have tried to carry those lessons into each new remote work experience. At the end of last year, I switched to a job that lets me work from home. Fast forward to the COVID-19 outbreak; even though I was no WFH novice, I found myself having to adapt just like the many other workers who've been suddenly thrust into remote work. + +In hopes of easing that transition, here are some healthy remote work habits to adapt during a pandemic. + +### Keep exercising even if your gym is closed + +I watched the crowd in my gym dwindle the week before my state government issued its stay at home orders. Whether I've been working in an office or at home, going to the gym helps me vent stress, plus it acts as a logical break in my daily routine because I put down my phone and keyboard to clear my head. + +Fortunately, my gym put some training activities online that I plan to use. I already have a stability ball and Bosu ball in my home office that I began using on day three after the pandemic closed all the offices, schools, and later gyms in my local area. As I write this article, I'm entering week 4 of COVID-19-mandated remote work, and I'm still trying to get back to the exercise dedication and momentum I had before this all happened. + +### Dress (and groom) yourself for work + +I've worked from home on and off during my career. When I started my new job, I decided not to repeat some mistakes I made during the last time I worked from home. One mistake I made was not shaving every day. I also stopped getting dressed for work. + +When you dress and groom yourself for work every day, it can help put you in focus for work. You don't have to be too strict; it is a pandemic after all. I'm still debating on sweatpants Fridays during this crisis. + +### Eat meals away from your desk + +It's too easy to just eat meals at your desk when you work at home. Many even do it at the office. I recommend as you get through your COVID-19-enforced remote working that you use eating as a natural break in the ebbs and flows of your day. For example, unless a deadline was calling, I would go out to lunch to break up my remote working days. These days I get up from my desk, walk outside to get a breath of fresh air and have lunch in my living room. + +### Keep a schedule and track your progress + +It's easy to sleep in when you don't have to go to the office. I recommend trying to keep to your regular schedule as much as possible. It's admittedly easy for me to say that because I live alone. If you're home with children, work with your employer to time-shift your schedule to accommodate the added responsibilities and other challenges you're facing right now. It may take a few iterations to get the right schedule, but you'll appreciate the consistency. + +Another word about keeping a schedule—you might add important work meetings to your personal calendar or as reminders on your mobile device, so you have another reminder as you adjust to the new normal of COVID-19. + +The open source community has a lot of great scheduling and project management tools that you can use to track your own time and progress. There are [project management tools][2] for agile development teams. You can also find open source alternatives to [Googl][3][e Calendar][3] available on Android. + +### Put backup communications channels in place + +Even companies with robust telework programs may see some communications outages. It may not even be their CIO's fault, such as the Microsoft Teams outage that happened in Europe early on during the COVID-19 pandemic. + +Having problems dialing into a conference bridge or your employer's group chat having sporadic issues will surprise nobody right now; most understand that workers are in a period of transition, and not everything will run smoothly. However, you still need to have backup channels in place to make that communication happen, even if it's just coworkers exchanging cell numbers so they can text or call each other as needed. + +There are some fully-featured open source [Slack alternatives][4] available that are worth exploring if your organization is lacking in chat applications or if you want to give your team a backup channel to your official corporate application. (Whether you do it with the approval of your corporate IT department is up to you). + +You should also consider installing implementing [MediaWiki][5] or [Twiki][6] to improve collaboration or to give your team an accessible document repository. + +### Pivot on communications when needed + +Every company where I've been an employee or contractor has had its own communications style. Remote working at scale during the COVID-19 epidemic will challenge those communication styles. + +Be prepared to shake up your communication style, whether you're a newb or long term remote worker. That could mean writing more detailed emails instead of the terse ones you normally send to becoming more of a power user with your company's group chat tool. There are also the open source wikis I mentioned earlier that can provide you a centralized platform for any long-form writing you need to do to help communicate project requirements and changes. + +I also extend this advice to your personal communications during the workday. For example, a friend and I video conference during the day. We never did that pre-COVID-19. + +### Final thoughts + +Lots of people will evolve and rethink their remote work habits. It's only healthy that you prepare yourself for adjusting your own remote working habits. What worked for me pre-COVID-19 doesn't necessarily work right now, so I'm adjusting my remote work habits weekly as I see fit so I can maximize my productivity during the current crisis. + +How are you adjusting your remote work habits during self-quarantine? + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/healthy-remote-work-habits + +作者:[Will Kelly][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/willkelly +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/oatmeal-and-fedora.jpg?itok=NBFUH9eF (Oatmeal and a laptop.) +[2]: https://opensource.com/article/18/2/agile-project-management-tools +[3]: https://www.androidpolice.com/2019/12/30/the-best-free-and-open-source-alternatives-to-google-calendar-on-android/ +[4]: https://opensource.com/alternatives/slack +[5]: http://www.mediawiki.org/ +[6]: http://www.twiki.org/ diff --git a/sources/tech/20190814 9 open source cloud native projects to consider.md b/sources/tech/20190814 9 open source cloud native projects to consider.md deleted file mode 100644 index b3d31fc7af..0000000000 --- a/sources/tech/20190814 9 open source cloud native projects to consider.md +++ /dev/null @@ -1,266 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (messon007) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (9 open source cloud native projects to consider) -[#]: via: (https://opensource.com/article/19/8/cloud-native-projects) -[#]: author: (Bryant Son https://opensource.com/users/brsonhttps://opensource.com/users/marcobravo) - -9 open source cloud native projects to consider -====== -Work with containers? Get familiar with these projects from the Cloud -Native Computing Foundation -![clouds in the sky with blue pattern][1] - -As the practice of developing applications with containers is getting more popular, [cloud-native applications][2] are also on the rise. By [definition][3]: - -> "Cloud-native technologies are used to develop applications built with services packaged in containers, deployed as microservices, and managed on elastic infrastructure through agile DevOps processes and continuous delivery workflows." - -This description includes four elements that are integral to cloud-native applications: - - 1. Container - 2. Microservice - 3. DevOps - 4. Continuous integration and continuous delivery (CI/CD) - - - -Although these technologies have very distinct histories, they complement each other well and have led to surprisingly exponential growth of cloud-native applications and toolsets in a short time. This [Cloud Native Computing Foundation][4] (CNCF) infographic shows the size and breadth of the cloud-native application ecosystem today. - -![Cloud-Native Computing Foundation applications ecosystem][5] - -Cloud-Native Computing Foundation projects - -I mean, just look at that! And this is just a start. Just as NodeJS’s creation sparked the explosion of endless JavaScript tools, the popularity of container technology started the exponential growth of cloud-native applications. - -The good news is that there are several organizations that oversee and connect these dots together. One is the [**Open Containers Initiative (OCI)**][6], which is a lightweight, open governance structure (or project), "formed under the auspices of the Linux Foundation for the express purpose of creating open industry standards around container formats and runtime." The other is the **CNCF**, "an open source software foundation dedicated to making cloud native computing universal and sustainable." - -In addition to building a community around cloud-native applications generally, CNCF also helps projects set up structured governance around their cloud-native applications. CNCF created the concept of maturity levels—Sandbox, Incubating, or Graduated—which correspond to the Innovators, Early Adopters, and Early Majority tiers on the diagram below. - -![CNCF project maturity levels][7] - -CNCF project maturity levels - -The CNCF has detailed [criteria][8] for each maturity level (included below for readers’ convenience). A two-thirds supermajority of the Technical Oversight Committee (TOC) is required for a project to be Incubating or Graduated. - -### Sandbox stage - -> To be accepted in the sandbox, a project must have at least two TOC sponsors. See the CNCF Sandbox Guidelines v1.0 for the detailed process. - -### Incubating stage - -> Note: The incubation level is the point at which we expect to perform full due diligence on projects. -> -> To be accepted to incubating stage, a project must meet the sandbox stage requirements plus: -> -> * Document that it is being used successfully in production by at least three independent end users which, in the TOC’s judgement, are of adequate quality and scope. -> * Have a healthy number of committers. A committer is defined as someone with the commit bit; i.e., someone who can accept contributions to some or all of the project. -> * Demonstrate a substantial ongoing flow of commits and merged contributions. -> * Since these metrics can vary significantly depending on the type, scope, and size of a project, the TOC has final judgement over the level of activity that is adequate to meet these criteria -> - - -### Graduated stage - -> To graduate from sandbox or incubating status, or for a new project to join as a graduated project, a project must meet the incubating stage criteria plus: -> -> * Have committers from at least two organizations. -> * Have achieved and maintained a Core Infrastructure Initiative Best Practices Badge. -> * Have completed an independent and third party security audit with results published of similar scope and quality as the following example (including critical vulnerabilities addressed): and all critical vulnerabilities need to be addressed before graduation. -> * Adopt the CNCF Code of Conduct. -> * Explicitly define a project governance and committer process. This preferably is laid out in a GOVERNANCE.md file and references an OWNERS.md file showing the current and emeritus committers. -> * Have a public list of project adopters for at least the primary repo (e.g., ADOPTERS.md or logos on the project website). -> * Receive a supermajority vote from the TOC to move to graduation stage. Projects can attempt to move directly from sandbox to graduation, if they can demonstrate sufficient maturity. Projects can remain in an incubating state indefinitely, but they are normally expected to graduate within two years. -> - - -## 9 projects to consider - -While it’s impossible to cover all of the CNCF projects in this article, I’ll describe are nine of most interesting Graduated and Incubating open source projects. - -Name | License | What It Is ----|---|--- -[Kubernetes][9] | Apache 2.0 | Orchestration platform for containers -[Prometheus][10] | Apache 2.0 | Systems and service monitoring tool -[Envoy][11] | Apache 2.0 | Edge and service proxy -[rkt][12] | Apache 2.0 | Pod-native container engine -[Jaeger][13] | Apache 2.0 | Distributed tracing system -[Linkerd][14] | Apache 2.0 | Transparent service mesh -[Helm][15] | Apache 2.0 | Kubernetes package manager -[Etcd][16] | Apache 2.0 | Distributed key-value store -[CRI-O][17] | Apache 2.0 | Lightweight runtime for Kubernetes - -I also created this video tutorial to walk through these projects. - -## Graduated projects - -Graduated projects are considered mature—adopted by many organizations—and must adhere to the CNCF’s guidelines. Following are three of the most popular open source CNCF Graduated projects. (Note that some of these descriptions are adapted and reused from the projects' websites.) - -### Kubernetes - -Ah, Kubernetes. How can we talk about cloud-native applications without mentioning Kubernetes? Invented by Google, Kubernetes is undoubtedly the most famous container-orchestration platform for container-based applications, and it is also an open source tool. - -What is a container orchestration platform? Basically, a container engine on its own may be okay for managing a few containers. However, when you are talking about thousands of containers and hundreds of services, managing those containers becomes super complicated. This is where the container engine comes in. The container-orchestration engine helps scale containers by automating the deployment, management, networking, and availability of containers. - -Docker Swarm and Mesosphere Marathon are other container-orchestration engines, but it is safe to say that Kubernetes has won the race (at least for now). Kubernetes also gave birth to Container-as-a-Service (CaaS) platforms like [OKD][18], the Origin community distribution of Kubernetes that powers [Red Hat OpenShift][19]. - -To get started, visit the [Kubernetes GitHub repository][9], and access its documentation and learning resources from the [Kubernetes documentation][20] page. - -### Prometheus - -Prometheus is an open source system monitoring and alerting toolkit built at SoundCloud in 2012. Since then, many companies and organizations have adopted Prometheus, and the project has a very active developer and user community. It is now a standalone open source project that is maintained independently of the company. - -![Prometheus’ architecture][21] - -Prometheus’ architecture - -The easiest way to think about Prometheus is to visualize a production system that needs to be up 24 hours a day and 365 days a year. No system is perfect, and there are techniques to reduce failures (called fault-tolerant systems). However, if an issue occurs, the most important thing is to identify it as soon as possible. That is where a monitoring tool like Prometheus comes in handy. Prometheus is more than a container-monitoring tool, but it is most popular among cloud-native application companies. In addition, other open source monitoring tools, including [Grafana][22], leverage Prometheus. - -The best way to get started with Prometheus is to check out its [GitHub repo][10]. Running Prometheus locally is easy, but you need to have a container engine installed. You can access detailed documentation on [Prometheus’ website][23]. - -### Envoy - -Envoy (or Envoy Proxy) is an open source edge and service proxy designed for cloud-native applications. Created at Lyft, Envoy is a high-performance, C++, distributed proxy designed for single services and applications, as well as a communications bus and a universal data plane designed for large microservice service mesh architectures. Built on the learnings of solutions such as Nginx, HAProxy, hardware load balancers, and cloud load balancers, Envoy runs alongside every application and abstracts the network by providing common features in a platform-agnostic manner. - -When all service traffic in an infrastructure flows through an Envoy mesh, it becomes easy to visualize problem areas via consistent observability, tune overall performance, and add substrate features in a single place. Basically, Envoy Proxy is a service mesh tool that helps organizations build a fault-tolerant system for production environments. - -There are numerous alternatives for service mesh applications, such as Uber’s [Linkerd][24] (discussed below) and [Istio][25]. Istio extends Envoy Proxy by deploying as a [Sidecar][26] and leveraging the [Mixer][27] configuration model. Notable Envoy features are: - - * All the "table stakes" features (when paired with a control plane, like Istio) are included - * Low, 99th percentile latencies at scale when running under load - * Acts as an L3/L4 filter at its core with many L7 filters provided out of the box - * Support for gRPC and HTTP/2 (upstream/downstream) - * It’s API-driven and supports dynamic configuration and hot reloads - * Has a strong focus on metric collection, tracing, and overall observability - - - -Understanding Envoy, proving its capabilities, and realizing its full benefits require extensive experience with running production-level environments. You can learn more in its [detailed documentation][28] and by accessing its [GitHub][11] repository. - -## Incubating projects - -Following are six of the most popular open source CNCF Incubating projects. - -### rkt - -rkt, pronounced "rocket," is a pod-native container engine. It has a command-line interface (CLI) for running containers on Linux. In a sense, it is similar to other containers, like [Podman][29], Docker, and CRI-O. - -rkt was originally developed by CoreOS (later acquired by Red Hat), and you can find detailed [documentation][30] on its website and access the source code on [GitHub][12]. - -### Jaeger - -Jaeger is an open source, end-to-end distributed tracing system for cloud-native applications. In one way, it is a monitoring solution like Prometheus. Yet it is different because its use cases extend into: - - * Distributed transaction monitoring - * Performance and latency optimization - * Root-cause analysis - * Service dependency analysis - * Distributed context propagation - - - -Jaeger is an open source technology built by Uber. You can find [detailed documentation][31] on its website and its [source code][13] on GitHub. - -### Linkerd - -Like Lyft with Envoy Proxy, Uber developed Linkerd as an open source solution to maintain its service at the production level. In some ways, Linkerd is just like Envoy, as both are service mesh tools designed to give platform-wide observability, reliability, and security without requiring configuration or code changes. - -However, there are some subtle differences between the two. While Envoy and Linkerd function as proxies and can report over services that are connected, Envoy isn’t designed to be a Kubernetes Ingress controller, as Linkerd is. Notable features of Linkerd include: - - * Support for multiple platforms (Docker, Kubernetes, DC/OS, Amazon ECS, or any stand-alone machine) - * Built-in service discovery abstractions to unite multiple systems - * Support for gRPC, HTTP/2, and HTTP/1.x requests plus all TCP traffic - - - -You can read more about it on [Linkerd’s website][32] and access its source code on [GitHub][14]. - -### Helm - -Helm is basically the package manager for Kubernetes. If you’ve used Apache Maven, Maven Nexus, or a similar service, you will understand Helm’s purpose. Helm helps you manage your Kubernetes application. It uses "Helm Charts" to define, install, and upgrade even the most complex Kubernetes applications. Helm isn’t the only method for this; another concept becoming popular is [Kubernetes Operators][33], which are used by Red Hat OpenShift 4. - -You can try Helm by following the [quickstart guide][34] in its documentation or its [GitHub guide][15]. - -### Etcd - -Etcd is a distributed, reliable key-value store for the most critical data in a distributed system. Its key features are: - - * Well-defined, user-facing API (gRPC) - * Automatic TLS with optional client certificate authentication - * Speed (benchmarked at 10,000 writes per second) - * Reliability (distributed using Raft) - - - -Etcd is used as a built-in default data storage for Kubernetes and many other technologies. That said, it is rarely run independently or as a separate service; instead, it utilizes the one integrated into Kubernetes, OKD/OpenShift, or another service. There is also an [etcd Operator][35] to manage its lifecycle and unlock its API management capabilities: - -You can learn more in [etcd’s documentation][36] and access its [source code][16] on GitHub. - -### CRI-O - -CRI-O is an Open Container Initiative (OCI)-compliant implementation of the Kubernetes runtime interface. CRI-O is used for various functions including: - - * Runtime using runc (or any OCI runtime-spec implementation) and OCI runtime tools - * Image management using containers/image - * Storage and management of image layers using containers/storage - * Networking support through the Container Network Interface (CNI) - - - -CRI-O provides plenty of [documentation][37], including guides, tutorials, articles, and even podcasts, and you can also access its [GitHub page][17]. - -* * * - -Did I miss an interesting open source cloud-native project? Please let me know in the comments. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/8/cloud-native-projects - -作者:[Bryant Son][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/brsonhttps://opensource.com/users/marcobravo -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003601_05_mech_osyearbook2016_cloud_cc.png?itok=XSV7yR9e (clouds in the sky with blue pattern) -[2]: https://opensource.com/article/18/7/what-are-cloud-native-apps -[3]: https://thenewstack.io/10-key-attributes-of-cloud-native-applications/ -[4]: https://www.cncf.io -[5]: https://opensource.com/sites/default/files/uploads/cncf_1.jpg (Cloud-Native Computing Foundation applications ecosystem) -[6]: https://www.opencontainers.org -[7]: https://opensource.com/sites/default/files/uploads/cncf_2.jpg (CNCF project maturity levels) -[8]: https://github.com/cncf/toc/blob/master/process/graduation_criteria.adoc -[9]: https://github.com/kubernetes/kubernetes -[10]: https://github.com/prometheus/prometheus -[11]: https://github.com/envoyproxy/envoy -[12]: https://github.com/rkt/rkt -[13]: https://github.com/jaegertracing/jaeger -[14]: https://github.com/linkerd/linkerd -[15]: https://github.com/helm/helm -[16]: https://github.com/etcd-io/etcd -[17]: https://github.com/cri-o/cri-o -[18]: https://www.okd.io/ -[19]: https://www.openshift.com -[20]: https://kubernetes.io/docs/home -[21]: https://opensource.com/sites/default/files/uploads/cncf_3.jpg (Prometheus’ architecture) -[22]: https://grafana.com -[23]: https://prometheus.io/docs/introduction/overview -[24]: https://linkerd.io/ -[25]: https://istio.io/ -[26]: https://istio.io/docs/reference/config/networking/v1alpha3/sidecar -[27]: https://istio.io/docs/reference/config/policy-and-telemetry -[28]: https://www.envoyproxy.io/docs/envoy/latest -[29]: https://podman.io -[30]: https://coreos.com/rkt/docs/latest -[31]: https://www.jaegertracing.io/docs/1.13 -[32]: https://linkerd.io/2/overview -[33]: https://coreos.com/operators -[34]: https://helm.sh/docs -[35]: https://github.com/coreos/etcd-operator -[36]: https://etcd.io/docs/v3.3.12 -[37]: https://github.com/cri-o/cri-o/blob/master/awesome.md diff --git a/sources/tech/20200413 How to install Python on Linux.md b/sources/tech/20200413 How to install Python on Linux.md index cc46e86ef4..07d4aa4087 100644 --- a/sources/tech/20200413 How to install Python on Linux.md +++ b/sources/tech/20200413 How to install Python on Linux.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) diff --git a/sources/tech/20200415 How to Open Files and Folders as Administrator in Nautilus File Manager in Linux.md b/sources/tech/20200415 How to Open Files and Folders as Administrator in Nautilus File Manager in Linux.md deleted file mode 100644 index 5dc6cd023a..0000000000 --- a/sources/tech/20200415 How to Open Files and Folders as Administrator in Nautilus File Manager in Linux.md +++ /dev/null @@ -1,89 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to Open Files and Folders as Administrator in Nautilus File Manager in Linux) -[#]: via: (https://itsfoss.com/open-nautilus-as-administrator/) -[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) - -How to Open Files and Folders as Administrator in Nautilus File Manager in Linux -====== - -_**Learn to add an “Open as Administrator” option in the right click context menu in Nautilus file manager in Ubuntu and other Linux distributions.**_ - -If you want to open or edit a file as root, you can always do that in the terminal. I know a few people don’t feel too comfortable with the command line. - -The desktop Linux often provides ways to avoid the command line for terminal-fearing people. - -If you are in a situation where you have to access a folder as root or edit a file with root privilege, you can do that graphically in [Nautilus file manager][1]. - -A neat Nautilus hack allows you to open a files and folders as administrator i.e. root. Let me show you how. - -**Recommended Read:** - -![][2] - -#### [Root User in Ubuntu: Important Things You Should Know][3] - -Root user is essential to any Linux distribution. Learn why Ubuntu locks the root user and how can you use it in this Ubuntu beginner series. - -### Add ‘open as administrator’ option in right click context menu in Nautilus file manager - -_**A word of warning! Please don’t go around opening and editing random files as root as you might mess up with wrong files and end up with a broken system. Use it only in the cases where it is required.**_ - -I am showing the installation steps for Ubuntu. You can change it as per your distribution’s package manager. - -You’ll have to use terminal (even if you don’t like it) for installing the Nautilus plugin. Please [make sure that you have the universe repository enabled][4]: - -``` -sudo apt install nautilus-admin -``` - -Close and open Nautilus file manager again to see the changes in effect. - -![Right clock to see the “Open as Administrator” option][5] - -You can also edit files as root the same way. Just select the file, right click on it and choose the “Edit as Administrator” option. - -![Edit Files As Root Ubuntu][6] - -In both cases, you’ll be prompted to enter your account’s password: - -![You need to enter your password, of course][7] - -That’s pretty much it. You can enjoy the comfort of GUI. - -In case you don’t want to run Nautilus as root anymore, you can remove this plugin. It’s always good to remove additional things you installed but you don’t use anymore. - -In the terminal (yes, again), use the following command to remove the Nautilus plugin. - -``` -sudo apt remove nautilus-admin -``` - -By the way, if you are using [Ubuntu MATE][8], you can use caja-admin, instead of nautilus-admin. Other file managers may or may not provide such a feature. - -I hope you find this quick tip helpful. Questions and suggestions are always welcome. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/open-nautilus-as-administrator/ - -作者:[Abhishek Prakash][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/abhishek/ -[b]: https://github.com/lujun9972 -[1]: https://wiki.gnome.org/Apps/Files -[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/01/root_user_ubuntu.png?fit=800%2C450&ssl=1 -[3]: https://itsfoss.com/root-user-ubuntu/ -[4]: https://itsfoss.com/ubuntu-repositories/ -[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/open-folder-as-administrator-ubuntu.jpg?ssl=1 -[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/edit-files-as-root-ubuntu.jpg?ssl=1 -[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/authentication-pop-up-ubuntu.png?ssl=1 -[8]: https://ubuntu-mate.org/ diff --git a/sources/tech/20200416 How to package Python applications for Linux.md b/sources/tech/20200416 How to package Python applications for Linux.md new file mode 100644 index 0000000000..24e8343038 --- /dev/null +++ b/sources/tech/20200416 How to package Python applications for Linux.md @@ -0,0 +1,179 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to package Python applications for Linux) +[#]: via: (https://opensource.com/article/20/4/package-python-applications-linux) +[#]: author: (Moshe Zadka https://opensource.com/users/moshez) + +How to package Python applications for Linux +====== +Learn how to use dh_virtualenv to make your Python applications +installable as .deb packages. +![Python in a tree][1] + +One way to make Python applications installable on Debian-based operating systems (such as Debian or [Elementary OS][2]) is by using the [dh_virtualenv][3] tool. It builds a **.deb** package that wraps a Python virtual environment around an application and deploys it upon installing. + +In this article, I will explain how to use it with the example of building a package containing the [HTTPie][4] tool to test HTTP APIs from the command line without having to activate a virtual environment. + +### Packaging with dh_virtualenv + +First, you need to install the tools that dh_virtualenv needs. dh_virtualenv's [documentation][5] provides all of the installation options. On my Debian-based system, I entered: + + +``` +`apt-get install dh-virtualenv devscripts` +``` + +While the [devscripts][6] package is not required, it will simplify doing the subsequent operations. + +Now, create a directory to keep the sources. Since this is a local, unofficial, packaging of HTTPie, I called it **myhttp**. Next, let's create some files inside **myhttp** to provide metadata to the Debian build system. + +First, create the **debian/control** file: + + +``` +Source: myhttp +Section: python +Priority: extra +Maintainer: Jan Doe <[jandoe@example.org][7]> +Build-Depends: debhelper (>= 9), python3.7, dh-virtualenv (>= 0.8) +Standards-Version: 3.9.5 + +Package: myhttp +Architecture: any +Pre-Depends: dpkg (>= 1.16.1), python3.7, ${misc:Pre-Depends} +Depends: ${misc:Depends} +Description: http client + Useful for doing stuff +``` + +So what is all this information about? As the [Debian documentation][8] puts it: + +> "Lines 1–7 are the control information for the source package. Lines 9–13 are the control information for the binary package." + +Here's my take: + + * the **section** value is mostly meaningless for our case, but needs to be there. It's meaningful to provide information to the guided UI installer, which is not relevant for this package. + * The extra **Priority** value is the right priority for 3rd party packages like this one. + * It is highly recommended to put real contact details in the **Maintainer** field. It does not have to be your personal e-mail, though -- "Infrastructure Team <[infra-team-list@company.example.com][9]>", for example, if the package is maintained by the team and you would like issues to be sent to the team's mail alias. + * The **build-depends** field indicates that you need debhelper, python, and dh-virtualenv to build the package: the package build process will make sure those dependencies are installed at package build time. + * The **standards version** is mostly for human consumption. It indicates which guide you are following. This guide is based on the official documentation of dh-virtualenv, which is based on the 3.9.5 guide from Debian. It is almost always the best choice to name the binary package and the source package the same. + * The **Architecture** field should be **Any** because a virtual environment might include some architecture-specific files: otherwise, the field would be better chosen as **all**. + * Keep the **pre-depends** list as-is: pre-depends is a pretty strict form of dependencies, and it is rare that you need anything more than the minimum suggested here. The dependencies are usually calculated accurately by the build system, so there is no reason to specify them manually. + * If your package is mostly for internal use, then the **Description** might only specify minimal information and a link to the company wiki; otherwise, more details might be useful. + + + +Then create the **debian/compat** file, which [exists mostly for historical purposes][10]: + + +``` +`$ echo "9" > debian/compat` +``` + +Next, create the changelog to tell package users what has changed since the last release. The easiest way is to use **dch --create** to create a template and then fill in the values. + +Filled in, it looks like: + + +``` +myhttp (2.0.0-1) stable; urgency=medium + +  * Initial release. + + -- Jan Doe <[jandoe@example.org][7]>  Fri, 27 Mar 2020 01:09:22 +0000 +``` + +Now you need to tell the tool to install HTTPie, but which version? + +Create a **requirements.in** file that has loose versions: + + +``` +`httpie` +``` + +In general, the loose requirements file will only contain direct dependencies of your project and will specify minimum versions if needed. It is not always necessary to specify the minimum versions: the tools are usually biased towards tightening the dependencies towards "latest version possible". In the case where your Debian package corresponds to one internal Python package, a common case in internal applications, the loose requirements file will look similar: just one line with the name of the package. + +Then use **pip-compile** (which is available by installing the PyPI package **pip-tools**): + + +``` +`$ pip-compile requirements.in > requirements.txt` +``` + +This will produce a strict dependency file called **requirements.txt**: + + +``` +# +# This file is autogenerated by pip-compile +# To update, run: +# +#    pip-compile requirements.in +# +certifi==2019.11.28       # via requests +chardet==3.0.4            # via requests +httpie==2.0.0             # via -r requirements.in +idna==2.9                 # via requests +pygments==2.6.1           # via httpie +requests==2.23.0          # via httpie +urllib3==1.25.8           # via requests +``` + +Finally, write a **debian/rules** file for creating the package. Since dh_virtualenv does all the hard work, the rules file is simple: + + +``` +#!/usr/bin/make -f + +%: +        dh $@ --with python-virtualenv --python /usr/bin/python3.7 +``` + +Be sure to specify the Python interpreter. By default, it will use the interpreter in **/usr/bin/python**, which is Python 2, but you should use a [supported version of Python][11]. + +The writing is finished; all that's left is to build the package: + + +``` +`$ debuild -b -us -uc` +``` + +This will produce a file in the parent directory with a name like **myhttp_2.0.0-1_amd64.deb**. This file can be installed on any compatible operating system. + +In general, it's best to build Debian packages that are intended for a specific platform, such as Debian 10.0, on the same platform. + +You can store this Debian package in a repository and install it on all relevant systems with, for example, [Ansible][12]. + +### Conclusion + +Packaging applications for Debian-based operating systems is a multi-step process. Using dh_virtualenv will make the process straightforward. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/package-python-applications-linux + +作者:[Moshe Zadka][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/moshez +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/life-python.jpg?itok=F2PYP2wT (Python in a tree) +[2]: https://opensource.com/article/19/12/pantheon-linux-desktop +[3]: https://dh-virtualenv.readthedocs.io/en/latest/ +[4]: https://opensource.com/article/19/8/getting-started-httpie +[5]: https://dh-virtualenv.readthedocs.io/en/1.1/tutorial.html +[6]: http://man.he.net/man1/devscripts +[7]: mailto:jandoe@example.org +[8]: https://www.debian.org/doc/manuals/maint-guide/dreq.en.html#control +[9]: mailto:infra-team-list@company.example.com +[10]: https://www.debian.org/doc/manuals/maint-guide/dother.en.html#compat +[11]: https://opensource.com/article/19/11/end-of-life-python-2 +[12]: https://opensource.com/resources/what-ansible diff --git a/sources/tech/20200416 Learning to love systemd.md b/sources/tech/20200416 Learning to love systemd.md new file mode 100644 index 0000000000..0aa8609ee7 --- /dev/null +++ b/sources/tech/20200416 Learning to love systemd.md @@ -0,0 +1,328 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Learning to love systemd) +[#]: via: (https://opensource.com/article/20/4/systemd) +[#]: author: (David Both https://opensource.com/users/dboth) + +Learning to love systemd +====== +systemd is the mother of all processes, responsible for bringing the +Linux host up to a state where productive work can be done. +![Penguin driving a car with a yellow background][1] + +systemd—yes, all lower-case, even at the beginning of a sentence—is the modern replacement for init and SystemV init scripts. It is also much more. + +Like most sysadmins, when I think of the init program and SystemV, I think of Linux startup and shutdown and not really much else, like managing services once they are up and running. Like init, systemd is the mother of all processes, and it is responsible for bringing the Linux host up to a state in which productive work can be done. Some of the functions assumed by systemd, which is far more extensive than the old init program, are to manage many aspects of a running Linux host, including mounting filesystems, managing hardware, handling timers, and starting and managing the system services that are required to have a productive Linux host. + +This series of articles, which is based in part on excerpts from my three-volume Linux training course, [_Using and administering Linux: zero to sysadmin_][2], explores systemd's functions both at startup and beginning after startup finishes. + +### Linux boot + +The complete process that takes a Linux host from an off state to a running state is complex, but it is open and knowable. Before getting into the details, I'll give a quick overview from when the host hardware is turned on until the system is ready for a user to log in. Most of the time, "the boot process" is discussed as a single entity, but that is not accurate. There are, in fact, three major parts to the full boot and startup process: + + * **Hardware boot:** Initializes the system hardware + * **Linux boot:** Loads the Linux kernel and then systemd + * **Linux startup:** Where systemd prepares the host for productive work + + + +The Linux startup sequence begins after the kernel has loaded either init or systemd, depending upon whether the distribution uses the old or new startup, respectively. The init and systemd programs start and manage all the other processes and are both known as the "mother of all processes" on their respective systems. + +It is important to separate the hardware boot from the Linux boot from the Linux startup and to explicitly define the demarcation points between them. Understanding these differences and what part each plays in getting a Linux system to a state where it can be productive makes it possible to manage these processes and better determine where a problem is occurring during what most people refer to as "boot." + +The startup process follows the three-step boot process and brings the Linux computer up to an operational state in which it is usable for productive work. The startup process begins when the kernel transfers control of the host to systemd. + +### systemd controversy + +systemd can evoke a wide range of reactions from sysadmins and others responsible for keeping Linux systems up and running. The fact that systemd is taking over so many tasks in many Linux systems has engendered pushback and discord among certain groups of developers and sysadmins. + +SystemV and systemd are two different methods of performing the Linux startup sequence. SystemV start scripts and the init program are the old methods, and systemd using targets is the new method. Although most modern Linux distributions use the newer systemd for startup, shutdown, and process management, there are still some that do not. One reason is that some distribution maintainers and some sysadmins prefer the older SystemV method over the newer systemd. + +I think both have advantages. + +#### Why I prefer SystemV + +I prefer SystemV because it is more open. Startup is accomplished using Bash scripts. After the kernel starts the init program, which is a compiled binary, init launches the **rc.sysinit** script, which performs many system initialization tasks. After **rc.sysinit** completes, init launches the **/etc/rc.d/rc** script, which in turn starts the various services defined by the SystemV start scripts in the **/etc/rc.d/rcX.d**, where "X" is the number of the runlevel being started. + +Except for the init program itself, all these programs are open and easily knowable scripts. It is possible to read through these scripts and learn exactly what is taking place during the entire startup process, but I don't think many sysadmins actually do that. Each start script is numbered so that it starts its intended service in a specific sequence. Services are started serially, and only one service starts at a time. + +systemd, developed by Red Hat's Lennart Poettering and Kay Sievers, is a complex system of large, compiled binary executables that are not understandable without access to the source code. It is open source, so "access to the source code" isn't hard, just less convenient. systemd appears to represent a significant refutation of multiple tenets of the Linux philosophy. As a binary, systemd is not directly open for the sysadmin to view or make easy changes. systemd tries to do everything, such as managing running services, while providing significantly more status information than SystemV. It also manages hardware, processes, and groups of processes, filesystem mounts, and much more. systemd is present in almost every aspect of the modern Linux host, making it the one-stop tool for system management. All of this is a clear violation of the tenets that programs should be small and that each program should do one thing and do it well. + +#### Why I prefer systemd + +I prefer systemd as my startup mechanism because it starts as many services as possible in parallel, depending upon the current stage in the startup process. This speeds the overall startup and gets the host system to a login screen faster than SystemV. + +systemd manages almost every aspect of a running Linux system. It can manage running services while providing significantly more status information than SystemV. It also manages hardware, processes and groups of processes, filesystem mounts, and much more. systemd is present in almost every aspect of the modern Linux operating system, making it the one-stop tool for system management. (Does this sound familiar?) + +The systemd tools are compiled binaries, but the tool suite is open because all the configuration files are ASCII text files. Startup configuration can be modified through various GUI and command-line tools, as well as adding or modifying various configuration files to suit the needs of the specific local computing environment. + +#### The real issue + +Did you think I could not like both startup systems? I do, and I can work with either one. + +In my opinion, the real issue and the root cause of most of the controversy between SystemV and systemd is that there is [no choice][3] on the sysadmin level. The choice of whether to use SystemV or systemd has already been made by the developers, maintainers, and packagers of the various distributions—but with good reason. Scooping out and replacing an init system, by its extreme, invasive nature, has a lot of consequences that would be hard to tackle outside the distribution design process. + +Despite the fact that this choice is made for me, my Linux hosts boot up and work, which is what I usually care the most about. As an end user and even as a sysadmin, my primary concern is whether I can get my work done, work such as writing my books and this article, installing updates, and writing scripts to automate everything. So long as I can do my work, I don't really care about the start sequence used on my distro. + +I do care when there is a problem during startup or service management. Regardless of which startup system is used on a host, I know enough to follow the sequence of events to find the failure and fix it. + +#### Replacing SystemV + +There have been previous attempts at replacing SystemV with something a bit more modern. For about two releases, Fedora used a thing called Upstart to replace the aging SystemV, but it did not replace init and provided no changes that I noticed. Because Upstart provided no significant changes to the issues surrounding SystemV, efforts in this direction were quickly dropped in favor of systemd. + +Despite the fact that most Linux developers agree that replacing the old SystemV startup is a good idea, many developers and sysadmins dislike systemd for that. Rather than rehash all the so-called issues that people have—or had—with systemd, I will refer you to two good, if somewhat old, articles that should cover most everything. Linus Torvalds, the creator of the Linux kernel, seems disinterested. In a 2014 ZDNet article, _[Linus Torvalds and others on Linux's systemd][4]_, Linus is clear about his feelings. + +> "I don't actually have any particularly strong opinions on systemd itself. I've had issues with some of the core developers that I think are much too cavalier about bugs and compatibility, and I think some of the design details are insane (I dislike the binary logs, for example), but those are details, not big issues." + +In case you don't know much about Linus, I can tell you that if he does not like something, he is very outspoken, explicit, and quite clear about that dislike. He has become more socially acceptable in his manner of addressing his dislike about things. + +In 2013, Poettering wrote a long blog post in which he debunks the [myths about systemd][5] while providing insight into some of the reasons for creating it. This is a very good read, and I highly recommend it. + +### systemd tasks + +Depending upon the options used during the compile process (which are not considered in this series), systemd can have as many as 69 binary executables that perform the following tasks, among others: + + * The systemd program runs as PID 1 and provides system startup of as many services in parallel as possible, which, as a side effect, speeds overall startup times. It also manages the shutdown sequence. + * The systemctl program provides a user interface for service management. + * Support for SystemV and LSB start scripts is offered for backward compatibility. + * Service management and reporting provide more service status data than SystemV. + * It includes tools for basic system configuration, such as hostname, date, locale, lists of logged-in users, running containers and virtual machines, system accounts, runtime directories and settings, daemons to manage simple network configuration, network time synchronization, log forwarding, and name resolution. + * It offers socket management. + * systemd timers provide advanced cron-like capabilities to include running a script at times relative to system boot, systemd startup, the last time the timer was started, and more. + * It provides a tool to analyze dates and times used in timer specifications. + * Mounting and unmounting of filesystems with hierarchical awareness allows safer cascading of mounted filesystems. + * It enables the positive creation and management of temporary files, including deletion. + * An interface to D-Bus provides the ability to run scripts when devices are plugged in or removed. This allows all devices, whether pluggable or not, to be treated as plug-and-play, which considerably simplifies device handling. + * Its tool to analyze the startup sequence can be used to locate the services that take the most time. + * It includes journals for storing system log messages and tools for managing the journals. + + + +### Architecture + +Those tasks and more are supported by a number of daemons, control programs, and configuration files. Figure 1 shows many of the components that belong to systemd. This is a simplified diagram designed to provide a high-level overview, so it does not include all of the individual programs or files. Nor does it provide any insight into data flow, which is so complex that it would be a useless exercise in the context of this series of articles. + +![systemd architecture][6] + +A full exposition of systemd would take a book on its own. You do not need to understand the details of how the systemd components in Figure 1 fit together; it's enough to know about the programs and components that enable managing various Linux services and deal with log files and journals. But it's clear that systemd is not the monolithic monstrosity it is purported to be by some of its critics. + +### systemd as PID 1 + +systemd is PID 1. Some of its functions, which are far more extensive than the old SystemV3 init program, are to manage many aspects of a running Linux host, including mounting filesystems and starting and managing system services required to have a productive Linux host. Any of systemd's tasks that are not related to the startup sequence are outside the scope of this article (but some will be explored later in this series). + +First, systemd mounts the filesystems defined by **/etc/fstab**, including any swap files or partitions. At this point, it can access the configuration files located in **/etc**, including its own. It uses its configuration link, **/etc/systemd/system/default.target**, to determine which state or target it should boot the host into. The **default.target** file is a symbolic link to the true target file. For a desktop workstation, this is typically going to be the **graphical.target**, which is equivalent to runlevel 5 in SystemV. For a server, the default is more likely to be the **multi-user.target**, which is like runlevel 3 in SystemV. The **emergency.target** is similar to single-user mode. Targets and services are systemd units. + +The table below (Figure 2) compares the systemd targets with the old SystemV startup runlevels. systemd provides the systemd target aliases for backward compatibility. The target aliases allow scripts—and many sysadmins—to use SystemV commands like **init 3** to change runlevels. Of course, the SystemV commands are forwarded to systemd for interpretation and execution. + +**systemd targets** | **SystemV runlevel** | **target aliases** | **Description** +---|---|---|--- +default.target | | | This target is always aliased with a symbolic link to either **multi-user.target** or **graphical.target**. systemd always uses the **default.target** to start the system. The **default.target** should never be aliased to **halt.target**, **poweroff.target**, or **reboot.target**. +graphical.target | 5 | runlevel5.target | **Multi-user.target** with a GUI +| 4 | runlevel4.target | Unused. Runlevel 4 was identical to runlevel 3 in the SystemV world. This target could be created and customized to start local services without changing the default **multi-user.target**. +multi-user.target | 3 | runlevel3.target | All services running, but command-line interface (CLI) only +| 2 | runlevel2.target | Multi-user, without NFS, but all other non-GUI services running +rescue.target | 1 | runlevel1.target | A basic system, including mounting the filesystems with only the most basic services running and a rescue shell on the main console +emergency.target | S | | Single-user mode—no services are running; filesystems are not mounted. This is the most basic level of operation with only an emergency shell running on the main console for the user to interact with the system. +halt.target | | | Halts the system without powering it down +reboot.target | 6 | runlevel6.target | Reboot +poweroff.target | 0 | runlevel0.target | Halts the system and turns the power off + +Each target has a set of dependencies described in its configuration file. systemd starts the required dependencies, which are the services required to run the Linux host at a specific level of functionality. When all the dependencies listed in the target configuration files are loaded and running, the system is running at that target level. In Figure 2, the targets with the most functionality are at the top of the table, with functionality declining towards the bottom of the table. + +systemd also looks at the legacy SystemV init directories to see if any startup files exist there. If so, systemd uses them as configuration files to start the services described by the files. The deprecated network service is a good example of one that still uses SystemV startup files in Fedora. + +Figure 3 (below) is copied directly from the bootup man page. It shows a map of the general sequence of events during systemd startup and the basic ordering requirements to ensure a successful startup. + + +``` +                                         cryptsetup-pre.target +                                                   | + (various low-level                                v +     API VFS mounts:                 (various cryptsetup devices...) +  mqueue, configfs,                                |    | +  debugfs, ...)                                    v    | +  |                                  cryptsetup.target  | +  |  (various swap                                 |    |    remote-fs-pre.target +  |   devices...)                                  |    |     |        | +  |    |                                           |    |     |        v +  |    v                       local-fs-pre.target |    |     |  (network file systems) +  |  swap.target                       |           |    v     v                 | +  |    |                               v           |  remote-cryptsetup.target  | +  |    |  (various low-level  (various mounts and  |             |              | +  |    |   services: udevd,    fsck services...)   |             |    remote-fs.target +  |    |   tmpfiles, random            |           |             |             / +  |    |   seed, sysctl, ...)          v           |             |            / +  |    |      |                 local-fs.target    |             |           / +  |    |      |                        |           |             |          / +  \\____|______|_______________   ______|___________/             |         / +                              \ /                                |        / +                               v                                 |       / +                        sysinit.target                           |      / +                               |                                 |     / +        ______________________/|\\_____________________           |    / +       /              |        |      |               \          |   / +       |              |        |      |               |          |  / +       v              v        |      v               |          | / +  (various       (various      |  (various            |          |/ +   timers...)      paths...)   |   sockets...)        |          | +       |              |        |      |               |          | +       v              v        |      v               |          | + timers.target  paths.target   |  sockets.target      |          | +       |              |        |      |               v          | +       v              \\_______ | _____/         rescue.service   | +                              \|/                     |          | +                               v                      v          | +                           basic.target         rescue.target    | +                               |                                 | +                       ________v____________________             | +                      /              |              \            | +                      |              |              |            | +                      v              v              v            | +                  display-    (various system   (various system  | +              manager.service     services        services)      | +                      |         required for        |            | +                      |        graphical UIs)       v            v +                      |              |            multi-user.target + emergency.service    |              |              | +         |            \\_____________ | _____________/ +         v                          \|/ + emergency.target                    v +                              graphical.target +``` + +The **sysinit.target** and **basic.target** targets can be considered checkpoints in the startup process. Although one of systemd's design goals is to start system services in parallel, certain services and functional targets must be started before other services and targets can start. These checkpoints cannot be passed until all of the services and targets required by that checkpoint are fulfilled. + +The **sysinit.target** is reached when all of the units it depends on are completed. All of those units, mounting filesystems, setting up swap files, starting udev, setting the random generator seed, initiating low-level services, and setting up cryptographic services (if one or more filesystems are encrypted), must be completed but, within the **sysinit.target**, those tasks can be performed in parallel. + +The **sysinit.target** starts up all of the low-level services and units required for the system to be marginally functional and that are required to enable moving onto the **basic.target**. + +After the **sysinit.target** is fulfilled, systemd then starts all the units required to fulfill the next target. The basic target provides some additional functionality by starting units that are required for all of the next targets. These include setting up things like paths to various executable directories, communication sockets, and timers. + +Finally, the user-level targets, **multi-user.target** or **graphical.target**, can be initialized. The **multi-user.target** must be reached before the graphical target dependencies can be met. The underlined targets in Figure 3 are the usual startup targets. When one of these targets is reached, startup has completed. If the **multi-user.target** is the default, then you should see a text-mode login on the console. If **graphical.target** is the default, then you should see a graphical login; the specific GUI login screen you see depends on your default display manager. + +The bootup man page also describes and provides maps of the boot into the initial RAM disk and the systemd shutdown process. + +systemd also provides a tool that lists dependencies of a complete startup or for a specified unit. A unit is a controllable systemd resource entity that can range from a specific service, such as httpd or sshd, to timers, mounts, sockets, and more. Try the following command and scroll through the results. + + +``` +`systemctl list-dependencies graphical.target` +``` + +Notice that this fully expands the top-level target units list required to bring the system up to the graphical target run mode. Use the **\--all** option to expand all of the other units as well. + + +``` +`systemctl list-dependencies --all graphical.target` +``` + +You can search for strings such as "target," "slice," and "socket" using the search tools of the **less** command. + +So now, try the following. + + +``` +`systemctl list-dependencies multi-user.target` +``` + +and + + +``` +`systemctl list-dependencies rescue.target` +``` + +and + + +``` +`systemctl list-dependencies local-fs.target` +``` + +and + + +``` +`systemctl list-dependencies dbus.service` +``` + +This tool helps me visualize the specifics of the startup dependencies for the host I am working on. Go ahead and spend some time exploring the startup tree for one or more of your Linux hosts. But be careful because the systemctl man page contains this note: + +> _"Note that this command only lists units currently loaded into memory by the service manager. In particular, this command is not suitable to get a comprehensive list at all reverse dependencies on a specific unit, as it won't list the dependencies declared by units currently not loaded."_ + +### Final thoughts + +Even before getting very deep into systemd, it's obvious that it is both powerful and complex. It is also apparent that systemd is not a single, huge, monolithic, and unknowable binary file. Rather, it is composed of a number of smaller components and subcommands that are designed to perform specific tasks. + +The next article in this series will explore systemd startup in more detail, as well as systemd configuration files, changing the default target, and how to create a simple service unit. + +### Resources + +There is a great deal of information about systemd available on the internet, but much is terse, obtuse, or even misleading. In addition to the resources mentioned in this article, the following webpages offer more detailed and reliable information about systemd startup. + + * The Fedora Project has a good, practical [guide][7] [to systemd][7]. It has pretty much everything you need to know in order to configure, manage, and maintain a Fedora computer using systemd. + * The Fedora Project also has a good [cheat sheet][8] that cross-references the old SystemV commands to comparable systemd ones. + * For detailed technical information about systemd and the reasons for creating it, check out [Freedesktop.org][9]'s [description of systemd][10]. + * [Linux.com][11]'s "More systemd fun" offers more advanced systemd [information and tips][12]. + + + +There is also a series of deeply technical articles for Linux sysadmins by Lennart Poettering, the designer and primary developer of systemd. These articles were written between April 2010 and September 2011, but they are just as relevant now as they were then. Much of everything else good that has been written about systemd and its ecosystem is based on these papers. + + * [Rethinking PID 1][13] + * [systemd for Administrators, Part I][14] + * [systemd for Administrators, Part II][15] + * [systemd for Administrators, Part III][16] + * [systemd for Administrators, Part IV][17] + * [systemd for Administrators, Part V][18] + * [systemd for Administrators, Part VI][19] + * [systemd for Administrators, Part VII][20] + * [systemd for Administrators, Part VIII][21] + * [systemd for Administrators, Part IX][22] + * [systemd for Administrators, Part X][23] + * [systemd for Administrators, Part XI][24] + + + +Alison Chiaken, a Linux kernel and systems programmer at Mentor Graphics, offers a preview of her... + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/systemd + +作者:[David Both][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/dboth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/car-penguin-drive-linux-yellow.png?itok=twWGlYAc (Penguin driving a car with a yellow background) +[2]: http://www.both.org/?page_id=1183 +[3]: http://www.osnews.com/story/28026/Editorial_Thoughts_on_Systemd_and_the_Freedom_to_Choose +[4]: https://www.zdnet.com/article/linus-torvalds-and-others-on-linuxs-systemd/ +[5]: http://0pointer.de/blog/projects/the-biggest-myths.html +[6]: https://opensource.com/sites/default/files/uploads/systemd-architecture.png (systemd architecture) +[7]: https://docs.fedoraproject.org/en-US/quick-docs/understanding-and-administering-systemd/index.html +[8]: https://fedoraproject.org/wiki/SysVinit_to_Systemd_Cheatsheet +[9]: http://Freedesktop.org +[10]: http://www.freedesktop.org/wiki/Software/systemd +[11]: http://Linux.com +[12]: https://www.linux.com/training-tutorials/more-systemd-fun-blame-game-and-stopping-services-prejudice/ +[13]: http://0pointer.de/blog/projects/systemd.html +[14]: http://0pointer.de/blog/projects/systemd-for-admins-1.html +[15]: http://0pointer.de/blog/projects/systemd-for-admins-2.html +[16]: http://0pointer.de/blog/projects/systemd-for-admins-3.html +[17]: http://0pointer.de/blog/projects/systemd-for-admins-4.html +[18]: http://0pointer.de/blog/projects/three-levels-of-off.html +[19]: http://0pointer.de/blog/projects/changing-roots +[20]: http://0pointer.de/blog/projects/blame-game.html +[21]: http://0pointer.de/blog/projects/the-new-configuration-files.html +[22]: http://0pointer.de/blog/projects/on-etc-sysinit.html +[23]: http://0pointer.de/blog/projects/instances.html +[24]: http://0pointer.de/blog/projects/inetd.html diff --git a/sources/tech/20200417 12 Linux Commands to Have Some Fun in the Terminal.md b/sources/tech/20200417 12 Linux Commands to Have Some Fun in the Terminal.md new file mode 100644 index 0000000000..9c7843ea59 --- /dev/null +++ b/sources/tech/20200417 12 Linux Commands to Have Some Fun in the Terminal.md @@ -0,0 +1,343 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (12 Linux Commands to Have Some Fun in the Terminal) +[#]: via: (https://itsfoss.com/funny-linux-commands/) +[#]: author: (Community https://itsfoss.com/author/itsfoss/) + +12 Linux Commands to Have Some Fun in the Terminal +====== + +_**So, you think Linux terminal is all work and no fun? These funny Linux commands will prove you wrong.**_ + +The Linux terminal is the place to get serious work done. We have plenty of useful [linux command tips and tricks][1] to help you with that. + +But, did you know that you can have a lot of fun using the terminal? Well, if you did not, then you are not alone. Most Linux users see the terminal as an interface that is designed and built for system management and development tasks. + +However, you will be surprised to know that there are tons of [terminal based games][2] and [ASCII games][3] that you can play in the terminal. + +And, in this article, I’m going to explore some interesting, some funny and some ridiculous commands that you can type into the terminal on Linux and have fun! + +### Have some fun in Linux terminal with these commands + +![][4] + +You’ll find a lot of these commands ridiculous or useless but some of them could actually be put to some good use. + +I have added installation instructions for Ubuntu/Debian. If you are using Ubuntu-based distribution, please make sure to [enable universe repository][5] as most of these commands are not in the main repository. + +If you are using Arch, Fedora, SUSE, Solus or any other non-Ubuntu distributions, please use your distribution’s package manager to install these funny Linux commands. + +#### 1\. Run a train in the terminal + +Let’s take a ride in the locomotive and begin our auspicious journey. And I mean it literally! + +The sl command allows you to run a train in your terminal. + +![][6] + +Here’s how to install the command: + +``` +sudo apt install sl +``` + +Once done, you can simply type in the following in the terminal to get started: + +``` +sl +``` + +Impressive, isn’t it? But, hold on. We are not done yet! Apparently, you can fly your locomotive. Just add the option -F, Mr. Potter: + +``` +sl -F +``` + +****This should make the locomotive get wings to fly off from the terminal window! + +#### 2\. Add the Matrix effect to your Linux terminal + +Remember the iconic sci-fi movie [The Matrix][7]? The green text falling down on the terminal became an identity of Matrix. + +You can have this Matrix digital rain on your Linux box as well! You just need to install **cmatrix** and type it in the terminal. + +![][8] + +Installing cmatrix on Debian/Ubuntu Linux: + +``` +sudo apt install cmatrix +``` + +Now, all you have to do is type the following to get the matrix screen on terminal: + +``` +cmatrix +``` + +Press Ctrl+C to stop it, Mr. Anderson. + +**Recommended Read:** + +![][9] + +#### [Watch Star Wars In Linux Terminal via Telnet][10] + +Watch Star Wars in ASCII art Linux terminal. + +#### 3\. Let there be fire + +Keep your fire extinguisher handy because now you are going to start a fire in your terminal! + +![][11] + +To get it installed, here’s what you have to type: + +``` +sudo apt install libaa-bin +``` + +Once done start a fire in your terminal by entering: + +``` +aafire +``` + +Press Ctrl+C to stop it. + +#### 4\. Fortune ~~Cookie~~ Command + +Want to know your fortune but there are no fortune cookies around you? + +Not to worry, you just need to type “fortune” on your terminal and press enter. The terminal will display a random sentence just like you usually get in fortune cookies. + +![][12] + +Install it with: + +``` +sudo apt install fortune +``` + +Once done, simply type in the command below to know your fortune: + +``` +fortune +``` + +Now this is one of the commands here that you could actually use. You can use it as message of the day so that in a multi-user environment, all the users will see a random fortune cookie when they login. + +You may also add it to your bashrc file so that it shows you a random message as soon as you log in to the terminal. + +#### 5\. Pet lover? This is for you + +Oneko is a little fun command that will change your regular cursor into a mouse and creates a curious little cat who will chase your cursor once you move it. It’s not limited to just the terminal. You can keep on working while the cat chases the cursor. + +Now, that’s something fun to do specially if you have kids at home. + +![][13] + +Install Oneko with this command: + +``` +sudo apt install oneko +``` + +Run it with this command: + +``` +oneko +``` + +In case you want a dog instead of a cat, type: + +``` +oneko -dog +``` + +There are a few more types of cats available. You can get that information by using oneko –help. To stop it, use Ctrl+C. + +#### 6\. Little brother is watching you + +Xeyes is a tiny gui program that let the user draws a pair of ever watching eyes! It will follow your mouse cursor constantly. Run the command and see it yourself! + +![][14] + +You can install it using this command: + +``` +sudo apt install xeyes +``` + +And then use it with this: + +``` +xeyes +``` + +Press Ctrl+C to stop it. + +#### Let the terminal speak for you + +To try out this command, make sure you have turned on your speakers. [eSpeak][15] is a fun command that gives your terminal a voice. Yes, you heard that right. + +Install the package first: + +``` +sudo apt install espeak +``` + +Next, you need to simply type in the command along with a text that you want to listen as audio: + +``` +espeak "Type what your computer says" +``` + +Whatever you place in the double quotes, your computer is obligated to say! It’s like [echo command in Linux][16]. But instead of printing, it speaks. + +#### Toilet (but it has nothing to do with a washroom) + +This sounds weird, yes. But, it’s just a command that transforms a text into large ASCII characters. + +![][17] + +Install toilet with this command: + +``` +sudo apt install toilet +``` + +Once done, you just need to type in: + +``` +toilet sample text you want +``` + +I don’t know why this little program is called toilet. + +#### What does the ~~fox~~ cow say? + +Cowsay is a command that displays a cow using ASCII characters in the terminal. And by using this command you can instruct the cow to say anything you want. + +Not to be confused with any audio – it will just display a text (like you usually see in a comic book). + +![Cowsay Cowthink][18] + +Install ****cowsay: + +``` +sudo apt install cowsay +``` + +Once you have it installed, you just need to type in: + +``` +cowsay "your text" +``` + +Whatever you place in the double quotes, your cow is obligated to say! I have seen a few sysadmins using it to display the message of the day. Maybe you can do the same. You may even combine it with fortune command. + +#### Banner Command + +The banner command works just like the toilet command but it is limited to print only 10 characters at most. + +![][19] + +You can install banner command like this: + +``` +sudo apt install sysvbanner +``` + +Then use it in the following way: + +``` +banner "Welcome" +``` + +Replace content in the double quotes and you shall have your desired text displayed. + +#### Yes command + +![][20] + +The “yes” command helps you to loop an automated response until you terminate the command. This command will print the exact same thing indefinitely. If you want to produce huge amounts of junk text fast, then this command will work like a charm. + +You may also use it to provide a yes to a command (if it prompts for it). For example, the apt upgrade command asks for your confirmation, you can use it like this: + +``` +yes | sudo apt upgrade +``` + +You don’t need to install any package for it. Yes command is already available. + +Terminate the yes command loop, simply press **CTRL + C**. + +#### Get a new identity, well, sort of + +Want to generate a random fake identity? I give you the command “rig”. Once you place this in the terminal, it will generate a fake identity. + +![][21] + +Install rig with this command: + +``` +sudo apt install rig +``` + +Then simply type this: + +``` +rig +``` + +It may be used in scripts or web-apps that displays random information but I haven’t done anything of that sort on my own. + +**Wrapping Up** + +I hope you liked this list of fun Linux commands. Which command do you like the most here? Do you know some other such amusing commands? Do share it with us in the comment section. + +![][22] + +### Srimanta Koley + +A passionate writer, a distrohopper and an open source enthusiast, Srimanta is extremely fond of everything related to technology. He loves to read books and has an unhealthy addiction to the 90s! + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/funny-linux-commands/ + +作者:[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/linux-command-tricks/ +[2]: https://itsfoss.com/best-command-line-games-linux/ +[3]: https://itsfoss.com/best-ascii-games/ +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/fun-linux-commands.png?ssl=1 +[5]: https://itsfoss.com/ubuntu-repositories/ +[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/sl-command.jpg?ssl=1 +[7]: https://en.wikipedia.org/wiki/The_Matrix +[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/matrix-screen-command.png?ssl=1 +[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2015/12/Star-Wars-Linux-Terminal-2.png?fit=732%2C462&ssl=1 +[10]: https://itsfoss.com/star-wars-linux/ +[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/fire-command.png?ssl=1 +[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/fortune-command.jpg?ssl=1 +[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/oneko-command.jpg?ssl=1 +[14]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/xeyes-command.jpg?ssl=1 +[15]: https://itsfoss.com/espeak-text-speech-linux/ +[16]: https://linuxhandbook.com/echo-command/ +[17]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/toilet-command.jpg?ssl=1 +[18]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/cowsay-cowthink.jpg?ssl=1 +[19]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/banner-command.jpg?ssl=1 +[20]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/yes-yourtext.jpg?ssl=1 +[21]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/rig-command.jpg?ssl=1 +[22]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/03/srimanta.jpg?ssl=1 diff --git a/translated/tech/20190814 9 open source cloud native projects to consider.md b/translated/tech/20190814 9 open source cloud native projects to consider.md new file mode 100644 index 0000000000..9ccb1fc0ab --- /dev/null +++ b/translated/tech/20190814 9 open source cloud native projects to consider.md @@ -0,0 +1,255 @@ +[#]: collector: (lujun9972) +[#]: translator: (messon007) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (9 open source cloud native projects to consider) +[#]: via: (https://opensource.com/article/19/8/cloud-native-projects) +[#]: author: (Bryant Son https://opensource.com/users/brsonhttps://opensource.com/users/marcobravo) + +值得考虑的9个开源的云原生项目 +====== +工作中用了容器?熟悉这些出自云原生计算基金会的项目? + +![clouds in the sky with blue pattern][1] + +随着用容器来开发应用的实践变得流行,[云原生应用][2]也在增长。云原生应用的定义为: +> "云原生技术被用于开发应用程序,这些应用通过将服务打包在容器中来完成构建,被部署为微服务,并通过敏捷的DevOps流程和持续集成工作流在弹性基础设施上管理。" + +这个定义提到了构成云原生应用的4个元素: + + 1. 容器 + 2. 微服务 + 3. DevOps + 4. 持续集成和持续交付 (CI/CD) + + +尽管这些技术各有各自独特的历史,但它们相互补充,共同导致了云原生应用和工具在短时间内惊人的指数级增长。这个[云原生计算基金会][4]信息图呈现了当今云原生应用生态的规模和广度。 + +![Cloud-Native Computing Foundation applications ecosystem][5] + +云原生计算基金会项目 + +我想说,瞧着吧!这仅仅是一个开始。正如NodeJS的出现引发了无休止的JavaScript工具的爆炸式增长一样,容器技术的普及也推动了云原生应用的指数增长。 + +好消息是,有几个组织负责监管这些技术并将它们融合在一起。 其中之一是[**Open Containers Initiative(OCI)**][6],它是一个轻量级的,开放的治理机构(或项目),“它是在Linux基金会的主持下形成的,其明确目的是创建开放的行业标准的容器格式和运行时。” 另一个是** CNCF **,“它是一个致力于使云原生计算具有通用性和可持续性的开源软件基金会”。 + +除了常见的围绕云原生应用建立社区之外,CNCF还帮助项目基于其云原生应用建立结构化的管理。CNCF创建了成熟等级的概念(沙箱级,孵化级或毕业级),分别与下图中的“创新者”,“早期采用者”和“早期大量应用”相对应。 +![CNCF project maturity levels][7] + +CNCF项目成熟等级 + +CNCF为每个成熟等级制定了详细的[标准][8](为方便读者而列在下面)。 获得技术监督委员会(TOC)三分之二的同意才能转为孵化或毕业级。 + +### 沙箱级 + +> 要想成为沙箱级,一个项目必须至少有两个TOC赞助商。 有关详细过程,请参见《 CNCF沙箱指南v1.0》。 + + +### 孵化级 + +>注意:孵化级是我们期望对项目进行全面尽职调查的起点。 +> +>要进入孵化阶段,项目除了满足沙箱阶段的要求之外还要满足: +> +> *证明至少有三个独立的最终用户已成功将其用于生产,且TOC判断这些最终用户具有足够的质量和范围。 +> *合入者的数量要合理。合入者定义为具有合入权的人。即可以接受对部分或全部项目贡献的人。 +> *演示有大量正在进行的提交和合并的贡献。 +> *由于这些指标可能会根据项目的类型,范围和大小而有很大差异,因此TOC对足以满足这些标准的活动级别拥有最终决策权 + + + +### 毕业级 + +>要从沙箱或孵化级毕业,或者要使一个新项目作为已毕业项目加入,项目除了必须满足孵化级的标准外还要满足: +> +> *至少有两个组织的提交者。 +> *已获得并维护了“核心基础设施计划最佳实践徽章”。 +> *已完成独立和第三方安全审核,并发布了具有与以下示例类似的范围和质量的结果(包括已解决的关键漏洞):和所有关键毕业之前需要解决漏洞。 +> *采用CNCF行为准则。 +> *明确定义项目治理和提交流程。最好将其排布在GOVERNANCE.md文件中,并引用显示当前提交者和荣誉提交者的OWNERS.md文件。 +> *至少有主仓的项目采用者的公开列表(例如,ADOPTERS.md或项目网站上的徽标)。 +> *获得TOC的多数票,进入毕业阶段。如果项目能够证明足够的成熟度,则可以尝试直接从沙箱过渡到毕业。项目可以无限期保持孵化状态,但是通常预计它们会在两年内毕业。 + +## 值得考虑的9个项目 + +本文不可能涵盖所有的CNCF项目,我将介绍最有趣的9个“已毕业和孵化中”的开源项目。 + +名称|授权类型|简要描述 +---|---|--- +[Kubernetes][9] | Apache 2.0 | 容器编排平台 +[Prometheus][10] | Apache 2.0 | 系统和服务监控工具 +[Envoy][11] | Apache 2.0 | 边缘和服务代理 +[rkt][12] | Apache 2.0 | Pod原生的容器引擎 +[Jaeger][13] | Apache 2.0 | 分布式跟踪系统 +[Linkerd][14] | Apache 2.0 | 无感服务网格 +[Helm][15] | Apache 2.0 | Kubernetes包管理器 +[Etcd][16] | Apache 2.0 | 分布式键值存储 +[CRI-O][17] | Apache 2.0 | 专门用于Kubernetes的轻量级运行时环境 + +我也创建了视频材料来介绍这些项目。 + +## 毕业项目 + +已毕业的项目被认为是成熟的,已被许多组织采用的,并且严格遵守了CNCF的准则。 以下是三个最受欢迎的开源CNCF毕业项目。 (请注意,其中一些描述来源于项目的网站并被做了改编。) + +### Kubernetes + +Kubernetes! 我们如何在不提及Kubernetes的情况下谈论云原生应用程序? Google发明的Kubernetes无疑是最著名的基于容器的应用程序的容器编排平台,而且它还是一个开源工具。 + +什么是容器编排平台? 通常,一个容器引擎本身可以管理几个容器。 但是,当您谈论数千个容器和数百个服务时,管理这些容器变得非常复杂。 这就是容器编排引擎的用武之地。容器编排引擎通过自动化容器的部署,管理,网络和可用性来帮助管理大量的容器。 + +Docker Swarm和Mesosphere Marathon也是容器编排引擎,但是可以肯定地说Kubernetes在竞争中胜出(至少现在是这样)。Kubernetes还诞生了容器即服务(CaaS)平台如[OKD][18],它是Origin社区针对Kubernetes的发行版,并成了[Red Hat OpenShift][19]的一部分。 + +想开始学习请访问[Kubernetes GitHub仓库][9],并从[Kubernetes文档][20]页面访问其文档和学习资源。 + +### Prometheus + +Prometheus是2012年在SoundCloud上构建的一个开源系统监控和告警工具。之后,许多公司和组织都使用了Prometheus,并且该项目拥有非常活跃的开发者和用户群体。 现在,它是一个独立于公司的独立维护的开源项目。 + +![Prometheus’ architecture][21] + +Prometheus的架构 + +理解Prometheus的最简单方法是可视化一个生产系统,该系统需要24(小时)x365天都可以正常运行。 没有哪个系统是完美的,也有减少故障的技术(称为容错系统)。 但是,如果出现问题,最重要的是尽快识别它。 这就是像Prometheus这样的监控工具的用武之地。Prometheus不仅是容器监控工具,它在云原生应用公司中也最受欢迎。 此外,其他开源监视工具,包括[Grafana][22],都借鉴了Prometheus。 + +开始使用Prometheus的最佳方法是下载其[GitHub仓库][10]。 在本地运行Prometheus很容易,但是您需要安装一个容器引擎。 您可以在[Prometheus网站][23]上查看详细的文档。 + +### Envoy + +Envoy(或Envoy代理)是专为云原生应用设计的开源的边缘代理和服务代理。 由Lyft创建的Envoy是为单一服务和应用而设计的高性能的C++分布式代理,同时也是为由大量微服务组成的服务网格架构而设计的通信总线和通用数据平面。 基于对Nginx,HAProxy,硬件负载均衡器和云负载均衡器等方案了解的基础上,Envoy与每个应用相伴(并行)运行,并对网络进行了高度抽象,最终以平台无关的方式来提供通用功能。 + +当基础设施中的所有服务流量都经过一个Envoy网格时,很容易就可以通过连贯的监测来可视化问题域,调整整体性能,并在单个位置添加基础功能。基本上,Envoy代理是一个可帮助组织为生产环境构建容错系统的服务网格工具。 + +服务网格应用有很多替代方案,例如Uber的[Linkerd][24](下面会讨论)和[Istio][25]。 Istio通过将其部署为[Sidecar][26]并利用了[Mixer][27]的配置模型,实现了对Envoy的扩展。 Envoy的显著特性有: + + *所有的“table stakes(入场筹码,引申为基础必备特性)”特性(与控制平面(例如Istio)组合时) + *带载运行时99%数据可达到低延时 + *将L3/L4过滤器作为核心,支持额外的L7过滤器 + *支持gRPC和HTTP / 2(上行/下行) +   *由API驱动,并支持动态配置和热重载 + *重点关注指标收集,跟踪和整体可监测性 + + +要想了解Envoy,证实其能力并意识到其全部优势,需要丰富的在生产级环境运行的经验。 您可以在[详细文档][28]或访问其[GitHub][11]仓库了解更多信息。 + +## 孵化项目 + +下面是最流行的开源的CNCF孵化项目中的六个。 + +### rkt + +rkt, 拼为"rocket", 是一个pod原生的容器引擎。它有一个命令行接口用来在Linux上运行容器。从某种意义上讲,它和其他容器如[Podman][29], Docker和CRI-O相似。 + +rkt最初由CoreOS开发(后来被Red Hat收购),您可以在其网站上找到详细的[文档][30],以及在[GitHub][12]上访问其源代码。 + +### Jaeger + +Jaeger是面向云原生应用的开源的端到端的分布式跟踪系统。 在某种程度上,它是像Prometheus这样的监控解决方案。但它有所不同,因为其使用场景有所扩展: + + * 分布式事务监控 + * 性能和延时优化 + * 根因分析 + * 服务的依赖分析 + * 分布式上下文传播 + + + +Jaeger是Uber建立的开源的技术。 您可以在其网站上找到[详细文档][31],以及在GitHub上找到其[源码][13]。 + +### Linkerd + +像创建Envoy代理的Lyft一样,Uber开发了Linkerd开源解决方案用于生产级的服务维护。在某些方面,Linkerd就像Envoy一样,因为两者都是服务网格工具,旨在提供平台级的可观测性,可靠性和安全性,而无需进行配置或代码更改。 + +但是,两者之间存在一些细微的差异。 尽管Envoy和Linkerd充当代理并可以通过所连接的服务进行上报,但是Envoy并不像Linkerd那样被设计为Kubernetes Ingress控制器。 Linkerd的显著功能包括: + + *支持多种平台(Docker,Kubernetes,DC / OS,Amazon ECS或单机) + *内置服务发现抽象将多个系统集成在一起 + *支持gRPC,HTTP / 2和HTTP / 1.x请求和所有的TCP流量 + + +您可以在[Linkerd网站][32]上阅读有关它的更多信息,并在[GitHub][14]上访问其源码。 + +### Helm + +Helm基本上是Kubernetes的软件包管理器。 如果您使用过Apache Maven,Maven Nexus或类似的服务,您就会理解Helm的作用。 Helm可帮助您管理Kubernetes应用程序。 它使用“Helm图”来定义,安装和升级最复杂的Kubernetes应用程序。 Helm并不是实现此功能的唯一方法; 另一个流行的概念是[Kubernetes Operators][33],它被Red Hat OpenShift 4所使用。 + +您可以按照其文档中的[快速开始指南][34]或[GitHub指南][15]来试用Helm。 + +### Etcd + +Etcd是用于分布式系统中最关键数据的分布式的,可靠的键值存储。 其主要特性有: + + *定义明确的,面向用户的API(gRPC) + *客户端证书验证可选的自动TLS + *速度(可达每秒10,000次写入) + *可靠性(使用Raft实现分布式) + +Etcd是Kubernetes和许多其他技术的默认的内置数据存储方案。也就是说,它很少独立运行或作为单独的服务运行; 相反,它利用了集成到Kubernetes,OKD / OpenShift或其他服务中的一个。 还有[etcd Operator][35]来管理其生命周期并解锁其API管理功能: + +您可以在[etcd文档][36]中了解更多信息,并在GitHub上访问其[源码][16]。 + +### CRI-O + +CRI-O是Kubernetes运行时接口的OCI兼容实现。CRI-O用于各种功能,包括: + + *使用runc(或遵从OCI运行时规范的任何实现)和OCI运行时工具运行 + *使用容器/镜像进行镜像管理 + *使用容器/存储来存储和管理镜像层 + *通过容器网络接口(CNI)来提供网络支持 + +CRI-O提供了大量的[文档][37],包括指南,教程,文章,甚至播客,您还可以访问其[GitHub页面][17]。 + +* * * + +我错过了其他有趣且开源的云原生项目吗? 请在评论中提醒我。 +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/cloud-native-projects + +作者:[Bryant Son][a] +选题:[lujun9972][b] +译者:[messon007](https://github.com/messon007) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/brsonhttps://opensource.com/users/marcobravo +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003601_05_mech_osyearbook2016_cloud_cc.png?itok=XSV7yR9e (clouds in the sky with blue pattern) +[2]: https://opensource.com/article/18/7/what-are-cloud-native-apps +[3]: https://thenewstack.io/10-key-attributes-of-cloud-native-applications/ +[4]: https://www.cncf.io +[5]: https://opensource.com/sites/default/files/uploads/cncf_1.jpg (Cloud-Native Computing Foundation applications ecosystem) +[6]: https://www.opencontainers.org +[7]: https://opensource.com/sites/default/files/uploads/cncf_2.jpg (CNCF project maturity levels) +[8]: https://github.com/cncf/toc/blob/master/process/graduation_criteria.adoc +[9]: https://github.com/kubernetes/kubernetes +[10]: https://github.com/prometheus/prometheus +[11]: https://github.com/envoyproxy/envoy +[12]: https://github.com/rkt/rkt +[13]: https://github.com/jaegertracing/jaeger +[14]: https://github.com/linkerd/linkerd +[15]: https://github.com/helm/helm +[16]: https://github.com/etcd-io/etcd +[17]: https://github.com/cri-o/cri-o +[18]: https://www.okd.io/ +[19]: https://www.openshift.com +[20]: https://kubernetes.io/docs/home +[21]: https://opensource.com/sites/default/files/uploads/cncf_3.jpg (Prometheus’ architecture) +[22]: https://grafana.com +[23]: https://prometheus.io/docs/introduction/overview +[24]: https://linkerd.io/ +[25]: https://istio.io/ +[26]: https://istio.io/docs/reference/config/networking/v1alpha3/sidecar +[27]: https://istio.io/docs/reference/config/policy-and-telemetry +[28]: https://www.envoyproxy.io/docs/envoy/latest +[29]: https://podman.io +[30]: https://coreos.com/rkt/docs/latest +[31]: https://www.jaegertracing.io/docs/1.13 +[32]: https://linkerd.io/2/overview +[33]: https://coreos.com/operators +[34]: https://helm.sh/docs +[35]: https://github.com/coreos/etcd-operator +[36]: https://etcd.io/docs/v3.3.12 +[37]: https://github.com/cri-o/cri-o/blob/master/awesome.md diff --git a/translated/tech/20200415 How to Open Files and Folders as Administrator in Nautilus File Manager in Linux.md b/translated/tech/20200415 How to Open Files and Folders as Administrator in Nautilus File Manager in Linux.md new file mode 100644 index 0000000000..3355744d64 --- /dev/null +++ b/translated/tech/20200415 How to Open Files and Folders as Administrator in Nautilus File Manager in Linux.md @@ -0,0 +1,84 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to Open Files and Folders as Administrator in Nautilus File Manager in Linux) +[#]: via: (https://itsfoss.com/open-nautilus-as-administrator/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) + +如何在 Linux 的 Nautilus 文件管理器中以管理员身份打开文件和文件夹 +====== + +_**了解如何在 Ubuntu 和其他 Linux 发行版的 Nautilus 文件管理器的右键菜单中添加“以管理员身份打开”选项。**_ + +如果要以根用户身份打开或编辑文件,你总是可以在终端中执行此操作。但我知道有些人对命令行不适应。 + +桌面 Linux 通常为那些害怕终端的人提供方法避免命令行。 + +如果你必须以 root 用户身份访问文件夹或以 root 用户权限编辑文件,那你可以在 [Nautilus 文件管理器][1]中以图形方式进行操作。 + +一个干净的 Nautilus hack 方式能让你以管理员也就是 root 打开文件和文件夹。让我向你展示如何做。 + +#### [Ubuntu 的 root 用户:你应该知道的重要事项][3] + +根用户对于任何 Linux 发行版都是必不可少的。在本 Ubuntu 初学者系列文章中了解 Ubuntu 为何锁定 root 用户以及如何使用它。 + +### 在 Nautilus 文件管理器的右键菜单中添加“以管理员身份打开”选项 + +_**警告!请不要以 root 用户身份打开和编辑随机文件,因为这样可能会弄乱文件并导致系统损坏。仅在需要时使用它。**_ + +我展示的是 Ubuntu 的步骤。你可以根据你的发行版的软件包管理器进行更改。 + +你必须使用终端(即使你不喜欢它)来安装 Nautilus 插件。请[确保已启用 Universe 仓库][4]: + +``` +sudo apt install nautilus-admin +``` + +关闭并再次打开 Nautilus 文件管理器以查看更改生效。 + +![Right clock to see the “Open as Administrator” option][5] + +你也可以用 root 用户身份编辑文件。只需选择文件,右键单击它,然后选择“以管理员身份编辑”选项。 + +![Edit Files As Root Ubuntu][6] + +这两种情况下,系统都会提示你输入帐户密码: + +![You need to enter your password, of course][7] + +差不多了。你可以享受 GUI 的舒适了。 + +如果你不想再以 root 用户身份运行 Nautilus,那么可以删除此插件。删除已安装但不再使用的其他东西总是没错的。 + +在终端中(没错,再一次在终端),使用以下命令删除 Nautilus 插件。 + +``` +sudo apt remove nautilus-admin +``` + +顺便说一句,如果你在使用 [Ubuntu MATE][8],你可以使用 caja-admin 代替 nautilus-admin。其他文件管理器可能会或可能不会提供此类功能。 + +我希望这个快速技巧对你有所帮助。随时欢迎提出问题和建议。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/open-nautilus-as-administrator/ + +作者:[Abhishek Prakash][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://wiki.gnome.org/Apps/Files +[3]: https://itsfoss.com/root-user-ubuntu/ +[4]: https://itsfoss.com/ubuntu-repositories/ +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/open-folder-as-administrator-ubuntu.jpg?ssl=1 +[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/edit-files-as-root-ubuntu.jpg?ssl=1 +[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/authentication-pop-up-ubuntu.png?ssl=1 +[8]: https://ubuntu-mate.org/