From 26d93287a85e1d2ab52ca769c2e752d1dcc1ebe8 Mon Sep 17 00:00:00 2001 From: perfiffer Date: Wed, 24 Nov 2021 17:57:52 +0800 Subject: [PATCH 001/244] translating by perfiffer --- sources/tech/20210922 Add storage with LVM.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210922 Add storage with LVM.md b/sources/tech/20210922 Add storage with LVM.md index c4b3447aa5..e150e23d0c 100644 --- a/sources/tech/20210922 Add storage with LVM.md +++ b/sources/tech/20210922 Add storage with LVM.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/21/9/add-storage-lvm" [#]: author: "Ayush Sharma https://opensource.com/users/ayushsharma" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "perfiffer" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 8c90b3a6caec1a0037eb548863b50940f9b49479 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 25 Nov 2021 05:02:26 +0800 Subject: [PATCH 002/244] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211124=20?= =?UTF-8?q?5=20open=20source=20alternatives=20to=20Microsoft=20Exchange?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211124 5 open source alternatives to Microsoft Exchange.md --- ...urce alternatives to Microsoft Exchange.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 sources/tech/20211124 5 open source alternatives to Microsoft Exchange.md diff --git a/sources/tech/20211124 5 open source alternatives to Microsoft Exchange.md b/sources/tech/20211124 5 open source alternatives to Microsoft Exchange.md new file mode 100644 index 0000000000..ae959d3984 --- /dev/null +++ b/sources/tech/20211124 5 open source alternatives to Microsoft Exchange.md @@ -0,0 +1,100 @@ +[#]: subject: "5 open source alternatives to Microsoft Exchange" +[#]: via: "https://opensource.com/article/21/11/open-source-alternatives-microsoft-exchange" +[#]: author: "Heike Jurzik https://opensource.com/users/hej" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +5 open source alternatives to Microsoft Exchange +====== +There is no need to settle for a proprietary solution. Try one of these +Linux-based email and groupware services. +![Working on a team, busy worklife][1] + +For decades, Microsoft Exchange has ruled the market for email and groupware services. This top dog dominates the corporate world, and the omnipresent Outlook mail client has become the de facto standard for groupware. Since Exchange is closely integrated with Microsoft's Office products, users have access to a wide variety of productivity software and features, whether they're using a desktop or a mobile client. + +However, many companies have concerns about storing their data in the Microsoft cloud. In this article, I look at some open source alternatives and their advantages. It's not just about becoming vendor-independent and reducing costs; it's about using software with open standards and a different level of security—for the groupware server itself and the operating system behind it. + +All five alternatives in this article are Linux-based. While grommunio, Kopano, Nextcloud, ownCloud, and the OX App Suite vary widely in functionality and are therefore attractive to different types of enterprises, they all provide free editions with the option to purchase paid support and add-ons. All candidates can either run on-prem or in the cloud. On top of that, all vendors offer a SaaS solution for their software. + +### grommunio + +[grommunio][2], formerly known as grammm, is published under the AGPLv3 license. It is developed and supported by the Austrian company of the same name. Unlike Exchange, grommunio offers a mail server that's standards-compliant as well as a fully functional groupware solution with features like email, contacts, calendar, tasks, file sharing, and more. grommunio works with various open source and proprietary mail clients, like Windows Mail, Outlook, Android, Apple Mail/iOS, Thunderbird, etc., and supports both the older RPC over HTTP protocol and the Outlook standard protocol MAPI over HTTP. Also included: Exchange ActiveSync for mobile devices and various standard protocols like CalDAV (calendar), CardDAV (address book), IMAP, POP3, SMTP, and LDAP, as well as Active Directory (for syncing of user accounts). + +External open source applications provide some features not supported by Microsoft's API or protocols. For example, the developers have integrated [Jitsi][3] (video and audio telephony), [Mattermost][4] (chat), and file sharing and syncing ([ownCloud][5]). grommunio is also equipped with basic mobile device management (MDM). + +grommunio is designed for a very large number of users and—just like Exchange—supports database sharding (horizontal distribution of databases across multiple hosts). The flexible storage backend allows administrators to extend their setup by adding other servers or cloud accounts. grommunio uses a MySQL database for metadata only, while all "content" such as mail and groupware objects are stored in a per-user SQLite database. For more information on the underlying architecture, please have a look at the [manufacturer's website][6]. + +The Community edition is free of charge and includes all grommunio features for up to five user accounts.  + +### Kopano + +[Kopano][7], from the German-Dutch software manufacturer Kopano, is also AGPLv3-licensed and based on the Zarafa software stack. Unlike its predecessor, Kopano doesn't aim to be a mere replacement for Exchange. Instead, it's a complete groupware solution and includes real-time communication in addition to the standard features of email, contacts, calendar, tasks, notes, and document editing. Kopano interacts with [many other platforms][8], applications, and services. Some of them can easily be integrated by plugins. For video conferencing, the Kopano team has developed its own open source solution based on WebRTC: Kopano Meet offers end-to-end encryption and is available for Windows, macOS, Linux, Android, and iOS. + +Outlook clients are supported via ActiveSync (Z-Push library) or the [Kopano OL Extension][9] (KOE), which serves as an enhancement to the already included ActiveSync. Kopano offers a native web client (WebApp), a client for mobile devices (Mobility), and a desktop version (DeskApp) with support for Windows, Linux, and macOS. Connecting other clients is possible via IMAP, CalDAV, and CardDAV. All applications directly connecting to the Kopano Server use MAPI in SOAP (Simple Object Access Protocol). + +Free community versions are available for Kopano Groupware and Kopano ONE (a special edition of the Kopano Groupware). Kopano Meet can be downloaded as an application or container. + +### Nextcloud + +[Nextcloud][10], with offices in Stuttgart and Berlin (Germany), is licensed under the AGPLv3. Like in ownCloud or Dropbox, users can access the software suite via their desktops (Windows, Linux, and macOS), web browsers, or native apps (Android and iOS). Since version 18, Nextcloud includes Nextcloud Talk (calls, chats, and web meetings) and Nextcloud Groupware (calendar, contacts, and mail) in addition to Nextcloud Files (file sync and share), and changed its name to Nextcloud Hub. + +User and group administration happens via OpenID or LDAP. Various storage backends are supported, such as FTP, S3, and Dropbox. Nextcloud works with several database management systems, including PostgreSQL, MariaDB, SQLite, and Oracle Database. Admins can extend the functionality with more than 200 apps from the [Nextcloud app store][11]. Offerings include real-time communication, audio and video chat, task management, mail, and many more. + +Nextcloud is completely free of charge. On top of that, the company offers a Nextcloud Enterprise build (pre-configured, optimized, and hardened for enterprise deployments).  + +### ownCloud + +[ownCloud][12] is a file sync, share, and content collaboration software developed and maintained by ownCloud GmbH in Nuremberg, Germany. The core of the client-server software and many community apps are published under the AGPLv3. Several enterprise apps which extend the functionality are licensed under the ownCloud Commercial License (OCL). + +ownCloud is mainly a content collaboration software, including online office document editing, calendar, contact synchronization, etc. Mobile clients are available for Android and iOS, and the desktop app integrates into the native file managers in Windows, macOS, and Linux. The Web interface allows access without installing dedicated client software. ownCloud supports WebDAV, CalDAV, and CardDAV. LDAP is included, but ownCloud also connects to other Identity Providers supporting the OpenID Connect authentication standard. + +ownCloud offers integrations for Microsoft Office Online Server, Office 365, and Microsoft Teams. Plugins for Microsoft Outlook and eM Client are available. If necessary, the External Storage Feature connects to different storage providers, like Amazon S3, Dropbox, Microsoft SharePoint, Google Drive, Windows network drives (SMB), and FTP. The vendor also offers additional features for enterprise customers, like end-to-end encryption, ransomware and antivirus protection, etc. (see the [full list of features][13]). + +The Community edition is free of charge and 100% open source.   + +### OX App Suite + +[Open-Xchange][14] was founded in 2005 with headquarters in Olpe and Nuremberg, Germany. Today, OX has offices in various European countries, the USA, and Japan. The [OX App Suite][15] is a modular email, communication, and collaboration platform, mainly designed for telcos, hosting companies, and other providers delivering cloud-based services. + +The backend is released under the GPLv2, the frontend (UI) under the AGPLv3. Users can access the app suite via their preferred browser (fully customizable portal) or a mobile app (Android and iOS). Alternatively, native clients (mobile devices and desktops) are available for OX Mail and OX Drive. Thanks to CardDAV and CalDAV extensions, Exchange Active Sync, and the OX Sync App for Android, synchronization of contacts, calendars, and tasks is possible. + +OX App Suite contains apps for email, contacts, calendars, and tasks. Additional tools and extensions—some open source, some paid features—are available, including OX Documents (text documents, spreadsheets, presentations), OX Drive (manage, share, and synchronize files), OX Guard (encryption of emails and files), and more. For a complete list, please visit the OX website for [general terms and conditions][16]. + +A community edition with limited features is available at no charge.   + +### Open source email and groupware + +Email and groupware services don't have to cost (lots of) money, and there is certainly no need to settle for a proprietary solution hosted on someone else's server. If you're not too keen on the administrative responsibilities, though, all five open source Exchange alternatives are available as SaaS solutions. Alternatively, all vendors offer professional tech support, and you can run the software on-premise—always in control, but never alone. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/11/open-source-alternatives-microsoft-exchange + +作者:[Heike Jurzik][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/hej +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/team_dev_email_chat_video_work_wfm_desk_520.png?itok=6YtME4Hj (Working on a team, busy worklife) +[2]: https://grommunio.com/ +[3]: https://opensource.com/article/20/5/open-source-video-conferencing +[4]: https://opensource.com/article/20/7/mattermost +[5]: https://opensource.com/article/21/7/owncloud-windows-files +[6]: https://grommunio.com/features/architecture/ +[7]: https://kopano.com/ +[8]: https://kopano.com/products/interoperability/ +[9]: https://kb.kopano.io/display/WIKI/Setting+up+the+Kopano+OL+Extension +[10]: https://nextcloud.com/ +[11]: https://apps.nextcloud.com/ +[12]: https://owncloud.com/ +[13]: https://owncloud.com/features/ +[14]: https://www.open-xchange.com/ +[15]: https://www.open-xchange.com/products/ox-app-suite/ +[16]: https://www.open-xchange.com/terms-and-conditions/ From 6fc897a1a47838715b95fe92ac932cade496b2d6 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 25 Nov 2021 05:02:58 +0800 Subject: [PATCH 003/244] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020211124=20?= =?UTF-8?q?Amazon=E2=80=99s=20Own=20Linux=20Distribution=20is=20Now=20Comp?= =?UTF-8?q?letely=20Based=20on=20Fedora?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20211124 Amazon-s Own Linux Distribution is Now Completely Based on Fedora.md --- ...ution is Now Completely Based on Fedora.md | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 sources/news/20211124 Amazon-s Own Linux Distribution is Now Completely Based on Fedora.md diff --git a/sources/news/20211124 Amazon-s Own Linux Distribution is Now Completely Based on Fedora.md b/sources/news/20211124 Amazon-s Own Linux Distribution is Now Completely Based on Fedora.md new file mode 100644 index 0000000000..17b12bb4a0 --- /dev/null +++ b/sources/news/20211124 Amazon-s Own Linux Distribution is Now Completely Based on Fedora.md @@ -0,0 +1,58 @@ +[#]: subject: "Amazon’s Own Linux Distribution is Now Completely Based on Fedora" +[#]: via: "https://news.itsfoss.com/amazon-linux-2022-preview/" +[#]: author: "Abhishek https://news.itsfoss.com/author/root/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Amazon’s Own Linux Distribution is Now Completely Based on Fedora +====== + +In case you did not know already, Amazon has its own general purpose Linux distribution, unsurprisingly called Amazon Linux. + +It is intended to be used on AWS servers. When you are deploying a server, you have the choice to use Amazon Linux along with other popular choices of Ubuntu, Debian etc. Since it is from Amazon, there is no licensing fee and Amazon controls on repositories and packages. You can expect a tight integration with AWS tools and access to new AWS innovations with Amazon Linux. + +Amazon Linux 2022 (AL2022) in the next release in the line of Amazon Linux 1 and 2 and it will be released in 2022 (you can guess that from the version number). + +### Upcoming Amazon Linux 2022 uses only Fedora + +Until now, Amazon Linux releases were based on a combination of Red Hat and Fedora both. Starting with AL2022, it will be explicitly using Fedora as upstream. + +The move intends to provide the AWS customers “with a wide variety of the latest software, such as updated language runtimes, as part of quarterly releases”. + +In order to improve the security, reduce attack surface, AL2022 will also have [SELinux][1] enabled and enforced by default. + +### New release model similar to Ubuntu + +Amazon Linux is also opting for a more predictable release schedule. A new major Amazon Linux version will be released every two years and will be supported for five years. This way users would know when and how to upgrade their operating system. + +This “new LTS version every 2 years and 5 years support” is very similar to what Ubuntu features today. + +### What else? + +AL2022 also has the ability to lock to a specific version of the Amazon Linux package repository. This gives the user control over how and when they absorb updates. + +Amazon Linux 2022 is available as preview (read beta) in all geographical regions. You can visit their GitHub page for more information on AL2022. + +#### Big Tech Websites Get Millions in Revenue, It's FOSS Got You! + +If you like what we do here at It's FOSS, please consider making a donation to support our independent publication. Your support will help us keep publishing content focusing on desktop Linux and open source software. + +I'm not interested + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/amazon-linux-2022-preview/ + +作者:[Abhishek][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://news.itsfoss.com/author/root/ +[b]: https://github.com/lujun9972 +[1]: https://linuxhandbook.com/selinux/ From e6eebad9ff9a3362e3dc048a689b6950e2abefde Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 25 Nov 2021 08:52:33 +0800 Subject: [PATCH 004/244] translated --- ...ave Browser on Fedora, Red Hat - CentOS.md | 112 ------------------ ...ave Browser on Fedora, Red Hat - CentOS.md | 112 ++++++++++++++++++ 2 files changed, 112 insertions(+), 112 deletions(-) delete mode 100644 sources/tech/20211119 How to Install Brave Browser on Fedora, Red Hat - CentOS.md create mode 100644 translated/tech/20211119 How to Install Brave Browser on Fedora, Red Hat - CentOS.md diff --git a/sources/tech/20211119 How to Install Brave Browser on Fedora, Red Hat - CentOS.md b/sources/tech/20211119 How to Install Brave Browser on Fedora, Red Hat - CentOS.md deleted file mode 100644 index 04f9dd20f1..0000000000 --- a/sources/tech/20211119 How to Install Brave Browser on Fedora, Red Hat - CentOS.md +++ /dev/null @@ -1,112 +0,0 @@ -[#]: subject: "How to Install Brave Browser on Fedora, Red Hat & CentOS" -[#]: via: "https://itsfoss.com/install-brave-browser-fedora/" -[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" -[#]: collector: "lujun9972" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -How to Install Brave Browser on Fedora, Red Hat & CentOS -====== - -[Brave][1] is an increasingly [popular web browser for Linux][2] and other operating system. The focus on blocking ads and tracking by default along with Chrome extension support has made Brave a popular choice among Linux users. - -In this tutorial, you’ll learn to install Brave on Fedora Linux. You’ll also learn about updating it and removing it. - -The tutorial has been tested on Fedora but it should also be valid for other distributions in the Red Hat domain such as CentOS, Alma Linux and Rocky Linux. - -### Install Brave browser on Fedora Linux - -You’ll have to go to the command line way for installing Brave here. - -As a prerequisite, please ensure that dnf-plugin-core is installed. - -``` - - sudo dnf install dnf-plugins-core - -``` - -The next step is to add the Brave repository to your system: - -``` - - sudo dnf config-manager --add-repo https://brave-browser-rpm-release.s3.brave.com/x86_64/ - -``` - -You should also import and add the repository key so that your system trusts the packages coming from this newly added repository: - -``` - - sudo rpm --import https://brave-browser-rpm-release.s3.brave.com/brave-core.asc - -``` - -![Adding Brave Browser repository in Fedora Linux][3] - -You are all set to go now. Install Brave with this command: - -``` - - sudo dnf install brave-browser - -``` - -**Press Y when asked to confirm** your choice. It should take a few seconds or a couple of minutes based on your internet speed. If the DNF cache was not updated recently, it may even take longer. - -![Installing Brave Browser in Fedora][4] - -Once the installation finishes, look for Brave in the system menu and start from there. - -![Start Brave browser in Fedora Linux][5] - -### Updating Brave browser on Fedora Linux - -You have added a repository for the browser and also imported its key. Your system trusts the packages coming from this repository. - -So, when there is a new Brave browser release and it is made available to this repository, you’ll get it through the regular system upgrades. - -In other words, you don’t have to do anything special. Just keep your Fedora system updated and if there is a new version from Brave, it should be automatically installed with system updates. - -### Removing Brave browser from Fedora Linux - -![Brave Browser in Fedora Linux][6] - -If you do not like Brave for some reasons, you can remove it from your system. Just use the dnf remove command: - -``` - - sudo dnf remove brave-browser - -``` - -Press Y when asked: - -![Removing Brave browser from Fedora Linux][7] - -You may also choose to disable the brave-browser-rpm-release.s3.brave.com_x86_64_.repoor delete this file completely from the /etc/yum/repos.d. Though it’s not really mandatory. - -I hope you find this quick tip helpful. If you have any questions or suggestions, please let me know. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/install-brave-browser-fedora/ - -作者:[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://brave.com/ -[2]: https://itsfoss.com/best-browsers-ubuntu-linux/ -[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/adding-Brave-browser-repository-in-Fedora.png?resize=800%2C300&ssl=1 -[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/Installing-Brave-Browser-Fedora.png?resize=800%2C428&ssl=1 -[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/start-brave-fedora-linux.png?resize=759%2C219&ssl=1 -[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/Brave-Browser-in-Fedora-Linux.png?resize=800%2C530&ssl=1 -[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/removing-Brave-browser-Fedora-Linux.png?resize=800%2C399&ssl=1 diff --git a/translated/tech/20211119 How to Install Brave Browser on Fedora, Red Hat - CentOS.md b/translated/tech/20211119 How to Install Brave Browser on Fedora, Red Hat - CentOS.md new file mode 100644 index 0000000000..8e61ae0aad --- /dev/null +++ b/translated/tech/20211119 How to Install Brave Browser on Fedora, Red Hat - CentOS.md @@ -0,0 +1,112 @@ +[#]: subject: "How to Install Brave Browser on Fedora, Red Hat & CentOS" +[#]: via: "https://itsfoss.com/install-brave-browser-fedora/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +如何在 Fedora、Red Hat 和 CentOS 上安装 Brave 浏览器 +====== + +[Brave][1] 是一个越来越[流行于 Linux][2] 和其他操作系统的网络浏览器。对默认情况下阻止广告和跟踪的关注,以及对 Chrome 扩展的支持,使 Brave 成为 Linux 用户的热门选择。 + +在本教程中,你将学习如何在 Fedora Linux 上安装 Brave。你还将学习如何更新和删除它。 + +本教程已经在 Fedora 上进行了测试,但它也应该适用于基于 Red Hat 的其他发行版,如 CentOS、Alma Linux 和 Rocky Linux。 + +### 在 Fedora Linux 上安装 Brave 浏览器 + +你需要在这里用命令行的方式来安装 Brave。 + +作为先决条件,请确保 dnf-plugin-core 已经安装。 + +``` + + sudo dnf install dnf-plugins-core + +``` + +下一步是将 Brave 仓库添加到你的系统中: + +``` + + sudo dnf config-manager --add-repo https://brave-browser-rpm-release.s3.brave.com/x86_64/ + +``` + +你还应该导入并添加仓库密钥,这样你的系统就会信任来自这个新添加的仓库的软件包: + +``` + + sudo rpm --import https://brave-browser-rpm-release.s3.brave.com/brave-core.asc + +``` + +![Adding Brave Browser repository in Fedora Linux][3] + +现在可以开始了。用这个命令安装 Brave: + +``` + + sudo dnf install brave-browser + +``` + +**当被要求确认你的选择时按 Y**。根据你的网速,这应该需要几秒钟或几分钟的时间。如果 DNF 的缓存最近没有更新,甚至可能需要更长时间。 + +![Installing Brave Browser in Fedora][4] + +安装完成后,在系统菜单中寻找 Brave 并从那里启动。 + +![Start Brave browser in Fedora Linux][5] + +### 在 Fedora Linux 上更新 Brave 浏览器 + +你已经为浏览器添加了一个仓库,并且导入了它的密钥。你的系统信任来自这个仓库的软件包。 + +因此,当有新的 Brave 浏览器发布并提供给这个仓库时,你会通过常规的系统升级得到它。 + +换句话说,你不需要做任何特别的事情。只要保持你的 Fedora 系统更新,如果有 Brave 的新版本,它应该会随着系统更新自动安装。 + +### 从 Fedora Linux 中删除 Brave 浏览器 + +![Brave Browser in Fedora Linux][6] + +如果你因为某些原因不喜欢 Brave,你可以从你的系统中删除它。只需使用 dnf remove 命令: + +``` + + sudo dnf remove brave-browser + +``` + +当询问时按 Y: + +![Removing Brave browser from Fedora Linux][7] + +你也可以选择禁用 brave-browser-rpm-release.s3.brave.com_x86_64_.repo 或者从 /etc/yum/repos.d 中完全删除这个文件,虽然这并不是必须的。 + +我希望这个快速提示对你有帮助。如果你有任何问题或建议,请让我知道。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/install-brave-browser-fedora/ + +作者:[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://brave.com/ +[2]: https://itsfoss.com/best-browsers-ubuntu-linux/ +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/adding-Brave-browser-repository-in-Fedora.png?resize=800%2C300&ssl=1 +[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/Installing-Brave-Browser-Fedora.png?resize=800%2C428&ssl=1 +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/start-brave-fedora-linux.png?resize=759%2C219&ssl=1 +[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/Brave-Browser-in-Fedora-Linux.png?resize=800%2C530&ssl=1 +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/removing-Brave-browser-Fedora-Linux.png?resize=800%2C399&ssl=1 From e9cfdcbbad0567964d0cf327fa12dcd2f9cd454d Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 25 Nov 2021 08:57:25 +0800 Subject: [PATCH 005/244] translating --- sources/tech/20211022 3 tips for printing with Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20211022 3 tips for printing with Linux.md b/sources/tech/20211022 3 tips for printing with Linux.md index 56ace22fd8..2907965a3f 100644 --- a/sources/tech/20211022 3 tips for printing with Linux.md +++ b/sources/tech/20211022 3 tips for printing with Linux.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/21/10/print-linux" [#]: author: "Lauren Pritchett https://opensource.com/users/lauren-pritchett" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 1513ae383ba91d48d1a6b4984df8df9f7dbf25e7 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 25 Nov 2021 09:02:12 +0800 Subject: [PATCH 006/244] Revert "translating" This reverts commit e9cfdcbbad0567964d0cf327fa12dcd2f9cd454d. --- sources/tech/20211022 3 tips for printing with Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20211022 3 tips for printing with Linux.md b/sources/tech/20211022 3 tips for printing with Linux.md index 2907965a3f..56ace22fd8 100644 --- a/sources/tech/20211022 3 tips for printing with Linux.md +++ b/sources/tech/20211022 3 tips for printing with Linux.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/21/10/print-linux" [#]: author: "Lauren Pritchett https://opensource.com/users/lauren-pritchett" [#]: collector: "lujun9972" -[#]: translator: "geekpi" +[#]: translator: " " [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 8c948e35acfe4047badd621322e7f432986822a6 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 25 Nov 2021 09:10:11 +0800 Subject: [PATCH 007/244] sources/tech/20211121 4 open source ways to create holiday greetings.md --- ...source ways to create holiday greetings.md | 2 +- ...k Permissions Graphically With Flatseal.md | 86 ------------------- 2 files changed, 1 insertion(+), 87 deletions(-) delete mode 100644 sources/tech/20211124 Manage Flatpak Permissions Graphically With Flatseal.md diff --git a/sources/tech/20211121 4 open source ways to create holiday greetings.md b/sources/tech/20211121 4 open source ways to create holiday greetings.md index d3eacb2bdd..c073eb80b6 100644 --- a/sources/tech/20211121 4 open source ways to create holiday greetings.md +++ b/sources/tech/20211121 4 open source ways to create holiday greetings.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/21/11/open-source-holiday-greetings" [#]: author: "Don Watkins https://opensource.com/users/don-watkins" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " diff --git a/sources/tech/20211124 Manage Flatpak Permissions Graphically With Flatseal.md b/sources/tech/20211124 Manage Flatpak Permissions Graphically With Flatseal.md deleted file mode 100644 index 4be7bee3f3..0000000000 --- a/sources/tech/20211124 Manage Flatpak Permissions Graphically With Flatseal.md +++ /dev/null @@ -1,86 +0,0 @@ -[#]: subject: "Manage Flatpak Permissions Graphically With Flatseal" -[#]: via: "https://itsfoss.com/flatseal/" -[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" -[#]: collector: "lujun9972" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Manage Flatpak Permissions Graphically With Flatseal -====== - -The newer versions of Android give you a more granular control over the access and permission an individual app can have. This is vital because many applications were (are) abusing the system permissions. Download a weather app and it will ask to access your call logs as if that has anything to do with the weather. - -Why am I talking about Android app permissions? Because that is something you could relate with this application’s functioning. - -You probably already know [what Flatpak is][1]. These are sandboxed applications with selected access to system resources like file storage, network interface etc. - -Just like Android, you can control the access to system resources by Flatpak applications. By default, that happens with [Flatpak commands][2] and not everyone can be comfortable with it. - -And hence, there is this tiny utility called Flatseal that allows you to manage and control the Flatpak permissions at application level. - -### Flatseal - -![Flatseal][3] - -[Flatseal][4] is a graphical utility to review and modify permissions your Flatpak applications has got. This makes things a lot easier than going through the commands. - -Flatseal lists all the installed Flatpak applications. When you select one, you can see all the permissions. The enabled permissions can be easily spotted and if you want, you can disable it. - -For example, Ksnip is a screenshot utility and it also has networking access to share the screenshots with online services like Imgur. If you do not need it, you can disable it. - -![Control permissions of individual Flatpak apps][5] - -If nothing else, it is interesting to see what kind of permissions an application has. For example, you can see that ksnip has the ability to run in the background (so that you can use it for taking screenshots with keyboard shortcuts). - -![][6] - -### Installing Flatseal - -Since it’s all about Flatpak, it only makes sense that Flatseal is available as a Flatpak package. - -On Fedora, if the Flathub repo is added, you can install it from the software center. - -![Installing Flatseal from the software center][7] - -Otherwise, the command line is always there to help you. - -``` - - flatpak install flathub com.github.tchx84.Flatseal - -``` - -### Do you really need to control permissions? - -That’s a subjective question and it totally depends on you. Thankfully, the desktop Linux apps are not as abusive as Android apps so far. - -An average user usually does not bother with these things and that’s totally fine. - -However, if you are overly cautious about these things or you find a good reason, Flatseal provides the easy option. - -You should also be careful about what permissions you are changing. If you disable a permission crucial to the functioning of the application, it will surely cause trouble while using the application. - -So, overall, this is not something an average user is going to use. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/flatseal/ - -作者:[Abhishek Prakash][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/abhishek/ -[b]: https://github.com/lujun9972 -[1]: https://itsfoss.com/what-is-flatpak/ -[2]: https://itsfoss.com/flatpak-guide/ -[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/flatseal.png?resize=800%2C474&ssl=1 -[4]: https://flathub.org/apps/details/com.github.tchx84.Flatseal -[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/flatpak-permission-control-flatseal.png?resize=800%2C503&ssl=1 -[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/flatpak-permissions-with-flatseal.png?resize=800%2C441&ssl=1 -[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/install-flatseal.png?resize=800%2C467&ssl=1 From 7755cf0b3513f2e34079f59466008649685dc642 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91?= Date: Thu, 25 Nov 2021 09:12:22 +0800 Subject: [PATCH 008/244] Translating --- sources/tech/20210403 FreeDOS commands you need to know.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210403 FreeDOS commands you need to know.md b/sources/tech/20210403 FreeDOS commands you need to know.md index 34cb48280e..592d468544 100644 --- a/sources/tech/20210403 FreeDOS commands you need to know.md +++ b/sources/tech/20210403 FreeDOS commands you need to know.md @@ -2,7 +2,7 @@ [#]: via: (https://opensource.com/article/21/4/freedos-commands) [#]: author: (Kevin O'Brien https://opensource.com/users/ahuka) [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (robsean) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 383f0e089299bdf1dd3e1ab87dad142330b8a201 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91?= Date: Thu, 25 Nov 2021 09:18:06 +0800 Subject: [PATCH 009/244] Translated --- ...and remove software packages on FreeDOS.md | 113 ------------------ ...and remove software packages on FreeDOS.md | 113 ++++++++++++++++++ 2 files changed, 113 insertions(+), 113 deletions(-) delete mode 100644 sources/tech/20210610 Install and remove software packages on FreeDOS.md create mode 100644 translated/tech/20210610 Install and remove software packages on FreeDOS.md diff --git a/sources/tech/20210610 Install and remove software packages on FreeDOS.md b/sources/tech/20210610 Install and remove software packages on FreeDOS.md deleted file mode 100644 index 4ea390d1e2..0000000000 --- a/sources/tech/20210610 Install and remove software packages on FreeDOS.md +++ /dev/null @@ -1,113 +0,0 @@ -[#]: subject: (Install and remove software packages on FreeDOS) -[#]: via: (https://opensource.com/article/21/6/freedos-package-manager) -[#]: author: (Jim Hall https://opensource.com/users/jim-hall) -[#]: collector: (lujun9972) -[#]: translator: (robsean) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Install and remove software packages on FreeDOS -====== -Get familiar with FDIMPLES, the FreeDOS package manager. -![Package wrapped with brown paper and red bow][1] - -On Linux, you may have used a _package manager_ to install or remove packages. For example, the default package manager on Debian Linux is the `deb` command, and the default package manager on Fedora Linux is the `dnf` command. But did you know that FreeDOS has a package manager, too? - -### Installing packages - -The FreeDOS 1.3 RC4 distribution includes lots of great programs and applications you can use. However, we don't install all of them by default—we don't want to fill your hard drive space unnecessarily, especially on older systems that may have hard drive capacities of only a few hundred megabytes. And if you selected the "Plain DOS system" option when you installed FreeDOS, you will find your FreeDOS system is quite small (about 20 megabytes). - -However, it's easy to install new packages. From the command line, run the `FDIMPLES` program. Because DOS is _case insensitive_, you can type this command using uppercase or lowercase letters: `fdimples` is the same as `FDIMPLES` or `FDImples`. - -![fdimples][2] - -The FDIMPLES package manager on FreeDOS 1.3 RC4 (running in QEMU) -(Jim Hall, [CC-BY SA 4.0][3]) - -FDIMPLES is an acronym for "**F**ree**D**OS **I**nstaller - **M**y **P**ackage **L**ist **E**ditor **S**oftware," and is an interactive package manager. FDIMPLES reads the installation media to identify packages that it can install or remove. If you see a different menu that says "Installed" but does not let you install other software, check that the FreeDOS install CD-ROM is loaded on your system. On a physical machine, you'll need to insert the CD-ROM into the CD-ROM drive; on a virtual machine like QEMU or VirtualBox, you'll need to associate the install CD-ROM image with the virtal machine. - -![fdimples installed][4] - -If you only see an "Installed" message, check that the CD-ROM is loaded -(Jim Hall, [CC-BY SA 4.0][3]) - -Let's say you wanted to install software that lets you play music and other sound files. Use the Up and Down arrow keys to navigate to the **Sound Tools** entry in the menu. This is called a _package group_ for the sound and music programs. - -![fdimples sound][5] - -Highlighting the Sound package group in FDIMPLES -(Jim Hall, [CC-BY SA 4.0][3]) - -To select all of the packages in this group, press the spacebar on your keyboard. Should you decide to install individual packages in this group, press the Tab key to move into the _package list_ pane, then select each package with the spacebar. - -![fdimples sound select][6] - -Select all the packages in a group by pressing the spacebar -(Jim Hall, [CC-BY SA 4.0][3]) - -You can continue to select other packages or package groups that you want to install. When you have selected everything, use the Tab key to highlight the **OK** button, and press the spacebar. - -![fdimples sound select ok][7] - -Highlight the "Ok" button when you're ready to install -(Jim Hall, [CC-BY SA 4.0][3]) - -FDIMPLES then installs all of the packages you selected. This may only take a few moments if you selected only a couple of small packages, or it could take minutes if you asked to install many larger packages. As it installs each package, FDIMPLES prints the status. Afterward, FDIMPLES exits to the command line, so you can get back to work. - -![fdimples sound install done][8] - -FDIMPLES shows the progress as its installs packages, and automatically exits when done -(Jim Hall, [CC-BY SA 4.0][3]) - -### Removing packages - -What if you install a package, only to discover afterward that you don't want it? Removing packages is just as easy in FDIMPLES. - -Just as when installing packages, start FDIMPLES, and use the arrow keys to navigate to the group that contains the packages you want to remove. For example, if I wanted to uninstall a few of the music-player packages I installed earlier, I would navigate to the **Sound Tools** package group. - -![fdimples sound select][9] - -Navigate to the group with the packages you want to remove -(Jim Hall, [CC-BY SA 4.0][3]) - -To remove the entire package group at once, you can press the spacebar on the group you want to remove to unselect it. But let's say I only wanted to remove a few packages that I didn't need, like the **CDP** audio CD player. (I don't have any physical music CDs.) To remove CDP, hit the Tab key to move into the package list pane, then use the spacebar to unselect the CDP package. This removes the **X** on that package. - -![fdimples unselect cdp][10] - -Unselect a package to remove it -(Jim Hall, [CC-BY SA 4.0][3]) - -You can continue to unselect other packages or package groups that you want to remove. When you have selected everything, use the Tab key to highlight the **OK** button, and press the spacebar. FDIMPLES will remove the packages you unselected, then automatically returns you to the command line. - -![fdimples cdp removed][11] - -FDIMPLES removes the package, then returns to the command line -(Jim Hall, [CC-BY SA 4.0][3]) - -We include many packages in FreeDOS, across a variety of package groups. Use FDIMPLES to install the software you need. Feel free to experiment! If you decide you don't want to keep a package, you can remove it and free up your disk space for other things. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/6/freedos-package-manager - -作者:[Jim Hall][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/jim-hall -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/brown-package-red-bow.jpg?itok=oxZYQzH- (Package wrapped with brown paper and red bow) -[2]: https://opensource.com/sites/default/files/uploads/fdimples.png (The FDIMPLES package manager on FreeDOS 1.3 RC4 (running in QEMU)) -[3]: https://creativecommons.org/licenses/by-sa/4.0/ -[4]: https://opensource.com/sites/default/files/uploads/fdimples-installed.png (If you only see an "Installed" message, check that the CD-ROM is loaded) -[5]: https://opensource.com/sites/default/files/uploads/fdimples-sound.png (Highlighting the Sound package group in FDIMPLES) -[6]: https://opensource.com/sites/default/files/uploads/fdimples-sound-select.png (Select all the packages in a group by pressing the spacebar) -[7]: https://opensource.com/sites/default/files/uploads/fdimples-sound-select-ok.png (Highlight the "Ok" button when you're ready to install) -[8]: https://opensource.com/sites/default/files/uploads/fdimples-sound-select-ok-install4.png (FDIMPLES shows the progress as its installs packages, and automatically exits when done) -[9]: https://opensource.com/sites/default/files/uploads/fdimples-sound-select_0.png (Navigate to the group with the packages you want to remove) -[10]: https://opensource.com/sites/default/files/uploads/fdimples-unselect-cdp.png (Unselect a package to remove it) -[11]: https://opensource.com/sites/default/files/uploads/fdimples-unselect-cdp-removed.png (FDIMPLES removes the package, then returns to the command line) diff --git a/translated/tech/20210610 Install and remove software packages on FreeDOS.md b/translated/tech/20210610 Install and remove software packages on FreeDOS.md new file mode 100644 index 0000000000..9caac93d38 --- /dev/null +++ b/translated/tech/20210610 Install and remove software packages on FreeDOS.md @@ -0,0 +1,113 @@ +[#]: subject: (Install and remove software packages on FreeDOS) +[#]: via: (https://opensource.com/article/21/6/freedos-package-manager) +[#]: author: (Jim Hall https://opensource.com/users/jim-hall) +[#]: collector: (lujun9972) +[#]: translator: (robsean) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +在 FreeDOS 上安装和移除软件包 +====== +熟悉 FreeDOS 软件包管理器 FDIMPLES 。 +![使用棕色纸盒红色蝴蝶结打包的软件包][1] + +在 Linux 上,你可能已经使用过一个 _软件包管理器_ 来安装或移除软件包。例如,在 Debian Linux 上的默认软件包管理器是 `deb` 命令,在 Fedora Linux 上的默认软件包管理器是 `dnf` 命令。 但是你知道 FreeDOS 也有一个软件包管理器吗? + +### 安装软件包 + +FreeDOS 1.3 RC4 发行版包含了很多极好的你可以使用的程序和应用程序。不过,我们不会默认安装其中的全部的程序 — 我们不想过度地填充你的硬盘驱动器空间,尤其是在一个较老的系统上,可能仅有几百兆字节容量的硬盘驱动器。当你安装 FreeDOS 时,如果你选择 "Plain DOS system" 选项,你将发现你的 FreeDOS 系统是非常小的 (大约 20 MB 大小) 。 + +不过,安装新的软件包很容易。在命令行中运行`FDIMPLES` 程序。因为 DOS 是 _不区分大小写_ 的,所以,你可以使用大写字母或小写字母来输入这个命令: `fdimples` 。(`fdimples` 与 `FDIMPLES` 或 `FDImples` 等同)。 + +![fdimples][2] + +在 FreeDOS 1.3 RC4 上的 FDIMPLES 软件包管理器 (运行在 QEMU 之中) +(Jim Hall, [CC-BY SA 4.0][3]) + +FDIMPLES 是 "**F**ree**D**OS **I**nstaller - **M**y **P**ackage **L**ist **E**ditor **S**oftware" 的首字母缩略词,是一个交互式软件包管理器。FDIMPLES 读取安装介质来识别可以安装或移除的软件包。如果你看到一个不同的菜单,它显示 "已经安装" ,但是,不让你安装其它的软件的话,请检查你系统中是否有 FreeDOS 的 CD-ROM 的安装介质。在一台物理机器上,你将需要将 CD-ROM 插入 CD-ROM 驱动器;在一台诸如 QEMU 或 VirtualBox 之类的虚拟机器上,你需要将安装 FreeDOS 的 CD-ROM 的安装介质与虚拟机器关联在一起。 + +![fdimples installed][4] + +如果你仅看到一条 "已经安装" 的信息,检查 CD-ROM 是否已经加载 +(Jim Hall, [CC-BY SA 4.0][3]) + +让我们假设你想安装一些可以让你听音乐文件或其它声音文件的软件。使用向上箭和向下箭按键来导航到菜单中的 **声音工具** 项。这是一个针对声音和音乐程序的 _软件包组_ 。 + +![fdimples sound][5] + +在 FDIMPLES 中突出显示声音软件包组 +(Jim Hall, [CC-BY SA 4.0][3]) + +为选择这个组中的所有软件包,在你的键盘上按下空格键。如果你决定安装这个组中的某个软件包,按下 Tab 按键来移动到 _软件包列表_ 方框面板,接下来使用空格键来选择每个软件包。 + +![fdimples sound select][6] + +通过按下空格键来选择一个组中的所有的软件包 +(Jim Hall, [CC-BY SA 4.0][3]) + +你可以继续选择你想要安装的其它的软件包或软件包组。当你选择好一切的东西后,使用 Tab 按键来突出显示 **OK** 按键,并按下空格键按键。 + +![fdimples sound select ok][7] + +当你准备安装时,突出显示 "Ok" 按钮 +(Jim Hall, [CC-BY SA 4.0][3]) + +FDIMPLES 接下来会安装你所选择的所有的软件包。如果你仅选择几个小型的软件包,这可能只需要花费片刻的时间,或者,如果你要求安装很多大型的软件包,它可能会花费数分钟的时间。当 FDIMPLES 安装每个软件包时,FDIMPLES 会打印安装状态。在安装完后,FDIMPLES 退出到命令行之中,以便你可以回去继续工作。 + +![fdimples sound install done][8] + +当 FDIMPLES 安装软件包时,FDIMPLES 会显示安装过程,并在完成安装后自动地退出 +(Jim Hall, [CC-BY SA 4.0][3]) + +### 移除软件包 + +如果你安装了一个软件包,但是后来发现你不想要它了怎么办?在 FDIMPLES 中移除软件包也同样容易。 + +就像安装软件包一样,启动 FDIMPLES ,使用箭头键导航到包含你想要移除的软件包的组。例如,如果我想卸载一些我先前安装的音乐播放器软件包,我将导航到 **声音工具** 软件包组。 + +![fdimples sound select][9] + +导航到你想要移除的软件包组 +(Jim Hall, [CC-BY SA 4.0][3]) + +为一次移除整个软件包组,你可以在你想要移除的软件包组上按下空格键来取消卸载它们。但是,在这里让我们假设我只是想移除几个我不需要的软件包,像 **CDP** 音频 CD 播放器。(我没有任何的物理音乐 CD 光盘)。为移除 CDP ,敲击 Tab 按键来移动到软件包列表方框面板,接下来使用空格键来取消选择 CDP 软件包。这会在该软件包上移除 **X** 标志。 + +![fdimples unselect cdp][10] + +取消选择一个软件包来移除它 +(Jim Hall, [CC-BY SA 4.0][3]) + +你可以继续取消选择你想要移除的其它的软件包或软件包组。当你选择一切的东西后,使用 Tab 按键来突出显示 **OK** 按钮,并按下空格键按键。FDIMPLES 将移除你取消选择的软件包,然后自动地返回到命令行之中。 + +![fdimples cdp removed][11] + +FDIMPLES 移除软件包,然后返回到命令行之中 +(Jim Hall, [CC-BY SA 4.0][3]) + +在 FreeDOS 中。我们包含很多的软件包,遍及各种各样的软件包组。使用 FDIMPLES 来安装你需要的软件。请随意实验!如果你决定你不想要保留一个软件包了,你可以移除它,并为其它的软件包来释放所占用的磁盘空间。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/6/freedos-package-manager + +作者:[Jim Hall][a] +选题:[lujun9972][b] +译者:[robsean](https://github.com/robsean) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jim-hall +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/brown-package-red-bow.jpg?itok=oxZYQzH- (Package wrapped with brown paper and red bow) +[2]: https://opensource.com/sites/default/files/uploads/fdimples.png (The FDIMPLES package manager on FreeDOS 1.3 RC4 (running in QEMU)) +[3]: https://creativecommons.org/licenses/by-sa/4.0/ +[4]: https://opensource.com/sites/default/files/uploads/fdimples-installed.png (If you only see an "Installed" message, check that the CD-ROM is loaded) +[5]: https://opensource.com/sites/default/files/uploads/fdimples-sound.png (Highlighting the Sound package group in FDIMPLES) +[6]: https://opensource.com/sites/default/files/uploads/fdimples-sound-select.png (Select all the packages in a group by pressing the spacebar) +[7]: https://opensource.com/sites/default/files/uploads/fdimples-sound-select-ok.png (Highlight the "Ok" button when you're ready to install) +[8]: https://opensource.com/sites/default/files/uploads/fdimples-sound-select-ok-install4.png (FDIMPLES shows the progress as its installs packages, and automatically exits when done) +[9]: https://opensource.com/sites/default/files/uploads/fdimples-sound-select_0.png (Navigate to the group with the packages you want to remove) +[10]: https://opensource.com/sites/default/files/uploads/fdimples-unselect-cdp.png (Unselect a package to remove it) +[11]: https://opensource.com/sites/default/files/uploads/fdimples-unselect-cdp-removed.png (FDIMPLES removes the package, then returns to the command line) From ed4f350b08c78096538a4c3dbdb8e305a6f2a496 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91?= Date: Thu, 25 Nov 2021 09:18:52 +0800 Subject: [PATCH 010/244] Translating --- sources/tech/20210603 FreeDOS commands for Linux fans.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210603 FreeDOS commands for Linux fans.md b/sources/tech/20210603 FreeDOS commands for Linux fans.md index 522ca199eb..ad3d509fc1 100644 --- a/sources/tech/20210603 FreeDOS commands for Linux fans.md +++ b/sources/tech/20210603 FreeDOS commands for Linux fans.md @@ -2,7 +2,7 @@ [#]: via: (https://opensource.com/article/21/6/freedos-linux-users) [#]: author: (Jim Hall https://opensource.com/users/jim-hall) [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (robsean) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From baa7a36380e6cbb5b322606730647ceb82b219ea Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 25 Nov 2021 13:12:06 +0800 Subject: [PATCH 011/244] PRF&PUB @geekpi https://linux.cn/article-14018-1.html --- ... Kubernetes ReplicationController works.md | 130 +++++++++++++++ ... Kubernetes ReplicationController works.md | 149 ------------------ 2 files changed, 130 insertions(+), 149 deletions(-) create mode 100644 published/20211109 How the Kubernetes ReplicationController works.md delete mode 100644 translated/tech/20211109 How the Kubernetes ReplicationController works.md diff --git a/published/20211109 How the Kubernetes ReplicationController works.md b/published/20211109 How the Kubernetes ReplicationController works.md new file mode 100644 index 0000000000..a46f10777f --- /dev/null +++ b/published/20211109 How the Kubernetes ReplicationController works.md @@ -0,0 +1,130 @@ +[#]: subject: "How the Kubernetes ReplicationController works" +[#]: via: "https://opensource.com/article/21/11/kubernetes-replicationcontroller" +[#]: author: "Mike Calizo https://opensource.com/users/mcalizo" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14018-1.html" + +Kubernetes 复制控制器如何工作 +====== + +> 复制控制器负责管理吊舱的生命周期并确保在任何时候运行着所需的指定数量的吊舱。 + +![](https://img.linux.net.cn/data/attachment/album/202111/25/131052ltjaz53jqkfamthh.jpg) + +你有没有想过,谁负责监督和管理 Kubernetes 集群内运行的“吊舱pod”的确切数量?Kubernetes 可以通过多种方式做到这一点,但一个常见的方法是使用 “复制控制器ReplicationController(RC)”。RC 负责管理吊舱的生命周期,并确保在任何时候运行着所需的指定数量的吊舱。但另一方面,它不负责高级的集群能力,如执行自动扩展、准备度和活跃探测以及其他高级的复制能力。Kubernetes 集群中的其他组件可以更好地执行这些功能。 + +简而言之,RC 的职责有限,通常用于不需要复杂逻辑就能达到某些要求的具体实现(例如,确保所需的吊舱数量总是与指定的数量相符)。如果超过了所需的数量,RC 会删除多余的,并确保即使在节点故障或吊舱终止的情况下,也有相同数量的存在。 + +简单的事情不需要复杂的解决方案,对我来说,这就是 RC 如何被使用的一个完美的比喻。 + +### 如何创建一个 RC + +像大多数 Kubernetes 资源一样,你可以使用 YAML 或 JSON 格式创建一个 RC,然后将其发布到 Kubernetes API 端点。 + +``` +$ kubectl create -f rcexample.yaml + replicationcontroller/rcexample created +``` + +现在,我将深入一下 `rcexample.yaml` 的样子。 + +``` +apiVersion: v1 +kind: ReplicationController → RC 描述符 +metadata: + name: rcexample → 复制控制器名字 +spec: + replicas: 3 → 预期的吊舱数量 + selector: → 这个 RC 的吊舱选择器 + app: nginx + template: → 用于创建新吊舱的模板 + metadata: + labels: + app: nginx + spec: + containers: + - name: nginx + image: nginx +``` + +进一步解释,这个文件在执行时创建了一个名为 `rcexample` 的 RC,确保三个名为 `nginx` 的吊舱实例一直在运行。如果一个或所有的 `app=nginx` 吊舱没有运行,新的吊舱将根据定义的吊舱模板创建。 + +一个 RC 有三个部分: + + * 复制品:`3` + * 吊舱模板:`app=nginx` + * 吊舱选择器:`app=nginx` + +注意,吊舱模板要与吊舱选择器相匹配,以防止 RC 一直创建吊舱。如果你创建的 RC 的吊舱选择器与模板不匹配,Kubernetes API 服务器会给你一个错误。 + +为了验证 RC `rcexample` 是否被创建: + +``` +$ kubectl get po +NAME READY STATUS RESTARTS AGE +rcexample-53thy 0/1 Running 0 10s +rcexample-k0xz6 0/1 Running 0 10s +rcexample-q3vkg 0/1 Running 0 10s +``` + +要删除 RC: + +``` +$ kubectl delete rc rcexample + replicationcontroller "rcexample" deleted +``` + +注意,你可以对 RC 中的服务使用 [滚动更新][2] 策略,逐个替换吊舱。 + +### 其他复制容器的方法 + +在 Kubernetes 部署中,有多种方法可以实现容器的复制。Kubernetes 成为容器平台的主要选择的主要原因之一是复制容器以获得可靠性、负载平衡和扩展的原生能力。 + +我在上面展示了你如何轻松地创建一个 RC,以确保在任何时候都有一定数量的吊舱可用。你可以通过更新副本的数量来手动扩展吊舱。 + +另一种可能的方法是通过使用 “[复制集][3]ReplicaSet(RS)”来达到复制的目的。 + +``` +(kind: ReplicaSet) +``` + +RS 的功能几乎与 RC 相同。主要区别在于,RS 不允许滚动更新策略。 + +另一种实现复制的方法是通过使用 “[部署][4]Deployments”。 + +``` +(kind: Deployment) +``` + +部署是一种更高级的容器复制方法。从功能上讲,部署提供了相同的功能,但在需要时可以推出和回滚变化。这种功能之所以能够实现,是因为部署有 “策略类型StrategyType” 规范来用新的吊舱替换旧的吊舱。你可以定义两种类型的部署策略:“重新创建Recreate” 和 “滚动更新RollingUpdate”。你可以如下指定部署策略: + +``` +StrategyType: RollingUpdate +``` + +### 总结 + +容器的复制功能是大多数企业考虑采用 Kubernetes 的主要原因之一。复制可以让你达到大多数关键应用程序需要的可靠性和可扩展性,作为生产的最低要求。 + +了解在 Kubernetes 集群中使用哪些方法来实现复制,对于决定哪种方法最适合你的应用架构考虑非常重要。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/11/kubernetes-replicationcontroller + +作者:[Mike Calizo][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/mcalizo +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/kubernetes_containers_ship_lead.png?itok=9EUnSwci (Ships at sea on the web) +[2]: https://kubernetes.io/docs/tutorials/kubernetes-basics/update/update-intro/ +[3]: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/ +[4]: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/ diff --git a/translated/tech/20211109 How the Kubernetes ReplicationController works.md b/translated/tech/20211109 How the Kubernetes ReplicationController works.md deleted file mode 100644 index 092ebd85ab..0000000000 --- a/translated/tech/20211109 How the Kubernetes ReplicationController works.md +++ /dev/null @@ -1,149 +0,0 @@ -[#]: subject: "How the Kubernetes ReplicationController works" -[#]: via: "https://opensource.com/article/21/11/kubernetes-replicationcontroller" -[#]: author: "Mike Calizo https://opensource.com/users/mcalizo" -[#]: collector: "lujun9972" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Kubernetes ReplicationController 如何工作 -====== -ReplicationController 负责管理 pod 的生命周期并确保所需的指定数量的 pod 在任何时候都在运行。 -![Ships at sea on the web][1] - -你有没有想过,谁负责监督和管理 Kubernetes 集群内运行的 pod 的确切数量?Kubernetes 可以通过多种方式做到这一点,但一个常见的方法是使用 ReplicationController(rc)。ReplicationController 负责管理 pod 的生命周期,并确保在任何时候都能运行所需的指定数量的 pod。另一方面,它不负责高级的集群能力,如执行自动扩展、准备度和活跃探测以及其他高级的复制能力。Kubernetes 集群中的其他组件可以更好地执行这些功能。 - -简而言之,ReplicationController 的职责有限,通常用于不需要复杂逻辑就能达到某些要求的具体实现(例如,确保所需的 pod 数量总是与指定的数量相符)。如果超过了所需的数量,ReplicationController 会删除多余的,并确保即使在节点故障或 pod 终止的情况下,也有相同数量的 pod 存在。 - -简单的事情不需要复杂的解决方案,对我来说,这就是 ReplicationController 如何被使用的一个完美的比喻。 - -### 如何创建一个 ReplicationController - -像大多数 Kubernetes 资源一样,你可以使用 YAML 或 JSON 格式创建一个 ReplicationController,然后将其发布到 Kubernetes API 端点。 - - -``` - - -$ kubectl create -f rcexample.yaml - replicationcontroller/rcexample created - -``` - -现在,我将深入一下 `rcexample.yaml` 的样子。 - - -``` - - -apiVersion: v1 -kind: ReplicationController → rc descriptor -metadata: -name: rcexample → Name of the replication controller -spec: -replicas: 3 → Desired number of pods -selector: → The pod selector for this rc - app: nginx -template: → The template for creating a new pod - metadata: - labels: - app: nginx - spec: - containers: - - name: nginx - image: nginx - -``` - -为了进一步解释,这个文件在执行时创建了一个名为 `rcexample` 的 ReplicationController,确保三个名为 `nginx` 的 pod 实例一直在运行。如果一个或所有的pod `app=nginx` 没有运行,新的 pod 将根据定义的 pod 模板创建。 - -一个 ReplicationController 有三个部分: - - * Replica:3 - * Pod Template:app=nginx - * Pod Selector:app=nginx - - - -注意,Pod Template 要与 Pod Selector 相匹配,以防止 ReplicationController 无限期地创建 pod。如果你创建的 ReplicationController 的 pod selector 与 template 不匹配,Kubernetes API 服务器会给你一个错误。 - -为了验证 ReplicationController `rcexample` 是否被创建: - - -``` - - -$ kubectl get po -NAME READY STATUS RESTARTS AGE -rcexample-53thy 0/1 Running 0 10s -rcexample-k0xz6 0/1 Running 0 10s -rcexample-q3vkg 0/1 Running 0 10s - -``` - -要删除 ReplicationController: - - -``` - - -$ kubectl delete rc rcexample - replicationcontroller "rcexample" deleted - -``` - -注意,你可以对 ReplicationController 中的服务使用[滚动更新][2]策略,逐个替换 pod。 - -### 其他复制容器的方法 - -在 Kubernetes 部署中,有多种方法可以实现容器的复制。Kubernetes 成为容器平台的主要选择的主要原因之一是复制容器以获得可靠性、负载平衡和扩展的原生能力。 - -我在上面展示了你如何轻松地创建一个 ReplicationController,以确保在任何时候都有一定数量的 pod 可用。你可以通过更新副本的数量来手动扩展 pod。 - -另一种可能的方法是通过使用 [ReplicaSet][3] 来达到复制的目的。 - - -``` -`(kind: ReplicaSet)` -``` - -ReplicaSet(rs) 的功能几乎与 ReplicationController 相同。主要区别在于,ReplicaSet 不允许滚动更新策略。 - -另一种实现复制的方法是通过使用 [Deployments][4]。 - - -``` -`(kind: Deployment)` -``` - -Deployments 是一种更高级的容器复制方法。从功能上讲,Deployments 提供了相同的功能,但在需要时可以推出和回滚变化。这种功能之所以能够实现,是因为 Deployments 有 StrategyType 规范来用新的 pod 替换旧的 pod。你可以定义两种类型的部署策略:Recreate 和 RollingUpdate。你可以如下指定部署策略: - - -``` -`StrategyType: RollingUpdate` -``` - -### 总结 - -容器的复制是大多数企业考虑采用 Kubernetes 的主要原因之一。复制可以让你达到大多数关键应用程序需要的可靠性和可扩展性,作为生产的最低要求。 - -了解在 Kubernetes 集群中使用哪些方法来实现复制对于决定哪种方法最适合你的应用架构考虑非常重要。 - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/11/kubernetes-replicationcontroller - -作者:[Mike Calizo][a] -选题:[lujun9972][b] -译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/mcalizo -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/kubernetes_containers_ship_lead.png?itok=9EUnSwci (Ships at sea on the web) -[2]: https://kubernetes.io/docs/tutorials/kubernetes-basics/update/update-intro/ -[3]: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/ -[4]: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/ From 7e50876908c785b4b23f0674311083db7cdf7beb Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 25 Nov 2021 13:25:45 +0800 Subject: [PATCH 012/244] APL --- ... Own Linux Distribution is Now Completely Based on Fedora.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/news/20211124 Amazon-s Own Linux Distribution is Now Completely Based on Fedora.md b/sources/news/20211124 Amazon-s Own Linux Distribution is Now Completely Based on Fedora.md index 17b12bb4a0..2f719730eb 100644 --- a/sources/news/20211124 Amazon-s Own Linux Distribution is Now Completely Based on Fedora.md +++ b/sources/news/20211124 Amazon-s Own Linux Distribution is Now Completely Based on Fedora.md @@ -2,7 +2,7 @@ [#]: via: "https://news.itsfoss.com/amazon-linux-2022-preview/" [#]: author: "Abhishek https://news.itsfoss.com/author/root/" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "wxy" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From a11f378a095990767f59e06060121f493904da30 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 25 Nov 2021 14:21:48 +0800 Subject: [PATCH 013/244] TSL&PRF --- ...ution is Now Completely Based on Fedora.md | 58 ------------------- ...ution is Now Completely Based on Fedora.md | 57 ++++++++++++++++++ 2 files changed, 57 insertions(+), 58 deletions(-) delete mode 100644 sources/news/20211124 Amazon-s Own Linux Distribution is Now Completely Based on Fedora.md create mode 100644 translated/news/20211124 Amazon-s Own Linux Distribution is Now Completely Based on Fedora.md diff --git a/sources/news/20211124 Amazon-s Own Linux Distribution is Now Completely Based on Fedora.md b/sources/news/20211124 Amazon-s Own Linux Distribution is Now Completely Based on Fedora.md deleted file mode 100644 index 2f719730eb..0000000000 --- a/sources/news/20211124 Amazon-s Own Linux Distribution is Now Completely Based on Fedora.md +++ /dev/null @@ -1,58 +0,0 @@ -[#]: subject: "Amazon’s Own Linux Distribution is Now Completely Based on Fedora" -[#]: via: "https://news.itsfoss.com/amazon-linux-2022-preview/" -[#]: author: "Abhishek https://news.itsfoss.com/author/root/" -[#]: collector: "lujun9972" -[#]: translator: "wxy" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Amazon’s Own Linux Distribution is Now Completely Based on Fedora -====== - -In case you did not know already, Amazon has its own general purpose Linux distribution, unsurprisingly called Amazon Linux. - -It is intended to be used on AWS servers. When you are deploying a server, you have the choice to use Amazon Linux along with other popular choices of Ubuntu, Debian etc. Since it is from Amazon, there is no licensing fee and Amazon controls on repositories and packages. You can expect a tight integration with AWS tools and access to new AWS innovations with Amazon Linux. - -Amazon Linux 2022 (AL2022) in the next release in the line of Amazon Linux 1 and 2 and it will be released in 2022 (you can guess that from the version number). - -### Upcoming Amazon Linux 2022 uses only Fedora - -Until now, Amazon Linux releases were based on a combination of Red Hat and Fedora both. Starting with AL2022, it will be explicitly using Fedora as upstream. - -The move intends to provide the AWS customers “with a wide variety of the latest software, such as updated language runtimes, as part of quarterly releases”. - -In order to improve the security, reduce attack surface, AL2022 will also have [SELinux][1] enabled and enforced by default. - -### New release model similar to Ubuntu - -Amazon Linux is also opting for a more predictable release schedule. A new major Amazon Linux version will be released every two years and will be supported for five years. This way users would know when and how to upgrade their operating system. - -This “new LTS version every 2 years and 5 years support” is very similar to what Ubuntu features today. - -### What else? - -AL2022 also has the ability to lock to a specific version of the Amazon Linux package repository. This gives the user control over how and when they absorb updates. - -Amazon Linux 2022 is available as preview (read beta) in all geographical regions. You can visit their GitHub page for more information on AL2022. - -#### Big Tech Websites Get Millions in Revenue, It's FOSS Got You! - -If you like what we do here at It's FOSS, please consider making a donation to support our independent publication. Your support will help us keep publishing content focusing on desktop Linux and open source software. - -I'm not interested - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/amazon-linux-2022-preview/ - -作者:[Abhishek][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://news.itsfoss.com/author/root/ -[b]: https://github.com/lujun9972 -[1]: https://linuxhandbook.com/selinux/ diff --git a/translated/news/20211124 Amazon-s Own Linux Distribution is Now Completely Based on Fedora.md b/translated/news/20211124 Amazon-s Own Linux Distribution is Now Completely Based on Fedora.md new file mode 100644 index 0000000000..66daeb8869 --- /dev/null +++ b/translated/news/20211124 Amazon-s Own Linux Distribution is Now Completely Based on Fedora.md @@ -0,0 +1,57 @@ +[#]: subject: "Amazon’s Own Linux Distribution is Now Completely Based on Fedora" +[#]: via: "https://news.itsfoss.com/amazon-linux-2022-preview/" +[#]: author: "Abhishek https://news.itsfoss.com/author/root/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: " " +[#]: url: " " + +亚马逊自己的 Linux 发行版现在完全基于 Fedora 了 +====== + +> 亚马逊已经发布了 Amazon Linux 2022 的公开预览版,并有了新的发布模式。 + +![](https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/11/amazon-linux-2022.png?w=1200&ssl=1) + +如果你还不知道,亚马逊有自己的通用 Linux 发行版,自然而然,它被称为 Amazon Linux。 + +它的目的是在 AWS 服务器上使用。当你部署服务器时,你可以选择使用 Amazon Linux,或其他流行的选择,如 Ubuntu、Debian 等。由于它来自亚马逊,所以没有许可费,而且亚马逊对软件库和软件包进行控制。你可以期待它与 AWS 工具紧密结合,并通过它获得新的 AWS 创新。 + +Amazon Linux 2022(AL2022)是其版本 1 和 2 之后的下一个版本,它将在 2022 年发布(你可以从版本号上猜到)。 + +### 即将发布的 Amazon Linux 2022 只基于 Fedora + +到目前为止,Amazon Linux 的发布是基于红帽 Linux 和 Fedora 两者的组合。从 AL2022 开始,它将明确使用 Fedora 作为上游。 + +此举意在为 AWS 客户“提供各种最新软件,如更新的语言运行时,作为季度发布的一部分”。 + +为了提高安全性,减少攻击面,AL2022 还将启用 [SELinux][1] 并默认执行。 + +### 与 Ubuntu 相似的新发布模式 + +Amazon Linux 还选择了一个更可预测的发布时间表。每两年将发布一个新的 Amazon Linux 主要版本,并将支持五年。这样,用户就会知道何时以及如何升级他们的操作系统。 + +这种“每两年一个新的 LTS 版本和 5 年的支持”与 Ubuntu 如今的特点非常相似。 + +### 还有什么? + +AL2022 也能锁定到亚马逊 Linux 软件包库的特定版本。这使得用户可以控制如何以及何时吸收更新。 + +Amazon Linux 2022 在所有的地理区域都可以作为预览版(即 beta 版)体验。你可以访问他们的 GitHub 页面了解更多关于 AL2022 的信息。 + + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/amazon-linux-2022-preview/ + +作者:[Abhishek][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/root/ +[b]: https://github.com/lujun9972 +[1]: https://linuxhandbook.com/selinux/ From 2ffdb8fb06aa66e7d2830833feb8301cfd8f60e4 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 25 Nov 2021 14:23:18 +0800 Subject: [PATCH 014/244] PUB @wxy https://linux.cn/article-14019-1.html --- ...wn Linux Distribution is Now Completely Based on Fedora.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/news => published}/20211124 Amazon-s Own Linux Distribution is Now Completely Based on Fedora.md (97%) diff --git a/translated/news/20211124 Amazon-s Own Linux Distribution is Now Completely Based on Fedora.md b/published/20211124 Amazon-s Own Linux Distribution is Now Completely Based on Fedora.md similarity index 97% rename from translated/news/20211124 Amazon-s Own Linux Distribution is Now Completely Based on Fedora.md rename to published/20211124 Amazon-s Own Linux Distribution is Now Completely Based on Fedora.md index 66daeb8869..2a32901437 100644 --- a/translated/news/20211124 Amazon-s Own Linux Distribution is Now Completely Based on Fedora.md +++ b/published/20211124 Amazon-s Own Linux Distribution is Now Completely Based on Fedora.md @@ -4,8 +4,8 @@ [#]: collector: "lujun9972" [#]: translator: "wxy" [#]: reviewer: "wxy" -[#]: publisher: " " -[#]: url: " " +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14019-1.html" 亚马逊自己的 Linux 发行版现在完全基于 Fedora 了 ====== From 23db211f33880d2e6ea1bd462769f606f2d87cff Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 25 Nov 2021 23:25:41 +0800 Subject: [PATCH 015/244] PUB @geekpi https://linux.cn/article-14021-1.html --- ...ng ways to use the Linux cowsay command.md | 172 +++++++++++++++++ ...ng ways to use the Linux cowsay command.md | 179 ------------------ 2 files changed, 172 insertions(+), 179 deletions(-) create mode 100644 published/20211117 3 interesting ways to use the Linux cowsay command.md delete mode 100644 translated/tech/20211117 3 interesting ways to use the Linux cowsay command.md diff --git a/published/20211117 3 interesting ways to use the Linux cowsay command.md b/published/20211117 3 interesting ways to use the Linux cowsay command.md new file mode 100644 index 0000000000..053dd5ab31 --- /dev/null +++ b/published/20211117 3 interesting ways to use the Linux cowsay command.md @@ -0,0 +1,172 @@ +[#]: subject: "3 interesting ways to use the Linux cowsay command" +[#]: via: "https://opensource.com/article/21/11/linux-cowsay-command" +[#]: author: "Don Watkins https://opensource.com/users/don-watkins" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14021-1.html" + +使用 cowsay 命令的 3 种有趣方式 +====== + +> 想试一个只是好玩的应用吗?试试 cowsay。 + +![](https://img.linux.net.cn/data/attachment/album/202111/25/232451f6v8fnne2np8e22e.jpg) + +大多数时候,终端是一个生产力的动力源。但是,终端的作用不止是命令和配置。在所有杰出的开源软件中,有些是 [为了好玩而写的][2]。我以前介绍过一些 [有趣的命令][3],但这篇文章只讲一个:古老的 `cowsay` 命令。 + +`cowsay` 是一只可配置的会说话(或思考)的牛。它接受一个文本字符串,并输出一个牛说话的图形。下面是一头牛在说它喜欢 Linux: + +``` +< I love Linux > +-------------- + \ ^__^ + \ (oo)\_______ + (__)\ )\/\ + ||----w | + || || +``` + +要得到这个结果,我只需输入: + +``` +$ cowsay "I love Linux" +``` + +### 在 Linux 上安装 cowsay + +你可以用你的包管理器安装 `cowsay`。在 Debian、Mint、Elementary 和类似的发行版上: + +``` +$ sudo apt install cowsay +``` + +在 Fedora 上: + +``` +$ sudo apt install cowsay-beefymiracle +``` + +### Cowsay 命令选项 + +`cowsay` 是一个简单又有点傻的应用。除了为你的终端机提供一些不同样式外,它并没有什么实际用途。例如,与其让一头普通的牛说一个有趣短语,你可以让一头长着古怪眼睛的牛说一个有趣的短语。输入: + +``` +$ cowsay -e @@ Hello +``` + +你会看到: + +``` +< Hello > + ------- + \ ^__^ + \ (@@)\_______ + (__)\ )\/\ + ||----w | + || || +``` + +或者你可以让它伸出舌头。输入: + +``` +$ cowsay -T U Hello +``` + +你会看到: + +``` +< Hello > +------- + \ ^__^ + \ (oo)\_______ + (__)\ )\/\ + U ||----w | + || || +``` + +更好的是,你可以将 `fortune` 命令与 `cowsay` 结合起来: + +``` +$ fortune | cowsay +``` + +现在你有了一头特别睿智的牛: + +``` + _______________________________________ +/ we: \ +| | +| The single most important word in the | +\ world. / + --------------------------------------- + \ ^__^ + \ (oo)\_______ + (__)\ )\/\ + ||----w | + || || +``` + +### “结实的奇迹” + +在 Fedora 上,有一个额外的 `cowsay` 选项,也是一个非官方的项目吉祥物。多年来,Fedora 安装程序一直在展示宣传开源贡献的幻灯片。因为它们是根据汽车电影院的插曲设计的,所以幻灯片中常见的卡通人物是拟人化的热狗。 + +为了与这个主题保持一致,你可以用 Fedora 版本的 `cowsay` 调用一个所谓的“结实的奇迹beefy miracle”。(LCTT 译注:Fedora 17 的开发代号。) + +``` +$ cowsay -f beefymiracle Hello Fedora +``` + +你会得到一个非常傻的输出: + +``` +< Hello Fedora > + -------------- .---. __ + , \ / \ \ |||| + \\\\ |O___O | | \\|||| + \ // | \_/ | | \ / + '--/----/| / | |-' + // // / -----' + // \\ / / + // // / / + // \\ / / + // // / / + /| ' / / + //\___/ / + // ||\ / + \\_ || '---' + /' / \\_.- + / / --| | + '-' | | + '-' +``` + +### 图形化的 cowsay + +如果你发现自己需要用图形化的牛来传递信息,可以使用 `xcowsay` 命令。这是一个类似于 `cowsay` 的图形程序,它接受一个由用户输入的文本字符串,或从另一个应用(如 Fortune)输送过来的文本字符串。 + +![A cartoon cow has a speech bubble that reads "I love Linux"][4] + +### 有趣的 Linux 命令 + +虽然 `cowsay` 不是一个有用的命令,但它是一个有趣的命令,相当于你终端的桌面小工具。它很适合用来分散注意力和进行有趣的管道命令实验(尝试将 `ifconfig` 管道到 `cowsay`,或 `lsblk` 或 `mount`,或任何东西!)。如果你想让你的终端更有趣,试试 `cowsay`。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/11/linux-cowsay-command + +作者:[Don Watkins][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/don-watkins +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/LIFE_CowParade_osdc.png?itok=6GD1Wnbm (Cow on parade.) +[2]: https://opensource.com/life/16/6/fun-and-semi-useless-toys-linux +[3]: https://opensource.com/article/21/11/fun-linux-commands +[4]: https://opensource.com/sites/default/files/uploads/graphical_cowsay.png (graphical cowsay) +[5]: https://creativecommons.org/licenses/by-sa/4.0/ diff --git a/translated/tech/20211117 3 interesting ways to use the Linux cowsay command.md b/translated/tech/20211117 3 interesting ways to use the Linux cowsay command.md deleted file mode 100644 index 5c9ff6be99..0000000000 --- a/translated/tech/20211117 3 interesting ways to use the Linux cowsay command.md +++ /dev/null @@ -1,179 +0,0 @@ -[#]: subject: "3 interesting ways to use the Linux cowsay command" -[#]: via: "https://opensource.com/article/21/11/linux-cowsay-command" -[#]: author: "Don Watkins https://opensource.com/users/don-watkins" -[#]: collector: "lujun9972" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -使用 Linux cowsay 命令的 3 种有趣方式 -====== -想试一个只是好玩的应用吗?试试 cowsay。 -![Cow on parade.][1] - -大多数时候,终端是一个生产力的动力源。但是,终端的作用不止是命令和配置。在所有杰出的开源软件中,有些是[为了好玩而写的][2]。我以前写过一些[有趣的命令][3],但这篇文章只讲一个:古老的 `cowsay` 命令。 - -cowsay 是一只可配置的会说话(或思考)的牛。它接受一个文本字符串,并输出一个牛说话的图形。下面是一头牛在说它喜欢 Linux: - - - -``` - - -< I love Linux > -\-------------- - \ ^__^ - \ (oo)\\_______ - (__)\ )\/\ - ||----w | - || || - -``` - -要得到这个结果,我只需输入: - -`$ cowsay "I love Linux"` - -### 在 Linux 上安装 cowsay - -你可以用你的包管理器安装 cowsay。在 Debian、Mint、Elementary 和类似的发行版上: - -`$ sudo apt install cowsay` - -在 Fedora 上: - -`$ sudo apt install cowsay-beefymiracle` - -### Cowsay 命令选项 - -cowsay 是一个简单又有点傻的应用。除了为你的终端机提供一些不同样式外,它并没有什么实际用途。例如,与其让一头普通的牛说一个有趣短语,你可以让一头长着古怪眼睛的牛说一个有趣的短语。输入: - -`$ cowsay -e @@ Hello` - -你会得到: - - -``` - - -< Hello > -------- - \ ^__^ - \ (@@)\\_______ - (__)\ )\/\ - ||----w | - || || - -``` - -或者你可以让它伸出舌头。输入: - -`$ cowsay -T U Hello` - -你会看到: - - -``` - - -< Hello > -\------- - \ ^__^ - \ (oo)\\_______ - (__)\ )\/\ - U ||----w | - || || - -``` - -更好的是,你可以将 `fortune` 命令与 `cowsay` 结合起来: - -`$ fortune | cowsay` - -现在你会有一头特别聪明的牛: - - -``` - - -_______________________________________ -/ we: \ -| | -| The single most important word in the | -\ world. / ---------------------------------------- - \ ^__^ - \ (oo)\\_______ - (__)\ )\/\ - ||----w | - || || - -``` - -### 结实的奇迹 - -在 Fedora 上,有一个额外的 cowsay 选项,也是一个非官方的项目吉祥物。多年来,Fedora 安装程序一直在展示宣传开源贡献的幻灯片。因为它们是根据汽车电影院的插曲设计的,所以幻灯片中常见的卡通人物是拟人化的热狗。 - -为了与这个主题保持一致,你可以用 Fedora 版本的 cowsay 调用一个所谓的结实的奇迹(beefy miracle)。 - -`$ cowsay -f beefymiracle Hello Fedora` - -你会得到一个非常傻的输出: - - -``` - - -< Hello Fedora > --------------- .---. __ - , \ / \ \ |||| - \\\\\\\ |O___O | | \\\|||| - \ // | \\_/ | | \ / - '--/----/| / | |-' - // // / -----' - // \\\ / / - // // / / - // \\\ / / - // // / / - /| ' / / - //\\___/ / - // ||\ / - \\\\_ || '---' - /' / \\\\_.- - / / --| | - '-' | | - '-' - -``` - -### 图形化的 cowsay - -如果你发现自己需要用图形化的牛来传递信息,可以使用 `xcowsay` 命令。这是一个类似于 cowsay 的图形程序,它接受一个由用户输入的文本字符串,或从另一个应用(如 Fortune)输送过来的文本字符串。 - -![A cartoon cow has a speech bubble that reads "I love Linux"][4] - -Don Watkins,[CC BY-SA 4.0][5] - -### 有趣的 Linux 命令 - -虽然 `cowsay` 不是一个有用的命令,但它是一个有趣的命令,相当于你终端的桌面小工具。它很适合用来分散注意力和进行有趣的管道命令实验(尝试将 `ifconfig` 管道到 cowsay,或 `lsblk` 或 `mount`,或任何东西!)。如果你想让你的终端更有趣,试试 cowsay。 - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/11/linux-cowsay-command - -作者:[Don Watkins][a] -选题:[lujun9972][b] -译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/don-watkins -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/LIFE_CowParade_osdc.png?itok=6GD1Wnbm (Cow on parade.) -[2]: https://opensource.com/life/16/6/fun-and-semi-useless-toys-linux -[3]: https://opensource.com/article/21/11/fun-linux-commands -[4]: https://opensource.com/sites/default/files/uploads/graphical_cowsay.png (graphical cowsay) -[5]: https://creativecommons.org/licenses/by-sa/4.0/ From f6d83408fc556d962edd2a8a741a506615a89372 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 25 Nov 2021 23:57:53 +0800 Subject: [PATCH 016/244] PUB @robsean https://linux.cn/article-14022-1.html --- ...4 Install FreeDOS without the installer.md | 145 ++++++++++++++++ ...4 Install FreeDOS without the installer.md | 162 ------------------ 2 files changed, 145 insertions(+), 162 deletions(-) create mode 100644 published/20210614 Install FreeDOS without the installer.md delete mode 100644 translated/tech/20210614 Install FreeDOS without the installer.md diff --git a/published/20210614 Install FreeDOS without the installer.md b/published/20210614 Install FreeDOS without the installer.md new file mode 100644 index 0000000000..67c3431c9b --- /dev/null +++ b/published/20210614 Install FreeDOS without the installer.md @@ -0,0 +1,145 @@ +[#]: subject: (Install FreeDOS without the installer) +[#]: via: (https://opensource.com/article/21/6/install-freedos-without-installer) +[#]: author: (Jim Hall https://opensource.com/users/jim-hall) +[#]: collector: (lujun9972) +[#]: translator: (robsean) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14022-1.html) + +不使用安装程序安装 FreeDOS +====== + +> 这里是如何在不使用安装程序的情况下来手动设置你的 FreeDOS 系统。 + +![](https://img.linux.net.cn/data/attachment/album/202111/25/235643wvmciyy2f8y3mi73.jpg) + +大多数的人应该能够使用安装程序来非常容易地安装 FreeDOS 1.3 RC4 。FreeDOS 安装程序会先询问几个问题,然后处理剩余的工作,包括为 FreeDOS 制作安装空间和使系统可启动。 + +但是,如果安装程序不适合你怎么办?或者,你更喜欢 _手动_ 设置你的 FreeDOS 系统,而不喜欢使用安装程序怎么办?使用 FreeDOS ,你也可以做到这些!让我们在不使用安装程序的情况下逐步走完安装 FreeDOS 的步骤。我将使用 QEMU 虚拟机的一个空白的硬盘驱动器镜像来完成所有的步骤。我使用这个 Linux 命令来创建了一个 100 MB 的硬盘驱动器镜像: + +``` +$ qemu-img create freedos.img 100M +``` + +我下载了 FreeDOS 1.3 RC4 的 LiveCD ,并将其命名为 `FD13LIVE.iso` ,它提供了一个 “身临其境” 的环境,我可以在其中运行 FreeDOS ,包括所有的标准工具。大多数用户也使用 LiveCD 自带的常规安装程序来安装 FreeDOS 。但是,在这里我将仅使用 LiveCD ,并从其命令行中使用某些类型的命令来安装 FreeDOS 。 + +我使用这个相当长的 QEMU 命令来启动虚拟机,并选择 “Use FreeDOS 1.3 in Live Environment mode” 启动菜单项: + +``` +$ qemu-system-x86_64 -name FreeDOS -machine pc-i440fx-4.2,accel=kvm,usb=off,dump-guest-core=off -enable-kvm -cpu host -m 8 -overcommit mem-lock=off -no-user-config -nodefaults -rtc base=utc,driftfix=slew -no-hpet -boot menu=on,strict=on -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny -msg timestamp=on -hda freedos.img -cdrom FD13LIVE.iso -device sb16 -device adlib -soundhw pcspk -vga cirrus -display sdl -usbdevice mouse +``` + +![manual install][2] + +*选择 "Use FreeDOS 1.3 in Live Environment mode" 来启动 LiveCD(Jim Hall, [CC-BY SA 4.0][3])* + +这个 QEMU 命令行包含大量的选项,乍看可能会让你迷糊。因为你完全使用命令行选项配置 QEMU ,所以在这里有很多东西需要审查。但是,我将简单地重点说明几个重要的选项: + + * `-m 8`:设置系统存储器(RAM)为 8 MB + * `-boot menu=on,strict=on`:使用一个启动菜单,这样,我可以选择从 CD-ROM 镜像或硬盘驱动器镜像启动 + * `-hda freedos.img`:使用 `freedos.img` 作为硬盘驱动器镜像 + * `-cdrom FD13LIVE.iso`:使用 `FD13LIVE.iso` 作为 CD-ROM 镜像 + * `-device sb16 -device adlib -soundhw pcspk`:定义计算机带有一个 SoundBlaster16 声卡、AdLib 数字音乐卡、PC 扬声器模拟器(如果你想玩 DOS 游戏的话,这些模拟器很有用) + * `-usbdevice mouse`:将用户的鼠标识别为一个 USB 鼠标(在 QEMU 窗口中单击以使用鼠标) + +### 对硬盘驱动器进行分区 + +你可以从 LiveCD 使用 FreeDOS 1.3 RC4 ,但是,如果你想安装 FreeDOS 到你的计算机中,你需要先在硬盘驱动器上制作安装空间。这需要使用 FDISK 程序来创建一个 _分区_ 。 + +从 DOS 命令行中,输入 `FDISK` 来运行 _分区_ 设置程序。FDISK 是一个全屏交互式程序,你只需要输入数字来选择菜单项。从 FDISK 的主菜单中,输入 `1` 来在驱动器上创建一个 DOS 分区,然后在接下来的屏幕上输入 `1` 来创建一个 “主” DOS 分区。 + +![using fdisk][4] + +*选择 `1` 来创建一个分区(Jim Hall, [CC-BY SA 4.0][3])* + +![using fdisk][5] + +*在接下来的菜单上选择 `1` 来制作一个主分区(Jim Hall, [CC-BY SA 4.0][3])* + +`FDISK` 会询问你是否想要使用全部的硬盘空间大小来创建分区。除非你需要在这个硬盘驱动器上和另外一个操作系统(例如 Linux)共享硬盘空间,否则,对于这个提示,你应该回答 `Y` 。 + +在 `FDISK` 创建新的分区后,在 DOS 能够识别新的分区信息前,你将需要重新启动 DOS 。像所有的 DOS 操作系统一样,FreeDOS 仅在其启动时识别硬盘驱动器信息。因此,如果你创建或删除任何的磁盘分区的话,你都将需要重新启动 FreeDOS ,只有这样做,FreeDOS 才能识别到更改的分区信息。`FDISK` 会提醒你重新启动,因此,你是不会忘记的。 + +![using fdisk][6] + +*你需要重新启动以识别新的分区(Jim Hall, [CC-BY SA 4.0][3])* + +你可以通过停止或重新启动 QEMU 虚拟机来重新启动 FreeDOS,但是我更喜欢在 FreeDOS 命令行中使用 FreeDOS 的高级电源管理(`FDADPM`)工具来重新启动 FreeDOS 。为了重新启动,输入命令 `FDADPM /WARMBOOT` ,FreeDOS 将自动重新启动。 + +### 对硬盘驱动器进行格式化 + +在 FreeDOS 重新启动后,你可以继续设置硬盘驱动器。创建磁盘分区是这个过程的“第一步”;现在你需要在分区上创建一个 DOS _文件系统_ ,以便 FreeDOS 可以使用它。 + +DOS 系统使用字母 `A` 到 `Z` 来识别“驱动器”。FreeDOS 将识别第一个硬盘驱动器的第一个分区为 `C` 驱动器,依此论推。你经常使用字母和一个冒号(`:`)来表示驱动器,因此我们在上面创建的新分区实际上是 `C:` 驱动器。 + +你可以在新的分区上使用 `FORMAT` 命令来创建一个 DOS 文件系统。这个命令带有一些选项,但是,我们将仅使用 `/S` 选项来告诉 `FORMAT` 来使新的文件系统可启动: `S` 意味着安装 FreeDOS “系统” 文件。输入 `FORMAT /S C:` 来在 `C:` 驱动器上制作一个新的 DOS 文件系统。 + +![formatting the disk][7] + +*格式化分区来创建 DOS 文件系统(Jim Hall, [CC-BY SA 4.0][3])* + +使用 `/S` 选项,`FORMAT` 将运行 `SYS` 程序来传输系统文件。你将看到这是从 `FORMAT` 输出的一部分: + +![formatting the disk][8] + +*`FORMAT /S` 将使用 SYS 来使磁盘可启动(Jim Hall, [CC-BY SA 4.0][3])* + +### 安装软件 + +在使用 `FDISK` 创建了一个新的分区,并使用 `FORMAT` 创建了一个新的文件系统后, 新的 `C:` 驱动器基本上是空的。此时,`C:` 驱动器仅包含一份内核和 `COMMAND.COM` 命令行 shell 的副本。为使新的磁盘可以执行一些有用的操作,我们需要在其上安装软件。这是手动安装过程的最后步骤。 + +FreeDOS 1.3 RC4 LiveCD 包含所有的你可能希望在新的系统上所要安装的软件。每个 FreeDOS 程序都是一个单独的 “软件包” ,它实际上只是一个 Zip 档案文件。建立标准 DOS 环境的软件包存储在 LiveCD 上 `PACKAGES` 目录下的 `BASE` 目录之中。 + +你可以一次一个的将其中的每一个软件包都 “解压缩” 到硬盘驱动器来完成安装。在 `Base` 组中有 62 个单独的软件包,如果每次安装一个软件包,这可能会花费非常多的时间。不过,你可以运行一个只有一行的 `FOR` “循环” 命令来 `UNZIP` 每个程序。接下来 FreeDOS 可以为你 “解压缩” 所有的软件包。 + +`FOR` 循环的基本用法中提及的一个单个字母变量(让我们使用 `%F`),稍后,FreeDOS 将使用该字母变量来 “填充” 文件名称。`FOR` 还需要括号中的一个文件列表,这个命令会对每个文件都运行一次。用来解压一系列的 Zip 文件的语法看起来像这样: + +``` +FOR %F IN (*.ZIP) DO UNZIP %F +``` + +这将提取所有的 Zip 文件到当前目录之中。为提取或 `UNZIP` 文件到一个不同的位置,在 `UNZIP` 命令行结尾处使用 `-d` (“目的地”) 选项。对于大多数的 FreeDOS 系统来说,你应该安装软件包到 `C:\FDOS` 目录中: + +![installing the software][9] + +*解压缩所有的基本软件包来完成安装 FreeDOS(Jim Hall, [CC-BY SA 4.0][3])* + +FreeDOS 会处理剩余的工作,安装所有的 62 个软件包到你的系统之中。这可能会花费几分钟的时间,因为 DOS 在处理很多单个的文件时会很慢,这个命令需要提取 62 个 Zip 文件。如果我们使用单个的 `BASE.ZIP` 档案文件的话,安装过程可能会运行地更快,但是使用软件包的话,在你选择想要安装或不安装软件包时会提供更多的灵活性。 + +![installing the software][10] + +*在安装所有的基本软件包后(Jim Hall, [CC-BY SA 4.0][3])* + +在我们安装完所有的东西后,使用 `FDADPM /WARMBOOT` 来重新启动你的系统。手动安装意味着你的新 FreeDOS 系统没有常见的 `FDCONFIG.SYS` 配置文件,因此,当 FreeDOS 在启动时,它将假设一些典型的默认值。因为没有 `AUTOXEC.BAT` 文件,FreeDOS 也会提示你时间和日期。 + +![rebooting FreeDOS][11] + +*在手动安装后,重新启动 FreeDOS(Jim Hall, [CC-BY SA 4.0][3])* + +大多数的用户应该能够使用比较用户友好的过程来在一台新的计算机上安装 FreeDOS 。但是如果你想自己使用“古老的”方法来安装它,那么你可以手动运行安装步骤。这会提供一些额外的灵活性和控制权,因为是你自己安装的一切。现在你知道如何安装它了。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/6/install-freedos-without-installer + +作者:[Jim Hall][a] +选题:[lujun9972][b] +译者:[robsean](https://github.com/robsean) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jim-hall +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/freedos-fish-laptop-color.png?itok=vfv_Lpph (FreeDOS fish logo and command prompt on computer) +[2]: https://opensource.com/sites/default/files/uploads/manual-install3.png (Select "Use FreeDOS 1.3 in Live Environment mode" to boot the LiveCD) +[3]: https://creativecommons.org/licenses/by-sa/4.0/ +[4]: https://opensource.com/sites/default/files/uploads/manual-install6.png (Select "1" to create a partition) +[5]: https://opensource.com/sites/default/files/uploads/manual-install7.png (Select "1" on the next menu to make a primary partition) +[6]: https://opensource.com/sites/default/files/uploads/manual-install10.png (You need to reboot to recognize the new partition) +[7]: https://opensource.com/sites/default/files/uploads/manual-install13.png (Format the partition to create the DOS filesystem) +[8]: https://opensource.com/sites/default/files/uploads/manual-install14.png (FORMAT /S will use SYS to make the disk bootable) +[9]: https://opensource.com/sites/default/files/uploads/manual-install18.png (Unzip all of the Base packages to finish installing FreeDOS) +[10]: https://opensource.com/sites/default/files/uploads/manual-install24.png (After installing all the Base packages) +[11]: https://opensource.com/sites/default/files/uploads/manual-install28.png (Rebooting FreeDOS after a manual install) diff --git a/translated/tech/20210614 Install FreeDOS without the installer.md b/translated/tech/20210614 Install FreeDOS without the installer.md deleted file mode 100644 index ddc5a76684..0000000000 --- a/translated/tech/20210614 Install FreeDOS without the installer.md +++ /dev/null @@ -1,162 +0,0 @@ -[#]: subject: (Install FreeDOS without the installer) -[#]: via: (https://opensource.com/article/21/6/install-freedos-without-installer) -[#]: author: (Jim Hall https://opensource.com/users/jim-hall) -[#]: collector: (lujun9972) -[#]: translator: (robsean) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -不使用安装程序安装 FreeDOS -====== -这里是如何在不使用安装程序的情况下来手动设置你的 FreeDOS 系统。 -![FreeDOS fish logo and command prompt on computer][1] - -大多数的人应该能够使用安装程序来非常容易地安装 FreeDOS 1.3 RC4 。FreeDOS 安装程序会先询问几个问题,然后处理剩余的工作—包括为 FreeDOS 制作安装空间和使系统可启动。 - -但是,如果安装程序不适合你怎么办?或者,你更喜欢 _手动_ 设置你的 FreeDOS 系统,而不喜欢使用安装程序怎么办?使用 FreeDOS ,你也可以做到这些!让我们在不使用安装程序的情况下逐步走完安装 FreeDOS 的步骤。我将使用 QEMU 虚拟机的一个空白的硬盘驱动器镜像来完成所有的步骤。我使用这个 Linux 命令来创建了一个 100 MB 的硬盘驱动器镜像: - - -``` -`$ qemu-img create freedos.img 100M` -``` - -我下载了 FreeDOS 1.3 RC4 的 LiveCD ,并将其命名为 FD13LIVE.iso ,它提供了一个 "live" 环境,我可以在其中运行 FreeDOS ,包括所有的标准工具。大多数用户也使用 LiveCD 自带的常规安装程序来安装 FreeDOS 。但是,在这里我将仅使用 LiveCD ,并从其命令行中使用某些类型的命令来安装 FreeDOS 。 - -我使用这个相当长的 QEMU 命令来启动虚拟机,并选择 "Use FreeDOS 1.3 in Live Environment mode" 启动菜单项: - - -``` -`$ qemu-system-x86_64 -name FreeDOS -machine pc-i440fx-4.2,accel=kvm,usb=off,dump-guest-core=off -enable-kvm -cpu host -m 8 -overcommit mem-lock=off -no-user-config -nodefaults -rtc base=utc,driftfix=slew -no-hpet -boot menu=on,strict=on -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny -msg timestamp=on -hda freedos.img -cdrom FD13LIVE.iso -device sb16 -device adlib -soundhw pcspk -vga cirrus -display sdl -usbdevice mouse` -``` - -![manual install][2] - -选择 "Use FreeDOS 1.3 in Live Environment mode" 来启动 LiveCD -(Jim Hall, [CC-BY SA 4.0][3]) - -这个 QEMU 命令行包含大量的选项,乍看可能会让你迷糊。因为你完全使用命令行选项配置 QEMU ,所以在这里有很多东西需要审查。但是,我将简单地重点说明几个重要的选项: - - * `-m 8:` 设置系统存储器 ("RAM") 为 8 MB - * **`-boot menu=on,strict=on:`** 使用一个启动菜单,这样,我可以选择从 CD-ROM 镜像或硬盘驱动器镜像启动 - * **`-hda freedos.img`:** 使用 **freedos.img** 作为硬盘驱动器镜像 - * `-cdrom FD13LIVE.iso:` 使用 **FD13LIVE.iso** 作为 CD-ROM 镜像 - * **`-device sb16 -device adlib -soundhw pcspk`:** 定义计算机带有一个 SoundBlaster16 声卡,AdLib 数字音乐卡,PC 扬声器模拟器 (如果你想玩 DOS 游戏的话,这些模拟器是很有用的) - * **`-usbdevice mouse`:** 将识别用户的鼠标为一个 USB 鼠标 (在 QEMU 窗口中单击以使用鼠标) - - - -### 对硬盘驱动器进行分区 - -你可以从 LiveCD 使用 FreeDOS 1.3 RC4 ,但是,如果你想安装 FreeDOS 到你的计算机中,你需要先在硬盘驱动器上制作安装空间。这需要使用 FDISK 程序来创建一个 _分区_ 。 - -从 DOS 命令行中,输入 `FDISK` 来运行 _fixed disk_ 设置程序。FDISK 是一个全屏交互式程序,你只需要输入数字来选择菜单项。从 FDISK 的主菜单中,输入 "1" 来在驱动器上创建一个 DOS 分区,然后在接下来的屏幕上输入 "1" 来创建一个 _主_ DOS 分区。 - -![using fdisk][4] - -选择 "1" 来创建一个分区 -(Jim Hall, [CC-BY SA 4.0][3]) - -![using fdisk][5] - -在接下来的菜单上选择 "1" 来制作一个主分区 -(Jim Hall, [CC-BY SA 4.0][3]) - -FDISK 会询问你是否想要使用全部的硬盘空间大小来创建分区。除非你需要在这个硬盘驱动器上和另外一个操作系统 (例如 Linux ) 共享硬盘空间,否则,对于这个提示,你应该回答 "Y" 。 - -在 FDISK 创建新的分区后,在 DOS 能够识别新的分区信息前,你将需要重新启动 DOS 。像所有的 DOS 操作系统一样,FreeDOS 仅在其启动时识别硬盘驱动器信息。因此,如果你创建或删除任何的磁盘分区的话,你都将需要重新启动 FreeDOS ,只有这样做,FreeDOS 才能识别到更改的分区信息。FDISK 会提醒你重新启动,因此,你是不会忘记的。 - -![using fdisk][6] - -你需要重新启动以 recognize 新的分区 -(Jim Hall, [CC-BY SA 4.0][3]) - -你可以通过停止或重新启动 QEMU 虚拟机来重新启动 FreeDOS,但是我更喜欢在 FreeDOS 命令行中使用 FreeDOS 的高级电源管理 (FDADPM) 工具来重新启动 FreeDOS 。为了重新启动,输入命令 `FDADPM /WARMBOOT` ,FreeDOS 将自动重新启动。 - -### 对硬盘驱动器进行格式化 - -在 FreeDOS 重新启动后,你可以继续 -硬盘驱动器。创建磁盘分区是这个过程的"第一步";现在你需要在分区上创建一个 DOS _文件系统_ ,以便 FreeDOS 可以使用它。 - -DOS 系统使用字母 `A` 到 `Z` 来识别"驱动器"。FreeDOS 将识别第一个硬盘驱动器的第一个分区为 `C` 驱动器,依此论推。你经常使用字母和一个冒号 (`:`) 来表示驱动器,因此我们在上面创建的新分区实际上是 `C:` 驱动器。 - -你可以在新的分区上使用 FORMAT 命令来创建一个 DOS 文件系统。这个命令带有一些选项,但是,我们将仅使用 `/S` 选项来告诉 FORMAT 来使新的文件系统可启动— "S" 意味着安装 FreeDOS "系统" 文件。输入 `FORMAT /S C:` 来在 `C:` 驱动器上制作一个新的 DOS 文件系统。 - -![formatting the disk][7] - -格式化分区来创建 DOS 文件系统 -(Jim Hall, [CC-BY SA 4.0][3]) - -使用 `/S` 选项,FORMAT 将运行 SYS 程序来 - -transfer - -系统文件。你将看到这是从 FORMAT 输出的一部分: - -![formatting the disk][8] - -FORMAT /S 将使用 SYS 来使磁盘可启动 -(Jim Hall, [CC-BY SA 4.0][3]) - -### 安装软件 - -在使用 FDISK 创建了一个新的分区,并使用 FORMAT 创建了一个新的文件系统后, 新的 `C:` 驱动器基本上是空的。此时,`C:` 驱动器仅包含一份内核和 `COMMAND.COM` 命令行 shell 的副本。为使新的磁盘可以执行一些有用的操作,我们需要在其上安装软件。这是手动安装过程的最后步骤。 - -FreeDOS 1.3 RC4 LiveCD 包含所有的你可能希望在新的系统上所要安装的软件。每个 FreeDOS 程序都是一个单独的 "软件包" ,它实际上只是一个 Zip 档案文件。建立标准 DOS 环境的软件包存储在 LiveCD 上 `PACKAGES` 目录下 `BASE` 目录之中。 - -你可以一次一个的将其中的每一个软件包都 "解压缩" 到硬盘驱动器来完成安装。在 "Base" 组中有 62 个单独的软件包,如果每次安装一个软件包,这可能会花费非常多的时间。不过,你可以运行一个只有一行的 `FOR` "循环" 命令来 "unzip" 每个程序。接下来 FreeDOS 可以为你 "解压缩" 所有的软件包。 - -`FOR` 循环的基本用法中提及的一个单个字母变量 (让我们使用 `%F`) ,稍后,FreeDOS 将使用该字母变量来 "填充" 文件名称。`FOR` 还需要括号中的一个文件列表,这个命令会对每个文件都运行一次。用来解压一系列的 Zip 文件的语法看起来像这样: - - -``` -`FOR %F IN (*.ZIP) DO UNZIP %F` -``` - -这将提取所有的 Zip 文件到当前目录之中。为提取或 "unzip" 文件到一个不同的位置,在 `UNZIP` 命令行结尾处使用 `-d` ("目的地") 选项。对于大多数的 FreeDOS 系统来说,你应该安装软件包到 `C:\FDOS` 目录中: - -![installing the software][9] - -解压缩所有的基本软件包来完成安装 FreeDOS -(Jim Hall, [CC-BY SA 4.0][3]) - -FreeDOS 会处理剩余的工作,安装所有的 62 个软件包到你的系统之中。这可能会花费几分钟的时间,因为 DOS 在处理很多单个的文件时会很慢—这个命令需要提取 62 个 Zip 文件。如果我们使用单个的 `BASE.ZIP` 档案文件的话,安装过程可能会运行地更快,但是使用软件包的话,在你选择想要安装或不安装软件包时会提供更多的灵活性。 - -![installing the software][10] - -在安装所有的基本软件包后 -(Jim Hall, [CC-BY SA 4.0][3]) - -在我们安装完所有的东西后,使用 `FDADPM /WARMBOOT` 来重新启动你的系统。手动安装意味着你的新 FreeDOS 系统没有常见的 `FDCONFIG.SYS` 配置文件,因此,当 FreeDOS 在启动时,它将假设一些典型的默认值。即使没有 `AUTOXEC.BAT` 文件,FreeDOS 也会提示你时间和日期。 - -![rebooting FreeDOS][11] - -在手动安装后,重新启动 FreeDOS -(Jim Hall, [CC-BY SA 4.0][3]) - -大多数的用户应该能够使用比较用户友好的过程来在一台新的计算机上安装 FreeDOS 。但是如果你想自己使用"古老的"方法来安装它,那么你可以手动运行安装步骤。这会提供一些额外的灵活性和控制权,因为是你自己安装的一切。现在你知道如何安装它了。 - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/6/install-freedos-without-installer - -作者:[Jim Hall][a] -选题:[lujun9972][b] -译者:[robsean](https://github.com/robsean) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/jim-hall -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/freedos-fish-laptop-color.png?itok=vfv_Lpph (FreeDOS fish logo and command prompt on computer) -[2]: https://opensource.com/sites/default/files/uploads/manual-install3.png (Select "Use FreeDOS 1.3 in Live Environment mode" to boot the LiveCD) -[3]: https://creativecommons.org/licenses/by-sa/4.0/ -[4]: https://opensource.com/sites/default/files/uploads/manual-install6.png (Select "1" to create a partition) -[5]: https://opensource.com/sites/default/files/uploads/manual-install7.png (Select "1" on the next menu to make a primary partition) -[6]: https://opensource.com/sites/default/files/uploads/manual-install10.png (You need to reboot to recognize the new partition) -[7]: https://opensource.com/sites/default/files/uploads/manual-install13.png (Format the partition to create the DOS filesystem) -[8]: https://opensource.com/sites/default/files/uploads/manual-install14.png (FORMAT /S will use SYS to make the disk bootable) -[9]: https://opensource.com/sites/default/files/uploads/manual-install18.png (Unzip all of the Base packages to finish installing FreeDOS) -[10]: https://opensource.com/sites/default/files/uploads/manual-install24.png (After installing all the Base packages) -[11]: https://opensource.com/sites/default/files/uploads/manual-install28.png (Rebooting FreeDOS after a manual install) From 2f5e40c94b59ecff474b7478b47d4afd95c5681a Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 26 Nov 2021 05:02:36 +0800 Subject: [PATCH 017/244] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211125=20?= =?UTF-8?q?Tips=20for=20formatting=20when=20printing=20to=20console=20from?= =?UTF-8?q?=20C++?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211125 Tips for formatting when printing to console from C.md --- ...matting when printing to console from C.md | 419 ++++++++++++++++++ 1 file changed, 419 insertions(+) create mode 100644 sources/tech/20211125 Tips for formatting when printing to console from C.md diff --git a/sources/tech/20211125 Tips for formatting when printing to console from C.md b/sources/tech/20211125 Tips for formatting when printing to console from C.md new file mode 100644 index 0000000000..490b136440 --- /dev/null +++ b/sources/tech/20211125 Tips for formatting when printing to console from C.md @@ -0,0 +1,419 @@ +[#]: subject: "Tips for formatting when printing to console from C++" +[#]: via: "https://opensource.com/article/21/11/c-stdcout-cheat-sheet" +[#]: author: "Stephan Avenwedde https://opensource.com/users/hansic99" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Tips for formatting when printing to console from C++ +====== +Next time you struggle with console output formatting, refer to this +article or the related cheat sheet. +![Woman sitting in front of her computer][1] + +When I started writing, I did it primarily for the purpose of documenting for myself. When it comes to programming, I'm incredibly forgetful, so I began to write down useful code snippets, special characteristics, and common mistakes in the programming languages I use. This article perfectly fits the original idea as it covers common use cases of formatting when printing to console from C++. + +**[Download the [C++ std::cout cheat sheet][2]]** + +As usual, this article comes with a lot of examples. Unless otherwise stated, all types and classes shown in the code snippets are part of the `std` namespace. So while you are reading this code, you have to put `using namespace std;` in front of types and classes. Of course, the example code is also available on [GitHub][3]. + +### Object-oriented stream + +If you've ever programmed in C++, you've certainly already used [cout][4]. The _cout_ object of type [ostream][5] comes into scope when you include <iostream>. This article focuses on _cout_, which lets you print to the console but the general formatting described here is valid for all stream objects of type [ostream][5]. An _ostream_ object is an instance of basic_ostream with the template parameter of type char. The header <iosfwd>, which is part of the include hierarchy of <iostream>, contains forward declarations for common types. + +The class _basic_ostream_ inherits from basic_ios and this type, in turn, inherits from ios_base. On [cppreference.com][6] you find a class diagram that shows the relationship between the different classes. + +The class ios_base is the base class for all I/O stream classes. The class basic_ios is a template class that has a specialization for common character types called **ios**. So when you read about _ios_ in the context of standard I/O, it is the char-type specialization of basic_ios. + +### Formatting streams + +In general, there are three ways of formatting ostream-based streams: + + 1. Using the format flags provided by ios_base. + 2. Stream modifying functions defined in the header <iomanip> and <ios>. + 3. By invoking a [specific overload][7] of the _<<_-operator. + + + +All methods have their pros and cons, and it usually depends on the situation when which method is used. The following examples show a mixture of all methods. + +#### Right justified + +By default, _cout_ occupies as much space as the data to print requires. To allow that right-justified output to take effect, you have to define the maximum width that a line is allowed to occupy. I use the format flags to reach the goal. + +The flag for right-justified output and the width adjustment only applies to the subsequent line: + + +``` + + +cout.setf(ios::right, ios::adjustfield); +cout.width(50); +cout << "This text is right justified" << endl; +cout << "This text is left justified again" << endl; + +``` + +In the above code, I configure the right-justified output using setf. I recommend you apply the bitmask _ios::adjustfield_ to _setf_, which causes all flags the bitmask specifies to be reset before the actual _ios::right_ flag gets set to prevent colliding combinations. + +#### Fill white space + +When using right-justified output, the empty space is filled with blanks by default. You can change it by specifying the fill character using setfill: + + +``` + + +cout << right << setfill('.') << setw(30) << 500 << " pcs" << endl; +cout << right << setfill('.') << setw(30) << 3000 << " pcs" << endl; +cout << right << setfill('.') << setw(30) << 24500 << " pcs" << endl; + +``` + +The code produces the following output: + + +``` + + +...........................500 pcs +..........................3000 pcs +.........................24500 pcs + +``` + +#### Combine  + +Imagine your C++ program keeps track of your pantry inventory. From time to time, you want to print a list of the current stock. To do so, you could use the following formatting. + +The following code is a combination of left- and right-justified output using dots as fill characters to get a nice looking list: + + +``` + + +cout << left << setfill('.') << setw(20) << "Flour" << right << setfill('.') << setw(20) << 0.7 << " kg" << endl; +cout << left << setfill('.') << setw(20) << "Honey" << right << setfill('.') << setw(20) << 2 << " Glasses" << endl; +cout << left << setfill('.') << setw(20) << "Noodles" << right << setfill('.') << setw(20) << 800 << " g" << endl; +cout << left << setfill('.') << setw(20) << "Beer" << right << setfill('.') << setw(20) << 20 << " Bottles" << endl; + +``` + +Output: + + +``` + + +Flour...............................0.70 kg +Honey..................................2 Glasses +Noodles..............................800 g +Beer..................................20 Bottles + +``` + +### Printing values + +Of course, stream-based output also offers a multitude of possibilities to output all kinds of variable types. + +#### Boolean + +The boolalpha switch lets you convert the binary interpretation of a bool to a string: + + +``` + + +cout << "Boolean output without using boolalpha: " << true << " / " << false << endl; +cout << "Boolean output using boolalpha: " << boolalpha << true << " / " << false << endl; + +``` + +The lines above produce the following output: + + +``` + + +Boolean output without using boolalpha: 1 / 0 +Boolean output using boolalpha: true / false + +``` + +#### Addresses + +If the value of an integer should be treated as an address, it is sufficient to cast it to _void*_ in order to invoke the correct overload. Here is an example: + + +``` + + +unsigned long someAddress = 0x0000ABCD; +cout << "Treat as unsigned long: " << someAddress << endl; +cout << "Treat as address: " << (void*)someAddress << endl; + +``` + +The code produces the following output: + + +``` + + +Treat as unsigned long: 43981 +Treat as address: 0000ABCD + +``` + +The code prints the address with the correct length. A 32-bit executable produced the above output. + +#### Integers + +Printing integers is straightforward. For demonstration purpose I specify the base of the number using setf and setiosflags. Applying the stream modifiers hex/oct would have the same effect: + + +``` + + +int myInt = 123; + +cout << "Decimal: " << myInt << endl; + +cout.setf(ios::hex, ios::basefield); +cout << "Hexadecimal: " << myInt << endl; + +cout << "Octal: " << resetiosflags(ios::basefield) <<  setiosflags(ios::oct) << myInt << endl; + +``` + +**Note:** There is no indicator for the used base by default, but you can add one using showbase. + + +``` + + +Decimal: 123 +Hexadecimal: 7b +Octal: 173 + +``` + +#### Padding with zeros + + +``` + + +0000003 +0000035 +0000357 +0003579 + +``` + +You can get an output like the above by specifying the width and the fill character: + + +``` + + +cout << setfill('0') << setw(7) << 3 << endl; +cout << setfill('0') << setw(7) << 35 << endl; +cout << setfill('0') << setw(7) << 357 << endl; +cout << setfill('0') << setw(7) << 3579 << endl; + +``` + +#### Floating-point values + +If I want to print floating-point values, I can choose between the _fixed_\- and _scientific_-format. Additionally, I can specify the precision. + + +``` + + +double myFloat = 1234.123456789012345; +int defaultPrecision = cout.precision(); // == 2 + +cout << "Default precision: " << myFloat << endl; +cout.precision(4); +cout << "Modified precision: " << myFloat << endl; +cout.setf(ios::scientific, ios::floatfield); +cout << "Modified precision & scientific format: " << myFloat << endl; +/* back to default */ +cout.precision(defaultPrecision); +cout.setf(ios::fixed, ios::floatfield); +cout << "Default precision & fixed format:  " << myFloat << endl; + +``` + +The code above produces the following output: + + +``` + + +Default precision: 1234.12 +Modified precision: 1234.1235 +Modified precision & scientific format: 1.2341e+03 +Default precision & fixed format:  1234.12 + +``` + +#### Time and Money + +With put_money, you can print currency units in the correct, locale-dependent formatting. This requires that your console can output UTF-8 charset. Note that the variable _specialOffering_ stores the monetary value in cents: + + +``` + + +long double specialOffering = 9995; + +cout.imbue(locale("en_US.UTF-8")); +cout << showbase << put_money(specialOffering) << endl; +cout.imbue(locale("de_DE.UTF-8")); +cout << showbase << put_money(specialOffering) << endl; +cout.imbue(locale("ru_RU.UTF-8")); +cout  << showbase << put_money(specialOffering) << endl; + +``` + +The imbue-method of _ios_ lets you specify a locale. With the command `locale -a`, you can get a list of all available locale identifiers on your system.  + + +``` + + +$99.95 +99,950€ +99,950₽ + +``` + +_(For whatever reason, it prints euro and ruble with three decimal places on my system, which looks strange for me, but maybe this is the official formatting.)_ + +The same principle applies to time output. The function put_time lets you print the time in the corresponding locale format. Additionally, you can specify which parts of a time object get printed. + + +``` + + +time_t now = time(nullptr); +tm localtm = *localtime(&now); + +cout.imbue(locale("en_US.UTF-8")); +cout << "en_US : " << put_time(&localtm, "%c") << endl; +cout.imbue(locale("de_DE.UTF-8")); +cout << "de_DE : " << put_time(&localtm, "%c") << endl; +cout.imbue(locale("ru_RU.UTF-8")); +cout << "ru_RU : " << put_time(&localtm, "%c") << endl; + +``` + +The format specifier _%c_ causes to print a standard date and time string: + + +``` + + +en_US : Tue 02 Nov 2021 07:36:36 AM CET +de_DE : Di 02 Nov 2021 07:36:36 CET +ru_RU : Вт 02 ноя 2021 07:36:36 + +``` + +### Creating custom stream modifiers + +You can also create your own stream. The following code inserts a predefined string when applied to an _ostream_ object: + + +``` + + +ostream& myManipulator(ostream& os) { +    string myStr = ">>>Here I am<<<"; +    os << myStr; +    return os; +} + +``` + +**Another example:** If you have something important to say, like most people on the internet, you could use the following code to insert exclamation marks after your message depending on the level of importance. The level of importance gets passed as an argument: + + +``` + + +struct T_Importance { +     int levelOfSignificance; +}; + +T_Importance importance(int lvl){ +    T_Importance x = {.levelOfSignificance = lvl }; +    return x; +} + +ostream& operator<<(ostream& __os, T_Importance t){ + +    for(int i = 0; i < t.levelOfSignificance; ++i){ +        __os.put('!'); +    } +    return __os; +} + +``` + +Both modifiers can now be simply passed to _cout_: + + +``` + + +cout << "My custom manipulator: " << myManipulator << endl; + +cout << "I have something important to say" << importance(5) << endl; + +``` + +Producing the following output: + + +``` + + +My custom manipulator: >>>Here I am<<< + +I have something important to say!!!!! + +``` + +### Conclusion + +Next time you struggle with console output formatting, I hope you remember this article or the related [cheat sheet][2]. + +In C++ applications, _cout_ is the new neighbor of [printf][8]. While using _printf_ is still valid, I would probably always prefer using _cout_. Especially the combination with the modifying function defined in _<ios>_ results in nice, readable code. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/11/c-stdcout-cheat-sheet + +作者:[Stephan Avenwedde][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/hansic99 +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_women_computing_2.png?itok=JPlR5aCA (Woman sitting in front of her computer) +[2]: https://opensource.com/downloads/cout-cheat-sheet +[3]: https://github.com/hANSIc99/cpp_output_formatting +[4]: https://en.cppreference.com/w/cpp/io/cout +[5]: https://en.cppreference.com/w/cpp/io/basic_ostream +[6]: https://en.cppreference.com/w/cpp/io +[7]: https://en.cppreference.com/w/cpp/io/basic_ostream/operator_ltlt +[8]: https://opensource.com/article/20/8/printf From ec8797010cccc1b85d6eeed8919f95e41e4b3f6f Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 26 Nov 2021 05:03:05 +0800 Subject: [PATCH 018/244] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020211125=20?= =?UTF-8?q?Endless=20OS=204.0=20is=20a=20Long-Term=20Support=20Version=20w?= =?UTF-8?q?ith=20Usability=20Improvements?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20211125 Endless OS 4.0 is a Long-Term Support Version with Usability Improvements.md --- ...ort Version with Usability Improvements.md | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 sources/news/20211125 Endless OS 4.0 is a Long-Term Support Version with Usability Improvements.md diff --git a/sources/news/20211125 Endless OS 4.0 is a Long-Term Support Version with Usability Improvements.md b/sources/news/20211125 Endless OS 4.0 is a Long-Term Support Version with Usability Improvements.md new file mode 100644 index 0000000000..cb76edd920 --- /dev/null +++ b/sources/news/20211125 Endless OS 4.0 is a Long-Term Support Version with Usability Improvements.md @@ -0,0 +1,93 @@ +[#]: subject: "Endless OS 4.0 is a Long-Term Support Version with Usability Improvements" +[#]: via: "https://news.itsfoss.com/endless-os-4-0-lts/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Endless OS 4.0 is a Long-Term Support Version with Usability Improvements +====== + +Endless OS is a Debian-based Linux distro that focuses on bundling several important applications and resources to help make the most out of your computer without needing an internet connection. + +It is primarily tailored for education and for users who do not have constant access to the internet. And, if you are connected to the internet, there are tools to help you browse the web and stay in touch with friends/family. + +And, their latest release, Endless OS 4.0, is a Long-Term Support version that comes with several improvements. Let us take a brief look at it. + +### Endless OS 4.0: What’s New? + +To clarify, it is an LTS release that will be maintained for a number of years (no clarity exactly), but it will be getting updates even after the Endless OS 5.0 release. + +In addition to the LTS benefit, other changes include: + +#### Improved App Grid Navigation + +![Credits: Endlessos.org][1] + +In previous releases, the applications listed were scattered around between multiple pages. For that reason, a user could not always notice that. + +So, with Endless OS 4.0, additional arrows and icons have been added to highlight the presence of multiple pages and app grids. You should see that there are more apps to explore if you switch pages on your desktop. + +#### Fast User Switching + +You now get two different ways to quickly switch to another user while a user is logged in. + +![Credits: Endlessos.org][2] + +Traditionally, you can find it in the user menu (along with the Log Out option). Or, you can also switch right from the lock screen using the new multi-user icon. + +![Credits: Endlessos.org][3] + +#### New Default Wallpaper + +It is always a refreshing experience when there is a new wallpaper with a significant version upgrade. + +You can find the wallpaper listed on [Unsplash][4] if you want to try it in any other system. + +#### Driverless Printing + +You no longer need to rely on pesky printer drivers to detect the printing devices connected. With Endless OS 4.0, any devices that support [Internet Printing Protocol][5] will be automatically detected in the local network and connected. + +Any existing configured printers will be removed when you upgrade. However, you can manually add them back if needed. + +### Other Improvements + +Along with the fundamental changes, you will also find a newer graphics stack, upgraded Linux Kernel, and more. Some of them include: + + * [Linux Kernel 5.11][6] + * NVIDIA driver 460.91.03 + * Raspberry Pi 4B 8 GB RAM Support + * Some default applications like Rythmbox installed as Flatpak packages + + + +You will also notice some features being removed as a part of the upgrade. For full details, you can refer to the [official release notes][7]. + +#### Big Tech Websites Get Millions in Revenue, It's FOSS Got You! + +If you like what we do here at It's FOSS, please consider making a donation to support our independent publication. Your support will help us keep publishing content focusing on desktop Linux and open source software. + +I'm not interested + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/endless-os-4-0-lts/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ0MSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[2]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjU1NyIgd2lkdGg9IjMyOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[3]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjE0NSIgd2lkdGg9IjE4OCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[4]: https://unsplash.com/photos/WeYamle9fDM +[5]: https://en.wikipedia.org/wiki/Internet_Printing_Protocol +[6]: https://news.itsfoss.com/linux-kernel-5-11-release/ +[7]: https://support.endlessos.org/en/endless-os/release-notes/4-0 From 34df66f4c33b21254fc221a35de3d5cd4fba4fe7 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 26 Nov 2021 05:03:16 +0800 Subject: [PATCH 019/244] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020211125=20?= =?UTF-8?q?MX=20Linux=20has=20Released=20a=20New=20Edition=20for=20Newer?= =?UTF-8?q?=20Hardware?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20211125 MX Linux has Released a New Edition for Newer Hardware.md --- ...leased a New Edition for Newer Hardware.md | 81 +++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 sources/news/20211125 MX Linux has Released a New Edition for Newer Hardware.md diff --git a/sources/news/20211125 MX Linux has Released a New Edition for Newer Hardware.md b/sources/news/20211125 MX Linux has Released a New Edition for Newer Hardware.md new file mode 100644 index 0000000000..3e83ce9e32 --- /dev/null +++ b/sources/news/20211125 MX Linux has Released a New Edition for Newer Hardware.md @@ -0,0 +1,81 @@ +[#]: subject: "MX Linux has Released a New Edition for Newer Hardware" +[#]: via: "https://news.itsfoss.com/mx-linux-21-ahs/" +[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +MX Linux has Released a New Edition for Newer Hardware +====== + +[MX Linux 21][1] was officially unveiled last month while introducing a new Fluxbox edition. However, the Advanced Hardware Support (AHS) ISO was not a part of it. + +Recently, MX Linux announced the availability of MX Linux 21 AHS and a new AHS repo for existing MX Linux 21 users. + +In this article, let us explore more about it. + +### MX Linux 21 AHS: What’s Different? + +![][2] + +As many of MX Linux’s existing users will know, the ‘AHS’ in MX Linux AHS Edition stands for ‘Advanced Hardware Support’. + +In simpler terms, this means that it includes a newer kernel and graphics stack tailored for modern hardware. + +If you do not need the latest open-source graphics stack with updates, there is no reason for you to try this out. + +In this case, MX Linux 21 comes baked with [Linux Kernel 5.14][3] and updated versions of Mesa, Vulkan, and XOrg. It is highly recommended that users with newer gen graphics try it out to iron out any issues with the older kernel and ensure compatibility. + +The AHS edition comes with the Xfce desktop environment by default, although other environments can be installed post-installation. This should lead to a relatively smooth experience for everyone, as the Xfce desktop environment has already received some significant improvements with the MX Linux 21 release. + +### You can get this ‘AHS Edition’ on existing MX Linux install as well + +Considering that you already have MX Linux 21 and do not need the latest Linux Kernel, you can simply enable the AHS repo and get the latest Mesa, Xorg, and Vulkan drivers. + +![][4] + +As you can notice in the screenshots, all you have to do is enable the repo and perform an upgrade to get the latest packages available. + +![][5] + +However, if you do not have MX Linux 21 installed, you can opt for the ISO and perform a fresh installation to get Linux Kernel 5.14 along with a newer graphics stack. + +You can download the MX Linux 21 AHS ISO directly or choose to get the torrent files. We have linked both of them in the buttons down below. + +For more details, you can refer to the [official announcement][6]. + +[Sourceforge][7] + +[Torrent][8] + +Will you be trying out the new ISO? Or, do you prefer to enable the repo to get the latest graphics stack? Feel free to let me know in the comments down below. + +#### Big Tech Websites Get Millions in Revenue, It's FOSS Got You! + +If you like what we do here at It's FOSS, please consider making a donation to support our independent publication. Your support will help us keep publishing content focusing on desktop Linux and open source software. + +I'm not interested + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/mx-linux-21-ahs/ + +作者:[Jacob Crume][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://news.itsfoss.com/author/jacob/ +[b]: https://github.com/lujun9972 +[1]: https://news.itsfoss.com/mx-linux-21-release/ +[2]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjI5OCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[3]: https://news.itsfoss.com/kernel-5-14-release/ +[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjU5OSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[5]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjY3NyIgd2lkdGg9IjcyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[6]: https://mxlinux.org/blog/mx-21-ahs-iso-now-available/ +[7]: https://sourceforge.net/projects/mx-linux/files/Final/Xfce/MX-21_ahs_x64.iso/download +[8]: https://l2.mxrepo.com/torrents/MX-21_ahs_x64.iso.torrent From ef29f92548432b47912c7c5993718372e5f44c2c Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 26 Nov 2021 08:50:24 +0800 Subject: [PATCH 020/244] translated --- ...k Permissions Graphically With Flatseal.md | 86 +++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 translated/tech/20211124 Manage Flatpak Permissions Graphically With Flatseal.md diff --git a/translated/tech/20211124 Manage Flatpak Permissions Graphically With Flatseal.md b/translated/tech/20211124 Manage Flatpak Permissions Graphically With Flatseal.md new file mode 100644 index 0000000000..c339505a83 --- /dev/null +++ b/translated/tech/20211124 Manage Flatpak Permissions Graphically With Flatseal.md @@ -0,0 +1,86 @@ +[#]: subject: "Manage Flatpak Permissions Graphically With Flatseal" +[#]: via: "https://itsfoss.com/flatseal/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +用 Flatseal 图形化管理 Flatpak 的权限 +====== + +新版本的安卓系统让你对单个应用的访问和权限有了更精细的控制。这一点至关重要,因为许多应用曾经(正在)滥用系统权限。下载一个天气应用,它将要求访问你的通话记录,好像这与天气有什么关系一样。 + +为什么我在说安卓应用的权限?因为这可能与此应用的功能有关。 + +你可能已经知道[什么是 Flatpak][1]。这些都是沙盒应用,可以选择访问系统资源,如文件存储、网络接口等。 + +就像 Android 一样,你可以控制 Flatpak 应用对系统资源的访问。默认情况下,这要用 [Flatpak 命令][2],不是每个人都能适应它。 + +因此,有一个叫做 Flatseal 的小工具,可以让你在应用层面上管理和控制 Flatpak 的权限。 + +### Flatseal + +![Flatseal][3] + +[Flatseal][4] 是一个图形化的工具,用于审查和修改你的 Flatpak 应用的权限。这使得事情比通过命令要容易得多。 + +Flatseal 会列出所有已安装的 Flatpak 应用。当你选择一个,你可以看到所有的权限。已启用的权限很容易被发现,如果你愿意,你可以禁用它。 + +例如,Ksnip 是一个屏幕截图工具,但它也有联网权限,可以用 Imgur 等在线服务分享截图。如果你不需要它,你可以禁用它。 + +![Control permissions of individual Flatpak apps][5] + +如果不出意外,看看一个应用有什么样的权限是很有趣的。例如,你可以看到 ksnip 有在后台运行的能力(这样你就可以用键盘快捷键进行截图)。 + +![][6] + +### 安装 Flatseal + +既然都是 Flatpak,那么 Flatseal 作为一个 Flatpak 包来使用也是合理的。 + +在 Fedora 上,如果已经添加 Flathub 仓库,你可以从软件中心安装它。 + +![Installing Flatseal from the software center][7] + +否则,命令行总是可以帮助你。 + +``` + + flatpak install flathub com.github.tchx84.Flatseal + +``` + +### 你真的需要控制权限吗? + +这是一个主观的问题,完全取决于你。值得庆幸的是,到目前为止,桌面 Linux 应用并不像 Android 应用那样滥用。 + +一个普通用户通常不会去管这些事情,这完全没问题。 + +然而,如果你对这些事情过于谨慎,或者你找到一个很好的理由,Flatseal 提供了一个简单的选择。 + +你还应该小心你所改变的权限。如果你禁用了对应用的运作至关重要的权限,在使用应用时肯定会造成麻烦。 + +所以,总的来说,这不是一个普通用户要使用的东西。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/flatseal/ + +作者:[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://itsfoss.com/what-is-flatpak/ +[2]: https://itsfoss.com/flatpak-guide/ +[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/flatseal.png?resize=800%2C474&ssl=1 +[4]: https://flathub.org/apps/details/com.github.tchx84.Flatseal +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/flatpak-permission-control-flatseal.png?resize=800%2C503&ssl=1 +[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/flatpak-permissions-with-flatseal.png?resize=800%2C441&ssl=1 +[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/install-flatseal.png?resize=800%2C467&ssl=1 From f64209428906593d7c8954359e7a0fa828706afc Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 26 Nov 2021 08:54:18 +0800 Subject: [PATCH 021/244] translating --- ... (Digital Audio Workstation) Available for Linux Desktops.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20211031 Best DAW (Digital Audio Workstation) Available for Linux Desktops.md b/sources/tech/20211031 Best DAW (Digital Audio Workstation) Available for Linux Desktops.md index f41c5e593e..6da9b9a104 100644 --- a/sources/tech/20211031 Best DAW (Digital Audio Workstation) Available for Linux Desktops.md +++ b/sources/tech/20211031 Best DAW (Digital Audio Workstation) Available for Linux Desktops.md @@ -2,7 +2,7 @@ [#]: via: "https://itsfoss.com/best-daw-linux/" [#]: author: "Ankush Das https://itsfoss.com/author/ankush/" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From b28626364086e758e75d81418e461d429edb97c2 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 27 Nov 2021 05:02:43 +0800 Subject: [PATCH 022/244] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211127=20?= =?UTF-8?q?13=20Best=20Dark=20GTK=20Themes=20for=20Your=20Linux=20Desktop?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211127 13 Best Dark GTK Themes for Your Linux Desktop.md --- ... Dark GTK Themes for Your Linux Desktop.md | 194 ++++++++++++++++++ 1 file changed, 194 insertions(+) create mode 100644 sources/tech/20211127 13 Best Dark GTK Themes for Your Linux Desktop.md diff --git a/sources/tech/20211127 13 Best Dark GTK Themes for Your Linux Desktop.md b/sources/tech/20211127 13 Best Dark GTK Themes for Your Linux Desktop.md new file mode 100644 index 0000000000..152877cf4a --- /dev/null +++ b/sources/tech/20211127 13 Best Dark GTK Themes for Your Linux Desktop.md @@ -0,0 +1,194 @@ +[#]: subject: "13 Best Dark GTK Themes for Your Linux Desktop" +[#]: via: "https://itsfoss.com/dark-gtk-themes/" +[#]: author: "Pratham Patel https://itsfoss.com/author/pratham/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +13 Best Dark GTK Themes for Your Linux Desktop +====== + +**With the near infinite customization options you have on any given Linux distribution, the most visually noticeable difference is customizing the theme. Let’s take a look at some of the GTK themes with dark mode.** + +Yeah, we have covered the [best Linux themes][1] in the past but this one is specifically dedicated to the dark themes. There was a time when only programmers and sysadmins preferred dark mode but that’s not the case anymore. Dark mode is loved by normal people as well and hence I compiled this list of dark themes for desktop Linux users like you. + +If you are new to theme-ing your desktop environment, you can take a look at our guide to [install themes in GNOME][2]. + +Just FYI, this is not a ranking list. + +### 1\. McMojave + +![The stock image of how McMojave looks \(courtesy of the theme developer\)][3] + +[McMojave][4] is a GTK theme which takes inspiration from the macOS style user interface. This theme is offered in dark mode, obviously, but also in light mode, for… umm… whoever may want it. + +The McMojave GTK theme obviously supports GTK based Desktop Environments like Pantheon, Gnome, XFCE, Mate etc; but, this theme is also [available for KDE users][5]. + +To compliment your Desktop Environment, which is now looking very similar to macOS, you can also install the [McMojave circle icon theme][6] for an even more complete experience. + +[McMojave][4] + +### 2\. Yaru + +![A screenshot of the default Yaru theme on Ubuntu 21.10][7] + +[Yaru][8] is the default GTK (GNOME) theme that ships with [Ubuntu][9]. The theme’s orange accent with darkened gray and hints of black is something that I feel is attractive. + +Now, you can make GNOME on Arch Linux look like Ubuntu. ( ͡° ͜ʖ ͡°) + +[Yaru][8] + +### 3\. Pop + +![A look at how the Pop GTK theme looks on Pop!_OS][10] + +[Pop GTK theme][11] is a theme created by the people at [System76][12] for their Ubuntu based Linux distribution, [Pop!_OS][13]. + +If you liked System76’s take on how GNOME should look in dark mode, you can try out the [Pop GTK theme][11] in your Linux distribution of choice. + +To complete the Pop-esque look and feel, install the System76 provided [Pop icon][14] alongside their theme as well. + +[Pop GTK][11] + +### 4\. Nordic + +![Nordic GTK theme preview][15] + +Are you someone who loves simple and a somewhat flat design approach along with some gray, well, a lot of gray? Look no further than this theme that is based on the [Nord color palette][16]. + +The Nordic GTK theme gives you exactly that. A GTK theme with simplistic design based on the Nord color palette. + +[Nord][17] + +### 5\. Ultimate-Maia + +![Stock screenshot of the Ultimate-Maia theme][18] + +Ultimate-Maia is a GTK theme based on [Google’s Material theme][19] design philosophy. This theme has a subtle yet unique look and feel to itself, especially with all the different options available for the accent color. + +[Ultimate-Maia][20] + +### 6\. Graphite + +![A look at Graphite’s flat, rounded and gray characteristic][21] + +Graphite is a GTK theme that offers a completely unique appearance to your Desktop Environment (especially GNOME) while keeping the uniqueness of your DE just as same as before. It is something to take a look at. + +[Graphite][22] + +### 7\. Qogir + +![Customization options available with Qogir GTK theme][23] + +Qogir is a GTK theme with flat design in mind. The Qogir theme goes above and beyond to provide you with customization options for title buttons, checkbox, radio buttons, switches and more. + +[Qogir][24] + +### 8\. Layan + +![Lyan – A very rounded-corners GTK theme][25] + +You will be delighted to know that this list also includes Layan, a GTK theme with emphasis on smooth, rounded corners with a bubbly aesthetic to it. The Layan theme also inherits design philosophies from [Google’s Material design][19] guidelines. + +[Layan][26] + +### 9\. Juno + +![][27] + +Juno is another one of the best dark mode friendly GTK themes I found on my radar. Some may like it’s pitch black nature, some might not. But, if you have an OLED laptop or computer display, Juno feels like it was made for you to use. + +[Juno][28] + +### 10\. Ant Themes + +![Ant themes’ available options for customization of window appearance][29] + +Ant is a GTK theme that takes some inspiration from the macOS layout and user interface elements, and in my opinion, the Ant theme implements it all nicely. + +[Ant][30] + +### 11\. Equilux + +![][31] + +Equilux theme gives you a nice theme with a subtle dark mode. This theme blends very well with GNOME and GNOME forks. I don’t have much to describe this theme, it is simple and elegant. + +[Equilux][32] + +### 12\. Orchis-dark + +![Orchis Dark][33] + +Orchis-dark is the dark variant of the super cool Orchis theme. It gives the desktop an iOS/macOS sort of touch with rounded corners and fluid interface. You can guess that immediately by just glancing at it. + +[Orchis Theme][34] + +### 13\. Elementary X + +![A look at Elementary X GTK theme with the settings panel open][35] + +Elementary X is a GTK theme based on the efforts made by the [elementary OS][36] team to customize GNOME’s appearance. If you did not know, elementary OS is a Linux distribution that is based on Ubuntu. + +[Elementary X][37] + +#### Recommended Read + +### Conclusion + +Themes listed in this article piece are nothing short of beautiful and neither are your options limited to the ones listed here. There are thousands more out in the wild. + +Comment down below if you liked a theme. If you are using a theme that I haven’t mentioned, please comment down below. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/dark-gtk-themes/ + +作者:[Pratham Patel][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/pratham/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/best-gtk-themes/ +[2]: https://itsfoss.com/install-switch-themes-gnome-shell/ +[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/01_mojave.webp?resize=800%2C450&ssl=1 +[4]: https://github.com/vinceliuice/Mojave-gtk-theme +[5]: https://github.com/vinceliuice/McMojave-kde +[6]: https://github.com/vinceliuice/McMojave-circle +[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/02_yaru.webp?resize=800%2C403&ssl=1 +[8]: https://github.com/ubuntu/yaru +[9]: https://ubuntu.com/ +[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/pop_gtk.webp?resize=800%2C450&ssl=1 +[11]: https://github.com/pop-os/gtk-theme +[12]: https://system76.com/ +[13]: https://pop.system76.com/ +[14]: https://github.com/pop-os/icon-theme +[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/nordic.webp?resize=800%2C450&ssl=1 +[16]: https://github.com/arcticicestudio/nord +[17]: https://github.com/EliverLara/Nordic +[18]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/05_ultimate_maia.webp?resize=800%2C450&ssl=1 +[19]: https://material.io/ +[20]: https://github.com/bolimage/Ultimate-Maia +[21]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/06_graphite.webp?resize=800%2C450&ssl=1 +[22]: https://github.com/vinceliuice/Graphite-gtk-theme +[23]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/Qogir.webp?resize=800%2C500&ssl=1 +[24]: https://github.com/vinceliuice/Qogir-theme +[25]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/07_layan.webp?resize=800%2C450&ssl=1 +[26]: https://github.com/vinceliuice/Layan-gtk-theme +[27]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/08_juno.webp?resize=732%2C487&ssl=1 +[28]: https://github.com/EliverLara/Juno +[29]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/ant.webp?resize=800%2C533&ssl=1 +[30]: https://github.com/EliverLara/Ant +[31]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/equilux.webp?resize=800%2C450&ssl=1 +[32]: https://github.com/ddnexus/equilux-theme +[33]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/orchis-dark.webp?resize=800%2C463&ssl=1 +[34]: https://www.gnome-look.org/s/Gnome/p/1357889 +[35]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/elementary.webp?resize=800%2C450&ssl=1 +[36]: https://elementary.io/ +[37]: https://github.com/surajmandalcell/elementary-x From 1c355f09dd38179bfb97b4d17080e0dbc279a0b3 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 27 Nov 2021 05:03:00 +0800 Subject: [PATCH 023/244] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211126=20?= =?UTF-8?q?10=20holiday=20gift=20ideas=20for=20open=20source=20enthusiasts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211126 10 holiday gift ideas for open source enthusiasts.md --- ... gift ideas for open source enthusiasts.md | 191 ++++++++++++++++++ 1 file changed, 191 insertions(+) create mode 100644 sources/tech/20211126 10 holiday gift ideas for open source enthusiasts.md diff --git a/sources/tech/20211126 10 holiday gift ideas for open source enthusiasts.md b/sources/tech/20211126 10 holiday gift ideas for open source enthusiasts.md new file mode 100644 index 0000000000..71aec390cd --- /dev/null +++ b/sources/tech/20211126 10 holiday gift ideas for open source enthusiasts.md @@ -0,0 +1,191 @@ +[#]: subject: "10 holiday gift ideas for open source enthusiasts" +[#]: via: "https://opensource.com/article/21/11/open-source-holiday-gifts" +[#]: author: "Joshua Allen Holm https://opensource.com/users/holmja" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +10 holiday gift ideas for open source enthusiasts +====== +From DIY projects to computers to books, this list provides gift +suggestions that foster creativity, learning, and exploring. +![Gift box opens with colors coming out][1] + +Are you looking for cool gifts for people on your holiday shopping list or ideas for your own wishlist? If so, consider one of the ten suggestions below. Each of these gift suggestions connects in some way to the open source ethos. From DIY projects to computers to books, this list provides gift suggestions that foster creativity, learning, and exploring. + +### System76 computer + +![System76 Thelio][2] + +(Source: [System76][3]) + +Does someone in your life need a new desktop, laptop, or server? [System76][4] should be one of the first places you should look. Looking for something light and mobile? The lightweight 14-inch [Lemur Pro][5] laptop is an excellent choice. Need a desktop with _a lot_ of processing power, RAM, and storage? One of the various [Thelio][3] desktops is what you are looking for. And there are plenty of other options in-between. Their computers come with either Ubuntu or Pop!_OS, which is the company's own Ubuntu-based Linux distribution, and have lifetime support. System76 is also in favor of [right-to-repair legislation][6]. While not the only vendor out there that sells Linux-powered computers, they are certainly one of the most popular. + +**Prices Vary** + +### Raspberry Pi 400 Personal Computer Kit + +![Raspberry Pi 400 Kit][7] + +(Source: [Raspberry Pi][8]) + +At this point, the Raspberry Pi brand needs little introduction. Since the first Raspberry Pi model took the world by storm in 2012, the Raspberry Pi has remained one of the most popular single-board computers for use in education and by hobbyists and tinkerers. The [Raspberry Pi 400 Personal Computer Kit][8] continues this trend. This kit contains everything someone needs to get started, except a monitor. For US$ 100.00, you get the Raspberry Pi 400 (a variant of the Raspberry Pi 4 series built into a keyboard casing), a mouse, power supply, micro HDMI-to-HDMI cable, an SD card preloaded with Raspberry Pi OS, and a copy of the Raspberry Pi Beginner's Guide. While not the most powerful computer in the world, the Raspberry Pi 400 is more than capable of functioning as a decent starting computer for the children on your shopping list. + +**Price: US$ 100.00** + +### Raspberry Pi Build HAT + +![Raspberry Pi Build HAT][9] + +(Source: [Raspberry Pi][10]) + +One of the many benefits of the Raspberry Pi is its ability to be expanded with various add-on boards. A recently introduced add-on board, the [Raspberry Pi Build HAT][10], makes it possible to use the Raspberry Pi to control up to four LEGO Technic motors or sensors from the [LEGO Education SPIKE][11] product line. The Build HAT works with any Raspberry Pi with a 40-pin GPIO header. You code projects using a specially developed Python library. The Build HAT can power itself, the Raspberry Pi board, and the LEGO motors and sensors using an external 8V DC power source (like the [official Built HAT power supply][12]) or a 7.5V battery pack.  + +**Price: US$ 25.00 (plus the cost of the parts and accessories needed for a project)** + +### CrowPi2 + +![CrowPi][13] + +(Source: [CrowPi][14]) + +The [CrowPi2][14] is a collection of STEM learning projects built into a laptop-style case powered by a Raspberry Pi. The CrowPi2 kit comes in three sizes: Basic, Advanced, and Deluxe. The Basic kit comes with a few accessories but does not come with a Raspberry Pi. The Advanced kit comes with a Raspberry Pi 4B with 4GB of RAM and a larger selection of accessories than the Basic kit. The Deluxe Kit comes with the largest selection of accessories and a Raspberry Pi 4B with 8GB of RAM. All three kits are available in Space Gray or Silver. An optional power bank can provide the CrowPi2 with power when not plugged into an electrical outlet. If you want to learn more about the CrowPi2, you can read [Opensource.com's review of the CrowPi2][15] by Seth Kenlon. + +**Basic Kit: US$ 339.99**   +**Advanced Kit: US$ 469.99 **  +**Deluxe Kit: US$ 529.99** +**Optional Power Bank: US$ 19.00**   + +### Keebio Quefrency keyboard + +Recommendation by John Hall + +![Keebio Quefrency Keyboard][16] + +(Source: [Keeb.io][17]) + +The [Keebio Quefrency keyboard][17] would make a great holiday gift for anyone who wants to build their own keyboard! It is a 65% keyboard, which is probably the smallest most people would be willing to go since it has Home, PgUp, PgDn, and arrow keys. It is a split ergonomic keyboard, but you can put the halves back together if you have difficulty adjusting to the split. Best of all, the latest revision of the Quefrency has hot-swap sockets, so you can build it without needing to solder anything. + +Here is an inexpensive Quefrency keyboard build: + + * [Quefrency rev4 PCBs][18] with hot-swap sockets, plus FR4 Plates (left with no macros, right 65%) + * $80 + $28 US + * [2u stabilizers (5)][19] + * $10 US + * [Key switches (70)][20] + * $16 US + * [Keycaps][21] + * $ 45 US + * [2.25u G20 left spacebar][22] and [2.75u G20 right spacebar][23] + * $8 + $8 US + * [USB C to USB C keyboard connector][24] + * $4 US + * **Total US$ 199** (not including shipping) + + + +As noted in the parts list, the Keebio Quefrency rev4 needs five stabilizers: + + 1. Left Shift + 2. Left Space + 3. Right Space + 4. Enter + 5. Backspace + + + +The Keebio Quefrency rev4 is intended to be built as a 65% keyboard, which has a shortened right shift key that does not need a stabilizer. Many keycap sets, even relatively inexpensive sets like Artifact Bloom and Glorious GPBT, include a shortened right shift key that fits most keyboards like this one. The hard part is finding matching split spacebar keycaps. But you can buy spacebar keycaps from places like Pimp My Keyboard, which work great. Unfortunately, it is nearly impossible to get matching colors from different manufacturers. Even if you pick white keycaps and white spacebars, one of them is likely to be grayer than the other. Why not celebrate the difference instead? Try pairing white and gray keycaps with red or blue spacebars. + +### Petoi Nybble Open Source Robotic Cat + +![Petoi Nybble][25] + +(Source: [Petoi][26]) + +The [Petoi Nybble Open Source Robotic Cat][26] is a kit for building a robotic pet cat. The kit comes with everything needed to build the project, but batteries are not included. The Nybble requires two 14500 lithium ion rechargeable 3.7V batteries, which provide about 45 minutes of playtime. Once assembled, the cat can be programmed/controlled using the Arduino IDE, a Python API, or an Android/iOS app. Check out the [Nybble User Manual][27] for more details. + +**Price: US$ 249.00 USD** + +### The Expanse Novel Series + +![The Expanse books][28] + +(Source: [The Expanse Books][29]) + +The final novel in [The Expanse][29] series by James S.A. Corey comes out just in time for the holiday gift-giving season. Set to release on November 30, [Leviathan Falls][30] will conclude the main narrative of this epic nine-book science fiction series that explorers humanity's future in space. In order, the nine books in the series are Leviathan Wakes, Caliban's War, Abaddon's Gate, Cibola Burn, Nemesis Games, Babylon's Ashes, Persepolis Rising, Tiamat's Wrath, and Leviathan Falls. There will also be a collection of short stories and novellas published next year. Most of these stories and novellas are already available in eBook format, but the collection will be the first time they are available in print. Buy the science fiction reader in your life the first book of the series to get them started, or buy them the entire series. + +**Books 1 through 6: US$ 17.99 (Trade Paperback)**   +**Books 7 and 8: US$ 18.99 (Trade Paperback)**   +**Book 9: US$ 30.00 (Hardcover)** + +### Books + +If you are looking for book recommendations and the recommendation for The Expanse does not meet your needs, consider the books from [Opensource.com's 2021 Summer Reading List][31]. This list contains eight book recommendations for a variety of reading tastes. From a modern translation of Beowulf to non-fiction books about technology, there should be something there for the reader in your life. If the 2021 Summer Reading List does not have what you are looking for, the article also contains links to all of Opensource.com's previous summer reading lists, which provides ten more lists of suggestions. + +**Prices Vary** + +### Stickers + +![Ultimate sticker pack][32] + +(Source: [Sticker Mule][33]) + +One of the drawbacks of virtual conferences during the pandemic is that you cannot walk away from the conference with a collection of stickers from various vendor booths. For those who love decorating their laptops with stickers, this could mean that their latest laptop is currently unadorned with the usual decorations. If this sounds like someone in your life, consider buying them a [Unixstickers pack][33] from Sticker Mule. The packs come in three different sizes: Pro, which contains ten stickers; Elite, which contains all the stickers from the Pro pack plus ten more stickers; and Ultimate, which contains everything in the Elite pack plus an additional ten stickers. The stickers cover many open source projects making these bundles the next best thing to visiting vendor booths and the sticker swap table at an in-person conference. + +**Pro pack: US$ 1.00** +**Elite pack: US$ 19.00** +**Ultimate pack: US$ 24.00** + +### Charitable donation to an open source organization + +If the person on your shopping list already has everything (or does not want any tangible gifts), consider making a charitable donation to an open source project in their name. Opensource.com's list of [open source organizations][34] has plenty of organizations you can select from. You, the person whose name the donation was made in, and the organization that received your donation can all be content in knowing that your gift has helped make open source better. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/11/open-source-holiday-gifts + +作者:[Joshua Allen Holm][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/holmja +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_gift_giveaway_box_520x292.png?itok=w1YQhNH1 (Gift box opens with colors coming out) +[2]: https://opensource.com/sites/default/files/styles/medium/public/uploads/system76_thelio.png?itok=E6HBZoMA (System76 Thelio) +[3]: https://system76.com/desktops/ +[4]: https://system76.com +[5]: https://system76.com/laptops/lemur +[6]: https://blog.system76.com/post/646726872371200000/carl-testimony-hb21-1199mp3 +[7]: https://opensource.com/sites/default/files/styles/medium/public/uploads/raspberry_pi_400_kit.jpg?itok=AnVA_OP9 (Raspberry Pi 400 Kit) +[8]: https://www.raspberrypi.com/products/raspberry-pi-400/ +[9]: https://opensource.com/sites/default/files/styles/medium/public/uploads/raspberry_pi_build_hat.png?itok=8YVyNM-c (Raspberry Pi Build HAT) +[10]: https://www.raspberrypi.com/products/build-hat/ +[11]: https://education.lego.com/ +[12]: https://www.raspberrypi.com/products/build-hat-power-supply/ +[13]: https://opensource.com/sites/default/files/styles/medium/public/uploads/crowpi2.png?itok=hJDaPaaz (CrowPi) +[14]: https://www.crowpi.cc/ +[15]: https://opensource.com/article/21/9/raspberry-pi-crowpi2 +[16]: https://opensource.com/sites/default/files/styles/medium/public/uploads/keebio_quefrency_keyboard_pcb.png?itok=M0JVlcRK (Keebio Quefrency Keyboard) +[17]: https://keeb.io/collections/quefrency-split-staggered-65-keyboard +[18]: https://keeb.io/collections/quefrency-split-staggered-65-keyboard/products/quefrency-rev-4-65-split-staggered-keyboard +[19]: https://keeb.io/collections/diy-parts/products/cherry-mx-stabilizer?variant=43449871046 +[20]: https://divinikey.com/collections/linear-switches/products/gateron-milky-yellow-linear-switches?variant=32193385201729 +[21]: https://drop.com/buy/artifact-bloom-series-keycap-set-vintage +[22]: https://pimpmykeyboard.com/g20-2-25-space-pack-of-4/ +[23]: https://pimpmykeyboard.com/g20-2-75-space-pack-of-4/ +[24]: https://keeb.io/products/usb-c-to-usb-c-cable?variant=32313985728606 +[25]: https://opensource.com/sites/default/files/styles/medium/public/uploads/petoi_nybble_open_source_robotic_cat.png?itok=zhvvBReE (Petoi Nybble) +[26]: https://www.petoi.com/pages/petoi-nybble-overview +[27]: https://nybble.petoi.com/ +[28]: https://opensource.com/sites/default/files/styles/medium/public/uploads/the_expanse_books.jpg?itok=FkuizWic (The Expanse books) +[29]: https://www.jamessacorey.com/writing-type/books/ +[30]: https://www.jamessacorey.com/books/leviathan-falls/ +[31]: https://opensource.com/article/21/6/2021-opensourcecom-summer-reading-list +[32]: https://opensource.com/sites/default/files/uploads/ultimate_sticker_pack.png (Ultimate sticker pack) +[33]: https://www.stickermule.com/unixstickers +[34]: https://opensource.com/resources/organizations From 76da8727c909901819238406e17e03315073b4fd Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 27 Nov 2021 09:05:33 +0800 Subject: [PATCH 024/244] APL --- ...s a Long-Term Support Version with Usability Improvements.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/news/20211125 Endless OS 4.0 is a Long-Term Support Version with Usability Improvements.md b/sources/news/20211125 Endless OS 4.0 is a Long-Term Support Version with Usability Improvements.md index cb76edd920..bae3b1dd92 100644 --- a/sources/news/20211125 Endless OS 4.0 is a Long-Term Support Version with Usability Improvements.md +++ b/sources/news/20211125 Endless OS 4.0 is a Long-Term Support Version with Usability Improvements.md @@ -2,7 +2,7 @@ [#]: via: "https://news.itsfoss.com/endless-os-4-0-lts/" [#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "wxy" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From a31b7e4fc31bf441feaebcbc2951480f6a0026f1 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 27 Nov 2021 09:23:10 +0800 Subject: [PATCH 025/244] TSL&PRF --- ...ort Version with Usability Improvements.md | 93 ------------------- ...ort Version with Usability Improvements.md | 89 ++++++++++++++++++ 2 files changed, 89 insertions(+), 93 deletions(-) delete mode 100644 sources/news/20211125 Endless OS 4.0 is a Long-Term Support Version with Usability Improvements.md create mode 100644 translated/news/20211125 Endless OS 4.0 is a Long-Term Support Version with Usability Improvements.md diff --git a/sources/news/20211125 Endless OS 4.0 is a Long-Term Support Version with Usability Improvements.md b/sources/news/20211125 Endless OS 4.0 is a Long-Term Support Version with Usability Improvements.md deleted file mode 100644 index bae3b1dd92..0000000000 --- a/sources/news/20211125 Endless OS 4.0 is a Long-Term Support Version with Usability Improvements.md +++ /dev/null @@ -1,93 +0,0 @@ -[#]: subject: "Endless OS 4.0 is a Long-Term Support Version with Usability Improvements" -[#]: via: "https://news.itsfoss.com/endless-os-4-0-lts/" -[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" -[#]: collector: "lujun9972" -[#]: translator: "wxy" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Endless OS 4.0 is a Long-Term Support Version with Usability Improvements -====== - -Endless OS is a Debian-based Linux distro that focuses on bundling several important applications and resources to help make the most out of your computer without needing an internet connection. - -It is primarily tailored for education and for users who do not have constant access to the internet. And, if you are connected to the internet, there are tools to help you browse the web and stay in touch with friends/family. - -And, their latest release, Endless OS 4.0, is a Long-Term Support version that comes with several improvements. Let us take a brief look at it. - -### Endless OS 4.0: What’s New? - -To clarify, it is an LTS release that will be maintained for a number of years (no clarity exactly), but it will be getting updates even after the Endless OS 5.0 release. - -In addition to the LTS benefit, other changes include: - -#### Improved App Grid Navigation - -![Credits: Endlessos.org][1] - -In previous releases, the applications listed were scattered around between multiple pages. For that reason, a user could not always notice that. - -So, with Endless OS 4.0, additional arrows and icons have been added to highlight the presence of multiple pages and app grids. You should see that there are more apps to explore if you switch pages on your desktop. - -#### Fast User Switching - -You now get two different ways to quickly switch to another user while a user is logged in. - -![Credits: Endlessos.org][2] - -Traditionally, you can find it in the user menu (along with the Log Out option). Or, you can also switch right from the lock screen using the new multi-user icon. - -![Credits: Endlessos.org][3] - -#### New Default Wallpaper - -It is always a refreshing experience when there is a new wallpaper with a significant version upgrade. - -You can find the wallpaper listed on [Unsplash][4] if you want to try it in any other system. - -#### Driverless Printing - -You no longer need to rely on pesky printer drivers to detect the printing devices connected. With Endless OS 4.0, any devices that support [Internet Printing Protocol][5] will be automatically detected in the local network and connected. - -Any existing configured printers will be removed when you upgrade. However, you can manually add them back if needed. - -### Other Improvements - -Along with the fundamental changes, you will also find a newer graphics stack, upgraded Linux Kernel, and more. Some of them include: - - * [Linux Kernel 5.11][6] - * NVIDIA driver 460.91.03 - * Raspberry Pi 4B 8 GB RAM Support - * Some default applications like Rythmbox installed as Flatpak packages - - - -You will also notice some features being removed as a part of the upgrade. For full details, you can refer to the [official release notes][7]. - -#### Big Tech Websites Get Millions in Revenue, It's FOSS Got You! - -If you like what we do here at It's FOSS, please consider making a donation to support our independent publication. Your support will help us keep publishing content focusing on desktop Linux and open source software. - -I'm not interested - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/endless-os-4-0-lts/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://news.itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ0MSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[2]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjU1NyIgd2lkdGg9IjMyOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[3]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjE0NSIgd2lkdGg9IjE4OCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[4]: https://unsplash.com/photos/WeYamle9fDM -[5]: https://en.wikipedia.org/wiki/Internet_Printing_Protocol -[6]: https://news.itsfoss.com/linux-kernel-5-11-release/ -[7]: https://support.endlessos.org/en/endless-os/release-notes/4-0 diff --git a/translated/news/20211125 Endless OS 4.0 is a Long-Term Support Version with Usability Improvements.md b/translated/news/20211125 Endless OS 4.0 is a Long-Term Support Version with Usability Improvements.md new file mode 100644 index 0000000000..429e2e467e --- /dev/null +++ b/translated/news/20211125 Endless OS 4.0 is a Long-Term Support Version with Usability Improvements.md @@ -0,0 +1,89 @@ +[#]: subject: "Endless OS 4.0 is a Long-Term Support Version with Usability Improvements" +[#]: via: "https://news.itsfoss.com/endless-os-4-0-lts/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: " " +[#]: url: " " + +没有终点的操作系统 Endless OS 发布 4.0 LTS +====== + +> Endless OS 4.0 是一个长期支持版本,带有大量必要的改进,默认的应用程序以 Flatpak 包的形式提供。 + +![](https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/11/endless-os-4.0.jpg?w=1200&ssl=1) + +Endless OS 是一个基于 Debian 的 Linux 发行版,重点捆绑提供几个重要的应用程序和资源,以帮助充分利用你的计算机,而不需要互联网连接。(LCTT 译注:因此,在互联网的“终点”之外也可使用。) + +它主要是为教育和不能经常访问互联网的用户定制的。而如果你连接到互联网,也有一些工具可以帮助你浏览网页并与朋友/家人保持联系。 + +他们最新发布的 Endless OS 4.0 是一个长期支持的版本,带有一些改进。让我们简单了解一下。 + +### Endless OS 4.0 的新内容 + +澄清一下,这是一个 LTS 版本,将被维护若干年(具体不清楚),即使是在 Endless OS 5.0 版本发布之后,它也会得到更新。 + +除了 LTS 的好处之外,其他变化还包括: + +#### 改进的应用程序网格导航 + +![来源:Endlessos.org][1] + +在以前的版本中,列出的应用程序散落在多个页面之间。由于这个原因,用户可能不会注意到它们。 + +因此,在 Endless OS 4.0 中,增加了额外的箭头和图标,以突出多页面和应用程序网格的存在。你应该看到,如果你在桌面上切换页面,可以探索到更多的应用程序。 + +#### 快速切换用户 + +在一个用户已经登录时,你现在有两种不同的方式来快速切换到另一个用户。 + +![来源:Endlessos.org][2] + +传统上,你可以在用户菜单中找到它(和注销选项一起)。或者,你也可以使用新的多用户图标从锁屏上直接切换。 + +![来源:Endlessos.org][3] + +#### 新的默认墙纸 + +每当有重大的版本升级时,新的墙纸总是让人耳目一新。 + +如果你想在任何其他系统中尝试它们,你可以在 [Unsplash][4] 上找到列出的这些壁纸。 + +#### 免驱动打印 + +你不再需要依靠讨厌的打印机驱动程序来检测连接的打印设备。有了 Endless OS 4.0,任何在本地网络中支持 [互联网打印协议][5](IPP)的设备都可以自动检测并连接。 + +当你升级时,会删除任何已配置的打印机。然而,如果需要的话,你可以手动将它们添加回来。 + +### 其他改进措施 + +除了基本的变化之外,你还会发现更新的图形驱动、升级的 Linux 内核等等。其中一些包括: + + * [Linux 内核 5.11][6] + * NVIDIA 驱动程序 460.91.03 + * 支持 8GB 版树莓派 4B + * 一些默认的应用程序,如 Rythmbox,以 Flatpak 软件包的方式安装 + +你还会注意到,作为升级的一部分,移除了一些功能。关于全部细节,你可以参考 [官方发布说明][7]。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/endless-os-4-0-lts/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/11/endless-os-4-app-grid.png?w=1200&ssl=1 +[2]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/11/release-notes-4.0-switch-user-menu.png?w=328&ssl=1 +[3]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/11/release-notes-4.0-switch-user-lock-screen.png?w=188&ssl=1 +[4]: https://unsplash.com/photos/WeYamle9fDM +[5]: https://en.wikipedia.org/wiki/Internet_Printing_Protocol +[6]: https://news.itsfoss.com/linux-kernel-5-11-release/ +[7]: https://support.endlessos.org/en/endless-os/release-notes/4-0 From 900a36e6ee446a0faf461937721b191bd3011e51 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 27 Nov 2021 09:36:19 +0800 Subject: [PATCH 026/244] PUB @wxy https://linux.cn/article-14024-1.html --- ...a Long-Term Support Version with Usability Improvements.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/news => published}/20211125 Endless OS 4.0 is a Long-Term Support Version with Usability Improvements.md (98%) diff --git a/translated/news/20211125 Endless OS 4.0 is a Long-Term Support Version with Usability Improvements.md b/published/20211125 Endless OS 4.0 is a Long-Term Support Version with Usability Improvements.md similarity index 98% rename from translated/news/20211125 Endless OS 4.0 is a Long-Term Support Version with Usability Improvements.md rename to published/20211125 Endless OS 4.0 is a Long-Term Support Version with Usability Improvements.md index 429e2e467e..a814e8bba9 100644 --- a/translated/news/20211125 Endless OS 4.0 is a Long-Term Support Version with Usability Improvements.md +++ b/published/20211125 Endless OS 4.0 is a Long-Term Support Version with Usability Improvements.md @@ -4,8 +4,8 @@ [#]: collector: "lujun9972" [#]: translator: "wxy" [#]: reviewer: "wxy" -[#]: publisher: " " -[#]: url: " " +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14024-1.html" 没有终点的操作系统 Endless OS 发布 4.0 LTS ====== From 6532378f3cb541edd86d036e936fe677c048d856 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 27 Nov 2021 11:56:16 +0800 Subject: [PATCH 027/244] PRF&PUB @geekpi https://linux.cn/article-14025-1.html --- ... How to Install Discord on Fedora Linux.md | 51 +++++++------------ 1 file changed, 19 insertions(+), 32 deletions(-) rename {translated/tech => published}/20211120 How to Install Discord on Fedora Linux.md (74%) diff --git a/translated/tech/20211120 How to Install Discord on Fedora Linux.md b/published/20211120 How to Install Discord on Fedora Linux.md similarity index 74% rename from translated/tech/20211120 How to Install Discord on Fedora Linux.md rename to published/20211120 How to Install Discord on Fedora Linux.md index bb2fa5fe04..046303a9b6 100644 --- a/translated/tech/20211120 How to Install Discord on Fedora Linux.md +++ b/published/20211120 How to Install Discord on Fedora Linux.md @@ -3,31 +3,31 @@ [#]: author: "Pranav Krishna https://itsfoss.com/author/pranav/" [#]: collector: "lujun9972" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14025-1.html" 如何在 Fedora Linux 上安装 Discord ====== +![](https://img.linux.net.cn/data/attachment/album/202111/27/115501g3oiuirvzk4nvu3k.jpg) + [Discord][1] 是一个流行的消息收发应用,可用于文字和语音信息传递。 -它是几个社区的福音,可以帮助他们扩大项目,接触更多的人,并维持一个粉丝和追随者的社区。考虑到 Discord 最初是为游戏玩家设计的,这很令人惊讶。 +它是一些社区的福音,可以帮助他们扩大项目,接触更多的人,并维持一个粉丝和关注者的社区。而 Discord 最初是为游戏玩家设计的,这很令人惊讶。 Discord 可用于各种平台,包括 Linux。在本教程中,我将引导你完成在 Fedora 中安装 Discord 的步骤。 * 使用 DNF 和 RPM Fusion 仓库安装 Discord * 通过 Flatpak 安装Discord - - Flatpak 软件包是沙盒的,因此需要更多的磁盘空间和时间来启动。然而,他们会相当快地更新到新的版本。 无论你想使用 Flatpak 还是 DNF,选择权在你手上。我将向你展示这两种方法。 -非 FOSS 警报! - -Discord 并不是开源的。但由于他们提供了一个 Linux 客户端,而且许多 Linux 用户都依赖它,所以在这里介绍了。 +> 非 FOSS 警报! +> +> Discord 并不是开源的。但由于他们提供了一个 Linux 客户端,而且许多 Linux 用户都依赖它,所以我们会在这里介绍它。 ### 方法 1:通过 RPM Fusion 仓库安装 Discord @@ -36,30 +36,25 @@ Discord 可以通过添加非自由的 RPM Fusion 仓库来安装,这是大多 打开终端,使用下面的命令来添加 RPM-fusion 非自由仓库: ``` - - sudo dnf install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm +sudo dnf install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm ``` 完成后,更新仓库列表(应该不需要,但只是为了它): ``` - - sudo dnf update - +sudo dnf update ``` -然后通过 DNF 命令安装 Discord,像这样: +然后通过 `dnf` 命令安装 Discord,像这样: ``` - - sudo dnf install discord - +sudo dnf install discord ``` ![Installing Discord using DNF][2] -如果被要求导入 GPG 密钥,只要按 “Y” 就可以授权了。 +如果被要求导入 GPG 密钥,只要按 `Y` 就可以授权了。 ![Authorize GPG key][3] @@ -72,9 +67,7 @@ Discord 可以通过添加非自由的 RPM Fusion 仓库来安装,这是大多 如果你不想再使用 Discord,你可以从你的系统中删除它。要做到这一点,在终端运行以下命令: ``` - - sudo dnf remove discord - +sudo dnf remove discord ``` 这真的很简单,不是吗?还有一种简单的安装 Discord 的方法,那就是使用 Flatpak 软件包。 @@ -86,17 +79,13 @@ Discord 可以使用 Flatpak 轻松安装,因为它在 Fedora 中是默认可 首先,你需要在 Fedora 中启用 Flatpak 仓库: ``` - - flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo - +flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo ``` 接下来,通过这个命令安装 Discord: ``` - - flatpak install discord - +flatpak install discord ``` ![Install Discord via Flatpak][5] @@ -104,9 +93,7 @@ Discord 可以使用 Flatpak 轻松安装,因为它在 Fedora 中是默认可 如果你想删除 Discord,那么只需运行: ``` - - flatpak remove discord - +flatpak remove discord ``` 这就超级简单了。如果你在 Fedora Linux 上安装 Discord 需要任何帮助,请告诉我。 @@ -118,7 +105,7 @@ via: https://itsfoss.com/install-discord-fedora/ 作者:[Pranav Krishna][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 123101cd1d6bf7d34c0566c89c253802a107fc39 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 27 Nov 2021 19:02:12 +0800 Subject: [PATCH 028/244] APL --- ...11125 Tips for formatting when printing to console from C.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20211125 Tips for formatting when printing to console from C.md b/sources/tech/20211125 Tips for formatting when printing to console from C.md index 490b136440..cbbc735907 100644 --- a/sources/tech/20211125 Tips for formatting when printing to console from C.md +++ b/sources/tech/20211125 Tips for formatting when printing to console from C.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/21/11/c-stdcout-cheat-sheet" [#]: author: "Stephan Avenwedde https://opensource.com/users/hansic99" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "wxy" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From fedb8ac3dd71ffc992b813104d9134c06f0c63ba Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 28 Nov 2021 10:06:12 +0800 Subject: [PATCH 029/244] TSL&PRF --- ...matting when printing to console from C.md | 419 ------------------ ...matting when printing to console from C.md | 326 ++++++++++++++ 2 files changed, 326 insertions(+), 419 deletions(-) delete mode 100644 sources/tech/20211125 Tips for formatting when printing to console from C.md create mode 100644 translated/tech/20211125 Tips for formatting when printing to console from C.md diff --git a/sources/tech/20211125 Tips for formatting when printing to console from C.md b/sources/tech/20211125 Tips for formatting when printing to console from C.md deleted file mode 100644 index cbbc735907..0000000000 --- a/sources/tech/20211125 Tips for formatting when printing to console from C.md +++ /dev/null @@ -1,419 +0,0 @@ -[#]: subject: "Tips for formatting when printing to console from C++" -[#]: via: "https://opensource.com/article/21/11/c-stdcout-cheat-sheet" -[#]: author: "Stephan Avenwedde https://opensource.com/users/hansic99" -[#]: collector: "lujun9972" -[#]: translator: "wxy" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Tips for formatting when printing to console from C++ -====== -Next time you struggle with console output formatting, refer to this -article or the related cheat sheet. -![Woman sitting in front of her computer][1] - -When I started writing, I did it primarily for the purpose of documenting for myself. When it comes to programming, I'm incredibly forgetful, so I began to write down useful code snippets, special characteristics, and common mistakes in the programming languages I use. This article perfectly fits the original idea as it covers common use cases of formatting when printing to console from C++. - -**[Download the [C++ std::cout cheat sheet][2]]** - -As usual, this article comes with a lot of examples. Unless otherwise stated, all types and classes shown in the code snippets are part of the `std` namespace. So while you are reading this code, you have to put `using namespace std;` in front of types and classes. Of course, the example code is also available on [GitHub][3]. - -### Object-oriented stream - -If you've ever programmed in C++, you've certainly already used [cout][4]. The _cout_ object of type [ostream][5] comes into scope when you include <iostream>. This article focuses on _cout_, which lets you print to the console but the general formatting described here is valid for all stream objects of type [ostream][5]. An _ostream_ object is an instance of basic_ostream with the template parameter of type char. The header <iosfwd>, which is part of the include hierarchy of <iostream>, contains forward declarations for common types. - -The class _basic_ostream_ inherits from basic_ios and this type, in turn, inherits from ios_base. On [cppreference.com][6] you find a class diagram that shows the relationship between the different classes. - -The class ios_base is the base class for all I/O stream classes. The class basic_ios is a template class that has a specialization for common character types called **ios**. So when you read about _ios_ in the context of standard I/O, it is the char-type specialization of basic_ios. - -### Formatting streams - -In general, there are three ways of formatting ostream-based streams: - - 1. Using the format flags provided by ios_base. - 2. Stream modifying functions defined in the header <iomanip> and <ios>. - 3. By invoking a [specific overload][7] of the _<<_-operator. - - - -All methods have their pros and cons, and it usually depends on the situation when which method is used. The following examples show a mixture of all methods. - -#### Right justified - -By default, _cout_ occupies as much space as the data to print requires. To allow that right-justified output to take effect, you have to define the maximum width that a line is allowed to occupy. I use the format flags to reach the goal. - -The flag for right-justified output and the width adjustment only applies to the subsequent line: - - -``` - - -cout.setf(ios::right, ios::adjustfield); -cout.width(50); -cout << "This text is right justified" << endl; -cout << "This text is left justified again" << endl; - -``` - -In the above code, I configure the right-justified output using setf. I recommend you apply the bitmask _ios::adjustfield_ to _setf_, which causes all flags the bitmask specifies to be reset before the actual _ios::right_ flag gets set to prevent colliding combinations. - -#### Fill white space - -When using right-justified output, the empty space is filled with blanks by default. You can change it by specifying the fill character using setfill: - - -``` - - -cout << right << setfill('.') << setw(30) << 500 << " pcs" << endl; -cout << right << setfill('.') << setw(30) << 3000 << " pcs" << endl; -cout << right << setfill('.') << setw(30) << 24500 << " pcs" << endl; - -``` - -The code produces the following output: - - -``` - - -...........................500 pcs -..........................3000 pcs -.........................24500 pcs - -``` - -#### Combine  - -Imagine your C++ program keeps track of your pantry inventory. From time to time, you want to print a list of the current stock. To do so, you could use the following formatting. - -The following code is a combination of left- and right-justified output using dots as fill characters to get a nice looking list: - - -``` - - -cout << left << setfill('.') << setw(20) << "Flour" << right << setfill('.') << setw(20) << 0.7 << " kg" << endl; -cout << left << setfill('.') << setw(20) << "Honey" << right << setfill('.') << setw(20) << 2 << " Glasses" << endl; -cout << left << setfill('.') << setw(20) << "Noodles" << right << setfill('.') << setw(20) << 800 << " g" << endl; -cout << left << setfill('.') << setw(20) << "Beer" << right << setfill('.') << setw(20) << 20 << " Bottles" << endl; - -``` - -Output: - - -``` - - -Flour...............................0.70 kg -Honey..................................2 Glasses -Noodles..............................800 g -Beer..................................20 Bottles - -``` - -### Printing values - -Of course, stream-based output also offers a multitude of possibilities to output all kinds of variable types. - -#### Boolean - -The boolalpha switch lets you convert the binary interpretation of a bool to a string: - - -``` - - -cout << "Boolean output without using boolalpha: " << true << " / " << false << endl; -cout << "Boolean output using boolalpha: " << boolalpha << true << " / " << false << endl; - -``` - -The lines above produce the following output: - - -``` - - -Boolean output without using boolalpha: 1 / 0 -Boolean output using boolalpha: true / false - -``` - -#### Addresses - -If the value of an integer should be treated as an address, it is sufficient to cast it to _void*_ in order to invoke the correct overload. Here is an example: - - -``` - - -unsigned long someAddress = 0x0000ABCD; -cout << "Treat as unsigned long: " << someAddress << endl; -cout << "Treat as address: " << (void*)someAddress << endl; - -``` - -The code produces the following output: - - -``` - - -Treat as unsigned long: 43981 -Treat as address: 0000ABCD - -``` - -The code prints the address with the correct length. A 32-bit executable produced the above output. - -#### Integers - -Printing integers is straightforward. For demonstration purpose I specify the base of the number using setf and setiosflags. Applying the stream modifiers hex/oct would have the same effect: - - -``` - - -int myInt = 123; - -cout << "Decimal: " << myInt << endl; - -cout.setf(ios::hex, ios::basefield); -cout << "Hexadecimal: " << myInt << endl; - -cout << "Octal: " << resetiosflags(ios::basefield) <<  setiosflags(ios::oct) << myInt << endl; - -``` - -**Note:** There is no indicator for the used base by default, but you can add one using showbase. - - -``` - - -Decimal: 123 -Hexadecimal: 7b -Octal: 173 - -``` - -#### Padding with zeros - - -``` - - -0000003 -0000035 -0000357 -0003579 - -``` - -You can get an output like the above by specifying the width and the fill character: - - -``` - - -cout << setfill('0') << setw(7) << 3 << endl; -cout << setfill('0') << setw(7) << 35 << endl; -cout << setfill('0') << setw(7) << 357 << endl; -cout << setfill('0') << setw(7) << 3579 << endl; - -``` - -#### Floating-point values - -If I want to print floating-point values, I can choose between the _fixed_\- and _scientific_-format. Additionally, I can specify the precision. - - -``` - - -double myFloat = 1234.123456789012345; -int defaultPrecision = cout.precision(); // == 2 - -cout << "Default precision: " << myFloat << endl; -cout.precision(4); -cout << "Modified precision: " << myFloat << endl; -cout.setf(ios::scientific, ios::floatfield); -cout << "Modified precision & scientific format: " << myFloat << endl; -/* back to default */ -cout.precision(defaultPrecision); -cout.setf(ios::fixed, ios::floatfield); -cout << "Default precision & fixed format:  " << myFloat << endl; - -``` - -The code above produces the following output: - - -``` - - -Default precision: 1234.12 -Modified precision: 1234.1235 -Modified precision & scientific format: 1.2341e+03 -Default precision & fixed format:  1234.12 - -``` - -#### Time and Money - -With put_money, you can print currency units in the correct, locale-dependent formatting. This requires that your console can output UTF-8 charset. Note that the variable _specialOffering_ stores the monetary value in cents: - - -``` - - -long double specialOffering = 9995; - -cout.imbue(locale("en_US.UTF-8")); -cout << showbase << put_money(specialOffering) << endl; -cout.imbue(locale("de_DE.UTF-8")); -cout << showbase << put_money(specialOffering) << endl; -cout.imbue(locale("ru_RU.UTF-8")); -cout  << showbase << put_money(specialOffering) << endl; - -``` - -The imbue-method of _ios_ lets you specify a locale. With the command `locale -a`, you can get a list of all available locale identifiers on your system.  - - -``` - - -$99.95 -99,950€ -99,950₽ - -``` - -_(For whatever reason, it prints euro and ruble with three decimal places on my system, which looks strange for me, but maybe this is the official formatting.)_ - -The same principle applies to time output. The function put_time lets you print the time in the corresponding locale format. Additionally, you can specify which parts of a time object get printed. - - -``` - - -time_t now = time(nullptr); -tm localtm = *localtime(&now); - -cout.imbue(locale("en_US.UTF-8")); -cout << "en_US : " << put_time(&localtm, "%c") << endl; -cout.imbue(locale("de_DE.UTF-8")); -cout << "de_DE : " << put_time(&localtm, "%c") << endl; -cout.imbue(locale("ru_RU.UTF-8")); -cout << "ru_RU : " << put_time(&localtm, "%c") << endl; - -``` - -The format specifier _%c_ causes to print a standard date and time string: - - -``` - - -en_US : Tue 02 Nov 2021 07:36:36 AM CET -de_DE : Di 02 Nov 2021 07:36:36 CET -ru_RU : Вт 02 ноя 2021 07:36:36 - -``` - -### Creating custom stream modifiers - -You can also create your own stream. The following code inserts a predefined string when applied to an _ostream_ object: - - -``` - - -ostream& myManipulator(ostream& os) { -    string myStr = ">>>Here I am<<<"; -    os << myStr; -    return os; -} - -``` - -**Another example:** If you have something important to say, like most people on the internet, you could use the following code to insert exclamation marks after your message depending on the level of importance. The level of importance gets passed as an argument: - - -``` - - -struct T_Importance { -     int levelOfSignificance; -}; - -T_Importance importance(int lvl){ -    T_Importance x = {.levelOfSignificance = lvl }; -    return x; -} - -ostream& operator<<(ostream& __os, T_Importance t){ - -    for(int i = 0; i < t.levelOfSignificance; ++i){ -        __os.put('!'); -    } -    return __os; -} - -``` - -Both modifiers can now be simply passed to _cout_: - - -``` - - -cout << "My custom manipulator: " << myManipulator << endl; - -cout << "I have something important to say" << importance(5) << endl; - -``` - -Producing the following output: - - -``` - - -My custom manipulator: >>>Here I am<<< - -I have something important to say!!!!! - -``` - -### Conclusion - -Next time you struggle with console output formatting, I hope you remember this article or the related [cheat sheet][2]. - -In C++ applications, _cout_ is the new neighbor of [printf][8]. While using _printf_ is still valid, I would probably always prefer using _cout_. Especially the combination with the modifying function defined in _<ios>_ results in nice, readable code. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/11/c-stdcout-cheat-sheet - -作者:[Stephan Avenwedde][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/hansic99 -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_women_computing_2.png?itok=JPlR5aCA (Woman sitting in front of her computer) -[2]: https://opensource.com/downloads/cout-cheat-sheet -[3]: https://github.com/hANSIc99/cpp_output_formatting -[4]: https://en.cppreference.com/w/cpp/io/cout -[5]: https://en.cppreference.com/w/cpp/io/basic_ostream -[6]: https://en.cppreference.com/w/cpp/io -[7]: https://en.cppreference.com/w/cpp/io/basic_ostream/operator_ltlt -[8]: https://opensource.com/article/20/8/printf diff --git a/translated/tech/20211125 Tips for formatting when printing to console from C.md b/translated/tech/20211125 Tips for formatting when printing to console from C.md new file mode 100644 index 0000000000..8988a00618 --- /dev/null +++ b/translated/tech/20211125 Tips for formatting when printing to console from C.md @@ -0,0 +1,326 @@ +[#]: subject: "Tips for formatting when printing to console from C++" +[#]: via: "https://opensource.com/article/21/11/c-stdcout-cheat-sheet" +[#]: author: "Stephan Avenwedde https://opensource.com/users/hansic99" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: " " +[#]: url: " " + +C++ 控制台格式化打印技巧 +====== + +> 下次当你为控制台输出的格式而苦恼时,请参考这篇文章及其速查表。 + +![](https://img.linux.net.cn/data/attachment/album/202111/28/100548utbax4o4ttwcgyjz.jpg) + +我写文章主要是为了给自己写文档。我在编程时非常健忘,所以我经常会写下有用的代码片段、特殊的特性,以及我使用的编程语言中的常见错误。这篇文章完全切合我最初的想法,因为它涵盖了从 C++ 控制台格式化打印时的常见用例。 + +像往常一样,这篇文章带有大量的例子。除非另有说明,代码片段中显示的所有类型和类都是 `std` 命名空间的一部分。所以当你阅读这段代码时,你必须在类型和类的前面加上`using namespace std;`。当然,该示例代码也可以在 [GitHub][3] 上找到。 + +### 面向对象的流 + +如果你曾经用过 C++ 编程,你肯定使用过 [cout][4]。当你包含 `` 时,[ostream][5] 类型的 `cout` 对象就进入了作用域。这篇文章的重点是 `cout`,它可以让你打印到控制台,但这里描述的一般格式化对所有 [ostream][5] 类型的流对象都有效。`ostream` 对象是 `basic_ostream` 的一个实例,其模板参数为 `char` 类型。头文件 `` 是 `` 的包含层次结构的一部分,包含了常见类型的前向声明。 + +类 `basic_ostream` 继承于 `basic_ios`,该类型又继承于 `ios_base`。在 [cppreference.com][6] 上你可以找到一个显示不同类之间关系的类图。 + +`ios_base` 类是所有 I/O 流类的基类。`basic_ios` 类是一个模板类,它对常见的字符类型进行了模板特化specialization,称为 `ios`。因此,当你在标准 I/O 的上下文中读到 `ios` 时,它是 `basic_ios` 的 `char` 类型的模板特化。 + +### 格式化流 + +一般来说,基于 `ostream` 的流有三种格式化的方法。 + + 1. 使用 `ios_base` 提供的格式标志。 + 2. 在头文件 `` 和 `` 中定义的流修改函数。 + 3. 通过调用 `<<` 操作符的 [特定重载][7]。 + +所有这些方法都有其优点和缺点,通常取决于使用哪种方法的情况。下面显示的例子混合使用所有这些方法。 + +#### 右对齐 + +默认情况下,`cout` 占用的空间与要打印的数据所需的空间一样大。为了使这种右对齐的输出生效,你必须定义一个行允许占用的最大宽度。我使用格式标志来达到这个目的。 + +右对齐输出的标志和宽度调整只适用于其后的行。 + +``` +cout.setf(ios::right, ios::adjustfield); +cout.width(50); +cout << "This text is right justified" << endl; +cout << "This text is left justified again" << endl; +``` + +在上面的代码中,我使用 `setf` 配置了右对齐的输出。我建议你将位掩码 `ios::adjustfield` 应用于 `setf`,这将使位掩码指定的所有标志在实际的 `ios::right` 标志被设置之前被重置,以防止发生组合碰撞。 + +#### 填充空白 + +当使用右对齐输出时,默认情况下,空的地方会用空白字符填充。你可以通过使用 `setfill` 指定填充字符来改变它: + +``` +cout << right << setfill('.') << setw(30) << 500 << " pcs" << endl; +cout << right << setfill('.') << setw(30) << 3000 << " pcs" << endl; +cout << right << setfill('.') << setw(30) << 24500 << " pcs" << endl; +``` + +代码输出如下: + +``` +...........................500 pcs +..........................3000 pcs +.........................24500 pcs +``` + +#### 组合  + +想象一下,你的 C++ 程序记录了你的储藏室库存。不时地,你想打印一份当前库存的清单。要做到这一点,你可以使用以下格式。 + +下面的代码是左对齐和右对齐输出的组合,使用点作为填充字符,可以得到一个漂亮的列表: + +``` +cout << left << setfill('.') << setw(20) << "Flour" << right << setfill('.') << setw(20) << 0.7 << " kg" << endl; +cout << left << setfill('.') << setw(20) << "Honey" << right << setfill('.') << setw(20) << 2 << " Glasses" << endl; +cout << left << setfill('.') << setw(20) << "Noodles" << right << setfill('.') << setw(20) << 800 << " g" << endl; +cout << left << setfill('.') << setw(20) << "Beer" << right << setfill('.') << setw(20) << 20 << " Bottles" << endl; +``` + +输出: + +``` +Flour...............................0.70 kg +Honey..................................2 Glasses +Noodles..............................800 g +Beer..................................20 Bottles +``` + +### 打印数值 + +当然,基于流的输出也能让你输出各种变量类型。 + +#### 布尔型 + +`boolalpha` 开关可以让你把布尔型的二进制解释转换为字符串: + +``` +Flour...............................0.70 kg +Honey..................................2 Glasses +Noodles..............................800 g +Beer..................................20 Bottles +``` + +以上几行产生的输出结果如下: + +``` +Boolean output without using boolalpha: 1 / 0 +Boolean output using boolalpha: true / false +``` + +#### 地址 + +如果一个整数的值应该被看作是一个地址,那么只需要把它投到 `void*` 就可以了,以便调用正确的重载。下面是一个例子: + +``` +cout << "Boolean output without using boolalpha: " << true << " / " << false << endl; +cout << "Boolean output using boolalpha: " << boolalpha << true << " / " << false << endl; +``` + +该代码产生了以下输出: + +``` +Treat as unsigned long: 43981 +Treat as address: 0000ABCD +``` + +该代码打印出了具有正确长度的地址。一个 32 位的可执行文件产生了上述输出。 + +#### 整数 + +打印整数是很简单的。为了演示,我使用 `setf` 和 `setiosflags` 来指定数字的基数。应用流修改器 `hex`/`oct` 也有同样的效果。 + +``` +int myInt = 123; + +cout << "Decimal: " << myInt << endl; + +cout.setf(ios::hex, ios::basefield); +cout << "Hexadecimal: " << myInt << endl; + +cout << "Octal: " << resetiosflags(ios::basefield) << setiosflags(ios::oct) << myInt << endl; +``` + +**注意:** 默认情况下,没有指示所使用的基数,但你可以使用 `showbase` 添加一个。 + +``` +Decimal: 123 +Hexadecimal: 7b +Octal: 173 +``` + +#### 用零填充 + +``` +0000003 +0000035 +0000357 +0003579 +``` + +你可以通过指定宽度和填充字符得到类似上述的输出: + +``` +cout << setfill('0') << setw(7) << 3 << endl; +cout << setfill('0') << setw(7) << 35 << endl; +cout << setfill('0') << setw(7) << 357 << endl; +cout << setfill('0') << setw(7) << 3579 << endl; +``` + +#### 浮点值 + +如果我想打印浮点数值,我可以选择“固定”和“科学”格式。此外,我还可以指定精度: + +``` +double myFloat = 1234.123456789012345; +int defaultPrecision = cout.precision(); // == 2 + +cout << "Default precision: " << myFloat << endl; +cout.precision(4); +cout << "Modified precision: " << myFloat << endl; +cout.setf(ios::scientific, ios::floatfield); +cout << "Modified precision & scientific format: " << myFloat << endl; +/* back to default */ +cout.precision(defaultPrecision); +cout.setf(ios::fixed, ios::floatfield); +cout << "Default precision & fixed format: " << myFloat << endl; +``` + +上面的代码产生以下输出: + +``` +Default precision: 1234.12 +Modified precision: 1234.1235 +Modified precision & scientific format: 1.2341e+03 +Default precision & fixed format: 1234.12 +``` + +#### 时间和金钱 + +通过 `put_money`,你可以用正确的、与当地有关的格式来打印货币单位。这需要你的控制台能够输出 UTF-8 字符集。请注意,变量 `specialOffering` 以美分为单位存储货币价值。 + +``` +long double specialOffering = 9995; + +cout.imbue(locale("en_US.UTF-8")); +cout << showbase << put_money(specialOffering) << endl; +cout.imbue(locale("de_DE.UTF-8")); +cout << showbase << put_money(specialOffering) << endl; +cout.imbue(locale("ru_RU.UTF-8")); +cout << showbase << put_money(specialOffering) << endl; +``` + +`ios` 的 `imbue` 方法让你指定一个地区。通过命令 `locale -a`,你可以得到你系统中所有可用的地区标识符的列表。  + +``` +$99.95 +99,950€ +99,950₽ +``` + +(不知道出于什么原因,在我的系统上,它打印的欧元和卢布有三个小数位,对我来说看起来很奇怪,但这也许是官方的格式。) + +同样的原则也适用于时间输出。函数 `put_time` 可以让你以相应的地区格式打印时间。此外,你可以指定时间对象的哪些部分被打印出来。 + +``` +time_t now = time(nullptr); +tm localtm = *localtime(&now); + + +cout.imbue(locale("en_US.UTF-8")); +cout << "en_US : " << put_time(&localtm, "%c") << endl; +cout.imbue(locale("de_DE.UTF-8")); +cout << "de_DE : " << put_time(&localtm, "%c") << endl; +cout.imbue(locale("ru_RU.UTF-8")); +cout << "ru_RU : " << put_time(&localtm, "%c") << endl; +``` + +格式指定符 `%c` 会打印一个标准的日期和时间字符串: + +``` +en_US : Tue 02 Nov 2021 07:36:36 AM CET +de_DE : Di 02 Nov 2021 07:36:36 CET +ru_RU : Вт 02 ноя 2021 07:36:36 +``` + +### 创建自定义的流修改器 + +你也可以创建你自己的流。下面的代码在应用于 `ostream` 对象时插入了一个预定义的字符串: + +``` +ostream& myManipulator(ostream& os) { + string myStr = ">>>Here I am<<<"; + os << myStr; + return os; +} +``` + +**另一个例子:** 如果你有重要的事情要说,就像互联网上的大多数人一样,你可以使用下面的代码在你的信息后面根据重要程度插入感叹号。重要程度被作为一个参数传递: + +``` +struct T_Importance { + int levelOfSignificance; +}; + +T_Importance importance(int lvl){ + T_Importance x = {.levelOfSignificance = lvl }; + return x; +} + +ostream& operator<<(ostream& __os, T_Importance t){ + + for(int i = 0; i < t.levelOfSignificance; ++i){ + __os.put('!'); + } + return __os; +} +``` + +这两个修饰符现在都可以简单地传递给 `cout`: + +``` +cout << "My custom manipulator: " << myManipulator << endl; + +cout << "I have something important to say" << importance(5) << endl; +``` + +产生以下输出: + +``` +My custom manipulator: >>>Here I am<<< + +I have something important to say!!!!! +``` + +### 结语 + +下次你再纠结于控制台输出格式时,我希望你记得这篇文章及其 [速查表][2]。 + +在 C++ 应用程序中,`cout` 是 [printf][8] 的新邻居。虽然使用 `printf` 仍然有效,但我可能总是喜欢使用 `cout`。特别是与定义在 `` 中的修改函数相结合,会产生漂亮的、可读的代码。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/11/c-stdcout-cheat-sheet + +作者:[Stephan Avenwedde][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/hansic99 +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_women_computing_2.png?itok=JPlR5aCA (Woman sitting in front of her computer) +[2]: https://opensource.com/downloads/cout-cheat-sheet +[3]: https://github.com/hANSIc99/cpp_output_formatting +[4]: https://en.cppreference.com/w/cpp/io/cout +[5]: https://en.cppreference.com/w/cpp/io/basic_ostream +[6]: https://en.cppreference.com/w/cpp/io +[7]: https://en.cppreference.com/w/cpp/io/basic_ostream/operator_ltlt +[8]: https://opensource.com/article/20/8/printf From 7b65e6865a502f57cb9d31d5db7e99a7068542f8 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 28 Nov 2021 10:09:35 +0800 Subject: [PATCH 030/244] PUB @wxy https://linux.cn/article-14027-1.html --- ...125 Tips for formatting when printing to console from C.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20211125 Tips for formatting when printing to console from C.md (99%) diff --git a/translated/tech/20211125 Tips for formatting when printing to console from C.md b/published/20211125 Tips for formatting when printing to console from C.md similarity index 99% rename from translated/tech/20211125 Tips for formatting when printing to console from C.md rename to published/20211125 Tips for formatting when printing to console from C.md index 8988a00618..6b7547fc8e 100644 --- a/translated/tech/20211125 Tips for formatting when printing to console from C.md +++ b/published/20211125 Tips for formatting when printing to console from C.md @@ -4,8 +4,8 @@ [#]: collector: "lujun9972" [#]: translator: "wxy" [#]: reviewer: "wxy" -[#]: publisher: " " -[#]: url: " " +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14027-1.html" C++ 控制台格式化打印技巧 ====== From a6598a024a201c10534407770c4bffa6396ab7a4 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 28 Nov 2021 10:25:27 +0800 Subject: [PATCH 031/244] PRF&PUB @geekpi https://linux.cn/article-14028-1.html --- ...ave Browser on Fedora, Red Hat - CentOS.md | 44 ++++++++----------- 1 file changed, 18 insertions(+), 26 deletions(-) rename {translated/tech => published}/20211119 How to Install Brave Browser on Fedora, Red Hat - CentOS.md (70%) diff --git a/translated/tech/20211119 How to Install Brave Browser on Fedora, Red Hat - CentOS.md b/published/20211119 How to Install Brave Browser on Fedora, Red Hat - CentOS.md similarity index 70% rename from translated/tech/20211119 How to Install Brave Browser on Fedora, Red Hat - CentOS.md rename to published/20211119 How to Install Brave Browser on Fedora, Red Hat - CentOS.md index 8e61ae0aad..54e00211bd 100644 --- a/translated/tech/20211119 How to Install Brave Browser on Fedora, Red Hat - CentOS.md +++ b/published/20211119 How to Install Brave Browser on Fedora, Red Hat - CentOS.md @@ -3,14 +3,16 @@ [#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" [#]: collector: "lujun9972" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14028-1.html" -如何在 Fedora、Red Hat 和 CentOS 上安装 Brave 浏览器 +如何在 Fedora Linux 上安装 Brave 浏览器 ====== -[Brave][1] 是一个越来越[流行于 Linux][2] 和其他操作系统的网络浏览器。对默认情况下阻止广告和跟踪的关注,以及对 Chrome 扩展的支持,使 Brave 成为 Linux 用户的热门选择。 +![](https://img.linux.net.cn/data/attachment/album/202111/28/102349idh316xz3bslr6ps.jpg) + +[Brave][1] 是一个越来越 [流行于 Linux][2] 和其他操作系统的网页浏览器。对默认情况下阻止广告和跟踪的关注,以及对 Chrome 扩展的支持,使 Brave 成为 Linux 用户的热门选择。 在本教程中,你将学习如何在 Fedora Linux 上安装 Brave。你还将学习如何更新和删除它。 @@ -20,28 +22,22 @@ 你需要在这里用命令行的方式来安装 Brave。 -作为先决条件,请确保 dnf-plugin-core 已经安装。 +作为先决条件,请确保 `dnf-plugin-core` 已经安装。 ``` - - sudo dnf install dnf-plugins-core - +sudo dnf install dnf-plugins-core ``` 下一步是将 Brave 仓库添加到你的系统中: ``` - - sudo dnf config-manager --add-repo https://brave-browser-rpm-release.s3.brave.com/x86_64/ - +sudo dnf config-manager --add-repo https://brave-browser-rpm-release.s3.brave.com/x86_64/ ``` 你还应该导入并添加仓库密钥,这样你的系统就会信任来自这个新添加的仓库的软件包: ``` - - sudo rpm --import https://brave-browser-rpm-release.s3.brave.com/brave-core.asc - +sudo rpm --import https://brave-browser-rpm-release.s3.brave.com/brave-core.asc ``` ![Adding Brave Browser repository in Fedora Linux][3] @@ -49,12 +45,10 @@ 现在可以开始了。用这个命令安装 Brave: ``` - - sudo dnf install brave-browser - +sudo dnf install brave-browser ``` -**当被要求确认你的选择时按 Y**。根据你的网速,这应该需要几秒钟或几分钟的时间。如果 DNF 的缓存最近没有更新,甚至可能需要更长时间。 +**当被要求确认你的选择时按 `Y`**。根据你的网速,这应该需要几秒钟或几分钟的时间。如果 DNF 的缓存最近没有更新,甚至可能需要更长时间。 ![Installing Brave Browser in Fedora][4] @@ -74,19 +68,17 @@ ![Brave Browser in Fedora Linux][6] -如果你因为某些原因不喜欢 Brave,你可以从你的系统中删除它。只需使用 dnf remove 命令: +如果你因为某些原因不喜欢 Brave,你可以从你的系统中删除它。只需使用 `dnf remove` 命令: ``` - - sudo dnf remove brave-browser - +sudo dnf remove brave-browser ``` -当询问时按 Y: +当询问时按 `Y`: ![Removing Brave browser from Fedora Linux][7] -你也可以选择禁用 brave-browser-rpm-release.s3.brave.com_x86_64_.repo 或者从 /etc/yum/repos.d 中完全删除这个文件,虽然这并不是必须的。 +你也可以选择禁用 `brave-browser-rpm-release.s3.brave.com_x86_64_.repo` 或者从 `/etc/yum/repos.d` 中完全删除这个文件,虽然这并不是必须的。 我希望这个快速提示对你有帮助。如果你有任何问题或建议,请让我知道。 @@ -97,7 +89,7 @@ via: https://itsfoss.com/install-brave-browser-fedora/ 作者:[Abhishek Prakash][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 3f6ad660e3f77405b31a999647de56716d29076c Mon Sep 17 00:00:00 2001 From: DarkSun Date: Mon, 29 Nov 2021 05:02:33 +0800 Subject: [PATCH 032/244] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211129=20?= =?UTF-8?q?How=20to=20Install=20Apache=20Cassandra=20on=20Ubuntu=20and=20O?= =?UTF-8?q?ther=20Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211129 How to Install Apache Cassandra on Ubuntu and Other Linux.md --- ...che Cassandra on Ubuntu and Other Linux.md | 179 ++++++++++++++++++ 1 file changed, 179 insertions(+) create mode 100644 sources/tech/20211129 How to Install Apache Cassandra on Ubuntu and Other Linux.md diff --git a/sources/tech/20211129 How to Install Apache Cassandra on Ubuntu and Other Linux.md b/sources/tech/20211129 How to Install Apache Cassandra on Ubuntu and Other Linux.md new file mode 100644 index 0000000000..8d0f2497a8 --- /dev/null +++ b/sources/tech/20211129 How to Install Apache Cassandra on Ubuntu and Other Linux.md @@ -0,0 +1,179 @@ +[#]: subject: "How to Install Apache Cassandra on Ubuntu and Other Linux" +[#]: via: "https://itsfoss.com/apache-cassandra-ubuntu/" +[#]: author: "Marco Carmona https://itsfoss.com/author/marco/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +How to Install Apache Cassandra on Ubuntu and Other Linux +====== + +[Apache Cassandra][1] is a free and open-source NoSQL database management system drawn to manipulate large amounts of information across many servers, providing high availability with no single point of failure. + +I am not going into the details of NoSQL database. I am going to so you how you can install Apache Cassandra on Ubuntu based Linux distributions. + +Please note that it is more for practicing + +### Installing Apache Cassandra on Linux + +There are multiple ways you can install Cassandra on Ubuntu and other Linux distributions: + + * Install it using the official deb repositories from Apache: suitable and recommended for Debian and Ubuntu-based distributions. Gets automatic update if a newer version is available. + * Install it using Docker: works for all Linux distributions + * Install it from the tarball: works with all Linux but it won’t get updated to a new version automatically. + + + +This is merely for practicing and experiencing Apache Cassandra. If you are going to use it in a project with other services, you’ll have to follow the complete configuration and setting guide of that service. + +I’ll show the first two methods. + +#### Method 1: Install Cassandra on Ubuntu and Debian using the official repository + +Before you could install and use Cassandra, you need to have Python and Java installed on your system. You may have to [install Java on Ubuntu][2] however Python usually comes preinstalled. + +You can check the prerequisite with the next line: + +``` + + java -version && python --version + +``` + +All prerequisite well installed? That’s good. Let’s install Cassandra. The method here is the same as [adding any external repository in Ubuntu][3]. + +First, add the Apache Cassandra repository to your sources list. This one adds the latest major version (at the time of writing it) 4.0 series. + +``` + + echo "deb http://www.apache.org/dist/cassandra/debian 40x main" | sudo tee -a /etc/apt/sources.list.d/cassandra.sources.list + +``` + +![Add Apache Cassandra repository][4] + +Now, download and add the Apache Cassandra repository keys to the list of trusted keys on the server. This way, your system will trust the packages coming from the repository you added in the previous step. + +You should make sure that apt can be used over https. + +``` + + sudo apt install apt-transport-https + +``` + +And then add the key: + +``` + + wget https://www.apache.org/dist/cassandra/KEYS && sudo apt-key add KEYS + +``` + +![Add Apache Cassandra repository key][5] + +You have added the repository. Update the local cache so that your system is aware of the presence of this new repository. + +``` + + sudo apt update + +``` + +And lastly, install Cassandra with the following command: + +``` + + sudo apt install cassandra + +``` + +![Installing Apache Cassandra on Ubuntu][6] + +Once the installation finishes, Cassandra service starts running automatically. You could still verify it if you want: + +``` + + sudo systemctl status cassandra.service + +``` + +![Check if Cassandra is running][7] + +You can connect to the database by typing cqlsh. Type exit to exit this shell. + +![Entering cqlsh][8] + +This was the very basic and default set up. You’ll probably need to configure it based on your requirement. Please the [official document for the configuration part][9]. + +#### Method 2: Install Apache Cassandra using Docker + +This method will work with any Linux distribution as long as you are going to use it in a Docker setup. + +Of course, you need to have Docker installed on your system for this method. That’s a prerequisite for this method and I let you handle that. + +If you have Docker, use the command below to pull the docker image of Apache Cassandra. + +``` + + sudo docker pull cassandra:latest + +``` + +![Pulling Apache Cassandra docker image][10] + +Once that’s done, you can start Cassandra with the [docker run command][11] like this: + +``` + + sudo docker run --name cass_cluster cassandra:latest + +``` + +![Running Cassandra in a container][12] + +**Note:** the `--name` option will be the name of the Cassandra cluster created. + +To interact with the Cassandra node started before, you need to initialize the CQL shell, and you can do it with the Docker exec command like this: + +``` + + sudo docker exec -it cass_cluster cqlsh + +``` + +![Access the cqlsh running in Docker.][13] + +_**Congrats!**_ Now you know at least two different ways to install Apache Cassandra in your system. + +Please keep in mind that this post is only an introduction. If you are interested in knowing more about Apache Cassandra, read the [documentation][14] where you can find out more about this amazing NoSQL database management system. **Enjoy it and share this post if it was interesting and helpful for you! See you in the next one.** + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/apache-cassandra-ubuntu/ + +作者:[Marco Carmona][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/marco/ +[b]: https://github.com/lujun9972 +[1]: https://cassandra.apache.org/_/index.html +[2]: https://itsfoss.com/install-java-ubuntu/ +[3]: https://itsfoss.com/adding-external-repositories-ubuntu/ +[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/Installing_the_Debian_packages_step_1.png?resize=800%2C123&ssl=1 +[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/Installing_the_Debian_packages_step_2.png?resize=800%2C490&ssl=1 +[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/Installing_the_Debian_packages_step_3.png?resize=800%2C490&ssl=1 +[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/verify-cassandra.png?resize=800%2C443&ssl=1 +[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/Installing_the_Debian_packages_step_4.png?resize=800%2C164&ssl=1 +[9]: https://cassandra.apache.org/doc/latest/cassandra/getting_started/configuring.html +[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/Using_Docker_images_step_2.png?resize=800%2C275&ssl=1 +[11]: https://linuxhandbook.com/docker-run-vs-start-vs-create/ +[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/Using_Docker_images_step_3.png?resize=800%2C490&ssl=1 +[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/Using_Docker_images_step_4.png?resize=800%2C225&ssl=1 +[14]: https://cassandra.apache.org/doc/latest/index.html From 7733624cd3c8c1791e0cc41014c6b61319090c58 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Mon, 29 Nov 2021 05:02:47 +0800 Subject: [PATCH 033/244] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211128=20?= =?UTF-8?q?Install=20apps=20on=20Linux=20with=20Flatpak?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211128 Install apps on Linux with Flatpak.md --- ...1128 Install apps on Linux with Flatpak.md | 119 ++++++++++++++++++ 1 file changed, 119 insertions(+) create mode 100644 sources/tech/20211128 Install apps on Linux with Flatpak.md diff --git a/sources/tech/20211128 Install apps on Linux with Flatpak.md b/sources/tech/20211128 Install apps on Linux with Flatpak.md new file mode 100644 index 0000000000..8b1169babb --- /dev/null +++ b/sources/tech/20211128 Install apps on Linux with Flatpak.md @@ -0,0 +1,119 @@ +[#]: subject: "Install apps on Linux with Flatpak" +[#]: via: "https://opensource.com/article/21/11/install-flatpak-linux" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Install apps on Linux with Flatpak +====== +Flatpak simplifies the installation of applications on Linux. +![Flatpak][1] + +Computer applications consist of many small files that are linked together to perform a set of tasks. Because they get presented as "apps," colorful icons in the menu or on a desktop, most of us think of applications as a single, almost tangible thing. And in a way, it's comforting to think of them that way because they feel manageable that way. If an application is actually the amalgamation of hundreds of little library and asset files scattered throughout your computer, where's the application? And existential crisis aside, what happens when one application needs one version of a library while another application demands a different version?  + +In the world of cloud computing, [containers][2] are becoming more and more popular because they offer isolation and consolidation for applications. You can install all the files an application needs in a "container." That way, its libraries stay out of the way of other applications, and the memory it occupies doesn't leak data into the memory space of another. Everything ends up feeling very much like a single, almost tangible _thing_. On the Linux desktop, Flatpak, a cross-distribution, daemon-less, decentralized application delivery system, provides a similar technology. + +### Install Flatpak on Linux + +Your Linux system may already have Flatpak installed. If not, you can install it from your package manager: + +On Fedora, Mageia, and similar distributions: + + +``` +`$ sudo dnf install flatpak` +``` + +On Elementary, Mint, and other Debian-based distributions: + + +``` +`$ sudo apt install flatpak` +``` + +On Slackware, Flatpak is available from [SlackBuilds.org][3]. + +### Select a Flatpak repo + +You can install an application as a Flatpak by adding a Flatpak repository to your distribution's software center (such as **Software** on GNOME). Flatpak is a decentralized system, meaning anyone developing software can host their own repository. Still, in practice, [Flathub][4] is the biggest and most popular aggregation of applications in the Flatpak format. To add Flathub to **GNOME Software** or **KDE Discover**, navigate to flatpak.org/setup and find the instructions for your distribution and start with step #2, or just download the [Flatpakrepo][5] file. Depending on your network, it may take a few minutes for your software center to synchronize with Flathub or another Flatpak repository. Flathub has a lot of software, but there's no limit to how many Flatpak repositories you have on your system, so don't be afraid to add a new repository if you find one that has the software you want to try. + +![Software Repositories][6] + +(Seth Kenlon, [CC BY-SA 4.0][7]) + +If you prefer to work in the terminal, you can add repositories directly with the `flatpak` command: + + +``` + + +$ flatpak remote-add --if-not-exists flathub \ + + +``` + +### Install an application + +As long as you've added a Flatpak repository to your software center, you can browse through applications as usual. + +![GNOME Software][8] + +(Seth Kenlon, [CC BY-SA 4.0][7]) + +Click on an application that looks appealing, read up on it, and click the **Install** button when you're ready. + +### Installing flatpaks in the terminal + +If you prefer to work in the terminal, you can treat Flatpak as a dedicated package manager. You can search for an application using the `flatpak search` command: + + +``` + + +$ flatpak search paint +Name        Description                         Application ID +CorePaint   A simple painting tool              org.cubocore.CorePaint +Pinta       Edit images and paint digitally     com.github.PintaProject.Pinta +Glimpse     Create images and edit photographs  org.glimpse_editor.Glimpse +Tux Paint   A drawing program for children      org.tuxpaint.Tuxpaint +Krita       Digital Painting, Creative Freedom  org.kde.krita + +``` + +Install with `flatpak install`: + + +``` +`$ flatpak install krita` +``` + +Once installed, applications appear in your application menu or Activities screen along with all the other applications on your system. + +### Apps made easy + +Flatpak makes installing applications easy for the user by eliminating version conflicts. They make distributing software easy for developers by targeting just one package format on either a self-hosted platform or a communal one like Flathub. I use Flatpaks on Fedora Silverblue, CentOS, and Slackware, and I can't quite imagine life without it now. Try Flatpak for your next app install! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/11/install-flatpak-linux + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/flatpak-lead-image_0.png?itok=URbhdsDQ (Flatpak) +[2]: https://opensource.com/article/21/7/linux-podman +[3]: http://slackbuilds.org +[4]: http://flathub.org +[5]: https://flathub.org/repo/flathub.flatpakrepo +[6]: https://opensource.com/sites/default/files/uploads/repo.jpg (Software Repositories) +[7]: https://creativecommons.org/licenses/by-sa/4.0/ +[8]: https://opensource.com/sites/default/files/uploads/software.jpg (GNOME Software) From b6f8cdecb7353a4ef99d3bde263d187d873062cf Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 29 Nov 2021 08:48:33 +0800 Subject: [PATCH 034/244] translated --- ...source ways to create holiday greetings.md | 107 ------------------ ...source ways to create holiday greetings.md | 104 +++++++++++++++++ 2 files changed, 104 insertions(+), 107 deletions(-) delete mode 100644 sources/tech/20211121 4 open source ways to create holiday greetings.md create mode 100644 translated/tech/20211121 4 open source ways to create holiday greetings.md diff --git a/sources/tech/20211121 4 open source ways to create holiday greetings.md b/sources/tech/20211121 4 open source ways to create holiday greetings.md deleted file mode 100644 index c073eb80b6..0000000000 --- a/sources/tech/20211121 4 open source ways to create holiday greetings.md +++ /dev/null @@ -1,107 +0,0 @@ -[#]: subject: "4 open source ways to create holiday greetings" -[#]: via: "https://opensource.com/article/21/11/open-source-holiday-greetings" -[#]: author: "Don Watkins https://opensource.com/users/don-watkins" -[#]: collector: "lujun9972" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -4 open source ways to create holiday greetings -====== -Open source tools and resources provide creative possibilities for any -holiday. -![Painting art on a computer screen][1] - -The holiday season is upon us once again, and this year I decided to celebrate in an [open source way][2]. Like a particular famous holiday busybody, I have a long list (and I do intend to check it twice) of holiday tasks: create a greeting card (with addressed envelopers) to send to family and friends, make a photo montage or video to a suitably festive song, and decorate my virtual office. There are plenty of open source applications and resources making my job easier. Here's what I use. - -### Inkscape and clip art - -One of my favorite resources is [FreeSVG.org][3] (formerly Openclipart.org). It's easy to find your favorite holiday, including Hanukkah, Christmas, New Year's, and more. The clip art is all contributed by users like you and me, and Creative Commons Zero (CC0), so you don't even need to provide attribution. When possible, I still do give attribution, to ensure that FreeSVG and its artists get visibility. - -Here's an example of some clip art from FreeSVG: - -![A cartoon of a brown cornucopia with red apples, an orange pumpkin, and brown nuts spilling out][4] - -openclipart.com, [CC0 1.0][5] - -Using [Inkscape's][6] Text to Path tool, I added my own text to the image, which I used on a card. With a little more preparation, I could also use the graphic on some custom cups or placemats. - -![A cartoon of a brown cornucopia with red apples, an orange pumpkin, and brown nuts spilling out, with the words "We Give Thanks" in an arch over the top][7] - -Don Watkins, [CC BY-SA 4.0][8] - -### Word processing - -[LibreOffice][9] Writer can be used to create greeting cards and posters for use around your home or distributing to your friends and family. Create a database of your family and friends using LibreOffice Calc and then use that resource to simplify making mailing labels with the mail merge function. - -### Creative Commons pictures and graphics - -There's also art on [search.creativecommons.org][10]. Mind the license type: give proper credit to anything requiring attribution. This image (["Thanksgiving Dealies"][11]) came from the Creative Commons image search. It's by [Martin Cathrae][12] and is licensed under [CC BY-SA 2.0][13], so it can be adapted, reused, and shared under the same license. - -![A candlelight centerpiece using pumpkin shells as flower holders for small red and yellow floral bouquets.][14] - -[Martin Cathrae,][12] [CC BY-SA 2.0][13] - -I took this same image and added some of my own text to it with [GIMP][15]. You can use Inkscape to do the same thing.  - -![A candlelight centerpiece using pumpkin shells as flower holders for small red and yellow floral bouquets, with the words "Happy Holidays" at the top left of the image][16] - -Don Watkins, [CC BY-SA 4.0][17] - -Creative Commons offers plenty of image options that would make for a festive background during your next [video conference][18]. - -### Videos and live streaming - -You can also incorporate images like these along with some of your own and create a short video clip using [OpenShot][19] video editor. You can easily add narration by recording a separate voice track using Audacity. Sound effects can be added in Audacity, saved to file, and imported into a soundtrack on OpenShot video editor. Find [legal background][20] music to add to your video. - -Livestream your holiday gatherings with [Open Broadcaster Software.][21] It's easy to use OBS to present an engaging holiday show for your friends and family using the software, or you can save the program as a Matroska or MP4 file for later viewing. - -### Reading material - -Project Gutenberg is an excellent source of free holiday reading material to share. [Dickens' Christmas Carol][22] is one such resource that is easily read on the web or downloaded as an EPUB or in a format for your favorite eReader. You can also find royalty-free reading materials, like "The Feast of Lights" from [Librivox][23], in mp3 format so they can be downloaded and played in your favorite browser or media player. - -### Holiday fun - -The most important aspect of the holiday season is that they're relaxing and fun times with friends and family. If you've got family members curious about computers, take a moment to share some of your favorite open source resources with them. - -  - -Anderson Silva shows us how to use a Raspberry Pi and LightshowPi to create a musical light show. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/11/open-source-holiday-greetings - -作者:[Don Watkins][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/don-watkins -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/painting_computer_screen_art_design_creative.png?itok=LVAeQx3_ (Painting art on a computer screen) -[2]: https://opensource.com/open-source-way -[3]: http://freesvg.org -[4]: https://opensource.com/sites/default/files/uploads/cornucopia.png (cornucopia) -[5]: https://creativecommons.org/publicdomain/zero/1.0/ -[6]: https://opensource.com/article/18/1/inkscape-absolute-beginners -[7]: https://opensource.com/sites/default/files/uploads/cornucopia_with_text.png (We Give Thanks) -[8]: https://creativecommons.org/licenses/by-sa/4.0/ -[9]: https://opensource.com/article/21/9/libreoffice-tips -[10]: https://search.creativecommons.org/ -[11]: https://www.flickr.com/photos/34067077@N00/4014605524 -[12]: https://www.flickr.com/photos/34067077@N00 -[13]: https://creativecommons.org/licenses/by-sa/2.0/?ref=ccsearch&atype=rich -[14]: https://opensource.com/sites/default/files/uploads/fall_table.png (Holiday table) -[15]: https://opensource.com/content/cheat-sheet-gimp -[16]: https://opensource.com/sites/default/files/uploads/fall_table_with_text.png (Happy Holidays) -[17]: https://creativecommons.org/licenses/by/4.0/ -[18]: https://opensource.com/article/20/5/open-source-video-conferencing -[19]: https://opensource.com/article/17/5/using-openshot-video-editor -[20]: https://opensource.com/article/20/1/what-creative-commons -[21]: https://opensource.com/article/21/4/obs-youtube -[22]: https://www.gutenberg.org/ebooks/19337 -[23]: https://librivox.org/the-feast-of-lights-by-emma-lazarus/ diff --git a/translated/tech/20211121 4 open source ways to create holiday greetings.md b/translated/tech/20211121 4 open source ways to create holiday greetings.md new file mode 100644 index 0000000000..2bdcaa2015 --- /dev/null +++ b/translated/tech/20211121 4 open source ways to create holiday greetings.md @@ -0,0 +1,104 @@ +[#]: subject: "4 open source ways to create holiday greetings" +[#]: via: "https://opensource.com/article/21/11/open-source-holiday-greetings" +[#]: author: "Don Watkins https://opensource.com/users/don-watkins" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +创建节日问候的 4 种开源方式 +====== +开源工具和资源为任何节日提供了创造性的可能性。 +![Painting art on a computer screen][1] + +节日再次来临,今年我决定用[开源方式][2]来庆祝。就像一个特别有名的假期忙人一样,我有一个长长的节日任务清单(我打算检查两遍):制作一张贺卡(带地址的信封)寄给家人和朋友,用合适的节日歌曲制作照片蒙太奇或视频,并装饰我的虚拟办公室。有很多开源的应用和资源使我的工作更容易。以下是我使用的东西。 + +### Inkscape 和剪贴画 + +我最喜欢的资源之一是 [FreeSVG.org][3](前身是 Openclipart.org)。这里很容易找到你喜欢的节日,包括光明节、圣诞节、新年等等。这些剪贴画都是由像你和我这样的用户贡献的,并且是 CC0 署名,所以你甚至不需要提供署名。在可能的情况下,我还是会注明出处,以确保 FreeSVG 和它的艺术家们获得知名度。 + +下面是 FreeSVG 的一些剪贴画的例子: + +![A cartoon of a brown cornucopia with red apples, an orange pumpkin, and brown nuts spilling out][4] + +openclipart.com, [CC0 1.0][5] + +使用 [Inkscape 的][6] Text to Path 工具,我在图片上添加了我自己的文字,我把它用在卡片上。如果再准备一下,我还可以把这个图形用在一些定制的杯子或餐垫上。 + +![A cartoon of a brown cornucopia with red apples, an orange pumpkin, and brown nuts spilling out, with the words "We Give Thanks" in an arch over the top][7] + +Don Watkins, [CC BY-SA 4.0][8] + +### 文字处理 + +[LibreOffice][9] Writer 可以用来制作贺卡和海报,在你的家中使用或分发给你的朋友和家人。使用 LibreOffice Calc 创建一个关于你的家人和朋友的数据库,然后利用这一资源,用邮件合并功能简化制作邮件标签。 + +### Creative Commons 图片和图形 + +[search.creativecommons.org][10] 上也有艺术品。注意许可证类型:对任何需要归属的东西给予适当的信用。这张图片([“Thanksgiving Dealies”][11])来自知识共享图片搜索。它的作者是 [Martin Cathrae][12],并在 [CC BY-SA 2.0][13] 下获得许可,因此它可以在相同的许可下被改编、重复使用和分享。 + +![A candlelight centerpiece using pumpkin shells as flower holders for small red and yellow floral bouquets.][14] + +[Martin Cathrae][12], [CC BY-SA 2.0][13] + +我拿着这张相同的图片,用 [GIMP][15] 在上面添加了一些我自己的文字。你可以用 Inkscape 来做同样的事情。 + +![A candlelight centerpiece using pumpkin shells as flower holders for small red and yellow floral bouquets, with the words "Happy Holidays" at the top left of the image][16] + +Don Watkins,[CC BY-SA 4.0][17] + +知识共享组织(Creative Commons)提供了大量的图片选择,在你的下一次[视频会议][18]期间,这些图片将成为一个节日背景。 + +### 视频和实时流媒体 + +你也可以把这些图片与你自己的一些图片结合起来,用 [OpenShot][19] 视频编辑器创建一个简短的视频剪辑。你可以通过使用 Audacity 录制一个单独的音轨,轻松地添加旁白。声音效果可以在 Audacity 中添加,保存到文件中,并导入到 OpenShot 视频编辑器的配乐中。寻找[合法的背景][20]音乐来添加到你的视频中。 + +使用[开源广播软件][21]直播你的假期聚会。 使用 OBS 可以轻松地为你的朋友和家人呈现引人入胜的假期节目,或者你可以将节目另存为 Matroska 或 MP4 文件以供日后观看。 + +### 阅读材料 + +古腾堡计划是一个很好的用来分享的免费节日阅读材料的来源。[狄更斯的《圣诞颂歌》][22]就是这样一种资源,它可以在网上轻松阅读,也可以下载成 EPUB 或你最喜欢的电子阅读器的格式。你还可以找到免版税的阅读材料,如 [Librivox][23] 的“光的盛宴”,采用 MP3 格式,因此可以下载并在你喜欢的浏览器或媒体播放器中播放。 + +### 节日乐趣 + +节日里最重要的一点是,它们是与朋友和家人一起的放松和欢乐时光。如果你有家人对计算机感到好奇,花点时间与他们分享一些你最喜欢的开源资源。 + +Anderson Silva 向我们展示了如何使用 Raspberry Pi 和 LightshowPi 来创造一个音乐灯光秀。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/11/open-source-holiday-greetings + +作者:[Don Watkins][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/don-watkins +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/painting_computer_screen_art_design_creative.png?itok=LVAeQx3_ (Painting art on a computer screen) +[2]: https://opensource.com/open-source-way +[3]: http://freesvg.org +[4]: https://opensource.com/sites/default/files/uploads/cornucopia.png (cornucopia) +[5]: https://creativecommons.org/publicdomain/zero/1.0/ +[6]: https://opensource.com/article/18/1/inkscape-absolute-beginners +[7]: https://opensource.com/sites/default/files/uploads/cornucopia_with_text.png (We Give Thanks) +[8]: https://creativecommons.org/licenses/by-sa/4.0/ +[9]: https://opensource.com/article/21/9/libreoffice-tips +[10]: https://search.creativecommons.org/ +[11]: https://www.flickr.com/photos/34067077@N00/4014605524 +[12]: https://www.flickr.com/photos/34067077@N00 +[13]: https://creativecommons.org/licenses/by-sa/2.0/?ref=ccsearch&atype=rich +[14]: https://opensource.com/sites/default/files/uploads/fall_table.png (Holiday table) +[15]: https://opensource.com/content/cheat-sheet-gimp +[16]: https://opensource.com/sites/default/files/uploads/fall_table_with_text.png (Happy Holidays) +[17]: https://creativecommons.org/licenses/by/4.0/ +[18]: https://opensource.com/article/20/5/open-source-video-conferencing +[19]: https://opensource.com/article/17/5/using-openshot-video-editor +[20]: https://opensource.com/article/20/1/what-creative-commons +[21]: https://opensource.com/article/21/4/obs-youtube +[22]: https://www.gutenberg.org/ebooks/19337 +[23]: https://librivox.org/the-feast-of-lights-by-emma-lazarus/ From ec29048f378f171b99c8386474be64d6a1b6b354 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 29 Nov 2021 08:53:09 +0800 Subject: [PATCH 035/244] translating --- .../20211127 13 Best Dark GTK Themes for Your Linux Desktop.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20211127 13 Best Dark GTK Themes for Your Linux Desktop.md b/sources/tech/20211127 13 Best Dark GTK Themes for Your Linux Desktop.md index 152877cf4a..bfcd5738ab 100644 --- a/sources/tech/20211127 13 Best Dark GTK Themes for Your Linux Desktop.md +++ b/sources/tech/20211127 13 Best Dark GTK Themes for Your Linux Desktop.md @@ -2,7 +2,7 @@ [#]: via: "https://itsfoss.com/dark-gtk-themes/" [#]: author: "Pratham Patel https://itsfoss.com/author/pratham/" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 475db9765e8517abfb452eafd62cb8722f04e218 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 29 Nov 2021 12:29:23 +0800 Subject: [PATCH 036/244] PRF&PUB @robsean https://linux.cn/article-14031-1.html --- ...and remove software packages on FreeDOS.md | 106 ++++++++++++++++ ...and remove software packages on FreeDOS.md | 113 ------------------ 2 files changed, 106 insertions(+), 113 deletions(-) create mode 100644 published/20210610 Install and remove software packages on FreeDOS.md delete mode 100644 translated/tech/20210610 Install and remove software packages on FreeDOS.md diff --git a/published/20210610 Install and remove software packages on FreeDOS.md b/published/20210610 Install and remove software packages on FreeDOS.md new file mode 100644 index 0000000000..06790852f2 --- /dev/null +++ b/published/20210610 Install and remove software packages on FreeDOS.md @@ -0,0 +1,106 @@ +[#]: subject: (Install and remove software packages on FreeDOS) +[#]: via: (https://opensource.com/article/21/6/freedos-package-manager) +[#]: author: (Jim Hall https://opensource.com/users/jim-hall) +[#]: collector: (lujun9972) +[#]: translator: (robsean) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14031-1.html) + +在 FreeDOS 上安装和移除软件包 +====== + +> 熟悉 FreeDOS 软件包管理器 FDIMPLES 。 + +![](https://img.linux.net.cn/data/attachment/album/202111/29/122823yhv0mg03v3mhr0cc.jpg) + +在 Linux 上,你可能已经使用过 “软件包管理器” 来安装或移除软件包。例如,在 Debian Linux 上的默认软件包管理器是 `deb` 命令,在 Fedora Linux 上的默认软件包管理器是 `dnf` 命令。 但是你知道 FreeDOS 也有一个软件包管理器吗? + +### 安装软件包 + +FreeDOS 1.3 RC4 发行版包含了很多极好的你可以使用的程序和应用程序。不过,我们不会默认安装其中的全部的程序 —— 我们不想过度地填充你的硬盘驱动器空间,尤其是在一个较老的系统上,可能仅有几百兆字节容量的硬盘驱动器。当你安装 FreeDOS 时,如果你选择 “Plain DOS system” 选项,你将发现你的 FreeDOS 系统是非常小的(大约 20 MB 大小)。 + +不过,要安装新的软件包很容易。在命令行中运行 `FDIMPLES` 程序。因为 DOS 是 _不区分大小写_ 的,所以,你可以使用大写字母或小写字母来输入这个命令: `fdimples` 。(`fdimples` 与 `FDIMPLES` 或 `FDImples` 等同) + +![fdimples][2] + +*在 FreeDOS 1.3 RC4 上的 FDIMPLES 软件包管理器(运行在 QEMU 之中)(Jim Hall, [CC-BY SA 4.0][3])* + +FDIMPLES 是 "**F**ree**D**OS **I**nstaller - **M**y **P**ackage **L**ist **E**ditor **S**oftware" 的首字母缩略词,是一个交互式软件包管理器。FDIMPLES 读取安装介质来识别可以安装或移除的软件包。如果你看到一个不同的菜单,它显示 “Installed!” ,但是,不让你安装其它的软件的话,请检查你系统中是否有 FreeDOS 的 CD-ROM 的安装介质。在物理机器上,你将需要将 CD-ROM 插入 CD-ROM 驱动器;在诸如 QEMU 或 VirtualBox 之类的虚拟机器上,你需要将安装 FreeDOS 的 CD-ROM 的安装介质与虚拟机器关联在一起。 + +![fdimples installed][4] + +*如果你仅看到一条 “Installed!” 的信息,检查 CD-ROM 是否已经加载(Jim Hall, [CC-BY SA 4.0][3])* + +让我们假设你想安装一些可以让你听音乐文件或其它声音文件的软件。使用向上箭头和向下箭头按键来导航到菜单中的 **声音工具** 项。这是一个针对声音和音乐程序的 _软件包组_ 。 + +![fdimples sound][5] + +*在 FDIMPLES 中突出显示声音软件包组(Jim Hall, [CC-BY SA 4.0][3])* + +要选择这个组中的所有软件包,在你的键盘上按下空格键。如果你决定安装这个组中的某个软件包,按下 `Tab` 按键来移动到 _软件包列表_ 方框面板,接下来使用空格键来选择每个软件包。 + +![fdimples sound select][6] + +*通过按下空格键来选择一个组中的所有的软件包(Jim Hall, [CC-BY SA 4.0][3])* + +你可以继续选择你想要安装的其它的软件包或软件包组。当你选择好一切的东西后,使用 “Tab” 按键来高亮显示 “OK” 按键,并按下空格键按键。 + +![fdimples sound select ok][7] + +*当你准备好安装时,突出显示 “Ok” 按钮(Jim Hall, [CC-BY SA 4.0][3])* + +`FDIMPLES` 接下来会安装你所选择的所有的软件包。如果你仅选择几个小型的软件包,这可能只需要花费片刻的时间,或者,如果你要求安装很多大型的软件包,它可能会花费数分钟的时间。当 `FDIMPLES` 安装每个软件包时,`FDIMPLES` 会输出安装状态。在安装完后,`FDIMPLES` 退出到命令行之中,以便你可以回去继续工作。 + +![fdimples sound install done][8] + +*当 FDIMPLES 安装软件包时,FDIMPLES 会显示安装过程,并在完成安装后自动地退出(Jim Hall, [CC-BY SA 4.0][3])* + +### 移除软件包 + +如果你安装了一个软件包,但是后来发现你不想要它了怎么办?在 `FDIMPLES` 中移除软件包也同样容易。 + +就像安装软件包一样,启动 `FDIMPLES` ,使用箭头键导航到包含你想要移除的软件包的组。例如,如果我想卸载一些我先前安装的音乐播放器软件包,我将导航到 “Sound Tools” 软件包组。 + +![fdimples sound select][9] + +*导航到你想要移除的软件包组(Jim Hall, [CC-BY SA 4.0][3])* + +为一次移除整个软件包组,你可以在你想要移除的软件包组上按下空格键来取消选择它们。但是,在这里让我们假设我只是想移除几个我不需要的软件包,像音频 CD 播放器 “CDP”。(我没有任何的真实的音乐 CD 光盘)。为移除 CDP ,敲击 `Tab` 按键来移动到软件包列表方框面板,接下来使用空格键来取消选择 CDP 软件包。这会在该软件包上移除 “X” 标志。 + +![fdimples unselect cdp][10] + +*取消选择一个软件包来移除它(Jim Hall, [CC-BY SA 4.0][3])* + +你可以继续取消选择你想要移除的其它的软件包或软件包组。当你选择一切的东西后,使用 `Tab` 按键来突出显示 “OK” 按钮,并按下空格键按键。`FDIMPLES` 将移除你取消选择的软件包,然后自动地返回到命令行之中。 + +![fdimples cdp removed][11] + +*FDIMPLES 移除软件包,然后返回到命令行之中(Jim Hall, [CC-BY SA 4.0][3])* + +在 FreeDOS 中。我们包含很多的软件包,遍及各种各样的软件包组。使用 `FDIMPLES` 来安装你需要的软件。请随意实验!如果你决定你不想要保留一个软件包了,你可以移除它,并为其它的软件包来释放所占用的磁盘空间。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/6/freedos-package-manager + +作者:[Jim Hall][a] +选题:[lujun9972][b] +译者:[robsean](https://github.com/robsean) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jim-hall +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/brown-package-red-bow.jpg?itok=oxZYQzH- +[2]: https://opensource.com/sites/default/files/uploads/fdimples.png +[3]: https://creativecommons.org/licenses/by-sa/4.0/ +[4]: https://opensource.com/sites/default/files/uploads/fdimples-installed.png +[5]: https://opensource.com/sites/default/files/uploads/fdimples-sound.png +[6]: https://opensource.com/sites/default/files/uploads/fdimples-sound-select.png +[7]: https://opensource.com/sites/default/files/uploads/fdimples-sound-select-ok.png +[8]: https://opensource.com/sites/default/files/uploads/fdimples-sound-select-ok-install4.png +[9]: https://opensource.com/sites/default/files/uploads/fdimples-sound-select_0.png +[10]: https://opensource.com/sites/default/files/uploads/fdimples-unselect-cdp.png +[11]: https://opensource.com/sites/default/files/uploads/fdimples-unselect-cdp-removed.png \ No newline at end of file diff --git a/translated/tech/20210610 Install and remove software packages on FreeDOS.md b/translated/tech/20210610 Install and remove software packages on FreeDOS.md deleted file mode 100644 index 9caac93d38..0000000000 --- a/translated/tech/20210610 Install and remove software packages on FreeDOS.md +++ /dev/null @@ -1,113 +0,0 @@ -[#]: subject: (Install and remove software packages on FreeDOS) -[#]: via: (https://opensource.com/article/21/6/freedos-package-manager) -[#]: author: (Jim Hall https://opensource.com/users/jim-hall) -[#]: collector: (lujun9972) -[#]: translator: (robsean) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -在 FreeDOS 上安装和移除软件包 -====== -熟悉 FreeDOS 软件包管理器 FDIMPLES 。 -![使用棕色纸盒红色蝴蝶结打包的软件包][1] - -在 Linux 上,你可能已经使用过一个 _软件包管理器_ 来安装或移除软件包。例如,在 Debian Linux 上的默认软件包管理器是 `deb` 命令,在 Fedora Linux 上的默认软件包管理器是 `dnf` 命令。 但是你知道 FreeDOS 也有一个软件包管理器吗? - -### 安装软件包 - -FreeDOS 1.3 RC4 发行版包含了很多极好的你可以使用的程序和应用程序。不过,我们不会默认安装其中的全部的程序 — 我们不想过度地填充你的硬盘驱动器空间,尤其是在一个较老的系统上,可能仅有几百兆字节容量的硬盘驱动器。当你安装 FreeDOS 时,如果你选择 "Plain DOS system" 选项,你将发现你的 FreeDOS 系统是非常小的 (大约 20 MB 大小) 。 - -不过,安装新的软件包很容易。在命令行中运行`FDIMPLES` 程序。因为 DOS 是 _不区分大小写_ 的,所以,你可以使用大写字母或小写字母来输入这个命令: `fdimples` 。(`fdimples` 与 `FDIMPLES` 或 `FDImples` 等同)。 - -![fdimples][2] - -在 FreeDOS 1.3 RC4 上的 FDIMPLES 软件包管理器 (运行在 QEMU 之中) -(Jim Hall, [CC-BY SA 4.0][3]) - -FDIMPLES 是 "**F**ree**D**OS **I**nstaller - **M**y **P**ackage **L**ist **E**ditor **S**oftware" 的首字母缩略词,是一个交互式软件包管理器。FDIMPLES 读取安装介质来识别可以安装或移除的软件包。如果你看到一个不同的菜单,它显示 "已经安装" ,但是,不让你安装其它的软件的话,请检查你系统中是否有 FreeDOS 的 CD-ROM 的安装介质。在一台物理机器上,你将需要将 CD-ROM 插入 CD-ROM 驱动器;在一台诸如 QEMU 或 VirtualBox 之类的虚拟机器上,你需要将安装 FreeDOS 的 CD-ROM 的安装介质与虚拟机器关联在一起。 - -![fdimples installed][4] - -如果你仅看到一条 "已经安装" 的信息,检查 CD-ROM 是否已经加载 -(Jim Hall, [CC-BY SA 4.0][3]) - -让我们假设你想安装一些可以让你听音乐文件或其它声音文件的软件。使用向上箭和向下箭按键来导航到菜单中的 **声音工具** 项。这是一个针对声音和音乐程序的 _软件包组_ 。 - -![fdimples sound][5] - -在 FDIMPLES 中突出显示声音软件包组 -(Jim Hall, [CC-BY SA 4.0][3]) - -为选择这个组中的所有软件包,在你的键盘上按下空格键。如果你决定安装这个组中的某个软件包,按下 Tab 按键来移动到 _软件包列表_ 方框面板,接下来使用空格键来选择每个软件包。 - -![fdimples sound select][6] - -通过按下空格键来选择一个组中的所有的软件包 -(Jim Hall, [CC-BY SA 4.0][3]) - -你可以继续选择你想要安装的其它的软件包或软件包组。当你选择好一切的东西后,使用 Tab 按键来突出显示 **OK** 按键,并按下空格键按键。 - -![fdimples sound select ok][7] - -当你准备安装时,突出显示 "Ok" 按钮 -(Jim Hall, [CC-BY SA 4.0][3]) - -FDIMPLES 接下来会安装你所选择的所有的软件包。如果你仅选择几个小型的软件包,这可能只需要花费片刻的时间,或者,如果你要求安装很多大型的软件包,它可能会花费数分钟的时间。当 FDIMPLES 安装每个软件包时,FDIMPLES 会打印安装状态。在安装完后,FDIMPLES 退出到命令行之中,以便你可以回去继续工作。 - -![fdimples sound install done][8] - -当 FDIMPLES 安装软件包时,FDIMPLES 会显示安装过程,并在完成安装后自动地退出 -(Jim Hall, [CC-BY SA 4.0][3]) - -### 移除软件包 - -如果你安装了一个软件包,但是后来发现你不想要它了怎么办?在 FDIMPLES 中移除软件包也同样容易。 - -就像安装软件包一样,启动 FDIMPLES ,使用箭头键导航到包含你想要移除的软件包的组。例如,如果我想卸载一些我先前安装的音乐播放器软件包,我将导航到 **声音工具** 软件包组。 - -![fdimples sound select][9] - -导航到你想要移除的软件包组 -(Jim Hall, [CC-BY SA 4.0][3]) - -为一次移除整个软件包组,你可以在你想要移除的软件包组上按下空格键来取消卸载它们。但是,在这里让我们假设我只是想移除几个我不需要的软件包,像 **CDP** 音频 CD 播放器。(我没有任何的物理音乐 CD 光盘)。为移除 CDP ,敲击 Tab 按键来移动到软件包列表方框面板,接下来使用空格键来取消选择 CDP 软件包。这会在该软件包上移除 **X** 标志。 - -![fdimples unselect cdp][10] - -取消选择一个软件包来移除它 -(Jim Hall, [CC-BY SA 4.0][3]) - -你可以继续取消选择你想要移除的其它的软件包或软件包组。当你选择一切的东西后,使用 Tab 按键来突出显示 **OK** 按钮,并按下空格键按键。FDIMPLES 将移除你取消选择的软件包,然后自动地返回到命令行之中。 - -![fdimples cdp removed][11] - -FDIMPLES 移除软件包,然后返回到命令行之中 -(Jim Hall, [CC-BY SA 4.0][3]) - -在 FreeDOS 中。我们包含很多的软件包,遍及各种各样的软件包组。使用 FDIMPLES 来安装你需要的软件。请随意实验!如果你决定你不想要保留一个软件包了,你可以移除它,并为其它的软件包来释放所占用的磁盘空间。 - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/6/freedos-package-manager - -作者:[Jim Hall][a] -选题:[lujun9972][b] -译者:[robsean](https://github.com/robsean) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/jim-hall -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/brown-package-red-bow.jpg?itok=oxZYQzH- (Package wrapped with brown paper and red bow) -[2]: https://opensource.com/sites/default/files/uploads/fdimples.png (The FDIMPLES package manager on FreeDOS 1.3 RC4 (running in QEMU)) -[3]: https://creativecommons.org/licenses/by-sa/4.0/ -[4]: https://opensource.com/sites/default/files/uploads/fdimples-installed.png (If you only see an "Installed" message, check that the CD-ROM is loaded) -[5]: https://opensource.com/sites/default/files/uploads/fdimples-sound.png (Highlighting the Sound package group in FDIMPLES) -[6]: https://opensource.com/sites/default/files/uploads/fdimples-sound-select.png (Select all the packages in a group by pressing the spacebar) -[7]: https://opensource.com/sites/default/files/uploads/fdimples-sound-select-ok.png (Highlight the "Ok" button when you're ready to install) -[8]: https://opensource.com/sites/default/files/uploads/fdimples-sound-select-ok-install4.png (FDIMPLES shows the progress as its installs packages, and automatically exits when done) -[9]: https://opensource.com/sites/default/files/uploads/fdimples-sound-select_0.png (Navigate to the group with the packages you want to remove) -[10]: https://opensource.com/sites/default/files/uploads/fdimples-unselect-cdp.png (Unselect a package to remove it) -[11]: https://opensource.com/sites/default/files/uploads/fdimples-unselect-cdp-removed.png (FDIMPLES removes the package, then returns to the command line) From a9df87a20e25647fdec949b2c96649563d592eb6 Mon Sep 17 00:00:00 2001 From: "patrick.zeng" Date: Mon, 29 Nov 2021 14:09:36 +0800 Subject: [PATCH 037/244] =?UTF-8?q?=E7=94=B3=E8=AF=B7=E7=BF=BB=E8=AF=91=20?= =?UTF-8?q?talk/20211113=20Why=20now....?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...a great time to consider a career in open source hardware.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/talk/20211113 Why now is a great time to consider a career in open source hardware.md b/sources/talk/20211113 Why now is a great time to consider a career in open source hardware.md index 32bdc5eb33..45ae02997d 100644 --- a/sources/talk/20211113 Why now is a great time to consider a career in open source hardware.md +++ b/sources/talk/20211113 Why now is a great time to consider a career in open source hardware.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/21/11/open-source-hardware-careers" [#]: author: "Joshua Pearce https://opensource.com/users/jmpearce" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "zengyi1001" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 967f08c03e3ee0f67d93bca25535adce8e9e6278 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 30 Nov 2021 05:02:42 +0800 Subject: [PATCH 038/244] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211130=20?= =?UTF-8?q?System=20Monitoring=20Center=20is=20an=20Ideal=20Task=20Manager?= =?UTF-8?q?=20&=20Resource=20Monitor=20for=20Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211130 System Monitoring Center is an Ideal Task Manager - Resource Monitor for Linux.md --- ...sk Manager - Resource Monitor for Linux.md | 105 ++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 sources/tech/20211130 System Monitoring Center is an Ideal Task Manager - Resource Monitor for Linux.md diff --git a/sources/tech/20211130 System Monitoring Center is an Ideal Task Manager - Resource Monitor for Linux.md b/sources/tech/20211130 System Monitoring Center is an Ideal Task Manager - Resource Monitor for Linux.md new file mode 100644 index 0000000000..dde8c3fdee --- /dev/null +++ b/sources/tech/20211130 System Monitoring Center is an Ideal Task Manager - Resource Monitor for Linux.md @@ -0,0 +1,105 @@ +[#]: subject: "System Monitoring Center is an Ideal Task Manager & Resource Monitor for Linux" +[#]: via: "https://itsfoss.com/system-monitoring-center/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +System Monitoring Center is an Ideal Task Manager & Resource Monitor for Linux +====== + +_**Brief:** System Monitoring Center is an all-in-one open-source app to monitor essential system resource stats eliminating the need for multiple tools._ + +Graphically monitoring the system resources may not be the best experience on Linux. The system monitoring tool that comes baked in with your desktop environment might limit the details. + +For instance, GNOME’s system monitor does not display the CPU frequency and temperatures. + +In addition, the default system monitor applications available for Linux usually aim for simplicity instead of providing detailed insights. + +System Monitoring Center is a useful GUI tool that provides plenty of necessary insights. In this article, let me give you a closer look at it. + +### System Monitoring Center: Linux App to Display Essential System Stats + +![][1] + +System Monitoring Center is a GTK3 and Python 3 based sleek-looking app that gives you all the resource usage data that you would want. + +In my case, I wanted to keep an eye on the CPU frequency when using a system monitoring tool, but GNOME’s system monitoring tool didn’t help. So, this came in pretty handy. + +![][2] + +The application provides a good user experience and offers plenty of insights and features. Let me highlight the key features that you can expect with it. + +The application is still in the beta phase when writing this. So, you can expect to encounter bugs. However, I did not notice any issues in my brief testing. + +### Features of System Monitoring Center + +![][3] + +To start with, it lets you view separate stats for your CPU, RAM, Disk, Network, GPU, and sensors. + +You can expect the following details with the tool: + + * Displays CPU status including the frequency + * Ability to display average usage or usage per core + * Select the precision points for CPU frequency and other stats + * Ability to change the graph color + * Filter system processes by user and easily manage them + * Toggle a floating summary widget to quickly get insights + * Shows disk usage info and connected drives + * Detailed system info in the same app + * Control startup services and programs + * Ability to control the state update interval + * Low system resource usage for the app itself + * Adapts to system theme + + + +While it offers a ton of options and customizations per tab (or component), I wish that it would include the RAM frequency, among other things, in a future update. + +![][4] + +However, the rest of the data seem incredibly helpful, considering it could replace the use of a disk usage analyzer and a terminal tool like neofetch at the same time. + +![][5] + +Do note that you may not get the data for fans if you have multiple case fans, a separate exhaust fan, or an AIO. The temperatures can be a hit or miss, but the CPU temperature should be visible. + +### Install System Monitoring Center in Linux + +You can easily install it on any Ubuntu-based distros using the deb package available. + +Unfortunately, there are no available packages except a ZIP file that you will have to manually build and compile to get it installed. You should find a script to build the RPM package within the ZIP file. + +The deb file is available through SourceForge; you should click the button below to download it or choose to explore their [GitLab instance page][6]. + +[Download System Monitoring Center][7] + +### Wrapping Up + +System Monitoring Center is an open-source app that lets users get detailed insights about their system resources and help manage processes. + +This is a much-needed app that provides detailed insights without dabbling through separate terminal/GUI programs for many Linux users. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/system-monitoring-center/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/system-monitoring-center.png?resize=800%2C611&ssl=1 +[2]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/system-monitoring-center-full-info.png?resize=800%2C585&ssl=1 +[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/system-monitoring-center-options.png?resize=582%2C576&ssl=1 +[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/system-cpu-monitoring.png?resize=800%2C599&ssl=1 +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/system-monitoring-center-process.png?resize=800%2C592&ssl=1 +[6]: https://kod.pardus.org.tr/Hakan/system-monitoring-center +[7]: https://sourceforge.net/projects/system-monitoring-center/files/latest/download From 5837a28bb9b696fb45e0c8bfd32a0e7b3b848012 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 30 Nov 2021 05:02:52 +0800 Subject: [PATCH 039/244] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211130=20?= =?UTF-8?q?Best=20Open=20Source=20Gantt=20Chart=20Software=20for=20Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211130 Best Open Source Gantt Chart Software for Linux.md --- ...n Source Gantt Chart Software for Linux.md | 227 ++++++++++++++++++ 1 file changed, 227 insertions(+) create mode 100644 sources/tech/20211130 Best Open Source Gantt Chart Software for Linux.md diff --git a/sources/tech/20211130 Best Open Source Gantt Chart Software for Linux.md b/sources/tech/20211130 Best Open Source Gantt Chart Software for Linux.md new file mode 100644 index 0000000000..d92ae49d55 --- /dev/null +++ b/sources/tech/20211130 Best Open Source Gantt Chart Software for Linux.md @@ -0,0 +1,227 @@ +[#]: subject: "Best Open Source Gantt Chart Software for Linux" +[#]: via: "https://itsfoss.com/open-source-gantt-chart/" +[#]: author: "Community https://itsfoss.com/author/itsfoss/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Best Open Source Gantt Chart Software for Linux +====== + +Gantt chart is the simplest way to assign resources, manage timelines, and visualize dependencies. + +It helps you to avoid confusion and cut unproductive events.  + +With a glance, you can have all activities, allocated assets, and the scheduled dates of each.  + +While a Gantt chart is a must for any complex project, in general, you need this project management tool: + + * If your project has a deadline and limited resources. + * Your project has multiple people and activities associated with it. + * Someone wants to visually track the progress of the project. + * Various activities are interdependent, and you’ve got a rough idea about the time taken by each. + * You want to manage the workloads of various project members.  + + + +![Gantt Chart illustration][1] + +### Features you expect in a Gantt chart tool + +These are the general features you can expect from a Gantt Chart tool. They may increase or reduce in number based on the software at hand. + +**Task List:** This is the list of all activities within a project. Task lists are often represented as a vertical column. + +**Resources:** Stacked along with the Task List, this mentions the assets allocated to each activity. + +**Timelines:** These are shown as horizontal bars for each activity. They may overlap for some activities and can show dependencies between various events. + +**Duration:** It can be used to indicate the start and end dates of each activity. These are represented in a vertical column.  + +**Others:** Some extra features can include remarks, milestones, deviation from a set schedule, actual expenditures, etc. + +Now that we know enough about them, I’ll mention some of the top Gantt Chart software to use on Linux. Please note that this list is in no particular order. + +### Best open source Gantt chart tools + +Some of the applications mentioned here are good for personal use while some are part of a complete project management software. Please read the description carefully and if possible, test them out yourself to see which one suits your need. + +_Please keep in mind that this is not a ranking list._ + +#### 1\. GanttProject + +![][2] + +[GanttProject][3] is an open-source project management tool registered under a general public license.  + +It lets you add tasks, milestones, set dependencies, and allocate resources with their rates. + +In addition, you can register and have your Gantt chart wherever you go with their cloud syncing. This feature is also helpful in collaborations with different team members. + +GanttProject supports the import of Microsoft project files, spreadsheets, text files among others. Similarly, you can export your project as a pdf, image, spreadsheet, Microsoft project file, etc. + +It’s free to use and available for Linux, Windows, and macOS. You can also pay USD 5+ to support this project by buying its paid version. Just so as you know, its free and paid versions have the exact same features. + +#### 2\. **Planner** + +![][4] + +[Planner][5] is another open-source project management tool similar to GanttProject. + +You can pretty much do what you could have done with GanttProject, barring some in-house import-export functions. + +It can be used on Linux and Windows. + +In Planner, one can add activities, timesheets, track resources, assign costs, input dependencies, etc. You can print to pdf and export to HTML to view in a web browser. + +There are some 3rd party tools to bring in more functionality. + +#### 3\. **dotProject** + +![][6] + +Adding to the open-source libraries, dotProject is a fully-fledged web-based project management tool supported by volunteers around the world. + +Once installed and running, it’s a capable standalone project management tool.  + +You can set tasks and subtasks with dependencies, assign team members, set timelines, and much more. It can also be used as a collaborative tool allowing communication between various team members. + +It is primarily for Linux but can be used with any platform that has a functioning Web Server (Apache preferred) supporting PHP and MySQL. + +#### **4\. ProjectLibre** + +![][7] + +ProjectLibre is trying to do Microsoft Project what Google Docs did to Microsoft Word.  + +It’s open-source and has a free version to replace the MS project.  + +Besides, it does have a ProjectLibre cloud edition, which is paid and meant for teams handling multiple projects. Needless to say, you can import MS Project files into this and vice-versa.  + +It’s very easy to create activities with this, input various resources, and track timelines. Having said that, the user interface doesn’t please the eyes and needs polishing. + +ProjectLibre is available for Linux, Windows, and Mac. + +#### 5\. **OpenProject** + +![][8] + +OpenProject is yet another project management tool with Gantt chart capability.  + +It has an open-source, free, on-premise community edition. Open Project also has an on-premises and cloud edition for enterprises. + +Though the set-up requires some technical know-how, it’s smooth sailing afterward. And they do have a [tutorial video][9] on the installation section for the same. + +You can make a work breakdown structure mentioning all the activities with the required information and switch to the Gantt chart view. + +This tool is built with Linux users in mind. But there are workarounds to install it on Mac and Windows using a Docker image, although these methods are unofficial. + +#### 6\. **Redmine** + +![][10] + +Similar to dotProject, [Redmine][11] is a web-based project management software. It is open-source, free, and can be customized according to the requirements. + +It powers you to add tasks, track them, include dependencies, resource tracking, and much more. Redmine has some plugins which add to its features. + +Redmine can be used on Linux, Windows, and macOS X. It has a very detailed [how-to section][12] to get you through the installation on various platforms. + +But straightaway, it’s for technical professionals to install and maintain it. And if you’re a newbie or rather prefer to stay on the non-technical side of things–this isn’t for you. + +#### 7\. **ProjeQtOr** + +![][13] + +[Projeqtor][14] is an acronym for Quality based Project Organizer. It is a web-based project management software that lets you create, manage, and track various activities in a project.  + +In addition, you can allocate resources, create tickets, include dependencies, etc. This feature-rich application also comes with email alerts. It’s completely free and has deep customizations.  + +Besides, Projeqtor is very actively developed and has numerous plugins to enhance its usability. + +You can use this on Linux, Windows, Mac, and BSD. + +#### 8\. **Calligra Plan** + +![][15] + +[Calligra Plan][16] is a part of the Calligra Suite, which can also be installed separately. It’s a project management tool capable of handling simple to moderately complex projects. Calligra plan comes with a Gantt chart view along with a list view. + +It comes with the usual task management, resource allocation, tracking deviations, setting dependencies between activities, and much more. + +Calligra Plan is available for Linux, Windows, Free BSD, and Mac OS. It’s not the most user-friendly tool outright but can be great once you get used to it. + +#### 9\. **TaskJuggler** + +![][17] + +If you don’t mind the looks, TaskJuggler can serve you as a powerful project management software. + +This tool is focused on resource optimization. It has automatic resource management and activity conflict resolutions. + +You can enter as many details as required. Besides, it will inform you if the project is going to miss important timelines. Data can be exported in HTML and CSV formats. + +It’s primarily made for Linux. But since it’s written in Ruby, it can work on other platforms as well. + +### **Honorable Mentions** + +[OpenProj][18] is another open-source project management tool that can be used to make Gantt charts. While it hasn’t been updated from 2019, it’s still loved by many due to its similarity with the MS project. + +However, OpenProj has a dated user interface, and it takes some time to get used to it. And its parent company, Serena Software, has asked users to migrate to ProjectLibre instead due to the suspended development. + +[Libreplan][19] is another open-source project management software that has Gantt chart functionality. You can pretty much do everything that we already discussed in the above software list. + +Libreplan is easy to install and has a detailed guide to get you started with it. Its most recent version is a community-supported one. But they do have a subscription-based version aimed at enterprises. + +This software is exclusively available for Linux. But its development has been postponed since COVID-19. + +### **Conclusion** + +All of the above software are open-source and are available for Linux.  + +While some are beginner-friendly like GanttProject, others require some expertise to install and maintain. But if you aren’t hell-bent with the open-source movement, then there is a good free option in [Agantty][20]. + +Do you use some other project management tool for Gantt chart that we missed? Why not share it with the rest of us in the comment section? We might update this list with your suggestion. + +![][21] + +### Hitesh Sant + +Hitesh is a technology writer. He also has a flavor for acoustic guitar. And academically, he’s a postgraduate in Transportation Engineering & Management. You can check his complete work at [hiteshsant.com/][22]. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/open-source-gantt-chart/ + +作者:[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://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/gantt-chart.png?resize=800%2C450&ssl=1 +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/GanttProject.png?resize=800%2C286&ssl=1 +[3]: https://www.ganttproject.biz/download +[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/Planner-Gantt.png?resize=800%2C525&ssl=1 +[5]: https://wiki.gnome.org/Apps/Planner/Downloads +[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/dotProject.jpg?resize=760%2C675&ssl=1 +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/ProjectLibre.png?resize=800%2C441&ssl=1 +[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/OpenPorject.jpg?resize=800%2C656&ssl=1 +[9]: https://openproject-docs.s3.eu-central-1.amazonaws.com/videos/openproject-installation-ubuntu.mp4 +[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/Redmine.png?resize=800%2C462&ssl=1 +[11]: https://www.redmine.org/projects/redmine/wiki/Download +[12]: https://www.redmine.org/projects/redmine/wiki/HowTos +[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/ProjeqtOr.png?resize=800%2C458&ssl=1 +[14]: https://www.projeqtor.org/en/ +[15]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/Calligra-Plan.png?resize=800%2C439&ssl=1 +[16]: https://calligra.org/plan/ +[17]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/task-juggler.png?resize=800%2C441&ssl=1 +[18]: https://sourceforge.net/projects/openproj/ +[19]: https://www.libreplan.dev/ +[20]: https://www.agantty.com/en/ +[21]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/hitesh.webp?resize=400%2C400&ssl=1 +[22]: http://hiteshsant.com/ From ea1d0ec2a5e8f11ea525b2a1f9d68743c25d9a09 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 30 Nov 2021 05:03:07 +0800 Subject: [PATCH 040/244] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211129=20?= =?UTF-8?q?Anyone=20can=20compile=20open=20source=20code=20in=20these=20th?= =?UTF-8?q?ree=20simple=20steps?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211129 Anyone can compile open source code in these three simple steps.md --- ...source code in these three simple steps.md | 285 ++++++++++++++++++ 1 file changed, 285 insertions(+) create mode 100644 sources/tech/20211129 Anyone can compile open source code in these three simple steps.md diff --git a/sources/tech/20211129 Anyone can compile open source code in these three simple steps.md b/sources/tech/20211129 Anyone can compile open source code in these three simple steps.md new file mode 100644 index 0000000000..b96ee34649 --- /dev/null +++ b/sources/tech/20211129 Anyone can compile open source code in these three simple steps.md @@ -0,0 +1,285 @@ +[#]: subject: "Anyone can compile open source code in these three simple steps" +[#]: via: "https://opensource.com/article/21/11/compiling-code" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Anyone can compile open source code in these three simple steps +====== +You don't need to know how to write or read code to compile it. +![Developing code.][1] + +There are many ways to install software, but you get an option not available elsewhere with open source: You can compile the code yourself. The classic three-step process to compile source code: + + +``` + + +$ ./configure +$ make +$ sudo make install + +``` + +Thanks to these commands, you might be surprised to find that you don't need to know how to write or even read code to compile it. + +### Install commands to build software + +As this is your first time compiling, there's a one-time preparatory step to install the commands for building software. Specifically, you need a compiler. A compiler, such as GCC or LLVM, turns source code that looks like this: + + +``` + + +#include <iostream> + +using namespace std; + +int main() { +  cout << "hello world"; +} + +``` + +Into _machine language_, the instructions that a CPU uses to process information. You can look at machine code, but it wouldn't make any sense to you (unless you're a CPU.) + +You can get the GNU C compiler (GCC) and the LLVM compiler, along with other essential commands for compiling on Fedora, CentOS, Mageia, and similar distributions, using your package manager: + + +``` +`$ sudo dnf install @development clang` +``` + +On Debian, Elementary, Mint, and similar distributions: + + +``` +`$ sudo apt install build-essential clang` +``` + +With your system set up, there are a few tasks that you'll repeat each time you want to compile your software: + + 1. Download the source code + 2. Unarchive the source code  + 3. Compile + + + +You have all the commands you need, so now you need some software to compile. + +### 1\. Download source code + +Obtaining source code for an application is much like getting any downloadable software. You go to a website or a code management site like GitLab, SourceForge, or GitHub. Typically, open source software is available in both a work-in-progress ("current" or "nightly") form as well as a packaged "stable" release version. Use the stable version when possible unless you have reason to believe otherwise or are good enough with code to fix things when they break. The term **stable** suggests the code got tested and that the programmers of the application feel confident enough in the code to package it into a `.zip` or `.tar` archive, give it an official number and sometimes a release name, and offer it for download to the general non-programmer public. + +For this exercise, I'm using [Angband][2], an open source (GPLv2) ASCII dungeon crawler. It's a simple application with just enough complications to demonstrate what you need to consider when compiling software for yourself. + +Download the source code from the website. + +### 2\. Unarchive the source code + +Source code is often delivered as an archive because source code usually consists of multiple files. You have to extract it before interacting with it, whether it's a tarball, a zip file, a 7z file, or something else entirely.  + + +``` +`$ tar --extract --file Angband-x.y.z.tar.gz` +``` + +Once you've unarchived it, change the directory into the extracted directory and have a look around. There's usually a `README` file at the top level of the directory. This file, ideally, contains guidance on what you need to do to compile the code. The `README` often contains information on these important aspects of the code: + + * **Language:** What language the code is in (for instance, C, C++, Rust, Python). + * **Dependencies:** What other software you need to have installed on your system for this application to build and run. + * **Instructions:** The literal steps you need to take to build the software. Occasionally, they include this information within a dedicated file intuitively entitled `INSTALL`. + + + +If the `README` file doesn't contain that information, consider filing a bug report with the developer. You're not the only one who needs an introduction to source code. Regardless of how experienced they are, everyone is new to source code they've never seen before, and documentation is important! + +Angband's maintainers link to online instructions to describe how to compile the code. This document also describes what other software you need to have installed, although it doesn't exactly spell it out. The site says, "There are several different front ends that you can optionally build (GCU, SDL, SDL2, and X11) using arguments to configure such as `--enable-sdl`, `--disable-x11`, etc." This may mean something to you or look like a foreign language, but this is the kind of stuff you get used to after compiling code frequently. Whether or not you understand what X11 or SDL2 is, they're both requirements that you see pretty often after regularly compiling code over a few months. You get comfortable with the idea that most software needs other software libraries because they build upon other technologies. In this case, though, Angband is very flexible and compiles with or without these optional dependencies, so for now, you can pretend that there are no additional dependencies. + +### 3\. Compile the code + +The canonical steps to build code are: + + +``` + + +$ ./configure +$ make +$ sudo make install + +``` + +Those are the steps for projects built with [Autotools][3], which is a framework created to standardize how source code is delivered. Other frameworks (such as [Cmake][4]) exist, however, and they require different steps. When projects stray from Autotools or Cmake, they tend to warn you in the `README` file. + +### Configure  + +Angband uses Autotools, so it's time to compile code! + +In the Angband directory, first, run the configuration script included with the source: + + +``` +`$ ./configure` +``` + +This step scans your system to find the dependencies that Angband requires to build correctly. Some dependencies are so basic that your computer wouldn't be running without them, while others are specialized. At the end of the process, the script gives you a report on what it has found: + + +``` + + +[...] +configure: creating ./config.status +config.status: creating mk/buildsys.mk +config.status: creating mk/extra.mk +config.status: creating src/autoconf.h + +Configuration: + +  Install path:    /usr/local +  binary path:     /usr/local/games +  config path:     /usr/local/etc/angband/ +  lib path:        /usr/local/share/angband/ +  doc path:        /usr/local/share/doc/angband/ +  var path:        (not used) +  (save and score files in ~/.angband/Angband/) + +\-- Frontends -- +\- Curses            Yes +\- X11               Yes +\- SDL2              Disabled +\- SDL               Disabled +\- Windows           Disabled +\- Test              No +\- Stats             No +\- Spoilers          Yes + +\- SDL2 sound        Disabled +\- SDL sound         Disabled + +``` + +Some of that output may make sense to you, some of it may not. Either way, you probably notice that SDL2 and SDL are marked as `Disabled`, and both Test and Stats are marked with `No`. Although negative, this isn't necessarily a bad thing. This, essentially, is the difference between a **Warning** and an **Error**. Had the configure script encountered something that would prevent it from building the code, it would have alerted you with an error. + +If you want to optimize your build a little, you can choose to resolve these negative messages. By searching through the Angband documentation, you might decide that Test and Stats aren't actually of interest to you (they're developer options, specific to Angband). However, with a little online research, you might discover that SDL2 would be a nice feature to have.  + +To resolve a dependency when compiling code, you need to install the missing component and the _development libraries_ for that missing component. In other words, Angband needs SDL2 to play sound, but it needs `SDL2-devel` (called `libsdl2-dev`, on Debian systems) to build. Install both with your package manager: + + +``` +`$ sudo dnf install sdl2 sdl2-devel` +``` + +Try the configuration script again: + + +``` + + +$ ./configure --enable-sdl2 +[...] +Configuration: +[...] +\- Curses                                  Yes +\- X11                                     Yes +\- SDL2                                    Yes +\- SDL                                     Disabled +\- Windows                                 Disabled +\- Test                                    No +\- Stats                                   No +\- Spoilers                                Yes + +\- SDL sound                               Disabled +\- SDL2 sound                              Yes + +``` + +### Make + +Once everything's configured, run the `make` command: + + +``` +`$ make` +``` + +This usually takes a while, but it provides lots of visual feedback, so you'll know code is getting compiled. + +### Install  + +The final step is to install the code you've just compiled. There's nothing magical about installing code. All that happens is that lots of files get copied to very specific directories. That's true whether you're compiling from source code or running a fancy graphical install wizard. Because the code is getting copied to system-level directories, you must have root (administrative) privileges, which get granted by the `sudo` command. + + +``` +`$ sudo make install` +``` + +### Run the application + +Once the application gets installed, you can run it. According to the Angband documentation, the command to start the game is `angband`, so try it out: + + +``` +`$ angband` +``` + +### + +[angband.jpg][5] + +![Compile code lead image][6] + +(Seth Kenlon, [CC BY-SA 4.0][7]) + +### Compiling code + +I compile most of my own applications, whether on my Slackware desktop computer or my CentOS laptop using NetBSD's [pkgsrc][8] system. I find that by compiling software myself, I can be as particular as I want to be about the features included in the application, how it's configured, which library version it uses, and so on. It's rewarding, and it helps me keep up to date with new releases and, because I sometimes find bugs in the process, it helps me get involved with lots of different open source projects. + +It's rare that you have no other option but to compile software. Most open source projects provide both the source code (that's why it's called "open source") and installable packages. Compiling from source code is a choice you get to make for yourself, maybe because you want new features not yet available in the latest release or just because you prefer to compile code yourself. + +### Homework + +Angband can use either Autotools or Cmake, so if you want to experience another way of building code, try this: + + +``` + + +$ mkdir build +$ cd build +$ cmake .. +$ make +$ sudo make install + +``` + +You can also try compiling with the LLVM compiler instead of the GNU C compiler. For now, I'll leave that as an exercise for you to investigate on your own (hint: try setting the CC [environment variable][9].) + +Once you finish exploring the source code of Angband and at least a few of its dungeons (you've earned some downtime), have a look at some other codebases. Many will use Autotools or Cmake, while others may use something different. See what you can build! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/11/compiling-code + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/code_development_programming.png?itok=M_QDcgz5 (Developing code.) +[2]: https://rephial.org/ +[3]: https://opensource.com/article/19/7/introduction-gnu-autotools +[4]: https://opensource.com/article/21/5/cmake +[5]: https://opensource.com/file/514986 +[6]: https://opensource.com/sites/default/files/uploads/angband.jpg (Compile code lead image) +[7]: https://creativecommons.org/licenses/by-sa/4.0/ +[8]: https://opensource.com/article/19/11/pkgsrc-netbsd-linux +[9]: https://opensource.com/article/19/8/what-are-environment-variables From 3da19a9eb72f5b479323d58cf112372bc603fc10 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 30 Nov 2021 05:03:28 +0800 Subject: [PATCH 041/244] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020211129=20?= =?UTF-8?q?It=E2=80=99s=20Time=20More=20Linux=20Distros=20and=20DEs=20Beco?= =?UTF-8?q?me=20=E2=80=98Linus-Proof=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20211129 It-s Time More Linux Distros and DEs Become ‘Linus-Proof.md --- ...nux Distros and DEs Become ‘Linus-Proof.md | 98 +++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 sources/news/20211129 It-s Time More Linux Distros and DEs Become ‘Linus-Proof.md diff --git a/sources/news/20211129 It-s Time More Linux Distros and DEs Become ‘Linus-Proof.md b/sources/news/20211129 It-s Time More Linux Distros and DEs Become ‘Linus-Proof.md new file mode 100644 index 0000000000..730829676d --- /dev/null +++ b/sources/news/20211129 It-s Time More Linux Distros and DEs Become ‘Linus-Proof.md @@ -0,0 +1,98 @@ +[#]: subject: "It’s Time More Linux Distros and DEs Become ‘Linus-Proof’" +[#]: via: "https://news.itsfoss.com/more-linux-distros-become-linus-proof/" +[#]: author: "Abhishek https://news.itsfoss.com/author/root/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +It’s Time More Linux Distros and DEs Become ‘Linus-Proof’ +====== + +The past few weeks have rattled the desktop Linux community. + +Popular tech YouTuber Linus, not Torvalds but Sebastian, decided to use Linux on desktop for a month. Linus Sebastian wanted to see if Linux has gotten to the point where it is user friendly enough that any tech nerd can pick it up and run? His focus was also on [gaming on Linux][1] because PC gaming is an area Sebastian covers a lot. + +That’s an interesting concept and many in the Linux community got excited because it was free publicity for desktop Linux to a wider tech audience. + +Only, it went [horribly wrong in the very first part of the Linux Daily Driver Challenge][2]. + +### Linus Sebastian’s (in)famous Pop!OS moment + +Linus Sebastian decided to [install Pop!_OS][3] because it is often considered a good mainstream distribution for gaming. He then tried to install Steam from the software center but the software center failed to install it. + +![Sebastian encountered an issue with Steam installation][4] + +When it did not work graphically, he went on to do what any other Linux user would have done. He turned to the terminal and ran the magical sudo apt-get install command. + +![Sebastian switches to command line to install Steam][5] + +In both graphical and terminal method, Pop!_OS showed a warning that the user was on the verge of removing some essential packages. + +The command line method clearly warned, “_**You are about to do something potentially harmful. To continue type in the phrase ‘Yes, do as I say**_‘”. + +![Ignores the warning about removing crucial packages][6] + +For many Linux users, this could have been the point to pause and reflect. The output clearly shows that it is going to delete gdm3, pop-desktop and many other desktop environment elements. + +But people often do not care about warnings. Linus Sebastian went ahead with it and ended up with a broken system that cannot be logged in graphically. + +![Linus Sebastian \(not Torvalds\) after realizing his Pop!_OS install is messed up][7] + +### Lesson for the desktop Linux developers + +There are two lessons to learn here for the developers: + + * Installing Steam or any other regular software should never have resulted in removal of critical graphical elements. + * A user should not be able to remove the critical piece of software from a regular, mainstream distribution. + + + +Pop!_OS quickly fixed the bug with Steam and also added a defensive mechanism to disable removal of critical desktop elements. + +> For some reason, an i386 version of a package was never published on Launchpad. Steam being an i386 package, when trying to install it, it had to downgrade that package to the Ubuntu version to resolve dependencies, which removed Pop!_OS packages. +> +> — Jeremy Soller (@jeremy_soller) [October 26, 2021][8] + +To prevent such incidents in the future, Pop!_OS patched the APT package manager. Now, POP!_OS won’t be able to enter “Yes, do as I Say”. Instead, they will have to add a special a file to enable it (if someone really wants to remove the packages). + +That’s a good move by Pop!_OS. But this is not just a lesson for Pop!_OS. Most Linux distributions could encounter similar situation and end up deleting the desktop environment and display server itself. + +KDE took a note and adds a feature to [disable the removal of Plasma desktop in the upcoming Plasma 5.24 release][9]. + +![KDE Plasma won’t allow you to remove Plasma Desktop][10] + +Many people blamed Linus Sebastian for going ahead with the disaster despite clear warning. But here’s the thing, many users won’t care for “warnings”, no matter how technically advanced they are. People just assume that pressing Y or other similar stuff is just part of the procedure without thinking twice. Some other Linux users have encountered it in the past and many will encounter it in the future. + +This is why adding failsafe is the wise step here. This is something all mainstream distributions should do. + +#### Big Tech Websites Get Millions in Revenue, It's FOSS Got You! + +If you like what we do here at It's FOSS, please consider making a donation to support our independent publication. Your support will help us keep publishing content focusing on desktop Linux and open source software. + +I'm not interested + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/more-linux-distros-become-linus-proof/ + +作者:[Abhishek][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://news.itsfoss.com/author/root/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/linux-gaming-guide/ +[2]: https://www.youtube.com/watch?v=0506yDSgU7M&t=788s +[3]: https://itsfoss.com/install-pop-os/ +[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjM0NyIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[5]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjM4NSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[6]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjM3OCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[7]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjM2MiIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[8]: https://twitter.com/jeremy_soller/status/1453008808314351628?ref_src=twsrc%5Etfw +[9]: https://news.itsfoss.com/kde-plasma-5-24-dev/ +[10]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjM4OSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= From 52c8bf7939ca3f20bf5ab4205a1d35d5c43531a0 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 30 Nov 2021 05:03:38 +0800 Subject: [PATCH 042/244] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020211129=20?= =?UTF-8?q?Kalendar=20Beta=20v0.3.0=20Introduces=20a=20Windows=20Version?= =?UTF-8?q?=20Along=20With=20Essential=20Improvements?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20211129 Kalendar Beta v0.3.0 Introduces a Windows Version Along With Essential Improvements.md --- ...rsion Along With Essential Improvements.md | 99 +++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 sources/news/20211129 Kalendar Beta v0.3.0 Introduces a Windows Version Along With Essential Improvements.md diff --git a/sources/news/20211129 Kalendar Beta v0.3.0 Introduces a Windows Version Along With Essential Improvements.md b/sources/news/20211129 Kalendar Beta v0.3.0 Introduces a Windows Version Along With Essential Improvements.md new file mode 100644 index 0000000000..a6f83870cb --- /dev/null +++ b/sources/news/20211129 Kalendar Beta v0.3.0 Introduces a Windows Version Along With Essential Improvements.md @@ -0,0 +1,99 @@ +[#]: subject: "Kalendar Beta v0.3.0 Introduces a Windows Version Along With Essential Improvements" +[#]: via: "https://news.itsfoss.com/kalendar-0-3-0-beta/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Kalendar Beta v0.3.0 Introduces a Windows Version Along With Essential Improvements +====== + +Kalendar is KDE’s open-source calendar app that is still in development as of now. It could potentially replace the calendar that you get with KOrganizer. + +There have been a few beta releases already. But, with the 0.3.0 beta release, it looks like the Kalendar app might be gearing up to add essential features while heading to its v1.0 release. + +Furthermore, an exciting development follows—a Windows version is also available? + +Let us take a look at it. + +### Kalendar 0.3.0: What’s New? + +Kalendar 0.3.0 beta release is already out, and Claudio Cambra (KDE Developer) has shared the details of development progress in a blog post. Here, I mention the key highlights of the release. + +#### Performance Improvements + +![][1] + +KDE’s applications have always been known for their simplicity and performance. + +And, Kalendar is no exception. The latest beta release has been tweaked to make the application clean and simple. + +By default, you will not be shown week numbers when you are in the month view. Similarly, the tasks will be arranged in ascending order. + +These types of default configurations should save you time and simplify the user experience. + +#### Usability Improvements + +![][2] + +To make things easier, you can now drag and drop an event in the Kalendar app to resize or extend the time. + +The ability to edit an event has also been improved by letting you simply double-clicking on it to bring up the editor. + +It is now also easier to refresh the calendars using the F5 key. + +In addition to all these, Kalendar 0.3.0 also lets you quickly add time duration in a 15-minute multiple. + +#### Visual Improvements + +![][3] + +There aren’t any major visual changes, but the developers have worked on a few subtle differences. + +Some changes include highlighting the time when creating an event and adding new heading sections to improve the tasks’ clarity and categories. + +#### A Windows Version + +Even though the Kalendar app hasn’t been finalized, it is still good to have an open-source calendar app from KDE available on Windows. + +As per the developer’s blog, a Windows version was possible because of the flexibility of Qt, the KFrameworks, and Akonadi. + +If you are interested, you can [download the package for Windows][4], but it is still considered experimental. + +### Other Improvements + +Along with all the key highlights and an interesting Windows release, Kalendar 0.3.0 beta release also improves the keyboard navigation and other accessibility features. + +There are several bug fixes as well. You can explore all the technical details in the [blog post][5] by the KDE Developer. + +[Kalendar by KDE][6] + +_What do you think about the Kalendar app coming to Windows? Have you tried it on Linux yet?_ + +#### Big Tech Websites Get Millions in Revenue, It's FOSS Got You! + +If you like what we do here at It's FOSS, please consider making a donation to support our independent publication. Your support will help us keep publishing content focusing on desktop Linux and open source software. + +I'm not interested + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/kalendar-0-3-0-beta/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQzMiIgd2lkdGg9Ijc2OCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[2]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQyMCIgd2lkdGg9Ijc2OCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[3]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjUxNiIgd2lkdGg9Ijc2OCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[4]: https://binary-factory.kde.org/view/Windows%2064-bit/job/Kalendar_Nightly_win64/ +[5]: https://claudiocambra.com/2021/11/28/kalendar-v0-3-0-out-soon-with-improved-stability-efficiency-accessibility-and-a-windows-version-kalendar-devlog-23/ +[6]: https://apps.kde.org/kalendar/ From 22c1aa03c90d32cdaf16066410ee80db1daee8d3 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 30 Nov 2021 08:46:28 +0800 Subject: [PATCH 043/244] translated --- ...rkstation) Available for Linux Desktops.md | 162 ------------------ ...rkstation) Available for Linux Desktops.md | 162 ++++++++++++++++++ 2 files changed, 162 insertions(+), 162 deletions(-) delete mode 100644 sources/tech/20211031 Best DAW (Digital Audio Workstation) Available for Linux Desktops.md create mode 100644 translated/tech/20211031 Best DAW (Digital Audio Workstation) Available for Linux Desktops.md diff --git a/sources/tech/20211031 Best DAW (Digital Audio Workstation) Available for Linux Desktops.md b/sources/tech/20211031 Best DAW (Digital Audio Workstation) Available for Linux Desktops.md deleted file mode 100644 index 6da9b9a104..0000000000 --- a/sources/tech/20211031 Best DAW (Digital Audio Workstation) Available for Linux Desktops.md +++ /dev/null @@ -1,162 +0,0 @@ -[#]: subject: "Best DAW (Digital Audio Workstation) Available for Linux Desktops" -[#]: via: "https://itsfoss.com/best-daw-linux/" -[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" -[#]: collector: "lujun9972" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Best DAW (Digital Audio Workstation) Available for Linux Desktops -====== - -A Digital Audio Workstation (DAW) lets you record, mix, and make music. For commercial usage, there are several mainstream options to consider, which are often regarded as industry-standard. - -Full-fledged music DAWs like Steinberg’s Nuendo/Cubase, ProTools, Ableton Live, and FL Studio are the most popular (and expensive) solutions. However, they are not available for Linux. - -Hence, when it comes to Linux, you will have to make a different set of choices as per the available options. And, here, I aim to help you point out the best music DAWs for Linux. - -### Things to Keep in Mind Before Using a DAW for Linux - -Even though you can achieve the same result as you would in a Windows/macOS system, there are a few pointers that you should know before choosing to use a DAW for Linux. - -If you are a professional and have used Linux, you may be already aware of them. But, for new Linux users, this could help you make a decision: - - * Many audio interfaces do not officially support Linux. So, you may want to check the compatibility and the audio setup process before starting. - * Popular audio plugins may not work directly. You will have to look for alternatives or try using Wine (which is a time-consuming process). - * Plug and play may not be the case. Manual setup is needed for a variety of tasks - - - -Overall, there are some prerequisites when it comes to using a DAW in Linux. It may not be as simple as installing it and getting started making music. So, you need to be aware of these before choosing Linux as your preferred platform for a DAW. - -Note that there are several [audio editors available for Linux][1], but not all of them can be used as a full-fledged DAW. - -Now that you know the caveats, let me mention the best Linux DAWs available. - -Non-FOSS alert! - -Some applications mentioned here are not open source. They are listed here because they are available on Linux and the article’s focus is on Linux. - -### Top Linux DAWs - -While there could be multiple DAWs available for Linux, to make sure that you get the best hardware/software compatibility along with an easy-to-use interface, we have limited our list to popular options. - -#### 1\. Ardour - -![][2] - -Ardour is the most popular open-source DAW available for Linux. It is also available for Windows and macOS. - -It is a suitable option for musicians, audio engineers, and composers. You get all the essential abilities to edit a score, and record/mix a song. - -It comes with several plugin support out of the box. But, you need to manually add them to the mixer by adding them from the plugin manager. Also, you can choose to add external VST3 plugins by specifying the path for them. Ardour also supports a video timeline if you are looking to extract audio from it or sync. - -##### Installing Ardour in Linux - -Unlike any other premium DAWs, you do not need to pay a hefty price to get access to it. All you need to do is get a subscription of as low as $1/month and you can continue access to the program and its updates as long as your subscription is active. - -If you are not interested in a subscription, you can choose to opt for one-time payments that should give you access to minor updates along with the next major version (depending on the amount you pay). - -The best thing—you also get access to its development (or nightly) builds if you are fond of testing upcoming features and improvements. - -For Linux distributions, it provides a .run file which you can easily start from the terminal. - -[Ardour][3] - -### 2\. LMMS - -![][4] - -LMMS is a free and open-source DAW available for Linux and other platforms. - -When compared to some other DAWs, LMMS might fall short on the specialties needed by a professional. - -However, it should offer some features if you are starting out to create music, or need something without needing to purchase/subscribe to anything. In other words, it is a suitable song editor DAW. - -If you are coming from another DAW on another platform, the user interface may not be comfortable to get acquainted with. But, it is easy to use when you get used to it. - -It also supports piano notes labels to help you with your music-making experience. - -##### Installing LMMS in Linux - -You get the option to download an AppImage file to work on any Linux distribution of your choice. It is rather easy to configure, so you only need to specify a working directory to get started. - -[LMMS][5] - -### 3\. Bitwig Studio - -![][6] - -Bitwig Studio is one of the popular mainstream music DAWs that also supports Linux. When compared to other DAWs in this list, Bitwig offers better cross-platform support and hardware integration. - -Even though you may stick to Linux for music production, having cross-platform support to carry on your work where you left is an important criterion for some as well. - -Bitwig includes a variety of creative tools to manipulate audio files and signals. So, it is perfectly suitable for a professional requirement. - -### Installing Bitwig Studio in Linux - -It offers a traditional DEB package for installation. You can use it for free in a “Demo mode” which does not let you save and export anything. Bitwig Studio is also available as a [Flatpak][7] on [Flathub][8]. - -To unlock all the features, you need to purchase it for **$399**. - -[Bitwig Studio][9] - -### 4\. REAPER - -![][10] - -Reaper is an affordable DAW available for Linux. It offers a simple user interface with all the essential features. - -It may not offer many out-of-the-box plugins and functionalities compared to Bitwig Studio, but it should be good enough for most of the usual needs like modulation, automation, using VST plugins, and more. - -Even though I haven’t personally used it, Reaper claims that it is highly customizable and offers good compatibility with a variety of hardware. - -### Installing Reaper in Linux - -Unlike other options, Reaper offers a tar archived package that you need to extract and install. It includes a script file. So, once you extract it, open the terminal in that folder or navigate to the folder in the terminal and then execute the script with the following command - -``` -./install-reaper.sh -``` - -When you install it, the script generates another script to let you uninstall as well. So, make sure to carefully choose the folder when installing and make sure you can find it when required. - -You can use it for free without any limitations for up to 60 days before you need to purchase it. So, I’d say that is a pretty good thing if you want to thoroughly test things before purchasing a DAW. - -The cost for personal use is **$60** and if you need it for commercial use, it will cost you **$225**. - -[Reaper][11] - -### Wrapping Up - -Unfortunately, you will not find many Digital Audio Workstation options available for Linux. You can try running some of the popular music DAWs using Wine, but I’m not sure of the success rate. - -In either case, the ones mentioned here should be more than enough for the majority of users. - -What DAW do you prefer for music production? Let me know your thoughts in the comments below. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/best-daw-linux/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://itsfoss.com/best-audio-editors-linux/ -[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/ardour-daw.png?resize=800%2C476&ssl=1 -[3]: https://ardour.org/ -[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/09/lmms-daw.png?resize=800%2C476&ssl=1 -[5]: https://lmms.io/lsp/ -[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/bitwig-studio-linux.png?resize=800%2C457&ssl=1 -[7]: https://itsfoss.com/what-is-flatpak/ -[8]: https://flathub.org/apps/details/com.bitwig.BitwigStudio -[9]: https://www.bitwig.com/ -[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/reaper-linux.png?resize=800%2C614&ssl=1 -[11]: https://www.reaper.fm diff --git a/translated/tech/20211031 Best DAW (Digital Audio Workstation) Available for Linux Desktops.md b/translated/tech/20211031 Best DAW (Digital Audio Workstation) Available for Linux Desktops.md new file mode 100644 index 0000000000..69266da0ae --- /dev/null +++ b/translated/tech/20211031 Best DAW (Digital Audio Workstation) Available for Linux Desktops.md @@ -0,0 +1,162 @@ +[#]: subject: "Best DAW (Digital Audio Workstation) Available for Linux Desktops" +[#]: via: "https://itsfoss.com/best-daw-linux/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +最佳 Linux 桌面 DAW(数字音频工作站) +====== + +数字音频工作站(DAW)可以让你录音、混音和制作音乐。对于商业用途,有几个主流的选择可以考虑,它们通常被认为是行业标准。 + +像 Steinberg 的 Nuendo/Cubase、ProTools、Ableton Live 和 FL Studio 这样成熟的音乐 DAW 是最流行(也是最昂贵)的解决方案。然而,它们并不能用于 Linux。 + +因此,当涉及到 Linux 时,你将不得不根据现有的选项做出不同的选择。而且,在这里,我的目的是帮助你指出 Linux 上最好的音乐 DAW。 + +### 在使用 Linux 上的 DAW 之前要记住的事情 + +尽管你可以达到与 Windows/MacOS 系统相同的效果,但在选择使用 Linux 的 DAW 之前,你应该知道一些要点。 + +如果你是专业人士,并且使用过 Linux,你可能已经知道了这些。但是,对于新的 Linux 用户,这可以帮助你做出决定: + + * 许多音频接口没有正式支持 Linux。所以,你可能要在开始之前检查一下兼容性和音频设置过程。 + * 流行的音频插件可能无法直接工作。你将不得不寻找替代品或尝试使用 Wine(这是一个耗时的过程)。 + * 即插即用的情况可能不存在。各种任务都需要手动设置 + + + +总的来说,在 Linux 中使用 DAW 时,有一些先决条件。它可能不能简单地安装然后就能开始制作音乐。所以,在选择 Linux 作为 DAW 的首选平台之前,你需要了解这些。 + +请注意,有几个[可用于 Linux 的音频编辑器][1],但不是所有的都可以作为一个成熟的 DAW 使用。 + +现在你知道了这些注意事项,让我提一下目前最好的 Linux DAW。 + +非 FOSS 警报! + +这里提到的一些应用并不是开源的。它们被列在这里是因为它们在 Linux 上可用,而文章的重点是 Linux。 + +### 顶级 Linux DAW + +虽然可能有多个 DAW 可用于 Linux,但为了确保你得到最好的硬件/软件兼容性以及易于使用的界面,我们将我们的列表限制在流行的选项上。 + +#### 1\. Ardour + +![][2] + +Ardour 是最流行的开源 DAW,可用于 Linux。它也可用于 Windows 和 macOS。 + +它是音乐家、音频工程师和作曲家的一个合适选择。你可以获得编辑乐谱和录制/混合歌曲的所有基本能力。 + +它开箱就有几个插件支持。但是,你需要通过在插件管理器中手动添加它们到混音器中。另外,你可以选择通过指定路径来添加外部 VST3 插件。如果你想从中提取音频或同步,Ardour 还支持视频时间线。 + +##### 在 Linux 中安装 Ardour + +与其他高级 DAW 不同,你不需要支付高昂的价格就可以使用它。你所需要做的就是购买一个低至 1 美元/月的订阅,只要你的订阅是有效的,你就可以继续访问这个程序和它的更新。 + +如果你对订阅不感兴趣,你可以选择一次性付款,这将使你获得小的更新和下一个主要版本(取决于你支付的金额)。 + +最重要的是,如果你喜欢测试即将到来的功能和改进,你还可以访问其开发(或每日)构建。 + +于 Linux 发行版,它提供了一个 .run文 件,你可以轻松地从终端启动。 + +[Ardour][3] + +### 2\. LMMS + +![][4] + +LMMS 是一个免费和开源的 DAW,可用于 Linux 和其他平台。 + +与其他一些 DAW 相比,LMMS 在专业人员所需的专业方面可能有所欠缺。 + +然而,如果你开始创作音乐,或者需要不需要购买/订阅任何东西,它应该提供一些功能。换句话说,它是一个合适的歌曲编辑 DAW。 + +如果你是从另一个平台上的 DAW 来的,用户界面可能不太容易熟悉。但是,当你习惯了它,它就很容易使用了。 + +它还支持钢琴音符标签,以帮助你获得音乐制作体验。 + +##### 在 Linux 中安装 LMMS + +你可以选择下载一个 AppImage 文件,在你选择的任何 Linux 发行版上工作。它的配置相当简单,所以你只需要指定一个工作目录就可以开始了。 + +[LMMS][5] + +### 3\. Bitwig Studio + +![][6] + +Bitwig Studio 是流行的主流音乐 DAW 之一,也支持Linux。与本列表中的其他DAW相比,Bitwig提供了更好的跨平台支持和硬件集成。 + +即使你可能坚持使用 Linux 进行音乐制作,但拥有跨平台的支持,以便在你离开的地方继续你的工作,对一些人来说也是一个重要的标准。 + +Bitwig包括各种创造性的工具来处理音频文件和信号。所以,它完全可以满足专业要求。 + +### 在 Linux 中安装 Bitwig Studio + +它提供了一个传统的 DEB 包用于安装。你可以在“演示模式”下免费使用它,它不允许你保存和导出任何东西。Bitwig Studio 在 [Flathub][8] 上还有一个 [Flatpak][7] 包。 + +要解锁所有的功能,你需要以 **$399** 的价格购买它。 + +[Bitwig Studio][9] + +### 4\. REAPER + +![][10] + +Reaper 是一个可用于 Linux 的经济型 DAW。它提供了一个简单的用户界面和所有的基本功能。 + +Bitwig Studio 相比,它可能没有提供很多开箱即用的插件和功能,但它应该足以满足大多数通常的需求,如调制、自动化、使用 VST 插件等等。 + +尽管我没有亲自使用过它,但 Reaper 声称它是高度可定制的,并提供了与各种硬件的良好兼容性。 + +### 在 Linux 中安装 Reaper + +与其他选择不同,Reaper 提供了一个 tar 包,你需要解压和安装。它包括一个脚本文件。因此,当你解压后,在该文件夹中打开终端或在终端中进入文件夹,然后用以下命令执行该脚本: + +``` +./install-reaper.sh +``` + +当你安装它时,该脚本也会生成另一个脚本让你卸载。所以,在安装时一定要仔细选择文件夹,并确保在需要时能找到它。 + +在你需要购买它之前,你可以免费使用它,而没有任何限制,最长可达 60 天。所以,如果你想在购买 DAW 之前彻底测试一下,我想说这是一件非常好的事情。 + +个人使用的费用是 **$60**,如果你需要用于商业用途,则需要 **$225**。 + +[Reaper][11] + +### 总结 + +不幸的是,你不会发现有很多 DAW 可用于 Linux。你可以尝试用 Wine 来运行一些流行的音乐 DAW,但我不确定成功率有多少。 + +无论是哪种情况,这里提到的这些对于大多数用户来说应该是绰绰有余了。 + +你喜欢哪种 DAW 用于音乐制作?请在下面的评论中告诉我你的想法。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/best-daw-linux/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/best-audio-editors-linux/ +[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/ardour-daw.png?resize=800%2C476&ssl=1 +[3]: https://ardour.org/ +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/09/lmms-daw.png?resize=800%2C476&ssl=1 +[5]: https://lmms.io/lsp/ +[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/bitwig-studio-linux.png?resize=800%2C457&ssl=1 +[7]: https://itsfoss.com/what-is-flatpak/ +[8]: https://flathub.org/apps/details/com.bitwig.BitwigStudio +[9]: https://www.bitwig.com/ +[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/reaper-linux.png?resize=800%2C614&ssl=1 +[11]: https://www.reaper.fm From 62630653db5d37a64d3d9728d011dc90071a58b7 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 30 Nov 2021 08:49:47 +0800 Subject: [PATCH 044/244] translating --- sources/tech/20211128 Install apps on Linux with Flatpak.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20211128 Install apps on Linux with Flatpak.md b/sources/tech/20211128 Install apps on Linux with Flatpak.md index 8b1169babb..f183c45d8d 100644 --- a/sources/tech/20211128 Install apps on Linux with Flatpak.md +++ b/sources/tech/20211128 Install apps on Linux with Flatpak.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/21/11/install-flatpak-linux" [#]: author: "Seth Kenlon https://opensource.com/users/seth" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 9aef593e901f36adde7162af3ea58dba81d86b3d Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Tue, 30 Nov 2021 11:42:53 +0800 Subject: [PATCH 045/244] =?UTF-8?q?Rename=20sources/news/20211129=20It-s?= =?UTF-8?q?=20Time=20More=20Linux=20Distros=20and=20DEs=20Become=20?= =?UTF-8?q?=E2=80=98Linus-Proof.md=20to=20sources/talk/20211129=20It-s=20T?= =?UTF-8?q?ime=20More=20Linux=20Distros=20and=20DEs=20Become=20=E2=80=98Li?= =?UTF-8?q?nus-Proof.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...29 It-s Time More Linux Distros and DEs Become ‘Linus-Proof.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{news => talk}/20211129 It-s Time More Linux Distros and DEs Become ‘Linus-Proof.md (100%) diff --git a/sources/news/20211129 It-s Time More Linux Distros and DEs Become ‘Linus-Proof.md b/sources/talk/20211129 It-s Time More Linux Distros and DEs Become ‘Linus-Proof.md similarity index 100% rename from sources/news/20211129 It-s Time More Linux Distros and DEs Become ‘Linus-Proof.md rename to sources/talk/20211129 It-s Time More Linux Distros and DEs Become ‘Linus-Proof.md From 10be8265c2a314b75f3a607155b6af17001f8361 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 30 Nov 2021 11:47:19 +0800 Subject: [PATCH 046/244] APL --- ... can compile open source code in these three simple steps.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20211129 Anyone can compile open source code in these three simple steps.md b/sources/tech/20211129 Anyone can compile open source code in these three simple steps.md index b96ee34649..5b85e1bafa 100644 --- a/sources/tech/20211129 Anyone can compile open source code in these three simple steps.md +++ b/sources/tech/20211129 Anyone can compile open source code in these three simple steps.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/21/11/compiling-code" [#]: author: "Seth Kenlon https://opensource.com/users/seth" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "wxy" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From c267d80b324a973800be229399e774a4f896acaa Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 30 Nov 2021 13:37:29 +0800 Subject: [PATCH 047/244] TSL&PRF --- ...source code in these three simple steps.md | 285 ------------------ ...source code in these three simple steps.md | 245 +++++++++++++++ 2 files changed, 245 insertions(+), 285 deletions(-) delete mode 100644 sources/tech/20211129 Anyone can compile open source code in these three simple steps.md create mode 100644 translated/tech/20211129 Anyone can compile open source code in these three simple steps.md diff --git a/sources/tech/20211129 Anyone can compile open source code in these three simple steps.md b/sources/tech/20211129 Anyone can compile open source code in these three simple steps.md deleted file mode 100644 index 5b85e1bafa..0000000000 --- a/sources/tech/20211129 Anyone can compile open source code in these three simple steps.md +++ /dev/null @@ -1,285 +0,0 @@ -[#]: subject: "Anyone can compile open source code in these three simple steps" -[#]: via: "https://opensource.com/article/21/11/compiling-code" -[#]: author: "Seth Kenlon https://opensource.com/users/seth" -[#]: collector: "lujun9972" -[#]: translator: "wxy" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Anyone can compile open source code in these three simple steps -====== -You don't need to know how to write or read code to compile it. -![Developing code.][1] - -There are many ways to install software, but you get an option not available elsewhere with open source: You can compile the code yourself. The classic three-step process to compile source code: - - -``` - - -$ ./configure -$ make -$ sudo make install - -``` - -Thanks to these commands, you might be surprised to find that you don't need to know how to write or even read code to compile it. - -### Install commands to build software - -As this is your first time compiling, there's a one-time preparatory step to install the commands for building software. Specifically, you need a compiler. A compiler, such as GCC or LLVM, turns source code that looks like this: - - -``` - - -#include <iostream> - -using namespace std; - -int main() { -  cout << "hello world"; -} - -``` - -Into _machine language_, the instructions that a CPU uses to process information. You can look at machine code, but it wouldn't make any sense to you (unless you're a CPU.) - -You can get the GNU C compiler (GCC) and the LLVM compiler, along with other essential commands for compiling on Fedora, CentOS, Mageia, and similar distributions, using your package manager: - - -``` -`$ sudo dnf install @development clang` -``` - -On Debian, Elementary, Mint, and similar distributions: - - -``` -`$ sudo apt install build-essential clang` -``` - -With your system set up, there are a few tasks that you'll repeat each time you want to compile your software: - - 1. Download the source code - 2. Unarchive the source code  - 3. Compile - - - -You have all the commands you need, so now you need some software to compile. - -### 1\. Download source code - -Obtaining source code for an application is much like getting any downloadable software. You go to a website or a code management site like GitLab, SourceForge, or GitHub. Typically, open source software is available in both a work-in-progress ("current" or "nightly") form as well as a packaged "stable" release version. Use the stable version when possible unless you have reason to believe otherwise or are good enough with code to fix things when they break. The term **stable** suggests the code got tested and that the programmers of the application feel confident enough in the code to package it into a `.zip` or `.tar` archive, give it an official number and sometimes a release name, and offer it for download to the general non-programmer public. - -For this exercise, I'm using [Angband][2], an open source (GPLv2) ASCII dungeon crawler. It's a simple application with just enough complications to demonstrate what you need to consider when compiling software for yourself. - -Download the source code from the website. - -### 2\. Unarchive the source code - -Source code is often delivered as an archive because source code usually consists of multiple files. You have to extract it before interacting with it, whether it's a tarball, a zip file, a 7z file, or something else entirely.  - - -``` -`$ tar --extract --file Angband-x.y.z.tar.gz` -``` - -Once you've unarchived it, change the directory into the extracted directory and have a look around. There's usually a `README` file at the top level of the directory. This file, ideally, contains guidance on what you need to do to compile the code. The `README` often contains information on these important aspects of the code: - - * **Language:** What language the code is in (for instance, C, C++, Rust, Python). - * **Dependencies:** What other software you need to have installed on your system for this application to build and run. - * **Instructions:** The literal steps you need to take to build the software. Occasionally, they include this information within a dedicated file intuitively entitled `INSTALL`. - - - -If the `README` file doesn't contain that information, consider filing a bug report with the developer. You're not the only one who needs an introduction to source code. Regardless of how experienced they are, everyone is new to source code they've never seen before, and documentation is important! - -Angband's maintainers link to online instructions to describe how to compile the code. This document also describes what other software you need to have installed, although it doesn't exactly spell it out. The site says, "There are several different front ends that you can optionally build (GCU, SDL, SDL2, and X11) using arguments to configure such as `--enable-sdl`, `--disable-x11`, etc." This may mean something to you or look like a foreign language, but this is the kind of stuff you get used to after compiling code frequently. Whether or not you understand what X11 or SDL2 is, they're both requirements that you see pretty often after regularly compiling code over a few months. You get comfortable with the idea that most software needs other software libraries because they build upon other technologies. In this case, though, Angband is very flexible and compiles with or without these optional dependencies, so for now, you can pretend that there are no additional dependencies. - -### 3\. Compile the code - -The canonical steps to build code are: - - -``` - - -$ ./configure -$ make -$ sudo make install - -``` - -Those are the steps for projects built with [Autotools][3], which is a framework created to standardize how source code is delivered. Other frameworks (such as [Cmake][4]) exist, however, and they require different steps. When projects stray from Autotools or Cmake, they tend to warn you in the `README` file. - -### Configure  - -Angband uses Autotools, so it's time to compile code! - -In the Angband directory, first, run the configuration script included with the source: - - -``` -`$ ./configure` -``` - -This step scans your system to find the dependencies that Angband requires to build correctly. Some dependencies are so basic that your computer wouldn't be running without them, while others are specialized. At the end of the process, the script gives you a report on what it has found: - - -``` - - -[...] -configure: creating ./config.status -config.status: creating mk/buildsys.mk -config.status: creating mk/extra.mk -config.status: creating src/autoconf.h - -Configuration: - -  Install path:    /usr/local -  binary path:     /usr/local/games -  config path:     /usr/local/etc/angband/ -  lib path:        /usr/local/share/angband/ -  doc path:        /usr/local/share/doc/angband/ -  var path:        (not used) -  (save and score files in ~/.angband/Angband/) - -\-- Frontends -- -\- Curses            Yes -\- X11               Yes -\- SDL2              Disabled -\- SDL               Disabled -\- Windows           Disabled -\- Test              No -\- Stats             No -\- Spoilers          Yes - -\- SDL2 sound        Disabled -\- SDL sound         Disabled - -``` - -Some of that output may make sense to you, some of it may not. Either way, you probably notice that SDL2 and SDL are marked as `Disabled`, and both Test and Stats are marked with `No`. Although negative, this isn't necessarily a bad thing. This, essentially, is the difference between a **Warning** and an **Error**. Had the configure script encountered something that would prevent it from building the code, it would have alerted you with an error. - -If you want to optimize your build a little, you can choose to resolve these negative messages. By searching through the Angband documentation, you might decide that Test and Stats aren't actually of interest to you (they're developer options, specific to Angband). However, with a little online research, you might discover that SDL2 would be a nice feature to have.  - -To resolve a dependency when compiling code, you need to install the missing component and the _development libraries_ for that missing component. In other words, Angband needs SDL2 to play sound, but it needs `SDL2-devel` (called `libsdl2-dev`, on Debian systems) to build. Install both with your package manager: - - -``` -`$ sudo dnf install sdl2 sdl2-devel` -``` - -Try the configuration script again: - - -``` - - -$ ./configure --enable-sdl2 -[...] -Configuration: -[...] -\- Curses                                  Yes -\- X11                                     Yes -\- SDL2                                    Yes -\- SDL                                     Disabled -\- Windows                                 Disabled -\- Test                                    No -\- Stats                                   No -\- Spoilers                                Yes - -\- SDL sound                               Disabled -\- SDL2 sound                              Yes - -``` - -### Make - -Once everything's configured, run the `make` command: - - -``` -`$ make` -``` - -This usually takes a while, but it provides lots of visual feedback, so you'll know code is getting compiled. - -### Install  - -The final step is to install the code you've just compiled. There's nothing magical about installing code. All that happens is that lots of files get copied to very specific directories. That's true whether you're compiling from source code or running a fancy graphical install wizard. Because the code is getting copied to system-level directories, you must have root (administrative) privileges, which get granted by the `sudo` command. - - -``` -`$ sudo make install` -``` - -### Run the application - -Once the application gets installed, you can run it. According to the Angband documentation, the command to start the game is `angband`, so try it out: - - -``` -`$ angband` -``` - -### - -[angband.jpg][5] - -![Compile code lead image][6] - -(Seth Kenlon, [CC BY-SA 4.0][7]) - -### Compiling code - -I compile most of my own applications, whether on my Slackware desktop computer or my CentOS laptop using NetBSD's [pkgsrc][8] system. I find that by compiling software myself, I can be as particular as I want to be about the features included in the application, how it's configured, which library version it uses, and so on. It's rewarding, and it helps me keep up to date with new releases and, because I sometimes find bugs in the process, it helps me get involved with lots of different open source projects. - -It's rare that you have no other option but to compile software. Most open source projects provide both the source code (that's why it's called "open source") and installable packages. Compiling from source code is a choice you get to make for yourself, maybe because you want new features not yet available in the latest release or just because you prefer to compile code yourself. - -### Homework - -Angband can use either Autotools or Cmake, so if you want to experience another way of building code, try this: - - -``` - - -$ mkdir build -$ cd build -$ cmake .. -$ make -$ sudo make install - -``` - -You can also try compiling with the LLVM compiler instead of the GNU C compiler. For now, I'll leave that as an exercise for you to investigate on your own (hint: try setting the CC [environment variable][9].) - -Once you finish exploring the source code of Angband and at least a few of its dungeons (you've earned some downtime), have a look at some other codebases. Many will use Autotools or Cmake, while others may use something different. See what you can build! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/11/compiling-code - -作者:[Seth Kenlon][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/seth -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/code_development_programming.png?itok=M_QDcgz5 (Developing code.) -[2]: https://rephial.org/ -[3]: https://opensource.com/article/19/7/introduction-gnu-autotools -[4]: https://opensource.com/article/21/5/cmake -[5]: https://opensource.com/file/514986 -[6]: https://opensource.com/sites/default/files/uploads/angband.jpg (Compile code lead image) -[7]: https://creativecommons.org/licenses/by-sa/4.0/ -[8]: https://opensource.com/article/19/11/pkgsrc-netbsd-linux -[9]: https://opensource.com/article/19/8/what-are-environment-variables diff --git a/translated/tech/20211129 Anyone can compile open source code in these three simple steps.md b/translated/tech/20211129 Anyone can compile open source code in these three simple steps.md new file mode 100644 index 0000000000..fe7a8ed8a8 --- /dev/null +++ b/translated/tech/20211129 Anyone can compile open source code in these three simple steps.md @@ -0,0 +1,245 @@ +[#]: subject: "Anyone can compile open source code in these three simple steps" +[#]: via: "https://opensource.com/article/21/11/compiling-code" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: " " +[#]: url: " " + +任何人都可以通过这三个简单的步骤编译开源代码 +====== + +> 你不需要知道如何写或读代码就可以编译它。 + +![](https://img.linux.net.cn/data/attachment/album/202111/30/133708wgq4rkecgbre93e1.jpg) + +安装软件的方法有很多,但开源让你有了一个其他地方所没有的选择:你可以自己编译代码。编译源代码的经典三步流程是: + +``` +$ ./configure +$ make +$ sudo make install +``` + +由于有了这些命令,你可能会惊讶地发现,你不需要知道如何写代码,甚至不需要读代码就可以编译它。 + +### 安装用来构建软件的命令 + +由于这是你第一次进行编译,所以有一个一次性的准备步骤,即安装用于构建软件的命令。具体来说,你需要一个编译器。编译器(比如 GCC 或 LLVM)可以将像这样的源代码: + +``` +#include + +using namespace std; + +int main() { + cout << "hello world"; +} +``` + +变成 _机器语言_,即 CPU 用来处理信息的指令。你可以看一下机器代码,但它对你来说没有任何意义(除非你是一个 CPU)。 + +你可以使用你的软件包管理器安装 GNU 编译器集合(GCC)和 LLVM 编译器,以及其他在 Fedora、CentOS、Mageia 和类似发行版上进行编译的基本命令: + +``` +$ sudo dnf install @development clang +``` + +在 Debian、Elementary、Mint 和类似发行版上命令如下: + +``` +$ sudo apt install build-essential clang +``` + +在你的系统设置好后,有几项你每次编译软件时都要重复进行的任务: + + 1. 下载源代码 + 2. 展开源代码的存档文件 + 3. 编译 + +你已经有了所有你需要的命令,所以现在你需要一些软件来编译。 + +### 1、下载源代码 + +获得一个应用程序的源代码和获得任何可下载的软件一样。你得去一个网站或一个代码管理网站,如 GitLab、SourceForge 或 GitHub。 通常情况下,开源软件既有正在进行的工作(“当前current”或 “每夜nightly”)的构建版本,也有打包的“稳定stable”发布版本。在可能的情况下,使用稳定版本,除非你有理由相信,或者对代码有足够的了解,能够在出现故障时修复。术语“稳定版”表明这些代码经过了测试,而且该应用程序的程序员对代码有足够的信心,从而将其打包成 `.zip` 或 `.tar` 归档,给了它一个官方编号,有时还有一个发布名称,然后提供给一般的非程序员公众下载。 + +在这个练习中,我使用 [Angband][2],一个开源的(GPLv2)ASCII 地牢猎手游戏。这是一个简单的应用程序,其复杂程度刚好可以说明你在自己编译软件时需要考虑的问题。 + +从 [网站][2] 上下载其源代码。 + +### 2、展开源代码的存档文件 + +源代码通常是以存档的形式交付的,因为源代码通常由多个文件组成的。在与之交互之前,你必须先解压,不管它是一个 tarball、一个 zip 文件、一个 7z 文件,还是其他完全不同的东西。  + +``` +$ tar --extract --file Angband-x.y.z.tar.gz +``` + +一旦解压缩后,就把目录切换到解压缩的目录,然后看一看。通常在目录的顶层有一个 `README` 文件。这个文件,一般会包含你需要做什么来编译代码的指导。`README` 通常包含关于代码的这些重要方面的信息: + + * **语言**:代码使用的是什么语言(例如,C、C++、Rust、Python)。 + * **依赖性**:你需要在你的系统上安装其他什么的软件,以便这个应用程序能够构建和运行。 + * **说明**:你构建该软件所需要采取的明确步骤。偶尔,他们会在一个专门的文件中包含这些信息,这个文件被直观地称为 `INSTALL`。 + +如果 `README` 文件中不包含这些信息,可以考虑向开发者提交一份错误报告。你不是唯一需要介绍一下源代码的人。不管他们有多么丰富的经验,每个人都会对从未见过的源代码感到陌生,而文档是很重要的! + +Angband 的维护者给出了在线说明的链接,描述了如何编译代码。这份文件还描述了你需要安装哪些其他软件,尽管它并没有确切地说明这一点。该网站说,“有几个不同的可选构建的前端(GCU、SDL、SDL2 和 X11),你可以使用诸如 `--enable-sdl`,`--disable-x11` 的参数配置。”这可能对你来说看起来像天书,但你经常编译代码后就会习惯。无论你是否理解 X11 或 SDL2 是什么,它们都是你经过几个月定期编译代码后经常看到的要求。你会对大多数软件需要其他软件库的想法感到适应,因为它们建立在其他技术之上。不过在这种情况下,Angband 非常灵活,无论是否有这些可选的依赖,都可以进行编译,所以现在,你可以假装没有额外的依赖。 + +### 3、编译代码 + +构建代码的典型步骤是: + +``` +$ ./configure +$ make +$ sudo make install +``` + +这些是使用 [Autotools][3] 构建的项目的步骤,该框架是为了规范源代码的交付方式而创建的。然而,还有一些其他框架(如 [Cmake][4]),它们需要不同的步骤。当项目没有遵循 Autotools 或 Cmake 框架时,它们往往会在 `README` 文件中提醒你。 + +### 配置  + +Angband 使用 Autotools,所以现在是编译代码的时候了! + +在 Angband 目录中,首先,运行随源码一起提供的配置脚本: + +``` +$ ./configure +``` + +这一步将扫描你的系统,找到 Angband 正确构建所需的依赖性。有些依赖是非常基本的,没有它们你的电脑就无法运行,而有些则是专门的。在这一过程结束时,该脚本会给你一份关于它所发现的东西的报告: + +``` +[...] +configure: creating ./config.status +config.status: creating mk/buildsys.mk +config.status: creating mk/extra.mk +config.status: creating src/autoconf.h + +Configuration: + + Install path: /usr/local + binary path: /usr/local/games + config path: /usr/local/etc/angband/ + lib path: /usr/local/share/angband/ + doc path: /usr/local/share/doc/angband/ + var path: (not used) + (save and score files in ~/.angband/Angband/) + +-- Frontends -- +- Curses Yes +- X11 Yes +- SDL2 Disabled +- SDL Disabled +- Windows Disabled +- Test No +- Stats No +- Spoilers Yes + +- SDL2 sound Disabled +- SDL sound Disabled +``` + +有些输出可能对你有意义,有些可能没有。无论如何,你可能注意到 SDL2 和 SDL 被标记为 “Disabled”,Test 和 Stats 都被标记为 “None”。虽然这些信息是负面的,但这并不一定是一件坏事。从本质上讲,这就是**警告**和**错误**之间的区别。如果配置脚本遇到了会阻止它构建代码的东西,它就会用一个错误来提醒你。 + +如果你想稍微优化一下你的构建,你可以选择解决这些负面信息。通过搜索 Angband 文档,你可能会确定 Test 和 Stats 实际上并不是你感兴趣的(它们是 Angband 专用于开发者的选项)。然而,通过在线研究,你可能会发现 SDL2 将是一个很好的功能。  + +要解决编译代码时的依赖问题,你需要安装缺少的组件和该缺少的组件的 _开发库_。换句话说,Angband 需要 SDL2 来播放声音,但它需要 `SDL2-devel`(在 Debian 系统上称为 `libsdl2-dev`)来构建。用你的软件包管理器安装这两个组件: + +``` +$ sudo dnf install sdl2 sdl2-devel +``` + +再试一下配置脚本: + +``` +$ ./configure --enable-sdl2 +[...] +Configuration: +[...] +- Curses Yes +- X11 Yes +- SDL2 Yes +- SDL Disabled +- Windows Disabled +- Test No +- Stats No +- Spoilers Yes + +- SDL sound Disabled +- SDL2 sound Yes +``` + +### 制作(编译) + +一旦一切配置完毕,运行 `make` 命令: + +``` +$ make +``` + +这通常需要一段时间,但它提供了很多视觉反馈,所以你会知道代码正在被编译。 + +### 安装 + +最后一步是安装你刚刚编译的代码。安装代码并没有什么神奇之处。所做的就是复制很多文件到非常具体的目录中。无论你是从源代码编译还是运行花哨的图形安装向导,都是如此。由于这些代码会被复制到系统级目录,你必须有 root(管理)权限,这是由 `sudo` 命令授予的。 + +``` +$ sudo make install +``` + +### 运行该应用程序 + +一旦应用程序被安装,你就可以运行它。根据 Angband 文档,启动游戏的命令是 `angband`,所以可以试试: + +``` +$ angband +``` + +![Compile code lead image][6] + +### 编译代码 + +无论是在我的 Slackware 台式电脑上,还是在我的 CentOS 笔记本电脑上,我都会使用 NetBSD 的 [pkgsrc][8] 系统编译我自己的大部分应用程序。我发现,通过自己编译软件,我可以对应用程序中包含的功能、如何配置、使用的库版本等有自己的想法。这很有意义,它帮助我跟上了新的版本,而且因为我有时会在这个过程中发现错误,它帮助我参与了很多不同的开源项目。 + +你很少会只有编译软件的一种方式可选,大多数开源项目同时提供源代码(这就是为什么它被称为“开源”)和可安装包。是否从源代码编译是你自己的选择,也许是因为你想要最新版本中还没有的新功能,或者只是因为你喜欢自己编译代码。 + +### 家庭作业 + +Angband 可以使用 Autotools 或 Cmake,所以如果你想体验另一种构建代码的方式,可以试试这个: + +``` +$ mkdir build +$ cd build +$ cmake .. +$ make +$ sudo make install +``` + +你也可以尝试用 LLVM 编译器而不是 GNU 编译器集合(GCC)进行编译。现在,我把这个问题留给你自己去研究(提示:尝试设置 `CC` [环境变量][9])。 + +一旦你完成了对 Angband 的源代码和至少几个地牢的探索(你已经赢得了一些休息时间),可以看看其他一些代码库。很多人都会使用 Autotools 或 Cmake,而其他人可能会使用不同的东西。看看你能构建的成果! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/11/compiling-code + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/code_development_programming.png?itok=M_QDcgz5 (Developing code.) +[2]: https://rephial.org/ +[3]: https://opensource.com/article/19/7/introduction-gnu-autotools +[4]: https://opensource.com/article/21/5/cmake +[5]: https://opensource.com/file/514986 +[6]: https://opensource.com/sites/default/files/uploads/angband.jpg (Compile code lead image) +[7]: https://creativecommons.org/licenses/by-sa/4.0/ +[8]: https://opensource.com/article/19/11/pkgsrc-netbsd-linux +[9]: https://opensource.com/article/19/8/what-are-environment-variables From 324f70822a59728f403fc6b1f8131558dc0d4b29 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 30 Nov 2021 13:40:30 +0800 Subject: [PATCH 048/244] PUB @wxy https://linux.cn/article-14033-1.html --- ...an compile open source code in these three simple steps.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20211129 Anyone can compile open source code in these three simple steps.md (99%) diff --git a/translated/tech/20211129 Anyone can compile open source code in these three simple steps.md b/published/20211129 Anyone can compile open source code in these three simple steps.md similarity index 99% rename from translated/tech/20211129 Anyone can compile open source code in these three simple steps.md rename to published/20211129 Anyone can compile open source code in these three simple steps.md index fe7a8ed8a8..2ef3aa0e5a 100644 --- a/translated/tech/20211129 Anyone can compile open source code in these three simple steps.md +++ b/published/20211129 Anyone can compile open source code in these three simple steps.md @@ -4,8 +4,8 @@ [#]: collector: "lujun9972" [#]: translator: "wxy" [#]: reviewer: "wxy" -[#]: publisher: " " -[#]: url: " " +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14033-1.html" 任何人都可以通过这三个简单的步骤编译开源代码 ====== From 334f79a47162d719aef83179f21b85da20f68c70 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 30 Nov 2021 13:53:00 +0800 Subject: [PATCH 049/244] PRF&PUB @geekpi https://linux.cn/article-14034-1.html --- ...k Permissions Graphically With Flatseal.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) rename {translated/tech => published}/20211124 Manage Flatpak Permissions Graphically With Flatseal.md (82%) diff --git a/translated/tech/20211124 Manage Flatpak Permissions Graphically With Flatseal.md b/published/20211124 Manage Flatpak Permissions Graphically With Flatseal.md similarity index 82% rename from translated/tech/20211124 Manage Flatpak Permissions Graphically With Flatseal.md rename to published/20211124 Manage Flatpak Permissions Graphically With Flatseal.md index c339505a83..54ecedd0de 100644 --- a/translated/tech/20211124 Manage Flatpak Permissions Graphically With Flatseal.md +++ b/published/20211124 Manage Flatpak Permissions Graphically With Flatseal.md @@ -3,18 +3,20 @@ [#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" [#]: collector: "lujun9972" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14034-1.html" -用 Flatseal 图形化管理 Flatpak 的权限 +用 Flatseal 图形化管理 Flatpak 应用的权限 ====== +![](https://img.linux.net.cn/data/attachment/album/202111/30/135209fbcvqnvnzidvg2hw.jpg) + 新版本的安卓系统让你对单个应用的访问和权限有了更精细的控制。这一点至关重要,因为许多应用曾经(正在)滥用系统权限。下载一个天气应用,它将要求访问你的通话记录,好像这与天气有什么关系一样。 为什么我在说安卓应用的权限?因为这可能与此应用的功能有关。 -你可能已经知道[什么是 Flatpak][1]。这些都是沙盒应用,可以选择访问系统资源,如文件存储、网络接口等。 +你可能已经知道 [什么是 Flatpak][1]。这些都是沙盒应用,可以选择访问系统资源,如文件存储、网络接口等。 就像 Android 一样,你可以控制 Flatpak 应用对系统资源的访问。默认情况下,这要用 [Flatpak 命令][2],不是每个人都能适应它。 @@ -26,7 +28,7 @@ [Flatseal][4] 是一个图形化的工具,用于审查和修改你的 Flatpak 应用的权限。这使得事情比通过命令要容易得多。 -Flatseal 会列出所有已安装的 Flatpak 应用。当你选择一个,你可以看到所有的权限。已启用的权限很容易被发现,如果你愿意,你可以禁用它。 +Flatseal 会列出所有已安装的 Flatpak 应用。当你选择一个应用,你可以看到所有的权限。很容易发现已启用的权限,如果你愿意,你可以禁用它。 例如,Ksnip 是一个屏幕截图工具,但它也有联网权限,可以用 Imgur 等在线服务分享截图。如果你不需要它,你可以禁用它。 @@ -38,7 +40,7 @@ Flatseal 会列出所有已安装的 Flatpak 应用。当你选择一个,你 ### 安装 Flatseal -既然都是 Flatpak,那么 Flatseal 作为一个 Flatpak 包来使用也是合理的。 +既然管理的都是 Flatpak,那么 Flatseal 作为一个 Flatpak 包来使用也是合理的。 在 Fedora 上,如果已经添加 Flathub 仓库,你可以从软件中心安装它。 @@ -47,14 +49,12 @@ Flatseal 会列出所有已安装的 Flatpak 应用。当你选择一个,你 否则,命令行总是可以帮助你。 ``` - - flatpak install flathub com.github.tchx84.Flatseal - +flatpak install flathub com.github.tchx84.Flatseal ``` ### 你真的需要控制权限吗? -这是一个主观的问题,完全取决于你。值得庆幸的是,到目前为止,桌面 Linux 应用并不像 Android 应用那样滥用。 +这是一个主观的问题,完全取决于你。值得庆幸的是,到目前为止,桌面 Linux 应用并不像 Android 应用那样滥用权限。 一个普通用户通常不会去管这些事情,这完全没问题。 @@ -71,7 +71,7 @@ via: https://itsfoss.com/flatseal/ 作者:[Abhishek Prakash][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From baceff8a0e60f3dcfd57ab1e557359617dbfbc04 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 1 Dec 2021 05:02:32 +0800 Subject: [PATCH 050/244] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211201=20?= =?UTF-8?q?Installing=20and=20Using=20Homebrew=20Package=20Manager=20on=20?= =?UTF-8?q?Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211201 Installing and Using Homebrew Package Manager on Linux.md --- ...Using Homebrew Package Manager on Linux.md | 222 ++++++++++++++++++ 1 file changed, 222 insertions(+) create mode 100644 sources/tech/20211201 Installing and Using Homebrew Package Manager on Linux.md diff --git a/sources/tech/20211201 Installing and Using Homebrew Package Manager on Linux.md b/sources/tech/20211201 Installing and Using Homebrew Package Manager on Linux.md new file mode 100644 index 0000000000..5283b6a1e3 --- /dev/null +++ b/sources/tech/20211201 Installing and Using Homebrew Package Manager on Linux.md @@ -0,0 +1,222 @@ +[#]: subject: "Installing and Using Homebrew Package Manager on Linux" +[#]: via: "https://itsfoss.com/homebrew-linux/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Installing and Using Homebrew Package Manager on Linux +====== + +Homebrew, also known as Brew, is a command line package manager primarily created for macOS. + +[Homebrew][1] grew quite popular among macOS users as more developers created command line tools that could be easily installed with Homebrew. + +This popularity resulted in the creation of Linuxbrew, a Linux port for Homebrew. Since it is primarily Git and Ruby, and Linux and macOS are both Unix-like systems, Brew works good on both kind of operating systems. + +Linuxbrew project eventually merged with Homebrew project and now you just have one Brew project called Homebrew. + +Why am I calling it brew, instead of Homebrew? Because the command starts with brew. You’ll see it in detail in a later section. + +### Why use Homebrew package manager on Linux when you have got apt, dnf, snap etc? + +I know the feeling. You already have a good [package manager][2] provided by your distribution. In addition to that, you have Snap, Flatpak and other universal package system. + +Do you really need Homebrew package manager on your Linux system? The answer depends on your requirement, really. + +See, apart from the distribution’s package manager and universal packages, you’ll come across situations where you need other package managers like [Pip][3] (for Python applications) and [Cargo][4] (for Rust packages). + +Imagine you came across a good command line utility and want to try it. It’s repository mentions that it can be installed using brew or source code only. In such a case, having brew on your system could be helpful. After all, [installing from source code][5] in the 2020s is not fashionable (and comfortable). + +In other words, you’ll have an additional option in case you come across some interesting CLI tool that provides only brew installation option. + +### Install Homebrew on Ubuntu and other Linux distributions + +The installation is quite easy. You just have to make sure that you have got all the dependencies. + +#### Step 1: Install dependencies + +You need to have relatively newer version of gcc and glibc. You can [install build-essential package on Ubuntu][6] to get them. Apart from that, you also need to [install Git][7], Curl and procps (used for monitoring system process). + +You can install all of them together like this in Ubuntu and Debian based systems: + +``` + + sudo apt-get install build-essential procps curl file git + +``` + +![Iinstall dependencies for Homebrew in Ubuntu/Debian][8] + +For other distributions, please use your package manager and install these dependencies. + +#### Step 2: Install Homebrew + +You can see why you needed to [install Curl][9]. It allows you to [download the installation script file in the terminal][10]. + +Just enter this command: + +``` + + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + +``` + +When asked for RETURN key, press enter: + +![Installing Homebrew on Ubuntu][11] + +At the end of the script competition, it recommends to run a few commands to add it to the PATH variable. Homebrew is actually installed in your home directory and then soft linked to the /usr/local directory. + +![Run the suggested command under Next steps to add Homebrew to PATh variable][12] + +You can [copy and paste in terminal][13] easily. Just select the command it suggests and press Ctrl+Shift+C to copy and Ctrl+Shift+V to paste. + +Alternatively, you can just copy paste this command: + +``` + + echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> $HOME/.bash_profile + +``` + +And then this: + +``` + + eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" + +``` + +![Adding brew commands to the PATH][14] + +#### Step 3: Verify brew installation + +You are almost done. Just verify that brew command is ready to run by using the brew doctor command: + +``` + + brew doctor + +``` + +The brew doctor command will tell you if there is any issue. + +You may double verify by installing the sample hello project: + +``` + + brew install hello + +``` + +If you see no errors, you can enjoy the Homebrew package manager on Linux. + +### Using brew command for installing, removing and managing packages + +Let me quickly tell you a few brew commands you can use for installing, removing and managing packages. + +Since Homebrew is installed in your home directory, you do not need sudo to run it (just like Pip and Cargo). + +To install a package with brew, use the install option: + +``` + + brew install package_name + +``` + +There is no autocompletion for the package name here. You need to know the exact package name. + +To remove a brew package, you can use either **remove** or **uninstall** option. Both works the same. + +``` + + brew remove package_name + +``` + +You can also list the installed brew packages with this command: + +``` + + brew list + +``` + +You can also remove the unneeded dependencies with the autoremove option: + +``` + + brew autoremove + +``` + +In the next screenshot, I had only two packages installed with brew but it also shows the dependencies installed for those packages. Even after removing the package, dependencies remained. The autoremove finally removed them. + +![Listing and removing brew apckages][15] + +There are a lot more brew command options but that is out of scope for this tutorial. You can always [go through their documentation][16] and explore it further. + +### Removing Homebrew from Linux + +This tutorial won’t complete without adding the steps for removing Homebrew from your Linux system. + +As per the [steps mentioned on its GitHub repository][17], you have to download and run the uninstall script using this command: + +``` + + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)" + +``` + +You’ll be asked to confirm the removal by entering the Y key. + +![Removing Homebrew from Linux][18] + +When the uninstallation of Homebrew completes, it lists the files and directories it has leftover: + +![Remaining files after Homebrew removal][19] + +I let you remove the files and directories on your own. + +### Conclusion + +As I explained earlier, Homebrew provides an extension to what you have already got. If you stumble upon an application that has only brew as installation method, having Homebrew installed on your Linux system will come handy. + +Anything you want to add to this topic or share your question or opinion? Please use the comment section. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/homebrew-linux/ + +作者:[Abhishek Prakash][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://brew.sh/ +[2]: https://itsfoss.com/package-manager/ +[3]: https://itsfoss.com/install-pip-ubuntu/ +[4]: https://itsfoss.com/install-rust-cargo-ubuntu-linux/ +[5]: https://itsfoss.com/install-software-from-source-code/ +[6]: https://itsfoss.com/build-essential-ubuntu/ +[7]: https://itsfoss.com/install-git-ubuntu/ +[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/install-dependencies-for-homebrew-linux.png?resize=800%2C493&ssl=1 +[9]: https://itsfoss.com/install-curl-ubuntu/ +[10]: https://itsfoss.com/download-files-from-linux-terminal/ +[11]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/installing-homebrew-ubuntu.png?resize=800%2C453&ssl=1 +[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/adding-homebrew-to-path-Linux.png?resize=800%2C442&ssl=1 +[13]: https://itsfoss.com/copy-paste-linux-terminal/ +[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/post-installation-steps-for-brew.png?resize=786%2C348&ssl=1 +[15]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/brew-remove-packages.png?resize=800%2C572&ssl=1 +[16]: https://docs.brew.sh/Manpage +[17]: https://github.com/homebrew/install#uninstall-homebrew +[18]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/removing-homebrew-from-Linux.png?resize=800%2C539&ssl=1 +[19]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/remaining-files-after-homebrew-removal.png?resize=800%2C464&ssl=1 From 9249d75af7c82dd8bbfa9c411b2d75ef1d340ba9 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 1 Dec 2021 05:02:48 +0800 Subject: [PATCH 051/244] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211130=20?= =?UTF-8?q?Collaborate=20on=20a=20file=20using=20Linux=20diff=20and=20patc?= =?UTF-8?q?h?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211130 Collaborate on a file using Linux diff and patch.md --- ...te on a file using Linux diff and patch.md | 164 ++++++++++++++++++ 1 file changed, 164 insertions(+) create mode 100644 sources/tech/20211130 Collaborate on a file using Linux diff and patch.md diff --git a/sources/tech/20211130 Collaborate on a file using Linux diff and patch.md b/sources/tech/20211130 Collaborate on a file using Linux diff and patch.md new file mode 100644 index 0000000000..0ef325d00f --- /dev/null +++ b/sources/tech/20211130 Collaborate on a file using Linux diff and patch.md @@ -0,0 +1,164 @@ +[#]: subject: "Collaborate on a file using Linux diff and patch" +[#]: via: "https://opensource.com/article/21/11/linux-diff-patch" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Collaborate on a file using Linux diff and patch +====== +If you've ever tried to collaborate on files over email or chat, and +you've found yourself trying to describe where you need a change made, +then you'll love diff and patch. +![a checklist for a team][1] + +I edit a lot of text files. Sometimes it's code. Other times it's the written word for role-playing games (RPGs), programming books, or general correspondence. Sometimes it's nice to make a change, but for my collaborator to compare my change with what they originally had written. Many people default to office suites, like [LibreOffice][2], using comments or change tracking features. Sometimes a simpler tool makes more sense, though, and for that, you can look at programming history for tools like `diff` and `patch`, which provide standardized formatting for tracking and applying changes to shared files. + +Even with a simple file, there's complexity in synchronizing two documents. Some items get changed, others are left alone, new content gets added, and some stay the same but are moved to different places in the document. It's difficult to replicate changes without blissfully accepting that all changes are equally valid, and replacing the old file with the new one. It's also monolithically opaque. There are so many changes that it's difficult to pick out exactly what's changed. + +With the `diff` command, you can create a record of how the file has changed, and with `patch` you can "replay" those changes over the old version to bring it up to date with the new version. + +### Setup + +Suppose you and I are collaborating on a file describing how to make a cup of tea. + +So far, the file `tea.md` contains raw copy-paste: + + +``` + + +Boil water. +Warm the teapot. +Add tea and water to the teapot. +Place a tea cosy over the teapot. +Steep for 6 minutes. +Pour tea into cup. +Add milk. + +``` + +It seems reasonable, but there are always optimizations you can make, so you send the file to me for improvement. In an effort to clarify the tea-making process, I copy the file as `tea-revision.md` and edit it, ending up with this: + + +``` + + +Warm a teapot in the proving drawer of your oven. +Boil water. +Add tea leaves to a tea strainer. +Add strainer and water to teapot. +Steep for 6 minutes. Keep it warm with a tea cosy. +Pour tea into cup. +Optionally, add warm milk. + +``` + +As expected, some items (`Boil water` and `Pour tea into cup`) are unchanged, while other lines (`Warm the teapot`) have had additions. Some lines are completely new, and some lines are the same but in a different order. + +### Create a diff + +The `diff` tool displays the difference between two files. There are a few different ways to view the results, but I think the clearest one is the `--unified` (`-u` for short) view, which shows which lines got added or subtracted. A line that's changed in any way is treated as a line that got subtracted and then added. By default, `diff` prints its output to the terminal. + +Provide `diff` with the old file and then the new file: + + +``` + + +$ diff --unified tea.md tea-revised.md  +\--- tea.md      2021-11-13 10:26:25.082110219 +1300 ++++ tea-revised.md      2021-11-13 10:26:32.049110664 +1300 +@@ -1,7 +1,7 @@ ++Warm a teapot in the proving drawer of your oven. + Boil water. +-Warm the teapot. +-Add tea and water to the teapot. +-Place a tea cosy over the teapot. +-Steep for 6 minutes. ++Add tea leaves to a tea strainer. ++Add strainer and water to teapot. ++Steep for 6 minutes. Keep it warm with a tea cosy. + Pour tea into cup. +-Add milk. ++Optionally, add warm milk. + +``` + +A plus sign (`+`) at the beginning of a line indicates something that's gotten added to the old file. A minus sign (`-`) at the beginning of a line indicates a line that's gotten removed or changed. + +### Create a patch with diff + +A patch file is just the output of the `diff --unified` command placed into a file. You can do this using standard Bash redirection: + + +``` +`$ diff -u tea.md tea-revised.md > tea.patch` +``` + +The contents of the file are exactly the same as what was output to the terminal. I like to view patch files in [Emacs][3], which color-codes each line depending on whether it's gotten added or subtracted. + +![A patch file in Emacs][4] + +(Seth Kenlon, [CC BY-SA 4.0][5]) + +### Applying changes with patch + +Once I have a patch file, I could send it to you for you to review and, optionally, apply to your old file. You apply a patch with the `patch` command: + + +``` +`$ patch tea.md tea.patch` +``` + +Lines got added, lines got subtracted, and in the end, you end up with a file identical to my version: + + +``` + + +$ cat tea.md +Warm a teapot in the proving drawer of your oven. +Boil water. +Add tea leaves to a tea strainer. +Add strainer and water to teapot. +Steep for 6 minutes. Keep it warm with a tea cosy. +Pour tea into cup. +Optionally, add warm milk. + +``` + +There's no limit to how many times you can patch a file. You could iterate on my changes, generate a new patch, and send that to me for review. Sending changes rather than results lets each contributor review what changed, decide what they want to keep or eliminate, and accurately document the process. + +### Install + +On Linux and macOS, you already have both the `diff` and `patch` commands. On Windows, you can obtain `diff` and `patch` through [Cygwin][6], or use Chocolatey to search for [diffutils][7] and [patch][8]. + +If you've ever tried to collaborate on files over email or chat, and you've found yourself trying to _describe_ where you need a change made, then you'll love `diff` and `patch`. A carefully structured file, such as code or line-delimited [Markdown][9], is easy to diff, patch, and maintain.  + +Take a look at five great open source alternatives to Google Docs. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/11/linux-diff-patch + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/checklist_hands_team_collaboration.png?itok=u82QepPk (a checklist for a team) +[2]: https://opensource.com/article/21/9/libreoffice-tips +[3]: https://opensource.com/article/20/12/emacs +[4]: https://opensource.com/sites/default/files/uploads/emacs_0_1.jpg (A patch file in Emacs) +[5]: https://creativecommons.org/licenses/by-sa/4.0/ +[6]: https://cygwin.com +[7]: https://community.chocolatey.org/packages/diffutils +[8]: https://community.chocolatey.org/packages/patch +[9]: https://opensource.com/article/19/9/introduction-markdown From 6f37a4069f31340886ae3390c088acbfe6b83dde Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 1 Dec 2021 05:03:21 +0800 Subject: [PATCH 052/244] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020211130=20?= =?UTF-8?q?CrossOver=2021.1.0=20Release=20Adds=20GTA=20V=20Support=20on=20?= =?UTF-8?q?Linux=20Among=20Other=20Enhancements?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20211130 CrossOver 21.1.0 Release Adds GTA V Support on Linux Among Other Enhancements.md --- ...pport on Linux Among Other Enhancements.md | 85 +++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 sources/news/20211130 CrossOver 21.1.0 Release Adds GTA V Support on Linux Among Other Enhancements.md diff --git a/sources/news/20211130 CrossOver 21.1.0 Release Adds GTA V Support on Linux Among Other Enhancements.md b/sources/news/20211130 CrossOver 21.1.0 Release Adds GTA V Support on Linux Among Other Enhancements.md new file mode 100644 index 0000000000..acc64a6125 --- /dev/null +++ b/sources/news/20211130 CrossOver 21.1.0 Release Adds GTA V Support on Linux Among Other Enhancements.md @@ -0,0 +1,85 @@ +[#]: subject: "CrossOver 21.1.0 Release Adds GTA V Support on Linux Among Other Enhancements" +[#]: via: "https://news.itsfoss.com/crossover-21-1-0-release/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +CrossOver 21.1.0 Release Adds GTA V Support on Linux Among Other Enhancements +====== + +CrossOver is a paid tool that lets you run Microsoft Windows software on Linux and Mac. In case you did not know, it is built on top of Wine and other open-source software along with their proprietary tools that make it easy to run Windows-only software. + +With the latest release, i.e., CrossOver 21.1.0, there are some significant additions for Linux and macOS users. + +Here, let me highlight the key changes in this release. + +### CrossOver 21.1.0: What’s New? + +![][1] + +CrossOver 21.1.0 may not be the most significant release yet, but it includes some important changes. Some include: + +#### Grand Theft Auto (GTA) V Singleplayer & Online Mode Support + +While you can already play GTA V on Linux via Steam Proton (considering its [Gold status on ProtonDB][2]), it did not work with CrossOver. + +So, if you utilize CrossOver and want to play GTA V on Linux without any configuration hassle with Wine, CrossOver 21.1.0 will let you do that. + +You can run GTA V using the standalone Rockstar Games Launcher or Steam. + +As per the [announcement][3], both the online and single-player modes are supported with the latest release. + +This should be exciting news if you have always wanted to play GTA V using Crossover/Wine. + +#### Restoring Support for Outlook 2016/365 + +With CrossOver 21.1.0, you can conveniently get back to your emails using Outlook 2016/365 on Linux. + +Of course, any [email clients for Linux][4] should help if you are no longer interested in using Outlook. + +#### Other Improvements + +Along with the two key highlights, CrossOver 21.1.0 also added support for the latest macOS Monterey and added several games for it. + +If you are on ChromeOS, the release should result in a smoother experience. + +You can also notice improvements to Ubisoft Connect and other game clients to play Windows games on Linux or macOS. + +### Get CrossOver to Support the Development of WINE + +While CrossOver is not precisely a FOSS product, but when you purchase a license for it, they contribute the revenue they make to help with the development of Wine. + +They also have a blog post explaining all the details of why [CrossOver is paid][5]. In either case, CrossOver is a fantastic tool that lets you run Windows-only software on Linux, Chrome OS, and macOS. + +If you utilize multiple platforms but still need access to Windows-only software and games, CrossOver should be a great choice. You can get yourself a license and install it on your system to get started. + +[Get CrossOver 21.1.0][6] + +#### Big Tech Websites Get Millions in Revenue, It's FOSS Got You! + +If you like what we do here at It's FOSS, please consider making a donation to support our independent publication. Your support will help us keep publishing content focusing on desktop Linux and open source software. + +I'm not interested + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/crossover-21-1-0-release/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ5MiIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[2]: https://www.protondb.com/app/271590 +[3]: https://www.codeweavers.com/support/forums/announce/?t=24;mhl=250514;msg=250514#msg250514 +[4]: https://itsfoss.com/best-email-clients-linux/ +[5]: https://www.codeweavers.com/blog/jramey/2021/6/2/fair-question-why-isnt-crossover-free +[6]: https://www.codeweavers.com/store From 87015aaa9989ba3eac288d7360de12e1fc4a2255 Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 1 Dec 2021 08:51:07 +0800 Subject: [PATCH 053/244] translated --- ... Dark GTK Themes for Your Linux Desktop.md | 194 ------------------ ... Dark GTK Themes for Your Linux Desktop.md | 192 +++++++++++++++++ 2 files changed, 192 insertions(+), 194 deletions(-) delete mode 100644 sources/tech/20211127 13 Best Dark GTK Themes for Your Linux Desktop.md create mode 100644 translated/tech/20211127 13 Best Dark GTK Themes for Your Linux Desktop.md diff --git a/sources/tech/20211127 13 Best Dark GTK Themes for Your Linux Desktop.md b/sources/tech/20211127 13 Best Dark GTK Themes for Your Linux Desktop.md deleted file mode 100644 index bfcd5738ab..0000000000 --- a/sources/tech/20211127 13 Best Dark GTK Themes for Your Linux Desktop.md +++ /dev/null @@ -1,194 +0,0 @@ -[#]: subject: "13 Best Dark GTK Themes for Your Linux Desktop" -[#]: via: "https://itsfoss.com/dark-gtk-themes/" -[#]: author: "Pratham Patel https://itsfoss.com/author/pratham/" -[#]: collector: "lujun9972" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -13 Best Dark GTK Themes for Your Linux Desktop -====== - -**With the near infinite customization options you have on any given Linux distribution, the most visually noticeable difference is customizing the theme. Let’s take a look at some of the GTK themes with dark mode.** - -Yeah, we have covered the [best Linux themes][1] in the past but this one is specifically dedicated to the dark themes. There was a time when only programmers and sysadmins preferred dark mode but that’s not the case anymore. Dark mode is loved by normal people as well and hence I compiled this list of dark themes for desktop Linux users like you. - -If you are new to theme-ing your desktop environment, you can take a look at our guide to [install themes in GNOME][2]. - -Just FYI, this is not a ranking list. - -### 1\. McMojave - -![The stock image of how McMojave looks \(courtesy of the theme developer\)][3] - -[McMojave][4] is a GTK theme which takes inspiration from the macOS style user interface. This theme is offered in dark mode, obviously, but also in light mode, for… umm… whoever may want it. - -The McMojave GTK theme obviously supports GTK based Desktop Environments like Pantheon, Gnome, XFCE, Mate etc; but, this theme is also [available for KDE users][5]. - -To compliment your Desktop Environment, which is now looking very similar to macOS, you can also install the [McMojave circle icon theme][6] for an even more complete experience. - -[McMojave][4] - -### 2\. Yaru - -![A screenshot of the default Yaru theme on Ubuntu 21.10][7] - -[Yaru][8] is the default GTK (GNOME) theme that ships with [Ubuntu][9]. The theme’s orange accent with darkened gray and hints of black is something that I feel is attractive. - -Now, you can make GNOME on Arch Linux look like Ubuntu. ( ͡° ͜ʖ ͡°) - -[Yaru][8] - -### 3\. Pop - -![A look at how the Pop GTK theme looks on Pop!_OS][10] - -[Pop GTK theme][11] is a theme created by the people at [System76][12] for their Ubuntu based Linux distribution, [Pop!_OS][13]. - -If you liked System76’s take on how GNOME should look in dark mode, you can try out the [Pop GTK theme][11] in your Linux distribution of choice. - -To complete the Pop-esque look and feel, install the System76 provided [Pop icon][14] alongside their theme as well. - -[Pop GTK][11] - -### 4\. Nordic - -![Nordic GTK theme preview][15] - -Are you someone who loves simple and a somewhat flat design approach along with some gray, well, a lot of gray? Look no further than this theme that is based on the [Nord color palette][16]. - -The Nordic GTK theme gives you exactly that. A GTK theme with simplistic design based on the Nord color palette. - -[Nord][17] - -### 5\. Ultimate-Maia - -![Stock screenshot of the Ultimate-Maia theme][18] - -Ultimate-Maia is a GTK theme based on [Google’s Material theme][19] design philosophy. This theme has a subtle yet unique look and feel to itself, especially with all the different options available for the accent color. - -[Ultimate-Maia][20] - -### 6\. Graphite - -![A look at Graphite’s flat, rounded and gray characteristic][21] - -Graphite is a GTK theme that offers a completely unique appearance to your Desktop Environment (especially GNOME) while keeping the uniqueness of your DE just as same as before. It is something to take a look at. - -[Graphite][22] - -### 7\. Qogir - -![Customization options available with Qogir GTK theme][23] - -Qogir is a GTK theme with flat design in mind. The Qogir theme goes above and beyond to provide you with customization options for title buttons, checkbox, radio buttons, switches and more. - -[Qogir][24] - -### 8\. Layan - -![Lyan – A very rounded-corners GTK theme][25] - -You will be delighted to know that this list also includes Layan, a GTK theme with emphasis on smooth, rounded corners with a bubbly aesthetic to it. The Layan theme also inherits design philosophies from [Google’s Material design][19] guidelines. - -[Layan][26] - -### 9\. Juno - -![][27] - -Juno is another one of the best dark mode friendly GTK themes I found on my radar. Some may like it’s pitch black nature, some might not. But, if you have an OLED laptop or computer display, Juno feels like it was made for you to use. - -[Juno][28] - -### 10\. Ant Themes - -![Ant themes’ available options for customization of window appearance][29] - -Ant is a GTK theme that takes some inspiration from the macOS layout and user interface elements, and in my opinion, the Ant theme implements it all nicely. - -[Ant][30] - -### 11\. Equilux - -![][31] - -Equilux theme gives you a nice theme with a subtle dark mode. This theme blends very well with GNOME and GNOME forks. I don’t have much to describe this theme, it is simple and elegant. - -[Equilux][32] - -### 12\. Orchis-dark - -![Orchis Dark][33] - -Orchis-dark is the dark variant of the super cool Orchis theme. It gives the desktop an iOS/macOS sort of touch with rounded corners and fluid interface. You can guess that immediately by just glancing at it. - -[Orchis Theme][34] - -### 13\. Elementary X - -![A look at Elementary X GTK theme with the settings panel open][35] - -Elementary X is a GTK theme based on the efforts made by the [elementary OS][36] team to customize GNOME’s appearance. If you did not know, elementary OS is a Linux distribution that is based on Ubuntu. - -[Elementary X][37] - -#### Recommended Read - -### Conclusion - -Themes listed in this article piece are nothing short of beautiful and neither are your options limited to the ones listed here. There are thousands more out in the wild. - -Comment down below if you liked a theme. If you are using a theme that I haven’t mentioned, please comment down below. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/dark-gtk-themes/ - -作者:[Pratham Patel][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/pratham/ -[b]: https://github.com/lujun9972 -[1]: https://itsfoss.com/best-gtk-themes/ -[2]: https://itsfoss.com/install-switch-themes-gnome-shell/ -[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/01_mojave.webp?resize=800%2C450&ssl=1 -[4]: https://github.com/vinceliuice/Mojave-gtk-theme -[5]: https://github.com/vinceliuice/McMojave-kde -[6]: https://github.com/vinceliuice/McMojave-circle -[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/02_yaru.webp?resize=800%2C403&ssl=1 -[8]: https://github.com/ubuntu/yaru -[9]: https://ubuntu.com/ -[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/pop_gtk.webp?resize=800%2C450&ssl=1 -[11]: https://github.com/pop-os/gtk-theme -[12]: https://system76.com/ -[13]: https://pop.system76.com/ -[14]: https://github.com/pop-os/icon-theme -[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/nordic.webp?resize=800%2C450&ssl=1 -[16]: https://github.com/arcticicestudio/nord -[17]: https://github.com/EliverLara/Nordic -[18]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/05_ultimate_maia.webp?resize=800%2C450&ssl=1 -[19]: https://material.io/ -[20]: https://github.com/bolimage/Ultimate-Maia -[21]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/06_graphite.webp?resize=800%2C450&ssl=1 -[22]: https://github.com/vinceliuice/Graphite-gtk-theme -[23]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/Qogir.webp?resize=800%2C500&ssl=1 -[24]: https://github.com/vinceliuice/Qogir-theme -[25]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/07_layan.webp?resize=800%2C450&ssl=1 -[26]: https://github.com/vinceliuice/Layan-gtk-theme -[27]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/08_juno.webp?resize=732%2C487&ssl=1 -[28]: https://github.com/EliverLara/Juno -[29]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/ant.webp?resize=800%2C533&ssl=1 -[30]: https://github.com/EliverLara/Ant -[31]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/equilux.webp?resize=800%2C450&ssl=1 -[32]: https://github.com/ddnexus/equilux-theme -[33]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/orchis-dark.webp?resize=800%2C463&ssl=1 -[34]: https://www.gnome-look.org/s/Gnome/p/1357889 -[35]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/elementary.webp?resize=800%2C450&ssl=1 -[36]: https://elementary.io/ -[37]: https://github.com/surajmandalcell/elementary-x diff --git a/translated/tech/20211127 13 Best Dark GTK Themes for Your Linux Desktop.md b/translated/tech/20211127 13 Best Dark GTK Themes for Your Linux Desktop.md new file mode 100644 index 0000000000..49d93bd2b8 --- /dev/null +++ b/translated/tech/20211127 13 Best Dark GTK Themes for Your Linux Desktop.md @@ -0,0 +1,192 @@ +[#]: subject: "13 Best Dark GTK Themes for Your Linux Desktop" +[#]: via: "https://itsfoss.com/dark-gtk-themes/" +[#]: author: "Pratham Patel https://itsfoss.com/author/pratham/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +13 个 Linux 桌面最佳深色 GTK 主题 +====== + +**在任何给定的 Linux 发行版上,你都有近乎无限的定制选项,在视觉上最明显的区别就是定制主题。让我们来看看一些具有深色模式的 GTK 主题。** + +是的,我们在过去曾介绍过[最佳 Linux 主题][1],但这一篇是专门介绍深色主题的。曾几何时,只有程序员和系统管理员喜欢深色模式,但现在已经不是这样了。深色模式也受到了普通人的喜爱,因此我为像你这样的桌面 Linux 用户编制了这个深色主题列表。 + +如果你是桌面环境主题化的新手,你可以看看我们的[在 GNOME 中安装主题][2]指南。 + +仅供参考,这并不是一个排名表。 + +### 1\. McMojave + +![The stock image of how McMojave looks \(courtesy of the theme developer\)][3] + +[McMojave][4] 是一个 GTK 主题,它从 macOS 风格的用户界面中获得灵感。这个主题显然是在深色模式下提供的,但也有浅色模式,嗯...,为任何可能想要它的人。 + +McMojave GTK 主题显然支持基于 GTK 的桌面环境,如 Pantheon、Gnome、XFCE、Mate 等。但是,这个主题也[适用于 KDE 用户][5]。 + +为了让你的桌面环境看起来与 macOS 非常相似,你还可以安装 [McMojave 圆圈图标主题][6]以获得更完整的体验。 + +[McMojave][4] + +### 2\. Yaru + +![A screenshot of the default Yaru theme on Ubuntu 21.10][7] + +[Yaru][8] 是 [Ubuntu][9] 的默认 GTK(GNOME)主题。该主题的橙色点缀着暗灰色和黑色的提示,我觉得很有吸引力。 + +现在,你可以让 Arch Linux 上的 GNOME 看起来像 Ubuntu。( ͡° ͜ʖ ͡°) + +[Yaru][8] + +### 3\. Pop + +![A look at how the Pop GTK theme looks on Pop!_OS][10] + +[Pop GTK 主题][11]是由 [System76][12] 的人为他们基于 Ubuntu 的 Linux 发行版 [Pop!_OS][13] 创建的一个主题。 + +如果你喜欢 System7 6对 GNOME 在深色模式下的表现,你可以在你选择的 Linux 发行版中试用 [Pop GTK 主题][11]。 + +为了完成 Pop-esque 的外观和感觉,在安装主题的同时,还可以安装 System76 提供的 [Pop 图标][14]。 + +[Pop GTK][11] + +### 4\. Nordic + +![Nordic GTK theme preview][15] + +你是一个喜欢简单的、有点扁平化的设计方法以及一些灰色,嗯,很多灰色的人吗?不妨看看这个基于[北欧调色板][16]的主题。 + +Nordic GTK 主题给你的正是这样的感觉。一个基于北欧调色板的 GTK 主题,设计简单。 + +[Nord][17] + +### 5\. Ultimate-Maia + +![Stock screenshot of the Ultimate-Maia theme][18] + +Ultimate-Maia 是一个基于 [Google 的 Material 主题][19]设计理念的 GTK 主题。这个主题有一个微妙而独特的外观和感觉,特别是有各种不同的重点颜色可供选择。 + +[Ultimate-Maia][20] + +### 6\. Graphite + +![A look at Graphite’s flat, rounded and gray characteristic][21] + +Graphite 是一个 GTK 主题,它为你的桌面环境(尤其是 GNOME)提供了一个完全独特的外观,同时保持了你的桌面环境的独特性,就像以前一样。这是一个值得一看的东西。 + +[Graphite][22] + +### 7\. Qogir + +![Customization options available with Qogir GTK theme][23] + +Qogir是一个考虑到平面设计的 GTK 主题。Qogir 主题为你提供了标题按钮、复选框、单选按钮、开关等自定义选项。 + +[Qogir][24] + +### 8\. Layan + +![Lyan – A very rounded-corners GTK theme][25] + +你会很高兴地知道,这个列表中还包括 Layan,一个强调平滑、圆角的 GTK 主题,带有气泡的美感。Layan 主题也继承了 [Google 的 Material design][19] 指导方针的设计理念。 + +[Layan][26] + +### 9\. Juno + +![][27] + +Juno 是我发现的另一个最好的深色模式友好 GTK 主题之一。有些人可能喜欢它的漆黑性质,有些人可能不喜欢。但是,如果你有一台 OLED 笔记本或电脑显示屏,Juno 感觉是为你而生的。 + +[Juno][28] + +### 10\. Ant 主题 + +![Ant themes’ available options for customization of window appearance][29] + +Ant 是一个 GTK 主题,它从 macOS 的布局和用户界面元素中获得了一些灵感,在我看来,Ant 主题很好地实现了这一切。 + +[Ant][30] + +### 11\. Equilux + +![][31] + +Equilux 主题给你一个漂亮的主题,带有微妙的深色模式。这个主题能很好地与 GNOME 及 GNOME 分叉融合。我没有太多的东西来描述这个主题,它是简单而优雅的。 + +[Equilux][32] + +### 12\. Orchis-dark + +![Orchis Dark][33] + +Orchis-dark 是超酷的 Orchis 主题的深色变体。它为桌面提供了带有圆角和流畅界面的 iOS/macOS 触感。 只需看一眼,你就可以立即猜到。 + +[Orchis Theme][34] + +### 13\. Elementary X + +![A look at Elementary X GTK theme with the settings panel open][35] + +Elementary X 是基于 [elementary OS][36] 团队为定制 GNOME 外观所做的努力的 GTK 主题。如果你不知道,elementary OS 是一个基于 Ubuntu 的 Linux 发行版。 + +[Elementary X][37] + +### 总结 + +这篇文章中列出的主题都是非常漂亮的,而且你的选择也不限于这里列出的那些。还有其他成千上万的主题。 + +如果你喜欢一个主题,请在下面评论。如果你正在使用一个我没有提到的主题,请在下面评论。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/dark-gtk-themes/ + +作者:[Pratham Patel][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/pratham/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/best-gtk-themes/ +[2]: https://itsfoss.com/install-switch-themes-gnome-shell/ +[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/01_mojave.webp?resize=800%2C450&ssl=1 +[4]: https://github.com/vinceliuice/Mojave-gtk-theme +[5]: https://github.com/vinceliuice/McMojave-kde +[6]: https://github.com/vinceliuice/McMojave-circle +[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/02_yaru.webp?resize=800%2C403&ssl=1 +[8]: https://github.com/ubuntu/yaru +[9]: https://ubuntu.com/ +[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/pop_gtk.webp?resize=800%2C450&ssl=1 +[11]: https://github.com/pop-os/gtk-theme +[12]: https://system76.com/ +[13]: https://pop.system76.com/ +[14]: https://github.com/pop-os/icon-theme +[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/nordic.webp?resize=800%2C450&ssl=1 +[16]: https://github.com/arcticicestudio/nord +[17]: https://github.com/EliverLara/Nordic +[18]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/05_ultimate_maia.webp?resize=800%2C450&ssl=1 +[19]: https://material.io/ +[20]: https://github.com/bolimage/Ultimate-Maia +[21]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/06_graphite.webp?resize=800%2C450&ssl=1 +[22]: https://github.com/vinceliuice/Graphite-gtk-theme +[23]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/Qogir.webp?resize=800%2C500&ssl=1 +[24]: https://github.com/vinceliuice/Qogir-theme +[25]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/07_layan.webp?resize=800%2C450&ssl=1 +[26]: https://github.com/vinceliuice/Layan-gtk-theme +[27]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/08_juno.webp?resize=732%2C487&ssl=1 +[28]: https://github.com/EliverLara/Juno +[29]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/ant.webp?resize=800%2C533&ssl=1 +[30]: https://github.com/EliverLara/Ant +[31]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/equilux.webp?resize=800%2C450&ssl=1 +[32]: https://github.com/ddnexus/equilux-theme +[33]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/orchis-dark.webp?resize=800%2C463&ssl=1 +[34]: https://www.gnome-look.org/s/Gnome/p/1357889 +[35]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/elementary.webp?resize=800%2C450&ssl=1 +[36]: https://elementary.io/ +[37]: https://github.com/surajmandalcell/elementary-x From 91ce5c7f5f2cde5689957ef41dbad6a0d4a8b010 Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 1 Dec 2021 08:53:13 +0800 Subject: [PATCH 054/244] translating --- ...How to Install Apache Cassandra on Ubuntu and Other Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20211129 How to Install Apache Cassandra on Ubuntu and Other Linux.md b/sources/tech/20211129 How to Install Apache Cassandra on Ubuntu and Other Linux.md index 8d0f2497a8..aaa962a906 100644 --- a/sources/tech/20211129 How to Install Apache Cassandra on Ubuntu and Other Linux.md +++ b/sources/tech/20211129 How to Install Apache Cassandra on Ubuntu and Other Linux.md @@ -2,7 +2,7 @@ [#]: via: "https://itsfoss.com/apache-cassandra-ubuntu/" [#]: author: "Marco Carmona https://itsfoss.com/author/marco/" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 72d246dbd45808df8e2147df9c7e8f7fcd1dd14a Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 1 Dec 2021 08:59:02 +0800 Subject: [PATCH 055/244] APL --- ...20211130 Collaborate on a file using Linux diff and patch.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20211130 Collaborate on a file using Linux diff and patch.md b/sources/tech/20211130 Collaborate on a file using Linux diff and patch.md index 0ef325d00f..d6e443dea5 100644 --- a/sources/tech/20211130 Collaborate on a file using Linux diff and patch.md +++ b/sources/tech/20211130 Collaborate on a file using Linux diff and patch.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/21/11/linux-diff-patch" [#]: author: "Seth Kenlon https://opensource.com/users/seth" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "wxy" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From b83a6f87bec3ab73356480602d2503ccd93f2dc6 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 1 Dec 2021 10:26:32 +0800 Subject: [PATCH 056/244] TSL&PRF --- ...te on a file using Linux diff and patch.md | 164 ------------------ ...te on a file using Linux diff and patch.md | 142 +++++++++++++++ 2 files changed, 142 insertions(+), 164 deletions(-) delete mode 100644 sources/tech/20211130 Collaborate on a file using Linux diff and patch.md create mode 100644 translated/tech/20211130 Collaborate on a file using Linux diff and patch.md diff --git a/sources/tech/20211130 Collaborate on a file using Linux diff and patch.md b/sources/tech/20211130 Collaborate on a file using Linux diff and patch.md deleted file mode 100644 index d6e443dea5..0000000000 --- a/sources/tech/20211130 Collaborate on a file using Linux diff and patch.md +++ /dev/null @@ -1,164 +0,0 @@ -[#]: subject: "Collaborate on a file using Linux diff and patch" -[#]: via: "https://opensource.com/article/21/11/linux-diff-patch" -[#]: author: "Seth Kenlon https://opensource.com/users/seth" -[#]: collector: "lujun9972" -[#]: translator: "wxy" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Collaborate on a file using Linux diff and patch -====== -If you've ever tried to collaborate on files over email or chat, and -you've found yourself trying to describe where you need a change made, -then you'll love diff and patch. -![a checklist for a team][1] - -I edit a lot of text files. Sometimes it's code. Other times it's the written word for role-playing games (RPGs), programming books, or general correspondence. Sometimes it's nice to make a change, but for my collaborator to compare my change with what they originally had written. Many people default to office suites, like [LibreOffice][2], using comments or change tracking features. Sometimes a simpler tool makes more sense, though, and for that, you can look at programming history for tools like `diff` and `patch`, which provide standardized formatting for tracking and applying changes to shared files. - -Even with a simple file, there's complexity in synchronizing two documents. Some items get changed, others are left alone, new content gets added, and some stay the same but are moved to different places in the document. It's difficult to replicate changes without blissfully accepting that all changes are equally valid, and replacing the old file with the new one. It's also monolithically opaque. There are so many changes that it's difficult to pick out exactly what's changed. - -With the `diff` command, you can create a record of how the file has changed, and with `patch` you can "replay" those changes over the old version to bring it up to date with the new version. - -### Setup - -Suppose you and I are collaborating on a file describing how to make a cup of tea. - -So far, the file `tea.md` contains raw copy-paste: - - -``` - - -Boil water. -Warm the teapot. -Add tea and water to the teapot. -Place a tea cosy over the teapot. -Steep for 6 minutes. -Pour tea into cup. -Add milk. - -``` - -It seems reasonable, but there are always optimizations you can make, so you send the file to me for improvement. In an effort to clarify the tea-making process, I copy the file as `tea-revision.md` and edit it, ending up with this: - - -``` - - -Warm a teapot in the proving drawer of your oven. -Boil water. -Add tea leaves to a tea strainer. -Add strainer and water to teapot. -Steep for 6 minutes. Keep it warm with a tea cosy. -Pour tea into cup. -Optionally, add warm milk. - -``` - -As expected, some items (`Boil water` and `Pour tea into cup`) are unchanged, while other lines (`Warm the teapot`) have had additions. Some lines are completely new, and some lines are the same but in a different order. - -### Create a diff - -The `diff` tool displays the difference between two files. There are a few different ways to view the results, but I think the clearest one is the `--unified` (`-u` for short) view, which shows which lines got added or subtracted. A line that's changed in any way is treated as a line that got subtracted and then added. By default, `diff` prints its output to the terminal. - -Provide `diff` with the old file and then the new file: - - -``` - - -$ diff --unified tea.md tea-revised.md  -\--- tea.md      2021-11-13 10:26:25.082110219 +1300 -+++ tea-revised.md      2021-11-13 10:26:32.049110664 +1300 -@@ -1,7 +1,7 @@ -+Warm a teapot in the proving drawer of your oven. - Boil water. --Warm the teapot. --Add tea and water to the teapot. --Place a tea cosy over the teapot. --Steep for 6 minutes. -+Add tea leaves to a tea strainer. -+Add strainer and water to teapot. -+Steep for 6 minutes. Keep it warm with a tea cosy. - Pour tea into cup. --Add milk. -+Optionally, add warm milk. - -``` - -A plus sign (`+`) at the beginning of a line indicates something that's gotten added to the old file. A minus sign (`-`) at the beginning of a line indicates a line that's gotten removed or changed. - -### Create a patch with diff - -A patch file is just the output of the `diff --unified` command placed into a file. You can do this using standard Bash redirection: - - -``` -`$ diff -u tea.md tea-revised.md > tea.patch` -``` - -The contents of the file are exactly the same as what was output to the terminal. I like to view patch files in [Emacs][3], which color-codes each line depending on whether it's gotten added or subtracted. - -![A patch file in Emacs][4] - -(Seth Kenlon, [CC BY-SA 4.0][5]) - -### Applying changes with patch - -Once I have a patch file, I could send it to you for you to review and, optionally, apply to your old file. You apply a patch with the `patch` command: - - -``` -`$ patch tea.md tea.patch` -``` - -Lines got added, lines got subtracted, and in the end, you end up with a file identical to my version: - - -``` - - -$ cat tea.md -Warm a teapot in the proving drawer of your oven. -Boil water. -Add tea leaves to a tea strainer. -Add strainer and water to teapot. -Steep for 6 minutes. Keep it warm with a tea cosy. -Pour tea into cup. -Optionally, add warm milk. - -``` - -There's no limit to how many times you can patch a file. You could iterate on my changes, generate a new patch, and send that to me for review. Sending changes rather than results lets each contributor review what changed, decide what they want to keep or eliminate, and accurately document the process. - -### Install - -On Linux and macOS, you already have both the `diff` and `patch` commands. On Windows, you can obtain `diff` and `patch` through [Cygwin][6], or use Chocolatey to search for [diffutils][7] and [patch][8]. - -If you've ever tried to collaborate on files over email or chat, and you've found yourself trying to _describe_ where you need a change made, then you'll love `diff` and `patch`. A carefully structured file, such as code or line-delimited [Markdown][9], is easy to diff, patch, and maintain.  - -Take a look at five great open source alternatives to Google Docs. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/11/linux-diff-patch - -作者:[Seth Kenlon][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/seth -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/checklist_hands_team_collaboration.png?itok=u82QepPk (a checklist for a team) -[2]: https://opensource.com/article/21/9/libreoffice-tips -[3]: https://opensource.com/article/20/12/emacs -[4]: https://opensource.com/sites/default/files/uploads/emacs_0_1.jpg (A patch file in Emacs) -[5]: https://creativecommons.org/licenses/by-sa/4.0/ -[6]: https://cygwin.com -[7]: https://community.chocolatey.org/packages/diffutils -[8]: https://community.chocolatey.org/packages/patch -[9]: https://opensource.com/article/19/9/introduction-markdown diff --git a/translated/tech/20211130 Collaborate on a file using Linux diff and patch.md b/translated/tech/20211130 Collaborate on a file using Linux diff and patch.md new file mode 100644 index 0000000000..b30b90548d --- /dev/null +++ b/translated/tech/20211130 Collaborate on a file using Linux diff and patch.md @@ -0,0 +1,142 @@ +[#]: subject: "Collaborate on a file using Linux diff and patch" +[#]: via: "https://opensource.com/article/21/11/linux-diff-patch" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: " " +[#]: url: " " + +使用 Linux 的 diff 和 patch 对文件进行协作 +====== + +> 如果你曾经试图通过电子邮件或聊天来协作处理文件,并且发现自己试图描述需要修改的地方,那么你会喜欢 `diff` 和 `patch` 的。 + +![](https://img.linux.net.cn/data/attachment/album/202112/01/102607jmjbpu1jk1as61j1.jpg) + +我编辑过很多文本文件。有时是代码。其他时候是角色扮演游戏(RPG)、编程书籍或一般信件的书面文字。有时候,做一个修改,而能让我的协作者把我的修改和他们原来写的东西进行比较就更好了。许多人默认使用办公套件(如 [LibreOffice][2])的注释或更改跟踪功能。不过有时更简单的工具更有意义,为此,你可以看看像 `diff` 和 `patch` 这样的工具的编程历史,它们为跟踪和应用共享文件的变化提供了标准化的格式。 + +即使对于简单的文件,在同步两个文件时也有复杂性。一些项目被改变,另一些被保留,新的内容被添加,还有一些保持不变,但被移到文件的不同位置。如果接受所有的变化,并且用新文件替换旧文件,就很难复制变化。它也是整体不透明的。如果变化很多,就很难挑出到底发生了什么变化。 + +通过 `diff` 命令,你可以创建一个文件变化的记录,通过 `patch` 你可以在旧版本上“重放”这些变化,使其与新版本保持一致。 + +### 设置 + +假设你和我正在合作编写一个描述如何泡茶的文件。 + +到目前为止,文件 `tea.md` 包含原始的复制粘贴来的内容: + +``` +烧开水。 +加热茶壶。 +在茶壶中加入茶和水。 +在茶壶上放置一个茶叶滤网。 +浸泡 6 分钟。 +将茶倒入杯中。 +加入牛奶。 +``` + +这似乎很合理,但总有一些优化可以做,所以你把文件发给我改进。为了澄清泡茶过程,我把文件复制为`tea-revision.md`,并进行编辑,最后是这样的: + +``` +在烤箱的抽屉中加热茶壶。 +烧开水。 +将茶叶放入茶叶滤网。 +将滤网和水加入茶壶。 +浸泡 6 分钟。用茶壶罩保温。 +将茶倒入杯中。 +可以选择加入温牛奶。 +``` + +正如预期的那样,一些项目(“烧开水”和“将茶倒入杯中”)没有变化,而其他行(“加热茶壶”)则有增加。有些行是全新的,有些行是相同的,但顺序不同。 + +### 创建一个差异 + +`diff` 工具会显示两个文件之间的差异。有几种不同的方法来查看结果,但我认为最清楚的是 `—unified`(简写为 `-u`)视图,它显示哪些行被增加或减少了。以任何方式改变的行都被视为先减后增的行。默认情况下,`diff` 将其输出打印到终端。 + +向 `diff` 提供旧文件,然后是新文件: + +``` +$ diff --unified tea.md tea-revised.md  +--- tea.md      2021-11-13 10:26:25.082110219 +1300 ++++ tea-revised.md      2021-11-13 10:26:32.049110664 +1300 +@@ -1,7 +1,7 @@ ++在烤箱的抽屉中加热茶壶。 + 烧开水。 +-加热茶壶。 +-在茶壶中加入茶和水。 +-在茶壶上放置一个茶叶滤网。 +-浸泡 6 分钟。 ++将茶叶放入茶叶滤网。 ++将滤网和水加入茶壶。 ++浸泡 6 分钟。用茶壶罩保温。 + 将茶倒入杯中。 +-加入牛奶。 ++可以选择加入温牛奶。 +``` + +行首的加号(`+`)表示在旧文件中增加了一些内容。行首的减号(`-`)表示被删除或改变的行。 + +### 用 diff 创建一个补丁 + +补丁文件就是将 `diff —unified` 命令的输出放到一个文件中。你可以用标准的 Bash 重定向来做这件事: + +``` +$ diff -u tea.md tea-revised.md > tea.patch +``` + +该文件的内容与输出到终端的内容完全相同。我喜欢在 [Emacs][3] 中查看补丁文件,它对每一行进行颜色编码,取决于它是被添加还是被减去。 + +![Emacs中的补丁文件][4] + +### 用补丁应用修改 + +一旦我有了补丁文件,我就可以把它发给你,让你审查,并且可以选择应用到你的旧文件中。你可以用 `patch` 命令来应用一个补丁。 + +``` +$ patch tea.md tea.patch +``` + +增加了一些行,减少了一些行,最后,你得到了一个与我的版本相同的文件: + +``` +$ cat tea.md +在烤箱的抽屉中加热茶壶。 +烧开水。 +将茶叶放入茶叶滤网。 +将滤网和水加入茶壶。 +浸泡 6 分钟。用茶壶罩保温。 +将茶倒入杯中。 +可以选择加入温牛奶。 +``` + +你可以给一个文件打多少次补丁,这是没有限制的。你可以对我的修改进行迭代,生成一个新的补丁,然后发给我审核。发送修改内容而不是结果,可以让每个贡献者审查修改的内容,决定他们要保留或删除的内容,并准确地记录过程。 + +### 安装 + +在 Linux 和 macOS 上,你已经有了 `diff` 和 `patch` 命令。在 Windows 上,你可以通过 [Cygwin][6] 获得 `diff` 和 `patch`,或者使用 Chocolatey 搜索 [diffutils][7] 和 [patch][8]。 + +如果你曾经试图通过电子邮件或聊天来协作处理文件,并且发现自己需要 _描述_ 需要修改的地方,那么你会喜欢 `diff` 和 `patch`。一个结构严谨的文件,如代码或以行为单位的 [Markdown][9],很容易进行差异比较、补丁和维护。  + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/11/linux-diff-patch + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/checklist_hands_team_collaboration.png?itok=u82QepPk (a checklist for a team) +[2]: https://opensource.com/article/21/9/libreoffice-tips +[3]: https://opensource.com/article/20/12/emacs +[4]: https://opensource.com/sites/default/files/uploads/emacs_0_1.jpg (A patch file in Emacs) +[5]: https://creativecommons.org/licenses/by-sa/4.0/ +[6]: https://cygwin.com +[7]: https://community.chocolatey.org/packages/diffutils +[8]: https://community.chocolatey.org/packages/patch +[9]: https://opensource.com/article/19/9/introduction-markdown From 8f13ea8c643855b4a5af9f5f2c0aac58ff54a9ce Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 1 Dec 2021 10:31:34 +0800 Subject: [PATCH 057/244] =?UTF-8?q?=E5=BD=92=E6=A1=A3=20202111?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Powershell to automate Linux, macOS, and Windows processes.md | 0 published/{ => 202111}/20200629 Scaling a GraphQL Website.md | 0 .../20210604 Set and use environment variables in FreeDOS.md | 0 .../20210607 Automate tasks with BAT files on FreeDOS.md | 0 .../20210610 Install and remove software packages on FreeDOS.md | 0 .../20210614 Install FreeDOS without the installer.md | 0 .../20210616 How to use FreeDOS as an embedded system.md | 0 ...210816 Parse command-line arguments with argparse in Python.md | 0 .../20210909 How to Change Color of Ubuntu Terminal.md | 0 ...How to change Ubuntu Terminal Font and Size -Beginner-s Tip.md | 0 ...911 How to Set JAVA_HOME Variable in Ubuntu Linux Correctly.md | 0 ...isual Studio Code or Atom- Which Code Editor Should You Use.md | 0 ...or Linux to Easily Add Essential Annotations to Your Images.md | 0 ...hat is Build Essential Package in Ubuntu- How to Install it.md | 0 .../20211021 7 handy tricks for using the Linux wget command.md | 0 ...211021 What you need to know about Kubernetes NetworkPolicy.md | 0 ...7 Ferdi- A Free - Open-Source Alternative to Franz - Rambox.md | 0 .../{ => 202111}/20211029 A simple CSS trick for dark mode.md | 0 ...Destroyed- by Etcher and Rufus After Creating Live Linux USB.md | 0 .../20211031 How to kill a zombie process on Linux.md | 0 .../20211101 How I dynamically generate Jekyll config files.md | 0 ...se the Linux cowsay command for a colorful holiday greeting.md | 0 .../20211102 4 ways to edit photos on the Linux command line.md | 0 ...211102 Fedora 35 Debuts With GNOME 41 and a New KDE Variant.md | 0 ...ix- A Beautiful Cross-Platform Open-Source Download Manager.md | 0 ... becoming a technical writer with open source contributions.md | 0 ...oogle to Pay up to -50,337 for Exploiting Linux Kernel Bugs.md | 0 ...any website into a Linux desktop app with open source tools.md | 0 ...FreeBSD to Void Linux, Project Trident Finally Discontinues.md | 0 published/{ => 202111}/20211104 How to update a Linux symlink.md | 0 ...dule for Linux Kernel- How Long a Linux Kernel is Supported.md | 0 .../20211108 How I build command-line apps in JavaScript.md | 0 ...20211108 openSUSE Leap vs Tumbleweed- What-s the Difference.md | 0 .../20211109 How the Kubernetes ReplicationController works.md | 0 .../{ => 202111}/20211109 How to package your Python code.md | 0 ...ibreWolf- An Open-Source Firefox Fork Without the Telemetry.md | 0 ...11110 Canonical Makes it Easy to Run a Linux VM on Apple M1.md | 0 ...les between your phone and Linux with this open source tool.md | 0 .../20211110 exa- A Modern Replacement for the ls Command.md | 0 .../{ => 202111}/20211111 7 Linux commands to use just for fun.md | 0 ...n Linux- There-s a Good Chance That You Can Play it Already.md | 0 ...How to Mount Bitlocker Encrypted Windows Partition in Linux.md | 0 ...8 New Features - Improvements to Expect in GIMP 3.0 Release.md | 0 ... How to Switch to Dark Mode in Fedora Linux -Beginner-s Tip.md | 0 ...20211117 3 interesting ways to use the Linux cowsay command.md | 0 ... and Linux Virtual Machines Easily With QEMU-based Quickgui.md | 0 .../20211118 A Notion like Open-Source App is in Development.md | 0 .../20211118 Raspberry Pi 3 vs 4- Which One Should You Get.md | 0 ...19 How to Install Brave Browser on Fedora, Red Hat - CentOS.md | 0 .../20211120 How to Install Discord on Fedora Linux.md | 0 ...11120 vifm- A Terminal File Browser for Hardcore Vim Lovers.md | 0 ...tyle Overview and Will Prevent You From Uninstalling Plasma.md | 0 ...-s Own Linux Distribution is Now Completely Based on Fedora.md | 0 ...211124 Manage Flatpak Permissions Graphically With Flatseal.md | 0 ... is a Long-Term Support Version with Usability Improvements.md | 0 ...0211125 Tips for formatting when printing to console from C.md | 0 ...ne can compile open source code in these three simple steps.md | 0 57 files changed, 0 insertions(+), 0 deletions(-) rename published/{ => 202111}/20200207 Using Powershell to automate Linux, macOS, and Windows processes.md (100%) rename published/{ => 202111}/20200629 Scaling a GraphQL Website.md (100%) rename published/{ => 202111}/20210604 Set and use environment variables in FreeDOS.md (100%) rename published/{ => 202111}/20210607 Automate tasks with BAT files on FreeDOS.md (100%) rename published/{ => 202111}/20210610 Install and remove software packages on FreeDOS.md (100%) rename published/{ => 202111}/20210614 Install FreeDOS without the installer.md (100%) rename published/{ => 202111}/20210616 How to use FreeDOS as an embedded system.md (100%) rename published/{ => 202111}/20210816 Parse command-line arguments with argparse in Python.md (100%) rename published/{ => 202111}/20210909 How to Change Color of Ubuntu Terminal.md (100%) rename published/{ => 202111}/20210909 How to change Ubuntu Terminal Font and Size -Beginner-s Tip.md (100%) rename published/{ => 202111}/20210911 How to Set JAVA_HOME Variable in Ubuntu Linux Correctly.md (100%) rename published/{ => 202111}/20211017 Visual Studio Code or Atom- Which Code Editor Should You Use.md (100%) rename published/{ => 202111}/20211019 Annotator- Open-Source App for Linux to Easily Add Essential Annotations to Your Images.md (100%) rename published/{ => 202111}/20211019 What is Build Essential Package in Ubuntu- How to Install it.md (100%) rename published/{ => 202111}/20211021 7 handy tricks for using the Linux wget command.md (100%) rename published/{ => 202111}/20211021 What you need to know about Kubernetes NetworkPolicy.md (100%) rename published/{ => 202111}/20211027 Ferdi- A Free - Open-Source Alternative to Franz - Rambox.md (100%) rename published/{ => 202111}/20211029 A simple CSS trick for dark mode.md (100%) rename published/{ => 202111}/20211029 Only 4 MB- How to Fix USB ‘Destroyed- by Etcher and Rufus After Creating Live Linux USB.md (100%) rename published/{ => 202111}/20211031 How to kill a zombie process on Linux.md (100%) rename published/{ => 202111}/20211101 How I dynamically generate Jekyll config files.md (100%) rename published/{ => 202111}/20211101 Use the Linux cowsay command for a colorful holiday greeting.md (100%) rename published/{ => 202111}/20211102 4 ways to edit photos on the Linux command line.md (100%) rename published/{ => 202111}/20211102 Fedora 35 Debuts With GNOME 41 and a New KDE Variant.md (100%) rename published/{ => 202111}/20211102 Motrix- A Beautiful Cross-Platform Open-Source Download Manager.md (100%) rename published/{ => 202111}/20211103 4 tips to becoming a technical writer with open source contributions.md (100%) rename published/{ => 202111}/20211103 Google to Pay up to -50,337 for Exploiting Linux Kernel Bugs.md (100%) rename published/{ => 202111}/20211103 Turn any website into a Linux desktop app with open source tools.md (100%) rename published/{ => 202111}/20211104 After Moving From FreeBSD to Void Linux, Project Trident Finally Discontinues.md (100%) rename published/{ => 202111}/20211104 How to update a Linux symlink.md (100%) rename published/{ => 202111}/20211107 What is the Release Schedule for Linux Kernel- How Long a Linux Kernel is Supported.md (100%) rename published/{ => 202111}/20211108 How I build command-line apps in JavaScript.md (100%) rename published/{ => 202111}/20211108 openSUSE Leap vs Tumbleweed- What-s the Difference.md (100%) rename published/{ => 202111}/20211109 How the Kubernetes ReplicationController works.md (100%) rename published/{ => 202111}/20211109 How to package your Python code.md (100%) rename published/{ => 202111}/20211109 LibreWolf- An Open-Source Firefox Fork Without the Telemetry.md (100%) rename published/{ => 202111}/20211110 Canonical Makes it Easy to Run a Linux VM on Apple M1.md (100%) rename published/{ => 202111}/20211110 Transfer files between your phone and Linux with this open source tool.md (100%) rename published/{ => 202111}/20211110 exa- A Modern Replacement for the ls Command.md (100%) rename published/{ => 202111}/20211111 7 Linux commands to use just for fun.md (100%) rename published/{ => 202111}/20211111 Forza Horizon 5 on Linux- There-s a Good Chance That You Can Play it Already.md (100%) rename published/{ => 202111}/20211111 How to Mount Bitlocker Encrypted Windows Partition in Linux.md (100%) rename published/{ => 202111}/20211112 8 New Features - Improvements to Expect in GIMP 3.0 Release.md (100%) rename published/{ => 202111}/20211113 How to Switch to Dark Mode in Fedora Linux -Beginner-s Tip.md (100%) rename published/{ => 202111}/20211117 3 interesting ways to use the Linux cowsay command.md (100%) rename published/{ => 202111}/20211117 Create Windows, macOS, and Linux Virtual Machines Easily With QEMU-based Quickgui.md (100%) rename published/{ => 202111}/20211118 A Notion like Open-Source App is in Development.md (100%) rename published/{ => 202111}/20211118 Raspberry Pi 3 vs 4- Which One Should You Get.md (100%) rename published/{ => 202111}/20211119 How to Install Brave Browser on Fedora, Red Hat - CentOS.md (100%) rename published/{ => 202111}/20211120 How to Install Discord on Fedora Linux.md (100%) rename published/{ => 202111}/20211120 vifm- A Terminal File Browser for Hardcore Vim Lovers.md (100%) rename published/{ => 202111}/20211123 KDE Plasma 5.24 To Add a GNOME-Style Overview and Will Prevent You From Uninstalling Plasma.md (100%) rename published/{ => 202111}/20211124 Amazon-s Own Linux Distribution is Now Completely Based on Fedora.md (100%) rename published/{ => 202111}/20211124 Manage Flatpak Permissions Graphically With Flatseal.md (100%) rename published/{ => 202111}/20211125 Endless OS 4.0 is a Long-Term Support Version with Usability Improvements.md (100%) rename published/{ => 202111}/20211125 Tips for formatting when printing to console from C.md (100%) rename published/{ => 202111}/20211129 Anyone can compile open source code in these three simple steps.md (100%) diff --git a/published/20200207 Using Powershell to automate Linux, macOS, and Windows processes.md b/published/202111/20200207 Using Powershell to automate Linux, macOS, and Windows processes.md similarity index 100% rename from published/20200207 Using Powershell to automate Linux, macOS, and Windows processes.md rename to published/202111/20200207 Using Powershell to automate Linux, macOS, and Windows processes.md diff --git a/published/20200629 Scaling a GraphQL Website.md b/published/202111/20200629 Scaling a GraphQL Website.md similarity index 100% rename from published/20200629 Scaling a GraphQL Website.md rename to published/202111/20200629 Scaling a GraphQL Website.md diff --git a/published/20210604 Set and use environment variables in FreeDOS.md b/published/202111/20210604 Set and use environment variables in FreeDOS.md similarity index 100% rename from published/20210604 Set and use environment variables in FreeDOS.md rename to published/202111/20210604 Set and use environment variables in FreeDOS.md diff --git a/published/20210607 Automate tasks with BAT files on FreeDOS.md b/published/202111/20210607 Automate tasks with BAT files on FreeDOS.md similarity index 100% rename from published/20210607 Automate tasks with BAT files on FreeDOS.md rename to published/202111/20210607 Automate tasks with BAT files on FreeDOS.md diff --git a/published/20210610 Install and remove software packages on FreeDOS.md b/published/202111/20210610 Install and remove software packages on FreeDOS.md similarity index 100% rename from published/20210610 Install and remove software packages on FreeDOS.md rename to published/202111/20210610 Install and remove software packages on FreeDOS.md diff --git a/published/20210614 Install FreeDOS without the installer.md b/published/202111/20210614 Install FreeDOS without the installer.md similarity index 100% rename from published/20210614 Install FreeDOS without the installer.md rename to published/202111/20210614 Install FreeDOS without the installer.md diff --git a/published/20210616 How to use FreeDOS as an embedded system.md b/published/202111/20210616 How to use FreeDOS as an embedded system.md similarity index 100% rename from published/20210616 How to use FreeDOS as an embedded system.md rename to published/202111/20210616 How to use FreeDOS as an embedded system.md diff --git a/published/20210816 Parse command-line arguments with argparse in Python.md b/published/202111/20210816 Parse command-line arguments with argparse in Python.md similarity index 100% rename from published/20210816 Parse command-line arguments with argparse in Python.md rename to published/202111/20210816 Parse command-line arguments with argparse in Python.md diff --git a/published/20210909 How to Change Color of Ubuntu Terminal.md b/published/202111/20210909 How to Change Color of Ubuntu Terminal.md similarity index 100% rename from published/20210909 How to Change Color of Ubuntu Terminal.md rename to published/202111/20210909 How to Change Color of Ubuntu Terminal.md diff --git a/published/20210909 How to change Ubuntu Terminal Font and Size -Beginner-s Tip.md b/published/202111/20210909 How to change Ubuntu Terminal Font and Size -Beginner-s Tip.md similarity index 100% rename from published/20210909 How to change Ubuntu Terminal Font and Size -Beginner-s Tip.md rename to published/202111/20210909 How to change Ubuntu Terminal Font and Size -Beginner-s Tip.md diff --git a/published/20210911 How to Set JAVA_HOME Variable in Ubuntu Linux Correctly.md b/published/202111/20210911 How to Set JAVA_HOME Variable in Ubuntu Linux Correctly.md similarity index 100% rename from published/20210911 How to Set JAVA_HOME Variable in Ubuntu Linux Correctly.md rename to published/202111/20210911 How to Set JAVA_HOME Variable in Ubuntu Linux Correctly.md diff --git a/published/20211017 Visual Studio Code or Atom- Which Code Editor Should You Use.md b/published/202111/20211017 Visual Studio Code or Atom- Which Code Editor Should You Use.md similarity index 100% rename from published/20211017 Visual Studio Code or Atom- Which Code Editor Should You Use.md rename to published/202111/20211017 Visual Studio Code or Atom- Which Code Editor Should You Use.md diff --git a/published/20211019 Annotator- Open-Source App for Linux to Easily Add Essential Annotations to Your Images.md b/published/202111/20211019 Annotator- Open-Source App for Linux to Easily Add Essential Annotations to Your Images.md similarity index 100% rename from published/20211019 Annotator- Open-Source App for Linux to Easily Add Essential Annotations to Your Images.md rename to published/202111/20211019 Annotator- Open-Source App for Linux to Easily Add Essential Annotations to Your Images.md diff --git a/published/20211019 What is Build Essential Package in Ubuntu- How to Install it.md b/published/202111/20211019 What is Build Essential Package in Ubuntu- How to Install it.md similarity index 100% rename from published/20211019 What is Build Essential Package in Ubuntu- How to Install it.md rename to published/202111/20211019 What is Build Essential Package in Ubuntu- How to Install it.md diff --git a/published/20211021 7 handy tricks for using the Linux wget command.md b/published/202111/20211021 7 handy tricks for using the Linux wget command.md similarity index 100% rename from published/20211021 7 handy tricks for using the Linux wget command.md rename to published/202111/20211021 7 handy tricks for using the Linux wget command.md diff --git a/published/20211021 What you need to know about Kubernetes NetworkPolicy.md b/published/202111/20211021 What you need to know about Kubernetes NetworkPolicy.md similarity index 100% rename from published/20211021 What you need to know about Kubernetes NetworkPolicy.md rename to published/202111/20211021 What you need to know about Kubernetes NetworkPolicy.md diff --git a/published/20211027 Ferdi- A Free - Open-Source Alternative to Franz - Rambox.md b/published/202111/20211027 Ferdi- A Free - Open-Source Alternative to Franz - Rambox.md similarity index 100% rename from published/20211027 Ferdi- A Free - Open-Source Alternative to Franz - Rambox.md rename to published/202111/20211027 Ferdi- A Free - Open-Source Alternative to Franz - Rambox.md diff --git a/published/20211029 A simple CSS trick for dark mode.md b/published/202111/20211029 A simple CSS trick for dark mode.md similarity index 100% rename from published/20211029 A simple CSS trick for dark mode.md rename to published/202111/20211029 A simple CSS trick for dark mode.md diff --git a/published/20211029 Only 4 MB- How to Fix USB ‘Destroyed- by Etcher and Rufus After Creating Live Linux USB.md b/published/202111/20211029 Only 4 MB- How to Fix USB ‘Destroyed- by Etcher and Rufus After Creating Live Linux USB.md similarity index 100% rename from published/20211029 Only 4 MB- How to Fix USB ‘Destroyed- by Etcher and Rufus After Creating Live Linux USB.md rename to published/202111/20211029 Only 4 MB- How to Fix USB ‘Destroyed- by Etcher and Rufus After Creating Live Linux USB.md diff --git a/published/20211031 How to kill a zombie process on Linux.md b/published/202111/20211031 How to kill a zombie process on Linux.md similarity index 100% rename from published/20211031 How to kill a zombie process on Linux.md rename to published/202111/20211031 How to kill a zombie process on Linux.md diff --git a/published/20211101 How I dynamically generate Jekyll config files.md b/published/202111/20211101 How I dynamically generate Jekyll config files.md similarity index 100% rename from published/20211101 How I dynamically generate Jekyll config files.md rename to published/202111/20211101 How I dynamically generate Jekyll config files.md diff --git a/published/20211101 Use the Linux cowsay command for a colorful holiday greeting.md b/published/202111/20211101 Use the Linux cowsay command for a colorful holiday greeting.md similarity index 100% rename from published/20211101 Use the Linux cowsay command for a colorful holiday greeting.md rename to published/202111/20211101 Use the Linux cowsay command for a colorful holiday greeting.md diff --git a/published/20211102 4 ways to edit photos on the Linux command line.md b/published/202111/20211102 4 ways to edit photos on the Linux command line.md similarity index 100% rename from published/20211102 4 ways to edit photos on the Linux command line.md rename to published/202111/20211102 4 ways to edit photos on the Linux command line.md diff --git a/published/20211102 Fedora 35 Debuts With GNOME 41 and a New KDE Variant.md b/published/202111/20211102 Fedora 35 Debuts With GNOME 41 and a New KDE Variant.md similarity index 100% rename from published/20211102 Fedora 35 Debuts With GNOME 41 and a New KDE Variant.md rename to published/202111/20211102 Fedora 35 Debuts With GNOME 41 and a New KDE Variant.md diff --git a/published/20211102 Motrix- A Beautiful Cross-Platform Open-Source Download Manager.md b/published/202111/20211102 Motrix- A Beautiful Cross-Platform Open-Source Download Manager.md similarity index 100% rename from published/20211102 Motrix- A Beautiful Cross-Platform Open-Source Download Manager.md rename to published/202111/20211102 Motrix- A Beautiful Cross-Platform Open-Source Download Manager.md diff --git a/published/20211103 4 tips to becoming a technical writer with open source contributions.md b/published/202111/20211103 4 tips to becoming a technical writer with open source contributions.md similarity index 100% rename from published/20211103 4 tips to becoming a technical writer with open source contributions.md rename to published/202111/20211103 4 tips to becoming a technical writer with open source contributions.md diff --git a/published/20211103 Google to Pay up to -50,337 for Exploiting Linux Kernel Bugs.md b/published/202111/20211103 Google to Pay up to -50,337 for Exploiting Linux Kernel Bugs.md similarity index 100% rename from published/20211103 Google to Pay up to -50,337 for Exploiting Linux Kernel Bugs.md rename to published/202111/20211103 Google to Pay up to -50,337 for Exploiting Linux Kernel Bugs.md diff --git a/published/20211103 Turn any website into a Linux desktop app with open source tools.md b/published/202111/20211103 Turn any website into a Linux desktop app with open source tools.md similarity index 100% rename from published/20211103 Turn any website into a Linux desktop app with open source tools.md rename to published/202111/20211103 Turn any website into a Linux desktop app with open source tools.md diff --git a/published/20211104 After Moving From FreeBSD to Void Linux, Project Trident Finally Discontinues.md b/published/202111/20211104 After Moving From FreeBSD to Void Linux, Project Trident Finally Discontinues.md similarity index 100% rename from published/20211104 After Moving From FreeBSD to Void Linux, Project Trident Finally Discontinues.md rename to published/202111/20211104 After Moving From FreeBSD to Void Linux, Project Trident Finally Discontinues.md diff --git a/published/20211104 How to update a Linux symlink.md b/published/202111/20211104 How to update a Linux symlink.md similarity index 100% rename from published/20211104 How to update a Linux symlink.md rename to published/202111/20211104 How to update a Linux symlink.md diff --git a/published/20211107 What is the Release Schedule for Linux Kernel- How Long a Linux Kernel is Supported.md b/published/202111/20211107 What is the Release Schedule for Linux Kernel- How Long a Linux Kernel is Supported.md similarity index 100% rename from published/20211107 What is the Release Schedule for Linux Kernel- How Long a Linux Kernel is Supported.md rename to published/202111/20211107 What is the Release Schedule for Linux Kernel- How Long a Linux Kernel is Supported.md diff --git a/published/20211108 How I build command-line apps in JavaScript.md b/published/202111/20211108 How I build command-line apps in JavaScript.md similarity index 100% rename from published/20211108 How I build command-line apps in JavaScript.md rename to published/202111/20211108 How I build command-line apps in JavaScript.md diff --git a/published/20211108 openSUSE Leap vs Tumbleweed- What-s the Difference.md b/published/202111/20211108 openSUSE Leap vs Tumbleweed- What-s the Difference.md similarity index 100% rename from published/20211108 openSUSE Leap vs Tumbleweed- What-s the Difference.md rename to published/202111/20211108 openSUSE Leap vs Tumbleweed- What-s the Difference.md diff --git a/published/20211109 How the Kubernetes ReplicationController works.md b/published/202111/20211109 How the Kubernetes ReplicationController works.md similarity index 100% rename from published/20211109 How the Kubernetes ReplicationController works.md rename to published/202111/20211109 How the Kubernetes ReplicationController works.md diff --git a/published/20211109 How to package your Python code.md b/published/202111/20211109 How to package your Python code.md similarity index 100% rename from published/20211109 How to package your Python code.md rename to published/202111/20211109 How to package your Python code.md diff --git a/published/20211109 LibreWolf- An Open-Source Firefox Fork Without the Telemetry.md b/published/202111/20211109 LibreWolf- An Open-Source Firefox Fork Without the Telemetry.md similarity index 100% rename from published/20211109 LibreWolf- An Open-Source Firefox Fork Without the Telemetry.md rename to published/202111/20211109 LibreWolf- An Open-Source Firefox Fork Without the Telemetry.md diff --git a/published/20211110 Canonical Makes it Easy to Run a Linux VM on Apple M1.md b/published/202111/20211110 Canonical Makes it Easy to Run a Linux VM on Apple M1.md similarity index 100% rename from published/20211110 Canonical Makes it Easy to Run a Linux VM on Apple M1.md rename to published/202111/20211110 Canonical Makes it Easy to Run a Linux VM on Apple M1.md diff --git a/published/20211110 Transfer files between your phone and Linux with this open source tool.md b/published/202111/20211110 Transfer files between your phone and Linux with this open source tool.md similarity index 100% rename from published/20211110 Transfer files between your phone and Linux with this open source tool.md rename to published/202111/20211110 Transfer files between your phone and Linux with this open source tool.md diff --git a/published/20211110 exa- A Modern Replacement for the ls Command.md b/published/202111/20211110 exa- A Modern Replacement for the ls Command.md similarity index 100% rename from published/20211110 exa- A Modern Replacement for the ls Command.md rename to published/202111/20211110 exa- A Modern Replacement for the ls Command.md diff --git a/published/20211111 7 Linux commands to use just for fun.md b/published/202111/20211111 7 Linux commands to use just for fun.md similarity index 100% rename from published/20211111 7 Linux commands to use just for fun.md rename to published/202111/20211111 7 Linux commands to use just for fun.md diff --git a/published/20211111 Forza Horizon 5 on Linux- There-s a Good Chance That You Can Play it Already.md b/published/202111/20211111 Forza Horizon 5 on Linux- There-s a Good Chance That You Can Play it Already.md similarity index 100% rename from published/20211111 Forza Horizon 5 on Linux- There-s a Good Chance That You Can Play it Already.md rename to published/202111/20211111 Forza Horizon 5 on Linux- There-s a Good Chance That You Can Play it Already.md diff --git a/published/20211111 How to Mount Bitlocker Encrypted Windows Partition in Linux.md b/published/202111/20211111 How to Mount Bitlocker Encrypted Windows Partition in Linux.md similarity index 100% rename from published/20211111 How to Mount Bitlocker Encrypted Windows Partition in Linux.md rename to published/202111/20211111 How to Mount Bitlocker Encrypted Windows Partition in Linux.md diff --git a/published/20211112 8 New Features - Improvements to Expect in GIMP 3.0 Release.md b/published/202111/20211112 8 New Features - Improvements to Expect in GIMP 3.0 Release.md similarity index 100% rename from published/20211112 8 New Features - Improvements to Expect in GIMP 3.0 Release.md rename to published/202111/20211112 8 New Features - Improvements to Expect in GIMP 3.0 Release.md diff --git a/published/20211113 How to Switch to Dark Mode in Fedora Linux -Beginner-s Tip.md b/published/202111/20211113 How to Switch to Dark Mode in Fedora Linux -Beginner-s Tip.md similarity index 100% rename from published/20211113 How to Switch to Dark Mode in Fedora Linux -Beginner-s Tip.md rename to published/202111/20211113 How to Switch to Dark Mode in Fedora Linux -Beginner-s Tip.md diff --git a/published/20211117 3 interesting ways to use the Linux cowsay command.md b/published/202111/20211117 3 interesting ways to use the Linux cowsay command.md similarity index 100% rename from published/20211117 3 interesting ways to use the Linux cowsay command.md rename to published/202111/20211117 3 interesting ways to use the Linux cowsay command.md diff --git a/published/20211117 Create Windows, macOS, and Linux Virtual Machines Easily With QEMU-based Quickgui.md b/published/202111/20211117 Create Windows, macOS, and Linux Virtual Machines Easily With QEMU-based Quickgui.md similarity index 100% rename from published/20211117 Create Windows, macOS, and Linux Virtual Machines Easily With QEMU-based Quickgui.md rename to published/202111/20211117 Create Windows, macOS, and Linux Virtual Machines Easily With QEMU-based Quickgui.md diff --git a/published/20211118 A Notion like Open-Source App is in Development.md b/published/202111/20211118 A Notion like Open-Source App is in Development.md similarity index 100% rename from published/20211118 A Notion like Open-Source App is in Development.md rename to published/202111/20211118 A Notion like Open-Source App is in Development.md diff --git a/published/20211118 Raspberry Pi 3 vs 4- Which One Should You Get.md b/published/202111/20211118 Raspberry Pi 3 vs 4- Which One Should You Get.md similarity index 100% rename from published/20211118 Raspberry Pi 3 vs 4- Which One Should You Get.md rename to published/202111/20211118 Raspberry Pi 3 vs 4- Which One Should You Get.md diff --git a/published/20211119 How to Install Brave Browser on Fedora, Red Hat - CentOS.md b/published/202111/20211119 How to Install Brave Browser on Fedora, Red Hat - CentOS.md similarity index 100% rename from published/20211119 How to Install Brave Browser on Fedora, Red Hat - CentOS.md rename to published/202111/20211119 How to Install Brave Browser on Fedora, Red Hat - CentOS.md diff --git a/published/20211120 How to Install Discord on Fedora Linux.md b/published/202111/20211120 How to Install Discord on Fedora Linux.md similarity index 100% rename from published/20211120 How to Install Discord on Fedora Linux.md rename to published/202111/20211120 How to Install Discord on Fedora Linux.md diff --git a/published/20211120 vifm- A Terminal File Browser for Hardcore Vim Lovers.md b/published/202111/20211120 vifm- A Terminal File Browser for Hardcore Vim Lovers.md similarity index 100% rename from published/20211120 vifm- A Terminal File Browser for Hardcore Vim Lovers.md rename to published/202111/20211120 vifm- A Terminal File Browser for Hardcore Vim Lovers.md diff --git a/published/20211123 KDE Plasma 5.24 To Add a GNOME-Style Overview and Will Prevent You From Uninstalling Plasma.md b/published/202111/20211123 KDE Plasma 5.24 To Add a GNOME-Style Overview and Will Prevent You From Uninstalling Plasma.md similarity index 100% rename from published/20211123 KDE Plasma 5.24 To Add a GNOME-Style Overview and Will Prevent You From Uninstalling Plasma.md rename to published/202111/20211123 KDE Plasma 5.24 To Add a GNOME-Style Overview and Will Prevent You From Uninstalling Plasma.md diff --git a/published/20211124 Amazon-s Own Linux Distribution is Now Completely Based on Fedora.md b/published/202111/20211124 Amazon-s Own Linux Distribution is Now Completely Based on Fedora.md similarity index 100% rename from published/20211124 Amazon-s Own Linux Distribution is Now Completely Based on Fedora.md rename to published/202111/20211124 Amazon-s Own Linux Distribution is Now Completely Based on Fedora.md diff --git a/published/20211124 Manage Flatpak Permissions Graphically With Flatseal.md b/published/202111/20211124 Manage Flatpak Permissions Graphically With Flatseal.md similarity index 100% rename from published/20211124 Manage Flatpak Permissions Graphically With Flatseal.md rename to published/202111/20211124 Manage Flatpak Permissions Graphically With Flatseal.md diff --git a/published/20211125 Endless OS 4.0 is a Long-Term Support Version with Usability Improvements.md b/published/202111/20211125 Endless OS 4.0 is a Long-Term Support Version with Usability Improvements.md similarity index 100% rename from published/20211125 Endless OS 4.0 is a Long-Term Support Version with Usability Improvements.md rename to published/202111/20211125 Endless OS 4.0 is a Long-Term Support Version with Usability Improvements.md diff --git a/published/20211125 Tips for formatting when printing to console from C.md b/published/202111/20211125 Tips for formatting when printing to console from C.md similarity index 100% rename from published/20211125 Tips for formatting when printing to console from C.md rename to published/202111/20211125 Tips for formatting when printing to console from C.md diff --git a/published/20211129 Anyone can compile open source code in these three simple steps.md b/published/202111/20211129 Anyone can compile open source code in these three simple steps.md similarity index 100% rename from published/20211129 Anyone can compile open source code in these three simple steps.md rename to published/202111/20211129 Anyone can compile open source code in these three simple steps.md From 5199f1d3265a4416d008f071dbb428aa3c8e0577 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 1 Dec 2021 10:35:19 +0800 Subject: [PATCH 058/244] PUB @wxy https://linux.cn/article-14037-1.html --- ...211130 Collaborate on a file using Linux diff and patch.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20211130 Collaborate on a file using Linux diff and patch.md (98%) diff --git a/translated/tech/20211130 Collaborate on a file using Linux diff and patch.md b/published/20211130 Collaborate on a file using Linux diff and patch.md similarity index 98% rename from translated/tech/20211130 Collaborate on a file using Linux diff and patch.md rename to published/20211130 Collaborate on a file using Linux diff and patch.md index b30b90548d..c858df7d34 100644 --- a/translated/tech/20211130 Collaborate on a file using Linux diff and patch.md +++ b/published/20211130 Collaborate on a file using Linux diff and patch.md @@ -4,8 +4,8 @@ [#]: collector: "lujun9972" [#]: translator: "wxy" [#]: reviewer: "wxy" -[#]: publisher: " " -[#]: url: " " +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14037-1.html" 使用 Linux 的 diff 和 patch 对文件进行协作 ====== From d11f4ae6dcdd728dff682910d60287a555446ee0 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 1 Dec 2021 11:37:28 +0800 Subject: [PATCH 059/244] PRF&PUB @geekpi https://linux.cn/article-14038-1.html --- ...source ways to create holiday greetings.md | 106 ++++++++++++++++++ ...source ways to create holiday greetings.md | 104 ----------------- 2 files changed, 106 insertions(+), 104 deletions(-) create mode 100644 published/20211121 4 open source ways to create holiday greetings.md delete mode 100644 translated/tech/20211121 4 open source ways to create holiday greetings.md diff --git a/published/20211121 4 open source ways to create holiday greetings.md b/published/20211121 4 open source ways to create holiday greetings.md new file mode 100644 index 0000000000..11d9c76dd3 --- /dev/null +++ b/published/20211121 4 open source ways to create holiday greetings.md @@ -0,0 +1,106 @@ +[#]: subject: "4 open source ways to create holiday greetings" +[#]: via: "https://opensource.com/article/21/11/open-source-holiday-greetings" +[#]: author: "Don Watkins https://opensource.com/users/don-watkins" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14038-1.html" + +创建节日问候的 4 种开源方式 +====== + +> 开源工具和资源为任何节日提供了创造性的可能性。 + +![](https://img.linux.net.cn/data/attachment/album/202112/01/113447fkk2du1udmdu2n0d.jpg) + +节日再次来临,今年我决定用 [开源方式][2] 来庆祝。就像一个特别有名的假期忙人一样,我有一个长长的节日任务清单(我打算再三检查):制作一张贺卡(带地址的明信片)寄给家人和朋友,用合适的节日歌曲制作照片蒙太奇或视频,并装饰我的虚拟办公室。有很多开源的应用和资源使我的工作更容易。以下是我使用的东西。 + +### Inkscape 和剪贴画 + +我最喜欢的资源之一是 [FreeSVG.org][3](前身是 Openclipart.org)。这里很容易找到你喜欢的节日,包括光明节、圣诞节、新年等等。这些剪贴画都是由像你我这样的用户贡献的,并且是 CC0 版权,所以你甚至不需要提供署名。当然,在可能的情况下,我还是会注明出处,以确保 FreeSVG 和它的艺术家们获得知名度。 + +下面是 FreeSVG 的一些剪贴画的例子: + +![一幅棕色玉米棒的漫画,上面有红色的苹果、橙色的南瓜和棕色的坚果溢出来。][4] + +openclipart.com, [CC0 1.0][5] + +使用 [Inkscape][6] 的文本路径工具,我在图片上添加了我自己的文字,我把它用在卡片上。如果再做些工作,我还可以把这个图形用在一些定制的杯子或餐垫上。 + +![一幅棕色玉米棒的漫画,上面有红色的苹果、橙色的南瓜和棕色的坚果溢出来,上面有一个拱门形的“我们感谢”的字样。][7] + +Don Watkins, [CC BY-SA 4.0][8] + +### 文字处理 + +[LibreOffice][9] Writer 可以用来制作贺卡和海报,然后在你的家中使用或分发给你的朋友和家人。使用 LibreOffice Calc 创建一个关于你的家人和朋友的数据库,然后利用这一资源,用邮件合并功能简化制作邮件标签的过程。 + +### 创作共用的图片和图形 + +[search.creativecommons.org][10] 上也有艺术品。注意许可证类型:对任何需要署名的东西给予适当的致谢。这张图片([“Thanksgiving Dealies”][11])来自创作共用图片搜索。它的作者是 [Martin Cathrae][12],并在 [CC BY-SA 2.0][13] 下授权,因此它可以在相同的许可证下被改编、重复使用和分享。 + +![用南瓜壳做花架,摆放红色和黄色小花束的烛光中心装饰。][14] + +[Martin Cathrae][12], [CC BY-SA 2.0][13] + +我拿着这张相同的图片,用 [GIMP][15] 在上面添加了一些我自己的文字。你可以用 Inkscape 来做同样的事情。 + +![用南瓜壳作为花架,放置红色和黄色的小花束的烛光中心作品,图片左上方有“节日快乐”字样。][16] + +Don Watkins,[CC BY-SA 4.0][17] + +创作共用Creative Commons提供了大量的图片,在你的下一次 [视频会议][18] 期间,可以这些图片作为一个节日背景。 + +### 视频和实时流媒体 + +你也可以把这些图片与你自己的一些图片结合起来,用 [OpenShot][19] 视频编辑器创建一个简短的视频剪辑。你可以通过使用 Audacity 录制一个单独的音轨,轻松添加旁白。可以在 Audacity 中添加声音效果,保存到文件中,并导入到 OpenShot 视频编辑器的配乐中。寻找 [合法的背景音乐][20] 来添加到你的视频中。 + +使用 [开源广播软件(OBS)][21] 来直播你的假期聚会。使用 OBS 可以轻松地为你的朋友和家人呈现引人入胜的假期节目,或者你可以将节目另存为 Matroska 或 MP4 文件以供日后观看。 + +### 阅读材料 + +古腾堡计划Project Gutenberg是一个用来分享免费节日阅读材料的很好的来源。[狄更斯的《圣诞颂歌》][22] 就是这样一种资源,它可以在网上轻松阅读,也可以下载成 EPUB 或你最喜欢的电子阅读器的格式。你还可以找到免版税的阅读材料,如 [Librivox][23] 的“光的盛宴”,采用 MP3 格式,因此可以下载并在你喜欢的浏览器或媒体播放器中播放。 + +### 节日乐趣 + +节日里最重要的一点是,它们是与朋友和家人一起的放松和欢乐时光。如果你有家人对计算机感到好奇,花点时间与他们分享一些你最喜欢的开源资源。 + +(题图来自:[creativecommons.org](https://search.creativecommons.org/photos/388c71f3-0419-4e4b-a6a7-2db7e1a8bbc8),作者:Sunny M5) + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/11/open-source-holiday-greetings + +作者:[Don Watkins][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/don-watkins +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/painting_computer_screen_art_design_creative.png?itok=LVAeQx3_ (Painting art on a computer screen) +[2]: https://opensource.com/open-source-way +[3]: http://freesvg.org +[4]: https://opensource.com/sites/default/files/uploads/cornucopia.png (cornucopia) +[5]: https://creativecommons.org/publicdomain/zero/1.0/ +[6]: https://opensource.com/article/18/1/inkscape-absolute-beginners +[7]: https://opensource.com/sites/default/files/uploads/cornucopia_with_text.png (We Give Thanks) +[8]: https://creativecommons.org/licenses/by-sa/4.0/ +[9]: https://opensource.com/article/21/9/libreoffice-tips +[10]: https://search.creativecommons.org/ +[11]: https://www.flickr.com/photos/34067077@N00/4014605524 +[12]: https://www.flickr.com/photos/34067077@N00 +[13]: https://creativecommons.org/licenses/by-sa/2.0/?ref=ccsearch&atype=rich +[14]: https://opensource.com/sites/default/files/uploads/fall_table.png (Holiday table) +[15]: https://opensource.com/content/cheat-sheet-gimp +[16]: https://opensource.com/sites/default/files/uploads/fall_table_with_text.png (Happy Holidays) +[17]: https://creativecommons.org/licenses/by/4.0/ +[18]: https://opensource.com/article/20/5/open-source-video-conferencing +[19]: https://opensource.com/article/17/5/using-openshot-video-editor +[20]: https://opensource.com/article/20/1/what-creative-commons +[21]: https://opensource.com/article/21/4/obs-youtube +[22]: https://www.gutenberg.org/ebooks/19337 +[23]: https://librivox.org/the-feast-of-lights-by-emma-lazarus/ diff --git a/translated/tech/20211121 4 open source ways to create holiday greetings.md b/translated/tech/20211121 4 open source ways to create holiday greetings.md deleted file mode 100644 index 2bdcaa2015..0000000000 --- a/translated/tech/20211121 4 open source ways to create holiday greetings.md +++ /dev/null @@ -1,104 +0,0 @@ -[#]: subject: "4 open source ways to create holiday greetings" -[#]: via: "https://opensource.com/article/21/11/open-source-holiday-greetings" -[#]: author: "Don Watkins https://opensource.com/users/don-watkins" -[#]: collector: "lujun9972" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -创建节日问候的 4 种开源方式 -====== -开源工具和资源为任何节日提供了创造性的可能性。 -![Painting art on a computer screen][1] - -节日再次来临,今年我决定用[开源方式][2]来庆祝。就像一个特别有名的假期忙人一样,我有一个长长的节日任务清单(我打算检查两遍):制作一张贺卡(带地址的信封)寄给家人和朋友,用合适的节日歌曲制作照片蒙太奇或视频,并装饰我的虚拟办公室。有很多开源的应用和资源使我的工作更容易。以下是我使用的东西。 - -### Inkscape 和剪贴画 - -我最喜欢的资源之一是 [FreeSVG.org][3](前身是 Openclipart.org)。这里很容易找到你喜欢的节日,包括光明节、圣诞节、新年等等。这些剪贴画都是由像你和我这样的用户贡献的,并且是 CC0 署名,所以你甚至不需要提供署名。在可能的情况下,我还是会注明出处,以确保 FreeSVG 和它的艺术家们获得知名度。 - -下面是 FreeSVG 的一些剪贴画的例子: - -![A cartoon of a brown cornucopia with red apples, an orange pumpkin, and brown nuts spilling out][4] - -openclipart.com, [CC0 1.0][5] - -使用 [Inkscape 的][6] Text to Path 工具,我在图片上添加了我自己的文字,我把它用在卡片上。如果再准备一下,我还可以把这个图形用在一些定制的杯子或餐垫上。 - -![A cartoon of a brown cornucopia with red apples, an orange pumpkin, and brown nuts spilling out, with the words "We Give Thanks" in an arch over the top][7] - -Don Watkins, [CC BY-SA 4.0][8] - -### 文字处理 - -[LibreOffice][9] Writer 可以用来制作贺卡和海报,在你的家中使用或分发给你的朋友和家人。使用 LibreOffice Calc 创建一个关于你的家人和朋友的数据库,然后利用这一资源,用邮件合并功能简化制作邮件标签。 - -### Creative Commons 图片和图形 - -[search.creativecommons.org][10] 上也有艺术品。注意许可证类型:对任何需要归属的东西给予适当的信用。这张图片([“Thanksgiving Dealies”][11])来自知识共享图片搜索。它的作者是 [Martin Cathrae][12],并在 [CC BY-SA 2.0][13] 下获得许可,因此它可以在相同的许可下被改编、重复使用和分享。 - -![A candlelight centerpiece using pumpkin shells as flower holders for small red and yellow floral bouquets.][14] - -[Martin Cathrae][12], [CC BY-SA 2.0][13] - -我拿着这张相同的图片,用 [GIMP][15] 在上面添加了一些我自己的文字。你可以用 Inkscape 来做同样的事情。 - -![A candlelight centerpiece using pumpkin shells as flower holders for small red and yellow floral bouquets, with the words "Happy Holidays" at the top left of the image][16] - -Don Watkins,[CC BY-SA 4.0][17] - -知识共享组织(Creative Commons)提供了大量的图片选择,在你的下一次[视频会议][18]期间,这些图片将成为一个节日背景。 - -### 视频和实时流媒体 - -你也可以把这些图片与你自己的一些图片结合起来,用 [OpenShot][19] 视频编辑器创建一个简短的视频剪辑。你可以通过使用 Audacity 录制一个单独的音轨,轻松地添加旁白。声音效果可以在 Audacity 中添加,保存到文件中,并导入到 OpenShot 视频编辑器的配乐中。寻找[合法的背景][20]音乐来添加到你的视频中。 - -使用[开源广播软件][21]直播你的假期聚会。 使用 OBS 可以轻松地为你的朋友和家人呈现引人入胜的假期节目,或者你可以将节目另存为 Matroska 或 MP4 文件以供日后观看。 - -### 阅读材料 - -古腾堡计划是一个很好的用来分享的免费节日阅读材料的来源。[狄更斯的《圣诞颂歌》][22]就是这样一种资源,它可以在网上轻松阅读,也可以下载成 EPUB 或你最喜欢的电子阅读器的格式。你还可以找到免版税的阅读材料,如 [Librivox][23] 的“光的盛宴”,采用 MP3 格式,因此可以下载并在你喜欢的浏览器或媒体播放器中播放。 - -### 节日乐趣 - -节日里最重要的一点是,它们是与朋友和家人一起的放松和欢乐时光。如果你有家人对计算机感到好奇,花点时间与他们分享一些你最喜欢的开源资源。 - -Anderson Silva 向我们展示了如何使用 Raspberry Pi 和 LightshowPi 来创造一个音乐灯光秀。 - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/11/open-source-holiday-greetings - -作者:[Don Watkins][a] -选题:[lujun9972][b] -译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/don-watkins -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/painting_computer_screen_art_design_creative.png?itok=LVAeQx3_ (Painting art on a computer screen) -[2]: https://opensource.com/open-source-way -[3]: http://freesvg.org -[4]: https://opensource.com/sites/default/files/uploads/cornucopia.png (cornucopia) -[5]: https://creativecommons.org/publicdomain/zero/1.0/ -[6]: https://opensource.com/article/18/1/inkscape-absolute-beginners -[7]: https://opensource.com/sites/default/files/uploads/cornucopia_with_text.png (We Give Thanks) -[8]: https://creativecommons.org/licenses/by-sa/4.0/ -[9]: https://opensource.com/article/21/9/libreoffice-tips -[10]: https://search.creativecommons.org/ -[11]: https://www.flickr.com/photos/34067077@N00/4014605524 -[12]: https://www.flickr.com/photos/34067077@N00 -[13]: https://creativecommons.org/licenses/by-sa/2.0/?ref=ccsearch&atype=rich -[14]: https://opensource.com/sites/default/files/uploads/fall_table.png (Holiday table) -[15]: https://opensource.com/content/cheat-sheet-gimp -[16]: https://opensource.com/sites/default/files/uploads/fall_table_with_text.png (Happy Holidays) -[17]: https://creativecommons.org/licenses/by/4.0/ -[18]: https://opensource.com/article/20/5/open-source-video-conferencing -[19]: https://opensource.com/article/17/5/using-openshot-video-editor -[20]: https://opensource.com/article/20/1/what-creative-commons -[21]: https://opensource.com/article/21/4/obs-youtube -[22]: https://www.gutenberg.org/ebooks/19337 -[23]: https://librivox.org/the-feast-of-lights-by-emma-lazarus/ From 8afb2e71d421f788a0ef82115955efce0363372e Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 2 Dec 2021 05:02:32 +0800 Subject: [PATCH 060/244] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211201=20?= =?UTF-8?q?Edit=20audio=20on=20Linux=20with=20Audacity?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211201 Edit audio on Linux with Audacity.md --- ...11201 Edit audio on Linux with Audacity.md | 150 ++++++++++++++++++ 1 file changed, 150 insertions(+) create mode 100644 sources/tech/20211201 Edit audio on Linux with Audacity.md diff --git a/sources/tech/20211201 Edit audio on Linux with Audacity.md b/sources/tech/20211201 Edit audio on Linux with Audacity.md new file mode 100644 index 0000000000..725990e537 --- /dev/null +++ b/sources/tech/20211201 Edit audio on Linux with Audacity.md @@ -0,0 +1,150 @@ +[#]: subject: "Edit audio on Linux with Audacity" +[#]: via: "https://opensource.com/article/21/12/audacity-linux-creative-app" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Edit audio on Linux with Audacity +====== +Audacity is a classic power tool of the open source software world for +recording, editing, and doing so much more with sound. +![Colorful sound wave graph][1] + +The Audacity sound editor is one of those open source applications that filled a niche that seemingly nobody else realized existed. Initially developed at Carnegie Mellon University at a time when many people still thought computers were just for office and schoolwork, and you required special DSP peripherals for serious multimedia work. Audacity recognized that, occasionally, the average computer user needed to edit audio. The Audacity team has consistently provided an open source application for recording and cleaning up sound in the two decades since. + +I use Audacity a lot, and being an editor by training, I'm used to significant and usually single-key keyboard shortcuts in my applications. By building shortcuts around single letters, you can have one hand on the mouse and one on the keyboard, so the delay between choosing a tool or an important function and clicking the mouse is mere milliseconds. Throughout this article, I'll highlight the keyboard shortcut I use in Audacity if you want to optimize your own settings. + +### Install Audacity on Linux + +Audacity is available on most Linux distributions from your package manager. On Fedora, Mageia, and similar distributions: + + +``` +`$ sudo dnf install audacity` +``` + +On Elementary, Mint, and other Debian-based distributions: + + +``` +`$ sudo apt install audacity` +``` + +However, I use Audacity as a [Flatpak][2]. + +On Windows or macOS, download an Audacity installer from the [Audacity website][3]. + +A recent fork, called [Tenacity][4], aims to continue the Audacity tradition with a different team of developers. At the time of writing, the two are essentially the same application, so this article applies equally to both. Whether the two diverge in features later remains to be seen. + +Once installed, launch the application from your Application or Activities menu. + +### Setting inputs in Audacity + +First, you must set your audio _input_ so that Audacity receives the signal from the microphone or audio interface you want to use. What you choose depends on your setup and what audio peripherals you own. USB microphones usually get listed as **Microphone**, but a microphone with a 1/8" input jack likely gets labeled as **Line in**. Your different options:  + +#### Pulse Audio + +Linux uses Advanced Linux Sound Architecture (ALSA) as its backend for sound, while macOS and Windows use their own closed frameworks. On Linux, you can set Pulse Audio as your input source to direct Audacity to _one_ virtual interface (Pulse), so you can route sound input from your System Settings. This is my preferred method because it centralizes all control in one convenient control panel. Gone are the days of selecting a microphone in one application only to discover that the microphone got muted elsewhere. + +![Sound input][5] + +(Seth Kenlon, [CC BY-SA 4.0][6]) + +#### Device access + +If your distribution or OS doesn't use Pulse Audio, or if for some reason you prefer to access sound devices directly, you can alternatively select a device from the drop-down menu. This requires some knowledge of how your system lists sound devices, which isn't always obvious. A desktop might have several inputs, some in the rear of the tower and some in a front panel. Laptops usually have fewer input options, but you probably have a microphone near your webcam and possibly an external one if you're using one. + +### Recording audio with Audacity + +Once your input is selected, press the **Record** button (the button with a red dot). + +![Recording audio][7] + +(Seth Kenlon, [CC BY-SA 4.0][6]) + +If you're recording into a microphone, all you have to do is start talking. If you're recording input from, say, [a vinyl record player][8], then you must start it. Whatever it is, as long as Audacity is in Record mode, any signal sent to your selected input is written to Audacity and rendered as a waveform on your screen. + +**My shortcut:** I use the **R** key to start recording. By default, **Space** stops a recording (and also plays a recording back). + +### Editing audio + +Recording rarely goes exactly as planned. Maybe you start recording too soon and have to sit through seconds of vinyl silence (it's like silence, but scratchier), or you discover that you fill all of your spoken silence with "uh" and "um" and other vocables, or you just have a false start. Audacity is first and foremost a waveform editor, meaning you can cut out the sounds you don't want in the final recording with the same ease that you make edits to the words you type into a word processor. + +### Editing sound at zero crossings + +The main editing tool in Audacity is the Selection Tool. It's the familiar "I-beam" cursor you see in word processors, and its function is the same here. You can click and drag this cursor across a region of sound, and then you can copy or paste or cut or delete or just play the region. + +**My shortcut:** I use the **I** key to activate the selection tool because the cursor looks like the letter "I." + +However, in a word processor, you can see the end and start of each letter very clearly. There's no chance of you accidentally selecting and deleting only half of a letter. +However, the "resolution" (called the _sample rate_) of sound in modern applications is very good, so it's difficult for the human eye to locate a clean break in an audio wave. Audacity can adjust your work so that your selected region lands on what's called a [zero crossing][9], which avoids subtle but noticeable glitches where you made cuts. + +![Zero crossing][10] + +(Seth Kenlon, [CC BY-SA 4.0][6]) + +After you make a selection, go to the **Select** menu and choose **At Zero Crossings**. + +**My shortcut:** I use the **Z** key to adjust a selection to zero crossings and the **X** key to delete a region (it saves me from having to move my hand all the way up to **Del** or **Backspace**.) + +### Making room for more + +The beauty of editing is that your final product doesn't have to be true to what you recorded. I've recorded lectures and even scripted readings that end up getting sidetracked for one reason or another, or that omit a section of important information, only to then rearrange or add brand new audio before publishing. + +Moving a selection of audio is similar to deleting, except instead of removing audio, you copy and paste the selection the same way you do in a word processor—copy or cut using standard keyboard shortcuts, reposition your cursor, and paste. Making room for insert edits, though, requires empty space on your audio timeline so you can record additional audio to fill the gap you've created. For this, you use the Selection Tool and the Time Shift Tool. + +To create a gap in your audio, position your Selection Tool cursor at the point where you want to add empty space. Navigate to the **Edit** menu, select the **Clip Boundaries** submenu, and then choose **Split**. This splits your audio at the point of your Selection tool. + +Activate the **Time Shift Tool** in the top toolbar (the icon is two joined arrows pointing left and right.) Click and drag the right half of your split audio to create a gap. + +![Spacer][11] + +(Seth Kenlon, [CC BY-SA 4.0][6]) + +**My shortcut:** I use **K** to split (or "kut," as a mnemonic) and **T** to activate the Time Shift Tool. + +### Exporting audio + +When you're happy with your audio, you can export it so you can share it with others. Audacity has a good selection of formats it can export to, and it's able to pipe its output to tools like [ffmpeg][12] for more formats than you'll probably ever need. + +My preference is to export audio in the FLAC format, an audio format that's a little like a WAV, except it's losslessly compressed. It takes up a fraction of the space without any loss in quality. To try it out, go to **File**, select the **Export** submenu, and then choose **Export Audio**. With a FLAC file as your [golden image][13], you can use SoundConverter to convert your file into whatever format is best for any number of delivery targets—Ogg Vorbis or Opus or Webm for browsers, M4A files for Apple devices, and maybe an MP3 for a legacy system. + +If you just want a quick and simple export from Audacity, the easy option is Ogg Vorbis. This is an open source file format that plays in most web browsers (Firefox, Chromium, Chrome, Android, and Edge) and [media players like VLC, mpv, and many others][14]. + +### Explore Audacity + +Audacity is a classic power tool of the open source software world. Basic recording and editing are only the beginning. You can add effects, [filter out (some) noise][15], adjust speed, change pitch, and much more. Whether you're recording lectures at school, mixing up drum loops, splicing together sounds for a video game, or just exploring the world of audio, go launch Audacity and get creative! + +Using Audacity, you can quickly clean up audio file so that any background noise becomes tolerable. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/audacity-linux-creative-app + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/colorful_sound_wave.png?itok=jlUJG0bM (Colorful sound wave graph) +[2]: https://opensource.com/article/21/11/how-install-flatpak-linux +[3]: https://www.audacityteam.org/ +[4]: https://github.com/tenacityteam/tenacity +[5]: https://opensource.com/sites/default/files/uploads/gnome-sound-setting.png (Sound input) +[6]: https://creativecommons.org/licenses/by-sa/4.0/ +[7]: https://opensource.com/sites/default/files/uploads/audacity-input.png (Recording audio) +[8]: https://opensource.com/article/18/1/audacity-digitize-records +[9]: https://en.wikipedia.org/wiki/Zero_crossing +[10]: https://opensource.com/sites/default/files/uploads/audacity-zero-crossing.jpg (Zero crossing) +[11]: https://opensource.com/sites/default/files/uploads/audacity-split.jpg (Spacer) +[12]: https://opensource.com/article/21/11/linux-line-commands-reclaim-space-converting-files#audio +[13]: https://opensource.com/article/19/7/what-golden-image +[14]: https://opensource.com/article/21/2/linux-media-players +[15]: https://opensource.com/life/14/10/how-clean-digital-recordings-using-audacity From 15bb803d4edb865fe97b0af22e458ea03d12470e Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 2 Dec 2021 08:12:29 +0800 Subject: [PATCH 061/244] APL --- ...20211121 Google Chrome vs Chromium- What-s the difference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20211121 Google Chrome vs Chromium- What-s the difference.md b/sources/tech/20211121 Google Chrome vs Chromium- What-s the difference.md index 4c25a5887b..39d190ffdb 100644 --- a/sources/tech/20211121 Google Chrome vs Chromium- What-s the difference.md +++ b/sources/tech/20211121 Google Chrome vs Chromium- What-s the difference.md @@ -2,7 +2,7 @@ [#]: via: "https://itsfoss.com/chrome-vs-chromium/" [#]: author: "Ankush Das https://itsfoss.com/author/ankush/" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "wxy" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 5cd0dcaf3397021ee9b0d32196f72919d3d9cd99 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 2 Dec 2021 08:48:46 +0800 Subject: [PATCH 062/244] translated --- ...1128 Install apps on Linux with Flatpak.md | 119 ------------------ ...1128 Install apps on Linux with Flatpak.md | 119 ++++++++++++++++++ 2 files changed, 119 insertions(+), 119 deletions(-) delete mode 100644 sources/tech/20211128 Install apps on Linux with Flatpak.md create mode 100644 translated/tech/20211128 Install apps on Linux with Flatpak.md diff --git a/sources/tech/20211128 Install apps on Linux with Flatpak.md b/sources/tech/20211128 Install apps on Linux with Flatpak.md deleted file mode 100644 index f183c45d8d..0000000000 --- a/sources/tech/20211128 Install apps on Linux with Flatpak.md +++ /dev/null @@ -1,119 +0,0 @@ -[#]: subject: "Install apps on Linux with Flatpak" -[#]: via: "https://opensource.com/article/21/11/install-flatpak-linux" -[#]: author: "Seth Kenlon https://opensource.com/users/seth" -[#]: collector: "lujun9972" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Install apps on Linux with Flatpak -====== -Flatpak simplifies the installation of applications on Linux. -![Flatpak][1] - -Computer applications consist of many small files that are linked together to perform a set of tasks. Because they get presented as "apps," colorful icons in the menu or on a desktop, most of us think of applications as a single, almost tangible thing. And in a way, it's comforting to think of them that way because they feel manageable that way. If an application is actually the amalgamation of hundreds of little library and asset files scattered throughout your computer, where's the application? And existential crisis aside, what happens when one application needs one version of a library while another application demands a different version?  - -In the world of cloud computing, [containers][2] are becoming more and more popular because they offer isolation and consolidation for applications. You can install all the files an application needs in a "container." That way, its libraries stay out of the way of other applications, and the memory it occupies doesn't leak data into the memory space of another. Everything ends up feeling very much like a single, almost tangible _thing_. On the Linux desktop, Flatpak, a cross-distribution, daemon-less, decentralized application delivery system, provides a similar technology. - -### Install Flatpak on Linux - -Your Linux system may already have Flatpak installed. If not, you can install it from your package manager: - -On Fedora, Mageia, and similar distributions: - - -``` -`$ sudo dnf install flatpak` -``` - -On Elementary, Mint, and other Debian-based distributions: - - -``` -`$ sudo apt install flatpak` -``` - -On Slackware, Flatpak is available from [SlackBuilds.org][3]. - -### Select a Flatpak repo - -You can install an application as a Flatpak by adding a Flatpak repository to your distribution's software center (such as **Software** on GNOME). Flatpak is a decentralized system, meaning anyone developing software can host their own repository. Still, in practice, [Flathub][4] is the biggest and most popular aggregation of applications in the Flatpak format. To add Flathub to **GNOME Software** or **KDE Discover**, navigate to flatpak.org/setup and find the instructions for your distribution and start with step #2, or just download the [Flatpakrepo][5] file. Depending on your network, it may take a few minutes for your software center to synchronize with Flathub or another Flatpak repository. Flathub has a lot of software, but there's no limit to how many Flatpak repositories you have on your system, so don't be afraid to add a new repository if you find one that has the software you want to try. - -![Software Repositories][6] - -(Seth Kenlon, [CC BY-SA 4.0][7]) - -If you prefer to work in the terminal, you can add repositories directly with the `flatpak` command: - - -``` - - -$ flatpak remote-add --if-not-exists flathub \ - - -``` - -### Install an application - -As long as you've added a Flatpak repository to your software center, you can browse through applications as usual. - -![GNOME Software][8] - -(Seth Kenlon, [CC BY-SA 4.0][7]) - -Click on an application that looks appealing, read up on it, and click the **Install** button when you're ready. - -### Installing flatpaks in the terminal - -If you prefer to work in the terminal, you can treat Flatpak as a dedicated package manager. You can search for an application using the `flatpak search` command: - - -``` - - -$ flatpak search paint -Name        Description                         Application ID -CorePaint   A simple painting tool              org.cubocore.CorePaint -Pinta       Edit images and paint digitally     com.github.PintaProject.Pinta -Glimpse     Create images and edit photographs  org.glimpse_editor.Glimpse -Tux Paint   A drawing program for children      org.tuxpaint.Tuxpaint -Krita       Digital Painting, Creative Freedom  org.kde.krita - -``` - -Install with `flatpak install`: - - -``` -`$ flatpak install krita` -``` - -Once installed, applications appear in your application menu or Activities screen along with all the other applications on your system. - -### Apps made easy - -Flatpak makes installing applications easy for the user by eliminating version conflicts. They make distributing software easy for developers by targeting just one package format on either a self-hosted platform or a communal one like Flathub. I use Flatpaks on Fedora Silverblue, CentOS, and Slackware, and I can't quite imagine life without it now. Try Flatpak for your next app install! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/11/install-flatpak-linux - -作者:[Seth Kenlon][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/seth -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/flatpak-lead-image_0.png?itok=URbhdsDQ (Flatpak) -[2]: https://opensource.com/article/21/7/linux-podman -[3]: http://slackbuilds.org -[4]: http://flathub.org -[5]: https://flathub.org/repo/flathub.flatpakrepo -[6]: https://opensource.com/sites/default/files/uploads/repo.jpg (Software Repositories) -[7]: https://creativecommons.org/licenses/by-sa/4.0/ -[8]: https://opensource.com/sites/default/files/uploads/software.jpg (GNOME Software) diff --git a/translated/tech/20211128 Install apps on Linux with Flatpak.md b/translated/tech/20211128 Install apps on Linux with Flatpak.md new file mode 100644 index 0000000000..8985b1f389 --- /dev/null +++ b/translated/tech/20211128 Install apps on Linux with Flatpak.md @@ -0,0 +1,119 @@ +[#]: subject: "Install apps on Linux with Flatpak" +[#]: via: "https://opensource.com/article/21/11/install-flatpak-linux" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +用 Flatpak 在 Linux 上安装应用 +====== +Flatpak 简化了 Linux 上应用的安装。 +![Flatpak][1] + +计算机应用由许多小文件组成,它们被链接在一起以执行一系列的任务。因为它们以“应用”的形式出现,在菜单或桌面上有彩色的图标,我们大多数人认为应用是一个单一的、几乎是有形的东西。在某种程度上,这样想是令人欣慰的,因为它们感觉是可以管理的。如果一个应用实际上是散落在你的计算机上的数百个小库和资源文件的组合,那么应用在哪里?撇开存在危机不谈,当一个应用需要一个版本的库,而另一个应用需要一个不同的版本时,会发生什么? + +在云计算的世界里,[容器][2]正变得越来越流行,因为它们为应用提供了隔离和整合。你可以在一个“容器”中安装一个应用需要的所有文件。这样一来,它的库就不会受到其他应用的影响,它所占用的内存也不会将数据泄露到另一个内存空间。所有的东西最后都感觉非常像一个单一的、几乎是有形的_东西。在 Linux 桌面上,Flatpak,一个跨发行版、无守护进程、去中心化的应用交付系统,提供了一个类似的技术。 + +### 在 Linux 上安装 Flatpak + +你的 Linux 系统可能已经安装了 Flatpak。如果没有,你可以从你的包管理器中安装它: + +在 Fedora、Mageia 和类似的发行版上: + + +``` +`$ sudo dnf install flatpak` +``` + +在 Elementary、Mint 和其他基于 Debian 的发行版上: + + +``` +`$ sudo apt install flatpak` +``` + +在 Slackware 上,Flatpak 可以从 [SlackBuilds.org][3] 获得。 + +### 选择一个 Flatpak 仓库 + +你可以通过在你的发行版的软件中心(如 GNOME 上的**软件**)添加一个 Flatpak 仓库,将一个应用安装为 Flatpak。Flatpak 是一个去中心化的系统,意味着任何开发软件的人都可以托管他们自己的仓库。尽管如此,在实践中,[Flathub][4] 是 Flatpak 格式的最大和最流行的应用集合。要将 Flathub 添加到 **GNOME Software** 或者 **KDE Discover**,请浏览 flatpak.org/setup,找到适合你的发行版的说明,从第二步开始,或者直接下载 [Flatpakrepo][5] 文件。根据你的网络情况,你的软件中心可能需要几分钟的时间来与 Flathub 或另一个 Flatpak 仓库同步。Flathub 有很多软件,但你的系统上有多少个 Flatpak 仓库是没有限制的,所以如果你发现一个有你想尝试的软件,不要害怕添加一个新的仓库。 + +![Software Repositories][6] + +(Seth Kenlon, [CC BY-SA 4.0][7]) + +如果你喜欢在终端工作,你可以用 `flatpak` 命令直接添加到仓库: + + +``` + + +$ flatpak remote-add --if-not-exists flathub \ + + +``` + +### 安装一个应用 + +只要你在软件中心添加了 Flatpak 仓库,你就可以像往常一样浏览应用了。 + +![GNOME Software][8] + +(Seth Kenlon, [CC BY-SA 4.0][7]) + +点击一个看起来很吸引人的应用,阅读它,当你准备好时点击**安装**按钮。 + +### 在终端中安装 flatpaks + +如果你喜欢在终端工作,你可以把 Flatpak 当作一个专门的包管理器。你可以使用 `flatpak search` 命令来搜索一个应用程序: + + +``` + + +$ flatpak search paint +Name Description Application ID +CorePaint A simple painting tool org.cubocore.CorePaint +Pinta Edit images and paint digitally com.github.PintaProject.Pinta +Glimpse Create images and edit photographs org.glimpse_editor.Glimpse +Tux Paint A drawing program for children org.tuxpaint.Tuxpaint +Krita Digital Painting, Creative Freedom org.kde.krita + +``` + +用 `flatpak install` 安装: + + +``` +`$ flatpak install krita` +``` + +安装后,应用就会与系统中的所有其他应用一起出现在你的应用菜单或活动页上。 + +### 应用变得简单 + +Flatpak 通过消除版本冲突,使用户轻松安装应用。他们通过在自我托管的平台或像 Flathub 这样的公共平台上只针对一种软件包格式,使分发软件变得简单。我在 Fedora Silverblue、CentOS 和 Slackware 上使用 Flatpaks,我无法想象现在没有它的生活。在你的下一个应用安装中试试 Flatpak 吧! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/11/install-flatpak-linux + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/flatpak-lead-image_0.png?itok=URbhdsDQ (Flatpak) +[2]: https://opensource.com/article/21/7/linux-podman +[3]: http://slackbuilds.org +[4]: http://flathub.org +[5]: https://flathub.org/repo/flathub.flatpakrepo +[6]: https://opensource.com/sites/default/files/uploads/repo.jpg (Software Repositories) +[7]: https://creativecommons.org/licenses/by-sa/4.0/ +[8]: https://opensource.com/sites/default/files/uploads/software.jpg (GNOME Software) From 6d79295c72153c46d32f7fb6e21ad28d182ae00d Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 2 Dec 2021 08:53:13 +0800 Subject: [PATCH 063/244] translating --- ...ter is an Ideal Task Manager - Resource Monitor for Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20211130 System Monitoring Center is an Ideal Task Manager - Resource Monitor for Linux.md b/sources/tech/20211130 System Monitoring Center is an Ideal Task Manager - Resource Monitor for Linux.md index dde8c3fdee..d787d8baa6 100644 --- a/sources/tech/20211130 System Monitoring Center is an Ideal Task Manager - Resource Monitor for Linux.md +++ b/sources/tech/20211130 System Monitoring Center is an Ideal Task Manager - Resource Monitor for Linux.md @@ -2,7 +2,7 @@ [#]: via: "https://itsfoss.com/system-monitoring-center/" [#]: author: "Ankush Das https://itsfoss.com/author/ankush/" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 08646c1af282afc74f5954978d65e20da42c55a6 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 2 Dec 2021 10:04:57 +0800 Subject: [PATCH 064/244] TSL&PRF --- ...rome vs Chromium- What-s the difference.md | 162 ----------------- ...rome vs Chromium- What-s the difference.md | 164 ++++++++++++++++++ 2 files changed, 164 insertions(+), 162 deletions(-) delete mode 100644 sources/tech/20211121 Google Chrome vs Chromium- What-s the difference.md create mode 100644 translated/tech/20211121 Google Chrome vs Chromium- What-s the difference.md diff --git a/sources/tech/20211121 Google Chrome vs Chromium- What-s the difference.md b/sources/tech/20211121 Google Chrome vs Chromium- What-s the difference.md deleted file mode 100644 index 39d190ffdb..0000000000 --- a/sources/tech/20211121 Google Chrome vs Chromium- What-s the difference.md +++ /dev/null @@ -1,162 +0,0 @@ -[#]: subject: "Google Chrome vs Chromium: What’s the difference?" -[#]: via: "https://itsfoss.com/chrome-vs-chromium/" -[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" -[#]: collector: "lujun9972" -[#]: translator: "wxy" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Google Chrome vs Chromium: What’s the difference? -====== - -Google Chrome is the most popular web browser. No matter whether you prefer to use it, Chrome manages to offer a good user experience. - -Even though it is available for Linux, it is not an open-source web browser. - -And, if you need the look and feel of Google Chrome but want to use an open-source solution, Chromium can be your answer. - -But isn’t Google Chrome based on Chromium? (that’s a Yes.) And, it’s also developed by Google? (Also, Yes.) - -So, what are the differences between Chrome and Chromium? In this article, we shall take an in-depth look at both of them and compare them while presenting some benchmarks. - -### User Interface - -![Google Chrome and Chromium running side-by-side on Zorin OS 16][1] - -The user interfaces for both Google Chrome and Chromium remain very similar, with minor noticeable differences. - -For instance, I noticed that the system title bar and borders were disabled by default for Google Chrome out of the box. In contrast, it was enabled by default for Chromium at the time of my tests. - -You can also notice a share button in the address bar of Google Chrome, which is absent on Chromium. - -It isn’t a big visual difference, but just a set of UI tweaks as per the available features. So, yes, you can expect a similar user experience with under-the-hood tweaks. If you are in for the UI, both the browsers should suit you well. - -### Open-Source & Proprietary Code - -![][2] - -Chromium is entirely open-source, meaning anyone can use and modify the code to their heart’s intent. You can check out its source code on its [GitHub mirror][3]. - -This is why you will find many [Chromium-based browsers][4] available such as Brave, Vivaldi and Edge. - -You end up getting so many choices, so you can choose what you like the best. - -On the other hand, Google Chrome adds proprietary code to Chromium, making Chrome a proprietary browser. For example, one can fork Brave, but one cannot fork Google Chrome, restricting the usage of their Google-specific code/work. - -For end-users, the license does not affect the user experience. However, with an open-source project, you get more transparency without relying on the company to communicate what they intend to change and what they’re doing with the browser. - -So, yes, if you’re not a fan of proprietary code, Chromium is the answer. - -### Feature Differences - -It’s no surprise that Google does not want its competitors to have similar capabilities. So, Google has been [locking up Chromium and disabling a lot of Google-specific abilities][5]. - -Hence, you will find some differences in capabilities between both browsers. - -Not just limited to that, but because Chromium is open-source, you may notice some inconvenience. Fret not; I’ll point out the crucial differences below: - -**Google Chrome** | **Chromium** ----|--- -Sign-in and Sync Available | No Sign-in and Sync -Media codec support to use Netflix | Manual codec installation is required - -For starters, the Google-powered sign-in/sync feature is no longer available in Chromium. It supported sign-in and sync until Google decided to remove it from the open-source project. - -Next, Google Chrome comes with built-in support for high-quality media codecs. So, you can load up content from Netflix. But, it won’t work with Chromium. - -![Netflix doesn’t work in Chromium by default][6] - -Technically, Chromium does not include the _Widevine Content Decryption module_. So, you will have to install the required codecs manually to make most of the things work. - -However, you should not have any issues playing content from platforms like Apple Music and others on both browsers out of the box. - -### Installation & Availability of Latest update - -You can install Google Chrome on virtually any platform. Linux is not an exception. Just head to its official website and grab the DEB/RPM package to install it quickly. The installed application also gets updated automatically. - -![][7] - -Installing Chromium is not that straightforward on several platforms. There was a time when some Linux distributions included Chromium as the default browser. Those were the days of the past. - -Even on Windows, Chromium installation and update is not as smooth as Chrome. - -On Linux, it’s entirely a different story for installing Chromium. Popular distribution like Ubuntu packages it as a sandboxed Snap application. - -Even if you are trying to install it using the terminal, hoping that you would get it from the APT repositories, it’s Snap again: - -![][8] - -With the Snap package, you may face issues with blending in with your custom desktop theme. Snap applications take longer to start as well. - -![][9] - -And, if you proceed to build it and install Chromium manually, you will have to update it manually. - -### The Privacy Angle - -Google Chrome should be good enough for most users. However, if you are worried about your privacy, Google Chrome tracks usage info and some browsing-related information. - -Recently, [Google introduced a new Chrome API][10] that lets sites detect when you are idle and when you are not. While this is a massive privacy concern, it isn’t the only thing. - -Google constantly experiments with new ways of tracking users; for instance, Google’s FLoC experiment wasn’t well-received, as pointed out by [EFF][11]. - -Technically, they claim that they want to enhance users’ privacy while still providing advertising opportunities. However, that is one impossible task to achieve as of now. - -In comparison, Chromium should fare way better concerning privacy. However, if you hate anything Google-related in your browser, even the slightest telemetry, you should try [UnGoogled Chromium][12] instead. - -It is Chromium, but without any Google components. - -### Browser Performance - -There are a variety of browser benchmarks that give you an idea of how well a browser can handle tasks. - -Considering the advanced web applications and resource-intensive JavaScript found on websites, if a web browser does not perform well, you will get a noticeably bad experience when you dabble with many active tabs. - -[JetStream 2][13] and [Speedometer 2][14] are two popular benchmarks that give you a performance estimate of handling various tasks and responsiveness, respectively. - -In addition to that, I also tried out [Basemark Web 3.0][15], which also tests a variety of things and gives you an aggregate score. - -![][16] - -Overall, Google Chrome wins here. - -But, it is worth noting that your system resources and background processes while running a browser will affect performance differently. So, take that into account as well. - -### What should you choose? - -The choices for browsers exist because users prefer different things. Google Chrome offers a good feature set and user experience. If you use Google-powered services in some form, Google Chrome is an easy recommendation. - -However, if you are concerned about privacy practices and proprietary code, Chromium or UnGoogled Chromium, or any other Chromium-based browser like Brave can be a good pick. - -That’s all I had in mind when debating Chrome and Chromium. I am open to receive your views now. The comment section is all yours. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/chrome-vs-chromium/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/chrome-chromium-ui.png?resize=800%2C627&ssl=1 -[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/open-source-proprietary.png?resize=800%2C450&ssl=1 -[3]: https://github.com/chromium/chromium -[4]: https://news.itsfoss.com/chrome-like-browsers-2021/ -[5]: https://news.itsfoss.com/is-google-locking-down-chrome/ -[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/chromium-netflix.png?resize=800%2C541&ssl=1 -[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/google-chrome-version.png?resize=800%2C549&ssl=1 -[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/install-chromium.png?resize=800%2C440&ssl=1 -[9]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/chromium-version.png?resize=800%2C539&ssl=1 -[10]: https://www.forbes.com/sites/zakdoffman/2021/10/02/stop-using-google-chrome-on-windows-10-android-and-apple-iphones-ipads-and-macs/ -[11]: https://www.eff.org/deeplinks/2021/03/googles-floc-terrible-idea -[12]: https://github.com/Eloston/ungoogled-chromium -[13]: https://webkit.org/blog/8685/introducing-the-jetstream-2-benchmark-suite/ -[14]: https://webkit.org/blog/8063/speedometer-2-0-a-benchmark-for-modern-web-app-responsiveness/ -[15]: https://web.basemark.com/ -[16]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/chrome-chromium-benchmarks-1.png?resize=800%2C450&ssl=1 diff --git a/translated/tech/20211121 Google Chrome vs Chromium- What-s the difference.md b/translated/tech/20211121 Google Chrome vs Chromium- What-s the difference.md new file mode 100644 index 0000000000..1e1d9ec5b4 --- /dev/null +++ b/translated/tech/20211121 Google Chrome vs Chromium- What-s the difference.md @@ -0,0 +1,164 @@ +[#]: subject: "Google Chrome vs Chromium: What’s the difference?" +[#]: via: "https://itsfoss.com/chrome-vs-chromium/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Chrome 与 Chromium 有何不同? +====== + +![](https://img.linux.net.cn/data/attachment/album/202112/02/100436xj1u51jhrjuwhjfw.jpg) + +Chrome 浏览器是最流行的网页浏览器。无论你是否喜欢使用它,Chrome 都能提供良好的用户体验。 + +尽管它可以在 Linux 上使用,但它不是一个开源的网页浏览器。 + +而且,如果你喜欢 Chrome 的外观和感觉,但又想使用一个开源的解决方案,Chromium 是一个选择。 + +但是,Chrome 浏览器不是基于 Chromium 的吗?(是的。)而且,它也是由谷歌开发的吧?(也是的。) + +那么,Chrome 和 Chromium 之间有什么区别呢?在这篇文章中,我们将深入了解它们,并在根据一些基准对它们进行比较。 + +### 用户界面 + +![Chrom 和 Chromium 在 Zorin OS 16 上并排运行][1] + +Chrome 和 Chromium 的用户界面非常相似,除了一些细微的区别。 + +例如,我注意到 Chrome 的系统标题栏和边框一开始就被默认禁用了。相比之下,在我测试的时候,Chromium 默认启用了它们。 + +你还可以注意到在 Chrome 的地址栏里有一个分享按钮,而在 Chromium 上却没有。 + +这并不是大的视觉差异,而只是根据现有的功能进行了一系列的 UI 调整。所以,你可以预期它们的用户体验类似,而在底层有所不同。如果你在意用户界面,这两款浏览器应该都很适合你。 + +### 开源与专有代码 + +![][2] + +Chromium 是完全开源的,这意味着任何人都可以(根据许可证)按照自己的意愿使用和修改代码。你可以在其 [GitHub 镜像][3] 上查看其源代码。 + +这就是为什么你会发现有许多 [基于 Chromium 的浏览器][4],如 Brave、Vivaldi 和 Edge。 + +有这么多的选择,你可以选择你最喜欢的那个。 + +另一方面,Chrome 在 Chromium 中加入了刚刚专有的代码,使 Chrome 成为了专有浏览器。例如,人们可以复刻 Brave,但不能复刻谷歌 Chrome,而限制使用其中的谷歌特定代码/工作。 + +对于终端用户来说,开源与否并不影响用户体验。然而,对于一个开源项目,你可以得到更多的透明度,而不需要依靠公司来沟通他们打算改变什么,以及他们在浏览器上做什么。 + +所以,是的,如果你不喜欢专有代码,Chromium 就是你的选择。 + +### 功能差异 + +谷歌不希望其竞争对手拥有类似的能力,这并不奇怪。因此,谷歌一直在 [锁定 Chromium 并在其中禁用了很多谷歌特有的能力][5]。 + +因此,你会发现这两个浏览器的能力有一些差异。 + +不仅如此,由于 Chromium 是开源的,你可能会注意到一些不便之处。别担心,我将在下面指出其中的关键差异。 + +Chrome | Chromium +---|--- +有签到和同步功能 | 无签到和同步功能 +支持媒体编解码器以使用 Netflix | 需要手动安装编解码器 + +对于初学者来说,在 Chromium 中不再能使用由谷歌支持的登录/同步功能。它曾经支持签到和同步,直到谷歌决定将其从开源项目中删除。 + +接下来,Chrome 内置了对高质量媒体编解码器的支持。因此,你可以加载来自 Netflix 的内容。但是,在 Chromium 中没有这些。 + +![Netflix 在 Chromium 中默认不能工作][6] + +从技术上讲,Chromium 并不包括 _Widevine 内容解密模块_。因此,你需要手动安装所需的编解码器,以使大部分东西都能工作。 + +不过,你在这两个浏览器上你都可以播放苹果音乐等平台的内容,应该不会有任何问题。 + +### 安装及最新更新 + +你可以在几乎任何平台上安装 Chrome。Linux 也不例外。只需前往其官方网站,抓取 DEB/RPM 包即可快速安装。安装后的应用程序也会自动更新。 + +![][7] + +有几个平台上安装 Chromium 并不那么简单。曾经有一段时间,一些 Linux 发行版将 Chromium 作为默认浏览器。那是过去的日子了。 + +即使在 Windows 上,Chromium 的安装和更新也不像 Chrome 那样顺利。 + +在 Linux 上,安装 Chromium 则完全是另一回事。像 Ubuntu 这样的流行发行版把它打包成一个沙盒式的 Snap 应用程序。 + +即使你试图用终端安装它,希望能从 APT 库中得到它,但它又是一个 Snap。 + +![][8] + +使用 Snap 软件包,你可能会面临与你的自定义桌面主题相融合的问题。Snap 应用程序的启动时间也会更长。 + +![][9] + +而且,如果你构建它并手动安装 Chromium,你就得手动更新它。 + +### 隐私角度 + +Chrome 对大多数用户来说应该足够好了。但是,如果你担心你的隐私,Chrome 会追踪使用信息和一些与浏览有关的信息。 + +最近,[谷歌推出了一个新的 Chrome API][10],可以让网站检测到你什么时候闲着,什么时候不闲着。虽然这是一个巨大的隐私问题,但并不是唯一的问题。 + +谷歌不断试验新的追踪用户的方法;例如,正如 [EFF][11] 所指出的那样,谷歌的 FLoC 实验并不受欢迎。 + +从技术上讲,他们声称他们想增强用户的隐私,而同时仍然提供广告机会。然而,就目前而言,这是一个不可能实现的任务。 + +相比之下,Chromium 在隐私方面的表现应该要好得多。然而,如果你讨厌你的浏览器中有任何与谷歌有关的东西,即使是最轻微的遥测,你应该试试 [UnGoogled Chromium][12]。 + +它是 Chromium,但没有任何谷歌组件。 + +### 浏览器性能 + +有各种各样的浏览器基准,可以让你了解到一个浏览器处理任务的能力如何。 + +考虑到网站上的高级网站应用和资源密集型的 JavaScript,如果一个网页浏览器的性能不好,当你打开许多活动的标签时,你的体验就会明显很糟糕。 + +[JetStream 2][13] 和 [Speedometer 2][14] 是两个流行的基准,可以给你处理各种任务和响应能力的性能估计。 + +除此之外,我还试用了 [Basemark Web 3.0][15],它也是测试各种指标并给你一个综合分数。 + +![][16] + +总体而言,Chrome 在此获胜。 + +但是,值得注意的是,在运行浏览器时,你的系统资源和后台进程会对性能产生不同的影响。因此,也要考虑到这一点。 + +### 你应该选择哪个? + +之所以存在对浏览器的选择,是因为用户喜欢不同的东西。Chrome 提供了一个良好的功能集和用户体验。如果你以某种形式使用由谷歌提供的服务,Chrome 是一个简单的推荐。 + +然而,如果你担心隐私和专有代码,Chromium 或 UnGoogled Chromium,或任何其他基于 Chromium 的浏览器,如 Brave,可以是一个不错的选择。 + +这就是我在比较 Chrome 和 Chromium 时的全部看法。我愿意接受你的意见。评论区都是你的。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/chrome-vs-chromium/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/chrome-chromium-ui.png?resize=800%2C627&ssl=1 +[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/open-source-proprietary.png?resize=800%2C450&ssl=1 +[3]: https://github.com/chromium/chromium +[4]: https://news.itsfoss.com/chrome-like-browsers-2021/ +[5]: https://news.itsfoss.com/is-google-locking-down-chrome/ +[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/chromium-netflix.png?resize=800%2C541&ssl=1 +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/google-chrome-version.png?resize=800%2C549&ssl=1 +[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/install-chromium.png?resize=800%2C440&ssl=1 +[9]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/chromium-version.png?resize=800%2C539&ssl=1 +[10]: https://www.forbes.com/sites/zakdoffman/2021/10/02/stop-using-google-chrome-on-windows-10-android-and-apple-iphones-ipads-and-macs/ +[11]: https://www.eff.org/deeplinks/2021/03/googles-floc-terrible-idea +[12]: https://github.com/Eloston/ungoogled-chromium +[13]: https://webkit.org/blog/8685/introducing-the-jetstream-2-benchmark-suite/ +[14]: https://webkit.org/blog/8063/speedometer-2-0-a-benchmark-for-modern-web-app-responsiveness/ +[15]: https://web.basemark.com/ +[16]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/chrome-chromium-benchmarks-1.png?resize=800%2C450&ssl=1 From b2ad968121361de7bef41686e581eb29b91d42eb Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 2 Dec 2021 10:06:45 +0800 Subject: [PATCH 065/244] PRF --- ...20211121 Google Chrome vs Chromium- What-s the difference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/20211121 Google Chrome vs Chromium- What-s the difference.md b/translated/tech/20211121 Google Chrome vs Chromium- What-s the difference.md index 1e1d9ec5b4..7ef0aaaff0 100644 --- a/translated/tech/20211121 Google Chrome vs Chromium- What-s the difference.md +++ b/translated/tech/20211121 Google Chrome vs Chromium- What-s the difference.md @@ -20,7 +20,7 @@ Chrome 浏览器是最流行的网页浏览器。无论你是否喜欢使用它 但是,Chrome 浏览器不是基于 Chromium 的吗?(是的。)而且,它也是由谷歌开发的吧?(也是的。) -那么,Chrome 和 Chromium 之间有什么区别呢?在这篇文章中,我们将深入了解它们,并在根据一些基准对它们进行比较。 +那么,Chrome 和 Chromium 之间有什么区别呢?在这篇文章中,我们将深入了解它们,并介绍一些对它们进行比较的基准。 ### 用户界面 From 36a6ac322f34abd2ff370b908ee68c8de8d7e77d Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 2 Dec 2021 10:09:18 +0800 Subject: [PATCH 066/244] PUB @wxy https://linux.cn/article-14041-1.html --- ...1121 Google Chrome vs Chromium- What-s the difference.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename {translated/tech => published}/20211121 Google Chrome vs Chromium- What-s the difference.md (98%) diff --git a/translated/tech/20211121 Google Chrome vs Chromium- What-s the difference.md b/published/20211121 Google Chrome vs Chromium- What-s the difference.md similarity index 98% rename from translated/tech/20211121 Google Chrome vs Chromium- What-s the difference.md rename to published/20211121 Google Chrome vs Chromium- What-s the difference.md index 7ef0aaaff0..67bcfaf667 100644 --- a/translated/tech/20211121 Google Chrome vs Chromium- What-s the difference.md +++ b/published/20211121 Google Chrome vs Chromium- What-s the difference.md @@ -3,9 +3,9 @@ [#]: author: "Ankush Das https://itsfoss.com/author/ankush/" [#]: collector: "lujun9972" [#]: translator: "wxy" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14041-1.html" Chrome 与 Chromium 有何不同? ====== From 4f1b496e39458ef9e5d937cb8c881d3cebe232ae Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 2 Dec 2021 12:39:40 +0800 Subject: [PATCH 067/244] PRF&PUB @geekpi https://linux.cn/article-14042-1.html --- ...rkstation) Available for Linux Desktops.md | 152 ++++++++++++++++ ...rkstation) Available for Linux Desktops.md | 162 ------------------ 2 files changed, 152 insertions(+), 162 deletions(-) create mode 100644 published/20211031 Best DAW (Digital Audio Workstation) Available for Linux Desktops.md delete mode 100644 translated/tech/20211031 Best DAW (Digital Audio Workstation) Available for Linux Desktops.md diff --git a/published/20211031 Best DAW (Digital Audio Workstation) Available for Linux Desktops.md b/published/20211031 Best DAW (Digital Audio Workstation) Available for Linux Desktops.md new file mode 100644 index 0000000000..9a0d0f968e --- /dev/null +++ b/published/20211031 Best DAW (Digital Audio Workstation) Available for Linux Desktops.md @@ -0,0 +1,152 @@ +[#]: subject: "Best DAW (Digital Audio Workstation) Available for Linux Desktops" +[#]: via: "https://itsfoss.com/best-daw-linux/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14042-1.html" + +最佳 Linux 桌面 DAW(数字音频工作站) +====== + +![](https://img.linux.net.cn/data/attachment/album/202112/02/123844cydiigpj23zgi7z7.jpg) + +数字音频工作站Digital Audio Workstation(DAW)可以让你录音、混音和制作音乐。对于商业用途,有几个主流的选择可以考虑,它们通常被认为是行业标准。 + +像 Steinberg 的 Nuendo/Cubase、ProTools、Ableton Live 和 FL Studio 这样成熟的音乐 DAW 是最流行(也是最昂贵)的解决方案。然而,它们并不能用于 Linux。 + +因此,当用在 Linux 上时,你只能根据现有的选项做出不同的选择。而在这里,我的目的是帮助你找出 Linux 上最好的音乐 DAW。 + +### 在使用 Linux 上的 DAW 之前要记住的事情 + +尽管你可以达到与 Windows/MacOS 系统相同的效果,但在选择使用 Linux 的 DAW 之前,你应该知道一些要点。 + +如果你是专业人士,并且使用过 Linux,你可能已经知道了这些。但是,对于新的 Linux 用户,这可以帮助你做出决定: + + * 许多音频接口没有正式支持 Linux。所以,你可能要在开始之前检查一下兼容性和音频设置过程。 + * 流行的音频插件可能无法直接工作。你必须得寻找替代品或尝试使用 Wine(这是一个耗时的过程)。 + * 即插即用的情况可能不存在。各种任务都需要手动设置。 + +总的来说,在 Linux 中使用 DAW 时,有一些先决条件。它可能不能简单地安装然后就能开始制作音乐。所以,在选择 Linux 作为 DAW 的首选平台之前,你需要了解这些。 + +请注意,有几个 [可用于 Linux 的音频编辑器][1],但不是所有的都可以作为一个成熟的 DAW 使用。 + +现在你知道了这些注意事项,让我提一下目前最好的 Linux DAW。 + +> 非 FOSS 警报! +> +> 这里提到的应用并不全是开源的。它们被列在这里是因为它们在 Linux 上可用,而这篇文章的重点是 Linux。 + +虽然可用于 Linux 的 DAW 可能有许多,但为了确保你得到最好的硬件/软件兼容性,以及易于使用的界面,我们将我们的列表限制在流行的选项上。 + +### 1、Ardour + +![][2] + +[Ardour][3] 是最流行的开源 DAW,可用于 Linux。它也可用于 Windows 和 macOS。 + +它是音乐家、音频工程师和作曲家的一个合适选择。你可以获得编辑乐谱和录制/混合歌曲的所有基本能力。 + +它自带几个插件支持。但是,你需要通过在插件管理器中手动添加它们到混音器中。另外,你可以选择通过指定路径来添加外部 VST3 插件。如果你想从中提取音频或同步,Ardour 还支持视频时间线。 + +#### 在 Linux 中安装 Ardour + +与其他付费版 DAW 不同,你不需要支付高昂的价格就可以使用它。你所需要做的就是购买一个低至 1 美元/月的订阅,只要你的订阅是有效的,你就可以继续访问这个程序和它的更新。 + +如果你对订阅不感兴趣,你可以选择一次性付款,这可以让你获得小版本更新和下一个主要版本(取决于你支付的金额)。 + +最重要的是,如果你喜欢测试即将到来的功能和改进,你还可以访问其开发(或每日)构建版本。 + +对于 Linux 发行版,它提供了一个 `.run` 文件,你可以轻松地从终端启动。 + +### 2、LMMS + +![][4] + +[LMMS][5] 是一个自由开源的 DAW,可用于 Linux 和其他平台。 + +与其他一些 DAW 相比,LMMS 在专业人员所需的专业方面可能有所欠缺。 + +然而,如果你刚刚开始创作音乐,或者需要一些无需购买/订阅就可以使用的东西,它应该可以满足你的一些功能需求。换句话说,它是一个合适的歌曲编辑 DAW。 + +如果你是从另一个平台上的 DAW 迁移来的,它的用户界面可能不太容易熟悉。但是,当你习惯了它,它就很容易使用了。 + +它还支持钢琴音符标签,以帮助你获得音乐制作体验。 + +#### 在 Linux 中安装 LMMS + +你可以选择下载一个 AppImage 文件,它可以在你选择的任何 Linux 发行版上工作。它的配置相当简单,所以你只需要指定一个工作目录就可以开始了。 + +### 3、Bitwig Studio + +![][6] + +[Bitwig Studio][9] 是流行的主流音乐 DAW 之一,也支持 Linux。与本列表中的其他 DAW 相比,Bitwig 提供了更好的跨平台支持和硬件集成。 + +即使你可能坚持使用 Linux 进行音乐制作,但拥有跨平台的支持,以便在你出门在外也可以继续你的工作,对一些人来说这也是一个重要的因素。 + +Bitwig 包括各种创意工具来处理音频文件和信号。所以,它完全可以满足专业要求。 + +### 在 Linux 中安装 Bitwig Studio + +它提供了一个传统的 DEB 包用于安装。你可以在“演示模式”下免费使用它,但它不允许你保存和导出任何东西。Bitwig Studio 在 [Flathub][8] 上还有一个 [Flatpak][7] 包。 + +要解锁所有的功能,你需要以 **$399** 的价格购买它。 + +### 4、REAPER + +![][10] + +[Reaper][11] 是一个可用于 Linux 的经济型 DAW。它提供了一个简单的用户界面和所有的基本功能。 + +和 Bitwig Studio 相比,它可能没有提供很多开箱即用的插件和功能,但它应该足以满足大多数通常的需求,如调制、自动化、使用 VST 插件等等。 + +尽管我没有亲自使用过它,但 Reaper 声称它是高度可定制的,并提供了与各种硬件的良好兼容性。 + +#### 在 Linux 中安装 Reaper + +与其他选择不同,Reaper 提供了一个 tar 包,你需要解压和安装。它包括一个脚本文件。因此,当你解压后,在该文件夹中打开终端或在终端中进入该文件夹,然后用以下命令执行该脚本: + +``` +./install-reaper.sh +``` + +当你安装它时,该脚本也会生成一个用于卸载的脚本。所以,在安装时一定要仔细选择文件夹,并确保在需要时能找到它。 + +在你需要购买它之前,你可以没有任何限制的免费使用它,最长可达 60 天。所以,如果你想在购买 DAW 之前彻底测试一下,我觉得这是一件非常好的事情。 + +个人使用的费用是 **\$60**,如果你需要用于商业用途,则需要 **\$225**。 + +### 总结 + +不幸的是,找不到太多可用于 Linux 的 DAW 。你可以尝试用 Wine 来运行一些流行的音乐 DAW,但我不确定成功率有多少。 + +无论是哪种情况,这里提到的这些对于大多数用户来说应该是绰绰有余了。 + +你喜欢哪种 DAW 用于音乐制作?请在下面的评论中告诉我你的想法。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/best-daw-linux/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/best-audio-editors-linux/ +[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/ardour-daw.png?resize=800%2C476&ssl=1 +[3]: https://ardour.org/ +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/09/lmms-daw.png?resize=800%2C476&ssl=1 +[5]: https://lmms.io/lsp/ +[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/bitwig-studio-linux.png?resize=800%2C457&ssl=1 +[7]: https://itsfoss.com/what-is-flatpak/ +[8]: https://flathub.org/apps/details/com.bitwig.BitwigStudio +[9]: https://www.bitwig.com/ +[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/reaper-linux.png?resize=800%2C614&ssl=1 +[11]: https://www.reaper.fm diff --git a/translated/tech/20211031 Best DAW (Digital Audio Workstation) Available for Linux Desktops.md b/translated/tech/20211031 Best DAW (Digital Audio Workstation) Available for Linux Desktops.md deleted file mode 100644 index 69266da0ae..0000000000 --- a/translated/tech/20211031 Best DAW (Digital Audio Workstation) Available for Linux Desktops.md +++ /dev/null @@ -1,162 +0,0 @@ -[#]: subject: "Best DAW (Digital Audio Workstation) Available for Linux Desktops" -[#]: via: "https://itsfoss.com/best-daw-linux/" -[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" -[#]: collector: "lujun9972" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -最佳 Linux 桌面 DAW(数字音频工作站) -====== - -数字音频工作站(DAW)可以让你录音、混音和制作音乐。对于商业用途,有几个主流的选择可以考虑,它们通常被认为是行业标准。 - -像 Steinberg 的 Nuendo/Cubase、ProTools、Ableton Live 和 FL Studio 这样成熟的音乐 DAW 是最流行(也是最昂贵)的解决方案。然而,它们并不能用于 Linux。 - -因此,当涉及到 Linux 时,你将不得不根据现有的选项做出不同的选择。而且,在这里,我的目的是帮助你指出 Linux 上最好的音乐 DAW。 - -### 在使用 Linux 上的 DAW 之前要记住的事情 - -尽管你可以达到与 Windows/MacOS 系统相同的效果,但在选择使用 Linux 的 DAW 之前,你应该知道一些要点。 - -如果你是专业人士,并且使用过 Linux,你可能已经知道了这些。但是,对于新的 Linux 用户,这可以帮助你做出决定: - - * 许多音频接口没有正式支持 Linux。所以,你可能要在开始之前检查一下兼容性和音频设置过程。 - * 流行的音频插件可能无法直接工作。你将不得不寻找替代品或尝试使用 Wine(这是一个耗时的过程)。 - * 即插即用的情况可能不存在。各种任务都需要手动设置 - - - -总的来说,在 Linux 中使用 DAW 时,有一些先决条件。它可能不能简单地安装然后就能开始制作音乐。所以,在选择 Linux 作为 DAW 的首选平台之前,你需要了解这些。 - -请注意,有几个[可用于 Linux 的音频编辑器][1],但不是所有的都可以作为一个成熟的 DAW 使用。 - -现在你知道了这些注意事项,让我提一下目前最好的 Linux DAW。 - -非 FOSS 警报! - -这里提到的一些应用并不是开源的。它们被列在这里是因为它们在 Linux 上可用,而文章的重点是 Linux。 - -### 顶级 Linux DAW - -虽然可能有多个 DAW 可用于 Linux,但为了确保你得到最好的硬件/软件兼容性以及易于使用的界面,我们将我们的列表限制在流行的选项上。 - -#### 1\. Ardour - -![][2] - -Ardour 是最流行的开源 DAW,可用于 Linux。它也可用于 Windows 和 macOS。 - -它是音乐家、音频工程师和作曲家的一个合适选择。你可以获得编辑乐谱和录制/混合歌曲的所有基本能力。 - -它开箱就有几个插件支持。但是,你需要通过在插件管理器中手动添加它们到混音器中。另外,你可以选择通过指定路径来添加外部 VST3 插件。如果你想从中提取音频或同步,Ardour 还支持视频时间线。 - -##### 在 Linux 中安装 Ardour - -与其他高级 DAW 不同,你不需要支付高昂的价格就可以使用它。你所需要做的就是购买一个低至 1 美元/月的订阅,只要你的订阅是有效的,你就可以继续访问这个程序和它的更新。 - -如果你对订阅不感兴趣,你可以选择一次性付款,这将使你获得小的更新和下一个主要版本(取决于你支付的金额)。 - -最重要的是,如果你喜欢测试即将到来的功能和改进,你还可以访问其开发(或每日)构建。 - -于 Linux 发行版,它提供了一个 .run文 件,你可以轻松地从终端启动。 - -[Ardour][3] - -### 2\. LMMS - -![][4] - -LMMS 是一个免费和开源的 DAW,可用于 Linux 和其他平台。 - -与其他一些 DAW 相比,LMMS 在专业人员所需的专业方面可能有所欠缺。 - -然而,如果你开始创作音乐,或者需要不需要购买/订阅任何东西,它应该提供一些功能。换句话说,它是一个合适的歌曲编辑 DAW。 - -如果你是从另一个平台上的 DAW 来的,用户界面可能不太容易熟悉。但是,当你习惯了它,它就很容易使用了。 - -它还支持钢琴音符标签,以帮助你获得音乐制作体验。 - -##### 在 Linux 中安装 LMMS - -你可以选择下载一个 AppImage 文件,在你选择的任何 Linux 发行版上工作。它的配置相当简单,所以你只需要指定一个工作目录就可以开始了。 - -[LMMS][5] - -### 3\. Bitwig Studio - -![][6] - -Bitwig Studio 是流行的主流音乐 DAW 之一,也支持Linux。与本列表中的其他DAW相比,Bitwig提供了更好的跨平台支持和硬件集成。 - -即使你可能坚持使用 Linux 进行音乐制作,但拥有跨平台的支持,以便在你离开的地方继续你的工作,对一些人来说也是一个重要的标准。 - -Bitwig包括各种创造性的工具来处理音频文件和信号。所以,它完全可以满足专业要求。 - -### 在 Linux 中安装 Bitwig Studio - -它提供了一个传统的 DEB 包用于安装。你可以在“演示模式”下免费使用它,它不允许你保存和导出任何东西。Bitwig Studio 在 [Flathub][8] 上还有一个 [Flatpak][7] 包。 - -要解锁所有的功能,你需要以 **$399** 的价格购买它。 - -[Bitwig Studio][9] - -### 4\. REAPER - -![][10] - -Reaper 是一个可用于 Linux 的经济型 DAW。它提供了一个简单的用户界面和所有的基本功能。 - -Bitwig Studio 相比,它可能没有提供很多开箱即用的插件和功能,但它应该足以满足大多数通常的需求,如调制、自动化、使用 VST 插件等等。 - -尽管我没有亲自使用过它,但 Reaper 声称它是高度可定制的,并提供了与各种硬件的良好兼容性。 - -### 在 Linux 中安装 Reaper - -与其他选择不同,Reaper 提供了一个 tar 包,你需要解压和安装。它包括一个脚本文件。因此,当你解压后,在该文件夹中打开终端或在终端中进入文件夹,然后用以下命令执行该脚本: - -``` -./install-reaper.sh -``` - -当你安装它时,该脚本也会生成另一个脚本让你卸载。所以,在安装时一定要仔细选择文件夹,并确保在需要时能找到它。 - -在你需要购买它之前,你可以免费使用它,而没有任何限制,最长可达 60 天。所以,如果你想在购买 DAW 之前彻底测试一下,我想说这是一件非常好的事情。 - -个人使用的费用是 **$60**,如果你需要用于商业用途,则需要 **$225**。 - -[Reaper][11] - -### 总结 - -不幸的是,你不会发现有很多 DAW 可用于 Linux。你可以尝试用 Wine 来运行一些流行的音乐 DAW,但我不确定成功率有多少。 - -无论是哪种情况,这里提到的这些对于大多数用户来说应该是绰绰有余了。 - -你喜欢哪种 DAW 用于音乐制作?请在下面的评论中告诉我你的想法。 - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/best-daw-linux/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://itsfoss.com/best-audio-editors-linux/ -[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/ardour-daw.png?resize=800%2C476&ssl=1 -[3]: https://ardour.org/ -[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/09/lmms-daw.png?resize=800%2C476&ssl=1 -[5]: https://lmms.io/lsp/ -[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/bitwig-studio-linux.png?resize=800%2C457&ssl=1 -[7]: https://itsfoss.com/what-is-flatpak/ -[8]: https://flathub.org/apps/details/com.bitwig.BitwigStudio -[9]: https://www.bitwig.com/ -[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/reaper-linux.png?resize=800%2C614&ssl=1 -[11]: https://www.reaper.fm From d0916b7c3d7d4b66603063483a113124a98673cc Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 3 Dec 2021 05:04:49 +0800 Subject: [PATCH 068/244] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211202=20?= =?UTF-8?q?Edit=20video=20on=20Linux=20with=20Kdenlive?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211202 Edit video on Linux with Kdenlive.md --- ...11202 Edit video on Linux with Kdenlive.md | 136 ++++++++++++++++++ 1 file changed, 136 insertions(+) create mode 100644 sources/tech/20211202 Edit video on Linux with Kdenlive.md diff --git a/sources/tech/20211202 Edit video on Linux with Kdenlive.md b/sources/tech/20211202 Edit video on Linux with Kdenlive.md new file mode 100644 index 0000000000..ee30a6ee15 --- /dev/null +++ b/sources/tech/20211202 Edit video on Linux with Kdenlive.md @@ -0,0 +1,136 @@ +[#]: subject: "Edit video on Linux with Kdenlive" +[#]: via: "https://opensource.com/article/21/12/kdenlive-linux-creative-app" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Edit video on Linux with Kdenlive +====== +Try your hand at professional video editing with this KDE application. +![An old-fashioned video camera][1] + +Whether it's due to snow days, a seasonal vacation, or time off for any number of holidays, December is a great time to settle down in front of your computer and get creative. One of my favorite pastimes is cutting video footage together. Sometimes I edit video to tell a story. Other times I edit video to convey a mood or a single idea, and sometimes I do it to provide visuals to music I've either discovered or composed. Maybe it's because I learned to edit film at a school while aiming for a career in the field, or maybe it's just because I like powerful open source tools. Still, my favorite video editing application to this day remains the formidable Kdenlive, a robust and professional editing software providing an intuitive workflow and plenty of effects and transitions. + +### Install Kdenlive on Linux + +Kdenlive is available on most Linux distributions from your package manager. On Fedora, Mageia, and similar distributions: + + +``` +`$ sudo dnf install kdenlive` +``` + +On Elementary, Mint, and other Debian-based distributions: + + +``` +`$ sudo apt install kdenlive` +``` + +However, I use Kdenlive as a [Flatpak][2]. + +### How to tell a story with video + +What does it mean to "edit" video, anyway? + +Editing footage has a somewhat inflated reputation. Sure, it's the process that enables big blockbuster movies to affect millions of people worldwide, but when you're sitting in front of your laptop, you don't have to think of it that way. Editing a video is, quite simply, removing the "bad" parts of a video until just the "good" stuff remains. + +What makes footage bad or good is entirely up to your own tastes, and it may even change depending on what you're trying to "say" with your creation. If you're editing footage of the wildlife you find in your backyard, you might cut out the parts of the shots that prominently feature your rubbish bins or the shot of you stepping on a rake. What remains is sure to make your backyard look like a magical secret garden filled with hummingbirds, butterflies, a curious rabbit, and a playful dog. On the other hand, leave that "bad" footage in, and you can instead create a comedy about a suburbanite taking the rubbish out, stepping on a rake, frightening all the animals away, and generally making a nuisance of themselves. There's no right or wrong. Whatever you cut, nobody knows ever existed. Whatever you keep tells a story. + +### Importing footage + +When you start Kdenlive, you have an empty project. The Kdenlive window consists of a **Project Bin** in the top left corner, an information panel in the center, and a **Project Monitor** in the top right. Along the bottom is the really important part—the **Timeline**. The **Timeline** is where your story gets created. Everything in the **Timeline** at the finish of your project is what your audience sees. That's your movie. + +Before you start building a story in your timeline, you need some footage. Assuming you've taken some footage on a camera or mobile device, you must add clips to the **Project Bin**. Right-click in the empty space of the **Project Bin** panel and select **Add Clip or Folder**. + +![Adding clips in Kdenlive][3] + +(Seth Kenlon, [CC BY-SA 4.0][4]) + +### Cutting footage + +In Kdenlive, there are lots of ways to make cuts in video footage. + +#### The three-point edit + +Historically, the official way to make a cut is to perform a "three-point edit." Count the points: + +1\. Open a video clip in Kdenlive's **Clip Monitor** panel, find the point where you wish the video had started, and press **I** on your keyboard to mark _in_. +2\. Then find the point where you wish the video had stopped and press **O** to mark _out_. +3\. Drag the video clip from the **Clip Monitor** to a point in the **Timeline** at the bottom of the Kdenlive window. + +![A three-point edit in progress][5] + +(Seth Kenlon, [CC BY-SA 4.0][4]) + +This method is still important in some settings, but it's a little formal for many users. + +#### Inline edits + +Another way to make an edit is to drag a clip into Kdenlive's **Timeline** panel and then click and drag the edges of the clip until only the good part remains. + +![Editing in the timeline][6] + +(Seth Kenlon, [CC BY-SA 4.0][4]) + +### The art of the cut-away + +Another kind of edit is the _cut-away_. It's an important trick because it not only helps you skip over bad parts of a video clip, but it can add a lot of context for your audience. You've seen lots of cut-aways in movies and on TV, even if you don't realize it.  Every time someone on the screen looks up in surprise, and then you see a shot of what they see, that is a cut-away. When a newscaster references a place in your city, and a shot of that place follows it, that is a cut-away. + +You can do cut-aways in Kdenlive easily because the Kdenlive **Timeline** is layered. There are four "tracks" in the Kdenlive timeline by default—the top two for video and the bottom two for any accompanying audio. When you place video footage on the timeline, the footage on the highest video track takes precedence over footage on a lower track. This means that you can functionally edit out footage on one video track just by placing something better on the track above it. + +![A cut-away][7] + +(Seth Kenlon, [CC BY-SA 4.0][4]) + +### Export your movie + +When done with all of your edits, you can export your movie so you can post it online for others to see. To do that, click the **Render** button in the toolbar at the top of the Kdenlive window. In the **Rendering** window that appears, select the format compatible with your video hosting service. The WEBM format is pretty universal these days, and in addition to being open source it's also one of the best formats available both for distribution and archival purposes. It's capable of 4K, stereoscopic imagery, a wide color gamut, and much more, and all major browsers play it. + +Rendering can take time, depending on how long your project is, how many edits you've made, and how powerful your computer is. + +### A long-lasting solution + +As I write this, it was exactly ten years ago today that I published an [introductory six-part series on Kdenlive][8] here on Opensource.com. To my own surprise, that means I've been a Kdenlive user now longer than I'd been a user of the proprietary editors I learned in film school. That's some impressive longevity, and I still use it today because it delivers on flexibility and reliability as no other editor does. Heck, the video editor I learned on doesn't even exist, at least not in the same form, anymore (which makes me wish I'd learned to edit on an open source platform!). + +Kdenlive is a powerful editor with lots of features, but don't let that intimidate you. My introductory series is as relevant and accurate today as it was ten years ago, which in my estimation, is a characteristic of a truly reliable application. Should you choose to explore Kdenlive as an editor, be sure to download our **[cheat sheet][9]**, so you can internalize keyboard shortcuts that reduce clicks and make the editing process seamless. + +Now go tell your story! + +GNU/Linux has infamously been wanting for a good, solid, professional-level free video editor for... + +In the previous article in this series, we reviewed the different methods of importing footage into... + +It is expected that even a modest video editor will feature a set of basic video transitions. The... + +Good photography doesn't just happen. Careful attention to lens settings, depth-of-field charts,... + +Traditionally, the film editing process was regimented and compartmentalized. The assistant editors... + +Post-production is a long and involved process. As these articles have demonstrated, Kdenlive is... + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/kdenlive-linux-creative-app + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/LIFE_film.png?itok=aElrLLrw (An old-fashioned video camera) +[2]: https://opensource.com/article/21/11/install-flatpak-linux +[3]: https://opensource.com/sites/default/files/uploads/project-bin.jpg (Adding clips in Kdenlive) +[4]: https://creativecommons.org/licenses/by-sa/4.0/ +[5]: https://opensource.com/sites/default/files/uploads/3-point-edit.jpg (A three-point edit in progress) +[6]: https://opensource.com/sites/default/files/uploads/edit.jpg (Editing in the timeline) +[7]: https://opensource.com/sites/default/files/uploads/cut-away.jpg (A cut-away) +[8]: https://opensource.com/life/11/11/introduction-kdenlive +[9]: https://opensource.com/downloads/kdenlive-cheat-sheet From 499a67a7cc6fde69e75d30a3e5e5a9a9b28187f5 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 3 Dec 2021 05:04:57 +0800 Subject: [PATCH 069/244] add done: 20211202 Edit video on Linux with Kdenlive.md --- sources/tech/20211203 .md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 sources/tech/20211203 .md diff --git a/sources/tech/20211203 .md b/sources/tech/20211203 .md new file mode 100644 index 0000000000..d92966e359 --- /dev/null +++ b/sources/tech/20211203 .md @@ -0,0 +1,25 @@ +[#]: subject: "" +[#]: via: "https://www.2daygeek.com/configure-smtp-relay-host-in-sendmail-rhel/" +[#]: author: " " +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + + +====== + +-------------------------------------------------------------------------------- + +via: https://www.2daygeek.com/configure-smtp-relay-host-in-sendmail-rhel/ + +作者:[][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: +[b]: https://github.com/lujun9972 From bbea3be83aca3021622d8a68c85c20bd57756f38 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 3 Dec 2021 05:05:27 +0800 Subject: [PATCH 070/244] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020211202=20?= =?UTF-8?q?Vivaldi=205.0=20Brings=20Two-Level=20Tabs=20to=20Android=20&=20?= =?UTF-8?q?Adds=20New=20Features=20for=20Desktop?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20211202 Vivaldi 5.0 Brings Two-Level Tabs to Android - Adds New Features for Desktop.md --- ...Android - Adds New Features for Desktop.md | 132 ++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 sources/news/20211202 Vivaldi 5.0 Brings Two-Level Tabs to Android - Adds New Features for Desktop.md diff --git a/sources/news/20211202 Vivaldi 5.0 Brings Two-Level Tabs to Android - Adds New Features for Desktop.md b/sources/news/20211202 Vivaldi 5.0 Brings Two-Level Tabs to Android - Adds New Features for Desktop.md new file mode 100644 index 0000000000..79d60156b8 --- /dev/null +++ b/sources/news/20211202 Vivaldi 5.0 Brings Two-Level Tabs to Android - Adds New Features for Desktop.md @@ -0,0 +1,132 @@ +[#]: subject: "Vivaldi 5.0 Brings Two-Level Tabs to Android & Adds New Features for Desktop" +[#]: via: "https://news.itsfoss.com/vivaldi-5-0-release/" +[#]: author: "Rishabh Moharir https://news.itsfoss.com/author/rishabh/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Vivaldi 5.0 Brings Two-Level Tabs to Android & Adds New Features for Desktop +====== + +Vivaldi is a Chromium-based web browser available for Linux (and other platforms). It is popularly known for its enhanced functionalities and multitasking features. This makes it one of the [best web browsers available on Linux][1], especially for power users. + +With the Vivaldi 5.0 release (marking its 5th anniversary), you can expect significant feature additions and improvements. + +Let us take a look at what Vivaldi’s new release has to offer. + +### What’s New in Vivaldi 5.0? + +Note that Vivaldi is mostly open-source ([source][2]), except its UI. However, they tend to focus on improvements on the Linux platform, which is a good thing. + +Here’s what you can expect with Vivaldi 5.0: + +#### Vivaldi Themes + +![Credits: Vivaldi Blog][3] + +Themes have been one of the best features of Vivaldi, not just because you get to choose from a variety of pre-installed ones. It’s because you get to customize your theme or edit pre-installed ones. + +The theme editor has been updated with more options to play around. You can now edit the colors, corner-rounding, background, and settings to customize the theme. Previously, you had to edit the background image separately. So, the new theme editor should be convenient to use. + +And, this doesn’t stop here. Done creating your themes? + +Now, you can easily share your themes with anyone using the new **Export Theme** option that generates a ZIP file. Similarly, you can import themes as well. + +![Credits: Vivaldi Blog][3] + +To go even further, you can submit your newly designed themes to their [community gallery][4]. You can also find themes from other users and install them for yourself. + +#### A New Translate Panel + +![][5] + +With [Vivaldi 4.0 release][6], they introduced a built-in translate feature powered by [Lingvanex][7]. + +Now, with the new **Translate Panel** in the sidebar, you can quickly add a snippet of text and translate it without translating the entire webpage. + +Vivaldi’s side panels are known for improving multitasking capabilities. And, this feature addition should enhance that. + +What if you want to translate more snippets? Surely, you can’t just go on copy-pasting them! + +For this particular reason, Vivaldi has also introduced a **one-step auto-translate** option. Once the option is enabled, highlight the text you want in a webpage, and its translation will appear in the side panel right away. Well, that sounds cool! + +#### View Downloads in a Pop-out + +![Credits: Vivaldi Blog][3] + +While Vivaldi has been impressive on many grounds, the ability to keep an eye on downloads was not as intuitive for every user. You had to go to the side panel (or Downloads) to check the progress of a download. + +In comparison, you get a button right next to your extensions in other web browsers. + +With Vivaldi 5.0, you can finally check download progress using a button in the address bar that would open a pop-up to show your downloads. + +#### Enhancements for Android Users + +The Android version of Vivaldi has also received significant updates and much-awaited features. + +Android users can now make use of **Two-level Tab Stacks** that have been available for desktop users. + +Perhaps, a first for any Android mobile browser! + +For those unaware, this feature helps group tabs together, producing a second level. This helps avoid cramming multiple tabs. + +![Source: Vivaldi][3] + +The configurable **Tab Bar** now comes with two more options. For instance, the **X** button on background tabs that’s used for closing can be removed (freeing up space for more tabs). Users also can show tabs simply as favicons, so no titles and no X button. + +So, you have got plenty of options to manage your tabs on your Android mobile device. + +While this is interesting, I am not too sure how it would feel like dabbling with a two-level tab stack on a small screen for a user. + +![][8] + +Tablet and Chromebook users are in for a treat as the UI has undergone a refresh. The classic **Side Panel** is now available to tablet and Chromebook users to organize the browser layout and minimize clutter. + +This feature addition could make Vivaldi a powerful choice for tablet users. + +#### Other Improvements + +In addition to the key highlights, you can expect speed improvements and bug fixes. + +To explore more, you can check out its [official blog post for desktop][9] and [Android][10]. + +### Wrapping Up + +Vivaldi is a browser that certainly pays attention to its users’ needs and web experience. The latest release sounds exciting for users who prefer more customization and features. + +You can download the available DEB/RPM package from the official website and get it installed. + +[Download Vivaldi 5.0][11] + +#### Big Tech Websites Get Millions in Revenue, It's FOSS Got You! + +If you like what we do here at It's FOSS, please consider making a donation to support our independent publication. Your support will help us keep publishing content focusing on desktop Linux and open source software. + +I'm not interested + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/vivaldi-5-0-release/ + +作者:[Rishabh Moharir][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://news.itsfoss.com/author/rishabh/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/best-browsers-ubuntu-linux/#:~:text=Mozilla%20Firefox&text=Firefox%20is%20the%20default%20web%20browser%20for%20most%20Linux%20distributions. +[2]: https://vivaldi.com/source/ +[3]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQzOSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[4]: https://themes.vivaldi.net +[5]: https://i0.wp.com/i.ytimg.com/vi/Ydnds6GU_Lc/hqdefault.jpg?w=780&ssl=1 +[6]: https://news.itsfoss.com/vivaldi-4-0-release/ +[7]: https://lingvanex.com +[8]: https://i0.wp.com/i.ytimg.com/vi/wujcMAdd-tw/hqdefault.jpg?w=780&ssl=1 +[9]: https://vivaldi.com/blog/vivaldi-5-0-desktop-themes-translate-panel/ +[10]: https://vivaldi.com/blog/vivaldi-on-android-gets-worlds-first-two-rows-of-mobile-browser-tabs/ +[11]: https://vivaldi.com/download/ From 2a6346d41efdb186dcf89b78ff2f5d9490b74825 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 3 Dec 2021 05:05:37 +0800 Subject: [PATCH 071/244] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020211201=20?= =?UTF-8?q?Ubisoft=20Could=20Work=20on=20=E2=80=98Rainbow=20Six=20Siege?= =?UTF-8?q?=E2=80=99=20Proton=20Support=20If=20More=20Linux=20Users=20Show?= =?UTF-8?q?=20Interest?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20211201 Ubisoft Could Work on ‘Rainbow Six Siege- Proton Support If More Linux Users Show Interest.md --- ...Support If More Linux Users Show Interest.md | 86 +++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 sources/news/20211201 Ubisoft Could Work on ‘Rainbow Six Siege- Proton Support If More Linux Users Show Interest.md diff --git a/sources/news/20211201 Ubisoft Could Work on ‘Rainbow Six Siege- Proton Support If More Linux Users Show Interest.md b/sources/news/20211201 Ubisoft Could Work on ‘Rainbow Six Siege- Proton Support If More Linux Users Show Interest.md new file mode 100644 index 0000000000..cfb602ab60 --- /dev/null +++ b/sources/news/20211201 Ubisoft Could Work on ‘Rainbow Six Siege- Proton Support If More Linux Users Show Interest.md @@ -0,0 +1,86 @@ +[#]: subject: "Ubisoft Could Work on ‘Rainbow Six Siege’ Proton Support If More Linux Users Show Interest" +[#]: via: "https://news.itsfoss.com/ubisoft-rainbow-six-siege-proton/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Ubisoft Could Work on ‘Rainbow Six Siege’ Proton Support If More Linux Users Show Interest +====== + +Rainbow Six Siege is a popular multiplayer FPS game that utilizes the BattleEye anti-cheat engine. + +Primarily, it does not support Linux. However, now that [anti-cheat engines like BattleEye and Easy Anti-Cheat have added official support for Proton][1], many Linux users hope to get support for popular multiplayer titles that did not work with Linux. + +Of course, you can always have Windows in dual-boot to play those titles. But, many users use Linux exclusively and cannot play Rainbow Six Siege even if they want to (or have it in their Steam library). + +And, even with the official BattleEye support added for Proton, the game dev team for R6 Siege hasn’t worked on Linux support yet. + +Do they have any plans to work on enabling Rainbow Six Siege for Linux? What are they waiting for? + +### Ubisoft Wants More Linux Users to favor Proton + +![][2] + +The same question was asked in [Ubisoft forums][3] about a week ago, which received a response from a Ubisoft Support Staff. + +The support staff mentioned: + +> Hey! Thank you for reaching out here on the forums about Proton support for Rainbow Six: Siege. +> +> We appreciate that you wish for this to be implemented, however as other support agents have advised we are only able to pass this feedback on to the development team. +> +> Hopefully, other players will reply here in favor of Proton support and the development team may then look to implement it. +> +> If you need anything further please let us know. +> +> Thank you for your time. + +So, if enough players encourage the need for Proton support, the game developers may start looking to implement it. + +As of now, several Linux users have replied to the thread and have asked to make it happen. If you haven’t already, make sure to head to the forum link and join in! + +But do we have to show interest in forums if there’s already official support for Linux? It should not take a lot of effort, right? + +### Rainbow Six Siege on Linux: Thoughts + +Well, it might sound easy on paper, but practically, there’s more work to do for the game developers to ensure that the game works as expected after enabling the Proton support. + +That being said, Ubisoft as a company should not shy away from adding Proton support from their side, considering there is a significant user base of Linux users wanting to play multiplayer titles. + +Not to forget, there’s [Steam Deck][4] as well (that comes with Steam OS 3, based on Arch Linux/Manjaro). So, Steam Deck + Linux desktop gamers should make up for plenty of users who would appreciate the game running on Linux. + +Considering, Rainbow Six Siege is one of my favorite multiplayer titles where I have spent 1200+ hours (but I haven’t got the chance to play it for a while). While I have Windows in dual-boot, I am more interested in playing it on Linux. + +I am sure there are players like me and users who exclusively use Linux who already own the game or want to play it. + +_Here’s to hoping that Ubisoft listens to Linux gamers, which would encourage more game studios to enable support for Linux!_ + +_**Via:**_ [NME][5] + +#### Big Tech Websites Get Millions in Revenue, It's FOSS Got You! + +If you like what we do here at It's FOSS, please consider making a donation to support our independent publication. Your support will help us keep publishing content focusing on desktop Linux and open source software. + +I'm not interested + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/ubisoft-rainbow-six-siege-proton/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://news.itsfoss.com/easy-anti-cheat-linux/ +[2]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjMzMiIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[3]: https://discussions.ubisoft.com/topic/121755/proton-support-for-r6-siege-would-be-awesome?lang=en-US&page=1 +[4]: https://news.itsfoss.com/steamdeck-verified/ +[5]: https://www.nme.com/news/gaming-news/ubisoft-encourages-fans-to-show-interest-in-rainbow-six-siege-steam-deck-support-3106912 From fd2b7745817996ae28f53a02406fc5552d73b97c Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Fri, 3 Dec 2021 08:37:09 +0800 Subject: [PATCH 072/244] Delete 20211203 .md --- sources/tech/20211203 .md | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 sources/tech/20211203 .md diff --git a/sources/tech/20211203 .md b/sources/tech/20211203 .md deleted file mode 100644 index d92966e359..0000000000 --- a/sources/tech/20211203 .md +++ /dev/null @@ -1,25 +0,0 @@ -[#]: subject: "" -[#]: via: "https://www.2daygeek.com/configure-smtp-relay-host-in-sendmail-rhel/" -[#]: author: " " -[#]: collector: "lujun9972" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - - -====== - --------------------------------------------------------------------------------- - -via: https://www.2daygeek.com/configure-smtp-relay-host-in-sendmail-rhel/ - -作者:[][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: -[b]: https://github.com/lujun9972 From ef244b986661959b09e4d86d3aa285aecc5d201b Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 3 Dec 2021 09:05:43 +0800 Subject: [PATCH 073/244] translated --- ...che Cassandra on Ubuntu and Other Linux.md | 179 ------------------ ...che Cassandra on Ubuntu and Other Linux.md | 179 ++++++++++++++++++ 2 files changed, 179 insertions(+), 179 deletions(-) delete mode 100644 sources/tech/20211129 How to Install Apache Cassandra on Ubuntu and Other Linux.md create mode 100644 translated/tech/20211129 How to Install Apache Cassandra on Ubuntu and Other Linux.md diff --git a/sources/tech/20211129 How to Install Apache Cassandra on Ubuntu and Other Linux.md b/sources/tech/20211129 How to Install Apache Cassandra on Ubuntu and Other Linux.md deleted file mode 100644 index aaa962a906..0000000000 --- a/sources/tech/20211129 How to Install Apache Cassandra on Ubuntu and Other Linux.md +++ /dev/null @@ -1,179 +0,0 @@ -[#]: subject: "How to Install Apache Cassandra on Ubuntu and Other Linux" -[#]: via: "https://itsfoss.com/apache-cassandra-ubuntu/" -[#]: author: "Marco Carmona https://itsfoss.com/author/marco/" -[#]: collector: "lujun9972" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -How to Install Apache Cassandra on Ubuntu and Other Linux -====== - -[Apache Cassandra][1] is a free and open-source NoSQL database management system drawn to manipulate large amounts of information across many servers, providing high availability with no single point of failure. - -I am not going into the details of NoSQL database. I am going to so you how you can install Apache Cassandra on Ubuntu based Linux distributions. - -Please note that it is more for practicing - -### Installing Apache Cassandra on Linux - -There are multiple ways you can install Cassandra on Ubuntu and other Linux distributions: - - * Install it using the official deb repositories from Apache: suitable and recommended for Debian and Ubuntu-based distributions. Gets automatic update if a newer version is available. - * Install it using Docker: works for all Linux distributions - * Install it from the tarball: works with all Linux but it won’t get updated to a new version automatically. - - - -This is merely for practicing and experiencing Apache Cassandra. If you are going to use it in a project with other services, you’ll have to follow the complete configuration and setting guide of that service. - -I’ll show the first two methods. - -#### Method 1: Install Cassandra on Ubuntu and Debian using the official repository - -Before you could install and use Cassandra, you need to have Python and Java installed on your system. You may have to [install Java on Ubuntu][2] however Python usually comes preinstalled. - -You can check the prerequisite with the next line: - -``` - - java -version && python --version - -``` - -All prerequisite well installed? That’s good. Let’s install Cassandra. The method here is the same as [adding any external repository in Ubuntu][3]. - -First, add the Apache Cassandra repository to your sources list. This one adds the latest major version (at the time of writing it) 4.0 series. - -``` - - echo "deb http://www.apache.org/dist/cassandra/debian 40x main" | sudo tee -a /etc/apt/sources.list.d/cassandra.sources.list - -``` - -![Add Apache Cassandra repository][4] - -Now, download and add the Apache Cassandra repository keys to the list of trusted keys on the server. This way, your system will trust the packages coming from the repository you added in the previous step. - -You should make sure that apt can be used over https. - -``` - - sudo apt install apt-transport-https - -``` - -And then add the key: - -``` - - wget https://www.apache.org/dist/cassandra/KEYS && sudo apt-key add KEYS - -``` - -![Add Apache Cassandra repository key][5] - -You have added the repository. Update the local cache so that your system is aware of the presence of this new repository. - -``` - - sudo apt update - -``` - -And lastly, install Cassandra with the following command: - -``` - - sudo apt install cassandra - -``` - -![Installing Apache Cassandra on Ubuntu][6] - -Once the installation finishes, Cassandra service starts running automatically. You could still verify it if you want: - -``` - - sudo systemctl status cassandra.service - -``` - -![Check if Cassandra is running][7] - -You can connect to the database by typing cqlsh. Type exit to exit this shell. - -![Entering cqlsh][8] - -This was the very basic and default set up. You’ll probably need to configure it based on your requirement. Please the [official document for the configuration part][9]. - -#### Method 2: Install Apache Cassandra using Docker - -This method will work with any Linux distribution as long as you are going to use it in a Docker setup. - -Of course, you need to have Docker installed on your system for this method. That’s a prerequisite for this method and I let you handle that. - -If you have Docker, use the command below to pull the docker image of Apache Cassandra. - -``` - - sudo docker pull cassandra:latest - -``` - -![Pulling Apache Cassandra docker image][10] - -Once that’s done, you can start Cassandra with the [docker run command][11] like this: - -``` - - sudo docker run --name cass_cluster cassandra:latest - -``` - -![Running Cassandra in a container][12] - -**Note:** the `--name` option will be the name of the Cassandra cluster created. - -To interact with the Cassandra node started before, you need to initialize the CQL shell, and you can do it with the Docker exec command like this: - -``` - - sudo docker exec -it cass_cluster cqlsh - -``` - -![Access the cqlsh running in Docker.][13] - -_**Congrats!**_ Now you know at least two different ways to install Apache Cassandra in your system. - -Please keep in mind that this post is only an introduction. If you are interested in knowing more about Apache Cassandra, read the [documentation][14] where you can find out more about this amazing NoSQL database management system. **Enjoy it and share this post if it was interesting and helpful for you! See you in the next one.** - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/apache-cassandra-ubuntu/ - -作者:[Marco Carmona][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/marco/ -[b]: https://github.com/lujun9972 -[1]: https://cassandra.apache.org/_/index.html -[2]: https://itsfoss.com/install-java-ubuntu/ -[3]: https://itsfoss.com/adding-external-repositories-ubuntu/ -[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/Installing_the_Debian_packages_step_1.png?resize=800%2C123&ssl=1 -[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/Installing_the_Debian_packages_step_2.png?resize=800%2C490&ssl=1 -[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/Installing_the_Debian_packages_step_3.png?resize=800%2C490&ssl=1 -[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/verify-cassandra.png?resize=800%2C443&ssl=1 -[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/Installing_the_Debian_packages_step_4.png?resize=800%2C164&ssl=1 -[9]: https://cassandra.apache.org/doc/latest/cassandra/getting_started/configuring.html -[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/Using_Docker_images_step_2.png?resize=800%2C275&ssl=1 -[11]: https://linuxhandbook.com/docker-run-vs-start-vs-create/ -[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/Using_Docker_images_step_3.png?resize=800%2C490&ssl=1 -[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/Using_Docker_images_step_4.png?resize=800%2C225&ssl=1 -[14]: https://cassandra.apache.org/doc/latest/index.html diff --git a/translated/tech/20211129 How to Install Apache Cassandra on Ubuntu and Other Linux.md b/translated/tech/20211129 How to Install Apache Cassandra on Ubuntu and Other Linux.md new file mode 100644 index 0000000000..12c0c302da --- /dev/null +++ b/translated/tech/20211129 How to Install Apache Cassandra on Ubuntu and Other Linux.md @@ -0,0 +1,179 @@ +[#]: subject: "How to Install Apache Cassandra on Ubuntu and Other Linux" +[#]: via: "https://itsfoss.com/apache-cassandra-ubuntu/" +[#]: author: "Marco Carmona https://itsfoss.com/author/marco/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +如何在 Ubuntu 和其他 Linux 上安装 Apache Cassandra +====== + +[Apache Cassandra][1] 是一个免费的开源 NoSQL 数据库管理系统,用于在许多服务器上操作大量信息,提供无单点故障的高可用性。 + +我不打算讨论 NoSQL 数据库的细节。我将会告诉你如何在基于 Ubuntu 的 Linux 发行版上安装 Apache Cassandra。 + +请注意,这更多是为了实践。 + +### 在 Linux 上安装 Apache Cassandra + +有多种方法可以在 Ubuntu 和其他 Linux 发行版上安装 Cassandra: + + * 使用 Apache 的官方 deb 仓库安装:适合并推荐给基于 Debian 和 Ubuntu 的发行版。如果有更新的版本,会得到自动更新。 + * 使用 Docker 安装:适用于所有 Linux 发行版。 + * 从 tarball 安装:适用于所有 Linux,但不会自动更新到新版本。 + + + +这仅仅是为了练习和体验 Apache Cassandra。如果你要在一个项目中使用它和其他服务,你必须遵循该服务的完整配置和设置指南。 + +我将展示前两种方法。 + +#### 方法 1:使用官方仓库在 Ubuntu 和 Debian 上安装 Cassandra + +在你安装和使用 Cassandra 之前,你需要在你的系统上安装 Python 和 Java。你可能需要[在 Ubuntu 上安装 Java][2],但 Python 通常是预装的。 + +你可以用下面这行来检查先决条件: + +``` + + java -version && python --version + +``` + +所有先决条件都安装好了?那就好。让我们来安装 Cassandra。这里的方法与[在 Ubuntu 中添加任意外部仓库][3]相同。 + +首先,将 Apache Cassandra 仓库添加到你的源列表中。下面这个添加最新的主要版本(在写这篇文章的时候)4.0 系列。 + +``` + + echo "deb http://www.apache.org/dist/cassandra/debian 40x main" | sudo tee -a /etc/apt/sources.list.d/cassandra.sources.list + +``` + +![Add Apache Cassandra repository][4] + +现在,下载并将 Apache Cassandra 仓库的密钥添加到服务器上的受信任密钥列表中。这样,你的系统就会信任来自你在上一步添加的仓库的软件包。 + +你应该确保 apt 可以通过 https 使用。 + +``` + + sudo apt install apt-transport-https + +``` + +然后添加密钥: + +``` + + wget https://www.apache.org/dist/cassandra/KEYS && sudo apt-key add KEYS + +``` + +![Add Apache Cassandra repository key][5] + +你已经添加了仓库。更新本地缓存,使你的系统知道这个新仓库的存在。 + +``` + + sudo apt update + +``` + +最后,用以下命令安装 Cassandra: + +``` + + sudo apt install cassandra + +``` + +![Installing Apache Cassandra on Ubuntu][6] + +安装完成后,Cassandra 服务会自动开始运行。如果你想的话,你仍然可以验证它: + +``` + + sudo systemctl status cassandra.service + +``` + +![Check if Cassandra is running][7] + +你可以输入 cqlsh 连接到数据库。输入 exit 来退出这个 shell。 + +![Entering cqlsh][8] + +这是非常基本和默认的设置。你可能需要根据你的需求来配置它。请查看[官方文档中的配置部分][9]。 + +#### 方法 2:使用 Docker 安装 Apache Cassandra + +这个方法适用于任何 Linux 发行版,只要你打算在 Docker 设置中使用它。 + +当然,你需要在你的系统上安装 Docker 来实现这个方法。这是这个方法的前提条件,我让你处理这件事情。 + +如果你有 Docker,使用下面的命令来拉取 Apache Cassandra 的 docker 镜像: + +``` + + sudo docker pull cassandra:latest + +``` + +![Pulling Apache Cassandra docker image][10] + +完成后,你可以用 [docker run 命令][11]来启动 Cassandra,像这样: + +``` + + sudo docker run --name cass_cluster cassandra:latest + +``` + +![Running Cassandra in a container][12] + +**注意:** `--name` 选项将是创建的 Cassandra 集群的名称。 + +要与之前启动的 Cassandra 节点交互,你需要初始化 CQL shell,你可以用 Docker exec 命令这样做: + +``` + + sudo docker exec -it cass_cluster cqlsh + +``` + +![Access the cqlsh running in Docker.][13] + +_**恭喜!**_ 现在你至少知道了在你的系统中安装 Apache Cassandra 的两种不同方法。 + +请记住,这篇文章只是一个介绍。如果你有兴趣了解更多关于 Apache Cassandra 的信息,请阅读[文档][14],在那里你可以找到更多关于这个神奇的 NoSQL 数据库管理系统的信息。**如果这篇文章对你有帮助,请享受并分享它。下一篇见。** + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/apache-cassandra-ubuntu/ + +作者:[Marco Carmona][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/marco/ +[b]: https://github.com/lujun9972 +[1]: https://cassandra.apache.org/_/index.html +[2]: https://itsfoss.com/install-java-ubuntu/ +[3]: https://itsfoss.com/adding-external-repositories-ubuntu/ +[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/Installing_the_Debian_packages_step_1.png?resize=800%2C123&ssl=1 +[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/Installing_the_Debian_packages_step_2.png?resize=800%2C490&ssl=1 +[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/Installing_the_Debian_packages_step_3.png?resize=800%2C490&ssl=1 +[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/verify-cassandra.png?resize=800%2C443&ssl=1 +[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/Installing_the_Debian_packages_step_4.png?resize=800%2C164&ssl=1 +[9]: https://cassandra.apache.org/doc/latest/cassandra/getting_started/configuring.html +[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/Using_Docker_images_step_2.png?resize=800%2C275&ssl=1 +[11]: https://linuxhandbook.com/docker-run-vs-start-vs-create/ +[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/Using_Docker_images_step_3.png?resize=800%2C490&ssl=1 +[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/Using_Docker_images_step_4.png?resize=800%2C225&ssl=1 +[14]: https://cassandra.apache.org/doc/latest/index.html From e5f0f2fa7e0a9ab037255b69ed83ba22de974052 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 3 Dec 2021 09:07:55 +0800 Subject: [PATCH 074/244] tanslating --- ...01 Installing and Using Homebrew Package Manager on Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20211201 Installing and Using Homebrew Package Manager on Linux.md b/sources/tech/20211201 Installing and Using Homebrew Package Manager on Linux.md index 5283b6a1e3..ea707f6289 100644 --- a/sources/tech/20211201 Installing and Using Homebrew Package Manager on Linux.md +++ b/sources/tech/20211201 Installing and Using Homebrew Package Manager on Linux.md @@ -2,7 +2,7 @@ [#]: via: "https://itsfoss.com/homebrew-linux/" [#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From a2ff8588fe36a70dcfc4386adc15390aebaca699 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 3 Dec 2021 11:52:56 +0800 Subject: [PATCH 075/244] APL --- ...Two-Level Tabs to Android - Adds New Features for Desktop.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/news/20211202 Vivaldi 5.0 Brings Two-Level Tabs to Android - Adds New Features for Desktop.md b/sources/news/20211202 Vivaldi 5.0 Brings Two-Level Tabs to Android - Adds New Features for Desktop.md index 79d60156b8..2c4eddbfe8 100644 --- a/sources/news/20211202 Vivaldi 5.0 Brings Two-Level Tabs to Android - Adds New Features for Desktop.md +++ b/sources/news/20211202 Vivaldi 5.0 Brings Two-Level Tabs to Android - Adds New Features for Desktop.md @@ -2,7 +2,7 @@ [#]: via: "https://news.itsfoss.com/vivaldi-5-0-release/" [#]: author: "Rishabh Moharir https://news.itsfoss.com/author/rishabh/" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "wxy" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 7236936c0990067987c2c9bea0603befc555d95c Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 3 Dec 2021 12:29:02 +0800 Subject: [PATCH 076/244] TSL&PRF --- ...Android - Adds New Features for Desktop.md | 132 ----------------- ...Android - Adds New Features for Desktop.md | 133 ++++++++++++++++++ 2 files changed, 133 insertions(+), 132 deletions(-) delete mode 100644 sources/news/20211202 Vivaldi 5.0 Brings Two-Level Tabs to Android - Adds New Features for Desktop.md create mode 100644 translated/news/20211202 Vivaldi 5.0 Brings Two-Level Tabs to Android - Adds New Features for Desktop.md diff --git a/sources/news/20211202 Vivaldi 5.0 Brings Two-Level Tabs to Android - Adds New Features for Desktop.md b/sources/news/20211202 Vivaldi 5.0 Brings Two-Level Tabs to Android - Adds New Features for Desktop.md deleted file mode 100644 index 2c4eddbfe8..0000000000 --- a/sources/news/20211202 Vivaldi 5.0 Brings Two-Level Tabs to Android - Adds New Features for Desktop.md +++ /dev/null @@ -1,132 +0,0 @@ -[#]: subject: "Vivaldi 5.0 Brings Two-Level Tabs to Android & Adds New Features for Desktop" -[#]: via: "https://news.itsfoss.com/vivaldi-5-0-release/" -[#]: author: "Rishabh Moharir https://news.itsfoss.com/author/rishabh/" -[#]: collector: "lujun9972" -[#]: translator: "wxy" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Vivaldi 5.0 Brings Two-Level Tabs to Android & Adds New Features for Desktop -====== - -Vivaldi is a Chromium-based web browser available for Linux (and other platforms). It is popularly known for its enhanced functionalities and multitasking features. This makes it one of the [best web browsers available on Linux][1], especially for power users. - -With the Vivaldi 5.0 release (marking its 5th anniversary), you can expect significant feature additions and improvements. - -Let us take a look at what Vivaldi’s new release has to offer. - -### What’s New in Vivaldi 5.0? - -Note that Vivaldi is mostly open-source ([source][2]), except its UI. However, they tend to focus on improvements on the Linux platform, which is a good thing. - -Here’s what you can expect with Vivaldi 5.0: - -#### Vivaldi Themes - -![Credits: Vivaldi Blog][3] - -Themes have been one of the best features of Vivaldi, not just because you get to choose from a variety of pre-installed ones. It’s because you get to customize your theme or edit pre-installed ones. - -The theme editor has been updated with more options to play around. You can now edit the colors, corner-rounding, background, and settings to customize the theme. Previously, you had to edit the background image separately. So, the new theme editor should be convenient to use. - -And, this doesn’t stop here. Done creating your themes? - -Now, you can easily share your themes with anyone using the new **Export Theme** option that generates a ZIP file. Similarly, you can import themes as well. - -![Credits: Vivaldi Blog][3] - -To go even further, you can submit your newly designed themes to their [community gallery][4]. You can also find themes from other users and install them for yourself. - -#### A New Translate Panel - -![][5] - -With [Vivaldi 4.0 release][6], they introduced a built-in translate feature powered by [Lingvanex][7]. - -Now, with the new **Translate Panel** in the sidebar, you can quickly add a snippet of text and translate it without translating the entire webpage. - -Vivaldi’s side panels are known for improving multitasking capabilities. And, this feature addition should enhance that. - -What if you want to translate more snippets? Surely, you can’t just go on copy-pasting them! - -For this particular reason, Vivaldi has also introduced a **one-step auto-translate** option. Once the option is enabled, highlight the text you want in a webpage, and its translation will appear in the side panel right away. Well, that sounds cool! - -#### View Downloads in a Pop-out - -![Credits: Vivaldi Blog][3] - -While Vivaldi has been impressive on many grounds, the ability to keep an eye on downloads was not as intuitive for every user. You had to go to the side panel (or Downloads) to check the progress of a download. - -In comparison, you get a button right next to your extensions in other web browsers. - -With Vivaldi 5.0, you can finally check download progress using a button in the address bar that would open a pop-up to show your downloads. - -#### Enhancements for Android Users - -The Android version of Vivaldi has also received significant updates and much-awaited features. - -Android users can now make use of **Two-level Tab Stacks** that have been available for desktop users. - -Perhaps, a first for any Android mobile browser! - -For those unaware, this feature helps group tabs together, producing a second level. This helps avoid cramming multiple tabs. - -![Source: Vivaldi][3] - -The configurable **Tab Bar** now comes with two more options. For instance, the **X** button on background tabs that’s used for closing can be removed (freeing up space for more tabs). Users also can show tabs simply as favicons, so no titles and no X button. - -So, you have got plenty of options to manage your tabs on your Android mobile device. - -While this is interesting, I am not too sure how it would feel like dabbling with a two-level tab stack on a small screen for a user. - -![][8] - -Tablet and Chromebook users are in for a treat as the UI has undergone a refresh. The classic **Side Panel** is now available to tablet and Chromebook users to organize the browser layout and minimize clutter. - -This feature addition could make Vivaldi a powerful choice for tablet users. - -#### Other Improvements - -In addition to the key highlights, you can expect speed improvements and bug fixes. - -To explore more, you can check out its [official blog post for desktop][9] and [Android][10]. - -### Wrapping Up - -Vivaldi is a browser that certainly pays attention to its users’ needs and web experience. The latest release sounds exciting for users who prefer more customization and features. - -You can download the available DEB/RPM package from the official website and get it installed. - -[Download Vivaldi 5.0][11] - -#### Big Tech Websites Get Millions in Revenue, It's FOSS Got You! - -If you like what we do here at It's FOSS, please consider making a donation to support our independent publication. Your support will help us keep publishing content focusing on desktop Linux and open source software. - -I'm not interested - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/vivaldi-5-0-release/ - -作者:[Rishabh Moharir][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://news.itsfoss.com/author/rishabh/ -[b]: https://github.com/lujun9972 -[1]: https://itsfoss.com/best-browsers-ubuntu-linux/#:~:text=Mozilla%20Firefox&text=Firefox%20is%20the%20default%20web%20browser%20for%20most%20Linux%20distributions. -[2]: https://vivaldi.com/source/ -[3]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQzOSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[4]: https://themes.vivaldi.net -[5]: https://i0.wp.com/i.ytimg.com/vi/Ydnds6GU_Lc/hqdefault.jpg?w=780&ssl=1 -[6]: https://news.itsfoss.com/vivaldi-4-0-release/ -[7]: https://lingvanex.com -[8]: https://i0.wp.com/i.ytimg.com/vi/wujcMAdd-tw/hqdefault.jpg?w=780&ssl=1 -[9]: https://vivaldi.com/blog/vivaldi-5-0-desktop-themes-translate-panel/ -[10]: https://vivaldi.com/blog/vivaldi-on-android-gets-worlds-first-two-rows-of-mobile-browser-tabs/ -[11]: https://vivaldi.com/download/ diff --git a/translated/news/20211202 Vivaldi 5.0 Brings Two-Level Tabs to Android - Adds New Features for Desktop.md b/translated/news/20211202 Vivaldi 5.0 Brings Two-Level Tabs to Android - Adds New Features for Desktop.md new file mode 100644 index 0000000000..9f17267edc --- /dev/null +++ b/translated/news/20211202 Vivaldi 5.0 Brings Two-Level Tabs to Android - Adds New Features for Desktop.md @@ -0,0 +1,133 @@ +[#]: subject: "Vivaldi 5.0 Brings Two-Level Tabs to Android & Adds New Features for Desktop" +[#]: via: "https://news.itsfoss.com/vivaldi-5-0-release/" +[#]: author: "Rishabh Moharir https://news.itsfoss.com/author/rishabh/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: " " +[#]: url: " " + +Vivaldi 5.0 发布! +===== + +![](https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/vivaldi-5-0-ft.jpg?w=1200&ssl=1) + +> 对于那些喜欢在桌面和安卓系统上进行定制和增加功能的用户来说,Vivaldi 5.0 是一个令人兴奋的版本。 + +Vivaldi 是一个基于 Chromium 的网页浏览器,可用于 Linux(及其他平台)。它因其增强功能和多任务特性而广为人知。这使它成为 [Linux 上最好的网页浏览器][1] 之一,特别是对于高级用户来说。 + +随着 Vivaldi 5.0 的发布(以纪念其 5 周年),它推出了一系列重大功能增加和改进。 + +让我们来看看 Vivaldi 的新版本有什么特点。 + +### Vivaldi 5.0 的新功能 + +请注意,Vivaldi 除了其用户界面之外大部分是 [开源][2] 的。然而,他们倾向于把重点放在 Linux 平台的改进上肯定是件好事。 + +以下是你可以在 Vivaldi 5.0 发现的变化: + +#### Vivaldi 主题 + +![致谢:Vivaldi 博客][3] + +主题一直是 Vivaldi 最好的功能之一,不仅仅是因为它有各种预装的主题,而是你可以定制你的主题或编辑预装的主题。 + +它的主题编辑器已经更新,有更多可以定制的选项。你现在可以编辑颜色、边角、背景和设置来定制主题。以前,你必须单独编辑背景图片,而现在新的主题编辑器应该很方便使用。 + +而且,并不止于此,你已经创建好了你的主题? + +现在,你可以使用新的“导出主题Export Theme”选项轻松地生成一个 ZIP 文件,与任何人分享你的主题。同样地,你也可以导入一个主题。 + +![致谢:Vivaldi 博客][12] + +更进一步地,你可以把你新设计的主题提交到他们的 [社区画廊][4]。你也可以从那里找到其他用户的主题,并安装它们。 + +#### 新的翻译面板 + +![video][5] + +在 [Vivaldi 4.0 发布时][6],他们引入了由 [Lingvanex][7] 提供的内置翻译功能。 + +现在,通过侧边栏中新的“翻译面板Translate Panel”,你可以快速添加一个文本片段并进行翻译,而无需翻译整个网页。 + +Vivaldi 的侧面板以提高多任务处理能力而闻名,而这个功能的增加应该会加强这一点。 + +如果你想翻译更多的片段呢?当然,你肯定不想一直继续复制粘贴它们! + +对于这个特殊的需求,Vivaldi 还引入了一个“一步自动翻译one-step auto-translate”选项。一旦启用该选项,突出显示你在网页中想要的文本,它的翻译将立即出现在侧面板上。这听起来很酷! + +#### 在弹出式窗口中查看下载 + +![致谢:Vivaldi博客][13] + +虽然 Vivaldi 在很多方面都令人印象深刻,但对于用户来说,其关注下载进度的能力并不那么直观。你必须到侧面板(或“下载”)中去检查下载的进度。 + +相比之下,在其他网页浏览器中,你可以在你的扩展程序旁边找到一个按钮。 + +在 Vivaldi 5.0 中,你终于可以使用地址栏中的一个按钮来检查下载进度,点击该按钮将打开一个弹出窗口来显示你的下载进度。 + +#### 为安卓用户提供的增强功能 + +Vivaldi 的安卓版也有了重大更新和期待已久的功能。 + +安卓用户现在可以使用桌面用户已经在使用的 “两级标签堆栈Two-level Tab Stacks”。 + +也许,这对任何安卓手机浏览器来说都是第一次! + +对于那些不知道的人来说,这个功能有助于将标签页组合在一起,产生两级。这有助于避免多个标签挤在一起。 + +![致谢:Vivaldi][14] + +可配置的“标签栏Tab Bar”现在多了两个选项。例如,背景标签上用于关闭的“X”按钮可以被移除(为更多的标签腾出空间)。用户还可以将标签简单地显示为收藏夹,因此没有标题,也没有“X”按钮。 + +因此,你有很多管理你的安卓移动设备上的标签的方法。 + +虽然这很有趣,但我不太确定对用户来说,在小屏幕上掺杂两级标签堆栈的感觉如何。 + +![video][8] + +平板电脑和 Chromebook 用户也将享受到用户界面更新的待遇。平板电脑和 Chromebook 用户现在可以使用经典的“侧面板Side Panel”,以组织浏览器的布局,尽量减少杂乱。 + +这一功能的增加可以使 Vivaldi 成为平板电脑用户的有力选择。 + +#### 其他改进 + +除了关键的亮点之外,你可以发现速度的改进和错误的修复。 + +要探索更多,你可以查看其 [桌面版][9] 和 [安卓版][10] 的官方博客文章。 + +### 总结 + +Vivaldi 无疑是一个会关注其用户需求和网页体验的浏览器。对于喜欢更多定制和功能的用户来说,最新的版本听起来很令人感兴趣。 + +你可以从官方网站下载可用的 DEB/RPM 包并进行安装。 + +- [下载 Vivaldi 5.0][11] + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/vivaldi-5-0-release/ + +作者:[Rishabh Moharir][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/rishabh/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/best-browsers-ubuntu-linux/#:~:text=Mozilla%20Firefox&text=Firefox%20is%20the%20default%20web%20browser%20for%20most%20Linux%20distributions. +[2]: https://vivaldi.com/source/ +[3]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/Theme-v2_Editor.png?resize=1568%2C882&ssl=1 +[4]: https://themes.vivaldi.net +[5]: https://youtu.be/Ydnds6GU_Lc +[6]: https://news.itsfoss.com/vivaldi-4-0-release/ +[7]: https://lingvanex.com +[8]: https://youtu.be/wujcMAdd-tw +[9]: https://vivaldi.com/blog/vivaldi-5-0-desktop-themes-translate-panel/ +[10]: https://vivaldi.com/blog/vivaldi-on-android-gets-worlds-first-two-rows-of-mobile-browser-tabs/ +[11]: https://vivaldi.com/download/ +[12]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/vivaldi-5-export.png?resize=1568%2C882&ssl=1 +[13]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/Download-popup.png?resize=1568%2C882&ssl=1 +[14]: https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/android_double-line-tab-stack-new-blog.png?resize=1568%2C882&ssl=1 \ No newline at end of file From fd10c9fcd4c148bd82d0f64fcbac85578560bdff Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 3 Dec 2021 12:39:56 +0800 Subject: [PATCH 077/244] PUB @wxy https://linux.cn/article-14044-1.html --- ...o-Level Tabs to Android - Adds New Features for Desktop.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/news => published}/20211202 Vivaldi 5.0 Brings Two-Level Tabs to Android - Adds New Features for Desktop.md (98%) diff --git a/translated/news/20211202 Vivaldi 5.0 Brings Two-Level Tabs to Android - Adds New Features for Desktop.md b/published/20211202 Vivaldi 5.0 Brings Two-Level Tabs to Android - Adds New Features for Desktop.md similarity index 98% rename from translated/news/20211202 Vivaldi 5.0 Brings Two-Level Tabs to Android - Adds New Features for Desktop.md rename to published/20211202 Vivaldi 5.0 Brings Two-Level Tabs to Android - Adds New Features for Desktop.md index 9f17267edc..9b85466f49 100644 --- a/translated/news/20211202 Vivaldi 5.0 Brings Two-Level Tabs to Android - Adds New Features for Desktop.md +++ b/published/20211202 Vivaldi 5.0 Brings Two-Level Tabs to Android - Adds New Features for Desktop.md @@ -4,8 +4,8 @@ [#]: collector: "lujun9972" [#]: translator: "wxy" [#]: reviewer: "wxy" -[#]: publisher: " " -[#]: url: " " +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14044-1.html" Vivaldi 5.0 发布! ===== From d8b30e93366ad44f21892f4b870dcda67f2f6338 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 3 Dec 2021 13:37:04 +0800 Subject: [PATCH 078/244] PRF&PUB @geekpi https://linux.cn/article-14045-1.html --- ...1128 Install apps on Linux with Flatpak.md | 58 +++++++------------ 1 file changed, 22 insertions(+), 36 deletions(-) rename {translated/tech => published}/20211128 Install apps on Linux with Flatpak.md (52%) diff --git a/translated/tech/20211128 Install apps on Linux with Flatpak.md b/published/20211128 Install apps on Linux with Flatpak.md similarity index 52% rename from translated/tech/20211128 Install apps on Linux with Flatpak.md rename to published/20211128 Install apps on Linux with Flatpak.md index 8985b1f389..e81e24183c 100644 --- a/translated/tech/20211128 Install apps on Linux with Flatpak.md +++ b/published/20211128 Install apps on Linux with Flatpak.md @@ -3,18 +3,20 @@ [#]: author: "Seth Kenlon https://opensource.com/users/seth" [#]: collector: "lujun9972" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14045-1.html" 用 Flatpak 在 Linux 上安装应用 ====== -Flatpak 简化了 Linux 上应用的安装。 -![Flatpak][1] + +> Flatpak 简化了 Linux 上应用的安装。 + +![](https://img.linux.net.cn/data/attachment/album/202112/03/133555dxzijlzjp0ibglk0.jpg) 计算机应用由许多小文件组成,它们被链接在一起以执行一系列的任务。因为它们以“应用”的形式出现,在菜单或桌面上有彩色的图标,我们大多数人认为应用是一个单一的、几乎是有形的东西。在某种程度上,这样想是令人欣慰的,因为它们感觉是可以管理的。如果一个应用实际上是散落在你的计算机上的数百个小库和资源文件的组合,那么应用在哪里?撇开存在危机不谈,当一个应用需要一个版本的库,而另一个应用需要一个不同的版本时,会发生什么? -在云计算的世界里,[容器][2]正变得越来越流行,因为它们为应用提供了隔离和整合。你可以在一个“容器”中安装一个应用需要的所有文件。这样一来,它的库就不会受到其他应用的影响,它所占用的内存也不会将数据泄露到另一个内存空间。所有的东西最后都感觉非常像一个单一的、几乎是有形的_东西。在 Linux 桌面上,Flatpak,一个跨发行版、无守护进程、去中心化的应用交付系统,提供了一个类似的技术。 +在云计算的世界里,[容器][2] 正变得越来越流行,因为它们为应用提供了隔离和整合。你可以在一个“容器”中安装一个应用需要的所有文件。这样一来,它的库就不会受到其他应用的影响,它所占用的内存也不会将数据泄露到另一个内存空间。所有的东西最后都感觉非常像一个单一的、几乎是 _有形的_ 东西。在 Linux 桌面上,提供了类似的技术的 Flatpak,是一个跨发行版、无守护进程、去中心化的应用交付系统。 ### 在 Linux 上安装 Flatpak @@ -22,37 +24,28 @@ Flatpak 简化了 Linux 上应用的安装。 在 Fedora、Mageia 和类似的发行版上: - ``` -`$ sudo dnf install flatpak` +$ sudo dnf install flatpak ``` 在 Elementary、Mint 和其他基于 Debian 的发行版上: - ``` -`$ sudo apt install flatpak` +$ sudo apt install flatpak ``` 在 Slackware 上,Flatpak 可以从 [SlackBuilds.org][3] 获得。 ### 选择一个 Flatpak 仓库 -你可以通过在你的发行版的软件中心(如 GNOME 上的**软件**)添加一个 Flatpak 仓库,将一个应用安装为 Flatpak。Flatpak 是一个去中心化的系统,意味着任何开发软件的人都可以托管他们自己的仓库。尽管如此,在实践中,[Flathub][4] 是 Flatpak 格式的最大和最流行的应用集合。要将 Flathub 添加到 **GNOME Software** 或者 **KDE Discover**,请浏览 flatpak.org/setup,找到适合你的发行版的说明,从第二步开始,或者直接下载 [Flatpakrepo][5] 文件。根据你的网络情况,你的软件中心可能需要几分钟的时间来与 Flathub 或另一个 Flatpak 仓库同步。Flathub 有很多软件,但你的系统上有多少个 Flatpak 仓库是没有限制的,所以如果你发现一个有你想尝试的软件,不要害怕添加一个新的仓库。 +你可以通过在你的发行版的软件中心(如 GNOME 上的“软件”)添加一个 Flatpak 仓库,将一个应用安装为 Flatpak。Flatpak 是一个去中心化的系统,意味着任何开发软件的人都可以托管他们自己的仓库。尽管如此,在实践中,[Flathub][4] 是 Flatpak 格式的最大和最流行的应用集合。要将 Flathub 添加到 GNOME “软件Software” 或者 KDE “发现Discover” 中,请浏览 https://flatpak.org/setup ,找到适合你的发行版的说明,从第二步开始,或者直接下载 [Flatpakrepo][5] 文件。根据你的网络情况,你的软件中心可能需要几分钟的时间来与 Flathub(或另一个 Flatpak 仓库)同步。Flathub 有很多软件,但你的系统上有多少个 Flatpak 仓库是没有限制的,所以如果你发现一个有你想尝试的软件,不要害怕添加一个新的仓库。 ![Software Repositories][6] -(Seth Kenlon, [CC BY-SA 4.0][7]) - 如果你喜欢在终端工作,你可以用 `flatpak` 命令直接添加到仓库: - ``` - - -$ flatpak remote-add --if-not-exists flathub \ - - +$ flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo ``` ### 安装一个应用 @@ -61,40 +54,33 @@ $ flatpak remote-add --if-not-exists flathub \ ![GNOME Software][8] -(Seth Kenlon, [CC BY-SA 4.0][7]) - 点击一个看起来很吸引人的应用,阅读它,当你准备好时点击**安装**按钮。 -### 在终端中安装 flatpaks +### 在终端中安装 flatpak 如果你喜欢在终端工作,你可以把 Flatpak 当作一个专门的包管理器。你可以使用 `flatpak search` 命令来搜索一个应用程序: - ``` - - $ flatpak search paint -Name Description Application ID -CorePaint A simple painting tool org.cubocore.CorePaint -Pinta Edit images and paint digitally com.github.PintaProject.Pinta -Glimpse Create images and edit photographs org.glimpse_editor.Glimpse -Tux Paint A drawing program for children org.tuxpaint.Tuxpaint -Krita Digital Painting, Creative Freedom org.kde.krita - +Name Description Application ID +CorePaint A simple painting tool org.cubocore.CorePaint +Pinta Edit images and paint digitally com.github.PintaProject.Pinta +Glimpse Create images and edit photographs org.glimpse_editor.Glimpse +Tux Paint A drawing program for children org.tuxpaint.Tuxpaint +Krita Digital Painting, Creative Freedom org.kde.krita ``` 用 `flatpak install` 安装: - ``` -`$ flatpak install krita` +$ flatpak install krita ``` 安装后,应用就会与系统中的所有其他应用一起出现在你的应用菜单或活动页上。 ### 应用变得简单 -Flatpak 通过消除版本冲突,使用户轻松安装应用。他们通过在自我托管的平台或像 Flathub 这样的公共平台上只针对一种软件包格式,使分发软件变得简单。我在 Fedora Silverblue、CentOS 和 Slackware 上使用 Flatpaks,我无法想象现在没有它的生活。在你的下一个应用安装中试试 Flatpak 吧! +Flatpak 通过消除版本冲突,可以使用户轻松安装应用。他们通过在自托管的平台或像 Flathub 这样的公共平台上只需要针对一种软件包格式提供应用,使分发软件变得简单。我在 Fedora Silverblue、CentOS 和 Slackware 上使用 Flatpak,我无法想象现在没有它的生活。在你的下一个应用安装中试试 Flatpak 吧! -------------------------------------------------------------------------------- @@ -103,7 +89,7 @@ via: https://opensource.com/article/21/11/install-flatpak-linux 作者:[Seth Kenlon][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 9fceb620eddc985dab24753f2978e9d33afeb4c0 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 4 Dec 2021 05:02:27 +0800 Subject: [PATCH 079/244] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211204=20?= =?UTF-8?q?How=20to=20Install=20and=20Use=20Latte=20Dock=20on=20Ubuntu=20a?= =?UTF-8?q?nd=20Other=20Linux=20Distributions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211204 How to Install and Use Latte Dock on Ubuntu and Other Linux Distributions.md --- ...on Ubuntu and Other Linux Distributions.md | 216 ++++++++++++++++++ 1 file changed, 216 insertions(+) create mode 100644 sources/tech/20211204 How to Install and Use Latte Dock on Ubuntu and Other Linux Distributions.md diff --git a/sources/tech/20211204 How to Install and Use Latte Dock on Ubuntu and Other Linux Distributions.md b/sources/tech/20211204 How to Install and Use Latte Dock on Ubuntu and Other Linux Distributions.md new file mode 100644 index 0000000000..107b424032 --- /dev/null +++ b/sources/tech/20211204 How to Install and Use Latte Dock on Ubuntu and Other Linux Distributions.md @@ -0,0 +1,216 @@ +[#]: subject: "How to Install and Use Latte Dock on Ubuntu and Other Linux Distributions" +[#]: via: "https://itsfoss.com/install-use-latte-dock-ubuntu/" +[#]: author: "Pratham Patel https://itsfoss.com/author/pratham/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +How to Install and Use Latte Dock on Ubuntu and Other Linux Distributions +====== + +You know what docks are, right? It is usually the bottom bar where your applications are ‘docked’ for quick access. + +![][1] + +Many distributions and desktop environments provide some sort of docking implementation. If your distribution does not have a Dock or if you want to experiment with some other Dock applications, Latte dock is a good choice. It is similar to the dock on macOS with a **parabolic animation every time you hover over any dock object** with your mouse. + +In this tutorial, I’ll show you how to install Latte Dock on Ubuntu. I’ll also show some a few things about using and customizing Latte Dock. + +### Install Latte Dock on Ubuntu + +[Latte dock][2] is a popular application and available from the official repository of most Linux distributions. This means that you can use your distribution’s software center or package manager to install Latte dock. + +![Latte is available from the software center][3] + +On Ubuntu and other distributions that are based on Ubuntu such as elementary OS, Linux Mint, Pop!_OS, Zorin OS, use the apt command: + +``` + + sudo apt install latte-dock + +``` + +Done! You now have Latte Dock installed on Ubuntu. + +#### Disable Ubuntu dock (for Ubuntu users) + +Before you start your shiny new dock, I advise that you disable the dock that ships with Ubuntu by default. Here is a [guide on how to disable the dock on Ubuntu][4]. + +To disable the dock, type this in your terminal + +``` + + gnome-extensions disable [email protected] + +``` + +If you end up changing your mind, you can enable the Ubuntu dock again with the following command + +``` + + gnome-extensions enable [email protected] + +``` + +NOTE + +The default dock on Pop!_OS 20.04 LTS can not be disabled (although, it is hidden by default on the desktop; only visible in the activities overview). On Pop!_OS with the COSMIC DE/Extension, you can disable or enable the dock by going in the Settings app, under Desktop -> Dock. + +### Start using Latte Dock + +I am using Pop!_OS in the tutorial but the steps are applicable to any Linux distribution. + +Once installed, you will find a launcher icon for Latte Dock in your Applications Drawer. You can either access it through the dock or press the Super (usually the Windows key; or Command key if you have a Mac keyboard) Key + A. + +Open Latte Dock from here. + +![Latte dock highlighted in the app drawer][5] + +Cool! You now have Latte Dock open on your desktop. + +![Screenshot of Latte Dock on the desktop][6] + +#### Enable autostart for Latte Dock + +With Latte Dock now open and Ubuntu Dock disabled, if you reboot now, you will not have any dock next time your computer turns on. + +Lets fix that right now. + +Perform a right click on the dock. Click on the Configure option under the Layouts sub menu. + +![Launching the Settings panel window by going in Layouts > Configure][7] + +Now, under the Preferences tab, make sure that the “Enable autostart during startup” checkbox is checked. + +![Enable autostart during startup checkbox enabled][8] + +### Customize your dock + +If you install any KDE product, customization is expected to be endless. It would be odd if Latte Dock wouldn’t allow customization. Fortunately, that is not the case. + +You can do a wide variety of things to customize Latte Dock. Increase it’s size, make it more transparent or translucent, theme it, and much more. + +#### Pinning apps to the dock + +To pin your application to the Latte Dock, open said application and right click on the application icon that is in your dock. Now click on Pin Launcher. Done! Your application is now pinned to the dock. + +![Right click the running app and select Pin Launcher option][9] + +You can change its position in the dock by moving it to the left or right with the click and drag movement. + +#### Search and install themes for Latte Dock + +Open the Latte Dock’s Settings window by right clicking on the dock, clicking on the Configure option under the Layout sub menu. + +You may already a few themes (err… layout) installed. Select it from the list of installed options and click on the Switch button on the right side. + +![change themes latte dock][10] + +You may also download more themes by clicking the Download button. It should show you a list of available themes for installation. + +![Latte Dock Add On Installer window][11] + +#### Change dock appearance and behavior + +As I mentioned earlier, there are a huge amount of customization options in KDE products. + +Lets play with some, shall we? + +Right click on the dock and click on “Dock Settings” + +![Access Latte Dock settings by right clicking the dock][12] + +Here, you will get all types of options to toggle. Want to move dock to the left side of your monitor? You can do that with the options provided under the Location sub menu. + +![The Dock settings and customization window][13] + +If you feel limited in any way regarding the available options, toggle the switch at the top right corner that says Advanced. + +![The Dock settings and customization window with advanced options now visible][14] + +Now THAT is awesome! + +Try playing with every available toggle. You can hide the dock after a delay. You can place it to an edge of your monitor, place it to the center of that edge, to the left or right. You can do that all. + +Want to tinker with launch, hover etc effects? More options to tinker with await for you under the Effects tab. + +### Remove Latte Dock from your system + +You installed Latte Dock, customized it but felt it was not what you were looking for. And, now you are looking to remove Latte Dock. That’s fine. I got you. + +You can remove Latte Dock using the apt package manager. Do that with the following command: + +``` + + sudo apt autoremove --purge latte-dock + +``` + +![][15] + +The –purge flag will remove any configuration files that Latte Dock had in the system directories except for ~/.config. + +#### For advanced users only: removing user specific leftover files + +This is not mandatory but if you want to remove the user config files that are usually placed in your $HOME/.config (AKA ~/.config) directory. [Use find command][16] to locate Latte Dock’s config files. + +``` + + find ~/.config -iname "latte*" + +``` + +![][17] + +You can safely remove these directory and config files from your `~/.config` directory. + +#### For Ubuntu users: Re-enable the Ubuntu dock + +Don’t forget to enable the stock Ubuntu dock. In case you don’t remember, the command to enable the dock again is down below: + +``` + + gnome-extensions enable [email protected] + +``` + +### Conclusion + +Latte Dock is an amazing dock from the KDE kommunity ( ͡° ͜ʖ ͡°) + +It offers a lot of theme-ing (layout), appearance, customization options along with some nice effects. It is certainly something that you should look for, if you are thinking of customizing your stock desktop look and feel. + +If you end up loving Latte Dock and start using it every day, do let me know in the comments. And, if in any case you don’t like Latte Dock, let me know why, with a comment. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/install-use-latte-dock-ubuntu/ + +作者:[Pratham Patel][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/pratham/ +[b]: https://github.com/lujun9972 +[1]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/latte-dock.webp?resize=800%2C167&ssl=1 +[2]: https://invent.kde.org/plasma/latte-dock +[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/latte-ubuntu-software-center.png?resize=800%2C384&ssl=1 +[4]: https://itsfoss.com/disable-ubuntu-dock/ +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/02_latte_in_drawer.webp?resize=800%2C450&ssl=1 +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/03_latte_dock_launched.webp?resize=800%2C450&ssl=1 +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/configure-latte-dock.png?resize=800%2C392&ssl=1 +[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/enable_autostart_latte_dock.webp?resize=800%2C433&ssl=1 +[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/pin-app-latte-dock.webp?resize=800%2C334&ssl=1 +[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/change-themes-latte-dock.webp?resize=800%2C393&ssl=1 +[11]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/08_download_layouts.webp?resize=800%2C450&ssl=1 +[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/latte_dock_settings.webp?resize=799%2C246&ssl=1 +[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/11_customization_options.webp?resize=800%2C450&ssl=1 +[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/12_customization_options_advanced.webp?resize=800%2C450&ssl=1 +[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/15_apt_get_remove.webp?resize=800%2C450&ssl=1 +[16]: https://linuxhandbook.com/find-command-examples/ +[17]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/13_find_configs.webp?resize=800%2C450&ssl=1 From 7f508ef5e3df2be3ee91c3958e9f4f04fee9a4e4 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 4 Dec 2021 05:02:42 +0800 Subject: [PATCH 080/244] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211203=20?= =?UTF-8?q?Quick=20video=20editing=20on=20Linux=20with=20Flowblade?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211203 Quick video editing on Linux with Flowblade.md --- ...k video editing on Linux with Flowblade.md | 147 ++++++++++++++++++ 1 file changed, 147 insertions(+) create mode 100644 sources/tech/20211203 Quick video editing on Linux with Flowblade.md diff --git a/sources/tech/20211203 Quick video editing on Linux with Flowblade.md b/sources/tech/20211203 Quick video editing on Linux with Flowblade.md new file mode 100644 index 0000000000..c080fe7244 --- /dev/null +++ b/sources/tech/20211203 Quick video editing on Linux with Flowblade.md @@ -0,0 +1,147 @@ +[#]: subject: "Quick video editing on Linux with Flowblade" +[#]: via: "https://opensource.com/article/21/11/flowblade-linux-video-editing" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Quick video editing on Linux with Flowblade +====== +Flowblade is a minimal video editing application designed to enable you +to assemble a cut of your video quickly and easily. +![woman on laptop sitting at the window][1] + +Do you have videos you need to cut together but find video editing applications too complex? [Flowblade][2] is a minimal video editing application designed to enable you to assemble a cut of your video quickly and easily. + +Video editing can be challenging. There's a lot to think about, lots of footage to review, a story you want to tell, and there's the software you have to learn on top of everything else. However, there's a common conundrum at play here: Most people only need about 80% of what's possible in video editing applications, and you can implement that 80% of everyday editing tasks with about 50% of the resources a big "professional" editor uses. That's where Flowblade really excels. It's a simple editor that can do all the basic tasks you need, plus quite a bit more. However, it focuses on the essentials so you can get started editing right away, and you're never likely to be overwhelmed by menu selections you may never use, much less understand. + +### Install Flowblade on Linux + +Flowblade is available on most Linux distributions from your package manager. On Fedora, Mageia, and similar distributions: + + +``` +`$ sudo dnf install flowblade` +``` + +On Elementary, Mint, and other Debian-based distributions: + + +``` +`$ sudo apt install flowblade` +``` + +However, I use Flowblade as a [Flatpak][3]. + +### Choosing a workflow + +When you launch Flowblade for the first time, it prompts you to choose a default workflow. There's no right or wrong answer, but you may well not know yet what editing style you prefer. Suppose you're used to traditional offline film editing. In that case, the **Film** workflow will feel natural to you, allowing you to mostly work with each clip in a Moviola-style monitor, with insert and overwrite actions targeting specific tracks in the timeline. This happens to be my preferred workflow, and with a little practice, it's probably the fastest method, especially for a rough assembly of footage. However, the **Standard** setting is a great universal workflow that makes it easy to click around the application (and your footage) and just figure things out as you go. + +For this article, I use the **Standard** setting and a generic workflow. + +### Flowblade interface + +The Flowblade interface has four central components:  + + * The media bin in the top left + * The monitor in the top right + * The timeline along the bottom + * A horizontal toolbar straight through the middle + + + +There's more to it, but those are the window panels you'll spend the majority of your time with. + +### Importing footage  + +Your first step is right in front of you in the media bin: **Right Click to Add Media**. To get your video footage into Flowblade, right-click in the media bin and select **Add Video, Audio, and Image**. As you import footage from your hard drive, you may get prompted to change your project profile. That's not an error. It just means your camera doesn't happen to record video at the same resolution and frame rate as the arbitrary settings of Flowblade. It's safe to let Flowblade adapt to your video footage. + +### The rough assembly + +The first cut of video footage gets called a rough assembly because it's exactly that: A quick and imprecise assembly of video clips so that they tell a story. The story may not be complete, it may not be elegant, and it's longer than it needs to be, but it's from your rough assembly that you'll carve out something beautiful. But first, you need to get the clips you absolutely need to tell your story into your timeline. + +To review a video clip, double-click its icon in your media bin to open it in the clip monitor panel on the right. You can play the clip in the monitor using the **Spacebar** to start and stop playback or the playback control buttons in the UI. You can click the monitor's progress bar to position your playhead at any specific frame. Because there's usually footage you don't need at the very start and very end of a clip (you're usually positioning the camera or calling "action" or "cut" at those points), you can mark just the part of the clip you need using the **Mark In** and **Mark Out** buttons, or by pressing the **I** and **O** keys on your keyboard. + +Once you've selected the good part of your video footage ("good," meaning the portion of the clip that contributes to the story you're trying to tell), you can move it into your timeline. + +### Working in the timeline + +You can drag the video between your **In** and **Out** marks into your timeline from your clip monitor by clicking on the video frame in the monitor and dropping it in the timeline. This is the quick and intuitive way to add clips to a timeline, but it's actually the least precise method. + +![Timeline][4] + +(Seth Kenlon, [CC BY-SA 4.0][5]) + +I find it quicker and less prone to errors to use the Insert, Overwrite, and Append shortcuts. Once you've marked the good part of a clip, you can press **U** to append the clip to the timeline. + +![Edit modes][6] + +(Seth Kenlon, [CC BY-SA 4.0][5]) + +That means your functional workflow is: + + 1. Open a clip in the clip monitor. + 2. Press **I** and **O** to mark the good parts. + 3. Press **U** to add the clip to the timeline. + + + +It's a fast and efficient way of working. + +If you forget an essential clip, you can make an insert edit instead of an append edit. Place the playhead where you need to insert a clip into your timeline, and then press **Y** to send the clip in your clip monitor to that position. + +All edits in the timeline happen on the _target track_, which gets indicated by a Down-Arrow icon. By default, the target track is V1, so most of your initial story is built there. + +![Target track][7] + +(Seth Kenlon, [CC BY-SA 4.0][5]) + +### Telling your story with Flowblade + +As you refine your story, you can refine and build upon your initial timeline track. Sometimes that means you'll need to change the target track and place cut-away footage above your main storyline. Other times it might mean you need to shorten or extend a clip already in your timeline. + +To shorten or extend a clip once it's in the timeline, double-click on it and then mouse over either the head or the tail of the clip, clicking and dragging till you get it just right. + +### Exporting your project + +To share your movie with other people, you must render the clips in your timeline into a unified movie file. Flowblade uses a dedicated **Batch Render Queue** application for rendering, which you launch from Flowblade. It's actually a different computing process, so you can close Flowblade without stopping your render. Background rendering is one of my favorite features about Flowblade. + +To start a render in Flowblade: + + 1. Go to the **Render** menu and select **Add to Batch Render Queue**. + 2. Click the **Render** tab of your media bin panel. + 3. Choose a destination folder and a filename for your movie, and click **Render**. + + + +![Render][8] + +(Seth Kenlon, [CC BY-SA 4.0][5]) + +### Quick and easy video editing on Linux + +There's more to Flowblade than just basic edits. It's got video effects and transitions, a basic audio mixer plus the ability to export audio tracks to Ardour for a dedicated sound mix, more ways to add and remove clips from the timeline, and much more. However, the basics and the interface are kept simple, and that makes it easy to get started with editing from the very first launch, whether it's the first time you've ever edited video or just the first time you've edited with Flowblade. Flowblade keeps you in the flow, no matter what stage of editing you're on. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/11/flowblade-linux-video-editing + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/lenovo-thinkpad-laptop-window-focus.png?itok=g0xPm2kD (young woman working on a laptop) +[2]: https://jliljebl.github.io/flowblade/ +[3]: https://opensource.com/article/21/11/install-flatpak-linux +[4]: https://opensource.com/sites/default/files/uploads/flowblade-timeline.jpg (Timeline) +[5]: https://creativecommons.org/licenses/by-sa/4.0/ +[6]: https://opensource.com/sites/default/files/uploads/flowblade-timeline-edit-buttons.jpg (Edit modes) +[7]: https://opensource.com/sites/default/files/uploads/flowblade-track-target.jpg (Target track) +[8]: https://opensource.com/sites/default/files/uploads/flowblade-render.jpg (Render UI) From c70c9021ac8311660f1a4e18518dc520dc31e83d Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 4 Dec 2021 08:38:46 +0800 Subject: [PATCH 081/244] APL --- ...ms to Free Your Smartphone from Google and other Big Tech.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20211114 5 De-Googled Android-based Operating Systems to Free Your Smartphone from Google and other Big Tech.md b/sources/tech/20211114 5 De-Googled Android-based Operating Systems to Free Your Smartphone from Google and other Big Tech.md index 4090896a15..4a99b84245 100644 --- a/sources/tech/20211114 5 De-Googled Android-based Operating Systems to Free Your Smartphone from Google and other Big Tech.md +++ b/sources/tech/20211114 5 De-Googled Android-based Operating Systems to Free Your Smartphone from Google and other Big Tech.md @@ -2,7 +2,7 @@ [#]: via: "https://itsfoss.com/android-distributions-roms/" [#]: author: "Pratham Patel https://itsfoss.com/author/pratham/" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "wxy" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From f570b58d586a90bf531ba238bd7e1e251e4e5acb Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 4 Dec 2021 14:33:23 +0800 Subject: [PATCH 082/244] TSL&PRF @wxy --- ...artphone from Google and other Big Tech.md | 313 ------------------ ...artphone from Google and other Big Tech.md | 284 ++++++++++++++++ 2 files changed, 284 insertions(+), 313 deletions(-) delete mode 100644 sources/tech/20211114 5 De-Googled Android-based Operating Systems to Free Your Smartphone from Google and other Big Tech.md create mode 100644 translated/tech/20211114 5 De-Googled Android-based Operating Systems to Free Your Smartphone from Google and other Big Tech.md diff --git a/sources/tech/20211114 5 De-Googled Android-based Operating Systems to Free Your Smartphone from Google and other Big Tech.md b/sources/tech/20211114 5 De-Googled Android-based Operating Systems to Free Your Smartphone from Google and other Big Tech.md deleted file mode 100644 index 4a99b84245..0000000000 --- a/sources/tech/20211114 5 De-Googled Android-based Operating Systems to Free Your Smartphone from Google and other Big Tech.md +++ /dev/null @@ -1,313 +0,0 @@ -[#]: subject: "5 De-Googled Android-based Operating Systems to Free Your Smartphone from Google and other Big Tech" -[#]: via: "https://itsfoss.com/android-distributions-roms/" -[#]: author: "Pratham Patel https://itsfoss.com/author/pratham/" -[#]: collector: "lujun9972" -[#]: translator: "wxy" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -5 De-Googled Android-based Operating Systems to Free Your Smartphone from Google and other Big Tech -====== - -With the ever growing surveilling presence of advertisement giants like Google and Facebook on your personal and intimate devices like Phones and Tablets, it is time to deal with it. - -You might be wondering why should you install a different Android based OS on your phone than what is already included. Let me give you a few reasons: - - * Your [phone manufacturer partners with entities like Facebook to pre-install the apps][1] on your phone and simply uninstalling these apps won’t net you any less surveillance (they tend to get reinstalled when there is a new OS update). - * [Android phone manufacturers don’t have any incentive to provide you with OS and Security Updates][2]; using an alternative Operating System helps your device get necessary updates even after the vendor stops supporting it. Yes, your smartphone officially gets 3-4 years of support but it doesn’t need to be thrown after that. - * Since these off the shelf Android ROMs don’t bundle anything other than what is necessary, your phone can feel more responsive due to the less bloat. - * Less pre-installed software also means fewer services run in background, resulting in better battery life. - * A lot of customization options. - * Easy to rollback updates (because previous versions are available on the website of ROM). - - - -WARNING - -Please be careful if you decide to use any of these operating systems on an actual device. Flashing any third-party ROM on your device will void its warranty and may even render your device useless if not done correctly. -Installing custom ROM also needs a certain level of expertise and even then you could encounter issues, specially if the device is not supported by the choice of your operating system. It’s better to try with an older, disused smartphone. -We take no responsibility for any damage caused to your device. - -This list specifically focuses on Android based distributions and custom ROMs. We have a separate list of [open source mobile operating systems][3] that include options such as Ubuntu Touch and PureOS. - -### 1\. LineageOS - -[LineageOS][4] is arguably one of the most popular Android ROM, which is a fork of the very popular [[but dead since 2016][5]] CyanogenMod Android firmware/OS. Due to the popularity of LineageOS, it [has support for the vast majority of Android Phones][6]. - -This popularity also means that brand new phones get included in the LineageOS Project sooner than in other Android based ROMs. - -LineageOS even supports your Nvidia Shield TV Set top boxes. How amazing is that? - -![A few screenshots of Lineage OS User Interface][7] - -#### Pros - - * One of the most popular Android ROM - * Excellent first party and third party documentation due to the popularity - * The LineageOS ROM (in theory) is equally secure as the Android Open Source Project - * Extends your phone life cycle by providing OS updates even after phone vendor stops providing updates - * Timely updates for officially supported devices - * LineageOS follows the AOSP tree very closely (for people who want the most stock Android experience) - * Less “preinstalled bloatware” compared to your stock factory firmware - - - -#### Cons - - * Can feel “incomplete”, since no Google apps like YouTube/Gmail/Photos etc are included - * The LineageOS project is a community effort, so not all hardware features of your phone may work right out of the box - * LineageOS can not help making your phone more secure if the [vendor blobs][8] itself pose a security risk - * Unlocking bootloader is a necessary step (for all roms), and doing so can pose security issues - * Banking apps may be a hit or miss ([Read more here][9]) - - - -[Get LineageOS][10] - -### 2\. CalyxOS - -[CalyOS][11] is a rather interesting Android OS based on the [Android Open Source Project (AOSP)][12]. Instead of not shipping the Google Mobile Services (GMS) and leaving users to figure stuff out by themselves (flashing gapps etc), CalyxOS ships with [microG][13]. - -CalyxOS is backed by the [Calyx Institute][14], which is a non-profit organization to promote individual rights like free speech, privacy rights etc. - -![The CalyxOS homepage along with a glimpse of their User Interface][15] - -#### Pros - - * Uses [microG][13] - * Ships with with [F-Droid][16] and the [Aurora Store][17] instead of Google Play Store - * Datura Firewall allows you to block internet access per app - * Uses [Mozilla Location Services][18] instead of Google’s Location Services - * Monthly over-the-air security updates - * Has verified boot for increased security - * Phone Dialer automatically makes a Signal Call if the recipient has Signal - * CalyxOS locks the bootloader after installation, reducing security related attack vector(s) - - - -#### Cons - - * Only available on Pixel phones ([but there is a good reason behind this][19]) - * As with all ROMs, bootloader unlock is required (and may lead to warranty issues) - * Flashing third party ROM on your phone has the possibility of bricking the phone - * Installing apps that you have paid for can be harder ([“_not so privacy friendly_” workaround][20]) - * Banking apps can be a hit or miss on CalyxOS - - - -[Get CalyxOS][21] - -### 3\. GrapheneOS - -[GrapheneOS][22] is an Android based ROM focusing on security and privacy. Although, one may argue that their efforts have been more towards increasing security, and doing so also benefits your privacy. - -Neither is a bad thing, just know that GrapheneOS is oriented more towards people who value security more. - -Their team works around the clock to harden the security of many parts of the base AOSP and provide you one of the best security oriented Android ROM. [GrapheneOS can even sandbox Google’s Play Services][23]. - -![A stock photo of GrapheneOS installed on a Pixel device][24] - -#### Pros - - * Provides stronger and hardened app sandboxing than AOSP - * Uses its own [hardened malloc][25] (memory allocator with hardened security) - * The Linux kernel is hardened for better security - * Provides on time security updates (under a day or three) - * Ships with Full Disk Encryption (very important for a mobile device) - * Doesn’t include any Google apps or Google services - - - -#### Cons - - * Limited hardware support; Only available for Google Pixels - * Their hardcore approach to security (sandboxing) has lead to headaches and is not recommended for new users - * Push notifications don’t work _out-of-the-box_ for most apps (due to the lack of GMS) - * Security features like restricting mobile connectivity to LTE-only seem to appear a tad bit unnecessary for your average Joe - * Google SafetyNet doesn’t work out of the box, which is required for your Banking apps - - - -[Get GrapheneOS][26] - -### 4\. /e/OS - -You may think that [/e/OS][27] is yet another Android Operating System. You would be _partially_ right. Don’t dismiss this Android ROM just yet. It packs so much more than any off the shelf Android based Operating System. - -The biggest outstanding feature is that the [eFoundation][28] (which is behind /e/OS) provides you with a free [ecould account][29] (with 1GB of storage), instead of you needing to use your Google account. - -Like any privacy respecting Android ROM, /e/OS replaces every single Google related module or app with a FOSS alternative. - -_Side note_: The eFoundation also sells phones with /e/OS pre-installed. [Check it out here][30]. - -![A look at the app launcher in /e/OS and also an overview of the App Store ratings on /e/OS][31] - -#### Pros - - * The App store on /e/OS rates apps based on how many permissions they need and how privacy friendly is that app - * Provides an [ecloud account][29] (with a @e.email; 1GB in free tier) as a synchronization account - * Ships with [microG][13] framework - * Google DNS servers (8.8.8.8 and 8.8.4.4) are replaced with [Quad9][32] DNS servers - * DuckDuckGo is the default search engine replacing Google - * Google NTP servers are replaced with pool.ntp.orgs - * Uses location services provided by [Mozilla][18] - - - -#### Cons - - * Device compatibility is very limited ([list of supported devices][33]) - * On top of limited device compatibility, only older phones are supported - * No indication if SafetyNet is being worked on; at the moment, SafetyNet is not working - * Roll-out of new features from Android takes a while - - - -[Get /e/OS][34] - -### 5\. CopperheadOS - -[CopperheadOS][35] is another, one of the best security oriented Android ROM for your [Pixel] phone. It was developed by a team of just two people. It was a startup that used to sell Nexus phones (RIP) and Google Pixel phones with CopperheadOS pre-installed on the phones. - -Just like CyanogenMod, CopperheadOS used to be all the glory for security oriented Android ROM. Unfortunately, due to an issue that I will not get into, the main developer went separate ways from CopperheadOS. - -![The CopperheadOS website banner regarding security and privacy on your phone][36] - -#### Pros - - * [Unparalleled documentation][37], compared to any other Android ROM documentation - * CopperheadOS has had many of the security oriented features before AOSP itself - * Uses Cloudfare DNS (1.1.1.1 and 1.0.0.1) instead of Google’s DNS (8.8.8.8 and 8.8.4.4) - * Includes a internet firewall for per-app permission - * Uses Open Source apps instead of obsolete AOSP apps (Calendar, SMS, Gallery etc) - * Includes [F-Droid][38] and the [Aurora App Store][17] - - - -#### Cons - - * [Questionable claims about the security of CopperheadOS after the main dev went different ways][39] - * The original aim towards security feels abandoned in favor of an organization that provides phones pre-loaded with CopperheadOS - * No indication of SafetyNet working on CopperheadOS - - - -[Get CopperheadOS][40] - -### Honourable mention: LineageOS for microG - -The [LineageOS for microG][41] project is a fork of the official LineageOS with [microG][13] and Google Apps (GApps) included by default. This project takes care of making sure that microG works flawlessly on your phone (which can be a complicated process for a beginner). - -![A list of stock apps included in LineageOS for microG][42] - -#### Pros - - * Provides the microG implementation of GMS without any inconveniences - * Comes with [F-Droid][38] as the default App Store - * Provides weekly/monthly over-the-air updates - * Has option to use location service provided by either [Mozilla][18], or by [Nominatim][43] - - - -#### Cons - - * Enabling signature spoofing to enable microG support can be an attack vector from a security POV - * Even though this ROM is based on LineageOS, as of writing this, not all of the LineageOS devices are supported - * Includes Google Apps (GApps) instead of providing Open Source alternatives - * No confirmation if Google’s SafetyNet is working or not - - - -[Get LineageOS for microG][44] - -### Misclleanous - -You may be wondering why some of the interesting Android based ROMs (CalyxOS, GrapheneOS etc) are only restricted to supporting Google’s Phones. Isn’t _that_ ironic? - -Well, that is because most phones support unlocking a bootlaoder, but only Google Pixels support locking the bootloader again. Which is a consideration when you are developing an Android based ROM for privacy and/or security focused crowd. If the bootloader is unlocked, it is an attack vector that you haven’t patched yet. - -Another reason for this irony is that, only Google makes their phones’ Device Tree and Kernel Source Code available for the public in a timely manner. You cannot develop a ROM for said phone without its Device Tree and Kernel Source Code. - -I would also recommend the following FOSS apps regardless of your ROM choice. They will prove to be a nice addition to your privacy friendly app toolkit. - - * [Signal Messenger][45] - * [K-9 Mail][46] - * [DuckDuckGo Browser][47] - * [Tor Borwser][48] - * [F-Droid][16] - * [Aurora Store][17] - * [OpenKeychain][49] - - - -### Conclusion - -In my opinion, if you have a Google Pixel phone, I recommend giving a try to either CalyxOS or GrapheneOS or CopperheadOS. These Android ROMs have excellent features to help you keep your phone out of Google’s spying eyes while also keeping your phone [arguably] more secure. - -If you do not have a Google Pixel, you can still give LineageOS for microG a try. It is a good community effort to bring Google’s proprietary features without invading your privacy, to the masses. - -If your phone isn’t supported by either of the operating systems mentioned above, LineageOS is your friend. Due to the wide range of support for phones, yours will undoubtedly supported at any capacity, be it officially or unofficially. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/android-distributions-roms/ - -作者:[Pratham Patel][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/pratham/ -[b]: https://github.com/lujun9972 -[1]: https://9to5google.com/2020/08/05/oneplus-phones-will-ship-with-facebook-services-that-cant-be-removed/ -[2]: https://www.computerworld.com/article/3175067/android-upgrade-problem.html -[3]: https://itsfoss.com/open-source-alternatives-android/ -[4]: https://lineageos.org/ -[5]: https://www.androidauthority.com/cyanogenmod-lineageos-654810/ -[6]: https://wiki.lineageos.org/devices/ -[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/01_lineageos.webp?resize=800%2C400&ssl=1 -[8]: https://www.reddit.com/r/Android/comments/52ovsh/comment/d7m2pnr/?utm_source=share&utm_medium=web2x&context=3 -[9]: https://lineageos.org/Safetynet/ -[10]: https://download.lineageos.org/ -[11]: https://calyxos.org/ -[12]: https://www.androidauthority.com/aosp-explained-1093505/ -[13]: https://microg.org/ -[14]: https://calyxinstitute.org/projects/calyx-os -[15]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/02_calyx-1.webp?resize=800%2C449&ssl=1 -[16]: https://www.f-droid.org/en/about/ -[17]: https://auroraoss.com/ -[18]: https://location.services.mozilla.com/ -[19]: https://calyxos.org/docs/guide/device-support/#requirements-for-supporting-a-new-device -[20]: https://auroraoss.com/faq/#how-do-i-purchase-paid-apps-without-using-the-play-store-app -[21]: https://calyxos.org/install/ -[22]: https://grapheneos.org/ -[23]: https://twitter.com/grapheneos/status/1445572173389725709 -[24]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/03_graphene.webp?resize=800%2C600&ssl=1 -[25]: https://github.com/GrapheneOS/hardened_malloc -[26]: https://grapheneos.org/install/ -[27]: https://e.foundation/e-os/ -[28]: https://e.foundation/ -[29]: https://e.foundation/ecloud/ -[30]: https://esolutions.shop/ -[31]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/06_eos-1.webp?resize=600%2C539&ssl=1 -[32]: https://www.quad9.net/ -[33]: https://doc.e.foundation/easy-installer#list-of-devices-supported-by-the-easy-installer -[34]: https://doc.e.foundation/devices -[35]: https://copperhead.co/ -[36]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/04_copperheados.webp?resize=800%2C420&ssl=1 -[37]: https://copperhead.co/android/docs/ -[38]: https://f-droid.org/en/about/ -[39]: https://twitter.com/DanielMicay/status/1068641901157511168 -[40]: https://copperhead.co/android/docs/install/ -[41]: https://lineage.microg.org/ -[42]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/05_losmicrog.webp?resize=450%2C800&ssl=1 -[43]: https://nominatim.org/ -[44]: https://download.lineage.microg.org/ -[45]: https://signal.org/ -[46]: https://k9mail.app/ -[47]: https://duckduckgo.com/app -[48]: https://www.torproject.org/ -[49]: https://www.openkeychain.org/ diff --git a/translated/tech/20211114 5 De-Googled Android-based Operating Systems to Free Your Smartphone from Google and other Big Tech.md b/translated/tech/20211114 5 De-Googled Android-based Operating Systems to Free Your Smartphone from Google and other Big Tech.md new file mode 100644 index 0000000000..bce7dbaff3 --- /dev/null +++ b/translated/tech/20211114 5 De-Googled Android-based Operating Systems to Free Your Smartphone from Google and other Big Tech.md @@ -0,0 +1,284 @@ +[#]: subject: "5 De-Googled Android-based Operating Systems to Free Your Smartphone from Google and other Big Tech" +[#]: via: "https://itsfoss.com/android-distributions-roms/" +[#]: author: "Pratham Patel https://itsfoss.com/author/pratham/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: " " +[#]: url: " " + +5 个去谷歌化的安卓操作系统 +====== + +![](https://img.linux.net.cn/data/attachment/album/202112/04/143224d46wb5bqsw7xbsw7.jpg) + +> 让你的智能手机摆脱谷歌和其他科技巨头。 + +随着谷歌和 Facebook 等广告巨头对你的个人和私密设备(如手机和平板电脑)的监控不断增加,现在是时候处理这个问题了。 + +最有效的方法之一是安装注重隐私/安全的安卓 ROM。 + +你可能想知道,为什么要在你的手机上安装一个与预装系统不同的、基于安卓的操作系统。让我给你几个理由: + + * 你的 [手机制造商与 Facebook 等实体合作,在你的手机上预装了各种应用程序][1],仅仅是卸载这些应用程序可能无法摆脱它们(当操作系统有新的更新时,它们往往会被重新安装)。 + * 通常,安卓设备制造商会提供三到四年的更新。其中大部分仅限于各种奇怪的安全补丁,以及一些安卓系统的升级。使用定制 ROM,你可以通过接收更多更新来延长设备的使用寿命。 + * 由于这些现成的安卓 ROM 除了必要的东西外没有捆绑任何东西,你的手机不会太臃肿,反应更敏捷。 + * 较少的预装软件也意味着在后台运行的服务较少,从而可提升性能并延长电池使用时间。 + * 大量的定制选项。 + * 容易回滚更新(因为以前的版本在 ROM 的网站上可以找到)。 + +> **警告** +> +> 如果你决定在实际设备上使用这些操作系统之一,请小心。在你的设备上刷入任何第三方 ROM 将使其保修失效,如果操作不当,甚至可能使你的设备失去作用。安装定制的 ROM 也需要一定的专业知识,即使如此,你也可能遇到问题,特别是如果你选择的操作系统不支持该设备。对你的设备造成的任何损害,我们概不负责。 + +参考了上述重要信息之后,如果你仍想进行实验,我们建议你始终在备用设备上进行尝试。 + +除此之外,你还应该记住以下几点: + +- 安装自定义的安卓 ROM 可以增强开箱即用的安全性。但是,你必须确保自己采取了必要的措施。 +- 你手机的所有硬件功能可能在定制 ROM 上不工作。 +- 解锁引导加载程序是一个必要步骤,但这样做可能会带来安全问题。 + +这个列表特别关注基于安卓的发行版和定制 ROM。我们有一个另外单独的 [开源移动操作系统][2] 列表,包括 Ubuntu Touch 和 PureOS 等选项。 + +注:名单排名不分先后。你应该选择更多地了解所提到的选项,并决定什么最适合你。 + +### 1、LineageOS + +![Lineage OS 用户界面的几张截图][3] + +[LineageOS][4] 可以说是最受欢迎的安卓 ROM 之一,它是非常流行的([但自 2016 年以来已经消亡][5]])的 CyanogenMod 的一个复刻。由于 LineageOS 很流行,你可能会发现很多设备支持该操作系统。 + +换句话说,与其他定制安卓 ROM 相比,你可以更快地获得对新设备的支持,以及对各种旧设备的支持。 + +如果你有的话,LineageOS 甚至支持你的 Nvidia Shield 电视机和 Jetson Nano([用于 AI 和深度学习项目的最佳单板计算机][6] 之一)。 + +- [获取 LineageOS][7] + +#### 优点 + + * 优秀的官方和第三方文档 + * 支持设备的及时更新 + * LineageOS 非常紧跟 AOSP 树(适用于想要最原始安卓体验的人) + * 与原厂固件相比,“预装软件”更少。 + +#### 缺点 + + * LineageOS 项目是一个社区项目,所以并非你手机上所有的硬件功能都能开箱即用。 + * 没有提供很多开箱即用的安全/隐私功能。 + +### 2、CalyxOS + +![CalyxOS 的主页以及他们的用户界面一瞥][8] + +[CalyOS][9] 是一个相当有趣的、基于 [安卓开源项目(AOSP)][10] 的安卓操作系统。CalyxOS 没有提供谷歌移动服务(GMS),而是让用户自己去想办法(可以刷入谷歌应用),但是它提供了 [microG][11],你可以选择启用/禁用它,从而完全控制你的手机。 + +CalyxOS 得到了 [Calyx Institute][12] 的支持,这是一个非营利组织,旨在促进个人权利,如言论自由、隐私权等。 + +它内置了一些注重隐私的应用程序,如 Signal、Tor 浏览器等。尽管对 CalyxOS 的支持仅限于 Pixel 手机,但在大多数情况下,它为用户提供了大量开箱即用的隐私功能,让用户具有领先优势。 + +- [获取 CalyxOS][13] + +#### 优点 + + * 使用 [microG][11]。 + * 带有 [F-Droid][14] 和 [Aurora 商店][15] 而不是谷歌应用商店。 + * Datura 防火墙允许你阻止每个应用程序的互联网访问。 + * 使用 [Mozilla 定位服务][16] 而不是谷歌的定位服务。 + * 每月一次的在线安全更新。 + * 经过验证的启动程序,以提高安全性。 + * 开箱即用的以安全为中心的应用程序和功能。 + +#### 缺点 + + * 只适用于 Pixel 手机([但这背后有一个很好的理由][17])。 + +### 3、GrapheneOS + +![GrapheneOS 安装在 Pixel 设备上的照片][18] + +[GrapheneOS][19] 是一个基于安卓的 ROM,专注于安全和隐私。虽然人们可能会争论说,他们的努力更多的是为了提高安全性,但这样做也有利于你的隐私。 + +如果你想安装带有开箱即用的、特殊安全调整过的定制 ROM,GrapheneOS 应该是一个不错的选择。 + +与其他一些定制 ROM 不同,它没有包括启用/禁用 microG 的功能,这恰好为依赖于 Google Play 服务的应用程序提供了更好的支持。但是,GrapheneOS 可以 [对 Google Play 服务进行沙箱处理][20],这应该可以让你使某些功能正常工作。但是,截至目前,它仍然是实验性的。 + +- [获取 GrapheneOS][21] + +#### 优点 + + * 提供比 AOSP 更强大、加固过的应用程序沙盒。 + * 使用自己 [加固过的 malloc][22](具有加固了安全性的内存分配器)。 + * Linux 内核经过了加固,安全性更高。 + * 提供及时的安全更新。 + * 具备全盘加密功能(对移动设备来说非常重要)。 + * 不包括任何谷歌应用程序或谷歌服务。 + +#### 缺点 + + * 有限的硬件支持;仅适用于谷歌 Pixels。 + * 以安全为中心的调整可能不会转化为对新手友好的用户体验。 + +### 4、/e/OS + +![看一下 /e/OS 中的应用启动器,以及对 /e/OS 的应用商店评级的概述][23] + +你可能认为 [/e/OS][24] 只不过是又一个安卓操作系统,这 _一定程度上_ 是对的。先别急着否定这个安卓 ROM。它远超于任何现成的基于安卓的操作系统。 + +最大的特点是 [eFoundation][25](在 /e/OS 背后的基金会)为你提供了一个免费的 [ecould 账户][26](有 1GB 的存储空间),而不需要使用谷歌账户。 + +像任何尊重隐私的安卓 ROM 一样,/e/OS 将每一个与谷歌相关的模块或应用都替换成了自由软件替代品。 + +旁注:eFoundation 也销售预装了 /e/OS 的手机。[请看这里][27]。 + +- [获取 /e/OS][28] + +#### 优点 + + * /e/OS 上的应用程序商店根据需要的权限以及对隐私的友好程度来对应用程序进行评级。 + * 提供了一个 [ecloud 账户][26](带有 @e.email 后缀;免费级提供 1GB)作为同步账户。 + * 配备了 [microG][11] 框架。 + * 谷歌 DNS 服务器(8.8.8.8 和 8.8.4.4)被替换为 [Quad9][29] 的 DNS 服务器。 + * DuckDuckGo 是替代谷歌的默认搜索引擎。 + * 使用由 [Mozilla][16] 提供的位置服务。 + +#### 缺点 + + * 设备兼容性非常有限。 + * 从安卓系统推出新功能需要一段时间。 + +### 5、CopperheadOS + +![CopperheadOS 网站上关于手机安全和隐私的标语][30] + +> **警告** +> +> 这不是一个开源项目。列在这里只是为感兴趣的用户提供的附加选项。 + +[CopperheadOS][31] 是另一个有趣的安卓 ROM。它是由一个只有两个人的团队开发的。 + +与其他选项不同,CopperheadOS 不是开源项目,你可能无法在你的手机上使用它。 + +它面向企业部署。因此,如果你想为你的员工购买安卓设备并调整安全性,那么这值得考虑。 + +- [获得 CopperheadOS][32] + +#### 优点 + + * 与其他安卓 ROM 文档相比 [更优良的文档][33]。 + * CopperheadOS 在 AOSP 之前就有许多面向安全的功能。 + * 使用 Cloudfare DNS(1.1.1.1 和 1.0.0.1)而不是谷歌的 DNS(8.8.8.8 和 8.8.4.4)。 + * 包括一个用于控制每个应用程序权限的互联网防火墙。 + * 使用开源应用程序,而不是过时的 AOSP 应用程序(日历、短信、画廊等)。 + * 包括 [F-Droid][14] 和 [Aurora 应用商店][15]。 + +#### 缺点 + + * [在主要的开发者出走之后,CopperheadOS 的安全性存在质疑][34] 。 + * 仅适用于预装 CopperheadOS 的手机。 + * 没有迹象表明 SafetyNet 会在 CopperheadOS 上工作。 + +### 荣誉提名:LineageOS for microG + +![LineageOS for microG 中包含的应用程序列表][35] + +[LineageOS for microG][36] 项目是官方 LineageOS 项目的一个复刻,默认包含 [microG][11] 和谷歌应用。这个项目负责确保 microG 在你的手机上完美运行(这对初学者来说可能是一个复杂的过程)。 + +- [获取 LineageOS for MicroG][37] + +#### 优点 + + * 提供了 GMS 的 microG 实现,没有任何不便之处。 + * 提供 [F-Droid][14] 作为默认的应用商店。 + * 提供每周/每月一次的在线更新。 + * 可以选择使用由 [Mozilla][16] 或 [Nominatim][38] 提供的定位服务。 + +#### 缺点 + + * 启用签名欺骗以启用 microG 支持,从安全角度来看,可能是一个攻击方向。 + * 尽管这个 ROM 是基于 LineageOS 的,但在写这篇文章时,并不是所有的 LineageOS 设备都支持。 + * 包括谷歌应用程序,而不是提供开源的替代品。 + * 无法确认谷歌的 SafetyNet 是否工作。 + +### 附加信息 + +你可能想知道为什么一些有趣的基于安卓的 ROM(CalyxOS、GrapheneOS 等)只限于支持谷歌的手机。这不是很讽刺吗? + +嗯,这是因为大多数手机都支持解锁引导器,但只有谷歌 Pixels 支持再次锁定引导器。当你为关注隐私和/或安全的人群开发基于安卓的 ROM 时,这是一个考虑因素。如果启动器被解锁,它就是一个你尚未修补的攻击方向。 + +另一个具有讽刺意味的原因是,只有谷歌才及时向公众提供他们手机的设备树和内核源代码。如果没有设备树和内核源代码,你就无法为该手机开发 ROM。 + +无论你选择何种 ROM,我都会推荐以下 FOSS 应用程序。它们将被证明是对你的隐私友好应用程序工具包的一个很好的补充。 + + * [Signal Messenger][39] + * [K-9 邮件][40] + * [DuckDuckGo 浏览器][41] + * [Tor 浏览器][42]。 + * [F-Droid][14] + * [Aurora 商店][15] + * [OpenKeychain][43] + +### 总结 + +在我看来,如果你有一部谷歌 Pixel 手机,我建议你尝试一下 CalyxOS、GrapheneOS 或 CopperheadOS。这些安卓 ROM 有出色的功能,可以帮助你的手机远离谷歌的监视,同时还可以让你的手机(可以说是)更加安全。 + +如果你没有谷歌 Pixel,你仍然可以尝试一下 LineageOS for MicroG。这是一项很好的社区贡献,在不侵犯你的隐私的情况下,它把谷歌的专有功能带给大众。 + +如果你的手机不被上述任何一个操作系统支持,那么 LineageOS 就是你的朋友。由于它对手机的支持广泛,毫无疑问,无论是官方还是非官方,你的手机都可以得到支持。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/android-distributions-roms/ + +作者:[Pratham Patel][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/pratham/ +[b]: https://github.com/lujun9972 +[1]: https://9to5google.com/2020/08/05/oneplus-phones-will-ship-with-facebook-services-that-cant-be-removed/ +[2]: https://itsfoss.com/open-source-alternatives-android/ +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/01_lineageos.webp?w=1200&ssl=1 +[4]: https://lineageos.org/ +[5]: https://www.androidauthority.com/cyanogenmod-lineageos-654810/ +[6]: https://itsfoss.com/best-sbc-for-ai/ +[7]: https://lineageos.org/ +[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/02_calyx-1.webp?w=1264&ssl=1 +[9]: https://calyxos.org/ +[10]: https://www.androidauthority.com/aosp-explained-1093505/ +[11]: https://microg.org/ +[12]: https://calyxinstitute.org/projects/calyx-os +[13]: https://calyxos.org/install/ +[14]: https://www.f-droid.org/en/about/ +[15]: https://auroraoss.com/ +[16]: https://location.services.mozilla.com/ +[17]: https://calyxos.org/docs/guide/device-support/#requirements-for-supporting-a-new-device +[18]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/03_graphene.webp?resize=800%2C600&ssl=1 +[19]: https://grapheneos.org/ +[20]: https://twitter.com/grapheneos/status/1445572173389725709 +[21]: https://grapheneos.org/ +[22]: https://github.com/GrapheneOS/hardened_malloc +[23]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/06_eos-1.webp?w=600&ssl=1 +[24]: https://e.foundation/e-os/ +[25]: https://e.foundation/ +[26]: https://e.foundation/ecloud/ +[27]: https://esolutions.shop/ +[28]: https://e.foundation/e-os/ +[29]: https://www.quad9.net/ +[30]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/04_copperheados.webp?resize=1536%2C806&ssl=1 +[31]: https://copperhead.co/ +[32]: https://copperhead.co/android/docs/install/ +[33]: https://copperhead.co/android/docs/ +[34]: https://twitter.com/DanielMicay/status/1068641901157511168 +[35]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/05_losmicrog.webp?resize=864%2C1536&ssl=1 +[36]: https://lineage.microg.org/ +[37]: https://download.lineage.microg.org/ +[38]: https://nominatim.org/ +[39]: https://signal.org/ +[40]: https://k9mail.app/ +[41]: https://duckduckgo.com/app +[42]: https://www.torproject.org/ +[43]: https://www.openkeychain.org/ \ No newline at end of file From 4ccb5c2ac15faba5373686e775dbd9b9e7f7868c Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 4 Dec 2021 14:35:57 +0800 Subject: [PATCH 083/244] PUB @wxy https://linux.cn/article-14047-1.html --- ... to Free Your Smartphone from Google and other Big Tech.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20211114 5 De-Googled Android-based Operating Systems to Free Your Smartphone from Google and other Big Tech.md (99%) diff --git a/translated/tech/20211114 5 De-Googled Android-based Operating Systems to Free Your Smartphone from Google and other Big Tech.md b/published/20211114 5 De-Googled Android-based Operating Systems to Free Your Smartphone from Google and other Big Tech.md similarity index 99% rename from translated/tech/20211114 5 De-Googled Android-based Operating Systems to Free Your Smartphone from Google and other Big Tech.md rename to published/20211114 5 De-Googled Android-based Operating Systems to Free Your Smartphone from Google and other Big Tech.md index bce7dbaff3..20b4d816b7 100644 --- a/translated/tech/20211114 5 De-Googled Android-based Operating Systems to Free Your Smartphone from Google and other Big Tech.md +++ b/published/20211114 5 De-Googled Android-based Operating Systems to Free Your Smartphone from Google and other Big Tech.md @@ -4,8 +4,8 @@ [#]: collector: "lujun9972" [#]: translator: "wxy" [#]: reviewer: "wxy" -[#]: publisher: " " -[#]: url: " " +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14047-1.html" 5 个去谷歌化的安卓操作系统 ====== From f5e86e116ef9828eea00c2c929af61bcda4cd3d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91?= Date: Sat, 4 Dec 2021 14:59:30 +0800 Subject: [PATCH 084/244] Translated --- ...0210609 Configure FreeDOS in plain text.md | 213 ------------------ ...0210609 Configure FreeDOS in plain text.md | 213 ++++++++++++++++++ 2 files changed, 213 insertions(+), 213 deletions(-) delete mode 100644 sources/tech/20210609 Configure FreeDOS in plain text.md create mode 100644 translated/tech/20210609 Configure FreeDOS in plain text.md diff --git a/sources/tech/20210609 Configure FreeDOS in plain text.md b/sources/tech/20210609 Configure FreeDOS in plain text.md deleted file mode 100644 index b0ff57b46b..0000000000 --- a/sources/tech/20210609 Configure FreeDOS in plain text.md +++ /dev/null @@ -1,213 +0,0 @@ -[#]: subject: (Configure FreeDOS in plain text) -[#]: via: (https://opensource.com/article/21/6/freedos-fdconfigsys) -[#]: author: (Jim Hall https://opensource.com/users/jim-hall) -[#]: collector: (lujun9972) -[#]: translator: (robsean) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Configure FreeDOS in plain text -====== -Learn how to configure FreeDOS with FDCONFIG.SYS. -![Person using a laptop][1] - -The main configuration file for FreeDOS is a file in the root directory called `FDCONFIG.SYS`. This file contains a series of lines, each setting a value such as `LASTDRIVE=Z` or `FILES=40`. For example, the default `FDCONFIG.SYS` in FreeDOS 1.3 RC4 looks like this: - - -``` -SET DOSDIR=C:\FDOS - -!COUNTRY=001,858,C:\FDOS\BIN\COUNTRY.SYS -!LASTDRIVE=Z -!BUFFERS=20 -!FILES=40 -!MENUCOLOR=7,0 - -MENUDEFAULT=1,5 -MENU 1 - Load FreeDOS with JEMMEX, no EMS (most UMBs), max RAM free -MENU 2 - Load FreeDOS with JEMM386 (Expanded Memory) -MENU 3 - Load FreeDOS low with some drivers (Safe Mode) -MENU 4 - Load FreeDOS without drivers (Emergency Mode) - -12?DOS=HIGH -12?DOS=UMB -12?DOSDATA=UMB -1?DEVICE=C:\FDOS\BIN\JEMMEX.EXE NOEMS X=TEST I=TEST NOVME NOINVLPG -234?DEVICE=C:\FDOS\BIN\HIMEMX.EXE -2?DEVICE=C:\FDOS\BIN\JEMM386.EXE X=TEST I=TEST I=B000-B7FF NOVME NOINVLPG -34?SHELL=C:\FDOS\BIN\COMMAND.COM C:\FDOS\BIN /E:1024 /P=C:\FDAUTO.BAT -12?SHELLHIGH=C:\FDOS\BIN\COMMAND.COM C:\FDOS\BIN /E:1024 /P=C:\FDAUTO.BAT -``` - -But what do all those lines mean? Why do some have a question mark (`?`) or an exclamation point (`!`), while other lines do not? - -### A simple configuration - -Let's start with a simple configuration, so we can see what does what. Assume this very brief `FDCONFIG.SYS` file: - - -``` -LASTDRIVE=Z -BUFFERS=20 -FILES=40 -DEVICE=C:\FDOS\BIN\HIMEMX.EXE -SHELL=C:\FDOS\BIN\COMMAND.COM C:\FDOS\BIN /E:1024 /P=C:\FDAUTO.BAT -``` - -This configuration file contains only a few instructions: - - 1. `LASTDRIVE=Z` - 2. `BUFFERS=20` - 3. `FILES=40` - 4. `DEVICE=C:\FDOS\BIN\HIMEMX.EXE` - 5. `SHELL=C:\FDOS\BIN\COMMAND.COM C:\FDOS\BIN /E:1024 /P=C:\FDAUTO.BAT` - - - -The first instruction tells FreeDOS how many drive letters to reserve in memory. (DOS uses letters to represent each drive attached to the system, and `LASTDRIVE=Z` says to reserve drive letters from "A" to "Z."). `LASTDRIVE` affects the number of _logical drives_ that your system can recognize. You probably don't have any logical drives; the FreeDOS installer doesn't set these up by default. In any case, it is safe to set `LASTDRIVE=Z` on any FreeDOS system. - -The `BUFFERS` line reserves memory for file buffers. A _buffer_ helps to speed up certain processes that require storage, such as copying files. If you set a larger value for `BUFFERS`, FreeDOS will reserve more memory—and vice versa for smaller values. Most users will set this to `BUFFERS=20` or `BUFFERS=40`, depending on how often they need to read and write files on the system. - -The `FILES` setting determines how many files DOS allows you to open at one time. If you run an application that needs to open many files at once, such as a Genealogy database, you may need to set `FILES` to a larger value. For most users, `FILES=40` is a reasonable value. - -`DEVICE` is a special instruction that loads a _device driver_. DOS requires device drivers for certain hardware or configurations. The line `DEVICE=C:\FDOS\BIN\HIMEMX.EXE` loads the _HimemX_ device driver, so DOS can take advantage of expanded memory beyond the first 640 kilobytes. - -The last line tells the FreeDOS kernel where to find the command-line shell. By default, the kernel will look for the shell as `COMMAND.COM`, but you can change it with the `SHELL` instruction. In this example, `SHELL=C:\FDOS\BIN\COMMAND.COM` says the shell is the `COMMAND.COM` program, located in the `\FDOS\BIN` directory on the `C` drive. - -The other text at the end of the `SHELL` indicate the options to the `COMMAND.COM` shell. The FreeDOS `COMMAND.COM` supports several startup options to modify its behavior, including: - - * **`C:\FDOS\BIN`** \- The full path to the `COMMAND.COM` program - * `/E:1024 -` The environment (E) size, in bytes. `/E:1024` tells `COMMAND.COM` to reserve 1024 bytes, or 1 kilobyte, to store its environment variables. - * **`/P=C:\FDAUTO.BAT`** \- The `/P` option indicates that the shell is a permanent (P) shell, so the user cannot quit the shell by typing `EXIT` (the extra text `=C:\FDAUTO.BAT` tells `COMMAND.COM` to execute the `C:\FDAUTO.BAT` file at startup, instead of the default `AUTOEXEC.BAT` file) - - - -With that simple configuration, you should be able to interpret some of the `FDCONFIG.SYS` file that's installed by FreeDOS 1.3 RC4. - -### Boot menu - -FreeDOS supports a neat feature—multiple configurations on one system, using a "boot menu" to select the configuration you want. The `FDCONFIG.SYS` file contains several lines that define the menu: - - -``` -!MENUCOLOR=7,0 - -MENUDEFAULT=1,5 -MENU 1 - Load FreeDOS with JEMMEX, no EMS (most UMBs), max RAM free -MENU 2 - Load FreeDOS with JEMM386 (Expanded Memory) -MENU 3 - Load FreeDOS low with some drivers (Safe Mode) -MENU 4 - Load FreeDOS without drivers (Emergency Mode) -``` - -The `MENUCOLOR` instruction defines the text color and background color of the boot menu. These values are typically in the range 0 to 7, and represent these colors: - - * 0 Black - * 1 Blue - * 2 Green - * 3 Cyan - * 4 Red - * 5 Magenta - * 6 Brown - * 7 White - - - -So the `MENUCOLOR=7,0` definition means to display the menu with white (7) text on a black (0) background. If you instead wanted to use white text on a blue background, you could define this as `MENUCOLOR=7,1`. - -The exclamation point (`!`) at the start of the line means that this instruction will always be executed, no matter what menu option you choose. - -The `MENUDEFAULT=1,5` line tells the kernel how long to wait for the user to select a boot menu entry, or what default menu entry to use if the user did not select one. `MENUDEFAULT=1,5` indicates the system will wait for 5 seconds; if the user did not attempt to select a menu item within that time, the kernel will assume boot menu "1" instead. - -![boot menu][2] - -Jim Hall, CC-BY SA 4.0 - -The `MENU` lines after that are labels for the different boot menu configurations. These are presented in order, so menu item "1" is first, then "2," and so on. - -![menu select 4][3] - -Jim Hall, CC-BY SA 4.0 - -In the lines that follow in `FDCONFIG.SYS`, you will see numbers before a question mark (`?`). These indicate "for this boot menu entry, use this line." For example, this line with `234?` will only load the HimemX device driver if the user selects boot menu entries "2," "3," or "4." - - -``` -`234?DEVICE=C:\FDOS\BIN\HIMEMX.EXE` -``` - -There are lots of ways to use `FDCONFIG.SYS` to configure your FreeDOS system. We've only covered the basics here, the most common ways to define your FreeDOS kernel settings. For more information, explore the FreeDOS Help system (type `HELP` at the command line) to learn how to use all of the FreeDOS `FDCONFIG.SYS` options: - - * **SWITCHES** - * Boot time processing behavior - * **REM** and **;** - * Comments (ignored in FDCONFIG.SYS) - * **MENUCOLOR** - * Boot menu text color and background color - * **MENUDEFAULT** - * Boot menu default value - * **MENU** - * Boot menu entry - * **ECHO** and **EECHO** - * Display messages - * **BREAK** - * Sets extended **Ctrl+C** checking on or off - * **BUFFERS** or **BUFFERSHIGH** - * How many disk buffers to allocate - * **COUNTRY** - * Sets international behavior - * **DOS** - * Tell the FreeDOS kernel how to load itself into memory - * **DOSDATA** - * Tell FreeDOS to load kernel data into upper memory - * **FCBS** - * Set the number of file control blocks (FCBs) - * **KEYBUF** - * Reassign the keyboard buffer in memory - * **FILES** or **FILESHIGH** - * How many files to have open at once - * **LASTDRIVE** or **LASTDRIVEHIGH** - * Set the last drive letter that can be used - * **NUMLOCK** - * Set the keyboard number pad lock on or off - * **SHELL**, **SHELLHIGH**, or **COMMAND** - * Set the command line shell - * **STACKS** or **STACKSHIGH** - * Add stacks to handle hardware interrupts - * **SWITCHAR** - * Redefines the command line option switch character - * **SCREEN** - * Set the number of lines on the screen - * **VERSION** - * Set what DOS version to report to programs - * **IDLEHALT** - * Activates energy saving features, useful on certain systems - * **DEVICE** and **DEVICEHIGH** - * Load a driver into memory - * **INSTALL** and **INSTALLHIGH** - * Load a "terminate and stay resident" (TSR) program - * **SET** - * Set a DOS environment variable - - - -### Configuring in plain text - -Like Linux and BSD, FreeDOS configuration happens in plain text. No special tools for editing are required, so dive in and see what options suit you best. It's easy but powerful! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/6/freedos-fdconfigsys - -作者:[Jim Hall][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/jim-hall -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/laptop_screen_desk_work_chat_text.png?itok=UXqIDRDD (Person using a laptop) -[2]: https://opensource.com/sites/default/files/uploads/boot-menu.png (The boot menu waits for 5 seconds before assuming menu item 1) -[3]: https://opensource.com/sites/default/files/uploads/menu-select4.png (Use the arrow keys to select a boot menu configuration) diff --git a/translated/tech/20210609 Configure FreeDOS in plain text.md b/translated/tech/20210609 Configure FreeDOS in plain text.md new file mode 100644 index 0000000000..fb4baebbad --- /dev/null +++ b/translated/tech/20210609 Configure FreeDOS in plain text.md @@ -0,0 +1,213 @@ +[#]: subject: (Configure FreeDOS in plain text) +[#]: via: (https://opensource.com/article/21/6/freedos-fdconfigsys) +[#]: author: (Jim Hall https://opensource.com/users/jim-hall) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +以纯文本方式配置 FreeDOS +====== +学习如何使用 FDCONFIG.SYS 来配置 FreeDOS 。 +![Person using a laptop][1] + +FreeDOS 是主配置文件是在根目录中的名称为 `FDCONFIG.SYS` 的文件。这个文件包含一系列的行,每行都设置一个诸如 `LASTDRIVE=Z` 或 `FILES=40` 的值。例如,在 FreeDOS 1.3 RC4 中的默认 `FDCONFIG.SYS` ,看起来像这样: + + +``` +SET DOSDIR=C:\FDOS + +!COUNTRY=001,858,C:\FDOS\BIN\COUNTRY.SYS +!LASTDRIVE=Z +!BUFFERS=20 +!FILES=40 +!MENUCOLOR=7,0 + +MENUDEFAULT=1,5 +MENU 1 - Load FreeDOS with JEMMEX, no EMS (most UMBs), max RAM free +MENU 2 - Load FreeDOS with JEMM386 (Expanded Memory) +MENU 3 - Load FreeDOS low with some drivers (Safe Mode) +MENU 4 - Load FreeDOS without drivers (Emergency Mode) + +12?DOS=HIGH +12?DOS=UMB +12?DOSDATA=UMB +1?DEVICE=C:\FDOS\BIN\JEMMEX.EXE NOEMS X=TEST I=TEST NOVME NOINVLPG +234?DEVICE=C:\FDOS\BIN\HIMEMX.EXE +2?DEVICE=C:\FDOS\BIN\JEMM386.EXE X=TEST I=TEST I=B000-B7FF NOVME NOINVLPG +34?SHELL=C:\FDOS\BIN\COMMAND.COM C:\FDOS\BIN /E:1024 /P=C:\FDAUTO.BAT +12?SHELLHIGH=C:\FDOS\BIN\COMMAND.COM C:\FDOS\BIN /E:1024 /P=C:\FDAUTO.BAT +``` + +但是,这些指令行都表示什么意思?为什么一些指令行有一个问号 (`?`) 或一个叹号 (`!`),而其它的命令行却没有? + +### 一个简单的配置 + +让我们从一个简单的配置开始,像这样,我们就可以看到我们的配置做了什么。做出这个非常简单的 `FDCONFIG.SYS` 文件: + + +``` +LASTDRIVE=Z +BUFFERS=20 +FILES=40 +DEVICE=C:\FDOS\BIN\HIMEMX.EXE +SHELL=C:\FDOS\BIN\COMMAND.COM C:\FDOS\BIN /E:1024 /P=C:\FDAUTO.BAT +``` + +这个配置文件仅包含几个指令: + + 1. `LASTDRIVE=Z` + 2. `BUFFERS=20` + 3. `FILES=40` + 4. `DEVICE=C:\FDOS\BIN\HIMEMX.EXE` + 5. `SHELL=C:\FDOS\BIN\COMMAND.COM C:\FDOS\BIN /E:1024 /P=C:\FDAUTO.BAT` + + + +第一行指令告诉 FreeDOS 在存储器中保留多少驱动器字母。(DOS 使用字母来表示附属于系统的每个驱动器,`LASTDRIVE=Z` 表示从 "A" 到 "Z" 预留驱动器字母)。 `LASTDRIVE` 会影响系统可以识别的 _逻辑驱动器_ 的数量。你可能没有任何的逻辑驱动器;FreeDOS 安装器不会默认设置这些逻辑驱动器。在任何情况下,在任何 FreeDOS 系统上设置 `LASTDRIVE=Z` 都是没有害处的。 + +`BUFFERS` 行设置文件缓冲区预留存储器。_缓冲区_ 有助于加速某些需要存储空间的进程,例如复制文件。如果你为 `BUFFERS` 设置一个较大的值,那么 FreeDOS 将预留更多的存储器—and vice versa for smaller values。大多数的用户将会设置其为 `BUFFERS=20` 或 `BUFFERS=40` ,取决于他们在系统上读写文件的频率。 + +`FILES` 设置决定 DOS 允许你一次打开多少文件。如果你运行的一个应用程序需要一次打开很多文件,例如打开一个谱系数据库,你可能需要为 `FILES` 设置一个较大的值。对于大多数的用户来说,`FILES=40` 是一个合理的值。 + +`DEVICE` 是一个特殊的指令,用于加载 _设备驱动器_ 。DOS 需要针对某些硬件或配置文件的设备驱动器。这行 `DEVICE=C:\FDOS\BIN\HIMEMX.EXE` 来加载 _HimemX_ 设备驱动器,这样,DOS 可以利用超出前 640 KB 的扩展存储器。 + +最后的指令行告诉 FreeDOS 的内核在哪里找到命令行 shell 。默认情况下,内核将从 `COMMAND.COM` 开始查找 shell ,但是你可以使用 `SHELL` 指令来更改它。在这个示例中, `SHELL=C:\FDOS\BIN\COMMAND.COM` 说明 shell 是 `COMMAND.COM` 程序,位于 `C` 驱动器上的 `\FDOS\BIN` 目录之中。 + +在 `SHELL` 结尾处的其它文件表示选项为 `COMMAND.COM` 的 shell 。FreeDOS 的 `COMMAND.COM` 支持一些启动选项来修改它的行为,包括: + + * **`C:\FDOS\BIN`** \- `COMMAND.COM` 程序的完整的路径 + * `/E:1024 -` 环境 (E) 大小,以字节为单位。`/E:1024` 告诉 `COMMAND.COM` 来预留 1024 字节,或者说是 1 KB ,来存储它的环境变量。 + * **`/P=C:\FDAUTO.BAT`** \- `/P` 选项表示 shell 是一个永久性的 (P) shell ,因此用户不能通过输入 `EXIT` 来退出 shell (附加文本 `=C:\FDAUTO.BAT` 告诉 `COMMAND.COM` 在启动时执行 `C:\FDAUTO.BAT` 文件,而不再执行默认的 `AUTOEXEC.BAT` 文件) + + + +通过这个简单的配置文件,你应该能够理解 FreeDOS 1.3 RC4 安装的 `FDCONFIG.SYS` 文件中的一些东西。 + +### 启动菜单 + +FreeDOS 支持一种有序的功能—在一个系统上使用多个配置文件,使用一个 "启动菜单" 来选择你想要的配置。`FDCONFIG.SYS` 文件包含一些定义菜单的行: + + +``` +!MENUCOLOR=7,0 + +MENUDEFAULT=1,5 +MENU 1 - Load FreeDOS with JEMMEX, no EMS (most UMBs), max RAM free +MENU 2 - Load FreeDOS with JEMM386 (Expanded Memory) +MENU 3 - Load FreeDOS low with some drivers (Safe Mode) +MENU 4 - Load FreeDOS without drivers (Emergency Mode) +``` + +`MENUCOLOR` 指令定义启动菜单的文本颜色和背景颜色。这些值通常在 0 到 7 的范围之内, 并代表这些颜色: + + * 0 黑色 + * 1 蓝色 + * 2 绿色 + * 3 品蓝 + * 4 红色 + * 5 品红 + * 6 棕色 + * 7 白色 + + + +因此,`MENUCOLOR=7,0` 的定义意味着显示一个黑色背景 (0) 白色文本 (7) 的菜单。如果你想使用一个蓝色背景白色文本,你可以将其定义为 `MENUCOLOR=7,1` 。 + +在行头部的叹号 (`!`) 意味着:不管你选择哪个菜单,这个指令都将会执行。 + +`MENUDEFAULT=1,5` 行告诉内核等待用户多长时间来选择启动菜单项,或者如果用户没有选择的话,使用那个默认菜单项。`MENUDEFAULT=1,5` 标示着系统将等待 5 秒钟;如果用户不在这段时间内尝试选择一个菜单的话,内核将选择启动菜单 "1" 。 + +![boot menu][2] + +Jim Hall, CC-BY SA 4.0 + +在其后的 `MENU` 行至不同启动菜单配置的标签。它们是按顺序排列的,因此,菜单项目 "1" 是第一个,接下来的 "2" 是第二个,以此类推。 + +![menu select 4][3] + +Jim Hall, CC-BY SA 4.0 + +在 `FDCONFIG.SYS` 中的接下来的一行中,你将在一个问号 (`?`) 前看到一些数字。这标示 "针对这几个数字的启动菜单项,使用这行命令"。例如,如果用户选择启动菜单项 "2","3" 或 "4" 的话,那么带有 `234?` 的这行命令才将加载 HimemX 设备驱动器。 + + +``` +`234?DEVICE=C:\FDOS\BIN\HIMEMX.EXE` +``` + +这里有很多方法来使用 `FDCONFIG.SYS` 以配置你的 FreeDOS 系统。我们在这里只介绍基本的东西,最重用的方法是定义你的 FreeDOS 内核设置。更多的信息,探索 FreeDOS 帮助系统 (在命令行中输入 `HELP` ) 来学习如何使用使用的 FreeDOS 的 `FDCONFIG.SYS` 选项: + + * **SWITCHES** + * 启动时处理过程行为 + * **REM** 和 **;** + * 注释 (在 FDCONFIG.SYS 中被忽略) + * **MENUCOLOR** + * 启动菜单文本颜色和背景颜色 + * **MENUDEFAULT** + * 启动菜单默认值 + * **MENU** + * 启动菜单选项 + * **ECHO** 和 **EECHO** + * 显示信息 + * **BREAK** + * 设置扩展,使用 **Ctrl+C** 打开或关闭 + * **BUFFERS** 或 **BUFFERSHIGH** + * 分配多少磁盘缓冲区 + * **COUNTRY** + * 设置国际化行为 + * **DOS** + * 告诉 FreeDOS 内核如何将其自身加载到存储器之中 + * **DOSDATA** + * 告诉 FreeDOS 加载内核到上位存储器之中 + * **FCBS** + * 设置文件控制块 (FCBs) 的数量 + * **KEYBUF** + * 在存储器中重新指定键盘缓冲区 + * **FILES** 或 **FILESHIGH** + * 一次可以打开多少个文件 + * **LASTDRIVE** 或 **LASTDRIVEHIGH** + * 设置可以使用的最后一个驱动器字母 + * **NUMLOCK** + * 设置键盘数字锁的开或关 + * **SHELL** ,**SHELLHIGH** 或 **COMMAND** + * 设置命令行 shell + * **STACKS** 或 **STACKSHIGH** + * 添加堆栈以处理硬件中断 + * **SWITCHAR** + * 重新定义命令行选项开关字符 + * **SCREEN** + * 设置在屏幕上的行数 + * **VERSION** + * 设置向程序报告的 DOS 版本 + * **IDLEHALT** + * 激活节能功能,在某些系统上有用 + * **DEVICE** 和 **DEVICEHIGH** + * 加载一个驱动程序到存储器之中 + * **INSTALL** 和 **INSTALLHIGH** + * 加载一个 "存储器驻留" (TSR) 程序 + * **SET** + * 设置一个 DOS 环境变量 + + + +### Configuring in plain text + +像 Linux 和 BSD 一样,FreeDOS 配置以纯文本的方式进行。不需要特殊指定的编辑工具,因此,深入研究,看看哪些选项最适合你。它很容易,但是功能很强大! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/6/freedos-fdconfigsys + +作者:[Jim Hall][a] +选题:[lujun9972][b] +译者:[robsean](https://github.com/robsean) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jim-hall +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/laptop_screen_desk_work_chat_text.png?itok=UXqIDRDD (Person using a laptop) +[2]: https://opensource.com/sites/default/files/uploads/boot-menu.png (The boot menu waits for 5 seconds before assuming menu item 1) +[3]: https://opensource.com/sites/default/files/uploads/menu-select4.png (Use the arrow keys to select a boot menu configuration) From 892ddda4b8e205fa60491699964f9a522a25349b Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 4 Dec 2021 15:21:45 +0800 Subject: [PATCH 085/244] PRF&PUB @geekpi https://linux.cn/article-14048-1.html --- ...che Cassandra on Ubuntu and Other Linux.md | 74 +++++++------------ 1 file changed, 27 insertions(+), 47 deletions(-) rename {translated/tech => published}/20211129 How to Install Apache Cassandra on Ubuntu and Other Linux.md (74%) diff --git a/translated/tech/20211129 How to Install Apache Cassandra on Ubuntu and Other Linux.md b/published/20211129 How to Install Apache Cassandra on Ubuntu and Other Linux.md similarity index 74% rename from translated/tech/20211129 How to Install Apache Cassandra on Ubuntu and Other Linux.md rename to published/20211129 How to Install Apache Cassandra on Ubuntu and Other Linux.md index 12c0c302da..80290307dc 100644 --- a/translated/tech/20211129 How to Install Apache Cassandra on Ubuntu and Other Linux.md +++ b/published/20211129 How to Install Apache Cassandra on Ubuntu and Other Linux.md @@ -3,14 +3,16 @@ [#]: author: "Marco Carmona https://itsfoss.com/author/marco/" [#]: collector: "lujun9972" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14048-1.html" 如何在 Ubuntu 和其他 Linux 上安装 Apache Cassandra ====== -[Apache Cassandra][1] 是一个免费的开源 NoSQL 数据库管理系统,用于在许多服务器上操作大量信息,提供无单点故障的高可用性。 +![](https://img.linux.net.cn/data/attachment/album/202112/04/151942ihpizylzk0i3pt0i.jpg) + +[Apache Cassandra][1] 是一个自由开源的 NoSQL 数据库管理系统,用于在许多服务器上操作大量信息,提供无单点故障的高可用性。 我不打算讨论 NoSQL 数据库的细节。我将会告诉你如何在基于 Ubuntu 的 Linux 发行版上安装 Apache Cassandra。 @@ -24,52 +26,42 @@ * 使用 Docker 安装:适用于所有 Linux 发行版。 * 从 tarball 安装:适用于所有 Linux,但不会自动更新到新版本。 - - 这仅仅是为了练习和体验 Apache Cassandra。如果你要在一个项目中使用它和其他服务,你必须遵循该服务的完整配置和设置指南。 我将展示前两种方法。 #### 方法 1:使用官方仓库在 Ubuntu 和 Debian 上安装 Cassandra -在你安装和使用 Cassandra 之前,你需要在你的系统上安装 Python 和 Java。你可能需要[在 Ubuntu 上安装 Java][2],但 Python 通常是预装的。 +在你安装和使用 Cassandra 之前,你需要在你的系统上安装 Python 和 Java。你可能需要 [在 Ubuntu 上安装 Java][2],但 Python 通常是预装的。 你可以用下面这行来检查先决条件: ``` - - java -version && python --version - +java -version && python --version ``` -所有先决条件都安装好了?那就好。让我们来安装 Cassandra。这里的方法与[在 Ubuntu 中添加任意外部仓库][3]相同。 +所有先决条件都安装好了?那就好。让我们来安装 Cassandra。这里的方法与 [在 Ubuntu 中添加任意外部仓库][3] 相同。 首先,将 Apache Cassandra 仓库添加到你的源列表中。下面这个添加最新的主要版本(在写这篇文章的时候)4.0 系列。 ``` - - echo "deb http://www.apache.org/dist/cassandra/debian 40x main" | sudo tee -a /etc/apt/sources.list.d/cassandra.sources.list - +echo "deb http://www.apache.org/dist/cassandra/debian 40x main" | sudo tee -a /etc/apt/sources.list.d/cassandra.sources.list ``` ![Add Apache Cassandra repository][4] 现在,下载并将 Apache Cassandra 仓库的密钥添加到服务器上的受信任密钥列表中。这样,你的系统就会信任来自你在上一步添加的仓库的软件包。 -你应该确保 apt 可以通过 https 使用。 +你应该确保 `apt` 可以通过 https 使用。 ``` - - sudo apt install apt-transport-https - +sudo apt install apt-transport-https ``` 然后添加密钥: ``` - - wget https://www.apache.org/dist/cassandra/KEYS && sudo apt-key add KEYS - +wget https://www.apache.org/dist/cassandra/KEYS && sudo apt-key add KEYS ``` ![Add Apache Cassandra repository key][5] @@ -77,17 +69,13 @@ 你已经添加了仓库。更新本地缓存,使你的系统知道这个新仓库的存在。 ``` - - sudo apt update - +sudo apt update ``` 最后,用以下命令安装 Cassandra: ``` - - sudo apt install cassandra - +sudo apt install cassandra ``` ![Installing Apache Cassandra on Ubuntu][6] @@ -95,18 +83,16 @@ 安装完成后,Cassandra 服务会自动开始运行。如果你想的话,你仍然可以验证它: ``` - - sudo systemctl status cassandra.service - +sudo systemctl status cassandra.service ``` ![Check if Cassandra is running][7] -你可以输入 cqlsh 连接到数据库。输入 exit 来退出这个 shell。 +你可以输入 `cqlsh` 连接到数据库。输入 `exit` 来退出这个 shell。 ![Entering cqlsh][8] -这是非常基本和默认的设置。你可能需要根据你的需求来配置它。请查看[官方文档中的配置部分][9]。 +这是非常基本和默认的设置。你可能需要根据你的需求来配置它。请查看 [官方文档中的配置部分][9]。 #### 方法 2:使用 Docker 安装 Apache Cassandra @@ -114,12 +100,10 @@ 当然,你需要在你的系统上安装 Docker 来实现这个方法。这是这个方法的前提条件,我让你处理这件事情。 -如果你有 Docker,使用下面的命令来拉取 Apache Cassandra 的 docker 镜像: +如果你有 Docker,使用下面的命令来拉取 Apache Cassandra 的 Docker 镜像: ``` - - sudo docker pull cassandra:latest - +sudo docker pull cassandra:latest ``` ![Pulling Apache Cassandra docker image][10] @@ -127,28 +111,24 @@ 完成后,你可以用 [docker run 命令][11]来启动 Cassandra,像这样: ``` - - sudo docker run --name cass_cluster cassandra:latest - +sudo docker run --name cass_cluster cassandra:latest ``` ![Running Cassandra in a container][12] -**注意:** `--name` 选项将是创建的 Cassandra 集群的名称。 +**注意:** `--name` 选项指的是创建的 Cassandra 集群的名称。 -要与之前启动的 Cassandra 节点交互,你需要初始化 CQL shell,你可以用 Docker exec 命令这样做: +要与之前启动的 Cassandra 节点交互,你需要初始化 CQL shell,你可以用 Docker `exec` 命令这样做: ``` - - sudo docker exec -it cass_cluster cqlsh - +sudo docker exec -it cass_cluster cqlsh ``` ![Access the cqlsh running in Docker.][13] -_**恭喜!**_ 现在你至少知道了在你的系统中安装 Apache Cassandra 的两种不同方法。 +**恭喜!** 现在你至少知道了在你的系统中安装 Apache Cassandra 的两种不同方法。 -请记住,这篇文章只是一个介绍。如果你有兴趣了解更多关于 Apache Cassandra 的信息,请阅读[文档][14],在那里你可以找到更多关于这个神奇的 NoSQL 数据库管理系统的信息。**如果这篇文章对你有帮助,请享受并分享它。下一篇见。** +请记住,这篇文章只是一个介绍。如果你有兴趣了解更多关于 Apache Cassandra 的信息,请阅读 [文档][14],在那里你可以找到更多关于这个神奇的 NoSQL 数据库管理系统的信息。如果这篇文章对你有帮助,请阅读并分享它。下一篇见。 -------------------------------------------------------------------------------- @@ -157,7 +137,7 @@ via: https://itsfoss.com/apache-cassandra-ubuntu/ 作者:[Marco Carmona][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From b176ee127dc47b3f6077f2c1fe85f193f3f06988 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sun, 5 Dec 2021 05:02:41 +0800 Subject: [PATCH 086/244] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211204=20?= =?UTF-8?q?Convert=20audio=20in=20batches=20on=20Linux=20with=20SoundConve?= =?UTF-8?q?rter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211204 Convert audio in batches on Linux with SoundConverter.md --- ...in batches on Linux with SoundConverter.md | 90 +++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 sources/tech/20211204 Convert audio in batches on Linux with SoundConverter.md diff --git a/sources/tech/20211204 Convert audio in batches on Linux with SoundConverter.md b/sources/tech/20211204 Convert audio in batches on Linux with SoundConverter.md new file mode 100644 index 0000000000..30889ae112 --- /dev/null +++ b/sources/tech/20211204 Convert audio in batches on Linux with SoundConverter.md @@ -0,0 +1,90 @@ +[#]: subject: "Convert audio in batches on Linux with SoundConverter" +[#]: via: "https://opensource.com/article/21/12/soundconverter-linux" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Convert audio in batches on Linux with SoundConverter +====== +SoundConverter is a useful application not just because it does exactly +what its name says it does, but because it does it in batches and in +parallel. +![radio communication signals][1] + +There are many file formats used to store digital audio, and they're good for different purposes. Digital audio is, of course, only a representation of sound, a rendering of soundwaves that get translated into sound by a decoder and a set of speakers. Some audio formats, generically called _lossless_ formats, aim to encode audio close to its original analog form. Still, there's a lot of data in the real world, and as yet, digital can only approximate it in very large files. Other audio formats, called _lossy_ formats, balance file size with a reasonable representation of sound. + +There are plenty of great terminal commands for audio conversion. There's `sox` and `ffmpeg` and a handful of format-specific encoders, like `opusenc`, `flac`, `oggenc`, `fdkaac`, `wavpack`, and countless others. + +### Install SoundConverter on Linux + +SoundConverter is available on most Linux distributions from your package manager. On Fedora, Mageia, and similar distributions: + + +``` +`$ sudo dnf install kdenlive` +``` + +On Elementary, Mint, and other Debian-based distributions: + + +``` +`$ sudo apt install kdenlive` +``` + +However, I use SoundConverter as a [Flatpak][2]. + +### Converting audio + +Once you encode audio into a lossy format, you've lost data. Whether that data matters or not depends on the ears of its audience. Some people can't hear the difference between a low-bitrate MP3 and a full quality FLAC file, and even those who can often don't notice the difference between a 320kbps Ogg Vorbis podcast and a 128 kbps Ogg Vorbis podcast. Converting audio from a compressed format to an uncompressed format doesn't recover lost data, but it's not uncommon to need to convert audio from one format to another. You might want to upload a file to a website that accepts only a specific format, or your mobile device might only play a specific format, or to email a file that's too large for your host, or you might just want to save space on your drive. + +SoundConverter lets you convert audio in batches with ease. To convert audio with SoundConverter: + + 1. Launch SoundConverter from your Applications or Activities menu. + 2. Click the **Add Files** button in the top left corner of the SoundConverter window, and select the files you want to convert. + 3. Once you've added files, click the **Preferences** button (the gear icon) in the top right corner of the window, and select the format you want to convert to. You can also set the file naming convention, the destination folder, and other options. + 4. When you're ready, click the **Convert** button in the top left corner. + + + +![SoundConverter window][3] + +(Seth Kenlon, [CC BY-SA 4.0][4]) + +### Parallel processing + +SoundConverter is a useful application not just because it does exactly what its name says it does, but because it does it in batches and in parallel. Because modern computers have more than just CPU core, it's a waste of power and time to place each file in a queue to encode them one by one. SoundConverter can take several files at once and encode them simultaneously, meaning that converting 12 files can take the same time it would normally take to convert two—one after the other. You can do the same thing with a good terminal command, but only if you understand how to [launch parallel processes][5]. + +![SoundConverter preferences][6] + +(Seth Kenlon, [CC BY-SA 4.0][4]) + +You can also convert stereo audio into mono files. This can be especially useful for podcasts and audiobooks. These usually consist of a person speaking from a singular location (the microphone) and don't require a sense of spatial location. In fact, reducing stereo files to mono makes the audio easier to hear should you have just one earbud and cuts the file size in half. + +### The SoundConverter advantage + +It's a great feature to have different file formats for audio, and yet it seems that whenever I've saved audio in one format, I inevitably need it in another format. There are several great Linux commands to [convert audio files][7], but sometimes you might want an application you can leave open on your desktop and drag and drop files to, and so there's [SoundConverter][8]. A simple, single-purpose application, SoundConverter does exactly, and only, what its name says: It converts sound from one format to another. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/soundconverter-linux + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/sound-radio-noise-communication.png?itok=KMNn9QrZ (radio communication signals) +[2]: https://opensource.com/article/21/11/install-flatpak-linux +[3]: https://opensource.com/sites/default/files/uploads/soundconverter_0.jpg (SoundConverter window) +[4]: https://creativecommons.org/licenses/by-sa/4.0/ +[5]: https://opensource.com/article/18/5/gnu-parallel +[6]: https://opensource.com/sites/default/files/uploads/soundconvert-preferences.jpg (SoundConverter preferences) +[7]: https://opensource.com/article/17/6/ffmpeg-convert-media-file-formats +[8]: https://soundconverter.org/ From ff19c9f37e6c0b6501e0b8e7253665434ab525b4 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sun, 5 Dec 2021 05:02:54 +0800 Subject: [PATCH 087/244] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211204=20?= =?UTF-8?q?How=20to=20use=20dig?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211204 How to use dig.md --- sources/tech/20211204 How to use dig.md | 279 ++++++++++++++++++++++++ 1 file changed, 279 insertions(+) create mode 100644 sources/tech/20211204 How to use dig.md diff --git a/sources/tech/20211204 How to use dig.md b/sources/tech/20211204 How to use dig.md new file mode 100644 index 0000000000..21744938c5 --- /dev/null +++ b/sources/tech/20211204 How to use dig.md @@ -0,0 +1,279 @@ +[#]: subject: "How to use dig" +[#]: via: "https://jvns.ca/blog/2021/12/04/how-to-use-dig/" +[#]: author: "Julia Evans https://jvns.ca/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +How to use dig +====== + +Hello! I talked to a couple of friends recently who mentioned they wished they knew how to use `dig` to make DNS queries, so here’s a quick blog post about it. + +When I first started using `dig` I found it a bit intimidating – there are so many options! I’m going to leave out most of dig’s options in this post and just talk about the ones I actually use. + +Also I learned recently that you can set up a `.digrc` configuration file to make its output easier to read and it makes it SO MUCH nicer to use. + +I also drew a [zine page about dig][1] a few years ago, but I wanted to write this post to include a bit more information. + +### 2 types of dig arguments: query and formatting + +There are 2 main types of arguments you can pass to `dig`: + + 1. arguments that tell dig **what DNS query to make** + 2. arguments that tell dig how to **format the response** + + + +First, let’s go through the query options. + +### the main query options + +The 3 things you usually want to control about a DNS query are: + + 1. the **name** (like `jvns.ca`). The default is a query for the empty name (`.`). + 2. the **DNS query type** (like `A` or `CNAME`). The default is `A`. + 3. the **server** to send the query to (like `8.8.8.8`). The default is what’s in `/etc/resolv.conf`. + + + +The format for these is: + +``` + + dig @server name type + +``` + +Here are a couple of examples: + + * `dig @8.8.8.8 jvns.ca` queries Google’s public DNS server (`8.8.8.8`) for `jvns.ca`. + * `dig ns jvns.ca` makes an query with type `NS` for `jvns.ca` + + + +### `-x`: make a reverse DNS query + +One other query option I use occasionally is `-x`, to make a reverse DNS query. Here’s what the output looks like. + +``` + + $ dig -x 172.217.13.174 + 174.13.217.172.in-addr.arpa. 72888 IN PTR yul03s04-in-f14.1e100.net. + +``` + +`-x` isn’t magic – `dig -x 172.217.13.174` just makes a `PTR` query for `174.13.217.172.in-addr.arpa.`. Here’s how to make exact the same reverse DNS query without using `-x`. + +``` + + $ dig ptr 174.13.217.172.in-addr.arpa. + 174.13.217.172.in-addr.arpa. 72888 IN PTR yul03s04-in-f14.1e100.net. + +``` + +I always use `-x` though because it’s less typing. + +### options for formatting the response + +Now, let’s talk about arguments you can use to format the response. + +I’ve found that the way `dig` formats DNS responses by default is pretty overwhelming to beginners. Here’s what the output looks like: + +``` + + ; <<>> DiG 9.16.20 <<>> -r jvns.ca + ;; global options: +cmd + ;; Got answer: + ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 28629 + ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1 + + ;; OPT PSEUDOSECTION: + ; EDNS: version: 0, flags:; udp: 4096 + ; COOKIE: d87fc3022c0604d60100000061ab74857110b908b274494d (good) + ;; QUESTION SECTION: + ;jvns.ca. IN A + + ;; ANSWER SECTION: + jvns.ca. 276 IN A 172.64.80.1 + + ;; Query time: 9 msec + ;; SERVER: 192.168.1.1#53(192.168.1.1) + ;; WHEN: Sat Dec 04 09:00:37 EST 2021 + ;; MSG SIZE rcvd: 80 + +``` + +If you’re not used to reading this, it might take you a while to sift through it and find the IP address you’re looking for. And most of the time, you’re only interested in one line of this response (`jvns.ca. 180 IN A 172.64.80.1`). + +Here are my 2 favourite ways to make dig’s output more manageable. + +**way 1: +noall +answer** + +This tells dig to just print what’s in the “Answer” section of the DNS response. Here’s an example of querying for the `NS` records for `google.com`. + +``` + + $ dig +noall +answer ns google.com + google.com. 158564 IN NS ns4.google.com. + google.com. 158564 IN NS ns1.google.com. + google.com. 158564 IN NS ns2.google.com. + google.com. 158564 IN NS ns3.google.com. + +``` + +The format here is: + +``` + + NAME TTL TYPE CONTENT + google.com 158564 IN NS ns3.google.com. + +``` + +By the way: if you’ve ever wondered what `IN` means, it’s the “query class” and stands for “internet”. It’s basically just a relic from the 80s and 90s when there were other networks competing with the internet like “chaosnet”. + +**way 2: +short** + +This is like `dig +noall +answer`, but even shorter – it just shows the content of each record. For example: + +``` + + $ dig +short ns google.com + ns2.google.com. + ns1.google.com. + ns4.google.com. + ns3.google.com. + +``` + +### you can put formatting options in `digrc` + +If you don’t like dig’s default format (I don’t!), you can tell it to use a different format by default by creating a `.digrc` file in your home directory. + +I really like the `+noall +answer` format, so I put `+noall +answer` in my `~/.digrc`. Here’s what it looks like for me when I run `dig jvns.ca` using that configuration file. + +``` + + $ dig jvns.ca + jvns.ca. 255 IN A 172.64.80.1 + +``` + +So much easier to read! + +And if I want to go back to the long format with all of the output (which I do sometimes, usually because I want to look at the records in the Authority section of the response), I can get a long answer again by running: + +``` + + $ dig +all jvns.ca + +``` + +### dig +trace + +The last dig option that I use is `+trace`. `dig +trace` mimics what a DNS resolver does when it looks up a domain – it starts at the root nameservers, and then queries the next level of nameservers (like `.com`), and so on until it reaches the authoritative nameserver for the domain. So it’ll make about 30 DNS queries. (I checked using tcpdump, it seems to make 2 queries to get A/AAAA records for each of the root nameservers so that’s already 26 queries. I’m not really sure _why_ it does this because it should already have those IPs hardcoded, but it does.) + +I find this mostly useful for understanding how DNS works though, I don’t think that I’ve used it to solve a problem. + +### why dig? + +Even though there are simpler tools to make DNS queries (like `dog` and `host`), I find myself sticking with dig. + +What I like about dig is actually the same thing I **don’t** like about dig – it shows a lot of detail! + +I know that if I run `dig +all`, it’ll show me all of the sections of the DNS response. For example, let’s query one of the root nameservers for `jvns.ca`. The response has 3 sections I might care about – Answer, Authority, and Additional. + +``` + + $ dig @h.root-servers.net. jvns.ca +all + ;; Got answer: + ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 18229 + ;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 4, ADDITIONAL: 9 + ;; WARNING: recursion requested but not available + + ;; OPT PSEUDOSECTION: + ; EDNS: version: 0, flags:; udp: 1232 + ;; QUESTION SECTION: + ;jvns.ca. IN A + + ;; AUTHORITY SECTION: + ca. 172800 IN NS c.ca-servers.ca. + ca. 172800 IN NS j.ca-servers.ca. + ca. 172800 IN NS x.ca-servers.ca. + ca. 172800 IN NS any.ca-servers.ca. + + ;; ADDITIONAL SECTION: + c.ca-servers.ca. 172800 IN A 185.159.196.2 + j.ca-servers.ca. 172800 IN A 198.182.167.1 + x.ca-servers.ca. 172800 IN A 199.253.250.68 + any.ca-servers.ca. 172800 IN A 199.4.144.2 + c.ca-servers.ca. 172800 IN AAAA 2620:10a:8053::2 + j.ca-servers.ca. 172800 IN AAAA 2001:500:83::1 + x.ca-servers.ca. 172800 IN AAAA 2620:10a:80ba::68 + any.ca-servers.ca. 172800 IN AAAA 2001:500:a7::2 + + ;; Query time: 103 msec + ;; SERVER: 198.97.190.53#53(198.97.190.53) + ;; WHEN: Sat Dec 04 11:23:32 EST 2021 + ;; MSG SIZE rcvd: 289 + +``` + +`dog` also shows the records in the “additional” section , but it’s not super explicit about which is which (I guess the `+` means it’s in the additional section?). It doesn’t seem to show the records in the “Authority” section. + +``` + + $ dog @h.root-servers.net. jvns.ca + NS ca. 2d0h00m00s A "c.ca-servers.ca." + NS ca. 2d0h00m00s A "j.ca-servers.ca." + NS ca. 2d0h00m00s A "x.ca-servers.ca." + NS ca. 2d0h00m00s A "any.ca-servers.ca." + A c.ca-servers.ca. 2d0h00m00s + 185.159.196.2 + A j.ca-servers.ca. 2d0h00m00s + 198.182.167.1 + A x.ca-servers.ca. 2d0h00m00s + 199.253.250.68 + A any.ca-servers.ca. 2d0h00m00s + 199.4.144.2 + AAAA c.ca-servers.ca. 2d0h00m00s + 2620:10a:8053::2 + AAAA j.ca-servers.ca. 2d0h00m00s + 2001:500:83::1 + AAAA x.ca-servers.ca. 2d0h00m00s + 2620:10a:80ba::68 + AAAA any.ca-servers.ca. 2d0h00m00s + 2001:500:a7::2 + +``` + +And `host` seems to only show the records in the “answer” section (in this case no records) + +``` + + $ host jvns.ca h.root-servers.net + Using domain server: + Name: h.root-servers.net + Address: 198.97.190.53#53 + Aliases: + +``` + +Anyway, I think that these simpler DNS tools are great (I even made my own [simple web DNS tool][2]) and you should absolutely use them if you find them easier but that’s why I stick with dig. `drill`’s output format seems very similar to `dig`’s though, and maybe `drill` is better! I haven’t really tried it. + +### that’s all! + +I only learned about `.digrc` recently and I love using it so much, so I hope it helps some of you spend less time sorting though dig output! + +Someone on Twitter pointed out that it would be nice if there were a way to tell dig to show a short version of the response which also included the response’s status (like `NOERROR`, `NXDOMAIN`, `SERVFAIL`, etc), and I agree! I couldn’t find an option in the man page that does that though. + +-------------------------------------------------------------------------------- + +via: https://jvns.ca/blog/2021/12/04/how-to-use-dig/ + +作者:[Julia Evans][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://jvns.ca/ +[b]: https://github.com/lujun9972 +[1]: https://wizardzines.com/comics/dig/ +[2]: https://dns-lookup.jvns.ca/ From f6c1920983c288dc57e49b89f22eced18f1df964 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 5 Dec 2021 11:05:12 +0800 Subject: [PATCH 088/244] PRF&PUB @geekpi https://linux.cn/article-14050-1.html --- ... Dark GTK Themes for Your Linux Desktop.md | 110 +++++++----------- 1 file changed, 43 insertions(+), 67 deletions(-) rename {translated/tech => published}/20211127 13 Best Dark GTK Themes for Your Linux Desktop.md (51%) diff --git a/translated/tech/20211127 13 Best Dark GTK Themes for Your Linux Desktop.md b/published/20211127 13 Best Dark GTK Themes for Your Linux Desktop.md similarity index 51% rename from translated/tech/20211127 13 Best Dark GTK Themes for Your Linux Desktop.md rename to published/20211127 13 Best Dark GTK Themes for Your Linux Desktop.md index 49d93bd2b8..ca86ae9da1 100644 --- a/translated/tech/20211127 13 Best Dark GTK Themes for Your Linux Desktop.md +++ b/published/20211127 13 Best Dark GTK Themes for Your Linux Desktop.md @@ -3,142 +3,118 @@ [#]: author: "Pratham Patel https://itsfoss.com/author/pratham/" [#]: collector: "lujun9972" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14050-1.html" -13 个 Linux 桌面最佳深色 GTK 主题 +13 个 Linux 桌面的最佳深色 GTK 主题 ====== -**在任何给定的 Linux 发行版上,你都有近乎无限的定制选项,在视觉上最明显的区别就是定制主题。让我们来看看一些具有深色模式的 GTK 主题。** +![](https://img.linux.net.cn/data/attachment/album/202112/05/110404dh7d463771gn6833.jpg) -是的,我们在过去曾介绍过[最佳 Linux 主题][1],但这一篇是专门介绍深色主题的。曾几何时,只有程序员和系统管理员喜欢深色模式,但现在已经不是这样了。深色模式也受到了普通人的喜爱,因此我为像你这样的桌面 Linux 用户编制了这个深色主题列表。 +在任何的 Linux 发行版上,你都有近乎无限的定制选项,在视觉上最明显的区别就是定制的主题。让我们来看看一些具有深色模式的 GTK 主题。 -如果你是桌面环境主题化的新手,你可以看看我们的[在 GNOME 中安装主题][2]指南。 +是的,我们在过去曾介绍过 [最佳 Linux 主题][1],但这一篇是专门介绍深色主题的。曾几何时,只有程序员和系统管理员喜欢深色模式,但现在已经不是这样了。深色模式也受到了普通人的喜爱,因此我为像你这样的 Linux 桌面用户编制了这个深色主题列表。 -仅供参考,这并不是一个排名表。 +如果你不熟悉设置桌面环境的主题,你可以看看我们的 [在 GNOME 中安装主题][2] 指南。 -### 1\. McMojave +本文仅供参考,这并不是一个排名列表。 + +### 1、McMojave ![The stock image of how McMojave looks \(courtesy of the theme developer\)][3] -[McMojave][4] 是一个 GTK 主题,它从 macOS 风格的用户界面中获得灵感。这个主题显然是在深色模式下提供的,但也有浅色模式,嗯...,为任何可能想要它的人。 +[McMojave][4] 是一个 GTK 主题,其灵感来自于 macOS 风格的用户界面。显然这个主题是提供给深色模式的,但它也有浅色模式,嗯……,提供给任何可能想要它的人。 -McMojave GTK 主题显然支持基于 GTK 的桌面环境,如 Pantheon、Gnome、XFCE、Mate 等。但是,这个主题也[适用于 KDE 用户][5]。 +McMojave GTK 主题显然支持基于 GTK 的桌面环境,如 Pantheon、Gnome、XFCE、Mate 等。但是,这个主题也 [适用于 KDE 用户][5]。 -为了让你的桌面环境看起来与 macOS 非常相似,你还可以安装 [McMojave 圆圈图标主题][6]以获得更完整的体验。 +为了让你的桌面环境看起来与 macOS 非常相似,你还可以安装 [McMojave 圆形图标主题][6] 以获得更完整的体验。 -[McMojave][4] - -### 2\. Yaru +### 2、Yaru ![A screenshot of the default Yaru theme on Ubuntu 21.10][7] -[Yaru][8] 是 [Ubuntu][9] 的默认 GTK(GNOME)主题。该主题的橙色点缀着暗灰色和黑色的提示,我觉得很有吸引力。 +[Yaru][8] 是 [Ubuntu][9] 的默认 GTK(GNOME)主题。该主题的深灰色点缀着橙色,及少许黑色让我觉得很有吸引力。 现在,你可以让 Arch Linux 上的 GNOME 看起来像 Ubuntu。( ͡° ͜ʖ ͡°) -[Yaru][8] - -### 3\. Pop +### 3、Pop ![A look at how the Pop GTK theme looks on Pop!_OS][10] -[Pop GTK 主题][11]是由 [System76][12] 的人为他们基于 Ubuntu 的 Linux 发行版 [Pop!_OS][13] 创建的一个主题。 +[Pop GTK 主题][11] 是由 [System76][12] 为他们基于 Ubuntu 的 Linux 发行版 [Pop!_OS][13] 创建的主题。 -如果你喜欢 System7 6对 GNOME 在深色模式下的表现,你可以在你选择的 Linux 发行版中试用 [Pop GTK 主题][11]。 +如果你喜欢 System76 对 GNOME 在深色模式下的表现,你可以在你选择的 Linux 发行版中试用 [Pop GTK 主题][11]。 -为了完成 Pop-esque 的外观和感觉,在安装主题的同时,还可以安装 System76 提供的 [Pop 图标][14]。 +如果想获得完整的 Pop-esque 的外观和感觉,在安装主题的同时,还可以安装 System76 提供的 [Pop 图标][14]。 -[Pop GTK][11] - -### 4\. Nordic +### 4、Nordic ![Nordic GTK theme preview][15] -你是一个喜欢简单的、有点扁平化的设计方法以及一些灰色,嗯,很多灰色的人吗?不妨看看这个基于[北欧调色板][16]的主题。 +你是一个喜欢简单的、有点扁平化的设计方法以及一些灰色或更多灰色的人吗?不妨看看这个基于 [北欧风调色板][16] 的主题。 -Nordic GTK 主题给你的正是这样的感觉。一个基于北欧调色板的 GTK 主题,设计简单。 +[Nordic][17] GTK 主题给你的正是这样的感觉。一个基于北欧风调色板的 GTK 主题,设计简单。 -[Nord][17] - -### 5\. Ultimate-Maia +### 5、Ultimate-Maia ![Stock screenshot of the Ultimate-Maia theme][18] -Ultimate-Maia 是一个基于 [Google 的 Material 主题][19]设计理念的 GTK 主题。这个主题有一个微妙而独特的外观和感觉,特别是有各种不同的重点颜色可供选择。 +[Ultimate-Maia][20] 是一个基于 [Google 的 Material 主题][19] 设计理念的 GTK 主题。这个主题有一个精细而独特的外观和感觉,特别是有各种不同的强调色可供选择。 -[Ultimate-Maia][20] - -### 6\. Graphite +### 6、Graphite ![A look at Graphite’s flat, rounded and gray characteristic][21] -Graphite 是一个 GTK 主题,它为你的桌面环境(尤其是 GNOME)提供了一个完全独特的外观,同时保持了你的桌面环境的独特性,就像以前一样。这是一个值得一看的东西。 +[Graphite][22] 是一个 GTK 主题,它为你的桌面环境(尤其是 GNOME)提供了一个完全独特的外观,同时保持了你的桌面环境的独特性,就像以前一样。这是一个值得一看的东西。 -[Graphite][22] - -### 7\. Qogir +### 7、Qogir ![Customization options available with Qogir GTK theme][23] -Qogir是一个考虑到平面设计的 GTK 主题。Qogir 主题为你提供了标题按钮、复选框、单选按钮、开关等自定义选项。 +[Qogir][24] 是一个采用了扁平化设计的 GTK 主题。Qogir 主题为你提供的不仅仅是标题按钮、复选框、单选按钮、开关等自定义选项。 -[Qogir][24] - -### 8\. Layan +### 8、Layan ![Lyan – A very rounded-corners GTK theme][25] -你会很高兴地知道,这个列表中还包括 Layan,一个强调平滑、圆角的 GTK 主题,带有气泡的美感。Layan 主题也继承了 [Google 的 Material design][19] 指导方针的设计理念。 +你会很高兴知道,这个列表中还包括 [Layan][26],这是一个强调平滑、圆角的 GTK 主题,带有气泡的美感。Layan 主题也继承了 [Google 的 Material 设计][19] 指导方针的设计理念。 -[Layan][26] - -### 9\. Juno +### 9、Juno ![][27] -Juno 是我发现的另一个最好的深色模式友好 GTK 主题之一。有些人可能喜欢它的漆黑性质,有些人可能不喜欢。但是,如果你有一台 OLED 笔记本或电脑显示屏,Juno 感觉是为你而生的。 +[Juno][28] 是我发现的另一个最好的对深色模式友好的 GTK 主题之一。有些人可能喜欢它的漆黑本质,有些人可能不喜欢。但是,如果你有一台 OLED 笔记本或电脑显示屏,Juno 感觉是为你而生的。 -[Juno][28] - -### 10\. Ant 主题 +### 10、Ant 主题 ![Ant themes’ available options for customization of window appearance][29] -Ant 是一个 GTK 主题,它从 macOS 的布局和用户界面元素中获得了一些灵感,在我看来,Ant 主题很好地实现了这一切。 +[Ant][30] 是一个 GTK 主题,它从 macOS 的布局和用户界面元素中获得了一些灵感,在我看来,Ant 主题很好地实现了这一切。 -[Ant][30] - -### 11\. Equilux +### 11、Equilux ![][31] -Equilux 主题给你一个漂亮的主题,带有微妙的深色模式。这个主题能很好地与 GNOME 及 GNOME 分叉融合。我没有太多的东西来描述这个主题,它是简单而优雅的。 +[Equilux][32] 主题给你一个漂亮的主题,带有精细的深色模式。这个主题能很好地与 GNOME 及 GNOME 的复刻融合在一起。我不会太多地描述这个主题,它简单而优雅。 -[Equilux][32] - -### 12\. Orchis-dark +### 12、Orchis-dark ![Orchis Dark][33] -Orchis-dark 是超酷的 Orchis 主题的深色变体。它为桌面提供了带有圆角和流畅界面的 iOS/macOS 触感。 只需看一眼,你就可以立即猜到。 +[Orchis Orchis-dark][34] 是超酷的 Orchis 主题的深色变体。它为桌面提供了带有圆角和流畅界面的 iOS/macOS 触感。只需看一眼,你就可以立即猜到。 -[Orchis Theme][34] - -### 13\. Elementary X +### 13、Elementary X ![A look at Elementary X GTK theme with the settings panel open][35] -Elementary X 是基于 [elementary OS][36] 团队为定制 GNOME 外观所做的努力的 GTK 主题。如果你不知道,elementary OS 是一个基于 Ubuntu 的 Linux 发行版。 - -[Elementary X][37] +[Elementary X][37] 是基于 [elementary OS][36] 团队为定制 GNOME 外观而开发的 GTK 主题。顺便说一句,elementary OS 是一个基于 Ubuntu 的 Linux 发行版。 ### 总结 这篇文章中列出的主题都是非常漂亮的,而且你的选择也不限于这里列出的那些。还有其他成千上万的主题。 -如果你喜欢一个主题,请在下面评论。如果你正在使用一个我没有提到的主题,请在下面评论。 +如果你喜欢一个主题,请在下面评论。如果你正在使用一个我没有提到的主题,也请留下评论。 -------------------------------------------------------------------------------- @@ -147,7 +123,7 @@ via: https://itsfoss.com/dark-gtk-themes/ 作者:[Pratham Patel][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 4f6bb94a01f59eb66eb80c9ff7db30114b45dd35 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 5 Dec 2021 18:54:55 +0800 Subject: [PATCH 089/244] APL --- sources/tech/20211204 How to use dig.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20211204 How to use dig.md b/sources/tech/20211204 How to use dig.md index 21744938c5..101984aa4d 100644 --- a/sources/tech/20211204 How to use dig.md +++ b/sources/tech/20211204 How to use dig.md @@ -2,7 +2,7 @@ [#]: via: "https://jvns.ca/blog/2021/12/04/how-to-use-dig/" [#]: author: "Julia Evans https://jvns.ca/" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "wxy" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 329a6b5c8db93641b6b394c9f7914d768ea34acc Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 5 Dec 2021 19:26:02 +0800 Subject: [PATCH 090/244] TSL&PRF @wxy --- sources/tech/20211204 How to use dig.md | 279 --------------------- translated/tech/20211204 How to use dig.md | 252 +++++++++++++++++++ 2 files changed, 252 insertions(+), 279 deletions(-) delete mode 100644 sources/tech/20211204 How to use dig.md create mode 100644 translated/tech/20211204 How to use dig.md diff --git a/sources/tech/20211204 How to use dig.md b/sources/tech/20211204 How to use dig.md deleted file mode 100644 index 101984aa4d..0000000000 --- a/sources/tech/20211204 How to use dig.md +++ /dev/null @@ -1,279 +0,0 @@ -[#]: subject: "How to use dig" -[#]: via: "https://jvns.ca/blog/2021/12/04/how-to-use-dig/" -[#]: author: "Julia Evans https://jvns.ca/" -[#]: collector: "lujun9972" -[#]: translator: "wxy" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -How to use dig -====== - -Hello! I talked to a couple of friends recently who mentioned they wished they knew how to use `dig` to make DNS queries, so here’s a quick blog post about it. - -When I first started using `dig` I found it a bit intimidating – there are so many options! I’m going to leave out most of dig’s options in this post and just talk about the ones I actually use. - -Also I learned recently that you can set up a `.digrc` configuration file to make its output easier to read and it makes it SO MUCH nicer to use. - -I also drew a [zine page about dig][1] a few years ago, but I wanted to write this post to include a bit more information. - -### 2 types of dig arguments: query and formatting - -There are 2 main types of arguments you can pass to `dig`: - - 1. arguments that tell dig **what DNS query to make** - 2. arguments that tell dig how to **format the response** - - - -First, let’s go through the query options. - -### the main query options - -The 3 things you usually want to control about a DNS query are: - - 1. the **name** (like `jvns.ca`). The default is a query for the empty name (`.`). - 2. the **DNS query type** (like `A` or `CNAME`). The default is `A`. - 3. the **server** to send the query to (like `8.8.8.8`). The default is what’s in `/etc/resolv.conf`. - - - -The format for these is: - -``` - - dig @server name type - -``` - -Here are a couple of examples: - - * `dig @8.8.8.8 jvns.ca` queries Google’s public DNS server (`8.8.8.8`) for `jvns.ca`. - * `dig ns jvns.ca` makes an query with type `NS` for `jvns.ca` - - - -### `-x`: make a reverse DNS query - -One other query option I use occasionally is `-x`, to make a reverse DNS query. Here’s what the output looks like. - -``` - - $ dig -x 172.217.13.174 - 174.13.217.172.in-addr.arpa. 72888 IN PTR yul03s04-in-f14.1e100.net. - -``` - -`-x` isn’t magic – `dig -x 172.217.13.174` just makes a `PTR` query for `174.13.217.172.in-addr.arpa.`. Here’s how to make exact the same reverse DNS query without using `-x`. - -``` - - $ dig ptr 174.13.217.172.in-addr.arpa. - 174.13.217.172.in-addr.arpa. 72888 IN PTR yul03s04-in-f14.1e100.net. - -``` - -I always use `-x` though because it’s less typing. - -### options for formatting the response - -Now, let’s talk about arguments you can use to format the response. - -I’ve found that the way `dig` formats DNS responses by default is pretty overwhelming to beginners. Here’s what the output looks like: - -``` - - ; <<>> DiG 9.16.20 <<>> -r jvns.ca - ;; global options: +cmd - ;; Got answer: - ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 28629 - ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1 - - ;; OPT PSEUDOSECTION: - ; EDNS: version: 0, flags:; udp: 4096 - ; COOKIE: d87fc3022c0604d60100000061ab74857110b908b274494d (good) - ;; QUESTION SECTION: - ;jvns.ca. IN A - - ;; ANSWER SECTION: - jvns.ca. 276 IN A 172.64.80.1 - - ;; Query time: 9 msec - ;; SERVER: 192.168.1.1#53(192.168.1.1) - ;; WHEN: Sat Dec 04 09:00:37 EST 2021 - ;; MSG SIZE rcvd: 80 - -``` - -If you’re not used to reading this, it might take you a while to sift through it and find the IP address you’re looking for. And most of the time, you’re only interested in one line of this response (`jvns.ca. 180 IN A 172.64.80.1`). - -Here are my 2 favourite ways to make dig’s output more manageable. - -**way 1: +noall +answer** - -This tells dig to just print what’s in the “Answer” section of the DNS response. Here’s an example of querying for the `NS` records for `google.com`. - -``` - - $ dig +noall +answer ns google.com - google.com. 158564 IN NS ns4.google.com. - google.com. 158564 IN NS ns1.google.com. - google.com. 158564 IN NS ns2.google.com. - google.com. 158564 IN NS ns3.google.com. - -``` - -The format here is: - -``` - - NAME TTL TYPE CONTENT - google.com 158564 IN NS ns3.google.com. - -``` - -By the way: if you’ve ever wondered what `IN` means, it’s the “query class” and stands for “internet”. It’s basically just a relic from the 80s and 90s when there were other networks competing with the internet like “chaosnet”. - -**way 2: +short** - -This is like `dig +noall +answer`, but even shorter – it just shows the content of each record. For example: - -``` - - $ dig +short ns google.com - ns2.google.com. - ns1.google.com. - ns4.google.com. - ns3.google.com. - -``` - -### you can put formatting options in `digrc` - -If you don’t like dig’s default format (I don’t!), you can tell it to use a different format by default by creating a `.digrc` file in your home directory. - -I really like the `+noall +answer` format, so I put `+noall +answer` in my `~/.digrc`. Here’s what it looks like for me when I run `dig jvns.ca` using that configuration file. - -``` - - $ dig jvns.ca - jvns.ca. 255 IN A 172.64.80.1 - -``` - -So much easier to read! - -And if I want to go back to the long format with all of the output (which I do sometimes, usually because I want to look at the records in the Authority section of the response), I can get a long answer again by running: - -``` - - $ dig +all jvns.ca - -``` - -### dig +trace - -The last dig option that I use is `+trace`. `dig +trace` mimics what a DNS resolver does when it looks up a domain – it starts at the root nameservers, and then queries the next level of nameservers (like `.com`), and so on until it reaches the authoritative nameserver for the domain. So it’ll make about 30 DNS queries. (I checked using tcpdump, it seems to make 2 queries to get A/AAAA records for each of the root nameservers so that’s already 26 queries. I’m not really sure _why_ it does this because it should already have those IPs hardcoded, but it does.) - -I find this mostly useful for understanding how DNS works though, I don’t think that I’ve used it to solve a problem. - -### why dig? - -Even though there are simpler tools to make DNS queries (like `dog` and `host`), I find myself sticking with dig. - -What I like about dig is actually the same thing I **don’t** like about dig – it shows a lot of detail! - -I know that if I run `dig +all`, it’ll show me all of the sections of the DNS response. For example, let’s query one of the root nameservers for `jvns.ca`. The response has 3 sections I might care about – Answer, Authority, and Additional. - -``` - - $ dig @h.root-servers.net. jvns.ca +all - ;; Got answer: - ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 18229 - ;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 4, ADDITIONAL: 9 - ;; WARNING: recursion requested but not available - - ;; OPT PSEUDOSECTION: - ; EDNS: version: 0, flags:; udp: 1232 - ;; QUESTION SECTION: - ;jvns.ca. IN A - - ;; AUTHORITY SECTION: - ca. 172800 IN NS c.ca-servers.ca. - ca. 172800 IN NS j.ca-servers.ca. - ca. 172800 IN NS x.ca-servers.ca. - ca. 172800 IN NS any.ca-servers.ca. - - ;; ADDITIONAL SECTION: - c.ca-servers.ca. 172800 IN A 185.159.196.2 - j.ca-servers.ca. 172800 IN A 198.182.167.1 - x.ca-servers.ca. 172800 IN A 199.253.250.68 - any.ca-servers.ca. 172800 IN A 199.4.144.2 - c.ca-servers.ca. 172800 IN AAAA 2620:10a:8053::2 - j.ca-servers.ca. 172800 IN AAAA 2001:500:83::1 - x.ca-servers.ca. 172800 IN AAAA 2620:10a:80ba::68 - any.ca-servers.ca. 172800 IN AAAA 2001:500:a7::2 - - ;; Query time: 103 msec - ;; SERVER: 198.97.190.53#53(198.97.190.53) - ;; WHEN: Sat Dec 04 11:23:32 EST 2021 - ;; MSG SIZE rcvd: 289 - -``` - -`dog` also shows the records in the “additional” section , but it’s not super explicit about which is which (I guess the `+` means it’s in the additional section?). It doesn’t seem to show the records in the “Authority” section. - -``` - - $ dog @h.root-servers.net. jvns.ca - NS ca. 2d0h00m00s A "c.ca-servers.ca." - NS ca. 2d0h00m00s A "j.ca-servers.ca." - NS ca. 2d0h00m00s A "x.ca-servers.ca." - NS ca. 2d0h00m00s A "any.ca-servers.ca." - A c.ca-servers.ca. 2d0h00m00s + 185.159.196.2 - A j.ca-servers.ca. 2d0h00m00s + 198.182.167.1 - A x.ca-servers.ca. 2d0h00m00s + 199.253.250.68 - A any.ca-servers.ca. 2d0h00m00s + 199.4.144.2 - AAAA c.ca-servers.ca. 2d0h00m00s + 2620:10a:8053::2 - AAAA j.ca-servers.ca. 2d0h00m00s + 2001:500:83::1 - AAAA x.ca-servers.ca. 2d0h00m00s + 2620:10a:80ba::68 - AAAA any.ca-servers.ca. 2d0h00m00s + 2001:500:a7::2 - -``` - -And `host` seems to only show the records in the “answer” section (in this case no records) - -``` - - $ host jvns.ca h.root-servers.net - Using domain server: - Name: h.root-servers.net - Address: 198.97.190.53#53 - Aliases: - -``` - -Anyway, I think that these simpler DNS tools are great (I even made my own [simple web DNS tool][2]) and you should absolutely use them if you find them easier but that’s why I stick with dig. `drill`’s output format seems very similar to `dig`’s though, and maybe `drill` is better! I haven’t really tried it. - -### that’s all! - -I only learned about `.digrc` recently and I love using it so much, so I hope it helps some of you spend less time sorting though dig output! - -Someone on Twitter pointed out that it would be nice if there were a way to tell dig to show a short version of the response which also included the response’s status (like `NOERROR`, `NXDOMAIN`, `SERVFAIL`, etc), and I agree! I couldn’t find an option in the man page that does that though. - --------------------------------------------------------------------------------- - -via: https://jvns.ca/blog/2021/12/04/how-to-use-dig/ - -作者:[Julia Evans][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://jvns.ca/ -[b]: https://github.com/lujun9972 -[1]: https://wizardzines.com/comics/dig/ -[2]: https://dns-lookup.jvns.ca/ diff --git a/translated/tech/20211204 How to use dig.md b/translated/tech/20211204 How to use dig.md new file mode 100644 index 0000000000..be39c2f1b3 --- /dev/null +++ b/translated/tech/20211204 How to use dig.md @@ -0,0 +1,252 @@ +[#]: subject: "How to use dig" +[#]: via: "https://jvns.ca/blog/2021/12/04/how-to-use-dig/" +[#]: author: "Julia Evans https://jvns.ca/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: " " +[#]: url: " " + +如何使用 dig +====== + +![](https://img.linux.net.cn/data/attachment/album/202112/05/192530gj36ttdwz16azu6w.jpg) + +你好!最近我和几个朋友聊天,他们提到希望知道如何使用 `dig` 来进行 DNS 查询,所以这是一篇关于它的速读博文。 + +当我第一次使用 `dig` 时,我发现它有点吓人 —— 有这么多的选项!我打算把大部分的选项省略。在这篇文章中,我打算不谈 `dig` 的大部分选项,只谈我实际使用的选项。 + +我最近还了解到,你可以设置一个 `.digrc` 配置文件,让它的输出更容易阅读,这让它的使用变得更加轻松。 + +几年前我还画了一个关于 `dig` 的 [zine 页][1],但我想写这篇文章来包括更多的信息。 + +### 两种类型的 dig 参数:查询和格式化 + +有两种主要的参数可以传递给 `dig`: + + 1. 告诉 `dig` **要进行什么 DNS 查询的参数**。 + 2. 告诉 `dig` 如何 **格式化响应的参数**。 + +首先,让我们看一下查询选项。 + +### 主要的查询选项 + +你通常想控制 DNS 查询的 3 件事是: + + 1. **名称**(如 `jvns.ca`)。默认情况下,查询的是空名称(`.`)。 + 2. **DNS 查询类型**(如 `A` 或 `CNAME`)。默认是 `A`。 + 3. 发送查询的 **服务器**(如 `8.8.8.8`)。默认是 `/etc/resolv.conf` 中的内容。 + +其格式是: + +``` +dig @server name type +``` + +这里有几个例子: + + * `dig @8.8.8.8 jvns.ca` 向谷歌的公共 DNS 服务器(`8.8.8.8`)查询 `jvns.ca`。 + * `dig ns jvns.ca` 对 `jvns.ca` 进行类型为 `NS` 的查询。 + +### `-x`:进行反向 DNS 查询 + +我偶尔使用的另一个查询选项是 `-x`,用于进行反向 DNS 查询。下面是输出结果的样子。 + +``` +$ dig -x 172.217.13.174 +174.13.217.172.in-addr.arpa. 72888 IN PTR yul03s04-in-f14.1e100.net。 +``` + +`-x` 不是魔术。`dig -x 172.217.13.174` 只是对 `174.13.217.172.in-addr.arpa.` 做了一个 `PTR` 查询。下面是如何在不使用 `-x’ 的情况下进行完全相同的反向 DNS 查询。 + +``` +$ dig ptr 174.13.217.172.in-addr.arpa. +174.13.217.172.in-addr.arpa. 72888 IN PTR yul03s04-in-f14.1e100.net。 +``` + +我总是使用 `-x`,因为它可以减少输入。 + +### 格式化响应的选项 + +现在,让我们讨论一下你可以用来格式化响应的参数。 + +我发现 `dig` 默认格式化 DNS 响应的方式对初学者来说是很难接受的。下面是输出结果的样子: + +``` +; <<>> DiG 9.16.20 <<>> -r jvns.ca +;; global options: +cmd +;; Got answer: +;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 28629 +;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1 + +;; OPT PSEUDOSECTION: +; EDNS: version: 0, flags:; udp: 4096 +; COOKIE: d87fc3022c0604d60100000061ab74857110b908b274494d (good) +;; QUESTION SECTION: +;jvns.ca. IN A + +;; ANSWER SECTION: +jvns.ca. 276 IN A 172.64.80.1 + +;; Query time: 9 msec +;; SERVER: 192.168.1.1#53(192.168.1.1) +;; WHEN: Sat Dec 04 09:00:37 EST 2021 +;; MSG SIZE rcvd: 80 +``` + +如果你不习惯看这个,你可能需要花点时间来筛选,找到你要找的 IP 地址。而且大多数时候,你只对这个响应中的一行感兴趣(`jvns.ca. 180 IN A 172.64.80.1`)。 + +下面是我最喜欢的两种方法,可以使 `dig` 的输出更容易管理: + +#### 方式 1 : +noall +answer + +这告诉 `dig` 只打印 DNS 响应中的“答案”部分的内容。下面是一个查询 `google.com` 的 `NS` 记录的例子: + +``` +$ dig +noall +answer ns google.com +google.com. 158564 IN NS ns4.google.com. +google.com. 158564 IN NS ns1.google.com. +google.com. 158564 IN NS ns2.google.com. +google.com. 158564 IN NS ns3.google.com. +``` + +这里的格式是: + +``` +NAME TTL TYPE CONTENT +google.com 158564 IN NS ns3.google.com. +``` + +顺便说一下:如果你曾经想知道 `IN` 是什么意思,它是指“查询类”,代表“互联网 internet”。它基本上只是上世纪 80、90 年代的遗物,当时还有其他网络与互联网竞争,如“混沌网络chaosnet”。 + +#### 方式 2:+short + +这就像 `dig +noall +answer`,但更短:它只显示每条记录的内容。比如说: + +``` +$ dig +short ns google.com +ns2.google.com. +ns1.google.com. +ns4.google.com. +ns3.google.com. +``` + +### 你可以在 `digrc` 中设置格式化选项 + +如果你不喜欢 `dig` 的默认格式(我就不喜欢!),你可以在你的主目录下创建一个 `.digrc` 文件,告诉它默认使用不同的格式。 + +我非常喜欢 `+noall +answer` 格式,所以我把 `+noall +answer` 放在我的 `~/.digrc` 中。下面是我使用该配置文件运行 `dig jvns.ca` 时的情况。 + +``` +$ dig jvns.ca +jvns.ca. 255在172.64.80.1中 +``` + +这样读起来就容易多了! + +如果我想回到所有输出的长格式(我有时会这样做,通常是因为我想看响应的权威部分的记录),我可以通过运行再次得到一个长答案。 + +``` +$ dig +all jvns.ca +``` + +### dig +trace + +我使用的最后一个 `dig` 选项是 `+trace`。`dig +trace` 模仿 DNS 解析器在查找域名时的做法 —— 它从根域名服务器开始,然后查询下一级域名服务器(如 `.com`),以此类推,直到到达该域名的权威域名服务器。因此,它将进行大约 30 次 DNS 查询。(我用 `tcpdump` 检查了一下,对于每个根域名服务器的 `A` / `AAAA` 记录它似乎要进行 2 次查询,所以这已经是 26 次查询了。我不太清楚它为什么这样做,因为它应该已经有了这些 IP 的硬编码,但它确实如此。) + +我发现这对了解 DNS 的工作原理很有用,但我不认为我用它解决过问题。 + +### 为什么要用 dig + +尽管有一些更简单的工具来进行 DNS 查询(如 `dog` 和 `host`),我发现自己还是坚持使用 `dig`。 + +我喜欢 `dig` 的地方实际上也是我 **不喜欢** `dig` 的地方 —— 它显示了大量的细节! + +我知道,如果我运行 `dig +all`,它将显示 DNS 响应的所有部分。例如,让我们查询 `jvns.ca` 的一个根名称服务器。响应有 3 个部分,我可能会关心:回答部分、权威部分和附加部分。 + +``` +$ dig @h.root-servers.net. jvns.ca +all +;; Got answer: +;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 18229 +;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 4, ADDITIONAL: 9 +;; WARNING: recursion requested but not available + +;; OPT PSEUDOSECTION: +; EDNS: version: 0, flags:; udp: 1232 +;; QUESTION SECTION: +;jvns.ca. IN A + +;; AUTHORITY SECTION: +ca. 172800 IN NS c.ca-servers.ca. +ca. 172800 IN NS j.ca-servers.ca. +ca. 172800 IN NS x.ca-servers.ca. +ca. 172800 IN NS any.ca-servers.ca. + +;; ADDITIONAL SECTION: +c.ca-servers.ca. 172800 IN A 185.159.196.2 +j.ca-servers.ca. 172800 IN A 198.182.167.1 +x.ca-servers.ca. 172800 IN A 199.253.250.68 +any.ca-servers.ca. 172800 IN A 199.4.144.2 +c.ca-servers.ca. 172800 IN AAAA 2620:10a:8053::2 +j.ca-servers.ca. 172800 IN AAAA 2001:500:83::1 +x.ca-servers.ca. 172800 IN AAAA 2620:10a:80ba::68 +any.ca-servers.ca. 172800 IN AAAA 2001:500:a7::2 + +;; Query time: 103 msec +;; SERVER: 198.97.190.53#53(198.97.190.53) +;; WHEN: Sat Dec 04 11:23:32 EST 2021 +;; MSG SIZE rcvd: 289 + +``` + +`dog` 也显示了 “附加” 部分的记录,但它没有明确指出哪个是哪个(我猜 `+` 意味着它在附加部分?) ,但它似乎没有显示“权威”部分的记录。 + +``` +$ dog @h.root-servers.net. jvns.ca + NS ca. 2d0h00m00s A "c.ca-servers.ca." + NS ca. 2d0h00m00s A "j.ca-servers.ca." + NS ca. 2d0h00m00s A "x.ca-servers.ca." + NS ca. 2d0h00m00s A "any.ca-servers.ca." + A c.ca-servers.ca. 2d0h00m00s + 185.159.196.2 + A j.ca-servers.ca. 2d0h00m00s + 198.182.167.1 + A x.ca-servers.ca. 2d0h00m00s + 199.253.250.68 + A any.ca-servers.ca. 2d0h00m00s + 199.4.144.2 +AAAA c.ca-servers.ca. 2d0h00m00s + 2620:10a:8053::2 +AAAA j.ca-servers.ca. 2d0h00m00s + 2001:500:83::1 +AAAA x.ca-servers.ca. 2d0h00m00s + 2620:10a:80ba::68 +AAAA any.ca-servers.ca. 2d0h00m00s + 2001:500:a7::2 +``` + +而 `host` 似乎只显示“答案”部分的记录(在这种情况下没有得到记录): + +``` +$ host jvns.ca h.root-servers.net +Using domain server: +Name: h.root-servers.net +Address: 198.97.190.53#53 +Aliases: +``` + +总之,我认为这些更简单的 DNS 工具很好(我甚至自己做了一个 [简单的网络 DNS 工具][2]),如果你觉得它们更容易,你绝对应该使用它们,但这就是为什么我坚持使用 `dig` 的原因。`drill’ 的输出格式似乎与 `dig` 的非常相似,也许 `drill` 更好!但我还没有真正试过它。 + +### 就这些了 + +我最近才知道 `.digrc`,我非常喜欢使用它,所以我希望它能帮助你们中的一些人花更少的时间来整理 `dig` 的输出! + +有人在 Twitter 上指出,如果有办法让 `dig` 显示响应的简短版本,其中也包括响应的状态(如 `NOERROR`、`NXDOMAIN`、`SERVFAIL` 等),那就更好了!我同意这个观点!不过我在手册中没有找到这样的选项。 + +-------------------------------------------------------------------------------- + +via: https://jvns.ca/blog/2021/12/04/how-to-use-dig/ + +作者:[Julia Evans][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://jvns.ca/ +[b]: https://github.com/lujun9972 +[1]: https://wizardzines.com/comics/dig/ +[2]: https://dns-lookup.jvns.ca/ From 5a447134b59571f649fbf3ed39a75a5bd9a0b97f Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 5 Dec 2021 19:29:10 +0800 Subject: [PATCH 091/244] PUB @wxy https://linux.cn/article-14051-1.html --- {translated/tech => published}/20211204 How to use dig.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20211204 How to use dig.md (99%) diff --git a/translated/tech/20211204 How to use dig.md b/published/20211204 How to use dig.md similarity index 99% rename from translated/tech/20211204 How to use dig.md rename to published/20211204 How to use dig.md index be39c2f1b3..102f49250a 100644 --- a/translated/tech/20211204 How to use dig.md +++ b/published/20211204 How to use dig.md @@ -4,8 +4,8 @@ [#]: collector: "lujun9972" [#]: translator: "wxy" [#]: reviewer: "wxy" -[#]: publisher: " " -[#]: url: " " +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14051-1.html" 如何使用 dig ====== From e80bbc45f40744b821f0e4a6f1bee56fda7fcdeb Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 5 Dec 2021 19:31:16 +0800 Subject: [PATCH 092/244] PRF --- published/20211204 How to use dig.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/published/20211204 How to use dig.md b/published/20211204 How to use dig.md index 102f49250a..c472b6fad8 100644 --- a/published/20211204 How to use dig.md +++ b/published/20211204 How to use dig.md @@ -227,7 +227,7 @@ Address: 198.97.190.53#53 Aliases: ``` -总之,我认为这些更简单的 DNS 工具很好(我甚至自己做了一个 [简单的网络 DNS 工具][2]),如果你觉得它们更容易,你绝对应该使用它们,但这就是为什么我坚持使用 `dig` 的原因。`drill’ 的输出格式似乎与 `dig` 的非常相似,也许 `drill` 更好!但我还没有真正试过它。 +总之,我认为这些更简单的 DNS 工具很好(我甚至自己做了一个 [简单的网络 DNS 工具][2]),如果你觉得它们更容易,你绝对应该使用它们,但这就是为什么我坚持使用 `dig` 的原因。`drill` 的输出格式似乎与 `dig` 的非常相似,也许 `drill` 更好!但我还没有真正试过它。 ### 就这些了 From 9b9e7b248faecdf0c36c277171923d456b297f4a Mon Sep 17 00:00:00 2001 From: imgradeone Date: Sun, 5 Dec 2021 19:37:35 +0800 Subject: [PATCH 093/244] =?UTF-8?q?=E8=AE=A4=E9=A2=86=E6=96=87=E7=AB=A0=20?= =?UTF-8?q?It=E2=80=99s=20Time=20More=20Linux=20Distros=20and=20DEs...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ...Become ‘Linus-Proof’ https://news.itsfoss.com/more-linux-distros-become-linus-proof/ (主要是看到 LTT) --- ... It-s Time More Linux Distros and DEs Become ‘Linus-Proof.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/talk/20211129 It-s Time More Linux Distros and DEs Become ‘Linus-Proof.md b/sources/talk/20211129 It-s Time More Linux Distros and DEs Become ‘Linus-Proof.md index 730829676d..6398b202e0 100644 --- a/sources/talk/20211129 It-s Time More Linux Distros and DEs Become ‘Linus-Proof.md +++ b/sources/talk/20211129 It-s Time More Linux Distros and DEs Become ‘Linus-Proof.md @@ -2,7 +2,7 @@ [#]: via: "https://news.itsfoss.com/more-linux-distros-become-linus-proof/" [#]: author: "Abhishek https://news.itsfoss.com/author/root/" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "imgradeone" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 229ec4c507e7a6bc6593067bd11772125112d425 Mon Sep 17 00:00:00 2001 From: MjSeven Date: Sun, 5 Dec 2021 11:36:07 +0800 Subject: [PATCH 094/244] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ectories on Linux with the find command.md | 170 ------------------ ...ectories on Linux with the find command.md | 166 +++++++++++++++++ 2 files changed, 166 insertions(+), 170 deletions(-) delete mode 100644 sources/tech/20210909 Find files and directories on Linux with the find command.md create mode 100644 translated/tech/20210909 Find files and directories on Linux with the find command.md diff --git a/sources/tech/20210909 Find files and directories on Linux with the find command.md b/sources/tech/20210909 Find files and directories on Linux with the find command.md deleted file mode 100644 index 0b3bd1b3d1..0000000000 --- a/sources/tech/20210909 Find files and directories on Linux with the find command.md +++ /dev/null @@ -1,170 +0,0 @@ -[#]: subject: "Find files and directories on Linux with the find command" -[#]: via: "https://opensource.com/article/21/9/linux-find-command" -[#]: author: "Seth Kenlon https://opensource.com/users/seth" -[#]: collector: "lujun9972" -[#]: translator: "MjSeven" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Find files and directories on Linux with the find command -====== -There are many reasons to learn find, so download our free find cheat -sheet to help you learn more about the command. -![Magnifying glass on code][1] - -Regardless of how organized I resolve to be, it seems there are always times when I just can't locate a file. Sometimes it's because I can't remember the name of the file in the first place. Other times, I know the name, but I can't recall where I decided to save it. There are even times when I need a file that I didn't create in the first place. No matter what the quandary, though, I know that on a [POSIX system][2], I always have the `find` command. - -### Installing find - -The `find` command is defined by the [POSIX specification][3], which creates the open standard by which POSIX systems (including Linux, BSD, and macOS) are measured. Simply put, you already have `find` installed as long as you're running Linux, BSD, or macOS. - -However, not all `find` commands are exactly alike. The GNU `find` command, for instance, has features that the BSD or Busybox or Solaris `find` command might not have or does have but implements differently. This article uses GNU `find` from the [findutils][4] package because it's readily available and pretty popular. Most commands demonstrated in this article work with other implementations of `find`, but should you try a command on a platform other than Linux and get unexpected results, try downloading and installing the GNU version. - -### Find a file by name - -You can locate a file by its filename by providing the full file name or parts of the file name using regular expressions. The `find` command requires the path to the directory you want to search in, options to specify what attribute you're searching (for instance, -`name` for a case-sensitive file name), and then the search string. By default, your search string is treated literally: The `find` command searches for a filename that is exactly the string you enter between quotes unless you use regular expression syntax. - -Assume your Documents directory contains four files: `Foo`, `foo`, `foobar.txt`, and `foo.xml`. Here's a literal search for a file with the name "foo": - - -``` -$ find ~ -name "foo" -/home/tux/Documents/examples/foo -``` - -You can broaden your search by making it case-insensitive with the `-iname` option: - - -``` -$ find ~ -iname "foo" -/home/tux/Documents/examples/foo -/home/tux/Documents/examples/Foo -``` - -### Wildcards - -You can use basic shell wildcard characters to broaden your search. For instance, the asterisk (`*`) represents any number of characters: - - -``` -$ find ~ -iname "foo*" -/home/tux/Documents/examples/foo -/home/tux/Documents/examples/Foo -/home/tux/Documents/examples/foo.xml -/home/tux/Documents/examples/foobar.txt -``` - -A question mark (`?`) represents a single character: - - -``` -$ find ~ -iname "foo*.???" -/home/tux/Documents/examples/foo.xml -/home/tux/Documents/examples/foobar.txt -``` - -This isn't regular expression syntax, so the dot (`.`) represents a literal dot in this example. - -### Regular expressions - -You can also use regular expressions. As with `-iname` and `-name`, there's both a case-sensitive and a case-insensitive option. Unlike the `-name` and `-iname` options, though, a `-regex` and `-iregex` search is applied to the _whole path_, not just the file name. That means if you search for `foo`, you get no results because `foo` doesn't match `/home/tux/Documents/foo`. Instead, you must either search for the entire path, or else use a wildcard sequence at the beginning of your string: - - -``` -$ find ~ -iregex ".*foo" -/home/tux/Documents/examples/foo -/home/tux/Documents/examples/Foo -``` - -### Find a file modified within the last week - -To find a file you last modified last week, use the `-mtime` option along with a (negative) number of days in the past: - - -``` -$ find ~ -mtime -7 -/home/tux/Documents/examples/foo -/home/tux/Documents/examples/Foo -/home/tux/Documents/examples/foo.xml -/home/tux/Documents/examples/foobar.txt -``` - -### Find a file modified within a range of days - -You can combine `-mtime` options to locate a file within a range of days. For the first `-mtime` argument, provide the most recent number of days you could have modified the file, and for the second, give the greatest number of days. For instance, this search looks for files with modification times more than one day in the past, but no more than seven: - - -``` -`$ find ~ -mtime +1 -mtime -7` -``` - -### Limit a search by file type - -It's common to optimize the results of `find` by specifying the file type you're looking for. You shouldn't use this option if you're not sure what you're looking for, but if you know you're looking for a file and not a directory, or a directory but not a file, then this can be a great filter to use. The option is `-type`, and its arguments are a letter code representing a few different kinds of data. The most common are: - - * `d` \- directory - * `f` \- file - * `l` \- symbolic link - * `s` \- socket - * `p` \- named pipe (used for FIFO) - * `b` \- block special (usually a hard drive designation) - - - -Here are some examples: - - -``` -$ find ~ -type d -name "Doc*" -/home/tux/Documents -$ find ~ -type f -name "Doc*" -/home/tux/Downloads/10th-Doctor.gif -$ find /dev -type b -name "sda*" -/dev/sda -/dev/sda1 -``` - -### Adjust scope - -The `find` command is recursive by default, meaning that it searches for results in the directories of directories contained in directories (and so on). This can get overwhelming in a large filesystem, but you can use the `-maxdepth` option to control how deep into your folder structure you want `find` to descend: - - -``` -$ find /usr -iname "*xml" | wc -l -15588 -$ find /usr -maxdepth 2 -iname "*xml" | wc -l -15 -``` - -You can alternately set the minimum depth of recursion with `-mindepth`: - - -``` -$ find /usr -mindepth 8 -iname "*xml" | wc -l -9255 -``` - -### Download the cheat sheet - -This article only covers the basic functions of `find`. It's a great tool for searching through your system, but it's also a really useful front-end for the powerful [Parallel][5] command. There are many reasons to learn `find`, so **[download our free `find` cheat sheet][6]** to help you learn more about the command. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/9/linux-find-command - -作者:[Seth Kenlon][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/seth -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/find-file-linux-code_magnifying_glass_zero.png?itok=E2HoPDg0 (Magnifying glass on code) -[2]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains -[3]: https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/ -[4]: https://www.gnu.org/software/findutils/ -[5]: https://opensource.com/article/18/5/gnu-parallel -[6]: https://opensource.com/downloads/linux-find-cheat-sheet diff --git a/translated/tech/20210909 Find files and directories on Linux with the find command.md b/translated/tech/20210909 Find files and directories on Linux with the find command.md new file mode 100644 index 0000000000..576697fddf --- /dev/null +++ b/translated/tech/20210909 Find files and directories on Linux with the find command.md @@ -0,0 +1,166 @@ +[#]: subject: "Find files and directories on Linux with the find command" +[#]: via: "https://opensource.com/article/21/9/linux-find-command" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "MjSeven" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +使用 find 命令在 Linux 上查找文件和目录 +======================================= + +学习 find 命令的原因有很多,所以去下载我们免费的 find 备忘录吧,它可以帮助你了解更多有关 find 命令的信息。 +![Magnifying glass on code][1] + +不管我决心如何组织文件,似乎总有无法找到文件的时候。有时是因为我不记得最初的文件名,其他时候,我知道名字,但我不记得在哪里保存它了。甚至有时我需要一个我最初就没有创建的文件。但是,无论遇到什么困难,我知道在 [POSIX 系统][2]上,总是有 `find` 命令可以帮助我。 + +### 安装 find + +`find` 命令由 [POSIX 规范][3]定义,它创建了一个开放的标准,用于衡量 POSIX 系统,包括 Linux、BSD 和 macOS。简而言之,只要你运行的是 Linux、BSD 或 macOS,那么 `find` 已经安装了。 + +但是,并非所有的 `find` 命令都完全相同。例如,GNU 的 `find` 命令有一些 BSD、Busybox 或 Solaris 上 `find` 命令可能没有或有但实现方式不同的功能。本文使用 [findutils][4] 包中的 GNU `find`,因为它很容易获得且非常流行。本文演示的大多数命令都适用于 `find` 的其他实现,但是如果你在 Linux 以外的平台上尝试命令并得到非预期结果,尝试下载并安装 GNU 版本。 + +### 按名称查找文件 + +你可以使用正则表达式使用完整或部分文件名或部分来定位文件。`find` 命令需要你想搜索目录的路径,指定搜索属性选项,例如,`-name` 表示区分大小写。然后是搜索字符串。默认情况下,搜索字符串按字面意思处理。除非你使用正则表达式语法,否则 `find` 命令搜索的文件名正是你在引号之间输入的字符串。 + +假设你的 Documents 目录包含四个文件:`Foo`、`foo`、`foobar.txt` 和 `foo.xml`。以下是对 `foo` 的字面搜索: + +``` +$ find ~ -name "foo" +/home/tux/Documents/examples/foo +``` + +你可以使用 `-iname` 选项使其不区分大小写来扩大搜索范围: + +``` +$ find ~ -iname "foo" +/home/tux/Documents/examples/foo +/home/tux/Documents/examples/Foo +``` + +### 通配符 + +你可以使用基本的 shell 通配符来扩展搜索。例如,`*` 表示任意数量的字符: + +``` +$ find ~ -iname "foo*" +/home/tux/Documents/examples/foo +/home/tux/Documents/examples/Foo +/home/tux/Documents/examples/foo.xml +/home/tux/Documents/examples/foobar.txt +``` + +`?` 表示单个字符: + +``` +$ find ~ -iname "foo*.???" +/home/tux/Documents/examples/foo.xml +/home/tux/Documents/examples/foobar.txt +``` + +这不是正则表达式语法,因此 `.` 在示例中只表示文字点。 + +### 正则表达式 + +你还可以使用正则表达式。与 `-iname` 和 `-name` 一样,也有区分大小写和不区分大小写的选项。但不一样的是,`-regex` 和 `-iregex` 搜索应用于整个路径,而不仅仅是文件名。这意味着,如果你搜索 `foo`,你不会得到任何结果,因为 `foo` 与 `/home/tux/Documents/foo` 不相等。相反,你必须搜索整个路径,或者在字符串的开头使用通配符序列: + +``` +$ find ~ -iregex ".*foo" +/home/tux/Documents/examples/foo +/home/tux/Documents/examples/Foo +``` + +### 查找近一周修改过的文件 + +要查找近一周修改的文件,使用 `-mtime` 选项以及过去的天数: + +``` +$ find ~ -mtime -7 +/home/tux/Documents/examples/foo +/home/tux/Documents/examples/Foo +/home/tux/Documents/examples/foo.xml +/home/tux/Documents/examples/foobar.txt +``` + +### 查找近几天修改的文件 + +你可以结合使用 `-mtime` 选项来查找近几天范围内修改的文件。对于第一个 `-mtime` 参数,表示上一次修改文件的最近天数。第二个参数表示最大天数。例如,搜索修改时间超过 1 天但不超过 7 天的文件: + +``` +$ find ~ -mtime +1 -mtime -7 +``` + +### 按文件类型限制搜索 + +指定查找文件的类型来优化 `find` 的结果是很常见的。如果你不确定要查找的内容,则不应该使用此选项。但如果你知道要查找的是文件而不是目录,或者是目录而不是文件,那么这可能是一个很好的过滤器。选项是 `-type`,它的参数是代表不同类型数据的字母代码。最常见的是: + +* `d` \- 文件夹 +* `f` \- 文件 +* `l` \- 链接文件 +* `s` \- 套接字 +* `p` \- 命名管道 (FIFO 使用) +* `b` \- 块设备 (通常是硬盘) + +下面是一些例子: + +``` +$ find ~ -type d -name "Doc*" +/home/tux/Documents +$ find ~ -type f -name "Doc*" +/home/tux/Downloads/10th-Doctor.gif +$ find /dev -type b -name "sda*" +/dev/sda +/dev/sda1 +``` + +### 调整范围 + +`find` 命令默认是递归的,这意味着它会在指定的目录中层层搜索结果。这在大型文件系统中可能会变得不堪重负,但你可以使用 `-maxdepth` 选项来控制搜索深度: + +``` +$ find /usr -iname "*xml" | wc -l +15588 +$ find /usr -maxdepth 2 -iname "*xml" | wc -l +15 +``` + +也可以使用 `-mindepth` 设置最小递归深度: + +``` +$ find /usr -mindepth 8 -iname "*xml" | wc -l +9255 +``` + +### 下载备忘录 + +本文仅介绍 `find` 的基本功能,它是一个很好的搜索工具,但对于强大的 [Parallel][5] 命令来说,它也是一个非常有用的前端。学习 `find` 的原因有很多,所以**[下载我们免费的 `find` 备忘录][6]**吧,它可以帮助你了解有关该命令的更多信息。 + +--- + +via: https://opensource.com/article/21/9/linux-find-command + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[MjSeven](https://github.com/MjSeven) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[#]: subject: +[#]: via: +[#]: author: +[#]: collector: +[#]: translator: +[#]: reviewer: +[#]: publisher: +[#]: url: +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/find-file-linux-code_magnifying_glass_zero.png?itok=E2HoPDg0 +[2]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains +[3]: https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/ +[4]: https://www.gnu.org/software/findutils/ +[5]: https://opensource.com/article/18/5/gnu-parallel +[6]: https://opensource.com/downloads/linux-find-cheat-sheet From 3ac43d8d040ac64aed752a09bc7e69034b2a2eed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?imgradeone=20-=20=E4=B8=80=E5=B9=B4=E7=BA=A7=E4=B9=88?= =?UTF-8?q?=E4=B9=88=E5=93=92?= Date: Sun, 5 Dec 2021 21:44:10 +0800 Subject: [PATCH 095/244] =?UTF-8?q?=E5=AE=8C=E6=88=90=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...nux Distros and DEs Become ‘Linus-Proof.md | 98 ------------------- ...nux Distros and DEs Become ‘Linus-Proof.md | 95 ++++++++++++++++++ 2 files changed, 95 insertions(+), 98 deletions(-) delete mode 100644 sources/talk/20211129 It-s Time More Linux Distros and DEs Become ‘Linus-Proof.md create mode 100644 translated/talk/20211129 It-s Time More Linux Distros and DEs Become ‘Linus-Proof.md diff --git a/sources/talk/20211129 It-s Time More Linux Distros and DEs Become ‘Linus-Proof.md b/sources/talk/20211129 It-s Time More Linux Distros and DEs Become ‘Linus-Proof.md deleted file mode 100644 index 6398b202e0..0000000000 --- a/sources/talk/20211129 It-s Time More Linux Distros and DEs Become ‘Linus-Proof.md +++ /dev/null @@ -1,98 +0,0 @@ -[#]: subject: "It’s Time More Linux Distros and DEs Become ‘Linus-Proof’" -[#]: via: "https://news.itsfoss.com/more-linux-distros-become-linus-proof/" -[#]: author: "Abhishek https://news.itsfoss.com/author/root/" -[#]: collector: "lujun9972" -[#]: translator: "imgradeone" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -It’s Time More Linux Distros and DEs Become ‘Linus-Proof’ -====== - -The past few weeks have rattled the desktop Linux community. - -Popular tech YouTuber Linus, not Torvalds but Sebastian, decided to use Linux on desktop for a month. Linus Sebastian wanted to see if Linux has gotten to the point where it is user friendly enough that any tech nerd can pick it up and run? His focus was also on [gaming on Linux][1] because PC gaming is an area Sebastian covers a lot. - -That’s an interesting concept and many in the Linux community got excited because it was free publicity for desktop Linux to a wider tech audience. - -Only, it went [horribly wrong in the very first part of the Linux Daily Driver Challenge][2]. - -### Linus Sebastian’s (in)famous Pop!OS moment - -Linus Sebastian decided to [install Pop!_OS][3] because it is often considered a good mainstream distribution for gaming. He then tried to install Steam from the software center but the software center failed to install it. - -![Sebastian encountered an issue with Steam installation][4] - -When it did not work graphically, he went on to do what any other Linux user would have done. He turned to the terminal and ran the magical sudo apt-get install command. - -![Sebastian switches to command line to install Steam][5] - -In both graphical and terminal method, Pop!_OS showed a warning that the user was on the verge of removing some essential packages. - -The command line method clearly warned, “_**You are about to do something potentially harmful. To continue type in the phrase ‘Yes, do as I say**_‘”. - -![Ignores the warning about removing crucial packages][6] - -For many Linux users, this could have been the point to pause and reflect. The output clearly shows that it is going to delete gdm3, pop-desktop and many other desktop environment elements. - -But people often do not care about warnings. Linus Sebastian went ahead with it and ended up with a broken system that cannot be logged in graphically. - -![Linus Sebastian \(not Torvalds\) after realizing his Pop!_OS install is messed up][7] - -### Lesson for the desktop Linux developers - -There are two lessons to learn here for the developers: - - * Installing Steam or any other regular software should never have resulted in removal of critical graphical elements. - * A user should not be able to remove the critical piece of software from a regular, mainstream distribution. - - - -Pop!_OS quickly fixed the bug with Steam and also added a defensive mechanism to disable removal of critical desktop elements. - -> For some reason, an i386 version of a package was never published on Launchpad. Steam being an i386 package, when trying to install it, it had to downgrade that package to the Ubuntu version to resolve dependencies, which removed Pop!_OS packages. -> -> — Jeremy Soller (@jeremy_soller) [October 26, 2021][8] - -To prevent such incidents in the future, Pop!_OS patched the APT package manager. Now, POP!_OS won’t be able to enter “Yes, do as I Say”. Instead, they will have to add a special a file to enable it (if someone really wants to remove the packages). - -That’s a good move by Pop!_OS. But this is not just a lesson for Pop!_OS. Most Linux distributions could encounter similar situation and end up deleting the desktop environment and display server itself. - -KDE took a note and adds a feature to [disable the removal of Plasma desktop in the upcoming Plasma 5.24 release][9]. - -![KDE Plasma won’t allow you to remove Plasma Desktop][10] - -Many people blamed Linus Sebastian for going ahead with the disaster despite clear warning. But here’s the thing, many users won’t care for “warnings”, no matter how technically advanced they are. People just assume that pressing Y or other similar stuff is just part of the procedure without thinking twice. Some other Linux users have encountered it in the past and many will encounter it in the future. - -This is why adding failsafe is the wise step here. This is something all mainstream distributions should do. - -#### Big Tech Websites Get Millions in Revenue, It's FOSS Got You! - -If you like what we do here at It's FOSS, please consider making a donation to support our independent publication. Your support will help us keep publishing content focusing on desktop Linux and open source software. - -I'm not interested - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/more-linux-distros-become-linus-proof/ - -作者:[Abhishek][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://news.itsfoss.com/author/root/ -[b]: https://github.com/lujun9972 -[1]: https://itsfoss.com/linux-gaming-guide/ -[2]: https://www.youtube.com/watch?v=0506yDSgU7M&t=788s -[3]: https://itsfoss.com/install-pop-os/ -[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjM0NyIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[5]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjM4NSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[6]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjM3OCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[7]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjM2MiIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[8]: https://twitter.com/jeremy_soller/status/1453008808314351628?ref_src=twsrc%5Etfw -[9]: https://news.itsfoss.com/kde-plasma-5-24-dev/ -[10]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjM4OSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= diff --git a/translated/talk/20211129 It-s Time More Linux Distros and DEs Become ‘Linus-Proof.md b/translated/talk/20211129 It-s Time More Linux Distros and DEs Become ‘Linus-Proof.md new file mode 100644 index 0000000000..88a92812bb --- /dev/null +++ b/translated/talk/20211129 It-s Time More Linux Distros and DEs Become ‘Linus-Proof.md @@ -0,0 +1,95 @@ +[#]: subject: "It’s Time More Linux Distros and DEs Become ‘Linus-Proof’" +[#]: via: "https://news.itsfoss.com/more-linux-distros-become-linus-proof/" +[#]: author: "Abhishek https://news.itsfoss.com/author/root/" +[#]: collector: "lujun9972" +[#]: translator: "imgradeone" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +是时候让更多 Linux 发行版和桌面环境接受“老莱暴捶”了 +====== + +> Linus Sebastian 体验 Pop!_OS 的视频狠狠地给桌面 Linux 社区上了一课。(LCTT 译注:“老莱”是国内网友对 Linus Sebastian 的称呼。) + +过去的几周,整个 Linux 桌面社区沸腾了。 + +知名 YouTube 创作者 Linus(不是 Linux 之父 Torvalds,是 Linus Tech Tips 的 Sebastian)决定在一个月内挑战日常使用 Linux 桌面。Linus Sebastian 想了解 Linux 是否已经达到了对用户友好的程度,乃至于“技术呆”级别的用户都能轻松上手。他的专注点同样也放在了 [Linux 游戏][1] 上,毕竟电脑游戏确实也是 Sebastian 关注的一个领域。 + +这是一个有趣的概念,Linux 社区的许多人也十分兴奋,毕竟它向更广泛的技术受众群体免费宣传桌面 Linux 平台。 + +唯一美中不足的是,这个日用 Linux 挑战 [从一开始就出了大乱子][2]。(LCTT 译注:[bilibili][11] 中也有相应的中文字幕视频。) + +### Linus Sebastian 的 Pop!_OS 名(或者说是“冥”)场面 + +(LCTT 译注:原文标题使用的是 (in)famous,同时指代“著名”和“臭名昭著”,此处的“冥场面”偏向事件悲剧性。) + +Linus Sebastian 决定 [安装 Pop!_OS][3],因为 Pop!\_OS 经常在社区中作为适合游戏的主流发行版出现。接下来,他尝试在软件中心(即 Pop!\_Shop)安装 Steam,但软件中心未能成功安装 Steam。 + +![Sebastian 安装 Steam 时遇到了问题][4] + +既然没能通过图形化方式安装,他接下来做了其他所有 Linux 用户都会做的事情。他打开了终端,运行了神奇的 `sudo apt-get install` 命令。 + +![Sebastian 换用命令行方式安装 Steam][5] + +无论是图形化方式还是终端方式,Pop!_OS 都显示了一条警告,提示用户正濒临卸载关键软件包的危险。 + +命令行方式清晰明了地警告:“_**您的操作有潜在的危害性。若要继续,请输入下面的短句“是,按我说的做!(Yes, do as I say!)”**_。” + +![忽略移除关键软件包的警告][6] + +对于大部分 Linux 用户来说,到这一步就真的得停下来,深思熟虑了。输出的内容明确显示,接下来即将删除 `gdm3`、`pop-desktop` 和其他许多桌面环境要素。 + +但人们一般不会在意警告。Linus Sebastian 直接继续安装,最终就剩下了一个不能登录图形界面的损坏系统。 + +![意识到他的 Pop!_OS 彻底出乱子后的 Linus Sebastian(不是 Torvalds)][7] + +### 给桌面 Linux 开发者的深刻教训 + +对于开发者来说,这里有两点教训值得注意: + + * 安装 Steam 或任何其他常规软件时,不能导致关键的图形界面软件包被删除。 + * 在一款常规的、主流的发行版中,用户不应该能删除关键软件包。 + +Pop!_OS 迅速修复了 Steam 的问题,并增加了防御机制以阻止删除关键的桌面要素。 + +> 出于某些原因,i386 版的软件包不能在 Launchpad 上发布。Steam 是一个 i386 软件包,在尝试安装 Steam 时不得不将软件包降级到 Ubuntu 版本以解决依赖问题,然后就删除了 Pop!_OS 的软件包。 +> +> — Jeremy Soller (@jeremy_soller) [2021 年 10 月 26 日][8] + +为避免此类事故,Pop!\_OS 为 APT 包管理器制作了补丁。现在,用户无法在 Pop!\_OS 通过输入“是,按我说的做!(Yes, do as I say!)”来删除关键软件包了。相反,用户将需要添加一个特殊文件来启用该功能(如果某个人真的想把这些关键软件包删掉的话)。(LCTT 译注:APT 2.3.12 上游已经彻底禁用卸载关键软件包的功能。) + +对于 Pop!\_OS 来说,这确实是一个好举措。但,这并不仅仅是 Pop!\_OS 单边的教训。大多数 Linux 发行版都可能会遇到这种情况,并最终删除掉桌面环境和显示服务器。 + +KDE 已经注意到了这一点,并在即将发布的 Plasma 5.24 中 [添加了禁止卸载 Plasma 桌面的功能][9]。 + +![KDE Plasma 不允许用户卸载 Plasma 桌面][10] + +许多人责怪 Linus Sebastian 不顾清晰明确的警告,直接继续并走向灾难。但问题在于,许多用户真的不会在意“警告”这种东西,不管他们技术水平如何。人们只是觉得按 Y 或者其他东西就是程序正常的部分,也不会去多想。一些 Linux 用户之前已经踩过这种坑了,但未来可能还会有更多人重蹈覆辙。 + +这就是为什么添加故障保护措施才是明智之举。这是所有主流发行版都应该做的事。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/more-linux-distros-become-linus-proof/ + +作者:[Abhishek][a] +选题:[lujun9972][b] +译者:[imgradeone](https://github.com/imgradeone) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/root/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/linux-gaming-guide/ +[2]: https://www.youtube.com/watch?v=0506yDSgU7M&t=788s +[3]: https://itsfoss.com/install-pop-os/ +[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjM0NyIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[5]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjM4NSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[6]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjM3OCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[7]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjM2MiIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[8]: https://twitter.com/jeremy_soller/status/1453008808314351628?ref_src=twsrc%5Etfw +[9]: https://linux.cn/article-14015-1.html +[10]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjM4OSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[ 11 ]: https://www.bilibili.com/video/BV1Fh411b7q3?t=769 From 5d569aa06b62e3fee07b467b67dd10c0f4655ddb Mon Sep 17 00:00:00 2001 From: imgradeone Date: Sun, 5 Dec 2021 21:45:43 +0800 Subject: [PATCH 096/244] lint --- ... It-s Time More Linux Distros and DEs Become ‘Linus-Proof.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/talk/20211129 It-s Time More Linux Distros and DEs Become ‘Linus-Proof.md b/translated/talk/20211129 It-s Time More Linux Distros and DEs Become ‘Linus-Proof.md index 88a92812bb..b862210e0a 100644 --- a/translated/talk/20211129 It-s Time More Linux Distros and DEs Become ‘Linus-Proof.md +++ b/translated/talk/20211129 It-s Time More Linux Distros and DEs Become ‘Linus-Proof.md @@ -92,4 +92,4 @@ via: https://news.itsfoss.com/more-linux-distros-become-linus-proof/ [8]: https://twitter.com/jeremy_soller/status/1453008808314351628?ref_src=twsrc%5Etfw [9]: https://linux.cn/article-14015-1.html [10]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjM4OSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[ 11 ]: https://www.bilibili.com/video/BV1Fh411b7q3?t=769 +[11]: https://www.bilibili.com/video/BV1Fh411b7q3?t=769 From 17600cedeb1122d2c2988f1f57aeec399382b4e3 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Mon, 6 Dec 2021 05:04:31 +0800 Subject: [PATCH 097/244] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211206=20?= =?UTF-8?q?19=20Absolute=20Simple=20Things=20About=20Linux=20Terminal=20Ev?= =?UTF-8?q?ery=20Ubuntu=20User=20Should=20Know?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211206 19 Absolute Simple Things About Linux Terminal Every Ubuntu User Should Know.md --- ... Terminal Every Ubuntu User Should Know.md | 417 ++++++++++++++++++ 1 file changed, 417 insertions(+) create mode 100644 sources/tech/20211206 19 Absolute Simple Things About Linux Terminal Every Ubuntu User Should Know.md diff --git a/sources/tech/20211206 19 Absolute Simple Things About Linux Terminal Every Ubuntu User Should Know.md b/sources/tech/20211206 19 Absolute Simple Things About Linux Terminal Every Ubuntu User Should Know.md new file mode 100644 index 0000000000..7273733ca7 --- /dev/null +++ b/sources/tech/20211206 19 Absolute Simple Things About Linux Terminal Every Ubuntu User Should Know.md @@ -0,0 +1,417 @@ +[#]: subject: "19 Absolute Simple Things About Linux Terminal Every Ubuntu User Should Know" +[#]: via: "https://itsfoss.com/basic-terminal-tips-ubuntu/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +19 Absolute Simple Things About Linux Terminal Every Ubuntu User Should Know +====== + +Terminal often intimidates new users. However, once you get to know it, you gradually start liking it. Well, that happens with most Linux users. + +Even if you are using Ubuntu as a desktop system, you may have to enter the terminal at times. New users are often clueless about many things. Some knowledge of basic Linux commands always helps in such cases but this article is not about that. + +This article focuses on explaining small, basic and often ignored things about using the terminal. This should help new Ubuntu desktop users to know the terminal and use it with slightly more efficiency. + +![][1] + +The terminal you see is just one of the [various terminal applications][2] available. After all terminal is just a GUI tool that gives you access to a shell where you can run the commands. + +Different terminal applications (properly called terminal emulators) look different, have slightly different functions and features (like different keyboard shortcuts, color combination, fonts etc). + +This article is specifically focused on the default Ubuntu terminal which is an implementation of the GNOME terminal. + +### 1\. Open the terminal with keyboard shortcut + +You can [open the terminal in Ubuntu][3] by looking for it in the system menu. However, my favorite way is to use the Ctrl+Alt+T [keyboard shortcut in Ubuntu][4]. + +``` + + Ctrl+Alt+T + +``` + +### 2\. Terminal vs shell vs prompt vs command line + +Before you see anything else, you should know the difference between different terminologies that are often (incorrectly) used interchangeably. + +![Terminal, prompt and command][5] + +Terminal is the graphical application that runs a shell by default. + +Shell is difficult to visualize separately from the terminal. The terminal is running a shell, usually Bash shell by default in Ubuntu. Like terminals, there are various shells as well. Bash is the most popular of them all and default shell on most Linux distributions. + +The commands you type is interpreted by the shell. Often people think that screen they see in the terminal is the shell. That’s fine for understanding. + +Prompt is what you see before the space where you type the commands. There is no set standard for the prompt. In some old terminals, you would just have a blinking cursor to the place where you can type the commands. In Ubuntu terminal, prompt gives you some information which you’ll see in detail in the later sections of this article. + +Command line is not something specific to Linux. Every operating system has a command line interface. Many programming languages have command line interface. It’s a term used for the interface where you can run and execute commands. + +There is this video by Luke Smith that explains it in detail with examples. I won’t go in details here anymore to keep things on the track. + +[Subscribe to It’s FOSS YouTube channel for interesting Linux videos][6] + +### 3\. Understanding the prompt + +You know it by now. What you see before the space where you type the command is called prompt. It is configurable and looks different in different distributions, terminal applications and shells. + +Ubuntu terminal has configured the prompt to show you a few things. You can get the following information at a glance: + + * User name + * Hostname (name of the computer) + * Current working directory + + + +A few more things you may wonder about. + +The colon (:) in the prompt is a separator to distinguish between hostname and the current location. + +Tilde (~) means the home directory of the present user. + +For normal users, the prompt ends with dollar ($) symbol. For the root user, it ends with pound or hash (#) symbol. And hence the joke that pound is stronger than dollar. + +![][7] + +Did you notice that when I switched to the root user, the command prompt looked different without any colors? This is another reminder that prompt is not a standard and is configured explicitly. For normal users, Ubuntu has a different configuration of the prompt than the root. + +Simple information like this helps indirectly. In a multi-user environment, you can easily figure out which user you are using right now and if it is a root user. The displayed location is also helpful. + +![][8] + +### 4\. Directory and files + +Two terms you hear the most in Linux are directory and files. + +You probably know what a file is but you may get confused with the term ‘directory’. Directory is nothing but folder. It keeps files and folders inside it. + +You can go inside the directories but you cannot enter files. You can read files of course. + +![][9] + +You can use the term ‘folder’ for directory and it should be fine. However, it is better to use ‘directory’ because this is what you’ll see referenced in various tutorials, documents etc. You’ll even find commands like rmdir, mkdir hinting that they deal with directories. + +Additional note: Everything is a file in Linux. Even directory is a special kind of file that has the memory address of files and directories inside it. I have explained it in my [article on hard links][10]. You may refer to that if you want to know more on this topic. + +### 5\. Path: Absolute and relative + +The [directory structure in Linux resembles][11] the root of a tree. Everything starts at root and spreads out from there. + +If you have to access a file or directory, you need to tell how to reach its location by providing its ‘path’. This path that is composed of directory names and separators (/). If a path starts with / (i.e., root), it is an absolute path otherwise it is a relative path. + +![Path][12] + +The absolute path starts from the root and can be easily referenced from anywhere in the system. The relative path depends upon your current location in the directory structure. + +![absolute vs relative path][13] + +If you are in the location /home/abhishek which has a directory named scripts containing a file my_script.sh and you want the path for this file, its absolute path will be: + +``` + + /home/abhishek/scripts/my_script.sh + +``` + +Its relative path will be: + +``` + + scripts/my_script.sh + +``` + +If you change the location, the absolute path of the file remains the same. However, the relative path changes because it is relative to your current path. + +![Real examples of how relative path changes with location but absolute path remains the same][14] + +### 6\. . and .. + +You may often come across . and .. notation while using the Linux terminal. + +Single dot (.) means the current directory. + +Double dots (..) mean the parent directory (one directory above the current location). + +You’ll often use the double dot (..) in relative path or for changing directory. Single dot (.) is also used in relative path but more importantly, you can use it in the commands for specifying the current locations. + +![Use of . and ..][15] + +### 7\. Understand the command structure + +A typical Linux command consists of a command name followed by options and arguments. + +``` + + command [options] argument + +``` + +Option, as the name suggests, are optional. When used, they might change the output based on their properties. + +For example, the cat command is used for viewing files. You can add the option -n and it will display line numbers as well. + +Options are not standardized. Usually, they are used as single letter with single dash (-). They may also have two dashes (–) and a word. + +Same options may have different meaning in a different command. If you use -n with head command, you specify the number of lines you want to see, not the lines with numbers. + +![Same option -n has different use in cat and head commands][16] + +In command documentations, _**if you see something between brackets ([]), it indicates that the contents of the bracket are optional.**_ + +Similarly, arguments are also not standardized. Some commands expect filenames as argument and some may expect directory name or a regular expression. + +### 8\. Getting help + +As you start using commands, you may remember some of the options of frequently used commands but it is simply not possible for you to remember all the options of any command. + +Why? Because a single command may have more than ten or twenty options. + +So, what do you do when you cannot recall all the options? You take help. And with help, I do not mean asking a question in It’s FOSS [Linux forum][17]. I ask to use the help option of the command. + +Every standard Linux command has a quick help page that can be accessed with -h or –help or both. + +``` + + command_name -h + +``` + +It gives you a quick glimpse of the command syntax, common options with their meaning and in some cases, command examples. + +![The help page of the cat command][18] + +If you need more help, you can refer to the [manpage][19] i.e. manual of a command: + +``` + + man command_name + +``` + +It goes in all of details and could be overwhelming to read and understand. Alternatively, you can always search on the internet for ‘examples of xyz commands in Linux’. + +### 9\. Linux is case-sensitive + +Linux is case-sensitive. Everything you type in the terminal is case-sensitive. If you do not take that into account, you’ll often run into [bash: command not found][20] or file not found errors. + +In the home directory, you have all the folders name starting with the upper case. If you have to switch to the Documents directory, you have to keep the first letter as D and not d. Otherwise, the terminal will complain. + +![Linux is case sensitive][21] + +You can have two separate files named file.txt and File.txt because for Linux, file and File are not the same. + +### 10\. Running shell scripts + +You can [run a shell script][22] by specifying the shell: + +``` + + bash script.sh + +``` + +Or you can execute the shell script like this: + +``` + + ./script.sh + +``` + +The second one will only work when the file has execute permission. More on [Linux file permission here][23]. + +![Running bash script][24] + +### 11\. Use tab completion instead of typing it all + +The Ubuntu terminal is pre-configured with tab completion. This means that if you start writing something in the terminal and then hit tab, it tries to automatically complete it or provide options if there are more than one possible matches. + +It works for both commands as well arguments and filenames. + +![Tab completion example][25] + +This saves a great ton of time because you don’t have to write everything completely. + +### 12\. Ctrl+C and Ctrl+V is not for copy pasting in terminal + +Ctrl+C, Ctrl+V might be the ‘universal’ keyboard shortcuts for copy paste but it doesn’t work in the Linux terminal. + +Linux inherits a lot of stuff from UNIX and in UNIX, Ctrl+C was used for stopping a running process. + +Since the Ctrl+C was already taken for stopping a command or process, it cannot be used for copy-paste anymore. + +### 13\. You can surely copy paste in the terminal + +Don’t worry. You can still [copy paste in the terminal][26]. Again, there is no fixed rule for the copy-paste keyboard shortcuts because it depends on the terminal application you are using or the configuration you have in place. + +In Ubuntu terminal, the default keyboard shortcut for copy is Ctrl+Shift+C and for paste, it is Ctrl+Shift+V. + +You can use Ctrl+C to copy text and commands from outside the terminal (like a web browser) and paste it using Ctrl+Shift+V. Similarly, you can highlight the text and use Ctrl+Shift+C to copy the text from the terminal and paste it to an editor or other applications using Ctrl+V. + +### 14\. Avoid using Ctrl+S in the terminal + +Another common mistake beginners do is to use the ‘universal’ Ctrl+S keyboard shortcut for save. If you use Ctrl+S in the terminal, your terminal ‘freezes’. + +This is coming from the legacy computing where there was no scope of scrolling back up. Hence, if there were lots of output lines, Ctrl+S was used for stopping the screen so that text on the screen could be read. + +You can unfreeze your terminal with Ctrl+Q. But again, avoid using Ctrl+S in the terminal. + +### 15\. Pay attention to $ and <> in command examples + +If you are referring to some online tutorial or documentation, you’ll see some command examples with text inside <>. This indicates that you need to replace the content along with < and > with a suitable value. + +For example, if you see a command like this: + +``` + + grep -i + +``` + +You should replace the <search_term> and <file_name> with the respective actual values. + +It is and indication that the command is just an example and you have to complete it with actual values. + +Another thing to note here is that some tutorials show command examples that start with $ like this: + +![dollar symbol at the beginning of command][27] + +This is a way for them to indicate that it is command (not command output). But many new Linux users copy the preceding $ along with the actual command and when they paste it in the terminal, it throws error obviously. + +So, when you are copying some command, don’t copy the $ if it is there at the beginning. You should also avoid copying random commands for random websites specially when you do not understand what it does. + +Since you are reading about copying commands, when you see commands in multiple lines together, you should copy one line at a time and run them on by one: + +![Avoid copying multiple commands together][28] + +The next section tells you how to run multiple commands in one go. + +### 16\. You can run multiple commands at once + +You can [run multiple commands at once][29] without user intervention. You might have seen it already as an Ubuntu user in the form of this command: + +``` + + sudo apt update && sudo apt upgrade + +``` + +There are three different ways to combine commands in the terminal: + +; | Command 1 ; Command 2 | Run command 1 first and then command 2 +---|---|--- +&& | Command 1 && Command 2 | Run command 2 only if command 1 ends sucessfully +| | + +### 17\. Stop a running Linux command + +If a Linux command is running in the foreground, i.e., it is showing output or you cannot enter any other command, you can stop it using the Ctrl+C keys. + +I discussed it previously. It comes from the legacy computing days of UNIX. + +So, the next time you see a command like top or ping running continuously and you want the terminal control back, just use these two keys: + +``` + + Ctrl+C + +``` + +![Stop a running program in Linux with Ctrl+C][30] + +### 18\. Clear the terminal + +When I find that my screen is too cluttered with different kind of output, I clear the terminal screen before starting some other work. It just a habit but I find it helpful. + +To clear the terminal, use the command + +``` + + clear + +``` + +You may also use Ctrl+L [terminal shortcut][31]. + +### 19\. Exiting the terminal + +In a few cases, I have seen people closing the terminal application to exit the session. You could do that but the proper way to exit a terminal is to use the exit command: + +``` + + exit + +``` + +You may also use the keyboard shortcut Ctrl+D for Ubuntu terminal. + +### Conclusion + +There are so many additional stuff you can do in the terminal even if you are new to the entire terminal thing. You can: + + * [Run funny Linux commands][32] + * [Browse the internet in terminal][33] + * [Play games in terminal][34] + + + +And if you are looking for more, [take a look at][35] [these Linux command tips and use the terminal like a pro][35]. + +Honestly speaking, there is way too much to talk about. It is difficult to determine what should be considered as absolute basics and what should be left out. For example, I wanted to avoid including the information about paths because it needs detailed explanation but going too much in detail on a single could be overwhelming. + +I have passed the stage where small things used to baffle me in the terminal. If you are new to the Linux terminal or if you remember the struggle from your initial Linux days, feel free to suggest any additions to the list. I might update the list with your input. + +And if you learned something new, please do mention it in the comments. I would like to see if this article was worth the effort :) + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/basic-terminal-tips-ubuntu/ + +作者:[Abhishek Prakash][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/ubuntu-terminal-basic-tips.png?resize=800%2C450&ssl=1 +[2]: https://itsfoss.com/linux-terminal-emulators/ +[3]: https://itsfoss.com/open-terminal-ubuntu/ +[4]: https://itsfoss.com/ubuntu-shortcuts/ +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/linux-terminal-introduction.png?resize=800%2C450&ssl=1 +[6]: https://www.youtube.com/c/itsfoss?sub_confirmation=1 +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/understanding-prompt-ubuntu-terminal.png?resize=800%2C346&ssl=1 +[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/learning-prompt-ubuntu-terminal.png?resize=800%2C346&ssl=1 +[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/directory-files-linux.png?resize=800%2C346&ssl=1 +[10]: https://linuxhandbook.com/hard-link/ +[11]: https://linuxhandbook.com/linux-directory-structure/ +[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/path-linux.webp?resize=800%2C250&ssl=1 +[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/absolute-vs-relative-path-linux.webp?resize=800%2C500&ssl=1 +[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/absolute-relative-path-real-examples-800x346.png?resize=800%2C346&ssl=1 +[15]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/use-of-single-and-double-dot-in-Linux.png?resize=732%2C272&ssl=1 +[16]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/command-structure-example.png?resize=732%2C462&ssl=1 +[17]: https://itsfoss.community/ +[18]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/cat-command-help-page.png?resize=732%2C614&ssl=1 +[19]: https://itsfoss.com/linux-man-page-guide/ +[20]: https://itsfoss.com/bash-command-not-found/ +[21]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/linux-is-case-sensitive.png?resize=732%2C253&ssl=1 +[22]: https://itsfoss.com/run-shell-script-linux/ +[23]: https://linuxhandbook.com/linux-file-permissions/ +[24]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/run-bash-script.png?resize=732%2C272&ssl=1 +[25]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/tab-completion-ubuntu.png?resize=732%2C272&ssl=1 +[26]: https://itsfoss.com/copy-paste-linux-terminal/ +[27]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/dollar-symbol-at-the-beginning-of-command.png?resize=765%2C256&ssl=1 +[28]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/avoid-copying-multiple-commands.png?resize=743%2C242&ssl=1 +[29]: https://itsfoss.com/run-multiple-commands-linux/ +[30]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/stop-running-program-linux.png?resize=800%2C385&ssl=1 +[31]: https://linuxhandbook.com/linux-shortcuts/ +[32]: https://itsfoss.com/funny-linux-commands/ +[33]: https://itsfoss.com/terminal-web-browsers/ +[34]: https://itsfoss.com/best-command-line-games-linux/ +[35]: https://itsfoss.com/linux-command-tricks/ From 73ea072a9343cb74944d5871e158d6d1b55140ff Mon Sep 17 00:00:00 2001 From: DarkSun Date: Mon, 6 Dec 2021 05:04:47 +0800 Subject: [PATCH 098/244] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211205=20?= =?UTF-8?q?Open=20source=20mind=20mapping=20with=20Draw.io?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211205 Open source mind mapping with Draw.io.md --- ...5 Open source mind mapping with Draw.io.md | 110 ++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 sources/tech/20211205 Open source mind mapping with Draw.io.md diff --git a/sources/tech/20211205 Open source mind mapping with Draw.io.md b/sources/tech/20211205 Open source mind mapping with Draw.io.md new file mode 100644 index 0000000000..ef76916e4c --- /dev/null +++ b/sources/tech/20211205 Open source mind mapping with Draw.io.md @@ -0,0 +1,110 @@ +[#]: subject: "Open source mind mapping with Draw.io" +[#]: via: "https://opensource.com/article/21/12/open-source-mind-mapping-drawio" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Open source mind mapping with Draw.io +====== +Next time you need to brainstorm, organize ideas, or plan a project, +start with Draw.io. +![Looking at a map for career journey][1] + +There's something special about maps. I remember opening the front book cover of JRR Tolkien's _The Hobbit_ when I was younger, staring at the hand-drawn map of Middle Earth, and feeling the wealth of possibility contained in the simple drawing. Aside from their obvious purpose of actually describing where things are in relation to other things, I think maps do a great job of expressing potential. You could step outside and take the road this way or that way, and if you do, just think of all the new and exciting things you'll be able to see. + +Maps don't have to be literal to be valuable and full of possibility, though. Some maps describe a thought process, plan, algorithm, or even random ideas desperately trying to fit together in a potential work of art. Call them "mind maps" or "flowcharts" or "idea boards." They're easy to make with the open source [Draw.io][2] application. + +### Install Draw.io + +Draw.io is designed as an open source online app, so you can either use it as an online application, download the [desktop version][3], or [clone the Git repository][4] and host it on your own server. + +### Mapping with Draw.io + +When you first start Draw.io, you need to choose where you want to save your data. If you're hosting Draw.io yourself, your choices depend on which API keys you have access to. You can choose from several online storage services for the online public instance, depending on what you've got an account for. If you don't want to store your data on somebody else's server, you can also choose to save your work on a local drive. If you're unsure yet, you can click **Decide later** to continue into the app without choosing anything. + +The Draw.io interface has a big workspace in the center, the main toolbar on the left, a toolbar along the top, and a properties panel on the right. + +![Draw.io interface][5] + +(Seth Kenlon, [CC BY-SA 4.0][6]) + +The workflow is simple:  + + 1. Select a shape from the left toolbar. + 2. Edit the shape in the workspace. + 3. Add another shape, and connect them. + + + +Repeat that process, and you've got a map. + +![Draw.io example][7] + +(Seth Kenlon, [CC BY-SA 4.0][6]) + +### Project planning + +When you first take on a big task, you often have a pretty clear idea of your desired outcome. Say you want to start a community project to paint a mural. Your desired outcome is a mural. It's pretty easy to define, and you can more or less picture the results in your mind's eye. + +Once you start moving toward your goal, however, you have to start figuring out the details. Where should the mural be painted? How do you get permission to paint on a public wall, anyway? What about paint? Is there a special kind of paint you ought to use? Will you apply the paint with brushes or airbrushes? What kind of specialized equipment do you need for painting? How many people and hours will it take to paint a mural? What about support services for the painters while they work? And what's the painting going to be about, anyway? A single idea can very quickly become overwhelming the closer you get to making it happen. + +This doesn't just apply to painting murals, producing a play, or making a movie. It applies to nearly any non-trivial endeavor. And it's exactly what an application like Draw.io can help map out. + +Here's how you can use Draw.io to create a project flowchart: + + 1. Start with a brainstorming session. No thoughts are too trivial or big. Make a box for every idea, and double-click the box in the Draw.io workspace to enter text. + 2. Once you have all the ideas you can possibly think of on your workspace, drag and drop them into related groups. The goal is to create little clouds, or clusters, of tasks that more or less go together because they're part of the same process. + 3. Once you've identified the clusters of related tasks, give those tasks a name. For instance, if you're painting a mural, then the tasks might be _approval_, _design_, _purchase_, _paint_, reflecting that you need to get permission from your local government first, then design the mural, then purchase the supplies, and finally paint the mural. Each task has component parts, but broadly you've now determined the workflow for your project. + 4. Connect the major tasks with arrows. Not all processes are entirely linear. For instance, after you've obtained permission from your city council, you might have to come back to them for final approval once you've designed what you intend to paint. That's normal. It's a loop, there's some back and forth, but eventually, you break out of the loop to proceed to the next stage. + 5. Armed with your flowchart, work through each task until you've reached your ultimate goal. + + + +### Mind mapping  + +Mind maps tend to be less about progress and more about maintaining a certain state or putting many ideas into perspective. For instance, suppose you've decided to reduce the amount of waste in your life. You have some ideas about what you can do, but you want to organize and preserve your ideas, so you don't forget them. + +Here's how you can use Draw.io to create a mind map: + + 1. Start with a brainstorming session. No thoughts are too trivial or big. Make a box for every idea, and double-click the box in the Draw.io workspace to enter text. You can also give boxes a background color by selecting the box and clicking a color swatch in the right properties panel. + 2. Arrange your ideas into groups or categories. + 3. Optionally, connect ideas with arrows that relate directly to one another. + + + +![Draw.io waste reduction example][8] + +(Seth Kenlon, [CC BY-SA 4.0][6]) + +### Saving your diagram + +You can save your diagram as a PNG, JPG image, Draw.io XML, or plain XML file. If you save it as XML, you can open it again in Draw.io for further editing. An exported image is great for sharing with others. + +### Use Draw.io + +There are many great diagramming applications, but I don't make diagrams often, so having Draw.io available is convenient at a moment's notice. Its interface is simple and easy to use, and the results are clean and professional. Next time you need to brainstorm, organize ideas, or plan a project, start with Draw.io. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/open-source-mind-mapping-drawio + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/career_journey_road_gps_path_map_520.png?itok=PpL6jJgY (Looking at a map for career journey) +[2]: http://draw.io +[3]: https://github.com/jgraph/drawio-desktop +[4]: https://github.com/jgraph/drawio +[5]: https://opensource.com/sites/default/files/uploads/draw-io-ui.png (Draw.io interface) +[6]: https://creativecommons.org/licenses/by-sa/4.0/ +[7]: https://opensource.com/sites/default/files/uploads/draw-io-example.jpg (Draw.io example) +[8]: https://opensource.com/sites/default/files/uploads/draw-io-export.jpg (Draw.io waste reduction example) From bc388bc19dbb86b726521afa59d5179ad82981b5 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 6 Dec 2021 08:44:47 +0800 Subject: [PATCH 099/244] translated --- ...sk Manager - Resource Monitor for Linux.md | 105 ------------------ ...sk Manager - Resource Monitor for Linux.md | 105 ++++++++++++++++++ 2 files changed, 105 insertions(+), 105 deletions(-) delete mode 100644 sources/tech/20211130 System Monitoring Center is an Ideal Task Manager - Resource Monitor for Linux.md create mode 100644 translated/tech/20211130 System Monitoring Center is an Ideal Task Manager - Resource Monitor for Linux.md diff --git a/sources/tech/20211130 System Monitoring Center is an Ideal Task Manager - Resource Monitor for Linux.md b/sources/tech/20211130 System Monitoring Center is an Ideal Task Manager - Resource Monitor for Linux.md deleted file mode 100644 index d787d8baa6..0000000000 --- a/sources/tech/20211130 System Monitoring Center is an Ideal Task Manager - Resource Monitor for Linux.md +++ /dev/null @@ -1,105 +0,0 @@ -[#]: subject: "System Monitoring Center is an Ideal Task Manager & Resource Monitor for Linux" -[#]: via: "https://itsfoss.com/system-monitoring-center/" -[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" -[#]: collector: "lujun9972" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -System Monitoring Center is an Ideal Task Manager & Resource Monitor for Linux -====== - -_**Brief:** System Monitoring Center is an all-in-one open-source app to monitor essential system resource stats eliminating the need for multiple tools._ - -Graphically monitoring the system resources may not be the best experience on Linux. The system monitoring tool that comes baked in with your desktop environment might limit the details. - -For instance, GNOME’s system monitor does not display the CPU frequency and temperatures. - -In addition, the default system monitor applications available for Linux usually aim for simplicity instead of providing detailed insights. - -System Monitoring Center is a useful GUI tool that provides plenty of necessary insights. In this article, let me give you a closer look at it. - -### System Monitoring Center: Linux App to Display Essential System Stats - -![][1] - -System Monitoring Center is a GTK3 and Python 3 based sleek-looking app that gives you all the resource usage data that you would want. - -In my case, I wanted to keep an eye on the CPU frequency when using a system monitoring tool, but GNOME’s system monitoring tool didn’t help. So, this came in pretty handy. - -![][2] - -The application provides a good user experience and offers plenty of insights and features. Let me highlight the key features that you can expect with it. - -The application is still in the beta phase when writing this. So, you can expect to encounter bugs. However, I did not notice any issues in my brief testing. - -### Features of System Monitoring Center - -![][3] - -To start with, it lets you view separate stats for your CPU, RAM, Disk, Network, GPU, and sensors. - -You can expect the following details with the tool: - - * Displays CPU status including the frequency - * Ability to display average usage or usage per core - * Select the precision points for CPU frequency and other stats - * Ability to change the graph color - * Filter system processes by user and easily manage them - * Toggle a floating summary widget to quickly get insights - * Shows disk usage info and connected drives - * Detailed system info in the same app - * Control startup services and programs - * Ability to control the state update interval - * Low system resource usage for the app itself - * Adapts to system theme - - - -While it offers a ton of options and customizations per tab (or component), I wish that it would include the RAM frequency, among other things, in a future update. - -![][4] - -However, the rest of the data seem incredibly helpful, considering it could replace the use of a disk usage analyzer and a terminal tool like neofetch at the same time. - -![][5] - -Do note that you may not get the data for fans if you have multiple case fans, a separate exhaust fan, or an AIO. The temperatures can be a hit or miss, but the CPU temperature should be visible. - -### Install System Monitoring Center in Linux - -You can easily install it on any Ubuntu-based distros using the deb package available. - -Unfortunately, there are no available packages except a ZIP file that you will have to manually build and compile to get it installed. You should find a script to build the RPM package within the ZIP file. - -The deb file is available through SourceForge; you should click the button below to download it or choose to explore their [GitLab instance page][6]. - -[Download System Monitoring Center][7] - -### Wrapping Up - -System Monitoring Center is an open-source app that lets users get detailed insights about their system resources and help manage processes. - -This is a much-needed app that provides detailed insights without dabbling through separate terminal/GUI programs for many Linux users. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/system-monitoring-center/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/system-monitoring-center.png?resize=800%2C611&ssl=1 -[2]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/system-monitoring-center-full-info.png?resize=800%2C585&ssl=1 -[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/system-monitoring-center-options.png?resize=582%2C576&ssl=1 -[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/system-cpu-monitoring.png?resize=800%2C599&ssl=1 -[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/system-monitoring-center-process.png?resize=800%2C592&ssl=1 -[6]: https://kod.pardus.org.tr/Hakan/system-monitoring-center -[7]: https://sourceforge.net/projects/system-monitoring-center/files/latest/download diff --git a/translated/tech/20211130 System Monitoring Center is an Ideal Task Manager - Resource Monitor for Linux.md b/translated/tech/20211130 System Monitoring Center is an Ideal Task Manager - Resource Monitor for Linux.md new file mode 100644 index 0000000000..03da58bba3 --- /dev/null +++ b/translated/tech/20211130 System Monitoring Center is an Ideal Task Manager - Resource Monitor for Linux.md @@ -0,0 +1,105 @@ +[#]: subject: "System Monitoring Center is an Ideal Task Manager & Resource Monitor for Linux" +[#]: via: "https://itsfoss.com/system-monitoring-center/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +System Monitoring Center 是一个理想的 Linux 任务管理器和资源监视器 +====== + +_**简介:**System Monitoring Center 是一个多合一的开源应用,用于监控基本的系统资源统计,消除了对多种工具的需求。_ + +在 Linux 上以图形方式监控系统资源可能不是最好的体验。与你的桌面环境配套的系统监控工具可能会限制细节。 + +例如,GNOME 的系统监视器不显示 CPU 频率和温度。 + +此外,Linux 的默认系统监控程序通常以简单为目标,而不是提供详细的信息。 + +System Monitoring Center 是一个有用的 GUI 工具,它提供了大量必要的信息。在这篇文章中,让我给你详细介绍一下它。 + +### System Monitoring Center:显示基本系统统计信息的 Linux 应用 + +![][1] + +System Monitoring Center 是一个基于 GTK3 和 Python 3 的外观时尚的应用,它为你提供你想要的所有资源使用数据。 + +在我的例子中,我想在使用系统监控工具时关注 CPU 的频率,但 GNOME 的系统监控工具没有帮助。所以,这个东西就非常有用了。 + +![][2] + +该应用提供了良好的用户体验,并提供了大量的信息和功能。让我强调一下你可以期待它的主要功能。 + +写这篇文章时,该应用程序仍处于测试阶段。因此,你可以预期会遇到一些错误。然而,我在简短的测试中没有注意到任何问题。 + +### 系统监控中心的功能 + +![][3] + +首先,它可以让你查看 CPU、内存、磁盘、网络、GPU 和传感器的单独统计数据。 + +你可以期待该工具的以下细节: + + * 显示 CPU 状态,包括频率 + * 能够显示平均使用率或每个核心的使用率 + * 选择 CPU 频率和其他统计的精度点 + * 能够改变图表的颜色 + * 按用户过滤系统进程并轻松管理它们 + * 切换一个浮动的摘要小部件,以快速获得信息 + * 显示磁盘使用信息和连接的驱动器 + * 在同一个应用中显示详细的系统信息 + * 控制启动服务和程序 + * 能够控制状态更新的时间间隔 + * 应用本身的系统资源使用率低 + * 适应系统主题 + + + +虽然它为每个标签(或组件)提供了大量的选项和自定义功能,但我希望它能在未来的更新中包括 RAM 频率等东西。 + +![][4] + +然而,其余的数据似乎非常有用,考虑到它可以同时取代磁盘使用分析器和 neofetch 等终端工具的使用。 + +![][5] + +请注意,如果你有多个机箱风扇、一个独立的排风扇或 AIO,你可能无法得到风扇的数据。温度可能会有偏差,但 CPU 的温度应该是可见的。 + +### 在 Linux 中安装 System Monitoring Center + +你可以使用可用的 deb 包在任何基于 Ubuntu 的发行版上轻松安装它。 + +不幸的是,除了一个 ZIP 文件,没有可用的软件包,你必须手动构建和编译才能安装它。你应该在 ZIP 文件中找到一个脚本来构建 RPM 包。 + +deb 文件可以通过 SourceForge 获得。你应该点击下面的按钮来下载它,或者选择探索他们的 [GitLab 页面][6]。 + +[Download System Monitoring Center][7] + +### 总结 + +System Monitoring Center 是一个开源应用,可以让用户详细了解他们的系统资源,并帮助管理进程。 + +对于许多 Linux 用户来说,这是一个非常需要的应用,它可以提供详细的信息,而不需要使用单独的终端/GUI 程序。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/system-monitoring-center/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/system-monitoring-center.png?resize=800%2C611&ssl=1 +[2]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/system-monitoring-center-full-info.png?resize=800%2C585&ssl=1 +[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/system-monitoring-center-options.png?resize=582%2C576&ssl=1 +[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/system-cpu-monitoring.png?resize=800%2C599&ssl=1 +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/system-monitoring-center-process.png?resize=800%2C592&ssl=1 +[6]: https://kod.pardus.org.tr/Hakan/system-monitoring-center +[7]: https://sourceforge.net/projects/system-monitoring-center/files/latest/download From e11fea99195f04e433ff6f5a4785a8fa38876e86 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 6 Dec 2021 08:49:17 +0800 Subject: [PATCH 100/244] translating --- ...204 Convert audio in batches on Linux with SoundConverter.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20211204 Convert audio in batches on Linux with SoundConverter.md b/sources/tech/20211204 Convert audio in batches on Linux with SoundConverter.md index 30889ae112..924cceb55b 100644 --- a/sources/tech/20211204 Convert audio in batches on Linux with SoundConverter.md +++ b/sources/tech/20211204 Convert audio in batches on Linux with SoundConverter.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/21/12/soundconverter-linux" [#]: author: "Seth Kenlon https://opensource.com/users/seth" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 01ce935d14d50191b84af49235d31a52f8d280d4 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 6 Dec 2021 10:34:58 +0800 Subject: [PATCH 101/244] PRF&PUB MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @imgradeone https://linux.cn/article-14053-1.html 翻译的很棒很用心! --- ...nux Distros and DEs Become ‘Linus-Proof.md | 97 +++++++++++++++++++ ...nux Distros and DEs Become ‘Linus-Proof.md | 95 ------------------ 2 files changed, 97 insertions(+), 95 deletions(-) create mode 100644 published/20211129 It-s Time More Linux Distros and DEs Become ‘Linus-Proof.md delete mode 100644 translated/talk/20211129 It-s Time More Linux Distros and DEs Become ‘Linus-Proof.md diff --git a/published/20211129 It-s Time More Linux Distros and DEs Become ‘Linus-Proof.md b/published/20211129 It-s Time More Linux Distros and DEs Become ‘Linus-Proof.md new file mode 100644 index 0000000000..f3f4a236d4 --- /dev/null +++ b/published/20211129 It-s Time More Linux Distros and DEs Become ‘Linus-Proof.md @@ -0,0 +1,97 @@ +[#]: subject: "It’s Time More Linux Distros and DEs Become ‘Linus-Proof’" +[#]: via: "https://news.itsfoss.com/more-linux-distros-become-linus-proof/" +[#]: author: "Abhishek https://news.itsfoss.com/author/root/" +[#]: collector: "lujun9972" +[#]: translator: "imgradeone" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14053-1.html" + +是时候让更多 Linux 发行版和桌面环境接受“老莱暴捶”了 +====== + +![](https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/11/linus-pop-os-lessons.png?w=1200&ssl=1) + +> “老莱” 体验 Pop!_OS 的视频狠狠地给桌面 Linux 社区上了一课。 + +过去的几周,整个 Linux 桌面社区沸腾了。 + +知名 YouTube 创作者 Linus(LCTT 译注:不是 Linux 之父 Torvalds,是 Linus Tech Tips 的 Sebastian,“老莱”是国内网友对 Linus Sebastian 的称呼。)决定在一个月内挑战日常使用 Linux 桌面。“老莱” 想了解 Linux 是否已经达到了对用户友好的程度,乃至于“技术呆”级别的用户都能轻松上手。他的专注点同样也放在了 [Linux 游戏][1] 上,毕竟电脑游戏确实也是 “老莱” 关注的一个领域。 + +这是一个有趣的概念,Linux 社区的许多人也十分兴奋,毕竟它向更广泛的技术受众群体免费宣传了桌面 Linux 平台。 + +唯一美中不足的是,这个日用 Linux 挑战 [从一开始就出了大乱子][2]。(LCTT 译注:[B 站][11] 中也有相应的中文字幕视频。) + +### “老莱”的 Pop!_OS 名(或者说是“冥”)场面 + +(LCTT 译注:原文标题使用的是 (in)famous,同时指代“著名”和“臭名昭著”,此处的“冥场面”偏向事件悲剧性。) + +“老莱” 决定 [安装 Pop!_OS][3],因为 Pop!\_OS 经常在社区中作为适合游戏的主流发行版出现。接下来,他尝试在软件中心(即 Pop!\_Shop)安装 Steam,但软件中心未能成功安装 Steam。 + +![Sebastian 安装 Steam 时遇到了问题][4] + +既然没能通过图形化方式安装,他接下来做了其他所有 Linux 用户都会做的事情。他打开了终端,运行了神奇的 `sudo apt-get install` 命令。 + +![Sebastian 换用命令行方式安装 Steam][5] + +无论是图形化方式还是终端方式,Pop!_OS 都显示了一条警告,提示用户正濒临卸载关键软件包的危险。 + +命令行方式清晰明了地警告:“_**您的操作有潜在的危害性。若要继续,请输入下面的短句“是,按我说的做!(Yes, do as I say!)”**_。” + +![忽略移除关键软件包的警告][6] + +对于大部分 Linux 用户来说,到这一步就真的得停下来,深思熟虑了。输出的内容明确显示,接下来即将删除 `gdm3`、`pop-desktop` 和其他许多桌面环境要素。 + +但人们一般不会在意警告。于是 “老莱” 直接继续安装,最终就剩下了一个不能登录图形界面的损坏系统。 + +![意识到他的 Pop!_OS 彻底出乱子后的 Linus Sebastian(不是 Torvalds)][7] + +### 给桌面 Linux 开发者的深刻教训 + +对于开发者来说,这里有两点教训值得注意: + + * 安装 Steam 或任何其他常规软件时,不能导致关键的图形界面软件包被删除。 + * 在一款常规的、主流的发行版中,用户不应该能删除关键软件包。 + +Pop!_OS 迅速修复了 Steam 的问题,并增加了防御机制以阻止删除关键的桌面要素。 + +> 出于某些原因,i386 版的软件包不能在 Launchpad 上发布。Steam 是一个 i386 软件包,在尝试安装 Steam 时不得不将该软件包降级到 Ubuntu 版本以解决依赖问题,然后就删除了 Pop!_OS 的软件包。 +> +> — Jeremy Soller (@jeremy_soller) [2021 年 10 月 26 日][8] + +为避免此类事故,Pop!\_OS 为 APT 包管理器制作了补丁。现在,用户无法在 Pop!\_OS 通过输入“**是,按我说的做!(Yes, do as I say!)**”来删除关键软件包了。相反,用户将需要添加一个特殊文件来启用该功能(如果某个人真的想把这些关键软件包删掉的话)。(LCTT 译注:APT 2.3.12 上游已经彻底禁用卸载关键软件包的功能。) + +对于 Pop!\_OS 来说,这确实是一个好举措。但,这并不仅仅是 Pop!\_OS 单方面的教训。大多数 Linux 发行版都可能会遇到这种情况,并最终删除掉桌面环境和显示服务器。 + +KDE 已经注意到了这一点,并在即将发布的 Plasma 5.24 中 [添加了禁止卸载 Plasma 桌面的功能][9]。 + +![KDE Plasma 不允许用户卸载 Plasma 桌面][10] + +许多人责怪 “老莱” 不顾清晰明确的警告,直接继续并走向灾难。但问题在于,许多用户真的不会在意 “警告” 这种东西,不管他们技术水平如何。人们只是觉得按 “Y” 或者其他东西就是程序正常的部分,也不会去多想。一些 Linux 用户之前已经踩过这种坑了,但未来可能还会有更多人重蹈覆辙。 + +这就是为什么添加故障保护措施才是明智之举。这是所有主流发行版都应该做的事。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/more-linux-distros-become-linus-proof/ + +作者:[Abhishek][a] +选题:[lujun9972][b] +译者:[imgradeone](https://github.com/imgradeone) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/root/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/linux-gaming-guide/ +[2]: https://www.youtube.com/watch?v=0506yDSgU7M&t=788s +[3]: https://itsfoss.com/install-pop-os/ +[4]: https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/11/pop-os-failed-steam-install.webp?w=1233&ssl=1 +[5]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/11/pop-os-failed-steam-install-1.webp?w=1118&ssl=1 +[6]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/11/pop-os-failed-steam-install-2.webp?w=1087&ssl=1 +[7]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/11/linus-sebastian-nukes-pop-os-while-installing-steam-os.webp?w=1232&ssl=1 +[8]: https://twitter.com/jeremy_soller/status/1453008808314351628?ref_src=twsrc%5Etfw +[9]: https://linux.cn/article-14015-1.html +[10]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/11/cant-remove-plasma-1.png?w=1022&ssl=1 +[11]: https://www.bilibili.com/video/BV1Fh411b7q3?t=769 diff --git a/translated/talk/20211129 It-s Time More Linux Distros and DEs Become ‘Linus-Proof.md b/translated/talk/20211129 It-s Time More Linux Distros and DEs Become ‘Linus-Proof.md deleted file mode 100644 index b862210e0a..0000000000 --- a/translated/talk/20211129 It-s Time More Linux Distros and DEs Become ‘Linus-Proof.md +++ /dev/null @@ -1,95 +0,0 @@ -[#]: subject: "It’s Time More Linux Distros and DEs Become ‘Linus-Proof’" -[#]: via: "https://news.itsfoss.com/more-linux-distros-become-linus-proof/" -[#]: author: "Abhishek https://news.itsfoss.com/author/root/" -[#]: collector: "lujun9972" -[#]: translator: "imgradeone" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -是时候让更多 Linux 发行版和桌面环境接受“老莱暴捶”了 -====== - -> Linus Sebastian 体验 Pop!_OS 的视频狠狠地给桌面 Linux 社区上了一课。(LCTT 译注:“老莱”是国内网友对 Linus Sebastian 的称呼。) - -过去的几周,整个 Linux 桌面社区沸腾了。 - -知名 YouTube 创作者 Linus(不是 Linux 之父 Torvalds,是 Linus Tech Tips 的 Sebastian)决定在一个月内挑战日常使用 Linux 桌面。Linus Sebastian 想了解 Linux 是否已经达到了对用户友好的程度,乃至于“技术呆”级别的用户都能轻松上手。他的专注点同样也放在了 [Linux 游戏][1] 上,毕竟电脑游戏确实也是 Sebastian 关注的一个领域。 - -这是一个有趣的概念,Linux 社区的许多人也十分兴奋,毕竟它向更广泛的技术受众群体免费宣传桌面 Linux 平台。 - -唯一美中不足的是,这个日用 Linux 挑战 [从一开始就出了大乱子][2]。(LCTT 译注:[bilibili][11] 中也有相应的中文字幕视频。) - -### Linus Sebastian 的 Pop!_OS 名(或者说是“冥”)场面 - -(LCTT 译注:原文标题使用的是 (in)famous,同时指代“著名”和“臭名昭著”,此处的“冥场面”偏向事件悲剧性。) - -Linus Sebastian 决定 [安装 Pop!_OS][3],因为 Pop!\_OS 经常在社区中作为适合游戏的主流发行版出现。接下来,他尝试在软件中心(即 Pop!\_Shop)安装 Steam,但软件中心未能成功安装 Steam。 - -![Sebastian 安装 Steam 时遇到了问题][4] - -既然没能通过图形化方式安装,他接下来做了其他所有 Linux 用户都会做的事情。他打开了终端,运行了神奇的 `sudo apt-get install` 命令。 - -![Sebastian 换用命令行方式安装 Steam][5] - -无论是图形化方式还是终端方式,Pop!_OS 都显示了一条警告,提示用户正濒临卸载关键软件包的危险。 - -命令行方式清晰明了地警告:“_**您的操作有潜在的危害性。若要继续,请输入下面的短句“是,按我说的做!(Yes, do as I say!)”**_。” - -![忽略移除关键软件包的警告][6] - -对于大部分 Linux 用户来说,到这一步就真的得停下来,深思熟虑了。输出的内容明确显示,接下来即将删除 `gdm3`、`pop-desktop` 和其他许多桌面环境要素。 - -但人们一般不会在意警告。Linus Sebastian 直接继续安装,最终就剩下了一个不能登录图形界面的损坏系统。 - -![意识到他的 Pop!_OS 彻底出乱子后的 Linus Sebastian(不是 Torvalds)][7] - -### 给桌面 Linux 开发者的深刻教训 - -对于开发者来说,这里有两点教训值得注意: - - * 安装 Steam 或任何其他常规软件时,不能导致关键的图形界面软件包被删除。 - * 在一款常规的、主流的发行版中,用户不应该能删除关键软件包。 - -Pop!_OS 迅速修复了 Steam 的问题,并增加了防御机制以阻止删除关键的桌面要素。 - -> 出于某些原因,i386 版的软件包不能在 Launchpad 上发布。Steam 是一个 i386 软件包,在尝试安装 Steam 时不得不将软件包降级到 Ubuntu 版本以解决依赖问题,然后就删除了 Pop!_OS 的软件包。 -> -> — Jeremy Soller (@jeremy_soller) [2021 年 10 月 26 日][8] - -为避免此类事故,Pop!\_OS 为 APT 包管理器制作了补丁。现在,用户无法在 Pop!\_OS 通过输入“是,按我说的做!(Yes, do as I say!)”来删除关键软件包了。相反,用户将需要添加一个特殊文件来启用该功能(如果某个人真的想把这些关键软件包删掉的话)。(LCTT 译注:APT 2.3.12 上游已经彻底禁用卸载关键软件包的功能。) - -对于 Pop!\_OS 来说,这确实是一个好举措。但,这并不仅仅是 Pop!\_OS 单边的教训。大多数 Linux 发行版都可能会遇到这种情况,并最终删除掉桌面环境和显示服务器。 - -KDE 已经注意到了这一点,并在即将发布的 Plasma 5.24 中 [添加了禁止卸载 Plasma 桌面的功能][9]。 - -![KDE Plasma 不允许用户卸载 Plasma 桌面][10] - -许多人责怪 Linus Sebastian 不顾清晰明确的警告,直接继续并走向灾难。但问题在于,许多用户真的不会在意“警告”这种东西,不管他们技术水平如何。人们只是觉得按 Y 或者其他东西就是程序正常的部分,也不会去多想。一些 Linux 用户之前已经踩过这种坑了,但未来可能还会有更多人重蹈覆辙。 - -这就是为什么添加故障保护措施才是明智之举。这是所有主流发行版都应该做的事。 - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/more-linux-distros-become-linus-proof/ - -作者:[Abhishek][a] -选题:[lujun9972][b] -译者:[imgradeone](https://github.com/imgradeone) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://news.itsfoss.com/author/root/ -[b]: https://github.com/lujun9972 -[1]: https://itsfoss.com/linux-gaming-guide/ -[2]: https://www.youtube.com/watch?v=0506yDSgU7M&t=788s -[3]: https://itsfoss.com/install-pop-os/ -[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjM0NyIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[5]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjM4NSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[6]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjM3OCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[7]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjM2MiIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[8]: https://twitter.com/jeremy_soller/status/1453008808314351628?ref_src=twsrc%5Etfw -[9]: https://linux.cn/article-14015-1.html -[10]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjM4OSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[11]: https://www.bilibili.com/video/BV1Fh411b7q3?t=769 From e59853aa6b851e114c19e2ecdc56eb0a50d2cf15 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 6 Dec 2021 10:59:10 +0800 Subject: [PATCH 102/244] =?UTF-8?q?=E8=B6=85=E6=9C=9F=E5=9B=9E=E6=94=B6=20?= =?UTF-8?q?20211206?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @anine09 @Pinkerr @piaoshi @Starryi @amwps290 @zepoch @lixin555 --- ...leased a New Edition for Newer Hardware.md | 81 --------------- ...rsion Along With Essential Improvements.md | 99 ------------------- ...pport on Linux Among Other Enhancements.md | 85 ---------------- ...Support If More Linux Users Show Interest.md | 86 ---------------- ...07 Compose music as code using Sonic Pi.md | 2 +- ...ux to open Linux on Windows 10 machines.md | 2 +- ... LibreOffice Look Like Microsoft Office.md | 2 +- ...20210707 Parsing config files with Java.md | 2 +- ... worth trying on the Linux command line.md | 2 +- ...ros -Not Based on Debian, Arch or Red Hat.md | 2 +- ...210722 Write your first JavaScript code.md | 2 +- ...20211022 3 tips for printing with Linux.md | 37 ------- 12 files changed, 7 insertions(+), 395 deletions(-) delete mode 100644 sources/news/20211125 MX Linux has Released a New Edition for Newer Hardware.md delete mode 100644 sources/news/20211129 Kalendar Beta v0.3.0 Introduces a Windows Version Along With Essential Improvements.md delete mode 100644 sources/news/20211130 CrossOver 21.1.0 Release Adds GTA V Support on Linux Among Other Enhancements.md delete mode 100644 sources/news/20211201 Ubisoft Could Work on ‘Rainbow Six Siege- Proton Support If More Linux Users Show Interest.md delete mode 100644 sources/tech/20211022 3 tips for printing with Linux.md diff --git a/sources/news/20211125 MX Linux has Released a New Edition for Newer Hardware.md b/sources/news/20211125 MX Linux has Released a New Edition for Newer Hardware.md deleted file mode 100644 index 3e83ce9e32..0000000000 --- a/sources/news/20211125 MX Linux has Released a New Edition for Newer Hardware.md +++ /dev/null @@ -1,81 +0,0 @@ -[#]: subject: "MX Linux has Released a New Edition for Newer Hardware" -[#]: via: "https://news.itsfoss.com/mx-linux-21-ahs/" -[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/" -[#]: collector: "lujun9972" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -MX Linux has Released a New Edition for Newer Hardware -====== - -[MX Linux 21][1] was officially unveiled last month while introducing a new Fluxbox edition. However, the Advanced Hardware Support (AHS) ISO was not a part of it. - -Recently, MX Linux announced the availability of MX Linux 21 AHS and a new AHS repo for existing MX Linux 21 users. - -In this article, let us explore more about it. - -### MX Linux 21 AHS: What’s Different? - -![][2] - -As many of MX Linux’s existing users will know, the ‘AHS’ in MX Linux AHS Edition stands for ‘Advanced Hardware Support’. - -In simpler terms, this means that it includes a newer kernel and graphics stack tailored for modern hardware. - -If you do not need the latest open-source graphics stack with updates, there is no reason for you to try this out. - -In this case, MX Linux 21 comes baked with [Linux Kernel 5.14][3] and updated versions of Mesa, Vulkan, and XOrg. It is highly recommended that users with newer gen graphics try it out to iron out any issues with the older kernel and ensure compatibility. - -The AHS edition comes with the Xfce desktop environment by default, although other environments can be installed post-installation. This should lead to a relatively smooth experience for everyone, as the Xfce desktop environment has already received some significant improvements with the MX Linux 21 release. - -### You can get this ‘AHS Edition’ on existing MX Linux install as well - -Considering that you already have MX Linux 21 and do not need the latest Linux Kernel, you can simply enable the AHS repo and get the latest Mesa, Xorg, and Vulkan drivers. - -![][4] - -As you can notice in the screenshots, all you have to do is enable the repo and perform an upgrade to get the latest packages available. - -![][5] - -However, if you do not have MX Linux 21 installed, you can opt for the ISO and perform a fresh installation to get Linux Kernel 5.14 along with a newer graphics stack. - -You can download the MX Linux 21 AHS ISO directly or choose to get the torrent files. We have linked both of them in the buttons down below. - -For more details, you can refer to the [official announcement][6]. - -[Sourceforge][7] - -[Torrent][8] - -Will you be trying out the new ISO? Or, do you prefer to enable the repo to get the latest graphics stack? Feel free to let me know in the comments down below. - -#### Big Tech Websites Get Millions in Revenue, It's FOSS Got You! - -If you like what we do here at It's FOSS, please consider making a donation to support our independent publication. Your support will help us keep publishing content focusing on desktop Linux and open source software. - -I'm not interested - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/mx-linux-21-ahs/ - -作者:[Jacob Crume][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://news.itsfoss.com/author/jacob/ -[b]: https://github.com/lujun9972 -[1]: https://news.itsfoss.com/mx-linux-21-release/ -[2]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjI5OCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[3]: https://news.itsfoss.com/kernel-5-14-release/ -[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjU5OSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[5]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjY3NyIgd2lkdGg9IjcyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[6]: https://mxlinux.org/blog/mx-21-ahs-iso-now-available/ -[7]: https://sourceforge.net/projects/mx-linux/files/Final/Xfce/MX-21_ahs_x64.iso/download -[8]: https://l2.mxrepo.com/torrents/MX-21_ahs_x64.iso.torrent diff --git a/sources/news/20211129 Kalendar Beta v0.3.0 Introduces a Windows Version Along With Essential Improvements.md b/sources/news/20211129 Kalendar Beta v0.3.0 Introduces a Windows Version Along With Essential Improvements.md deleted file mode 100644 index a6f83870cb..0000000000 --- a/sources/news/20211129 Kalendar Beta v0.3.0 Introduces a Windows Version Along With Essential Improvements.md +++ /dev/null @@ -1,99 +0,0 @@ -[#]: subject: "Kalendar Beta v0.3.0 Introduces a Windows Version Along With Essential Improvements" -[#]: via: "https://news.itsfoss.com/kalendar-0-3-0-beta/" -[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" -[#]: collector: "lujun9972" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Kalendar Beta v0.3.0 Introduces a Windows Version Along With Essential Improvements -====== - -Kalendar is KDE’s open-source calendar app that is still in development as of now. It could potentially replace the calendar that you get with KOrganizer. - -There have been a few beta releases already. But, with the 0.3.0 beta release, it looks like the Kalendar app might be gearing up to add essential features while heading to its v1.0 release. - -Furthermore, an exciting development follows—a Windows version is also available? - -Let us take a look at it. - -### Kalendar 0.3.0: What’s New? - -Kalendar 0.3.0 beta release is already out, and Claudio Cambra (KDE Developer) has shared the details of development progress in a blog post. Here, I mention the key highlights of the release. - -#### Performance Improvements - -![][1] - -KDE’s applications have always been known for their simplicity and performance. - -And, Kalendar is no exception. The latest beta release has been tweaked to make the application clean and simple. - -By default, you will not be shown week numbers when you are in the month view. Similarly, the tasks will be arranged in ascending order. - -These types of default configurations should save you time and simplify the user experience. - -#### Usability Improvements - -![][2] - -To make things easier, you can now drag and drop an event in the Kalendar app to resize or extend the time. - -The ability to edit an event has also been improved by letting you simply double-clicking on it to bring up the editor. - -It is now also easier to refresh the calendars using the F5 key. - -In addition to all these, Kalendar 0.3.0 also lets you quickly add time duration in a 15-minute multiple. - -#### Visual Improvements - -![][3] - -There aren’t any major visual changes, but the developers have worked on a few subtle differences. - -Some changes include highlighting the time when creating an event and adding new heading sections to improve the tasks’ clarity and categories. - -#### A Windows Version - -Even though the Kalendar app hasn’t been finalized, it is still good to have an open-source calendar app from KDE available on Windows. - -As per the developer’s blog, a Windows version was possible because of the flexibility of Qt, the KFrameworks, and Akonadi. - -If you are interested, you can [download the package for Windows][4], but it is still considered experimental. - -### Other Improvements - -Along with all the key highlights and an interesting Windows release, Kalendar 0.3.0 beta release also improves the keyboard navigation and other accessibility features. - -There are several bug fixes as well. You can explore all the technical details in the [blog post][5] by the KDE Developer. - -[Kalendar by KDE][6] - -_What do you think about the Kalendar app coming to Windows? Have you tried it on Linux yet?_ - -#### Big Tech Websites Get Millions in Revenue, It's FOSS Got You! - -If you like what we do here at It's FOSS, please consider making a donation to support our independent publication. Your support will help us keep publishing content focusing on desktop Linux and open source software. - -I'm not interested - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/kalendar-0-3-0-beta/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://news.itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQzMiIgd2lkdGg9Ijc2OCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[2]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQyMCIgd2lkdGg9Ijc2OCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[3]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjUxNiIgd2lkdGg9Ijc2OCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[4]: https://binary-factory.kde.org/view/Windows%2064-bit/job/Kalendar_Nightly_win64/ -[5]: https://claudiocambra.com/2021/11/28/kalendar-v0-3-0-out-soon-with-improved-stability-efficiency-accessibility-and-a-windows-version-kalendar-devlog-23/ -[6]: https://apps.kde.org/kalendar/ diff --git a/sources/news/20211130 CrossOver 21.1.0 Release Adds GTA V Support on Linux Among Other Enhancements.md b/sources/news/20211130 CrossOver 21.1.0 Release Adds GTA V Support on Linux Among Other Enhancements.md deleted file mode 100644 index acc64a6125..0000000000 --- a/sources/news/20211130 CrossOver 21.1.0 Release Adds GTA V Support on Linux Among Other Enhancements.md +++ /dev/null @@ -1,85 +0,0 @@ -[#]: subject: "CrossOver 21.1.0 Release Adds GTA V Support on Linux Among Other Enhancements" -[#]: via: "https://news.itsfoss.com/crossover-21-1-0-release/" -[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" -[#]: collector: "lujun9972" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -CrossOver 21.1.0 Release Adds GTA V Support on Linux Among Other Enhancements -====== - -CrossOver is a paid tool that lets you run Microsoft Windows software on Linux and Mac. In case you did not know, it is built on top of Wine and other open-source software along with their proprietary tools that make it easy to run Windows-only software. - -With the latest release, i.e., CrossOver 21.1.0, there are some significant additions for Linux and macOS users. - -Here, let me highlight the key changes in this release. - -### CrossOver 21.1.0: What’s New? - -![][1] - -CrossOver 21.1.0 may not be the most significant release yet, but it includes some important changes. Some include: - -#### Grand Theft Auto (GTA) V Singleplayer & Online Mode Support - -While you can already play GTA V on Linux via Steam Proton (considering its [Gold status on ProtonDB][2]), it did not work with CrossOver. - -So, if you utilize CrossOver and want to play GTA V on Linux without any configuration hassle with Wine, CrossOver 21.1.0 will let you do that. - -You can run GTA V using the standalone Rockstar Games Launcher or Steam. - -As per the [announcement][3], both the online and single-player modes are supported with the latest release. - -This should be exciting news if you have always wanted to play GTA V using Crossover/Wine. - -#### Restoring Support for Outlook 2016/365 - -With CrossOver 21.1.0, you can conveniently get back to your emails using Outlook 2016/365 on Linux. - -Of course, any [email clients for Linux][4] should help if you are no longer interested in using Outlook. - -#### Other Improvements - -Along with the two key highlights, CrossOver 21.1.0 also added support for the latest macOS Monterey and added several games for it. - -If you are on ChromeOS, the release should result in a smoother experience. - -You can also notice improvements to Ubisoft Connect and other game clients to play Windows games on Linux or macOS. - -### Get CrossOver to Support the Development of WINE - -While CrossOver is not precisely a FOSS product, but when you purchase a license for it, they contribute the revenue they make to help with the development of Wine. - -They also have a blog post explaining all the details of why [CrossOver is paid][5]. In either case, CrossOver is a fantastic tool that lets you run Windows-only software on Linux, Chrome OS, and macOS. - -If you utilize multiple platforms but still need access to Windows-only software and games, CrossOver should be a great choice. You can get yourself a license and install it on your system to get started. - -[Get CrossOver 21.1.0][6] - -#### Big Tech Websites Get Millions in Revenue, It's FOSS Got You! - -If you like what we do here at It's FOSS, please consider making a donation to support our independent publication. Your support will help us keep publishing content focusing on desktop Linux and open source software. - -I'm not interested - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/crossover-21-1-0-release/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://news.itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ5MiIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[2]: https://www.protondb.com/app/271590 -[3]: https://www.codeweavers.com/support/forums/announce/?t=24;mhl=250514;msg=250514#msg250514 -[4]: https://itsfoss.com/best-email-clients-linux/ -[5]: https://www.codeweavers.com/blog/jramey/2021/6/2/fair-question-why-isnt-crossover-free -[6]: https://www.codeweavers.com/store diff --git a/sources/news/20211201 Ubisoft Could Work on ‘Rainbow Six Siege- Proton Support If More Linux Users Show Interest.md b/sources/news/20211201 Ubisoft Could Work on ‘Rainbow Six Siege- Proton Support If More Linux Users Show Interest.md deleted file mode 100644 index cfb602ab60..0000000000 --- a/sources/news/20211201 Ubisoft Could Work on ‘Rainbow Six Siege- Proton Support If More Linux Users Show Interest.md +++ /dev/null @@ -1,86 +0,0 @@ -[#]: subject: "Ubisoft Could Work on ‘Rainbow Six Siege’ Proton Support If More Linux Users Show Interest" -[#]: via: "https://news.itsfoss.com/ubisoft-rainbow-six-siege-proton/" -[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" -[#]: collector: "lujun9972" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Ubisoft Could Work on ‘Rainbow Six Siege’ Proton Support If More Linux Users Show Interest -====== - -Rainbow Six Siege is a popular multiplayer FPS game that utilizes the BattleEye anti-cheat engine. - -Primarily, it does not support Linux. However, now that [anti-cheat engines like BattleEye and Easy Anti-Cheat have added official support for Proton][1], many Linux users hope to get support for popular multiplayer titles that did not work with Linux. - -Of course, you can always have Windows in dual-boot to play those titles. But, many users use Linux exclusively and cannot play Rainbow Six Siege even if they want to (or have it in their Steam library). - -And, even with the official BattleEye support added for Proton, the game dev team for R6 Siege hasn’t worked on Linux support yet. - -Do they have any plans to work on enabling Rainbow Six Siege for Linux? What are they waiting for? - -### Ubisoft Wants More Linux Users to favor Proton - -![][2] - -The same question was asked in [Ubisoft forums][3] about a week ago, which received a response from a Ubisoft Support Staff. - -The support staff mentioned: - -> Hey! Thank you for reaching out here on the forums about Proton support for Rainbow Six: Siege. -> -> We appreciate that you wish for this to be implemented, however as other support agents have advised we are only able to pass this feedback on to the development team. -> -> Hopefully, other players will reply here in favor of Proton support and the development team may then look to implement it. -> -> If you need anything further please let us know. -> -> Thank you for your time. - -So, if enough players encourage the need for Proton support, the game developers may start looking to implement it. - -As of now, several Linux users have replied to the thread and have asked to make it happen. If you haven’t already, make sure to head to the forum link and join in! - -But do we have to show interest in forums if there’s already official support for Linux? It should not take a lot of effort, right? - -### Rainbow Six Siege on Linux: Thoughts - -Well, it might sound easy on paper, but practically, there’s more work to do for the game developers to ensure that the game works as expected after enabling the Proton support. - -That being said, Ubisoft as a company should not shy away from adding Proton support from their side, considering there is a significant user base of Linux users wanting to play multiplayer titles. - -Not to forget, there’s [Steam Deck][4] as well (that comes with Steam OS 3, based on Arch Linux/Manjaro). So, Steam Deck + Linux desktop gamers should make up for plenty of users who would appreciate the game running on Linux. - -Considering, Rainbow Six Siege is one of my favorite multiplayer titles where I have spent 1200+ hours (but I haven’t got the chance to play it for a while). While I have Windows in dual-boot, I am more interested in playing it on Linux. - -I am sure there are players like me and users who exclusively use Linux who already own the game or want to play it. - -_Here’s to hoping that Ubisoft listens to Linux gamers, which would encourage more game studios to enable support for Linux!_ - -_**Via:**_ [NME][5] - -#### Big Tech Websites Get Millions in Revenue, It's FOSS Got You! - -If you like what we do here at It's FOSS, please consider making a donation to support our independent publication. Your support will help us keep publishing content focusing on desktop Linux and open source software. - -I'm not interested - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/ubisoft-rainbow-six-siege-proton/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://news.itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://news.itsfoss.com/easy-anti-cheat-linux/ -[2]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjMzMiIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[3]: https://discussions.ubisoft.com/topic/121755/proton-support-for-r6-siege-would-be-awesome?lang=en-US&page=1 -[4]: https://news.itsfoss.com/steamdeck-verified/ -[5]: https://www.nme.com/news/gaming-news/ubisoft-encourages-fans-to-show-interest-in-rainbow-six-siege-steam-deck-support-3106912 diff --git a/sources/tech/20200307 Compose music as code using Sonic Pi.md b/sources/tech/20200307 Compose music as code using Sonic Pi.md index 2f5d2a01a8..9173fc5a90 100644 --- a/sources/tech/20200307 Compose music as code using Sonic Pi.md +++ b/sources/tech/20200307 Compose music as code using Sonic Pi.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: (anine09) +[#]: translator: ( ) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) diff --git a/sources/tech/20200519 How to use Windows Subsystem for Linux to open Linux on Windows 10 machines.md b/sources/tech/20200519 How to use Windows Subsystem for Linux to open Linux on Windows 10 machines.md index 9daaab2ddd..e610f7eb2f 100644 --- a/sources/tech/20200519 How to use Windows Subsystem for Linux to open Linux on Windows 10 machines.md +++ b/sources/tech/20200519 How to use Windows Subsystem for Linux to open Linux on Windows 10 machines.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: (Pinkerr) +[#]: translator: ( ) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) diff --git a/sources/tech/20210622 How to Make LibreOffice Look Like Microsoft Office.md b/sources/tech/20210622 How to Make LibreOffice Look Like Microsoft Office.md index 63931dca94..6a69332f61 100644 --- a/sources/tech/20210622 How to Make LibreOffice Look Like Microsoft Office.md +++ b/sources/tech/20210622 How to Make LibreOffice Look Like Microsoft Office.md @@ -2,7 +2,7 @@ [#]: via: (https://www.debugpoint.com/2021/06/libreoffice-like-microsoft-office/) [#]: author: (Arindam https://www.debugpoint.com/author/admin1/) [#]: collector: (lujun9972) -[#]: translator: (piaoshi) +[#]: translator: ( ) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) diff --git a/sources/tech/20210707 Parsing config files with Java.md b/sources/tech/20210707 Parsing config files with Java.md index c7c3474d5a..56e086085e 100644 --- a/sources/tech/20210707 Parsing config files with Java.md +++ b/sources/tech/20210707 Parsing config files with Java.md @@ -2,7 +2,7 @@ [#]: via: (https://opensource.com/article/21/7/parsing-config-files-java) [#]: author: (Seth Kenlon https://opensource.com/users/seth) [#]: collector: (lujun9972) -[#]: translator: (Starryi) +[#]: translator: ( ) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) diff --git a/sources/tech/20210714 5 Rust tools worth trying on the Linux command line.md b/sources/tech/20210714 5 Rust tools worth trying on the Linux command line.md index ba030d55fd..b723dc42df 100644 --- a/sources/tech/20210714 5 Rust tools worth trying on the Linux command line.md +++ b/sources/tech/20210714 5 Rust tools worth trying on the Linux command line.md @@ -2,7 +2,7 @@ [#]: via: (https://opensource.com/article/21/7/rust-tools-linux) [#]: author: (Sudeshna Sur https://opensource.com/users/sudeshna-sur) [#]: collector: (lujun9972) -[#]: translator: (amwps290 ) +[#]: translator: ( ) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) diff --git a/sources/tech/20210718 Up for a Challenge- Try These ‘Advanced- Linux Distros -Not Based on Debian, Arch or Red Hat.md b/sources/tech/20210718 Up for a Challenge- Try These ‘Advanced- Linux Distros -Not Based on Debian, Arch or Red Hat.md index 3feed5306f..d3a958a85f 100644 --- a/sources/tech/20210718 Up for a Challenge- Try These ‘Advanced- Linux Distros -Not Based on Debian, Arch or Red Hat.md +++ b/sources/tech/20210718 Up for a Challenge- Try These ‘Advanced- Linux Distros -Not Based on Debian, Arch or Red Hat.md @@ -2,7 +2,7 @@ [#]: via: (https://itsfoss.com/advanced-linux-distros/) [#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) [#]: collector: (lujun9972) -[#]: translator: (zepoch) +[#]: translator: ( ) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) diff --git a/sources/tech/20210722 Write your first JavaScript code.md b/sources/tech/20210722 Write your first JavaScript code.md index 0450e56fdd..d02ca214cd 100644 --- a/sources/tech/20210722 Write your first JavaScript code.md +++ b/sources/tech/20210722 Write your first JavaScript code.md @@ -2,7 +2,7 @@ [#]: via: (https://opensource.com/article/21/7/javascript-cheat-sheet) [#]: author: (Seth Kenlon https://opensource.com/users/seth) [#]: collector: (lujun9972) -[#]: translator: (lixin555) +[#]: translator: ( ) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) diff --git a/sources/tech/20211022 3 tips for printing with Linux.md b/sources/tech/20211022 3 tips for printing with Linux.md deleted file mode 100644 index 56ace22fd8..0000000000 --- a/sources/tech/20211022 3 tips for printing with Linux.md +++ /dev/null @@ -1,37 +0,0 @@ -[#]: subject: "3 tips for printing with Linux" -[#]: via: "https://opensource.com/article/21/10/print-linux" -[#]: author: "Lauren Pritchett https://opensource.com/users/lauren-pritchett" -[#]: collector: "lujun9972" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -3 tips for printing with Linux -====== -Learn how to set up your printer, print from anywhere, and print files -from your terminal all on Linux. -![Files in a folder][1] - -I have a confession to make. This may be an unpopular opinion. I actually enjoy reading documents on a piece of paper as opposed to digitally. When I want to try a new recipe, I print it out to follow it so I don't have to continually swipe my mobile device to keep up with the steps. I store all my favorite recipes in sheet protectors in a binder. I also like to print out coloring pages or activity sheets for my kids. There are a ton of options online or we [create our own][2]! - -Though I have a fond appreciation for printed documents, I have also had my fair share of printing nightmares. Paper jams, low ink, printer not found, the list of frustrating errors goes on and on. - -Thankfully, it is possible to print frustration-free on Linux. Below are three tutorials you need to get started printing on Linux. The first article walks through how to connect your printer to your Linux computer. Then, learn how to print from anywhere in your house using your home network. The last article teaches you how to print from your Linux terminal so you can live out all your productivity dreams. If you are in the market for a new printer, check out this article about [choosing a printer for Linux][3]. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/10/print-linux - -作者:[Lauren Pritchett][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/lauren-pritchett -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/files_documents_paper_folder.png?itok=eIJWac15 (Files in a folder) -[2]: https://opensource.com/article/20/8/edit-images-python -[3]: https://opensource.com/article/18/11/choosing-printer-linux From ca7b3b1bc9350ae4bf6d7841efd610c8bb54af60 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 6 Dec 2021 11:25:04 +0800 Subject: [PATCH 103/244] APL --- ...l and Setup Flutter Development on Ubuntu and Other Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210929 How to Install and Setup Flutter Development on Ubuntu and Other Linux.md b/sources/tech/20210929 How to Install and Setup Flutter Development on Ubuntu and Other Linux.md index 11263c6eab..3f1fe10e7a 100644 --- a/sources/tech/20210929 How to Install and Setup Flutter Development on Ubuntu and Other Linux.md +++ b/sources/tech/20210929 How to Install and Setup Flutter Development on Ubuntu and Other Linux.md @@ -2,7 +2,7 @@ [#]: via: "https://itsfoss.com/install-flutter-linux/" [#]: author: "Community https://itsfoss.com/author/itsfoss/" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "wxy" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 7c1b54240fd1498ad587715aa0084873b6459baa Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 6 Dec 2021 11:58:52 +0800 Subject: [PATCH 104/244] TSL&PRF --- ...r Development on Ubuntu and Other Linux.md | 191 ----------------- ...r Development on Ubuntu and Other Linux.md | 193 ++++++++++++++++++ 2 files changed, 193 insertions(+), 191 deletions(-) delete mode 100644 sources/tech/20210929 How to Install and Setup Flutter Development on Ubuntu and Other Linux.md create mode 100644 translated/tech/20210929 How to Install and Setup Flutter Development on Ubuntu and Other Linux.md diff --git a/sources/tech/20210929 How to Install and Setup Flutter Development on Ubuntu and Other Linux.md b/sources/tech/20210929 How to Install and Setup Flutter Development on Ubuntu and Other Linux.md deleted file mode 100644 index 3f1fe10e7a..0000000000 --- a/sources/tech/20210929 How to Install and Setup Flutter Development on Ubuntu and Other Linux.md +++ /dev/null @@ -1,191 +0,0 @@ -[#]: subject: "How to Install and Setup Flutter Development on Ubuntu and Other Linux" -[#]: via: "https://itsfoss.com/install-flutter-linux/" -[#]: author: "Community https://itsfoss.com/author/itsfoss/" -[#]: collector: "lujun9972" -[#]: translator: "wxy" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -How to Install and Setup Flutter Development on Ubuntu and Other Linux -====== - -Google’s UI toolkit Flutter is getting increasingly popular for creating cross-platform applications for the mobile, web and desktop. - -[Flutter][1] is not a programming language but a software development kit. [Dart][2] is the programming language used underneath the Flutter SDK. - -Flutter is the main framework behind Google’s open source Fuchsia OS, Google STADIA and many other software and mobile apps. - -If you want to start developing with Flutter, this tutorial will help you to get your set-up ready on Ubuntu and hopefully other Linux distributions. - -### Installing Flutter on Ubuntu and other Linux with Snap - -The easiest way to install Flutter on Linux is by using Snap. If you are using Ubuntu, you already have got Snap. _**For other distributions, please make sure to [enable Snap support][3].**_ - -[Open a terminal][4] and use the following command in a terminal to install Flutter: - -``` -sudo snap install flutter --classic -``` - -You’ll see something like this on your terminal: - -![][5] - -Once the installation completes, it is time to verify it. Not just Flutter installation but also verify every dependency that needs to be satisfied for Flutter to function properly. - -#### Verify Flutter dependencies - -To verify that every dependency, for the correct work of Flutter, is installed, Flutter has a built-in option: - -``` -flutter doctor -``` - -The process will start, looking like this: - -![][6] - -And it will be finishing like this: - -![][7] - -As you can see, we need Android Studio for working. So let’s install it. How do we do that? [Installing Android Studio on Linux][8] is also effortless with Snap. - -#### Install and set up Android Studio - -In a terminal, use the following command to get Android Studio installed: - -``` -sudo snap install android-studio --classic -``` - -![][9] - -Once installed, open Android Studio from our operating system menu. - -![][10] - -You are almost done. It’s time for configuring Android Studio. - -![][11] - -Click next and select standard if you don’t want to complicate things. - -![][12] - -Select your preferred theme (I like the Dark one). - -![][13] - -Verify that everything is OK and click on Next. - -![][14] - -Finally, hit the Finish button. - -![][15] - -And wait until the download is finished. - -![][16] - -### Creating a sample Hello World Flutter app - -In Android Studio, go to Projects and select New Flutter Project. Flutter SDK path will be set by default. - -![][17] - -And here is where the magic starts to appear because this is where you set your project name, which in this case it will be called hello_world. - -Let’s select the three available platforms: **Android, iOS, and Web**. And finally, click on Finish. - -![][18] - -The principal file in the projects is located in `lib/main.dart`, as is shown in the next image. - -![][19] - -Once selected, erase everything contained inside the file and change it for this sample code: - -``` -// Copyright 2018 The Flutter team. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -import 'package:flutter/material.dart'; - -void main() => runApp(MyApp()); - -class MyApp extends StatelessWidget { - @override - Widget build(BuildContext context) { - return MaterialApp( - title: 'Welcome to Flutter', - home: Scaffold( - appBar: AppBar( - title: const Text('Welcome to Flutter'), - ), - body: const Center( - child: Text('Hello World'), - ), - ), - ); - } -} -``` - -It’s important to say that this is only for showing you how Flutter works, in case you’re convinced about learning this beautiful and incredible language, here is the [Documentation][20] to see more about it. **Try** it! - -Finally, select **Chome Web** device and do click on the **Run** button, as is shown below; and see the magic! - -![][21] - -It’s incredible how fast you can create a Flutter project. Say hello to your Hello World project. - -![][22] - -### In the end… - -Flutter and Dart are perfect if you want to contribute with beautiful mobile and Web interfaces in a short time. - -Now you know how to install Flutter on Ubuntu Linux and how to create your first app with it. I really enjoyed writing this post for you, hoping this helps you and if you have any questions, please let me know by leaving a comment or sending me an email to [[email protected]][23] Good luck! - -_**Tutorial contributed by Marco Antonio Carmona Galván, a student of physics and data science.**_ - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/install-flutter-linux/ - -作者:[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://flutter.dev/ -[2]: https://dart.dev/ -[3]: https://itsfoss.com/install-snap-linux/ -[4]: https://itsfoss.com/open-terminal-ubuntu/ -[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/installing-flutter-ubuntu.png?resize=786%2C195&ssl=1 -[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/09/verify-flutter-install.png?resize=786%2C533&ssl=1 -[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/09/Flutter-verification-completes.png?resize=786%2C533&ssl=1 -[8]: https://itsfoss.com/install-android-studio-ubuntu-linux/ -[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/09/install-android-studio-linux-snap.png?resize=786%2C187&ssl=1 -[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/09/Open_Android_Studio.webp?resize=800%2C450&ssl=1 -[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/09/Setting-Up-Android-Studio-1.png?resize=800%2C603&ssl=1 -[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/09/Setting-Up-Android-Studio-2.png?resize=800%2C603&ssl=1 -[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/Setting-Up-Android-Studio-3.png?resize=800%2C603&ssl=1 -[14]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/09/Setting-Up-Android-Studio-4.png?resize=800%2C603&ssl=1 -[15]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/Setting-Up-Android-Studio-5.png?resize=800%2C603&ssl=1 -[16]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/09/Setting-Up-Android-Studio-6.png?resize=800%2C603&ssl=1 -[17]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/09/New_flutter_project.png?resize=800%2C639&ssl=1 -[18]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/sample-flutter-project.png?resize=800%2C751&ssl=1 -[19]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/sample-flutter-project-1.png?resize=800%2C435&ssl=1 -[20]: https://flutter.dev/docs -[21]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/sample-flutter-project-2.png?resize=800%2C450&ssl=1 -[22]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/sample-flutter-project-3.png?resize=800%2C549&ssl=1 -[23]: https://itsfoss.com/cdn-cgi/l/email-protection diff --git a/translated/tech/20210929 How to Install and Setup Flutter Development on Ubuntu and Other Linux.md b/translated/tech/20210929 How to Install and Setup Flutter Development on Ubuntu and Other Linux.md new file mode 100644 index 0000000000..0d5b6a8d14 --- /dev/null +++ b/translated/tech/20210929 How to Install and Setup Flutter Development on Ubuntu and Other Linux.md @@ -0,0 +1,193 @@ +[#]: subject: "How to Install and Setup Flutter Development on Ubuntu and Other Linux" +[#]: via: "https://itsfoss.com/install-flutter-linux/" +[#]: author: "Marco Antonio Carmona Galván https://itsfoss.com/author/itsfoss/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: " " +[#]: url: " " + +如何在 Linux 上安装和设置 Flutter 开发环境 +====== + +![](https://img.linux.net.cn/data/attachment/album/202112/06/115835fdjlxmd55mxew1nn.jpg) + +谷歌的 UI 工具包 Flutter 在创建移动、网页和桌面的跨平台应用程序方面越来越受欢迎。 + +[Flutter][1] 不是一种编程语言,而是一个软件开发工具包。[Dart][2] 是 Flutter SDK 下面使用的编程语言。 + +Flutter 是谷歌开源的 Fuchsia OS、谷歌 STADIA 以及许多其他软件和移动应用背后的主要框架。 + +如果你想使用 Flutter 进行开发,本教程将帮助你在 Ubuntu 和其他类似 Linux 发行版上搭建好你的环境。 + +### 在 Ubuntu 和其他 Linux 上用 Snap 安装 Flutter + +在 Linux 上安装 Flutter 最简单的方法是使用 Snap。如果你使用的是 Ubuntu,你已经有了 Snap。**对于其他发行版,请确保 [启用 Snap 支持][3]**。 + +[打开终端][4] 并在终端中使用以下命令来安装 Flutter: + +``` +sudo snap install flutter --classic +``` + +你会在你的终端上看到类似这样的东西: + +![][5] + +一旦安装完成,就是验证它的时候了。不仅仅是 Flutter 的安装,还要验证 Flutter 正常运行所需满足的每一个依赖关系。 + +#### 验证 Flutter 的依赖项 + +为了验证 Flutter 正确工作所需的每一个依赖项,Flutter 有一个内置选项: + +``` +Flutter doctor +``` + +这个过程开始看起来像这样: + +![][6] + +而它完成时像这样: + +![][7] + +正如你所看到的,我们需要 Android Studio 来工作。所以让我们来安装它。我们该怎么做呢?用 Snap [在 Linux 上安装 Android Studio][8] 也是毫不费力的。 + +#### 安装并设置好 Android Studio + +在终端中,使用下面的命令来安装 Android Studio: + +``` +sudo snap install android-studio --classic +``` + +![][9] + +安装完毕后,从我们的操作系统菜单中打开 Android Studio。 + +![][10] + +就快完成了。现在是配置 Android Studio 的时候了。 + +![][11] + +点击下一步,如果你不想让事情复杂化,就选择“标准standard”。 + +![][12] + +选择你喜欢的主题(我喜欢“暗色Darcula”的)。 + +![][13] + +确认一切正常,然后点击“下一步Next”。 + +![][14] + +最后,点击“完成Finish”按钮。 + +![][15] + +然后等待,直到下载完成。 + +![][16] + +### 创建一个 Hello World Flutter 应用样本 + +在 Android Studio 中,进入项目,选择“新建 Flutter 项目New Flutter Project”。Flutter SDK 路径会默认设置。 + +![][17] + +在这里,神奇的事情开始出现了,这是你设置你的项目名称的地方,在这个例子中,它将被称为 “hello_world”。 + +让我们选择三个可用的平台。**Android、iOS 和 Web**。最后,点击“完成Finish”。 + +![][18] + +项目中的主文件位于 `lib/main.dart`,如下图所示: + +![][19] + +选定后,擦除文件中包含的所有内容,并将其改为本示例代码: + +``` +// Copyright 2018 The Flutter team. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:flutter/material.dart'; + +void main() => runApp(MyApp()); + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'Welcome to Flutter', + home: Scaffold( + appBar: AppBar( + title: const Text('Welcome to Flutter'), + ), + body: const Center( + child: Text('Hello World'), + ), + ), + ); + } +} +``` + +重要的是,这只是向你展示 Flutter 是如何工作的,如果你确信要学习这种美丽而不可思议的语言,这里有 [文档][20] 可以看到更多关于它的信息。**尝试**它! + +最后,选择 “Chome Web” 设备,并点击“运行Run”按钮,如下图所示;并看到神奇的效果! + +![][21] + +你可以如此快速地创建一个 Flutter 项目,真是不可思议。跟你的 Hello World 项目打个招呼吧。 + +![][22] + +### 最后... + +如果你想在短时间内做出漂亮的移动和网页界面的贡献,Flutter 和 Dart 是完美的。 + +现在你知道了如何在 Ubuntu Linux 上安装 Flutter,以及如何用它创建你的第一个应用程序。我很高兴可以为你写这篇文章,希望对你有所帮助,如果你有任何问题,请通过留言或给我发邮件来告诉我,祝你好运! + +本教程由 Marco Antonio Carmona Galván 提供,他是物理学和数据科学专业的学生。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/install-flutter-linux/ + +作者:[Marco Antonio Carmona Galván][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/itsfoss/ +[b]: https://github.com/lujun9972 +[1]: https://flutter.dev/ +[2]: https://dart.dev/ +[3]: https://itsfoss.com/install-snap-linux/ +[4]: https://itsfoss.com/open-terminal-ubuntu/ +[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/installing-flutter-ubuntu.png?resize=786%2C195&ssl=1 +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/09/verify-flutter-install.png?resize=786%2C533&ssl=1 +[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/09/Flutter-verification-completes.png?resize=786%2C533&ssl=1 +[8]: https://itsfoss.com/install-android-studio-ubuntu-linux/ +[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/09/install-android-studio-linux-snap.png?resize=786%2C187&ssl=1 +[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/09/Open_Android_Studio.webp?resize=800%2C450&ssl=1 +[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/09/Setting-Up-Android-Studio-1.png?resize=800%2C603&ssl=1 +[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/09/Setting-Up-Android-Studio-2.png?resize=800%2C603&ssl=1 +[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/Setting-Up-Android-Studio-3.png?resize=800%2C603&ssl=1 +[14]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/09/Setting-Up-Android-Studio-4.png?resize=800%2C603&ssl=1 +[15]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/Setting-Up-Android-Studio-5.png?resize=800%2C603&ssl=1 +[16]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/09/Setting-Up-Android-Studio-6.png?resize=800%2C603&ssl=1 +[17]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/09/New_flutter_project.png?resize=800%2C639&ssl=1 +[18]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/sample-flutter-project.png?resize=800%2C751&ssl=1 +[19]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/sample-flutter-project-1.png?resize=800%2C435&ssl=1 +[20]: https://flutter.dev/docs +[21]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/sample-flutter-project-2.png?resize=800%2C450&ssl=1 +[22]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/sample-flutter-project-3.png?resize=800%2C549&ssl=1 +[23]: https://itsfoss.com/cdn-cgi/l/email-protection From 2fce96bf8986dee76da44e935e2189aa0512f357 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 6 Dec 2021 12:01:49 +0800 Subject: [PATCH 105/244] PUB @wxy https://linux.cn/article-14054-1.html --- ...and Setup Flutter Development on Ubuntu and Other Linux.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20210929 How to Install and Setup Flutter Development on Ubuntu and Other Linux.md (99%) diff --git a/translated/tech/20210929 How to Install and Setup Flutter Development on Ubuntu and Other Linux.md b/published/20210929 How to Install and Setup Flutter Development on Ubuntu and Other Linux.md similarity index 99% rename from translated/tech/20210929 How to Install and Setup Flutter Development on Ubuntu and Other Linux.md rename to published/20210929 How to Install and Setup Flutter Development on Ubuntu and Other Linux.md index 0d5b6a8d14..13a8a00d5a 100644 --- a/translated/tech/20210929 How to Install and Setup Flutter Development on Ubuntu and Other Linux.md +++ b/published/20210929 How to Install and Setup Flutter Development on Ubuntu and Other Linux.md @@ -4,8 +4,8 @@ [#]: collector: "lujun9972" [#]: translator: "wxy" [#]: reviewer: "wxy" -[#]: publisher: " " -[#]: url: " " +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14054-1.html" 如何在 Linux 上安装和设置 Flutter 开发环境 ====== From 3d9b8935c6f412166171a9c7418748716f378553 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 7 Dec 2021 05:03:45 +0800 Subject: [PATCH 106/244] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211207=20?= =?UTF-8?q?Gaphor:=20Open=20Source=20Graphical=20Modeling=20Tool?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211207 Gaphor- Open Source Graphical Modeling Tool.md --- ...or- Open Source Graphical Modeling Tool.md | 99 +++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 sources/tech/20211207 Gaphor- Open Source Graphical Modeling Tool.md diff --git a/sources/tech/20211207 Gaphor- Open Source Graphical Modeling Tool.md b/sources/tech/20211207 Gaphor- Open Source Graphical Modeling Tool.md new file mode 100644 index 0000000000..beae0e80e2 --- /dev/null +++ b/sources/tech/20211207 Gaphor- Open Source Graphical Modeling Tool.md @@ -0,0 +1,99 @@ +[#]: subject: "Gaphor: Open Source Graphical Modeling Tool" +[#]: via: "https://itsfoss.com/gaphor-modeling-tool/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Gaphor: Open Source Graphical Modeling Tool +====== + +Gaphor is a free and open source modeling application with support for various modeling languages such as UML, [SysML][1], RAAML and C4. + +Not aware of the term “modeling language”? Basically, it’s a set of instructions that can be used to create the design and constructions of structures. It could be textual and graphical, both. + +The graphical one is easier to look at and figure out how various components of the project are related to each other. + +Have you seen a flowchart or sequence diagrams? Those are also a type of graphical modeling in the simplest form. + +![Sequence diagram example][2] + +There are various modeling languages and they are used for software development, system engineering, physics, project management and more. + +### Gaphor for UML, SysML and more + +[Gaphor][3] works with the UML, SysML, and RAAML OMG standards. It also includes support for the C4 model for visualizing software architectures. + +It’s not just a [drawing tool][4]. It implements a fully-compliant UML 2 data model. You can create highly complex models with Gaphor. + +![][5] + +Written in Python, Gaphor is completely open source under Apache 2 license. You can find all its source code on [its GitHub repository][6]. It is a cross-platform tool and available to install on Linux, Windows and macOS. + +You can export your diagrams in PDF, PNG, SVG and XML formats. You can also plug-in a code generator. + +Gaphor website mentions that it has dark mode but I didn’t see any options to enable it in the AppImage version I downloaded. + +### Installing Gaphor on Linux + +![Gaphor user interface][7] + +Arch users can find Gaphor in the AUR. For other distributions, you have the choice of choosing between [AppImage][8] and Flatpak. + +You can download the AppImage from its download page. + +[Download Gaphor][9] + +If you want to use the Flatpak version, add the Flathub repository first: + +``` + + flatpak remote-add --user --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo + +``` + +And then install it: + +``` + + flatpak install --user flathub org.gaphor.Gaphor + +``` + +Since Gaphor is essentially a Python application, you can install it [using Pip][10] as well. + +``` + + pip install gaphor + +``` + +I used UML and sequence diagrams when I worked as a software engineer. I haven’t used it in the last few years. Looking at Gaphor, I think it’s a pretty cool app to have if you have to create UML and other diagrams for your projects. + +Feel free to give it a try and share your experience in the comments. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/gaphor-modeling-tool/ + +作者:[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://sysml.org/ +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/sequence-diagram-example-800x364.png?resize=800%2C364&ssl=1 +[3]: https://gaphor.org/ +[4]: https://itsfoss.com/open-source-paint-apps/ +[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/gaphor-uml-screenshot.jpg?resize=800%2C570&ssl=1 +[6]: https://github.com/gaphor +[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/gaphor-example-800x445.png?resize=800%2C445&ssl=1 +[8]: https://itsfoss.com/use-appimage-linux/ +[9]: https://gaphor.org/download.html#linux +[10]: https://itsfoss.com/install-pip-ubuntu/ From c804d6aabebeb2fef0f741802cbcaa875cfadfb1 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 7 Dec 2021 05:04:02 +0800 Subject: [PATCH 107/244] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211206=20?= =?UTF-8?q?5=20surprising=20reasons=20I=20use=20Krita=20for=20photo=20edit?= =?UTF-8?q?ing=20on=20Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211206 5 surprising reasons I use Krita for photo editing on Linux.md --- ... I use Krita for photo editing on Linux.md | 142 ++++++++++++++++++ 1 file changed, 142 insertions(+) create mode 100644 sources/tech/20211206 5 surprising reasons I use Krita for photo editing on Linux.md diff --git a/sources/tech/20211206 5 surprising reasons I use Krita for photo editing on Linux.md b/sources/tech/20211206 5 surprising reasons I use Krita for photo editing on Linux.md new file mode 100644 index 0000000000..357b8373e0 --- /dev/null +++ b/sources/tech/20211206 5 surprising reasons I use Krita for photo editing on Linux.md @@ -0,0 +1,142 @@ +[#]: subject: "5 surprising reasons I use Krita for photo editing on Linux" +[#]: via: "https://opensource.com/article/21/12/open-source-photo-editing-krita" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +5 surprising reasons I use Krita for photo editing on Linux +====== +The tools provided by Krita for editing digital paint work just as well +for pixels representing a photograph. +![Old camera blue][1] + +Krita is best known as a digital painting application, but in my experience, it's kind of a digital imaging powerhouse. Recently, a fork of GIMP called GLIMPSE had to pause its development, and because I like alternatives, it occurred to me that Krita could be a reasonable photo editor for at least some use cases. It isn't easy to measure the suitability of an application for a group of tasks because different people require or prefer different things. What's very common and indispensable to one person is an edge case for someone else. However, photo editing applications are broadly known for a primarily universal set of functions, so I decided to look at those likely to be in a top 5 must-have list and test Krita against each one. + +### 1\. Layers + +Photo editors have layers. That was one of the first game-changing features of digital photo editors, and it remains one of the most basic requirements. Krita, of course, has layers, and in fact, so many paint and photo applications do these days that I probably could have glossed over it. There's a reason I mention this as a requirement, though. Krita doesn't just have layers. It's got twelve different kinds of layers. Of course, _more_ doesn't always mean _better_. What matters is what Krita does with all those layers. + + 1. **Paint:** The default kind of layer containing raster data. + 2. **Vector:** It's no Inkscape, but Krita does support vector and has several good vector drawing tools. This layer stores vector data, including text. + 3. **Group:** A folder for layers. + 4. **Filter:** A layer containing nothing but an effect, which gets applied to all layers below it, as if you were looking at your image through a special lens. Combined with a group layer, you can apply this lens to only the layers you want. + 5. **Filter mask:** Like a filter layer, a filter mask is a layer that gets attached to just one other layer. Because it is a layer and not just a jumble of settings, it's easy to duplicate on other layers as needed, and it can stack with other filters. + 6. **Colorize mask:** Colorize regions of a picture with just one stroke of a paintbrush. This is very much an illustrator's tool, and I've found little to no use for this tool in photography. It could have interesting results for some photos, though. + 7. **Clone:** An effect layer that updates based on its "parent." It's a little like an alias or symlink for layers and can be helpful when you need one layer to be in more than one place. For example, you can group an effect layer and a clone layer to isolate a special effect without actually moving your source layer from its group. + 8. **Fill:** A layer containing a fill, which can be anything from a solid color to gradient to patterns or noise. Combined with compositing modes, there are great effects you can achieve with this, and because it's a layer type, it's easy to modify and change on a whim. + 9. **File:** Dynamically loads a file as a layer. When the file changes, so does the layer. Never open a dozen files to change a company logo, watermark, or iconography again. + 10. **Selection:** Store selections as layers attached to a paint layer, so you only have to select an important region once. + 11. **Transparency:** Have you ever wanted to paint with Alpha? Now you can. Black paint produces 100% transparency, white paint produces 0%, and all shades of gray are available in between. + 12. **Transform:** Apply transformation to a layer. Because it's a layer type, it's easy to modify and change on a whim. + + + +If the capabilities of these layers somehow haven't convinced you to use Krita as your photo editor, don't worry: Krita has much more to offer. + +### 2\. Selections + +Photo editing applications need the ability to select sometimes complex and uneven parts of a photograph. Sometimes you want to remove an element from the frame. Other times you want to emphasize it, or duplicate it, or adjust it in some way. Krita has all the usual selection tools: rectangle, elliptical, freehand (also sometimes known as a "lasso"), polygonal, and contiguous color. + +It also has a _similar color_ selection tool, which is essentially a contiguous color selection for the entire image, contiguous or not. + +![Similar color selection in Krita][2] + +(Seth Kenlon, [CC BY-SA 4.0][3]) + +There's also a bezier selection tool and a magnetic selection tool that finds edges as you draw your selection. It's sort of an assisted freehand tool. + +![Magnetic selection in Krita][4] + +(Seth Kenlon, [CC BY-SA 4.0][3]) + +This is a great assortment of selection tools, and I do find myself using them for quick and easy selections. However, once I'd discovered Selection Layers and the Global Mask layer, it was hard to use anything else. + +To activate the global mask layer, go to the **Select** menu and choose **Show Global Selection Mask**. A (temporary) red overlay gets added to your image. Using an assortment of paintbrushes (and Krita has no shortage of variety in that department), you can poke through the mask with white paint or add to the mask with black paint. + +Everything you paint white becomes a selection when you click back onto your image layer. + +![Selection mask][5] + +(Seth Kenlon, [CC BY-SA 4.0][3]) + +It's a very precise and endlessly editable selection method, and its only fault is that it's so powerful. It's easy to lose hours of your time in pursuit of that mythical perfect mask, so pace yourself. + +### 3\. Filters + +The industry moves in cycles. Once upon a time, drop shadows were the sign of advanced digital artistry, then 3D bevels, glows, gloss, reflection, and of course, lens flare. It's true that filters get over-used sometimes, but when used judiciously, they really are one of the primary reasons photo editors are so useful. Commonplace tasks like color balance, dodging and burning used to be impossible outside of a darkroom. + +![Color balance in Krita][6] + +(Seth Kenlon, [CC BY-SA 4.0][3]) + +Open source has pioneered much of the most advanced imaging software (did you know that content-aware selection was created for GIMP?), and that includes effects. Krita benefits from this and takes full advantage of it. Not only does Krita offer the usual array of effects, like color balance, contrast, levels, threshold, saturation, and so on, but with the wildly popular [G'MIC][7] plugin, it offers hundreds of additional filters and effects. + +![G'MIC plugin for Krita][8] + +(Seth Kenlon, [CC BY-SA 4.0][3]) + +The only things I noticed Krita lacking were spot dodge and burn tools. I rarely use these tools in a photo editor, and you can emulate them with a mask and a filter layer, so it's probably not an issue. + +### 4\. CMYK and ICC profiles + +I've had plenty of work professionally printed, and I've never had any issue with it, but some people need the CMYK colorspace for their workflow. Krita has both the RGB and CMYK mode and full support for ICC colorspaces, so you can match modes and profiles to other applications in your pipeline.  + +### 5\. Retouching + +If you need to smooth over wrinkles, color in grays, redden lips, brighten eyes, remove a rubbish bin from the background, or otherwise retouch a photo, you're in luck. Digital painting is exactly what Krita was _actually_ built to do. This is what Krita does best, and there are plenty of composite modes to help you integrate your paint with your photo. + +![Smart patching with Krita][9] + +(Seth Kenlon, [CC BY-SA 4.0][3]) + +### Krita isn't just for painting anymore + +The Krita development team makes no claims about Krita being a photo editor. Still, after years of enjoying it for digital paint and materials emulation, I've found that Krita's development has, probably accidentally, converged with what a photographer needs. The tools provided by Krita for editing digital paint work just as well for pixels representing a photograph. I've enjoyed opening photos in Krita, and I've been pleased with the workflow and the results. Make no mistake: Krita is its own application, so you do have to re-train your muscles and sometimes approach a task from a different angle, but once you get familiar with the tools Krita offers, you may not want to give them up. + +Krita is [available for Linux, Windows, and macOS][10]. + +On Fedora, Mageia, and similar distributions, you can install it with your package manager: + + +``` +`$ sudo dnf install krita` +``` + +On Elementary, Mint, and other Debian-based distributions: + + +``` +`$ sudo apt install krita` +``` + +I use Krita as a [Flatpak][11]. + +If you want to support the continued development of Krita, you can also buy Krita for Linux and Windows on Steam. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/open-source-photo-editing-krita + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc-photo-camera-blue.png?itok=AsIMZ9ga (Old camera blue) +[2]: https://opensource.com/sites/default/files/uploads/krita-similar-colour-selection.jpg (Similar color selection in Krita) +[3]: https://creativecommons.org/licenses/by-sa/4.0/ +[4]: https://opensource.com/sites/default/files/uploads/krita-magnetic-selection.jpg (Magnetic selection in Krita) +[5]: https://opensource.com/sites/default/files/uploads/krita-mask-selection.jpg (Selection mask) +[6]: https://opensource.com/sites/default/files/uploads/krita-color-balance.jpg (Color balance in Krita) +[7]: https://gmic.eu +[8]: https://opensource.com/sites/default/files/uploads/krita-gmic.jpg (G'MIC plugin for Krita) +[9]: https://opensource.com/sites/default/files/uploads/krita-smart-patch.jpg (Smart patching with Krita) +[10]: https://krita.org/en/download/krita-desktop/ +[11]: https://opensource.com/article/21/11/install-flatpak-linux From e1b46daeab164f2ef87c18ef7d5ffe4c27a3733e Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 7 Dec 2021 05:04:13 +0800 Subject: [PATCH 108/244] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211206=20?= =?UTF-8?q?Sign=20and=20verify=20container=20images=20with=20this=20open?= =?UTF-8?q?=20source=20tool?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211206 Sign and verify container images with this open source tool.md --- ...ainer images with this open source tool.md | 235 ++++++++++++++++++ 1 file changed, 235 insertions(+) create mode 100644 sources/tech/20211206 Sign and verify container images with this open source tool.md diff --git a/sources/tech/20211206 Sign and verify container images with this open source tool.md b/sources/tech/20211206 Sign and verify container images with this open source tool.md new file mode 100644 index 0000000000..c1e9aaca4e --- /dev/null +++ b/sources/tech/20211206 Sign and verify container images with this open source tool.md @@ -0,0 +1,235 @@ +[#]: subject: "Sign and verify container images with this open source tool" +[#]: via: "https://opensource.com/article/21/12/sigstore-container-images" +[#]: author: "Muhammad Aizuddin Zali https://opensource.com/users/aizuddin85" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Sign and verify container images with this open source tool +====== +The sigstore project aims at securing supply chain technology. +![Parts, modules, containers for software][1] + +Many open source software projects get used in software builds every day, which is critical for almost every organization. Open source software brings many benefits and helps software developers focus on innovation and efficiency rather than reinventing the wheel. + +Sometimes, you cannot identify and verify the integrity of the third-party software used by constantly doing verification, which can open the door to supply chain attacks. Hence, the [sigstore][2] project was born. The sigstore project aims at securing supply chain technology and eventually the open source software security itself. + +The sigstore project consists of several open source components under its umbrella:  + + * [Fulcio][3] (Root CA for Code Signing) + * [Rekor][4] (Immutable tamper-resistant ledger for record signed metadata) + * [Cosign][5] (Container signing, verification, and storage in OCI compliant registry) + + + +In this article, I look at the `cosign` part from the project and how you can use it to sign and verify container images (and other supported objects). The philosophy of `cosign` is to make the signing and verifying process an [immutable infrastructure][6] to the developers. + +### Install and build cosign + +In this example, I am going to install `cosign` on a macOS-based system. First, ensure the system has Docker installed and running as well for managing container images. + +Using brew, I install `cosign`. + + +``` + + +$ brew install sigstore/tap/cosign + +==> Installing sigstore/tap/cosign +🍺  /usr/local/Cellar/cosign/1.3.1: 3 files, 82.5MB, built in 2 seconds + +``` + +Next, I make sure I am logged in to the target registry, in this example to docker.io. + + +``` + + +$ docker login docker.io + +Login Succeeded + +``` + +### Sign and verify container images + +Before I can sign and verify any images, I need to generate a public and private key pair. I then use this private key to sign the object and later verify it using the corresponding public key. I should also use a strong password to protect the key pair. Ideally, this password gets stored in the vault for security and audit purposes. + + +``` + + +$ cosign generate-key-pair +Enter password for private key: +Enter again: +Private key written to cosign.key +Public key written to cosign.pub + +``` + +Since I now have the required key to start signing, I sign our test image that I previously pushed into the registry.  + + +``` + + +$ cosign sign --key cosign.key docker.io/mzali/test:latest +Enter password for private key: + +``` + +Using the `triangulate` option, I can locate the cosign image reference from the registry. + + +``` + + +$ cosign triangulate docker.io/mzali/test:latest +index.docker.io/mzali/test:sha256-25ca0d9c2f4e70ce3bfba7891065dfef09760d2cbace7a2d21fb13c569902133.sig + +``` + +Now, this is the part where I want to verify the image against the public key and verify the signature's authenticity. Using the public key, I can verify the image signing key signature. + + +``` + + +$ cosign verify --key cosign.pub docker.io/mzali/test:latest + +Verification for index.docker.io/mzali/test:latest -- +The following checks were performed on each of these signatures: +  - The cosign claims were validated +  - The signatures were verified against the specified public key +  - Any certificates were verified against the Fulcio roots. + +[{"critical":{"identity":{"docker-reference":"index.docker.io/mzali/test"},"image":{"docker-manifest-digest":"sha256:25ca0d9c2f4e70ce3bfba7891065dfef09760d2cbace7a2d21fb13c569902133"},"type":"cosign container image signature"},"optional":null}] + +``` + +### Do the same for SBOM + +Next, I want also to [sign the SBOMs][7]. In this example, I use `alpine:latest` image to show how you can do it. + +The alpine container image already got pushed to the registry. I first need to generate the SBOM from the image, and I use the `syft` binary from the [syft project][8]. Since I'm testing on a macOS-based system, I am going to use brew to install it. + + +``` + + +$ brew tap anchore/syft +$ brew install syft + +``` + +I check to see what packages are inside the alpine container image in the registry using `syft`.  + + +``` + + +$ syft packages mzali/alpine         + ✔ Loaded image             + ✔ Parsed image             + ✔ Cataloged packages      [14 packages] + +NAME                    VERSION      TYPE +alpine-baselayout       3.2.0-r16    apk   +alpine-keys             2.4-r0       apk   +apk-tools               2.12.7-r0    apk   +busybox                 1.33.1-r6    apk   +ca-certificates-bundle  20191127-r5  apk   +libc-utils              0.7.2-r3     apk   +libcrypto1.1            1.1.1l-r0    apk   +libretls                3.3.3p1-r2   apk   +libssl1.1               1.1.1l-r0    apk   +musl                    1.2.2-r3     apk   +musl-utils              1.2.2-r3     apk   +scanelf                 1.3.2-r0     apk   +ssl_client              1.33.1-r6    apk   +zlib                    1.2.11-r3    apk + +``` + +Now I am about to sign this SBOM. I want the SBOM as [SPDX][9] 2.2 tag-value formatted (or another supported format, in this example, I choose SPDX format) and then attach it to the image. + + +``` + + +$ syft packages mzali/alpine -o spdx  > latest.spdx + ✔ Loaded image             + ✔ Parsed image             + ✔ Cataloged packages      [14 packages] + +$  ls -lrt latest.spdx +-rw-r--r--  1 yanked  yanked  10058 Nov 17 15:52 latest.spdx + +$ cosign attach sbom --sbom latest.spdx mzali/alpine +Uploading SBOM file for [index.docker.io/mzali/alpine:latest] to [index.docker.io/mzali/alpine:sha256-5e604d3358ab7b6b734402ce2e19ddd822a354dc14843f34d36c603521dbb4f9.sbom] with mediaType [text/spdx]. + +``` + +Using the digest output from the above, I sign the SBOM in the registry and verify it. + + +``` + + +$ cosign sign --key cosign.key docker.io/mzali/alpine:sha256-5e604d3358ab7b6b734402ce2e19ddd822a354dc14843f34d36c603521dbb4f9.sbom +Enter password for private key: %     + +$ cosign verify --key cosign.pub docker.io/mzali/alpine:sha256-5e604d3358ab7b6b734402ce2e19ddd822a354dc14843f34d36c603521dbb4f9.sbom + +Verification for index.docker.io/mzali/alpine:sha256-5e604d3358ab7b6b734402ce2e19ddd822a354dc14843f34d36c603521dbb4f9.sbom -- +The following checks were performed on each of these signatures: +  - The cosign claims were validated +  - The signatures were verified against the specified public key +  - Any certificates were verified against the Fulcio roots. + +[{"critical":{"identity":{"docker-reference":"index.docker.io/mzali/alpine"},"image":{"docker-manifest-digest":"sha256:00a101b8d193c294e2c9b3099b42a7bc594b950fbf535d98304d4c61fad5491b"},"type":"cosign container image signature"},"optional":null}] + +``` + +### What's next? + +The simplest way to use `cosign` is to include this into your SDLC pipeline, as examples of Jenkins or Tekton tools. Using `cosign`, I can include it into the build process to sign and verify my software. If you are using Kubernetes, there is a Kubernetes [cosigned admission controller][10] that can look at your image signature and compare it against the specified public key. If the image is unsigned or uses an unknown key, the admission controller blocks it due to the violation: + + +``` + + +$ kubectl apply -f unsigned-deployment.yaml +Error from server (BadRequest): error when creating "unsigned-deployment.yaml": admission webhook "cosigned.sigstore.dev" denied the request: validation failed: invalid image signature: spec.template.spec.containers[0].image + +``` + +And again, `cosign` is just the tip of the iceberg from the whole sigstore project. These components are collaborative, integrate, and provide tampering resistance, strong verification points, and secure the software much easier using the same standard! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/sigstore-container-images + +作者:[Muhammad Aizuddin Zali][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/aizuddin85 +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/containers_modules_networking_hardware_parts.png?itok=rPpVj92- (Parts, modules, containers for software) +[2]: https://www.sigstore.dev/ +[3]: https://github.com/sigstore/fulcio +[4]: https://github.com/sigstore/rekor +[5]: https://github.com/sigstore/cosign +[6]: https://www.redhat.com/files/summit/2015/12017_immutable-infrastructure-containers-the-future-of-microservices.pdf +[7]: https://docs.sigstore.dev/cosign/SBOM +[8]: https://github.com/anchore/syft +[9]: https://www.linuxfoundation.org/blog/spdx-its-already-in-use-for-global-software-bill-of-materials-sbom-and-supply-chain-security/ +[10]: https://github.com/sigstore/helm-charts/tree/main/charts/cosigned From 0922fd5b204b6cb863fe643b76802bafe8c63fe0 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 7 Dec 2021 05:04:43 +0800 Subject: [PATCH 109/244] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020211206=20?= =?UTF-8?q?Blender=203.0=20is=20a=20Milestone=20Release=20to=20Step=20Up?= =?UTF-8?q?=20Open=20Source=202D/3D=20Content=20Creation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20211206 Blender 3.0 is a Milestone Release to Step Up Open Source 2D-3D Content Creation.md --- ...p Up Open Source 2D-3D Content Creation.md | 117 ++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 sources/news/20211206 Blender 3.0 is a Milestone Release to Step Up Open Source 2D-3D Content Creation.md diff --git a/sources/news/20211206 Blender 3.0 is a Milestone Release to Step Up Open Source 2D-3D Content Creation.md b/sources/news/20211206 Blender 3.0 is a Milestone Release to Step Up Open Source 2D-3D Content Creation.md new file mode 100644 index 0000000000..dd725f591e --- /dev/null +++ b/sources/news/20211206 Blender 3.0 is a Milestone Release to Step Up Open Source 2D-3D Content Creation.md @@ -0,0 +1,117 @@ +[#]: subject: "Blender 3.0 is a Milestone Release to Step Up Open Source 2D/3D Content Creation" +[#]: via: "https://news.itsfoss.com/blender-3-0-release/" +[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Blender 3.0 is a Milestone Release to Step Up Open Source 2D/3D Content Creation +====== + +Blender 3.0 marks the major leap of open-source 3D/2D content creation. This release has numerous changes, ranging from a refreshed user interface to improved rendering options. + +This release is sure to excite all 3D artists, regardless of their skill level. + +Overall, the release involves many fascinating changes and could be industry-leading in some cases. + +### What’s New? + +![][1] + +Considering it is one of the biggest releases in years, it can only be expected that Blender 3.0 offers something for all its users. Fortunately, it appears that the Blender team has managed to do just this, with more new features than we could ever fit into a single article. + +Here are some of my favorites: + + * Significantly faster Cycles renderer + * More optimized viewport for improved responsiveness + * Brand-new asset browser + * A visual refresh sporting more rounded corners and improved theme + * Fast loading and saving of .blend files + + + +Let us take a more detailed look at all these incredible new features! + +#### Cycle Renderer Improvements + +Introduced with Blender 2.61 back in 2011, the Cycles rendering engine has been the standard Blender renderer ever since. Now, Blender 3.0 is getting an incredible boost in performance. Perhaps a 20% increase, maybe even 50%? No, the Blender team has done the impossible and made the Cycles render 2–8 times faster, with astounding results. + +![Image credit: Blender][2] + +This is huge for almost all Blender users, although perhaps even more important for those on low-end systems. Rendering has always been one of the most time-consuming tasks in 3d animation, and any performance improvements are always welcome. After seeing the improvements to Cycles in Blender 3.0, I can’t wait to see what we will get in Blender 3.1! + +#### More Optimized Viewport + +Thanks to various improvements in scheduling and display algorithms, Blender’s viewport is now more responsive than ever. The screenshot below shows that Blender 3.0 has much faster in-viewport rendering than Blender 2.92. This is great for when artists are lighting scenes, as it allows changes to be previewed quicker and, therefore, faster tweaking. + +![Image credit: Blender][3] + +Yet again, the Blender developers have managed to astound us with their incredible work at optimizing the software. It is genuinely unique what they have managed to achieve with this feature. + +#### Brand-New Asset Browser + +A notable feature of many other 3D animation software suites, the asset browser is set to become a key component in Blender 3.0’s workflow. With support for materials, objects, and world datablocks, it offers an astounding array of features for its debut release. As expected, drag-and-drop is supported out-of-the-box and works surprisingly well. + +![Image credit: Blender][3] + +After messing around with it for a few hours, I have to say that I am pleasantly surprised at how much this addition has benefited my workflow. Not only has it improved the speed at which I can insert objects and materials into scenes, but it has also allowed much better organizing of files within projects. + +For me, this is the biggest new feature in Blender 3.0, and I’m sure many other users will find the same. + +#### Modern UI Refresh + +First introduced in Blender 2.8, the Blender Dark theme has received quite a few improvements with Blender 3.0. + +While subtle, a closer look at some of the changes brings out vast improvements in Blender’s UX, with much clearer separation between controls and a greater visual hierarchy. + +![Image credit: Blender][4] + +The result is a much more modern-looking UI that is far superior (in my opinion) to all its competitors. Welcome to the new look of Blender! + +#### Improved Loading and Saving of Files + +![Image credit: Blender][5] + +While not exactly a sore point of Blender, the loading and saving of files has now been significantly improved with Blender 3.0. This is thanks to Blender switching from Gzip to Zstd compression for its .blend files. The result is loading times that are magnitudes faster, probably over ten times fast in my testing! + +There are numerous other changes that involve add-ons, virtual reality support, UI, modeling, and several more. You can check out the [official release notes][6] and [developer blog posts][7] to explore more about the changes in this release. + +### Wrapping Up + +With all the new features of Blender 3.0, it should encourage artists to try using the open-source tool Blender for 3D/2D content creation. + +If you want to try out Blender 3.0 for yourself, it is available to download for free from the Blender website. You can download it for Linux, Windows, and macOS. + +[Download Blender 3.0][8] + +_Are you going to be upgrading to Blender 3.0? Let me know in the comments below!_ + +#### Big Tech Websites Get Millions in Revenue, It's FOSS Got You! + +If you like what we do here at It's FOSS, please consider making a donation to support our independent publication. Your support will help us keep publishing content focusing on desktop Linux and open source software. + +I'm not interested + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/blender-3-0-release/ + +作者:[Jacob Crume][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://news.itsfoss.com/author/jacob/ +[b]: https://github.com/lujun9972 +[1]: https://i2.wp.com/i.ytimg.com/vi/JZIFWEY3l6k/hqdefault.jpg?w=780&ssl=1 +[2]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjIyMiIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[3]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQzOSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQwMSIgd2lkdGg9IjYwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[5]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjE5NyIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[6]: https://wiki.blender.org/wiki/Reference/Release_Notes/3.0 +[7]: https://code.blender.org +[8]: https://www.blender.org/download/ From 6de8a026179f4e394e7e7779720eb027b0040773 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 7 Dec 2021 05:04:59 +0800 Subject: [PATCH 110/244] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020211206=20?= =?UTF-8?q?Upcoming=20CutefishOS=20Could=20Topple=20Deepin=20as=20the=20Mo?= =?UTF-8?q?st=20Beautiful=20Linux=20Distro?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20211206 Upcoming CutefishOS Could Topple Deepin as the Most Beautiful Linux Distro.md --- ...epin as the Most Beautiful Linux Distro.md | 124 ++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 sources/news/20211206 Upcoming CutefishOS Could Topple Deepin as the Most Beautiful Linux Distro.md diff --git a/sources/news/20211206 Upcoming CutefishOS Could Topple Deepin as the Most Beautiful Linux Distro.md b/sources/news/20211206 Upcoming CutefishOS Could Topple Deepin as the Most Beautiful Linux Distro.md new file mode 100644 index 0000000000..97a9c1d6a3 --- /dev/null +++ b/sources/news/20211206 Upcoming CutefishOS Could Topple Deepin as the Most Beautiful Linux Distro.md @@ -0,0 +1,124 @@ +[#]: subject: "Upcoming CutefishOS Could Topple Deepin as the Most Beautiful Linux Distro" +[#]: via: "https://news.itsfoss.com/cutefishos-intro/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Upcoming CutefishOS Could Topple Deepin as the Most Beautiful Linux Distro +====== + +CutefishOS is a relatively new Linux distribution that comes bundled with its own desktop environment (i.e., CutefishDE). + +It is not yet a stable release, but in its beta phase. + +However, with its latest beta release (v0.6), it seems to be shaping up as a promising alternative to the available Linux distributions focusing on simplicity and beauty. + +Here, I shall highlight a few things about it before you get to try it yourself. + +### CutefishOS: Overview + +![][1] + +Note that it is still in its early stages of development. So, you should expect bugs and glitches if you are planning to try it later on. + +CutefishOS is based on [Debian 11 “Bullseye”][2]. Hence, it should be suitable for a variety of users, including new Linux users. + +It is worth noting that CutefishOS does not target advanced users. So, if you are looking for a distro that offers fine-grained controls and customizations out-of-the-box, this isn’t for you. + +Primarily, CutefishOS developers want to present a refreshing and hassle-free Linux distribution. + +Of course, we would recommend you to install [elementary OS][3], [Pop!_OS][4], [Zorin OS][5], or [Deepin][6] Linux if you want a blend of reliability with a unique desktop experience. + +And, CutefishOS plans to be one of the offerings in the same category of choice, which is a good thing. + +We have loads of Linux distributions, but not all of them focus on a modern UI and usability at the same level. So, if CutefishOS manages to provide what it aims for, this could turn out to be a useful option for Linux desktop users. + +### What’s Different About It? + +**User experience.** + +Yes, Linux distributions have been trying their best to provide one of the best desktop experiences when compared to Windows and macOS. + +![][7] + +And, CutefishOS tries to get in the game by introducing a macOS-inspired desktop experience (not the first time), but in a different way. + +Its desktop environment (DE) is built using Qt and basic KDE frameworks. This makes up for a good-looking and resource-efficient DE. + +CutefishOS also provides a global menu feature out of the box. In other words, every option that you get with your app is accessible directly from the status bar, which makes your application window look clean and potentially saves some screen space. + +![][8] + +While it is possible to implement it for GNOME or other desktop environments, you will have to invest some time to get it right. + +By default, it presents subtle animation effects, but you can choose to use the magic lamp effect, which is similar to the [Jelly Mode introduced with Zorin OS 16][9]. The CutefishOS applications like calculator, screenshot, files, and video player have been tailored for the desktop environment to give you a uniform experience. + +You can also choose between a dark/light mode theme, along with the ability to disable the system effects to minimize the impact on performance (if you are using an older computer). + +When it comes to customization, you can customize the dock placement, convert it to a full dockbar and choose to dim the wallpaper in dark mode. I would say, you get essential customization options that does not break your experience but lets you tweak a few things. + +You also get toggle switches (similar to iOS or other mobile phones) in the status bar to enable/disable Wi-Fi/Bluetooth and dark mode. + +![][10] + +If we talk about the functionalities, it currently provides basic features like drag and drop support for file manager, power management, media controls in lock screen, and a few more. + +You should not expect much, considering they aim for a simple and easy-to-use distro. + +![][11] + +### Should You Try CutefishOS? + +I tested the 0.6 beta release, which works mostly fine until I launched the Chromium browser (pre-installed) and the entire display went for a toss. + +It could just be me on my virtual machine. So, if you are interested to try it out, I recommend testing things out on a VM or a test machine instead of thinking to use it as a daily driver. + +[CutefishOS][12] + +Somehow, CutefishOS resembles the [JingOS][13], a new distro developed for Linux tablet [JingPad][14]. But they are not the same developers though CutefishOS’ website mentions JingOS as friends. + +Could it be “**yet another pretty distro**“? Only time will tell. + +It looks useful from the get-go, and if the developers are capable of providing a competing desktop experience, we could see it pop up as [one of the most beautiful Linux disros][15] in the coming years. + +After all, we all want to see “the year of Linux desktop” in its full glory, right? Let’s see what distro does that for us! + +What do you think about CutefishOS? Let me know your thoughts in the comments down below. + +#### Big Tech Websites Get Millions in Revenue, It's FOSS Got You! + +If you like what we do here at It's FOSS, please consider making a donation to support our independent publication. Your support will help us keep publishing content focusing on desktop Linux and open source software. + +I'm not interested + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/cutefishos-intro/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ0MiIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[2]: https://news.itsfoss.com/debian-11-feature/ +[3]: https://news.itsfoss.com/elementary-os-6-release/ +[4]: https://pop.system76.com +[5]: https://news.itsfoss.com/zorin-os-16-release/ +[6]: https://news.itsfoss.com/deepin-linux-20-2-2-release/ +[7]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjU4OSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[8]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjUzOCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[9]: https://news.itsfoss.com/zorin-os-16-features/ +[10]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjMzMSIgd2lkdGg9IjQ2NSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[11]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjUxMiIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[12]: https://en.cutefishos.com +[13]: https://en.jingos.com/ +[14]: https://itsfoss.com/jingpad-a1-review/ +[15]: https://itsfoss.com/beautiful-linux-distributions/ From eaee37e6a4107a9f0a93adb03fa2c94f1fdbcf6c Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 7 Dec 2021 05:05:11 +0800 Subject: [PATCH 111/244] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020211206=20?= =?UTF-8?q?GNOME=20has=20a=20Brand=20New=20Text=20Editor=20and=20it=20is?= =?UTF-8?q?=20Likely=20to=20Replace=20Gedit=20in=20GNOME=2042?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20211206 GNOME has a Brand New Text Editor and it is Likely to Replace Gedit in GNOME 42.md --- ... is Likely to Replace Gedit in GNOME 42.md | 106 ++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 sources/news/20211206 GNOME has a Brand New Text Editor and it is Likely to Replace Gedit in GNOME 42.md diff --git a/sources/news/20211206 GNOME has a Brand New Text Editor and it is Likely to Replace Gedit in GNOME 42.md b/sources/news/20211206 GNOME has a Brand New Text Editor and it is Likely to Replace Gedit in GNOME 42.md new file mode 100644 index 0000000000..3c00513c24 --- /dev/null +++ b/sources/news/20211206 GNOME has a Brand New Text Editor and it is Likely to Replace Gedit in GNOME 42.md @@ -0,0 +1,106 @@ +[#]: subject: "GNOME has a Brand New Text Editor and it is Likely to Replace Gedit in GNOME 42" +[#]: via: "https://news.itsfoss.com/gnome-text-editor-to-replace-gedit/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +GNOME has a Brand New Text Editor and it is Likely to Replace Gedit in GNOME 42 +====== + +Gedit is the default text editor for the GNOME desktop environment. It is a popular option and an effective text editor that offers all the essentials with a simple user interface. + +But, with GNOME evolving, there is a new text editor that hasn’t yet replaced gedit. And, looking at its next release, it might just be ready to replace gedit in the upcoming GNOME 42 release with a bunch of improvements. + +[Christian Hergert][1] shares more details about it in his [blog post][2] and on Twitter. + +In this article, let me highlight those new improvements to GNOME Text Editor. + +### Preferences Dialogue Makes a Comeback + +The preferences setting was moved to the sidebar as part of an experiment in its previous release. + +![][3] + +But, it did not prove to be as convenient and good-looking. + +So, the preferences dialogue is coming back (as shown in the screenshot below) that aims to blend in with the design language of other GNOME apps without being clunky. + +![Credits: Christian Hergert ][4] + +Looks pretty sweet to me and should give a better user experience compared to the sidebar implementation for sure! + +### Improved Open ‘Popover’ Feature + +![Credits: Christian Hergert ][5] + +When you try to open a recent file or search for something, a popover appears to quickly look for any recent files without launching a new dialogue box. + +This saves time and is a nice feature to have. With the upcoming release for text editor, this has received some slight improvements to appear slimmer and more effective. + +In other words, you will find it improved for keyboard navigation by simply hitting Ctrl + K and then looking for the file you want. + +### Introducing Recoloring Support + +The upcoming release for GNOME’s text editor will let you easily apply different style-scheme (or themes) that affects the entire application. + +The blog post mentions more about it: + +> The most visual piece of work this week was in introducing recoloring support. It builds atop [libadwaita][6] and uses a CSS provider to override the colors in the theme. I expect there will be a recoloring API in the not-too distant future for libadwaita which will provide this for us. + +Here’s a sample of what it looks like when you apply a style-scheme: + +![Credits: Christian Hergert ][7] + +You can find some of the themes bundled and can look for more as you explore. You can find more screenshot in Christian’s blog post. + +![Credits: Christian Hergert ][7] + +You can also find some other technical changes and a vim emulation easter egg by Christian as you explore the [blog post for more details][2]. + +### Will GNOME Text Editor Replace Gedit? + +As of now, there is no official confirmation on this. However, looking at the [development activity for gedit][8] (currently as 41 alpha version) with no significant additions in the past few releases, it could mean that the new GNOME Text Editor will replace gedit in GNOME 42. + +In fact, GNOME’s new text editor plans to officially replace gedit as mentioned in its [GitLab page][9], but will it happen with GNOME 42? Its developer, Christian Hergert, mentions in his blog + +> [Text Editor][9] has really been shaping up in the past couple weeks as we race towards getting things ready for GNOME 42. + +This could be taken as a hint that GNOME 42 may seem the inclusion of this new text editor. + +It’s not just GNOME. [KDE also has revamped Kate][10] by adding features for developers. You’ve got plenty of [open source text editors][11] to choose from. + +We shall keep an eye on it when it releases. What do you think? + +#### Big Tech Websites Get Millions in Revenue, It's FOSS Got You! + +If you like what we do here at It's FOSS, please consider making a donation to support our independent publication. Your support will help us keep publishing content focusing on desktop Linux and open source software. + +I'm not interested + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/gnome-text-editor-to-replace-gedit/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://twitter.com/hergertme +[2]: https://blogs.gnome.org/chergert/2021/12/03/text-editor-happenings/ +[3]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjYwMyIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjEwMjQiIHdpZHRoPSI2NzciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmVyc2lvbj0iMS4xIi8+ +[5]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjUyMiIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[6]: https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/ +[7]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjU3NyIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[8]: https://gitlab.gnome.org/GNOME/gedit +[9]: https://gitlab.gnome.org/GNOME/gnome-text-editor +[10]: https://news.itsfoss.com/kate/ +[11]: https://itsfoss.com/best-modern-open-source-code-editors-for-linux/ From 4007bb1cff316f663da02cfc54dfe4f4abadce1b Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 7 Dec 2021 08:41:25 +0800 Subject: [PATCH 112/244] translated --- ...Using Homebrew Package Manager on Linux.md | 222 ------------------ ...Using Homebrew Package Manager on Linux.md | 222 ++++++++++++++++++ 2 files changed, 222 insertions(+), 222 deletions(-) delete mode 100644 sources/tech/20211201 Installing and Using Homebrew Package Manager on Linux.md create mode 100644 translated/tech/20211201 Installing and Using Homebrew Package Manager on Linux.md diff --git a/sources/tech/20211201 Installing and Using Homebrew Package Manager on Linux.md b/sources/tech/20211201 Installing and Using Homebrew Package Manager on Linux.md deleted file mode 100644 index ea707f6289..0000000000 --- a/sources/tech/20211201 Installing and Using Homebrew Package Manager on Linux.md +++ /dev/null @@ -1,222 +0,0 @@ -[#]: subject: "Installing and Using Homebrew Package Manager on Linux" -[#]: via: "https://itsfoss.com/homebrew-linux/" -[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" -[#]: collector: "lujun9972" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Installing and Using Homebrew Package Manager on Linux -====== - -Homebrew, also known as Brew, is a command line package manager primarily created for macOS. - -[Homebrew][1] grew quite popular among macOS users as more developers created command line tools that could be easily installed with Homebrew. - -This popularity resulted in the creation of Linuxbrew, a Linux port for Homebrew. Since it is primarily Git and Ruby, and Linux and macOS are both Unix-like systems, Brew works good on both kind of operating systems. - -Linuxbrew project eventually merged with Homebrew project and now you just have one Brew project called Homebrew. - -Why am I calling it brew, instead of Homebrew? Because the command starts with brew. You’ll see it in detail in a later section. - -### Why use Homebrew package manager on Linux when you have got apt, dnf, snap etc? - -I know the feeling. You already have a good [package manager][2] provided by your distribution. In addition to that, you have Snap, Flatpak and other universal package system. - -Do you really need Homebrew package manager on your Linux system? The answer depends on your requirement, really. - -See, apart from the distribution’s package manager and universal packages, you’ll come across situations where you need other package managers like [Pip][3] (for Python applications) and [Cargo][4] (for Rust packages). - -Imagine you came across a good command line utility and want to try it. It’s repository mentions that it can be installed using brew or source code only. In such a case, having brew on your system could be helpful. After all, [installing from source code][5] in the 2020s is not fashionable (and comfortable). - -In other words, you’ll have an additional option in case you come across some interesting CLI tool that provides only brew installation option. - -### Install Homebrew on Ubuntu and other Linux distributions - -The installation is quite easy. You just have to make sure that you have got all the dependencies. - -#### Step 1: Install dependencies - -You need to have relatively newer version of gcc and glibc. You can [install build-essential package on Ubuntu][6] to get them. Apart from that, you also need to [install Git][7], Curl and procps (used for monitoring system process). - -You can install all of them together like this in Ubuntu and Debian based systems: - -``` - - sudo apt-get install build-essential procps curl file git - -``` - -![Iinstall dependencies for Homebrew in Ubuntu/Debian][8] - -For other distributions, please use your package manager and install these dependencies. - -#### Step 2: Install Homebrew - -You can see why you needed to [install Curl][9]. It allows you to [download the installation script file in the terminal][10]. - -Just enter this command: - -``` - - /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - -``` - -When asked for RETURN key, press enter: - -![Installing Homebrew on Ubuntu][11] - -At the end of the script competition, it recommends to run a few commands to add it to the PATH variable. Homebrew is actually installed in your home directory and then soft linked to the /usr/local directory. - -![Run the suggested command under Next steps to add Homebrew to PATh variable][12] - -You can [copy and paste in terminal][13] easily. Just select the command it suggests and press Ctrl+Shift+C to copy and Ctrl+Shift+V to paste. - -Alternatively, you can just copy paste this command: - -``` - - echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> $HOME/.bash_profile - -``` - -And then this: - -``` - - eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" - -``` - -![Adding brew commands to the PATH][14] - -#### Step 3: Verify brew installation - -You are almost done. Just verify that brew command is ready to run by using the brew doctor command: - -``` - - brew doctor - -``` - -The brew doctor command will tell you if there is any issue. - -You may double verify by installing the sample hello project: - -``` - - brew install hello - -``` - -If you see no errors, you can enjoy the Homebrew package manager on Linux. - -### Using brew command for installing, removing and managing packages - -Let me quickly tell you a few brew commands you can use for installing, removing and managing packages. - -Since Homebrew is installed in your home directory, you do not need sudo to run it (just like Pip and Cargo). - -To install a package with brew, use the install option: - -``` - - brew install package_name - -``` - -There is no autocompletion for the package name here. You need to know the exact package name. - -To remove a brew package, you can use either **remove** or **uninstall** option. Both works the same. - -``` - - brew remove package_name - -``` - -You can also list the installed brew packages with this command: - -``` - - brew list - -``` - -You can also remove the unneeded dependencies with the autoremove option: - -``` - - brew autoremove - -``` - -In the next screenshot, I had only two packages installed with brew but it also shows the dependencies installed for those packages. Even after removing the package, dependencies remained. The autoremove finally removed them. - -![Listing and removing brew apckages][15] - -There are a lot more brew command options but that is out of scope for this tutorial. You can always [go through their documentation][16] and explore it further. - -### Removing Homebrew from Linux - -This tutorial won’t complete without adding the steps for removing Homebrew from your Linux system. - -As per the [steps mentioned on its GitHub repository][17], you have to download and run the uninstall script using this command: - -``` - - /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)" - -``` - -You’ll be asked to confirm the removal by entering the Y key. - -![Removing Homebrew from Linux][18] - -When the uninstallation of Homebrew completes, it lists the files and directories it has leftover: - -![Remaining files after Homebrew removal][19] - -I let you remove the files and directories on your own. - -### Conclusion - -As I explained earlier, Homebrew provides an extension to what you have already got. If you stumble upon an application that has only brew as installation method, having Homebrew installed on your Linux system will come handy. - -Anything you want to add to this topic or share your question or opinion? Please use the comment section. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/homebrew-linux/ - -作者:[Abhishek Prakash][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/abhishek/ -[b]: https://github.com/lujun9972 -[1]: https://brew.sh/ -[2]: https://itsfoss.com/package-manager/ -[3]: https://itsfoss.com/install-pip-ubuntu/ -[4]: https://itsfoss.com/install-rust-cargo-ubuntu-linux/ -[5]: https://itsfoss.com/install-software-from-source-code/ -[6]: https://itsfoss.com/build-essential-ubuntu/ -[7]: https://itsfoss.com/install-git-ubuntu/ -[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/install-dependencies-for-homebrew-linux.png?resize=800%2C493&ssl=1 -[9]: https://itsfoss.com/install-curl-ubuntu/ -[10]: https://itsfoss.com/download-files-from-linux-terminal/ -[11]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/installing-homebrew-ubuntu.png?resize=800%2C453&ssl=1 -[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/adding-homebrew-to-path-Linux.png?resize=800%2C442&ssl=1 -[13]: https://itsfoss.com/copy-paste-linux-terminal/ -[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/post-installation-steps-for-brew.png?resize=786%2C348&ssl=1 -[15]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/brew-remove-packages.png?resize=800%2C572&ssl=1 -[16]: https://docs.brew.sh/Manpage -[17]: https://github.com/homebrew/install#uninstall-homebrew -[18]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/removing-homebrew-from-Linux.png?resize=800%2C539&ssl=1 -[19]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/remaining-files-after-homebrew-removal.png?resize=800%2C464&ssl=1 diff --git a/translated/tech/20211201 Installing and Using Homebrew Package Manager on Linux.md b/translated/tech/20211201 Installing and Using Homebrew Package Manager on Linux.md new file mode 100644 index 0000000000..c170b65c41 --- /dev/null +++ b/translated/tech/20211201 Installing and Using Homebrew Package Manager on Linux.md @@ -0,0 +1,222 @@ +[#]: subject: "Installing and Using Homebrew Package Manager on Linux" +[#]: via: "https://itsfoss.com/homebrew-linux/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +在 Linux 上安装和使用 Homebrew 包管理器 +====== + +Homebrew,也被称为 Brew,是一个主要为 macOS 创建的命令行包管理器。 + +[Homebrew][1] 在 macOS 用户中相当流行,因为更多的开发者创造了可以用 Homebrew 轻松安装的命令行工具。 + +这种流行导致了 Linuxbrew 的诞生,它是 Homebrew 的一个 Linux 移植。由于它主要是 Git 和 Ruby,而 Linux 和 macOS 都是类 Unix 的系统,所以 Brew 在两种操作系统上都能很好地工作。 + +Linuxbrew 项目最终与 Homebrew 项目合并,现在你只有一个 Brew 项目,叫做 Homebrew。 + +为什么我叫它brew,而不是Homebrew?因为命令以brew开头。你会在后面的章节中看到它的详细内容。 + +### 当你有 apt、dnf、snap 等软件时,为什么还要在 Linux 上使用 Homebrew 包管理器? + +我知道这种感觉。你已经有一个由你的发行版提供的好的[包管理器][2]。除此之外,你还有 Snap、Flatpak 和其他通用软件包系统。 + +你真的需要 Homebrew 包管理器在你的 Linux 系统上吗?答案取决于你的需求。 + +你看,除了发行版的包管理器和通用包管理器,你会遇到需要其他包管理器的情况,比如 [Pip][3] (用于Python 应用)和 [Cargo][4] (用于 Rust 软件包)。 + +想象一下,你遇到了一个很好的命令行工具,想试试。它的软件库提到它可以使用 brew 或源代码来安装。在这种情况下,在你的系统上有 brew 可能会有帮助。毕竟,在 2020 年代,[从源代码安装][5]并不时髦(也不舒服)。 + +换句话说,如果你遇到一些有趣的命令行工具只提供 brew 安装选项,你会有一个额外的选择。 + +### 在 Ubuntu 和其他 Linux 发行版上安装 Homebrew + +安装是相当容易的。你只需要确保你已经有了所有的依赖项。 + +#### 步骤 1:安装依赖项 + +你需要有相对较新版本的 gcc 和 glibc。你可以[在 Ubuntu 上安装 build-essential 包][6]来获得它们。除此之外,你还需要[安装 Git][7]、Curl 和 procps(用于监控系统进程)。 + +在基于 Ubuntu 和 Debian 的系统中,你可以像这样一起安装所有这些东西: + +``` + + sudo apt-get install build-essential procps curl file git + +``` + +![Iinstall dependencies for Homebrew in Ubuntu/Debian][8] + +对于其他发行版,请使用你的包管理器并安装这些依赖项。 + +#### 步骤 2:安装 Homebrew + +你可以看到为什么你需要[安装 Curl][9]。它允许你[在终端下载安装脚本文件][10]。 + +只要输入这个命令: + +``` + + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + +``` + +当要求输入回车键时,请按下。 + +![Installing Homebrew on Ubuntu][11] + +在脚本最后,它建议运行几个命令,将其添加到 PATH 变量中。Homebrew 实际上是安装在你的主目录中,然后软链接到 /usr/local 目录中。 + +![Run the suggested command under Next steps to add Homebrew to PATh variable][12] + +你可以[在终端方便地复制和粘贴][13]。只要选择它所建议的命令,按 Ctrl+Shift+C 复制,按 Ctrl+Shift+V 粘贴。 + +或者,你也可以直接复制粘贴这个命令: + +``` + + echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> $HOME/.bash_profile + +``` + +然后是这个: + +``` + + eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" + +``` + +![Adding brew commands to the PATH][14] + +#### 步骤 3:验证 brew 的安装 + +你就快完成了。只需通过使用 brew doctor 命令来验证 brew 命令是否可以运行: + +``` + + brew doctor + +``` + +brew doctor 命令会告诉你是否有任何问题。 + +你可以通过安装示例 hello 项目再次验证: + +``` + + brew install hello + +``` + +如果你没有看到任何错误,你可以在 Linux 上享受 Homebrew 包管理器。 + +### 使用 brew 命令来安装、删除和管理软件包 + +让我快速告诉你几个可以用来安装、删除和管理软件包的 brew 命令。 + +由于 Homebrew 安装在你的主目录中,你不需要 sudo 来运行它(就像 Pip 和 Cargo)。 + +要用 brew 安装一个软件包,请使用安装选项: + +``` + + brew install package_name + +``` + +这里没有自动完成软件包名称的功能。你需要知道确切的软件包名称。 + +要删除一个 brew 软件包,你可以使用 **remove** 或 **uninstall** 选项。两者的作用是一样的。 + +``` + + brew remove package_name + +``` + +你也可以用这个命令列出已安装的 brew 软件包: + +``` + + brew list + +``` + +你也可以用 autoremove 选项删除不需要的依赖: + +``` + + brew autoremove + +``` + +在下一张截图中,我只用 brew 安装了两个软件包,但它也显示了这些软件包的依赖关系。即使在移除软件包后,依赖关系仍然存在。autoremove 终于把它们删除了。 + +![Listing and removing brew apckages][15] + +还有很多brew命令选项,但这不在本教程的范围内。你可以随时[翻阅他们的文档][16]并进一步探索。 + +### 从Linux中删除 Homebrew + +如果不加入从你的 Linux 系统中删除 Homebrew 的步骤,本教程就不完整。 + +根据[GitHub仓库中提到的步骤][17],你必须下载并使用这个命令运行卸载脚本: + +``` + + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)" + +``` + +你会被要求输入 Y 键来确认删除。 + +![Removing Homebrew from Linux][18] + +当 Homebrew 的卸载完成后,它会列出它所遗留的文件和目录: + +![Remaining files after Homebrew removal][19] + +我让你自己去删除这些文件和目录。 + +### 总结 + +正如我前面解释的,Homebrew 为你已经有的东西提供了一个扩展。如果你偶然发现一个只有 brew 安装方式的应用,在你的 Linux 系统上安装 Homebrew 会很方便。 + +你对这个话题有什么要补充的,或者分享你的问题或意见?请在评论区留言。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/homebrew-linux/ + +作者:[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://brew.sh/ +[2]: https://itsfoss.com/package-manager/ +[3]: https://itsfoss.com/install-pip-ubuntu/ +[4]: https://itsfoss.com/install-rust-cargo-ubuntu-linux/ +[5]: https://itsfoss.com/install-software-from-source-code/ +[6]: https://itsfoss.com/build-essential-ubuntu/ +[7]: https://itsfoss.com/install-git-ubuntu/ +[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/install-dependencies-for-homebrew-linux.png?resize=800%2C493&ssl=1 +[9]: https://itsfoss.com/install-curl-ubuntu/ +[10]: https://itsfoss.com/download-files-from-linux-terminal/ +[11]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/installing-homebrew-ubuntu.png?resize=800%2C453&ssl=1 +[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/adding-homebrew-to-path-Linux.png?resize=800%2C442&ssl=1 +[13]: https://itsfoss.com/copy-paste-linux-terminal/ +[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/post-installation-steps-for-brew.png?resize=786%2C348&ssl=1 +[15]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/brew-remove-packages.png?resize=800%2C572&ssl=1 +[16]: https://docs.brew.sh/Manpage +[17]: https://github.com/homebrew/install#uninstall-homebrew +[18]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/removing-homebrew-from-Linux.png?resize=800%2C539&ssl=1 +[19]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/remaining-files-after-homebrew-removal.png?resize=800%2C464&ssl=1 From 9a725f2c92193fc20c258615bf38dff390bad677 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 7 Dec 2021 08:47:25 +0800 Subject: [PATCH 113/244] translating --- sources/tech/20200307 Compose music as code using Sonic Pi.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20200307 Compose music as code using Sonic Pi.md b/sources/tech/20200307 Compose music as code using Sonic Pi.md index 9173fc5a90..d2c65c3a5f 100644 --- a/sources/tech/20200307 Compose music as code using Sonic Pi.md +++ b/sources/tech/20200307 Compose music as code using Sonic Pi.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 9c4952e7d197acf4e432beb5e7eda9b79905bc56 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 7 Dec 2021 09:29:48 +0800 Subject: [PATCH 114/244] APL --- ...OS Could Topple Deepin as the Most Beautiful Linux Distro.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/news/20211206 Upcoming CutefishOS Could Topple Deepin as the Most Beautiful Linux Distro.md b/sources/news/20211206 Upcoming CutefishOS Could Topple Deepin as the Most Beautiful Linux Distro.md index 97a9c1d6a3..ff9786a207 100644 --- a/sources/news/20211206 Upcoming CutefishOS Could Topple Deepin as the Most Beautiful Linux Distro.md +++ b/sources/news/20211206 Upcoming CutefishOS Could Topple Deepin as the Most Beautiful Linux Distro.md @@ -2,7 +2,7 @@ [#]: via: "https://news.itsfoss.com/cutefishos-intro/" [#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "wxy" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 8be4e8730f96d21b6df7114fd2ca3a03a21fc88c Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 7 Dec 2021 10:40:45 +0800 Subject: [PATCH 115/244] TSL&PRF --- ...epin as the Most Beautiful Linux Distro.md | 124 ------------------ ...epin as the Most Beautiful Linux Distro.md | 122 +++++++++++++++++ 2 files changed, 122 insertions(+), 124 deletions(-) delete mode 100644 sources/news/20211206 Upcoming CutefishOS Could Topple Deepin as the Most Beautiful Linux Distro.md create mode 100644 translated/news/20211206 Upcoming CutefishOS Could Topple Deepin as the Most Beautiful Linux Distro.md diff --git a/sources/news/20211206 Upcoming CutefishOS Could Topple Deepin as the Most Beautiful Linux Distro.md b/sources/news/20211206 Upcoming CutefishOS Could Topple Deepin as the Most Beautiful Linux Distro.md deleted file mode 100644 index ff9786a207..0000000000 --- a/sources/news/20211206 Upcoming CutefishOS Could Topple Deepin as the Most Beautiful Linux Distro.md +++ /dev/null @@ -1,124 +0,0 @@ -[#]: subject: "Upcoming CutefishOS Could Topple Deepin as the Most Beautiful Linux Distro" -[#]: via: "https://news.itsfoss.com/cutefishos-intro/" -[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" -[#]: collector: "lujun9972" -[#]: translator: "wxy" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Upcoming CutefishOS Could Topple Deepin as the Most Beautiful Linux Distro -====== - -CutefishOS is a relatively new Linux distribution that comes bundled with its own desktop environment (i.e., CutefishDE). - -It is not yet a stable release, but in its beta phase. - -However, with its latest beta release (v0.6), it seems to be shaping up as a promising alternative to the available Linux distributions focusing on simplicity and beauty. - -Here, I shall highlight a few things about it before you get to try it yourself. - -### CutefishOS: Overview - -![][1] - -Note that it is still in its early stages of development. So, you should expect bugs and glitches if you are planning to try it later on. - -CutefishOS is based on [Debian 11 “Bullseye”][2]. Hence, it should be suitable for a variety of users, including new Linux users. - -It is worth noting that CutefishOS does not target advanced users. So, if you are looking for a distro that offers fine-grained controls and customizations out-of-the-box, this isn’t for you. - -Primarily, CutefishOS developers want to present a refreshing and hassle-free Linux distribution. - -Of course, we would recommend you to install [elementary OS][3], [Pop!_OS][4], [Zorin OS][5], or [Deepin][6] Linux if you want a blend of reliability with a unique desktop experience. - -And, CutefishOS plans to be one of the offerings in the same category of choice, which is a good thing. - -We have loads of Linux distributions, but not all of them focus on a modern UI and usability at the same level. So, if CutefishOS manages to provide what it aims for, this could turn out to be a useful option for Linux desktop users. - -### What’s Different About It? - -**User experience.** - -Yes, Linux distributions have been trying their best to provide one of the best desktop experiences when compared to Windows and macOS. - -![][7] - -And, CutefishOS tries to get in the game by introducing a macOS-inspired desktop experience (not the first time), but in a different way. - -Its desktop environment (DE) is built using Qt and basic KDE frameworks. This makes up for a good-looking and resource-efficient DE. - -CutefishOS also provides a global menu feature out of the box. In other words, every option that you get with your app is accessible directly from the status bar, which makes your application window look clean and potentially saves some screen space. - -![][8] - -While it is possible to implement it for GNOME or other desktop environments, you will have to invest some time to get it right. - -By default, it presents subtle animation effects, but you can choose to use the magic lamp effect, which is similar to the [Jelly Mode introduced with Zorin OS 16][9]. The CutefishOS applications like calculator, screenshot, files, and video player have been tailored for the desktop environment to give you a uniform experience. - -You can also choose between a dark/light mode theme, along with the ability to disable the system effects to minimize the impact on performance (if you are using an older computer). - -When it comes to customization, you can customize the dock placement, convert it to a full dockbar and choose to dim the wallpaper in dark mode. I would say, you get essential customization options that does not break your experience but lets you tweak a few things. - -You also get toggle switches (similar to iOS or other mobile phones) in the status bar to enable/disable Wi-Fi/Bluetooth and dark mode. - -![][10] - -If we talk about the functionalities, it currently provides basic features like drag and drop support for file manager, power management, media controls in lock screen, and a few more. - -You should not expect much, considering they aim for a simple and easy-to-use distro. - -![][11] - -### Should You Try CutefishOS? - -I tested the 0.6 beta release, which works mostly fine until I launched the Chromium browser (pre-installed) and the entire display went for a toss. - -It could just be me on my virtual machine. So, if you are interested to try it out, I recommend testing things out on a VM or a test machine instead of thinking to use it as a daily driver. - -[CutefishOS][12] - -Somehow, CutefishOS resembles the [JingOS][13], a new distro developed for Linux tablet [JingPad][14]. But they are not the same developers though CutefishOS’ website mentions JingOS as friends. - -Could it be “**yet another pretty distro**“? Only time will tell. - -It looks useful from the get-go, and if the developers are capable of providing a competing desktop experience, we could see it pop up as [one of the most beautiful Linux disros][15] in the coming years. - -After all, we all want to see “the year of Linux desktop” in its full glory, right? Let’s see what distro does that for us! - -What do you think about CutefishOS? Let me know your thoughts in the comments down below. - -#### Big Tech Websites Get Millions in Revenue, It's FOSS Got You! - -If you like what we do here at It's FOSS, please consider making a donation to support our independent publication. Your support will help us keep publishing content focusing on desktop Linux and open source software. - -I'm not interested - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/cutefishos-intro/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://news.itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ0MiIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[2]: https://news.itsfoss.com/debian-11-feature/ -[3]: https://news.itsfoss.com/elementary-os-6-release/ -[4]: https://pop.system76.com -[5]: https://news.itsfoss.com/zorin-os-16-release/ -[6]: https://news.itsfoss.com/deepin-linux-20-2-2-release/ -[7]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjU4OSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[8]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjUzOCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[9]: https://news.itsfoss.com/zorin-os-16-features/ -[10]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjMzMSIgd2lkdGg9IjQ2NSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[11]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjUxMiIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[12]: https://en.cutefishos.com -[13]: https://en.jingos.com/ -[14]: https://itsfoss.com/jingpad-a1-review/ -[15]: https://itsfoss.com/beautiful-linux-distributions/ diff --git a/translated/news/20211206 Upcoming CutefishOS Could Topple Deepin as the Most Beautiful Linux Distro.md b/translated/news/20211206 Upcoming CutefishOS Could Topple Deepin as the Most Beautiful Linux Distro.md new file mode 100644 index 0000000000..a851a40376 --- /dev/null +++ b/translated/news/20211206 Upcoming CutefishOS Could Topple Deepin as the Most Beautiful Linux Distro.md @@ -0,0 +1,122 @@ +[#]: subject: "Upcoming CutefishOS Could Topple Deepin as the Most Beautiful Linux Distro" +[#]: via: "https://news.itsfoss.com/cutefishos-intro/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: " " +[#]: url: " " + +即将推出的 CutefishOS 可能取代深度成为最漂亮的 Linux 发行版 +====== + +> CutefishOS 能否以其美丽而简单的方式提供良好的 Linux 桌面体验? + +![](https://img.linux.net.cn/data/attachment/album/202112/07/104017u0wx6s8mfgl4xlhu.png) + +CutefishOS 是一个相对较新的 Linux 发行版,捆绑了它自己的桌面环境(即 CutefishDE)。 + +它还不是一个稳定的版本,尚处在测试阶段。 + +然而,随着其最新的测试版(v0.6)的发布,它似乎正在成为现有 Linux 发行版的一个有前途的替代方案,专注于简单和美丽。 + +在这里,我将在你自己尝试之前强调一些关于它的事情。 + +### CutefishOS 概览 + +![][1] + +请注意,它仍然处于早期开发阶段。因此,如果你打算稍后尝试,你应该对有错误和故障有心理准备。 + +CutefishOS 基于 [Debian 11 “Bullseye”][2],因此,它应该适用于各种用户,包括 Linux 新用户。 + +值得注意的是,CutefishOS 并不是是专门针对资深用户的。因此,如果你正在寻找一个能提供精细控制和马上就可以定制的发行版,这并不适合你。 + +重要的是,CutefishOS 的开发者希望呈现一个令人耳目一新、无需费心的 Linux 发行版。 + +当然,如果你想要一个融合了可靠性和独特桌面体验的 Linux,我们会推荐你安装 [elementary OS][3]、[Pop!_OS][4]、[Zorin OS][5] 或 [深度操作系统][6]。 + +而且,CutefishOS 计划成为同一类选择中的产品之一,这是一件好事。 + +我们有大量的 Linux 发行版,但并非所有的发行版都在现代 UI 和可用性方面处于同一水平。因此,如果 CutefishOS 能够达成其目标,这可能会成为 Linux 桌面用户的一个有用选择。 + +### 它有什么不同? + +**用户体验不同。** + +是的,与 Windows 和 macOS 相比,Linux 发行版一直试图成为最好的桌面体验之一。 + +![][7] + +而且,CutefishOS 试图通过引入受到 macOS 启发的桌面体验(它不是第一个这样做的发行版)来加入这场比赛,但方式不同。 + +它的桌面环境(DE)是使用 Qt 和基本的 KDE 框架构建的,以此搭建出来了一个好看且资源高效的 DE。 + +CutefishOS 还提供了一个开箱即用的全局菜单功能。换句话说,你的应用程序的每一个选项都可以直接从状态栏中找到,这使得你的应用程序窗口看起来很干净,并有可能节省一些屏幕空间。 + +![][8] + +虽然你也有可能在 GNOME 或其他桌面环境上实现这种功能,但你得投入一些时间来使其工作。 + +默认情况下,它呈现出细微的动画效果,但你可以选择使用魔法灯效果,这与 [Zorin OS 16 引入的 Jelly 模式][9] 相似。CutefishOS 的应用程序,如计算器、屏幕截图、文件和视频播放器,都是为该桌面环境量身定做的,给你提供了统一的体验。 + +你还可以选择深色/浅色模式的主题,同时可以禁用系统效果,以尽量减少对性能的影响(如果你使用的是旧电脑)。 + +说到定制,你可以定制 Dock 的位置,将其转换为一个完整的 Dockbar,并选择在暗色模式下调暗墙纸。我想说的是,这些基本的定制选项,不会破坏你的体验,但可以让你调整一些东西。 + +你还可以在状态栏中找到切换开关(类似于 iOS 或其他手机)来启用/禁用 Wi-Fi / 蓝牙和暗色模式。 + +![][10] + +至于功能,它目前已经提供了基本的功能,如文件管理器的拖放支持、电源管理、锁屏中的媒体控制,以及其他一些功能。 + +考虑到他们的目标是一个简单和易于使用的发行版,你不应该期望太多。 + +![][11] + +### 要不要试试 CutefishOS ? + +我测试了 0.6 测试版,它大部分工作正常,直到我启动了预装的 Chromium 浏览器,整个显示都出现了问题。 + +这可能只是我在我的虚拟机上的问题。所以,如果你有兴趣尝试,我建议在虚拟机或测试机上测试一下,而不是想把它作为日常驱动使用。 + +- [CutefishOS][12] + +不知何故,CutefishOS 很像 [JingOS][13],这是一个为 Linux 平板电脑 [JingPad][14] 开发的新发行版。但是他们并不是同一个开发商,尽管 CutefishOS 的网站提到 JingOS 是朋友。 + +它可能是 “又一个漂亮的发行版” 吗?只有时间才能证明。 + +它从一开始就看起来很有不错,如果开发者有能力提供一个有竞争力的桌面体验,我们或许可以在未来几年看到它作为 [最漂亮的 Linux 发行版之一][15] 冒出来。 + +毕竟,我们都想真正看到 “Linux 桌面之年”,对吗?让我们看看是什么发行版为我们做到了这一点! + +你对 CutefishOS 有什么看法?请在下面的评论中告诉我你的想法。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/cutefishos-intro/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/cutefish-os.png?w=1355&ssl=1 +[2]: https://news.itsfoss.com/debian-11-feature/ +[3]: https://news.itsfoss.com/elementary-os-6-release/ +[4]: https://pop.system76.com +[5]: https://news.itsfoss.com/zorin-os-16-release/ +[6]: https://news.itsfoss.com/deepin-linux-20-2-2-release/ +[7]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/cutefish-os-appearance.png?w=950&ssl=1 +[8]: https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/cutefish-os-global-menu.png?w=823&ssl=1 +[9]: https://news.itsfoss.com/zorin-os-16-features/ +[10]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/system-tray-toggles.png?w=465&ssl=1 +[11]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/cutefish-os-about.png?w=999&ssl=1 +[12]: https://en.cutefishos.com +[13]: https://en.jingos.com/ +[14]: https://itsfoss.com/jingpad-a1-review/ +[15]: https://itsfoss.com/beautiful-linux-distributions/ From 73496363863fcac2b05f6eea55e645169d76daa4 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 7 Dec 2021 10:42:48 +0800 Subject: [PATCH 116/244] PUB @wxy https://linux.cn/article-14058-1.html --- ... Could Topple Deepin as the Most Beautiful Linux Distro.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/news => published}/20211206 Upcoming CutefishOS Could Topple Deepin as the Most Beautiful Linux Distro.md (98%) diff --git a/translated/news/20211206 Upcoming CutefishOS Could Topple Deepin as the Most Beautiful Linux Distro.md b/published/20211206 Upcoming CutefishOS Could Topple Deepin as the Most Beautiful Linux Distro.md similarity index 98% rename from translated/news/20211206 Upcoming CutefishOS Could Topple Deepin as the Most Beautiful Linux Distro.md rename to published/20211206 Upcoming CutefishOS Could Topple Deepin as the Most Beautiful Linux Distro.md index a851a40376..1381486e62 100644 --- a/translated/news/20211206 Upcoming CutefishOS Could Topple Deepin as the Most Beautiful Linux Distro.md +++ b/published/20211206 Upcoming CutefishOS Could Topple Deepin as the Most Beautiful Linux Distro.md @@ -4,8 +4,8 @@ [#]: collector: "lujun9972" [#]: translator: "wxy" [#]: reviewer: "wxy" -[#]: publisher: " " -[#]: url: " " +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14058-1.html" 即将推出的 CutefishOS 可能取代深度成为最漂亮的 Linux 发行版 ====== From 810072b410655ce09a478f409633f0c3f7bd0304 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 8 Dec 2021 05:02:35 +0800 Subject: [PATCH 117/244] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211208=20?= =?UTF-8?q?Linux=20Jargon=20Buster:=20What=20is=20a=20Cron=20Job=20in=20Li?= =?UTF-8?q?nux=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211208 Linux Jargon Buster- What is a Cron Job in Linux.md --- ...gon Buster- What is a Cron Job in Linux.md | 177 ++++++++++++++++++ 1 file changed, 177 insertions(+) create mode 100644 sources/tech/20211208 Linux Jargon Buster- What is a Cron Job in Linux.md diff --git a/sources/tech/20211208 Linux Jargon Buster- What is a Cron Job in Linux.md b/sources/tech/20211208 Linux Jargon Buster- What is a Cron Job in Linux.md new file mode 100644 index 0000000000..6330afd277 --- /dev/null +++ b/sources/tech/20211208 Linux Jargon Buster- What is a Cron Job in Linux.md @@ -0,0 +1,177 @@ +[#]: subject: "Linux Jargon Buster: What is a Cron Job in Linux?" +[#]: via: "https://itsfoss.com/cron-job/" +[#]: author: "Hunter Wittenborn https://itsfoss.com/author/hunter/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Linux Jargon Buster: What is a Cron Job in Linux? +====== + +In this part of our Linux Jargon Buster series, you’ll learn about cron in Linux. You’ll also learn the basics of creating cron jobs by editing crontab. + +### What is a cron job in Linux? + +Cron is a command line utility to run small and quick commands on a scheduled basis. This is a handy, classic sysadmin tool for automating various tasks by combining it with othe tools. For example, some people combine rsync and cron to automatically create a daily or weekly backup at a certain time. Some people use it to analyze server logs and combine it with mail function to send an email if there is certain kind of error detected in the logs. + +Cron is like the Swiss army knife. It can be used for a variety of use cases. It’s really up to your imagination on what to use it for. + +Getting started with cron is super easy, and only takes a matter of seconds to get started. But before I show you that, I’ll discuss something else that often confuses Linux users. + +### Cron vs cron job vs crontab + +You are likely to come across three terms that sound similar to each other: cron, cron job and crontab. Let me quickly tell you what are those: + +cron: This is the actual program you install on your system and run as a [daemon][1]. + +cron job: A job in Linux is a program that is up and running. Cron can handle multiple tasks and run them at their scheduled time. Each of these tasks are referred to as ‘cron jobs’. + +[crontab][2]: This is the file (and command) where you define what task to run and how often to run it. A crontab can have multiple cron jobs in it in a tabular form where each row is a cron job. + +Let me share a sample cron job example that runs every hour and prints “Linux is cool!” to a file name crontab_log.txt. + +``` + + 0 * * * * echo "Linux is Cool!" >> ~/crontab_log.txt + +``` + +Even the simplest of the cron job may look scary and intimidating. This is because you need to know how to read a cron job properly. + +I’ll take this theoretical knowledge of cron to the next level in the next section. + +### Getting started with Cron + +Let’s start with (another) simple example of how Cron works. + +To create Cron jobs, or the commands that cron will execute, you simply run: + +``` + + crontab -e + +``` + +It will pull up a file to edit cron jobs with: + +![Crontab default view][3] + +All the lines that start with `#` (that being all the lines) only serve to help guide you on how to use cron, and can be removed if you don’t need them. + +We’ll be using the following as our first Cron job though: + +``` + + * * * * * touch ~/crontab_test + +``` + +Let’s go through what that will do real quick: + +Cron jobs come in the form `minute hour day month week command`. + + * **minute** in this context simply means what minutes of an hour the job will run. So specifying `0` would run at the very beginning of an hour, and specifying `5` would run on the fifth minute of an hour. + * Next, the **hour** declaration specified what hours of a day a job can run, ranging from values 0-23. The reason there isn’t a 24th hour option here is that `23` goes to the very end of what would be 11:59, at which point your at midnight, or hour `0` of the next day. This same logic applies to the `minute` declaration mentioned previously. + * **day** specifies what day of a month a job can run on, that being 1-31 (unlike the previous examples which started on `0`). + * **month** specifies which months of the year a job can run on, and takes values ranging from 1-12. + * Lastly, **week** specifies which days of the week a job runs on, starting on Sunday, with values from 0-6, unlike the last two. + + + +You then specify **command** which is just the command you want to run. + +![][4] + +If you want more help understanding the minute hour day month week part, I’d highly recommend the [Crontab guru][5] website, which can greatly help break down what exactly is going on: + +Following the previous example of *** * * * * touch ~/crontab_test** though, you’ll simply be running touch ~/crontab_test every minute. + +Let’s put that into the crontab and then see it in action: + +![][6] + +If you then wait until the next minute, you’ll see the crontab_test file located in your home directory: + +![][7] + +And that’s the basics to using cron! + +### A useful example of cron job + +That was far too simple (and useless probably). + +Say you want to do something a bit more complex, say a backup script that needs to copy files from multiple directories on your system into a single folder, and then archives that backup into a single file. + +This can be easily done by simply putting our commands into a script, which can then in turn be called by cron. + +Let’s use the following script as an example: + +``` + + #!/usr/bin/bash + echo "Backing up..." + mkdir -p ~/.local/tmp/ + tar -Pc ~/Documents/ -f ~/.local/tmp/backup.gz + +``` + +This script does the following things: + + 1. Makes sure the ~/.local/tmp/backup_dir directory exists on the system. + 2. Puts everything from ~/Documents/ into an archive located at ~/.local/tmp/backup.gz. + + + +Let’s run the script manually first so we can see that it actually works. + +First, let’s put the script at ~/backup_script like so: + +![][8] + +Then just copy the script contents that were shown above into the file. + +You then need to tell the system that our script is allowed to be executed by simply running chmod +x ~/backup_script: + +![][9] + +You can then test run our script by running ~/backup_script.sh, which simply tells our system the path to our script: + +![][10] + +You could then restore this backup by just running tar -xf ~/.local/tmp/backup.gz -C output_dir, where output_dir is the directory to save the files to. + +This script can now run on a scheduled basis by using Cron! + +For example, if you wanted the script to run daily at 3 a.m., you could use the following syntax in cron: + +And then you’d have backups being created on a daily basis. + +### Wrapping Up + +And that’s just the introduction to cron jobs. It is widely used by the sysadmins though I am not sure of many usecases for desktop Linux users. If you do, please suggest some in the comment section. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/cron-job/ + +作者:[Hunter Wittenborn][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/hunter/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/linux-daemons/ +[2]: https://linuxhandbook.com/crontab/ +[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/crontab-file.webp?resize=800%2C673&ssl=1 +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/crontab-explanation.webp?resize=800%2C450&ssl=1 +[5]: https://crontab.guru/ +[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/cron-example-1.webp?resize=557%2C241&ssl=1 +[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/result-of-cron-job.webp?resize=557%2C241&ssl=1 +[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/complex-cron-example.webp?resize=548%2C295&ssl=1 +[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/complex-cron-example-1.webp?resize=548%2C385&ssl=1 +[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/complex-cron-result.png?resize=800%2C220&ssl=1 From 0dfb145cab833611bb230cfc8cdef660046b4d56 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 8 Dec 2021 05:02:56 +0800 Subject: [PATCH 118/244] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211207=20?= =?UTF-8?q?Anyone=20can=20draw=20on=20Linux=20with=20Inkscape?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211207 Anyone can draw on Linux with Inkscape.md --- ... Anyone can draw on Linux with Inkscape.md | 165 ++++++++++++++++++ 1 file changed, 165 insertions(+) create mode 100644 sources/tech/20211207 Anyone can draw on Linux with Inkscape.md diff --git a/sources/tech/20211207 Anyone can draw on Linux with Inkscape.md b/sources/tech/20211207 Anyone can draw on Linux with Inkscape.md new file mode 100644 index 0000000000..d1c8046efe --- /dev/null +++ b/sources/tech/20211207 Anyone can draw on Linux with Inkscape.md @@ -0,0 +1,165 @@ +[#]: subject: "Anyone can draw on Linux with Inkscape" +[#]: via: "https://opensource.com/article/21/12/linux-draw-inkscape" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Anyone can draw on Linux with Inkscape +====== +A step-by-step tutorial for how to use vector illustration with +Inkscape. +![Painting art on a computer screen][1] + +Inkscape is an illustration application, and it works in vectors to ensure limitless resolution for your drawings. Vector illustration is different from freehand illustration. If you're used to drawing freehand, vectors may at first feel restrictive, but once you get used to how vectors get created and how you can use them to construct an image, it's a powerful way to build visuals of all sorts. And if you're not much of an illustrator at all, you might just find that the hands-off approach of vectors means you can draw in Inkscape even though you can't draw with pen and paper. + +### Install Inkscape on Linux + +Inkscape is [available for Linux, Windows, and macOS][2]. + +On Fedora, Mageia, and similar distributions, you can install it with your package manager: + + +``` +`$ sudo dnf install inkscape` +``` + +On Elementary, Mint, and other Debian-based distributions: + + +``` +`$ sudo apt install inkscape` +``` + +Personally, I use Inkscape as a [Flatpak][3]. + +### Drawing in Inkscape + +The best way to learn is to do, and there's nothing quite as festive as a sugar skull, so you may as well celebrate your soon-to-be-discovered new talent by drawing one. + +Whether or not you consider yourself an illustrator, open Inkscape and find the Circle tool. You can find all the drawing tools along the left side of the Inkscape window. + +Once you've selected the circle tool, click and drag on the canvas to draw an ellipse. It doesn't have to be a perfect circle, but if you want it to be, you can hold down **Ctrl** as you draw. + +![Draw a circle][4] + +(Seth Kenlon, [CC BY-SA 4.0][5]) + +You've just drawn a _shape_. It may or may not look exactly like the one I've drawn, and that's OK. There are at least two standard properties to any shape you draw in Inkscape: the _fill_ and the _stroke_. The stroke is the outline of a shape, and the fill is the part within the outline. You can customize both with the **Fill and Stroke** panel. + +You can access the property panels (Inkscape calls them "Dialogs") with the icons on the right side of the Inkscape window. The **Fill and Stroke** dialog has three tabs: **Fill**, **Stroke Paint**, and **Stroke Style**. In the **Fill and Stroke** dialog, select the **Fill** tab and set the fill type to **Flat color**. Use the color wheel to give the fill of your shape a color. Then select the **Stroke paint** tab, set the stroke type to **Flat color**, and set a stroke color. + +### Unifying objects + +Next, use the rectangle tool to draw a jaw for the skull. + +![Two shapes][6] + +(Seth Kenlon, [CC BY-SA 4.0][5]) + +If you squint a little, this resembles the basic outline of a skull shape. That's a good start, but to smooth out some of the internal lines that aren't needed, you can unify the two separate shapes you've drawn, so it looks like you've just drawn one thing. This is a little like what real illustrators do when drawing with a pencil on paper: They erase _a lot_ because there are many sketch lines that people should never see. + +To make your two shapes into one, click on the **Select and transform** tool (the cursor icon at the top of the left toolbar). Click the circle, and then **Shift+click** the rectangle. Alternately, you can click and drag anywhere on your canvas to select all shapes you "lasso." Once both shapes are selected, go to the **Path** menu and select **Union**. + +![Union][7] + +(Seth Kenlon, [CC BY-SA 4.0][5]) + +### Duplicating objects + +Now that you're an old pro at drawing circles in Inkscape draw one circle (yes, just one) to serve as the eye sockets of your skull illustration. Once you have one eye drawn, draw an ellipse that cuts off the lower third of the eye socket and select both. + +![The beginning of a cartoon eye][8] + +(Seth Kenlon, [CC BY-SA 4.0][5]) + +With both selected, go to the **Path** menu and select **Difference**. This removes the topmost shape, plus everything it's covering, from the bottom shape. In this case, that leaves you with an eye socket with a pleasant suggestion of a "cheek" or, more precisely, cheek _bone_. + +Now that you have the shape of the eye socket, you need a second eye socket. Instead of trying to replicate your work exactly, you can have Inkscape just duplicate the shape for you. Click on the eye socket, go to the **Edit** menu, and select **Duplicate**. The shape gets duplicated in place. It probably doesn't look like anything happened, but it's there, just on top of the other. + +With one eye socket still selected, go to the **Object** menu and select **Flip Horizontal**. You can see the other eye socket now because one's got flipped. So **Ctrl+drag** one eye socket to the left or the right until you're happy with the spacing. The **Ctrl** key ensures that you're dragging in a straight line. + +Adjust the fill and stroke to your preference. + +### Hand-drawn shapes + +You're not limited to just circles and rectangles in Inkscape. There's a polygonal shape tool that lets you adjust the number of sides you want a shape to have, or you can draw a shape freehand. For the nose shape of the skull, use the **Draw bezier curves** tool (the first pen tool in the left toolbar). + +Although this tool looks like a pen, it's easiest at first to treat it more like a connect-the-dots tool. Don't click and drag the pen. Just click-and-release to create a node, and then move it and click-and-release again. Inkscape draws a line between each point you create. For this drawing, just make three points and double-click to end the shape at the third point. + +![An open triangle][9] + +(Seth Kenlon, [CC BY-SA 4.0][5]) + +Even though the shape appears open, it still has a fill property. If your fill is white on white, it might be hard to see that, so open the **Fill and stroke** dialog on the right side of the Inkscape window, select the **Fill** tab, and give the shape a fill color. + +There's no need for the shape to be open, except that I wanted to demonstrate that even open objects have the fill property, so you can either connect the two open nodes or leave it open. + +The triangle you've drawn can serve as the "nose" of your skill illustration. To make it less like a jack-o-lantern and more human, though, you can give it a little roundness by editing the lines you've drawn. This is something you can do because your lines are _paths_, which indicates that it's an individual line calculated and drawn by Inkscape based on where you clicked to create nodes. + +To edit a path, activate the **Edit paths by nodes** tool (the second tool from the top of the left toolbar). Use this tool to grab one of the lines you've drawn and drag and drop it to give it a nice organic curve. + +![Editing paths][10] + +(Seth Kenlon, [CC BY-SA 4.0][5]) + +### Stroke properties + +To decorate your sugar skull, click an eye socket and duplicate it (the shortcut for this is **Ctrl+D**). In the **Fill and stroke** dialog, remove the fill from the duplicate, and then click the **Stroke style** tab. + +In the **Stroke style** tab, you can adjust the thickness of the stroke and how the stroke gets drawn. By default, strokes are solid lines, but in this case, make it a dotted line instead. + +![Stroke style][11] + +(Seth Kenlon, [CC BY-SA 4.0][5]) + +Give the stroke a festive color in the **Stroke paint** tab. + +![Stroke paint][12] + +(Seth Kenlon, [CC BY-SA 4.0][5]) + +Holding down both the **Shift** and **Ctrl** keys, click and drag the resize handle of the eye socket's bounding box. The **Shift** key forces the shape to expand from its center point, and the **Ctrl** key preserves its height and width aspect ratio. + +Expand the duplicate shape until it serves as an outline for the eye socket. Repeat this for the other eye socket and the nose. + +You have all the knowledge you need to make your sugar skull more elaborate, so spend a little time discovering other functions of Inkscape. + +![Finished drawing][13] + +(Seth Kenlon, [CC BY-SA 4.0][5]) + +### Anybody can draw + +Inkscape makes it possible for anyone to draw. As long as you can create circles and squares, and you're willing to learn the Inkscape tricks to transform, cut, combine, and edit objects, you can essentially draw with shapes instead of freehand lines. It's liberating for us who haven't spent the requisite 10,000 hours learning to draw well, and all the more powerful to those who have! Take some time to learn Inkscape. + +Inkscape is a magnificent open source vector graphics editor, with capabilities similar to... + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/linux-draw-inkscape + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/painting_computer_screen_art_design_creative.png?itok=LVAeQx3_ (Painting art on a computer screen) +[2]: https://inkscape.org +[3]: https://opensource.com/article/21/11/install-flatpak-linux +[4]: https://opensource.com/sites/default/files/uploads/inkscape-00-circle.jpg (Draw a circle) +[5]: https://creativecommons.org/licenses/by-sa/4.0/ +[6]: https://opensource.com/sites/default/files/uploads/inkscape-01-rectangle.jpg (Two shapes) +[7]: https://opensource.com/sites/default/files/uploads/inkscape-02-union.jpg (Union) +[8]: https://opensource.com/sites/default/files/uploads/inkscape-03-eye.jpg (The beginning of a cartoon eye) +[9]: https://opensource.com/sites/default/files/uploads/inkscape-04-triangle.jpg (An open triangle) +[10]: https://opensource.com/sites/default/files/uploads/inkscape-05-edit-path.jpg (Editing paths) +[11]: https://opensource.com/sites/default/files/uploads/inkscape-06-stroke-style.jpg (Stroke style) +[12]: https://opensource.com/sites/default/files/uploads/inkscape-07-stroke-paint.jpg (Stroke paint) +[13]: https://opensource.com/sites/default/files/uploads/inkscape-08-skull.jpg (Finished drawing) From 55f1d6e1e9bc98b4cb2408574e72d20c45bfb4a0 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 8 Dec 2021 05:03:07 +0800 Subject: [PATCH 119/244] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211207=20?= =?UTF-8?q?Learn=20more=20about=20distributed=20databases=20with=20Shardin?= =?UTF-8?q?gSphere?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211207 Learn more about distributed databases with ShardingSphere.md --- ...stributed databases with ShardingSphere.md | 97 +++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 sources/tech/20211207 Learn more about distributed databases with ShardingSphere.md diff --git a/sources/tech/20211207 Learn more about distributed databases with ShardingSphere.md b/sources/tech/20211207 Learn more about distributed databases with ShardingSphere.md new file mode 100644 index 0000000000..7c5f875759 --- /dev/null +++ b/sources/tech/20211207 Learn more about distributed databases with ShardingSphere.md @@ -0,0 +1,97 @@ +[#]: subject: "Learn more about distributed databases with ShardingSphere" +[#]: via: "https://opensource.com/article/21/12/apache-shardingsphere" +[#]: author: "Trista Pan https://opensource.com/users/trista-pan" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Learn more about distributed databases with ShardingSphere +====== +Apache ShardingSphere is an open source distributed database, plus an +ecosystem users and developers need for their database to provide a +customized and cloud-native experience. +![Cloud and databsae incons][1] + +Apache ShardingSphere is an open source distributed database, plus an ecosystem users and developers need for their database to provide a customized and cloud-native experience. In the three years since it joined the Apache Foundation, the ShardingSphere core team has worked hard with the community to create an open source, robust, and distributed database and a supporting ecosystem. + +ShardingSphere doesn't quite fit into the usual industry mold of a simple distributed database middleware solution. ShardingSphere recreates the distributed pluggable system, enabling actual user implementation scenarios to thrive and contributing valuable solutions to the community and the database industry. + +The aim of ShardingSphere is the _Database Plus_ concept. + +### Database Plus  + +Database Plus sets out to build a standard layer and an ecosystem layer above the fragmented database's basic services. A unified and standardized database usage specification provides for upper-level applications, and the challenges faced by businesses due to underlying databases fragmentation get minimized as much as possible. To link databases and applications, it uses traffic and data rendering and parsing. It provides users with enhanced core features, such as a distributed database, data security, database gateway, and stress testing. + +ShardingSphere uses a pluggable kernel architecture for Database Plus. That means there's modularity, which provides flexibility for the user. There are a few different layers: + + * **Foundation layer:** Provides a variety of access terminals and access forms to meet users' needs in different scenarios. + * **Plugin layer:** Provides infrastructure support by enabling extensibility. + * **Function layer:** Provides a variety of functional plugins that meet users' needs, allowing users a high degree of flexibility in plugin choice and combination. + * **Product layer:** This is the layer end users see. This provides them with industry-oriented and specific scenario-oriented products. In other words, it gives the users the right tools for whatever job they're doing. + + + +![Database Plus platform][2] + +(Trista Pan, [CC BY-SA 4.0][3]) + +### Standardized cluster management with DistSQL + +Apache ShardingSphere features the unique SQL dialect of DistSQL (distributed SQL) to connect all elements of the ShardingSphere ecosystem. As the standard interaction language of the ShardingSphere distributed database ecosystem, DistSQL allows users to use one SQL command to create, modify, or delete a distributed database table or encrypt or decrypt it. DistSQL also supports distributed scheduling management. + +![DistSQL][4] + +(Trista Pan, [CC BY-SA 4.0][3]) + +### Multi-access terminal + +ShardingSphere JDBC and ShardingSphere Proxy have been polished and tested for two years and are now available in production. Many community users provided relevant production community cases. + +Thanks to the shared core architecture, and different ShardingSphere adapters, users can choose hybrid adapter deployments if their production environment requires them to do so (shown in the figure below). + +![Hybrid deployment][5] + +(Trista Pan, [CC BY-SA 4.0][3]) + +### Distributed governance + +In the ShardingSphere ecosystem, where computing and storage are separated, there's the ability for distributed governance of databases so you can maintain many storage nodes, computing nodes, implement circuit breakers, and ensure high availability. + +![Distributed governance][6] + +(Trista Pan, [CC BY-SA 4.0][3]) + +### Monitoring with Grafana + +ShardingSphere also has status indicators to monitor your infrastructure. The agent dynamic loading mechanism provides you with metrics and tracing indicators, making it convenient to integrate the APM system with a Grafana dashboard. + +![Grafana dashboard][7] + +(Trista Pan, [CC BY-SA 4.0][3]) + +### Distributed database for a distributed community + +The community is continuing to optimize ShardingSphere and to integrate new ideas and industry scenarios. The community built it, and one of the main driving forces of development is user feedback. That's a feature of open source, but it's also a method of practice for this team. The core team members of the ShardingSphere community are happy to mentor anyone interested in open source and provide practice issues for students interested in helping in development. The team also hopes that new friends or contributors will join the community, promote the open exchange of ideas, and create a truly global developer community. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/apache-shardingsphere + +作者:[Trista Pan][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/trista-pan +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/bus_cloud_database.png?itok=lhhU42fg (Cloud and databsae incons) +[2]: https://opensource.com/sites/default/files/uploads/database-plus-platform.png (Database Plus platform) +[3]: tps://creativecommons.org/licenses/by-sa/4.0/ +[4]: https://opensource.com/sites/default/files/uploads/distsql.png (DistSQL) +[5]: https://opensource.com/sites/default/files/uploads/hybrid-deployment.png (Hybrid deployment) +[6]: https://opensource.com/sites/default/files/uploads/distributed-governance.png (Distributed governance) +[7]: https://opensource.com/sites/default/files/uploads/grafana-dashboard.png (Grafana dashboard) From feed5bbaea492370e083e11f706ee9e7c4d6672e Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 8 Dec 2021 05:03:29 +0800 Subject: [PATCH 120/244] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020211207=20?= =?UTF-8?q?Pop!=5FOS=20is=20Moving=20PPA=20Repositories=20to=20its=20Own?= =?UTF-8?q?=20System:=20Is=20System76=20Considering=20to=20Switch=20its=20?= =?UTF-8?q?Ubuntu=20Base=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20211207 Pop-_OS is Moving PPA Repositories to its Own System- Is System76 Considering to Switch its Ubuntu Base.md --- ...6 Considering to Switch its Ubuntu Base.md | 79 +++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 sources/news/20211207 Pop-_OS is Moving PPA Repositories to its Own System- Is System76 Considering to Switch its Ubuntu Base.md diff --git a/sources/news/20211207 Pop-_OS is Moving PPA Repositories to its Own System- Is System76 Considering to Switch its Ubuntu Base.md b/sources/news/20211207 Pop-_OS is Moving PPA Repositories to its Own System- Is System76 Considering to Switch its Ubuntu Base.md new file mode 100644 index 0000000000..868ddb0bf6 --- /dev/null +++ b/sources/news/20211207 Pop-_OS is Moving PPA Repositories to its Own System- Is System76 Considering to Switch its Ubuntu Base.md @@ -0,0 +1,79 @@ +[#]: subject: "Pop!_OS is Moving PPA Repositories to its Own System: Is System76 Considering to Switch its Ubuntu Base?" +[#]: via: "https://news.itsfoss.com/pop-os-ppa-repo-move/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Pop!_OS is Moving PPA Repositories to its Own System: Is System76 Considering to Switch its Ubuntu Base? +====== + +Pop!_OS has been making news for some of its recent development decisions. + +For instance, they introduced a [customized GNOME-based desktop environment experience with COSMIC][1]. Moving forward, they decided to [create their desktop environment from scratch based on Rust][2]. + +Overall, Pop!_OS has been putting a lot of effort into providing a unique desktop experience keeping all the essential factors in mind like user-friendliness, resource efficiency, and security. + +Now, in a [tweet][3], a Pop!_OS user noticed that System76 had replaced the PPA repositories with its self-hosted APT system in Pop!_OS 21.10 beta, instead of Canonical’s launchpad. + +And, to that, _System76’s Principal Engineer_, **Jeremy Soller**, responded with a confirmation sharing more details. + +### Moving the Build System and Repositories Away From Launchpad + +![][4] + +Pop!_OS aims to evolve as a modern Linux distribution, which isn’t just similar to its Ubuntu base but does a lot of things better. + +And, moving the repositories away from the launchpad is one of the key changes. Switching the build system and APT repos to its own system should give System76 better control of package updates while reducing the build, test, and release time. + +Considering System76 has managed to provide the latest and greatest kernels (faster than most mainstream desktop Linux distributions), it is no surprise that you could expect speedier package updates to popular applications as well. + +![][5] + +Not just for the distro users, it should be good news for System76 customers to realize that Pop!_OS is eventually turning into the Apple of Linux world (in a good way). + +In my opinion, having control of the ecosystem should help provide a consistent user experience. + +And that is what new Linux desktop users need. + +### Is System76 Considering to Change its Ubuntu Base? + +No. As mentioned in the tweet, this move does not relate to changing bases. + +> Pop switched the build system and repositories away from to our own system for 21.10 in order to improve our control of package updates and reduce the time to build, test, and release them. It is not related to changing bases. +> +> — Jeremy Soller (@jeremy_soller) [December 3, 2021][6] + +But, I would not rule out the possibility of trying out another base as an experiment because they have been scaling up their experiments. + +*What do you think about Pop!_OS making these changes for its upcoming Pop!_OS 21.10 release? + +Feel free to let me know your thoughts in the comments below.* + +#### Big Tech Websites Get Millions in Revenue, It's FOSS Got You! + +If you like what we do here at It's FOSS, please consider making a donation to support our independent publication. Your support will help us keep publishing content focusing on desktop Linux and open source software. + +I'm not interested + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/pop-os-ppa-repo-move/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://news.itsfoss.com/cosmic-desktop-pop-os/ +[2]: https://news.itsfoss.com/pop-os-cosmic-rust/ +[3]: https://twitter.com/david_drapeau/status/1466787174154657795 +[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ3NSIgd2lkdGg9IjczNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[5]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjE3OSIgd2lkdGg9IjYyOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[6]: https://twitter.com/jeremy_soller/status/1466789512072228867?ref_src=twsrc%5Etfw From 433775e1cca1b78d5977ac6a84762bd189dffd0a Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 8 Dec 2021 08:50:32 +0800 Subject: [PATCH 121/244] translated --- ...in batches on Linux with SoundConverter.md | 90 ------------------- ...in batches on Linux with SoundConverter.md | 88 ++++++++++++++++++ 2 files changed, 88 insertions(+), 90 deletions(-) delete mode 100644 sources/tech/20211204 Convert audio in batches on Linux with SoundConverter.md create mode 100644 translated/tech/20211204 Convert audio in batches on Linux with SoundConverter.md diff --git a/sources/tech/20211204 Convert audio in batches on Linux with SoundConverter.md b/sources/tech/20211204 Convert audio in batches on Linux with SoundConverter.md deleted file mode 100644 index 924cceb55b..0000000000 --- a/sources/tech/20211204 Convert audio in batches on Linux with SoundConverter.md +++ /dev/null @@ -1,90 +0,0 @@ -[#]: subject: "Convert audio in batches on Linux with SoundConverter" -[#]: via: "https://opensource.com/article/21/12/soundconverter-linux" -[#]: author: "Seth Kenlon https://opensource.com/users/seth" -[#]: collector: "lujun9972" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Convert audio in batches on Linux with SoundConverter -====== -SoundConverter is a useful application not just because it does exactly -what its name says it does, but because it does it in batches and in -parallel. -![radio communication signals][1] - -There are many file formats used to store digital audio, and they're good for different purposes. Digital audio is, of course, only a representation of sound, a rendering of soundwaves that get translated into sound by a decoder and a set of speakers. Some audio formats, generically called _lossless_ formats, aim to encode audio close to its original analog form. Still, there's a lot of data in the real world, and as yet, digital can only approximate it in very large files. Other audio formats, called _lossy_ formats, balance file size with a reasonable representation of sound. - -There are plenty of great terminal commands for audio conversion. There's `sox` and `ffmpeg` and a handful of format-specific encoders, like `opusenc`, `flac`, `oggenc`, `fdkaac`, `wavpack`, and countless others. - -### Install SoundConverter on Linux - -SoundConverter is available on most Linux distributions from your package manager. On Fedora, Mageia, and similar distributions: - - -``` -`$ sudo dnf install kdenlive` -``` - -On Elementary, Mint, and other Debian-based distributions: - - -``` -`$ sudo apt install kdenlive` -``` - -However, I use SoundConverter as a [Flatpak][2]. - -### Converting audio - -Once you encode audio into a lossy format, you've lost data. Whether that data matters or not depends on the ears of its audience. Some people can't hear the difference between a low-bitrate MP3 and a full quality FLAC file, and even those who can often don't notice the difference between a 320kbps Ogg Vorbis podcast and a 128 kbps Ogg Vorbis podcast. Converting audio from a compressed format to an uncompressed format doesn't recover lost data, but it's not uncommon to need to convert audio from one format to another. You might want to upload a file to a website that accepts only a specific format, or your mobile device might only play a specific format, or to email a file that's too large for your host, or you might just want to save space on your drive. - -SoundConverter lets you convert audio in batches with ease. To convert audio with SoundConverter: - - 1. Launch SoundConverter from your Applications or Activities menu. - 2. Click the **Add Files** button in the top left corner of the SoundConverter window, and select the files you want to convert. - 3. Once you've added files, click the **Preferences** button (the gear icon) in the top right corner of the window, and select the format you want to convert to. You can also set the file naming convention, the destination folder, and other options. - 4. When you're ready, click the **Convert** button in the top left corner. - - - -![SoundConverter window][3] - -(Seth Kenlon, [CC BY-SA 4.0][4]) - -### Parallel processing - -SoundConverter is a useful application not just because it does exactly what its name says it does, but because it does it in batches and in parallel. Because modern computers have more than just CPU core, it's a waste of power and time to place each file in a queue to encode them one by one. SoundConverter can take several files at once and encode them simultaneously, meaning that converting 12 files can take the same time it would normally take to convert two—one after the other. You can do the same thing with a good terminal command, but only if you understand how to [launch parallel processes][5]. - -![SoundConverter preferences][6] - -(Seth Kenlon, [CC BY-SA 4.0][4]) - -You can also convert stereo audio into mono files. This can be especially useful for podcasts and audiobooks. These usually consist of a person speaking from a singular location (the microphone) and don't require a sense of spatial location. In fact, reducing stereo files to mono makes the audio easier to hear should you have just one earbud and cuts the file size in half. - -### The SoundConverter advantage - -It's a great feature to have different file formats for audio, and yet it seems that whenever I've saved audio in one format, I inevitably need it in another format. There are several great Linux commands to [convert audio files][7], but sometimes you might want an application you can leave open on your desktop and drag and drop files to, and so there's [SoundConverter][8]. A simple, single-purpose application, SoundConverter does exactly, and only, what its name says: It converts sound from one format to another. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/12/soundconverter-linux - -作者:[Seth Kenlon][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/seth -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/sound-radio-noise-communication.png?itok=KMNn9QrZ (radio communication signals) -[2]: https://opensource.com/article/21/11/install-flatpak-linux -[3]: https://opensource.com/sites/default/files/uploads/soundconverter_0.jpg (SoundConverter window) -[4]: https://creativecommons.org/licenses/by-sa/4.0/ -[5]: https://opensource.com/article/18/5/gnu-parallel -[6]: https://opensource.com/sites/default/files/uploads/soundconvert-preferences.jpg (SoundConverter preferences) -[7]: https://opensource.com/article/17/6/ffmpeg-convert-media-file-formats -[8]: https://soundconverter.org/ diff --git a/translated/tech/20211204 Convert audio in batches on Linux with SoundConverter.md b/translated/tech/20211204 Convert audio in batches on Linux with SoundConverter.md new file mode 100644 index 0000000000..2bae5f9079 --- /dev/null +++ b/translated/tech/20211204 Convert audio in batches on Linux with SoundConverter.md @@ -0,0 +1,88 @@ +[#]: subject: "Convert audio in batches on Linux with SoundConverter" +[#]: via: "https://opensource.com/article/21/12/soundconverter-linux" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +在 Linux 上用 SoundConverter 分批转换音频 +====== +SoundConverter 是一个有用的应用,不仅因为它能做到它的名字所说的那样,而且因为它是分批和并行地做的。 +![radio communication signals][1] + +有许多文件格式用于存储数字音频,它们适用于不同的目的。当然,数字音频只是声音的一种表现形式,是由解码器和一组扬声器将声波转化为声音的一种渲染。一些音频格式,一般被称为无损格式,旨在将音频编码接近其原始模拟形式。然而,在现实世界中有大量的数据,到目前为止,数字只能在非常大的文件中接近它。其他的音频格式,被称_有损_格式,在文件大小与声音的合理表现之间取得平衡。 + +有很多很好的终端命令用于音频转换。有 `sox` 和 `ffmpeg` 以及一些特定格式的编码器,如 `opusenc`、`flac`、`oggenc`、`fdkaac`、`wavpack` 和无数的其他编码器。 + +### 在 Linux 上安装 SoundConverter + +SoundConverter 在大多数 Linux 发行版上都可以通过你的包管理器获得。在 Fedora、Mageia 和类似的发行版上: + + +``` +`$ sudo dnf install kdenlive` +``` + +在 Elementary、Mint 和其他基于 Debian 的发行版上: + + +``` +`$ sudo apt install kdenlive` +``` + +然而,我使用使用 [Flatpak][2] 安装 SoundConverter。 + +### 转换音频 + +一旦你把音频编码成有损格式,你就丢失了数据。这些数据是否重要取决于其听众的耳朵。有些人听不出低比特率的 MP3 和全质量的 FLAC 文件之间的区别,即使那些能听出来的人,也常常注意不到 320kbps 的 Ogg Vorbis 播客和 128kbps 的 Ogg Vorbis 播客之间的区别。将音频从压缩格式转换为非压缩格式并不能恢复丢失的数据,但需要将音频从一种格式转换为另一种格式的情况并不少见。你可能想把文件上传到只接受特定格式的网站,或者你的移动设备可能只播放特定的格式,或者用电子邮件发送一个对你的主机来说太大的文件,或者你可能只是想节省硬盘上的空间。 + +SoundConverter 可以让你轻松地分批转换音频。要用 SoundConverter 转换音频: + + 1. 从你的应用或活动菜单中启动 SoundConverter。 + 2. 点击 SoundConverter 窗口左上角的**添加文件**按钮,并选择你要转换的文件。 + 3. 添加了文件后,点击窗口右上角的**偏好**按钮(齿轮图标),并选择你想转换的格式。你还可以设置文件命名规则、目标文件夹和其他选项。 + 4. 当你准备好了,点击左上角的**转换**按钮。 + + + +![SoundConverter window][3] + +(Seth Kenlon, [CC BY-SA 4.0][4]) + +### 并行处理 + +SoundConverter 是一个有用的应用,不仅因为它完全做了它的名字所说的事情,而且因为它是分批和并行地做的。因为现代计算机不仅仅有一个 CPU 核心,把每个文件放在一个队列中逐一编码,是对能量和时间的浪费。SoundConverter 可以同时处理几个文件,并对它们进行编码,这意味着转换 12 个文件所需的时间和通常转换两个文件所需的时间是一样的,一个接一个。你可以用一个好的终端命令做同样的事情,但前提是你要了解如何[启动并行进程][5]。 + +![SoundConverter preferences][6] + +(Seth Kenlon, [CC BY-SA 4.0][4]) + +你也可以将立体声音频转换为单声道文件。这对播客和有声读物特别有用。这些通常由一个人从一个单一的位置(麦克风)说话组成,不需要空间位置感。事实上,将立体声文件减少到单声道,如果你只有一个耳塞,就能更容易听到音频,并将文件大小减半。 + +### SoundConverter 的优势 + +为音频提供不同的文件格式是一个很好的功能,但似乎每当我以一种格式保存音频时,我都不可避免地需要另一种格式。有几个很棒的 Linux 命令可以[转换音频文件][7],但有时你可能想要一个可以在桌面上打开并拖放文件的应用,于是有了 [SoundConverter][8]。SoundConverter 是一个简单的、用途单一的应用程序,它的作用和它的名字一样:把声音从一种格式转换为另一种格式。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/soundconverter-linux + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/sound-radio-noise-communication.png?itok=KMNn9QrZ (radio communication signals) +[2]: https://opensource.com/article/21/11/install-flatpak-linux +[3]: https://opensource.com/sites/default/files/uploads/soundconverter_0.jpg (SoundConverter window) +[4]: https://creativecommons.org/licenses/by-sa/4.0/ +[5]: https://opensource.com/article/18/5/gnu-parallel +[6]: https://opensource.com/sites/default/files/uploads/soundconvert-preferences.jpg (SoundConverter preferences) +[7]: https://opensource.com/article/17/6/ffmpeg-convert-media-file-formats +[8]: https://soundconverter.org/ From 442c32650ec818ad08363740cfabecd675687128 Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 8 Dec 2021 08:52:20 +0800 Subject: [PATCH 122/244] translating --- .../20211207 Gaphor- Open Source Graphical Modeling Tool.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20211207 Gaphor- Open Source Graphical Modeling Tool.md b/sources/tech/20211207 Gaphor- Open Source Graphical Modeling Tool.md index beae0e80e2..b0cdb37bb6 100644 --- a/sources/tech/20211207 Gaphor- Open Source Graphical Modeling Tool.md +++ b/sources/tech/20211207 Gaphor- Open Source Graphical Modeling Tool.md @@ -2,7 +2,7 @@ [#]: via: "https://itsfoss.com/gaphor-modeling-tool/" [#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 88ee6456bc73b10c45a27fe5e1e0281bae3064a2 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 8 Dec 2021 11:43:22 +0800 Subject: [PATCH 123/244] APL&TSL&PRF&PUB --- ... is Likely to Replace Gedit in GNOME 42.md | 105 +++++++++++++++++ ... is Likely to Replace Gedit in GNOME 42.md | 106 ------------------ 2 files changed, 105 insertions(+), 106 deletions(-) create mode 100644 published/20211206 GNOME has a Brand New Text Editor and it is Likely to Replace Gedit in GNOME 42.md delete mode 100644 sources/news/20211206 GNOME has a Brand New Text Editor and it is Likely to Replace Gedit in GNOME 42.md diff --git a/published/20211206 GNOME has a Brand New Text Editor and it is Likely to Replace Gedit in GNOME 42.md b/published/20211206 GNOME has a Brand New Text Editor and it is Likely to Replace Gedit in GNOME 42.md new file mode 100644 index 0000000000..84488cce4c --- /dev/null +++ b/published/20211206 GNOME has a Brand New Text Editor and it is Likely to Replace Gedit in GNOME 42.md @@ -0,0 +1,105 @@ +[#]: subject: "GNOME has a Brand New Text Editor and it is Likely to Replace Gedit in GNOME 42" +[#]: via: "https://news.itsfoss.com/gnome-text-editor-to-replace-gedit/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: " " +[#]: url: " " + +GNOME 有了一个全新的“文本编辑器”,它会成为默认编辑器吗? +====== + +> GNOME 新的“文本编辑器”正在增加新的功能,有可能在下一个 GNOME 桌面版本中取代 Gedit。 + +![](https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/gnome-text-editor-gnome-42.jpg?w=1200&ssl=1) + +Gedit 是 GNOME 桌面环境的默认文本编辑器。它是一个受欢迎的编辑器,也是一个便捷的文本编辑器,以简单的用户界面提供了所有的基本功能。 + +但是,随着 GNOME 的发展,有了一个新的“文本编辑器”(LCTT 译注:没错,就叫“文本编辑器Text Editor”),虽然它还没有取代 Gedit。但让我们来看看它的下一个版本,在即将到来的 GNOME 42 版本中,它进行了大量改进,有可能取代 Gedit。 + +[Christian Hergert][1] 在他的 [博文][2] 和 Twitter 上分享了它的很多细节。 + +在这篇文章中,让我介绍一下 GNOME 文本编辑器的那些新改进。 + +### 偏好设置对话框卷土重来 + +作为其上一个版本中的实验的一部分,偏好设置对话框被移到了侧边栏, + +![][3] + +但是,事实证明,它并不那么方便和好看。 + +因此,偏好设置对话框又回来了(如下图所示),其目的是与其他 GNOME 应用程序的设计语言相融合,而不显得笨拙。 + +![鸣谢:Christian Hergert][4] + +在我看来,这很不错,与侧边栏的实施相比,应该用户体验更好。 + +### 改进的 “弹出式” 打开功能 + +![鸣谢:Christian Hergert][5] + +当你试图打开一个最近的文件或搜索某个东西时,会出现一个弹出式窗口来快速查找任何最近的文件,而不需要启动一个新的对话框。 + +这节省了时间,是一个不错的功能。在即将发布的“文本编辑器”中还进行了一些细微的改进,显得更苗条、更便捷。 + +换句话说,你会发现它改进了键盘导航,只需按下 `Ctrl + K`,就可以寻找你想要的文件。 + +### 引入重新着色支持 + +即将发布的 GNOME 文本编辑器可以让你轻松地应用不同的风格模式(或主题),而改变整个应用程序。 + +博文中提到了更多关于它的内容: + +> 本周最直观的工作是引入了重新着色支持。它建立在 [libadwaita][6] 之上,并使用一个 CSS 提供者来覆盖主题中的颜色。我希望在不远的将来,libadwaita 会有一个重新着色的 API,为我们提供这个功能。 + +下面是一个应用样式表时的例子: + +![鸣谢:Christian Hergert][7] + +它有一些自带的主题,而且你还可以找到更多的主题。你可以在 Christian 的博客文章中找到更多截图: + +![鸣谢:Christian Hergert][12] + +你可以看看 [博客文章中的更多内容][2],还可以发现一些其他的技术变化,和一个由 Christian 设计的 vim 仿真的复活节彩蛋。 + +### GNOME “文本编辑器”会取代 Gedit 吗? + +到现在为止,官方还没有确认这一点。然而,看一下 [Gedit 的开发活动][8](目前有 41 个 alpha 版本),在过去的几个版本中没有明显增加变化,这可能意味着新的 GNOME “文本编辑器”将在GNOME 42 中取代 Gedit。 + +事实上,正如其 [GitLab 页面][9] 中所提到的,GNOME 的新文本编辑器计划正式取代 Gedit,但它会在 GNOME 42 中发生吗?它的开发者 Christian Hergert 在他的博客中提到: + +> 随着我们为 GNOME 42 的准备工作而进行的竞赛,[文本编辑器][9] 在过去的几周里已经成型。 + +这可以被认为是一个暗示,GNOME 42 可能会包含这个新的文本编辑器。 + +不仅仅是 GNOME,[KDE 也对 Kate 进行了改造][10],增加了针对开发者的功能。你将会有很多 [开源的文本编辑器][11] 可以选择。 + +当它发布时,我们将继续关注它。你怎么看? + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/gnome-text-editor-to-replace-gedit/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://twitter.com/hergertme +[2]: https://blogs.gnome.org/chergert/2021/12/03/text-editor-happenings/ +[3]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/gnome-text-editor-old-preferences.png?w=870&ssl=1 +[4]: https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/gnome-text-editor-preferences.png?resize=1355%2C2048&ssl=1 +[5]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/gnome-text-editor-popover.jpg?w=1200&ssl=1 +[6]: https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/ +[7]: https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/gnome-text-editor-style-scheme.png?w=1200&ssl=1 +[8]: https://gitlab.gnome.org/GNOME/gedit +[9]: https://gitlab.gnome.org/GNOME/gnome-text-editor +[10]: https://news.itsfoss.com/kate/ +[11]: https://itsfoss.com/best-modern-open-source-code-editors-for-linux/ +[12]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/gnome-text-editor-style-scheme-1.png?w=1200&ssl=1 \ No newline at end of file diff --git a/sources/news/20211206 GNOME has a Brand New Text Editor and it is Likely to Replace Gedit in GNOME 42.md b/sources/news/20211206 GNOME has a Brand New Text Editor and it is Likely to Replace Gedit in GNOME 42.md deleted file mode 100644 index 3c00513c24..0000000000 --- a/sources/news/20211206 GNOME has a Brand New Text Editor and it is Likely to Replace Gedit in GNOME 42.md +++ /dev/null @@ -1,106 +0,0 @@ -[#]: subject: "GNOME has a Brand New Text Editor and it is Likely to Replace Gedit in GNOME 42" -[#]: via: "https://news.itsfoss.com/gnome-text-editor-to-replace-gedit/" -[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" -[#]: collector: "lujun9972" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -GNOME has a Brand New Text Editor and it is Likely to Replace Gedit in GNOME 42 -====== - -Gedit is the default text editor for the GNOME desktop environment. It is a popular option and an effective text editor that offers all the essentials with a simple user interface. - -But, with GNOME evolving, there is a new text editor that hasn’t yet replaced gedit. And, looking at its next release, it might just be ready to replace gedit in the upcoming GNOME 42 release with a bunch of improvements. - -[Christian Hergert][1] shares more details about it in his [blog post][2] and on Twitter. - -In this article, let me highlight those new improvements to GNOME Text Editor. - -### Preferences Dialogue Makes a Comeback - -The preferences setting was moved to the sidebar as part of an experiment in its previous release. - -![][3] - -But, it did not prove to be as convenient and good-looking. - -So, the preferences dialogue is coming back (as shown in the screenshot below) that aims to blend in with the design language of other GNOME apps without being clunky. - -![Credits: Christian Hergert ][4] - -Looks pretty sweet to me and should give a better user experience compared to the sidebar implementation for sure! - -### Improved Open ‘Popover’ Feature - -![Credits: Christian Hergert ][5] - -When you try to open a recent file or search for something, a popover appears to quickly look for any recent files without launching a new dialogue box. - -This saves time and is a nice feature to have. With the upcoming release for text editor, this has received some slight improvements to appear slimmer and more effective. - -In other words, you will find it improved for keyboard navigation by simply hitting Ctrl + K and then looking for the file you want. - -### Introducing Recoloring Support - -The upcoming release for GNOME’s text editor will let you easily apply different style-scheme (or themes) that affects the entire application. - -The blog post mentions more about it: - -> The most visual piece of work this week was in introducing recoloring support. It builds atop [libadwaita][6] and uses a CSS provider to override the colors in the theme. I expect there will be a recoloring API in the not-too distant future for libadwaita which will provide this for us. - -Here’s a sample of what it looks like when you apply a style-scheme: - -![Credits: Christian Hergert ][7] - -You can find some of the themes bundled and can look for more as you explore. You can find more screenshot in Christian’s blog post. - -![Credits: Christian Hergert ][7] - -You can also find some other technical changes and a vim emulation easter egg by Christian as you explore the [blog post for more details][2]. - -### Will GNOME Text Editor Replace Gedit? - -As of now, there is no official confirmation on this. However, looking at the [development activity for gedit][8] (currently as 41 alpha version) with no significant additions in the past few releases, it could mean that the new GNOME Text Editor will replace gedit in GNOME 42. - -In fact, GNOME’s new text editor plans to officially replace gedit as mentioned in its [GitLab page][9], but will it happen with GNOME 42? Its developer, Christian Hergert, mentions in his blog - -> [Text Editor][9] has really been shaping up in the past couple weeks as we race towards getting things ready for GNOME 42. - -This could be taken as a hint that GNOME 42 may seem the inclusion of this new text editor. - -It’s not just GNOME. [KDE also has revamped Kate][10] by adding features for developers. You’ve got plenty of [open source text editors][11] to choose from. - -We shall keep an eye on it when it releases. What do you think? - -#### Big Tech Websites Get Millions in Revenue, It's FOSS Got You! - -If you like what we do here at It's FOSS, please consider making a donation to support our independent publication. Your support will help us keep publishing content focusing on desktop Linux and open source software. - -I'm not interested - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/gnome-text-editor-to-replace-gedit/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://news.itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://twitter.com/hergertme -[2]: https://blogs.gnome.org/chergert/2021/12/03/text-editor-happenings/ -[3]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjYwMyIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjEwMjQiIHdpZHRoPSI2NzciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmVyc2lvbj0iMS4xIi8+ -[5]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjUyMiIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[6]: https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/ -[7]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjU3NyIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[8]: https://gitlab.gnome.org/GNOME/gedit -[9]: https://gitlab.gnome.org/GNOME/gnome-text-editor -[10]: https://news.itsfoss.com/kate/ -[11]: https://itsfoss.com/best-modern-open-source-code-editors-for-linux/ From 8ece9ad539795bcfb64ae718773a55916726a556 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 8 Dec 2021 11:46:28 +0800 Subject: [PATCH 124/244] PUB @wxy https://linux.cn/article-14060-1.html --- ...xt Editor and it is Likely to Replace Gedit in GNOME 42.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/published/20211206 GNOME has a Brand New Text Editor and it is Likely to Replace Gedit in GNOME 42.md b/published/20211206 GNOME has a Brand New Text Editor and it is Likely to Replace Gedit in GNOME 42.md index 84488cce4c..e052c4e60a 100644 --- a/published/20211206 GNOME has a Brand New Text Editor and it is Likely to Replace Gedit in GNOME 42.md +++ b/published/20211206 GNOME has a Brand New Text Editor and it is Likely to Replace Gedit in GNOME 42.md @@ -4,8 +4,8 @@ [#]: collector: "lujun9972" [#]: translator: "wxy" [#]: reviewer: "wxy" -[#]: publisher: " " -[#]: url: " " +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14060-1.html" GNOME 有了一个全新的“文本编辑器”,它会成为默认编辑器吗? ====== From 25c66301e4172d9a43864753928193bd1669864b Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 8 Dec 2021 12:48:09 +0800 Subject: [PATCH 125/244] PRF&PUB @robsean https://linux.cn/article-14061-1.html --- ...0210609 Configure FreeDOS in plain text.md | 143 +++++++----------- 1 file changed, 52 insertions(+), 91 deletions(-) rename {translated/tech => published}/20210609 Configure FreeDOS in plain text.md (55%) diff --git a/translated/tech/20210609 Configure FreeDOS in plain text.md b/published/20210609 Configure FreeDOS in plain text.md similarity index 55% rename from translated/tech/20210609 Configure FreeDOS in plain text.md rename to published/20210609 Configure FreeDOS in plain text.md index fb4baebbad..8051f14e7c 100644 --- a/translated/tech/20210609 Configure FreeDOS in plain text.md +++ b/published/20210609 Configure FreeDOS in plain text.md @@ -2,19 +2,20 @@ [#]: via: (https://opensource.com/article/21/6/freedos-fdconfigsys) [#]: author: (Jim Hall https://opensource.com/users/jim-hall) [#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: translator: (robsean) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14061-1.html) -以纯文本方式配置 FreeDOS +FreeDOS 配置指南 ====== -学习如何使用 FDCONFIG.SYS 来配置 FreeDOS 。 -![Person using a laptop][1] + +> 学习如何使用 FDCONFIG.SYS 来配置 FreeDOS 。 + +![](https://img.linux.net.cn/data/attachment/album/202112/08/124646wahca435y60acpha.jpg) FreeDOS 是主配置文件是在根目录中的名称为 `FDCONFIG.SYS` 的文件。这个文件包含一系列的行,每行都设置一个诸如 `LASTDRIVE=Z` 或 `FILES=40` 的值。例如,在 FreeDOS 1.3 RC4 中的默认 `FDCONFIG.SYS` ,看起来像这样: - ``` SET DOSDIR=C:\FDOS @@ -40,13 +41,12 @@ MENU 4 - Load FreeDOS without drivers (Emergency Mode) 12?SHELLHIGH=C:\FDOS\BIN\COMMAND.COM C:\FDOS\BIN /E:1024 /P=C:\FDAUTO.BAT ``` -但是,这些指令行都表示什么意思?为什么一些指令行有一个问号 (`?`) 或一个叹号 (`!`),而其它的命令行却没有? +但是,这些指令行都表示什么意思?为什么一些指令行有一个问号(`?`)或一个叹号(`!`),而其它的命令行却没有? ### 一个简单的配置 让我们从一个简单的配置开始,像这样,我们就可以看到我们的配置做了什么。做出这个非常简单的 `FDCONFIG.SYS` 文件: - ``` LASTDRIVE=Z BUFFERS=20 @@ -63,32 +63,27 @@ SHELL=C:\FDOS\BIN\COMMAND.COM C:\FDOS\BIN /E:1024 /P=C:\FDAUTO.BAT 4. `DEVICE=C:\FDOS\BIN\HIMEMX.EXE` 5. `SHELL=C:\FDOS\BIN\COMMAND.COM C:\FDOS\BIN /E:1024 /P=C:\FDAUTO.BAT` +第一行指令告诉 FreeDOS 在存储器中保留多少驱动器字母。(DOS 使用字母来表示附属于系统的每个驱动器,`LASTDRIVE=Z` 表示预留从 `A` 到 `Z` 的所有驱动器字母)。 `LASTDRIVE` 会影响系统可以识别的 _逻辑驱动器_ 的数量。你可能没有任何的逻辑驱动器;FreeDOS 安装器不会默认设置这些逻辑驱动器。在任何情况下,在任何 FreeDOS 系统上设置 `LASTDRIVE=Z` 都是没有害处的。 - -第一行指令告诉 FreeDOS 在存储器中保留多少驱动器字母。(DOS 使用字母来表示附属于系统的每个驱动器,`LASTDRIVE=Z` 表示从 "A" 到 "Z" 预留驱动器字母)。 `LASTDRIVE` 会影响系统可以识别的 _逻辑驱动器_ 的数量。你可能没有任何的逻辑驱动器;FreeDOS 安装器不会默认设置这些逻辑驱动器。在任何情况下,在任何 FreeDOS 系统上设置 `LASTDRIVE=Z` 都是没有害处的。 - -`BUFFERS` 行设置文件缓冲区预留存储器。_缓冲区_ 有助于加速某些需要存储空间的进程,例如复制文件。如果你为 `BUFFERS` 设置一个较大的值,那么 FreeDOS 将预留更多的存储器—and vice versa for smaller values。大多数的用户将会设置其为 `BUFFERS=20` 或 `BUFFERS=40` ,取决于他们在系统上读写文件的频率。 +`BUFFERS` 行设置文件缓冲区预留存储器。_缓冲区_ 有助于加速某些需要存储空间的进程,例如复制文件。如果你为 `BUFFERS` 设置一个较大的值,那么 FreeDOS 将预留更多的存储器。同理反之。大多数的用户将会设置其为 `BUFFERS=20` 或 `BUFFERS=40` ,取决于他们在系统上读写文件的频率。 `FILES` 设置决定 DOS 允许你一次打开多少文件。如果你运行的一个应用程序需要一次打开很多文件,例如打开一个谱系数据库,你可能需要为 `FILES` 设置一个较大的值。对于大多数的用户来说,`FILES=40` 是一个合理的值。 -`DEVICE` 是一个特殊的指令,用于加载 _设备驱动器_ 。DOS 需要针对某些硬件或配置文件的设备驱动器。这行 `DEVICE=C:\FDOS\BIN\HIMEMX.EXE` 来加载 _HimemX_ 设备驱动器,这样,DOS 可以利用超出前 640 KB 的扩展存储器。 +`DEVICE` 是一个特殊的指令,用于加载 _设备驱动器_ 。DOS 需要针对某些硬件或配置文件的设备驱动器。这行 `DEVICE=C:\FDOS\BIN\HIMEMX.EXE` 来加载 _HimemX_ 设备驱动,这样,DOS 可以利用超出前 640 KB 的扩展存储器。 最后的指令行告诉 FreeDOS 的内核在哪里找到命令行 shell 。默认情况下,内核将从 `COMMAND.COM` 开始查找 shell ,但是你可以使用 `SHELL` 指令来更改它。在这个示例中, `SHELL=C:\FDOS\BIN\COMMAND.COM` 说明 shell 是 `COMMAND.COM` 程序,位于 `C` 驱动器上的 `\FDOS\BIN` 目录之中。 在 `SHELL` 结尾处的其它文件表示选项为 `COMMAND.COM` 的 shell 。FreeDOS 的 `COMMAND.COM` 支持一些启动选项来修改它的行为,包括: - * **`C:\FDOS\BIN`** \- `COMMAND.COM` 程序的完整的路径 - * `/E:1024 -` 环境 (E) 大小,以字节为单位。`/E:1024` 告诉 `COMMAND.COM` 来预留 1024 字节,或者说是 1 KB ,来存储它的环境变量。 - * **`/P=C:\FDAUTO.BAT`** \- `/P` 选项表示 shell 是一个永久性的 (P) shell ,因此用户不能通过输入 `EXIT` 来退出 shell (附加文本 `=C:\FDAUTO.BAT` 告诉 `COMMAND.COM` 在启动时执行 `C:\FDAUTO.BAT` 文件,而不再执行默认的 `AUTOEXEC.BAT` 文件) - - + * `C:\FDOS\BIN`:`COMMAND.COM` 程序的完整的路径 + * `/E:1024`:环境(`E`)大小,以字节为单位。`/E:1024` 告诉 `COMMAND.COM` 来预留 1024 字节,或者说是 1 KB ,来存储它的环境变量。 + * `/P=C:\FDAUTO.BAT`:`/P` 选项表示 shell 是一个永久性的(`P`)shell ,因此用户不能通过输入 `EXIT` 来退出 shell(附加文本 `=C:\FDAUTO.BAT` 告诉 `COMMAND.COM` 在启动时执行 `C:\FDAUTO.BAT` 文件,而不再执行默认的 `AUTOEXEC.BAT` 文件) 通过这个简单的配置文件,你应该能够理解 FreeDOS 1.3 RC4 安装的 `FDCONFIG.SYS` 文件中的一些东西。 ### 启动菜单 -FreeDOS 支持一种有序的功能—在一个系统上使用多个配置文件,使用一个 "启动菜单" 来选择你想要的配置。`FDCONFIG.SYS` 文件包含一些定义菜单的行: - +FreeDOS 支持一种有序的功能:在一个系统上使用多个配置文件,使用一个“启动菜单”来选择你想要的配置。`FDCONFIG.SYS` 文件包含一些定义菜单的行: ``` !MENUCOLOR=7,0 @@ -111,89 +106,55 @@ MENU 4 - Load FreeDOS without drivers (Emergency Mode) * 6 棕色 * 7 白色 +因此,`MENUCOLOR=7,0` 的定义意味着显示一个黑色背景(`0`)白色文本(`7`)的菜单。如果你想使用一个蓝色背景白色文本,你可以将其定义为 `MENUCOLOR=7,1` 。 +在行头部的叹号(`!`)意味着:不管你选择哪个菜单,这个指令都将会执行。 -因此,`MENUCOLOR=7,0` 的定义意味着显示一个黑色背景 (0) 白色文本 (7) 的菜单。如果你想使用一个蓝色背景白色文本,你可以将其定义为 `MENUCOLOR=7,1` 。 - -在行头部的叹号 (`!`) 意味着:不管你选择哪个菜单,这个指令都将会执行。 - -`MENUDEFAULT=1,5` 行告诉内核等待用户多长时间来选择启动菜单项,或者如果用户没有选择的话,使用那个默认菜单项。`MENUDEFAULT=1,5` 标示着系统将等待 5 秒钟;如果用户不在这段时间内尝试选择一个菜单的话,内核将选择启动菜单 "1" 。 +`MENUDEFAULT=1,5` 行告诉内核等待用户多长时间来选择启动菜单项,或者如果用户没有选择的话,使用那个默认菜单项。`MENUDEFAULT=1,5` 标示着系统将等待 `5` 秒钟;如果用户不在这段时间内尝试选择一个菜单的话,内核将选择启动菜单 “1” 。 ![boot menu][2] -Jim Hall, CC-BY SA 4.0 - -在其后的 `MENU` 行至不同启动菜单配置的标签。它们是按顺序排列的,因此,菜单项目 "1" 是第一个,接下来的 "2" 是第二个,以此类推。 +在其后的 `MENU` 行至不同启动菜单配置的标签。它们是按顺序排列的,因此,菜单项目 “1” 是第一个,接下来的 “2” 是第二个,以此类推。 ![menu select 4][3] -Jim Hall, CC-BY SA 4.0 - -在 `FDCONFIG.SYS` 中的接下来的一行中,你将在一个问号 (`?`) 前看到一些数字。这标示 "针对这几个数字的启动菜单项,使用这行命令"。例如,如果用户选择启动菜单项 "2","3" 或 "4" 的话,那么带有 `234?` 的这行命令才将加载 HimemX 设备驱动器。 - +在 `FDCONFIG.SYS` 中的接下来的一行中,你将在一个问号(`?`)前看到一些数字。这标示“针对这几个数字的启动菜单项,使用这行命令”。例如,如果用户选择启动菜单项 “2”、“3” 或 “4” 的话,那么带有 `234?` 的这行命令才将加载 HimemX 设备驱动器。 ``` -`234?DEVICE=C:\FDOS\BIN\HIMEMX.EXE` +234?DEVICE=C:\FDOS\BIN\HIMEMX.EXE ``` -这里有很多方法来使用 `FDCONFIG.SYS` 以配置你的 FreeDOS 系统。我们在这里只介绍基本的东西,最重用的方法是定义你的 FreeDOS 内核设置。更多的信息,探索 FreeDOS 帮助系统 (在命令行中输入 `HELP` ) 来学习如何使用使用的 FreeDOS 的 `FDCONFIG.SYS` 选项: +这里有很多方法来使用 `FDCONFIG.SYS` 以配置你的 FreeDOS 系统。我们在这里只介绍基本的东西,最重用的方法是定义你的 FreeDOS 内核设置。更多的信息,探索 FreeDOS 帮助系统(在命令行中输入 `HELP`)来学习如何使用 FreeDOS 的 `FDCONFIG.SYS` 选项: - * **SWITCHES** - * 启动时处理过程行为 - * **REM** 和 **;** - * 注释 (在 FDCONFIG.SYS 中被忽略) - * **MENUCOLOR** - * 启动菜单文本颜色和背景颜色 - * **MENUDEFAULT** - * 启动菜单默认值 - * **MENU** - * 启动菜单选项 - * **ECHO** 和 **EECHO** - * 显示信息 - * **BREAK** - * 设置扩展,使用 **Ctrl+C** 打开或关闭 - * **BUFFERS** 或 **BUFFERSHIGH** - * 分配多少磁盘缓冲区 - * **COUNTRY** - * 设置国际化行为 - * **DOS** - * 告诉 FreeDOS 内核如何将其自身加载到存储器之中 - * **DOSDATA** - * 告诉 FreeDOS 加载内核到上位存储器之中 - * **FCBS** - * 设置文件控制块 (FCBs) 的数量 - * **KEYBUF** - * 在存储器中重新指定键盘缓冲区 - * **FILES** 或 **FILESHIGH** - * 一次可以打开多少个文件 - * **LASTDRIVE** 或 **LASTDRIVEHIGH** - * 设置可以使用的最后一个驱动器字母 - * **NUMLOCK** - * 设置键盘数字锁的开或关 - * **SHELL** ,**SHELLHIGH** 或 **COMMAND** - * 设置命令行 shell - * **STACKS** 或 **STACKSHIGH** - * 添加堆栈以处理硬件中断 - * **SWITCHAR** - * 重新定义命令行选项开关字符 - * **SCREEN** - * 设置在屏幕上的行数 - * **VERSION** - * 设置向程序报告的 DOS 版本 - * **IDLEHALT** - * 激活节能功能,在某些系统上有用 - * **DEVICE** 和 **DEVICEHIGH** - * 加载一个驱动程序到存储器之中 - * **INSTALL** 和 **INSTALLHIGH** - * 加载一个 "存储器驻留" (TSR) 程序 - * **SET** - * 设置一个 DOS 环境变量 + * `SWITCHES`:启动时处理过程行为 + * `REM` 和 `;`:注释(在 `FDCONFIG.SYS` 中将被忽略) + * `MENUCOLOR`:启动菜单文本颜色和背景颜色 + * `MENUDEFAULT`:启动菜单默认值 + * `MENU`:启动菜单选项 + * `ECHO` 和 `EECHO`:显示信息 + * `BREAK`:设置打开或关闭扩展的 `Ctrl+C` 检查 + * `BUFFERS` 或 `BUFFERSHIGH`:分配多少磁盘缓冲区 + * `COUNTRY`:设置国际化行为 + * `DOS`:告诉 FreeDOS 内核如何将其自身加载到存储器之中 + * `DOSDATA`:告诉 FreeDOS 加载内核到上位存储器之中 + * `FCBS`:设置文件控制块(FCB)的数量 + * `KEYBUF`:在存储器中重新指定键盘缓冲区 + * `FILES` 或 `FILESHIGH`:一次可以打开多少个文件 + * `LASTDRIVE` 或 `LASTDRIVEHIGH`:设置可以使用的最后一个驱动器字母 + * `NUMLOCK`:设置打开或关闭键盘数字锁 + * `SHELL`、`SHELLHIGH` 或 `COMMAND`:设置命令行 shell + * `STACKS` 或 `STACKSHIGH`:添加堆栈以处理硬件中断 + * `SWITCHAR`:重新定义命令行选项开关字符 + * `SCREEN`:设置在屏幕上的行数 + * `VERSION`:设置向程序报告的 DOS 版本 + * `IDLEHALT`:激活节能功能,在某些系统上有用 + * `DEVICE` 和 `DEVICEHIGH`:加载一个驱动程序到存储器之中 + * `INSTALL` 和 `INSTALLHIGH`:加载一个 “存储器驻留”(TSR)程序 + * `SET`:设置一个 DOS 环境变量 +### 以纯文本方式配置 FreeDOS - -### Configuring in plain text - -像 Linux 和 BSD 一样,FreeDOS 配置以纯文本的方式进行。不需要特殊指定的编辑工具,因此,深入研究,看看哪些选项最适合你。它很容易,但是功能很强大! +像 Linux 和 BSD 一样,FreeDOS 配置以纯文本的方式进行。不需要特殊指定的编辑工具,因此,深入研究,看看哪些选项最适合你。它很简单,但是功能很强大! -------------------------------------------------------------------------------- @@ -202,7 +163,7 @@ via: https://opensource.com/article/21/6/freedos-fdconfigsys 作者:[Jim Hall][a] 选题:[lujun9972][b] 译者:[robsean](https://github.com/robsean) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 2a68820ef9885c01e956a1a1471f4134dfcd72d0 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 8 Dec 2021 23:31:44 +0800 Subject: [PATCH 126/244] APL --- ...Things About Linux Terminal Every Ubuntu User Should Know.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20211206 19 Absolute Simple Things About Linux Terminal Every Ubuntu User Should Know.md b/sources/tech/20211206 19 Absolute Simple Things About Linux Terminal Every Ubuntu User Should Know.md index 7273733ca7..cd3b527a82 100644 --- a/sources/tech/20211206 19 Absolute Simple Things About Linux Terminal Every Ubuntu User Should Know.md +++ b/sources/tech/20211206 19 Absolute Simple Things About Linux Terminal Every Ubuntu User Should Know.md @@ -2,7 +2,7 @@ [#]: via: "https://itsfoss.com/basic-terminal-tips-ubuntu/" [#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "wxy" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From bc8bd1c94c59a920be67db109766d4281abf94ec Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 9 Dec 2021 05:04:45 +0800 Subject: [PATCH 127/244] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211208=20?= =?UTF-8?q?Open=20source=20photo=20processing=20with=20Darktable?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211208 Open source photo processing with Darktable.md --- ... source photo processing with Darktable.md | 123 ++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 sources/tech/20211208 Open source photo processing with Darktable.md diff --git a/sources/tech/20211208 Open source photo processing with Darktable.md b/sources/tech/20211208 Open source photo processing with Darktable.md new file mode 100644 index 0000000000..04396357fa --- /dev/null +++ b/sources/tech/20211208 Open source photo processing with Darktable.md @@ -0,0 +1,123 @@ +[#]: subject: "Open source photo processing with Darktable" +[#]: via: "https://opensource.com/article/21/12/open-source-photo-processing-darktable" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Open source photo processing with Darktable +====== +If you're taking photos good enough to process, you owe it to yourself +to see what Darktable offers you. +![Polaroids and palm trees][1] + +It's hard to say how good photographs happen. You have to be in the right place at just the right moment. You have to have a camera at the ready and an eye for composition. And that's just the part that happens in the camera. There's a whole other stage to great photography that many people don't think about. It used to happen with lights and chemicals in a _darkroom_, but with today's digital tools, post-production happens in darkroom software. One of the best photo processors is [Darktable][2], and I wrote an [intro to Darktable][3] article back in 2016. It's been five years since that article, so I thought I'd revisit the application to write about one of its advanced features: masks. + +Darktable hasn't changed much since I originally wrote about it, which to my mind, is one of the hallmarks of a truly great application. A consistent interface and continued great performance is all one can ask of software, and Darktable remains familiar and powerful. If you're new to Darktable, read my introductory article to learn the basics. + +### What is a mask?  + +A mask in photograph processing gets used to limit adjustments you make to an image to just one area of the image. + +A _mask_, intuitively enough, is a technique in visual art that uses one material to block out another. If you've ever painted a wall in your apartment or house, you may have used _masking tape_ (also called _painter's tape_) to guard adjoining walls or molding from stray brush strokes. When finished, you peel off the masking tape, and you have nice straight lines of paint. + +A stencil is also a form of masking. + +![A mask made of masking tape][4] + +(Seth Kenlon, [CC BY-SA 4.0][5]) + +It's a technique used in photography for a century, so it makes sense that digital photography tools have an equivalent. + +### Using masks in Darktable + +For this example, I'm using a Creative Commons photograph by Flickr user **bcnewdemocrats**. It's a great photo because of its charming subject matter (two kids applying Holi powder to their very patient father's face). Because it's about the Indian festival of colors, it's got some great splashes of color throughout. + +![Original photograph][6] + +(bcnewdemocrats, [CC BY-SA 4.0][5]) + +This is a photo that needs no improvement, but not all adjustments need to be drastic to have a significant effect. + +The color correction filter provides a particularly noticeable adjustment. A common correction in color photography, especially those of people, is the addition of _amber_ (a reddish-orange). Human skin tone benefits from the amber because we associate that color with warmth and life. + +Click the **On** button to activate the color correction adjustment panel on the right of the Darktable window. Drag the center point up and to the right to add amber to the photo. + +![Color correction panel][7] + +(Seth Kenlon, [CC BY-SA 4.0][5]) + +After you do this, the entire photograph gets drenched in amber. + +![Darktable global color correction][8] + +(Seth Kenlon, [CC BY-SA 4.0][5]) + +At the bottom of the color correction panel, click the **drawn & parametric mask** button. + +![Apply mask button][9] + +(Seth Kenlon, [CC BY-SA 4.0][5]) + +In the toolbar that gets revealed, you have several mask shapes to choose from. There's a circle and an ellipse, path, brush, gradient, and an option to edit an existing mask. For simplicity's sake, select the circle and click on your subject's face. + +![Circle mask][10] + +(Seth Kenlon, [CC BY-SA 4.0][5]) + +Your color correction filter is immediately constrained to the area of your circle mask, giving your main subject a pleasant amber tone while sparing the background. + +![Color correction within a circle mask][11] + +(Seth Kenlon, [CC BY-SA 4.0][5]) + +You can see the difference by toggling the color correction filter off and on. + +### Reusing masks + +If you want to apply another filter to just the subject's face, you don't have to create another mask, especially for that new filter. When you create a mask, it's added to the **mask manager** panel, located on the left of the Darktable interface. The default names are pretty generic, but you can double-click on each mask name to rename it. + +![Mask manager][12] + +(Seth Kenlon, [CC BY-SA 4.0][5]) + +When you apply a new filter, instead of choosing a new mask shape to create, click the **no mask used** drop-down menu to see a list of existing masks, as well as automatically grouped masks that have been used together on the same filter previously. Select the mask or mask group you want to use for your new filter. + +![Selecting an existing mask][13] + +(Seth Kenlon, [CC BY-SA 4.0][5]) + +### More masks + +There are lots of other types of masks and mask features in Darktable to explore. You can create complex shapes with the path and brush tools. You can abandon the use of shapes altogether and constrain filters to regions of an image based on chroma and luma values. You can adjust the fuzziness and spread of a mask and much more. One of the best things about all the adjustments you make in Darktable is that they're all dynamic and nondestructive. You can always turn them off if you change your mind, and you're never actually affecting the image data itself. It's no surprise because Darktable truly is a powerful photography tool, and if you're taking photos good enough to process, you owe it to yourself to see what Darktable offers you. + +We explain how to get started with Darktable, an open source, feature-packed, cross-platform... + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/open-source-photo-processing-darktable + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/design_photo_art_polaroids.png?itok=SqPLgWxJ (Polaroids and palm trees) +[2]: https://www.darktable.org/ +[3]: https://opensource.com/life/16/4/how-use-darktable-digital-darkroom +[4]: https://opensource.com/sites/default/files/uploads/masking.jpg (A mask made of masking tape) +[5]: https://creativecommons.org/licenses/by-sa/4.0/ +[6]: https://opensource.com/sites/default/files/uploads/darktable-darkroom.jpg (Original photograph) +[7]: https://opensource.com/sites/default/files/uploads/darktable-panel-color-correction.jpg (Color correction panel) +[8]: https://opensource.com/sites/default/files/uploads/darktable-color-correction-global.jpg (Darktable global color correction) +[9]: https://opensource.com/sites/default/files/uploads/darktable-button-mask.jpg (Apply mask button) +[10]: https://opensource.com/sites/default/files/uploads/darktable-button-circle.jpg (Circle mask) +[11]: https://opensource.com/sites/default/files/uploads/darktable-color-mask.jpg (Color correction within a circle mask) +[12]: https://opensource.com/sites/default/files/uploads/darktable-mask-manager.jpg (Mask manager) +[13]: https://opensource.com/sites/default/files/uploads/darktable-mask-select.jpg (Selecting an existing mask) From 91adc1821beed40403d7dc393ea18f46aacd0db0 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 9 Dec 2021 05:04:55 +0800 Subject: [PATCH 128/244] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211208=20?= =?UTF-8?q?Vanilla=20Vim=20is=20fun?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211208 Vanilla Vim is fun.md --- sources/tech/20211208 Vanilla Vim is fun.md | 414 ++++++++++++++++++++ 1 file changed, 414 insertions(+) create mode 100644 sources/tech/20211208 Vanilla Vim is fun.md diff --git a/sources/tech/20211208 Vanilla Vim is fun.md b/sources/tech/20211208 Vanilla Vim is fun.md new file mode 100644 index 0000000000..9e1a7f987a --- /dev/null +++ b/sources/tech/20211208 Vanilla Vim is fun.md @@ -0,0 +1,414 @@ +[#]: subject: "Vanilla Vim is fun" +[#]: via: "https://opensource.com/article/21/12/vanilla-vim-config" +[#]: author: "Lukáš Zapletal https://opensource.com/users/lzap" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Vanilla Vim is fun +====== +Here's how I dropped from 35 Vim plugins to just six. +![Person drinking a hot drink at the computer][1] + +When you start Vim with the `--clean` option, it shows up in "vanilla" mode. No plugins, no configuration, just back to the roots. I have collected a ton of configuration statements over the years, some of them dating from MS-DOS or Windows 3.1. Here is the deal: I will start from scratch to find a good starting-point configuration with just the plugins available in Fedora 35. Will I survive a week of coding? I'll find out! + +Here are the rules: Minimum possible configuration statements and only plugins which ship with Fedora 35+. By the way, if you are not a Fedora user, continue reading. You can always install these plugins from your OS package manager manually or using a Vim plugin manager. + +Before I start, there's the elephant in the room: Vim or Neovim (fork of Vim) question. Well, this is up to you. Everything that is in this article should work for both. However, I only tested with Vim. All the skills will come in handy when you log on to a server where only `vi` is available. It can be either an old UNIX system, a Linux server with minimum software installed for better security, an interactive shell in a container, or an embedded system where space is precious. + +Without further ado, here is what I distilled to the absolute bare minimum to be effective with Vim for coding: + + +``` + + +# dnf install --allowerasing vim-default-editor \ +        vim-enhanced \ +        vim-ctrlp \ +        vim-airline \ +        vim-trailing-whitespace \ +        vim-fugitive \ +        vim-ale \ +        ctags + +``` + +Do not worry about the `--allowerasing` option. Just review the installation transaction before confirming. This option is there to tell the package manager to replace the existing package `nano-default-editor` with `vim-default-editor`. It is a small package that drops shell configuration files to set the EDITOR environment variable to `vim`, and this is a must-have if you want to use Vim (for example, with git). This is a special thing for Fedora. You will not need to do this on other distributions or OSes—just make sure your EDITOR shell variable is correctly set. + +### Overview + +A quick overview of what I consider a good and clean plugin set: + + * **CtrlP**: Smallest possible fuzzy-finder plugin (pure vimscript) + * **Fugitive**: A must-have tool for git + * **Trailing-whitespace**: Shows and fixes, well, trailing whitespace + * **Airline**: An improved status line (pure vimscript) + * **Ale**: Highlights typos or syntax errors as you type + * **Ctags**: Not a Vim plugin but a very much needed tool + + + +There are other fuzzy-finder plugins like command-t or my favorite (very fast) `fzf.vim`. The thing is, `fzf.vim` is not in Fedora, and I want the smallest possible configuration. CtrlP will do just fine, and it is much easier to configure as it requires nothing. + +If I were to choose an absolute minimum configuration it would be: + + +``` + + +# cat ~/.vimrc +let mapleader="," +let maplocalleader="_" +filetype plugin indent on +let g:ctrlp_map = '<leader><leader>' +let g:ctrlp_user_command = ['.git/', 'git --git-dir=%s/.git ls-files -oc --exclude-standard'] +set exrc +set secure + +``` + +But that is probably too extreme, so here is a slightly bigger configuration with my detailed explanation below: + + +``` + + +" vim: nowrap sw=2 sts=2 ts=2 et: + +" leaders +let mapleader="," +let maplocalleader="_" + +" filetype and intent +filetype plugin indent on + +" incompatible plugins +if has('syntax') && has('eval') +  packadd! matchit +end + +" be SSD friendly (can be dangerous!) +"set directory=/tmp + +" move backups away from projects +set backupdir=~/.vimbackup + +" fuzzy searching +let g:ctrlp_map = '<leader><leader>' +let g:ctrlp_user_command = ['.git/', 'git --git-dir=%s/.git ls-files -oc --exclude-standard'] +nnoremap <leader>b :CtrlPBuffer<cr> +nnoremap <leader>t :CtrlPTag<cr> +nnoremap <leader>f :CtrlPBufTag<cr> +nnoremap <leader>q :CtrlPQuickfix<cr> +nnoremap <leader>m :CtrlPMRU<cr> + +" buffers and quickfix +function! ToggleQuickFix() +  if empty(filter(getwininfo(), 'v:val.quickfix')) +    copen +  else +    cclose +  endif +endfunction +nnoremap <leader>w :call ToggleQuickFix()<cr> +nnoremap <leader>d :bd<cr> + +" searching ang grepping +nnoremap <leader>g :copen<cr>:Ggrep!<SPACE> +nnoremap K :Ggrep "\b<C-R><C-W>\b"<cr>:cw<cr> +nnoremap <leader>s :set hlsearch! hlsearch?<cr> + +" ctags generation +nnoremap <leader>c :!ctags -R .<cr><cr> + +" per-project configs +set exrc +set secure + +``` + +### Using a comma for leader key + +I like having my leader key mapped to a comma instead of the default backslash. It is the closest free key in Vim when your hands are in writing position. Also, this key is the same in most keyboard layouts while `\` varies per model or layout. I rarely use a local leader but underscore looks like a good fit. + +Further reading: + + * See `:help map-which-keys` in the [Vim Reference Manual][2] + * See the unused keys in Vim on the [Vim Tips Wiki][3] + + + +### Filetype and syntax off + +Next up is the very important `filetype` command. See, Vim comes with "batteries included," version 8.2 contains syntax highlighting for 644 languages, 251 filetype definitions (`ftplugins`), and indentation rules for 138 languages. However, indentation is not enabled by default, perhaps to deliver a consistent editing experience for all. I like to enable it. + +A quick tip: If you are editing a very large file and Vim feels slow, you may want to disable syntax highlighting to speed things up. Just the type `:syn off` command. + +Further reading: + + * See `:help filetype` in the [Vim Reference Manual][4] + * See `:help syntax` in the [Vim Reference Manual][5] + * See `:help indent` in the [Vim Reference Manual][6] + + + +### Matchit plugin + +Vim even comes with some extra plugins, which makes some features incompatible, one of these is quite useful. It is the `matchit` plugin that makes `%` key find matching parens to work with some languages. Typically, you can find the beginning or end of a block (begin and end) or HTML matching tags and similar. + +Further reading: + + * See `:help matchit` in the [Vim Reference Manual][7] + + + +### Swap file + +One of the many settings I want to keep from my old config is using `/tmp` for swap and creating backups in a separate directory in my home, which you need to create with `mkdir ~/.vimbackup`. It is important to understand that Vim creates a copy called "swap file" when you start editing, and all the unsaved work gets saved in this file. So even if there is a power outage, your swap contains most of the unsaved work. I prefer using `tmpfs` as all my laptops and servers are protected with UPS, and I save often. Also, most of the time, you use swap files when your SSH connection is lost rather than due to a power outage. Swap files can be quite big for large files and I value my SSD, so I am making the decision here. If you are unsure, remove this statement to use `/var/tmp`, which is safer. + +Further reading: + + * See `:help swap-file` in the [Vim Reference Manual][8] + + + +### Fuzzy-finder plugin + +Now, the fuzzy finder is a plugin I cannot live without. Opening files using commands like `:Ex` or `:e` or `:tabe` is okay on a server when you need to open like 20 files a day. When coding, I usually need to open hundreds of them. As I said, CtrlP does the job nicely. It is small, with no dependencies—pure Vim. It opens with the **Ctrl**+**P** combination, which is a bit weird to me. I know that some famous editors use it (VSCode, I think). The thing is, these are already important Vim keybindings that I do not want to override. So the winner for me is **leader**+**leader** (comma pressed twice). + +The `ctrlp_user_command` just changes how CtrlP is getting the file list. Instead of the built-in recursive file lister (glob) it uses `git ls-files` which is usually better as it ignores things from `.gitignore`, so things like `node_modules` or other irrelevant directories that can slow down the listing are not in the way. + +**Leader**+**B**/**T**/**F**/**Q**/**M** to open a list of buffers, tags, tags from the current file, quick fix buffer, and most recently used files is very useful. Specifically, once you generated a `taglist` with `ctags`, this is essentially "Go To Definition" for hundreds of programming languages—no plugins needed! This is all built-in in Vim. Now to put things straight, when I type **leader**+**B**, it means pressing comma and then pressing **B** key, not together like with **Control** or **Shift**. + +Further reading: + + * See `:help Explore` in the [Vim Reference Manual][9] + * See the [ctrlp.vim GitHub][10] + + + +### Buffer management + +Although Vim supports tabs these days, buffer management is an important skill for mastering Vim. I usually end up with too many buffers and I need to do `:bdelete` way too often. Well, **leader**+**D** seems like a good option to do that faster. I also like to close the Quickfix window, so there is the **leader**+**W** combination for that too. I use this very often when browsing search results. + +Further reading: + + * See `:help buffer-hidden` in the [Vim Reference Manual][11] + + + +### Ggrep and the fugitive plugin + +Speaking about searching, it is as important as opening files. I want to be able to grep the codebase. For that, there is the awesome `:Ggrep` command from the fugitive plugin, which uses git grep, which ignores junk files and only searches what's in git. Since **Shift**+**K** is a free key in Vim, it is a great fit for automatically grepping the term under the cursor. And finally, being able to enter arbitrary search patterns using **leader**+**G** is also nice. Note this opens a window called the Quickfix window where you can navigate the results, go to next occurrence, previous, last, first, and more. The same window is used for output from compilators or other tools, so get familiar with it. I suggest further reading in the documentation if this is new to you. + +Further reading: + + * See `:help quickfix` in the [Vim Reference Manual][12] + * See the [vim-fugitive GitHub][13] + + + +### Searching and grepping with fugitive + +By the way, searching with `/` key is smart and sensitive, meaning if all characters are lower case, Vim searches ignoring case. By default, it highlights results, and I think I typed `:noh` (turn of highlighting) about a million times. That's why I have **leader**+**S** to toggle this. I suggest reading more about searching in the manual later on too. + +Searching and grepping are next. The fugitive plugin has you covered. Use the command `:Ggrep pattern` to do a git grep, and results will go into the Quickfix window. Then simply navigate through the results using quick fix commands (`:cn`, `:cp`, and such) or simply use `:CtrlPQuickfix` (or **leader**+**Q**) to scroll them visually. What is cool about the CtrlP quick fix integration is that you can further search the results by typing to match filenames or content if it makes sense—searching the search results. + +Further reading: + + * See `:help grep` in the [Vim Reference Manual][14] + * See `:help noh` in the [Vim Reference Manual][15] + * See the [vim-fugitive GitHub][13] + + + +### Ctags + +**Leader**+**C** to generate a `ctags` file for better navigation is useful when dealing with a new codebase or doing a longer coding session with lots of jumps around. Ctags supports hundreds of languages, and Vim can use all this knowledge to navigate it. More about how to configure it later. Note I already discussed **leader**+**T** to open fuzzy search for all tags, remember? It is the very same thing. + +Further reading: + + * See `:help ctags` in the [Vim Reference Manual][16] + * See the [Universal Ctags website][17] + + + +### Key mapping + +Being able to override any other setting in projects by creating a `.vimrc` file in a project directory is a good idea. Just put it in the (global) `.gitignore` to ensure you don't need to edit thousands of git ignore files in each project. Such a project `.vimrc` could be something like (for C/C++ project with GNU Makefile): + + +``` + + +" coding style +set tabstop=4 +set softtabstop=4 +set shiftwidth=4 +set noexpandtab +" include and autocomplete path +let &path.="/usr/local/include" +" function keys to build and run the project +nnoremap <F9> :wall!<cr>:make!<cr><cr> +nnoremap <F10> :!LD_LIBRARY_PATH=/usr/local/lib ./project<cr><cr> + +``` + +As you can see, I typically map **F2**-**F10** keys to compile, run, test, and similar actions. Using **F9** for calling `make` sounds about right. Remember the blue Borland IDE from MS-DOS? + +As mentioned earlier, it is a good idea to ignore both `.vimrc` and `tags` (generated by `ctags`) globally so there is no need to update every each `.gitignore`: + + +``` + + +# git config --global core.excludesfile ~/.gitignore +# cat ~/.gitignore +/.vimrc +/tags +/TAGS + +``` + +A few more statements in my personal config are only relevant for those with non-US keyboard layouts (I am on Czech). I need to use dead keys for many characters, and it is simply not possible, and I'd rather type the command instead of doing those hard-to-reach combinations. Here is a solution to the problem: + + +``` + + +" CTRL-] is hard on my keyboard layout +map <C-K> <C-]> +" CTRL-^ is hard on my keyboard layout +nnoremap <F1> :b#<cr> +nnoremap <F2> :bp<cr> +nnoremap <F3> :bn<cr> +" I hate entering Ex mode by accident +map Q <Nop> + +``` + +Further reading: + + * See `:help map` in the [Vim Reference Manual][18] + + + +Function keys are all free in Vim, except **F1**, which is bound to help. I don't need help, not that I would already know everything about Vim. Not at all. But I can simply type `:help` if needed. And **F1** is a crucial key, so close to the **Esc** key. I like to use buffer swapping (`:b#`) for that and **F2**-**F3** for next/previous. The more you work with buffers, the more you will need this. If you haven't used **Ctrl**+**^**, I suggest getting used to it. Oh, have you ever entered the Ex mode with the ugly type `:visual`? Many beginners had no idea how to quit Vim from that mode. For me, it is just disturbing as I rarely use it. + +Now, getting familiar with `ctags` is a key thing to be successful with Vim. This tool supports hundreds of languages and it can easily create tags for files you do not want to create, therefore I suggest ignoring typical junk directories: + + +``` + + +# cat ~/.ctags.d/local.ctags +\--recurse=yes +\--exclude=.git +\--exclude=build/ +\--exclude=.svn +\--exclude=vendor/* +\--exclude=node_modules/* +\--exclude=public/webpack/* +\--exclude=db/* +\--exclude=log/* +\--exclude=test/* +\--exclude=tests/* +\--exclude=\\*.min.\\* +\--exclude=\\*.swp +\--exclude=\\*.bak +\--exclude=\\*.pyc +\--exclude=\\*.class +\--exclude=\\*.cache + +``` + +### Airline plugin + +I must not forget about the Vim airline plugin. Out of the two in Fedora, this one is light, no external dependencies are needed, and it works out of the box with all my fonts. You can customize it, and there are themes and such things. I just happen to like the default setting. + +I must mention that there are two main `ctag` projects: Exuberant Ctags and Universal Ctags. The latter is a more modern fork. If your distribution has it, use that. If you are on Fedora 35+, you need to know that you are now on Universal Ctags. + +### Wrap up + +As I wrap it up, here is what I suggest. Try to keep your Vim configuration slick and clean. It will pay off in the future. After I switched, I had to re-learn the "write and quit" commands because I was typing it as `:Wq` accidentally all the time, and I had a "hack" in the old configuration that actually did what I meant. Okay, this one might be actually useful and make the cut—I hope you get what I mean: + + +``` + + +:command Wq wq +:command WQ wq + +``` + +Here is a final quick tip: You may need to change your default Vim configuration a lot while finding the sweet spot of what I presented you here and your own taste. Use the following alias, so you don't need to search the history all the time. Trust me, when a Vim user searches history for "vim," nothing is relevant: + + +``` +`alias vim-vimrc='vim ~/.vimrc'` +``` + +There you have it. Maybe this can help you navigate through the rich world of Vim without a ton of plugins. _Vanilla_ Vim is fun! + +To try out what you just read, install the packages and check out the config: + + +``` + + +test -f ~/.vimrc && mv ~/.vimrc ~/.vimrc.backup +curl -s -o ~/.vimrc +mkdir ~/.vimbackup + +``` + +Special thanks to Marc Deop and [Melanie Corr][19] for reviewing this article. + +* * * + +**Update:** + +I've survived! The only struggle I had was the different order of results from the CtrlP plugin. The fuzzy algorithm for files is different from the `fzf.vim` plugin, so files that I used to find using various search terms do not work now. I ended up installing the fzf package from Fedora, which ships with a vim function FZF that can be bound to the leader combination for a more relevant file search. See the updated configuration file in my [GitHub repository][20]. I've learned a lot along the way. There are keybinding which I've already forgotten thanks to many plugins. + +* * * + +_This article originally appeared on the [author's website][21] and is republished with permission._ + +Vim offers great benefits to writers, regardless of whether they are technically minded or not. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/vanilla-vim-config + +作者:[Lukáš Zapletal][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/lzap +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/coffee_tea_laptop_computer_work_desk.png?itok=D5yMx_Dr (Person drinking a hot drink at the computer) +[2]: https://vimhelp.org/map.txt.html#map-which-keys +[3]: https://vim.fandom.com/wiki/Unused_keys +[4]: https://vimhelp.org/filetype.txt.html +[5]: https://vimhelp.org/syntax.txt.html +[6]: https://vimhelp.org/indent.txt.html +[7]: https://vimhelp.org/usr_05.txt.html#matchit-install +[8]: https://vimhelp.org/recover.txt.html#swap-file +[9]: https://vimhelp.org/pi_netrw.txt.html#netrw-explore +[10]: https://github.com/kien/ctrlp.vim +[11]: https://vimhelp.org/windows.txt.html#buffer-hidden +[12]: https://vimhelp.org/quickfix.txt.html +[13]: https://github.com/tpope/vim-fugitive +[14]: https://vimhelp.org/quickfix.txt.html#grep +[15]: https://vimhelp.org/pattern.txt.html#noh +[16]: https://vimhelp.org/tagsrch.txt.html +[17]: https://ctags.io +[18]: https://vimhelp.org/map.txt.html +[19]: https://opensource.com/users/melanie-corr +[20]: https://github.com/lzap +[21]: https://lukas.zapletalovi.com/2021/11/a-sane-vim-configuration-for-fedora.html From 5f804747bdf2924b1d120e03d5dd743895120e90 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 9 Dec 2021 05:05:17 +0800 Subject: [PATCH 129/244] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020211209=20?= =?UTF-8?q?Zorin=20OS=2016=20Lite=20Edition=20is=20Finally=20Here=20With?= =?UTF-8?q?=20Latest=20Xfce=204.16?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20211209 Zorin OS 16 Lite Edition is Finally Here With Latest Xfce 4.16.md --- ...n is Finally Here With Latest Xfce 4.16.md | 118 ++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 sources/news/20211209 Zorin OS 16 Lite Edition is Finally Here With Latest Xfce 4.16.md diff --git a/sources/news/20211209 Zorin OS 16 Lite Edition is Finally Here With Latest Xfce 4.16.md b/sources/news/20211209 Zorin OS 16 Lite Edition is Finally Here With Latest Xfce 4.16.md new file mode 100644 index 0000000000..2c5ee18352 --- /dev/null +++ b/sources/news/20211209 Zorin OS 16 Lite Edition is Finally Here With Latest Xfce 4.16.md @@ -0,0 +1,118 @@ +[#]: subject: "Zorin OS 16 Lite Edition is Finally Here With Latest Xfce 4.16" +[#]: via: "https://news.itsfoss.com/zorin-os-16-lite-release/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Zorin OS 16 Lite Edition is Finally Here With Latest Xfce 4.16 +====== + +[Zorin OS 16][1] was an impressive release. But, if you were looking for a lightweight distro or something for older computers, this wasn’t the option. + +Zorin OS provides a lite edition for every release powered by Xfce desktop environment for computers with limited resources. However, it wasn’t available for Zorin OS 16 until now. + +Yes, finally, Zorin OS 16 Lite is now available to download along with the Pro edition! + +Note that if you have already purchased Zorin OS 16 Pro, the Pro Lite edition is included. + +### Zorin OS 16 Lite: What’s New? + +![][2] + +With this release, Zorin OS 16 Lite aims to bring all the [improvements introduced in Zorin OS 16][3] by keeping the resource usage minimal. + +I briefly tested the distribution for our video review and was pretty impressed. + +Interestingly, Zorin OS 16 Lite has managed to offer a similar level of user experience and polish with Xfce as its desktop environment. Usually, I do not like the Xfce desktop environment (just an aesthetic choice), but Zorin OS 16 Lite is different. + +I have made a video of Pro edition of Zorin OS 16 Lite and you can see it in action: + +![][4] + +#### Visual Overhaul + +![][5] + +Zorin OS 16 Lite with Xfce 4.16 offers a refreshing user experience with a polished theme that resonates closely with Zorin OS 16 (GNOME edition). + +You can tweak the theme, toggle dark mode, and choose an accent color from the appearance menu. The appearance options also received a refresh to let you easily customize the experience on Zorin OS 16 Lite. + +Unfortunately, you do not get a jelly mode here, like in Zorin OS 16. So, if you need eye-candy animations, the lite edition may not be a suitable choice for you. + +In addition to the new visual changes, and features, you will also find new backgrounds to complement your desktop. Some wallpapers could be limited to the Pro edition. + +![][6] + +#### Desktop Layouts for Pro Edition + +While you already get some choices for desktop layouts in the free version, the Pro edition gives you two more additional desktop layouts. + +![][5] + +One of the layouts resembles a classic Windows design and the other manages to look close to ChromeOS. + +![][5] + +You also get to choose between a macOS-like layout, GNOME 2, and a Windows list-like layout. + +Note that the default layout is Windows-like and should be a great experience as [one of the best distributions for Windows users][7]. + +#### Taskbar With Window Previews + +![][8] + +There has been an important addition to the desktop functionality, i.e., you can now easily view the preview of an active window when you hover over it from the taskbar. + +At the time of testing this with the pre-released ISO, it was not a smooth experience. But, considering they iron out the bugs, it is an excellent feature to have in Zorin OS 16 Lite. + +#### Flathub Enabled by Default + +The application center (or software center) also offers Flathub integration out of the box. You should quickly find Flatpak apps from the software center and choose to change sources if you do not prefer Flatpak packages. + +#### Other Improvements + +![][9] + +In addition to the key changes, you will also find improvements like Firefox browser baked in with telemetry disabled, a new sound recorder app, fractional scaling for high-resolution displays, and the Rythmbox app. + +Thunar file manager has received usual subtle improvements and blends in with the rest of the design. You should be able to play videos out-of-the-box using the parole video player. + +The presence of [Linux Kernel 5.11][10] should make sure of some technical compatibility improvements. + +Overall, the Zorin OS team has done a wonderful job in carrying over the beautiful design and ease of use from Zorin OS 16 to its lite edition. You may not even realize that you are using the Xfce desktop environment for the most part. + +### Download Zorin OS 16 Lite + +You can head to its download page to get Zorin OS 16 Lite ISO. If you have already purchased Zorin OS 16 Pro, you can use the link from your email to download the Pro Lite edition. + +[Zorin OS 16 Lite][11] + +What do you think about Zorin OS 16 Lite? Feel free to let us know your thoughts in the comments. + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/zorin-os-16-lite-release/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://news.itsfoss.com/zorin-os-16-release/ +[2]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQzOSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[3]: https://news.itsfoss.com/zorin-os-16-features/ +[4]: https://i2.wp.com/i.ytimg.com/vi/Cl5qXPY9OLk/hqdefault.jpg?w=780&ssl=1 +[5]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjU4NSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[6]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjI5MyIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[7]: https://itsfoss.com/windows-like-linux-distributions/ +[8]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjIxOCIgd2lkdGg9IjY2MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[9]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ2MiIgd2lkdGg9IjY1NSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[10]: https://news.itsfoss.com/linux-kernel-5-11-release/ +[11]: https://zorin.com/os/download/ From d3248dac00658d2768d390beee80abbac589c72c Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 9 Dec 2021 07:55:27 +0800 Subject: [PATCH 130/244] TSL&PRF --- ... Terminal Every Ubuntu User Should Know.md | 417 ------------------ ... Terminal Every Ubuntu User Should Know.md | 377 ++++++++++++++++ 2 files changed, 377 insertions(+), 417 deletions(-) delete mode 100644 sources/tech/20211206 19 Absolute Simple Things About Linux Terminal Every Ubuntu User Should Know.md create mode 100644 translated/tech/20211206 19 Absolute Simple Things About Linux Terminal Every Ubuntu User Should Know.md diff --git a/sources/tech/20211206 19 Absolute Simple Things About Linux Terminal Every Ubuntu User Should Know.md b/sources/tech/20211206 19 Absolute Simple Things About Linux Terminal Every Ubuntu User Should Know.md deleted file mode 100644 index cd3b527a82..0000000000 --- a/sources/tech/20211206 19 Absolute Simple Things About Linux Terminal Every Ubuntu User Should Know.md +++ /dev/null @@ -1,417 +0,0 @@ -[#]: subject: "19 Absolute Simple Things About Linux Terminal Every Ubuntu User Should Know" -[#]: via: "https://itsfoss.com/basic-terminal-tips-ubuntu/" -[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" -[#]: collector: "lujun9972" -[#]: translator: "wxy" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -19 Absolute Simple Things About Linux Terminal Every Ubuntu User Should Know -====== - -Terminal often intimidates new users. However, once you get to know it, you gradually start liking it. Well, that happens with most Linux users. - -Even if you are using Ubuntu as a desktop system, you may have to enter the terminal at times. New users are often clueless about many things. Some knowledge of basic Linux commands always helps in such cases but this article is not about that. - -This article focuses on explaining small, basic and often ignored things about using the terminal. This should help new Ubuntu desktop users to know the terminal and use it with slightly more efficiency. - -![][1] - -The terminal you see is just one of the [various terminal applications][2] available. After all terminal is just a GUI tool that gives you access to a shell where you can run the commands. - -Different terminal applications (properly called terminal emulators) look different, have slightly different functions and features (like different keyboard shortcuts, color combination, fonts etc). - -This article is specifically focused on the default Ubuntu terminal which is an implementation of the GNOME terminal. - -### 1\. Open the terminal with keyboard shortcut - -You can [open the terminal in Ubuntu][3] by looking for it in the system menu. However, my favorite way is to use the Ctrl+Alt+T [keyboard shortcut in Ubuntu][4]. - -``` - - Ctrl+Alt+T - -``` - -### 2\. Terminal vs shell vs prompt vs command line - -Before you see anything else, you should know the difference between different terminologies that are often (incorrectly) used interchangeably. - -![Terminal, prompt and command][5] - -Terminal is the graphical application that runs a shell by default. - -Shell is difficult to visualize separately from the terminal. The terminal is running a shell, usually Bash shell by default in Ubuntu. Like terminals, there are various shells as well. Bash is the most popular of them all and default shell on most Linux distributions. - -The commands you type is interpreted by the shell. Often people think that screen they see in the terminal is the shell. That’s fine for understanding. - -Prompt is what you see before the space where you type the commands. There is no set standard for the prompt. In some old terminals, you would just have a blinking cursor to the place where you can type the commands. In Ubuntu terminal, prompt gives you some information which you’ll see in detail in the later sections of this article. - -Command line is not something specific to Linux. Every operating system has a command line interface. Many programming languages have command line interface. It’s a term used for the interface where you can run and execute commands. - -There is this video by Luke Smith that explains it in detail with examples. I won’t go in details here anymore to keep things on the track. - -[Subscribe to It’s FOSS YouTube channel for interesting Linux videos][6] - -### 3\. Understanding the prompt - -You know it by now. What you see before the space where you type the command is called prompt. It is configurable and looks different in different distributions, terminal applications and shells. - -Ubuntu terminal has configured the prompt to show you a few things. You can get the following information at a glance: - - * User name - * Hostname (name of the computer) - * Current working directory - - - -A few more things you may wonder about. - -The colon (:) in the prompt is a separator to distinguish between hostname and the current location. - -Tilde (~) means the home directory of the present user. - -For normal users, the prompt ends with dollar ($) symbol. For the root user, it ends with pound or hash (#) symbol. And hence the joke that pound is stronger than dollar. - -![][7] - -Did you notice that when I switched to the root user, the command prompt looked different without any colors? This is another reminder that prompt is not a standard and is configured explicitly. For normal users, Ubuntu has a different configuration of the prompt than the root. - -Simple information like this helps indirectly. In a multi-user environment, you can easily figure out which user you are using right now and if it is a root user. The displayed location is also helpful. - -![][8] - -### 4\. Directory and files - -Two terms you hear the most in Linux are directory and files. - -You probably know what a file is but you may get confused with the term ‘directory’. Directory is nothing but folder. It keeps files and folders inside it. - -You can go inside the directories but you cannot enter files. You can read files of course. - -![][9] - -You can use the term ‘folder’ for directory and it should be fine. However, it is better to use ‘directory’ because this is what you’ll see referenced in various tutorials, documents etc. You’ll even find commands like rmdir, mkdir hinting that they deal with directories. - -Additional note: Everything is a file in Linux. Even directory is a special kind of file that has the memory address of files and directories inside it. I have explained it in my [article on hard links][10]. You may refer to that if you want to know more on this topic. - -### 5\. Path: Absolute and relative - -The [directory structure in Linux resembles][11] the root of a tree. Everything starts at root and spreads out from there. - -If you have to access a file or directory, you need to tell how to reach its location by providing its ‘path’. This path that is composed of directory names and separators (/). If a path starts with / (i.e., root), it is an absolute path otherwise it is a relative path. - -![Path][12] - -The absolute path starts from the root and can be easily referenced from anywhere in the system. The relative path depends upon your current location in the directory structure. - -![absolute vs relative path][13] - -If you are in the location /home/abhishek which has a directory named scripts containing a file my_script.sh and you want the path for this file, its absolute path will be: - -``` - - /home/abhishek/scripts/my_script.sh - -``` - -Its relative path will be: - -``` - - scripts/my_script.sh - -``` - -If you change the location, the absolute path of the file remains the same. However, the relative path changes because it is relative to your current path. - -![Real examples of how relative path changes with location but absolute path remains the same][14] - -### 6\. . and .. - -You may often come across . and .. notation while using the Linux terminal. - -Single dot (.) means the current directory. - -Double dots (..) mean the parent directory (one directory above the current location). - -You’ll often use the double dot (..) in relative path or for changing directory. Single dot (.) is also used in relative path but more importantly, you can use it in the commands for specifying the current locations. - -![Use of . and ..][15] - -### 7\. Understand the command structure - -A typical Linux command consists of a command name followed by options and arguments. - -``` - - command [options] argument - -``` - -Option, as the name suggests, are optional. When used, they might change the output based on their properties. - -For example, the cat command is used for viewing files. You can add the option -n and it will display line numbers as well. - -Options are not standardized. Usually, they are used as single letter with single dash (-). They may also have two dashes (–) and a word. - -Same options may have different meaning in a different command. If you use -n with head command, you specify the number of lines you want to see, not the lines with numbers. - -![Same option -n has different use in cat and head commands][16] - -In command documentations, _**if you see something between brackets ([]), it indicates that the contents of the bracket are optional.**_ - -Similarly, arguments are also not standardized. Some commands expect filenames as argument and some may expect directory name or a regular expression. - -### 8\. Getting help - -As you start using commands, you may remember some of the options of frequently used commands but it is simply not possible for you to remember all the options of any command. - -Why? Because a single command may have more than ten or twenty options. - -So, what do you do when you cannot recall all the options? You take help. And with help, I do not mean asking a question in It’s FOSS [Linux forum][17]. I ask to use the help option of the command. - -Every standard Linux command has a quick help page that can be accessed with -h or –help or both. - -``` - - command_name -h - -``` - -It gives you a quick glimpse of the command syntax, common options with their meaning and in some cases, command examples. - -![The help page of the cat command][18] - -If you need more help, you can refer to the [manpage][19] i.e. manual of a command: - -``` - - man command_name - -``` - -It goes in all of details and could be overwhelming to read and understand. Alternatively, you can always search on the internet for ‘examples of xyz commands in Linux’. - -### 9\. Linux is case-sensitive - -Linux is case-sensitive. Everything you type in the terminal is case-sensitive. If you do not take that into account, you’ll often run into [bash: command not found][20] or file not found errors. - -In the home directory, you have all the folders name starting with the upper case. If you have to switch to the Documents directory, you have to keep the first letter as D and not d. Otherwise, the terminal will complain. - -![Linux is case sensitive][21] - -You can have two separate files named file.txt and File.txt because for Linux, file and File are not the same. - -### 10\. Running shell scripts - -You can [run a shell script][22] by specifying the shell: - -``` - - bash script.sh - -``` - -Or you can execute the shell script like this: - -``` - - ./script.sh - -``` - -The second one will only work when the file has execute permission. More on [Linux file permission here][23]. - -![Running bash script][24] - -### 11\. Use tab completion instead of typing it all - -The Ubuntu terminal is pre-configured with tab completion. This means that if you start writing something in the terminal and then hit tab, it tries to automatically complete it or provide options if there are more than one possible matches. - -It works for both commands as well arguments and filenames. - -![Tab completion example][25] - -This saves a great ton of time because you don’t have to write everything completely. - -### 12\. Ctrl+C and Ctrl+V is not for copy pasting in terminal - -Ctrl+C, Ctrl+V might be the ‘universal’ keyboard shortcuts for copy paste but it doesn’t work in the Linux terminal. - -Linux inherits a lot of stuff from UNIX and in UNIX, Ctrl+C was used for stopping a running process. - -Since the Ctrl+C was already taken for stopping a command or process, it cannot be used for copy-paste anymore. - -### 13\. You can surely copy paste in the terminal - -Don’t worry. You can still [copy paste in the terminal][26]. Again, there is no fixed rule for the copy-paste keyboard shortcuts because it depends on the terminal application you are using or the configuration you have in place. - -In Ubuntu terminal, the default keyboard shortcut for copy is Ctrl+Shift+C and for paste, it is Ctrl+Shift+V. - -You can use Ctrl+C to copy text and commands from outside the terminal (like a web browser) and paste it using Ctrl+Shift+V. Similarly, you can highlight the text and use Ctrl+Shift+C to copy the text from the terminal and paste it to an editor or other applications using Ctrl+V. - -### 14\. Avoid using Ctrl+S in the terminal - -Another common mistake beginners do is to use the ‘universal’ Ctrl+S keyboard shortcut for save. If you use Ctrl+S in the terminal, your terminal ‘freezes’. - -This is coming from the legacy computing where there was no scope of scrolling back up. Hence, if there were lots of output lines, Ctrl+S was used for stopping the screen so that text on the screen could be read. - -You can unfreeze your terminal with Ctrl+Q. But again, avoid using Ctrl+S in the terminal. - -### 15\. Pay attention to $ and <> in command examples - -If you are referring to some online tutorial or documentation, you’ll see some command examples with text inside <>. This indicates that you need to replace the content along with < and > with a suitable value. - -For example, if you see a command like this: - -``` - - grep -i - -``` - -You should replace the <search_term> and <file_name> with the respective actual values. - -It is and indication that the command is just an example and you have to complete it with actual values. - -Another thing to note here is that some tutorials show command examples that start with $ like this: - -![dollar symbol at the beginning of command][27] - -This is a way for them to indicate that it is command (not command output). But many new Linux users copy the preceding $ along with the actual command and when they paste it in the terminal, it throws error obviously. - -So, when you are copying some command, don’t copy the $ if it is there at the beginning. You should also avoid copying random commands for random websites specially when you do not understand what it does. - -Since you are reading about copying commands, when you see commands in multiple lines together, you should copy one line at a time and run them on by one: - -![Avoid copying multiple commands together][28] - -The next section tells you how to run multiple commands in one go. - -### 16\. You can run multiple commands at once - -You can [run multiple commands at once][29] without user intervention. You might have seen it already as an Ubuntu user in the form of this command: - -``` - - sudo apt update && sudo apt upgrade - -``` - -There are three different ways to combine commands in the terminal: - -; | Command 1 ; Command 2 | Run command 1 first and then command 2 ----|---|--- -&& | Command 1 && Command 2 | Run command 2 only if command 1 ends sucessfully -| | - -### 17\. Stop a running Linux command - -If a Linux command is running in the foreground, i.e., it is showing output or you cannot enter any other command, you can stop it using the Ctrl+C keys. - -I discussed it previously. It comes from the legacy computing days of UNIX. - -So, the next time you see a command like top or ping running continuously and you want the terminal control back, just use these two keys: - -``` - - Ctrl+C - -``` - -![Stop a running program in Linux with Ctrl+C][30] - -### 18\. Clear the terminal - -When I find that my screen is too cluttered with different kind of output, I clear the terminal screen before starting some other work. It just a habit but I find it helpful. - -To clear the terminal, use the command - -``` - - clear - -``` - -You may also use Ctrl+L [terminal shortcut][31]. - -### 19\. Exiting the terminal - -In a few cases, I have seen people closing the terminal application to exit the session. You could do that but the proper way to exit a terminal is to use the exit command: - -``` - - exit - -``` - -You may also use the keyboard shortcut Ctrl+D for Ubuntu terminal. - -### Conclusion - -There are so many additional stuff you can do in the terminal even if you are new to the entire terminal thing. You can: - - * [Run funny Linux commands][32] - * [Browse the internet in terminal][33] - * [Play games in terminal][34] - - - -And if you are looking for more, [take a look at][35] [these Linux command tips and use the terminal like a pro][35]. - -Honestly speaking, there is way too much to talk about. It is difficult to determine what should be considered as absolute basics and what should be left out. For example, I wanted to avoid including the information about paths because it needs detailed explanation but going too much in detail on a single could be overwhelming. - -I have passed the stage where small things used to baffle me in the terminal. If you are new to the Linux terminal or if you remember the struggle from your initial Linux days, feel free to suggest any additions to the list. I might update the list with your input. - -And if you learned something new, please do mention it in the comments. I would like to see if this article was worth the effort :) - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/basic-terminal-tips-ubuntu/ - -作者:[Abhishek Prakash][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/abhishek/ -[b]: https://github.com/lujun9972 -[1]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/ubuntu-terminal-basic-tips.png?resize=800%2C450&ssl=1 -[2]: https://itsfoss.com/linux-terminal-emulators/ -[3]: https://itsfoss.com/open-terminal-ubuntu/ -[4]: https://itsfoss.com/ubuntu-shortcuts/ -[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/linux-terminal-introduction.png?resize=800%2C450&ssl=1 -[6]: https://www.youtube.com/c/itsfoss?sub_confirmation=1 -[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/understanding-prompt-ubuntu-terminal.png?resize=800%2C346&ssl=1 -[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/learning-prompt-ubuntu-terminal.png?resize=800%2C346&ssl=1 -[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/directory-files-linux.png?resize=800%2C346&ssl=1 -[10]: https://linuxhandbook.com/hard-link/ -[11]: https://linuxhandbook.com/linux-directory-structure/ -[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/path-linux.webp?resize=800%2C250&ssl=1 -[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/absolute-vs-relative-path-linux.webp?resize=800%2C500&ssl=1 -[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/absolute-relative-path-real-examples-800x346.png?resize=800%2C346&ssl=1 -[15]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/use-of-single-and-double-dot-in-Linux.png?resize=732%2C272&ssl=1 -[16]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/command-structure-example.png?resize=732%2C462&ssl=1 -[17]: https://itsfoss.community/ -[18]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/cat-command-help-page.png?resize=732%2C614&ssl=1 -[19]: https://itsfoss.com/linux-man-page-guide/ -[20]: https://itsfoss.com/bash-command-not-found/ -[21]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/linux-is-case-sensitive.png?resize=732%2C253&ssl=1 -[22]: https://itsfoss.com/run-shell-script-linux/ -[23]: https://linuxhandbook.com/linux-file-permissions/ -[24]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/run-bash-script.png?resize=732%2C272&ssl=1 -[25]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/tab-completion-ubuntu.png?resize=732%2C272&ssl=1 -[26]: https://itsfoss.com/copy-paste-linux-terminal/ -[27]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/dollar-symbol-at-the-beginning-of-command.png?resize=765%2C256&ssl=1 -[28]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/avoid-copying-multiple-commands.png?resize=743%2C242&ssl=1 -[29]: https://itsfoss.com/run-multiple-commands-linux/ -[30]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/stop-running-program-linux.png?resize=800%2C385&ssl=1 -[31]: https://linuxhandbook.com/linux-shortcuts/ -[32]: https://itsfoss.com/funny-linux-commands/ -[33]: https://itsfoss.com/terminal-web-browsers/ -[34]: https://itsfoss.com/best-command-line-games-linux/ -[35]: https://itsfoss.com/linux-command-tricks/ diff --git a/translated/tech/20211206 19 Absolute Simple Things About Linux Terminal Every Ubuntu User Should Know.md b/translated/tech/20211206 19 Absolute Simple Things About Linux Terminal Every Ubuntu User Should Know.md new file mode 100644 index 0000000000..ac8093b8d2 --- /dev/null +++ b/translated/tech/20211206 19 Absolute Simple Things About Linux Terminal Every Ubuntu User Should Know.md @@ -0,0 +1,377 @@ +[#]: subject: "19 Absolute Simple Things About Linux Terminal Every Ubuntu User Should Know" +[#]: via: "https://itsfoss.com/basic-terminal-tips-ubuntu/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: " " +[#]: url: " " + +关于 Ubnutu Linux 终端的必知必会的 19 件超简单的事情 +====== + +终端常常让新用户感到害怕。然而,一旦你了解了它,你就会逐渐开始喜欢上它。好吧,这事往往发生在大多数 Linux 用户身上。 + +即使你使用 Ubuntu 作为桌面系统,你可能有时也要进入终端。新用户往往对很多事情毫无头绪,在这种情况下,一些基本的 Linux 命令的知识总是有帮助的,但这篇文章不是关于这个。 + +这篇文章的重点是解释关于使用终端的一些小的、基本的、经常被忽视的东西。这应该可以帮助 Ubuntu 桌面的新用户了解终端,并以更高的效率使用它。 + +![][1] + +你看到的“终端terminal”只是 [各种终端应用程序][2] 中的一个。毕竟终端只是一个 GUI 工具,它可以让你进入一个可以运行命令的 Shell 。 + +不同的终端应用程序(正确地应该被称为“终端仿真器”)看起来有些稍微不同的功能和特点(如不同的键盘快捷键、颜色组合、字体等)。 + +本文特别关注 Ubuntu 的默认终端,它是 “GNOME 终端”的一个实现。 + +### 1、用键盘快捷方式打开终端 + +你可以 [在 Ubuntu 中打开终端][3],在系统菜单中寻找到它。然而,我最喜欢的方式是使用 [Ubuntu 中的键盘快捷键][4]:`Ctrl+Alt+T` 。 + +### 2、终端、Shell、提示符和命令行 + +在你看其他内容之前,你应该知道这些不同术语之间的区别,这些术语经常被(不正确地)互换使用。 + +![终端、提示符和命令][5] + +“终端”是图形化的应用程序,默认情况下运行 Shell。 + +Shell 很难与终端分开进行可视化。终端运行着一个 Shell,在 Ubuntu 中通常默认为 Bash shell。和终端一样,也有各种 Shell。Bash 是其中最受欢迎的,也是大多数 Linux 发行版上的默认 Shell。 + +你输入的命令是由 Shell 解释的。通常人们认为他们在终端看到的屏幕就是 Shell。这适合理解这个概念。 + +“提示符”是你在输入命令的空格前看到的东西。对于提示符没有固定的标准。在一些旧的终端中,只是在你可以输入命令的地方有一个闪烁的光标而已。在 Ubuntu 终端中,提示符给了你一些信息,你会在本文后面的章节中看到这些信息的细节。 + +“命令行”不是 Linux 特有的东西。很多操作系统都有一个命令行界面。许多编程语言也都有命令行界面。它是一个术语,用来指你可以运行和执行命令的界面。 + +Luke Smith 的 [这个视频](https://www.youtube.com/embed/hMSByvFHOro) 用例子详细解释了它。言归正传,我在这里就不多说了。 + +### 3、了解提示符 + +你现在已经知道了。你在输入命令的空格前看到的东西叫做“提示符”。它是可配置的,在不同的发行版、终端应用程序和 Shell 中提示符看起来是不同的。 + +Ubuntu 终端对提示符进行了配置,让你看到一些东西。你可以一目了然地得到以下信息: + + * 用户名 + * 主机名(计算机的名称) + * 当前工作目录 + +还有一些你可能想知道的惯例。 + +提示符中的冒号(`:`)是一个分隔符,常用来区分主机名和当前位置。 + +波浪号(`~`)表示当前用户的主目录。 + +对于普通用户,提示符以美元(`$`)符号结束。对于 root 用户来说,它以英镑或哈希(`#`)符号结束。因此有一个笑话说,英镑比美元强。 + +![][7] + +你是否注意到,当我切换到 root 用户时,命令提示符看起来不一样,没有任何颜色?这又一次提醒了我,提示符不是一个标准,是要明确配置的。对于普通用户来说,Ubuntu 对提示符的配置与 root 用户不同。 + +像这样的简单信息间接地帮助了我们。在一个多用户环境中,你可以很容易地弄清楚你现在使用的是哪个用户,以及它是否是 root 用户。其显示的路径位置也是有帮助的。 + +![][8] + +### 4、目录和文件 + +在 Linux 中你听到最多的两个术语是目录和文件。 + +你可能知道什么是文件,但你可能会对“目录directory”这个术语感到困惑。目录就是“文件夹folder”。它把文件和文件夹放在里面。 + +你可以进入目录,但你不能进入文件。当然,你可以读取文件。 + +![][9] + +你可以用“文件夹”这个词来表示目录,应该没有问题。然而,最好使用“目录”,因为你会在各种教程、文件等中看到引用这个词。你甚至会发现像 `rmdir`、`mkdir` 这样的命令,暗示它们是处理目录的。 + +补充说明:在 Linux 中,所有东西都是文件。甚至目录也是一种特殊的文件,里面有文件和目录的地址。我已经在我的关于 [硬链接的文章][10] 中解释了这一点。如果你想了解更多关于这个主题的信息,可以参考一下。 + +### 5、路径:绝对路径和相对路径 + +[Linux 中的目录结构][11] 类似于一棵树的根。所有的东西都从根部开始,并从那里向外扩散。 + +如果你要访问一个文件或目录,你需要通过提供它的“路径”来说明如何到达它的位置。这个路径是由目录名和分隔符(`/`)组成的。如果一个路径以 `/`(即根)开头,它就是一个绝对路径,否则就是一个相对路径。 + +![路径][12] + +绝对路径从根开始,可以很容易地从系统的任何地方引用。相对路径则取决于你在目录结构中的当前位置。 + +![绝对路径与相对路径][13] + +如果你在 `/home/abhishek` 这个位置,有一个名为 `scripts` 的目录,里面有一个文件 `my_script.sh`,你想知道这个文件的路径,它的绝对路径将是: + +``` +/home/abhishek/scripts/my_script.sh +``` + +它的相对路径将是: + +``` +scripts/my_script.sh +``` + +如果你改变所在位置,文件的绝对路径保持不变。但是,相对路径会改变,因为它是相对于你当前的路径而言的。 + +![相对路径随位置变化但绝对路径保持不变的真实例子][14] + +### 6、 . 和 .. + +在使用 Linux 终端时,你可能经常会遇到 `.`和 `..` 符号。 + +单点(`.`)表示当前目录。 + +双点(`..`)表示父目录(比当前位置高一个目录)。 + +你经常在相对路径中使用双点(`..`),或者用于改变目录。单点(`.`)也用于相对路径中,但更重要的是,你可以在指定当前位置的命令中使用它。 + +![ . 和 .. 的使用][15] + +### 7、理解命令的结构 + +一个典型的 Linux 命令由一个命令名和选项及参数组成。 + +``` +命令名 [选项] 参数 +``` + +“选项”,顾名思义,是可选的。当使用时,它们可能会根据其属性来改变输出。 + +例如,`cat` 命令是用来查看文件的。你可以添加选项 `-n`,它也会显示行数。 + +选项不是标准化的。通常情况下,它们是由单字母和单破折号(`-`)组成的。它们也可能是两个破折号(`--`)和一个单词的形式。 + +同样的选项在不同的命令中可能有不同的含义。如果你在 `head` 命令中使用 `-n`,表明你想看行数,而不是行号。 + +![同样的选项 -n 在 cat 和 head 命令中有不同的用途][16] + +在命令文档中,**如果你看到方括号(`[]`)之间有什么东西,它表示括号中的内容是可选的**。 + +同样地,“参数”也没有标准化。有些命令希望用文件名作为参数,有些则希望用目录名或正则表达式。 + +### 8、获得帮助 + +当你开始使用命令时,你可能会记住一些经常使用的命令的选项,但你根本不可能记住所有命令的所有选项。 + +为什么呢?因为一条命令可能有十多个或二十多个选项。 + +那么,当你无法记住所有的选项时,你该怎么办呢?你需要“帮助”。我所说的帮助,并不是指在 [Linux 论坛][17] 上提问。我指的是使用命令的帮助选项。 + +每个标准的 Linux 命令都有一个快速帮助页面,可以用 `-h` 或 `—help` 来访问。 + +``` +命令名 -h +``` + +它可以让你快速了解命令的语法、常用选项及其含义,在某些情况下还有命令的例子。 + +![cat 命令的帮助页][18] + +如果你需要更多的帮助,你可以参考 [手册页][19],即命令的手册。 + +``` +man 命令名 +``` + +它涉及到所有的细节,阅读和理解起来可能会让人难以承受。另外,你也可以在网上搜索 “Linux 中 xyz 命令的例子”。 + +### 9、Linux 是区分大小写的 + +Linux 是区分大小写的。你在终端中输入的所有东西都是区分大小写的。如果你不考虑这一点,你会经常遇到 “[bash: command not found][20]” 或 “file not found” 的错误。 + +在主目录中,你的所有文件夹名称以大写字母开头的。如果你要切换到 `Documents` 目录,你必须把第一个字母保持为 `D`,而不是 `d`。 + +![Linux 是区分大小写的][21] + +你可以有两个分别名为 `file.txt` 和 `File.txt` 的文件,因为对于 Linux 来说,`file` 和 `File` 是不一样的。 + +### 10、运行 Shell 脚本 + +你可以通过指定 Shell 来 [运行一个 Shell 脚本][22]: + +``` +bash script.sh +``` + +或者你可以像这样执行 Shell 脚本。 + +``` +./script.sh +``` + +第二种方法只有在文件有执行权限时才会起作用。更多关于 [Linux 文件权限参考这里][23]。 + +![运行bash脚本][24] + +### 11、使用制表符补完而不是全部输入 + +Ubuntu 的终端已经预先配置了制表符补完功能。这意味着如果你开始在终端上输入,然后点击 `tab` ,它会尝试自动完成它,或者在有多个可能的匹配时提供选项。 + +它既适用于命令,也适用于参数和文件名。 + +![Tab 完成示例][25] + +这可以节省大量的时间,因为你不需要把所有的东西都写完整。 + +### 12、Ctrl+C 和 Ctrl+V 不是用来在终端复制粘贴的。 + +`Ctrl+C`、`Ctrl+V` 可能是复制粘贴的“通用”键盘快捷键,但它在 Linux 终端中不行。 + +Linux 继承了 UNIX 的很多东西,在 UNIX 中,`Ctrl+C` 被用来停止一个正在运行的进程。 + +由于 `Ctrl+C` 已经被用于停止一个命令或进程,所以它不能再用于复制粘贴。 + +### 13、你当然可以在终端复制粘贴 + +别担心。你仍然可以 [在终端中复制粘贴][26]。同样,复制-粘贴的键盘快捷键没有固定的规则,因为它取决于你使用的终端程序或你的配置。 + +在 Ubuntu 终端中,复制的默认键盘快捷键是 `Ctrl+Shift+C`,粘贴则是 `Ctrl+Shift+V`。 + +你可以使用 `Ctrl+C` 从终端外(如网页浏览器)复制文本和命令,并使用 `Ctrl+Shift+V` 将其粘贴。同样,你可以高亮显示文本,用 `Ctrl+Shift+C` 从终端复制文本,用 `Ctrl+V` 粘贴到编辑器或其他应用程序。 + +### 14、避免在终端中使用 Ctrl+S + +另一个初学者常犯的错误是使用“通用”的 `Ctrl+S` 键盘快捷键来保存。如果你在终端中使用 `Ctrl+S`,你的终端会被“冻结”。 + +这来自于传统的计算机,在那里没有向上滚动的滚动条。因此,如果有大量的输出行,`Ctrl+S` 被用来停止屏幕,以便可以阅读屏幕上的文字。 + +你可以用 `Ctrl+Q` 来解除终端的冻结。但还是要避免在终端中使用 `Ctrl+S`。 + +### 15、注意命令例子中的 $ 和 <> + +如果你参考一些在线教程或文档,你会看到一些命令例子中的文本在 `<>` 内。这表明你需要用一个合适的值来替换与 `<` 和 `>` 一起的内容。 + +例如,如果你看到一个这样的命令: + +``` +grep -i <搜索内容> <文件名> +``` + +你应该把 `<搜索内容>` 和 `<文件名>` 换成各自的实际值。(LCTT 译注:不要输入 `<` 和 `>`) + +这表明该命令只是一个例子,你必须用实际值来完成它。 + +这里需要注意的另一件事是,有些教程显示的命令例子是以 `$` 开头的,比如这样: + +![命令开头的美元符号][27] + +这是表明它们是命令(而不是命令输出)的一种方式。但是,许多新的 Linux 用户把前面的 `$` 和实际的命令一起复制,当他们把它粘贴到终端时,显然会出现错误。 + +所以,当你复制一些命令时,如果开头有 `$`,就不要复制它。你也应该避免复制随机网站的随机命令,特别是当你不了解它的作用时。 + +既然你正在阅读关于复制命令的文章,当你看到多行的命令在一起时,你应该一次复制一行,然后逐一运行。 + +![避免将多个命令复制在一起][28] + +下一节将告诉你如何一次性运行多个命令。 + +### 16、你可以同时运行多个命令 + +你可以 [一次运行多个命令][29] 而不需要用户干预。作为 Ubuntu 用户,你可能已经在这个命令的形式中看到了它: + +``` +sudo apt update && sudo apt upgrade +``` + +在终端中,有三种不同的方法来组合命令: + +`;` | `命令 1 ; 命令 2` | 先运行命令 1,再运行命令 2 +---|---|--- +`&&` | `命令 1 && 命令 2` | 只有命令 1 成功结束才运行命令 2 +`||` | `命令 1 || 命令 2` | 只有命令 1 失败时才运行命令 2 + +### 17、停止一个正在运行的 Linux 命令 + +如果一个 Linux 命令在前台运行,也就是说,它正在显示输出,或者说你不能输入任何其他命令,你可以用 `Ctrl+C` 键停止它。 + +我以前讨论过它。它来自于 UNIX 的传统计算时代。 + +所以,下次你看到像 `top` 或 `ping` 这样的命令在持续运行,而你想恢复终端控制,只需使用这两个键:`Ctrl+C`。 + +![在 Linux 中用 Ctrl+C 停止一个正在运行的程序][30] + +### 18、清除终端 + +当我发现我的屏幕被不同类型的输出弄得太杂乱时,我会在开始其他工作之前清除终端屏幕。这只是一种习惯,但我发现它很有帮助。 + +要清除终端,请使用以下命令: + +``` +clear +``` + +你也可以使用 [终端快捷键][31] `Ctrl+L`。 + +### 19、退出终端 + +在少数情况下,我看到有人关闭终端程序来退出会话。你可以这样做,但退出终端的正确方法是使用退出命令: + +``` +exit +``` + +你也可以使用 Ubuntu 终端的键盘快捷键 `Ctrl+D`。 + +### 总结 + +即使你对终端完全陌生,你也可以在终端中做很多额外的事情。你可以: + + * [运行有趣的 Linux 命令][32] + * [在终端中浏览互联网][33] + * [在终端中玩游戏][34] + +如果你想了解更多,[看看这些 Linux 命令技巧,可以像专家一样使用终端][35]。 + +说实话,要谈的东西太多了。很难确定哪些应该被认为是绝对的基础知识,哪些应该被排除在外。例如,我想避免包括关于路径的信息,因为它需要详细的解释,但在一个地方讲得太详细可能会让人不知所措。 + +我已经过了在终端中的小东西曾经让我困惑的阶段。如果你是 Linux 终端的新手,或者你还记得你最初使用 Linux 时的挣扎,请随时提出建议对列表进行补充。我可能会根据你的意见更新这个列表。 + +如果你学到了新的东西,请在评论中提及。我想看看这篇文章是否值得一读 😁 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/basic-terminal-tips-ubuntu/ + +作者:[Abhishek Prakash][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/ubuntu-terminal-basic-tips.png?resize=800%2C450&ssl=1 +[2]: https://itsfoss.com/linux-terminal-emulators/ +[3]: https://itsfoss.com/open-terminal-ubuntu/ +[4]: https://itsfoss.com/ubuntu-shortcuts/ +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/linux-terminal-introduction.png?resize=800%2C450&ssl=1 +[6]: https://www.youtube.com/c/itsfoss?sub_confirmation=1 +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/understanding-prompt-ubuntu-terminal.png?resize=800%2C346&ssl=1 +[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/learning-prompt-ubuntu-terminal.png?resize=800%2C346&ssl=1 +[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/directory-files-linux.png?resize=800%2C346&ssl=1 +[10]: https://linuxhandbook.com/hard-link/ +[11]: https://linuxhandbook.com/linux-directory-structure/ +[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/path-linux.webp?resize=800%2C250&ssl=1 +[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/absolute-vs-relative-path-linux.webp?resize=800%2C500&ssl=1 +[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/absolute-relative-path-real-examples-800x346.png?resize=800%2C346&ssl=1 +[15]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/use-of-single-and-double-dot-in-Linux.png?resize=732%2C272&ssl=1 +[16]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/command-structure-example.png?resize=732%2C462&ssl=1 +[17]: https://itsfoss.community/ +[18]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/cat-command-help-page.png?resize=732%2C614&ssl=1 +[19]: https://itsfoss.com/linux-man-page-guide/ +[20]: https://itsfoss.com/bash-command-not-found/ +[21]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/linux-is-case-sensitive.png?resize=732%2C253&ssl=1 +[22]: https://itsfoss.com/run-shell-script-linux/ +[23]: https://linuxhandbook.com/linux-file-permissions/ +[24]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/run-bash-script.png?resize=732%2C272&ssl=1 +[25]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/tab-completion-ubuntu.png?resize=732%2C272&ssl=1 +[26]: https://itsfoss.com/copy-paste-linux-terminal/ +[27]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/dollar-symbol-at-the-beginning-of-command.png?resize=765%2C256&ssl=1 +[28]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/avoid-copying-multiple-commands.png?resize=743%2C242&ssl=1 +[29]: https://itsfoss.com/run-multiple-commands-linux/ +[30]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/stop-running-program-linux.png?resize=800%2C385&ssl=1 +[31]: https://linuxhandbook.com/linux-shortcuts/ +[32]: https://itsfoss.com/funny-linux-commands/ +[33]: https://itsfoss.com/terminal-web-browsers/ +[34]: https://itsfoss.com/best-command-line-games-linux/ +[35]: https://itsfoss.com/linux-command-tricks/ From e9df727466a0f8911175171ab17ab79f35acc458 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 9 Dec 2021 07:56:58 +0800 Subject: [PATCH 131/244] PUB @wxy https://linux.cn/article-14064-1.html --- ...ings About Linux Terminal Every Ubuntu User Should Know.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20211206 19 Absolute Simple Things About Linux Terminal Every Ubuntu User Should Know.md (99%) diff --git a/translated/tech/20211206 19 Absolute Simple Things About Linux Terminal Every Ubuntu User Should Know.md b/published/20211206 19 Absolute Simple Things About Linux Terminal Every Ubuntu User Should Know.md similarity index 99% rename from translated/tech/20211206 19 Absolute Simple Things About Linux Terminal Every Ubuntu User Should Know.md rename to published/20211206 19 Absolute Simple Things About Linux Terminal Every Ubuntu User Should Know.md index ac8093b8d2..df9a843b4a 100644 --- a/translated/tech/20211206 19 Absolute Simple Things About Linux Terminal Every Ubuntu User Should Know.md +++ b/published/20211206 19 Absolute Simple Things About Linux Terminal Every Ubuntu User Should Know.md @@ -4,8 +4,8 @@ [#]: collector: "lujun9972" [#]: translator: "wxy" [#]: reviewer: "wxy" -[#]: publisher: " " -[#]: url: " " +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14064-1.html" 关于 Ubnutu Linux 终端的必知必会的 19 件超简单的事情 ====== From 0b46ca59ea9a46c4b9fe2bb4e6e9fa48c5ec3235 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 9 Dec 2021 08:46:55 +0800 Subject: [PATCH 132/244] translated --- ...07 Compose music as code using Sonic Pi.md | 130 ------------------ ...07 Compose music as code using Sonic Pi.md | 130 ++++++++++++++++++ 2 files changed, 130 insertions(+), 130 deletions(-) delete mode 100644 sources/tech/20200307 Compose music as code using Sonic Pi.md create mode 100644 translated/tech/20200307 Compose music as code using Sonic Pi.md diff --git a/sources/tech/20200307 Compose music as code using Sonic Pi.md b/sources/tech/20200307 Compose music as code using Sonic Pi.md deleted file mode 100644 index d2c65c3a5f..0000000000 --- a/sources/tech/20200307 Compose music as code using Sonic Pi.md +++ /dev/null @@ -1,130 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Compose music as code using Sonic Pi) -[#]: via: (https://opensource.com/article/20/3/sonic-pi) -[#]: author: (Matt Bargenquast https://opensource.com/users/mbargenquast) - -Compose music as code using Sonic Pi -====== -There's no need for instrumental mastery with this accessible open -source program that can turn you into a musical virtuoso. -![Bird singing and music notes][1] - -Maybe you're like me, and you learned a musical instrument when you were in school. For me, it was the piano, and later, the viola. However, I've always held that, as my childhood interests shifted towards computers and coding, I subsequently neglected my music practice. I do wonder what I would have done if I'd had something like Sonic Pi when I was younger. Sonic Pi is an open source program that lets you compose and perform music through code itself. It's the perfect marriage of those two worlds. - -Opensource.com is no stranger to Sonic Pi—we [featured an interview][2] with the creator, Dr. Sam Aaron, back in 2015. Since that time, a lot has changed, and Sonic Pi has grown substantially in many ways. It's reached a major new version milestone, with the long-awaited v3.2 release made publically available on February 28, 2020. A growing community of developers is actively contributing to its [GitHub project][3], while an equally thriving community of composers shares ideas and support in the [official forums][4]. The project is now also financially assisted through a [Patreon campaign][5], and Sam himself has been spreading the word of Sonic Pi through schools, conferences, and workshops worldwide. - -What really shines about Sonic Pi is its approachability. Releases are available for many major flavors of OS, including Windows, macOS, Linux, and of course, the Raspberry Pi itself. In fact, getting started with Sonic Pi on a Raspberry Pi couldn't be simpler; it comes pre-installed with [Raspbian][6], so if you have an existing Raspbian-based setup, you'll find it situated in the programming menu. - -Upon loading Sonic Pi for the first time, you'll be greeted with a simple interface with two main areas: an editor in which to write your code, and a section devoted to Sonic Pi's expansive tutorial. For newcomers, the tutorial is an essential resource for learning the basics, featuring accompanying music programs to reinforce each concept being taught. - -If you're following along, let's code ourselves a simple bit of music and explore the potential of live-coding music. Type or paste the following code into the Sonic Pi editor: - - -``` -live_loop :beat do -  sample :drum_heavy_kick -  sleep 1 -end -``` - -Even if you're a Sonic Pi novice, many coders may immediately understand what's going on here. We're playing a drum kick sample, sleeping for a second, and then repeating. Click the Run button or press ALT+R (meta+R on macOS), and you should hear it begin to play. - -This isn't a very exciting song yet, so let's liven it up with a snare playing on the off-beat. Replace the existing code with the block below and Run again. You can leave the existing beat playing while you do this; you'll notice that your changes will be applied naturally, in time with the beat: - - -``` -live_loop :beat do -  sample :drum_heavy_kick -  sleep 0.5 -  sample :drum_snare_soft -  sleep 0.5 -end -``` - -While we're at it, let's add a hi-hat right before every fourth beat, just to make things a little interesting. Add this new block below our existing one and Run again: - - -``` -live_loop :hihat do -  sleep 3.9 -  sample :drum_cymbal_closed -  sleep 0.1 -end -``` - -We've got our beat going now, so let's add a bassline! Sonic Pi comes with a variety of synths built-in, along with effects filters such as reverb and distortion. We'll use a combination of the "dsaw" and "tech_saw" synths to give it an electronic retro-synth feel. Add the block below to your existing program, Run, and have a listen: - - -``` -live_loop :bass do -  use_synth :dsaw -  play :a2, attack: 1, release: 2, amp: 0.3 -  sleep 2.5 -  use_synth :tech_saws -  play :a1, attack: 1, release: 1.5, amp: 0.8 -  sleep 1.5 -end -``` - -You'll note above that we have full control over the [ADSR][7] envelope when playing notes, so we can decide when each sound should peak and fade. - -Lastly, let's add a lead synth and try out one of those effects features known as the "slicer." To spice things up, we'll also introduce an element of pseudo-randomness by letting Sonic Pi pick from a series of potential chords. This is where some of the fun improvisation and "happy accidents" can begin to occur. Add the block below to your existing program and Run: - - -``` -live_loop :lead do -  with_fx :slicer do -    chords = [(chord :A4, :minor7), (chord :A4, :minor), (chord :D4, :minor7), (chord :F4, :major7)] -    use_synth :blade -    play chords.choose, attack: 1, release: 2, amp: 1 -    sleep 2 -  end -end -``` - -Great! Now, we're certainly not going to be competing with Daft Punk any time soon, but hopefully, through this process, you've seen how we can go from a bare beat to something much bigger, in real-time, by adding some simple morsels of code. It is well worth watching one of Sam Aaron's [live coding performances][8] on YouTube for a demonstration of how creative and adaptive Sonic Pi can let you be. - -![Sonic Pi composition example][9] - -Our finished piece, in full - -If you've ever wanted to learn a musical instrument, but felt held back by thoughts like "I don't have rhythm" or "my hands aren't nimble enough," Sonic Pi is a versatile instrument for which none of those things matter. All you need are the ideas, the inspiration, and an inexpensive computer such as the humble Raspberry Pi. The rest is at your fingertips—literally! - -Here are a few handy links to get you started: - - * The Official Sonic Pi [website][10] and [tutorial][11] - * [Getting Started with Sonic Pi][12] ([projects.raspberrypi.org][13]) - * Sonic Pi [Github project][3] - - - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/3/sonic-pi - -作者:[Matt Bargenquast][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/anine09) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/mbargenquast -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/music-birds-recording-520.png?itok=UoM7brl0 (Bird singing and music notes) -[2]: https://opensource.com/life/15/10/interview-sam-aaron-sonic-pi -[3]: https://github.com/samaaron/sonic-pi/ -[4]: https://in-thread.sonic-pi.net/ -[5]: https://www.patreon.com/samaaron -[6]: https://www.raspberrypi.org/downloads/raspbian/ -[7]: https://en.wikipedia.org/wiki/Envelope_(music) -[8]: https://www.youtube.com/watch?v=JEHpS1aTKp0 -[9]: https://opensource.com/sites/default/files/uploads/sonicpi.png (Sonic Pi composition example) -[10]: https://sonic-pi.net/ -[11]: https://sonic-pi.net/tutorial.html -[12]: https://projects.raspberrypi.org/en/projects/getting-started-with-sonic-pi -[13]: http://projects.raspberrypi.org diff --git a/translated/tech/20200307 Compose music as code using Sonic Pi.md b/translated/tech/20200307 Compose music as code using Sonic Pi.md new file mode 100644 index 0000000000..3f54bc5fc5 --- /dev/null +++ b/translated/tech/20200307 Compose music as code using Sonic Pi.md @@ -0,0 +1,130 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Compose music as code using Sonic Pi) +[#]: via: (https://opensource.com/article/20/3/sonic-pi) +[#]: author: (Matt Bargenquast https://opensource.com/users/mbargenquast) + +使用 Sonic Pi 将音乐编成代码 +====== +有了这个易于使用的开源程序,不需要掌握乐器,就可以把你变成一个音乐大师。 +![Bird singing and music notes][1] + +也许你和我一样,在上学的时候学过一种乐器。对我来说,那是钢琴,后来是中提琴。然而,我一直认为,随着我童年的兴趣转向计算机和编码,我后来忽略了音乐练习。我确实想知道,如果我年轻时有 Sonic Pi 这样的东西,我会怎么做。Sonic Pi 是一个开源程序,可以让你通过代码本身来创作和演奏音乐。它是这两个世界的完美结合。 + +Opensource.com 对 Sonic Pi 并不陌生,我们早在 2015 年就对其创造者 Sam Aaron 博士[进行了采访][2]。从那时起,很多事情都发生了变化,Sonic Pi 在很多方面都有了很大的发展。它达到了一个重要的新版本里程碑,期待已久的 v3.2 版本已于 2020 年 2 月 28 日公开发布。一个不断壮大的开发者社区正积极为其 [GitHub 项目][3]做出贡献,而一个同样繁荣的作曲家社区则在[官方论坛][4]中分享想法和支持。该项目现在还通过[赞助活动][5]获得了资金支持,而 Sam 本人也在世界各地的学校、会议和研讨会中传播 Sonic Pi 的信息。 + +Sonic Pi 真正的闪光点在于它的平易近人。它的版本适用于许多主要的操作系统,包括 Windows、macOS、Linux,当然也包括树莓派本身。事实上,在树莓派上开始使用 Sonic Pi 再简单不过了。它预装了[Raspbian][6],所以如果你有一个基于 Raspbian 的现有设置,你会发现它位于编程菜单中。 + +第一次加载 Sonic Pi 时,你会看到一个简单的界面,有两个主要的区域:一个编辑器,可以写你的代码,还有一个区域是 Sonic Pi 的扩展教程。对于新手来说,教程是学习基础知识的重要资源,它有配套的音乐程序来巩固所学的每个概念。 + +如果你正在学习,让我们为自己编写一段简单的音乐,探索现场编码音乐的潜力。将以下代码输入或粘贴到 Sonic Pi 编辑器中: + + +``` +live_loop :beat do + sample :drum_heavy_kick + sleep 1 +end +``` + +即使你是一个 Sonic Pi 的新手,许多程序员可能马上就会明白这里发生了什么。我们正在播放一个踏板鼓样例,睡眠一秒钟,然后重复。点击运行按钮或按 ALT+R(macOS 上为 meta+R),你应该听到它开始播放。 + +这还不是一首非常激动人心的歌曲,所以让我们用一个在非拍子上演奏的小鼓来使它生动起来。用下面的代码块替换现有的代码,然后再次运行。你可以在做这个的时候让现有的节拍继续播放;你会注意到你的改动会自然地应用,与节拍同步: + + +``` +live_loop :beat do + sample :drum_heavy_kick + sleep 0.5 + sample :drum_snare_soft + sleep 0.5 +end +``` + +我们在做这个的时候,让我们在每四拍之前添加一个踩镲,让声音变得有趣一些。在现有的程序块下面添加新的程序块,然后再次运行: + + +``` +live_loop :hihat do + sleep 3.9 + sample :drum_cymbal_closed + sleep 0.1 +end +``` + +我们现在已经有了我们的节拍,所以让我们来添加一个基调! Sonic Pi 内置了各种合成器,还有混响和失真等效果滤波器。我们将使用 “dsaw” 和 “tech_saw” 合成器的组合,使其具有电子复古合成器的感觉。将下面的块添加到你现有的程序中,运行,并听一听: + + + +``` +live_loop :bass do + use_synth :dsaw + play :a2, attack: 1, release: 2, amp: 0.3 + sleep 2.5 + use_synth :tech_saws + play :a1, attack: 1, release: 1.5, amp: 0.8 + sleep 1.5 +end +``` + +你会注意到上面的内容,当播放音符时,我们可以完全控制[ADSR][7]包络,所以我们可以决定每个声音何时达到峰值和衰减。 + +最后,让我们添加一个主音合成器,试试那些被称为“切片机”的效果特征。为了使事情更有趣,我们还将引入一个伪随机的元素,让 Sonic Pi 从一系列潜在的和弦中挑选。这就是一些有趣的即兴创作和“快乐的意外”可以开始发生的地方。在你现有的程序中加入下面的程序块并运行: + + +``` +live_loop :lead do + with_fx :slicer do + chords = [(chord :A4, :minor7), (chord :A4, :minor), (chord :D4, :minor7), (chord :F4, :major7)] + use_synth :blade + play chords.choose, attack: 1, release: 2, amp: 1 + sleep 2 + end +end +``` + +很好!现在,我们当然不会很快与 Daft Punk 竞争,但希望通过这个过程,你已经看到我们如何通过添加一些简单的代码,实时地从一个单一节拍变成更大的东西。在 YouTube 上观看 Sam Aaron 的[现场编码表演][8]是非常值得的,它展示了 Sonic Pi 可以让你有多大的创造力和适应力。 + +![Sonic Pi composition example][9] + +我们完成的作品,完整版 + +如果你曾经想学习一种乐器,但又觉得被“我没有节奏感”或“我的手不够灵活”这样的想法所束缚,Sonic Pi 是一种多功能的乐器,这些都不重要。你所需要的只是想法和灵感,以及一台便宜的电脑,如简陋的树莓派。事实上,其余的都在你的指尖上。 + +这里有几个方便的链接可以让你开始: + + * 官方 Sonic Pi [网站][10]和[教程][11] + * [Sonic Pi 入门][12]([projects.raspberrypi.org][13]) + * Sonic Pi 的 [Github 项目][3] + + + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/3/sonic-pi + +作者:[Matt Bargenquast][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/mbargenquast +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/music-birds-recording-520.png?itok=UoM7brl0 (Bird singing and music notes) +[2]: https://opensource.com/life/15/10/interview-sam-aaron-sonic-pi +[3]: https://github.com/samaaron/sonic-pi/ +[4]: https://in-thread.sonic-pi.net/ +[5]: https://www.patreon.com/samaaron +[6]: https://www.raspberrypi.org/downloads/raspbian/ +[7]: https://en.wikipedia.org/wiki/Envelope_(music) +[8]: https://www.youtube.com/watch?v=JEHpS1aTKp0 +[9]: https://opensource.com/sites/default/files/uploads/sonicpi.png (Sonic Pi composition example) +[10]: https://sonic-pi.net/ +[11]: https://sonic-pi.net/tutorial.html +[12]: https://projects.raspberrypi.org/en/projects/getting-started-with-sonic-pi +[13]: http://projects.raspberrypi.org From 997de37f0dd9add92d4850dfbc420a2eff54f7af Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 9 Dec 2021 08:51:55 +0800 Subject: [PATCH 133/244] translating --- ...earn more about distributed databases with ShardingSphere.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20211207 Learn more about distributed databases with ShardingSphere.md b/sources/tech/20211207 Learn more about distributed databases with ShardingSphere.md index 7c5f875759..6edf3e3402 100644 --- a/sources/tech/20211207 Learn more about distributed databases with ShardingSphere.md +++ b/sources/tech/20211207 Learn more about distributed databases with ShardingSphere.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/21/12/apache-shardingsphere" [#]: author: "Trista Pan https://opensource.com/users/trista-pan" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 8a4f979e2d282332c719b447f47f81d36731db64 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 9 Dec 2021 09:07:04 +0800 Subject: [PATCH 134/244] PRF&PUB @geekpi https://linux.cn/article-14065-1.html --- ...Using Homebrew Package Manager on Linux.md | 118 ++++++++---------- 1 file changed, 49 insertions(+), 69 deletions(-) rename {translated/tech => published}/20211201 Installing and Using Homebrew Package Manager on Linux.md (53%) diff --git a/translated/tech/20211201 Installing and Using Homebrew Package Manager on Linux.md b/published/20211201 Installing and Using Homebrew Package Manager on Linux.md similarity index 53% rename from translated/tech/20211201 Installing and Using Homebrew Package Manager on Linux.md rename to published/20211201 Installing and Using Homebrew Package Manager on Linux.md index c170b65c41..2d67d4144e 100644 --- a/translated/tech/20211201 Installing and Using Homebrew Package Manager on Linux.md +++ b/published/20211201 Installing and Using Homebrew Package Manager on Linux.md @@ -3,34 +3,36 @@ [#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" [#]: collector: "lujun9972" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14065-1.html" 在 Linux 上安装和使用 Homebrew 包管理器 ====== -Homebrew,也被称为 Brew,是一个主要为 macOS 创建的命令行包管理器。 +![](https://img.linux.net.cn/data/attachment/album/202112/09/090614sptwo73z73f7fw7u.jpg) + +Homebrew(家酿),也被称为 Brew,是一个主要为 macOS 创建的命令行包管理器。 [Homebrew][1] 在 macOS 用户中相当流行,因为更多的开发者创造了可以用 Homebrew 轻松安装的命令行工具。 -这种流行导致了 Linuxbrew 的诞生,它是 Homebrew 的一个 Linux 移植。由于它主要是 Git 和 Ruby,而 Linux 和 macOS 都是类 Unix 的系统,所以 Brew 在两种操作系统上都能很好地工作。 +这种流行导致了 Linuxbrew 的诞生,它是 Homebrew 的一个 Linux 移植版。由于它主要是 Git 和 Ruby 组成的,而 Linux 和 macOS 都是类 Unix 的系统,所以 Brew 在两种操作系统上都能很好地工作。 -Linuxbrew 项目最终与 Homebrew 项目合并,现在你只有一个 Brew 项目,叫做 Homebrew。 +Linuxbrew 项目最终与 Homebrew 项目合并,现在只有一个 Brew 项目,叫做 Homebrew。 -为什么我叫它brew,而不是Homebrew?因为命令以brew开头。你会在后面的章节中看到它的详细内容。 +为什么我叫它 Brew,而不是 Homebrew?因为命令以 `brew` 开头。你会在后面的章节中看到它的详细内容。 -### 当你有 apt、dnf、snap 等软件时,为什么还要在 Linux 上使用 Homebrew 包管理器? +### 当你已经有了 apt、dnf、snap 时,为什么还要在 Linux 上使用 Homebrew 包管理器? -我知道这种感觉。你已经有一个由你的发行版提供的好的[包管理器][2]。除此之外,你还有 Snap、Flatpak 和其他通用软件包系统。 +我知道这种感觉。你已经有一个由你的发行版提供的好的 [包管理器][2]。除此之外,你还有 Snap、Flatpak 和其他通用软件包系统。 -你真的需要 Homebrew 包管理器在你的 Linux 系统上吗?答案取决于你的需求。 +在你的 Linux 系统上你真的需要 Homebrew 包管理器吗?答案取决于你的需求。 -你看,除了发行版的包管理器和通用包管理器,你会遇到需要其他包管理器的情况,比如 [Pip][3] (用于Python 应用)和 [Cargo][4] (用于 Rust 软件包)。 +你看,除了发行版的包管理器和通用包管理器,你会遇到需要其他包管理器的情况,比如 [Pip][3] (用于 Python 应用)和 [Cargo][4] (用于 Rust 软件包)。 -想象一下,你遇到了一个很好的命令行工具,想试试。它的软件库提到它可以使用 brew 或源代码来安装。在这种情况下,在你的系统上有 brew 可能会有帮助。毕竟,在 2020 年代,[从源代码安装][5]并不时髦(也不舒服)。 +想象一下,你遇到了一个很好的命令行工具,想试试。它的软件库提到它可以使用 `brew` 或源代码来安装。在这种情况下,在你的系统上有 `brew` 可能会有帮助。毕竟,都 2021 了,[从源代码安装][5] 并不时髦(也不舒服)。 -换句话说,如果你遇到一些有趣的命令行工具只提供 brew 安装选项,你会有一个额外的选择。 +换句话说,如果你遇到一些有趣的命令行工具只提供 `brew` 安装选项,你会有一个额外的选择。 ### 在 Ubuntu 和其他 Linux 发行版上安装 Homebrew @@ -38,14 +40,12 @@ Linuxbrew 项目最终与 Homebrew 项目合并,现在你只有一个 Brew 项 #### 步骤 1:安装依赖项 -你需要有相对较新版本的 gcc 和 glibc。你可以[在 Ubuntu 上安装 build-essential 包][6]来获得它们。除此之外,你还需要[安装 Git][7]、Curl 和 procps(用于监控系统进程)。 +你需要有相对较新版本的 gcc 和 glibc。你可以 [在 Ubuntu 上安装 build-essential 包][6] 来获得它们。除此之外,你还需要 [安装 Git][7]、Curl 和 procps(用于监控系统进程)。 在基于 Ubuntu 和 Debian 的系统中,你可以像这样一起安装所有这些东西: ``` - - sudo apt-get install build-essential procps curl file git - +sudo apt-get install build-essential procps curl file git ``` ![Iinstall dependencies for Homebrew in Ubuntu/Debian][8] @@ -54,125 +54,105 @@ Linuxbrew 项目最终与 Homebrew 项目合并,现在你只有一个 Brew 项 #### 步骤 2:安装 Homebrew -你可以看到为什么你需要[安装 Curl][9]。它允许你[在终端下载安装脚本文件][10]。 +你可以看到为什么你需要 [安装 Curl][9]。它允许你 [在终端下载安装脚本文件][10]。 -只要输入这个命令: +只要输入这个命令: ``` - - /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - +/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" ``` -当要求输入回车键时,请按下。 +当要求输入回车键时,请按下回车。 ![Installing Homebrew on Ubuntu][11] -在脚本最后,它建议运行几个命令,将其添加到 PATH 变量中。Homebrew 实际上是安装在你的主目录中,然后软链接到 /usr/local 目录中。 +在脚本最后,它建议运行几个命令,将其添加到 `PATH` 变量中。Homebrew 实际上是安装在你的主目录中,然后软链接到 `/usr/local` 目录中。 ![Run the suggested command under Next steps to add Homebrew to PATh variable][12] -你可以[在终端方便地复制和粘贴][13]。只要选择它所建议的命令,按 Ctrl+Shift+C 复制,按 Ctrl+Shift+V 粘贴。 +你可以 [在终端方便地复制和粘贴][13]。只要选择它所建议的命令,按 `Ctrl+Shift+C` 复制,按 `Ctrl+Shift+V` 粘贴。 或者,你也可以直接复制粘贴这个命令: ``` - - echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> $HOME/.bash_profile - +echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> $HOME/.bash_profile ``` 然后是这个: ``` - - eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" - +eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" ``` ![Adding brew commands to the PATH][14] #### 步骤 3:验证 brew 的安装 -你就快完成了。只需通过使用 brew doctor 命令来验证 brew 命令是否可以运行: +就快完成了。只需通过使用 `brew doctor` 命令来验证 `brew` 命令是否可以运行: ``` - - brew doctor - +brew doctor ``` -brew doctor 命令会告诉你是否有任何问题。 +`brew doctor` 命令会告诉你是否有任何问题。 你可以通过安装示例 hello 项目再次验证: ``` - - brew install hello - +brew install hello ``` -如果你没有看到任何错误,你可以在 Linux 上享受 Homebrew 包管理器。 +如果你没有看到任何错误,你可以在 Linux 上享用家酿了。 ### 使用 brew 命令来安装、删除和管理软件包 -让我快速告诉你几个可以用来安装、删除和管理软件包的 brew 命令。 +让我快速告诉你几个可以用来安装、删除和管理软件包的 `brew` 命令。 -由于 Homebrew 安装在你的主目录中,你不需要 sudo 来运行它(就像 Pip 和 Cargo)。 +由于 Homebrew 安装在你的主目录中,你不需要 `sudo` 来运行它(就像 Pip 和 Cargo)。 -要用 brew 安装一个软件包,请使用安装选项: +要用 `brew` 安装一个软件包,请使用安装选项: ``` - - brew install package_name - +brew install package_name ``` 这里没有自动完成软件包名称的功能。你需要知道确切的软件包名称。 -要删除一个 brew 软件包,你可以使用 **remove** 或 **uninstall** 选项。两者的作用是一样的。 +要删除一个 `brew` 软件包,你可以使用 `remove` 或 `uninstall` 选项。两者的作用是一样的。 ``` - - brew remove package_name - +brew remove package_name ``` -你也可以用这个命令列出已安装的 brew 软件包: +你也可以用这个命令列出已安装的 `brew` 软件包: ``` - - brew list - +brew list ``` -你也可以用 autoremove 选项删除不需要的依赖: +你也可以用 `autoremove` 选项删除不需要的依赖: ``` - - brew autoremove - +brew autoremove ``` -在下一张截图中,我只用 brew 安装了两个软件包,但它也显示了这些软件包的依赖关系。即使在移除软件包后,依赖关系仍然存在。autoremove 终于把它们删除了。 +在下一张截图中,我只用 `brew` 安装了两个软件包,但它也显示了这些软件包的依赖关系。即使在移除软件包后,依赖关系仍然存在。`autoremove` 终于把它们删除了。 ![Listing and removing brew apckages][15] -还有很多brew命令选项,但这不在本教程的范围内。你可以随时[翻阅他们的文档][16]并进一步探索。 +还有很多 `brew` 命令选项,但这不在本教程的范围内。你可以随时 [翻阅它的文档][16] 并进一步探索。 -### 从Linux中删除 Homebrew +### 从 Linux 中删除 Homebrew 如果不加入从你的 Linux 系统中删除 Homebrew 的步骤,本教程就不完整。 -根据[GitHub仓库中提到的步骤][17],你必须下载并使用这个命令运行卸载脚本: +根据 [GitHub 仓库中提到的步骤][17],你必须下载并使用这个命令运行卸载脚本: ``` - - /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)" - +/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)" ``` -你会被要求输入 Y 键来确认删除。 +你会被要求输入 `Y` 键来确认删除。 ![Removing Homebrew from Linux][18] @@ -180,11 +160,11 @@ brew doctor 命令会告诉你是否有任何问题。 ![Remaining files after Homebrew removal][19] -我让你自己去删除这些文件和目录。 +让你自己去删除这些文件和目录。 ### 总结 -正如我前面解释的,Homebrew 为你已经有的东西提供了一个扩展。如果你偶然发现一个只有 brew 安装方式的应用,在你的 Linux 系统上安装 Homebrew 会很方便。 +正如我前面解释的,Homebrew 为你已经有的东西提供了一个扩展。如果你偶然发现一个只有 `brew` 安装方式的应用,在你的 Linux 系统上安装 Homebrew 会很方便。 你对这个话题有什么要补充的,或者分享你的问题或意见?请在评论区留言。 @@ -195,7 +175,7 @@ via: https://itsfoss.com/homebrew-linux/ 作者:[Abhishek Prakash][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 91a995eb8d9e29e945e5a906aa619b43c59240fe Mon Sep 17 00:00:00 2001 From: jrg Date: Thu, 9 Dec 2021 17:46:23 +0800 Subject: [PATCH 135/244] translating --- ...211208 Linux Jargon Buster- What is a Cron Job in Linux.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/tech/20211208 Linux Jargon Buster- What is a Cron Job in Linux.md b/sources/tech/20211208 Linux Jargon Buster- What is a Cron Job in Linux.md index 6330afd277..93862cb074 100644 --- a/sources/tech/20211208 Linux Jargon Buster- What is a Cron Job in Linux.md +++ b/sources/tech/20211208 Linux Jargon Buster- What is a Cron Job in Linux.md @@ -2,7 +2,7 @@ [#]: via: "https://itsfoss.com/cron-job/" [#]: author: "Hunter Wittenborn https://itsfoss.com/author/hunter/" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "jrg" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " @@ -158,7 +158,7 @@ via: https://itsfoss.com/cron-job/ 作者:[Hunter Wittenborn][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[jrglinux](https://github.com/jrglinux) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 87560848d905bc93b3af89bb9e69e91c887a5f62 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 10 Dec 2021 05:02:29 +0800 Subject: [PATCH 136/244] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211209=20?= =?UTF-8?q?Make=20music=20on=20Linux=20with=20Ardour?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211209 Make music on Linux with Ardour.md --- ...0211209 Make music on Linux with Ardour.md | 154 ++++++++++++++++++ 1 file changed, 154 insertions(+) create mode 100644 sources/tech/20211209 Make music on Linux with Ardour.md diff --git a/sources/tech/20211209 Make music on Linux with Ardour.md b/sources/tech/20211209 Make music on Linux with Ardour.md new file mode 100644 index 0000000000..1c6303241f --- /dev/null +++ b/sources/tech/20211209 Make music on Linux with Ardour.md @@ -0,0 +1,154 @@ +[#]: subject: "Make music on Linux with Ardour" +[#]: via: "https://opensource.com/article/21/12/music-linux-ardour" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Make music on Linux with Ardour +====== +Anyone can be a musician with this open source digital audio tool. +![Woman programming][1] + +If ever you've been curious about making music, you'll be pleased to know that the open source digital audio workstation [Ardour][2] makes it easy and fun, regardless of your level of experience. Ardour is one of those unique applications that manages to span beginner-level hobbyists all the way to production-critical professionals and serves both equally well. Part of what makes it great is its flexibility in how you can accomplish any given task and how most common tasks have multiple levels of possible depth. This article introduces you to Ardour for making your own music, assuming that you have no musical experience and no knowledge of music production software. If you have musical experience, it's easy to build on what this article covers. If you're used to other music production applications, then this quick introduction to how the Ardour interface is structured ought to be plenty for you to explore it in depth at your own pace. + +### Install Ardour + +Ardour's developer, Paul Davis, is a luminary in Linux audio, and much of his work now is funded by loyal users of his software. If you're able to help support Paul's work on Ardour, you can purchase a subscription for as little as US$ 1. It doesn't feel like it, but according to the Ardour website, I've been a paying Ardour community member for eight years and four weeks (at the time of this writing), and I've never regretted it. + +To be clear, though, Ardour is completely open source, and the subscription is not for access to the code itself. Instead, an Ardour subscription supports its development and gives you access to the latest stable builds. You can always, of course, [build it from source code][3] yourself. + +Personally, I pay for Ardour on the website and then download and use it as a [Flatpak][4]. + +### Launch Ardour + +Launch Ardour from your Applications or Activities menu or click on its icon in the directory where you downloaded it. + +When you first launch Ardour, you get a warning about memory limitations. You can ignore this warning if you want or follow my extra configuration steps. + +### Configure Ardour + +I like to do a little extra configuration to get the very best performance. This isn't strictly required, but it does let Ardour take full advantage of your system resources when it needs to. + +First, add your user to the `audio` group. For example, assume your username is `tux`: + + +``` +`$ sudo usermod --append --groups audio tux` +``` + +Set memory lock to unlimited by editing the `limits.conf` configuration file: + + +``` +`$ sudo gedit /etc/security/limits.conf` +``` + +Add these two lines to the file, and then save it: + + +``` + + +@audio    - rtprio 95 +@audio    - memlock unlimited + +``` + +Log out and then log back in, or just reboot. + +### Importing sound + +Ardour starts in the **Editor** view, and it's where you spend most of your time making music. This is your workspace, where you can add sounds and mix them. + +This raises the question of where you can find sounds. Music production has a considerable cottage industry dedicated to creating loops that you can use, remix, and release as parts of new compositions. To some, this might seem like "cheating," but in my experience, creativity is primarily reworking ideas that already exist. Many great artists working with companies like Q-up Arts and Producer Loops contribute to royalty-free loops, ranging in style from cinematic to pop. Paid loop packs come up pretty regularly on Humble Bundle, but Creative Commons loopers exist, too, at [FreeSound.org][5], [Free-loops.com][6], [Looperman.com][7], and many others. + +Once you've acquired a stash of loops, you can drag and drop a loop you like into Ardour. + +![Drag-and-drop import][8] + +(Seth Kenlon, [CC BY-SA 4.0][9]) + +Tracks in Ardour refer to tracks on a soundboard or mixing desk, but you can think of them as layers. Sounds placed on separate tracks above or below one another are heard just like sounds happening simultaneously in the real world. You hear both. By combining different loops and changing what loop comes next, you can compose your own music through audio construction. + +### Snapping to the beat + +A loop gets called a loop because that's what they're designed to do: Loop seamlessly from the end of the phrase back to the beginning, with no distinguishable break. You hear loops in nearly all modern music, but you probably don't think of them as loops. For a loop to work, it must get aligned with the beat. If a loop starts a quarter beat too late, the loop sounds broken, and the timing of your song gets thrown off. + +To help you line up audio regions in your workspace, you can click the **Snap** button in the top toolbar and set its strictness in the drop-down menu to the button's right. + +![Activate snapping][10] + +(Seth Kenlon, [CC BY-SA 4.0][9]) + +It makes sense to start with a snap sensitivity of a **Bar** with many professional loops. By default, that constrains where you can drag a loop to every four beats. For loops that aren't aligned exactly to 4/4 bars, you can set your snap sensitivity to a quarter-note (1/4 note), which gives you a little bit of room to adjust where you want loops to start. Whatever you use, snapping helps prevent tiny microsecond interruptions in sounds that are meant to be continuous. + +### The mix + +In music, I often find that less is more. It's a tough lesson to internalize, especially if you're a fan of orchestral music and are used to seeing a 90-piece band. But most modern music is produced by just a few musicians, so you probably don't need many tracks. Even with just three or four tracks, though, some instruments naturally dominate. For that reason, each track has a volume setting on the left side of the Ardour editor interface. + +![Ardour quick mixer][11] + +(Seth Kenlon, [CC BY-SA 4.0][9]) + +There's no right or wrong way to mix your music. Whatever sounds pleasant to your ear is the right choice. + +After some practice with a basic mix, you can explore automating the mix. Activate mixing automation by clicking the **A** button in the music track you want to mix. Select **Fader** from the pop-up menu. A new track appears under the one you want to mix, and there's a line graph through it. The line graph is currently flat, but you can double-click on it to add a node and drag the node to a new volume. Do this a few times throughout the track, and you can adjust the sound levels on that track. Once again, less is usually more—small adjustments are often all you need. + +![Ardour quick mixer][12] + +(Seth Kenlon, [CC BY-SA 4.0][9]) + +### Recording sound + +If you play a musical instrument, you can record directly into Ardour. **Before recording into a microphone, make sure you're wearing headphones to avoid feedback!** + + 1. Add a new track by selecting **Add Track, Bus or VCA** from the **Track** menu or pressing **Ctrl+Shift+N** on your keyboard. Accept the default settings for an Audio Track. + 2. On the track, click the Record (a red circle) button. This "arms" the track for recording. + 3. Click the Record (a red circle) button in the top toolbar. This readies Ardour itself to record. + 4. If your distribution uses Pulse (most do), go to the **Window** menu, select **Audio/MIDI Setup**, and switch your Audio System to Advanced Linux Sound Architecture (ALSA). This gives Ardour direct access to your input device. Click the **Start** button on the right, and now you can record. After recording, switch back to Pulse Audio. + + + +![Setting your input for recording][13] + +(Seth Kenlon, [CC BY-SA 4.0][9]) + +If you're a JACK Audio Connection Kit (JACK) user, you only have to switch your audio setup to JACK once. If you don't know JACK, that's OK. Just remember to switch over to ALSA before recording. + +### Export your music + +Sharing your music with friends is as easy as going to the **File** menu and selecting **Export to Audio Files**. Everything in your workspace is, essentially, recorded to a file in the format of your choosing. Supported formats include FLAC for high-quality lossless music, uncompressed WAV for archival purposes, Ogg Vorbis for posting on the Internet, and MP3 for sending to friends. + +### Music is fun + +You don't have to over-think making music. It's a lot easier than you might think, and it doesn't have to be a month- or year-long process. You can drum up some tunes in an afternoon and listen to them with satisfaction the following day as you work. Ardour makes it a trivial and fun process, and there's lots more to explore, including effects (reverbs, phasers, bitcrushers, and many more with even weirder names), more automation, esoteric time signatures, and MIDI. Download Ardour, grab some samples and loops and start making noise. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/music-linux-ardour + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/programming-code-keyboard-laptop-music-headphones.png?itok=EQZ2WKzy (Woman programming) +[2]: http://ardour.org +[3]: https://opensource.com/article/21/11/compiling-code +[4]: https://opensource.com/article/21/11/install-flatpak-linux +[5]: http://freesound.org +[6]: http://free-loops.com +[7]: http://looperman.com +[8]: https://opensource.com/sites/default/files/uploads/ardour-import-drag.jpg (Drag-and-drop import) +[9]: https://creativecommons.org/licenses/by-sa/4.0/ +[10]: https://opensource.com/sites/default/files/uploads/ardour-snap.jpg (Activate snapping) +[11]: https://opensource.com/sites/default/files/uploads/ardour-mixer.jpg (Ardour quick mixer) +[12]: https://opensource.com/sites/default/files/uploads/ardour-mix-automation.jpg (Ardour quick mixer) +[13]: https://opensource.com/sites/default/files/uploads/ardour-setup-audio-midi.jpg (Setting your input for recording) From 93143d5982b400267e5eded484c554d1d67bd6f5 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 10 Dec 2021 05:02:53 +0800 Subject: [PATCH 137/244] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020211209=20?= =?UTF-8?q?The=20European=20Commission=20Will=20Make=20its=20Software=20So?= =?UTF-8?q?lutions=20Open=20Source=20for=20Public=20Benefit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20211209 The European Commission Will Make its Software Solutions Open Source for Public Benefit.md --- ...olutions Open Source for Public Benefit.md | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 sources/news/20211209 The European Commission Will Make its Software Solutions Open Source for Public Benefit.md diff --git a/sources/news/20211209 The European Commission Will Make its Software Solutions Open Source for Public Benefit.md b/sources/news/20211209 The European Commission Will Make its Software Solutions Open Source for Public Benefit.md new file mode 100644 index 0000000000..16155bbf9c --- /dev/null +++ b/sources/news/20211209 The European Commission Will Make its Software Solutions Open Source for Public Benefit.md @@ -0,0 +1,68 @@ +[#]: subject: "The European Commission Will Make its Software Solutions Open Source for Public Benefit" +[#]: via: "https://news.itsfoss.com/eu-open-source-software/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +The European Commission Will Make its Software Solutions Open Source for Public Benefit +====== + +The EU Commission is known for its strong take on privacy and open-source. A year ago, they [asked their staff to use Signal for messaging][1] instead of WhatsApp. + +Now, they plan to make their software solutions publicly accessible for the benefit of society. In other words, anything that the EU uses for its internal work will be made open-source. + +### Public Money, Public Code + +Considering that the taxpayers pay for the operations and fund the software, the code should also be available to the public. + +This campaign with the idea of enhancing transparency has existed for several years now. + +And, the European Commission seems to be respecting the idea, which is a good sign that should encourage other official organizations funded by public money to step up with the same initiative. + +Not just limited to that, the EU also realizes that investing in open-source gives higher returns, based on their [recent study][2]. + +The Commissioner for Budget and Administration, Johannes **Hahn**, shared a statement regarding the benefits of open-source in the [press release][3]:  + +> _“Open source offers great advantages in a domain where the EU can have a leading role. The new rules will increase transparency and help the Commission, as well as citizens, companies and public services across Europe, benefit from open source software development. Pooling of efforts to improve the software and the co-creation of new features lowers costs for the society, as we also benefit from the improvements made by other developers. This can also enhance security as external and independent specialists check software for bugs and security flaws.”_ + +Of course, the promotion of open-source should accelerate innovation, security benefits and help various citizens and companies who can use it for their use-cases. + +To give a few instances, the EU mentioned two tools that would come in handy when open-sourced: + + * **eSignature**: A tool that help public administrations and businesses to accelerate the creation and verification of electronic signatures that are legally valid in all EU Member States. + * **LEOS, (Legislation Editing Open Software)**: A software to draft legal texts. + + + +### Where Can You Find the Open-Source Software? + +They plan to make all the software available in a single repository after ensuring that they do not have any significant flaws. + +Furthermore, after this decision, the EU will allow the software developers of the EU to contribute to other open-source projects. + +And many further advancements to follow, as one would expect. + +It wasn’t long ago that a [German state decided to switch to Linux][4], and now the EU commission encouraging open-source software is just more good news to the open-source ecosystem. + +So, what do you think of this move? You are welcome to let us know your thoughts in the comments below. + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/eu-open-source-software/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/eu-commission-switches-to-signal/ +[2]: https://digital-strategy.ec.europa.eu/en/library/study-about-impact-open-source-software-and-hardware-technological-independence-competitiveness-and +[3]: https://ec.europa.eu/commission/presscorner/detail/en/ip_21_6649 +[4]: https://news.itsfoss.com/german-state-foss/ From aedeb8124b016db6a1aaf6c14d9283da5ed5ed27 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 10 Dec 2021 08:56:49 +0800 Subject: [PATCH 138/244] translated --- ...or- Open Source Graphical Modeling Tool.md | 99 ------------------- ...or- Open Source Graphical Modeling Tool.md | 99 +++++++++++++++++++ 2 files changed, 99 insertions(+), 99 deletions(-) delete mode 100644 sources/tech/20211207 Gaphor- Open Source Graphical Modeling Tool.md create mode 100644 translated/tech/20211207 Gaphor- Open Source Graphical Modeling Tool.md diff --git a/sources/tech/20211207 Gaphor- Open Source Graphical Modeling Tool.md b/sources/tech/20211207 Gaphor- Open Source Graphical Modeling Tool.md deleted file mode 100644 index b0cdb37bb6..0000000000 --- a/sources/tech/20211207 Gaphor- Open Source Graphical Modeling Tool.md +++ /dev/null @@ -1,99 +0,0 @@ -[#]: subject: "Gaphor: Open Source Graphical Modeling Tool" -[#]: via: "https://itsfoss.com/gaphor-modeling-tool/" -[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" -[#]: collector: "lujun9972" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Gaphor: Open Source Graphical Modeling Tool -====== - -Gaphor is a free and open source modeling application with support for various modeling languages such as UML, [SysML][1], RAAML and C4. - -Not aware of the term “modeling language”? Basically, it’s a set of instructions that can be used to create the design and constructions of structures. It could be textual and graphical, both. - -The graphical one is easier to look at and figure out how various components of the project are related to each other. - -Have you seen a flowchart or sequence diagrams? Those are also a type of graphical modeling in the simplest form. - -![Sequence diagram example][2] - -There are various modeling languages and they are used for software development, system engineering, physics, project management and more. - -### Gaphor for UML, SysML and more - -[Gaphor][3] works with the UML, SysML, and RAAML OMG standards. It also includes support for the C4 model for visualizing software architectures. - -It’s not just a [drawing tool][4]. It implements a fully-compliant UML 2 data model. You can create highly complex models with Gaphor. - -![][5] - -Written in Python, Gaphor is completely open source under Apache 2 license. You can find all its source code on [its GitHub repository][6]. It is a cross-platform tool and available to install on Linux, Windows and macOS. - -You can export your diagrams in PDF, PNG, SVG and XML formats. You can also plug-in a code generator. - -Gaphor website mentions that it has dark mode but I didn’t see any options to enable it in the AppImage version I downloaded. - -### Installing Gaphor on Linux - -![Gaphor user interface][7] - -Arch users can find Gaphor in the AUR. For other distributions, you have the choice of choosing between [AppImage][8] and Flatpak. - -You can download the AppImage from its download page. - -[Download Gaphor][9] - -If you want to use the Flatpak version, add the Flathub repository first: - -``` - - flatpak remote-add --user --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo - -``` - -And then install it: - -``` - - flatpak install --user flathub org.gaphor.Gaphor - -``` - -Since Gaphor is essentially a Python application, you can install it [using Pip][10] as well. - -``` - - pip install gaphor - -``` - -I used UML and sequence diagrams when I worked as a software engineer. I haven’t used it in the last few years. Looking at Gaphor, I think it’s a pretty cool app to have if you have to create UML and other diagrams for your projects. - -Feel free to give it a try and share your experience in the comments. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/gaphor-modeling-tool/ - -作者:[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://sysml.org/ -[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/sequence-diagram-example-800x364.png?resize=800%2C364&ssl=1 -[3]: https://gaphor.org/ -[4]: https://itsfoss.com/open-source-paint-apps/ -[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/gaphor-uml-screenshot.jpg?resize=800%2C570&ssl=1 -[6]: https://github.com/gaphor -[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/gaphor-example-800x445.png?resize=800%2C445&ssl=1 -[8]: https://itsfoss.com/use-appimage-linux/ -[9]: https://gaphor.org/download.html#linux -[10]: https://itsfoss.com/install-pip-ubuntu/ diff --git a/translated/tech/20211207 Gaphor- Open Source Graphical Modeling Tool.md b/translated/tech/20211207 Gaphor- Open Source Graphical Modeling Tool.md new file mode 100644 index 0000000000..e3c775aa94 --- /dev/null +++ b/translated/tech/20211207 Gaphor- Open Source Graphical Modeling Tool.md @@ -0,0 +1,99 @@ +[#]: subject: "Gaphor: Open Source Graphical Modeling Tool" +[#]: via: "https://itsfoss.com/gaphor-modeling-tool/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Gaphor:开源的图形化建模工具 +====== + +Gaphor 是一个免费和开源的建模应用,支持各种建模语言,如 UML、[SysML][1]、RAAML 和 C4。 + +不知道“建模语言”这个词?基本上,它是一组可以用来创建设计和构造结构的指令。它可以是文字的,也可以是图形的。 + +图形化的更容易看,也更容易弄清楚项目的各个组成部分是如何相互关联的。 + +你见过流程图或顺序图吗?那些也是一种最简单形式的图形建模。 + +![Sequence diagram example][2] + +有各种建模语言,它们被用于软件开发、系统工程、物理学、项目管理等方面。 + +### 用于 UML、SysML 等的 Gaphor + +[Gaphor][3] 使用 UML、SysML 和 RAAML OMG 标准。它还包括对 C4 模型的支持,用于软件架构的可视化。 + +它不仅仅是一个[绘图工具][4]。它实现了一个完全兼容的 UML 2 数据模型。你可以用 Gaphor 创建高度复杂的模型。 + +![][5] + +用 Python 编写的 Gaphor 在 Apache 2 许可下是完全开源的。你可以在[其 GitHub 仓库][6]找到它的所有源代码。它是一个跨平台的工具,可以安装在 Linux、Windows 和 macOS 上。 + +你可以以 PDF、PNG、SVG 和 XML 格式导出你的图表。你还可以插入一个代码生成器。 + +Gaphor 网站提到它有深色模式,但我在下载的 AppImage 版本中没有看到任何选项可以启用它。 + +### 在 Linux 上安装 Gaphor + +![Gaphor user interface][7] + +Arch 用户可以在 AUR 中找到 Gaphor。对于其他发行版,你可以选择 [AppImage][8] 和 Flatpak。 + +你可以从其下载页面下载 AppImage。 + +[下载 Gaphor][9] + +如果你想使用 Flatpak 版本,请先添加 Flathub 仓库: + +``` + + flatpak remote-add --user --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo + +``` + +然后再安装它: + +``` + + flatpak install --user flathub org.gaphor.Gaphor + +``` + +由于 Gaphor 本质上是一个 Python 应用,你也可以[使用 Pip][10] 安装它。 + +``` + + pip install gaphor + +``` + +当我是一名软件工程师工作时,我使用 UML 和序列图。在过去的几年里,我没有使用它。看看 Gaphor,我认为如果你必须为你的项目创建 UML 和其他图表,它是一个相当不错的应用。 + +欢迎试一试,并在评论中分享你的经验。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/gaphor-modeling-tool/ + +作者:[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://sysml.org/ +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/sequence-diagram-example-800x364.png?resize=800%2C364&ssl=1 +[3]: https://gaphor.org/ +[4]: https://itsfoss.com/open-source-paint-apps/ +[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/gaphor-uml-screenshot.jpg?resize=800%2C570&ssl=1 +[6]: https://github.com/gaphor +[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/gaphor-example-800x445.png?resize=800%2C445&ssl=1 +[8]: https://itsfoss.com/use-appimage-linux/ +[9]: https://gaphor.org/download.html#linux +[10]: https://itsfoss.com/install-pip-ubuntu/ From 64fc85c2ce34050663fa6e50a6685cdfaf528ea3 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 10 Dec 2021 09:03:31 +0800 Subject: [PATCH 139/244] translating --- .../20211208 Open source photo processing with Darktable.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20211208 Open source photo processing with Darktable.md b/sources/tech/20211208 Open source photo processing with Darktable.md index 04396357fa..43d750bd88 100644 --- a/sources/tech/20211208 Open source photo processing with Darktable.md +++ b/sources/tech/20211208 Open source photo processing with Darktable.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/21/12/open-source-photo-processing-darktable" [#]: author: "Seth Kenlon https://opensource.com/users/seth" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 88a12c2d8bb805e779674afdf381507c83026ca1 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 10 Dec 2021 09:04:19 +0800 Subject: [PATCH 140/244] APL --- ... OS 16 Lite Edition is Finally Here With Latest Xfce 4.16.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/news/20211209 Zorin OS 16 Lite Edition is Finally Here With Latest Xfce 4.16.md b/sources/news/20211209 Zorin OS 16 Lite Edition is Finally Here With Latest Xfce 4.16.md index 2c5ee18352..3fe8f37479 100644 --- a/sources/news/20211209 Zorin OS 16 Lite Edition is Finally Here With Latest Xfce 4.16.md +++ b/sources/news/20211209 Zorin OS 16 Lite Edition is Finally Here With Latest Xfce 4.16.md @@ -2,7 +2,7 @@ [#]: via: "https://news.itsfoss.com/zorin-os-16-lite-release/" [#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "wxy" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From d6a7ecaec3b98a1d7159c95e75e39c85ab631cb7 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 10 Dec 2021 10:07:36 +0800 Subject: [PATCH 141/244] TSL&PRF --- ...n is Finally Here With Latest Xfce 4.16.md | 118 ---------------- ...n is Finally Here With Latest Xfce 4.16.md | 126 ++++++++++++++++++ 2 files changed, 126 insertions(+), 118 deletions(-) delete mode 100644 sources/news/20211209 Zorin OS 16 Lite Edition is Finally Here With Latest Xfce 4.16.md create mode 100644 translated/news/20211209 Zorin OS 16 Lite Edition is Finally Here With Latest Xfce 4.16.md diff --git a/sources/news/20211209 Zorin OS 16 Lite Edition is Finally Here With Latest Xfce 4.16.md b/sources/news/20211209 Zorin OS 16 Lite Edition is Finally Here With Latest Xfce 4.16.md deleted file mode 100644 index 3fe8f37479..0000000000 --- a/sources/news/20211209 Zorin OS 16 Lite Edition is Finally Here With Latest Xfce 4.16.md +++ /dev/null @@ -1,118 +0,0 @@ -[#]: subject: "Zorin OS 16 Lite Edition is Finally Here With Latest Xfce 4.16" -[#]: via: "https://news.itsfoss.com/zorin-os-16-lite-release/" -[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" -[#]: collector: "lujun9972" -[#]: translator: "wxy" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Zorin OS 16 Lite Edition is Finally Here With Latest Xfce 4.16 -====== - -[Zorin OS 16][1] was an impressive release. But, if you were looking for a lightweight distro or something for older computers, this wasn’t the option. - -Zorin OS provides a lite edition for every release powered by Xfce desktop environment for computers with limited resources. However, it wasn’t available for Zorin OS 16 until now. - -Yes, finally, Zorin OS 16 Lite is now available to download along with the Pro edition! - -Note that if you have already purchased Zorin OS 16 Pro, the Pro Lite edition is included. - -### Zorin OS 16 Lite: What’s New? - -![][2] - -With this release, Zorin OS 16 Lite aims to bring all the [improvements introduced in Zorin OS 16][3] by keeping the resource usage minimal. - -I briefly tested the distribution for our video review and was pretty impressed. - -Interestingly, Zorin OS 16 Lite has managed to offer a similar level of user experience and polish with Xfce as its desktop environment. Usually, I do not like the Xfce desktop environment (just an aesthetic choice), but Zorin OS 16 Lite is different. - -I have made a video of Pro edition of Zorin OS 16 Lite and you can see it in action: - -![][4] - -#### Visual Overhaul - -![][5] - -Zorin OS 16 Lite with Xfce 4.16 offers a refreshing user experience with a polished theme that resonates closely with Zorin OS 16 (GNOME edition). - -You can tweak the theme, toggle dark mode, and choose an accent color from the appearance menu. The appearance options also received a refresh to let you easily customize the experience on Zorin OS 16 Lite. - -Unfortunately, you do not get a jelly mode here, like in Zorin OS 16. So, if you need eye-candy animations, the lite edition may not be a suitable choice for you. - -In addition to the new visual changes, and features, you will also find new backgrounds to complement your desktop. Some wallpapers could be limited to the Pro edition. - -![][6] - -#### Desktop Layouts for Pro Edition - -While you already get some choices for desktop layouts in the free version, the Pro edition gives you two more additional desktop layouts. - -![][5] - -One of the layouts resembles a classic Windows design and the other manages to look close to ChromeOS. - -![][5] - -You also get to choose between a macOS-like layout, GNOME 2, and a Windows list-like layout. - -Note that the default layout is Windows-like and should be a great experience as [one of the best distributions for Windows users][7]. - -#### Taskbar With Window Previews - -![][8] - -There has been an important addition to the desktop functionality, i.e., you can now easily view the preview of an active window when you hover over it from the taskbar. - -At the time of testing this with the pre-released ISO, it was not a smooth experience. But, considering they iron out the bugs, it is an excellent feature to have in Zorin OS 16 Lite. - -#### Flathub Enabled by Default - -The application center (or software center) also offers Flathub integration out of the box. You should quickly find Flatpak apps from the software center and choose to change sources if you do not prefer Flatpak packages. - -#### Other Improvements - -![][9] - -In addition to the key changes, you will also find improvements like Firefox browser baked in with telemetry disabled, a new sound recorder app, fractional scaling for high-resolution displays, and the Rythmbox app. - -Thunar file manager has received usual subtle improvements and blends in with the rest of the design. You should be able to play videos out-of-the-box using the parole video player. - -The presence of [Linux Kernel 5.11][10] should make sure of some technical compatibility improvements. - -Overall, the Zorin OS team has done a wonderful job in carrying over the beautiful design and ease of use from Zorin OS 16 to its lite edition. You may not even realize that you are using the Xfce desktop environment for the most part. - -### Download Zorin OS 16 Lite - -You can head to its download page to get Zorin OS 16 Lite ISO. If you have already purchased Zorin OS 16 Pro, you can use the link from your email to download the Pro Lite edition. - -[Zorin OS 16 Lite][11] - -What do you think about Zorin OS 16 Lite? Feel free to let us know your thoughts in the comments. - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/zorin-os-16-lite-release/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://news.itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://news.itsfoss.com/zorin-os-16-release/ -[2]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQzOSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[3]: https://news.itsfoss.com/zorin-os-16-features/ -[4]: https://i2.wp.com/i.ytimg.com/vi/Cl5qXPY9OLk/hqdefault.jpg?w=780&ssl=1 -[5]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjU4NSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[6]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjI5MyIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[7]: https://itsfoss.com/windows-like-linux-distributions/ -[8]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjIxOCIgd2lkdGg9IjY2MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[9]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ2MiIgd2lkdGg9IjY1NSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[10]: https://news.itsfoss.com/linux-kernel-5-11-release/ -[11]: https://zorin.com/os/download/ diff --git a/translated/news/20211209 Zorin OS 16 Lite Edition is Finally Here With Latest Xfce 4.16.md b/translated/news/20211209 Zorin OS 16 Lite Edition is Finally Here With Latest Xfce 4.16.md new file mode 100644 index 0000000000..4d39cfc60c --- /dev/null +++ b/translated/news/20211209 Zorin OS 16 Lite Edition is Finally Here With Latest Xfce 4.16.md @@ -0,0 +1,126 @@ +[#]: subject: "Zorin OS 16 Lite Edition is Finally Here With Latest Xfce 4.16" +[#]: via: "https://news.itsfoss.com/zorin-os-16-lite-release/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: " " +[#]: url: " " + +Zorin OS 16 Lite 版终于来了 +====== + +> Zorin OS 16 Lite 带来了 Zorin OS 16 的所有优点和 Xfce 桌面环境。让我们来了解一下。 + +![](https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/zorin-os-16-lite-ft.jpg?w=1200&ssl=1) + +[Zorin OS 16][1] 是一个令人印象深刻的版本。但是,如果你正在寻找一个轻量级的发行版或适合旧电脑的东西,这不是一个好的选择。 + +Zorin OS 为每个版本都提供了一个由 Xfce 桌面环境驱动的 Lite 版本,以供资源有限的计算机使用。然而,直到刚刚之前,Zorin OS 16 还没有这个 Lite 版。 + +是的,终于,Zorin OS 16 Lite 现在可以和 Pro 版一起下载了。 + +请注意,如果你已经购买了 Zorin OS 16 Pro,那么 Lite 版也包括在内。 + +(LCTT 译注:Zorin OS 的 Pro 版是收费的,其 Core 版和 Lite 版是免费的。) + +### Zorin OS 16 Lite: 有什么新内容? + +![][2] + +在这个版本中,Zorin OS 16 Lite 旨在通过保持最小的资源使用量,带来所有 [Zorin OS 16 中引入的改进][3]。 + +我为了制作的视频点评而简要地测试了该发行版,对它留下了相当深刻的印象。 + +有趣的是,Zorin OS 16 Lite 设法提供了类似于 Xfce 的用户体验和精美的桌面环境。通常情况下,我不喜欢 Xfce 桌面环境(只是一种审美选择),但 Zorin OS 16 Lite 不同。 + +我做了一个 Zorin OS 16 Lite 专业版的视频,你可以看到它的运行情况。 + +![video](https://youtu.be/Cl5qXPY9OLk) + +#### 视觉大修 + +![][5] + +带有 Xfce 4.16 的 Zorin OS 16 Lite 提供了令人耳目一新的用户体验,其精美的主题与 Zorin OS 16(GNOME 版)非常相近。 + +你可以调整主题,切换暗色模式,并从外观菜单中选择一种重点颜色。外观选项也得到了刷新,可以让你在 Zorin OS 16 Lite 上轻松定制体验。 + +不幸的是,你在这里找不到像 Zorin OS 16 一样的果冻模式。因此,如果你需要眼花缭乱的动画,Lite 版可能不是你的合适选择。 + +除了新的视觉变化和功能之外,你还会发现新的可以填补你的桌面的背景。有些壁纸可能只限于 Pro 版。 + +![][6] + +#### Pro 版的桌面布局 + +虽然在 Core 版和 Lite 版中有一些桌面布局的选择,但 Pro 版又为你提供了两个额外的桌面布局。 + +![][12] + +其中一个布局类似于经典的 Windows 设计,另一个布局看起来接近于 ChromeOS。 + +![][13] + +你还可以在类似 macOS、GNOME 2 和类似 Windows 列表的布局之间进行选择。 + +请注意,作为 [Windows 用户的最佳发行版之一][7],其默认的布局类似 Windows,这应该是一个很好的体验。 + +#### 带有窗口预览的任务栏 + +![][14] + +桌面功能有一个重要的改进,也就是说,现在当你从任务栏悬停在一个活动窗口上时,你可以很容易地查看该窗口的预览。 + +在用预先发布的 ISO 进行测试时,这个体验并不流畅。但是,考虑到他们已经消除了一些错误,这是 Zorin OS 16 Lite 中的一个很好的功能。 + +#### 默认启用的 Flathub + +应用中心(软件中心)也提供了 Flathub 集成,开箱即用。你应该可以从软件中心很快地找到 Flatpak 应用程序,如果你不喜欢 Flatpak 软件包,可以改变软件包源。 + +#### 其他改进 + +![][15] + +除了关键的变化外,你还会发现一些改进,如禁用遥测的 Firefox 浏览器、新的声音记录器应用、高分辨率显示器的小数点级缩放以及 Rythmbox 应用。 + +Thunar 文件管理器有一些常规的微小改进,并与其他设计融为一体。你应该能够使用 parole 视频播放器来播放视频了。 + +[Linux 内核 5.11][10] 也改进了一些技术兼容性。 + +总的来说,Zorin OS 团队在将 Zorin OS 16 的漂亮设计和易用性延续到其 Lite 版方面做得很好。大部分时间,你甚至可能没有意识到你在使用 Xfce 桌面环境。 + +### 下载 Zorin OS 16 Lite + +你可以前往其下载页面获取 Zorin OS 16 Lite 的 ISO。如果你已经购买了 Zorin OS 16 Pro 版,你可以使用电子邮件中的链接来下载 Lite 版。 + +- [Zorin OS 16 Lite][11] + +你对 Zorin OS 16 Lite 有什么看法?欢迎在评论中告诉我们你的想法。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/zorin-os-16-lite-release/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://news.itsfoss.com/zorin-os-16-release/ +[2]: https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/zorin-os-desktop-16-lite.jpg?w=1200&ssl=1 +[3]: https://news.itsfoss.com/zorin-os-16-features/ +[4]: https://i2.wp.com/i.ytimg.com/vi/Cl5qXPY9OLk/hqdefault.jpg?w=780&ssl=1 +[5]: https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/desktop-look.png?w=1024&ssl=1 +[6]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/wallpapers.png?w=960&ssl=1 +[7]: https://itsfoss.com/windows-like-linux-distributions/ +[10]: https://news.itsfoss.com/linux-kernel-5-11-release/ +[11]: https://zorin.com/os/download/ +[12]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/chrome-os-like-desktop.jpg?w=1024&ssl=1 +[13]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/windows-classic-like.jpg?w=1024&ssl=1 +[14]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/window-previews.png?w=660&ssl=1 +[15]: https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/zorin-os-16-lite-neofetch.png?w=655&ssl=1 \ No newline at end of file From 34b86713c5813fbcba1770309432a13796a7ce11 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 10 Dec 2021 10:09:16 +0800 Subject: [PATCH 142/244] PRF&PUB @wxy https://linux.cn/article-14068-1.html --- ...S 16 Lite Edition is Finally Here With Latest Xfce 4.16.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/news => published}/20211209 Zorin OS 16 Lite Edition is Finally Here With Latest Xfce 4.16.md (98%) diff --git a/translated/news/20211209 Zorin OS 16 Lite Edition is Finally Here With Latest Xfce 4.16.md b/published/20211209 Zorin OS 16 Lite Edition is Finally Here With Latest Xfce 4.16.md similarity index 98% rename from translated/news/20211209 Zorin OS 16 Lite Edition is Finally Here With Latest Xfce 4.16.md rename to published/20211209 Zorin OS 16 Lite Edition is Finally Here With Latest Xfce 4.16.md index 4d39cfc60c..948ce2f97f 100644 --- a/translated/news/20211209 Zorin OS 16 Lite Edition is Finally Here With Latest Xfce 4.16.md +++ b/published/20211209 Zorin OS 16 Lite Edition is Finally Here With Latest Xfce 4.16.md @@ -4,8 +4,8 @@ [#]: collector: "lujun9972" [#]: translator: "wxy" [#]: reviewer: "wxy" -[#]: publisher: " " -[#]: url: " " +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14068-1.html" Zorin OS 16 Lite 版终于来了 ====== From c5128f4864a6724b6c09a46804ecff8c82ab0e27 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 10 Dec 2021 13:06:00 +0800 Subject: [PATCH 143/244] PRF&PUB @geekpi https://linux.cn/article-14069-1.html --- ...sk Manager - Resource Monitor for Linux.md | 50 +++++++++---------- 1 file changed, 24 insertions(+), 26 deletions(-) rename {translated/tech => published}/20211130 System Monitoring Center is an Ideal Task Manager - Resource Monitor for Linux.md (52%) diff --git a/translated/tech/20211130 System Monitoring Center is an Ideal Task Manager - Resource Monitor for Linux.md b/published/20211130 System Monitoring Center is an Ideal Task Manager - Resource Monitor for Linux.md similarity index 52% rename from translated/tech/20211130 System Monitoring Center is an Ideal Task Manager - Resource Monitor for Linux.md rename to published/20211130 System Monitoring Center is an Ideal Task Manager - Resource Monitor for Linux.md index 03da58bba3..6bf7051c59 100644 --- a/translated/tech/20211130 System Monitoring Center is an Ideal Task Manager - Resource Monitor for Linux.md +++ b/published/20211130 System Monitoring Center is an Ideal Task Manager - Resource Monitor for Linux.md @@ -3,36 +3,36 @@ [#]: author: "Ankush Das https://itsfoss.com/author/ankush/" [#]: collector: "lujun9972" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14069-1.html" -System Monitoring Center 是一个理想的 Linux 任务管理器和资源监视器 +系统监控中心:一个理想的 Linux 任务管理器和资源监视器 ====== -_**简介:**System Monitoring Center 是一个多合一的开源应用,用于监控基本的系统资源统计,消除了对多种工具的需求。_ +> “系统监控中心”是一个多合一的开源应用,不用使用多种工具就可以监控基本的系统资源情况。 -在 Linux 上以图形方式监控系统资源可能不是最好的体验。与你的桌面环境配套的系统监控工具可能会限制细节。 +在 Linux 上以图形方式监控系统资源可能体验不是很好,这些与你的桌面环境相配套的系统监控工具可能细节有限。 例如,GNOME 的系统监视器不显示 CPU 频率和温度。 此外,Linux 的默认系统监控程序通常以简单为目标,而不是提供详细的信息。 -System Monitoring Center 是一个有用的 GUI 工具,它提供了大量必要的信息。在这篇文章中,让我给你详细介绍一下它。 +“系统监控中心System Monitoring Center” 是一个有用的 GUI 工具,它提供了大量必要的信息。在这篇文章中,让我给你详细介绍一下它。 -### System Monitoring Center:显示基本系统统计信息的 Linux 应用 +### 系统监控中心:显示基本系统统计信息的 Linux 应用 ![][1] -System Monitoring Center 是一个基于 GTK3 和 Python 3 的外观时尚的应用,它为你提供你想要的所有资源使用数据。 +系统监控中心是一个基于 GTK3 和 Python 3 的外观时尚的应用,它为你提供了你想要的所有资源使用数据。 -在我的例子中,我想在使用系统监控工具时关注 CPU 的频率,但 GNOME 的系统监控工具没有帮助。所以,这个东西就非常有用了。 +在我的例子中,我想在使用系统监控工具时关注 CPU 的频率,但 GNOME 的系统监控工具提供不了帮助。所以,这个应用就非常有用了。 ![][2] -该应用提供了良好的用户体验,并提供了大量的信息和功能。让我强调一下你可以期待它的主要功能。 +该应用的用户体验良好,并提供了大量的信息和功能。让我重点介绍一下它的主要功能。 -写这篇文章时,该应用程序仍处于测试阶段。因此,你可以预期会遇到一些错误。然而,我在简短的测试中没有注意到任何问题。 +> 写这篇文章时,该应用程序仍处于测试阶段。因此,你可能会遇到一些错误。然而,我在简短的测试中没有注意到任何问题。 ### 系统监控中心的功能 @@ -40,11 +40,11 @@ System Monitoring Center 是一个基于 GTK3 和 Python 3 的外观时尚的应 首先,它可以让你查看 CPU、内存、磁盘、网络、GPU 和传感器的单独统计数据。 -你可以期待该工具的以下细节: +你可以在该工具中看到以下细节信息: * 显示 CPU 状态,包括频率 * 能够显示平均使用率或每个核心的使用率 - * 选择 CPU 频率和其他统计的精度点 + * 可以选择 CPU 频率和其他统计的精度 * 能够改变图表的颜色 * 按用户过滤系统进程并轻松管理它们 * 切换一个浮动的摘要小部件,以快速获得信息 @@ -52,36 +52,34 @@ System Monitoring Center 是一个基于 GTK3 和 Python 3 的外观时尚的应 * 在同一个应用中显示详细的系统信息 * 控制启动服务和程序 * 能够控制状态更新的时间间隔 - * 应用本身的系统资源使用率低 + * 应用本身的系统资源使用率较低 * 适应系统主题 - - 虽然它为每个标签(或组件)提供了大量的选项和自定义功能,但我希望它能在未来的更新中包括 RAM 频率等东西。 ![][4] -然而,其余的数据似乎非常有用,考虑到它可以同时取代磁盘使用分析器和 neofetch 等终端工具的使用。 +然而,考虑到它可以同时取代磁盘使用分析器和 `neofetch` 等终端工具,其余的数据似乎非常有用。 ![][5] -请注意,如果你有多个机箱风扇、一个独立的排风扇或 AIO,你可能无法得到风扇的数据。温度可能会有偏差,但 CPU 的温度应该是可见的。 +请注意,如果你有多个机箱风扇、独立的排风扇或 AIO,你可能无法得到风扇的数据。温度也可能有或没有,但 CPU 的温度应该是可见的。 -### 在 Linux 中安装 System Monitoring Center +### 在 Linux 中安装系统监控中心 你可以使用可用的 deb 包在任何基于 Ubuntu 的发行版上轻松安装它。 -不幸的是,除了一个 ZIP 文件,没有可用的软件包,你必须手动构建和编译才能安装它。你应该在 ZIP 文件中找到一个脚本来构建 RPM 包。 +不幸的是,没有可用的其他软件包,只有一个 ZIP 文件,你得手动构建和编译才能安装它。你在 ZIP 文件中可以找到一个脚本来构建 RPM 包。 -deb 文件可以通过 SourceForge 获得。你应该点击下面的按钮来下载它,或者选择探索他们的 [GitLab 页面][6]。 +deb 文件可以通过 SourceForge 获得。你点击下面的按钮来下载它,或者在他们的 [GitLab 页面][6] 找到。 -[Download System Monitoring Center][7] +- [下载系统监控中心][7] ### 总结 -System Monitoring Center 是一个开源应用,可以让用户详细了解他们的系统资源,并帮助管理进程。 +系统监控中心是一个开源应用,可以让用户详细了解他们的系统资源,并帮助管理进程。 -对于许多 Linux 用户来说,这是一个非常需要的应用,它可以提供详细的信息,而不需要使用单独的终端/GUI 程序。 +对于许多 Linux 用户来说,这是一个非常需要的应用,不需要使用单独的终端/GUI 程序就可以提供详细的信息。 -------------------------------------------------------------------------------- @@ -90,7 +88,7 @@ via: https://itsfoss.com/system-monitoring-center/ 作者:[Ankush Das][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 20afe01b5e5fb9a446955f5322e7e67a367a402b Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 10 Dec 2021 13:12:42 +0800 Subject: [PATCH 144/244] PRF --- ...ter is an Ideal Task Manager - Resource Monitor for Linux.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/published/20211130 System Monitoring Center is an Ideal Task Manager - Resource Monitor for Linux.md b/published/20211130 System Monitoring Center is an Ideal Task Manager - Resource Monitor for Linux.md index 6bf7051c59..93fdbdd7d7 100644 --- a/published/20211130 System Monitoring Center is an Ideal Task Manager - Resource Monitor for Linux.md +++ b/published/20211130 System Monitoring Center is an Ideal Task Manager - Resource Monitor for Linux.md @@ -12,6 +12,8 @@ > “系统监控中心”是一个多合一的开源应用,不用使用多种工具就可以监控基本的系统资源情况。 +![](https://img.linux.net.cn/data/attachment/album/202112/10/131211ng09sz76u2b7gbaw.jpg) + 在 Linux 上以图形方式监控系统资源可能体验不是很好,这些与你的桌面环境相配套的系统监控工具可能细节有限。 例如,GNOME 的系统监视器不显示 CPU 频率和温度。 From 7312ca1dd00984d3912604611291a69674718de2 Mon Sep 17 00:00:00 2001 From: perfiffer Date: Fri, 10 Dec 2021 22:33:41 +0800 Subject: [PATCH 145/244] translated by perfiffer --- .../tech/20210922 Add storage with LVM.md | 125 ++++++++---------- 1 file changed, 56 insertions(+), 69 deletions(-) rename {sources => translated}/tech/20210922 Add storage with LVM.md (56%) diff --git a/sources/tech/20210922 Add storage with LVM.md b/translated/tech/20210922 Add storage with LVM.md similarity index 56% rename from sources/tech/20210922 Add storage with LVM.md rename to translated/tech/20210922 Add storage with LVM.md index e150e23d0c..f6d76be779 100644 --- a/sources/tech/20210922 Add storage with LVM.md +++ b/translated/tech/20210922 Add storage with LVM.md @@ -7,46 +7,42 @@ [#]: publisher: " " [#]: url: " " -Add storage with LVM +使用 LVM 添加存储 ====== -LVM enables extreme flexibility in how you configure your storage. +LVM 为你配置存储的方式提供了极大的灵活性。 ![Storage units side by side][1] -Logical Volume Manager (LVM) allows for a layer of abstraction between the operating system and the hardware. Normally, your OS looks for disks (`/dev/sda`, `/dev/sdb`, and so on) and partitions within those disks (`/dev/sda1`, `/dev/sdb1`, and so on). +逻辑卷管理器(LVM)允许在操作系统和硬件之间建立一个抽象层。通常,你的操作系统会查找磁盘(`/dev/sda`,`/dev/sdb` 等)和这些磁盘中的分区(`/dev/sda1`,`/dev/sdb1` 等)。 -In LVM, a virtual layer is created between the operating system and the disks. Instead of one drive holding some number of partitions, LVM creates a unified storage pool (called a _Volume Group_) that spans any number of physical drives (called _Physical Volumes_). Using the storage available in a Volume Group, LVM provides what appear to be disks and partitions to your OS. +LVM 在操作系统和磁盘之间创建了一个虚拟层。LVM 不是一个驱动器持有一定数量的分区,而是创建一个统一的存储池(称为卷组),跨越任意数量的物理驱动器(称为物理卷)。使用卷组中可用的存储,LVM 为你的操作系统提供类似磁盘和分区的功能。 -And the operating system is completely unaware that it's being "tricked." +操作系统完全没有意识到它被“欺骗”了。 ![Drive space][2] Opensource.com, [CC BY-SA 4.0][3] -Because the LVM creates volume groups and logical volumes virtually, it makes it easy to resize or move them, or create new volumes, even while the system is running. Additionally, LVM provides features that are not present otherwise, like creating live snapshots of logical volumes, without unmounting the disk first. +由于 LVM 虚拟的创建卷组和逻辑卷,因此即使在系统运行时,也可以轻松调整它们的大小或移动它们,或者创建新卷。此外,LVM 提供了其它情况下不存在的特性,比如创建逻辑卷的活动快照,而无需首先卸载磁盘。 -A volume group in an LVM is a named virtual container that groups together the underlying physical disks. It acts as a pool from which logical volumes of different sizes can be created. Logical volumes contain the actual file system and can span multiple disks, and don't need to be physically contiguous. +LVM 中的卷组是一个命名的虚拟容器,将底层物理磁盘组合在一起。它充当一个池,可以从中创建不同大小的逻辑卷。逻辑卷包含实际的文件系统并且可以跨越多个磁盘,并且不需要物理上连续。 -### Features +### 特性 + * 分区名称通常具有系统名称,例如 `/dev/sda1`。LVM 具有便于人们理解的名称,例如 `home` 或者 `media`。 + * 分区的总大小受底层物理磁盘大小的限制。在 LVM 中,卷可以跨越多个磁盘,并且仅受 LVM 中所有物理磁盘总大小的限制。 + * 分区通常只有在磁盘未使用且已卸载时才能调整大小、移动或删除。LVM 卷可以在系统运行时进行操作。 + * 只能通过分配与分区相邻的可用空间来扩展分区。LVM 卷可以从任何地方占用可用空间。 + * 扩展分区涉及移动数据以腾出可用空间,这非常耗时,并且可能会在断电期间导致数据丢失。LVM 卷可以从卷组中的任何地方占用可用空间,甚至可以在另一块磁盘上。 + * 因为在 LVM 中创建卷非常容易,所以它鼓励创建不同的卷,例如创建单独的卷来测试功能或尝试不同的操作系统。对于分区,此过程将非常耗时并且容易出错。 + * 快照只能在 LVM 中创建。它允许你创建当前逻辑卷的时间点镜像,即使在系统运行时也可以。这非常适合备份。 - * Partition names normally have system designations like `/dev/sda1`. LVM volumes have normal human-understandable names, like `home` or `media`. - * The total size of partitions is limited by the size of the underlying physical disk. In LVM, volumes can span multiple disks, and are only limited by the total size of all physical disks in the LVM. - * Partitions can normally only be resized, moved, or deleted when the disk is not in use and is unmounted. LVM volumes can be manipulated while the system is running. - * Partitions can only be expanded by allocating them free space adjacent to the partition. LVM volumes can take free space from anywhere. - * Expanding a partition involves moving the data around to make free space, which is time-consuming and could lead to data loss during a power outage. LVM volumes can take free space from anywhere in the volume group, even on another disk. - * Because it’s so easy to create volumes in an LVM, it encourages creating different volumes, like creating separate volumes to test features or to try different operating systems. With partitions, this process would be time-consuming and error-prone. - * Snapshots can only be created in an LVM. It allows you to create a point-in-time image of the current logical volume, even while the system is running. This is great for backups. - - - -### Test setup - -As a demonstration, assume your system has the following drive configuration: +### 测试设置 +作为演示,假设你的系统具有以下驱动器配置: ``` NAME    MAJ:MIN RM SIZE RO TYPE MOUNTPOINT xvda    202:0    0   8G  0 disk -`-xvda1 202:1    0   8G  0 part / + -xvda1 202:1    0   8G  0 part / xvdb    202:16   0   1G  0 disk xvdc    202:32   0   1G  0 disk xvdd    202:48   0   2G  0 disk @@ -54,10 +50,9 @@ xvde    202:64   0   5G  0 disk xvdf    202:80   0   8G  0 disk ``` -#### Step 1. Initialize disks to use with LVM - -Run `pvcreate /dev/xvdb /dev/xvdc /dev/xvdd /dev/xvde /dev/xvdf`. The output should be: +#### 步骤 1. 初始化磁盘以用于 LVM +运行 `pvcreate /dev/xvdb /dev/xvdc /dev/xvdd /dev/xvde /dev/xvdf`。输出应如下: ``` Physical volume "/dev/xvdb" successfully created @@ -67,24 +62,23 @@ Physical volume "/dev/xvde" successfully created Physical volume "/dev/xvdf" successfully created ``` -See the result using `pvs` or `pvdisplay`: - +使用 `pvs` 或者 `pvdisplay` 查看结果: ``` "/dev/xvde" is a new physical volume of "5.00 GiB" -\--- NEW Physical volume --- +--- NEW Physical volume --- PV Name               /dev/xvde VG Name PV Size               5.00 GiB Allocatable           NO PE Size               0 -Total PE              0 +Total PE              0vgcreate myvg /dev/xvdb /dev/xvdc /dev/xvdd /dev/xvde /dev/xvdf Free PE               0 Allocated PE          0 PV UUID               728JtI-ffZD-h2dZ-JKnV-8IOf-YKdS-8srJtn "/dev/xvdb" is a new physical volume of "1.00 GiB" -\--- NEW Physical volume --- +--- NEW Physical volume --- PV Name               /dev/xvdb VG Name PV Size               1.00 GiB @@ -96,7 +90,7 @@ Allocated PE          0 PV UUID               zk1phS-7uXc-PjBP-5Pv9-dtAV-zKe6-8OCRkZ "/dev/xvdd" is a new physical volume of "2.00 GiB" -\--- NEW Physical volume --- +--- NEW Physical volume --- PV Name               /dev/xvdd VG Name PV Size               2.00 GiB @@ -108,7 +102,7 @@ Allocated PE          0 PV UUID               R0I139-Ipca-KFra-2IZX-o9xJ-IW49-T22fPc "/dev/xvdc" is a new physical volume of "1.00 GiB" -\--- NEW Physical volume --- +--- NEW Physical volume --- PV Name               /dev/xvdc VG Name PV Size               1.00 GiB @@ -118,9 +112,9 @@ Total PE              0 Free PE               0 Allocated PE          0 PV UUID               FDzcVS-sq22-2b13-cYRj-dXHf-QLjS-22Meae - +vgcreate myvg /dev/xvdb /dev/xvdc /dev/xvdd /dev/xvde /dev/xvdf "/dev/xvdf" is a new physical volume of "8.00 GiB" -\--- NEW Physical volume --- +--- NEW Physical volume --- PV Name               /dev/xvdf VG Name PV Size               8.00 GiB @@ -132,17 +126,16 @@ Allocated PE          0 PV UUID               TRVSH9-Bo5D-JHHb-g0NX-8IoS-GG6T-YV4d0p ``` -#### Step 2. Create the volume group - -Run `vgcreate myvg /dev/xvdb /dev/xvdc /dev/xvdd /dev/xvde /dev/xvdf`. See the results with `vgs` or `vgdisplay`: +#### 步骤 2. 创建卷组 +运行 `vgcreate myvg /dev/xvdb /dev/xvdc /dev/xvdd /dev/xvde /dev/xvdf`。通过 `vgs` 或者 `vgdisplay` 查看结果: ``` -\--- Volume group --- +--- Volume group --- VG Name               myvg System ID Format                lvm2 -Metadata Areas        5 +Metadata Areas        5vgcreate myvg /dev/xvdb /dev/xvdc /dev/xvdd /dev/xvde /dev/xvdf Metadata Sequence No  1 VG Access             read/write VG Status             resizable @@ -160,21 +153,19 @@ Free  PE / Size       4347 / 16.98 GiB VG UUID               ewrrWp-Tonj-LeFa-4Ogi-BIJJ-vztN-yrepkh ``` -#### Step 3: Create logical volumes - -Run the following commands: +#### 步骤 3: 创建逻辑卷 +运行以下命令: ``` lvcreate myvg --name media --size 4G lvcreate myvg --name home --size 4G ``` -Verify the results using `lvs` or `lvdisplay`: - +使用 `lvs` 或者 `lvdisplay` 验证结果: ``` -\--- Logical volume --- +--- Logical volume --- LV Path                /dev/myvg/media LV Name                media VG Name                myvg @@ -188,10 +179,10 @@ Current LE             1024 Segments               1 Allocation             inherit Read ahead sectors     auto -\- currently set to     256 +- currently set to     256 Block device           252:0 -\--- Logical volume --- +--- Logical volume --- LV Path                /dev/myvg/home LV Name                home VG Name                myvg @@ -205,48 +196,44 @@ Current LE             1024 Segments               1 Allocation             inherit Read ahead sectors     auto -\- currently set to     256 +- currently set to     256 Block device           252:1 ``` -#### Step 4: Create the file system +#### 步骤 4: 创建文件系统 -Create the file system using: +使用以下命令创建文件系统: - -``` +```vgcreate myvg /dev/xvdb /dev/xvdc /dev/xvdd /dev/xvde /dev/xvdf mkfs.ext3 /dev/myvg/media mkfs.ext3 /dev/myvg/home ``` -Mount it: - +挂载它: ``` mount /dev/myvg/media /media mount /dev/myvg/home /home ``` -See your full setup using `lsblk`: - +使用 `lsblk` 命令查看完整配置: ``` NAME         MAJ:MIN RM SIZE RO TYPE MOUNTPOINT xvda         202:0    0   8G  0 disk -`-xvda1      202:1    0   8G  0 part / + -xvda1      202:1    0   8G  0 part / xvdb         202:16   0   1G  0 disk xvdc         202:32   0   1G  0 disk xvdd         202:48   0   2G  0 disk xvde         202:64   0   5G  0 disk -`-myvg-media 252:0    0   4G  0 lvm  /media -xvdf         202:80   0   8G  0 disk -`-myvg-home  252:1    0   4G  0 lvm  /home -``` + -myvg-media 252:0    0   4G  0 lvm  /media +vgcreate myvg /dev/xvdb /dev/xvdc /dev/xvdd /dev/xvde /dev/xvdfxvdf         202:80   0   8G  0 disk + -myvg-home  252:1    0   4G  0 lvm  /home +```vgcreate myvg /dev/xvdb /dev/xvdc /dev/xvdd /dev/xvde /dev/xvdf -#### Step 5: Extending the LVM - -Add a new disk at `/dev/xvdg`. To extend the `home` volume, run the following commands: +#### 步骤 5: 扩展 LVM +添加一块新的 `/dev/xvdg` 磁盘。要扩展 `home` 卷,运行以下命令: ``` pvcreate /dev/xvdg @@ -255,15 +242,15 @@ lvextend -l 100%FREE /dev/myvg/home resize2fs /dev/myvg/home ``` -Run `df -h` and you should see your new size reflected. +运行 `df -h`,你应该可以看到新的磁盘大小。 -And that's it! +就是这样! -LVM enables extreme flexibility in how you configure your storage. Try it out, and have fun with LVM! +LVM 为你配置存储的方式提供了极大的灵活性。尝试一下,并享受 LVM 的乐趣! * * * -_This article was originally published on the [author's personal blog][4] and has been adapted with permission._ +本文首发于 [作者个人博客][4],经授权改编。 -------------------------------------------------------------------------------- @@ -271,7 +258,7 @@ via: https://opensource.com/article/21/9/add-storage-lvm 作者:[Ayush Sharma][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[perfiffer](https://github.com/perfiffer) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From d0c47fa076d19c5f79d7eb814f986e669a56464d Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 11 Dec 2021 05:02:18 +0800 Subject: [PATCH 146/244] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211211=20?= =?UTF-8?q?Using=20GPG=20to=20Encrypt=20and=20Decrypt=20Files=20on=20Linux?= =?UTF-8?q?=20[Hands-on=20for=20Beginners]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211211 Using GPG to Encrypt and Decrypt Files on Linux -Hands-on for Beginners.md --- ... Files on Linux -Hands-on for Beginners.md | 268 ++++++++++++++++++ 1 file changed, 268 insertions(+) create mode 100644 sources/tech/20211211 Using GPG to Encrypt and Decrypt Files on Linux -Hands-on for Beginners.md diff --git a/sources/tech/20211211 Using GPG to Encrypt and Decrypt Files on Linux -Hands-on for Beginners.md b/sources/tech/20211211 Using GPG to Encrypt and Decrypt Files on Linux -Hands-on for Beginners.md new file mode 100644 index 0000000000..54b65e8645 --- /dev/null +++ b/sources/tech/20211211 Using GPG to Encrypt and Decrypt Files on Linux -Hands-on for Beginners.md @@ -0,0 +1,268 @@ +[#]: subject: "Using GPG to Encrypt and Decrypt Files on Linux [Hands-on for Beginners]" +[#]: via: "https://itsfoss.com/gpg-encrypt-files-basic/" +[#]: author: "Hunter Wittenborn https://itsfoss.com/author/hunter/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Using GPG to Encrypt and Decrypt Files on Linux [Hands-on for Beginners] +====== + +[GnuPG][1], popularly known as GPG, is an extremely versatile tool, being widely used as the industry standard for encryption of things like emails, messages, files, or just anything you need to send to someone securely. + +It’s easy to get started with GPG, and you can be on your way with using it in a matter of minutes. + +In this tutorial, I’ll show you how to encrypt and decrypt files with GPG. _**This is a simple tutorial and you may try all of it to practice on your Linux system as well. This will help you practice the GPG commands and understand it when you are absolutely new to it.**_ + +Read the entire tutorial first and then start doing it on your own. + +### How does GPG work for encryption? + +![GPG encryption][2] + +To start using GPG, you’ll first need to have a GPG key. + +A GPG key is what you’ll use to encrypt (or decrypt) files later in the tutorial. It’s also what is used to identity you, with things like your name and email being tied to the key as well. + +GPG keys work by using two files, a private key and a public key. These two keys are tied to each other, and are both needed to use all of GPG’s functionality, notably encrypting and decrypting files. + +When you encrypt a file with GPG, it uses the private key. The new, encrypted file can then **only** be _decrypted_ with the paired public key. + +The private key is meant to be stored in a fashion stated directly in its name – privately, and not given out to anyone. + +The public key on the other hand is meant to be given to others, or anyone you want to be able to decrypt your files. + +This is where GPG’s main approach for encryption comes into play. It allows you to encrypt files locally and then allow others to be ensured that the files they received were actually sent from you. As the only way they’ll be able to _decrypt_ the file is with _your_ public key, which would only work if the file was _encrypted_ using _your_ private key in the first place. + +_**This also works in the opposite direction!**_ Other people can encrypt files using your public key, and the only way it’ll be able to be decrypted is with your private key. Thus allowing others to publicly post files without worry of people besides you being able to read them. + +_**In other words, if a file was encrypted with a private key, it can only be decrypted with the corresponding public key. And if a file was encrypted with a public key, it can only be decrypted with the corresponding private key.**_ + +#### You are already using GPG without realizing + +One of the most common example of using GPG is in Linux package manager, specially the [external repositories][3]. You add the public key of the developer into your system’s trusted keys. The developer signs the packages (generates a signature) with his/her private key. Since your Linux system has the public file, it understands that the package is actually coming from the trusted developer. + +A number of encrypted services use some sort of GPG implementation underneath without you realizing it. But it’s better to not go in to those details right now. + +Now that you are a bit familiar with the concept, let’s see how you can use GPG for encrypting a file and then use it to decrypt. + +### Encrypting and decrypting files with GPG + +![][4] + +This is a very simplistic scenario. I presume that you have just one system and you want to see how GPG works. You are not sending the files to other system. You encrypt the file and then decrypt it on the same system. + +Of course, this is not a practical use case but that’s also not the purpose of this tutorial. My aim is to get you acquainted with GPG commands and functioning. After that, you can use this knowledge in a real-world situation (if need be). And for that, I’ll show you how you can share your public key with others. + +#### Step 1: Installing GPG + +GPG can be found in most distribution’s repositories out of the box. + +On Debian and Ubuntu-based systems, install the gpg package: + +``` + + sudo apt install gpg + +``` + +If you use [Arch based distributions][5], install the gnupg package with the [pacman command][6]: + +``` + + sudo pacman -S gnupg + +``` + +#### Step 2: Generating a GPG key + +Generating a GPG key on your system is a simple one-command procedure. + +Just run the following command, and your key will be generated (you can use the defaults for most questions as shown in the underlined sections below): + +``` + + gpg --full-generate-key + +``` + +![Generating GPG keys][7] + +**Checking the GPG Key** + +You can then see that the private key and public key are both tied to each other by that ID shown under **pub** by using the **–list-secret-keys** and **–list-public-keys** commands respectively: + +![Listing GPG keys][8] + +#### Step 3: Encrypting a file with GPG + +Now that you’ve set up our GPG keys, you can start encrypting our files! + +Use the following command to encrypt files: + +``` + + gpg --encrypt --output file.gpg --recipient [email protected] file + +``` + +Let’s go over what that command does real quick: + +First you specified the **–encrypt** option. This simply tells GPG that we’ll be encrypting a file. + +Next, you specified **–output file.gpg**. This can be anything, though it’s typically the name of the file you’re encrypting plus a **.gpg** extension (so **message.txt** would become **message.txt.gpg**). + +Next, you type **–recipient [[email protected]][9]**. This specifies the email for a corresponding GPG key that actually doesn’t exist quite yet on this system. + +Still confused? + +The way this works is that the email you specify here must be tied to a public key on your local system. + +Typically, this is going to be from the public GPG key of a different person, which is what you’re going to encrypt your file with. After such, the file will only be able to be decrypted with that user’s private key. + +I’ll be using my previous GPG key with the **[[email protected]][9]** in this example. Thus, the logic would be that I am encrypting the file with the _public_ key of h**[[email protected]][9]**, which is then only going to be able to be decrypted with the _private_ key of **[[email protected]][9]**. + +You’d only have the public key if you were encrypting a file for someone else, but since you’re encrypting the file for yourself, you have both keys on your system. + +Lastly, you simply specify the file you’re going to encrypt. For this example, let’s use a file named **message.txt** with the following content: + +``` + + We're encrypting with GPG! + +``` + +![Sample text file][10] + +Likewise, if the email was **[[email protected]][9]**, the new GPG command would be as follows: + +``` + + gpg --encrypt --output message.txt.gpg --recipient [email protected] message.txt + +``` + +![Encrypting file with GPG][11] + +If you then try to read the file, you’ll see that it looks like gibberish. That is expected because the file is encrypted now: + +![Reading the encrypted file generates gibberish text][12] + +Let’s now delete the unencrypted message.txt file so that you can see that the message.txt.gpg file actually decrypts just fine without the original file: + +![][13] + +#### Step 4: Decrypting the encrypted file with GPG + +Lastly, let’s actually decrypt the encrypted message. You can do such using the following command: + +``` + + gpg --decrypt --output file file.gpg + +``` + +Going through the argument here, we first specify **–decrypt**, which tells GPG that you’re going to be decrypting a file. + +Next, you enter **–output** file, which simply tells GPG what file you’ll be saving the encrypted form of our file to after you decrypt it. + +Lastly, you enter **file.gpg**, which is just the path to your encrypted file. + +Following the example, the command I’d use would be as follows: + +``` + + gpg --decrypt --output message.txt message.txt.gpg + +``` + +![Decrypting file with GPG][14] + +And voila, you’re done! That’s all there is to it when you want to encrypt and decrypt files with GPG. + +The only other thing you may want to know is how to share your public keys with others so they can encrypt files before sending them to you. + +### Sending and receiving GPG Keys + +To send someone a GPG key, you’ll first need to export it from your **keychain**, which is what contains all of your public and private keys. + +To export a key, simply find the key ID in your keychain, and then run the following command, replacing `id` with the key’s ID and **key.gpg** with the name of the file you want to save to: + +``` + + gpg --output key.gpg --export id + +``` + +![Export GPG public key][15] + +To import a key, simply give the output file (from the previous command) to the other user and then have them run the following command: + +``` + + gpg --import key.gpg + +``` + +![][16] + +To use the key normally though, you’ll need to verify the key so GPG properly trusts it. + +This can be done by running the **–edit-key** command on the other user’s system, following by signing the key: + +First run `gpg --edit-key id`: + +![GPG edit key][17] + +Next, run the **fpr** command, which will show the fingerprint for the key. The output of this command should be validated against the output on your own machine, which can be found by running the same **–edit-key** command on your system: + +![Fingerprint of GPG key][18] + +If everything matches up, just run the **sign** command and everything will be ready to go: + +![Sign GPG key][19] + +That’s it! The other user can now start encrypting files with your public key just as you did earlier, ensuring they’ll only be readable by you when you decrypt them with your private key. + +And that’s all the basics to GPG! + +### Wrapping Up + +You’ve now gone over everything you need to start using GPG, including encrypting files for yourself and for others. As I mentioned earlier, this is just for understanding how GPG encryption and decryption process works. The basic GPG knowledge you just acquired can be taken to the next level when applied in real-world scenarios. + +Need some help figuring out something still, or something just not working right? Feel free to leave any of it in the comments below. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/gpg-encrypt-files-basic/ + +作者:[Hunter Wittenborn][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/hunter/ +[b]: https://github.com/lujun9972 +[1]: https://gnupg.org/ +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/GPG-encryption-explained.png?resize=800%2C300&ssl=1 +[3]: https://itsfoss.com/adding-external-repositories-ubuntu/ +[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/GPG-encryption-basic.png?resize=800%2C450&ssl=1 +[5]: https://itsfoss.com/arch-based-linux-distros/ +[6]: https://itsfoss.com/pacman-command/ +[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/gpg-key-generation.png?resize=676%2C663&ssl=1 +[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/gpg-list-keys-1.png?resize=703%2C379&ssl=1 +[9]: https://itsfoss.com/cdn-cgi/l/email-protection +[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/gpg-example-message.png?resize=665%2C277&ssl=1 +[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/gpg-example-message-encrypted-800x252.png?resize=800%2C252&ssl=1 +[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/gpg-example-message-encrypted-gibberish.png?resize=800%2C252&ssl=1 +[13]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/gpg-message-original-deleted.png?resize=800%2C252&ssl=1 +[14]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/gpg-message-decrypt.png?resize=800%2C252&ssl=1 +[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/gpg-key-export-800x218.png?resize=800%2C218&ssl=1 +[16]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/gpg-key-import.png?resize=800%2C221&ssl=1 +[17]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/gpg-edit-key-prompt.png?resize=800%2C351&ssl=1 +[18]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/gpg-edit-key-fingerprint-1.png?resize=800%2C317&ssl=1 +[19]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/gpg-edit-key-sign.png?resize=800%2C531&ssl=1 From 771ad8bedc2d2c260286f1f379bd5385c2782cec Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 11 Dec 2021 05:02:34 +0800 Subject: [PATCH 147/244] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211210=20?= =?UTF-8?q?Film=20compositing=20on=20Linux=20with=20Natron?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211210 Film compositing on Linux with Natron.md --- ...0 Film compositing on Linux with Natron.md | 183 ++++++++++++++++++ 1 file changed, 183 insertions(+) create mode 100644 sources/tech/20211210 Film compositing on Linux with Natron.md diff --git a/sources/tech/20211210 Film compositing on Linux with Natron.md b/sources/tech/20211210 Film compositing on Linux with Natron.md new file mode 100644 index 0000000000..f6393adc4d --- /dev/null +++ b/sources/tech/20211210 Film compositing on Linux with Natron.md @@ -0,0 +1,183 @@ +[#]: subject: "Film compositing on Linux with Natron" +[#]: via: "https://opensource.com/article/21/12/film-compositing-linux-natron" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Film compositing on Linux with Natron +====== +Natron is an application that brings professional compositing to open +source software users. +![An old-fashioned video camera][1] + +In film post-production, there's a phase called _compositing_, which puts the actual footage in a camera with footage generated purely by software. What that actually means to the compositing artist depends on the movie. Sometimes there are just a few overlays, other times there's some minor special effect like laser beams or explosions, sometimes it's a green screen, and still other times it's a little bit of everything. Most video editing applications can do basic compositing. Still, when your entire job is to bring different components together and make it look like they were in front of the camera _in real life_ at the time of the shooting, you need a dedicated application with some very specific tooling. Happily, the [film industry does a lot more with open source][2] and cross-studio collaboration than you might expect, and so some of the best tools to process digital images (including [OpenColorIO][3], [OpenEXR][4], [OpenFX][5], and more) have become ubiquitous. The compositing application [Natron][6] takes advantage of this open technology, plus the time-honored interface models of "noodles and nodes," to bring professional compositing to open source software users. + +Compositing is a big and complex job, but this article introduces you to the basics of what you need to know about the interface of Natron and some basic principles of compositing. After reading this, you won't be a pro, but you'll know where to begin. + +### Install Natron on Linux + +Natron is available on most Linux distributions from your package manager. On Fedora, Mageia, and similar distributions: + + +``` +`$ sudo dnf install natron` +``` + +On Elementary, Mint, and other Debian-based distributions: + + +``` +`$ sudo apt install natron` +``` + +However, I use Natron as a [Flatpak][7]. + +### Compositor interface + +Whether you're using Natron or a non-open compositor, the idea behind the compositing interface is generally the same: + + * You have a node graph area where you map out how the elements of your composition relate to one another. Each component of your composition is a _node_, and you connect them with flowchart-style arrows commonly called "noodles." By default, Natron includes a ready-to-use Viewer node in your initial node graph. + * There's a Properties panel on the right for you to control the attributes of each node. + * A viewer panel along the top of the window displays the current node in isolation by default. + + + +![Natron interface][8] + +(Seth Kenlon, [CC BY-SA 4.0][9]) + +### Importing and viewing components + +To composite an image, you need the components of what will make your image. As a simple example, start with some video and some overlay text. Of course, making text appear over video is a task you can do in any video editor, but starting simple demonstrates the workflow. + +First, right-click in the node graph panel, select the **Image** submenu and add a **Read** node. The read node reads a file from disk, so choose some video from your hard drive when prompted. After adding a video image to your project, you may notice that you can't actually _see_ your image except as a thumbnail in the node. You can't see your video because it is within the read node, and the read node isn't connected to a viewer yet. Connect your image to your viewer node by pulling the outgoing noodle from the read node and dropping it onto the viewer node. Click on the viewer node to make it active and your video image to appear in your viewer. + +Adding and using viewer nodes is something you'll often do when compositing. Not only do you need a viewer node to see your work, but you can have more than one viewer node so you can peek in at your work at different stages of your composition. You can add new viewer nodes from your right-click menu's **Image** submenu. + +![The viewer node in Natron][10] + +(Seth Kenlon, [CC BY-SA 4.0][9]) + +### Properties panel + +Each node in your node graph has an accompanying properties panel on the right of the Natron window. The read node's property panel lists the path of the file it's reading from the disk and displays the default settings of that footage (first frame, last frame, frame rate, colorspace, and so on.) All of these settings can be changed as needed. + +### Adding an overlay + +Next, right-click in the node graph panel, go to the **Draw** menu and select **Text**. This adds a text node to your graph, and it may or may not have connected it to anything. + +Here's a subtlety of Natron that's good to know. When you add a node to your graph while nothing is selected, you add a floating node connected to nothing. When you add a node with another node selected, Natron adds the node and connects it to the selected node. + +If your text node got connected between your image and viewer nodes, disconnect it. To disconnect nodes, grab the noodle connecting them (I find it easiest to grab the number or word in the middle of the noodle) and then "pull" it away by dragging your mouse swiftly to the right or left. It takes some practice to get used to the way noodles work, but you eventually get the hang of it. + +Connect the text node to your viewer node as a secondary input. This obscures the video image but lets you see what you're doing in the text node. Then highlight the text node, and look for its properties panel on the right. Type some text in the text field, choose a font you like, and adjust the position of the text by dragging the target symbol in the viewer panel. + +![Viewing a text node][11] + +(Seth Kenlon, [CC BY-SA 4.0][9]) + +### Merging the components + +You now have an image and some text, and you can see one but seemingly not both. The _compositing_ part of compositing largely happens through _merges_, which you do with literally a **Merge** node. Right-click the node graph panel, go to the **Merges** menu, and select **Merge**. + +This adds a new merge node to your graph. Click and drag the **A** noodle from the merge node to the text node and the **B** noodle to the read node. Connect the noodle at the bottom of the merge node to the viewer node. + +You've completed your very first composition. + +![Composited][12] + +(Seth Kenlon, [CC BY-SA 4.0][9]) + +What happens when you connect the text node to **B** and the read node to **A**? + +### Adding more nodes + +Now that you have your basic composite try some different nodes to see how they affect your images. The advantage of the noodle and node graph interface is that you have full control over the pipeline of effects. In a traditional video editor, effects are applied essentially as layers, and there are only two ways to stack layers—top down or bottom up, and both amount to the same thing. With a node graph, you have as many stacks as you need, and many nodes have more than just one or two inputs (and with merges, you always have as many inputs and outputs as you need.) + +If you have green screen footage lying around, try adding a **Chromakeyer** node from the **Keyer** submenu. If you have effect footage, try overlaying it on footage and using a **ColorCorrect** node to integrate it with your footage. + +There are many effects to experiment with within Natron, even without demo footage. Open source has pioneered much of the most advanced imaging software, and Natron benefits from this and takes full advantage of it. Not only does Natron offer the usual array of effects, like color balance, contrast, levels, threshold, saturation, and so on, but with the wildly popular [G'MIC][13] plugin, it offers hundreds of additional filters and effects. + +![G'MIC effects in Natron][14] + +(Seth Kenlon, [CC BY-SA 4.0][9]) + +As you add more and more nodes, you may find yourself running out of space in your node graph panel. There are a few conveniences to help with that: + + * With your mouse hovering over the node graph panel, press the **Spacebar** on your keyboard. This expands the current panel to take up the entire Natron window. This works for any panel. + * Middle-click and drag the node graph panel to move around your graph. + * Use the scroll wheel on your mouse to zoom in and out on your graph. + + + +### Exporting your work + +The default output for Natron is the industry standard EXR format, which produces a series of still images that, when put together flipbook-style, mimics motion. EXR is a great format with many options, including stereo imagery, huge colorspace, and important metadata, but it's a pretty hefty format for test footage. I tend to use PNG or even JPG while I work and then output to whatever format the next step in the pipeline requires. + +To render your composite, add a **Write** node from the **Image** submenu, and connect it to your last node that isn't a viewer. In this example, that's the merge node. + +![A Write node in Natron][15] + +(Seth Kenlon, [CC BY-SA 4.0][9]) + +When you add a write node, Natron prompts you for a path to where you want to save files. Because the usual output format of Natron is an image sequence rather than a movie file, you probably want to create a new directory for your output. And because it's a sequence, you can't provide a single file name, but you must provide a file name pattern. The magic syntax to produce file names such as 0001.png, 0002.png, 0003.png, and so on, is `%04d.png`, where the `4d` determines the number of total digits in the file name. You must have enough digits to fit all of your frames: if your project is 360 frames long, then you can't just provide `%02d` because there are three places in 360, so you need at least `%03d` as your pattern. + +Once you've determined where you will save your output files, and the pattern determines their names, click the **Save** button. + +In the properties panel of the write node, ensure that your write node correctly guessed your settings. At the bottom of the properties panel, there's a button providing libpng info, which confirms that Natron is set to output PNG files. You can render your whole project or, if you're just performing a spot test, you can set **Frame Range** to **Manual** and enter just 24 or 48 frames. For complex renders, it's important to do spot checks before committing to hours and hours of render cycles. + +![Write node properties panel][16] + +(Seth Kenlon, [CC BY-SA 4.0][9]) + +Click the **Render** button at the bottom of the write node's properties panel when you're ready. You can view your image sequence in an image sequence viewer like [DJV][17], or import it into Kdenlive, or convert it to a movie file with ffmpeg: + + +``` + + +$ ffmpeg -i %04d.png \ +-c:v vp9 \ +-an \ +-r 24 \ +out.webm + +``` + +### Compositing complexity + +Compositing means modifying motion pictures with filters and effects, integrating disparate assets into a cohesive image, masking out garbage, and combining pixels in new and interesting ways. It's a uniquely modern kind of art, and yet it has roots in the very beginnings of filmmaking (although it was done with light and chemicals, then.) Natron brings this kind of creativity and fun to open source users. Give it a try, and see what you can create. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/film-compositing-linux-natron + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/LIFE_film.png?itok=aElrLLrw (An old-fashioned video camera) +[2]: http://vfxplatform.com/ +[3]: https://opencolorio.org/ +[4]: https://www.openexr.com/ +[5]: http://openfx.org/ +[6]: https://natron.fr/ +[7]: https://opensource.com/article/21/11/install-flatpak-linux +[8]: https://opensource.com/sites/default/files/uploads/natron-ui-map.jpg (Natron interface) +[9]: https://creativecommons.org/licenses/by-sa/4.0/ +[10]: https://opensource.com/sites/default/files/uploads/natron-viewer.jpg (The viewer node in Natron) +[11]: https://opensource.com/sites/default/files/uploads/natron-text.jpg (Viewing a text node) +[12]: https://opensource.com/sites/default/files/uploads/natron-composite.jpg (Composited) +[13]: https://gmic.eu +[14]: https://opensource.com/sites/default/files/uploads/natron-gmic.jpg (G'MIC effects in Natron) +[15]: https://opensource.com/sites/default/files/uploads/natron-node-write.jpg (A Write node in Natron) +[16]: https://opensource.com/sites/default/files/uploads/natron-write.jpg (Write node properties panel) +[17]: https://darbyjohnston.github.io/DJV/ From b08d0b148dc7b79c709f4eb702f9fc88c160dacd Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 11 Dec 2021 05:02:44 +0800 Subject: [PATCH 148/244] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211210=20?= =?UTF-8?q?Reveal=20your=20source=20code=20with=20Jinja2=20and=20Git?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211210 Reveal your source code with Jinja2 and Git.md --- ...al your source code with Jinja2 and Git.md | 79 +++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 sources/tech/20211210 Reveal your source code with Jinja2 and Git.md diff --git a/sources/tech/20211210 Reveal your source code with Jinja2 and Git.md b/sources/tech/20211210 Reveal your source code with Jinja2 and Git.md new file mode 100644 index 0000000000..7b63ff53fc --- /dev/null +++ b/sources/tech/20211210 Reveal your source code with Jinja2 and Git.md @@ -0,0 +1,79 @@ +[#]: subject: "Reveal your source code with Jinja2 and Git" +[#]: via: "https://opensource.com/article/21/12/reveal-source-code-jinja2-git" +[#]: author: "Ayush Sharma https://opensource.com/users/ayushsharma" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Reveal your source code with Jinja2 and Git +====== +Here's how I keep my website open by linking every page back to its +original source. +![Text editor on a browser, in blue][1] + +I'm a huge fan of open source. + +One of the little ways I've supported the cause is by keeping my personal blog site open from the very beginning. I do this partly to let people see the history of changes behind each page. But I also do it because, when I started using [Jekyll][2], I didn't find many open source Jekyll blogs to learn from. My hope is that keeping my website open and exposing my trials and errors will save someone else a lot of time. + +### The Jekyll page.path variable + +One way I achieve that is by linking every entry I post back to its original [Markdown][3]. [Jekyll's helpful variables][4] have exactly the tool that's needed: the `page.path`. This variable contains the raw filesystem path of each page. The official description even highlights its usefulness for linking back to the source! + +Printing `{{ page.path }}` within an article's Markdown file outputs something similar to this: + + +``` +`_posts/2021-10-10-example.md` +``` + +Assume that the article's source code existed at this path: + + +``` +`https://example.com/ayushsharma-in/-/blob/master/_posts/2021-10-10-example.md` +``` + +If you prepend `https://example.com/ayushsharma-in/-/blob/master/` to any article's `page.path`, it generates a link back to its source code. + +In Jekyll, generating this full link looks like this: + + +``` +`View source` +``` + +It's that easy. + +### Jekyll and the open web + +The modern web is an intricate and multilayered technology, but that doesn't mean it has to obfuscate. With Jekyll's variables, you ensure that your users can, if they wish, learn more about how you built your site. + +You can see real-world examples on my [personal blog][5]: scroll to the bottom for the View Source link. + +* * * + +This article is adapted from [ayush sharma's notes][6] and is republished with permission. + +See how Jekyll, an open source generator of static HTML files, makes running a blog as easy as... + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/reveal-source-code-jinja2-git + +作者:[Ayush Sharma][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/ayushsharma +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_blue_text_editor_web.png?itok=lcf-m6N7 (Text editor on a browser, in blue) +[2]: https://opensource.com/article/21/9/build-website-jekyll +[3]: https://opensource.com/article/19/9/introduction-markdown +[4]: https://jekyllrb.com/docs/variables/#page-variables +[5]: https://www.ayushsharma.in +[6]: https://www.ayushsharma.in/2021/11/linking-jekyll-pages-back-to-their-git-source-code From cc579b38c6984700cb1fd497e10eb46790040acd Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 11 Dec 2021 08:40:17 +0800 Subject: [PATCH 149/244] PRF&PUB @MjSeven https://linux.cn/article-14071-1.html --- ...ectories on Linux with the find command.md | 43 ++++++++++--------- 1 file changed, 22 insertions(+), 21 deletions(-) rename {translated/tech => published}/20210909 Find files and directories on Linux with the find command.md (76%) diff --git a/translated/tech/20210909 Find files and directories on Linux with the find command.md b/published/20210909 Find files and directories on Linux with the find command.md similarity index 76% rename from translated/tech/20210909 Find files and directories on Linux with the find command.md rename to published/20210909 Find files and directories on Linux with the find command.md index 576697fddf..3cc6004e5e 100644 --- a/translated/tech/20210909 Find files and directories on Linux with the find command.md +++ b/published/20210909 Find files and directories on Linux with the find command.md @@ -3,29 +3,30 @@ [#]: author: "Seth Kenlon https://opensource.com/users/seth" [#]: collector: "lujun9972" [#]: translator: "MjSeven" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14071-1.html" 使用 find 命令在 Linux 上查找文件和目录 ======================================= -学习 find 命令的原因有很多,所以去下载我们免费的 find 备忘录吧,它可以帮助你了解更多有关 find 命令的信息。 -![Magnifying glass on code][1] +> 学习 find 命令的原因有很多。 -不管我决心如何组织文件,似乎总有无法找到文件的时候。有时是因为我不记得最初的文件名,其他时候,我知道名字,但我不记得在哪里保存它了。甚至有时我需要一个我最初就没有创建的文件。但是,无论遇到什么困难,我知道在 [POSIX 系统][2]上,总是有 `find` 命令可以帮助我。 +![](https://img.linux.net.cn/data/attachment/album/202112/11/083907eapzsopvcoc0ooro.jpg) + +不管我决心如何组织文件,似乎总有无法找到文件的时候。有时是因为我不记得最初的文件名,其他时候,我知道名字,但我不记得在哪里保存它了。甚至有时我需要一个我最初就没有创建的文件。但是,无论遇到什么困难,我知道在 [POSIX 系统][2] 上,总是有 `find` 命令可以帮助我。 ### 安装 find -`find` 命令由 [POSIX 规范][3]定义,它创建了一个开放的标准,用于衡量 POSIX 系统,包括 Linux、BSD 和 macOS。简而言之,只要你运行的是 Linux、BSD 或 macOS,那么 `find` 已经安装了。 +`find` 命令由 [POSIX 规范][3] 定义,它创建了一个用于衡量 POSIX 系统的开放标准,这包括 Linux、BSD 和 macOS。简而言之,只要你运行的是 Linux、BSD 或 macOS,那么 `find` 已经安装了。 但是,并非所有的 `find` 命令都完全相同。例如,GNU 的 `find` 命令有一些 BSD、Busybox 或 Solaris 上 `find` 命令可能没有或有但实现方式不同的功能。本文使用 [findutils][4] 包中的 GNU `find`,因为它很容易获得且非常流行。本文演示的大多数命令都适用于 `find` 的其他实现,但是如果你在 Linux 以外的平台上尝试命令并得到非预期结果,尝试下载并安装 GNU 版本。 ### 按名称查找文件 -你可以使用正则表达式使用完整或部分文件名或部分来定位文件。`find` 命令需要你想搜索目录的路径,指定搜索属性选项,例如,`-name` 表示区分大小写。然后是搜索字符串。默认情况下,搜索字符串按字面意思处理。除非你使用正则表达式语法,否则 `find` 命令搜索的文件名正是你在引号之间输入的字符串。 +你可以借助正则表达式使用完整或部分的文件名来定位文件。`find` 命令需要你给出想搜索的目录;指定搜索属性选项,例如,`-name` 用于指定区分大小写的文件名;然后是搜索字符串。默认情况下,搜索字符串按字面意思处理:除非你使用正则表达式语法,否则 `find` 命令搜索的文件名正是你在引号之间输入的字符串。 -假设你的 Documents 目录包含四个文件:`Foo`、`foo`、`foobar.txt` 和 `foo.xml`。以下是对 `foo` 的字面搜索: +假设你的 `Documents` 目录包含四个文件:`Foo`、`foo`、`foobar.txt` 和 `foo.xml`。以下是对 `foo` 的字面搜索: ``` $ find ~ -name "foo" @@ -60,11 +61,11 @@ $ find ~ -iname "foo*.???" /home/tux/Documents/examples/foobar.txt ``` -这不是正则表达式语法,因此 `.` 在示例中只表示文字点。 +这不是正则表达式语法,因此 `.` 在示例中只表示字母“点”。 ### 正则表达式 -你还可以使用正则表达式。与 `-iname` 和 `-name` 一样,也有区分大小写和不区分大小写的选项。但不一样的是,`-regex` 和 `-iregex` 搜索应用于整个路径,而不仅仅是文件名。这意味着,如果你搜索 `foo`,你不会得到任何结果,因为 `foo` 与 `/home/tux/Documents/foo` 不相等。相反,你必须搜索整个路径,或者在字符串的开头使用通配符序列: +你还可以使用正则表达式。与 `-iname` 和 `-name` 一样,也有区分大小写和不区分大小写的选项。但不一样的是,`-regex` 和 `-iregex` 搜索应用于整个路径,而不仅仅是文件名。这意味着,如果你搜索 `foo`,你不会得到任何结果,因为 `foo` 与 `/home/tux/Documents/foo` 不匹配。相反,你必须要么搜索整个路径,要么在字符串的开头使用通配符: ``` $ find ~ -iregex ".*foo" @@ -74,7 +75,7 @@ $ find ~ -iregex ".*foo" ### 查找近一周修改过的文件 -要查找近一周修改的文件,使用 `-mtime` 选项以及过去的天数: +要查找近一周修改的文件,使用 `-mtime` 选项以及过去的天数(负数): ``` $ find ~ -mtime -7 @@ -96,12 +97,12 @@ $ find ~ -mtime +1 -mtime -7 指定查找文件的类型来优化 `find` 的结果是很常见的。如果你不确定要查找的内容,则不应该使用此选项。但如果你知道要查找的是文件而不是目录,或者是目录而不是文件,那么这可能是一个很好的过滤器。选项是 `-type`,它的参数是代表不同类型数据的字母代码。最常见的是: -* `d` \- 文件夹 -* `f` \- 文件 -* `l` \- 链接文件 -* `s` \- 套接字 -* `p` \- 命名管道 (FIFO 使用) -* `b` \- 块设备 (通常是硬盘) +* `d` - 目录 +* `f` - 文件 +* `l` - 链接文件 +* `s` - 套接字 +* `p` - 命名管道(用于 FIFO) +* `b` - 块设备(通常是硬盘) 下面是一些例子: @@ -133,9 +134,9 @@ $ find /usr -mindepth 8 -iname "*xml" | wc -l 9255 ``` -### 下载备忘录 +### 下载速查表 -本文仅介绍 `find` 的基本功能,它是一个很好的搜索工具,但对于强大的 [Parallel][5] 命令来说,它也是一个非常有用的前端。学习 `find` 的原因有很多,所以**[下载我们免费的 `find` 备忘录][6]**吧,它可以帮助你了解有关该命令的更多信息。 +本文仅介绍 `find` 的基本功能,它是一个很好的搜索工具,但对于强大的 [Parallel][5] 命令来说,它也是一个非常有用的前端。学习 `find` 的原因有很多,所以 [下载我们免费的 `find` 速查表][6] 吧,它可以帮助你了解有关该命令的更多信息。 --- @@ -144,7 +145,7 @@ via: https://opensource.com/article/21/9/linux-find-command 作者:[Seth Kenlon][a] 选题:[lujun9972][b] 译者:[MjSeven](https://github.com/MjSeven) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 48e861193f6d71fafdd341e9bfdd5887d4ccea13 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 11 Dec 2021 09:04:03 +0800 Subject: [PATCH 150/244] PRF&PUB @geekpi https://linux.cn/article-14072-1.html --- ...in batches on Linux with SoundConverter.md | 42 ++++++++----------- 1 file changed, 18 insertions(+), 24 deletions(-) rename {translated/tech => published}/20211204 Convert audio in batches on Linux with SoundConverter.md (53%) diff --git a/translated/tech/20211204 Convert audio in batches on Linux with SoundConverter.md b/published/20211204 Convert audio in batches on Linux with SoundConverter.md similarity index 53% rename from translated/tech/20211204 Convert audio in batches on Linux with SoundConverter.md rename to published/20211204 Convert audio in batches on Linux with SoundConverter.md index 2bae5f9079..3e1a58e429 100644 --- a/translated/tech/20211204 Convert audio in batches on Linux with SoundConverter.md +++ b/published/20211204 Convert audio in batches on Linux with SoundConverter.md @@ -3,67 +3,61 @@ [#]: author: "Seth Kenlon https://opensource.com/users/seth" [#]: collector: "lujun9972" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14072-1.html" 在 Linux 上用 SoundConverter 分批转换音频 ====== -SoundConverter 是一个有用的应用,不仅因为它能做到它的名字所说的那样,而且因为它是分批和并行地做的。 -![radio communication signals][1] -有许多文件格式用于存储数字音频,它们适用于不同的目的。当然,数字音频只是声音的一种表现形式,是由解码器和一组扬声器将声波转化为声音的一种渲染。一些音频格式,一般被称为无损格式,旨在将音频编码接近其原始模拟形式。然而,在现实世界中有大量的数据,到目前为止,数字只能在非常大的文件中接近它。其他的音频格式,被称_有损_格式,在文件大小与声音的合理表现之间取得平衡。 +> SoundConverter 是一个有用的应用,它不仅能做到它的名字所说的那样,而且它是分批和并行地做的。 -有很多很好的终端命令用于音频转换。有 `sox` 和 `ffmpeg` 以及一些特定格式的编码器,如 `opusenc`、`flac`、`oggenc`、`fdkaac`、`wavpack` 和无数的其他编码器。 +![](https://img.linux.net.cn/data/attachment/album/202112/11/090248gqt2hwqtyft51qwh.jpg) + +有许多用于存储数字音频的文件格式,它们适用于不同的目的。当然,数字音频只是声音的一种表现形式,是一种声波的呈现,它由解码器和一组扬声器转化为声音。一些音频格式,一般被称为 无损lossless 格式,旨在将音频编码为接近其原始模拟形式。然而,在现实世界中有大量的数据,而迄今为止,数字形式只能对其进行近似处理,而且需要非常大的文件。其他的音频格式,被称 有损lossy 格式,可以在文件大小与声音的合理表现之间取得平衡。 + +有很多很好的终端命令可以用于音频转换:有 `sox` 和 `ffmpeg`,以及一些特定格式的编码器,如 `opusenc`、`flac`、`oggenc`、`fdkaac`、`wavpack` 和无数的其他编码器。 ### 在 Linux 上安装 SoundConverter SoundConverter 在大多数 Linux 发行版上都可以通过你的包管理器获得。在 Fedora、Mageia 和类似的发行版上: - ``` -`$ sudo dnf install kdenlive` +$ sudo dnf install kdenlive ``` 在 Elementary、Mint 和其他基于 Debian 的发行版上: - ``` -`$ sudo apt install kdenlive` +$ sudo apt install kdenlive ``` 然而,我使用使用 [Flatpak][2] 安装 SoundConverter。 ### 转换音频 -一旦你把音频编码成有损格式,你就丢失了数据。这些数据是否重要取决于其听众的耳朵。有些人听不出低比特率的 MP3 和全质量的 FLAC 文件之间的区别,即使那些能听出来的人,也常常注意不到 320kbps 的 Ogg Vorbis 播客和 128kbps 的 Ogg Vorbis 播客之间的区别。将音频从压缩格式转换为非压缩格式并不能恢复丢失的数据,但需要将音频从一种格式转换为另一种格式的情况并不少见。你可能想把文件上传到只接受特定格式的网站,或者你的移动设备可能只播放特定的格式,或者用电子邮件发送一个对你的主机来说太大的文件,或者你可能只是想节省硬盘上的空间。 +一旦你把音频编码成有损格式,你就丢失了数据。这些数据是否重要取决于其听众的耳朵。有些人听不出低比特率的 MP3 和全质量的 FLAC 文件之间的区别,即使那些能听出来的人,也常常注意不到 320kbps 的 Ogg Vorbis 播客和 128kbps 的 Ogg Vorbis 播客之间的区别。将音频从压缩格式转换为非压缩格式并不能恢复丢失的数据,但需要将音频从一种格式转换为另一种格式的情况并不少见。你可能想把文件上传到只接受特定格式的网站,或者你的移动设备可能只能播放特定的格式,或者用电子邮件发送一个对你的邮件主机来说太大的文件,或者你可能只是想节省硬盘上的空间。 SoundConverter 可以让你轻松地分批转换音频。要用 SoundConverter 转换音频: 1. 从你的应用或活动菜单中启动 SoundConverter。 - 2. 点击 SoundConverter 窗口左上角的**添加文件**按钮,并选择你要转换的文件。 - 3. 添加了文件后,点击窗口右上角的**偏好**按钮(齿轮图标),并选择你想转换的格式。你还可以设置文件命名规则、目标文件夹和其他选项。 - 4. 当你准备好了,点击左上角的**转换**按钮。 - - + 2. 点击 SoundConverter 窗口左上角的“添加文件Add Files”按钮,并选择你要转换的文件。 + 3. 添加了文件后,点击窗口右上角的“偏好Preferences”按钮(齿轮图标),并选择你想转换的格式。你还可以设置文件命名规则、目标文件夹和其他选项。 + 4. 当你准备好了,点击左上角的“转换Convert”按钮。 ![SoundConverter window][3] -(Seth Kenlon, [CC BY-SA 4.0][4]) - ### 并行处理 -SoundConverter 是一个有用的应用,不仅因为它完全做了它的名字所说的事情,而且因为它是分批和并行地做的。因为现代计算机不仅仅有一个 CPU 核心,把每个文件放在一个队列中逐一编码,是对能量和时间的浪费。SoundConverter 可以同时处理几个文件,并对它们进行编码,这意味着转换 12 个文件所需的时间和通常转换两个文件所需的时间是一样的,一个接一个。你可以用一个好的终端命令做同样的事情,但前提是你要了解如何[启动并行进程][5]。 +SoundConverter 是一个有用的应用,它不仅完全做了它的名字所说的事情,而且它是分批和并行地做的。因为现代计算机不仅仅有一个 CPU 核心,把每个文件放在一个队列中逐一编码,是对能源和时间的浪费。SoundConverter 可以同时处理几个文件,并对它们进行编码,这意味着转换 12 个文件所需的时间和通常一个接一个地转换两个文件所需的时间是一样的。你可以用一个好的终端命令做同样的事情,但前提是你要了解如何 [启动并行进程][5]。 ![SoundConverter preferences][6] -(Seth Kenlon, [CC BY-SA 4.0][4]) - 你也可以将立体声音频转换为单声道文件。这对播客和有声读物特别有用。这些通常由一个人从一个单一的位置(麦克风)说话组成,不需要空间位置感。事实上,将立体声文件减少到单声道,如果你只有一个耳塞,就能更容易听到音频,并将文件大小减半。 ### SoundConverter 的优势 -为音频提供不同的文件格式是一个很好的功能,但似乎每当我以一种格式保存音频时,我都不可避免地需要另一种格式。有几个很棒的 Linux 命令可以[转换音频文件][7],但有时你可能想要一个可以在桌面上打开并拖放文件的应用,于是有了 [SoundConverter][8]。SoundConverter 是一个简单的、用途单一的应用程序,它的作用和它的名字一样:把声音从一种格式转换为另一种格式。 +为音频提供不同的文件格式是一个很好的功能,但似乎每当我以一种格式保存音频时,我都不可避免地需要另一种格式。有几个很棒的 Linux 命令可以 [转换音频文件][7],但有时你可能想要一个可以在桌面上打开并拖放文件的应用,这就是 [SoundConverter][8] 的用场。SoundConverter 是一个简单的而用途单一的应用程序,它的作用和它的名字一样:把声音从一种格式转换为另一种格式。 -------------------------------------------------------------------------------- @@ -72,7 +66,7 @@ via: https://opensource.com/article/21/12/soundconverter-linux 作者:[Seth Kenlon][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 915cc0af66c11f462a73390b48d11a12e45fbc31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91?= Date: Sat, 11 Dec 2021 14:02:21 +0800 Subject: [PATCH 151/244] Translated --- ...10403 FreeDOS commands you need to know.md | 169 ------------------ ...10403 FreeDOS commands you need to know.md | 164 +++++++++++++++++ 2 files changed, 164 insertions(+), 169 deletions(-) delete mode 100644 sources/tech/20210403 FreeDOS commands you need to know.md create mode 100644 translated/tech/20210403 FreeDOS commands you need to know.md diff --git a/sources/tech/20210403 FreeDOS commands you need to know.md b/sources/tech/20210403 FreeDOS commands you need to know.md deleted file mode 100644 index 592d468544..0000000000 --- a/sources/tech/20210403 FreeDOS commands you need to know.md +++ /dev/null @@ -1,169 +0,0 @@ -[#]: subject: (FreeDOS commands you need to know) -[#]: via: (https://opensource.com/article/21/4/freedos-commands) -[#]: author: (Kevin O'Brien https://opensource.com/users/ahuka) -[#]: collector: (lujun9972) -[#]: translator: (robsean) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -FreeDOS commands you need to know -====== -Learn how to make, remove, copy, and do other things with directories -and files in FreeDOS. -![woman on laptop sitting at the window][1] - -[FreeDOS][2], the open source implementation of DOS, provides a lightweight operating system for running legacy applications on modern hardware (or in an emulator) and for updating hardware vendor fails with a Linux-compatible firmware flasher. Getting familiar with FreeDOS is not only a fun throwback to the computing days of the past, it's an investment into gaining useful computing skills. In this article, I'll look at some of the essential commands you need to know to work on a FreeDOS system. - -### Essential directory and file commands - -FreeDOS uses directories to organize files on a hard drive. That means you need to use directory commands to create a structure to store your files and find the files you've stored there. The commands you need to manage your directory structure are relatively few: - - * `MD` (or `MKDIR`) creates a new directory or subdirectory. - * `RD` (or `RMDIR`) removes (or deletes) a directory or subdirectory. - * `CD` (or `CHDIR`) changes from the current working directory to another directory. - * `DELTREE` erases a directory, including any files or subdirectories it contains. - * `DIR` lists the contents of the current working directory. - - - -Because working with directories is central to what FreeDOS does, all of these (except DELTREE) are internal commands contained within COMMAND.COM. Therefore, they are loaded into RAM and ready for use whenever you boot (even from a boot disk). The first three commands have two versions: a two-letter short name and a long name. There is no difference in practice, so I'll use the short form in this article. - -### Make a directory with MD - -FreeDOS's `MD` command creates a new directory or subdirectory. (Actually, since the _root_ is the main directory, all directories are technically subdirectories, so I'll refer to _subdirectories_ in all examples.) An optional argument is the path to the directory you want to create, but if no path is included, the subdirectory is created in the current working subdirectory. - -For example, to create a subdirectory called `letters` in your current location: - - -``` -`C:\HOME\>MD LETTERS` -``` - -This creates the subdirectory `C:\letters`. - -By including a path, you can create a subdirectory anywhere: - - -``` -`C:\>MD C:\HOME\LETTERS\LOVE` -``` - -This has the same result as moving into `C:\HOME\LETTERS` first and then creating a subdirectory there: - - -``` -C:\CD HOME\LETTERS -C:\HOME\LETTERS\>MD LOVE -C:\HOME\LETTERS\>DIR -LOVE -``` - -A path specification cannot exceed 63 characters, including backslashes. - -### Remove a directory with RD - -FreeDOS's `RD` command removes a subdirectory. The subdirectory must be empty. If it contains files or other subdirectories, you get an error message. This has an optional path argument with the same syntax as `MD`. - -You cannot remove your current working subdirectory. To do that, you must `CD` to the parent subdirectory and then remove the undesired subdirectory. - -### Delete files and directories with DELTREE - -The `RD` command can be a little confusing because of safeguards FreeDOS builds into the command. That you cannot delete a subdirectory that has contents, for instance, is a safety measure. `DELTREE` is the solution. - -`DELTREE` deletes an entire subdirectory "tree" (a subdirectory), plus all of the files it contains, plus all of the subdirectories those contain, and all of the files _they_ contain, and so on, all in one easy command. Sometimes it can be a little _too_ easy because it can wipe out so much data so quickly. It ignores file attributes, so you can wipe out hidden, read-only, and system files without knowing it. - -You can even wipe out multiple trees by specifying them in the command. This would wipe out both of these subdirectories in one command: - - -``` -`C:\>DELTREE C:\FOO C:\BAR` -``` - -This is one of those commands where you really ought to think twice before you use it. It has its place, definitely. I can still remember how tedious it was to go into each subdirectory, delete the individual files, check each subdirectory for contents, delete each subdirectory one at a time, then jump up one level and repeat the process. `DELTREE` is a great timesaver when you need it. But I would never use it for ordinary maintenance because one false move can do so much damage. - -### Format a hard drive - -The `FORMAT` command can also be used to prepare a blank hard drive to have files written to it. This formats the `D:` drive: - - -``` -`C:\>FORMAT D:` -``` - -### Copy files - -The `COPY` command, as the name implies, copies files from one place to another. The required arguments are the file to be copied and the path and file to copy it to. Switches include: - - * `/Y` prevents a prompt when a file is being overwritten. - * `/-Y` requires a prompt when a file is being overwritten. - * `/V` verifies the contents of the copy. - - - -This copies the file `MYFILE.TXT` from the working directory on `C:` to the root directory of the `D:` drive and renames it `EXAMPLE.TXT`: - - -``` -`C:\>COPY MYFILE.TXT D:\EXAMPLE.TXT` -``` - -This copies the file `EXAMPLE.TXT` from the working directory on `C:` to the `C:\DOCS\` directory and then verifies the contents of the file to ensure that the copy is complete: - - -``` -`C:\>COPY EXAMPLE.TXT C:\DOCS\EXAMPLE.TXT /V` -``` - -You can also use the `COPY` command to combine and append files. This combines the two files `MYFILE1.TXT` and `MYFILE2.TXT` and places them in a new file called `MYFILE3.TXT`: - - -``` -`C:\>COPY MYFILE1.TXT+MYFILE2.TXT MYFILE3.TXT` -``` - -### Copy directories with XCOPY - -The `XCOPY` command copies entire directories, along with all of their subdirectories and all of the files contained in those subdirectories. Arguments are the files and path to be copied and the destination to copy them to. Important switches are: - - * `/S` copies all files in the current directory and any subdirectory within it. - * `/E` copies subdirectories, even if they are empty. This option must be used with the `/S` option. - * `/V` verifies the copies that were made. - - - -This is a very powerful and useful command, particularly for backing up directories or an entire hard drive. - -This command copies the entire contents of the directory `C:\DOCS`, including all subdirectories and their contents (except empty subdirectories) and places them on drive `D:` in the directory `D:\BACKUP\DOCS\`: - - -``` -`C:\>XCOPY C:\DOCS D:\BACKUP\DOCS\ /S` -``` - -### Using FreeDOS - -FreeDOS is a fun, lightweight, open source operating system. It provides lots of great utilities to enable you to get work done on it, whether you're using it to update the firmware of your motherboard or to give new life to an old computer. Learn the basics of FreeDOS. You might be surprised at how versatile it is. - -* * * - -_Some of the information in this article was previously published in [DOS lesson 8: Format; copy; diskcopy; Xcopy][3]; [DOS lesson 10: Directory commands][4] (both CC BY-SA 4.0); and [How to work with DOS][5]._ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/4/freedos-commands - -作者:[Kevin O'Brien][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/ahuka -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/lenovo-thinkpad-laptop-window-focus.png?itok=g0xPm2kD (young woman working on a laptop) -[2]: https://www.freedos.org/ -[3]: https://www.ahuka.com/dos-lessons-for-self-study-purposes/dos-lesson-8-format-copy-diskcopy-xcopy/ -[4]: https://www.ahuka.com/dos-lessons-for-self-study-purposes/dos-lesson-10-directory-commands/ -[5]: https://allaboutdosdirectoires.blogspot.com/ diff --git a/translated/tech/20210403 FreeDOS commands you need to know.md b/translated/tech/20210403 FreeDOS commands you need to know.md new file mode 100644 index 0000000000..b61a8aa4c8 --- /dev/null +++ b/translated/tech/20210403 FreeDOS commands you need to know.md @@ -0,0 +1,164 @@ +[#]: subject: (FreeDOS commands you need to know) +[#]: via: (https://opensource.com/article/21/4/freedos-commands) +[#]: author: (Kevin O'Brien https://opensource.com/users/ahuka) +[#]: collector: (lujun9972) +[#]: translator: (robsean) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +你需要知道的 FreeDOS 命令 +====== +学习如何在 FreeDOS 中制作,移除,复制,或执行其它的目录和文件作业。 +![woman on laptop sitting at the window][1] + +[FreeDOS][2], DOS 的开放源文件的实现, 提供一个轻量级的操作系统,在现代硬件 (或在一个模拟器) 上用于运行历史遗留下来的应用程序,硬件供应商用于更新不兼容 Linux 的固件闪存。熟悉 FreeDOS 不仅是一种旧计算机时代的有趣考古,也是一种获取有用的计算机技能的投资。在这篇文章中,我将查看一些在 FreeDOS 系统上工作的所需要知道的必不可少的命令。 + +### 必不可少的命令和文件命令 + +FreeDOS 在一个硬盘驱动器上使用目录来组织文件。这意味着你需要使用目录命令来创建一个结构,用于存储和查找你在其中存储的文件。你所需要的用于管理目录结构的命令: + + * `MD` (或 `MKDIR`) 创建一个新的目录或子目录。 + * `RD` (或 `RMDIR`) 移除 (或删除) 一个目录或子目录。 + * `CD` (或 `CHDIR`) 从当前工作目录更改到另一个命令。 + * `DELTREE` 擦除一个目录,包括其包含的任意文件或子目录。 + * `DIR` 列出当前工作目录的内容。 + + + +因为使用目录是 FreeDOS 的主要工作,所有的这些命令 (除 DELTREE 以外) 是包含在 COMMAND.COM 中的内部命令。因此,它们将被加载到 RAM 之中,并在你启动 (甚至从一个启动盘启动) 时随时可用。前三个命令有两个版本:一个版本是两个字母的短名,一个版本是长名。在实践中没有区别,因此,我将在这篇文章中使用短名。 + +### 使用 MD 制作一个目录 + +FreeDOS 的 `MD` 命令会创建一个新的目录或子目录。(实际上,由于 _root_ 是主要的目录,从技术上将,所有的目录都是子目录,因此,我更喜欢在所有的示例中使用 _子目录_ )。一个可选的参数是你所想要创建目录的路径,但是如果不包含路径,将在当前工作子目录中创建子目录。 + +例如,为在你的当前位置创建一个名称为 `letters` 的子目录: + + +``` +`C:\HOME\>MD LETTERS` +``` + +这会创建子目录 `C:\letters` 。 + +通过包含一个路径,你可以在任意位置创建一个子目录: + + +``` +`C:\>MD C:\HOME\LETTERS\LOVE` +``` + +这和先移动到 `C:\HOME\LETTERS` ,然后在其中创建一个子目录的结果相同: + + +``` +C:\CD HOME\LETTERS +C:\HOME\LETTERS\>MD LOVE +C:\HOME\LETTERS\>DIR +LOVE +``` + +一次的路径描述不能超过 63 个字符,包括反斜杠。 + +### 使用 RD 移除一个目录 + +FreeDOS 的 `RD` 命令会移除一个子目录。这个子目录必需是空的。如果它包含文件或其它是子目录,你将会得到错误信息。这有一个可选的路径参数,语法与 `MD` 的相同。 + +你不能移除你的当前工作子目录。为移除此目录,你必需 `CD` 其父目录,然后再移除不需要的子目录。 + +### 使用 DELTREE 删除文件和目录 + +`RD` 命令可能会让人有点迷糊,因为在该命令中内置了保护 FreeDOS 的措施。例如,你不能删除一个包含内容的子目录是一种安全措施。`DELTREE` 是一中解决方案。 + +`DELTREE` 命令会删除整个子目录 "树" (一个子目录),加上其包含的所有的文件,加上其包含的所有的子目录及其包含的所有的文件等等,上述的一切都在一个简单的目录中完成。有时,它可能有点 _太_ 容易了,因为它可以如此快速地擦除数据。它是忽略文件属性的,因此你可以擦除隐藏的,只读的,和未知的系统文件。 + +你甚至可以在命令中具体指定多个目录树来擦除它们。这条命令将在一个命令中擦除这两个目录中的所有子目录: + + +``` +`C:\>DELTREE C:\FOO C:\BAR` +``` + +这是这些命令中的其中一个命令,在你使用它前,你真得需要再三考虑。毫无疑问,它是有它的地位的。我仍然对转到每个子目录,删除个别的文件,检查每个子目录的内容,一次删除一个子目录, 然后再跳转到上一层目录,重复上述过程的乏味而记忆犹新。`DELTREE` 在你需要时是非常省时。但是我从不会将其用于日常维护,因为一此失误都能造成重大的损失。 + +### 格式化一个硬盘驱动器 + +`FORMAT` 命令也可以用于准备一个空白的硬盘驱动器来将文件写入其中。这将格式化 `D:` 驱动器: + + +``` +`C:\>FORMAT D:` +``` + +### 复制文件 + +`COPY` 命令,顾名思义,将文件从一个位置复制到另一个位置。所需要的参数是:将要被复制的文件、路径、要将其复制到的文件。开关选项包含: + + * `/Y` 当一个文件正在被覆盖时,防止出现一个提示。 + * `/-Y` 当一个文件正在被覆盖时,需要出现一个提示。 + * `/V` 验证副本的内容。 + + + +这将从 `C:` 上的工作目录中复制文件 `MYFILE.TXT` 到 `D:` 驱动器的根目录,并将其重命名为 `EXAMPLE.TXT` : + + +``` +`C:\>COPY MYFILE.TXT D:\EXAMPLE.TXT` +``` + +这将从 `C:` 上的工作目录中复制文件 `EXAMPLE.TXT` 到 `C:\DOCS\` 目录,接下来验证文件的内容来确保副本是完整的: + + +``` +`C:\>COPY EXAMPLE.TXT C:\DOCS\EXAMPLE.TXT /V` +``` + +你也可以使用 `COPY` 命名来合并和追加文件。这个命令将合并两个文件 `MYFILE1.TXT` 和 `MYFILE2.TXT` ,并将其放置到一个新的名称为 `MYFILE3.TXT` 的文件之中: + + +``` +`C:\>COPY MYFILE1.TXT+MYFILE2.TXT MYFILE3.TXT` +``` + +### 使用 XCOPY 复制目录 + +`XCOPY` 命令将复制整个目录以及它们的所有的子目录和这些子目录中包含的所有的文件。参数是将要复制的文件和其路径,以及将要复制到的目的地。重要的开关选项是: + + * `/S` 复制当前目录及其任意子目录中的所有文件。 + * `/E` 复制子目录,即使它们是空的。这个选项必须和 `/S` 一起使用。 + * `/V` 验证其所制作的副本。 + + + +这是一个非常强大和有用的命令,尤其是用于备份目录或整个硬盘驱动器。 + +这个命令将复制目录 `C:\DOCS` 的全部内容,包括所有的子目录及其内容 (除了空的子目录以外) ,并将其放置到驱动器 `D:` 的目录 `D:\BACKUP\DOCS\` 之中: + + +``` +`C:\>XCOPY C:\DOCS D:\BACKUP\DOCS\ /S` +``` + +### 使用 FreeDOS + +FreeDOS 是一个有趣的,轻量的,开放源文件的操作系统。不管你正在使用它来更新你的主板的固件,还是给予旧计算机新生,它都能提供很多极好的实用程序,来使你能够很好地使用它工作。学习 FreeDOS 的基本知识。你都可能会被它的多才多艺所惊讶。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/freedos-commands + +作者:[Kevin O'Brien][a] +选题:[lujun9972][b] +译者:[robsean](https://github.com/robsean) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/ahuka +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/lenovo-thinkpad-laptop-window-focus.png?itok=g0xPm2kD (young woman working on a laptop) +[2]: https://www.freedos.org/ +[3]: https://www.ahuka.com/dos-lessons-for-self-study-purposes/dos-lesson-8-format-copy-diskcopy-xcopy/ +[4]: https://www.ahuka.com/dos-lessons-for-self-study-purposes/dos-lesson-10-directory-commands/ +[5]: https://allaboutdosdirectoires.blogspot.com/ From 6a5ff2e964c82f56f5b57c499b59922e940a7c40 Mon Sep 17 00:00:00 2001 From: MjSeven Date: Sat, 11 Dec 2021 14:42:19 +0800 Subject: [PATCH 152/244] Translating --- ...15 A guide to web scraping in Python using Beautiful Soup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210915 A guide to web scraping in Python using Beautiful Soup.md b/sources/tech/20210915 A guide to web scraping in Python using Beautiful Soup.md index 0e46713039..1b15b5d348 100644 --- a/sources/tech/20210915 A guide to web scraping in Python using Beautiful Soup.md +++ b/sources/tech/20210915 A guide to web scraping in Python using Beautiful Soup.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/21/9/web-scraping-python-beautiful-soup" [#]: author: "Ayush Sharma https://opensource.com/users/ayushsharma" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "MjSeven" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From cef95770c352b9b5a8b014fecc434e044ae363a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91?= Date: Sat, 11 Dec 2021 15:50:32 +0800 Subject: [PATCH 153/244] Translated --- ...0210603 FreeDOS commands for Linux fans.md | 189 ------------------ ...0210603 FreeDOS commands for Linux fans.md | 188 +++++++++++++++++ 2 files changed, 188 insertions(+), 189 deletions(-) delete mode 100644 sources/tech/20210603 FreeDOS commands for Linux fans.md create mode 100644 translated/tech/20210603 FreeDOS commands for Linux fans.md diff --git a/sources/tech/20210603 FreeDOS commands for Linux fans.md b/sources/tech/20210603 FreeDOS commands for Linux fans.md deleted file mode 100644 index ad3d509fc1..0000000000 --- a/sources/tech/20210603 FreeDOS commands for Linux fans.md +++ /dev/null @@ -1,189 +0,0 @@ -[#]: subject: (FreeDOS commands for Linux fans) -[#]: via: (https://opensource.com/article/21/6/freedos-linux-users) -[#]: author: (Jim Hall https://opensource.com/users/jim-hall) -[#]: collector: (lujun9972) -[#]: translator: (robsean) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -FreeDOS commands for Linux fans -====== -If you're already familiar with the Linux command line, try these -commands to help ease into FreeDOS. -![FreeDOS fish logo and command prompt on computer][1] - -If you've tried FreeDOS, you might have been stymied by the command line. The DOS commands are slightly different from how you might use the Linux command line, so getting around on the command line requires learning a few new commands. - -But it doesn't have to be an "all new" experience for Linux users. We've always included some standard Unix commands in FreeDOS, in addition to the DOS commands that are already similar to Linux. So if you're already familiar with the Linux command line, try these commands to help ease into FreeDOS: - -### Getting Around - -Use the `cd` command to _change directory_ in the FreeDOS filesystem. The usage is basically the same on FreeDOS as it is on Linux. To change into a subdirectory called `apps`, type `cd apps`. To go back to the previous directory, type `cd ..`. - -The only difference when navigating through directories and paths is that on FreeDOS, the directory separator is `\` ("backslash") instead of `/` ("forward slash") that you use on Linux. For example, let's say you were in the `\devel` directory and you wanted to move to the `\fdos` directory. Both of those are at the same "level" relative to the _root_ directory. So you could type `cd ..\fdos` to "back up" one directory level (with `..`) and then "go into" the `fdos` directory. - -To change to a new directory, you could instead give the full path with the leading backslash. This is handy if you are already deep into another path, and just want to switch immediately to the new location. For example, to change to the `\temp` directory, you can type `cd \temp`. -  - - -``` -C:\>cd apps -C:\APPS>cd .. -C:\>cd devel -C:\DEVEL>cd ..\fdos -C:\FDOS>cd \temp -C:\TEMP>_ -``` - -In FreeDOS, like most DOS systems, you can see your current path as part of the DOS prompt. On Linux, your prompt is probably something like `$`. On FreeDOS, the prompt lists the current drive, the current path within that drive, then `>` as the prompt (taking the place of `$` on Linux). - -### Listing and Displaying Files - -On Linux, the standard command to list files in the current directory is the `ls` command. On FreeDOS, it's a different command: `dir`. But you can get a similar behavior as `ls` by creating an _alias_. - -To create an alias to another command, use the built-in `alias` command. For example, use this command to define an alias for `ls` that will display a directory listing in a similar way to using `ls` on Linux: -  - - -``` -C:\>alias ls=dir /one /w /b /l -C:\>ls -[apps]    command.com   [devel]  fdauto.bat   fdconfig.sys -[fdos]    kernel.sys    [src]    [temp] -C:\> -``` - -The command option format is slightly different on FreeDOS than on Linux. On Linux, you start options with a hyphen character (`-`). But on FreeDOS, options start with a forward slash. The `alias` command above uses the slash character—those are options to `dir`. The `/one` option tells `dir` to order (o) in a certain way: sort any files and directories by name (n) and then by extension (e). Using `/w` says to use a "wide" directory listing, `/b` uses a "bare" display without the other information `dir` usually provides, and `/l` instructs `dir` to display files and directories in lowercase. - -Note that the command-line options for the FreeDOS `dir` command are quite different from the options to Linux `ls`, so you can't use this `ls` alias exactly like you would on Linux. For example, typing `ls -l` with this alias on FreeDOS will result in a "File not found" error, because the underlying FreeDOS `dir` command will be unable to find a file called `-l`. But for basic "see what files I have on my system," this `ls` alias is good enough to help Linux users get started with FreeDOS. - -Similarly, you can create an alias for the FreeDOS `type` command, to act like the Linux `cat` command. Both programs display the contents of a text file. While `type` doesn't support the command-line options you might use under Linux, the basic usage to display a single file will be the same. - - -``` -C:\FDOS>alias cat=type -C:\FDOS>cat version.fdi -PLATFORM=FreeDOS -VERSION=1.3-RC4 -RELEASE=2021-04-30 -C:\FDOS> -``` - -### Other Unix-like Commands - -FreeDOS includes a selection of other common Unix-like commands, so Linux users will feel more at home. To use these Linux commands on FreeDOS, you may need to install the **Unix Like Tools** package from the **FreeDOS Installer - My Package List Editor Software** (FDIMPLES) package manager. - -![Installing the Unix-like package set][2] - -Jim Hall, CC-BY SA 4.0 - -Not all of the Unix-like utilities work _exactly_ like their Linux counterparts. That's why we call them _Unix-like_. You might want to check the compatibility if you're using some esoteric command-line options, but typical usage should be fine. Start with these common Unix-like commands on FreeDOS: - -The `cal` command is the standard Unix calendar program. For example, to display the calendar for the current month, just type `cal`. To view a specific month, give the month and year as arguments: - - -``` -C:\>cal 6 1994 - -      June 1994     -Su Mo Tu We Th Fr Sa -          1  2  3  4 - 5  6  7  8  9 10 11 -12 13 14 15 16 17 18 -19 20 21 22 23 24 25 -26 27 28 29 30       -``` - -View your disk usage with the `du` command. This is a simple version of the Linux _disk usage_ command and doesn't support any command-line options other than a path. - - -``` -C:\>du -s apps -usage: du (start path) -C:\>du apps -    158784 C:\APPS\FED -         0 C:\APPS -Total from C:\APPS is 158784 -C:\> -``` - -The `head` command displays the first few lines of a file. For example, this is a handy way to determine if a file contains the correct data. - - -``` -C:\>head fdauto.bat -@ECHO OFF -set DOSDIR=C"\FDOS -set LANG=EN -set TZ=UTC -set PATH=%dosdir%\BIN -if exist %dosdir%\LINKS\NUL set PATH=%path%;%dosdir%\LINKS -set NLSPATH=%dosdir%\NLS -set HELPPATH=%dosdir%\HELP -set TEMP=%dosdir%\TEMP -set TMP=%TEMP% -C:\> -``` - -To view an entire file, use the `more` command, the default file viewer on FreeDOS. This displays a file one screenful at a time, then prints a prompt to press a key before displaying the next screenful of information. The `more` command is a very simple file viewer; for a more full-featured viewer like you might use on Linux, try the `less` command. The `less` command provides the ability to scroll "backwards" through a file, in case you missed something. You can also search for specific text. - - -``` -C:\>less fdauto.bat -@ECHO OFF -set DOSDIR=C"\FDOS -set LANG=EN -set TZ=UTC -set PATH=%dosdir%\BIN -if exist %dosdir%\LINKS\NUL set PATH=%path%;%dosdir%\LINKS -set NLSPATH=%dosdir%\NLS -set HELPPATH=%dosdir%\HELP -set TEMP=%dosdir%\TEMP -set TMP=%TEMP% -[...] -``` - -If you have a lot of directories in your program path variable (`PATH`) and aren't sure where a certain program is running from, you can use the `which` command. This scans the program path variable, and prints the full location of the program you are looking for. - - -``` -C:\>which less -less    C:\>FDOS\BIN\LESS.EXE -C:\>_ -``` - -FreeDOS 1.3 RC4 includes other Unix-like commands that you might use in other, more specific situations. These include:  - - * **bc**: Arbitrary precision numeric processing language - * **sed**: Stream editor - * **grep** and **xgrep**: Search a text file using regular expression - * **md5sum**: Generate an MD5 signature of a file - * **nro**: Simple typesetting using nroff macros - * **sleep**: Pause the system for a few seconds - * **tee**: Save a copy of a command-line stream - * **touch**: Modify a file's timestamp - * **trch**: Translate single characters (like Linux tr) - * **uptime**: Report how long your FreeDOS system has been running - - - -### FreeDOS at your command - -FreeDOS, like Linux and BSD, is open source. Whether you want to challenge yourself by learning a new style of command-line interaction, or you want to fall back on the comfort of familiar Unix-like tools, FreeDOS is a fun and fresh operating system to explore. Give it a try! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/6/freedos-linux-users - -作者:[Jim Hall][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/jim-hall -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/freedos-fish-laptop-color.png?itok=vfv_Lpph (FreeDOS fish logo and command prompt on computer) -[2]: https://opensource.com/sites/default/files/uploads/unix-like.png (Installing the Unix-like package set) diff --git a/translated/tech/20210603 FreeDOS commands for Linux fans.md b/translated/tech/20210603 FreeDOS commands for Linux fans.md new file mode 100644 index 0000000000..025ab91f15 --- /dev/null +++ b/translated/tech/20210603 FreeDOS commands for Linux fans.md @@ -0,0 +1,188 @@ +[#]: subject: (FreeDOS commands for Linux fans) +[#]: via: (https://opensource.com/article/21/6/freedos-linux-users) +[#]: author: (Jim Hall https://opensource.com/users/jim-hall) +[#]: collector: (lujun9972) +[#]: translator: (robsean) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +为 Linux 粉丝准备的 FreeDOS 命令 +====== +如果你已经熟悉了 Linux 命令行,尝试这些命令有助于轻松地进入 FreeDOS 。 +![FreeDOS fish logo and command prompt on computer][1] + +如果你已经尝试过 FreeDOS ,你可能已经被命令行所吓倒。DOS 命令可能稍微不同于你所使用的 Linux 命令行,因此,在命令行上四周走走需要学习一些新的命令。 + +但是对于 Linux 用户来说,它不是一种 "全新的" 体验。在 FreeDOS 中,除了已经类似于 Linux 命令行的DOS 命令之外,我们还包含一些标准的 Unix 命令。因此,如果你已经熟悉了 Linux 命令行,尝试这些命令有助于轻松地进入 FreeDOS : + +### 在四周走走 + +在 FreeDOS 文件系统中使用 `cd` 命令来 _更改目录_ 。在 FreeDOS 上的用法在 Linux 上的用法基本相同。为更改到一个名称为  `apps` 的子目录,输入 `cd apps` 。为回到先前的目录,输入 `cd ..` 。 + +在 FreeDOS 上导航浏览目录和路径是仅有不同点,目录分隔符是 `\` ("反斜杠") 而不是你在 linux 上使用的 `/` ("正斜杠") 。例如,让我们假设你在 `\devel` 目录之中,你想移动到 `\fdos` 目录。这两个目录相对于 _根_ 目录而言是处于相同的 "层次" 之中的。因此,你可以输入 `cd ..\fdos` 来 "向后返回" 一个目录层次 (使用 `..`) ,然后再 "转到" `fdos` 目录。 + +为更改到一个新的目录,你可以使用先前提到的反斜杠来替换需要给出的完整的路径。如果你已经深入了另外一个路径之中,并且只是像立即切换到新的位置,那么这会是非常方便的。例如,为更改到 `\temp` 目录,你可以输入 `cd \temp` 。 +  + + +``` +C:\>cd apps +C:\APPS>cd .. +C:\>cd devel +C:\DEVEL>cd ..\fdos +C:\FDOS>cd \temp +C:\TEMP>_ +``` + +在 FreeDOS 中,像大多数的 DOS 系统一样,你可以在DOS 提示符中看到你的当前路径。在 Linux 上,你的提示符可能类似于 `$` 。在 FreeDOS 上,提示符会列出当前的驱动器及其当前的路径,接下来使用 `>` 作为提示符 (在 Linux 上使用 `$` ) 。 + +### 列出和显示文件 + +在 Linux 上,列出当前目录中文件的标准命令是 `ls` 命令。在 FreeDOS ,它是一个不同的命令: `dir` 。但是你可以创建一个 _别名_ 来获取一种与 `ls` 类似的行为。 + +要为另外一个命令创建一个别名,使用内置的 `alias` 命令。例如,使用此命令来为 `ls` 定义一个别名,这个别名将显示一个目录列表,与在 Linux 上使用 `ls`类似: +  + + +``` +C:\>alias ls=dir /one /w /b /l +C:\>ls +[apps]    command.com   [devel]  fdauto.bat   fdconfig.sys +[fdos]    kernel.sys    [src]    [temp] +C:\> +``` + +在 FreeDOS 上的命令选项格式与 Linux 稍微不同。在 Linux 上, 你使用一个连字符号 (`-`) 开始可选择项。但是在 FreeDOS 上,你使用一个正斜杠来开始可选择项。上面的 `alias` 命令使用斜杆字符—它们是 `dir` 的可选择项。`/one` 可选择项告诉 `dir` 以某种方式排序 (o):先按名称 (n) 再按扩展名 (e) 来排序一些文件和目录。`/w` 使用一个 "宽" 目录列表,`/b` 使用一种不带有 `dir` 通常提供的其它信息的 "裸" 显示,`/l` 指示 `dir` 以小写字母的形式显示文件和目录。 + +注意,针对于 FreeDOS 的 `dir` 命令的命令行选项与针对于 Linux 的 `ls` 命令的命令行选项截然不同,因此,你不能像你在 Linux 上一样精确地使用这个 `ls` 别名。例如,在 FreeDOS 上使用此别名输入 `ls -l` 将产生一条 "文件未找到" 的错误,因为底层的 FreeDOS 的 `dir` 命令将不能找到一个名称为 `-l` 的文件。不过,对于基本的 "查看在我的系统上有哪些文件" 来说,这个 `ls` 别名已经足够帮助 Linux 用户开始使用 FreeDOS 了。 + +类似地,你可以为 FreeDOS 的 `type` 命令创建一个别名,来像 Linux 的 `cat` 命令一样工作。两个重新都会显示一个文本文件的内容。虽然 `type` 不支持你可能在 Linux 下使用的命令行选项,但是显示一单个文件的基本用法是相同的。 + + +``` +C:\FDOS>alias cat=type +C:\FDOS>cat version.fdi +PLATFORM=FreeDOS +VERSION=1.3-RC4 +RELEASE=2021-04-30 +C:\FDOS> +``` + +### 其它的类 Unix 命令 + +FreeDOS 包含一些精选的其它常见的类 Unix 命令,因此 Linux 用户将不会感觉到拘束。为在 FreeDOS 上使用这些 Linux 命令,你可能需要从 **FreeDOS 安装程序 - 我的软件包列表编辑器软件** (FDIMPLES) 软件包管理器来安装 **Unix 类工具** 软件包。 + +![Installing the Unix-like package set][2] + +Jim Hall, CC-BY SA 4.0 + +并不是所有的类 Unix 实用程序都能像在 Linux 上对应的实用程序一样 _准确地_ 工作。这就是我们称其为 _类 Unix_ 的原因。如果你将要使用一些深层次的命令行选项,你可能需要检查其兼容性,不过,对于典型的用法是没有问题的。开始在 FreeDOS 上使用这些类 Unix 命令: + +`cal` 命令是标准的 Unix 的日历程序。例如,为显示当前月份的日历,只需要输入 `cal` 。为查看一个具体指定的月份,将月份和年份作为参数予以给定: + + +``` +C:\>cal 6 1994 + +      June 1994     +Su Mo Tu We Th Fr Sa +          1  2  3  4 + 5  6  7  8  9 10 11 +12 13 14 15 16 17 18 +19 20 21 22 23 24 25 +26 27 28 29 30       +``` + +使用 `du` 命令来查看你的磁盘使用情况。这是 Linux 的 _disk usage_ 命令的简单版本,并且不支持路径以外的任何命令行选项。 + + +``` +C:\>du -s apps +usage: du (start path) +C:\>du apps +    158784 C:\APPS\FED +         0 C:\APPS +Total from C:\APPS is 158784 +C:\> +``` + +`head` 命令显示一个文件的前几行。例如,这是一种确定一个文件是否包含正确数据的简单方法。 + + +``` +C:>head fdauto.bat +@ECHO OFF +set DOSDIR=C"\FDOS +set LANG=EN +set TZ=UTC +set PATH=%dosdir%\BIN +if exist %dosdir%\LINKS\NUL set PATH=%path%;%dosdir%\LINKS +set NLSPATH=%dosdir%\NLS +set HELPPATH=%dosdir%\HELP +set TEMP=%dosdir%\TEMP +set TMP=%TEMP% +C:\> +``` + +为查看一个完整的文件,使用 `more` 命令,在 FreeDOS 上的默认文件查看器。这将一次显示一幕的文件,然后在显示下一屏的信息前,打印一个按下一次按键的提示。`more` 命令是一个非常简单的文件查看器;在 Linux 上你可能已经使用过一个功能更全面的查看器,尝试 `less` 命令。`less` 命令提供 "向后" 滚动一个文件的能力,以防你错过一些东西。你还可以搜索具体指定的文本。 + + +``` +C:\>less fdauto.bat +@ECHO OFF +set DOSDIR=C"\FDOS +set LANG=EN +set TZ=UTC +set PATH=%dosdir%\BIN +if exist %dosdir%\LINKS\NUL set PATH=%path%;%dosdir%\LINKS +set NLSPATH=%dosdir%\NLS +set HELPPATH=%dosdir%\HELP +set TEMP=%dosdir%\TEMP +set TMP=%TEMP% +[...] +``` + +如果在你的程序路径变量 (`PATH`) 中有很多的目录,并且不确定某个程序是从哪里运行的,你可以使用 `which` 命令。这个命令将扫描程序路径变量,并且将打印出你正在查找的程序的完整的位置。 + + +``` +C:\>which less +less    C:\>FDOS\BIN\LESS.EXE +C:\>_ +``` + +FreeDOS 1.3 RC4 包含其它的类 Unix 命令,你可能会在其它更特殊的情况下使用。这些命令包括:  + + * **bc**: 任意精度数字处理语言 + * **sed**: 流编辑器 + * **grep** 和 **xgrep**:使用正则表达式搜索一个文本文件 + * **md5sum**: 生成一个文件的一个 MD5 签名 + * **nro**: 简单排版,使用 nroff 宏 + * **sleep**: 暂停系统几秒钟 + * **tee**: 保存一个命令行流的副本 + * **touch**: 修改一个文件的时间戳 + * **trch**: 转换单个字符 (像 Linux 的 tr 一样) + * **uptime**: 报告你 FreeDOS 系统已经运行多长的时间 + + + +### 在你控制下的 FreeDOS + +FreeDOS ,像 Linux 和 BSD 一样,是开放源文件的。不管你是想通过学习一种新的命令行交互方式来挑战你自己,还是想再去熟悉令人舒适的类 Unix 工具,FreeDOS 都是一款有趣的值得尝鲜的操作系统。尝试一下! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/6/freedos-linux-users + +作者:[Jim Hall][a] +选题:[lujun9972][b] +译者:[robsean](https://github.com/robsean) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jim-hall +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/freedos-fish-laptop-color.png?itok=vfv_Lpph (FreeDOS fish logo and command prompt on computer) +[2]: https://opensource.com/sites/default/files/uploads/unix-like.png (Installing the Unix-like package set) From 64939d07b1b41ef1c558a62e51a402b62ca23f18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91?= Date: Sat, 11 Dec 2021 15:53:58 +0800 Subject: [PATCH 154/244] Translating --- .../tech/20210407 Get started with batch files in FreeDOS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210407 Get started with batch files in FreeDOS.md b/sources/tech/20210407 Get started with batch files in FreeDOS.md index 35773d3a1c..cd65ee4d3d 100644 --- a/sources/tech/20210407 Get started with batch files in FreeDOS.md +++ b/sources/tech/20210407 Get started with batch files in FreeDOS.md @@ -2,7 +2,7 @@ [#]: via: (https://opensource.com/article/21/3/batch-files-freedos) [#]: author: (Kevin O'Brien https://opensource.com/users/ahuka) [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (robsean) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From f8be6b4bbf14db2e7830af301037590875d14f62 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sun, 12 Dec 2021 05:04:28 +0800 Subject: [PATCH 155/244] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211212=20?= =?UTF-8?q?What=20is=20TTY=20in=20Linux=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211212 What is TTY in Linux.md --- sources/tech/20211212 What is TTY in Linux.md | 140 ++++++++++++++++++ 1 file changed, 140 insertions(+) create mode 100644 sources/tech/20211212 What is TTY in Linux.md diff --git a/sources/tech/20211212 What is TTY in Linux.md b/sources/tech/20211212 What is TTY in Linux.md new file mode 100644 index 0000000000..3521df9f5e --- /dev/null +++ b/sources/tech/20211212 What is TTY in Linux.md @@ -0,0 +1,140 @@ +[#]: subject: "What is TTY in Linux?" +[#]: via: "https://itsfoss.com/what-is-tty-in-linux/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +What is TTY in Linux? +====== + +You must have heard about the term “TTY” when it comes to Linux and UNIX. But, what is it? + +Is it useful to you as a desktop user? Do you need it? And, what can you do with it? + +In this article, let me mention everything essential to get you familiar with the term TTY in Linux. + +Do note that there’s no definitive answer to this, but it relates to how input/output devices interacted in the past. So, you will have to know a bit of history to get a clear picture. + +### History behind the term ‘TTY’ + +It all starts with a Teleprinter in the 1830s. + +Teleprinters let you send/receive text messages over the wire. It was a replacement to Morse code communication, where two operators were needed to effectively communicate with one another. + +And, a Teleprinter just needed a single operator to easily convey a message. While it did not have a modern-layout keyboard, its system was later evolved by Donald Murray in 1901 to include a typewriter-like keyboard. + +The Murray code reduced the effort for operators to send a message. And, this made it possible for a Teleprinter to evolve as a commercial Teletypewriter in 1908. TTY is shorthand for Teletypewriter. + +![Actual Teletypewriter in use during WW2 in London | Image credit Wikimedia][1] + +The difference between the a Teletypewriter and a regular typewriter was that Teletypewriter was attached to a communication device to send the typed messaged. + +[Teletypewriter made it possible for humans to communicate faster][2] over a wire without any computers until now. + +And, this is where “**TTY**” came into existence. + +### The (relatively) modern concept + +Now, you must be wondering, how did it land into modern computing and in Linux? + +Well, for starters, when Teletypewriter hit the market, some years later semiconductor transistors were developed which then evolved into microprocessors making a computer possible. + +Initial computers didn’t have the concept of keyboard. Punch cards were the input method. + +![A punch card computer program which was inserted into computers instead of typing it via keyboard \(TTY\) | Image credit][3] + +While computers were evolving, batch input cards were eventually replaced by Teletypewriters as a convenient input/output device. + +![LGP-30 computer in 1956 with a TTY attached to it][4] + +With technological advancements, the Teletypewriters were ‘virtualized’ using electronics. So, you wouldn’t need a physical, mechanical TTY, but a virtual, electronic TTY. + +Earlier computers didn’t even have video screens. Things were printed on paper instead of displaying on a screen (which didn’t exist). And hence you see the use of term ‘print’, not ‘display’. Videos were added to terminals later as technology advanced. + +In other words, you might have heard of them as video terminals. Or, you could call them as “physical” terminals. + +And, then these evolved into software emulated terminals which came with enhanced abilities and features. + +This is what you call a “terminal emulator”. For instance, GNOME Terminal, or Konsole, these are some of the [best terminal emulators that you will find for Linux][5]. + +### So, what is TTY in Linux? + +When it comes to Linux, TTY is an abstract device in UNIX and Linux. Sometimes it refers to physical input device such as a serial port, and sometimes it refers to a virtual TTY where it allows users to interact with the system ([reference][6]). + +TTY is a subsystem in Linux and Unix that makes process management, line editing, and session management possible at the kernel level through TTY drivers. + +In terms of programming, you need to dive in deep. But, considering the scope of this article, this could be an easy definition to digest. + +If you are curious, you can explore an old resource ([TTY Demystified][7]) that tries to clear up TTY in Linux and Unix systems with all the technical details you need. + +In fact, whenever you launch a terminal emulator or use any kind of shell in your system, it interacts with virtual TTYs that are known as psuedo-TTYs or PTY. + +You can just type in TTY in your terminal emulator to find the associated PTY. + +### How to access TTY in Linux? + +![][8] + +It is easy to access TTY in Linux. In fact, when I did not have a clue what it was, I accidentally accessed it and panicked about what to do (how to get out from it). + +You can get the TTY screen by using the following keyboard shortcuts on most distributions: + +**CTRL + ALT + F1** – Lockscreen +**CTRL + ALT + F2** – Desktop Environment +**CTRL + ALT + F3** – TTY3 +**CTRL + ALT + F4** – TTY4 +**CTRL + ALT + F5** – TT5 +**CTRL + ALT + F6** – TTY6 + +You can access up to six TTYs in total. However, the first two shortcuts point to the distribution’s lock screen and the desktop environment. + +![][9] + +So, you get a command line interface with the rest of the shortcuts. + +### When whould uou use TTY in Linux? + +TTY is not just a technical treasure. It is useful even for users like me who aren’t developers. + +It should come in handy in case the graphical desktop environment freezes. In some cases, reinstalling the desktop environment from the TTY helps resolve the program. + +Or, you can also choose to carry out tasks in TTY like updating the Linux system and similar, where you do not want visual issues to interrupt your process. + +Worst-case scenario, you can go to the TTY and reboot the computer if your graphical user interface is unresponsive. + +Some users also prefer to perform large file transfers with the help of TTY (I am not one of them). + +### TTY as a command in Linux + +![][10] + +When you type in TTY in your terminal emulator, it will print the file name of the terminal connected to the standard input, as described by the man page. + +In other words, to know the TTY number you are connected, just type in TTY. And, if there are multiple users connected to the Linux machine remotely, you can use who command to check what other users are connected to. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/what-is-tty-in-linux/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/WACsOperateTeletype.jpg?resize=429%2C371&ssl=1 +[2]: https://en.wikipedia.org/wiki/Teletype_Corporation#/media/File:What-is-teletype.jpg +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/punch-card-program.jpg?resize=600%2C274&ssl=1 +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/LGP-30-early-computer-1956.jpg?resize=800%2C600&ssl=1 +[5]: https://itsfoss.com/linux-terminal-emulators/ +[6]: https://unix.stackexchange.com/questions/4126/what-is-the-exact-difference-between-a-terminal-a-shell-a-tty-and-a-con +[7]: https://www.linusakesson.net/programming/tty/index.php +[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/ubuntu-tty.png?resize=800%2C449&ssl=1 +[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/ubuntu-tty4.png?resize=420%2C124&ssl=1 +[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/ubuntu-terminal-tty-command.png?resize=800%2C544&ssl=1 From 31f9461af45c86db20386cbbf9bf707799393f82 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sun, 12 Dec 2021 05:04:43 +0800 Subject: [PATCH 156/244] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211211=20?= =?UTF-8?q?Open=20source=20digital=20painting=20with=20Krita?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211211 Open source digital painting with Krita.md --- ...Open source digital painting with Krita.md | 155 ++++++++++++++++++ 1 file changed, 155 insertions(+) create mode 100644 sources/tech/20211211 Open source digital painting with Krita.md diff --git a/sources/tech/20211211 Open source digital painting with Krita.md b/sources/tech/20211211 Open source digital painting with Krita.md new file mode 100644 index 0000000000..30ee92b3f4 --- /dev/null +++ b/sources/tech/20211211 Open source digital painting with Krita.md @@ -0,0 +1,155 @@ +[#]: subject: "Open source digital painting with Krita" +[#]: via: "https://opensource.com/article/21/12/krita-digital-paint" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Open source digital painting with Krita +====== +If you love to paint, Krita can help you make sure your artwork looks +its best. +![6 paint brushes][1] + +Digital painting is an art form all its own. It obviously emulates the discipline it's named for, but painting in the physical world and a digital environment is unique. [Krita][2] is a digital paint application that's seen use at major film production houses, book publishers, and art studios. It specializes in materials emulation, allowing the artist to adjust and fine-tune their tools through a brush engine so that they can achieve exactly the look and drawing feel they need. Krita won't make you a great painter, but if you love to paint, Krita can help you make sure your artwork looks its best. + +### Install Krita on Linux + +Krita is [available for Linux, Windows, and macOS][3]. + +On Fedora, Mageia, and similar distributions, you can install it with your package manager: + + +``` +`$ sudo dnf install krita` +``` + +On Elementary, Mint, and other Debian-based distributions: + + +``` +`$ sudo apt install krita` +``` + +I use Krita as a [Flatpak][4]. + +If you want to support the continued development of Krita, you can also buy Krita for Linux and Windows on Steam. + +### Brushes + +A fairly standard interface for graphic creation greets you when it first launches. There's a toolbar on the left, and properties panels across the top and right. In the middle is your workspace. To create a new file, click the **New File** link in the workspace, or select it from the **File** menu. Choose the size and resolution of your canvas and click **Create**. + +Once you've got a canvas, it's time to explore the tools of the trade. Brushes are located in the top toolbar, just to the right of the color swatch chooser. + +![Brushes][5] + +(Seth Kenlon, [CC BY-SA 4.0][6]) + +You can find the same brushes in the right properties panel, provided that the brush panel is enabled. Property panels are called _Dockers_ in Krita, and you can show or hide them from the **Settings** menu in the **Dockers** submenu. + +The brush menu in the top toolbar is very graphical, with lots of brushes to choose from, plus you have control over many attributes of each brush, so you can also design your own. Each brush gets defined as a **brush preset**. All presets are located on the left side of the brush menu, although they may be hidden at first. + +![Reveal brush presets][7] + +(Seth Kenlon, [CC BY-SA 4.0][6]) + +A brush preset defines attributes that simulate the material you're using to make a drawing: watercolor, oil, acrylic, ink, charcoal, and so on. Each one has a default brush tip, too, but you can choose from any number of brush tips by clicking the **Predefined** tab in the brush menu. + +![Brush tips][8] + +(Seth Kenlon, [CC BY-SA 4.0][6]) + +You can adjust the size and spacing of brushes in the brush menu, as well, and there's a scratchpad area, so you test your settings. + +It can be a little overwhelming at first. Just remember this hierarchy: + + * Brush presets are the media you're using (paint, ink, charcoal, and so on) + * Brush tips are the brushes, pens, and spray cans + + + +### Painting with Krita + +I find that it helps to focus on just the brush presets at first. The brush tips are indispensable, but the brush presets speak for themselves when you're just getting used to the tools. + +Select a brush preset that looks interesting to you, select a color from the color selector in the top toolbar or the right properties panel of the window, and click and drag on the canvas to paint. Because Krita seeks to emulate real-world brush behavior, try a few different techniques. Dab some paint onto the canvas, and then try some longer brush strokes. The initial paint is strong, but as the virtual paint on your virtual brush gets "used," the paint starts to thin, just like in real life. Paint can also build up or thin out the more you paint over places there's already paint. + +![Paint][9] + +(Seth Kenlon, [CC BY-SA 4.0][6]) + +### Get more brushes + +Because brushes are your primary form of expression in Krita (aside from what you actually do with them, I mean), getting more brushes is a significant way to bolster your toolkit. Artists release brushes every now and again, and one of my favorite sets is the [brushes released by David Revoy][10]. + +Brush presets come in the form of a `.bundle` file, which you can import into Krita. + +To import a brush file in Krita: + + 1. Download the zip file and extract it. This produces a `.bundle` file. + 2. In Krita, go to **Settings** and select **Manage Resources**. + 3. Click the **Import Bundles** button (**Import Resources** in Krita 5), and select the `.bundle` file on your drive. + 4. Click **OK**. + 5. Restart Krita to allow it to load in the new presets. + + + +You can also create your own brush tips or import existing brush tips from GIMP, Adobe, and SVG files. + +To import a brush tip: + + 1. Download a [collection of brushes][11]. + 2. Open the brush menu and click on the **Predefined** tab. + 3. Click the **+Import** button at the bottom of the brush tip table. + 4. Select the brush collection you want to import. + + + +I used this function to import [my handy arrow brush tip][12], which I use to paint arrows on screenshots. It's surprisingly useful in both GIMP and Krita. + +![An arrow pointing to an arrow brush tip][13] + +(Seth Kenlon, [CC BY-SA 4.0][6]) + +### A serious painting app for serious painters + +Krita is an application that takes its purpose very seriously. It's a digital painting app that aims to be the best. Thanks to its flexibility, its skilled developer team, and its strong community, it's my opinion that it is. When I commission art for projects I'm involved with, I generally work with artists who use open source tools, and Krita is often the tool of choice. + +![Victoria Popova sword sample][14] + +(Victoria Popova, [CC BY-SA 4.0][6]) + +Whether you're an experienced artist like [Victoria Popova][15] or just a beginner like me, Krita is a fun and powerful application. Give it a try, and see what art you can make with just a few amazing tools. + +Nick Hamilton talks about what he loves about the open source digital painting tool, Krita, prior... + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/krita-digital-paint + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/paint_brushes_design_creative.jpg?itok=9Qk_tOT5 (6 paint brushes) +[2]: http://krita.org +[3]: https://krita.org/en/download/krita-desktop/ +[4]: https://opensource.com/article/21/11/install-flatpak-linux +[5]: https://opensource.com/sites/default/files/uploads/krita-button-brush.jpg (Brushes) +[6]: https://creativecommons.org/licenses/by-sa/4.0/ +[7]: https://opensource.com/sites/default/files/uploads/krita-button-brush-presets.jpg (Reveal brush presets) +[8]: https://opensource.com/sites/default/files/uploads/krita-brush-tips.jpg (Brush tips) +[9]: https://opensource.com/sites/default/files/uploads/krita-brush-stroke.jpg (Paint) +[10]: https://www.davidrevoy.com/article854/krita-brushes-2021-bundle +[11]: https://opensource.com/article/17/10/7-must-have-gimp-brushes +[12]: http://slackermedia.info/sprints/arrow_slackermedia.gbr +[13]: https://opensource.com/sites/default/files/uploads/krita-brush-arrow.jpg (An arrow pointing to an arrow brush tip) +[14]: https://opensource.com/sites/default/files/uploads/krita-sword-sample.jpg (Victoria Popova sword sample) +[15]: https://www.artstation.com/kreativchik From 84d301a4d288b0f106d86db0bea2785271c128b9 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sun, 12 Dec 2021 05:05:04 +0800 Subject: [PATCH 157/244] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020211211=20?= =?UTF-8?q?What=20Desktop=20Linux=20Needs=20to=20Succeed=20in=20the=20Main?= =?UTF-8?q?stream?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20211211 What Desktop Linux Needs to Succeed in the Mainstream.md --- ...inux Needs to Succeed in the Mainstream.md | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 sources/news/20211211 What Desktop Linux Needs to Succeed in the Mainstream.md diff --git a/sources/news/20211211 What Desktop Linux Needs to Succeed in the Mainstream.md b/sources/news/20211211 What Desktop Linux Needs to Succeed in the Mainstream.md new file mode 100644 index 0000000000..36c8b2eeaf --- /dev/null +++ b/sources/news/20211211 What Desktop Linux Needs to Succeed in the Mainstream.md @@ -0,0 +1,69 @@ +[#]: subject: "What Desktop Linux Needs to Succeed in the Mainstream" +[#]: via: "https://news.itsfoss.com/what-desktop-linux-needs-to-succeed-in-the-mainstream/" +[#]: author: "Community https://news.itsfoss.com/author/team/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +What Desktop Linux Needs to Succeed in the Mainstream +====== + +You might be aware of the [recent Linus Tech Tips videos about switching to Linux][1], including [one with some complaints about KDE software][2]. For those of you who are following along, I want to let you know that we’re (KDE) working on fixing the issues Linus brought up, and you can track our progress [here][3]. Thankfully, most of the issues are fairly minor and should be easy to fix. + +This blog post is my version of [Sway][4] developer [Drew DeVault’s post][5] about the videos, regarding the question of what desktop Linux needs to go mainstream. Drew emphasizes accessibility, and I agree, but with a slightly different conclusion: + +### Desktop Linux needs to be pre-installed on retail hardware to succeed in the mainstream + +That’s it. + +Allow me to explain. + +People get hung up a lot on features and usability, and these are important. But they’re means to an end and not good enough ends by themselves. Quality means nothing if people can’t get it. And people can’t get it without accessible distribution. High quality Linux distros aren’t enough; they need to be pre-installed on hardware products you can buy in mainstream retail stores! “The mainstream” buys products they can touch and hold; if you can’t find it in a mainstream store, it doesn’t exist. + +Think about it: **why do normal people use Windows or macOS**? Because the physical computer they bought included it. iOS or Android? Because it was shipped by default on their physical smartphone. The notion of replacing a device’s operating system with a new one doesn’t exist to “the mainstream”. Only the [“three-dot” users][6] ever do that, and they’re about 5% of the market. If the only way to get your OS is to install it yourself, you have no chance of succeeding in the mainstream. + +As for features, people generally use only a very small fraction of what’s available to them. When it comes to usability, most users [memorize their software rather than understanding it][7]–and you can memorize anything if you really have to. A better user interface helps, but it isn’t needed for the memorizers and mostly benefits power users (the 30% of the market “two-dot and up” crowd) who recognize patterns and appreciate logic, consistency, and good design. So these are not good enough on their own. + +This doesn’t mean we should forget about features and usability! Not at all! But if the goal is to “go mainstream,”we have to understand the true audience: **hardware vendors, not end users**. The goal is to have a software product appealing enough to get picked up by vendors when they go shopping for one, because that’s mostly how it works. Companies like Apple that do their own custom top-to-bottom hardware and software for big-name products are rare. Most build on top of 3rd-party software that requires the least integration and custom work from their in-house software team. If your software isn’t up to the task, they move onto the next option. So when some hardware vendor has a need, your software better be ready! + +And what do hardware vendors need? + + * **Flexibility**. Your software has to be easily adaptable to whatever kind of device they have without tons of custom engineering they’ll be on the hook for supporting over the product’s lifecycle. + * **Features that make their devices look good**. Support for its physical hardware characteristics, good performance, a pleasant-looking user interface… reasons for people to buy it, basically. + * **Stability**. Can’t crash and dump users at a command line terminal prompt. Has to actually work. Can’t feel like a hobbyist science fair project. + * **Usability that’s to be good enough to minimize support costs**. When something goes wrong, “the mainstream” contacts their hardware vendor. Usability needs to be good enough so that this happens as infrequently as possible. + + + +It doesn’t need to be perfect. It just needs to do that stuff. This is how Windows conquered the PC market in the 90s despite being terrible! And our stuff is much better! + +I see evidence that this is already working for KDE. Pine ships Manjaro with Plasma Mobile and Plasma Desktop on the [PinePhone][8] and [PineBook Pro][9], respectively. Valve also picked Plasma Desktop for the [Steam Deck][10], replacing GNOME for their new version of SteamOS. I see KDE software as well-positioned here and getting better all the time. So let’s keep doubling down on delivering what hardware vendors need to sell their awesome products. + +_Originally written by KDE developer Nate Graham on his [blog PointiestStick][11]. The content has been reproduced here with his permission. The views expressed are of author’s own and it may not reflect the views of It’s FOSS._ + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/what-desktop-linux-needs-to-succeed-in-the-mainstream/ + +作者:[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://news.itsfoss.com/author/team/ +[b]: https://github.com/lujun9972 +[1]: https://www.youtube.com/watch?v=0506yDSgU7M&list=PL8mG-RkN2uTyhe6fxWpnsHv53Y1I-K3yu +[2]: https://www.youtube.com/watch?v=TtsglXhbxno&list=PL8mG-RkN2uTyhe6fxWpnsHv53Y1I-K3yu&index=3 +[3]: https://invent.kde.org/teams/usability/issue-board/-/boards/7723 +[4]: https://swaywm.org/ +[5]: https://drewdevault.com/2021/12/05/What-desktop-Linux-needs.html +[6]: https://pointieststick.com/2021/11/29/who-is-the-target-user +[7]: https://pointieststick.com/2021/11/30/more-about-those-zero-dot-users/ +[8]: https://www.pine64.org/pinephone/ +[9]: https://www.pine64.org/pinebook-pro/ +[10]: https://www.steamdeck.com/ +[11]: https://pointieststick.com/2021/12/09/what-desktop-linux-needs-to-succeed-in-the-mainstream/ From d1f342824585579bd0dcabf9212e2d85e41336e5 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Sun, 12 Dec 2021 08:56:20 +0800 Subject: [PATCH 158/244] Rename sources/news/20211211 What Desktop Linux Needs to Succeed in the Mainstream.md to sources/talk/20211211 What Desktop Linux Needs to Succeed in the Mainstream.md --- ...11211 What Desktop Linux Needs to Succeed in the Mainstream.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{news => talk}/20211211 What Desktop Linux Needs to Succeed in the Mainstream.md (100%) diff --git a/sources/news/20211211 What Desktop Linux Needs to Succeed in the Mainstream.md b/sources/talk/20211211 What Desktop Linux Needs to Succeed in the Mainstream.md similarity index 100% rename from sources/news/20211211 What Desktop Linux Needs to Succeed in the Mainstream.md rename to sources/talk/20211211 What Desktop Linux Needs to Succeed in the Mainstream.md From fc236b4f1e6be15b1d4c60fc63e2c5bfce6d14a8 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 12 Dec 2021 10:04:49 +0800 Subject: [PATCH 159/244] PRF&PUB @robsean https://linux.cn/article-14074-1.html --- ...10403 FreeDOS commands you need to know.md | 151 ++++++++++++++++ ...10403 FreeDOS commands you need to know.md | 164 ------------------ 2 files changed, 151 insertions(+), 164 deletions(-) create mode 100644 published/20210403 FreeDOS commands you need to know.md delete mode 100644 translated/tech/20210403 FreeDOS commands you need to know.md diff --git a/published/20210403 FreeDOS commands you need to know.md b/published/20210403 FreeDOS commands you need to know.md new file mode 100644 index 0000000000..d76fa70900 --- /dev/null +++ b/published/20210403 FreeDOS commands you need to know.md @@ -0,0 +1,151 @@ +[#]: subject: (FreeDOS commands you need to know) +[#]: via: (https://opensource.com/article/21/4/freedos-commands) +[#]: author: (Kevin O'Brien https://opensource.com/users/ahuka) +[#]: collector: (lujun9972) +[#]: translator: (robsean) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14074-1.html) + +FreeDOS 操作目录和文件的基本命令 +====== + +> 学习如何在 FreeDOS 中对目录和文件执行创建、移除、复制等任务。 + +![](https://img.linux.net.cn/data/attachment/album/202112/12/100340gffegjttbn0n7iox.jpg) + +DOS 的开源实现 [FreeDOS][2] 提供了一个轻量级的操作系统,可以在现代硬件(或模拟器)上用于运行历史遗留下来的应用程序,可以更新硬件供应商不兼容于 Linux 的固件闪存。熟悉 FreeDOS 不仅是一种对旧计算机时代的有趣考古,也是一种获取有用的计算机技能的投入。在这篇文章中,我将介绍一些在 FreeDOS 系统上工作所需要知道的基本命令。 + +### 基本的命令和文件命令 + +FreeDOS 在硬盘驱动器上使用目录来组织文件。这意味着你需要使用目录命令来创建一个结构,用于存储和查找你在其中存储的文件。你所需要的用于管理目录结构的命令有: + + * `MD` (或 `MKDIR`) 创建一个新的目录或子目录。 + * `RD` (或 `RMDIR`) 移除(删除) 一个目录或子目录。 + * `CD` (或 `CHDIR`) 从当前工作目录更改到另一个命令。 + * `DELTREE` 删除一个目录,包括其包含的任意文件或子目录。 + * `DIR` 列出当前工作目录的内容。 + +因为使用目录是 FreeDOS 的主要工作,所有的这些命令(除 DELTREE 以外)是包含在 `COMMAND.COM` 中的内部命令。因此,它们将被加载到内存之中,并在你启动(即使是从启动盘启动)时随时可用。前三个命令有两个版本:一个版本是两个字母的短名,一个版本是长名。在实践中没有区别,因此,我将在这篇文章中使用短名。 + +### 使用 MD 创建一个目录 + +FreeDOS 的 `MD` 命令会创建一个新的目录或子目录。(实际上,由于 `\` 是根目录,从技术上讲,所有的目录都是子目录,因此,我更喜欢在所有的示例中使用“子目录”的说法)。有一个可选的参数是你所想要创建目录的路径,但是如果不包含路径,将在当前工作子目录中创建子目录。 + +例如,为在你的当前位置创建一个名称为 `letters` 的子目录: + +``` +C:\HOME\>MD LETTERS +``` + +这会创建子目录 `C:\letters` 。 + +通过包含一个路径,你可以在任意位置创建一个子目录: + +``` +C:\>MD C:\HOME\LETTERS\LOVE +``` + +这和先移动到 `C:\HOME\LETTERS` ,然后在其中创建一个子目录的结果相同: + +``` +C:\CD HOME\LETTERS +C:\HOME\LETTERS\>MD LOVE +C:\HOME\LETTERS\>DIR +LOVE +``` + +一个路径描述不能超过 63 个字符,包括反斜杠在内。 + +### 使用 RD 移除一个目录 + +FreeDOS 的 `RD` 命令会移除一个子目录。这个子目录必须是空的。如果它包含文件或其它是子目录,你将会得到错误信息。它也有一个可选的路径参数,语法与 `MD` 的相同。 + +你不能移除你的当前工作子目录。为移除此目录,你必须 `CD` 到其父目录,然后再移除不需要的子目录。 + +### 使用 DELTREE 删除文件和目录 + +`RD` 命令可能会让人有点迷糊,因为在该命令中内置了保护 FreeDOS 的措施。例如,你不能删除一个包含内容的子目录是一种安全措施。`DELTREE` 就是解决方案。 + +`DELTREE` 命令会删除整个子目录“树”(子目录)、其包含的所有的文件,以及其包含的所有的子目录及其包含的所有的文件等等,上述的一切都在一个简单的命令中完成。有时,它可能有点 _太_ 容易了,因为它可以如此快速地擦除数据。它是忽略文件属性的,因此你可以擦除隐藏、只读,和未知的系统文件。 + +你甚至可以在命令中具体指定多个目录树来擦除它们。这条命令将在一个命令中擦除这两个目录中的所有子目录: + +``` +C:\>DELTREE C:\FOO C:\BAR +``` + +这是那些使用前需要三思的命令中的其中一个。毫无疑问,它自然有其价值。我仍然对转到每个子目录,删除个别文件,检查每个子目录的内容,一次删除一个子目录, 然后再跳转到上一层目录,重复上述过程的乏味而记忆犹新。`DELTREE` 在你需要时是非常省时。但是我从不会将其用于日常维护,因为一此失误都能造成重大的损失。 + +### 格式化一个硬盘驱动器 + +`FORMAT` 命令也可以用于准备一个空白的硬盘驱动器来将文件写入其中。这将格式化 `D:` 驱动器: + +``` +C:\>FORMAT D: +``` + +### 复制文件 + +`COPY` 命令,顾名思义,将文件从一个位置复制到另一个位置。所需要的参数是:将要被复制的文件、要将其复制到的路径和文件。开关选项包含: + + * `/Y` 当一个文件要被覆盖时,避免出现提示。 + * `/-Y` 当一个文件要被覆盖时,需要出现提示。 + * `/V` 验证副本的内容。 + +这将从 `C:` 上的工作目录中复制文件 `MYFILE.TXT` 到 `D:` 驱动器的根目录,并将其重命名为 `EXAMPLE.TXT` : + +``` +C:\>COPY MYFILE.TXT D:\EXAMPLE.TXT +``` + +这将从 `C:` 上的工作目录中复制文件 `EXAMPLE.TXT` 到 `C:\DOCS\` 目录,接下来验证文件的内容来确保副本是完整的: + +``` +C:\>COPY EXAMPLE.TXT C:\DOCS\EXAMPLE.TXT /V +``` + +你也可以使用 `COPY` 命名来合并和追加文件。这个命令将合并两个文件 `MYFILE1.TXT` 和 `MYFILE2.TXT` ,并将其放置到一个新的名称为 `MYFILE3.TXT` 的文件之中: + +``` +C:\>COPY MYFILE1.TXT+MYFILE2.TXT MYFILE3.TXT +``` + +### 使用 XCOPY 复制目录 + +`XCOPY` 命令将复制整个目录以及它们的所有的子目录和这些子目录中包含的所有的文件。参数是将要复制的文件和其路径,以及将要复制到的目的地。重要的开关选项是: + + * `/S` 复制当前目录及其子目录中的所有文件。 + * `/E` 复制子目录,即使它们是空的。这个选项必须和 `/S` 一起使用。 + * `/V` 验证其所制作的副本。 + +这是一个非常强大和有用的命令,尤其是用于备份目录或整个硬盘驱动器。 + +这个命令将复制目录 `C:\DOCS` 的全部内容,包括所有的子目录及其内容(除了空的子目录以外),并将其放置到驱动器 `D:` 的目录 `D:\BACKUP\DOCS\` 之中: + +``` +C:\>XCOPY C:\DOCS D:\BACKUP\DOCS\ /S +``` + +### 使用 FreeDOS + +FreeDOS 是一个有趣的、轻量的、开源的操作系统。不管你正在使用它来更新你的主板的固件,还是给予旧计算机新生,它都能提供很多有用的实用程序,可以使你能够很好地使用它工作。学习 FreeDOS 的基本知识。你都可能会被它的多才多艺所惊讶。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/freedos-commands + +作者:[Kevin O'Brien][a] +选题:[lujun9972][b] +译者:[robsean](https://github.com/robsean) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/ahuka +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/lenovo-thinkpad-laptop-window-focus.png?itok=g0xPm2kD (young woman working on a laptop) +[2]: https://www.freedos.org/ +[3]: https://www.ahuka.com/dos-lessons-for-self-study-purposes/dos-lesson-8-format-copy-diskcopy-xcopy/ +[4]: https://www.ahuka.com/dos-lessons-for-self-study-purposes/dos-lesson-10-directory-commands/ +[5]: https://allaboutdosdirectoires.blogspot.com/ diff --git a/translated/tech/20210403 FreeDOS commands you need to know.md b/translated/tech/20210403 FreeDOS commands you need to know.md deleted file mode 100644 index b61a8aa4c8..0000000000 --- a/translated/tech/20210403 FreeDOS commands you need to know.md +++ /dev/null @@ -1,164 +0,0 @@ -[#]: subject: (FreeDOS commands you need to know) -[#]: via: (https://opensource.com/article/21/4/freedos-commands) -[#]: author: (Kevin O'Brien https://opensource.com/users/ahuka) -[#]: collector: (lujun9972) -[#]: translator: (robsean) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -你需要知道的 FreeDOS 命令 -====== -学习如何在 FreeDOS 中制作,移除,复制,或执行其它的目录和文件作业。 -![woman on laptop sitting at the window][1] - -[FreeDOS][2], DOS 的开放源文件的实现, 提供一个轻量级的操作系统,在现代硬件 (或在一个模拟器) 上用于运行历史遗留下来的应用程序,硬件供应商用于更新不兼容 Linux 的固件闪存。熟悉 FreeDOS 不仅是一种旧计算机时代的有趣考古,也是一种获取有用的计算机技能的投资。在这篇文章中,我将查看一些在 FreeDOS 系统上工作的所需要知道的必不可少的命令。 - -### 必不可少的命令和文件命令 - -FreeDOS 在一个硬盘驱动器上使用目录来组织文件。这意味着你需要使用目录命令来创建一个结构,用于存储和查找你在其中存储的文件。你所需要的用于管理目录结构的命令: - - * `MD` (或 `MKDIR`) 创建一个新的目录或子目录。 - * `RD` (或 `RMDIR`) 移除 (或删除) 一个目录或子目录。 - * `CD` (或 `CHDIR`) 从当前工作目录更改到另一个命令。 - * `DELTREE` 擦除一个目录,包括其包含的任意文件或子目录。 - * `DIR` 列出当前工作目录的内容。 - - - -因为使用目录是 FreeDOS 的主要工作,所有的这些命令 (除 DELTREE 以外) 是包含在 COMMAND.COM 中的内部命令。因此,它们将被加载到 RAM 之中,并在你启动 (甚至从一个启动盘启动) 时随时可用。前三个命令有两个版本:一个版本是两个字母的短名,一个版本是长名。在实践中没有区别,因此,我将在这篇文章中使用短名。 - -### 使用 MD 制作一个目录 - -FreeDOS 的 `MD` 命令会创建一个新的目录或子目录。(实际上,由于 _root_ 是主要的目录,从技术上将,所有的目录都是子目录,因此,我更喜欢在所有的示例中使用 _子目录_ )。一个可选的参数是你所想要创建目录的路径,但是如果不包含路径,将在当前工作子目录中创建子目录。 - -例如,为在你的当前位置创建一个名称为 `letters` 的子目录: - - -``` -`C:\HOME\>MD LETTERS` -``` - -这会创建子目录 `C:\letters` 。 - -通过包含一个路径,你可以在任意位置创建一个子目录: - - -``` -`C:\>MD C:\HOME\LETTERS\LOVE` -``` - -这和先移动到 `C:\HOME\LETTERS` ,然后在其中创建一个子目录的结果相同: - - -``` -C:\CD HOME\LETTERS -C:\HOME\LETTERS\>MD LOVE -C:\HOME\LETTERS\>DIR -LOVE -``` - -一次的路径描述不能超过 63 个字符,包括反斜杠。 - -### 使用 RD 移除一个目录 - -FreeDOS 的 `RD` 命令会移除一个子目录。这个子目录必需是空的。如果它包含文件或其它是子目录,你将会得到错误信息。这有一个可选的路径参数,语法与 `MD` 的相同。 - -你不能移除你的当前工作子目录。为移除此目录,你必需 `CD` 其父目录,然后再移除不需要的子目录。 - -### 使用 DELTREE 删除文件和目录 - -`RD` 命令可能会让人有点迷糊,因为在该命令中内置了保护 FreeDOS 的措施。例如,你不能删除一个包含内容的子目录是一种安全措施。`DELTREE` 是一中解决方案。 - -`DELTREE` 命令会删除整个子目录 "树" (一个子目录),加上其包含的所有的文件,加上其包含的所有的子目录及其包含的所有的文件等等,上述的一切都在一个简单的目录中完成。有时,它可能有点 _太_ 容易了,因为它可以如此快速地擦除数据。它是忽略文件属性的,因此你可以擦除隐藏的,只读的,和未知的系统文件。 - -你甚至可以在命令中具体指定多个目录树来擦除它们。这条命令将在一个命令中擦除这两个目录中的所有子目录: - - -``` -`C:\>DELTREE C:\FOO C:\BAR` -``` - -这是这些命令中的其中一个命令,在你使用它前,你真得需要再三考虑。毫无疑问,它是有它的地位的。我仍然对转到每个子目录,删除个别的文件,检查每个子目录的内容,一次删除一个子目录, 然后再跳转到上一层目录,重复上述过程的乏味而记忆犹新。`DELTREE` 在你需要时是非常省时。但是我从不会将其用于日常维护,因为一此失误都能造成重大的损失。 - -### 格式化一个硬盘驱动器 - -`FORMAT` 命令也可以用于准备一个空白的硬盘驱动器来将文件写入其中。这将格式化 `D:` 驱动器: - - -``` -`C:\>FORMAT D:` -``` - -### 复制文件 - -`COPY` 命令,顾名思义,将文件从一个位置复制到另一个位置。所需要的参数是:将要被复制的文件、路径、要将其复制到的文件。开关选项包含: - - * `/Y` 当一个文件正在被覆盖时,防止出现一个提示。 - * `/-Y` 当一个文件正在被覆盖时,需要出现一个提示。 - * `/V` 验证副本的内容。 - - - -这将从 `C:` 上的工作目录中复制文件 `MYFILE.TXT` 到 `D:` 驱动器的根目录,并将其重命名为 `EXAMPLE.TXT` : - - -``` -`C:\>COPY MYFILE.TXT D:\EXAMPLE.TXT` -``` - -这将从 `C:` 上的工作目录中复制文件 `EXAMPLE.TXT` 到 `C:\DOCS\` 目录,接下来验证文件的内容来确保副本是完整的: - - -``` -`C:\>COPY EXAMPLE.TXT C:\DOCS\EXAMPLE.TXT /V` -``` - -你也可以使用 `COPY` 命名来合并和追加文件。这个命令将合并两个文件 `MYFILE1.TXT` 和 `MYFILE2.TXT` ,并将其放置到一个新的名称为 `MYFILE3.TXT` 的文件之中: - - -``` -`C:\>COPY MYFILE1.TXT+MYFILE2.TXT MYFILE3.TXT` -``` - -### 使用 XCOPY 复制目录 - -`XCOPY` 命令将复制整个目录以及它们的所有的子目录和这些子目录中包含的所有的文件。参数是将要复制的文件和其路径,以及将要复制到的目的地。重要的开关选项是: - - * `/S` 复制当前目录及其任意子目录中的所有文件。 - * `/E` 复制子目录,即使它们是空的。这个选项必须和 `/S` 一起使用。 - * `/V` 验证其所制作的副本。 - - - -这是一个非常强大和有用的命令,尤其是用于备份目录或整个硬盘驱动器。 - -这个命令将复制目录 `C:\DOCS` 的全部内容,包括所有的子目录及其内容 (除了空的子目录以外) ,并将其放置到驱动器 `D:` 的目录 `D:\BACKUP\DOCS\` 之中: - - -``` -`C:\>XCOPY C:\DOCS D:\BACKUP\DOCS\ /S` -``` - -### 使用 FreeDOS - -FreeDOS 是一个有趣的,轻量的,开放源文件的操作系统。不管你正在使用它来更新你的主板的固件,还是给予旧计算机新生,它都能提供很多极好的实用程序,来使你能够很好地使用它工作。学习 FreeDOS 的基本知识。你都可能会被它的多才多艺所惊讶。 - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/4/freedos-commands - -作者:[Kevin O'Brien][a] -选题:[lujun9972][b] -译者:[robsean](https://github.com/robsean) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/ahuka -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/lenovo-thinkpad-laptop-window-focus.png?itok=g0xPm2kD (young woman working on a laptop) -[2]: https://www.freedos.org/ -[3]: https://www.ahuka.com/dos-lessons-for-self-study-purposes/dos-lesson-8-format-copy-diskcopy-xcopy/ -[4]: https://www.ahuka.com/dos-lessons-for-self-study-purposes/dos-lesson-10-directory-commands/ -[5]: https://allaboutdosdirectoires.blogspot.com/ From a15a492fb3281dfe0c21f4e54f413a8fa537fab7 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 12 Dec 2021 10:32:14 +0800 Subject: [PATCH 160/244] APL --- ...est Web Browsers for Ubuntu and Other Linux Distributions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210902 Best Web Browsers for Ubuntu and Other Linux Distributions.md b/sources/tech/20210902 Best Web Browsers for Ubuntu and Other Linux Distributions.md index 26a6d5f941..ee02f9f633 100644 --- a/sources/tech/20210902 Best Web Browsers for Ubuntu and Other Linux Distributions.md +++ b/sources/tech/20210902 Best Web Browsers for Ubuntu and Other Linux Distributions.md @@ -2,7 +2,7 @@ [#]: via: "https://itsfoss.com/best-browsers-ubuntu-linux/" [#]: author: "Ankush Das https://itsfoss.com/author/ankush/" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "wxy" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From eced4c472c3e88abb827b57afd2efa0655cd537d Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 12 Dec 2021 15:08:08 +0800 Subject: [PATCH 161/244] TSL&PRF --- ...or Ubuntu and Other Linux Distributions.md | 404 ------------------ ...or Ubuntu and Other Linux Distributions.md | 343 +++++++++++++++ 2 files changed, 343 insertions(+), 404 deletions(-) delete mode 100644 sources/tech/20210902 Best Web Browsers for Ubuntu and Other Linux Distributions.md create mode 100644 translated/tech/20210902 Best Web Browsers for Ubuntu and Other Linux Distributions.md diff --git a/sources/tech/20210902 Best Web Browsers for Ubuntu and Other Linux Distributions.md b/sources/tech/20210902 Best Web Browsers for Ubuntu and Other Linux Distributions.md deleted file mode 100644 index ee02f9f633..0000000000 --- a/sources/tech/20210902 Best Web Browsers for Ubuntu and Other Linux Distributions.md +++ /dev/null @@ -1,404 +0,0 @@ -[#]: subject: "Best Web Browsers for Ubuntu and Other Linux Distributions" -[#]: via: "https://itsfoss.com/best-browsers-ubuntu-linux/" -[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" -[#]: collector: "lujun9972" -[#]: translator: "wxy" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Best Web Browsers for Ubuntu and Other Linux Distributions -====== - -There is no such thing as the perfect web browser. It all depends on what you prefer and what you use it for. - -But, what are your best options when it comes to web browsers for Linux? - -In this article, I try to highlight the best web browsers that you can pick for Ubuntu and other Linux. - -**Note:** We have tried and tested these browsers on Ubuntu. But, you should be able to install it on any Linux distribution of your choice. - -### Top Web Browsers for Linux - -![Illustration for web browser running in Ubuntu Linux][1] - -Every browser offers something unique. And, when it comes to the Linux platform, there are some interesting exclusive choices as well. - -_**Before you see this list, please note that it is not a ranking list. The browser listed at number 1 should not be considered better than the ones at 2, 3 or 10.**_ - -Non-FOSS alert! - -Some applications mentioned here are not open source. They are listed here because they are available on Linux and the article’s focus is on Linux. We have a separate [dedicated list of open source web browsers][2] as well. - -### 1\. Vivaldi - -![][3] - -**Pros** - - * Sidebar for quick web application access - * Calendar and Email integration - * Unique tab management - * Pomodoro feature - * Mobile app available - - - -**Cons** - - * Resource-heavy when using a variety of features - * Not 100% open-source - - - -Vivaldi is an impressive browser that has been getting more attention from Linux users more than ever. - -While it is not 100% open-source, you can find most of its source code (except for its UI) online. - -With [Vivaldi 4.0 release][4], they have been focusing more on improving the experience for Linux users. You can set clock timers to increase your work productivity, use the built-in translation for web pages, track your calendar, add shortcuts to web applications, and multi-task at its peak with this browser. - -Even though it is a fast web browser, I wouldn’t bet on it as the “fastest” or lightest. You need a good amount of memory (RAM) to make use of all the features while you work on stuff. - -Overall, it is a feature-rich web browser. So, if you need something with as many as features possible to multi-task, Vivaldi can be your choice. - -[Vivaldi][5] - -#### How to Install Vivaldi on Linux? - -Vivaldi offers both **.deb** and **.rpm** packages to let you directly install it in your Linux system. - -You can refer to our resources to [install Deb files][6] and [install RPM files][7] in case you are new to Linux. - -### 2\. Mozilla Firefox - -![][8] - -**Pros** - - * Privacy protection - * Not based on Chrome engine - * Open Source - * Firefox Account services - - - -**Cons** - - * User Experience changes with major updates - - - -Firefox is the default web browser for most Linux distributions. Hence, it is an obvious choice to start with. - -In addition to being open-source, it offers some of the best privacy protection features. And, with the right settings, you can turn it into one of the most secure browsers similar to Tor Browser (which is also based on Firefox). - -Not just limited to its security, but Firefox also offers useful integrated features like Pocket (to save web pages and read later), VPN, email alias, breach monitor, and more when you sign in with your Firefox account. - -[Firefox][9] - -#### How to Install Firefox on Linux? - -It should already come pre-installed in your Linux distribution. But, if it is not present, you can search for it in the software center or install it using the terminal with the following command: - -``` -sudo apt install firefox -``` - -### 3\. Chromium - -![][10] - -**Pros** - - * Open Source Chrome alternative - * Similar features to Google Chrome - - - -**Cons** - - * Lacks certain features that Google Chrome offers - - - -Chromium is the open-source alternative and the base for Google Chrome and many other chrome-based browsers. - -If you do not want to use Google Chrome, chromium’s your best bet to get the same experience on Linux. - -Even though Google controls Chromium and [has been locking down Chrome][11], it is a good option for Linux systems. - -[Chromium][12] - -#### How to Install Chromium on Linux? - -You should be able to find it easily in the software center. But, if you need help, refer to our [installation guide for Chromium][13]. - -### 4\. Google Chrome - -![][14] - -**Pros** - - * Seamless integration with Google services - - - -**Cons** - - * Not open-source - - - -Google Chrome is an excellent web browser unless you do not want to opt for a proprietary solution or products by Google. - -You get all the essential features and the ability to integrate all Google services. If you prefer using Google Chrome on Android and want to sync across multiple platforms, it is an obvious choice for desktop Linux. - -If you were looking for a simple and capable web browser while using Google services, Google Chrome can be a great pick. - -[Google Chrome][15] - -#### How to Install Google Chrome on Linux? - -Google Chrome offers both Deb and RPM packages to let you install on any Ubuntu-based or Fedora/openSUSE distribution. - -If you need help with the installation, I should point you to our guide on [installing Google Chrome on Linux][16]. - -### 5\. Brave Browser - -![][17] - -**Pros** - - * Privacy protection features - * Performance - - - -**Cons** - - * No account-based sync - - - -Brrave browser is one of the most popular Linux browsers. - -It is an open-source project and is based on chromium. It offers several useful privacy protection features and is known for its blazing fast performance. - -Unlike any other browsers, you can get rewards even if you block advertisements on websites. The rewards you collect can only be used to give back to your favorite websites. This way, you get to block ads and also support the website. - -You can expect a faster user experience with minimum resource usage.   - -We also have a detailed [comparison article on Brave vs Firefox][18], if you need to decide between the two. - -Brave - -#### How to Install Brave on Linux? - -Unlike some other web browsers, you cannot directly find a package or in the software center. You need to enter some commands in the terminal to install the browser. - -Fret not, you can follow our [instructions to install brave browser][19] to proceed. - -### 6\. Opera - -![][20] - -**Pros** - - * Free VPN in-built - * Extra features - - - -**Cons** - - * Not open source - - - -While Opera is not the most popular choice, it is definitely a useful browser for Linux users. - -It comes with a built-in VPN and adblocker. So, you should have the basic privacy protection sorted with the help of the Opera web browser. - -You can quickly access popular chat messengers right from the sidebar without needing to launch a separate app or window. This is similar to Vivaldi considering the side chat messenger web apps but the user experience is significantly different. - -Overall, it is a good pick if you want a free VPN as an added bonus to other essential browsing features. - -It is worth noting that Opera offers a unique [Opera GX][21] browser which lets you tweak/enforce limit on system resources when using a browser along with gaming activities. This was still in development for Linux at the time of writing, if it is available by the time you read it, that could be a fantastic option! - -[Opera][22] - -#### How to Install Opera? - -Opera provides Deb package for Linux. You just head to its official website to download and install it. - -### 7\. Microsoft Edge - -![][23] - -**Pros** - - * Convenient option for Windows users who also use Linux - - - -**Cons** - - * Not open-source - * Still in Beta - - - -Microsoft Edge has surpassed Mozilla Firefox in terms of its popularity. Not just because it’s the default Windows browser, but it also offers a promising web experience while based on Chrome. - -At the time of writing this article, Microsoft Edge is available as a beta release for Linux. It works fine at the moment, but lacks quite a few features normally available for Windows. - -Overall, you should find most of the essential features available. - -If you use Windows and Linux as your desktop platforms, Microsoft Edge can come in handy as the preferred web browser. - -[Microsoft Edge][24] - -#### How to install Microsoft Edge on Linux? - -It is currently available through Microsoft Insiders channel as a beta. So, this could change once the stable release is out. - -For now, you can get the Deb/RPM file through the Microsoft Edge insiders web page and install it. - -You can also have a look at our how-to article on [installing Microsoft Edge on Linux][25]. - -### Unique Web Browsers for Linux - -Most of the users prefer to stick with the mainstream options because of security updates and future upgrades, but there are some different options as well. And, some exclusive to Linux users. - -### 8\. GNOME Web or Epiphany - -![][26] - -**Pros** - - * Minimal - * Open Source - - - -**Cons** - - * Lacks many features - * No cross-platform support - - - -Epiphany browser is the default GNOME browser. elementary OS utilizes it as its default web browser. - -It is a minimal browser that offers a clean and elegant user experience. You cannot sync your bookmarks or history, so you need to manually export them if you want to back them up or transfer to another browser. - -[GNOME Web][27] - -#### How to Install GNOME Web? - -You may find it pre-installed in some Linux distros. If not, you can check out its [Flatpak package][28] to install the latest version on any Linux distro. - -### 9\. Falkon - -![][29] - -**Pros** - - * Firefox-based alternative - - - -**Cons** - - * Not a replacement to Firefox - * No cross-platform support - - - -Falkon is a Firefox-based browser with privacy in mind. It should be good enough for basic web browsing, but it may not be a solution for your daily driver. - -You can explore more about it and get the installation instructions in our dedicated [article on Falkon browser][30]. - -[Falkon][31] - -### 10\. Nyxt - -![][32] - -**Pros** - - * Highly customizable - * Keyboard use focused - - - -**Cons** - - * Suitable for certain users - * Lack of cross-platform support - - - -Nyxt is an interesting web browser built for power keyboard users. You can browse and navigate the web using keyboard shortcuts. - -To know more about it and the installation instructions, go through our detailed article on [Nyxt browser][33]. - -Nyxt - -### Wrapping Up - -When it comes to Linux, you get a variety of choices available to pick. I have deliberately skipped [command line based web browsers like Lynx][34] here. - -So, what would be your selection for the best web browser? - -Moreover, I’d be curious to know what do you look for when installing a web browser for your system? - -Feel free to share your thoughts in the comments below. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/best-browsers-ubuntu-linux/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/web-browser-ubuntu.png?resize=800%2C450&ssl=1 -[2]: https://itsfoss.com/open-source-browsers-linux/ -[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/08/vivaldi-screenshot.png?resize=800%2C502&ssl=1 -[4]: https://news.itsfoss.com/vivaldi-4-0-release/ -[5]: https://vivaldi.com -[6]: https://itsfoss.com/install-deb-files-ubuntu/ -[7]: https://itsfoss.com/install-rpm-files-fedora/ -[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/08/firefox-proton.png?resize=800%2C450&ssl=1 -[9]: https://www.mozilla.org/en-US/firefox/new/ -[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/08/chromium-screenshot.png?resize=800%2C558&ssl=1 -[11]: https://news.itsfoss.com/is-google-locking-down-chrome/ -[12]: https://www.chromium.org -[13]: https://itsfoss.com/install-chromium-ubuntu/ -[14]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/08/google-chrome-screenshot.png?resize=800%2C557&ssl=1 -[15]: https://www.google.com/chrome/ -[16]: https://itsfoss.com/install-chrome-ubuntu/ -[17]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/07/brave-ui-new.jpg?resize=800%2C450&ssl=1 -[18]: https://itsfoss.com/brave-vs-firefox/ -[19]: https://itsfoss.com/brave-web-browser/ -[20]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/08/opera-screenshot.png?resize=800%2C543&ssl=1 -[21]: https://www.opera.com/gx -[22]: https://www.opera.com/ -[23]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/04/microsoft-edge-on-linux.png?resize=800%2C439&ssl=1 -[24]: https://www.microsoftedgeinsider.com/en-us/ -[25]: https://itsfoss.com/microsoft-edge-linux/ -[26]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/08/gnome-web.png?resize=800%2C450&ssl=1 -[27]: https://apps.gnome.org/en-GB/app/org.gnome.Epiphany/ -[28]: https://flathub.org/apps/details/org.gnome.Epiphany -[29]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/12/falkon-browser-1.png?resize=800%2C450&ssl=1 -[30]: https://itsfoss.com/falkon-browser/ -[31]: https://www.falkon.org -[32]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/05/nyxt-browser-settings.png?resize=800%2C617&ssl=1 -[33]: https://itsfoss.com/nyxt-browser/ -[34]: https://itsfoss.com/terminal-web-browsers/ diff --git a/translated/tech/20210902 Best Web Browsers for Ubuntu and Other Linux Distributions.md b/translated/tech/20210902 Best Web Browsers for Ubuntu and Other Linux Distributions.md new file mode 100644 index 0000000000..9e9a39161c --- /dev/null +++ b/translated/tech/20210902 Best Web Browsers for Ubuntu and Other Linux Distributions.md @@ -0,0 +1,343 @@ +[#]: subject: "Best Web Browsers for Ubuntu and Other Linux Distributions" +[#]: via: "https://itsfoss.com/best-browsers-ubuntu-linux/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: " " +[#]: url: " " + +适用于 Linux 的最佳网页浏览器 +====== + +没有所谓的完美的网页浏览器。这完全取决于你喜欢什么以及你用它来做什么。 + +但对于 Linux 上的网页浏览器,你有哪些最佳选择呢? + +在这篇文章中,我试图给出你在 Ubuntu 和其他 Linux 系统上使用的最佳网页浏览器。 + +> **注:** 我们已经在 Ubuntu 上尝试和测试了这些浏览器。但是,你应该能够在你选择的任何 Linux 发行版上安装它。 + +### Linux 上的顶级网页浏览器 + +![][1] + +每个浏览器都有其独特之处。而且,对于 Linux 平台,也有一些有趣的独家选择。 + +在你看到这个列表之前,请注意这不是一个排名列表。列在第 1 位的浏览器不应该被认为比第 2 位、第 3 位或第 10 位的更好。 + +> **非自由开源软件警报!** +> +> 这里提到的一些应用程序不是开源的。它们被列在这里是因为它们在 Linux 上可用,而文章的重点是 Linux。我们也有一个单独的 [开源的网页浏览器的专门列表][2]。 + +### 1、Vivaldi + +![][3] + +**优点** + + * 可快速访问网页应用程序的侧边栏 + * 集成了日历和电子邮件 + * 独特的标签管理 + * Pomodoro 功能(时钟计时器) + * 有移动应用程序 + +**缺点** + + * 当使用各种功能时,资源占用很重 + * 不是 100% 开源的 + +[Vivaldi][5] 是一个令人印象深刻的浏览器,它越来越多地得到了 Linux 用户的关注。 + +虽然它不是 100% 开源的,但你可以在网上找到它的大部分源代码(除了它的用户界面)。 + +随着 [Vivaldi 4.0 的发布][4],他们更加注重改善 Linux 用户的体验。你可以设置时钟计时器以提高你的工作效率,使用内置翻译来翻译网页,跟踪你的日历活动,为网页应用程序添加快捷方式,并通过这个浏览器为多种任务发挥到极致。 + +即使它是一个快速的网页浏览器,我也不会觉得它是“最快”或最轻量级的。你需要大量的内存,才能在你工作时发挥它的所有的功能。 + +总之,它是一个功能丰富的网页浏览器。因此,如果你需要有尽可能多的功能来完成多种任务,Vivaldi 可以是你的选择。 + +#### 如何在 Linux 上安装 Vivaldi? + +Vivaldi 提供了 **.deb** 和 **.rpm** 两种软件包,让你可以直接在 Linux 系统中安装它。 + +如果你是 Linux 的新手,你可以参考我们的资源来 [安装 Deb 文件][6] 和 [安装 RPM 文件][7]。 + +### 2、Mozilla Firefox + +![][8] + +**优点** + + * 隐私保护 + * 不基于 Chrome 引擎 + * 开源 + * Firefox 帐户服务 + +**缺点** + + * 用户体验会随着重大更新而改变 + +[Firefox][9] 是大多数 Linux 发行版的默认网页浏览器。因此,它显然是一个开箱即用的浏览器。 + +除了是开源的,它还提供一些最好的隐私保护功能。而且,通过正确的设置,你可以把它变成类似于 Tor 浏览器(它也是基于 Firefox 的)这样的最安全的浏览器之一。 + +不仅仅是它的安全性,当你用你的 Firefox 账户登录时,它还集成了有用的功能,如 Pocket(保存网页并稍后阅读)、VPN、电子邮件别名、漏洞监控等。 + +#### 如何在 Linux 上安装 Firefox? + +它应该已经预装在你的 Linux 发行版中了。但是,如果它不存在,你可以在软件中心搜索它,或者用终端的以下命令来安装它: + +``` +sudo apt install firefox +``` + +### 3、Chromium + +![][10] + +**优点** + + * Chrome 浏览器的开源替代品 + * 与 Chrome 浏览器的功能相似 + +**缺点** + + * 缺少 Chrome 浏览器提供的某些功能 + +[Chromium][12] 是 Chrome 浏览器的开源替代品,也是许多其他基于 Chrome 的浏览器的基础。 + +如果你不想使用 Chrome 浏览器,Chromium 是你在 Linux 上获得相同体验的最佳选择。 + +尽管谷歌控制着 Chromium,并且 [一直锁定着 Chrome][11],但对于 Linux 系统来说,它是一个不错的选择。 + +#### 如何在 Linux 上安装 Chromium? + +你应该可以在软件中心轻松找到它。但是,如果你需要帮助,可以参考我们的 [Chromium 安装指南][13]。 + +### 4、谷歌 Chrome + +![][14] + +**优点** + + * 与谷歌服务的无缝整合 + +**缺点** + + * 不是开源的 + +[Chrome 浏览器][15] 是一个优秀的网页浏览器,除非你不想选择谷歌的专有解决方案或产品。 + +你可以得到所有的基本功能,并且能够整合所有的谷歌服务。如果你喜欢在安卓系统上使用 Chrome 浏览器,并希望在多个平台上进行同步,那么它是桌面 Linux 的明显选择。 + +如果你在使用谷歌服务的同时寻找一个简单而强力的网页浏览器,Chrome 浏览器可以是一个不错的选择。 + +#### 如何在 Linux 上安装 Chrome 浏览器? + +Chrome 浏览器提供 Deb 和 RPM 包,可以让你在任何基于 Ubuntu 或 Fedora/openSUSE 发行版上安装。 + +如果你在安装方面需要帮助,我应该向你指出我们关于 [在 Linux 上安装 Chrome 浏览器][16] 的指南。 + +### 5、Brave + +![][17] + +**优点** + + * 隐私保护功能 + * 性能 + +**缺点** + + * 没有基于账户的同步 + +[Brave][35] 浏览器是最受欢迎的 Linux 浏览器之一。 + +它是一个开源项目,基于 Chromium。它提供几个有用的隐私保护功能,并以其极快的性能而闻名。 + +与其他浏览器不同的是,即使你屏蔽了网站上的广告,你也可以获得奖励。你收集的奖励只能用于回馈你喜欢的网站。这样一来,你在屏蔽广告的同时也得到了对网站的支持。 + +你可以期待以最小的资源占用获得更快的用户体验。   + +如果你需要在两者之间做出决定,我们也有一篇详细的 [关于 Brave 和 Firefox 的比较文章][18]。 + +#### 如何在 Linux 上安装 Brave? + +与其他一些网页浏览器不同,你不能直接在软件中心找到软件包。你需要在终端输入一些命令来安装该浏览器。 + +不用担心,你可以按照我们的 [安装 Brave 浏览器的说明][19] 来进行。 + +### 6、Opera + +![][20] + +**优点** + + * 内置免费的 VPN + * 额外的功能 + +**缺点** + + * 不是开源的 + +虽然 [Opera][22] 不是最流行的选择,但它对 Linux 用户来说绝对是一个有用的浏览器。 + +它有一个内置的 VPN 和广告拦截器。因此,在 Opera 浏览器的帮助下,你应该会得到基本的隐私保护。 + +你可以直接从侧边栏快速访问流行的聊天信使,而不需要启动单独的应用程序或窗口。这种侧边栏的聊天信使网页应用与 Vivaldi 类似,但用户体验明显不同。 + +总的来说,如果你想要一个免费的 VPN 作为其他基本浏览功能之外的奖励,它是一个不错的选择。 + +值得注意的是,Opera 提供了一个独特的 [Opera GX][21] 浏览器,让你在使用浏览器并同时进行游戏活动时可以调整或强制限制系统资源。在写这篇文章的时候,该功能还在开发 Linux 版本,如果在你读到这篇文章的时候,它已经可以使用了,这可能是一个很好的选择。 + +#### 如何安装 Opera? + +Opera 为 Linux 提供了 Deb 包。你只需前往其官方网站下载并安装即可。 + +### 7、微软 Edge + +![][23] + +**优点** + + * 为同时也使用 Linux 的 Windows 用户提供了方便的选择。 + +**缺点** + + * 不是开源的 + +[微软 Edge][24] 在受欢迎程度上已经超过了 Mozilla Firefox。不仅仅是因为它是默认的 Windows 浏览器,而是它在基于 Chrome 浏览器的同时,还提供了很有前景的网页体验。 + +微软 Edge 已经发布了面向 Linux 的稳定版。它目前运行良好,但缺乏一些的通常可用于 Windows 的功能。 + +总的来说,你应该会发现大部分的基本功能都是可用的。 + +如果你使用 Windows 和 Linux 作为你的桌面平台,微软 Edge 可以考虑作为首选的网页浏览器。 + +#### 如何在 Linux 上安装微软 Edge? + +现在,你可以通过微软 Edge 的官方网页获得 Deb/RPM 文件并安装它。 + +你也可以看看我们关于 [在 Linux 上安装微软 Edge][25] 的方法。 + +### Linux 独有的网页浏览器 + +考虑到安全更新和未来升级,大多数用户喜欢坚持使用主流选项,但也有一些不同的选项。而且,有些是 Linux 用户专属的。 + +### 8、GNOME Web(Epiphany) + +![][26] + +**优点** + + * 精简 + * 开源 + +**缺点** + + * 缺少许多功能 + * 没有跨平台支持 + +[Epiphany 浏览器][27] 是 GNOME 的默认浏览器。elementary OS 也将其作为默认的网页浏览器。 + +它是一个精简的浏览器,提供了一个干净和优雅的用户体验。你不能同步你的书签或历史记录,所以如果你想备份或转移到其他浏览器,你需要手动导出它们。 + +#### 如何安装 GNOME Web? + +你可能会发现它预装在一些 Linux 发行版中。如果没有,你可以用它的 [Flatpak 包][28] 来在任何 Linux 发行版上安装最新版本。 + +### 9、Falkon + +![][29] + +**优点** + + * 基于 Firefox 的替代品 + +**缺点** + + * 不能替代 Firefox + * 没有跨平台支持 + +[Falkon][31] 是一个基于 Firefox 的浏览器,考虑到了隐私问题。它对于基本的网页浏览应该是足够好的,但它可能不是你日常使用的解决方案。 + +你可以在我们专门的 [关于 Falkon 浏览器的文章][30] 中了解更多关于它的信息并获得安装说明。 + +### 10、Nyxt + +![][32] + +**优点** + + * 高度的可定制性 + * 重点关注键盘操作 + +**缺点** + + * 适用于某些用户 + * 缺乏跨平台支持 + +[Nyxt][36] 是一个有趣的网页浏览器,为资深的键盘用户而建立。你可以使用键盘快捷键来浏览和导航网页。 + +要了解更多关于它的信息和安装说明,请浏览我们关于 [Nyxt 浏览器][33] 的详细文章。 + +### 总结 + +说到 Linux,你会有很多选择可供挑选。我在这里特意跳过了 [如 Lynx 这样的基于命令行的网页浏览器][34]。 + +那么,你会选择什么样的网页浏览器呢? + +此外,我很想知道,你在为你的系统安装网页浏览器时会考虑什么? + +欢迎在下面的评论中分享你的想法。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/best-browsers-ubuntu-linux/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/web-browser-ubuntu.png?resize=800%2C450&ssl=1 +[2]: https://itsfoss.com/open-source-browsers-linux/ +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/08/vivaldi-screenshot.png?resize=800%2C502&ssl=1 +[4]: https://news.itsfoss.com/vivaldi-4-0-release/ +[5]: https://vivaldi.com +[6]: https://itsfoss.com/install-deb-files-ubuntu/ +[7]: https://itsfoss.com/install-rpm-files-fedora/ +[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/08/firefox-proton.png?resize=800%2C450&ssl=1 +[9]: https://www.mozilla.org/en-US/firefox/new/ +[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/08/chromium-screenshot.png?resize=800%2C558&ssl=1 +[11]: https://news.itsfoss.com/is-google-locking-down-chrome/ +[12]: https://www.chromium.org +[13]: https://itsfoss.com/install-chromium-ubuntu/ +[14]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/08/google-chrome-screenshot.png?resize=800%2C557&ssl=1 +[15]: https://www.google.com/chrome/ +[16]: https://itsfoss.com/install-chrome-ubuntu/ +[17]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/07/brave-ui-new.jpg?resize=800%2C450&ssl=1 +[18]: https://itsfoss.com/brave-vs-firefox/ +[19]: https://itsfoss.com/brave-web-browser/ +[20]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/08/opera-screenshot.png?resize=800%2C543&ssl=1 +[21]: https://www.opera.com/gx +[22]: https://www.opera.com/ +[23]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/04/microsoft-edge-on-linux.png?resize=800%2C439&ssl=1 +[24]: https://www.microsoftedgeinsider.com/en-us/ +[25]: https://itsfoss.com/microsoft-edge-linux/ +[26]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/08/gnome-web.png?resize=800%2C450&ssl=1 +[27]: https://apps.gnome.org/en-GB/app/org.gnome.Epiphany/ +[28]: https://flathub.org/apps/details/org.gnome.Epiphany +[29]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/12/falkon-browser-1.png?resize=800%2C450&ssl=1 +[30]: https://itsfoss.com/falkon-browser/ +[31]: https://www.falkon.org +[32]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/05/nyxt-browser-settings.png?resize=800%2C617&ssl=1 +[33]: https://itsfoss.com/nyxt-browser/ +[34]: https://itsfoss.com/terminal-web-browsers/ +[35]: https://brave.com/its979 +[36]: https://nyxt.atlas.engineer/ \ No newline at end of file From afdedd40d130fe0e5cd58be5927614a4a6d5a253 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 12 Dec 2021 15:16:14 +0800 Subject: [PATCH 162/244] PUB @wxy https://linux.cn/article-14075-1.html --- ...t Web Browsers for Ubuntu and Other Linux Distributions.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20210902 Best Web Browsers for Ubuntu and Other Linux Distributions.md (99%) diff --git a/translated/tech/20210902 Best Web Browsers for Ubuntu and Other Linux Distributions.md b/published/20210902 Best Web Browsers for Ubuntu and Other Linux Distributions.md similarity index 99% rename from translated/tech/20210902 Best Web Browsers for Ubuntu and Other Linux Distributions.md rename to published/20210902 Best Web Browsers for Ubuntu and Other Linux Distributions.md index 9e9a39161c..546a67c669 100644 --- a/translated/tech/20210902 Best Web Browsers for Ubuntu and Other Linux Distributions.md +++ b/published/20210902 Best Web Browsers for Ubuntu and Other Linux Distributions.md @@ -4,8 +4,8 @@ [#]: collector: "lujun9972" [#]: translator: "wxy" [#]: reviewer: "wxy" -[#]: publisher: " " -[#]: url: " " +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14075-1.html" 适用于 Linux 的最佳网页浏览器 ====== From 4dc19e3e2da3d35e7e6781cf80dacaae46031e57 Mon Sep 17 00:00:00 2001 From: MjSeven Date: Sun, 12 Dec 2021 17:35:20 +0800 Subject: [PATCH 163/244] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...scraping in Python using Beautiful Soup.md | 188 ------------------ ...scraping in Python using Beautiful Soup.md | 180 +++++++++++++++++ 2 files changed, 180 insertions(+), 188 deletions(-) delete mode 100644 sources/tech/20210915 A guide to web scraping in Python using Beautiful Soup.md create mode 100644 translated/tech/20210915 A guide to web scraping in Python using Beautiful Soup.md diff --git a/sources/tech/20210915 A guide to web scraping in Python using Beautiful Soup.md b/sources/tech/20210915 A guide to web scraping in Python using Beautiful Soup.md deleted file mode 100644 index 1b15b5d348..0000000000 --- a/sources/tech/20210915 A guide to web scraping in Python using Beautiful Soup.md +++ /dev/null @@ -1,188 +0,0 @@ -[#]: subject: "A guide to web scraping in Python using Beautiful Soup" -[#]: via: "https://opensource.com/article/21/9/web-scraping-python-beautiful-soup" -[#]: author: "Ayush Sharma https://opensource.com/users/ayushsharma" -[#]: collector: "lujun9972" -[#]: translator: "MjSeven" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -A guide to web scraping in Python using Beautiful Soup -====== -The Beautiful Soup library in Python makes extracting HTML from web -pages easy. -![Computer screen with files or windows open][1] - -Today we'll discuss how to use the Beautiful Soup library to extract content from an HTML page. After extraction, we'll convert it to a Python list or dictionary using Beautiful Soup. - -### What is web scraping, and why do I need it? - -The simple answer is this: Not every website has an API to fetch content. You might want to get recipes from your favorite cooking website or photos from a travel blog. Without an API, extracting the HTML, or _scraping_, might be the only way to get that content. I'm going to show you how to do this in Python. - -**Not all websites take kindly to scraping, and some may prohibit it explicitly. Check with the website owners if they're okay with scraping.** - -### How do I scrape a website in Python? - -For web scraping to work in Python, we're going to perform three basic steps: - - 1. Extract the HTML content using the `requests` library. - 2. Analyze the HTML structure and identify the tags which have our content. - 3. Extract the tags using Beautiful Soup and put the data in a Python list. - - - -### Installing the libraries - -Let's first install the libraries we'll need. The `requests` library fetches the HTML content from a website. Beautiful Soup parses HTML and converts it to Python objects. To install these for Python 3, run: - - -``` -`pip3 install requests beautifulsoup4` -``` - -### Extracting the HTML - -For this example, I'll choose to scrape the [Technology][2] section of this website. If you go to that page, you'll see a list of articles with title, excerpt, and publishing date. Our goal is to create a list of articles with that information. - -The full URL for the Technology page is: - - -``` -`https://notes.ayushsharma.in/technology` -``` - -We can get the HTML content from this page using `requests`: - - -``` -#!/usr/bin/python3 -import requests - -url = '' - -data = requests.get(url) - -print(data.text) -``` - -The variable `data` will contain the HTML source code of the page. - -### Extracting content from the HTML - -To extract our data from the HTML received in `data`, we'll need to identify which tags have what we need. - -If you skim through the HTML, you’ll find this section near the top: - - -``` -<[div][3] class="col"> -  <[a][4] href="/2021/08/using-variables-in-jekyll-to-define-custom-content" class="post-card"> -    <[div][3] class="card"> -      <[div][3] class="card-body"> -        <[h5][5] class="card-title">Using variables in Jekyll to define custom content</[h5][5]> -        <[small][6] class="card-text text-muted">I recently discovered that Jekyll's config.yml can be used to define custom -          variables for reusing content. I feel like I've been living under a rock all this time. But to err over and -          over again is human.</[small][6]> -      </[div][3]> -      <[div][3] class="card-footer text-end"> -        <[small][6] class="text-muted">Aug 2021</[small][6]> -      </[div][3]> -    </[div][3]> -  </[a][4]> -</[div][3]> -``` - -This is the section that repeats throughout the page for every article. We can see that `.card-title` has the article title, `.card-text` has the excerpt, and `.card-footer > small` has the publishing date. - -Let's extract these using Beautiful Soup. - - -``` -#!/usr/bin/python3 -import requests -from bs4 import BeautifulSoup -from pprint import pprint - -url = '' -data = requests.get(url) - -my_data = [] - -html = BeautifulSoup(data.text, 'html.parser') -articles = html.select('a.post-card') - -for article in articles: - -    title = article.select('.card-title')[0].get_text() -    excerpt = article.select('.card-text')[0].get_text() -    pub_date = article.select('.card-footer small')[0].get_text() - -    my_data.append({"title": title, "excerpt": excerpt, "pub_date": pub_date}) - -pprint(my_data) -``` - -The above code extracts the articles and puts them in the `my_data` variable. I'm using `pprint` to pretty-print the output, but you can skip it in your code. Save the code above in a file called `fetch.py`, and then run it using: - - -``` -`python3 fetch.py` -``` - -If everything went fine, you should see this: - - -``` -[{'excerpt': "I recently discovered that Jekyll's config.yml can be used to" -"define custom variables for reusing content. I feel like I've" -'been living under a rock all this time. But to err over and over' -'again is human.', -'pub_date': 'Aug 2021', -'title': 'Using variables in Jekyll to define custom content'}, -{'excerpt': "In this article, I'll highlight some ideas for Jekyll" -'collections, blog category pages, responsive web-design, and' -'netlify.toml to make static website maintenance a breeze.', -'pub_date': 'Jul 2021', -'title': 'The evolution of ayushsharma.in: Jekyll, Bootstrap, Netlify,' -'static websites, and responsive design.'}, -{'excerpt': "These are the top 5 lessons I've learned after 5 years of" -'Terraform-ing.', -'pub_date': 'Jul 2021', -'title': '5 key best practices for sane and usable Terraform setups'}, - -... (truncated) -``` - -And that's all it takes! In 22 lines of code, we've built a web scraper in Python. You can find the [source code in my example repo][7]. - -### Conclusion - -With the website content in a Python list, we can now do cool stuff with it. We could return it as JSON for another application or convert it to HTML with custom styling. Feel free to copy-paste the above code and experiment with your favorite website. - -Have fun, and keep coding. - -* * * - -_This article was originally published on the [author's personal blog][8] and has been adapted with permission._ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/9/web-scraping-python-beautiful-soup - -作者:[Ayush Sharma][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/ayushsharma -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_screen_windows_files.png?itok=kLTeQUbY (Computer screen with files or windows open) -[2]: https://notes.ayushsharma.in/technology -[3]: http://december.com/html/4/element/div.html -[4]: http://december.com/html/4/element/a.html -[5]: http://december.com/html/4/element/h5.html -[6]: http://december.com/html/4/element/small.html -[7]: https://gitlab.com/ayush-sharma/example-assets/-/blob/fd7d2dfbfa3ca34103402993b35a61cbe943bcf3/programming/beautiful-soup/fetch.py -[8]: https://notes.ayushsharma.in/2021/08/a-guide-to-web-scraping-in-python-using-beautifulsoup diff --git a/translated/tech/20210915 A guide to web scraping in Python using Beautiful Soup.md b/translated/tech/20210915 A guide to web scraping in Python using Beautiful Soup.md new file mode 100644 index 0000000000..87dc59d10f --- /dev/null +++ b/translated/tech/20210915 A guide to web scraping in Python using Beautiful Soup.md @@ -0,0 +1,180 @@ +[#]: subject: "A guide to web scraping in Python using Beautiful Soup" +[#]: via: "https://opensource.com/article/21/9/web-scraping-python-beautiful-soup" +[#]: author: "Ayush Sharma https://opensource.com/users/ayushsharma" +[#]: collector: "lujun9972" +[#]: translator: "MjSeven" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Python Beautiful Soup 爬虫指南 +====== +Python 中的 Beautiful Soup 库可以很方便的从网页中提取 HTML 内容。 + +![打开文件或窗口的计算机屏幕][1] + +今天我们将讨论如何使用 Beautiful Soup 库从 HTML 页面中提取内容,之后,我们将使用它将其转换为 Python 列表或字典。 + +### 什么是 web 爬虫,为什么我需要它? + +答案很简单:并非每个网站都有获取内容的 API。你可能想从你最喜欢的烹饪网站上获取食谱,或者从旅游博客上获取照片。如果没有 API,提取 HTML 或 _爬虫_ 可能是获取内容的唯一方法。我将向你展示如何使用 Python 来获取。 + +**并非所以网站都喜欢爬虫,有些网站可能会明确禁止。与站长核对是否同意抓取。** + +### Python 如何抓取网站? + +使用 Python 进行爬虫,我们将执行三个基本步骤: + + 1. 使用 `requests` 库获取 HTML 内容 + 2. 分析 HTML 结构并识别包含我们需要内容的标签 + 3. 使用 Beautiful Soup 提取标签并将数据放入 Python 列表中 + + +### 安装库 + +首先安装我们需要的库。`requests` 库从网站获取 HTML 内容,Beautiful Soup 解析 HTML 并将其转换为 Python 对象。在 Python3 中安装它们,运行: + +``` +pip3 install requests beautifulsoup4 +``` + +### 提取 HTML + +在本例中,我将选择抓取网站的 [Techhology][2] 部分。如果你跳转到此页面,你会看到带有标题、摘录和发布日期的文章列表。我们的目标是创建一个包含这些信息的文章列表。 + +网站页面的完整 URL 是: + +``` +https://notes.ayushsharma.in/technology +``` + +我们可以使用 `requests` 从这个页面获取 HTML 内容: + +```python +#!/usr/bin/python3 +import requests + +url = 'https://notes.ayushsharma.in/technology' + +data = requests.get(url) + +print(data.text) +``` + +变量 `data` 将包含页面的 HTML 源代码。 + +### 从 HTML 中提取内容 + +为了从 `data` 中提取数据,我们需要确定哪些标签具有我们需要的内容。 + +如果你浏览 HTML,你会发现靠近顶部的这一段: + +```html + +``` + +这是每篇文章在整个页面中重复的部分。我们可以看到 `.card-title` 包含文章标题,`.card-text` 包含摘录,`.card-footer > small` 包含发布日期。 + +让我们使用 Beautiful Soup 提取这些内容。 + +```python +#!/usr/bin/python3 +import requests +from bs4 import BeautifulSoup +from pprint import pprint + +url = 'https://notes.ayushsharma.in/technology' +data = requests.get(url) + +my_data = [] + +html = BeautifulSoup(data.text, 'html.parser') +articles = html.select('a.post-card') + +for article in articles: + + title = article.select('.card-title')[0].get_text() + excerpt = article.select('.card-text')[0].get_text() + pub_date = article.select('.card-footer small')[0].get_text() + + my_data.append({"title": title, "excerpt": excerpt, "pub_date": pub_date}) + +pprint(my_data) +``` + +以上代码提取文章信息并将它们放入 `my_data` 变量中。我使用了 `pprint` 来美化输出,但你可以在代码中忽略它。将上面的代码保存在一个名为 `fetch.py` 的文件中,然后运行它: + +``` +python3 fetch.py +``` + +如果一切顺利,你应该会看到: + +``` +[{'excerpt': "I recently discovered that Jekyll's config.yml can be used to" +"define custom variables for reusing content. I feel like I've" +'been living under a rock all this time. But to err over and over' +'again is human.', +'pub_date': 'Aug 2021', +'title': 'Using variables in Jekyll to define custom content'}, +{'excerpt': "In this article, I'll highlight some ideas for Jekyll" +'collections, blog category pages, responsive web-design, and' +'netlify.toml to make static website maintenance a breeze.', +'pub_date': 'Jul 2021', +'title': 'The evolution of ayushsharma.in: Jekyll, Bootstrap, Netlify,' +'static websites, and responsive design.'}, +{'excerpt': "These are the top 5 lessons I've learned after 5 years of" +'Terraform-ing.', +'pub_date': 'Jul 2021', +'title': '5 key best practices for sane and usable Terraform setups'}, + +... (truncated) +``` + +以上是全部内容!在这 22 行代码中,我们用 Python 构建了一个网络爬虫,你可以在[我的示例仓库中找到源代码][7]。 + +### 总结 + +对于 Python 列表中的网站内容,我们现在可以用它做一些很酷的事情。我们可以将它作为 JSON 返回给另一个应用程序,或者使用自定义样式将其转换为 HTML。随意复制粘贴以上代码并在你最喜欢的网站上进行试验。 + +玩的开心,继续编码吧。 + +* * * + +_本文最初发表在[作者个人博客][8]上,经授权改编。_ + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/9/web-scraping-python-beautiful-soup + +作者:[Ayush Sharma][a] +选题:[lujun9972][b] +译者:[MjSeven](https://github.com/MjSeven) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/ayushsharma +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_screen_windows_files.png?itok=kLTeQUbY (Computer screen with files or windows open) +[2]: https://notes.ayushsharma.in/technology +[3]: http://december.com/html/4/element/div.html +[4]: http://december.com/html/4/element/a.html +[5]: http://december.com/html/4/element/h5.html +[6]: http://december.com/html/4/element/small.html +[7]: https://gitlab.com/ayush-sharma/example-assets/-/blob/fd7d2dfbfa3ca34103402993b35a61cbe943bcf3/programming/beautiful-soup/fetch.py +[8]: https://notes.ayushsharma.in/2021/08/a-guide-to-web-scraping-in-python-using-beautifulsoup From c960989ec3a93cc5e92f8d9b0d7de551f3309dd3 Mon Sep 17 00:00:00 2001 From: MjSeven Date: Sun, 12 Dec 2021 19:49:34 +0800 Subject: [PATCH 164/244] Translating --- sources/tech/20211212 What is TTY in Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20211212 What is TTY in Linux.md b/sources/tech/20211212 What is TTY in Linux.md index 3521df9f5e..8e420ed11f 100644 --- a/sources/tech/20211212 What is TTY in Linux.md +++ b/sources/tech/20211212 What is TTY in Linux.md @@ -2,7 +2,7 @@ [#]: via: "https://itsfoss.com/what-is-tty-in-linux/" [#]: author: "Ankush Das https://itsfoss.com/author/ankush/" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "MjSeven" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 817fbb03eb4fdcf851180672d65711b0ea288831 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Mon, 13 Dec 2021 05:02:31 +0800 Subject: [PATCH 165/244] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211212=20?= =?UTF-8?q?Open=20source=203D=20pixel=20art=20with=20Goxel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211212 Open source 3D pixel art with Goxel.md --- ...212 Open source 3D pixel art with Goxel.md | 107 ++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 sources/tech/20211212 Open source 3D pixel art with Goxel.md diff --git a/sources/tech/20211212 Open source 3D pixel art with Goxel.md b/sources/tech/20211212 Open source 3D pixel art with Goxel.md new file mode 100644 index 0000000000..8c1221dcfd --- /dev/null +++ b/sources/tech/20211212 Open source 3D pixel art with Goxel.md @@ -0,0 +1,107 @@ +[#]: subject: "Open source 3D pixel art with Goxel" +[#]: via: "https://opensource.com/article/21/12/3d-pixel-art-goxel" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Open source 3D pixel art with Goxel +====== +Building models with Goxel is a lot of fun, like the best part of Lego +without the sharp edges and like Minecraft without the Creepers. +![Pixel art in 3D with Goxel][1] + +I make it no secret that I love Lego, but I've moved far away from my Lego collection, and shipping a closet full of classic Lego sets all the way around the world is currently a problematic proposal. I've done a lot of virtualization to solve this problem, from [building models in Lego CAD][2] to [styling models with a Lego texture in Blender][3]. Recently I discovered [Goxel][4]. This shockingly easy 3D modeling application makes no conceit of being Lego-based or even Lego-adjacent. Yet, the sensation of building models with 3D pixels is surprisingly similar to the satisfaction of building with Lego bricks. You can think of Goxel as a pixel paint program, but in 3D.  + +Goxel takes a unique approach to 3D modeling, and it's geared specifically to _low polygon_ modeling. This isn't the application to use if you're looking to sculpt life-like models. But if you like the aesthetic of Minecraft and other low poly art, then you need to try Goxel. + +### Install Goxel on Linux + +You can install Goxel as a [Flatpak][5] on Linux from [Flathub][6]. + +For Android, Windows macOS, and iOS, go to the [Goxel website][4] to download an installer. + +Goxel is open source, released under the GPLv3 license. + +### Painting with voxels + +When you first launch Goxel, you get an empty "room" or container in the middle of the Goxel window. This is your canvas. + +![The Goxel canvas][7] + +(Seth Kenlon, [CC BY-SA 4.0][8]) + +It's in this container and only within it that you'll build your models. In most 3D modeling applications, depth perception is an acquired skill, so Goxel constrains the space you have to work in to prevent you from ending up with models and model parts miles away from each other. Goxel also restricts your movements in a strict grid. You can move up and down along a Y-axis, right and left along an X-axis, and "near" and "far" along a Z-axis, but only in segments of one 3D pixel (or _voxel_, as they're called). For all intents and purposes, the voxels of Goxel are the virtual Lego bricks you use to build your model. + +There aren't many tools in Goxel, and that's a real feature for a 3D modeling application. By default, you've already got the pencil tool active, so you can start building right away by clicking your mouse any place within the voxel container. + +![Hello from Goxel][9] + +(Seth Kenlon, [CC BY-SA 4.0][8]) + +Try clicking around the container to see where a voxel gets added. Goxel makes it relatively easy to see where your pencil is about to add a voxel, and it treats voxels like bricks by assuming that when you're near an existing voxel, you want to connect your next voxel to it. Even so, 3D on a 2D screen is difficult. Sometimes voxels get added in a spot you didn't realize you were pointing at. The best way to ensure your voxels get added where you mean for them to get added is to rotate the container often. You can rotate the container using the arrow keys on your keyboard, or you can click and drag the middle-mouse button. A right-click and drag moves the container within the Goxel workspace, and the scroll-wheel of your mouse zooms in and out. + +### Planar markers + +There's another trick to aligning voxels that Goxel provides, and that's a guide in the form of a translucent and temporary plane. When you add a plane to your container, it creates a kind of force field through which your pencil cannot pass. + +![Goxel planar guide][10] + +(Seth Kenlon, [CC BY-SA 4.0][8]) + +The result is that you can safely paint along only two axes but not along the third. You can nudge the plane along the grid so that you're adding voxels in slices, much as a 3D printer adds to a physical model. + +Disable the **Visible** option in the plane controls to remove a plane. + +![Plane controls][11] + +(Seth Kenlon, [CC BY-SA 4.0][8]) + +### Goxel toolbar + +The top toolbar contains seven buttons. From left to right: + + * Undo + * Redo  + * Delete _everything without confirmation_ + * Add a voxel + * Subtract (remove) a voxel + * Paint a voxel + * Set the paint color + + + +You can paint in single voxels or use the shape tool to the left of the pencil to add regions of voxels all at once. + +In addition to removing voxels with the pencil, you can also use the laser tool to zap voxels as they appear on the 2D screen that is your computer monitor. The Laser tool, to the right of the shape tool, turns your cursor into a crosshair. Point it at a voxel you see and click on it to erase. + +### The tranquility of minimalism + +Goxel is intentionally simple, not just in what it produces but also in how it produces. I've only discussed the drawing tools of Goxel in this article. While there are other features, like the ability to control the pitch and yaw of the sun, the intensity of shadows, and the position of virtual cameras, the application strives to keep things simple and underwhelming in the best of ways. Building models with Goxel is a lot of fun, like the best part of Lego without the sharp edges and like Minecraft without the Creepers. Go get Goxel, and build some models! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/3d-pixel-art-goxel + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/uploads/header-image.jpg?itok=3MWdhreV (Pixel art in 3D with Goxel) +[2]: https://opensource.com/article/20/6/open-source-virtual-lego +[3]: https://opensource.com/article/20/7/lego-blender-bricker +[4]: https://goxel.xyz/ +[5]: https://opensource.com/article/21/11/install-flatpak-linux +[6]: https://flathub.org/apps/details/io.github.guillaumechereau.Goxel +[7]: https://opensource.com/sites/default/files/uploads/goxel-canvas.jpg (The Goxel canvas) +[8]: https://creativecommons.org/licenses/by-sa/4.0/ +[9]: https://opensource.com/sites/default/files/uploads/goxel-hello.jpg (Hello from Goxel) +[10]: https://opensource.com/sites/default/files/uploads/goxel-plane-guide.jpg (Goxel planar guide) +[11]: https://opensource.com/sites/default/files/uploads/goxel-plane-controls.jpg (Plane controls) From 70188eb68b1f1d7fcad3e96d1f80f632ce35c053 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 13 Dec 2021 08:48:47 +0800 Subject: [PATCH 166/244] translated --- ...stributed databases with ShardingSphere.md | 97 ------------------- ...stributed databases with ShardingSphere.md | 95 ++++++++++++++++++ 2 files changed, 95 insertions(+), 97 deletions(-) delete mode 100644 sources/tech/20211207 Learn more about distributed databases with ShardingSphere.md create mode 100644 translated/tech/20211207 Learn more about distributed databases with ShardingSphere.md diff --git a/sources/tech/20211207 Learn more about distributed databases with ShardingSphere.md b/sources/tech/20211207 Learn more about distributed databases with ShardingSphere.md deleted file mode 100644 index 6edf3e3402..0000000000 --- a/sources/tech/20211207 Learn more about distributed databases with ShardingSphere.md +++ /dev/null @@ -1,97 +0,0 @@ -[#]: subject: "Learn more about distributed databases with ShardingSphere" -[#]: via: "https://opensource.com/article/21/12/apache-shardingsphere" -[#]: author: "Trista Pan https://opensource.com/users/trista-pan" -[#]: collector: "lujun9972" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Learn more about distributed databases with ShardingSphere -====== -Apache ShardingSphere is an open source distributed database, plus an -ecosystem users and developers need for their database to provide a -customized and cloud-native experience. -![Cloud and databsae incons][1] - -Apache ShardingSphere is an open source distributed database, plus an ecosystem users and developers need for their database to provide a customized and cloud-native experience. In the three years since it joined the Apache Foundation, the ShardingSphere core team has worked hard with the community to create an open source, robust, and distributed database and a supporting ecosystem. - -ShardingSphere doesn't quite fit into the usual industry mold of a simple distributed database middleware solution. ShardingSphere recreates the distributed pluggable system, enabling actual user implementation scenarios to thrive and contributing valuable solutions to the community and the database industry. - -The aim of ShardingSphere is the _Database Plus_ concept. - -### Database Plus  - -Database Plus sets out to build a standard layer and an ecosystem layer above the fragmented database's basic services. A unified and standardized database usage specification provides for upper-level applications, and the challenges faced by businesses due to underlying databases fragmentation get minimized as much as possible. To link databases and applications, it uses traffic and data rendering and parsing. It provides users with enhanced core features, such as a distributed database, data security, database gateway, and stress testing. - -ShardingSphere uses a pluggable kernel architecture for Database Plus. That means there's modularity, which provides flexibility for the user. There are a few different layers: - - * **Foundation layer:** Provides a variety of access terminals and access forms to meet users' needs in different scenarios. - * **Plugin layer:** Provides infrastructure support by enabling extensibility. - * **Function layer:** Provides a variety of functional plugins that meet users' needs, allowing users a high degree of flexibility in plugin choice and combination. - * **Product layer:** This is the layer end users see. This provides them with industry-oriented and specific scenario-oriented products. In other words, it gives the users the right tools for whatever job they're doing. - - - -![Database Plus platform][2] - -(Trista Pan, [CC BY-SA 4.0][3]) - -### Standardized cluster management with DistSQL - -Apache ShardingSphere features the unique SQL dialect of DistSQL (distributed SQL) to connect all elements of the ShardingSphere ecosystem. As the standard interaction language of the ShardingSphere distributed database ecosystem, DistSQL allows users to use one SQL command to create, modify, or delete a distributed database table or encrypt or decrypt it. DistSQL also supports distributed scheduling management. - -![DistSQL][4] - -(Trista Pan, [CC BY-SA 4.0][3]) - -### Multi-access terminal - -ShardingSphere JDBC and ShardingSphere Proxy have been polished and tested for two years and are now available in production. Many community users provided relevant production community cases. - -Thanks to the shared core architecture, and different ShardingSphere adapters, users can choose hybrid adapter deployments if their production environment requires them to do so (shown in the figure below). - -![Hybrid deployment][5] - -(Trista Pan, [CC BY-SA 4.0][3]) - -### Distributed governance - -In the ShardingSphere ecosystem, where computing and storage are separated, there's the ability for distributed governance of databases so you can maintain many storage nodes, computing nodes, implement circuit breakers, and ensure high availability. - -![Distributed governance][6] - -(Trista Pan, [CC BY-SA 4.0][3]) - -### Monitoring with Grafana - -ShardingSphere also has status indicators to monitor your infrastructure. The agent dynamic loading mechanism provides you with metrics and tracing indicators, making it convenient to integrate the APM system with a Grafana dashboard. - -![Grafana dashboard][7] - -(Trista Pan, [CC BY-SA 4.0][3]) - -### Distributed database for a distributed community - -The community is continuing to optimize ShardingSphere and to integrate new ideas and industry scenarios. The community built it, and one of the main driving forces of development is user feedback. That's a feature of open source, but it's also a method of practice for this team. The core team members of the ShardingSphere community are happy to mentor anyone interested in open source and provide practice issues for students interested in helping in development. The team also hopes that new friends or contributors will join the community, promote the open exchange of ideas, and create a truly global developer community. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/12/apache-shardingsphere - -作者:[Trista Pan][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/trista-pan -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/bus_cloud_database.png?itok=lhhU42fg (Cloud and databsae incons) -[2]: https://opensource.com/sites/default/files/uploads/database-plus-platform.png (Database Plus platform) -[3]: tps://creativecommons.org/licenses/by-sa/4.0/ -[4]: https://opensource.com/sites/default/files/uploads/distsql.png (DistSQL) -[5]: https://opensource.com/sites/default/files/uploads/hybrid-deployment.png (Hybrid deployment) -[6]: https://opensource.com/sites/default/files/uploads/distributed-governance.png (Distributed governance) -[7]: https://opensource.com/sites/default/files/uploads/grafana-dashboard.png (Grafana dashboard) diff --git a/translated/tech/20211207 Learn more about distributed databases with ShardingSphere.md b/translated/tech/20211207 Learn more about distributed databases with ShardingSphere.md new file mode 100644 index 0000000000..40301cf50f --- /dev/null +++ b/translated/tech/20211207 Learn more about distributed databases with ShardingSphere.md @@ -0,0 +1,95 @@ +[#]: subject: "Learn more about distributed databases with ShardingSphere" +[#]: via: "https://opensource.com/article/21/12/apache-shardingsphere" +[#]: author: "Trista Pan https://opensource.com/users/trista-pan" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +了解更多关于 ShardingSphere 分布式数据库的信息 +====== +Apache ShardingSphere 是一个开源的分布式数据库,外加一个用户和开发人员需要的生态系统,为他们的数据库提供一个定制和云原生的体验。 +![Cloud and databsae incons][1] + +Apache ShardingSphere 是一个开源的分布式数据库,外加一个用户和开发人员需要的生态系统,为他们的数据库提供一个定制和云原生的体验。在加入 Apache 基金会的三年里,ShardingSphere 核心团队与社区一起努力工作,创建了一个开源的、强大的、分布式的数据库和一个支持性生态系统。 + +ShardingSphere 并不完全适合业界通常的简单分布式数据库中间件解决方案的模式。ShardingSphere 重新创建了分布式可插拔系统,使实际的用户实施方案得以蓬勃发展,并为社区和数据库行业贡献有价值的解决方案。 + +ShardingSphere 的目标是 _Database Plus_ 概念。 + +### Database Plus + +Database Plus 的出发点是在零散的数据库基本服务之上建立一个标准层和生态系统层。统一的、标准化的数据库使用规范为上层应用提供了保障,企业因底层数据库碎片化而面临的挑战也得到了尽可能的减少。为了连接数据库和应用,它使用了流量和数据渲染和解析。它为用户提供了增强的核心功能,如分布式数据库、数据安全、数据库网关和压力测试。 + +ShardingSphere 为 Database Plus 使用了可插拔的内核架构。这意味着有模块化,这为用户提供了灵活性。它有几个不同的层: + + **基础层:**提供各种访问终端和访问形式,满足用户在不同场景下的需求。 + **插件层:**通过实现可扩展性提供基础设施支持。 + **功能层:**提供各种满足用户需求的功能插件,使用户在选择和组合插件时具有高度的灵活性。 + **产品层:**这是终端用户看到的层。这为他们提供了面向行业和特定场景的产品。换句话说,它为用户提供了适合他们所做的任何工作的工具。 + + + +![Database Plus platform][2] + +(Trista Pan, [CC BY-SA 4.0][3]) + +### 用 DistSQL 进行标准化的集群管理 + +Apache ShardingSphere 采用独特的 SQL 方言 DistSQL(分布式 SQL)来连接 ShardingSphere 生态系统的所有元素。作为 ShardingSphere 分布式数据库生态系统的标准交互语言,DistSQL 允许用户使用一个 SQL 命令来创建、修改或删除分布式数据库表或对其进行加密或解密。DistSQL 还支持分布式调度管理。 + +![DistSQL][4] + +(Trista Pan, [CC BY-SA 4.0][3]) + +### 多访问终端 + +ShardingSphere JDBC 和 ShardingSphere Proxy 经过两年的打磨和测试,目前已经可以投入生产。许多社区用户提供了相关的生产社区案例。 + +多亏共享核心架构,以及不同的 ShardingSphere 适配器,如果用户的生产环境需要,可以选择混合适配器部署(如下图所示)。 + +![Hybrid deployment][5] + +(Trista Pan, [CC BY-SA 4.0][3]) + +### 分布式治理 + +在 ShardingSphere 生态系统中,计算和存储是分开的,因此有能力对数据库进行分布式治理,所以你可以维护许多存储节点、计算节点,实施断路器,并确保高可用性。 + +![Distributed governance][6] + +(Trista Pan, [CC BY-SA 4.0][3]) + +### 使用 Grafana 监控 + +ShardingSphere 也有状态指标来监控你的基础设施。代理动态加载机制为你提供了指标和跟踪指标,方便您将 APM 系统与 Grafana 仪表板集成。 + +![Grafana dashboard][7] + +(Trista Pan, [CC BY-SA 4.0][3]) + +### 分布式社区的分布式数据库 + +社区正在继续优化 ShardingSphere,并整合新的想法和行业场景。社区构建了它,而开发的主要动力之一是用户反馈。这是开源的一个特点,但也是这个团队的实践方法。ShardingSphere 社区的核心团队成员很乐意指导任何对开源感兴趣的人,并为有兴趣帮助开发的学生提供实践问题。团队也希望有新的朋友或贡献者加入社区,促进思想的开放交流,创造一个真正的全球开发者社区。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/apache-shardingsphere + +作者:[Trista Pan][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/trista-pan +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/bus_cloud_database.png?itok=lhhU42fg (Cloud and databsae incons) +[2]: https://opensource.com/sites/default/files/uploads/database-plus-platform.png (Database Plus platform) +[3]: tps://creativecommons.org/licenses/by-sa/4.0/ +[4]: https://opensource.com/sites/default/files/uploads/distsql.png (DistSQL) +[5]: https://opensource.com/sites/default/files/uploads/hybrid-deployment.png (Hybrid deployment) +[6]: https://opensource.com/sites/default/files/uploads/distributed-governance.png (Distributed governance) +[7]: https://opensource.com/sites/default/files/uploads/grafana-dashboard.png (Grafana dashboard) From 02228c4e6bc93a97bede594959bb5852c4ccd376 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 13 Dec 2021 08:51:15 +0800 Subject: [PATCH 167/244] translating --- .../20211210 Reveal your source code with Jinja2 and Git.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20211210 Reveal your source code with Jinja2 and Git.md b/sources/tech/20211210 Reveal your source code with Jinja2 and Git.md index 7b63ff53fc..1dc1cb646d 100644 --- a/sources/tech/20211210 Reveal your source code with Jinja2 and Git.md +++ b/sources/tech/20211210 Reveal your source code with Jinja2 and Git.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/21/12/reveal-source-code-jinja2-git" [#]: author: "Ayush Sharma https://opensource.com/users/ayushsharma" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 6d17ebb1a7245d2cbea840f7ac33836aa7199c8a Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 13 Dec 2021 09:56:56 +0800 Subject: [PATCH 168/244] PRF&PUB @geekpi https://linux.cn/article-14077-1.html --- ...07 Compose music as code using Sonic Pi.md | 124 +++++++++++++++++ ...07 Compose music as code using Sonic Pi.md | 130 ------------------ 2 files changed, 124 insertions(+), 130 deletions(-) create mode 100644 published/20200307 Compose music as code using Sonic Pi.md delete mode 100644 translated/tech/20200307 Compose music as code using Sonic Pi.md diff --git a/published/20200307 Compose music as code using Sonic Pi.md b/published/20200307 Compose music as code using Sonic Pi.md new file mode 100644 index 0000000000..d227c83044 --- /dev/null +++ b/published/20200307 Compose music as code using Sonic Pi.md @@ -0,0 +1,124 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14077-1.html) +[#]: subject: (Compose music as code using Sonic Pi) +[#]: via: (https://opensource.com/article/20/3/sonic-pi) +[#]: author: (Matt Bargenquast https://opensource.com/users/mbargenquast) + +使用 Sonic Pi 像写代码一样编曲 +====== + +> 有了这个易于使用的开源程序,不需要掌握乐器,就可以把你变成一个音乐大师。 + +![](https://img.linux.net.cn/data/attachment/album/202112/13/095540zigm4pzopgrdevvz.jpg) + +也许你和我一样,在上学的时候学过一种乐器。对我来说,那是钢琴,后来是中提琴。然而,我一直认为,随着我童年的兴趣转向计算机和编码,我后来忽略了音乐练习。我确实想知道,如果我年轻时有 Sonic Pi 这样的东西,我会怎么样。Sonic Pi 是一个开源程序,可以让你通过代码来创作和演奏音乐。它是这两个世界的完美结合。 + +我们对 Sonic Pi 并不陌生,早在 2015 年就对其创造者 Sam Aaron 博士 [进行了采访][2]。从那时起,Sonic Pi 在很多方面都有了很大的发展。它达到了一个重要的新版本里程碑,期待已久的 v3.2 版本已于 2020 年 2 月 28 日公开发布。一个不断壮大的开发者社区正积极为其 [GitHub 项目][3] 做出贡献,而在 [官方论坛][4] 中有一个同样繁荣的作曲家社区可以分享想法和提供支持。该项目现在还通过 [赞助活动][5] 获得了资金支持,而 Sam 本人也在世界各地的学校、会议和研讨会中传播 Sonic Pi 的信息。 + +Sonic Pi 真正的闪光点在于它的平易近人。它的版本适用于许多主要的操作系统,包括 Windows、macOS、Linux,当然也包括树莓派本身。事实上,在树莓派上学习使用 Sonic Pi 再简单不过了。它预装在 [Raspbian][6] 中,所以如果你有一个基于 Raspbian 的现有环境,你会发现它位于编程菜单中。 + +第一次加载 Sonic Pi 时,你会看到一个简单的界面,有两个主要的区域:一个编辑器,可以写你的代码,还有一个区域专用于 Sonic Pi 丰富的教程。对于新手来说,教程是学习基础知识的重要资源,它有配套的音乐程序来巩固所学的每个概念。 + +如果你跟着学习,让我们为自己编写一段简单的音乐,探索现场编码音乐的潜力。将以下代码输入或粘贴到 Sonic Pi 编辑器中: + +``` +live_loop :beat do + sample :drum_heavy_kick + sleep 1 +end +``` + +即使你是一个 Sonic Pi 的新手,许多程序员可能马上就会明白这里发生了什么。我们正在播放一个踏板鼓drum kick采样,停止一秒钟,然后重复。点击运行按钮或按 `ALT+R`(macOS 上为 `meta+R`),你应该听到它开始播放。 + +这不是一首非常激动人心的歌曲,所以让我们用一个在不合拍的小鼓snare来使它生动起来。用下面的代码块替换现有的代码,然后再次运行。你可以在做这个的时候让现有的节拍继续播放;你会注意到你的改动会自然地应用,与节拍同步: + +``` +live_loop :beat do + sample :drum_heavy_kick + sleep 0.5 + sample :drum_snare_soft + sleep 0.5 +end +``` + +我们在做这个的时候,让我们在每四拍之前添加一个踩镲hi-hat,让声音变得有趣一些。在现有的程序块下面添加新的程序块,然后再次运行: + +``` +live_loop :hihat do + sleep 3.9 + sample :drum_cymbal_closed + sleep 0.1 +end +``` + +我们现在已经有了我们的节拍,所以让我们来添加一个低音声线bassline!Sonic Pi 内置了各种合成器,还有混响和失真等效果滤波器。我们将使用 “dsaw” 和 “tech_saw” 合成器的组合,使其具有电子复古合成器的感觉。将下面的块添加到你现有的程序中,运行,并听一听: + +``` +live_loop :bass do + use_synth :dsaw + play :a2, attack: 1, release: 2, amp: 0.3 + sleep 2.5 + use_synth :tech_saws + play :a1, attack: 1, release: 1.5, amp: 0.8 + sleep 1.5 +end +``` + +你会注意到上面的内容,当播放音符时,我们可以完全控制 [ADSR][7] 包络envelope,所以我们可以决定每个声音何时达到峰值和衰减。 + +最后,让我们添加一个主音合成器lead synth,试试那些被称为“切片器slicer”的效果特征。为了使事情更有趣,我们还将引入一个伪随机的元素,让 Sonic Pi 从一系列潜在的和弦chord中挑选。这就是一些有趣的即兴创作和“快乐的意外”可以开始发生的地方。在你现有的程序中加入下面的程序块并运行: + +``` +live_loop :lead do + with_fx :slicer do + chords = [(chord :A4, :minor7), (chord :A4, :minor), (chord :D4, :minor7), (chord :F4, :major7)] + use_synth :blade + play chords.choose, attack: 1, release: 2, amp: 1 + sleep 2 + end +end +``` + +很好!现在,我们当然不会很快与 Daft Punk 竞争,但希望通过这个过程,你已经看到我们如何通过添加一些简单的代码,实时地从一个单一节拍变成更大的东西。YouTube 上 Sam Aaron 的 [现场编码表演][8] 非常值得一看,它展示了 Sonic Pi 可以让你有多大的创造力和适应力。 + +![Sonic Pi composition example][9] + +*我们完成的作品,完整版* + +如果你曾经想学习一种乐器,但又觉得被“我没有节奏感”或“我的手不够灵活”这样的想法所束缚,Sonic Pi 是一种多功能的乐器,这些都不重要。你所需要的只是想法和灵感,以及一台便宜的电脑,如简陋的树莓派。其余的都在你的指尖上(实际意义上的)。 + +这里有几个方便的链接可以让你开始: + + * 官方 Sonic Pi [网站][10] 和 [教程][11] + * [Sonic Pi 入门][12] + * Sonic Pi 的 [GitHub 项目][3] + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/3/sonic-pi + +作者:[Matt Bargenquast][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/mbargenquast +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/music-birds-recording-520.png?itok=UoM7brl0 (Bird singing and music notes) +[2]: https://opensource.com/life/15/10/interview-sam-aaron-sonic-pi +[3]: https://github.com/samaaron/sonic-pi/ +[4]: https://in-thread.sonic-pi.net/ +[5]: https://www.patreon.com/samaaron +[6]: https://www.raspberrypi.org/downloads/raspbian/ +[7]: https://en.wikipedia.org/wiki/Envelope_(music) +[8]: https://www.youtube.com/watch?v=JEHpS1aTKp0 +[9]: https://opensource.com/sites/default/files/uploads/sonicpi.png (Sonic Pi composition example) +[10]: https://sonic-pi.net/ +[11]: https://sonic-pi.net/tutorial.html +[12]: https://projects.raspberrypi.org/en/projects/getting-started-with-sonic-pi +[13]: http://projects.raspberrypi.org diff --git a/translated/tech/20200307 Compose music as code using Sonic Pi.md b/translated/tech/20200307 Compose music as code using Sonic Pi.md deleted file mode 100644 index 3f54bc5fc5..0000000000 --- a/translated/tech/20200307 Compose music as code using Sonic Pi.md +++ /dev/null @@ -1,130 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Compose music as code using Sonic Pi) -[#]: via: (https://opensource.com/article/20/3/sonic-pi) -[#]: author: (Matt Bargenquast https://opensource.com/users/mbargenquast) - -使用 Sonic Pi 将音乐编成代码 -====== -有了这个易于使用的开源程序,不需要掌握乐器,就可以把你变成一个音乐大师。 -![Bird singing and music notes][1] - -也许你和我一样,在上学的时候学过一种乐器。对我来说,那是钢琴,后来是中提琴。然而,我一直认为,随着我童年的兴趣转向计算机和编码,我后来忽略了音乐练习。我确实想知道,如果我年轻时有 Sonic Pi 这样的东西,我会怎么做。Sonic Pi 是一个开源程序,可以让你通过代码本身来创作和演奏音乐。它是这两个世界的完美结合。 - -Opensource.com 对 Sonic Pi 并不陌生,我们早在 2015 年就对其创造者 Sam Aaron 博士[进行了采访][2]。从那时起,很多事情都发生了变化,Sonic Pi 在很多方面都有了很大的发展。它达到了一个重要的新版本里程碑,期待已久的 v3.2 版本已于 2020 年 2 月 28 日公开发布。一个不断壮大的开发者社区正积极为其 [GitHub 项目][3]做出贡献,而一个同样繁荣的作曲家社区则在[官方论坛][4]中分享想法和支持。该项目现在还通过[赞助活动][5]获得了资金支持,而 Sam 本人也在世界各地的学校、会议和研讨会中传播 Sonic Pi 的信息。 - -Sonic Pi 真正的闪光点在于它的平易近人。它的版本适用于许多主要的操作系统,包括 Windows、macOS、Linux,当然也包括树莓派本身。事实上,在树莓派上开始使用 Sonic Pi 再简单不过了。它预装了[Raspbian][6],所以如果你有一个基于 Raspbian 的现有设置,你会发现它位于编程菜单中。 - -第一次加载 Sonic Pi 时,你会看到一个简单的界面,有两个主要的区域:一个编辑器,可以写你的代码,还有一个区域是 Sonic Pi 的扩展教程。对于新手来说,教程是学习基础知识的重要资源,它有配套的音乐程序来巩固所学的每个概念。 - -如果你正在学习,让我们为自己编写一段简单的音乐,探索现场编码音乐的潜力。将以下代码输入或粘贴到 Sonic Pi 编辑器中: - - -``` -live_loop :beat do - sample :drum_heavy_kick - sleep 1 -end -``` - -即使你是一个 Sonic Pi 的新手,许多程序员可能马上就会明白这里发生了什么。我们正在播放一个踏板鼓样例,睡眠一秒钟,然后重复。点击运行按钮或按 ALT+R(macOS 上为 meta+R),你应该听到它开始播放。 - -这还不是一首非常激动人心的歌曲,所以让我们用一个在非拍子上演奏的小鼓来使它生动起来。用下面的代码块替换现有的代码,然后再次运行。你可以在做这个的时候让现有的节拍继续播放;你会注意到你的改动会自然地应用,与节拍同步: - - -``` -live_loop :beat do - sample :drum_heavy_kick - sleep 0.5 - sample :drum_snare_soft - sleep 0.5 -end -``` - -我们在做这个的时候,让我们在每四拍之前添加一个踩镲,让声音变得有趣一些。在现有的程序块下面添加新的程序块,然后再次运行: - - -``` -live_loop :hihat do - sleep 3.9 - sample :drum_cymbal_closed - sleep 0.1 -end -``` - -我们现在已经有了我们的节拍,所以让我们来添加一个基调! Sonic Pi 内置了各种合成器,还有混响和失真等效果滤波器。我们将使用 “dsaw” 和 “tech_saw” 合成器的组合,使其具有电子复古合成器的感觉。将下面的块添加到你现有的程序中,运行,并听一听: - - - -``` -live_loop :bass do - use_synth :dsaw - play :a2, attack: 1, release: 2, amp: 0.3 - sleep 2.5 - use_synth :tech_saws - play :a1, attack: 1, release: 1.5, amp: 0.8 - sleep 1.5 -end -``` - -你会注意到上面的内容,当播放音符时,我们可以完全控制[ADSR][7]包络,所以我们可以决定每个声音何时达到峰值和衰减。 - -最后,让我们添加一个主音合成器,试试那些被称为“切片机”的效果特征。为了使事情更有趣,我们还将引入一个伪随机的元素,让 Sonic Pi 从一系列潜在的和弦中挑选。这就是一些有趣的即兴创作和“快乐的意外”可以开始发生的地方。在你现有的程序中加入下面的程序块并运行: - - -``` -live_loop :lead do - with_fx :slicer do - chords = [(chord :A4, :minor7), (chord :A4, :minor), (chord :D4, :minor7), (chord :F4, :major7)] - use_synth :blade - play chords.choose, attack: 1, release: 2, amp: 1 - sleep 2 - end -end -``` - -很好!现在,我们当然不会很快与 Daft Punk 竞争,但希望通过这个过程,你已经看到我们如何通过添加一些简单的代码,实时地从一个单一节拍变成更大的东西。在 YouTube 上观看 Sam Aaron 的[现场编码表演][8]是非常值得的,它展示了 Sonic Pi 可以让你有多大的创造力和适应力。 - -![Sonic Pi composition example][9] - -我们完成的作品,完整版 - -如果你曾经想学习一种乐器,但又觉得被“我没有节奏感”或“我的手不够灵活”这样的想法所束缚,Sonic Pi 是一种多功能的乐器,这些都不重要。你所需要的只是想法和灵感,以及一台便宜的电脑,如简陋的树莓派。事实上,其余的都在你的指尖上。 - -这里有几个方便的链接可以让你开始: - - * 官方 Sonic Pi [网站][10]和[教程][11] - * [Sonic Pi 入门][12]([projects.raspberrypi.org][13]) - * Sonic Pi 的 [Github 项目][3] - - - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/3/sonic-pi - -作者:[Matt Bargenquast][a] -选题:[lujun9972][b] -译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/mbargenquast -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/music-birds-recording-520.png?itok=UoM7brl0 (Bird singing and music notes) -[2]: https://opensource.com/life/15/10/interview-sam-aaron-sonic-pi -[3]: https://github.com/samaaron/sonic-pi/ -[4]: https://in-thread.sonic-pi.net/ -[5]: https://www.patreon.com/samaaron -[6]: https://www.raspberrypi.org/downloads/raspbian/ -[7]: https://en.wikipedia.org/wiki/Envelope_(music) -[8]: https://www.youtube.com/watch?v=JEHpS1aTKp0 -[9]: https://opensource.com/sites/default/files/uploads/sonicpi.png (Sonic Pi composition example) -[10]: https://sonic-pi.net/ -[11]: https://sonic-pi.net/tutorial.html -[12]: https://projects.raspberrypi.org/en/projects/getting-started-with-sonic-pi -[13]: http://projects.raspberrypi.org From 307de6a80b2572419b7519b030f45263df0f4bf4 Mon Sep 17 00:00:00 2001 From: jrg Date: Mon, 13 Dec 2021 11:36:39 +0800 Subject: [PATCH 169/244] Create 20211208 Linux Jargon Buster- What is a Cron Job in Linux.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 翻译完成,怎么就pull request不上,检查不成功呢? 未知错误,尝试对一个文件操作?这不是对一个文件操作的嘛 --- ...gon Buster- What is a Cron Job in Linux.md | 175 ++++++++++++++++++ 1 file changed, 175 insertions(+) create mode 100644 translated/tech/20211208 Linux Jargon Buster- What is a Cron Job in Linux.md diff --git a/translated/tech/20211208 Linux Jargon Buster- What is a Cron Job in Linux.md b/translated/tech/20211208 Linux Jargon Buster- What is a Cron Job in Linux.md new file mode 100644 index 0000000000..80c882ba6e --- /dev/null +++ b/translated/tech/20211208 Linux Jargon Buster- What is a Cron Job in Linux.md @@ -0,0 +1,175 @@ +[#]: subject: "Linux Jargon Buster: What is a Cron Job in Linux?" +[#]: via: "https://itsfoss.com/cron-job/" +[#]: author: "Hunter Wittenborn https://itsfoss.com/author/hunter/" +[#]: collector: "lujun9972" +[#]: translator: "jrglinux" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +# Linux 中的定时任务(Cron Job)介绍 + +在本期的《`Linux Jargon Buster`系列》文章中,你将了解到 `Linux` 中的 `cron` 定时任务功能。你将通过学习编辑 `crontab` 文件来创建 `cron jobs`(定时任务,译注:为保持原味,这样的术语就不翻译,读者知道即可)。 + + + +### 何为 Linux cron job + +`Cron` 是一个用于按计划运行短小且快速命令的实用命令行工具。该工具是一个方便、经典的系统管理工具,通过和其他工具结合使用可以自动运行各式各样的任务。比如,有些人通过 `rsync` 和 `cron` 结合使用,在特定的时间自动创建每日备份和每周备份。也有些人使用 `cron` 来分析服务器日志,并且结合邮件系统功能,在日志检测到错误时自动发送告警邮件。 + +`Cron` 就如同”瑞士军刀“一样,可以多场景多样化使用。尽可能发挥你的想象,去挖掘它的功能。 + +其实很容易上手 `cron` 使用,只需要几秒钟。不过在我们开始上手之前,先来讨论下几个经常容易混淆的概念。 + + + +### Cron vs cron job vs crontab + +有三个术语比较容易混淆:`cron`,`cron job` 和 `crontab`,让我们来看看它们的含义: + +| 术语 | 含义 | +| ------------ | ------------------------------------------------------------ | +| cron | 这是安装在系统上的实际执行定时任务的[daemon][1] | +| cron job | 一个 `Linux job` 是指一段起来并运行的程序。`Cron` 进程可以按照约定的时间计划运行各种任务,这样的任务通常叫做`"cron jobs"`(定时任务) | +| [crontab][2] | 这是一个文件,用于定义定时任务。一个 `crontab` 文件可以通过表格形式(每一行就是一个定时任务)定义多个定时任务 | + +来看一个简单例子:创建一个 `cron job`,每小时向` crontabl_log.tx`t 文件打印 `"Linux is cool!" `。 + +```shell +0 * * * * echo "Linux is Cool!" >> ~/crontab_log.txt +``` + +是不是这么个简单 `cron job` 例子都让你感到惊恐,这是因为你需要懂得如何去读懂一个定时任务的属性。 + +我将在后文中讲述这个基础理论知识。 + + + +### 上手 Cron + +我们通过另一个例子来看看 `Cron` 如何工作。 + +为了创建 `Cron jobs`,或者是 `cron` 将要执行的命令任务,你只需要运行: + +```shell +crontab -e +``` + +这将会打开一个文件,用于编辑 `cron jobs`: + +![Crontab default view][3] + +其中,所有以 `#` 开头的行都是注释,用于指导你如何使用 `cron`,如果觉得没用可以删除它们。 + +我们将创建如下任务,作为我们的第一个 `cron job`: + +```shell +* * * * * touch ~/crontab_test +``` + +让我快速看看该任务将会做什么: + +Cron jobs 都是以 `分钟 小时 天 月 周 命令`形式呈现`(minute hour day month week command)`。 + +* 分钟(`minute)`是指该任务在哪一分钟会被执行。所以,该值为 `0` 则代表在每个小时开始运行,`5` 则代表在每个小时的第5分钟会运行。 +* 小时(`hour`)是指该任务在一天中的哪个小时会被执行,取值范围为 `0-23`。没有 `24` 的原因是 `23` 时的末尾是半夜 `11:59`,然后就是每天的开始 `0` 时。`minutes` 的取值范围定义逻辑与之类似。 +* 天(`day`)是指一个月中的哪一天执行该任务,取值范围是 `1-31`(不同于前面的分钟和小时从 `0` 开始取值)。 +* 月(`month`)是指该任务在哪个月被执行,取值范围是 `1-12`。 +* 周(`week`)是指该任务在星期几被执行,从 `Sunday` 开始算起,取值范围是`0-6`。 +* 命令(`command`),则是你想要运行的命令任务。 + +![][4] + +如果想对 "分钟 小时 天 月 周" 部分有更详细的理解,可以参考 [Crontab guru 网站][5],该网站可以帮助理解正在执行什么。 + +下面之前的例子 *** * * * * touch ~/crontab_test**,每分钟创建 `~/crontab_test`文件。 + +让我们将该任务编辑进 `crontab` 然后看看执行结果: + +![][6] + +等到下一分钟,你就会发现你的 `home` 路径下多了文件 `crontab_test`: + +![][7] + +这便是 `cron` 的基础应用示例。 + + + +### 一个实用的 cron job 示例 + +假设你想创建一个脚本,用于拷贝多个目录内容到一个路径并打包作为备份,该如何实现? + +通过 `cron` 定时任务就可以很容易实现该功能。 + +请看如下脚本: + +```shell +#!/usr/bin/bash +echo "Backing up..." +mkdir -p ~/.local/tmp/ +tar -Pc ~/Documents/ -f ~/.local/tmp/backup.gz +``` + +该脚本做了如下事情: + +1. 确保备份路径目录 `~/.local/tmp/` 存在。 +2. 将目录 `~/Documents/` 下的所有内容打包至文件 `~/.local/tmp/backup.gz`。 + +我们先来手动运行该脚本,看看它到底如何工作。 + +首先,我们在 `~` 目录下创建该脚本,命令为 `backup_script`,如下图所示: + +![][8] + +然后编辑 `backup_script` 脚本,写入上面那个脚本代码。 + +接着,赋予 `backup_script` 可执行权限: + +![][9] + +最后运行脚本 `~/backup_script`,进行功能验证: + +![][10] + +你可以通过运行命令 `tar -xf ~/.local/tmp/backup.gz -C ` 来进行备份恢复,这里 `` 是指文件要恢复到的路径目录。 + +接下来,就可以用 `cron` 工具来进行定时任务运行该脚本了。 + +举个例子,假设需要每天的凌晨 3 点运行该备份脚本,你可以在 `crontab` 中输入如下命令: + +```shell +* 3 * * * ~/backup_script +``` + +这样你就可以每天自动进行备份操作了。 + + + +### 后记 + +本文简单介绍了 `cron jobs` 定时任务功能。尽管我不确定 Linux 桌面用户使用该功能多不多,但我知道 `cron job` 定时任务功能被许多系统管理员广泛应用。如果你有什么想法,欢迎在评论区留言。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/cron-job/ + +作者:[Hunter Wittenborn][a] +选题:[lujun9972][b] +译者:[jrglinux](https://github.com/jrglinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/hunter/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/linux-daemons/ +[2]: https://linuxhandbook.com/crontab/ +[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/crontab-file.webp?resize=800%2C673&ssl=1 +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/crontab-explanation.webp?resize=800%2C450&ssl=1 +[5]: https://crontab.guru/ +[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/cron-example-1.webp?resize=557%2C241&ssl=1 +[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/result-of-cron-job.webp?resize=557%2C241&ssl=1 +[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/complex-cron-example.webp?resize=548%2C295&ssl=1 +[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/complex-cron-example-1.webp?resize=548%2C385&ssl=1 +[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/complex-cron-result.png?resize=800%2C220&ssl=1 From 59120db51c2bd90af079cda6c007c81b73158cab Mon Sep 17 00:00:00 2001 From: jrg Date: Mon, 13 Dec 2021 11:39:49 +0800 Subject: [PATCH 170/244] Delete 20211208 Linux Jargon Buster- What is a Cron Job in Linux.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 翻译完成 --- ...gon Buster- What is a Cron Job in Linux.md | 177 ------------------ 1 file changed, 177 deletions(-) delete mode 100644 sources/tech/20211208 Linux Jargon Buster- What is a Cron Job in Linux.md diff --git a/sources/tech/20211208 Linux Jargon Buster- What is a Cron Job in Linux.md b/sources/tech/20211208 Linux Jargon Buster- What is a Cron Job in Linux.md deleted file mode 100644 index 93862cb074..0000000000 --- a/sources/tech/20211208 Linux Jargon Buster- What is a Cron Job in Linux.md +++ /dev/null @@ -1,177 +0,0 @@ -[#]: subject: "Linux Jargon Buster: What is a Cron Job in Linux?" -[#]: via: "https://itsfoss.com/cron-job/" -[#]: author: "Hunter Wittenborn https://itsfoss.com/author/hunter/" -[#]: collector: "lujun9972" -[#]: translator: "jrg" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Linux Jargon Buster: What is a Cron Job in Linux? -====== - -In this part of our Linux Jargon Buster series, you’ll learn about cron in Linux. You’ll also learn the basics of creating cron jobs by editing crontab. - -### What is a cron job in Linux? - -Cron is a command line utility to run small and quick commands on a scheduled basis. This is a handy, classic sysadmin tool for automating various tasks by combining it with othe tools. For example, some people combine rsync and cron to automatically create a daily or weekly backup at a certain time. Some people use it to analyze server logs and combine it with mail function to send an email if there is certain kind of error detected in the logs. - -Cron is like the Swiss army knife. It can be used for a variety of use cases. It’s really up to your imagination on what to use it for. - -Getting started with cron is super easy, and only takes a matter of seconds to get started. But before I show you that, I’ll discuss something else that often confuses Linux users. - -### Cron vs cron job vs crontab - -You are likely to come across three terms that sound similar to each other: cron, cron job and crontab. Let me quickly tell you what are those: - -cron: This is the actual program you install on your system and run as a [daemon][1]. - -cron job: A job in Linux is a program that is up and running. Cron can handle multiple tasks and run them at their scheduled time. Each of these tasks are referred to as ‘cron jobs’. - -[crontab][2]: This is the file (and command) where you define what task to run and how often to run it. A crontab can have multiple cron jobs in it in a tabular form where each row is a cron job. - -Let me share a sample cron job example that runs every hour and prints “Linux is cool!” to a file name crontab_log.txt. - -``` - - 0 * * * * echo "Linux is Cool!" >> ~/crontab_log.txt - -``` - -Even the simplest of the cron job may look scary and intimidating. This is because you need to know how to read a cron job properly. - -I’ll take this theoretical knowledge of cron to the next level in the next section. - -### Getting started with Cron - -Let’s start with (another) simple example of how Cron works. - -To create Cron jobs, or the commands that cron will execute, you simply run: - -``` - - crontab -e - -``` - -It will pull up a file to edit cron jobs with: - -![Crontab default view][3] - -All the lines that start with `#` (that being all the lines) only serve to help guide you on how to use cron, and can be removed if you don’t need them. - -We’ll be using the following as our first Cron job though: - -``` - - * * * * * touch ~/crontab_test - -``` - -Let’s go through what that will do real quick: - -Cron jobs come in the form `minute hour day month week command`. - - * **minute** in this context simply means what minutes of an hour the job will run. So specifying `0` would run at the very beginning of an hour, and specifying `5` would run on the fifth minute of an hour. - * Next, the **hour** declaration specified what hours of a day a job can run, ranging from values 0-23. The reason there isn’t a 24th hour option here is that `23` goes to the very end of what would be 11:59, at which point your at midnight, or hour `0` of the next day. This same logic applies to the `minute` declaration mentioned previously. - * **day** specifies what day of a month a job can run on, that being 1-31 (unlike the previous examples which started on `0`). - * **month** specifies which months of the year a job can run on, and takes values ranging from 1-12. - * Lastly, **week** specifies which days of the week a job runs on, starting on Sunday, with values from 0-6, unlike the last two. - - - -You then specify **command** which is just the command you want to run. - -![][4] - -If you want more help understanding the minute hour day month week part, I’d highly recommend the [Crontab guru][5] website, which can greatly help break down what exactly is going on: - -Following the previous example of *** * * * * touch ~/crontab_test** though, you’ll simply be running touch ~/crontab_test every minute. - -Let’s put that into the crontab and then see it in action: - -![][6] - -If you then wait until the next minute, you’ll see the crontab_test file located in your home directory: - -![][7] - -And that’s the basics to using cron! - -### A useful example of cron job - -That was far too simple (and useless probably). - -Say you want to do something a bit more complex, say a backup script that needs to copy files from multiple directories on your system into a single folder, and then archives that backup into a single file. - -This can be easily done by simply putting our commands into a script, which can then in turn be called by cron. - -Let’s use the following script as an example: - -``` - - #!/usr/bin/bash - echo "Backing up..." - mkdir -p ~/.local/tmp/ - tar -Pc ~/Documents/ -f ~/.local/tmp/backup.gz - -``` - -This script does the following things: - - 1. Makes sure the ~/.local/tmp/backup_dir directory exists on the system. - 2. Puts everything from ~/Documents/ into an archive located at ~/.local/tmp/backup.gz. - - - -Let’s run the script manually first so we can see that it actually works. - -First, let’s put the script at ~/backup_script like so: - -![][8] - -Then just copy the script contents that were shown above into the file. - -You then need to tell the system that our script is allowed to be executed by simply running chmod +x ~/backup_script: - -![][9] - -You can then test run our script by running ~/backup_script.sh, which simply tells our system the path to our script: - -![][10] - -You could then restore this backup by just running tar -xf ~/.local/tmp/backup.gz -C output_dir, where output_dir is the directory to save the files to. - -This script can now run on a scheduled basis by using Cron! - -For example, if you wanted the script to run daily at 3 a.m., you could use the following syntax in cron: - -And then you’d have backups being created on a daily basis. - -### Wrapping Up - -And that’s just the introduction to cron jobs. It is widely used by the sysadmins though I am not sure of many usecases for desktop Linux users. If you do, please suggest some in the comment section. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/cron-job/ - -作者:[Hunter Wittenborn][a] -选题:[lujun9972][b] -译者:[jrglinux](https://github.com/jrglinux) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/hunter/ -[b]: https://github.com/lujun9972 -[1]: https://itsfoss.com/linux-daemons/ -[2]: https://linuxhandbook.com/crontab/ -[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/crontab-file.webp?resize=800%2C673&ssl=1 -[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/crontab-explanation.webp?resize=800%2C450&ssl=1 -[5]: https://crontab.guru/ -[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/cron-example-1.webp?resize=557%2C241&ssl=1 -[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/result-of-cron-job.webp?resize=557%2C241&ssl=1 -[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/complex-cron-example.webp?resize=548%2C295&ssl=1 -[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/complex-cron-example-1.webp?resize=548%2C385&ssl=1 -[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/complex-cron-result.png?resize=800%2C220&ssl=1 From 30eefe4510d1a8c7a83a3a237bcf40d7566a914d Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 13 Dec 2021 23:16:36 +0800 Subject: [PATCH 171/244] PRF&PUB @geekpi https://linux.cn/article-14079-1.html --- ...or- Open Source Graphical Modeling Tool.md | 38 ++++++++----------- 1 file changed, 16 insertions(+), 22 deletions(-) rename {translated/tech => published}/20211207 Gaphor- Open Source Graphical Modeling Tool.md (62%) diff --git a/translated/tech/20211207 Gaphor- Open Source Graphical Modeling Tool.md b/published/20211207 Gaphor- Open Source Graphical Modeling Tool.md similarity index 62% rename from translated/tech/20211207 Gaphor- Open Source Graphical Modeling Tool.md rename to published/20211207 Gaphor- Open Source Graphical Modeling Tool.md index e3c775aa94..a04208e9a7 100644 --- a/translated/tech/20211207 Gaphor- Open Source Graphical Modeling Tool.md +++ b/published/20211207 Gaphor- Open Source Graphical Modeling Tool.md @@ -3,16 +3,18 @@ [#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" [#]: collector: "lujun9972" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14079-1.html" Gaphor:开源的图形化建模工具 ====== -Gaphor 是一个免费和开源的建模应用,支持各种建模语言,如 UML、[SysML][1]、RAAML 和 C4。 +![](https://img.linux.net.cn/data/attachment/album/202112/13/231534fobo72taxam7f2ma.jpg) -不知道“建模语言”这个词?基本上,它是一组可以用来创建设计和构造结构的指令。它可以是文字的,也可以是图形的。 +Gaphor 是一个自由开源的建模应用,支持各种建模语言,如 UML、[SysML][1]、RAAML 和 C4。 + +不知道“建模语言modeling language”这个词?基本上,它是一组可以用来创建设计和构造结构的指令。它可以是文字的,也可以是图形的。 图形化的更容易看,也更容易弄清楚项目的各个组成部分是如何相互关联的。 @@ -26,11 +28,11 @@ Gaphor 是一个免费和开源的建模应用,支持各种建模语言,如 [Gaphor][3] 使用 UML、SysML 和 RAAML OMG 标准。它还包括对 C4 模型的支持,用于软件架构的可视化。 -它不仅仅是一个[绘图工具][4]。它实现了一个完全兼容的 UML 2 数据模型。你可以用 Gaphor 创建高度复杂的模型。 +它不仅仅是一个 [绘图工具][4]。它实现了一个完全兼容的 UML 2 数据模型。你可以用 Gaphor 创建高度复杂的模型。 ![][5] -用 Python 编写的 Gaphor 在 Apache 2 许可下是完全开源的。你可以在[其 GitHub 仓库][6]找到它的所有源代码。它是一个跨平台的工具,可以安装在 Linux、Windows 和 macOS 上。 +用 Python 编写的 Gaphor 在 Apache 2 许可证下是完全开源的。你可以在 [其 GitHub 仓库][6] 找到它的所有源代码。它是一个跨平台的工具,可以安装在 Linux、Windows 和 macOS 上。 你可以以 PDF、PNG、SVG 和 XML 格式导出你的图表。你还可以插入一个代码生成器。 @@ -42,35 +44,27 @@ Gaphor 网站提到它有深色模式,但我在下载的 AppImage 版本中没 Arch 用户可以在 AUR 中找到 Gaphor。对于其他发行版,你可以选择 [AppImage][8] 和 Flatpak。 -你可以从其下载页面下载 AppImage。 - -[下载 Gaphor][9] +你可以从其 [下载页面][9] 下载 AppImage。 如果你想使用 Flatpak 版本,请先添加 Flathub 仓库: ``` - - flatpak remote-add --user --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo - +flatpak remote-add --user --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo ``` 然后再安装它: ``` - - flatpak install --user flathub org.gaphor.Gaphor - +flatpak install --user flathub org.gaphor.Gaphor ``` -由于 Gaphor 本质上是一个 Python 应用,你也可以[使用 Pip][10] 安装它。 +由于 Gaphor 本质上是一个 Python 应用,你也可以 [使用 Pip][10] 安装它。 ``` - - pip install gaphor - +pip install gaphor ``` -当我是一名软件工程师工作时,我使用 UML 和序列图。在过去的几年里,我没有使用它。看看 Gaphor,我认为如果你必须为你的项目创建 UML 和其他图表,它是一个相当不错的应用。 +当我还是一名软件工程师工作时,我使用 UML 和序列图。在过去的几年里,我没有使用它。看看 Gaphor,我认为如果你必须为你的项目创建 UML 和其他图表,它是一个相当不错的应用。 欢迎试一试,并在评论中分享你的经验。 @@ -81,7 +75,7 @@ via: https://itsfoss.com/gaphor-modeling-tool/ 作者:[Abhishek Prakash][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From dc8856595f85816e9e26d6cc7c3e5f6a45627e1a Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 13 Dec 2021 23:52:31 +0800 Subject: [PATCH 172/244] PRF&PUB @perfiffer https://linux.cn/article-14080-1.html --- published/20210922 Add storage with LVM.md | 271 ++++++++++++++++++ .../tech/20210922 Add storage with LVM.md | 271 ------------------ 2 files changed, 271 insertions(+), 271 deletions(-) create mode 100644 published/20210922 Add storage with LVM.md delete mode 100644 translated/tech/20210922 Add storage with LVM.md diff --git a/published/20210922 Add storage with LVM.md b/published/20210922 Add storage with LVM.md new file mode 100644 index 0000000000..d2d08a6b8d --- /dev/null +++ b/published/20210922 Add storage with LVM.md @@ -0,0 +1,271 @@ +[#]: subject: "Add storage with LVM" +[#]: via: "https://opensource.com/article/21/9/add-storage-lvm" +[#]: author: "Ayush Sharma https://opensource.com/users/ayushsharma" +[#]: collector: "lujun9972" +[#]: translator: "perfiffer" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14080-1.html" + +使用 LVM 添加存储 +====== + +> LVM 为你配置存储的方式提供了极大的灵活性。 + +![](https://img.linux.net.cn/data/attachment/album/202112/13/235125wn99nloup38jnkoo.jpg) + +逻辑卷管理器Logical Volume Manager(LVM)允许在操作系统和硬件之间建立一个抽象层。通常,你的操作系统会查找磁盘(`/dev/sda`、`/dev/sdb` 等)和这些磁盘中的分区(`/dev/sda1`、`/dev/sdb1` 等)。 + +LVM 在操作系统和磁盘之间创建了一个虚拟层。LVM 不是一个驱动器持有一定数量的分区,而是创建一个统一的存储池(称为卷组Volume Group),跨越任意数量的物理驱动器(称为物理卷Physical Volume)。使用卷组中可用的存储,LVM 可以为你的操作系统提供类似磁盘和分区的功能。 + +操作系统完全没有意识到它被“欺骗”了。 + +![Drive space][2] + +由于 LVM 虚拟地创建卷组和逻辑卷,因此即使在系统运行时,也可以轻松调整它们的大小或移动它们,或者创建新卷。此外,LVM 提供了其它情况下不存在的特性,比如创建逻辑卷的活动快照时无需首先卸载磁盘。 + +LVM 中的卷组是一个命名的虚拟容器,将底层物理磁盘组合在一起。它充当一个池,可以从中创建不同大小的逻辑卷Logical Volume。逻辑卷包含实际的文件系统并且可以跨越多个磁盘,并且不需要物理上连续。 + +### 特性 + + * 分区名称通常具有系统名称,例如 `/dev/sda1`。LVM 具有便于人们理解的名称,例如 `home` 或者 `media`。 + * 分区的总大小受底层物理磁盘大小的限制。在 LVM 中,卷可以跨越多个磁盘,并且仅受 LVM 中所有物理磁盘总大小的限制。 + * 分区通常只有在磁盘未使用且已卸载时才能调整大小、移动或删除。LVM 卷可以在系统运行时进行操作。 + * 只能通过分配与分区相邻的可用空间来扩展分区。LVM 卷可以从任何地方占用可用空间。 + * 扩展分区涉及移动数据以腾出可用空间,这非常耗时,并且可能会在断电期间导致数据丢失。LVM 卷可以从卷组中的任何地方占用可用空间,甚至可以在另一块磁盘上。 + * 因为在 LVM 中创建卷非常容易,所以它鼓励创建不同的卷,例如创建单独的卷来测试功能或尝试不同的操作系统。对于分区,此过程将非常耗时并且容易出错。 + * 快照只能在 LVM 中创建。它允许你创建当前逻辑卷的时间点镜像,即使在系统运行时也可以。这非常适合备份。 + +### 测试设置 + +作为演示,假设你的系统具有以下驱动器配置: + +``` +NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT +xvda 202:0 0 8G 0 disk +`-xvda1 202:1 0 8G 0 part / +xvdb 202:16 0 1G 0 disk +xvdc 202:32 0 1G 0 disk +xvdd 202:48 0 2G 0 disk +xvde 202:64 0 5G 0 disk +xvdf 202:80 0 8G 0 disk +``` + +#### 步骤 1. 初始化磁盘以用于 LVM + +运行 `pvcreate /dev/xvdb /dev/xvdc /dev/xvdd /dev/xvde /dev/xvdf`。输出应如下: + +``` +Physical volume "/dev/xvdb" successfully created +Physical volume "/dev/xvdc" successfully created +Physical volume "/dev/xvdd" successfully created +Physical volume "/dev/xvde" successfully created +Physical volume "/dev/xvdf" successfully created +``` + +使用 `pvs` 或者 `pvdisplay` 查看结果: + +``` +"/dev/xvde" is a new physical volume of "5.00 GiB" +--- NEW Physical volume --- +PV Name /dev/xvde +VG Name +PV Size 5.00 GiB +Allocatable NO +PE Size 0 +Total PE 0 +Free PE 0 +Allocated PE 0 +PV UUID 728JtI-ffZD-h2dZ-JKnV-8IOf-YKdS-8srJtn + +"/dev/xvdb" is a new physical volume of "1.00 GiB" +--- NEW Physical volume --- +PV Name /dev/xvdb +VG Name +PV Size 1.00 GiB +Allocatable NO +PE Size 0 +Total PE 0 +Free PE 0 +Allocated PE 0 +PV UUID zk1phS-7uXc-PjBP-5Pv9-dtAV-zKe6-8OCRkZ + +"/dev/xvdd" is a new physical volume of "2.00 GiB" +--- NEW Physical volume --- +PV Name /dev/xvdd +VG Name +PV Size 2.00 GiB +Allocatable NO +PE Size 0 +Total PE 0 +Free PE 0 +Allocated PE 0 +PV UUID R0I139-Ipca-KFra-2IZX-o9xJ-IW49-T22fPc + +"/dev/xvdc" is a new physical volume of "1.00 GiB" +--- NEW Physical volume --- +PV Name /dev/xvdc +VG Name +PV Size 1.00 GiB +Allocatable NO +PE Size 0 +Total PE 0 +Free PE 0 +Allocated PE 0 +PV UUID FDzcVS-sq22-2b13-cYRj-dXHf-QLjS-22Meae + +"/dev/xvdf" is a new physical volume of "8.00 GiB" +--- NEW Physical volume --- +PV Name /dev/xvdf +VG Name +PV Size 8.00 GiB +Allocatable NO +PE Size 0 +Total PE 0 +Free PE 0 +Allocated PE 0 +PV UUID TRVSH9-Bo5D-JHHb-g0NX-8IoS-GG6T-YV4d0p +``` + +#### 步骤 2. 创建卷组 + +运行 `vgcreate myvg /dev/xvdb /dev/xvdc /dev/xvdd /dev/xvde /dev/xvdf`。通过 `vgs` 或者 `vgdisplay` 查看结果: + +``` +--- Volume group --- +VG Name myvg +System ID +Format lvm2 +Metadata Areas 5 +Metadata Sequence No 1 +VG Access read/write +VG Status resizable +MAX LV 0 +Cur LV 0 +Open LV 0 +Max PV 0 +Cur PV 5 +Act PV 5 +VG Size 16.98 GiB +PE Size 4.00 MiB +Total PE 4347 +Alloc PE / Size 0 / 0 +Free PE / Size 4347 / 16.98 GiB +VG UUID ewrrWp-Tonj-LeFa-4Ogi-BIJJ-vztN-yrepkh +``` + +#### 步骤 3: 创建逻辑卷 + +运行以下命令: + +``` +lvcreate myvg --name media --size 4G +lvcreate myvg --name home --size 4G +``` + +使用 `lvs` 或者 `lvdisplay` 验证结果: + +``` +--- Logical volume --- +LV Path /dev/myvg/media +LV Name media +VG Name myvg +LV UUID LOBga3-pUNX-ZnxM-GliZ-mABH-xsdF-3VBXFT +LV Write Access read/write +LV Creation host, time ip-10-0-5-236, 2017-02-03 05:29:15 +0000 +LV Status available +# open 0 +LV Size 4.00 GiB +Current LE 1024 +Segments 1 +Allocation inherit +Read ahead sectors auto +- currently set to 256 +Block device 252:0 + +--- Logical volume --- +LV Path /dev/myvg/home +LV Name home +VG Name myvg +LV UUID Hc06sl-vtss-DuS0-jfqj-oNce-qKf6-e5qHhK +LV Write Access read/write +LV Creation host, time ip-10-0-5-236, 2017-02-03 05:29:40 +0000 +LV Status available +# open 0 +LV Size 4.00 GiB +Current LE 1024 +Segments 1 +Allocation inherit +Read ahead sectors auto +- currently set to 256 +Block device 252:1 +``` + +#### 步骤 4: 创建文件系统 + +使用以下命令创建文件系统: + +``` +vgcreate myvg /dev/xvdb /dev/xvdc /dev/xvdd /dev/xvde /dev/xvdf +mkfs.ext3 /dev/myvg/media +mkfs.ext3 /dev/myvg/home +``` + +挂载它: + +``` +mount /dev/myvg/media /media +mount /dev/myvg/home /home +``` + +使用 `lsblk` 命令查看完整配置: + +``` +NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT +xvda 202:0 0 8G 0 disk +`-xvda1 202:1 0 8G 0 part / +xvdb 202:16 0 1G 0 disk +xvdc 202:32 0 1G 0 disk +xvdd 202:48 0 2G 0 disk +xvde 202:64 0 5G 0 disk +`-myvg-media 252:0 0 4G 0 lvm /media +xvdf 202:80 0 8G 0 disk +`-myvg-home 252:1 0 4G 0 lvm /home +``` + +#### 步骤 5: 扩展 LVM + +添加一块新的 `/dev/xvdg` 磁盘。要扩展 `home` 卷,运行以下命令: + +``` +pvcreate /dev/xvdg +vgextend myvg /dev/xvdg +lvextend -l 100%FREE /dev/myvg/home +resize2fs /dev/myvg/home +``` + +运行 `df -h`,你应该可以看到新的磁盘大小。 + +就是这样! + +LVM 为你配置存储的方式提供了极大的灵活性。尝试一下,并享受 LVM 的乐趣! + +本文首发于 [作者个人博客][4],经授权改编。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/9/add-storage-lvm + +作者:[Ayush Sharma][a] +选题:[lujun9972][b] +译者:[perfiffer](https://github.com/perfiffer) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/ayushsharma +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/bus-storage.png?itok=95-zvHYl (Storage units side by side) +[2]: https://opensource.com/sites/default/files/lvm.png (Drive space) +[3]: https://creativecommons.org/licenses/by-sa/4.0/ +[4]: https://notes.ayushsharma.in/2017/02/working-with-logical-volume-manager-lvm diff --git a/translated/tech/20210922 Add storage with LVM.md b/translated/tech/20210922 Add storage with LVM.md deleted file mode 100644 index f6d76be779..0000000000 --- a/translated/tech/20210922 Add storage with LVM.md +++ /dev/null @@ -1,271 +0,0 @@ -[#]: subject: "Add storage with LVM" -[#]: via: "https://opensource.com/article/21/9/add-storage-lvm" -[#]: author: "Ayush Sharma https://opensource.com/users/ayushsharma" -[#]: collector: "lujun9972" -[#]: translator: "perfiffer" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -使用 LVM 添加存储 -====== -LVM 为你配置存储的方式提供了极大的灵活性。 -![Storage units side by side][1] - -逻辑卷管理器(LVM)允许在操作系统和硬件之间建立一个抽象层。通常,你的操作系统会查找磁盘(`/dev/sda`,`/dev/sdb` 等)和这些磁盘中的分区(`/dev/sda1`,`/dev/sdb1` 等)。 - -LVM 在操作系统和磁盘之间创建了一个虚拟层。LVM 不是一个驱动器持有一定数量的分区,而是创建一个统一的存储池(称为卷组),跨越任意数量的物理驱动器(称为物理卷)。使用卷组中可用的存储,LVM 为你的操作系统提供类似磁盘和分区的功能。 - -操作系统完全没有意识到它被“欺骗”了。 - -![Drive space][2] - -Opensource.com, [CC BY-SA 4.0][3] - -由于 LVM 虚拟的创建卷组和逻辑卷,因此即使在系统运行时,也可以轻松调整它们的大小或移动它们,或者创建新卷。此外,LVM 提供了其它情况下不存在的特性,比如创建逻辑卷的活动快照,而无需首先卸载磁盘。 - -LVM 中的卷组是一个命名的虚拟容器,将底层物理磁盘组合在一起。它充当一个池,可以从中创建不同大小的逻辑卷。逻辑卷包含实际的文件系统并且可以跨越多个磁盘,并且不需要物理上连续。 - -### 特性 - * 分区名称通常具有系统名称,例如 `/dev/sda1`。LVM 具有便于人们理解的名称,例如 `home` 或者 `media`。 - * 分区的总大小受底层物理磁盘大小的限制。在 LVM 中,卷可以跨越多个磁盘,并且仅受 LVM 中所有物理磁盘总大小的限制。 - * 分区通常只有在磁盘未使用且已卸载时才能调整大小、移动或删除。LVM 卷可以在系统运行时进行操作。 - * 只能通过分配与分区相邻的可用空间来扩展分区。LVM 卷可以从任何地方占用可用空间。 - * 扩展分区涉及移动数据以腾出可用空间,这非常耗时,并且可能会在断电期间导致数据丢失。LVM 卷可以从卷组中的任何地方占用可用空间,甚至可以在另一块磁盘上。 - * 因为在 LVM 中创建卷非常容易,所以它鼓励创建不同的卷,例如创建单独的卷来测试功能或尝试不同的操作系统。对于分区,此过程将非常耗时并且容易出错。 - * 快照只能在 LVM 中创建。它允许你创建当前逻辑卷的时间点镜像,即使在系统运行时也可以。这非常适合备份。 - -### 测试设置 - -作为演示,假设你的系统具有以下驱动器配置: - -``` -NAME    MAJ:MIN RM SIZE RO TYPE MOUNTPOINT -xvda    202:0    0   8G  0 disk - -xvda1 202:1    0   8G  0 part / -xvdb    202:16   0   1G  0 disk -xvdc    202:32   0   1G  0 disk -xvdd    202:48   0   2G  0 disk -xvde    202:64   0   5G  0 disk -xvdf    202:80   0   8G  0 disk -``` - -#### 步骤 1. 初始化磁盘以用于 LVM - -运行 `pvcreate /dev/xvdb /dev/xvdc /dev/xvdd /dev/xvde /dev/xvdf`。输出应如下: - -``` -Physical volume "/dev/xvdb" successfully created -Physical volume "/dev/xvdc" successfully created -Physical volume "/dev/xvdd" successfully created -Physical volume "/dev/xvde" successfully created -Physical volume "/dev/xvdf" successfully created -``` - -使用 `pvs` 或者 `pvdisplay` 查看结果: - -``` -"/dev/xvde" is a new physical volume of "5.00 GiB" ---- NEW Physical volume --- -PV Name               /dev/xvde -VG Name -PV Size               5.00 GiB -Allocatable           NO -PE Size               0 -Total PE              0vgcreate myvg /dev/xvdb /dev/xvdc /dev/xvdd /dev/xvde /dev/xvdf -Free PE               0 -Allocated PE          0 -PV UUID               728JtI-ffZD-h2dZ-JKnV-8IOf-YKdS-8srJtn - -"/dev/xvdb" is a new physical volume of "1.00 GiB" ---- NEW Physical volume --- -PV Name               /dev/xvdb -VG Name -PV Size               1.00 GiB -Allocatable           NO -PE Size               0 -Total PE              0 -Free PE               0 -Allocated PE          0 -PV UUID               zk1phS-7uXc-PjBP-5Pv9-dtAV-zKe6-8OCRkZ - -"/dev/xvdd" is a new physical volume of "2.00 GiB" ---- NEW Physical volume --- -PV Name               /dev/xvdd -VG Name -PV Size               2.00 GiB -Allocatable           NO -PE Size               0 -Total PE              0 -Free PE               0 -Allocated PE          0 -PV UUID               R0I139-Ipca-KFra-2IZX-o9xJ-IW49-T22fPc - -"/dev/xvdc" is a new physical volume of "1.00 GiB" ---- NEW Physical volume --- -PV Name               /dev/xvdc -VG Name -PV Size               1.00 GiB -Allocatable           NO -PE Size               0 -Total PE              0 -Free PE               0 -Allocated PE          0 -PV UUID               FDzcVS-sq22-2b13-cYRj-dXHf-QLjS-22Meae -vgcreate myvg /dev/xvdb /dev/xvdc /dev/xvdd /dev/xvde /dev/xvdf -"/dev/xvdf" is a new physical volume of "8.00 GiB" ---- NEW Physical volume --- -PV Name               /dev/xvdf -VG Name -PV Size               8.00 GiB -Allocatable           NO -PE Size               0 -Total PE              0 -Free PE               0 -Allocated PE          0 -PV UUID               TRVSH9-Bo5D-JHHb-g0NX-8IoS-GG6T-YV4d0p -``` - -#### 步骤 2. 创建卷组 - -运行 `vgcreate myvg /dev/xvdb /dev/xvdc /dev/xvdd /dev/xvde /dev/xvdf`。通过 `vgs` 或者 `vgdisplay` 查看结果: - -``` ---- Volume group --- -VG Name               myvg -System ID -Format                lvm2 -Metadata Areas        5vgcreate myvg /dev/xvdb /dev/xvdc /dev/xvdd /dev/xvde /dev/xvdf -Metadata Sequence No  1 -VG Access             read/write -VG Status             resizable -MAX LV                0 -Cur LV                0 -Open LV               0 -Max PV                0 -Cur PV                5 -Act PV                5 -VG Size               16.98 GiB -PE Size               4.00 MiB -Total PE              4347 -Alloc PE / Size       0 / 0 -Free  PE / Size       4347 / 16.98 GiB -VG UUID               ewrrWp-Tonj-LeFa-4Ogi-BIJJ-vztN-yrepkh -``` - -#### 步骤 3: 创建逻辑卷 - -运行以下命令: - -``` -lvcreate myvg --name media --size 4G -lvcreate myvg --name home --size 4G -``` - -使用 `lvs` 或者 `lvdisplay` 验证结果: - -``` ---- Logical volume --- -LV Path                /dev/myvg/media -LV Name                media -VG Name                myvg -LV UUID                LOBga3-pUNX-ZnxM-GliZ-mABH-xsdF-3VBXFT -LV Write Access        read/write -LV Creation host, time ip-10-0-5-236, 2017-02-03 05:29:15 +0000 -LV Status              available -# open                 0 -LV Size                4.00 GiB -Current LE             1024 -Segments               1 -Allocation             inherit -Read ahead sectors     auto -- currently set to     256 -Block device           252:0 - ---- Logical volume --- -LV Path                /dev/myvg/home -LV Name                home -VG Name                myvg -LV UUID                Hc06sl-vtss-DuS0-jfqj-oNce-qKf6-e5qHhK -LV Write Access        read/write -LV Creation host, time ip-10-0-5-236, 2017-02-03 05:29:40 +0000 -LV Status              available -# open                 0 -LV Size                4.00 GiB -Current LE             1024 -Segments               1 -Allocation             inherit -Read ahead sectors     auto -- currently set to     256 -Block device           252:1 -``` - -#### 步骤 4: 创建文件系统 - -使用以下命令创建文件系统: - -```vgcreate myvg /dev/xvdb /dev/xvdc /dev/xvdd /dev/xvde /dev/xvdf -mkfs.ext3 /dev/myvg/media -mkfs.ext3 /dev/myvg/home -``` - -挂载它: - -``` -mount /dev/myvg/media /media -mount /dev/myvg/home /home -``` - -使用 `lsblk` 命令查看完整配置: - -``` -NAME         MAJ:MIN RM SIZE RO TYPE MOUNTPOINT -xvda         202:0    0   8G  0 disk - -xvda1      202:1    0   8G  0 part / -xvdb         202:16   0   1G  0 disk -xvdc         202:32   0   1G  0 disk -xvdd         202:48   0   2G  0 disk -xvde         202:64   0   5G  0 disk - -myvg-media 252:0    0   4G  0 lvm  /media -vgcreate myvg /dev/xvdb /dev/xvdc /dev/xvdd /dev/xvde /dev/xvdfxvdf         202:80   0   8G  0 disk - -myvg-home  252:1    0   4G  0 lvm  /home -```vgcreate myvg /dev/xvdb /dev/xvdc /dev/xvdd /dev/xvde /dev/xvdf - -#### 步骤 5: 扩展 LVM - -添加一块新的 `/dev/xvdg` 磁盘。要扩展 `home` 卷,运行以下命令: - -``` -pvcreate /dev/xvdg -vgextend myvg /dev/xvdg -lvextend -l 100%FREE /dev/myvg/home -resize2fs /dev/myvg/home -``` - -运行 `df -h`,你应该可以看到新的磁盘大小。 - -就是这样! - -LVM 为你配置存储的方式提供了极大的灵活性。尝试一下,并享受 LVM 的乐趣! - -* * * - -本文首发于 [作者个人博客][4],经授权改编。 - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/9/add-storage-lvm - -作者:[Ayush Sharma][a] -选题:[lujun9972][b] -译者:[perfiffer](https://github.com/perfiffer) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/ayushsharma -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/bus-storage.png?itok=95-zvHYl (Storage units side by side) -[2]: https://opensource.com/sites/default/files/lvm.png (Drive space) -[3]: https://creativecommons.org/licenses/by-sa/4.0/ -[4]: https://notes.ayushsharma.in/2017/02/working-with-logical-volume-manager-lvm From bb64664bd9f9a2a583b796c16ec02014d119668f Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 14 Dec 2021 05:04:38 +0800 Subject: [PATCH 173/244] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211214=20?= =?UTF-8?q?Fly-Pie:=20An=20Interesting=20Menu=20Launcher=20for=20Users=20W?= =?UTF-8?q?ho=20Rely=20on=20Mouse?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211214 Fly-Pie- An Interesting Menu Launcher for Users Who Rely on Mouse.md --- ...nu Launcher for Users Who Rely on Mouse.md | 117 ++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 sources/tech/20211214 Fly-Pie- An Interesting Menu Launcher for Users Who Rely on Mouse.md diff --git a/sources/tech/20211214 Fly-Pie- An Interesting Menu Launcher for Users Who Rely on Mouse.md b/sources/tech/20211214 Fly-Pie- An Interesting Menu Launcher for Users Who Rely on Mouse.md new file mode 100644 index 0000000000..c0dad5468f --- /dev/null +++ b/sources/tech/20211214 Fly-Pie- An Interesting Menu Launcher for Users Who Rely on Mouse.md @@ -0,0 +1,117 @@ +[#]: subject: "Fly-Pie: An Interesting Menu Launcher for Users Who Rely on Mouse" +[#]: via: "https://itsfoss.com/fly-pie/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Fly-Pie: An Interesting Menu Launcher for Users Who Rely on Mouse +====== + +_**Brief:** Fly-Pie is a unique menu launcher for GNOME that makes several actions accessible for a mouse-centric user._ + +An application launcher makes things convenient to quickly navigate to an active window, launch a new app, and so on. + +[Ulauncher][1] is one such application launcher to use if your Linux distribution does not offer any out-of-the-box. + +If that spikes your interest already, you will find Fly-Pie interesting! An application launcher tailored for users who primarily use a mouse and always place one hand to navigate using the mouse instead of the keyboard. + +![][2] + +### Fly-Pie: Customizable Menu That Works as a GNOME Shell Extension + +Yes, unfortunately, Fly-Pie is for GNOME users only. I’m not sure if there is something similar for KDE or other desktop environments; drop your suggestions in the comments box if you know. + +Fly-Pie focuses on providing visually interactive icons for shortcuts, applications, media controls, maximize/minimize window, workspace navigation, and more options than a traditional application launcher. + +![][3] + +It branches out to children sub-menus and grand-children menu as you expand further. So, you can have a lot of use-cases, and it should facilitate powerful navigation capabilities using the mouse or touchpad. + +![][4] + +The best thing is- it is highly customizable. You can choose a background image, color, customize the icons, branch menus, and more. + +Let me highlight some of its capabilities while mentioning the features available. + +### Features of Fly-Pie + +![][5] + +Fly-Pie gives you an exciting navigation capability if you are a mouse-centric or touchpad user. For obvious reasons, if you are a power keyboard user, this isn’t for you (but you should give it a try!). + +Here are some of the key features that you can expect with Fly-Pie: + + * Use a keyboard shortcut to launch the Fly-Pie menu + * Ability to add media controls and workspace navigation to the menu + * Add custom icons to personalize the menu for your desktop + * Add favorite apps for quick access + * Close an app window + * Check for running apps at a glance and navigate to the window + * Customize the animation for the menu to appear and disappear + * Ability to adjust opacity if you want it to stay on your screen as an overlay all the time + * Adjust the trace line connecting the sub-menus + * You can set a threshold or stroke angle to customize the user experience as per your mouse and touchpad sensitivity + * Fine grain controls to change the color, customize the icon, and more + * Ability to customize the sub-menu and the grandchildren menu + * Check livepreview to easily customize and test the menu before using it + * Select items by drawing gestures + + + +![][6] + +In addition to the features, it also adds an achievement functionality to encourage the user to explore a variety of use-cases with the menu tool. + +Here is an official YouTube video by the developer that shows it in action: + +### Installing Fly-Pie in Linux + +Considering it as a GNOME extension, you will have to first [set things to be able to use GNOME extensions on your Linux distribution][7]. + +Once you are done with the setup, you can head to [Fly-Pie’s GNOME extension page][8] and easily install the extension. + +You should be able to uninstall it from there and access the settings. If you are curious, you can explore its [GitHub page][9] for more information. + +The GitHub page also includes documentation to help you explore all of its capabilities. + +[Fly-Pie GNOME Extension][8] + +### Thoughts on Using Fly-Pie Menu Launcher + +The Fly-Pie menu is not exactly meant to replace the application launcher. However, depending on your use-case, it could come in extremely handy as an overlay-based menu or a mouse-centric launcher to access options/applications. + +Even though it is customizable, the stock looks the best and blends in easily with any type of theme you have going on in your Linux desktop. + +It is impressive to find fine-grained tweaks to customize the icons, scaling, color, transparency, and more. You can play around with it if you prefer. + +Considering I am not someone who navigates using the keyboard, Fly-Pie looks like a useful GNOME extension to have that saves time, and adds a unique point to the desktop experience. + +Even if you think this is not for you, I would suggest trying it out just to explore how it works, it is interesting indeed! + +What do you think about Fly-Pie? Feel free to share your thoughts in the comments down below. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/fly-pie/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/ulauncher/ +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/fly-pie-feat.png?resize=800%2C556&ssl=1 +[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/fly-pie.png?resize=800%2C443&ssl=1 +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/fly-pie-media-control.png?resize=789%2C586&ssl=1 +[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/fly-pie-global-appearance.png?resize=753%2C797&ssl=1 +[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/fly-pie-menu-editor-new.png?resize=800%2C749&ssl=1 +[7]: https://itsfoss.com/gnome-shell-extensions/ +[8]: https://extensions.gnome.org/extension/3433/fly-pie/ +[9]: https://github.com/Schneegans/Fly-Pie From db815411f185473a7a644409d7ca881e422bcf04 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 14 Dec 2021 05:04:48 +0800 Subject: [PATCH 174/244] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211214=20?= =?UTF-8?q?Best=20Open=20Source=20Word=20Processors=20for=20Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211214 Best Open Source Word Processors for Linux.md --- ...t Open Source Word Processors for Linux.md | 238 ++++++++++++++++++ 1 file changed, 238 insertions(+) create mode 100644 sources/tech/20211214 Best Open Source Word Processors for Linux.md diff --git a/sources/tech/20211214 Best Open Source Word Processors for Linux.md b/sources/tech/20211214 Best Open Source Word Processors for Linux.md new file mode 100644 index 0000000000..2c6f762d28 --- /dev/null +++ b/sources/tech/20211214 Best Open Source Word Processors for Linux.md @@ -0,0 +1,238 @@ +[#]: subject: "Best Open Source Word Processors for Linux" +[#]: via: "https://itsfoss.com/best-open-source-word-processors/" +[#]: author: "Community https://itsfoss.com/author/itsfoss/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Best Open Source Word Processors for Linux +====== + +Jokes apart, [Microsoft Office is tough to replace][1]. You can use Microsoft Office 365 in a web browser on Linux but that needs a subscription and may not provide an ideal experience. + +So, I’m here with a list of the best open-source word processors for Linux to make your life easier without that. + +Please note that I am talking about word processors here, not a full-fledged office suite. _**The focus is on suggesting that tools that let you write documents. Some software may come with spreadsheets and presentation software but that’s not our goal here**_. + +The first line of this article is partly true, especially for the Linux people. + +I have said goodbye to Windows just 2 years back, and even as a [professional writer and Linux user][2], I hardly miss MS word. + +So let’s check out some of the useful features you may expect before going through the list of free and open-source word processors. + +A good word processor should: + + * Allow easy creation, editing, and printing of documents. + * Be capable of exporting files in various formats. + * Have some basic spelling and grammar checks. + * Allow table creation and media import. + * Should allow collaboration. (Optional) + * Support various fonts, styles, special characters, equations, etc. + + + +Do you agree with me? Cool! Let’s see what options do you have here. + +### Top Open-Source Word Processors (for Linux) + +![][3] + +Some of the mentioned applications are offline while some are web-applications. I’ve also included a few closed-source word processors based on their Linux availability and free plan at the end of the article so that you have a choice here. + +In addition, a few options come as an office suite, while others are standalone word processors. I’ll try to mention packages as such. + +_**Just so as you know, this is not a ranking list.**_ + +#### 1\. AbiWord + +![][4] + +[AbiWord][5] is an open-source word processor exclusive to the Linux community. + +AbiWord has a clean and clutter-free interface. From the get-go, you’ll notice where to find the essentials. + +All the important functions are visible upfront, reducing the guesswork. It also has an AbiCollab feature for multiple users working simultaneously on the same document. + +Finally, it lets you save documents in countless formats and correct misspelled words. However, the import is not such a luxury. Still, you can use files created with MS Word, LibreOffice, etc. + +You can directly install AbiWord from the respective Linux repository or Flathub. + +#### 2\. LibreOffice Writer + +![][6] + +[LibreOffice][7] is the default word processor in almost every Linux distribution. + +Similar to the previous option, the user interface is intuitive. It lets you feel productive the moment you open it. + +Moreover, it’s a complete office suite, similar to MS office. + +Its import-export options are plentiful. Most probably, you won’t feel any compatibility issues with documents created with other word processors. + +Like with every change, coming from MS word may feel slightly strange at first. But nevertheless, it’s capable and user-friendly to get you through almost all your word processor requirements. + +It’s available for the most popular OSes: Linux, Windows, and Mac. + +#### 3\. OpenOffice Writer + +![][8] + +[(Apache) OpenOffice][9] word used to be identical to LibreOffice or the other way round because LibreOffice was forked from OpenOffice. While OpenOffice seems to be slow on development, LibreOffice has become the de-facto open source office suite. + +Yes, they both come as office suites and support opening documents in multiple formats. + +Likewise, OpenOffice writer is a capable word processor which is available for free. + +This can open various formats, including the .docx format. However, you can’t save in that. So that can be limiting in exporting. + +Apache OpenOffice Writer is officially available for Linux, Windows, and Mac. + +#### 4\. Calligra Word + +![][10] + +Calligra Gemini is a free, open-source office suite that has taken a unique approach for its word processor, [Calligra Word][11]. + +If ‘different’ is your style, you should definitely try the Calligra Word. Coming from any of the above options–you’ll feel alienated straightaway. + +And that’s not a bad thing. One can feel fresh with Calligra Words as well. Import-export options are great, and you can save them in MS Word formats. + +Notably, Calligra words has a powerful spell-checker. + +Calligra word can be downloaded for Linux, Windows, Mac, and FreeBSD. + +#### 5\. OnlyOffice + +![][12] + +OnlyOffice is a close cousin of MS office. But, it has a free and open-source version-[OnlyOffice Desktop][13]. It’s extremely compatible with MS Word and a lookalike. + +That being said, you can open and edit documents created with LibreOffice (and the like) as well. This also has a nifty spell checker. + +It has a cloud version too–free and paid. You can use its free web application to collaborate with multiple users. + +Finally, you’ll feel right at home if you’re coming from the Microsoft ecosystem. It’s a well-packed and feature-rich word processor. + +OnlyOffice can be downloaded on Linux, Mac, and Windows. + +#### 6\. WordGrinder + +![][14] + +Pardon me if I said Calligra Word looks alien. No. That phrase fits perfectly with [WordGrinder][15]. + +Frankly, it feels like a typewriter with a screen. You will fall in love with WordGrinder if you cherish minimalism. Its distraction-free atmosphere does away with the mouse. + +But realistically, this **terminal-centric application** is best for novelists. And that’s exactly why it was coded by David Given. The most you can do other than grinding words is italicize, embolden, or underline. + +It can import in ODT, HTML, and text, while the export has support for LaTex, Troff, etc., in addition to the import formats. + +You can use this on Windows and Unix-like operating systems. + +#### 7\. CryptPad + +![][16] + +[CryptPad][17] is for the Edward Snodens. It’s a privacy-focused collaborative web application in that it doesn’t even ask for email or your name. + +It’s encrypted and open-source. You can use this as a guest, registered user, or premium user. The premium tier is obviously paid and requires an email address. + +You can switch to an intrusion-free interface with just a click. In addition, it has abundant word processing prowess. But unfortunately, it only supports .html, .md, and .doc formats.   + +All [CryptPad][18] files are stored locally unless you use CryptDrive. Guest mode deletes cloud-stored files after 90 days. The registered mode comes with the bumped-up dedicated personal space (1 GB) and upload functionality. The premium tier enhances these abilities. + +Finally, there is no reason you shouldn’t give CryptPad a try. + +#### 8\. EtherPad + +![][19] + +[EtherPad][20] is an open-source collaborative web tool that mostly isn’t cross-compatible with other word processors. Etherpad uses its own format, HTML, and plain text to save and open the files. + +It has a clean look and almost a friendly user interface for the minimalists. You can set up your Etherpad instance or use publicly available ones. Public instances are set up on specific public servers, and your files won’t be private. + +Setting up an individual instance is not difficult at all. It’s just a few commands for people on Debian and Ubuntu. Besides, Windows’s installation isn’t difficult either. + +Etherpad can also be used as a docker image. + +_**Non-FOSS alert: The following options are not open-source but available for free on Linux.**_ + +#### FreeOffice (not open source) + +![][21] + +In a bid to replace the MS office, Softmaker’s [FreeOffice][22] announces itself as the best free alternative. It lets you switch between the ribbon view and the classic view. + +Needless to say, FreeOffice is compatible with MS Word formats. And this can also open files by other word processors mentioned in this article. However, it can only export in either its own or MS word formats. + +This word processor is powerful with great aesthetics. It also has a paid version with added features such as a German grammar checker, citation, and reference management abilities. + +It is available for Linux, Windows, and Mac. + +#### WPS Office (not open source) + +![][23] + +Similar to FreeOffice, the [WPS office][24] has a free and paid version. This is the most cross-platform-friendly, closed-source option on this list. + +This is extremely feature-rich with a capable free version if you don’t mind ads. However, the WPS office at times feels laggy. + +WPS Office also has a stripped-down cloud application similar to Microsoft office online. This web version is targeted at collaborations. + +It’s available for Linux, Windows, Mac, iOS, and Android. + +### **Conclusion** + +These were some of the great tools that have come of age. + +Though all have certain strengths, I personally felt great about AbiWord, OnlyOffice, Calligra Word, and WordGrinder (for novelists). + +And if you want the best MS word alternative, I would recommend looking no further than OnlyOffice. Please share any utility if we missed anything and your general impressions about these tools in the comment section. + +![][25] + +### Hitesh Sant + +Hitesh is a technology writer. He also has a flavor for acoustic guitar. And academically, he’s a postgraduate in Transportation Engineering & Management. You can check his complete work at [hiteshsant.com/][26]. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/best-open-source-word-processors/ + +作者:[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/best-free-open-source-alternatives-microsoft-office/ +[2]: https://itsfoss.com/open-source-tools-writers/ +[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/Open-source-Word-Processors.png?resize=800%2C450&ssl=1 +[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/AbiWord.png?resize=800%2C415&ssl=1 +[5]: https://www.google.com/url?q=https://www.abisource.com/download/&sa=D&source=editors&ust=1639371255584000&usg=AOvVaw0lhRDDZ4RWf85bD5yrfnxj +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/LibreOffice-Writer.png?resize=800%2C413&ssl=1 +[7]: https://www.google.com/url?q=https://www.libreoffice.org/discover/writer/&sa=D&source=editors&ust=1639371255586000&usg=AOvVaw0Fj_E57rDlTXMezWaF0os7 +[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/OpenOffice-writer.png?resize=800%2C524&ssl=1 +[9]: https://www.google.com/url?q=https://www.openoffice.org/download/&sa=D&source=editors&ust=1639371255589000&usg=AOvVaw19J9VOtpnCBT5XgnOqGYXz +[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/Calligra-words.png?resize=800%2C428&ssl=1 +[11]: https://www.google.com/url?q=https://calligra.org/words/&sa=D&source=editors&ust=1639371255590000&usg=AOvVaw2iqb4Vw6GQrPsCmT6eUiOQ +[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/OnlyOffice-word.png?resize=800%2C405&ssl=1 +[13]: https://www.google.com/url?q=https://www.onlyoffice.com/desktop.aspx&sa=D&source=editors&ust=1639371255593000&usg=AOvVaw1vGAyvbby-zJlSLdY3RPrO +[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/WordGrinder-1.png?resize=800%2C446&ssl=1 +[15]: https://www.google.com/url?q=http://cowlark.com/wordgrinder/index.html&sa=D&source=editors&ust=1639371255595000&usg=AOvVaw0CQ8bggwIOxBr2mAAxE1PC +[16]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/Cryptpad.png?resize=800%2C392&ssl=1 +[17]: https://www.google.com/url?q=https://cryptpad.fr/&sa=D&source=editors&ust=1639371255597000&usg=AOvVaw0Yc3H2vHI0L1uwWkN-lMZ3 +[18]: https://itsfoss.com/cryptpad/ +[19]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/Etherpad.png?resize=800%2C237&ssl=1 +[20]: https://www.google.com/url?q=https://etherpad.org/&sa=D&source=editors&ust=1639371255599000&usg=AOvVaw0MhCnnCtcGfSEJd5e4Ksiv +[21]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/freeoffice.png?resize=800%2C443&ssl=1 +[22]: https://www.google.com/url?q=https://www.freeoffice.com/en/&sa=D&source=editors&ust=1639371255602000&usg=AOvVaw2nPt87QOUACj7tZh7Ycog_ +[23]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/WPS-Office-Word.png?resize=800%2C449&ssl=1 +[24]: https://www.google.com/url?q=https://www.wps.com/download/&sa=D&source=editors&ust=1639371255603000&usg=AOvVaw0-isc_eGR1i8Oh3QVZq2Cb +[25]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/hitesh.webp?resize=400%2C400&ssl=1 +[26]: http://hiteshsant.com/ From b8186c22966c9df9b2c2b9c724b49f8b0138136b Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 14 Dec 2021 05:05:21 +0800 Subject: [PATCH 175/244] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211213=20?= =?UTF-8?q?My=20favorite=20Linux=20commands=20for=20optimizing=20web=20ima?= =?UTF-8?q?ges?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211213 My favorite Linux commands for optimizing web images.md --- ...inux commands for optimizing web images.md | 197 ++++++++++++++++++ 1 file changed, 197 insertions(+) create mode 100644 sources/tech/20211213 My favorite Linux commands for optimizing web images.md diff --git a/sources/tech/20211213 My favorite Linux commands for optimizing web images.md b/sources/tech/20211213 My favorite Linux commands for optimizing web images.md new file mode 100644 index 0000000000..89a0ab8491 --- /dev/null +++ b/sources/tech/20211213 My favorite Linux commands for optimizing web images.md @@ -0,0 +1,197 @@ +[#]: subject: "My favorite Linux commands for optimizing web images" +[#]: via: "https://opensource.com/article/21/12/optimize-web-images-linux" +[#]: author: "Ayush Sharma https://opensource.com/users/ayushsharma" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +My favorite Linux commands for optimizing web images +====== +Generate resized and optimized images for thumbnails and banner images +for the web. +![Digital creative of a browser on the internet][1] + +I used to stay away from images when working online. Handling and optimizing images can be both imprecise and time-consuming. + +Then I found some commands that changed my mind. To create web pages, I use Jekyll, so I've included that in the directions. However, these commands will also work with other static site generators.  + +### Image commands on Linux + +The commands that made all the difference for me are `optipng`, `jpegoptim`, and, of course, the venerable `imagemagick`. Together, they make handling images easy to manage or even automate. + +Here’s an overview of how I implemented my solution using these commands. I placed article images in my `static/images` folder. From there, I generated two copies of all PNG and JPG images: + + 1. A cropped thumbnail version measuring 422 by 316 + 2. A larger banner version, measuring 1024 by 768 + + + +Then I placed each copy (the thumbnail and the banner) into its own folder, and I leveraged Jekyll's custom variables for the folder paths. I outline each of these steps in greater detail below. + +#### Installation + +To follow along with my solution, be sure you have all the commands installed. On Linux, you can install `optipng`, `jpegoptim`, and `imagemagick` using your package manager. + +On Fedora, CentOS, Mageia, and similar: + + +``` +$ sudo dnf install optipng jpegoptim imagemagick +``` + +On Debian, Elementary, Mint, and similar: + + +``` +$ sudo apt install optipng jpegoptim imagemagick +``` + +On macOS, use [MacPorts][2] or [Homebrew][3]. + + +``` +brew install optipng jpegoptim imagemagick +``` + +On Windows, use [Chocolatey][4]. + +### Creating folders for thumbnails and banners + +After installing the commands, I created new folders under `static/images`. Generated thumbnails get placed into `img-thumbs`, and banners go in `img-normal`. + + +``` + + +$ cd static/images +$ mkdir -p img-thumbs img-normal + +``` + +With the folders created, I copied all GIF, SVG, JPG, and PNG files to both folders. I use the GIFs and SVGs as-is for thumbnails and banner images. + + +``` + + +$ cp content/*.gif img-thumbs/; cp content/*.gif img-normal/ +$ cp content/*.svg img-thumbs/; cp content/*.svg img-normal/ +$ cp content/*.jpg img-thumbs/; cp content/*.jpg img-normal/ +$ cp content/*.png img-thumbs/; cp content/*.png img-normal/ + +``` + +### Processing thumbnails + +To resize and optimize the thumbnails, I use my three commands. + +I use the `mogrify` command from `ImageMagick` to resize the JPGs and PNGs. Since I want the thumbnails to be 422 by 316, the command looks like this: + + +``` + + +$ cd img-thumbs +$ mogrify -resize 422x316 *.png +$ mogrify -format jpg -resize 422x316 *.jpg + +``` + +Now I optimize the PNGs using `optipng` and the JPGs using `jpegoptim`: + + +``` + + +$ for i in *.png; do optipng -o5 -quiet "$i"; done +$ jpegoptim -sq *.jpg + +``` + +In the above command: + + * For `optipng`, `-o5` switch sets the level of optimization, with 0 being the lowest. + * For `jpegoptim`, `-s` strips all image metadata, and `-q` sets quiet mode. + + + +### Processing banners + +I process the banner images in essentially the same way I process the thumbnails, aside from the dimensions, which are 1024 by 768 for banners. + + +``` + + +$ cd .. +$ cd img-normal +$ mogrify -resize 1024x768 *.png +$ mogrify -format jpg -resize 1024x768 *.jpg +$ for i in *.png; do optipng -o5 -quiet "$i"; done +$ jpegoptim -sq *.jpg + +``` + +### Configuring the paths in Jekyll + +The `img-thumbs` directory now contains my thumbnails. and `img-normal` contains the banners. To make my life easier, I set both of them to custom variables in my Jekyll `_config.yml`. + + +``` + + +content-images-path: /static/images/img-normal/ +content-thumbs-images-path: /static/images/img-thumbs/ + +``` + +Using the variables is simple. When I want to display the thumbnail, I prepend `content-thumbs-images-path` to the image. When I want to display the full banner, I prepend `content-images-path`. + + +``` + + +{% if page.banner_img %} + <img src="{{ page.banner_img | prepend: site.content-images-path | \ +prepend: site.baseurl | prepend: site.url }}" alt="Banner image for \ +{{ page.title }}" /> +{% endif %} + +``` + +### Conclusion + +There are several improvements I could make to my optimization commands. + +Using `rsync` to copy only changed files to `img-thumbs` and `img-normal` is one obvious improvement. That way, I'm not reprocessing files over and over again. Adding those commands to [Git pre-commit hooks][5] or a CI pipeline is another useful step. + +Resizing and optimizing images to reduce their size is a win for the user and the web as a whole. Maybe my next step for reducing image sizes will be [webp][6]. + +Fewer bytes transmitted over the wire means a lower carbon footprint, but that's another article. The UX victory is good enough for now. + +* * * + +_This article was originally posted on the [author's blog][7] and has been republished with permission._ + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/optimize-web-images-linux + +作者:[Ayush Sharma][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/ayushsharma +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_web_internet_website.png?itok=g5B_Bw62 (Digital creative of a browser on the internet) +[2]: https://opensource.com/article/20/11/macports +[3]: https://opensource.com/article/20/6/homebrew-mac +[4]: https://opensource.com/article/20/3/chocolatey +[5]: https://opensource.com/life/16/8/how-construct-your-own-git-server-part-6 +[6]: https://opensource.com/article/20/4/webp-image-compression +[7]: https://www.ayushsharma.in/2021/11/optimising-jpg-and-png-images-for-a-jekyll-blog From 0680070f40a8bf1f389bb793cbd9cb053b40b162 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 14 Dec 2021 05:05:31 +0800 Subject: [PATCH 176/244] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211213=20?= =?UTF-8?q?How=20I=20use=20open=20source=20to=20design=20my=20own=20card?= =?UTF-8?q?=20games?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211213 How I use open source to design my own card games.md --- ...open source to design my own card games.md | 112 ++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 sources/tech/20211213 How I use open source to design my own card games.md diff --git a/sources/tech/20211213 How I use open source to design my own card games.md b/sources/tech/20211213 How I use open source to design my own card games.md new file mode 100644 index 0000000000..09da50e09e --- /dev/null +++ b/sources/tech/20211213 How I use open source to design my own card games.md @@ -0,0 +1,112 @@ +[#]: subject: "How I use open source to design my own card games" +[#]: via: "https://opensource.com/article/21/12/open-source-card-game" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +How I use open source to design my own card games +====== +Open source isn't just about software. It's a cultural phenomenon, a +natural fit for tabletop games. +![Deck of playing cards][1] + +I love a good game, and I particularly enjoy tabletop games because they have many of the same traits that open source has. When you're playing a card game in real life with friends sitting around a table, you can as a group decide that Jokers are wild. Alternately, you could arbitrarily decide that should a Joker come into play, anyone holding an Ace must discard that Ace. Or when a Queen of Diamonds comes into play, everyone must pass their hand to the player on their right. In other words, you can reprogram the rules on a whim because a game is nothing but a mutually agreed-upon set of conditions. To me, what's even better is that you can invent your own games instead of hacking the rules of somebody else's game. From time to time, I do this as a hobbyist, and because I like to combine my hobbies, I tend to design games with only open source and open culture resources. + +First of all, it's important to understand that there are, broadly, two facets of a game: _flavor_ and _mechanics_. The flavor is the story and theme of the game. The mechanics of a game are the rules and the condition of play. The two aren't always completely separate from one another, and there's an elegance to designing a game themed around race cars, for instance, with rules that demand players to perform actions very quickly. However, the flavor and mechanics are just as often treated separately, and it's entirely reasonable to invent a game that _could_ be played with a standard deck of poker cards, but that's themed around space llamas, just for the fun of it. + +### Open source artwork + +If you've ever gone to a museum of modern art, you've probably found yourself standing in front of a canvas painted solid blue and overheard somebody utter this time-honored phrase: "Heck, I could make that!" But the truth is, artwork is hard work. Making art that's pleasing to the eye takes a lot of thought, time, confidence, and skill, so it makes sense that the art is one of the most difficult things to procure for a game you're designing. + +I have a few "hacks" on dealing with this classic snag. + +#### 1\. Find common ground + +There's free and open art out there, and a lot of it is very good. The problem is that games usually need more than one art piece. If you're designing a card game, you probably need at least four or six distinct elements (assuming your cards follow the foundations laid out by the Tarot deck) and possibly more. If you spend enough time on it, you can find [Creative Commons and Public Domain][2] artwork online on sites like [OpenGameArt.org][3], [FreeSVG.org][4], [ArtStation.com][5], [DeviantArt.com][6], and many others. + +If the site you're using doesn't have a Creative Commons search, enter the following words into any search engine, "This work is licensed under a Creative Commons" (the quotes are important, so don't leave those off) and whatever syntax your favorite search engine uses to limit the search to just one site (for example, **site:deviantart.com**). + +Once you have a pool of art to choose from, sort the art that you've found by identifying common themes in the artwork. Two pictures of robots by two different people might look nothing alike, but they're still both robots. Provided you have enough robot-themed art, you can structure the flavor of your game around robots. + +#### 2\. Commission Creative Commons art + +You can hire artists to make custom art for you. I work with artists who use open source paint programs like [Krita][7] and Mypaint, and as part of the contract, I specify that the art must be licensed under a Creative Commons Attribution Share-alike (CC BY-SA) license. I've only ever had one artist decline the offer because of the license restriction, and most are happy for their artwork to have a potentially larger life than just as part of a hobbyist's self-published game. + +#### 3\. Make your own + +As a trip to the museum of modern art reveals, art is a very flexible term. I've found that as long as I give myself a goal of how many cards or tokens for a game I need to create, I can usually produce something with one of the many graphical creative tools available on Linux. It doesn't have to be anything fancy. Just like modern art, you can paint a card with blue and yellow stripes, another with red and white polka-dots, another with green and purple zig-zags, and nobody but you will ever know that you secretly meant for them to be the lords and ladies of the fairy court, except that you don't know how to draw those. Think about all the simple things you can create in a graphics application, or by tracing photographs of everyday objects, or by remixing classic Poker suits, or Tarot themes, and so on. + +### Layout + +I use [Inkscape][8], Scribus, or [GIMP][9] for layout, depending on what my assets are and what manner of design I'm after. + +For cards, I find that a simple layout is easy to do and look at, solid colors tend to print better than gradients, and intuitive iconography is best. + +![layout in Inkscape][10] + +(Seth Kenlon, CC BY-SA 4.0) + +I did the layout in a single Inkscape file for my latest game, which uses just nine images from three or four different artists on OpenGameArt.com. I design the layout of each card in its own file for games with a more extensive set of art and card variety. + +Know your target output before you do any layout for your game assets. If you're going to print your game at home, then do the math and figure out how many cards or tokens or tiles you can fit on your default paper size (US Letter for some, A4 for everybody else). If you're printing with a game printer like [TheGameCrafter][11], download the template files. + +![printed cards][12] + +(Seth Kenlon, CC BY-SA 4.0) + +### Mechanics + +Game mechanics are the most important part of a game. They're what makes the game a game. Developing rules for a game doesn't have to be a formal process. You can come up with a game on a whim, or take a game that exists and remix its rules until it's something different, fix a game that just doesn't work for you, or mash two different games together. Start simple, using index cards, standard playing cards, or a Tarot deck to mock up how you think your game will work. You can play early game ideas by yourself, but eventually, getting a friend to help is a great way to introduce surprise glitches and optimizations. + +Playtest often. Play your game with a diverse set of players, and listen to their feedback. Your game might inspire many players to invent new rules and ideas, so separate feedback about what's _broken_ from feedback about what _could be different_. You don't have to implement feedback that just iterates your idea, but give careful thoughts to the bug reports. + +Once you've decided how you want your rules to work, write them down to make them [short and easy to parse][13]. Your rules don't have to convince players to play the game, you don't have to explain the strategy to them, nor do you need to give permission to players to remix the rules. Just tell the players the sequence of steps they need to take in order to make the game work. + +Most importantly, consider making your rules open source. Gaming is all about shared experiences, and that ought to include the rules. A Creative Commons or Open Game License ruleset allows other gamers to iterate, remix, and build upon your work. You never know, somebody might come up with a variant that you enjoy more than your own! + +### Open source gaming + +Open source isn't just about software. It's a cultural phenomenon, a natural fit for tabletop games. Take a few evenings to experiment with creating a game. If you're new to it, start with something simple, like this blank card activity: + + 1. Gather up some friends. + 2. Give each person a few blank index cards, and tell them to write a rule on each card. The rule can be anything ("If you're wearing something red, you win" or "The first person to stand up wins," and so on.) + 3. On your own index cards, write _and_, _but_, _or_, _but not_, _and not_, _except_, and other conditional phrases. + 4. Shuffle your deck and deal the cards to all players. + 5. Each player may play one card per turn. + 6. The goal is to win, but players may play the _and_, _but_, and _or_ cards to modify the conditions of what determines the winner. + + + +It's a fun party game and a nice introduction to thinking like a game designer because it helps you recognize what tends to work as a game mechanic and what doesn't. + +And, of course, it's open source. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/open-source-card-game + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rich-smith-unsplash.jpg?itok=uzzS0gRa (Deck of playing cards) +[2]: https://opensource.com/article/20/1/what-creative-commons +[3]: https://opensource.com/article/21/12/opengameart.org/ +[4]: http://freesvg.org +[5]: http://artstation.com +[6]: http://deviantart.com +[7]: https://opensource.com/article/21/12/krita-digital-paint +[8]: https://opensource.com/article/21/12/linux-draw-inkscape +[9]: https://opensource.com/content/cheat-sheet-gimp +[10]: https://opensource.com/sites/default/files/inkscape-layout.jpg (Layout in Inkscape) +[11]: https://www.thegamecrafter.com/ +[12]: https://opensource.com/sites/default/files/cards-printed_0.jpg (Printed cards) +[13]: https://opensource.com/life/16/11/software-documentation-tabletop-gaming From 7e24051b10ec608887244aba0331b7e5cf067f69 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Tue, 14 Dec 2021 08:40:45 +0800 Subject: [PATCH 177/244] Rename sources/tech/20211213 How I use open source to design my own card games.md to sources/talk/20211213 How I use open source to design my own card games.md --- .../20211213 How I use open source to design my own card games.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => talk}/20211213 How I use open source to design my own card games.md (100%) diff --git a/sources/tech/20211213 How I use open source to design my own card games.md b/sources/talk/20211213 How I use open source to design my own card games.md similarity index 100% rename from sources/tech/20211213 How I use open source to design my own card games.md rename to sources/talk/20211213 How I use open source to design my own card games.md From 686e3732fc2b683650f7daf4fa5aa939e5281eb2 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 14 Dec 2021 08:48:38 +0800 Subject: [PATCH 178/244] translated --- ... source photo processing with Darktable.md | 123 ------------------ ... source photo processing with Darktable.md | 121 +++++++++++++++++ 2 files changed, 121 insertions(+), 123 deletions(-) delete mode 100644 sources/tech/20211208 Open source photo processing with Darktable.md create mode 100644 translated/tech/20211208 Open source photo processing with Darktable.md diff --git a/sources/tech/20211208 Open source photo processing with Darktable.md b/sources/tech/20211208 Open source photo processing with Darktable.md deleted file mode 100644 index 43d750bd88..0000000000 --- a/sources/tech/20211208 Open source photo processing with Darktable.md +++ /dev/null @@ -1,123 +0,0 @@ -[#]: subject: "Open source photo processing with Darktable" -[#]: via: "https://opensource.com/article/21/12/open-source-photo-processing-darktable" -[#]: author: "Seth Kenlon https://opensource.com/users/seth" -[#]: collector: "lujun9972" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Open source photo processing with Darktable -====== -If you're taking photos good enough to process, you owe it to yourself -to see what Darktable offers you. -![Polaroids and palm trees][1] - -It's hard to say how good photographs happen. You have to be in the right place at just the right moment. You have to have a camera at the ready and an eye for composition. And that's just the part that happens in the camera. There's a whole other stage to great photography that many people don't think about. It used to happen with lights and chemicals in a _darkroom_, but with today's digital tools, post-production happens in darkroom software. One of the best photo processors is [Darktable][2], and I wrote an [intro to Darktable][3] article back in 2016. It's been five years since that article, so I thought I'd revisit the application to write about one of its advanced features: masks. - -Darktable hasn't changed much since I originally wrote about it, which to my mind, is one of the hallmarks of a truly great application. A consistent interface and continued great performance is all one can ask of software, and Darktable remains familiar and powerful. If you're new to Darktable, read my introductory article to learn the basics. - -### What is a mask?  - -A mask in photograph processing gets used to limit adjustments you make to an image to just one area of the image. - -A _mask_, intuitively enough, is a technique in visual art that uses one material to block out another. If you've ever painted a wall in your apartment or house, you may have used _masking tape_ (also called _painter's tape_) to guard adjoining walls or molding from stray brush strokes. When finished, you peel off the masking tape, and you have nice straight lines of paint. - -A stencil is also a form of masking. - -![A mask made of masking tape][4] - -(Seth Kenlon, [CC BY-SA 4.0][5]) - -It's a technique used in photography for a century, so it makes sense that digital photography tools have an equivalent. - -### Using masks in Darktable - -For this example, I'm using a Creative Commons photograph by Flickr user **bcnewdemocrats**. It's a great photo because of its charming subject matter (two kids applying Holi powder to their very patient father's face). Because it's about the Indian festival of colors, it's got some great splashes of color throughout. - -![Original photograph][6] - -(bcnewdemocrats, [CC BY-SA 4.0][5]) - -This is a photo that needs no improvement, but not all adjustments need to be drastic to have a significant effect. - -The color correction filter provides a particularly noticeable adjustment. A common correction in color photography, especially those of people, is the addition of _amber_ (a reddish-orange). Human skin tone benefits from the amber because we associate that color with warmth and life. - -Click the **On** button to activate the color correction adjustment panel on the right of the Darktable window. Drag the center point up and to the right to add amber to the photo. - -![Color correction panel][7] - -(Seth Kenlon, [CC BY-SA 4.0][5]) - -After you do this, the entire photograph gets drenched in amber. - -![Darktable global color correction][8] - -(Seth Kenlon, [CC BY-SA 4.0][5]) - -At the bottom of the color correction panel, click the **drawn & parametric mask** button. - -![Apply mask button][9] - -(Seth Kenlon, [CC BY-SA 4.0][5]) - -In the toolbar that gets revealed, you have several mask shapes to choose from. There's a circle and an ellipse, path, brush, gradient, and an option to edit an existing mask. For simplicity's sake, select the circle and click on your subject's face. - -![Circle mask][10] - -(Seth Kenlon, [CC BY-SA 4.0][5]) - -Your color correction filter is immediately constrained to the area of your circle mask, giving your main subject a pleasant amber tone while sparing the background. - -![Color correction within a circle mask][11] - -(Seth Kenlon, [CC BY-SA 4.0][5]) - -You can see the difference by toggling the color correction filter off and on. - -### Reusing masks - -If you want to apply another filter to just the subject's face, you don't have to create another mask, especially for that new filter. When you create a mask, it's added to the **mask manager** panel, located on the left of the Darktable interface. The default names are pretty generic, but you can double-click on each mask name to rename it. - -![Mask manager][12] - -(Seth Kenlon, [CC BY-SA 4.0][5]) - -When you apply a new filter, instead of choosing a new mask shape to create, click the **no mask used** drop-down menu to see a list of existing masks, as well as automatically grouped masks that have been used together on the same filter previously. Select the mask or mask group you want to use for your new filter. - -![Selecting an existing mask][13] - -(Seth Kenlon, [CC BY-SA 4.0][5]) - -### More masks - -There are lots of other types of masks and mask features in Darktable to explore. You can create complex shapes with the path and brush tools. You can abandon the use of shapes altogether and constrain filters to regions of an image based on chroma and luma values. You can adjust the fuzziness and spread of a mask and much more. One of the best things about all the adjustments you make in Darktable is that they're all dynamic and nondestructive. You can always turn them off if you change your mind, and you're never actually affecting the image data itself. It's no surprise because Darktable truly is a powerful photography tool, and if you're taking photos good enough to process, you owe it to yourself to see what Darktable offers you. - -We explain how to get started with Darktable, an open source, feature-packed, cross-platform... - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/12/open-source-photo-processing-darktable - -作者:[Seth Kenlon][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/seth -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/design_photo_art_polaroids.png?itok=SqPLgWxJ (Polaroids and palm trees) -[2]: https://www.darktable.org/ -[3]: https://opensource.com/life/16/4/how-use-darktable-digital-darkroom -[4]: https://opensource.com/sites/default/files/uploads/masking.jpg (A mask made of masking tape) -[5]: https://creativecommons.org/licenses/by-sa/4.0/ -[6]: https://opensource.com/sites/default/files/uploads/darktable-darkroom.jpg (Original photograph) -[7]: https://opensource.com/sites/default/files/uploads/darktable-panel-color-correction.jpg (Color correction panel) -[8]: https://opensource.com/sites/default/files/uploads/darktable-color-correction-global.jpg (Darktable global color correction) -[9]: https://opensource.com/sites/default/files/uploads/darktable-button-mask.jpg (Apply mask button) -[10]: https://opensource.com/sites/default/files/uploads/darktable-button-circle.jpg (Circle mask) -[11]: https://opensource.com/sites/default/files/uploads/darktable-color-mask.jpg (Color correction within a circle mask) -[12]: https://opensource.com/sites/default/files/uploads/darktable-mask-manager.jpg (Mask manager) -[13]: https://opensource.com/sites/default/files/uploads/darktable-mask-select.jpg (Selecting an existing mask) diff --git a/translated/tech/20211208 Open source photo processing with Darktable.md b/translated/tech/20211208 Open source photo processing with Darktable.md new file mode 100644 index 0000000000..d19700b8df --- /dev/null +++ b/translated/tech/20211208 Open source photo processing with Darktable.md @@ -0,0 +1,121 @@ +[#]: subject: "Open source photo processing with Darktable" +[#]: via: "https://opensource.com/article/21/12/open-source-photo-processing-darktable" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +用开源 Darktable 进行照片处理 +====== +如果你拍摄的照片足以进行处理,那么你就要来看看 Darktable 为你提供了什么。 +![Polaroids and palm trees][1] + +很难说好照片是如何产生的。你必须在正确的时间出现在正确的地点。你必须准备好相机和构图的眼睛。而这只是发生在相机里的部分。好的摄影还有另一个阶段,许多人都没有想到这一点。它曾经发生在_暗房_中的灯光和化学品,但在今天的数字工具中,后期制作发生在暗房软件中。最好的照片处理器之一是 [Darktable][2],我在 2016 年写了一篇 [Darktable 介绍][3]文章。那篇文章已经过去五年了,所以我想我应该重新审视一下这个应用,写一写它的一个高级功能:遮罩。 + +自从我最初写下这篇文章以来,Darktable 并没有什么变化,在我看来,这是一个真正好的应用的标志之一。一个稳定的界面和持续的优秀性能是人们对软件的所有要求,而 Darktable 仍然是熟悉的和强大的。如果你是 Darktable 的新手,请阅读我的介绍性文章,了解基础知识。 + +### 什么是遮罩? + +在照片处理中,遮罩被用来限制你对图像的调整,使其只限于图像的一个区域。 + +直观地说,_遮罩_是视觉艺术中的一种技术,用一种材料来遮挡另一种材料。如果你曾经在你的公寓或房子里画过一面墙,你可能使用过_遮蔽胶带_(也叫油漆工胶带)来保护相邻的墙壁或造型不受杂乱笔触的影响。完成后,你剥去遮蔽胶带,你就有了漂亮的油漆直线。 + +模板也是遮蔽的一种形式。 + +![A mask made of masking tape][4] + +(Seth Kenlon, [CC BY-SA 4.0][5]) + +这是一种在摄影中使用了一个世纪的技术,因此,数字摄影工具有一个类似的技术也是合理的。 + +### 在 Darktable 中使用遮罩 + +在这个例子中,我使用了 Flickr 用户 **bcnewdemocrats** 的创作共用照片。这是一张很好的照片,因为它有迷人的主题(两个孩子在他们非常耐心的父亲脸上涂抹 Holi 粉)。因为它是关于印度的五彩节,所以它在整个过程中都有色彩飞溅。 + +![Original photograph][6] + +(bcnewdemocrats, [CC BY-SA 4.0][5]) + +这是一张不需要改进的照片,但并不是所有的调整都需要大刀阔斧才能产生显著效果。 + +色彩校正滤镜提供了一个特别明显的调整。在彩色摄影中,尤其是人物摄影中,一个常见的修正是添加_琥珀_(一种偏红的橙色)。人类肤色受益于琥珀色,因为我们把这种颜色与温暖和生命联系起来。 + +点击 **On** 按钮,激活 Darktable 窗口右侧的色彩校正调整面板。将中心点向上和向右拖动,给照片增加琥珀色。 + +![Color correction panel][7] + +(Seth Kenlon, [CC BY-SA 4.0][5]) + +这样做之后,整张照片就会浸透在琥珀色里。 + +![Darktable global color correction][8] + +(Seth Kenlon, [CC BY-SA 4.0][5]) + +在色彩校正面板的底部,点击 **drawn & parametric mask** 按钮。 + +![Apply mask button][9] + +(Seth Kenlon, [CC BY-SA 4.0][5]) + +在显示出来的工具栏中,你有几种蒙版形状可以选择。有一个圆和一个椭圆、路径、画笔、梯度,还有一个编辑现有蒙版的选项。为了简单起见,选择圆形,然后点击你的对象的脸。 + +![Circle mask][10] + +(Seth Kenlon, [CC BY-SA 4.0][5]) + +你的色彩校正滤镜立即被限制在你的圆形遮罩的区域内,给你的主要对象一个愉快的琥珀色调,同时放过背景。 + +![Color correction within a circle mask][11] + +(Seth Kenlon, [CC BY-SA 4.0][5]) + +你可以通过切换色彩校正滤镜的关闭和开启来看到区别。 + +### 复用蒙版 + +如果你想只对被摄者的脸部应用另一个滤镜,你不必再创建一个蒙版,特别是为那个新的滤镜。当你创建一个蒙版时,它会被添加到位于 Darktable 界面左边的**蒙版管理器**面板上。默认的名字是非常通用的,但你可以双击每个蒙版的名字来重命名它。 + +![Mask manager][12] + +(Seth Kenlon, [CC BY-SA 4.0][5]) + +当你应用一个新的滤镜时,不是选择一个新的蒙版形状来创建,而是点击 **no mask used** 下拉菜单来查看现有的蒙版列表,以及之前在同一个滤镜上一起使用过的自动分组的蒙版。选择你想用于新滤镜的蒙版或蒙版组。 + +![Selecting an existing mask][13] + +(Seth Kenlon, [CC BY-SA 4.0][5]) + +### 更多蒙版 + +在 Darktable 中还有很多其他类型的蒙版和蒙版功能可以探索。你可以用路径和画笔工具创建复杂的形状。你可以完全放弃使用形状,并根据色度和亮度值将过滤器限制在图像的某个区域。你可以调整蒙版的模糊度和扩散度等。在 Darktable 中进行的所有调整中,最好的一点是它们都是动态的、非破坏性的。如果你改变主意,你可以随时关闭它们,而且你实际上从未影响过图像数据本身。这并不奇怪,因为 Darktable 确实是一个强大的摄影工具,如果你拍摄的照片足够好,可以进行处理,你就应该看看 Darktable 为你提供了什么。 + + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/open-source-photo-processing-darktable + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/design_photo_art_polaroids.png?itok=SqPLgWxJ (Polaroids and palm trees) +[2]: https://www.darktable.org/ +[3]: https://opensource.com/life/16/4/how-use-darktable-digital-darkroom +[4]: https://opensource.com/sites/default/files/uploads/masking.jpg (A mask made of masking tape) +[5]: https://creativecommons.org/licenses/by-sa/4.0/ +[6]: https://opensource.com/sites/default/files/uploads/darktable-darkroom.jpg (Original photograph) +[7]: https://opensource.com/sites/default/files/uploads/darktable-panel-color-correction.jpg (Color correction panel) +[8]: https://opensource.com/sites/default/files/uploads/darktable-color-correction-global.jpg (Darktable global color correction) +[9]: https://opensource.com/sites/default/files/uploads/darktable-button-mask.jpg (Apply mask button) +[10]: https://opensource.com/sites/default/files/uploads/darktable-button-circle.jpg (Circle mask) +[11]: https://opensource.com/sites/default/files/uploads/darktable-color-mask.jpg (Color correction within a circle mask) +[12]: https://opensource.com/sites/default/files/uploads/darktable-mask-manager.jpg (Mask manager) +[13]: https://opensource.com/sites/default/files/uploads/darktable-mask-select.jpg (Selecting an existing mask) From 5de4de02882e4a99c01c98d1f179067e86506002 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 14 Dec 2021 08:52:06 +0800 Subject: [PATCH 179/244] translating --- sources/tech/20211212 Open source 3D pixel art with Goxel.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20211212 Open source 3D pixel art with Goxel.md b/sources/tech/20211212 Open source 3D pixel art with Goxel.md index 8c1221dcfd..90d358b0e4 100644 --- a/sources/tech/20211212 Open source 3D pixel art with Goxel.md +++ b/sources/tech/20211212 Open source 3D pixel art with Goxel.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/21/12/3d-pixel-art-goxel" [#]: author: "Seth Kenlon https://opensource.com/users/seth" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 296fc2aa26c2afdd7fec7fb78f689fbd0befc722 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 14 Dec 2021 09:11:54 +0800 Subject: [PATCH 180/244] APL --- ...ncrypt and Decrypt Files on Linux -Hands-on for Beginners.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20211211 Using GPG to Encrypt and Decrypt Files on Linux -Hands-on for Beginners.md b/sources/tech/20211211 Using GPG to Encrypt and Decrypt Files on Linux -Hands-on for Beginners.md index 54b65e8645..d472287e5a 100644 --- a/sources/tech/20211211 Using GPG to Encrypt and Decrypt Files on Linux -Hands-on for Beginners.md +++ b/sources/tech/20211211 Using GPG to Encrypt and Decrypt Files on Linux -Hands-on for Beginners.md @@ -2,7 +2,7 @@ [#]: via: "https://itsfoss.com/gpg-encrypt-files-basic/" [#]: author: "Hunter Wittenborn https://itsfoss.com/author/hunter/" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "wxy" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 20f326269491b04e445f655744c31bf4b3540509 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 14 Dec 2021 11:42:25 +0800 Subject: [PATCH 181/244] TSL&PRF --- ... Files on Linux -Hands-on for Beginners.md | 268 ------------------ ... Files on Linux -Hands-on for Beginners.md | 248 ++++++++++++++++ 2 files changed, 248 insertions(+), 268 deletions(-) delete mode 100644 sources/tech/20211211 Using GPG to Encrypt and Decrypt Files on Linux -Hands-on for Beginners.md create mode 100644 translated/tech/20211211 Using GPG to Encrypt and Decrypt Files on Linux -Hands-on for Beginners.md diff --git a/sources/tech/20211211 Using GPG to Encrypt and Decrypt Files on Linux -Hands-on for Beginners.md b/sources/tech/20211211 Using GPG to Encrypt and Decrypt Files on Linux -Hands-on for Beginners.md deleted file mode 100644 index d472287e5a..0000000000 --- a/sources/tech/20211211 Using GPG to Encrypt and Decrypt Files on Linux -Hands-on for Beginners.md +++ /dev/null @@ -1,268 +0,0 @@ -[#]: subject: "Using GPG to Encrypt and Decrypt Files on Linux [Hands-on for Beginners]" -[#]: via: "https://itsfoss.com/gpg-encrypt-files-basic/" -[#]: author: "Hunter Wittenborn https://itsfoss.com/author/hunter/" -[#]: collector: "lujun9972" -[#]: translator: "wxy" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Using GPG to Encrypt and Decrypt Files on Linux [Hands-on for Beginners] -====== - -[GnuPG][1], popularly known as GPG, is an extremely versatile tool, being widely used as the industry standard for encryption of things like emails, messages, files, or just anything you need to send to someone securely. - -It’s easy to get started with GPG, and you can be on your way with using it in a matter of minutes. - -In this tutorial, I’ll show you how to encrypt and decrypt files with GPG. _**This is a simple tutorial and you may try all of it to practice on your Linux system as well. This will help you practice the GPG commands and understand it when you are absolutely new to it.**_ - -Read the entire tutorial first and then start doing it on your own. - -### How does GPG work for encryption? - -![GPG encryption][2] - -To start using GPG, you’ll first need to have a GPG key. - -A GPG key is what you’ll use to encrypt (or decrypt) files later in the tutorial. It’s also what is used to identity you, with things like your name and email being tied to the key as well. - -GPG keys work by using two files, a private key and a public key. These two keys are tied to each other, and are both needed to use all of GPG’s functionality, notably encrypting and decrypting files. - -When you encrypt a file with GPG, it uses the private key. The new, encrypted file can then **only** be _decrypted_ with the paired public key. - -The private key is meant to be stored in a fashion stated directly in its name – privately, and not given out to anyone. - -The public key on the other hand is meant to be given to others, or anyone you want to be able to decrypt your files. - -This is where GPG’s main approach for encryption comes into play. It allows you to encrypt files locally and then allow others to be ensured that the files they received were actually sent from you. As the only way they’ll be able to _decrypt_ the file is with _your_ public key, which would only work if the file was _encrypted_ using _your_ private key in the first place. - -_**This also works in the opposite direction!**_ Other people can encrypt files using your public key, and the only way it’ll be able to be decrypted is with your private key. Thus allowing others to publicly post files without worry of people besides you being able to read them. - -_**In other words, if a file was encrypted with a private key, it can only be decrypted with the corresponding public key. And if a file was encrypted with a public key, it can only be decrypted with the corresponding private key.**_ - -#### You are already using GPG without realizing - -One of the most common example of using GPG is in Linux package manager, specially the [external repositories][3]. You add the public key of the developer into your system’s trusted keys. The developer signs the packages (generates a signature) with his/her private key. Since your Linux system has the public file, it understands that the package is actually coming from the trusted developer. - -A number of encrypted services use some sort of GPG implementation underneath without you realizing it. But it’s better to not go in to those details right now. - -Now that you are a bit familiar with the concept, let’s see how you can use GPG for encrypting a file and then use it to decrypt. - -### Encrypting and decrypting files with GPG - -![][4] - -This is a very simplistic scenario. I presume that you have just one system and you want to see how GPG works. You are not sending the files to other system. You encrypt the file and then decrypt it on the same system. - -Of course, this is not a practical use case but that’s also not the purpose of this tutorial. My aim is to get you acquainted with GPG commands and functioning. After that, you can use this knowledge in a real-world situation (if need be). And for that, I’ll show you how you can share your public key with others. - -#### Step 1: Installing GPG - -GPG can be found in most distribution’s repositories out of the box. - -On Debian and Ubuntu-based systems, install the gpg package: - -``` - - sudo apt install gpg - -``` - -If you use [Arch based distributions][5], install the gnupg package with the [pacman command][6]: - -``` - - sudo pacman -S gnupg - -``` - -#### Step 2: Generating a GPG key - -Generating a GPG key on your system is a simple one-command procedure. - -Just run the following command, and your key will be generated (you can use the defaults for most questions as shown in the underlined sections below): - -``` - - gpg --full-generate-key - -``` - -![Generating GPG keys][7] - -**Checking the GPG Key** - -You can then see that the private key and public key are both tied to each other by that ID shown under **pub** by using the **–list-secret-keys** and **–list-public-keys** commands respectively: - -![Listing GPG keys][8] - -#### Step 3: Encrypting a file with GPG - -Now that you’ve set up our GPG keys, you can start encrypting our files! - -Use the following command to encrypt files: - -``` - - gpg --encrypt --output file.gpg --recipient [email protected] file - -``` - -Let’s go over what that command does real quick: - -First you specified the **–encrypt** option. This simply tells GPG that we’ll be encrypting a file. - -Next, you specified **–output file.gpg**. This can be anything, though it’s typically the name of the file you’re encrypting plus a **.gpg** extension (so **message.txt** would become **message.txt.gpg**). - -Next, you type **–recipient [[email protected]][9]**. This specifies the email for a corresponding GPG key that actually doesn’t exist quite yet on this system. - -Still confused? - -The way this works is that the email you specify here must be tied to a public key on your local system. - -Typically, this is going to be from the public GPG key of a different person, which is what you’re going to encrypt your file with. After such, the file will only be able to be decrypted with that user’s private key. - -I’ll be using my previous GPG key with the **[[email protected]][9]** in this example. Thus, the logic would be that I am encrypting the file with the _public_ key of h**[[email protected]][9]**, which is then only going to be able to be decrypted with the _private_ key of **[[email protected]][9]**. - -You’d only have the public key if you were encrypting a file for someone else, but since you’re encrypting the file for yourself, you have both keys on your system. - -Lastly, you simply specify the file you’re going to encrypt. For this example, let’s use a file named **message.txt** with the following content: - -``` - - We're encrypting with GPG! - -``` - -![Sample text file][10] - -Likewise, if the email was **[[email protected]][9]**, the new GPG command would be as follows: - -``` - - gpg --encrypt --output message.txt.gpg --recipient [email protected] message.txt - -``` - -![Encrypting file with GPG][11] - -If you then try to read the file, you’ll see that it looks like gibberish. That is expected because the file is encrypted now: - -![Reading the encrypted file generates gibberish text][12] - -Let’s now delete the unencrypted message.txt file so that you can see that the message.txt.gpg file actually decrypts just fine without the original file: - -![][13] - -#### Step 4: Decrypting the encrypted file with GPG - -Lastly, let’s actually decrypt the encrypted message. You can do such using the following command: - -``` - - gpg --decrypt --output file file.gpg - -``` - -Going through the argument here, we first specify **–decrypt**, which tells GPG that you’re going to be decrypting a file. - -Next, you enter **–output** file, which simply tells GPG what file you’ll be saving the encrypted form of our file to after you decrypt it. - -Lastly, you enter **file.gpg**, which is just the path to your encrypted file. - -Following the example, the command I’d use would be as follows: - -``` - - gpg --decrypt --output message.txt message.txt.gpg - -``` - -![Decrypting file with GPG][14] - -And voila, you’re done! That’s all there is to it when you want to encrypt and decrypt files with GPG. - -The only other thing you may want to know is how to share your public keys with others so they can encrypt files before sending them to you. - -### Sending and receiving GPG Keys - -To send someone a GPG key, you’ll first need to export it from your **keychain**, which is what contains all of your public and private keys. - -To export a key, simply find the key ID in your keychain, and then run the following command, replacing `id` with the key’s ID and **key.gpg** with the name of the file you want to save to: - -``` - - gpg --output key.gpg --export id - -``` - -![Export GPG public key][15] - -To import a key, simply give the output file (from the previous command) to the other user and then have them run the following command: - -``` - - gpg --import key.gpg - -``` - -![][16] - -To use the key normally though, you’ll need to verify the key so GPG properly trusts it. - -This can be done by running the **–edit-key** command on the other user’s system, following by signing the key: - -First run `gpg --edit-key id`: - -![GPG edit key][17] - -Next, run the **fpr** command, which will show the fingerprint for the key. The output of this command should be validated against the output on your own machine, which can be found by running the same **–edit-key** command on your system: - -![Fingerprint of GPG key][18] - -If everything matches up, just run the **sign** command and everything will be ready to go: - -![Sign GPG key][19] - -That’s it! The other user can now start encrypting files with your public key just as you did earlier, ensuring they’ll only be readable by you when you decrypt them with your private key. - -And that’s all the basics to GPG! - -### Wrapping Up - -You’ve now gone over everything you need to start using GPG, including encrypting files for yourself and for others. As I mentioned earlier, this is just for understanding how GPG encryption and decryption process works. The basic GPG knowledge you just acquired can be taken to the next level when applied in real-world scenarios. - -Need some help figuring out something still, or something just not working right? Feel free to leave any of it in the comments below. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/gpg-encrypt-files-basic/ - -作者:[Hunter Wittenborn][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/hunter/ -[b]: https://github.com/lujun9972 -[1]: https://gnupg.org/ -[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/GPG-encryption-explained.png?resize=800%2C300&ssl=1 -[3]: https://itsfoss.com/adding-external-repositories-ubuntu/ -[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/GPG-encryption-basic.png?resize=800%2C450&ssl=1 -[5]: https://itsfoss.com/arch-based-linux-distros/ -[6]: https://itsfoss.com/pacman-command/ -[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/gpg-key-generation.png?resize=676%2C663&ssl=1 -[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/gpg-list-keys-1.png?resize=703%2C379&ssl=1 -[9]: https://itsfoss.com/cdn-cgi/l/email-protection -[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/gpg-example-message.png?resize=665%2C277&ssl=1 -[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/gpg-example-message-encrypted-800x252.png?resize=800%2C252&ssl=1 -[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/gpg-example-message-encrypted-gibberish.png?resize=800%2C252&ssl=1 -[13]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/gpg-message-original-deleted.png?resize=800%2C252&ssl=1 -[14]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/gpg-message-decrypt.png?resize=800%2C252&ssl=1 -[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/gpg-key-export-800x218.png?resize=800%2C218&ssl=1 -[16]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/gpg-key-import.png?resize=800%2C221&ssl=1 -[17]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/gpg-edit-key-prompt.png?resize=800%2C351&ssl=1 -[18]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/gpg-edit-key-fingerprint-1.png?resize=800%2C317&ssl=1 -[19]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/gpg-edit-key-sign.png?resize=800%2C531&ssl=1 diff --git a/translated/tech/20211211 Using GPG to Encrypt and Decrypt Files on Linux -Hands-on for Beginners.md b/translated/tech/20211211 Using GPG to Encrypt and Decrypt Files on Linux -Hands-on for Beginners.md new file mode 100644 index 0000000000..ab3a8a99f9 --- /dev/null +++ b/translated/tech/20211211 Using GPG to Encrypt and Decrypt Files on Linux -Hands-on for Beginners.md @@ -0,0 +1,248 @@ +[#]: subject: "Using GPG to Encrypt and Decrypt Files on Linux [Hands-on for Beginners]" +[#]: via: "https://itsfoss.com/gpg-encrypt-files-basic/" +[#]: author: "Hunter Wittenborn https://itsfoss.com/author/hunter/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: " " +[#]: url: " " + +手把手指导:在 Linux 上使用 GPG 加解密文件 +====== + +[GnuPG][1],俗称 GPG,是一个非常通用的工具,被广泛用作电子邮件、信息、文件或任何你需要安全地发送给别人的东西的加密行业标准。 + +学习使用 GPG 很容易,你可以在几分钟内就学会使用它。 + +在本教程中,我将告诉你如何用 GPG 加密和解密文件。这是一个简单的教程,你可以在你的 Linux 系统上尝试所有的练习。这将帮助你练习 GPG 命令,并在你完全陌生的情况下理解它。 + +先阅读整个教程,然后开始自己做。 + +### GPG 是如何进行加密的? + +![GPG 加密][2] + +要使用 GPG,你首先需要有一个 GPG 密钥。 + +GPG 密钥是你在后面的教程中用来加密(或解密)文件的东西。它也是用来识别你的身份的,你的名字和电子邮件也会与密钥绑定。 + +GPG 密钥的工作原理是使用两个文件,一个私钥和一个公钥。这两个密钥是相互联系的,并且 GPG 的所有功能都需要使用它们,特别是对文件加密和解密。 + +当你用 GPG 加密一个文件时,它使用的是私钥。然后,这个新的加密文件**只能**用配对的公钥进行解密。 + +私钥,顾名思义,是以私下的、不给任何人看的方式来存储的密钥。 + +另一方面,公钥是用来给其他人的,或者你希望能够解密你的文件的任何人。(LCTT 译注:更多的用例是用来验证你的签名。) + +这就是 GPG 的主要加密方法的作用所在。它允许你对文件进行本地加密,然后允许其他人确保他们收到的文件实际上是由你发送的。因为他们能够解密文件的唯一方法是使用你的公钥,而这只有在文件首先使用你的私钥加密的情况下才有效。 + +**反之**,其他人可以用你的公钥对文件进行加密,而唯一能够解密的方法是用你的私钥。因此,允许其他人公开发布文件,而不用担心除了你以外的人能够阅读它们。 + +换句话说,如果一个文件是用私钥加密的,它只能用相应的公钥解密。而如果一个文件是用公钥加密的,它只能用相应的私钥解密。 + +#### 你已经在使用 GPG 而没有意识到 + +一个最常见的使用 GPG 的例子是在 Linux 软件包管理器中,特别是 [外部仓库][3]。你把开发者的公钥添加到你系统的可信密钥中。开发者用他/她的私钥签署软件包(生成签名)。由于你的 Linux 系统拥有该公钥文件,它就能理解该软件包实际上是来自受信任的开发者。 + +许多加密服务在你没有意识到的情况下使用了某种 GPG 的实现。但现在最好不要去研究这些细节。 + +现在你对这个概念有点熟悉了,让我们看看如何使用 GPG 来加密一个文件,然后用它来解密。 + +### 用 GPG 对文件进行加密和解密 + +![][4] + +这是一个非常简单的场景。我假定你只有一个系统,你想看看 GPG 是如何工作的。你并没有把文件发送到其他系统。你对文件进行加密,然后在同一个系统上解密。 + +当然,这不是一个实际的用例,但这也不是本教程的目的。我的目的是让你熟悉 GPG 命令和功能。之后,你可以在现实世界中使用这些知识(如果需要的话)。为此,我将告诉你如何与他人分享你的公钥。 + +#### 第一步:安装 GPG + +GPG 可以在大多数发行版的软件库中找到,开箱即用。 + +在基于 Debian 和 Ubuntu 的系统中,安装 `gpg` 包: + +``` +sudo apt install gpg +``` + +如果你使用 [基于 Arch 的发行版][5],用 [pacman 命令][6] 安装 `gnupg` 软件包: + +``` +sudo pacman -S gnupg +``` + +#### 第二步:生成一个 GPG 密钥 + +在你的系统上生成一个 GPG 密钥只需要一条简单的命令。 + +只要运行下面的命令,就会生成你的密钥(你可以对大多数问题使用默认值,如下面的下划线部分所示)。 + +``` +gpg --full-generate-key +``` + +![生成 GPG 密钥][7] + +**检查 GPG 密钥** + +然后你可以通过使用 `--list-secret-keys` 和 `--list-public-keys` 参数,分别看到私钥和公钥都是通过 `pub` 下显示的那个 ID 相互绑定的。 + +![列出 GPG 密钥][8] + +#### 第三步:用 GPG 加密一个文件 + +现在你已经设置了 GPG 密钥,你可以开始对我们的文件进行加密了。 + +使用下面的命令来加密文件: + +``` +gpg --encrypt --output file.gpg --recipient user@example.com file +``` + +让我们快速浏览一下该命令的内容: + +首先,你指定了 `—encrypt` 选项。这只是告诉 GPG,我们将对一个文件进行加密。 + +接下来,你指定了 `--output file.gpg`。这可以是任何名字,不过惯例是给你要加密的文件的名称加上 `.gpg` 扩展名(所以 `message.txt` 会变成 `message.txt.gpg`)。 + +接下来,你输入 `—recipient user@example.com`。这指定了一个相应的 GPG 密钥的电子邮件,这个密钥实际上在这个系统上还不存在。 + +有点迷惑? + +工作原理是,你在这里指定的电子邮件必须与你本地系统中的公钥相联系。 + +通常情况下,这将是来自一个另外的人的 GPG 公钥,你要用它来加密你的文件。之后,该文件将只能用该用户的私钥进行解密。 + +在这个例子中,我将使用我以前的与 `user@example.com` 关联的 GPG 密钥。因此,其逻辑是,我用 `user@example.com` 的 _公钥_ 对文件进行加密,然后只能用 `user@example.com` 的 _私钥_ 进行解密。 + +如果你是为别人加密文件,你只有该公钥,但由于你是为自己加密文件,你的系统上有这两个密钥。 + +最后,你只需指定你要加密的文件。在这个例子中,让我们使用一个名为 `message.txt` 的文件,内容如下: + +``` +We're encrypting with GPG! +``` + +![文本文件样本][10] + +同样地,如果电子邮件是 `user@example.com`,新的 GPG 命令将如下所示: + +``` +gpg --encrypt --output message.txt.gpg --recipient user@example.com message.txt +``` + +![用 GPG 加密文件][11] + +如果你尝试阅读该文件,你会看到它看起来像乱码。这是预料之中的,因为该文件现在已经被加密了。 + +![读取加密文件会产生乱码][12] + +现在让我们删除未加密的 `message.txt` 文件,这样你就可以看到 `message.txt.gpg` 文件实际上在没有原始文件的情况下也能正常解密。 + +![][13] + +#### 第四步:用 GPG 解密加密的文件 + +最后,让我们来实际解密加密的信息。你可以用下面的命令来做。 + +``` +gpg --decrypt --output file file.gpg +``` + +通过这里的参数,我们首先指定 `—decrypt`,它告诉 GPG 你将会解密一个文件。 + +接下来,你输入 `—output` 文件,这只是告诉 GPG,在你解密后,你将把我们文件的解密形式保存到哪个文件。 + +最后,你输入 `file.gpg`,这是你的加密文件的路径。 + +按照这个例子,我使用的命令是这样的。 + +``` +gpg --decrypt --output message.txt message.txt.gpg +``` + +![用GPG解密文件][14] + +然后就完成了!当你想用 GPG 加密和解密文件时,这就是全部内容了。 + +剩下你可能想知道的是如何与他人分享你的公钥,以便他们在将文件发送给你之前对其进行加密。 + +### 发送和接收 GPG 密钥 + +要给别人发送一个 GPG 密钥,你首先需要从你的**钥匙链**中导出它,它包含了你所有的公钥和私钥。 + +要导出一把钥匙,只需在你的钥匙链中找到钥匙的 ID,然后运行以下命令,用钥匙的 ID 替换 `id`,用你想保存的文件名替换 `key.gpg`。 + +``` +gpg --output key.gpg --export id +``` + +![导出 GPG 公钥][15] + +要导入一个密钥,只需把输出文件(来自前面的命令)给其他用户,然后让他们运行下面的命令。 + +``` +gpg --import key.gpg +``` + +![][16] + +但要正常使用该钥匙,你需要验证该钥匙,以便 GPG 正确地信任它。 + +这可以通过在其他用户的系统上使用 `--edit-key` 参数来完成,然后对钥匙进行签名。 + +首先运行 `gpg --edit-key id`: + +![GPG 编辑密钥][17] + +接下来,使用 `—fpr` 参数,它将显示钥匙的指纹。这个命令的输出应该与你自己机器上的输出进行验证,这可以通过在你的系统上运行同样的 `--edit-key` 参数来找到。 + +![GPG 密钥的指纹][18] + +如果一切吻合,只需使用 `—sign` 参数,一切就可以开始了。 + +![签署 GPG 密钥][19] + +就是这样!其他用户现在可以开始用你的公钥加密文件了,就像你之前做的那样,确保它们只有在你用你的私钥解密时才能被你读取。 + +这就是使用 GPG 的所有基础知识! + +### 总结 + +现在你已经了解了开始使用 GPG 所需要的一切,包括为自己和他人加密文件。正如我前面提到的,这只是为了了解 GPG 的加密和解密过程是如何工作的。你刚刚获得的基本 GPG 知识在应用于真实世界的场景中时可以更上一层楼。 + +还需要一些帮助来弄清楚一些东西,或者一些不正常的东西?欢迎在下面的评论中留下任何内容。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/gpg-encrypt-files-basic/ + +作者:[Hunter Wittenborn][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/hunter/ +[b]: https://github.com/lujun9972 +[1]: https://gnupg.org/ +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/GPG-encryption-explained.png?resize=800%2C300&ssl=1 +[3]: https://itsfoss.com/adding-external-repositories-ubuntu/ +[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/GPG-encryption-basic.png?resize=800%2C450&ssl=1 +[5]: https://itsfoss.com/arch-based-linux-distros/ +[6]: https://itsfoss.com/pacman-command/ +[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/gpg-key-generation.png?resize=676%2C663&ssl=1 +[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/gpg-list-keys-1.png?resize=703%2C379&ssl=1 +[9]: https://itsfoss.com/cdn-cgi/l/email-protection +[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/gpg-example-message.png?resize=665%2C277&ssl=1 +[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/gpg-example-message-encrypted-800x252.png?resize=800%2C252&ssl=1 +[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/gpg-example-message-encrypted-gibberish.png?resize=800%2C252&ssl=1 +[13]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/gpg-message-original-deleted.png?resize=800%2C252&ssl=1 +[14]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/gpg-message-decrypt.png?resize=800%2C252&ssl=1 +[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/gpg-key-export-800x218.png?resize=800%2C218&ssl=1 +[16]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/gpg-key-import.png?resize=800%2C221&ssl=1 +[17]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/gpg-edit-key-prompt.png?resize=800%2C351&ssl=1 +[18]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/gpg-edit-key-fingerprint-1.png?resize=800%2C317&ssl=1 +[19]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/gpg-edit-key-sign.png?resize=800%2C531&ssl=1 From 168c5252de9da86ff7431a9c1da77f52e0dcd8b8 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 15 Dec 2021 05:02:32 +0800 Subject: [PATCH 182/244] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211215=20?= =?UTF-8?q?Get=20All=20Kind=20of=20System=20Information=20in=20Linux=20Ter?= =?UTF-8?q?minal=20With=20inxi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211215 Get All Kind of System Information in Linux Terminal With inxi.md --- ...Information in Linux Terminal With inxi.md | 285 ++++++++++++++++++ 1 file changed, 285 insertions(+) create mode 100644 sources/tech/20211215 Get All Kind of System Information in Linux Terminal With inxi.md diff --git a/sources/tech/20211215 Get All Kind of System Information in Linux Terminal With inxi.md b/sources/tech/20211215 Get All Kind of System Information in Linux Terminal With inxi.md new file mode 100644 index 0000000000..639c7ffe75 --- /dev/null +++ b/sources/tech/20211215 Get All Kind of System Information in Linux Terminal With inxi.md @@ -0,0 +1,285 @@ +[#]: subject: "Get All Kind of System Information in Linux Terminal With inxi" +[#]: via: "https://itsfoss.com/inxi-system-info-linux/" +[#]: author: "Pratham Patel https://itsfoss.com/author/pratham/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Get All Kind of System Information in Linux Terminal With inxi +====== + +inxi is a CLI tool that lists information about your Linux system. This includes both hardware and software details. You get simple details like which computer model you have, which kernel, distribution and desktop environment you are using etc. You also get details like which RAM slot of your motherboard is occupied by memory modules etc. + +It can also be used to monitor processes that are running on your computer that are either consuming CPU resources or memory resources, or both. + +In this tutorial, I’ll show some of the popular use cases of inxi to get information for your Linux system. + +But first, let me quickly show you how to install inxi. + +### Install inxi on your Linux distribution + +[Inxi][1] is a popular software that is available in the repository of most Linux distributions. Not popular enough to have it installed by default. + +To install inxi on Ubuntu and Debian based distributions, use this command: + +``` + + sudo apt install inxi + +``` + +To install inxi on Fedora and RHEL8-based distributions, use: + +``` + + sudo dnf install -y epel-release + sudo dnf install -y inxi + +``` + +To install inxi on Arch Linux and it’s derivatives, run the following command: + +``` + + sudo pacman -S inxi + +``` + +### Using inxi to get Linux system details + +You can get an overview of your system information by simply running the inxi command in your terminal. + +``` + + inxi + +``` + +As you can see in the image below, it gives a brief overview of CPU information, clockspeed, Kernel, RAM (displayed with Mem) and storage information along with number of running processes and shell version details. + +![The default output of inxi command][2] + +You can also use the “-b” flag to show a more detailed overview of your system information. It will show more information regarding your CPU, drives, currently running processes, motherboard UEFI version, GPU, display resolution, network devices etc + +``` + + inxi -b + +``` + +![Detailed hardware and software information about machine as reported by inxi][3] + +As you might have noticed by the use of the “-b” flag, inxi, just like any command line utility, it has a lot of flags that influence the output of inxi once executed. You can use these flags or combine them to get only certain detailed information. + +Let me show a few example. + +#### Get details of audio devices + +Using the “-A” flag will present you with information about your audio [output] devices. That will display the physical audio [output] devices, sound server and the audio driver details. + +``` + + inxi -A + +``` + +![Output of inxi command when “-A” flag is used][4] + +#### Get battery information + +The “-B” flag will show details about your battery (if there is a battery present). You will get details like the current battery charge in Wh (Watt hours) and the condition. + +Since I use a desktop, here is a sample output of what the output would look like if the “-B” flag was used with inxi with a battery attached + +``` + + Battery: ID-1: BAT0 charge: 50.0 Wh (100.0%) condition: 50.0/50.0 + +``` + +#### Get detailed CPU information + +The -C flag shows detailed CPU information. That includes your CPU cache size, speed in MHz (of each core, if there are multiple cores), number of cores, CPU model and also if [your CPU is 32-bit or 64-bit][5]. + +``` + + inxi -C + +``` + +![Detailed CPU information displayed by inxi][6] + +Make note, if you run inxi -C in a virtual machine, detecting your CPU’s minimum and maximum CPU frequency can be quite tricky for inxi. Below is a sample output of using the “-C” flag with inxi in a quad core Debian 11 Virtual Machine. + +![An example output of using the “-C” flag in a Virtual Machine][7] + +#### Get even more detailed system information + +The “-F” flag will show detailed system information (like the “-b” flag, but even more in depth). It includes almost everything to get a high level overview of the system that you are dealing with. + +``` + + inxi -F + +``` + +![][8] + +#### Get graphics related information + +The “-G” flag displays the data about everything related to Graphics. + +It shows you all your Graphics Devices (GPUs), the [GPU] driver that is being used (helpful to check if you are using the Nvidia driver or the nouveau driver), display output resolution and driver version. + +``` + + inxi -G + +``` + +![][9] + +#### Get running process info + +The “-I” (upper case i) shows detailed information about running processes, your current shell, memory (and memory usage) and inxi version. + +![inxi get running process info][10] + +#### Get RAM information + +As you might have guessed, the -m flag shows you memory (RAM) related information. + +It provides information such as total available memory, maximum capacity of memory supported [by your hardware platform or by your CPU manufacturer], number of physical memory slots available on the motherboard, if ECC is present or not, the memory slots that are populated and also what is the size of each module along with the speed that said module is running at, per enumerated slot(s). + +``` + + inxi -m + +``` + +To take advantage of the in-depth details provided by the “-m” flag, like the maximum capacity, RAM module details that is at each slot, you need super-user privileges. + +``` + + sudo inxi -m + +``` + +![][11] + +If you just want the output to be short and not in this in-depth, you can use the “–memory-short” flag with inxi. + +Using the “–memory-short” flag will only show total memory that is available and how much of it is currently in use. + +#### See which package repository is in use + +When you use the “-r” flag with inxi, it will present you with a list of all the repositories that your package manager is currently using or updating local repository cache with. + +![List of repositories in use][12] + +#### Get RAID devices details + +The “-R” flag shows you information about all the RAID devices. + +Surprisingly, it even shows information about ZFS RAID (because this file system is not included in many Linux distributions by default). It shows details about the file system on the RAID device, status – if it is online or offline, total size and available size. + +``` + + inxi -R + +``` + +![][13] + +#### Check weather information in Linux terminal (yes, that’s possible too) + +And, as a bonus, you can even check the weather of any place on Earth with the “-W” flag. + +The “-W” flag needs to be followed by either one of the following location descriptors + + * Postal code or zip code + * Latitude,longitude + * City[,state],country (must not contain spaces; replace spaces with the “+” sign) + + + +``` + + inxi -W Baroda,India + +``` + +![Use of the “-W” flag with inxi followed by the city,country location descriptor][14] + +### Monitoring the usage of system resource(s) with inxi + +Along with all the verbose information that inxi provides about your installed hardware and the software that drives it, it can also be used for resource monitoring purposes. + +Use the “-t” flag to show processes. You can also use the non-mandatory options “c” (for CPU) and “m” (for RAM). These options can also be combined with a numerical value that lists desired amount of processes. + +Below are a few examples of using the “-t” flag to monitor system resources. + +``` + + inxi -t + +``` + +If you run inxi with “-t” flag but without the non-mandatory options, it will output assuming that you typed added the “cm5” options. + +![No difference in output of “inti -t” and “inxi -t cm5”][15] + +``` + + inxi -t cm10 + +``` + +![][16] + +That’s fine for rare use but there are [dedicated system resource monitoring tools][17] that are easier to use and have more functionalities. + +### In the end… + +For the individuals who have to diagnose issues with computers and it’s system information that they are not aware about, inxi can be incredibly helpful. It shows the processes that are consuming CPU, memory; you can check if the correct graphics drivers are being used, if the motherboard UEFI/BIOS is up to date, and much more. + +In fact, on [It’s FOSS Community forum][18], we ask members to share the output of inxi command while seeking help so that it is easier to see what kind of system is in use. + +I know there are other tools that provide [hardware info on Linux][19] but inxi combines both hardware and software details and that’s why I like it. + +Do you use inxi or some other tool? Share your experience in the comments please. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/inxi-system-info-linux/ + +作者:[Pratham Patel][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/pratham/ +[b]: https://github.com/lujun9972 +[1]: https://github.com/smxi/inxi +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/01_inxi.webp?resize=800%2C450&ssl=1 +[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/02_inxi_flag_b.webp?resize=800%2C450&ssl=1 +[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/03_inxi_flag_a.webp?resize=800%2C450&ssl=1 +[5]: https://itsfoss.com/32-bit-64-bit-ubuntu/ +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/04_inxi_flag_c.webp?resize=800%2C450&ssl=1 +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/05_inxi_flag_c_vm.webp?resize=800%2C396&ssl=1 +[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/06_inxi_flag_f.webp?resize=800%2C450&ssl=1 +[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/07_inxi_flag_g.webp?resize=800%2C450&ssl=1 +[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/inxi-get-running-process-info.png?resize=768%2C272&ssl=1 +[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/08_inxi_flag_m.webp?resize=800%2C450&ssl=1 +[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/package-repo-info-with-inxi.png?resize=800%2C339&ssl=1 +[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/09_inxi_flag_r.webp?resize=800%2C450&ssl=1 +[14]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/12_inxi_flag_w.webp?resize=800%2C450&ssl=1 +[15]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/10_inxi_flag_t.webp?resize=800%2C450&ssl=1 +[16]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/11_inxi_flag_t_cm10.webp?resize=800%2C450&ssl=1 +[17]: https://itsfoss.com/linux-system-monitoring-tools/ +[18]: https://itsfoss.community/ +[19]: https://itsfoss.com/hardinfo/ From b0be7c34e32fdc5c376aa740632b7e268e7e3eeb Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 15 Dec 2021 05:02:52 +0800 Subject: [PATCH 183/244] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211214=20?= =?UTF-8?q?Play=20the=20drums=20on=20Linux=20with=20Hydrogen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211214 Play the drums on Linux with Hydrogen.md --- ...4 Play the drums on Linux with Hydrogen.md | 133 ++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 sources/tech/20211214 Play the drums on Linux with Hydrogen.md diff --git a/sources/tech/20211214 Play the drums on Linux with Hydrogen.md b/sources/tech/20211214 Play the drums on Linux with Hydrogen.md new file mode 100644 index 0000000000..608fb3315e --- /dev/null +++ b/sources/tech/20211214 Play the drums on Linux with Hydrogen.md @@ -0,0 +1,133 @@ +[#]: subject: "Play the drums on Linux with Hydrogen" +[#]: via: "https://opensource.com/article/21/12/open-source-drum-hydrogen" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Play the drums on Linux with Hydrogen +====== +Create looping beats using Hydrogen, an open source drum machine. +![Man playing drums][1] + +Much of today's music features the exacting work of a drum machine. The term might make you think of a drum set with mechanical levers and cranks armed with drumsticks, but all it actually refers to is a synthesizer programmed to play drum sounds. A good drum machine programmer (often also a drummer) can make a drum machine sound either hyper-robotic (if that's the sound the producer's going for) or almost human, with nuance and swing. Drum machines can be physical devices, like the famous Roland TR-808, TR-909, Alesis HR-16, and many others, but lately, they've been implemented as software. The excellent [LMMS][2] application contains a drum machine, and there's the drumkv1 plugin for DAWs like [Ardour][3], [Qtractor][4], and [Rosegarden][5]. But there's also the dedicated [Hydrogen][6] drum machine that has just one job, which it does very well, and has done for the past 20 years: be a great, fully-featured, and open source drum machine. + +### Install Hydrogen on Linux + +Hydrogen is available on most Linux distributions from your package manager. On Fedora, Mageia, and similar distributions: + + +``` +`$ sudo dnf install hydrogen` +``` + +On Elementary, Mint, and other Debian-based distributions: + + +``` +`$ sudo apt install hydrogen` +``` + +You may also use Hydrogen as a [Flatpak][7]. + +BSD and [Pkgsrc users][8] can install Hydrogen from the ports collection. + +For macOS and Windows, download an installer from [hydrogen-music.org][9]. + +### How to create a loop + +A drum loop consists of individual beats. You can construct a loop by placing drum beats in the _pattern_ chart at the bottom of the Hydrogen interface. Here's a screenshot of a basic loop, with a kick drum sound on beats 1 and 3 and some lively snare work on beats 2, 2-and, and 4. + +![Hydrogen's pattern chart][10] + +(Seth Kenlon, CC BY-SA 4.0) + +To hear the pattern, click the **Play** button at the top of the window. + +![Play pattern][11] + +(Seth Kenlon, CC BY-SA 4.0) + +By default, Hydrogen's beat chart gives you a pretty high-level view of a measure: there are four beats, with just half-beats in between. If you don't play drums or play with drum machines often, that might be enough to get you started, but a real drummer would get pretty bored if all they could do was hit a drum on the beat and upbeat. You can give yourself more flexibility by increasing the resolution of the chart. + +![Better resolution for more flexibility][12] + +(Seth Kenlon, CC BY-SA 4.0) + +Once you can see 32nd and 64th notes, you can create dynamic beats that would be fun to play or, potentially, as impossible to play as dubstep. + +### How to build a loop + +A _pattern_ is a single entity within Hydrogen, and it's designed to be looped for as long as you need it to play. If you're just jamming, then you may not need much more than a single loop, but if you're creating a song with structure, then you can build many different patterns and string them together as a song. The top half of the Hydrogen interface displays patterns. The highlighted box represents the pattern you're currently creating. + +![Pattern matrix and song builder][13] + +(Seth Kenlon, CC BY-SA 4.0) + +You've got an entity called **Pattern 1** right now, and it's looping endlessly because Hydrogen is set to play just a pattern. To switch Hydrogen over to song mode, click the **Song** button at the top of the window. + +![Song mode][14] + +(Seth Kenlon, CC BY-SA 4.0) + +In song mode, Hydrogen loops over as many patterns as you have highlighted in the song matrix. You can build a different pattern by highlighting **Pattern 2** and including that in your song. + +### Loops as building blocks + +It's not uncommon to have one loop serve as an unchanging foundation, with new loops adding variation on top. For instance, you might want a steady kick drum beat through your entire song, but you want the ability to change the beats of the snare and hi-hat and to add in more cowbell to meet the demands of a producer who has a fever for more cowbell. By default, Hydrogen plays one pattern at a time, but you can make it treat patterns as layers so you can have several patterns playing over one another. + +![Play pattern stack][15] + +(Seth Kenlon, CC BY-SA 4.0) + +### Fix it in the mix + +Once you've got a fun pattern or song going, you may find that you need to adjust the levels of certain sounds. Hi-hat samples especially can be wildly variable in level, with some hi-hats sounding like keys on a keychain and others sounding like a ceremonial gong. To adjust the volume of each instrument individually, click the **Mixer** button in the top right of the Hydrogen window. In the mixer interface that opens, you can adjust the stereo position and level of each component in your drum kit. + +![Hydrogen mixer][16] + +(Seth Kenlon, CC BY-SA 4.0) + +### The audio pipeline + +If all you want to do is make beats, the Hydrogen on its own is all you need. Should you want to integrate it with other music applications, though, you need to build a pipeline, which on Linux can be done with JACK or, if you're running Pipewire, [Helvum][17]. Using one of these applications for routing audio lets you have Hydrogen play along with the music you're composing in a digital audio workstation. + +Alternatively, you can export your loop or song as a MIDI file, a Lilypond file, or an audio recording. Do this from the **File** menu. + +### Making noise + +You don't have to be a drummer or a musician to have fun with the Hydrogen drum machine. But if you are a drummer, you're sure to find Hydrogen to be a useful and versatile emulation of hardware drum machines. Hydrogen has just one bank of sounds, but many more are available online. Using the **Drumkits** menu, you can import drumkits from Hydrogen's website, and you can even [build your own drumkits][18] and import them from local files. There's no end to what fun you can have with Hydrogen, so download it and start making some noise. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/open-source-drum-hydrogen + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/michael-dobrinski-unsplash.jpg?itok=ykmFxbjM (Man playing drums) +[2]: https://opensource.com/life/16/2/linux-multimedia-studio +[3]: https://ardour.org/ +[4]: https://opensource.com/article/17/6/qtractor-audio +[5]: https://opensource.com/article/18/3/make-sweet-music-digital-audio-workstation-rosegarden +[6]: http://hydrogen-music.org/ +[7]: https://opensource.com/article/21/11/install-flatpak-linux +[8]: https://opensource.com/article/19/11/pkgsrc-netbsd-linux +[9]: http://hydrogen-music.org/downloads/ +[10]: https://opensource.com/sites/default/files/hydrogen-pattern-chart.jpg (Hydrogen's pattern chart) +[11]: https://opensource.com/sites/default/files/hydrogen-play-pattern.jpg (Play pattern) +[12]: https://opensource.com/sites/default/files/hydrogen-resolution.jpg (Better resolution for more flexibility) +[13]: https://opensource.com/sites/default/files/hydrogen-pattern.jpg (Pattern matrix and song builder) +[14]: https://opensource.com/sites/default/files/hydrogen-song-mode.jpg (Song mode) +[15]: https://opensource.com/sites/default/files/hydrogen-pattern-stack.jpg (Play pattern stack) +[16]: https://opensource.com/sites/default/files/hydrogen-mixer.jpg (Hydrogen mixer) +[17]: https://gitlab.freedesktop.org/ryuukyu/helvum +[18]: https://opensource.com/article/17/11/how-create-hydrogen-drumkit-fun-and-profit From dd1f0a37adca718f57b529352b8e9339e8111aab Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 15 Dec 2021 05:03:25 +0800 Subject: [PATCH 184/244] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020211215=20?= =?UTF-8?q?Pop!=5FOS=2021.10=20Introduces=20a=20New=20Application=20Librar?= =?UTF-8?q?y,=20GNOME=2040,=20and=20a=20Refresh=20Install=20Option?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20211215 Pop-_OS 21.10 Introduces a New Application Library, GNOME 40, and a Refresh Install Option.md --- ... GNOME 40, and a Refresh Install Option.md | 153 ++++++++++++++++++ 1 file changed, 153 insertions(+) create mode 100644 sources/news/20211215 Pop-_OS 21.10 Introduces a New Application Library, GNOME 40, and a Refresh Install Option.md diff --git a/sources/news/20211215 Pop-_OS 21.10 Introduces a New Application Library, GNOME 40, and a Refresh Install Option.md b/sources/news/20211215 Pop-_OS 21.10 Introduces a New Application Library, GNOME 40, and a Refresh Install Option.md new file mode 100644 index 0000000000..b23e8ab980 --- /dev/null +++ b/sources/news/20211215 Pop-_OS 21.10 Introduces a New Application Library, GNOME 40, and a Refresh Install Option.md @@ -0,0 +1,153 @@ +[#]: subject: "Pop!_OS 21.10 Introduces a New Application Library, GNOME 40, and a Refresh Install Option" +[#]: via: "https://news.itsfoss.com/pop-os-21-10/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Pop!_OS 21.10 Introduces a New Application Library, GNOME 40, and a Refresh Install Option +====== + +Pop!_OS is undoubtedly one of the [best Linux distributions][1], also happens to be a popular recommendation currently for Linux newbies (and gamers). + +If you do not prefer non-LTS releases, you should stick to [Pop!_OS 20.04 LTS][2]. But, if you are looking for the latest and greatest update, Pop!_OS 21.10 is finally here for you to download! + +Not to forget, the Pop!_OS 21.10 release sets things in motion for a potential list of features that you can expect with Pop!_OS 22.04 LTS, April next year. + +### Pop!_OS 21.10: What’s New? + +Note that even if Pop!_OS 21.10 features GNOME 40 as one of the most considerable changes, you should expect a similar [COSMIC desktop experience][3] as you did with Pop!_OS 21.04. + +That being said, there are some key changes in Pop!_OS 21.10 that should enhance your Linux desktop experience, and make things easier. + +#### New Application Library + +With Pop!_OS 21.10, the full-screen application menu has been replaced by a separate searchable window. This should be less obstructive and come in handy. + +![][4] + +It is not just a unique tweak to GNOME 40 by System76, but it should functionally provide more benefits than the traditional full-screen app drawer. + +For instance, the new application library should enhance the multi-monitor experience by letting you quickly search for an application in the screen you focus, instead of taking up the full screen. + +![][5] + +It also lets you quickly search for an application (or filter them as per your search query). Not just limited to the applications installed, but it will also display the applications that can be installed using the Pop!_Shop. + +![][6] + +You can access the application library using the “**Applications**” button right to the Workspaces, or perform a four-finger swipe right, or press **Super + A**. + +#### System76’s Repositories Replacing Launchpad + +If you have been following us, you might have already read about [System76 moving PPA repositories to its system][7]. + +![][8] + +Overall, this should help them take control of packages and push updates faster than Ubuntu/Canonical’s default repositories. + +#### GNOME Updates + +The jump from GNOME 3.38.4 to 40 should introduce several [GNOME 40 improvements][9], at least to the core applications. + +Some notable improvements include Wi-Fi sorting in the Settings, meaning, the available networks will show up in the order of active connection, previous connections, and strength of the signal, to present a useful order of available Wi-Fi networks. + +You can also notice auto-completion in Files after you search for something. + +#### Latest Linux Kernel & NVIDIA Driver + +![][10] + +Pop!_OS is known to push the latest Linux Kernel faster than many other distributions. Pop!_OS 21.04 was already running [Linux Kernel 5.15][11], and Pop!_OS 21.10 continues with it. + +Here, Pop!_OS 21.10 brings in Linux Kernel 5.15.5 and also packs in the latest available NVIDIA driver for best compatibility with newer hardware. + +#### Refresh Install Option + +![][12] + +Whenever Pop!_OS is installed from the recovery partition, it lets you choose to opt for “Refresh Install”. + +In this way, you get to re-install Pop!_OS without losing your files in the Home directory. It should come in handy if something fails to work, and you cannot troubleshoot it, a re-installation should bring back things to their default state. + +#### Improvements to Pop!_OS Upgrade + +![A new default icon for the user if you do not have anything set.][13] + +With Pop!_OS 21.10, you can also expect a better upgrade experience. + +To make things convenient, Pop!_OS made some changes to its behavior when the distribution is upgraded. Some of them are: + + * Disabling the user-added PPAs automatically to avoid upgrade conflicts. + * The recovery partition is now updated before upgrading the distribution to give you a medium to easily re-install the distro if the installation using the restore partition does not succeed the first time. + + + +#### Tech-Preview for Raspberry Pi 4 + +As of now, it is entirely an experiment for Raspberry Pi 4 but you can download a tech preview release for the ARM platform. + +They plan to introduce Pop!_Pi with future Pop!_OS releases. + +### Thoughts on Pop!_OS 21.10 + +Pop!_OS is constantly making efforts to make the desktop Linux experience as reliable as possible while having some of the latest packages at the same time. + +With Pop!_OS 21.10, an updated desktop environment, Linux Kernel, and usability improvements make up for a useful upgrade. + +If you are using a non-LTS release, you should definitely consider upgrading as soon as possible. Note that you should always backup your data before you proceed to upgrade. + +### Download Pop!_OS 21.10 + +You can find two different ISOs available for Pop!_OS 21.10, one for NVIDIA, and the other for Intel/AMD. + +Head to the official download page and download the ISO you require. + +[Pop!_OS 21.10][14] + +If you already had Pop!_OS 21.04 installed, you should get an upgrade notification soon following their official announcement or head to the system settings and apply the upgrade. + +If you are using the terminal, type in the following commands: + +``` + + sudo apt update + sudo apt full-upgrade + pop-upgrade release upgrade + +``` + +You can also read the details mentioned in their [official announcement post][15]. + +_What do you think about Pop!_OS 21.10? Let me know your thoughts in the comments below._ + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/pop-os-21-10/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/best-linux-distributions/ +[2]: https://itsfoss.com/pop-os-20-04-review/ +[3]: https://news.itsfoss.com/pop-os-21-04-beta-release/ +[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ4MSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[5]: https://i0.wp.com/i.ytimg.com/vi/A_8YflrS35A/hqdefault.jpg?w=780&ssl=1 +[6]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ0MyIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[7]: https://news.itsfoss.com/pop-os-ppa-repo-move/ +[8]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ3NSIgd2lkdGg9IjczNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[9]: https://news.itsfoss.com/gnome-40-release/ +[10]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjUxMCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[11]: https://news.itsfoss.com/linux-kernel-5-15-release/ +[12]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjU2MyIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[13]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ5OCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[14]: https://pop.system76.com +[15]: https://blog.system76.com/post/670564272872488960/popos-2110-has-landed From a5e338b09ee8d432c22486693712090bba462cd4 Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 15 Dec 2021 08:57:16 +0800 Subject: [PATCH 185/244] translating --- ...al your source code with Jinja2 and Git.md | 79 ------------------- 1 file changed, 79 deletions(-) delete mode 100644 sources/tech/20211210 Reveal your source code with Jinja2 and Git.md diff --git a/sources/tech/20211210 Reveal your source code with Jinja2 and Git.md b/sources/tech/20211210 Reveal your source code with Jinja2 and Git.md deleted file mode 100644 index 1dc1cb646d..0000000000 --- a/sources/tech/20211210 Reveal your source code with Jinja2 and Git.md +++ /dev/null @@ -1,79 +0,0 @@ -[#]: subject: "Reveal your source code with Jinja2 and Git" -[#]: via: "https://opensource.com/article/21/12/reveal-source-code-jinja2-git" -[#]: author: "Ayush Sharma https://opensource.com/users/ayushsharma" -[#]: collector: "lujun9972" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Reveal your source code with Jinja2 and Git -====== -Here's how I keep my website open by linking every page back to its -original source. -![Text editor on a browser, in blue][1] - -I'm a huge fan of open source. - -One of the little ways I've supported the cause is by keeping my personal blog site open from the very beginning. I do this partly to let people see the history of changes behind each page. But I also do it because, when I started using [Jekyll][2], I didn't find many open source Jekyll blogs to learn from. My hope is that keeping my website open and exposing my trials and errors will save someone else a lot of time. - -### The Jekyll page.path variable - -One way I achieve that is by linking every entry I post back to its original [Markdown][3]. [Jekyll's helpful variables][4] have exactly the tool that's needed: the `page.path`. This variable contains the raw filesystem path of each page. The official description even highlights its usefulness for linking back to the source! - -Printing `{{ page.path }}` within an article's Markdown file outputs something similar to this: - - -``` -`_posts/2021-10-10-example.md` -``` - -Assume that the article's source code existed at this path: - - -``` -`https://example.com/ayushsharma-in/-/blob/master/_posts/2021-10-10-example.md` -``` - -If you prepend `https://example.com/ayushsharma-in/-/blob/master/` to any article's `page.path`, it generates a link back to its source code. - -In Jekyll, generating this full link looks like this: - - -``` -`View source` -``` - -It's that easy. - -### Jekyll and the open web - -The modern web is an intricate and multilayered technology, but that doesn't mean it has to obfuscate. With Jekyll's variables, you ensure that your users can, if they wish, learn more about how you built your site. - -You can see real-world examples on my [personal blog][5]: scroll to the bottom for the View Source link. - -* * * - -This article is adapted from [ayush sharma's notes][6] and is republished with permission. - -See how Jekyll, an open source generator of static HTML files, makes running a blog as easy as... - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/12/reveal-source-code-jinja2-git - -作者:[Ayush Sharma][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/ayushsharma -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_blue_text_editor_web.png?itok=lcf-m6N7 (Text editor on a browser, in blue) -[2]: https://opensource.com/article/21/9/build-website-jekyll -[3]: https://opensource.com/article/19/9/introduction-markdown -[4]: https://jekyllrb.com/docs/variables/#page-variables -[5]: https://www.ayushsharma.in -[6]: https://www.ayushsharma.in/2021/11/linking-jekyll-pages-back-to-their-git-source-code From 7f9af1db1cdaecfb6c2d3d15ffdc523f085af0fc Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 15 Dec 2021 08:57:46 +0800 Subject: [PATCH 186/244] translating --- ...al your source code with Jinja2 and Git.md | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 translated/tech/20211210 Reveal your source code with Jinja2 and Git.md diff --git a/translated/tech/20211210 Reveal your source code with Jinja2 and Git.md b/translated/tech/20211210 Reveal your source code with Jinja2 and Git.md new file mode 100644 index 0000000000..7f89520268 --- /dev/null +++ b/translated/tech/20211210 Reveal your source code with Jinja2 and Git.md @@ -0,0 +1,76 @@ +[#]: subject: "Reveal your source code with Jinja2 and Git" +[#]: via: "https://opensource.com/article/21/12/reveal-source-code-jinja2-git" +[#]: author: "Ayush Sharma https://opensource.com/users/ayushsharma" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +用 Jinja2 和 Git 公开你的源码 +====== +这里是我如何通过链接每个页面回到其原始来源来保持我的网站开放的方法, +![Text editor on a browser, in blue][1] + +我是一个开源的超级粉丝。 + +我支持这项事业的一个小方法是从一开始就保持我的个人博客网站开放。我这样做的部分原因是让人们看到每个页面背后的变化历史。还因为当我开始使用 [Jekyll][2] 时,我没有找到很多开源的 Jekyll 博客可以学习。我希望保持我的网站开放并公开我的尝试和错误会为其他人节省很多时间。 + +### Jekyll 的 page.path 变量 + +我实现这一目标的方法之一是将我发布的每一个条目链接到其原始的 [Markdown][3]。[Jekyll 的有用变量][4]正好有一个需要的工具:`page.path`。这个变量包含每个页面的原始文件系统路径。官方的描述甚至强调了它对链接回源的作用! + +在一篇文章的 Markdown 文件中打印 `{{page.path }}`,可以得到类似这样的结果: + + +``` +`_posts/2021-10-10-example.md` +``` + +假设该文章的源代码存在于这个路径: + + +``` +`https://example.com/ayushsharma-in/-/blob/master/_posts/2021-10-10-example.md` +``` + +如果你在任何文章的 `page.path` 前加上 `https://example.com/ayushsharma-in/-/blob/master/`,它就会生成一个返回其源码的链接。 + +在 Jekyll 中,生成这个完整的链接看起来像这样: + + +``` +`View source` +``` + +就是这么简单。 + +### Jekyll 和开放网络 + +现代网络是一种错综复杂的多层次技术,但这并不意味着它必须混淆。有了 Jekyll 的变量,你可以确保你的用户可以,如果他们愿意,了解更多关于你是如何建立你的网站的。 + +你可以在我的[个人博客][5]上看到真实的例子:滚动到底部的查看源码链接。 + +* * * + +本文改编自 [ayush sharma 的笔记][6],并经许可转载。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/reveal-source-code-jinja2-git + +作者:[Ayush Sharma][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/ayushsharma +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_blue_text_editor_web.png?itok=lcf-m6N7 (Text editor on a browser, in blue) +[2]: https://opensource.com/article/21/9/build-website-jekyll +[3]: https://opensource.com/article/19/9/introduction-markdown +[4]: https://jekyllrb.com/docs/variables/#page-variables +[5]: https://www.ayushsharma.in +[6]: https://www.ayushsharma.in/2021/11/linking-jekyll-pages-back-to-their-git-source-code From 7d939b45f050fb1eaff08a177724d811778d6ea5 Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 15 Dec 2021 08:59:40 +0800 Subject: [PATCH 187/244] translating --- ...1213 My favorite Linux commands for optimizing web images.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20211213 My favorite Linux commands for optimizing web images.md b/sources/tech/20211213 My favorite Linux commands for optimizing web images.md index 89a0ab8491..725188717f 100644 --- a/sources/tech/20211213 My favorite Linux commands for optimizing web images.md +++ b/sources/tech/20211213 My favorite Linux commands for optimizing web images.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/21/12/optimize-web-images-linux" [#]: author: "Ayush Sharma https://opensource.com/users/ayushsharma" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 4dd8e22c212cfed67a9d2694a23868d03cc9fe69 Mon Sep 17 00:00:00 2001 From: jrg Date: Wed, 15 Dec 2021 10:30:03 +0800 Subject: [PATCH 188/244] Update 20211215 Get All Kind of System Information in Linux Terminal With inxi.md TSL --- ... Kind of System Information in Linux Terminal With inxi.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/tech/20211215 Get All Kind of System Information in Linux Terminal With inxi.md b/sources/tech/20211215 Get All Kind of System Information in Linux Terminal With inxi.md index 639c7ffe75..6b2a8bb3eb 100644 --- a/sources/tech/20211215 Get All Kind of System Information in Linux Terminal With inxi.md +++ b/sources/tech/20211215 Get All Kind of System Information in Linux Terminal With inxi.md @@ -2,7 +2,7 @@ [#]: via: "https://itsfoss.com/inxi-system-info-linux/" [#]: author: "Pratham Patel https://itsfoss.com/author/pratham/" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "jrglinux" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " @@ -257,7 +257,7 @@ via: https://itsfoss.com/inxi-system-info-linux/ 作者:[Pratham Patel][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[jrglinux](https://github.com/jrglinux) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From bbd39046703a3dbc4cd7519dc3ea6959ac5349e6 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 15 Dec 2021 14:03:11 +0800 Subject: [PATCH 189/244] PUB @wxy https://linux.cn/article-14082-1.html --- ... Files on Linux -Hands-on for Beginners.md | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) rename {translated/tech => published}/20211211 Using GPG to Encrypt and Decrypt Files on Linux -Hands-on for Beginners.md (86%) diff --git a/translated/tech/20211211 Using GPG to Encrypt and Decrypt Files on Linux -Hands-on for Beginners.md b/published/20211211 Using GPG to Encrypt and Decrypt Files on Linux -Hands-on for Beginners.md similarity index 86% rename from translated/tech/20211211 Using GPG to Encrypt and Decrypt Files on Linux -Hands-on for Beginners.md rename to published/20211211 Using GPG to Encrypt and Decrypt Files on Linux -Hands-on for Beginners.md index ab3a8a99f9..544c4f6b56 100644 --- a/translated/tech/20211211 Using GPG to Encrypt and Decrypt Files on Linux -Hands-on for Beginners.md +++ b/published/20211211 Using GPG to Encrypt and Decrypt Files on Linux -Hands-on for Beginners.md @@ -4,19 +4,21 @@ [#]: collector: "lujun9972" [#]: translator: "wxy" [#]: reviewer: "wxy" -[#]: publisher: " " -[#]: url: " " +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14082-1.html" 手把手指导:在 Linux 上使用 GPG 加解密文件 ====== +![](https://img.linux.net.cn/data/attachment/album/202112/15/133531wcs1iy4luihr3beg.jpg) + [GnuPG][1],俗称 GPG,是一个非常通用的工具,被广泛用作电子邮件、信息、文件或任何你需要安全地发送给别人的东西的加密行业标准。 学习使用 GPG 很容易,你可以在几分钟内就学会使用它。 在本教程中,我将告诉你如何用 GPG 加密和解密文件。这是一个简单的教程,你可以在你的 Linux 系统上尝试所有的练习。这将帮助你练习 GPG 命令,并在你完全陌生的情况下理解它。 -先阅读整个教程,然后开始自己做。 +请先阅读整个教程,然后开始自己做。 ### GPG 是如何进行加密的? @@ -32,11 +34,11 @@ GPG 密钥的工作原理是使用两个文件,一个私钥和一个公钥。 私钥,顾名思义,是以私下的、不给任何人看的方式来存储的密钥。 -另一方面,公钥是用来给其他人的,或者你希望能够解密你的文件的任何人。(LCTT 译注:更多的用例是用来验证你的签名。) +另一方面,公钥是用来给其他人的,或者你希望能够解密你的文件的任何人。 -这就是 GPG 的主要加密方法的作用所在。它允许你对文件进行本地加密,然后允许其他人确保他们收到的文件实际上是由你发送的。因为他们能够解密文件的唯一方法是使用你的公钥,而这只有在文件首先使用你的私钥加密的情况下才有效。 +这就是 GPG 的加密方法的主要作用。它允许你对文件进行本地加密,然后允许其他人确保他们收到的文件实际上是由你发送的。因为他们能够解密文件的唯一方法是使用你的公钥,而这只有在文件首先使用你的私钥加密的情况下才有效。 -**反之**,其他人可以用你的公钥对文件进行加密,而唯一能够解密的方法是用你的私钥。因此,允许其他人公开发布文件,而不用担心除了你以外的人能够阅读它们。 +**反之**,其他人可以用你的公钥对文件进行加密,而唯一能够解密的方法是用你的私钥。因此,允许其他人公开发布文件,而不用担心除了你以外的人能够阅读它们。(LCTT 译注:另外一个常见的用例是你用你的私钥对公开发布的文件进行签名,别人使用你的公钥通过验证你的签名而确信文件是你发布的、并没有被篡改。但本文没有涉及这个用例。) 换句话说,如果一个文件是用私钥加密的,它只能用相应的公钥解密。而如果一个文件是用公钥加密的,它只能用相应的私钥解密。 @@ -102,7 +104,7 @@ gpg --encrypt --output file.gpg --recipient user@example.com file 让我们快速浏览一下该命令的内容: -首先,你指定了 `—encrypt` 选项。这只是告诉 GPG,我们将对一个文件进行加密。 +首先,你指定了 `—encrypt` 选项。这告诉 GPG,我们将对一个文件进行加密。 接下来,你指定了 `--output file.gpg`。这可以是任何名字,不过惯例是给你要加密的文件的名称加上 `.gpg` 扩展名(所以 `message.txt` 会变成 `message.txt.gpg`)。 @@ -112,7 +114,7 @@ gpg --encrypt --output file.gpg --recipient user@example.com file 工作原理是,你在这里指定的电子邮件必须与你本地系统中的公钥相联系。 -通常情况下,这将是来自一个另外的人的 GPG 公钥,你要用它来加密你的文件。之后,该文件将只能用该用户的私钥进行解密。 +通常情况下,这将是来自另外一个人的 GPG 公钥,你要用它来加密你的文件。之后,该文件将只能用该用户的私钥进行解密。 在这个例子中,我将使用我以前的与 `user@example.com` 关联的 GPG 密钥。因此,其逻辑是,我用 `user@example.com` 的 _公钥_ 对文件进行加密,然后只能用 `user@example.com` 的 _私钥_ 进行解密。 @@ -172,7 +174,7 @@ gpg --decrypt --output message.txt message.txt.gpg 要给别人发送一个 GPG 密钥,你首先需要从你的**钥匙链**中导出它,它包含了你所有的公钥和私钥。 -要导出一把钥匙,只需在你的钥匙链中找到钥匙的 ID,然后运行以下命令,用钥匙的 ID 替换 `id`,用你想保存的文件名替换 `key.gpg`。 +要导出一个密钥,只需在你的钥匙链中找到密钥的 ID,然后运行以下命令,用密钥的 ID 替换 `id`,用你想保存的文件名替换 `key.gpg`。 ``` gpg --output key.gpg --export id @@ -188,15 +190,15 @@ gpg --import key.gpg ![][16] -但要正常使用该钥匙,你需要验证该钥匙,以便 GPG 正确地信任它。 +但要正常使用该密钥,你需要验证该密钥,以便 GPG 正确地信任它。 -这可以通过在其他用户的系统上使用 `--edit-key` 参数来完成,然后对钥匙进行签名。 +这可以通过在其他用户的系统上使用 `--edit-key` 参数来完成,然后对密钥进行签名。 首先运行 `gpg --edit-key id`: ![GPG 编辑密钥][17] -接下来,使用 `—fpr` 参数,它将显示钥匙的指纹。这个命令的输出应该与你自己机器上的输出进行验证,这可以通过在你的系统上运行同样的 `--edit-key` 参数来找到。 +接下来,使用 `—fpr` 参数,它将显示密钥的指纹。这个命令的输出应该与你自己机器上的输出进行验证,这可以通过在你的系统上运行同样的 `--edit-key` 参数来找到。 ![GPG 密钥的指纹][18] @@ -204,7 +206,7 @@ gpg --import key.gpg ![签署 GPG 密钥][19] -就是这样!其他用户现在可以开始用你的公钥加密文件了,就像你之前做的那样,确保它们只有在你用你的私钥解密时才能被你读取。 +就是这样!其他用户现在可以开始用你的公钥加密文件了,就像你之前做的那样,这可以确保它们只有在你用你的私钥解密时才能被你读取。 这就是使用 GPG 的所有基础知识! @@ -212,7 +214,7 @@ gpg --import key.gpg 现在你已经了解了开始使用 GPG 所需要的一切,包括为自己和他人加密文件。正如我前面提到的,这只是为了了解 GPG 的加密和解密过程是如何工作的。你刚刚获得的基本 GPG 知识在应用于真实世界的场景中时可以更上一层楼。 -还需要一些帮助来弄清楚一些东西,或者一些不正常的东西?欢迎在下面的评论中留下任何内容。 +还需要一些帮助来弄清楚一些东西,或者有一些不工作的东西?欢迎在下面的评论中留下任何内容。 -------------------------------------------------------------------------------- From d437b205b332bf135301399f4b911dd4495550c1 Mon Sep 17 00:00:00 2001 From: jrg Date: Wed, 15 Dec 2021 14:03:57 +0800 Subject: [PATCH 190/244] translated TSL --- ...Information in Linux Terminal With inxi.md | 276 ++++++++++++++++++ 1 file changed, 276 insertions(+) create mode 100644 translated/tech/20211215 Get All Kind of System Information in Linux Terminal With inxi.md diff --git a/translated/tech/20211215 Get All Kind of System Information in Linux Terminal With inxi.md b/translated/tech/20211215 Get All Kind of System Information in Linux Terminal With inxi.md new file mode 100644 index 0000000000..96aafdc141 --- /dev/null +++ b/translated/tech/20211215 Get All Kind of System Information in Linux Terminal With inxi.md @@ -0,0 +1,276 @@ +[#]: subject: "Get All Kind of System Information in Linux Terminal With inxi" +[#]: via: "https://itsfoss.com/inxi-system-info-linux/" +[#]: author: "Pratham Patel https://itsfoss.com/author/pratham/" +[#]: collector: "lujun9972" +[#]: translator: "jrglinux" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + + + +# 在 Linux 终端使用 inxi 命令获取各种系统信息 + +`inix` 是一个用于获取 `Linux` 系统信息的终端命令。能够获取包括软件和硬件等详细信息,比如计算机型号、内核版本、发行版号以及桌面环境等信息,甚至可以读取主存模块占用主板的哪块 `RAM` 卡槽等详细信息。 + +`inxi` 还可以用于监控系统中正在消耗 `CPU` 或者 `memory` 资源的进程。 + +在本文中,我将展示 使用`inxi` 命令获取系统信息的常用操作。 + +首先,我将展示下如何安装 `inxi` 命令。 + +### 在 Linux 上安装 inxi + +`inxi` 是一个非常流行的工具,所以在大多数 `Linux` 发行版仓库中都可以轻松获取到该工具。不过还没有流行到各大 `Linux` 发行版默认就安装了该软件,所以需要我们自己安装一下。 + +* 在 `Ubuntu/Debian` 发行版系统中,安装命令: + + ```shell + sudo apt install inxi + ``` + +* 在 `Fedora/RHEL8-based` 等发行版中,安装命令: + + ```shell + sudo dnf install -y epel-release + sudo dnf install -y inxi + ``` + +* 在 `Arch Linux` 以及它的派生分支版本中,安装命令: + + ```shell + sudo pacman -S inxi + ``` + + + +### 使用 inxi 获取系统信息 + +你可以在终端运行 `inxi` 命令来总体浏览下系统信息。 + +```shell +inxi +``` + +如下图所示,运行 `inxi` 命令可以简要浏览下 `CPU`、时钟频率、 内核、 `RAM(Mem)` 、磁盘存储空间、运行进程数量以及`shell` 版本等信息。 + +![The default output of inxi command][2] + +使用 `-b` 参数可以获取更为详细的系统信息。`-b` 参数会读取更多有关 `CPU`、驱动、当前运行进程、主板 `UEFI` 版本、`GPU`、视窗系统以及网卡等详细信息。 + +```shell +inxi -b +``` + +![Detailed hardware and software information about machine as reported by inxi][3] + +类似 `-b` 参数使用方法,`inxi` 还有许多其他的 `option` 参数可供使用。你可以综合使用这些参数来获取你关心的信息。 + +让我们看几个实例。 + +### 获取音频设备信息 + +使用 `-A` 参数可以获取有关音频【输出】设备信息,包括物理音频【输出】设备、声音服务器以及音频驱动等详细信息。 + +```shell +inxi -A +``` + +![Output of inxi command when “-A” flag is used][4] + + + +### 获取电池信息 + +使用 `-B` 参数,可以获取有关电池的信息(如果存在电池)。你将读取到例如以 `Wh` (瓦特小时)为单位的当前电池电量和状况。 + +因为我使用的是台式机,所以这里仅仅作为一个示例,让我们看看使用 `inxi -B` 会输出什么。 + +```shell +Battery: ID-1: BAT0 charge: 50.0 Wh (100.0%) condition: 50.0/50.0 +``` + + + +### 获取 CPU 信息 + +`-C` 参数用于获取有关 `CPU` 的详细信息。比如包括 `CPU` 缓存大小、频率(单位 `MHz`,如果有多核,会显示每个核心的频率)、核心数、`CPU` 型号以及 `CPU` 是 `32` 位还是 `64` 位. + +```shell +inxi -C +``` + +![Detailed CPU information displayed by inxi][6] + +注意,如果是在虚拟机中使用 `inix -C`,对于 `inxi` 而言,读取 `CPU` 的最大和最小频率可能显示异常。下面是一个在四核 `Debian 11` 虚拟机中使用 `-C` 参数的示例输出。 + +![An example output of using the “-C” flag in a Virtual Machine][7] + + + +### 获取更多的系统信息 + +使用 `-F` 参数可以获取更详细的系统信息(类似 `-b` 参数,但会更为详细)。几乎囊括了所有层次的系统信息。 + +```shell +inxi -F +``` + +![][8] + + + +### 获取图形显示相关信息 + +`-G` 参数可以获取和图形相关的信息。 + +它会显示所有的图形设备(`GPU`)、正在使用的 `GPU` 驱动(有助于检查是否使用 `Nvida` 驱动还是 `nouveau` 驱动)、显示输出分辨率和驱动程序版本。 + +```shell +inxi -G +``` + +![][9] + + + +### 获取运行进程信息 + +`-l` 参数(大写字母 `i`)显示正在运行的进程、当前 `shell` 、内存(内存使用情况)以及 `inxi` 版本号等信息。 + +![inxi get running process info][10] + +### 获取 RAM 信息 + +可能你已经猜到了,`-m` 参数可以获取与内存(`RAM`)相关的信息。 + +它读取了如总可用内存、最大内存容量(硬件或 `CPU` 支持的)、主板物理内存插槽数、`ECC` 是否存在、填充的内存插槽以及枚举每个插槽中运行的模块的大小和运行速度等信息。 + +```shell +inxi -m +``` + +要使用 `-m` 参数获取更详细的信息,例如最大容量、每个插槽的 `RAM` 模块信息等,需要超级用户权限。 + +```shell +sudo inxi -m +``` + +![][11] + +如果只是希望简短的输出内存信息,可以使用 `-memory-short` 参数。 + +使用 `-memroy-short` 参数将会只显示总内存以及当前已使用的内存量。 + + + +### 查看正在使用的包存储库 + +当使用 `-r` 参数时,会列举当前正在使用的包管理仓库或者更新本地仓库缓存中的所有存储库列表。 + +![List of repositories in use][12] + + + +### 获取 RAID 设备信息 + +`-R` 参数用于获取所有 `RAID` 设备相关信息。 + +令人惊喜的是,它甚至显示了有关 `ZFS RAID` (默认情况下,多数 `Linux` 系统不包含该文件系统)的信息。它显示了 `RAID` 设备上文件系统的详细信息、状态-(包含是离线状态、总大小和可用大小等)。 + +```shell +inxi -R +``` + +![][13] + + + +### 在 Linux 终端中查询天气(对,这是可以的) + +利用 `-W` 参数,你可以查询地球上任何地方的天气情况。 + +`-W` 参数后面,需要携带以下中的任一一个体现位置的信息 + +* 邮政编码 +* 纬度 +* 城市(,州),国家(不能含有空格,使用 “+” 替换空格) + +```shell +inxi -W Baroda,India +``` + +![Use of the “-W” flag with inxi followed by the city,country location descriptor][14] + + + +### 监控系统资源使用情况 + +`inxi` 除了提供有关已安装的硬件和驱动的信息外,还可以用于资源监控。 + +使用 `-t` 参数可以显示进程信息。你还可以可选项 `-c` (用于 `CPU` )和 `-m`(用于 `RAM`)。这些选项结合使用可以按指定数量列出进程信息。 + +下面是一些使用 `-t` 参数监控资源信息的示例。 + +```shell +inxi -t +``` + +命令 `inxi -t` 默认效果等同于 `inxi -t cm5`的效果。 + +![No difference in output of “inti -t” and “inxi -t cm5”][15] + +```shell +inxi -t cm10 +``` + +![][16] + +偶尔需要监控下资源使用情况时,该工具挺管用。如果需要更多的资源监控功能,则推荐使用[专用系统资源监控工具][17]。 + + + +### 最后 + +对于需要诊断计算机问题以及获取那些并不熟悉的软硬件信息的人来说,`inxi` 工具是十分便利且有用的。它能识别那些消耗 `CPU`、内存的进程;可以检查是否安装了合适的图形驱动程序、主板 `UEFI/BIOS` 是否需要更新等等。 + +事实上,在 `inxi` 开源社区论坛上,我们要求那些寻求帮助的成员提供 `inxi` 命令输出内容以便判断他们当前正在使用什么样的系统环境。 + +我知道也有其他的工具可以读取 `Linux` 上的硬件信息,不过 `inxi` 同时能读取硬件和软件信息,这也是我喜欢它的地方所在。 + +你使用 `inxi` 或者其他工具么?欢迎在评论区留言分享交流。 + + + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/inxi-system-info-linux/ + +作者:[Pratham Patel][a] +选题:[lujun9972][b] +译者:[jrglinux](https://github.com/jrglinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/pratham/ +[b]: https://github.com/lujun9972 +[1]: https://github.com/smxi/inxi +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/01_inxi.webp?resize=800%2C450&ssl=1 +[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/02_inxi_flag_b.webp?resize=800%2C450&ssl=1 +[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/03_inxi_flag_a.webp?resize=800%2C450&ssl=1 +[5]: https://itsfoss.com/32-bit-64-bit-ubuntu/ +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/04_inxi_flag_c.webp?resize=800%2C450&ssl=1 +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/05_inxi_flag_c_vm.webp?resize=800%2C396&ssl=1 +[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/06_inxi_flag_f.webp?resize=800%2C450&ssl=1 +[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/07_inxi_flag_g.webp?resize=800%2C450&ssl=1 +[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/inxi-get-running-process-info.png?resize=768%2C272&ssl=1 +[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/08_inxi_flag_m.webp?resize=800%2C450&ssl=1 +[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/package-repo-info-with-inxi.png?resize=800%2C339&ssl=1 +[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/09_inxi_flag_r.webp?resize=800%2C450&ssl=1 +[14]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/12_inxi_flag_w.webp?resize=800%2C450&ssl=1 +[15]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/10_inxi_flag_t.webp?resize=800%2C450&ssl=1 +[16]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/11_inxi_flag_t_cm10.webp?resize=800%2C450&ssl=1 +[17]: https://itsfoss.com/linux-system-monitoring-tools/ +[18]: https://itsfoss.community/ +[19]: https://itsfoss.com/hardinfo/ From 55e03ec58ca0afaae8cae55e8bb0d7eac0b57b9e Mon Sep 17 00:00:00 2001 From: jrg Date: Wed, 15 Dec 2021 14:04:25 +0800 Subject: [PATCH 191/244] Delete 20211215 Get All Kind of System Information in Linux Terminal With inxi.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 翻译完成 --- ...Information in Linux Terminal With inxi.md | 285 ------------------ 1 file changed, 285 deletions(-) delete mode 100644 sources/tech/20211215 Get All Kind of System Information in Linux Terminal With inxi.md diff --git a/sources/tech/20211215 Get All Kind of System Information in Linux Terminal With inxi.md b/sources/tech/20211215 Get All Kind of System Information in Linux Terminal With inxi.md deleted file mode 100644 index 6b2a8bb3eb..0000000000 --- a/sources/tech/20211215 Get All Kind of System Information in Linux Terminal With inxi.md +++ /dev/null @@ -1,285 +0,0 @@ -[#]: subject: "Get All Kind of System Information in Linux Terminal With inxi" -[#]: via: "https://itsfoss.com/inxi-system-info-linux/" -[#]: author: "Pratham Patel https://itsfoss.com/author/pratham/" -[#]: collector: "lujun9972" -[#]: translator: "jrglinux" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Get All Kind of System Information in Linux Terminal With inxi -====== - -inxi is a CLI tool that lists information about your Linux system. This includes both hardware and software details. You get simple details like which computer model you have, which kernel, distribution and desktop environment you are using etc. You also get details like which RAM slot of your motherboard is occupied by memory modules etc. - -It can also be used to monitor processes that are running on your computer that are either consuming CPU resources or memory resources, or both. - -In this tutorial, I’ll show some of the popular use cases of inxi to get information for your Linux system. - -But first, let me quickly show you how to install inxi. - -### Install inxi on your Linux distribution - -[Inxi][1] is a popular software that is available in the repository of most Linux distributions. Not popular enough to have it installed by default. - -To install inxi on Ubuntu and Debian based distributions, use this command: - -``` - - sudo apt install inxi - -``` - -To install inxi on Fedora and RHEL8-based distributions, use: - -``` - - sudo dnf install -y epel-release - sudo dnf install -y inxi - -``` - -To install inxi on Arch Linux and it’s derivatives, run the following command: - -``` - - sudo pacman -S inxi - -``` - -### Using inxi to get Linux system details - -You can get an overview of your system information by simply running the inxi command in your terminal. - -``` - - inxi - -``` - -As you can see in the image below, it gives a brief overview of CPU information, clockspeed, Kernel, RAM (displayed with Mem) and storage information along with number of running processes and shell version details. - -![The default output of inxi command][2] - -You can also use the “-b” flag to show a more detailed overview of your system information. It will show more information regarding your CPU, drives, currently running processes, motherboard UEFI version, GPU, display resolution, network devices etc - -``` - - inxi -b - -``` - -![Detailed hardware and software information about machine as reported by inxi][3] - -As you might have noticed by the use of the “-b” flag, inxi, just like any command line utility, it has a lot of flags that influence the output of inxi once executed. You can use these flags or combine them to get only certain detailed information. - -Let me show a few example. - -#### Get details of audio devices - -Using the “-A” flag will present you with information about your audio [output] devices. That will display the physical audio [output] devices, sound server and the audio driver details. - -``` - - inxi -A - -``` - -![Output of inxi command when “-A” flag is used][4] - -#### Get battery information - -The “-B” flag will show details about your battery (if there is a battery present). You will get details like the current battery charge in Wh (Watt hours) and the condition. - -Since I use a desktop, here is a sample output of what the output would look like if the “-B” flag was used with inxi with a battery attached - -``` - - Battery: ID-1: BAT0 charge: 50.0 Wh (100.0%) condition: 50.0/50.0 - -``` - -#### Get detailed CPU information - -The -C flag shows detailed CPU information. That includes your CPU cache size, speed in MHz (of each core, if there are multiple cores), number of cores, CPU model and also if [your CPU is 32-bit or 64-bit][5]. - -``` - - inxi -C - -``` - -![Detailed CPU information displayed by inxi][6] - -Make note, if you run inxi -C in a virtual machine, detecting your CPU’s minimum and maximum CPU frequency can be quite tricky for inxi. Below is a sample output of using the “-C” flag with inxi in a quad core Debian 11 Virtual Machine. - -![An example output of using the “-C” flag in a Virtual Machine][7] - -#### Get even more detailed system information - -The “-F” flag will show detailed system information (like the “-b” flag, but even more in depth). It includes almost everything to get a high level overview of the system that you are dealing with. - -``` - - inxi -F - -``` - -![][8] - -#### Get graphics related information - -The “-G” flag displays the data about everything related to Graphics. - -It shows you all your Graphics Devices (GPUs), the [GPU] driver that is being used (helpful to check if you are using the Nvidia driver or the nouveau driver), display output resolution and driver version. - -``` - - inxi -G - -``` - -![][9] - -#### Get running process info - -The “-I” (upper case i) shows detailed information about running processes, your current shell, memory (and memory usage) and inxi version. - -![inxi get running process info][10] - -#### Get RAM information - -As you might have guessed, the -m flag shows you memory (RAM) related information. - -It provides information such as total available memory, maximum capacity of memory supported [by your hardware platform or by your CPU manufacturer], number of physical memory slots available on the motherboard, if ECC is present or not, the memory slots that are populated and also what is the size of each module along with the speed that said module is running at, per enumerated slot(s). - -``` - - inxi -m - -``` - -To take advantage of the in-depth details provided by the “-m” flag, like the maximum capacity, RAM module details that is at each slot, you need super-user privileges. - -``` - - sudo inxi -m - -``` - -![][11] - -If you just want the output to be short and not in this in-depth, you can use the “–memory-short” flag with inxi. - -Using the “–memory-short” flag will only show total memory that is available and how much of it is currently in use. - -#### See which package repository is in use - -When you use the “-r” flag with inxi, it will present you with a list of all the repositories that your package manager is currently using or updating local repository cache with. - -![List of repositories in use][12] - -#### Get RAID devices details - -The “-R” flag shows you information about all the RAID devices. - -Surprisingly, it even shows information about ZFS RAID (because this file system is not included in many Linux distributions by default). It shows details about the file system on the RAID device, status – if it is online or offline, total size and available size. - -``` - - inxi -R - -``` - -![][13] - -#### Check weather information in Linux terminal (yes, that’s possible too) - -And, as a bonus, you can even check the weather of any place on Earth with the “-W” flag. - -The “-W” flag needs to be followed by either one of the following location descriptors - - * Postal code or zip code - * Latitude,longitude - * City[,state],country (must not contain spaces; replace spaces with the “+” sign) - - - -``` - - inxi -W Baroda,India - -``` - -![Use of the “-W” flag with inxi followed by the city,country location descriptor][14] - -### Monitoring the usage of system resource(s) with inxi - -Along with all the verbose information that inxi provides about your installed hardware and the software that drives it, it can also be used for resource monitoring purposes. - -Use the “-t” flag to show processes. You can also use the non-mandatory options “c” (for CPU) and “m” (for RAM). These options can also be combined with a numerical value that lists desired amount of processes. - -Below are a few examples of using the “-t” flag to monitor system resources. - -``` - - inxi -t - -``` - -If you run inxi with “-t” flag but without the non-mandatory options, it will output assuming that you typed added the “cm5” options. - -![No difference in output of “inti -t” and “inxi -t cm5”][15] - -``` - - inxi -t cm10 - -``` - -![][16] - -That’s fine for rare use but there are [dedicated system resource monitoring tools][17] that are easier to use and have more functionalities. - -### In the end… - -For the individuals who have to diagnose issues with computers and it’s system information that they are not aware about, inxi can be incredibly helpful. It shows the processes that are consuming CPU, memory; you can check if the correct graphics drivers are being used, if the motherboard UEFI/BIOS is up to date, and much more. - -In fact, on [It’s FOSS Community forum][18], we ask members to share the output of inxi command while seeking help so that it is easier to see what kind of system is in use. - -I know there are other tools that provide [hardware info on Linux][19] but inxi combines both hardware and software details and that’s why I like it. - -Do you use inxi or some other tool? Share your experience in the comments please. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/inxi-system-info-linux/ - -作者:[Pratham Patel][a] -选题:[lujun9972][b] -译者:[jrglinux](https://github.com/jrglinux) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/pratham/ -[b]: https://github.com/lujun9972 -[1]: https://github.com/smxi/inxi -[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/01_inxi.webp?resize=800%2C450&ssl=1 -[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/02_inxi_flag_b.webp?resize=800%2C450&ssl=1 -[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/03_inxi_flag_a.webp?resize=800%2C450&ssl=1 -[5]: https://itsfoss.com/32-bit-64-bit-ubuntu/ -[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/04_inxi_flag_c.webp?resize=800%2C450&ssl=1 -[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/05_inxi_flag_c_vm.webp?resize=800%2C396&ssl=1 -[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/06_inxi_flag_f.webp?resize=800%2C450&ssl=1 -[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/07_inxi_flag_g.webp?resize=800%2C450&ssl=1 -[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/inxi-get-running-process-info.png?resize=768%2C272&ssl=1 -[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/08_inxi_flag_m.webp?resize=800%2C450&ssl=1 -[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/package-repo-info-with-inxi.png?resize=800%2C339&ssl=1 -[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/09_inxi_flag_r.webp?resize=800%2C450&ssl=1 -[14]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/12_inxi_flag_w.webp?resize=800%2C450&ssl=1 -[15]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/10_inxi_flag_t.webp?resize=800%2C450&ssl=1 -[16]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/11_inxi_flag_t_cm10.webp?resize=800%2C450&ssl=1 -[17]: https://itsfoss.com/linux-system-monitoring-tools/ -[18]: https://itsfoss.community/ -[19]: https://itsfoss.com/hardinfo/ From 7c8c775509f371b619d317657120db98d24041f4 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 15 Dec 2021 16:36:38 +0800 Subject: [PATCH 192/244] TSL&PRF --- ... GNOME 40, and a Refresh Install Option.md | 153 ------------------ ... GNOME 40, and a Refresh Install Option.md | 152 +++++++++++++++++ 2 files changed, 152 insertions(+), 153 deletions(-) delete mode 100644 sources/news/20211215 Pop-_OS 21.10 Introduces a New Application Library, GNOME 40, and a Refresh Install Option.md create mode 100644 translated/news/20211215 Pop-_OS 21.10 Introduces a New Application Library, GNOME 40, and a Refresh Install Option.md diff --git a/sources/news/20211215 Pop-_OS 21.10 Introduces a New Application Library, GNOME 40, and a Refresh Install Option.md b/sources/news/20211215 Pop-_OS 21.10 Introduces a New Application Library, GNOME 40, and a Refresh Install Option.md deleted file mode 100644 index b23e8ab980..0000000000 --- a/sources/news/20211215 Pop-_OS 21.10 Introduces a New Application Library, GNOME 40, and a Refresh Install Option.md +++ /dev/null @@ -1,153 +0,0 @@ -[#]: subject: "Pop!_OS 21.10 Introduces a New Application Library, GNOME 40, and a Refresh Install Option" -[#]: via: "https://news.itsfoss.com/pop-os-21-10/" -[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" -[#]: collector: "lujun9972" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Pop!_OS 21.10 Introduces a New Application Library, GNOME 40, and a Refresh Install Option -====== - -Pop!_OS is undoubtedly one of the [best Linux distributions][1], also happens to be a popular recommendation currently for Linux newbies (and gamers). - -If you do not prefer non-LTS releases, you should stick to [Pop!_OS 20.04 LTS][2]. But, if you are looking for the latest and greatest update, Pop!_OS 21.10 is finally here for you to download! - -Not to forget, the Pop!_OS 21.10 release sets things in motion for a potential list of features that you can expect with Pop!_OS 22.04 LTS, April next year. - -### Pop!_OS 21.10: What’s New? - -Note that even if Pop!_OS 21.10 features GNOME 40 as one of the most considerable changes, you should expect a similar [COSMIC desktop experience][3] as you did with Pop!_OS 21.04. - -That being said, there are some key changes in Pop!_OS 21.10 that should enhance your Linux desktop experience, and make things easier. - -#### New Application Library - -With Pop!_OS 21.10, the full-screen application menu has been replaced by a separate searchable window. This should be less obstructive and come in handy. - -![][4] - -It is not just a unique tweak to GNOME 40 by System76, but it should functionally provide more benefits than the traditional full-screen app drawer. - -For instance, the new application library should enhance the multi-monitor experience by letting you quickly search for an application in the screen you focus, instead of taking up the full screen. - -![][5] - -It also lets you quickly search for an application (or filter them as per your search query). Not just limited to the applications installed, but it will also display the applications that can be installed using the Pop!_Shop. - -![][6] - -You can access the application library using the “**Applications**” button right to the Workspaces, or perform a four-finger swipe right, or press **Super + A**. - -#### System76’s Repositories Replacing Launchpad - -If you have been following us, you might have already read about [System76 moving PPA repositories to its system][7]. - -![][8] - -Overall, this should help them take control of packages and push updates faster than Ubuntu/Canonical’s default repositories. - -#### GNOME Updates - -The jump from GNOME 3.38.4 to 40 should introduce several [GNOME 40 improvements][9], at least to the core applications. - -Some notable improvements include Wi-Fi sorting in the Settings, meaning, the available networks will show up in the order of active connection, previous connections, and strength of the signal, to present a useful order of available Wi-Fi networks. - -You can also notice auto-completion in Files after you search for something. - -#### Latest Linux Kernel & NVIDIA Driver - -![][10] - -Pop!_OS is known to push the latest Linux Kernel faster than many other distributions. Pop!_OS 21.04 was already running [Linux Kernel 5.15][11], and Pop!_OS 21.10 continues with it. - -Here, Pop!_OS 21.10 brings in Linux Kernel 5.15.5 and also packs in the latest available NVIDIA driver for best compatibility with newer hardware. - -#### Refresh Install Option - -![][12] - -Whenever Pop!_OS is installed from the recovery partition, it lets you choose to opt for “Refresh Install”. - -In this way, you get to re-install Pop!_OS without losing your files in the Home directory. It should come in handy if something fails to work, and you cannot troubleshoot it, a re-installation should bring back things to their default state. - -#### Improvements to Pop!_OS Upgrade - -![A new default icon for the user if you do not have anything set.][13] - -With Pop!_OS 21.10, you can also expect a better upgrade experience. - -To make things convenient, Pop!_OS made some changes to its behavior when the distribution is upgraded. Some of them are: - - * Disabling the user-added PPAs automatically to avoid upgrade conflicts. - * The recovery partition is now updated before upgrading the distribution to give you a medium to easily re-install the distro if the installation using the restore partition does not succeed the first time. - - - -#### Tech-Preview for Raspberry Pi 4 - -As of now, it is entirely an experiment for Raspberry Pi 4 but you can download a tech preview release for the ARM platform. - -They plan to introduce Pop!_Pi with future Pop!_OS releases. - -### Thoughts on Pop!_OS 21.10 - -Pop!_OS is constantly making efforts to make the desktop Linux experience as reliable as possible while having some of the latest packages at the same time. - -With Pop!_OS 21.10, an updated desktop environment, Linux Kernel, and usability improvements make up for a useful upgrade. - -If you are using a non-LTS release, you should definitely consider upgrading as soon as possible. Note that you should always backup your data before you proceed to upgrade. - -### Download Pop!_OS 21.10 - -You can find two different ISOs available for Pop!_OS 21.10, one for NVIDIA, and the other for Intel/AMD. - -Head to the official download page and download the ISO you require. - -[Pop!_OS 21.10][14] - -If you already had Pop!_OS 21.04 installed, you should get an upgrade notification soon following their official announcement or head to the system settings and apply the upgrade. - -If you are using the terminal, type in the following commands: - -``` - - sudo apt update - sudo apt full-upgrade - pop-upgrade release upgrade - -``` - -You can also read the details mentioned in their [official announcement post][15]. - -_What do you think about Pop!_OS 21.10? Let me know your thoughts in the comments below._ - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/pop-os-21-10/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://news.itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://itsfoss.com/best-linux-distributions/ -[2]: https://itsfoss.com/pop-os-20-04-review/ -[3]: https://news.itsfoss.com/pop-os-21-04-beta-release/ -[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ4MSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[5]: https://i0.wp.com/i.ytimg.com/vi/A_8YflrS35A/hqdefault.jpg?w=780&ssl=1 -[6]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ0MyIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[7]: https://news.itsfoss.com/pop-os-ppa-repo-move/ -[8]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ3NSIgd2lkdGg9IjczNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[9]: https://news.itsfoss.com/gnome-40-release/ -[10]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjUxMCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[11]: https://news.itsfoss.com/linux-kernel-5-15-release/ -[12]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjU2MyIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[13]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ5OCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[14]: https://pop.system76.com -[15]: https://blog.system76.com/post/670564272872488960/popos-2110-has-landed diff --git a/translated/news/20211215 Pop-_OS 21.10 Introduces a New Application Library, GNOME 40, and a Refresh Install Option.md b/translated/news/20211215 Pop-_OS 21.10 Introduces a New Application Library, GNOME 40, and a Refresh Install Option.md new file mode 100644 index 0000000000..c8e0993796 --- /dev/null +++ b/translated/news/20211215 Pop-_OS 21.10 Introduces a New Application Library, GNOME 40, and a Refresh Install Option.md @@ -0,0 +1,152 @@ +[#]: subject: "Pop!_OS 21.10 Introduces a New Application Library, GNOME 40, and a Refresh Install Option" +[#]: via: "https://news.itsfoss.com/pop-os-21-10/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: " " +[#]: url: " " + + +Pop!_OS 21.10 发布! +===== + +> Pop!_OS 21.10 包含了新的 Linux 内核、新的应用程序库以及 System76 为帮助 Pop!_OS 发展而引入的一些重要变化。 + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/pop-os-21-10-feat.png?w=1200&ssl=1) + +Pop!_OS 无疑是 [最好的 Linux 发行版][1] 之一,也是目前面向 Linux 新手(和游戏玩家)推荐的热门选择之一。 + +如果你不喜欢非 LTS 版本,你应该坚持使用 [Pop!_OS 20.04 LTS][2]。但是,如果你想看看最新和最棒的更新,那么,Pop!_OS 21.10 终于就绪,可以下载了! + +别忘了,Pop!_OS 21.10 的发布是为明年 4 月的 Pop!_OS 22.04 LTS 的潜在功能清单打的前站,你可以期待一下。 + +### Pop!_OS 21.10 有什么新功能? + +请注意,即使 Pop!_OS 21.10 将 GNOME 40 作为最重要的变化之一,也应该会有类似于 Pop!_OS 21.04 的 [COSMIC 桌面体验][3]。 + +也就是说,在 Pop!_OS 21.10 中有一些关键的变化,应该会增强你的 Linux 桌面体验,并使你更轻松。 + +#### 新的应用程序库 + +在 Pop!_OS 21.10 中,全屏应用程序菜单已被一个单独的可搜索窗口取代。这应该不那么碍事,而且很方便。 + +![][4] + +这不仅仅是 System76 对 GNOME 40 的独特调整,在功能上它应该比传统的全屏应用菜单提供更多的好处。 + +例如,新的应用程序库应该可以增强多显示器的体验,让你在你关注的屏幕中快速搜索一个应用程序,而不是占用整个屏幕。 + +![video][5] + +它还可以让你快速搜索应用程序(或根据你的搜索查询过滤它们)。不仅仅限于已安装的应用程序,它还会显示可以使用 Pop!_Shop 安装的应用程序。 + +![][6] + +你可以使用工作区右侧的 “应用程序Applications” 按钮访问应用程序库,或执行四指向右滑动,按 `Super+A` 也行。 + +#### System76 用自己的存储库取代 Launchpad + +如果你一直在关注我们,你可能已经知道了 [System76 将 PPA 软件库转移到其系统之中][7]。 + +![][8] + +总的来说,这应该有助于他们控制软件包,并比 Ubuntu/Canonical 的默认仓库更快地推送更新。 + +#### GNOME 更新 + +从 GNOME 3.38.4 跳到 40 应该会引入几个 [GNOME 40 改进][9],至少对核心应用程序是这样。 + +一些值得注意的改进包括设置中的 Wi-Fi 排序,这意味着,可用的网络将按照活动连接、先前连接和信号强度的顺序显示,以按有用顺序呈现可用 Wi-Fi 网络。 + +你还可以注意到在你搜索某些东西后,文件中的自动补全功能。 + +#### 最新的 Linux 内核及 NVIDIA 驱动程序 + +![][10] + +众所周知,Pop!_OS 比许多其他发行版更快地推送最新的 Linux 内核。Pop!_OS 21.04 已经在运行 [Linux 内核 5.15][11],而 Pop!_OS 21.10 继续使用它。 + +在这里,Pop!_OS 21.10 带来了 Linux 内核 5.15.5,并且还打包了最新的可用 NVIDIA 驱动程序,以便与较新的硬件保持最佳的兼容性。 + +#### 全新安装 + +![][12] + +每当 Pop!_OS 从恢复分区安装时,它让你选择“全新安装Refresh Install”。 + +通过这种方式,你可以重新安装 Pop!_OS,而不会丢失主目录中的文件。如果有什么东西不能工作,而你又不能排除故障,重新安装应该会使事情恢复到默认状态,这时它就会派上用场。 + +#### 对 Pop!_OS 升级的改进 + +![如果你没有设置任何东西,为用户显示的一个新的默认图标][13] + +通过 Pop!_OS 21.10,你还会有更好的升级体验。 + +为了方便起见,Pop!_OS 在升级发行版时对其行为做了一些改变。其中一些是: + + * 自动禁用用户添加的 PPA 以避免升级冲突。 + * 现在在升级发行版之前会更新恢复分区,如果使用恢复分区第一次没有成功,之一可以给你一个可以轻松地重新安装发行版的媒介。 + +#### 用于树莓派 4 的技术预览版 + +截至目前,这还是针对树莓派 4 的实验,但你可以下载 ARM 平台的技术预览版。 + +他们计划在未来的 Pop!_OS 版本中引入 Pop!_Pi。 + +### 关于 Pop!_OS 21.10 的想法 + +Pop!_OS 一直在努力使桌面 Linux 的体验尽可能可靠,同时拥有一些最新的软件包。 + +通过 Pop!_OS 21.10,更新的桌面环境、Linux 内核和可用性改进使这次升级变得有用。 + +如果你正在使用一个非 LTS 版本,你肯定应该考虑尽快升级。请注意,在你进行升级之前,你应该备份你的数据。 + +### 下载 Pop!_OS 21.10 + +你可以找到两种用于 Pop!_OS 21.10 的不同 ISO ,一种用于 NVIDIA,另一种用于 Intel/AMD。 + +请前往 [官方下载][14] 页面,下载你需要的 ISO。 + +如果你已经安装了 Pop!_OS 21.04,在他们的官方公告之后,你应该很快收到升级通知,或者前往系统设置并应用升级。 + +如果你使用的是终端,输入以下命令: + +``` +sudo apt update +sudo apt full-upgrade +pop-upgrade release upgrade +``` + +你也可以阅读他们 [官方公告帖子][15] 中提到的细节。 + +你对 Pop!_OS 21.10 有什么看法?请在下面的评论中告诉我你的想法。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/pop-os-21-10/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/best-linux-distributions/ +[2]: https://itsfoss.com/pop-os-20-04-review/ +[3]: https://news.itsfoss.com/pop-os-21-04-beta-release/ +[4]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/application-library-pop-os.png?w=1400&ssl=1 +[5]: https://youtu.be/A_8YflrS35A +[6]: https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/application-library-pop-os-1.png?w=1306&ssl=1 +[7]: https://news.itsfoss.com/pop-os-ppa-repo-move/ +[8]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/pop-os-new-repo.png?w=736&ssl=1 +[9]: https://news.itsfoss.com/gnome-40-release/ +[10]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/pop-os-21-10.png?w=864&ssl=1 +[11]: https://news.itsfoss.com/linux-kernel-5-15-release/ +[12]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/refresh-os-pop.png?w=898&ssl=1 +[13]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/pop-os-lockscreen.png?w=819&ssl=1 +[14]: https://pop.system76.com +[15]: https://blog.system76.com/post/670564272872488960/popos-2110-has-landed From 53b86410667f9bceb68b24e9b430a60c609d54e4 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 15 Dec 2021 16:50:16 +0800 Subject: [PATCH 193/244] PUB @wxy https://linux.cn/article-14083-1.html --- ...ication Library, GNOME 40, and a Refresh Install Option.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/news => published}/20211215 Pop-_OS 21.10 Introduces a New Application Library, GNOME 40, and a Refresh Install Option.md (98%) diff --git a/translated/news/20211215 Pop-_OS 21.10 Introduces a New Application Library, GNOME 40, and a Refresh Install Option.md b/published/20211215 Pop-_OS 21.10 Introduces a New Application Library, GNOME 40, and a Refresh Install Option.md similarity index 98% rename from translated/news/20211215 Pop-_OS 21.10 Introduces a New Application Library, GNOME 40, and a Refresh Install Option.md rename to published/20211215 Pop-_OS 21.10 Introduces a New Application Library, GNOME 40, and a Refresh Install Option.md index c8e0993796..09761e392d 100644 --- a/translated/news/20211215 Pop-_OS 21.10 Introduces a New Application Library, GNOME 40, and a Refresh Install Option.md +++ b/published/20211215 Pop-_OS 21.10 Introduces a New Application Library, GNOME 40, and a Refresh Install Option.md @@ -4,8 +4,8 @@ [#]: collector: "lujun9972" [#]: translator: "wxy" [#]: reviewer: "wxy" -[#]: publisher: " " -[#]: url: " " +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14083-1.html" Pop!_OS 21.10 发布! From eb33d657a8ace5e366d106dd0ca81fa4bee352a3 Mon Sep 17 00:00:00 2001 From: MjSeven Date: Wed, 15 Dec 2021 21:02:07 +0800 Subject: [PATCH 194/244] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sources/tech/20211212 What is TTY in Linux.md | 140 ----------------- .../tech/20211212 What is TTY in Linux.md | 145 ++++++++++++++++++ 2 files changed, 145 insertions(+), 140 deletions(-) delete mode 100644 sources/tech/20211212 What is TTY in Linux.md create mode 100644 translated/tech/20211212 What is TTY in Linux.md diff --git a/sources/tech/20211212 What is TTY in Linux.md b/sources/tech/20211212 What is TTY in Linux.md deleted file mode 100644 index 8e420ed11f..0000000000 --- a/sources/tech/20211212 What is TTY in Linux.md +++ /dev/null @@ -1,140 +0,0 @@ -[#]: subject: "What is TTY in Linux?" -[#]: via: "https://itsfoss.com/what-is-tty-in-linux/" -[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" -[#]: collector: "lujun9972" -[#]: translator: "MjSeven" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -What is TTY in Linux? -====== - -You must have heard about the term “TTY” when it comes to Linux and UNIX. But, what is it? - -Is it useful to you as a desktop user? Do you need it? And, what can you do with it? - -In this article, let me mention everything essential to get you familiar with the term TTY in Linux. - -Do note that there’s no definitive answer to this, but it relates to how input/output devices interacted in the past. So, you will have to know a bit of history to get a clear picture. - -### History behind the term ‘TTY’ - -It all starts with a Teleprinter in the 1830s. - -Teleprinters let you send/receive text messages over the wire. It was a replacement to Morse code communication, where two operators were needed to effectively communicate with one another. - -And, a Teleprinter just needed a single operator to easily convey a message. While it did not have a modern-layout keyboard, its system was later evolved by Donald Murray in 1901 to include a typewriter-like keyboard. - -The Murray code reduced the effort for operators to send a message. And, this made it possible for a Teleprinter to evolve as a commercial Teletypewriter in 1908. TTY is shorthand for Teletypewriter. - -![Actual Teletypewriter in use during WW2 in London | Image credit Wikimedia][1] - -The difference between the a Teletypewriter and a regular typewriter was that Teletypewriter was attached to a communication device to send the typed messaged. - -[Teletypewriter made it possible for humans to communicate faster][2] over a wire without any computers until now. - -And, this is where “**TTY**” came into existence. - -### The (relatively) modern concept - -Now, you must be wondering, how did it land into modern computing and in Linux? - -Well, for starters, when Teletypewriter hit the market, some years later semiconductor transistors were developed which then evolved into microprocessors making a computer possible. - -Initial computers didn’t have the concept of keyboard. Punch cards were the input method. - -![A punch card computer program which was inserted into computers instead of typing it via keyboard \(TTY\) | Image credit][3] - -While computers were evolving, batch input cards were eventually replaced by Teletypewriters as a convenient input/output device. - -![LGP-30 computer in 1956 with a TTY attached to it][4] - -With technological advancements, the Teletypewriters were ‘virtualized’ using electronics. So, you wouldn’t need a physical, mechanical TTY, but a virtual, electronic TTY. - -Earlier computers didn’t even have video screens. Things were printed on paper instead of displaying on a screen (which didn’t exist). And hence you see the use of term ‘print’, not ‘display’. Videos were added to terminals later as technology advanced. - -In other words, you might have heard of them as video terminals. Or, you could call them as “physical” terminals. - -And, then these evolved into software emulated terminals which came with enhanced abilities and features. - -This is what you call a “terminal emulator”. For instance, GNOME Terminal, or Konsole, these are some of the [best terminal emulators that you will find for Linux][5]. - -### So, what is TTY in Linux? - -When it comes to Linux, TTY is an abstract device in UNIX and Linux. Sometimes it refers to physical input device such as a serial port, and sometimes it refers to a virtual TTY where it allows users to interact with the system ([reference][6]). - -TTY is a subsystem in Linux and Unix that makes process management, line editing, and session management possible at the kernel level through TTY drivers. - -In terms of programming, you need to dive in deep. But, considering the scope of this article, this could be an easy definition to digest. - -If you are curious, you can explore an old resource ([TTY Demystified][7]) that tries to clear up TTY in Linux and Unix systems with all the technical details you need. - -In fact, whenever you launch a terminal emulator or use any kind of shell in your system, it interacts with virtual TTYs that are known as psuedo-TTYs or PTY. - -You can just type in TTY in your terminal emulator to find the associated PTY. - -### How to access TTY in Linux? - -![][8] - -It is easy to access TTY in Linux. In fact, when I did not have a clue what it was, I accidentally accessed it and panicked about what to do (how to get out from it). - -You can get the TTY screen by using the following keyboard shortcuts on most distributions: - -**CTRL + ALT + F1** – Lockscreen -**CTRL + ALT + F2** – Desktop Environment -**CTRL + ALT + F3** – TTY3 -**CTRL + ALT + F4** – TTY4 -**CTRL + ALT + F5** – TT5 -**CTRL + ALT + F6** – TTY6 - -You can access up to six TTYs in total. However, the first two shortcuts point to the distribution’s lock screen and the desktop environment. - -![][9] - -So, you get a command line interface with the rest of the shortcuts. - -### When whould uou use TTY in Linux? - -TTY is not just a technical treasure. It is useful even for users like me who aren’t developers. - -It should come in handy in case the graphical desktop environment freezes. In some cases, reinstalling the desktop environment from the TTY helps resolve the program. - -Or, you can also choose to carry out tasks in TTY like updating the Linux system and similar, where you do not want visual issues to interrupt your process. - -Worst-case scenario, you can go to the TTY and reboot the computer if your graphical user interface is unresponsive. - -Some users also prefer to perform large file transfers with the help of TTY (I am not one of them). - -### TTY as a command in Linux - -![][10] - -When you type in TTY in your terminal emulator, it will print the file name of the terminal connected to the standard input, as described by the man page. - -In other words, to know the TTY number you are connected, just type in TTY. And, if there are multiple users connected to the Linux machine remotely, you can use who command to check what other users are connected to. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/what-is-tty-in-linux/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/WACsOperateTeletype.jpg?resize=429%2C371&ssl=1 -[2]: https://en.wikipedia.org/wiki/Teletype_Corporation#/media/File:What-is-teletype.jpg -[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/punch-card-program.jpg?resize=600%2C274&ssl=1 -[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/LGP-30-early-computer-1956.jpg?resize=800%2C600&ssl=1 -[5]: https://itsfoss.com/linux-terminal-emulators/ -[6]: https://unix.stackexchange.com/questions/4126/what-is-the-exact-difference-between-a-terminal-a-shell-a-tty-and-a-con -[7]: https://www.linusakesson.net/programming/tty/index.php -[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/ubuntu-tty.png?resize=800%2C449&ssl=1 -[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/ubuntu-tty4.png?resize=420%2C124&ssl=1 -[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/ubuntu-terminal-tty-command.png?resize=800%2C544&ssl=1 diff --git a/translated/tech/20211212 What is TTY in Linux.md b/translated/tech/20211212 What is TTY in Linux.md new file mode 100644 index 0000000000..b511f02a6c --- /dev/null +++ b/translated/tech/20211212 What is TTY in Linux.md @@ -0,0 +1,145 @@ +[#]: subject: "What is TTY in Linux?" +[#]: via: "https://itsfoss.com/what-is-tty-in-linux/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "MjSeven" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Linux 中的 TTY 是什么? +====== + +谈到 Linux 和 UNIX 时,你一定听说过 "TTY" 这个术语,但是,这玩意是什么? + +作为一个桌面用户,它对你有用吗?你需要它吗?你能用它做什么? + +在本文中,让我向你介绍一切,帮助你熟悉 Linux 中的 TTY。 + +注意:这个问题没有明确的答案,但它与过去输入/输出设备的交互方式有关。因此,你必须了解一些历史,才能清楚地了解情况。 + +### "TTY" 背后的历史 + +一切始于 19 世纪 30 年代的电传打字机。 + +电传打字机可以让你通过有线发送或接受短信,它取代了摩尔斯电码通信,一种需要两个操作员才能有效地相互通信的方式。 + +一台电传打字机只需要一个操作员就可以轻松地传递信息。虽然它没有现代布局的键盘,但它的系统后来由 Donald Murray 在 1901 年改良,包括一个类似打字机的键盘。 + +穆雷码减少了操作员发送消息的工作量。这使得电传打字机在 1908 年有可能发展成为商业电传打字机。TTY 是电传打字机的缩写。 + +![二战期间在伦敦使用地实际电传打字机 | 图片来源于维基百科][1] + +电传打字机和普通打字机的区别在于,电传打字机连接到通信设备,直接发送输入的消息。 + +[电传打字机使人类在没有计算机的情况下通过电线进行更快的通信成为可能][2]。 + +从这时起,"**TTY**" 一词就存在了。 + +### (相对)现代的概念 + +现在,你一定想知道,它是如何进入现代计算机和 Linux 的? + +首先,当电传打字机进入市场时,几年后半导体晶体管发展起来,然后演变成微处理器,计算机成为可能。 + +最初的计算机没有键盘的概念,打孔卡是输入的方法。 + +![一种插入计算机而不是通过键盘(TTY)输入的打孔卡计算机程序 | 图片来源于维基百科][3] + +随着计算机的发展,批量打孔卡最终被电传打字机取代,成为一种方便的输入/输出设备。 + +![1956 年的 LGP-30 计算机,附带 TTY][4] + +随着技术的进步,电传打字机被电子技术“虚拟化”了。因此,你不需要一个物理的、机械的 TTY,而是一个虚拟的电子 TTY。 + +早期的计算机甚至没有视频屏幕。东西被打印在纸上而不是显示在屏幕上。因此,你会看到“打印”这个术语而不是“显示”。随着技术的进步,视频后来被添加到终端中。 + +换句话说,你可能听说过把它们称为视频终端。或者,你可以称它们为“物理”终端。 + +后来,它们演变成软件模拟终端,具有更强的能力和功能。 + +这就是所谓的“终端模拟器”。例如,GNOME 终端或 Konsole,或者其他[你为 Linux 找到的最佳终端模拟器][5]。 + +### 所以,Linux 中的 TTY 到底是什么? + +在 Linux 或 UNIX 中,TTY 变为了一个抽象设备。有时它指的是一个物理输入设备,例如串口,有时它指的是一个允许用户和系统交互的虚拟 TTY([参考][6])。 + +TTY 是 Linux 或 UNIX 的一个子系统,它通过 TTY 驱动程序在内核级别实现进程管理、行编辑和会话管理。 + +对于编程,你需要深入研究。但是考虑到本文的范围,这可能是一个容易理解的定义。 + +如果你好奇的话,你可以查看一个旧资源([TTY 揭秘][7]),它会使用一切技术细节来解释 Linux 和 UNIX 系统中的 TTY。 + +事实上,每当你在系统中启动一个终端模拟器或使用任何类型的 shell 时,它都会与虚拟 TTY(也被称为伪 TTY 或 PTY)进行交互。 + +你可以在终端模拟器中输入 TTY 来找到相关联的 PTY。 + +### 如何在 Linux 中访问 TTY? + +![][8] + +在 Linux 中很容易访问 TTY。事实上,当我不知道它是什么时,我不小心访问了它,于是对要做什么,即如何摆脱它感到恐慌。 + +在大多数 _发行版_ 中,你可以使用以下键盘快捷键来获得 TTY 屏幕: + +**CTRL + ALT + F1** – 锁屏 + +**CTRL + ALT + F2** – 桌面环境 + +**CTRL + ALT + F3** – TTY3 + +**CTRL + ALT + F4** – TTY4 + +**CTRL + ALT + F5** – TT5 + +**CTRL + ALT + F6** – TTY6 + +你最多可以访问六个 TTY。但是,前两个快捷方式指向发行版的锁定屏幕和桌面环境。 + +![][9] + +因此,其他快捷方式将会让你获得一个命令行界面。 + +### 什么时候应该使用 TTY? + +TTY 不仅是一个技术宝藏,即使像我这样不是开发人员的用户,它也很有用。 + +在图形桌面环境冻结的情况下,它应该会派上用场。在某些情况下,从 TTY 重新安装桌面环境能帮助解决程序问题。 + +或者,你也可以选择在 TTY 中执行任务,例如更新 Linux 系统等。在这些情况下,你不希望它们中断你的进程。 + +最坏的情况是,如果图形用户界面失去响应,你可以进入 TTY 并重新启动计算机。 + +有些用户还喜欢在 TTY 的帮助下传输大文件(我不是其中之一)。 + +### Linux 中的 TTY 命令 + +![][10] + +当你在终端模拟器中输入 TTY 时,它将打印连接到标准输入的终端文件名,就像 man 页面描述的一样。 + +换句话说,要知道你连接的 TTY 编号,只需输入 TTY。并且,如果有多个用户远程连接到 Linux 机器,你可以使用 who 命令来检查其他用户连接到什么。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/what-is-tty-in-linux/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[MjSeven](https://github.com/MjSeven) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/WACsOperateTeletype.jpg?resize=429%2C371&ssl=1 +[2]: https://en.wikipedia.org/wiki/Teletype_Corporation#/media/File:What-is-teletype.jpg +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/punch-card-program.jpg?resize=600%2C274&ssl=1 +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/LGP-30-early-computer-1956.jpg?resize=800%2C600&ssl=1 +[5]: https://itsfoss.com/linux-terminal-emulators/ +[6]: https://unix.stackexchange.com/questions/4126/what-is-the-exact-difference-between-a-terminal-a-shell-a-tty-and-a-con +[7]: https://www.linusakesson.net/programming/tty/index.php +[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/ubuntu-tty.png?resize=800%2C449&ssl=1 +[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/ubuntu-tty4.png?resize=420%2C124&ssl=1 +[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/ubuntu-terminal-tty-command.png?resize=800%2C544&ssl=1 From a7c8fdec1f348c951e3895f16c9e9f81442a5bfd Mon Sep 17 00:00:00 2001 From: MjSeven Date: Wed, 15 Dec 2021 21:29:39 +0800 Subject: [PATCH 195/244] Translating --- sources/tech/20210903 Print files from your Linux terminal.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210903 Print files from your Linux terminal.md b/sources/tech/20210903 Print files from your Linux terminal.md index e105539732..970fbf048a 100644 --- a/sources/tech/20210903 Print files from your Linux terminal.md +++ b/sources/tech/20210903 Print files from your Linux terminal.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/21/9/print-files-linux" [#]: author: "Seth Kenlon https://opensource.com/users/seth" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "MjSeven" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 28e63c824c25f5d88104d3b493630bc0a2b1d967 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 16 Dec 2021 05:04:34 +0800 Subject: [PATCH 196/244] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211216=20?= =?UTF-8?q?Hide=20or=20Add=20Specific=20Folders=20From=20GNOME=20Search=20?= =?UTF-8?q?Results=20in=20Ubuntu=20and=20Other=20Linux=20Distributions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211216 Hide or Add Specific Folders From GNOME Search Results in Ubuntu and Other Linux Distributions.md --- ...in Ubuntu and Other Linux Distributions.md | 122 ++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 sources/tech/20211216 Hide or Add Specific Folders From GNOME Search Results in Ubuntu and Other Linux Distributions.md diff --git a/sources/tech/20211216 Hide or Add Specific Folders From GNOME Search Results in Ubuntu and Other Linux Distributions.md b/sources/tech/20211216 Hide or Add Specific Folders From GNOME Search Results in Ubuntu and Other Linux Distributions.md new file mode 100644 index 0000000000..e4c36deb00 --- /dev/null +++ b/sources/tech/20211216 Hide or Add Specific Folders From GNOME Search Results in Ubuntu and Other Linux Distributions.md @@ -0,0 +1,122 @@ +[#]: subject: "Hide or Add Specific Folders From GNOME Search Results in Ubuntu and Other Linux Distributions" +[#]: via: "https://itsfoss.com/control-gnome-file-search/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Hide or Add Specific Folders From GNOME Search Results in Ubuntu and Other Linux Distributions +====== + +You might have already noticed that when you search for something in the GNOME menu/activities area, it also shows the files with names matching the searched term along with installed applications. + +![Search in GNOME activities shows installed applications and matching files][1] + +That’s a handy feature. If you remember the file name or even part of it, you can easily search for it and open it just by pressing the Super key (Windows key) and typing the name. + +But there are a few nit bits around this search feature that you might not know about or never cared for. + +In this article, I’ll share how you can control the GNOME search feature, add or hide folders from the search option and disable it completely. + +_**Note: This is exclusively for distributions using GNOME. Please [verify which desktop environment you are using][2] and ensure it is GNOME.**_ + +### Default locations for file search + +The GNOME search feature utilizes a utility called [Tracker Miner FS][3]. Please do not get alarmed by the terms like _tracker_ and _miner_. It’s not spying on you or mining crypto on your system. It basically functions as a search engine and a database to provide you instant search results. + +By default, the file indexing takes place in the meta folders like Documents, Music, Pictures and Videos directories and their sub-directories. Files in the Home and Downloads folders are also indexed but not the ones in their sub-directories. + +![Default locations for file search][4] + +If you have created some new directories in your home folder, those files will not be indexed. + +However, the recently accessed files are also indexed automatically. If you have opened a file recently, it is added to the ‘recent files’ and will appear in the search results irrespective of its location. + +In case you didn’t know already, you can see your recently accessed files in the file manager: + +![Accessing recent files in GNOME file manager][5] + +### Adding a folder content to search results + +Suppose you have created a folder for coding projects in your home directory. These files won’t be indexed and won’t appear in search results (unless you have opened a file by double clicking and it is added to the recent files). + +To add the files from a custom folder in the search result, you can add the folder to the search locations. + +Open the Settings application by searching for it in the menu/activity area: + +![Search for settings application][6] + +Go to the **Search** option from the left sidebar and click on the **Search Locations** option at the top. In the pop-up window, go to the **Other** tab and click on the **\+ symbol**. It will add the file browser and you can add your desired folder. + +![Adding a custom folder content to search][7] + +If you test by searching a filename in the just added folder, you should see it in the search results now. It should be instant but if it is not, try logging out or rebooting the system. + +### Hide a folder from search results + +If you don’t want files from a specific folder to appear in the search result, you can hide it. + +If you don’t want the content of the meta folders like Pictures, Documents, Videos in search, you disable it from the Search Location settings. + +![Disable meta folders from the search][8] + +If you want the contents of only a certain folder under Documents to NOT appear in the search result, you just have to create a new file named **.nomedia** in that folder. You may also name the file .git, .trackerignore or .hg. + +![Hide specific folder from search results by creating file named .nomedia or .hg or .git][9] + +If you don’t see the option to create new file in right mouse lick, you’ll have to do some tweaking to add the [create new document option in the right click context menu][10]. Also note that any files starting with a . in its name is hidden from normal view. To [toggle hidden files][11], press Ctrl+H keys. + +This hiding might not work immediately because the file is probably already indexed. You may have to log out or reboot to see the effect. + +If you access a file manually, it will be added to the recent files and will appear in the search result despite the ignore file in the folder. + +You can delete the recent files history or disable it altogether (if you want) from **Settings-> Privacy-> File History & Trash**. I don’t see the need of it, though, so make your own decision here. + +![Clear or disable file access history in GNOME][12] + +### Disable search results for all files + +If you do not want any files to appear in the search results, you can disable search for Files altogether from the search settings. + +![Disable search results for all files][13] + +You should disable the search functionality altogether by clicking the Search toggle button at the top as it may interfere with the normal functionality of the GNOME desktop environment. + +More details on it can be found on the [project’s homepage][14]. + +### Conclusion + +The _**discussion here is about file search**_. GNOME desktop also searches in Calendar, Characters and some other utilities. You can disable or enable the available search options but let’s not focus on that. + +I hope you find this quick tip helpful in [customizing your GNOME experience][15]. If you know some other neat trick that you want others to know, please share it with us in the comments. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/control-gnome-file-search/ + +作者:[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://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/gnome-file-search-result.png?resize=800%2C355&ssl=1 +[2]: https://itsfoss.com/find-desktop-environment/ +[3]: https://wiki.gnome.org/Projects/Tracker/Documentation/GettingStarted +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/gnome-default-search-location.png?resize=800%2C533&ssl=1 +[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/access-recent-files-gnome-linux.png?resize=735%2C414&ssl=1 +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/settings-search-ubuntu-20-04.jpg?resize=800%2C230&ssl=1 +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/gnome-add-search-location.png?resize=800%2C525&ssl=1 +[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/disable-folders-from-search.png?resize=800%2C533&ssl=1 +[9]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/hide-specific-folder-from-search-results.png?resize=751%2C382&ssl=1 +[10]: https://itsfoss.com/add-new-document-option/ +[11]: https://itsfoss.com/hide-folders-and-show-hidden-files-in-ubuntu-beginner-trick/ +[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/clear-or-disable-file-history-gnome-linux.png?resize=800%2C389&ssl=1 +[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/disable-search-for-files-gnome.png?resize=800%2C475&ssl=1 +[14]: https://gnome.pages.gitlab.gnome.org/tracker/ +[15]: https://itsfoss.com/gnome-tricks-ubuntu/ From 2900c679597c291d502a3d8ff07eace15d63ba27 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 16 Dec 2021 05:04:50 +0800 Subject: [PATCH 197/244] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211215=20?= =?UTF-8?q?Deploy=20Mycroft=20AI=20voice=20assistant=20on=20Raspberry=20Pi?= =?UTF-8?q?=20using=20Ansible?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211215 Deploy Mycroft AI voice assistant on Raspberry Pi using Ansible.md --- ...assistant on Raspberry Pi using Ansible.md | 249 ++++++++++++++++++ 1 file changed, 249 insertions(+) create mode 100644 sources/tech/20211215 Deploy Mycroft AI voice assistant on Raspberry Pi using Ansible.md diff --git a/sources/tech/20211215 Deploy Mycroft AI voice assistant on Raspberry Pi using Ansible.md b/sources/tech/20211215 Deploy Mycroft AI voice assistant on Raspberry Pi using Ansible.md new file mode 100644 index 0000000000..ac67a64192 --- /dev/null +++ b/sources/tech/20211215 Deploy Mycroft AI voice assistant on Raspberry Pi using Ansible.md @@ -0,0 +1,249 @@ +[#]: subject: "Deploy Mycroft AI voice assistant on Raspberry Pi using Ansible" +[#]: via: "https://opensource.com/article/21/12/mycroft-raspberry-pi-ansible" +[#]: author: "Gaëtan Trellu https://opensource.com/users/goldyfruit" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Deploy Mycroft AI voice assistant on Raspberry Pi using Ansible +====== +Use these Ansible playbooks for an optimized Mycroft AI experience. +![Looking at a map][1] + +Mycroft AI is a virtual assistant application that can respond to verbal requests and complete tasks such as searching the Internet for some information you need, or downloading your favorite podcast, and so on. It's a fine piece of open source software that, unlike similar software from companies in the business of harvesting personal data, provides privacy and platform flexibility. + +Mycroft AI, written in Python, can install on many different hardware platforms. The famous Raspberry Pi board is a popular choice _(but not the only one)_ to run the voice assistant. Conveniently, Mycroft provides an image for Raspberry Pi, which is called [Picroft][2]. Picroft is an excellent solution, but it does have some limitations, such as the lack of 64-bit support. + +### Raspberry Pi 4, the platform of choice and my target + +The Raspberry Pi board is popular within the Mycroft community because it's inexpensive, has a lot of educational potential, and provides the possibility of interesting expansions thanks to Mycroft's skills and the Pi's easy access to General-Purpose Input/Output (GPIO) pins (for example, the [wake word LED GPIO skill][3]). + +The model 4B has enough CPU power and memory to run Mycroft smoothly. I use the model 4B with 8GB of RAM, running Raspberry Pi OS Bullseye 64-bit Lite, which you can download from [RaspberryPi.org][4]. + +### Another automation story + +Building your own Mycroft AI system does mean that you must pay attention to some details. According to my initial experience (from a year ago), here is a list of important technical details you must keep in mind: + + * Audio output _(speaker configuration)_ + * Audio input _(microphone configuration)_ + * Microphone quality (_the actual hardware you buy_) + * Wake word response _("Hey Mycroft!")_ + * Latency of response _("What's the weather like?")_ + + + +These aren't issues of Mycroft AI, they're just the things you must keep in mind while choosing your hardware and configuring your operating system. The Pi itself is capable of running Mycroft AI, but there are adjustments that require special configuration. Specifically, these are: + + * CPU scheduler + * SD card performances + * PulseAudio configuration + * Network latency + + + +I had to do a lot of research and manual actions to solve the headaches from the list above, but I did achieve the "ultimate" goal—the smoothest experience! + +### Ansible to the rescue! + +So now that I've created _the smoothest experience_, how do I ensure that every action done to achieve this goal gets captured and gets re-applied only if required on any Raspberry Pi 4 board? + +[Ansible][5] to the rescue! Ansible is idempotent by design, which means that it applies the requested changes only if required. If everything is configured correctly, Ansible does not change a thing. This is the beauty of idempotency! + +To achieve this ultimate goal, I use two Ansible roles: + + * One to configure and tweak the Raspberry Pi + * One to install and configure Mycroft AI + + + +#### Ansible prepi role + +The [Ansible prepi role][6] applies some configurations to obtain better performances from a Raspberry Pi 4B board and prepare the path to Mycroft. + + * Update Raspberry Pi OS to the latest version + * Add Debian backports repository + * Update firmware using the next branch, which provides kernel 5.15 and edge firmware + * Update EEPROM using the beta version, which provides edge features + * Setup initial_turbo to speed up the boot process + * Overclock the Raspberry Pi to 2Ghz + * Mount /tmp on a RAMDisk + * Optimize / partition mount options to improve SDcard read/write + * Manage I2C, SPI & UART interfaces + * Set CPU governor to performance to avoid context switching between the idle* kernel functions + * Install and configure PulseAudio _(non-system wide)_ + * Reboot the Raspberry Pi when new firmware or EEPROM gets installed + + + +#### Ansible mycroft role + +This [Ansible mycroft role][7] installs and configures Mycroft AI Core from the GitHub repository based on the `dev_setup.sh` Bash script provided by the Mycroft core team. + + * Python 3 virtual environment + * Systemd integration + * Extra skills installation + * Boto3, py_mplayer, and pyopenssl libraries install + * RAMDisk support for IPC + * File configuration support + * PulseAudio optimizations + * Secure Mycroft message bus websocket + + + +I'll need an [Ansible playbook][8] to orchestrate the two roles. + +### Personal requirements + +Here is a list of requirements for this project: + + * Raspberry Pi 4B board (or later) connected to your network + * [Raspberry Pi OS 64-bit][9] + * Ansible 2.9 (or later) + * SSH, up and running + + + +To burn the Raspberry Pi OS image to the SD card, you can use [Etcher][10] or the imaging tool of your choice. + +I overclock my Pi to get a boost in performance, but this can be dangerous to your hardware. Before using my Ansible playbooks, read them carefully! _You are responsible for the choices made with this role._ You decide which firmware, which EEPROM you want to use. The same rule applies to the overclocking feature. **Remember that overclocking requires a proper cooling system.** + +### Execute the Ansible playbook + +The first step is to retrieve the Ansible playbooks from GitHub. Use the following `git` command: + + +``` +`$ git clone https://github.com/smartgic/ansible-playbooks-mycroft.git` +``` + +This repository contains an Ansible `requirements.yml` file which provides a list of Ansible roles required by this playbook, the roles must be retrieved from Ansible Galaxy. + + +``` + + +$ cd ansible-playbooks-mycroft +$ ansible-galaxy install -r requirements.yml +Starting galaxy role install process +\- downloading role 'mycroft', owned by smartgic +\- downloading role from +\- extracting smartgic.mycroft to /home/goldyfruit/.ansible/roles/smartgic.mycroft +\- smartgic.mycroft (main) was installed successfully +\- downloading role 'prepi', owned by smartgic +\- downloading role from +\- extracting smartgic.prepi to /home/goldyfruit/.ansible/roles/smartgic.prepi +\- smartgic.prepi (main) was installed successfully + +``` + +The second step is to edit the Ansible inventory provided in the repository to reference the hosts I need to be managed by Ansible. + + +``` + + +[rpi] +rpi4b01 ansible_host=192.168.1.97 ansible_user=pi + +``` + +`[rpi]` is the group and should not be changed. This group has one host named `rpi4b01`, which has IP `192.168.1.97` and provides `pi` as Linux (default on Raspberry Pi OS) user for Ansible to connect with. + +Now the tricky part: what value do you want for each option? It's up to you, but here's my go-to configuration: + + +``` + + +# file: install-custom.yml +\- hosts: rpi +  gather_facts: yes +  become: yes + +  pre_tasks: +    - name: Install Python 3.x Ansible requirement +      raw: apt-get install -y python3 +      changed_when: no +      tags: +        - always + +  vars: +    # PREPI +    prepi_pi_user: pi +    prepi_hostname: mylovelypi +    prepi_firmware_update: yes +    prepi_overclock: yes +    prepi_force_turbo: yes +    prepi_cpu_freq: 2000 +    prepi_pulseaudio_daemon: yes + +    # MYCROFT +    mycroft_branch: dev +    mycroft_user: "{{ prepi_pi_user }}" +    mycroft_skills_update_interval: 2.0 +    mycroft_recording_timeout_with_silence: 3.0 +    mycroft_enclosure_name: picroft +    mycroft_extra_skills: +      - + +  tasks: +    - import_role: +        name: smartgic.prepi + +    - import_role: +        name: smartgic.mycroft + +``` + +The content needs to be saved in a file (for example, `install-custom.yml`). + +And now the moment of truth: run your freshly created playbook. + + +``` +`$ ansible-playbook -i inventory install-custom.yml -k` +``` + +The `-k` option from `ansible-playbook` command is only required if not using the SSH key. During the playbook execution, the Raspberry Pi could reboot a couple of times. The playbook is smart enough to handle this. + +Once Ansible is done, you see a congratulatory message, which prompts you for the next steps you need to take. + +![Congratulations message][11] + +(Gaëtan Trellu, [CC BY-SA 4.0][12]) + +### Ansible makes custom Mycroft easy + +These playbooks are the lessons I learned since starting my journey with Mycroft AI. It allows me to build, re-build, customize, and replicate my install with the peace of mind of having consistency everywhere! + +Do you have any comments, questions, or concerns? Leave a comment, visit me on Twitter [@goldyfruit][13], or stop by [Mycroft channels][14]. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/mycroft-raspberry-pi-ansible + +作者:[Gaëtan Trellu][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/goldyfruit +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/tips_map_guide_ebook_help_troubleshooting_lightbulb_520.png?itok=L0BQHgjr (Looking at a map) +[2]: https://mycroft-ai.gitbook.io/docs/using-mycroft-ai/get-mycroft/picroft +[3]: https://github.com/smartgic/mycroft-wakeword-led-gpio-skill +[4]: https://downloads.raspberrypi.org/raspios_lite_arm64/images/raspios_lite_arm64-2021-11-08/2021-10-30-raspios-bullseye-arm64-lite.zip +[5]: https://github.com/ansible/ansible +[6]: https://github.com/smartgic/ansible-role-prepi +[7]: https://github.com/smartgic/ansible-role-mycroft +[8]: https://github.com/smartgic/ansible-playbooks-mycroft +[9]: https://downloads.raspberrypi.org/raspios_arm64/images +[10]: https://opensource.com/article/18/7/getting-started-etcherio +[11]: https://opensource.com/sites/default/files/uploads/congratulations-message.png (Congratulations message) +[12]: https://creativecommons.org/licenses/by-sa/4.0/ +[13]: https://twitter.com/goldyfruit +[14]: https://chat.mycroft.ai/community/channels/general From dc848e7497f6e1e3504d05e1d433131cf0959af1 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 16 Dec 2021 05:04:59 +0800 Subject: [PATCH 198/244] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211215=20?= =?UTF-8?q?4=20ways=20you=20can=20edit=20a=20PDF=20with=20the=20pdftk-java?= =?UTF-8?q?=20command?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211215 4 ways you can edit a PDF with the pdftk-java command.md --- ... edit a PDF with the pdftk-java command.md | 215 ++++++++++++++++++ 1 file changed, 215 insertions(+) create mode 100644 sources/tech/20211215 4 ways you can edit a PDF with the pdftk-java command.md diff --git a/sources/tech/20211215 4 ways you can edit a PDF with the pdftk-java command.md b/sources/tech/20211215 4 ways you can edit a PDF with the pdftk-java command.md new file mode 100644 index 0000000000..7ecd68fb61 --- /dev/null +++ b/sources/tech/20211215 4 ways you can edit a PDF with the pdftk-java command.md @@ -0,0 +1,215 @@ +[#]: subject: "4 ways you can edit a PDF with the pdftk-java command" +[#]: via: "https://opensource.com/article/21/12/edit-pdf-linux-pdftk" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +4 ways you can edit a PDF with the pdftk-java command +====== +Combine PDFs, remove pages, split PDFs, and fill in forms with this +handy Linux command. +![a checklist for a team][1] + +Between technology whitepapers, manuscripts, and RPG books, I deal with lots of PDFs every day. The PDF format is popular because it contains processed PostScript code. PostScript is the native language of modern printers, so publishers often release a digital version of a book as a PDF because they've invested in the time and effort to produce a file for print anyway. But a PDF isn't intended to be an editable format, and while some reverse processing is possible, it's meant to be the last stop for digital data before it's sent to the printer. Even so, sometimes you need to make adjustments to a PDF, and one of my favorite tools for that job is the [pdftk-java][2] command. + +### Install pdftk-java on Linux + +As its name suggests, `pdftk-java` is written in Java, so it works on all major operating systems as long as you have Java installed. + +Linux and macOS users can install Java from [AdoptOpenJDK.net][3]. Windows users can install [Red Hat's Windows build of OpenJDK][4]. + +To install `pdftk-java`: + +1\. Download the [pdftk-all.jar release][5] from its Gitlab repository, and save it to `~/.local/bin/` or [some other location in your path][6]. + +2\. Open `~/.bashrc` in your favorite text editor and add this line to it: + + +``` +`alias pdftk='java -jar $HOME/.local/bin/pdftk-all.jar'` +``` + +3\. Load your new Bash settings: + + +``` +`$ source ~/.bashrc` +``` + +### Command syntax + +The structure of a valid `pdftk-java` command follows a pattern, but there's a lot of flexibility in what's in the pattern. The syntax is a little unusual because it doesn't use traditional-style [terminal options][7], but with practice, it's not too difficult to remember. + + * `pdftk`: The alias to call the command + * input file: The PDF you want to modify + * action: What you want to do to the input file + * output: Where you want to save your modified PDF file + + + +It's the action part that's most complex, so I'll start with simple tasks. + +### Combine two PDF files into one + +It's not uncommon for the front cover of a book to be created in a separate application, such as Inkscape or GIMP, than the rest of the book, which is usually done in a layout application like Scribus or an office suite like LibreOffice. You could combine the two in your layout application. A good desktop publisher like Scribus makes it easy just to reference an image so that when the cover changes, it's automatically updated in layout. However, it's also possible to prepend the cover to a PDF with `pdftk-java`: + + +``` + + +$ pdftk cover.pdf body.pdf \ +cat \ +output book.pdf + +``` + +In this example, the action is `cat`, as in _concatenate_ and like the Linux [cat command][8], it concatenates one or more PDF files into a single data stream, and the data stream is directed into whatever file the `output` argument specifies. + +### Remove pages from a PDF + +You can't exactly remove a page from a PDF, but you can create a new PDF containing only the pages you want to keep. + + +``` + + +$ pdftk book.pdf \ +cat 1 3-end \ +output shorter-book.pdf + +``` + +In this example, page 1 of my book file, and all pages from 3 to the end, are saved to a new file. The page I've removed, therefore, is page 2. + +### Split a PDF into separate files + +Splitting a PDF file into many different files also uses the `cat` action, and it's similar in principle to removing pages. You can split a PDF by sending the pages you want to a new file: + + +``` + + +$ pdftk book.pdf \ +cat 1-15 \ +output part-1.pdf + +$ pdftk book.pdf \ +cat 16-42 \ +output part-2.pdf + +``` + +If you need to split a PDF into single-page files, there's a special action for that, called `burst`: + + +``` + + +$ pdftk book.pdf burst + +$ ls +book.pdf pg_0001.pdf pg_0002.pdf +pg_0003.pdf pg_0004.pdf pg_0005.pdf +[...] + +``` + +### Fill in forms + +Few would argue that the PDF format hasn't become bloated over the years, and one feature you sometimes find in a PDF file is a fillable form. You see this in US tax documents, RPG character sheets, online school workbooks, and other PDF files that are intended to be interactive. While most modern PDF viewers, such as GNOME's Evince and KDE's Okular, can fill out PDF forms, you can also fill out a PDF form with the help of `pdftk-java`. + +First, you must extract the form data using the `generate_fdf` action. This extracts the IDs of the form elements and places them into a text file. + + +``` + + +$ pdftk character-sheet.pdf \ +generate_fdf \ +output chsheet-form.txt + +``` + +Your destination file (in this example, `chsheet-form.txt`) contains the data of the form contained in the PDF, but just the text parts. You can edit it in any standard text editor, like [Atom][9] or [Gedit][10]. + +In a sometimes admirable and sometimes awkward glimpse into the workflow of the organization producing the PDF, you'll find some forms are clearly labeled, while others have default names like "Checkbox_001" and "Textfield-021", so you might have to cross-reference your text file with your PDF, but that may be worthwhile if you're writing a script to fill out forms automatically. Each label is marked as a `/T` item, and on the following line, there's space (marked as `/V`) provided for text entry. Here's a snippet from one that's got context to its labels and some data filled in: + + +``` + + +/T (CharacterName 2) +/V (Abaddon) +>> +<< +/T (SlotsTotal 24) +/V () +>> +<< +/T (Hair) +/V (Brown) +>> +<< +/T (AC) +/V (15) +>> +<< +/T (Background) +/V () +>> +<< +/T (DEXmod ) +/V () + +``` + +Once you've got the form data entered, you can combine your text input with the PDF structure with the `fill_form` action: + + +``` + + +$ pdftk character-sheet.pdf \ +fill_form chsheet-form.txt \ +output completed.pdf + +``` + +Here's a sample of the result: + +![A form filled by pdftk-java][11] + +(Seth Kenlon, CC BY-SA 4.0) + +### PDF modification made easy + +When you deal with lots of PDF files or PDF files through shell scripts, a tool like `pdftk-java` is invaluable because it frees you from having to do everything manually. When I build a PDF from the output of [Docbook][12], it's a Makefile that calls `pdftk-java` for any number of tasks, so there's no chance of me forgetting a step or mistyping the command, and there's no need for me to spend my time on it. There are lots of other reasons you might use `pdftk-java` in your own workflow, and lots of other things `pdftk-java` can do, including actions like `shuffle`, `rotate`, `dump_data`, `update_info`, and `attach_files`. If you find yourself dealing with PDF files often, give `pdftk-java` a try. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/edit-pdf-linux-pdftk + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/checklist_hands_team_collaboration.png?itok=u82QepPk (a checklist for a team) +[2]: https://gitlab.com/pdftk-java/pdftk +[3]: https://adoptopenjdk.net/releases.html +[4]: https://developers.redhat.com/products/openjdk/download +[5]: https://gitlab.com/pdftk-java/pdftk/-/jobs/1527259628/artifacts/raw/build/libs/pdftk-all.jar +[6]: https://opensource.com/article/17/6/set-path-linux +[7]: https://opensource.com/article/21/8/linux-terminal +[8]: https://opensource.com/article/19/2/getting-started-cat-command +[9]: https://opensource.com/article/20/12/atom +[10]: https://opensource.com/article/20/12/gedit +[11]: https://opensource.com/sites/default/files/pdftk-form-fill.jpg (A form filled by pdftk-java) +[12]: https://opensource.com/article/17/9/docbook From 4fa2733b0d8efb2f289fb560f4ef5fd6521c6fd8 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 16 Dec 2021 08:55:51 +0800 Subject: [PATCH 199/244] translated --- ...212 Open source 3D pixel art with Goxel.md | 107 ------------------ ...212 Open source 3D pixel art with Goxel.md | 106 +++++++++++++++++ 2 files changed, 106 insertions(+), 107 deletions(-) delete mode 100644 sources/tech/20211212 Open source 3D pixel art with Goxel.md create mode 100644 translated/tech/20211212 Open source 3D pixel art with Goxel.md diff --git a/sources/tech/20211212 Open source 3D pixel art with Goxel.md b/sources/tech/20211212 Open source 3D pixel art with Goxel.md deleted file mode 100644 index 90d358b0e4..0000000000 --- a/sources/tech/20211212 Open source 3D pixel art with Goxel.md +++ /dev/null @@ -1,107 +0,0 @@ -[#]: subject: "Open source 3D pixel art with Goxel" -[#]: via: "https://opensource.com/article/21/12/3d-pixel-art-goxel" -[#]: author: "Seth Kenlon https://opensource.com/users/seth" -[#]: collector: "lujun9972" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Open source 3D pixel art with Goxel -====== -Building models with Goxel is a lot of fun, like the best part of Lego -without the sharp edges and like Minecraft without the Creepers. -![Pixel art in 3D with Goxel][1] - -I make it no secret that I love Lego, but I've moved far away from my Lego collection, and shipping a closet full of classic Lego sets all the way around the world is currently a problematic proposal. I've done a lot of virtualization to solve this problem, from [building models in Lego CAD][2] to [styling models with a Lego texture in Blender][3]. Recently I discovered [Goxel][4]. This shockingly easy 3D modeling application makes no conceit of being Lego-based or even Lego-adjacent. Yet, the sensation of building models with 3D pixels is surprisingly similar to the satisfaction of building with Lego bricks. You can think of Goxel as a pixel paint program, but in 3D.  - -Goxel takes a unique approach to 3D modeling, and it's geared specifically to _low polygon_ modeling. This isn't the application to use if you're looking to sculpt life-like models. But if you like the aesthetic of Minecraft and other low poly art, then you need to try Goxel. - -### Install Goxel on Linux - -You can install Goxel as a [Flatpak][5] on Linux from [Flathub][6]. - -For Android, Windows macOS, and iOS, go to the [Goxel website][4] to download an installer. - -Goxel is open source, released under the GPLv3 license. - -### Painting with voxels - -When you first launch Goxel, you get an empty "room" or container in the middle of the Goxel window. This is your canvas. - -![The Goxel canvas][7] - -(Seth Kenlon, [CC BY-SA 4.0][8]) - -It's in this container and only within it that you'll build your models. In most 3D modeling applications, depth perception is an acquired skill, so Goxel constrains the space you have to work in to prevent you from ending up with models and model parts miles away from each other. Goxel also restricts your movements in a strict grid. You can move up and down along a Y-axis, right and left along an X-axis, and "near" and "far" along a Z-axis, but only in segments of one 3D pixel (or _voxel_, as they're called). For all intents and purposes, the voxels of Goxel are the virtual Lego bricks you use to build your model. - -There aren't many tools in Goxel, and that's a real feature for a 3D modeling application. By default, you've already got the pencil tool active, so you can start building right away by clicking your mouse any place within the voxel container. - -![Hello from Goxel][9] - -(Seth Kenlon, [CC BY-SA 4.0][8]) - -Try clicking around the container to see where a voxel gets added. Goxel makes it relatively easy to see where your pencil is about to add a voxel, and it treats voxels like bricks by assuming that when you're near an existing voxel, you want to connect your next voxel to it. Even so, 3D on a 2D screen is difficult. Sometimes voxels get added in a spot you didn't realize you were pointing at. The best way to ensure your voxels get added where you mean for them to get added is to rotate the container often. You can rotate the container using the arrow keys on your keyboard, or you can click and drag the middle-mouse button. A right-click and drag moves the container within the Goxel workspace, and the scroll-wheel of your mouse zooms in and out. - -### Planar markers - -There's another trick to aligning voxels that Goxel provides, and that's a guide in the form of a translucent and temporary plane. When you add a plane to your container, it creates a kind of force field through which your pencil cannot pass. - -![Goxel planar guide][10] - -(Seth Kenlon, [CC BY-SA 4.0][8]) - -The result is that you can safely paint along only two axes but not along the third. You can nudge the plane along the grid so that you're adding voxels in slices, much as a 3D printer adds to a physical model. - -Disable the **Visible** option in the plane controls to remove a plane. - -![Plane controls][11] - -(Seth Kenlon, [CC BY-SA 4.0][8]) - -### Goxel toolbar - -The top toolbar contains seven buttons. From left to right: - - * Undo - * Redo  - * Delete _everything without confirmation_ - * Add a voxel - * Subtract (remove) a voxel - * Paint a voxel - * Set the paint color - - - -You can paint in single voxels or use the shape tool to the left of the pencil to add regions of voxels all at once. - -In addition to removing voxels with the pencil, you can also use the laser tool to zap voxels as they appear on the 2D screen that is your computer monitor. The Laser tool, to the right of the shape tool, turns your cursor into a crosshair. Point it at a voxel you see and click on it to erase. - -### The tranquility of minimalism - -Goxel is intentionally simple, not just in what it produces but also in how it produces. I've only discussed the drawing tools of Goxel in this article. While there are other features, like the ability to control the pitch and yaw of the sun, the intensity of shadows, and the position of virtual cameras, the application strives to keep things simple and underwhelming in the best of ways. Building models with Goxel is a lot of fun, like the best part of Lego without the sharp edges and like Minecraft without the Creepers. Go get Goxel, and build some models! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/12/3d-pixel-art-goxel - -作者:[Seth Kenlon][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/seth -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/uploads/header-image.jpg?itok=3MWdhreV (Pixel art in 3D with Goxel) -[2]: https://opensource.com/article/20/6/open-source-virtual-lego -[3]: https://opensource.com/article/20/7/lego-blender-bricker -[4]: https://goxel.xyz/ -[5]: https://opensource.com/article/21/11/install-flatpak-linux -[6]: https://flathub.org/apps/details/io.github.guillaumechereau.Goxel -[7]: https://opensource.com/sites/default/files/uploads/goxel-canvas.jpg (The Goxel canvas) -[8]: https://creativecommons.org/licenses/by-sa/4.0/ -[9]: https://opensource.com/sites/default/files/uploads/goxel-hello.jpg (Hello from Goxel) -[10]: https://opensource.com/sites/default/files/uploads/goxel-plane-guide.jpg (Goxel planar guide) -[11]: https://opensource.com/sites/default/files/uploads/goxel-plane-controls.jpg (Plane controls) diff --git a/translated/tech/20211212 Open source 3D pixel art with Goxel.md b/translated/tech/20211212 Open source 3D pixel art with Goxel.md new file mode 100644 index 0000000000..c9f1e11583 --- /dev/null +++ b/translated/tech/20211212 Open source 3D pixel art with Goxel.md @@ -0,0 +1,106 @@ +[#]: subject: "Open source 3D pixel art with Goxel" +[#]: via: "https://opensource.com/article/21/12/3d-pixel-art-goxel" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +使用 Goxel 的开源 3D 像素艺术 +====== +使用 Goxel 构建模型很有趣,就像乐高最好的部分没有锋利的边缘,就像没有“爬行者”的 Minecraft。 +![Pixel art in 3D with Goxel][1] + +我喜欢乐高,这不是什么秘密,但我已经远离我的乐高收藏,把满满一柜子的经典乐高套装运到世界各地,这目前是一个有问题的提议。为了解决这个问题,我做了很多虚拟化的工作,从[在乐高 CAD 中建立模型][2]到[在 Blender 中用乐高纹理对模型进行造型][3]。最近我发现了 [Goxel][4]。这个简单得令人震惊的 3D 建模应用并没有自称是基于乐高的,甚至是与乐高相近的。然而,用 3D 像素建立模型的感觉与用乐高积木建立模型的满足感惊人地相似。你可以把 Goxel 看作是一个像素绘画程序,但却是 3D 的。 + +Goxel 采取了一种独特的 3D 建模方法,它专门针对_低模_建模。如果你想雕刻出栩栩如生的模型,就不应该使用这个程序。但是,如果你喜欢 Minecraft 和其他低模艺术的美感,那么你需要试试 Goxel。 + +### 在 Linux 上安装 Goxel + +你可以从 [Flathub][6] 将 Goxel 作为 [Flatpak][5] 安装在 Linux 上。 + +对于 Android、Windows macOS 和 iOS,请到 [Goxel 网站][4]下载安装程序。 + +Goxel 是开源的,在 GPLv3 许可下发布。 + +### 使用体素绘画 + +当你第一次启动 Goxel 时,在 Goxel 窗口的中间会有一个空的“空间”或容器。这就是你的画布。 + +![The Goxel canvas][7] + +(Seth Kenlon, [CC BY-SA 4.0][8]) + +正是在这个容器中,且只有在这个容器中,你才能建立你的模型。在大多数三维建模应用中,深度感知是一种后天的技能,所以 Goxel 限制了你工作的空间,以防止你最终出现模型和模型部件彼此相距甚远的情况。Goxel 还限制你在一个严格的网格中移动。你可以沿 Y 轴上下移动,沿 X 轴左右移动,沿 Z 轴“近”和“远”移动,但只能在一个三维像素(或称为 _体素_)的片段中移动。就所有的意图和目的而言,Goxel 的体素是你用来建立模型的虚拟乐高砖块。 + +Goxel 中没有很多工具,这对一个三维建模应用来说是一个真正的特点。默认情况下,你已经激活了铅笔工具,所以你可以通过点击鼠标在体素容器内的任何地方立即开始建造。 + +![Hello from Goxel][9] + +(Seth Kenlon, [CC BY-SA 4.0][8]) + +试着点击容器周围,看看哪里有体素被添加。Goxel 让你比较容易看到你的铅笔即将添加体素的地方,它把体素当作砖块,假设当你靠近一个现有的体素时,你想把你的下一个体素连接到它。即便如此,在二维屏幕上实现 3D 也很困难。有时,体素会被添加到一个你没有意识到的地方。确保你的体素被添加到你想添加的地方的最好方法是经常旋转容器。你可以用键盘上的方向键来旋转容器,或者你可以点击并拖动鼠标中键。右击并拖动容器在 Goxel 工作区中移动,而鼠标的滚轮可以放大和缩小。 + +### 平面标记 + +Goxel 还提供了另一个对齐体素的技巧,那就是以半透明和临时平面的形式提供指导。当你在你的容器中添加一个平面时,它会创建一种力场,你的铅笔无法通过。 + +![Goxel planar guide][10] + +(Seth Kenlon, [CC BY-SA 4.0][8]) + +其结果是,你只能沿着两个轴线安全地作画,而不能沿着第三个轴线作画。你可以沿着网格轻推平面,这样你就可以分片添加体素,就像 3D 打印机向物理模型添加一样。 + +禁用平面控制中的 **Visible** 选项来移除一个平面。 + +![Plane controls][11] + +(Seth Kenlon, [CC BY-SA 4.0][8]) + +### Goxel 工具栏 + +顶部的工具栏包含七个按钮。从左到右: + + * 撤销 + * 重做 + * 删除_所有的东西,且无需确认_ + * 添加一个象素 + * 减去(删除)一个体素 + * 画一个体素 + * 设置油漆颜色 + + + +你可以在单个体素上作画,也可以使用铅笔左边的形状工具,一次性添加体素区域。 + +除了用铅笔删除体素外,你还可以用激光工具来切割体素,因为它们出现在电脑显示器的 2D 屏幕上。激光工具,在形状工具的右边,把你的光标变成一个十字准线。把它指向你看到的体素,然后点击它来擦除。 + +### 极简主义的宁静 + +Goxel 有意简单,不仅在于它生产的内容,还在于它的生产方式。 我在本文中只讨论了 Goxel 的绘图工具。 虽然还有其他功能,例如控制光线的俯仰和偏航的能力、阴影的强度以及虚拟摄像机的位置,但该应用力求以最佳方式使事情变得简单和平常。 使用 Goxel 构建模型非常有趣,就像没有锋利边缘的乐高玩具,或者没有“爬行者”的 Minecraft。 去获取 Goxel,并构建一些模型! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/3d-pixel-art-goxel + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/uploads/header-image.jpg?itok=3MWdhreV (Pixel art in 3D with Goxel) +[2]: https://opensource.com/article/20/6/open-source-virtual-lego +[3]: https://opensource.com/article/20/7/lego-blender-bricker +[4]: https://goxel.xyz/ +[5]: https://opensource.com/article/21/11/install-flatpak-linux +[6]: https://flathub.org/apps/details/io.github.guillaumechereau.Goxel +[7]: https://opensource.com/sites/default/files/uploads/goxel-canvas.jpg (The Goxel canvas) +[8]: https://creativecommons.org/licenses/by-sa/4.0/ +[9]: https://opensource.com/sites/default/files/uploads/goxel-hello.jpg (Hello from Goxel) +[10]: https://opensource.com/sites/default/files/uploads/goxel-plane-guide.jpg (Goxel planar guide) +[11]: https://opensource.com/sites/default/files/uploads/goxel-plane-controls.jpg (Plane controls) From baa7b3232d2473e8aa328600a8074a0a9a62c2cd Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 16 Dec 2021 09:00:39 +0800 Subject: [PATCH 200/244] translating --- ... An Interesting Menu Launcher for Users Who Rely on Mouse.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20211214 Fly-Pie- An Interesting Menu Launcher for Users Who Rely on Mouse.md b/sources/tech/20211214 Fly-Pie- An Interesting Menu Launcher for Users Who Rely on Mouse.md index c0dad5468f..7b3c697614 100644 --- a/sources/tech/20211214 Fly-Pie- An Interesting Menu Launcher for Users Who Rely on Mouse.md +++ b/sources/tech/20211214 Fly-Pie- An Interesting Menu Launcher for Users Who Rely on Mouse.md @@ -2,7 +2,7 @@ [#]: via: "https://itsfoss.com/fly-pie/" [#]: author: "Ankush Das https://itsfoss.com/author/ankush/" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 59fe0be4e8db5288ff6bbf889f6bdba0d1592144 Mon Sep 17 00:00:00 2001 From: jrg Date: Thu, 16 Dec 2021 11:27:33 +0800 Subject: [PATCH 201/244] translating MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 申请翻译 --- ...ycroft AI voice assistant on Raspberry Pi using Ansible.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/tech/20211215 Deploy Mycroft AI voice assistant on Raspberry Pi using Ansible.md b/sources/tech/20211215 Deploy Mycroft AI voice assistant on Raspberry Pi using Ansible.md index ac67a64192..97ce5b13fc 100644 --- a/sources/tech/20211215 Deploy Mycroft AI voice assistant on Raspberry Pi using Ansible.md +++ b/sources/tech/20211215 Deploy Mycroft AI voice assistant on Raspberry Pi using Ansible.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/21/12/mycroft-raspberry-pi-ansible" [#]: author: "Gaëtan Trellu https://opensource.com/users/goldyfruit" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "jrglinux" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " @@ -226,7 +226,7 @@ via: https://opensource.com/article/21/12/mycroft-raspberry-pi-ansible 作者:[Gaëtan Trellu][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[jrglinux](https://github.com/jrglinux) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 49748e8532a1a1513fec74ac329eda0d7df81e6b Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 16 Dec 2021 11:28:28 +0800 Subject: [PATCH 202/244] PRF&PUB @jrglinux https://linux.cn/article-14085-1.html --- ...gon Buster- What is a Cron Job in Linux.md | 168 +++++++++++++++++ ...gon Buster- What is a Cron Job in Linux.md | 175 ------------------ 2 files changed, 168 insertions(+), 175 deletions(-) create mode 100644 published/20211208 Linux Jargon Buster- What is a Cron Job in Linux.md delete mode 100644 translated/tech/20211208 Linux Jargon Buster- What is a Cron Job in Linux.md diff --git a/published/20211208 Linux Jargon Buster- What is a Cron Job in Linux.md b/published/20211208 Linux Jargon Buster- What is a Cron Job in Linux.md new file mode 100644 index 0000000000..9ae72b16d2 --- /dev/null +++ b/published/20211208 Linux Jargon Buster- What is a Cron Job in Linux.md @@ -0,0 +1,168 @@ +[#]: subject: "Linux Jargon Buster: What is a Cron Job in Linux?" +[#]: via: "https://itsfoss.com/cron-job/" +[#]: author: "Hunter Wittenborn https://itsfoss.com/author/hunter/" +[#]: collector: "lujun9972" +[#]: translator: "jrglinux" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14085-1.html" + +Linux 黑话解释:什么是定时任务 +====== + +![](https://img.linux.net.cn/data/attachment/album/202112/16/112554pna46aemuh84ta3m.jpg) + +在本期的《Linux 黑话解释》系列文章中,你将了解到 Linux 中的定时任务cron job功能。你将通过学习编辑 `crontab` 文件来创建定时任务。 + +### 何为定时任务 + +`cron` 是一个用于按计划运行短小且快速的命令的实用命令行工具。该工具是一个方便、经典的系统管理工具,通过和其他工具结合使用可以自动运行各式各样的任务。比如,有些人通过把 `rsync` 和 `cron` 结合使用,在特定的时间自动创建每日备份和每周备份。也有些人使用 `cron` 来分析服务器日志,并且结合邮件系统功能,在日志检测到错误时自动发送告警邮件。 + +`cron` 就如同“瑞士军刀”一样,可以多场景多样化使用。尽可能发挥你的想象,去挖掘它的功能。 + +其实 `cron` 的使用很容易上手,只需要几秒钟。不过在我们开始上手之前,先来讨论下几个经常容易混淆的概念。 + +### cron、定时任务、crontab + +有三个术语比较容易混淆:`cron`、定时任务和 `crontab`,让我们来看看它们的含义: + +| 术语 | 含义 | +| ------------ | ------------------------------------------------------------ | +| `cron` | 这是安装在系统上的实际执行定时任务的 [守护进程][1]。 | +| 定时任务 | “任务”是指一段启动并运行的程序。`cron` 可以按照约定的时间计划运行各种任务,这样的任务通常叫做“定时任务”。 | +| [crontab][2] | 这是一个文件,用于定义定时任务。一个 `crontab` 文件可以通过表格形式(每一行就是一个定时任务)定义多个定时任务。 | + +来看一个简单例子:创建一个定时任务,每小时向 `crontabl_log.txt` 文件打印 `Linux is cool!`。 + +``` +0 * * * * echo "Linux is Cool!" >> ~/crontab_log.txt +``` + +是不是这么个简单定时任务的例子都让你感到惊恐,这是因为你需要懂得如何去读懂一个定时任务的属性。 + +我将在后文中讲述这个基础理论知识。 + +### 上手 cron + +我们通过另一个例子来看看 `cron` 如何工作。 + +为了创建定时任务(或者说 `cron` 将要执行的命令任务),你只需要运行: + +``` +crontab -e +``` + +这将会打开一个文件,用于编辑定时任务: + +![Crontab default view][3] + +其中,所有以 `#` 开头的行都是注释,用于指导你如何使用 `cron`,如果觉得没用可以删除它们。 + +我们将创建如下任务,作为我们的第一个定时任务: + +``` +* * * * * touch ~/crontab_test +``` + +让我快速看看该任务将会做什么: + +定时任务都是以 “分钟 小时 天 月 周 命令” 形式呈现: + +* 分钟:指该任务在哪一分钟会被执行。所以,该值为 `0` 则代表在每个小时开始时运行,`5` 则代表在每个小时的第 5 分钟会运行。 +* 小时:指该任务在一天中的哪个小时会被执行,取值范围为 `0-23`。没有 `24` 的原因是 `23` 时的末尾是半夜 `11:59`,然后就是每天的开始 `0` 时。分钟的取值范围定义逻辑与之类似。 +* 天:指一个月中的哪一天执行该任务,取值范围是 `1-31`(不同于前面的分钟和小时从 `0` 开始取值)。 +* 月:指该任务在哪个月被执行,取值范围是 `1-12`。 +* 周:指该任务在星期几被执行,从周日开始算起,取值范围是 `0-6`(分别对应周日、周一到周六)。 +* 命令:是你想要运行的命令任务。 + +![][4] + +如果想对 “分钟 小时 天 月 周” 部分有更详细的理解,可以参考 [Crontab guru 网站][5],该网站可以帮助你理解正在执行什么。 + +接着之前的例子 `* * * * * touch ~/crontab_test`,表示每分钟创建一次 `~/crontab_test` 文件。 + +让我们将该任务编辑进 `crontab` 然后看看执行结果: + +![][6] + +等到下一分钟,你就会发现你的家目录下多了文件 `crontab_test`: + +![][7] + +这便是 `cron` 的基础应用示例。 + +### 一个实用的定时任务示例 + +假设你想创建一个脚本,用于拷贝多个目录内容到一个路径并打包作为备份,该如何实现? + +通过 `cron` 定时任务就可以很容易实现该功能。 + +请看如下脚本: + +``` +#!/usr/bin/bash +echo "Backing up..." +mkdir -p ~/.local/tmp/ +tar -Pc ~/Documents/ -f ~/.local/tmp/backup.gz +``` + +该脚本做了如下事情: + +1. 确保备份路径目录 `~/.local/tmp/` 存在。 +2. 将目录 `~/Documents/` 下的所有内容打包至文件 `~/.local/tmp/backup.gz`。 + +我们先来手动运行该脚本,看看它到底如何工作。 + +首先,我们在家目录(`~`)下创建该脚本,命令为 `backup_script`,如下图所示: + +![][8] + +然后编辑 `backup_script` 脚本,写入上面那个脚本代码。 + +接着,赋予 `backup_script` 可执行权限: + +![][9] + +最后运行脚本 `~/backup_script`,进行功能验证: + +![][10] + +你可以通过运行命令 `tar -xf ~/.local/tmp/backup.gz -C ` 来进行备份恢复,这里 `` 是指文件要恢复到的路径目录。 + +接下来,就可以用 `cron` 工具来进行定时任务运行该脚本了。 + +举个例子,假设需要每天的凌晨 3 点运行该备份脚本,你可以在 `crontab` 中输入如下命令: + +``` +* 3 * * * ~/backup_script +``` + +这样你就可以每天自动进行备份操作了。 + +### 后记 + +本文简单介绍了定时任务功能。尽管我不确定 Linux 桌面用户使用该功能多不多,但我知道定时任务功能被许多系统管理员广泛应用。如果你有什么想法,欢迎在评论区留言。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/cron-job/ + +作者:[Hunter Wittenborn][a] +选题:[lujun9972][b] +译者:[jrglinux](https://github.com/jrglinux) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/hunter/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/linux-daemons/ +[2]: https://linuxhandbook.com/crontab/ +[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/crontab-file.webp?resize=800%2C673&ssl=1 +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/crontab-explanation.webp?resize=800%2C450&ssl=1 +[5]: https://crontab.guru/ +[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/cron-example-1.webp?resize=557%2C241&ssl=1 +[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/result-of-cron-job.webp?resize=557%2C241&ssl=1 +[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/complex-cron-example.webp?resize=548%2C295&ssl=1 +[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/complex-cron-example-1.webp?resize=548%2C385&ssl=1 +[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/complex-cron-result.png?resize=800%2C220&ssl=1 diff --git a/translated/tech/20211208 Linux Jargon Buster- What is a Cron Job in Linux.md b/translated/tech/20211208 Linux Jargon Buster- What is a Cron Job in Linux.md deleted file mode 100644 index 80c882ba6e..0000000000 --- a/translated/tech/20211208 Linux Jargon Buster- What is a Cron Job in Linux.md +++ /dev/null @@ -1,175 +0,0 @@ -[#]: subject: "Linux Jargon Buster: What is a Cron Job in Linux?" -[#]: via: "https://itsfoss.com/cron-job/" -[#]: author: "Hunter Wittenborn https://itsfoss.com/author/hunter/" -[#]: collector: "lujun9972" -[#]: translator: "jrglinux" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -# Linux 中的定时任务(Cron Job)介绍 - -在本期的《`Linux Jargon Buster`系列》文章中,你将了解到 `Linux` 中的 `cron` 定时任务功能。你将通过学习编辑 `crontab` 文件来创建 `cron jobs`(定时任务,译注:为保持原味,这样的术语就不翻译,读者知道即可)。 - - - -### 何为 Linux cron job - -`Cron` 是一个用于按计划运行短小且快速命令的实用命令行工具。该工具是一个方便、经典的系统管理工具,通过和其他工具结合使用可以自动运行各式各样的任务。比如,有些人通过 `rsync` 和 `cron` 结合使用,在特定的时间自动创建每日备份和每周备份。也有些人使用 `cron` 来分析服务器日志,并且结合邮件系统功能,在日志检测到错误时自动发送告警邮件。 - -`Cron` 就如同”瑞士军刀“一样,可以多场景多样化使用。尽可能发挥你的想象,去挖掘它的功能。 - -其实很容易上手 `cron` 使用,只需要几秒钟。不过在我们开始上手之前,先来讨论下几个经常容易混淆的概念。 - - - -### Cron vs cron job vs crontab - -有三个术语比较容易混淆:`cron`,`cron job` 和 `crontab`,让我们来看看它们的含义: - -| 术语 | 含义 | -| ------------ | ------------------------------------------------------------ | -| cron | 这是安装在系统上的实际执行定时任务的[daemon][1] | -| cron job | 一个 `Linux job` 是指一段起来并运行的程序。`Cron` 进程可以按照约定的时间计划运行各种任务,这样的任务通常叫做`"cron jobs"`(定时任务) | -| [crontab][2] | 这是一个文件,用于定义定时任务。一个 `crontab` 文件可以通过表格形式(每一行就是一个定时任务)定义多个定时任务 | - -来看一个简单例子:创建一个 `cron job`,每小时向` crontabl_log.tx`t 文件打印 `"Linux is cool!" `。 - -```shell -0 * * * * echo "Linux is Cool!" >> ~/crontab_log.txt -``` - -是不是这么个简单 `cron job` 例子都让你感到惊恐,这是因为你需要懂得如何去读懂一个定时任务的属性。 - -我将在后文中讲述这个基础理论知识。 - - - -### 上手 Cron - -我们通过另一个例子来看看 `Cron` 如何工作。 - -为了创建 `Cron jobs`,或者是 `cron` 将要执行的命令任务,你只需要运行: - -```shell -crontab -e -``` - -这将会打开一个文件,用于编辑 `cron jobs`: - -![Crontab default view][3] - -其中,所有以 `#` 开头的行都是注释,用于指导你如何使用 `cron`,如果觉得没用可以删除它们。 - -我们将创建如下任务,作为我们的第一个 `cron job`: - -```shell -* * * * * touch ~/crontab_test -``` - -让我快速看看该任务将会做什么: - -Cron jobs 都是以 `分钟 小时 天 月 周 命令`形式呈现`(minute hour day month week command)`。 - -* 分钟(`minute)`是指该任务在哪一分钟会被执行。所以,该值为 `0` 则代表在每个小时开始运行,`5` 则代表在每个小时的第5分钟会运行。 -* 小时(`hour`)是指该任务在一天中的哪个小时会被执行,取值范围为 `0-23`。没有 `24` 的原因是 `23` 时的末尾是半夜 `11:59`,然后就是每天的开始 `0` 时。`minutes` 的取值范围定义逻辑与之类似。 -* 天(`day`)是指一个月中的哪一天执行该任务,取值范围是 `1-31`(不同于前面的分钟和小时从 `0` 开始取值)。 -* 月(`month`)是指该任务在哪个月被执行,取值范围是 `1-12`。 -* 周(`week`)是指该任务在星期几被执行,从 `Sunday` 开始算起,取值范围是`0-6`。 -* 命令(`command`),则是你想要运行的命令任务。 - -![][4] - -如果想对 "分钟 小时 天 月 周" 部分有更详细的理解,可以参考 [Crontab guru 网站][5],该网站可以帮助理解正在执行什么。 - -下面之前的例子 *** * * * * touch ~/crontab_test**,每分钟创建 `~/crontab_test`文件。 - -让我们将该任务编辑进 `crontab` 然后看看执行结果: - -![][6] - -等到下一分钟,你就会发现你的 `home` 路径下多了文件 `crontab_test`: - -![][7] - -这便是 `cron` 的基础应用示例。 - - - -### 一个实用的 cron job 示例 - -假设你想创建一个脚本,用于拷贝多个目录内容到一个路径并打包作为备份,该如何实现? - -通过 `cron` 定时任务就可以很容易实现该功能。 - -请看如下脚本: - -```shell -#!/usr/bin/bash -echo "Backing up..." -mkdir -p ~/.local/tmp/ -tar -Pc ~/Documents/ -f ~/.local/tmp/backup.gz -``` - -该脚本做了如下事情: - -1. 确保备份路径目录 `~/.local/tmp/` 存在。 -2. 将目录 `~/Documents/` 下的所有内容打包至文件 `~/.local/tmp/backup.gz`。 - -我们先来手动运行该脚本,看看它到底如何工作。 - -首先,我们在 `~` 目录下创建该脚本,命令为 `backup_script`,如下图所示: - -![][8] - -然后编辑 `backup_script` 脚本,写入上面那个脚本代码。 - -接着,赋予 `backup_script` 可执行权限: - -![][9] - -最后运行脚本 `~/backup_script`,进行功能验证: - -![][10] - -你可以通过运行命令 `tar -xf ~/.local/tmp/backup.gz -C ` 来进行备份恢复,这里 `` 是指文件要恢复到的路径目录。 - -接下来,就可以用 `cron` 工具来进行定时任务运行该脚本了。 - -举个例子,假设需要每天的凌晨 3 点运行该备份脚本,你可以在 `crontab` 中输入如下命令: - -```shell -* 3 * * * ~/backup_script -``` - -这样你就可以每天自动进行备份操作了。 - - - -### 后记 - -本文简单介绍了 `cron jobs` 定时任务功能。尽管我不确定 Linux 桌面用户使用该功能多不多,但我知道 `cron job` 定时任务功能被许多系统管理员广泛应用。如果你有什么想法,欢迎在评论区留言。 - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/cron-job/ - -作者:[Hunter Wittenborn][a] -选题:[lujun9972][b] -译者:[jrglinux](https://github.com/jrglinux) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/hunter/ -[b]: https://github.com/lujun9972 -[1]: https://itsfoss.com/linux-daemons/ -[2]: https://linuxhandbook.com/crontab/ -[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/crontab-file.webp?resize=800%2C673&ssl=1 -[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/crontab-explanation.webp?resize=800%2C450&ssl=1 -[5]: https://crontab.guru/ -[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/cron-example-1.webp?resize=557%2C241&ssl=1 -[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/result-of-cron-job.webp?resize=557%2C241&ssl=1 -[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/complex-cron-example.webp?resize=548%2C295&ssl=1 -[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/complex-cron-example-1.webp?resize=548%2C385&ssl=1 -[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/complex-cron-result.png?resize=800%2C220&ssl=1 From 690806a5c520713592cb087c655a3e14ca14bffa Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 16 Dec 2021 14:22:30 +0800 Subject: [PATCH 203/244] PRF&PUB @MjSeven https://linux.cn/article-14086-1.html --- ...scraping in Python using Beautiful Soup.md | 38 +++++++++---------- 1 file changed, 18 insertions(+), 20 deletions(-) rename {translated/tech => published}/20210915 A guide to web scraping in Python using Beautiful Soup.md (86%) diff --git a/translated/tech/20210915 A guide to web scraping in Python using Beautiful Soup.md b/published/20210915 A guide to web scraping in Python using Beautiful Soup.md similarity index 86% rename from translated/tech/20210915 A guide to web scraping in Python using Beautiful Soup.md rename to published/20210915 A guide to web scraping in Python using Beautiful Soup.md index 87dc59d10f..f22e903837 100644 --- a/translated/tech/20210915 A guide to web scraping in Python using Beautiful Soup.md +++ b/published/20210915 A guide to web scraping in Python using Beautiful Soup.md @@ -3,33 +3,33 @@ [#]: author: "Ayush Sharma https://opensource.com/users/ayushsharma" [#]: collector: "lujun9972" [#]: translator: "MjSeven" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14086-1.html" -Python Beautiful Soup 爬虫指南 +Python Beautiful Soup 刮取简易指南 ====== -Python 中的 Beautiful Soup 库可以很方便的从网页中提取 HTML 内容。 -![打开文件或窗口的计算机屏幕][1] +> Python 中的 Beautiful Soup 库可以很方便的从网页中提取 HTML 内容。 + +![](https://img.linux.net.cn/data/attachment/album/202112/16/142118cmffvtfrmh1h3ufv.jpg) 今天我们将讨论如何使用 Beautiful Soup 库从 HTML 页面中提取内容,之后,我们将使用它将其转换为 Python 列表或字典。 -### 什么是 web 爬虫,为什么我需要它? +### 什么是 Web 刮取,为什么我需要它? -答案很简单:并非每个网站都有获取内容的 API。你可能想从你最喜欢的烹饪网站上获取食谱,或者从旅游博客上获取照片。如果没有 API,提取 HTML 或 _爬虫_ 可能是获取内容的唯一方法。我将向你展示如何使用 Python 来获取。 +答案很简单:并非每个网站都有获取内容的 API。你可能想从你最喜欢的烹饪网站上获取食谱,或者从旅游博客上获取照片。如果没有 API,提取 HTML(或者说 刮取scraping 可能是获取内容的唯一方法。我将向你展示如何使用 Python 来获取。 -**并非所以网站都喜欢爬虫,有些网站可能会明确禁止。与站长核对是否同意抓取。** +**并非所以网站都喜欢被刮取,有些网站可能会明确禁止。请于网站所有者确认是否同意刮取。** -### Python 如何抓取网站? +### Python 如何刮取网站? -使用 Python 进行爬虫,我们将执行三个基本步骤: +使用 Python 进行刮取,我们将执行三个基本步骤: 1. 使用 `requests` 库获取 HTML 内容 2. 分析 HTML 结构并识别包含我们需要内容的标签 3. 使用 Beautiful Soup 提取标签并将数据放入 Python 列表中 - ### 安装库 首先安装我们需要的库。`requests` 库从网站获取 HTML 内容,Beautiful Soup 解析 HTML 并将其转换为 Python 对象。在 Python3 中安装它们,运行: @@ -40,7 +40,7 @@ pip3 install requests beautifulsoup4 ### 提取 HTML -在本例中,我将选择抓取网站的 [Techhology][2] 部分。如果你跳转到此页面,你会看到带有标题、摘录和发布日期的文章列表。我们的目标是创建一个包含这些信息的文章列表。 +在本例中,我将选择刮取网站的 [Techhology][2] 部分。如果你跳转到此页面,你会看到带有标题、摘录和发布日期的文章列表。我们的目标是创建一个包含这些信息的文章列表。 网站页面的完整 URL 是: @@ -50,7 +50,7 @@ https://notes.ayushsharma.in/technology 我们可以使用 `requests` 从这个页面获取 HTML 内容: -```python +``` #!/usr/bin/python3 import requests @@ -69,7 +69,7 @@ print(data.text) 如果你浏览 HTML,你会发现靠近顶部的这一段: -```html +```
@@ -91,7 +91,7 @@ print(data.text) 让我们使用 Beautiful Soup 提取这些内容。 -```python +``` #!/usr/bin/python3 import requests from bs4 import BeautifulSoup @@ -145,7 +145,7 @@ python3 fetch.py ... (truncated) ``` -以上是全部内容!在这 22 行代码中,我们用 Python 构建了一个网络爬虫,你可以在[我的示例仓库中找到源代码][7]。 +以上是全部内容!在这 22 行代码中,我们用 Python 构建了一个网络刮取器,你可以在 [我的示例仓库中找到源代码][7]。 ### 总结 @@ -153,8 +153,6 @@ python3 fetch.py 玩的开心,继续编码吧。 -* * * - _本文最初发表在[作者个人博客][8]上,经授权改编。_ -------------------------------------------------------------------------------- @@ -164,7 +162,7 @@ via: https://opensource.com/article/21/9/web-scraping-python-beautiful-soup 作者:[Ayush Sharma][a] 选题:[lujun9972][b] 译者:[MjSeven](https://github.com/MjSeven) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From de2cb75d072ca1542d3eac26f22da9fea5bf1fde Mon Sep 17 00:00:00 2001 From: Starryi Date: Thu, 16 Dec 2021 16:23:54 +0800 Subject: [PATCH 204/244] translating --- ...5 Getting started with shaders- signed distance functions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20200315 Getting started with shaders- signed distance functions.md b/sources/tech/20200315 Getting started with shaders- signed distance functions.md index acba8687fd..d225ade5f9 100644 --- a/sources/tech/20200315 Getting started with shaders- signed distance functions.md +++ b/sources/tech/20200315 Getting started with shaders- signed distance functions.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (Starryi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 57038fbd2daa7f89ddd02052c527557b3fc096ef Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 17 Dec 2021 05:02:28 +0800 Subject: [PATCH 205/244] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211216=20?= =?UTF-8?q?Play=20a=20digital=20orchestra=20with=20Linux=20Sampler?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211216 Play a digital orchestra with Linux Sampler.md --- ... a digital orchestra with Linux Sampler.md | 161 ++++++++++++++++++ 1 file changed, 161 insertions(+) create mode 100644 sources/tech/20211216 Play a digital orchestra with Linux Sampler.md diff --git a/sources/tech/20211216 Play a digital orchestra with Linux Sampler.md b/sources/tech/20211216 Play a digital orchestra with Linux Sampler.md new file mode 100644 index 0000000000..650f61522d --- /dev/null +++ b/sources/tech/20211216 Play a digital orchestra with Linux Sampler.md @@ -0,0 +1,161 @@ +[#]: subject: "Play a digital orchestra with Linux Sampler" +[#]: via: "https://opensource.com/article/21/12/linux-sampler" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Play a digital orchestra with Linux Sampler +====== +Linux Sampler is a specialized multimedia tool aimed at musicians. You +can play the whole orchestra with just a few gigs of samples. +![William Kenlon conducting an orchestra][1] + +Synthesizers have been attempting to emulate real-world musical instruments for decades. Famous synthesist Wendy Carlos worked hard to understand (and document, in her [Secrets of Synthesis][2] album) how synthesizers could capture the intent of music initially written for physical instruments. Musicians came to understand, though, that if you wanted to capture the exact sound and feel of an instrument, you had to record it, and the Mellotron famously pioneered this idea with tape loops connected to a keyboard. When synthesizer technology transitioned from analog to digital, sampling became a standard practice. + +In the context of musical synthesis, sampling is the process of recording a real instrument and then using that recording to make new music. It's an important idea in music because few people have access to every instrument they happen to want to compose music for. And if you want to write a score featuring a full symphonic orchestra for a video game, it's likely out of your budget to hire an orchestra, a studio, and engineers. However, with open source, you can certainly afford to hook your MIDI keyboard up to [Linux Sampler][3]. + +### Install Linux Sampler + +Linux Sampler is a specialized multimedia tool aimed at musicians, so not all distributions package it in their repositories. + +On Fedora, CentOS, Mageia, and similar, you can download Linux Sampler from the [Planet CCRMA][4] repository, or use a build from COPR: + + +``` + + +$ sudo dnf copr enable klaatu/linuxsampler +$ sudo dnf install linuxsampler + +``` + +On Debian and similar, download the DEB installer from [linuxsampler.org][5] and install: + + +``` +`$ sudo dpkg -i linuxsampler*deb` +``` + +For macOS and Windows, download installers from [linuxsampler.org][5] and launch the installer. + +Linux Sampler is actually just the _engine_ to play sample files. + +![Linux Sampler engine][6] + +(Seth Kenlon, [CC BY-SA 4.0][7]) + +You also need a front-end application so that you can interact with it. There are two user interfaces provided on the Linux Sampler website: Qsampler and Fantasia. Fantasia is a Java desktop application, so it works regardless of your operating system. You can [download Fantasia][8] from the Linux Sampler website. + +### Getting samples + +Linux Sampler plays three different kinds of sample files: + + * `.gig` (also known as Gigastudio or Gigasample files) + * `.sf2` (also known as Soundfont) + * `.sfz` (an open standard with no relation to the `.sf2` Soundfont format) + + + +There are several sources for free and open source sound banks in all of these formats, including the [Virtual Playing Orchestra][9] project, the [Versil Studio][10] collection, [Flame Studios][11] guitar samples, and many more. You can also purchase bundles of Gigasamples from a number of sample bank companies. As long as you have Linux Sampler, you have a way to play Gigasamples, Soundfonts, and SFZ files. + +### Making music with Linux Sampler + +The Fantasia interface for Linux Sampler has a three-column configuration. + +![Linux Sampler UI][12] + +(Seth Kenlon, [CC BY-SA 4.0][7]) + + * On the right is the main configuration panel. This is where you select audio and MIDI devices. + * In the middle is the rack. This is where you add virtual synths, each with a unique sample bank loaded. + * On the left is the Orchestra and Instrument panel. This is largely an optional panel to build a collection of instruments you often use for quick access. + + + +### Audio configuration + +To set your audio output, click the **Power** button on the left of the **Audio Devices** entry in the right column. For Linux, you can use Advanced Linux Sound Architecture (ALSA) or Jack Audio Connection Kit (JACK). The JACK system allows you to route sound from different applications as if they were all coming from the same application. + +JACK is a powerful system, but it does take time to learn. If you want to use ALSA instead, you must suspend Pulse Audio so that Linux Sampler can lay claim to your audio output device. + +To set Linux Sampler to use ALSA: + + +``` + + +$ cat << EOF  >> fantasia.sh +> #!/bin/sh +> java -jar $HOME/Downloads/Fantasia-0.9.jar +> EOF +$ chmod +x ./fastasia.sh + +``` + +Each time you launch Fantasia, use this command: + + +``` +`$ pasuspender ./fastasia.sh` +``` + +### MIDI configuration + +Linux Sampler responds to MIDI signals. To create a new MIDI device, click the **Power** button on the left of the **MIDI Devices** entry in the right column. On Linux, you can use ALSA or JACK to manage MIDI. + +Personally, I use ALSA for MIDI even when I'm using JACK. + +### Adding instruments + +To play your samples, you need a synthesizer (a **sampler channel**, in Fantasia's terminology) in your rack with a sample bank loaded. To add a sampler channel, click the **Power** button on the left of the **MIDI Devices** entry in the middle column. + +Linux Sampler defaults to GIG, but you can click the **GIG** button on the rack unit to choose a different format. Click the **Load instrument** button to select the file you want to load. + +### Playing sound + +To play your samples, you can use the virtual keyboard at the bottom of the window. Click on an instrument in the middle column to make it active, and then click on the keyboard at the bottom of the window. Alternately, if you're using a USB MIDI keyboard, you can use it to trigger sounds. + +### Advanced MIDI setup + +The virtual piano keyboard at the bottom of the screen uses MIDI channel 1 by default, and that's what all of your instruments in the middle rack are set to when you create them. Suppose you want to trigger sounds over a specific MIDI channel, either because you're using a MIDI keyboard that sends signals over that channel or because you're triggering sounds from a separate application. In that case, you can change the MIDI channel of each instrument. To see an instrument's MIDI settings, click the **Options** button on the right of the rack unit. You can set your MIDI input, port, channel, and more in the drop-down panel that appears. + +![Linux Sampler MIDI][13] + +(Seth Kenlon, [CC BY-SA 4.0][7]) + +### Open source orchestration  + +I love a good cinematic score, with a full orchestra, swelling crescendos, and plucky arpeggios when it comes to movies and video games. I also really enjoy old music, and it's amazing how many MIDI files are out there that provide a sort of "digital sheet music" for old classics. I don't have access to a full chamber orchestra myself, but I do have access to a lot of great open source technology and open culture work that, when combined, allows me to compose and play a digital orchestra. Linux Sampler doesn't have a sequencer built into it. It's just a player. Combine it with a digital audio workstation such as [Ardour][14], [Qtractor][15], or [Rosegarden][16] to create your own scores, songs, or just use it as a sound source for MIDI files. If you close your eyes, you might just convince yourself a real live band is serenading you. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/linux-sampler + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/kenlon-music-conducting-orchestra.png?itok=BK_RB39X (William Kenlon conducting an orchestra) +[2]: http://www.wendycarlos.com/+sos.html +[3]: http://linuxsampler.org/ +[4]: http://ccrma.stanford.edu/planetccrma/mirror/fedora/linux/planetccrma/ +[5]: https://download.linuxsampler.org/packages/debian/ +[6]: https://opensource.com/sites/default/files/uploads/linuxsampler-engine.jpg (Linux Sampler engine) +[7]: https://creativecommons.org/licenses/by-sa/4.0/ +[8]: http://downloads.sourceforge.net/jsampler/Fantasia-0.9.jar +[9]: http://virtualplaying.com/virtual-playing-orchestra/ +[10]: https://vis.versilstudios.com/vsco-community.html +[11]: https://www.flamestudios.org/free/GigaSamples +[12]: https://opensource.com/sites/default/files/uploads/linuxsampler-ui.jpg (Linux Sampler UI) +[13]: https://opensource.com/sites/default/files/uploads/linuxsampler-midi.jpg (Linux Sampler MIDI) +[14]: https://opensource.com/article/21/12/making-music-ardour-advent-2021-18 +[15]: https://opensource.com/article/17/6/qtractor-audio +[16]: https://opensource.com/article/18/3/make-sweet-music-digital-audio-workstation-rosegarden From 7ce8b686ce1f57315c64298c00c6ca957cce8dc9 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 17 Dec 2021 05:02:38 +0800 Subject: [PATCH 206/244] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211216=20?= =?UTF-8?q?A=20guide=20to=20Kubernetes=20pod=20eviction?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211216 A guide to Kubernetes pod eviction.md --- ...1216 A guide to Kubernetes pod eviction.md | 151 ++++++++++++++++++ 1 file changed, 151 insertions(+) create mode 100644 sources/tech/20211216 A guide to Kubernetes pod eviction.md diff --git a/sources/tech/20211216 A guide to Kubernetes pod eviction.md b/sources/tech/20211216 A guide to Kubernetes pod eviction.md new file mode 100644 index 0000000000..5ce974190c --- /dev/null +++ b/sources/tech/20211216 A guide to Kubernetes pod eviction.md @@ -0,0 +1,151 @@ +[#]: subject: "A guide to Kubernetes pod eviction" +[#]: via: "https://opensource.com/article/21/12/kubernetes-pod-eviction" +[#]: author: "Orit Wasserman https://opensource.com/users/owassermredhatcom" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +A guide to Kubernetes pod eviction +====== +Understanding how Kubernetes prioritizes pods for eviction can help +balance resources more effectively. +![Parts, modules, containers for software][1] + +One of the strengths of Kubernetes is scheduling. It handles application pod placement across nodes in a cluster and their resource allocation, so you don't have to worry about balancing resources yourself. When it runs out of resources, Kubernetes can evict pods—but how does Kubernetes decide which pod to evict? + +### Kubernetes pods and resources + +While a pod can hold multiple containers, for the purpose of this article, I will discuss them as a single object. + +In Kubernetes, you can define the pod requirements for CPU (compute) and memory. CPU is measured in units: 1 CPU equals 1 single cloud vCPU or 1 hyperthread on bare metal. Memory is measured in bytes (e.g., Mi ****for megabytes, Gi for gigabytes, and so on). + +The minimum amount of resources required for pod execution is defined in the _requests_ section of the YAML. To prevent using all the node's resources, the _limits_ section of the YAML defines the maximum resource usage. Here is an example: + + +``` + + +apiVersion: v1 +kind: Pod +metadata: +  name: frontend +spec: +  containers: +  - name: app +    image: images.my-company.example/app:v4 +    resources: +      requests: +        memory: "64Mi" +        cpu: "250m" +      limits: +        memory: "128Mi" +        cpu: "500m" + +``` + +When the Kubernetes scheduler wants to place the pod on a node, it first confirms which node has the available resources to fulfill its requests. Note: if you have pods on a node without defined requests, Kubernetes won't take them into account, and this may cause failures. + +There are two types of resources: flexible and exact. CPU is a flexible resource and can be overprovisioned. Applications can continue to function even if they don't get the requested CPU resources but will be less performant. On the other hand, memory is an exact resource: An application cannot run without the requested amount. If my pod requests 1G of memory and can only get 0.8G, it fails with a memory allocation error when it tries to allocate the full amount. + +Limits function differently than requests. Limits apply to CPUs only when the node CPU is loaded (i.e., at 100% CPU usage). This is a common scenario, and the local node operating system can handle it. But if a pod exceeds its memory limit, it will be terminated by the out-of-memory (OOM) killer. + +### When does eviction happen? + +This difference pertains to the way Kubernetes handles resource pressure. Kubernetes needs to evict pods if the node resources are running out, an event referred to as node-pressure eviction. When a CPU is fully utilized, the node scheduler can handle it, so eviction won't occur. However, if there is not enough available memory, it needs to evict pods from the node and try to place them in another node. This is referred to as eviction due to memory pressure. Running out of disk space can also cause node-pressure eviction. + +### How does Kubernetes decide which pods to evict? + +Pods are evicted according to the resource, like memory or disk space, causing the node pressure. The first pods to be evicted are those in a failed state, since they are not running but could still be using resources. After this, Kubernetes evaluates the running pods. + +Evicting the pod that consumes most of the memory won't work, as most likely it is an active pod, and it will be harder to place. Instead, Kubernetes looks at two different classes to make this decision: QoS (Quality of Service) class and Priority class. + +#### QoS Class + +Kubernetes has three QoS classes that can be assigned to a pod: + +**Guaranteed**: For every container in the pod: + + * There must be a memory limit and a memory request. + * The memory limit must equal the memory request. + * There must be a CPU limit and a CPU request. + * The CPU limit must equal the CPU request. + + + +**Burstable**: The pod does not meet the criteria for QoS class Guaranteed, but has at least one container in the pod has with a memory or CPU request + +**BestEffort**: The pod must not have any containers with memory or CPU limits or requests. + +The pod QoS class is determined by its lowest container QoS class. + +#### Priority Class + +A pod's priority class defines the importance of the pod compared to other pods running in the cluster: the higher the priority, the more important the pod. Kubernetes uses the priority class when it tries to schedule the pod. If it cannot be scheduled, it will evict a lower priority pod to make room for it. + +You can set the pod preempting (eviction) policy with these categories: + + * **Never:** This pod has high priority, but Kubernetes should not evict other pods to run it. This pod can be evicted to run higher priority pods. + * **PreemptLowerPriority:** Evict pods of a lower priority class to run this pod + + + +The pod priority class is determined by its lowest container priority class. + +The cloud platform [OKD][2] (formerly known as Minishift, and the foundation for Red Hat OpenShift) has three built-in priority classes: + + * **system-node-critical:** Pods that should never be evicted from a node + * **system-cluster-critical**: Pods that are important to the cluster and can be evicted from the node, but only in certain circumstances + * **cluster-logging**: Pods that must be scheduled over other apps + + + +#### Using classes to order evictions + +For disk pressure, Kubernetes uses only the pods' priority class to order their eviction, because there is no mechanism to prerequest the amount of resources before scheduling the pods. For this reason, it is important to use local persistent volumes that are CSI-based instead of host path for a pod's data. + +For memory pressure, Kubernetes will try to evict pods whose usage exceeds the requests while taking into account the pod's priority class, in this order: + + 1. Pods with a QoS class of BestEffort don't have any requests, so they are always considered for eviction. + 2. If pressure remains after evicting BestEffort class pods, pods are then evicted according to their priority class. Pods with the same priority are evicted according to the amount their usage level exceeds the request. + 3. If there is still pressure, Kubernetes will look to evict Guaranteed pods and Burstable pods that do not exceed requests. These pods are evicted according to their priority. + + + +### Preventing pod eviction + +How can you reduce the chance that your essential pods will be evicted? + + * Always assign priority class, as Kubernetes considers both for memory and disk pressure. + * Avoid having pods with a BestEffort QoS class. + * For pods with fixed memory usage, use the Guaranteed QoS class. I don't recommend using it for every pod, as it can cause inefficient memory usage. Most applications utilize the most memory when they are being loaded. Setting requests equal to limits can mean either setting higher requests to allow the pod to get the maximum amount of memory or reducing the limits so your application won't get more memory. + + + +If you are interested in learning more about pod scheduling and eviction, you can explore the Kubernetes documentation: + + * [Scheduling, preemption, and eviction][3] + * [Node-pressure eviction][4] + * [Configure out of resource handling][5] + + + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/kubernetes-pod-eviction + +作者:[Orit Wasserman][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/owassermredhatcom +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/containers_modules_networking_hardware_parts.png?itok=rPpVj92- (Parts, modules, containers for software) +[2]: https://opensource.com/article/18/11/local-okd-cluster-linux +[3]: https://kubernetes.io/docs/concepts/scheduling-eviction/ +[4]: https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/ +[5]: https://v1-20.docs.kubernetes.io/docs/tasks/administer-cluster/out-of-resource/ From 777378ad4e584178e6584494a443cc743813121f Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 17 Dec 2021 08:48:31 +0800 Subject: [PATCH 207/244] translated --- ...inux commands for optimizing web images.md | 197 ------------------ ...inux commands for optimizing web images.md | 195 +++++++++++++++++ 2 files changed, 195 insertions(+), 197 deletions(-) delete mode 100644 sources/tech/20211213 My favorite Linux commands for optimizing web images.md create mode 100644 translated/tech/20211213 My favorite Linux commands for optimizing web images.md diff --git a/sources/tech/20211213 My favorite Linux commands for optimizing web images.md b/sources/tech/20211213 My favorite Linux commands for optimizing web images.md deleted file mode 100644 index 725188717f..0000000000 --- a/sources/tech/20211213 My favorite Linux commands for optimizing web images.md +++ /dev/null @@ -1,197 +0,0 @@ -[#]: subject: "My favorite Linux commands for optimizing web images" -[#]: via: "https://opensource.com/article/21/12/optimize-web-images-linux" -[#]: author: "Ayush Sharma https://opensource.com/users/ayushsharma" -[#]: collector: "lujun9972" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -My favorite Linux commands for optimizing web images -====== -Generate resized and optimized images for thumbnails and banner images -for the web. -![Digital creative of a browser on the internet][1] - -I used to stay away from images when working online. Handling and optimizing images can be both imprecise and time-consuming. - -Then I found some commands that changed my mind. To create web pages, I use Jekyll, so I've included that in the directions. However, these commands will also work with other static site generators.  - -### Image commands on Linux - -The commands that made all the difference for me are `optipng`, `jpegoptim`, and, of course, the venerable `imagemagick`. Together, they make handling images easy to manage or even automate. - -Here’s an overview of how I implemented my solution using these commands. I placed article images in my `static/images` folder. From there, I generated two copies of all PNG and JPG images: - - 1. A cropped thumbnail version measuring 422 by 316 - 2. A larger banner version, measuring 1024 by 768 - - - -Then I placed each copy (the thumbnail and the banner) into its own folder, and I leveraged Jekyll's custom variables for the folder paths. I outline each of these steps in greater detail below. - -#### Installation - -To follow along with my solution, be sure you have all the commands installed. On Linux, you can install `optipng`, `jpegoptim`, and `imagemagick` using your package manager. - -On Fedora, CentOS, Mageia, and similar: - - -``` -$ sudo dnf install optipng jpegoptim imagemagick -``` - -On Debian, Elementary, Mint, and similar: - - -``` -$ sudo apt install optipng jpegoptim imagemagick -``` - -On macOS, use [MacPorts][2] or [Homebrew][3]. - - -``` -brew install optipng jpegoptim imagemagick -``` - -On Windows, use [Chocolatey][4]. - -### Creating folders for thumbnails and banners - -After installing the commands, I created new folders under `static/images`. Generated thumbnails get placed into `img-thumbs`, and banners go in `img-normal`. - - -``` - - -$ cd static/images -$ mkdir -p img-thumbs img-normal - -``` - -With the folders created, I copied all GIF, SVG, JPG, and PNG files to both folders. I use the GIFs and SVGs as-is for thumbnails and banner images. - - -``` - - -$ cp content/*.gif img-thumbs/; cp content/*.gif img-normal/ -$ cp content/*.svg img-thumbs/; cp content/*.svg img-normal/ -$ cp content/*.jpg img-thumbs/; cp content/*.jpg img-normal/ -$ cp content/*.png img-thumbs/; cp content/*.png img-normal/ - -``` - -### Processing thumbnails - -To resize and optimize the thumbnails, I use my three commands. - -I use the `mogrify` command from `ImageMagick` to resize the JPGs and PNGs. Since I want the thumbnails to be 422 by 316, the command looks like this: - - -``` - - -$ cd img-thumbs -$ mogrify -resize 422x316 *.png -$ mogrify -format jpg -resize 422x316 *.jpg - -``` - -Now I optimize the PNGs using `optipng` and the JPGs using `jpegoptim`: - - -``` - - -$ for i in *.png; do optipng -o5 -quiet "$i"; done -$ jpegoptim -sq *.jpg - -``` - -In the above command: - - * For `optipng`, `-o5` switch sets the level of optimization, with 0 being the lowest. - * For `jpegoptim`, `-s` strips all image metadata, and `-q` sets quiet mode. - - - -### Processing banners - -I process the banner images in essentially the same way I process the thumbnails, aside from the dimensions, which are 1024 by 768 for banners. - - -``` - - -$ cd .. -$ cd img-normal -$ mogrify -resize 1024x768 *.png -$ mogrify -format jpg -resize 1024x768 *.jpg -$ for i in *.png; do optipng -o5 -quiet "$i"; done -$ jpegoptim -sq *.jpg - -``` - -### Configuring the paths in Jekyll - -The `img-thumbs` directory now contains my thumbnails. and `img-normal` contains the banners. To make my life easier, I set both of them to custom variables in my Jekyll `_config.yml`. - - -``` - - -content-images-path: /static/images/img-normal/ -content-thumbs-images-path: /static/images/img-thumbs/ - -``` - -Using the variables is simple. When I want to display the thumbnail, I prepend `content-thumbs-images-path` to the image. When I want to display the full banner, I prepend `content-images-path`. - - -``` - - -{% if page.banner_img %} - <img src="{{ page.banner_img | prepend: site.content-images-path | \ -prepend: site.baseurl | prepend: site.url }}" alt="Banner image for \ -{{ page.title }}" /> -{% endif %} - -``` - -### Conclusion - -There are several improvements I could make to my optimization commands. - -Using `rsync` to copy only changed files to `img-thumbs` and `img-normal` is one obvious improvement. That way, I'm not reprocessing files over and over again. Adding those commands to [Git pre-commit hooks][5] or a CI pipeline is another useful step. - -Resizing and optimizing images to reduce their size is a win for the user and the web as a whole. Maybe my next step for reducing image sizes will be [webp][6]. - -Fewer bytes transmitted over the wire means a lower carbon footprint, but that's another article. The UX victory is good enough for now. - -* * * - -_This article was originally posted on the [author's blog][7] and has been republished with permission._ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/12/optimize-web-images-linux - -作者:[Ayush Sharma][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/ayushsharma -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_web_internet_website.png?itok=g5B_Bw62 (Digital creative of a browser on the internet) -[2]: https://opensource.com/article/20/11/macports -[3]: https://opensource.com/article/20/6/homebrew-mac -[4]: https://opensource.com/article/20/3/chocolatey -[5]: https://opensource.com/life/16/8/how-construct-your-own-git-server-part-6 -[6]: https://opensource.com/article/20/4/webp-image-compression -[7]: https://www.ayushsharma.in/2021/11/optimising-jpg-and-png-images-for-a-jekyll-blog diff --git a/translated/tech/20211213 My favorite Linux commands for optimizing web images.md b/translated/tech/20211213 My favorite Linux commands for optimizing web images.md new file mode 100644 index 0000000000..60aa2d4012 --- /dev/null +++ b/translated/tech/20211213 My favorite Linux commands for optimizing web images.md @@ -0,0 +1,195 @@ +[#]: subject: "My favorite Linux commands for optimizing web images" +[#]: via: "https://opensource.com/article/21/12/optimize-web-images-linux" +[#]: author: "Ayush Sharma https://opensource.com/users/ayushsharma" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +我最喜欢的优化网络图片的 Linux 命令 +====== +为网络上的缩略图和横幅图片生成经过调整和优化的图片。 +![Digital creative of a browser on the internet][1] + +以前我在处理网络工作时,我对图像敬而远之。处理和优化图像既不精确又费时。 + +后来我发现了一些命令,改变了我的想法。为了创建网页,我使用 Jekyll,所以我在说明中包括了它。然而,这些命令也可以用于其他静态网站生成器。 + +### Linux 上的图像命令 + +对我来说有用的命令是 `optipng`、`jpegoptim`,当然还有古老的 `imagemagick`。它们一起使处理图像变得容易管理,甚至是自动化。 + +下面是我如何使用这些命令实现我的解决方案的概述。我把文章图片放在我的 `static/images` 文件夹中。在那里,我生成了所有 PNG 和 JPG 图片的两个副本: + + 1. 一个裁剪过的缩略图版本,尺寸为 422×316 + 2. 一个更大的横幅版本,尺寸为 1024×768 + + + +然后,我把每个副本(缩略图和横幅)放入自己的文件夹,并利用 Jekyll 的自定义变量来确定文件夹路径。下面我将更详细地介绍这些步骤中的每一步。 + +#### 安装 + +要跟上我的解决方案,请确保你已经安装了所有的命令。在 Linux 上,你可以使用软件包管理器安装 `optipng`、`jpegoptim` 和 `imagemagick`。 + +在 Fedora、CentOS、Mageia 和类似系统上: + + +``` +$ sudo dnf install optipng jpegoptim imagemagick +``` + +在 Debian、Elementary、Mint 和类似系统上: + +``` +$ sudo apt install optipng jpegoptim imagemagick +``` + +在 macOS 上,使用 [MacPorts][2] 或 [Homebrew][3]: + + +``` +brew install optipng jpegoptim imagemagick +``` + +在 Windows 上,使用 [Chocolatey][4]。 + +### 为缩略图和横幅创建文件夹 + +安装完这些命令后,我在 `static/images` 下创建了新的文件夹。生成的缩略图放在 `img-thumbs`,横幅放在 `img-normal`。 + + +``` + + +$ cd static/images +$ mkdir -p img-thumbs img-normal + +``` + +创建了文件夹后,我把所有的 GIF、SVG、JPG 和 PNG 文件复制到这两个文件夹。我把 GIF 和 SVG 原封不动地用于缩略图和横幅图片。 + + +``` + + +$ cp content/*.gif img-thumbs/; cp content/*.gif img-normal/ +$ cp content/*.svg img-thumbs/; cp content/*.svg img-normal/ +$ cp content/*.jpg img-thumbs/; cp content/*.jpg img-normal/ +$ cp content/*.png img-thumbs/; cp content/*.png img-normal/ + +``` + +### 处理缩略图 + +为了调整和优化缩略图的大小,我使用了我的三个命令。 + +我使用 `ImageMagick` 的 `mogrify` 命令来调整 JPG 和 PNG 的大小。因为我希望缩略图是 422×316,所以命令看起来像这样: + + +``` + + +$ cd img-thumbs +$ mogrify -resize 422x316 *.png +$ mogrify -format jpg -resize 422x316 *.jpg + +``` + +现在我用 `optipng` 优化 PNG,用 `jpegoptim` 优化 JPG: + + +``` + + +$ for i in *.png; do optipng -o5 -quiet "$i"; done +$ jpegoptim -sq *.jpg + +``` + +在上述命令中: + + * 对于 `optipng`,`-o5` 开关设置了优化的级别,0 是最低的。 + * 对于`jpegoptim`,`-s` 剥离所有图像元数据,`-q` 设置安静模式。 + + + +### 处理横幅 + +我处理横幅图片的方法与处理缩略图的方法基本相同,除了尺寸外,横幅图片的尺寸为 1024×768。 + + +``` + + +$ cd .. +$ cd img-normal +$ mogrify -resize 1024x768 *.png +$ mogrify -format jpg -resize 1024x768 *.jpg +$ for i in *.png; do optipng -o5 -quiet "$i"; done +$ jpegoptim -sq *.jpg + +``` + +### 配置 Jekyll 中的路径 + +`img-thumbs` 目录现在包含我的缩略图,`img-normal` 包含横幅。为了使我的生活更轻松,我在Jekyll的 `_config.yml` 中把它们都设置为自定义变量。 + + +``` + + +content-images-path: /static/images/img-normal/ +content-thumbs-images-path: /static/images/img-thumbs/ + +``` + +使用这些变量很简单。当我想显示缩略图时,我把 `content-thumbs-images-path` 加到图片上。当我想显示完整的横幅时,我在前面添加 `content-images-path`。 + + +``` + + +{% if page.banner_img %} +<img src="{{ page.banner_img | prepend: site.content-images-path | \ +prepend: site.baseurl | prepend: site.url }}" alt="Banner image for \ +{{ page.title }}" /> +{% endif %} + +``` + +### 总结 + +我可以对我的优化命令做几个改进。 + +使用 `rsync` 只复制改变过的文件到 `img-thumbs` 和 `img-normal` 是一个明显的改进。这样一来,我就不会一次又一次地重新处理文件。将这些命令添加到 [Git pre-commit hooks][5] 或 CI 流水线中是另一个有用的步骤。 + +调整和优化图像以减少其大小,对用户和整个网络来说都是一种胜利。也许我减少图片尺寸的下一步将是 [webp][6]。 + +更少的字节通过电线传输意味着更低的碳足迹,但这是另一篇文章。目前,用户体验的胜利已经足够好了。 + +* * * + +_本文原载于[作者的博客][7],已获授权转载。_ + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/optimize-web-images-linux + +作者:[Ayush Sharma][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/ayushsharma +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_web_internet_website.png?itok=g5B_Bw62 (Digital creative of a browser on the internet) +[2]: https://opensource.com/article/20/11/macports +[3]: https://opensource.com/article/20/6/homebrew-mac +[4]: https://opensource.com/article/20/3/chocolatey +[5]: https://opensource.com/life/16/8/how-construct-your-own-git-server-part-6 +[6]: https://opensource.com/article/20/4/webp-image-compression +[7]: https://www.ayushsharma.in/2021/11/optimising-jpg-and-png-images-for-a-jekyll-blog From cd84e11edb01153c175d062d7d159e8d0d8ed636 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 17 Dec 2021 08:52:59 +0800 Subject: [PATCH 208/244] translating --- ...ME Search Results in Ubuntu and Other Linux Distributions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20211216 Hide or Add Specific Folders From GNOME Search Results in Ubuntu and Other Linux Distributions.md b/sources/tech/20211216 Hide or Add Specific Folders From GNOME Search Results in Ubuntu and Other Linux Distributions.md index e4c36deb00..14011ab7bf 100644 --- a/sources/tech/20211216 Hide or Add Specific Folders From GNOME Search Results in Ubuntu and Other Linux Distributions.md +++ b/sources/tech/20211216 Hide or Add Specific Folders From GNOME Search Results in Ubuntu and Other Linux Distributions.md @@ -2,7 +2,7 @@ [#]: via: "https://itsfoss.com/control-gnome-file-search/" [#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 9750e11f6e5d894ccc2bf0a3197dfa3bbf890466 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 17 Dec 2021 11:02:01 +0800 Subject: [PATCH 209/244] PRF&PUB @geekpi https://linux.cn/article-14088-1.html --- ... source photo processing with Darktable.md | 49 ++++++++++--------- 1 file changed, 25 insertions(+), 24 deletions(-) rename {translated/tech => published}/20211208 Open source photo processing with Darktable.md (54%) diff --git a/translated/tech/20211208 Open source photo processing with Darktable.md b/published/20211208 Open source photo processing with Darktable.md similarity index 54% rename from translated/tech/20211208 Open source photo processing with Darktable.md rename to published/20211208 Open source photo processing with Darktable.md index d19700b8df..3a07b05de9 100644 --- a/translated/tech/20211208 Open source photo processing with Darktable.md +++ b/published/20211208 Open source photo processing with Darktable.md @@ -3,26 +3,28 @@ [#]: author: "Seth Kenlon https://opensource.com/users/seth" [#]: collector: "lujun9972" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14088-1.html" -用开源 Darktable 进行照片处理 +用开源的 Darktable 进行照片处理 ====== -如果你拍摄的照片足以进行处理,那么你就要来看看 Darktable 为你提供了什么。 -![Polaroids and palm trees][1] -很难说好照片是如何产生的。你必须在正确的时间出现在正确的地点。你必须准备好相机和构图的眼睛。而这只是发生在相机里的部分。好的摄影还有另一个阶段,许多人都没有想到这一点。它曾经发生在_暗房_中的灯光和化学品,但在今天的数字工具中,后期制作发生在暗房软件中。最好的照片处理器之一是 [Darktable][2],我在 2016 年写了一篇 [Darktable 介绍][3]文章。那篇文章已经过去五年了,所以我想我应该重新审视一下这个应用,写一写它的一个高级功能:遮罩。 +> 如果你拍摄的照片值得处理,那么你可以看看 Darktable 为你提供了什么。 -自从我最初写下这篇文章以来,Darktable 并没有什么变化,在我看来,这是一个真正好的应用的标志之一。一个稳定的界面和持续的优秀性能是人们对软件的所有要求,而 Darktable 仍然是熟悉的和强大的。如果你是 Darktable 的新手,请阅读我的介绍性文章,了解基础知识。 +![](https://img.linux.net.cn/data/attachment/album/202112/17/110051ezze4uatt2d2f94e.jpg) -### 什么是遮罩? +很难说好照片是如何产生的。你必须在正确的时间出现在正确的地点。你必须准备好相机和构图的观察力。而这只是发生在相机里的部分。好的摄影还有另一个阶段,许多人都没有想到这一点。它曾经需要在 _暗房_ 中的灯光和化学品,但在今天的数字工具中,后期制作发生在暗房软件中。最好的照片处理器之一是 [Darktable][2],我在 2016 年写了一篇 [介绍 Darktable][3] 的文章。那篇文章已经过去五年了,所以我想我应该重新审视一下这个应用,写一写它的一个高级功能:蒙版。 -在照片处理中,遮罩被用来限制你对图像的调整,使其只限于图像的一个区域。 +自从我最初写下这篇文章以来,Darktable 并没有什么变化,在我看来,这是一个真正好的应用的标志之一。一个稳定的界面和持续的优秀性能是人们对软件的所有要求,而 Darktable 依旧熟悉而强大。如果你是 Darktable 的新手,请阅读我的 [介绍性文章][3],了解基础知识。 -直观地说,_遮罩_是视觉艺术中的一种技术,用一种材料来遮挡另一种材料。如果你曾经在你的公寓或房子里画过一面墙,你可能使用过_遮蔽胶带_(也叫油漆工胶带)来保护相邻的墙壁或造型不受杂乱笔触的影响。完成后,你剥去遮蔽胶带,你就有了漂亮的油漆直线。 +### 什么是蒙版? -模板也是遮蔽的一种形式。 +在照片处理中,蒙版被用来限制你对图像的调整,使其只限于图像的一个区域。 + +直观地说,蒙版mask 是视觉艺术中的一种技术,用一种材料来遮挡另一种材料。如果你曾经在你的公寓或房子里画过一面墙,你可能使用过 _遮蔽胶带_(也叫油漆工胶带)来保护相邻的墙壁或造型不受杂乱笔触的影响。完成后,你剥去遮蔽胶带,你就有了漂亮的油漆直线。 + +模板stencil也是遮蔽的一种形式。 ![A mask made of masking tape][4] @@ -30,7 +32,7 @@ 这是一种在摄影中使用了一个世纪的技术,因此,数字摄影工具有一个类似的技术也是合理的。 -### 在 Darktable 中使用遮罩 +### 在 Darktable 中使用蒙版 在这个例子中,我使用了 Flickr 用户 **bcnewdemocrats** 的创作共用照片。这是一张很好的照片,因为它有迷人的主题(两个孩子在他们非常耐心的父亲脸上涂抹 Holi 粉)。因为它是关于印度的五彩节,所以它在整个过程中都有色彩飞溅。 @@ -38,11 +40,11 @@ (bcnewdemocrats, [CC BY-SA 4.0][5]) -这是一张不需要改进的照片,但并不是所有的调整都需要大刀阔斧才能产生显著效果。 +这是一张不需要改进的照片,但并不是所有的调整都需要剧烈变化才能产生显著效果。 -色彩校正滤镜提供了一个特别明显的调整。在彩色摄影中,尤其是人物摄影中,一个常见的修正是添加_琥珀_(一种偏红的橙色)。人类肤色受益于琥珀色,因为我们把这种颜色与温暖和生命联系起来。 +色彩校正滤镜提供了一个特别明显的调整。在彩色摄影中,尤其是人物摄影中,一个常见的修正是添加 _琥珀色_(一种偏红的橙色)。人类肤色受益于琥珀色,因为我们把这种颜色与温暖和生命联系起来。 -点击 **On** 按钮,激活 Darktable 窗口右侧的色彩校正调整面板。将中心点向上和向右拖动,给照片增加琥珀色。 +点击 “开启On” 按钮,激活 Darktable 窗口右侧的色彩校正调整面板。将中心点向上和向右拖动,给照片增加琥珀色。 ![Color correction panel][7] @@ -54,19 +56,19 @@ (Seth Kenlon, [CC BY-SA 4.0][5]) -在色彩校正面板的底部,点击 **drawn & parametric mask** 按钮。 +在色彩校正面板的底部,点击 “drawn & parametric mask绘制和参数化蒙版” 按钮。 ![Apply mask button][9] (Seth Kenlon, [CC BY-SA 4.0][5]) -在显示出来的工具栏中,你有几种蒙版形状可以选择。有一个圆和一个椭圆、路径、画笔、梯度,还有一个编辑现有蒙版的选项。为了简单起见,选择圆形,然后点击你的对象的脸。 +在显示出来的工具栏中,你有几种蒙版形状可以选择。有圆、椭圆、路径、画笔、梯度,还有一个编辑现有蒙版的选项。为了简单起见,选择圆形,然后点击你的对象的脸。 ![Circle mask][10] (Seth Kenlon, [CC BY-SA 4.0][5]) -你的色彩校正滤镜立即被限制在你的圆形遮罩的区域内,给你的主要对象一个愉快的琥珀色调,同时放过背景。 +你的色彩校正滤镜立即被限制在你的圆形蒙版的区域内,给你的主要对象一个令人愉快的琥珀色调,同时避开背景。 ![Color correction within a circle mask][11] @@ -76,13 +78,13 @@ ### 复用蒙版 -如果你想只对被摄者的脸部应用另一个滤镜,你不必再创建一个蒙版,特别是为那个新的滤镜。当你创建一个蒙版时,它会被添加到位于 Darktable 界面左边的**蒙版管理器**面板上。默认的名字是非常通用的,但你可以双击每个蒙版的名字来重命名它。 +如果你想只对被摄者的脸部应用另一个滤镜,你不必为那个新的滤镜再创建一个蒙版。当你创建一个蒙版时,它会被添加到位于 Darktable 界面左边的 “蒙版管理器mask manager” 面板上。默认的名字是非常通用的,但你可以双击每个蒙版的名字来重命名它。 ![Mask manager][12] (Seth Kenlon, [CC BY-SA 4.0][5]) -当你应用一个新的滤镜时,不是选择一个新的蒙版形状来创建,而是点击 **no mask used** 下拉菜单来查看现有的蒙版列表,以及之前在同一个滤镜上一起使用过的自动分组的蒙版。选择你想用于新滤镜的蒙版或蒙版组。 +当你应用一个新的滤镜时,不是选择一个新的蒙版形状来创建,而是点击 “不使用蒙版no mask used” 下拉菜单来查看现有的蒙版列表,以及之前在同一个滤镜上一起使用过的自动分组的蒙版。选择你想用于新滤镜的蒙版或蒙版组。 ![Selecting an existing mask][13] @@ -90,8 +92,7 @@ ### 更多蒙版 -在 Darktable 中还有很多其他类型的蒙版和蒙版功能可以探索。你可以用路径和画笔工具创建复杂的形状。你可以完全放弃使用形状,并根据色度和亮度值将过滤器限制在图像的某个区域。你可以调整蒙版的模糊度和扩散度等。在 Darktable 中进行的所有调整中,最好的一点是它们都是动态的、非破坏性的。如果你改变主意,你可以随时关闭它们,而且你实际上从未影响过图像数据本身。这并不奇怪,因为 Darktable 确实是一个强大的摄影工具,如果你拍摄的照片足够好,可以进行处理,你就应该看看 Darktable 为你提供了什么。 - +在 Darktable 中还有很多其他类型的蒙版和蒙版功能可以探索。你可以用路径和画笔工具创建复杂的形状。你也可以完全放弃使用形状,并根据色度和亮度值将过滤器限制在图像的某个区域。你可以调整蒙版的模糊度和扩散度等。在 Darktable 中进行的所有调整中,最好的一点是它们都是动态的、非破坏性的。如果你改变主意,你可以随时关闭它们,而且你实际上从未影响过图像数据本身。这并不奇怪,因为 Darktable 确实是一个强大的摄影工具,如果你拍摄的照片值得处理,你就应该看看 Darktable 为你提供了什么。 -------------------------------------------------------------------------------- @@ -100,7 +101,7 @@ via: https://opensource.com/article/21/12/open-source-photo-processing-darktable 作者:[Seth Kenlon][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 16c3db4e0039d4a3f1e22ce4e69128eb15e1b714 Mon Sep 17 00:00:00 2001 From: jrg Date: Fri, 17 Dec 2021 11:15:55 +0800 Subject: [PATCH 210/244] Create 20211215 Deploy Mycroft AI voice assistant on Raspberry Pi using Ansible.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit translated,翻译完成 --- ...assistant on Raspberry Pi using Ansible.md | 243 ++++++++++++++++++ 1 file changed, 243 insertions(+) create mode 100644 translated/tech/20211215 Deploy Mycroft AI voice assistant on Raspberry Pi using Ansible.md diff --git a/translated/tech/20211215 Deploy Mycroft AI voice assistant on Raspberry Pi using Ansible.md b/translated/tech/20211215 Deploy Mycroft AI voice assistant on Raspberry Pi using Ansible.md new file mode 100644 index 0000000000..31f389e986 --- /dev/null +++ b/translated/tech/20211215 Deploy Mycroft AI voice assistant on Raspberry Pi using Ansible.md @@ -0,0 +1,243 @@ +[#]: subject: "Deploy Mycroft AI voice assistant on Raspberry Pi using Ansible" +[#]: via: "https://opensource.com/article/21/12/mycroft-raspberry-pi-ansible" +[#]: author: "Gaëtan Trellu https://opensource.com/users/goldyfruit" +[#]: collector: "lujun9972" +[#]: translator: "jrglinux" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +# 使用 Ansible 在树莓派上部署 Mycroft AI 语音助手 + +使用本文中的这些 `Ansible playbooks` 可以帮你获得更优的 `Mycroft AI` 体验。 +![Looking at a map][1] + +`Mycroft AI` 是一款虚拟助手应用程序,可以响应语音请求并完成相应的任务,比如在互联网上搜索你需要的某些信息,或者下载你喜欢的博客等等。这是一款优秀的开源软件,不同于那些收集个人数据业务的公司的同款软件,`Mycroft AI` 注重于保护隐私以及提供平台灵活性。 + +`Mycroft AI` 使用 `python` 开发,可以安装于不同的硬件平台上。家喻户晓的树莓派便是一个非常热门的运行语音助手的硬件方案(不过不是唯一的方案)。方便的是,`Mycroft` 为树莓派提供了 [`Picroft`][2] 镜像,虽然目前 `Picrof` 还有一些限制,比如不支持 `64` 位系统,不过不能阻止它成为一种优秀的解决方案。 + + + +### 树莓派4,我选择的目标平台 + +树莓派在 `Mycroft` 社区中非常受欢迎,因为其性价比高,在教育行业中有着巨大的优势,并且由于 `Mycroft` 提供的便捷功能以及 `Pi` 本身易于访问的输入/输出(`GPIO`)引脚等,为树莓派提供了有趣扩展的可能性(比如,项目 [the wake word LED GPIO skill][3])。 + +树莓派`4B`具有足够的 `CPU` 算力以及内存来平稳运行 `Mycroft`。我使用的是 `8G` 内存的树莓派`4B`,运行 `Raspberry Pi OS Bullseye 64-bit` 系统,你可以从 [`RaspberryPi.org`][4] 网站下载该系统镜像文件。 + + + +### 另一个自动化故事 + +构建你自己的 `Mycroft AI` 系统,必须要注意一些细节问题。根据我的初步经验(一年前开始),以下罗列了一些重要的技术细节点: + +* 音频输出(扬声器配置) +* 音频输入(麦克风配置) +* 麦克风质量(以购买的实际硬件为准) +* 唤醒词响应(比如打招呼 "嘿,`Mycroft`") +* 响应延迟(比如提问 "天气怎么样") + +这些并不是`Mycroft AI` 的问题(译注:难道软件平台就没有处理延时问题?),它们只能是您在选择硬件和配置操作时必须牢记关心的事情。`Pi` 本身能够运行 `Mycroft AI`,但有一些配置需要额外的注意下: + +* `CPU` 调度器 +* `SD` 卡性能 +* `PulseAudio` 配置 +* 网络延迟 + +我做了大量的研究和实践来解决上面列出这些令人头疼的注意点,最终我实现了我的"终极"目标--最流畅的体验! + + + +### Ansible 雪中送炭 + +我已经摸索出了最流畅的体验配置,但是如何确保在任何 `Raspberry Pi 4` 板子上都能不遗漏每一个设置细节然后达到重新部署这种流畅性体验的目标呢? + +[`Ansible`][5] 能帮助你实现。`Ansible` 在设计上是幂等设计,这意味着它仅在需要时响应更改的请求。如果一切配置正确,`Ansible` 不会改变任何事情。这边是幂等设计的优美指出。 + +为了达到这一目的,我使用了两种 `Ansible` 场景角色工具: + +* 一个用于配置和调整树莓派 +* 一个用于安装和配置 `Mycroft AI` + + + +### Ansible prepi 角色 + +[`Ansible prepi role`][6] 应用了一些配置,以便让树莓派 `4B` 发挥更佳的性能以及为安装 `Mycroft` 做前提准备。 + +* 更新 `Raspberry Pi OS` 至最新版本 +* 添加 `Debian backports` 仓库 +* 使用 `next` 分支更新固件,该分支支持 `5.15` 版本内核以及边缘固件 +* 使用测试版本更新 `EEPROM`,该版本支持边缘功能 +* 设置 `initial_turbo` 用来加速启动过程 +* 将树莓派超频至 `2GHz` +* 在 `RAMDisck` 上挂载 `/tmp` +* 优化 `/` 分区挂载选项,提升 `SD` 卡读/写性能 +* 管理 `I2C、SPI、UART` 接口 +* 设置 `CPU` 控制器至避免在空间内核函数之间发生上下文切换的模式,以便提升性能 +* 安装和配置 `PulseAduio`(非系统范围) +* 新固件或者 `EEPROM` 安装后重启树莓派 + + + +### Ansible mycroft 角色 + +[`Ansible mycroft role`][7] 基于脚本 `dev_setup.sh` 从 `Github` 仓库获取并安装和配置 `Mycroft AI`,该脚本是 `Mycroft` 核心团队提供。 + +* 需要准备 `Python3` 环境 +* 系统集成环境 +* 额外的安装技能 +* 安装 `Boto3`,`py_mplayer`, `pyopenssl` 库 +* 支持 `IPC` 的 `RAMDisck` +* 支持文件配置 +* `PulseAudio` 优化 +* 安全的 `Mycroft` 消息总线 `websocket` + + + +我利用 [`Ansible playbook`][8] 来协调上面两个角色的使用。 + + + +### 个人配置需求 + +下面列举了一些个人配置的需求: + +* 能上网的树莓派 `4B` 板子(或者更新的板子) +* [`Raspberry Pi OS 64-bit`][9] +* `Ansible 2.9`(或者更新版本) +* 可正常工作的 `SSH` + +推荐使用[`Etcher`][10] 来烧录 `Raspberry Pi OS` 镜像至 `SD` 卡,你也可以使用你选择的镜像烧录工具。 + +我将 `Pi` 超频来提升性能,不过这可能对你的硬件是一种潜在危险。在使用我的 `Ansible playbooks` 配置之前,请先仔细阅读。你需要为你的每个配置选择负责。你将决定使用哪个固件、哪个 `EEPROM`。超频的话需要记得提供相应的冷却系统。 + + + +### 执行 Ansible playbook + +第一步,使用命令从 `Github` 获取 `Ansible playbook`: + +```shell +$ git clone https://github.com/smartgic/ansible-playbooks-mycroft.git +``` + +源码中,`requirements.yml` 文件中提供了 `playbook` 的依赖角色列表,必须从 `Ansible Galaxy` 中检索这些依赖。 + +```shell +$ cd ansible-playbooks-mycroft +$ ansible-galaxy install -r requirements.yml +Starting galaxy role install process +\- downloading role 'mycroft', owned by smartgic +\- downloading role from +\- extracting smartgic.mycroft to /home/goldyfruit/.ansible/roles/smartgic.mycroft +\- smartgic.mycroft (main) was installed successfully +\- downloading role 'prepi', owned by smartgic +\- downloading role from +\- extracting smartgic.prepi to /home/goldyfruit/.ansible/roles/smartgic.prepi +\- smartgic.prepi (main) was installed successfully +``` + +第二步,编辑仓库中的 `Ansible inventory` ,设置需要管理的主机。 + +```shell +[rpi] +rpi4b01 ansible_host=192.168.1.97 ansible_user=pi +``` + +[`rpi`] 代表组,无需更改。该组有一个主机 `rpi4b01`, 其 `IP` 地址为 `192.168.1.97`, 并创建 `pi` 作为 `Linux`(`Raspberry Pi OS`)上的默认用户。 + +现在比较棘手的部分到了:你希望每个选项怎么配置?这取决于你自己,下面是我的首选配置,供你参考: + +```shell +# file: install-custom.yml +\- hosts: rpi + gather_facts: yes + become: yes + + pre_tasks: + - name: Install Python 3.x Ansible requirement + raw: apt-get install -y python3 + changed_when: no + tags: + - always + + vars: + # PREPI + prepi_pi_user: pi + prepi_hostname: mylovelypi + prepi_firmware_update: yes + prepi_overclock: yes + prepi_force_turbo: yes + prepi_cpu_freq: 2000 + prepi_pulseaudio_daemon: yes + + # MYCROFT + mycroft_branch: dev + mycroft_user: "{{ prepi_pi_user }}" + mycroft_skills_update_interval: 2.0 + mycroft_recording_timeout_with_silence: 3.0 + mycroft_enclosure_name: picroft + mycroft_extra_skills: + - + + tasks: + - import_role: + name: smartgic.prepi + + - import_role: + name: smartgic.mycroft +``` + +上面的配置内容需要保存在文件里(比如,`install-custom.ym`)。 + +现在关键步骤:运行你新创建的`playbook`: + +```shell +`$ ansible-playbook -i inventory install-custom.yml -k` +``` + +`-k` 选项只有在不需要`SSH key` 的时候才使用。在命令执行期间,树莓派可能会重启若干次。`playbook` 会自动处理这个问题,不必担心。 + +`Ansible` 配置完成后,你可以看到一条祝贺消息,提示你下一步需要做什么。 + +![Congratulations message][11] + +(Gaëtan Trellu, [CC BY-SA 4.0][12]) + + + +### Ansible 让自定义 Mycroft 变得更容易 + +这些 `playbooks` 是我开始使用 `Mycroft AI` 后学到的经验教训。它们帮助我在任何一个地方都能构建、重构、自定义、拷贝我的安装并保持一致,这让我很省心! + +读完此文,你有何意见、问题或疑虑?欢迎在 `Twitter`上 [`@goldyfruit`][13]上和我交流,或者访问 [`Mycroft channels`][14] 搜寻答案。 + + + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/mycroft-raspberry-pi-ansible + +作者:[Gaëtan Trellu][a] +选题:[lujun9972][b] +译者:[jrglinux](https://github.com/jrglinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/goldyfruit +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/tips_map_guide_ebook_help_troubleshooting_lightbulb_520.png?itok=L0BQHgjr "Looking at a map" +[2]: https://mycroft-ai.gitbook.io/docs/using-mycroft-ai/get-mycroft/picroft +[3]: https://github.com/smartgic/mycroft-wakeword-led-gpio-skill +[4]: https://downloads.raspberrypi.org/raspios_lite_arm64/images/raspios_lite_arm64-2021-11-08/2021-10-30-raspios-bullseye-arm64-lite.zip +[5]: https://github.com/ansible/ansible +[6]: https://github.com/smartgic/ansible-role-prepi +[7]: https://github.com/smartgic/ansible-role-mycroft +[8]: https://github.com/smartgic/ansible-playbooks-mycroft +[9]: https://downloads.raspberrypi.org/raspios_arm64/images +[10]: https://opensource.com/article/18/7/getting-started-etcherio +[11]: https://opensource.com/sites/default/files/uploads/congratulations-message.png "Congratulations message" +[12]: https://creativecommons.org/licenses/by-sa/4.0/ +[13]: https://twitter.com/goldyfruit +[14]: https://chat.mycroft.ai/community/channels/general From cf30f120303336de4a8720a66761abb94a786a48 Mon Sep 17 00:00:00 2001 From: jrg Date: Fri, 17 Dec 2021 11:16:15 +0800 Subject: [PATCH 211/244] Delete 20211215 Deploy Mycroft AI voice assistant on Raspberry Pi using Ansible.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 翻译完成 --- ...assistant on Raspberry Pi using Ansible.md | 249 ------------------ 1 file changed, 249 deletions(-) delete mode 100644 sources/tech/20211215 Deploy Mycroft AI voice assistant on Raspberry Pi using Ansible.md diff --git a/sources/tech/20211215 Deploy Mycroft AI voice assistant on Raspberry Pi using Ansible.md b/sources/tech/20211215 Deploy Mycroft AI voice assistant on Raspberry Pi using Ansible.md deleted file mode 100644 index 97ce5b13fc..0000000000 --- a/sources/tech/20211215 Deploy Mycroft AI voice assistant on Raspberry Pi using Ansible.md +++ /dev/null @@ -1,249 +0,0 @@ -[#]: subject: "Deploy Mycroft AI voice assistant on Raspberry Pi using Ansible" -[#]: via: "https://opensource.com/article/21/12/mycroft-raspberry-pi-ansible" -[#]: author: "Gaëtan Trellu https://opensource.com/users/goldyfruit" -[#]: collector: "lujun9972" -[#]: translator: "jrglinux" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Deploy Mycroft AI voice assistant on Raspberry Pi using Ansible -====== -Use these Ansible playbooks for an optimized Mycroft AI experience. -![Looking at a map][1] - -Mycroft AI is a virtual assistant application that can respond to verbal requests and complete tasks such as searching the Internet for some information you need, or downloading your favorite podcast, and so on. It's a fine piece of open source software that, unlike similar software from companies in the business of harvesting personal data, provides privacy and platform flexibility. - -Mycroft AI, written in Python, can install on many different hardware platforms. The famous Raspberry Pi board is a popular choice _(but not the only one)_ to run the voice assistant. Conveniently, Mycroft provides an image for Raspberry Pi, which is called [Picroft][2]. Picroft is an excellent solution, but it does have some limitations, such as the lack of 64-bit support. - -### Raspberry Pi 4, the platform of choice and my target - -The Raspberry Pi board is popular within the Mycroft community because it's inexpensive, has a lot of educational potential, and provides the possibility of interesting expansions thanks to Mycroft's skills and the Pi's easy access to General-Purpose Input/Output (GPIO) pins (for example, the [wake word LED GPIO skill][3]). - -The model 4B has enough CPU power and memory to run Mycroft smoothly. I use the model 4B with 8GB of RAM, running Raspberry Pi OS Bullseye 64-bit Lite, which you can download from [RaspberryPi.org][4]. - -### Another automation story - -Building your own Mycroft AI system does mean that you must pay attention to some details. According to my initial experience (from a year ago), here is a list of important technical details you must keep in mind: - - * Audio output _(speaker configuration)_ - * Audio input _(microphone configuration)_ - * Microphone quality (_the actual hardware you buy_) - * Wake word response _("Hey Mycroft!")_ - * Latency of response _("What's the weather like?")_ - - - -These aren't issues of Mycroft AI, they're just the things you must keep in mind while choosing your hardware and configuring your operating system. The Pi itself is capable of running Mycroft AI, but there are adjustments that require special configuration. Specifically, these are: - - * CPU scheduler - * SD card performances - * PulseAudio configuration - * Network latency - - - -I had to do a lot of research and manual actions to solve the headaches from the list above, but I did achieve the "ultimate" goal—the smoothest experience! - -### Ansible to the rescue! - -So now that I've created _the smoothest experience_, how do I ensure that every action done to achieve this goal gets captured and gets re-applied only if required on any Raspberry Pi 4 board? - -[Ansible][5] to the rescue! Ansible is idempotent by design, which means that it applies the requested changes only if required. If everything is configured correctly, Ansible does not change a thing. This is the beauty of idempotency! - -To achieve this ultimate goal, I use two Ansible roles: - - * One to configure and tweak the Raspberry Pi - * One to install and configure Mycroft AI - - - -#### Ansible prepi role - -The [Ansible prepi role][6] applies some configurations to obtain better performances from a Raspberry Pi 4B board and prepare the path to Mycroft. - - * Update Raspberry Pi OS to the latest version - * Add Debian backports repository - * Update firmware using the next branch, which provides kernel 5.15 and edge firmware - * Update EEPROM using the beta version, which provides edge features - * Setup initial_turbo to speed up the boot process - * Overclock the Raspberry Pi to 2Ghz - * Mount /tmp on a RAMDisk - * Optimize / partition mount options to improve SDcard read/write - * Manage I2C, SPI & UART interfaces - * Set CPU governor to performance to avoid context switching between the idle* kernel functions - * Install and configure PulseAudio _(non-system wide)_ - * Reboot the Raspberry Pi when new firmware or EEPROM gets installed - - - -#### Ansible mycroft role - -This [Ansible mycroft role][7] installs and configures Mycroft AI Core from the GitHub repository based on the `dev_setup.sh` Bash script provided by the Mycroft core team. - - * Python 3 virtual environment - * Systemd integration - * Extra skills installation - * Boto3, py_mplayer, and pyopenssl libraries install - * RAMDisk support for IPC - * File configuration support - * PulseAudio optimizations - * Secure Mycroft message bus websocket - - - -I'll need an [Ansible playbook][8] to orchestrate the two roles. - -### Personal requirements - -Here is a list of requirements for this project: - - * Raspberry Pi 4B board (or later) connected to your network - * [Raspberry Pi OS 64-bit][9] - * Ansible 2.9 (or later) - * SSH, up and running - - - -To burn the Raspberry Pi OS image to the SD card, you can use [Etcher][10] or the imaging tool of your choice. - -I overclock my Pi to get a boost in performance, but this can be dangerous to your hardware. Before using my Ansible playbooks, read them carefully! _You are responsible for the choices made with this role._ You decide which firmware, which EEPROM you want to use. The same rule applies to the overclocking feature. **Remember that overclocking requires a proper cooling system.** - -### Execute the Ansible playbook - -The first step is to retrieve the Ansible playbooks from GitHub. Use the following `git` command: - - -``` -`$ git clone https://github.com/smartgic/ansible-playbooks-mycroft.git` -``` - -This repository contains an Ansible `requirements.yml` file which provides a list of Ansible roles required by this playbook, the roles must be retrieved from Ansible Galaxy. - - -``` - - -$ cd ansible-playbooks-mycroft -$ ansible-galaxy install -r requirements.yml -Starting galaxy role install process -\- downloading role 'mycroft', owned by smartgic -\- downloading role from -\- extracting smartgic.mycroft to /home/goldyfruit/.ansible/roles/smartgic.mycroft -\- smartgic.mycroft (main) was installed successfully -\- downloading role 'prepi', owned by smartgic -\- downloading role from -\- extracting smartgic.prepi to /home/goldyfruit/.ansible/roles/smartgic.prepi -\- smartgic.prepi (main) was installed successfully - -``` - -The second step is to edit the Ansible inventory provided in the repository to reference the hosts I need to be managed by Ansible. - - -``` - - -[rpi] -rpi4b01 ansible_host=192.168.1.97 ansible_user=pi - -``` - -`[rpi]` is the group and should not be changed. This group has one host named `rpi4b01`, which has IP `192.168.1.97` and provides `pi` as Linux (default on Raspberry Pi OS) user for Ansible to connect with. - -Now the tricky part: what value do you want for each option? It's up to you, but here's my go-to configuration: - - -``` - - -# file: install-custom.yml -\- hosts: rpi -  gather_facts: yes -  become: yes - -  pre_tasks: -    - name: Install Python 3.x Ansible requirement -      raw: apt-get install -y python3 -      changed_when: no -      tags: -        - always - -  vars: -    # PREPI -    prepi_pi_user: pi -    prepi_hostname: mylovelypi -    prepi_firmware_update: yes -    prepi_overclock: yes -    prepi_force_turbo: yes -    prepi_cpu_freq: 2000 -    prepi_pulseaudio_daemon: yes - -    # MYCROFT -    mycroft_branch: dev -    mycroft_user: "{{ prepi_pi_user }}" -    mycroft_skills_update_interval: 2.0 -    mycroft_recording_timeout_with_silence: 3.0 -    mycroft_enclosure_name: picroft -    mycroft_extra_skills: -      - - -  tasks: -    - import_role: -        name: smartgic.prepi - -    - import_role: -        name: smartgic.mycroft - -``` - -The content needs to be saved in a file (for example, `install-custom.yml`). - -And now the moment of truth: run your freshly created playbook. - - -``` -`$ ansible-playbook -i inventory install-custom.yml -k` -``` - -The `-k` option from `ansible-playbook` command is only required if not using the SSH key. During the playbook execution, the Raspberry Pi could reboot a couple of times. The playbook is smart enough to handle this. - -Once Ansible is done, you see a congratulatory message, which prompts you for the next steps you need to take. - -![Congratulations message][11] - -(Gaëtan Trellu, [CC BY-SA 4.0][12]) - -### Ansible makes custom Mycroft easy - -These playbooks are the lessons I learned since starting my journey with Mycroft AI. It allows me to build, re-build, customize, and replicate my install with the peace of mind of having consistency everywhere! - -Do you have any comments, questions, or concerns? Leave a comment, visit me on Twitter [@goldyfruit][13], or stop by [Mycroft channels][14]. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/12/mycroft-raspberry-pi-ansible - -作者:[Gaëtan Trellu][a] -选题:[lujun9972][b] -译者:[jrglinux](https://github.com/jrglinux) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/goldyfruit -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/tips_map_guide_ebook_help_troubleshooting_lightbulb_520.png?itok=L0BQHgjr (Looking at a map) -[2]: https://mycroft-ai.gitbook.io/docs/using-mycroft-ai/get-mycroft/picroft -[3]: https://github.com/smartgic/mycroft-wakeword-led-gpio-skill -[4]: https://downloads.raspberrypi.org/raspios_lite_arm64/images/raspios_lite_arm64-2021-11-08/2021-10-30-raspios-bullseye-arm64-lite.zip -[5]: https://github.com/ansible/ansible -[6]: https://github.com/smartgic/ansible-role-prepi -[7]: https://github.com/smartgic/ansible-role-mycroft -[8]: https://github.com/smartgic/ansible-playbooks-mycroft -[9]: https://downloads.raspberrypi.org/raspios_arm64/images -[10]: https://opensource.com/article/18/7/getting-started-etcherio -[11]: https://opensource.com/sites/default/files/uploads/congratulations-message.png (Congratulations message) -[12]: https://creativecommons.org/licenses/by-sa/4.0/ -[13]: https://twitter.com/goldyfruit -[14]: https://chat.mycroft.ai/community/channels/general From d39c469164c29d3ce11d1e5e8589575110b45afc Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 17 Dec 2021 13:50:42 +0800 Subject: [PATCH 212/244] PRF&PUB @jrglinux https://linux.cn/article-14089-1.html --- ...Information in Linux Terminal With inxi.md | 141 ++++++++---------- 1 file changed, 59 insertions(+), 82 deletions(-) rename {translated/tech => published}/20211215 Get All Kind of System Information in Linux Terminal With inxi.md (56%) diff --git a/translated/tech/20211215 Get All Kind of System Information in Linux Terminal With inxi.md b/published/20211215 Get All Kind of System Information in Linux Terminal With inxi.md similarity index 56% rename from translated/tech/20211215 Get All Kind of System Information in Linux Terminal With inxi.md rename to published/20211215 Get All Kind of System Information in Linux Terminal With inxi.md index 96aafdc141..872d0d4c71 100644 --- a/translated/tech/20211215 Get All Kind of System Information in Linux Terminal With inxi.md +++ b/published/20211215 Get All Kind of System Information in Linux Terminal With inxi.md @@ -3,156 +3,145 @@ [#]: author: "Pratham Patel https://itsfoss.com/author/pratham/" [#]: collector: "lujun9972" [#]: translator: "jrglinux" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14089-1.html" +在 Linux 终端使用 inxi 命令获取各种系统信息 +====== +![](https://img.linux.net.cn/data/attachment/album/202112/17/134920bzuqfbwbqswcif33.jpg) -# 在 Linux 终端使用 inxi 命令获取各种系统信息 +`inix` 是一个用于获取 Linux 系统信息的终端命令。能够获取软件和硬件的详细信息,比如计算机型号、内核版本、发行版号以及桌面环境等信息,甚至可以读取主存模块占用主板的哪块 RAM 卡槽等详细信息。 -`inix` 是一个用于获取 `Linux` 系统信息的终端命令。能够获取包括软件和硬件等详细信息,比如计算机型号、内核版本、发行版号以及桌面环境等信息,甚至可以读取主存模块占用主板的哪块 `RAM` 卡槽等详细信息。 +`inxi` 还可以用于监控系统中正在消耗 CPU 或者内存资源的进程。 -`inxi` 还可以用于监控系统中正在消耗 `CPU` 或者 `memory` 资源的进程。 - -在本文中,我将展示 使用`inxi` 命令获取系统信息的常用操作。 +在本文中,我将展示使用 `inxi` 命令获取系统信息的常用操作。 首先,我将展示下如何安装 `inxi` 命令。 ### 在 Linux 上安装 inxi -`inxi` 是一个非常流行的工具,所以在大多数 `Linux` 发行版仓库中都可以轻松获取到该工具。不过还没有流行到各大 `Linux` 发行版默认就安装了该软件,所以需要我们自己安装一下。 +`inxi` 是一个非常流行的工具,所以在大多数 Linux 发行版仓库中都可以轻松获取到该工具。不过还没有流行到各大 Linux 发行版默认就安装了该软件,所以需要我们自己安装一下。 -* 在 `Ubuntu/Debian` 发行版系统中,安装命令: +在 Ubuntu/Debian 发行版系统中,安装命令: - ```shell - sudo apt install inxi - ``` +``` +sudo apt install inxi +``` -* 在 `Fedora/RHEL8-based` 等发行版中,安装命令: +在 Fedora/RHEL8-based 等发行版中,安装命令: - ```shell - sudo dnf install -y epel-release - sudo dnf install -y inxi - ``` +``` +sudo dnf install -y epel-release +sudo dnf install -y inxi +``` -* 在 `Arch Linux` 以及它的派生分支版本中,安装命令: +在 `Arch Linux` 以及它的派生分支版本中,安装命令: - ```shell - sudo pacman -S inxi - ``` - - +``` +sudo pacman -S inxi +``` ### 使用 inxi 获取系统信息 你可以在终端运行 `inxi` 命令来总体浏览下系统信息。 -```shell +``` inxi ``` -如下图所示,运行 `inxi` 命令可以简要浏览下 `CPU`、时钟频率、 内核、 `RAM(Mem)` 、磁盘存储空间、运行进程数量以及`shell` 版本等信息。 +如下图所示,运行 `inxi` 命令可以简要浏览 CPU、时钟频率(`speed/min/max`)、内核(`Kernel`)、内存(`Mem`)、磁盘存储空间(`Storage`)、运行进程数量(`Procs`)以及 Shell 等信息。 ![The default output of inxi command][2] -使用 `-b` 参数可以获取更为详细的系统信息。`-b` 参数会读取更多有关 `CPU`、驱动、当前运行进程、主板 `UEFI` 版本、`GPU`、视窗系统以及网卡等详细信息。 +使用 `-b` 参数可以获取更为详细的系统信息。`-b` 参数会读取更多有关 CPU、驱动器、当前运行进程、主板 UEFI 版本、GPU、显示分辨率以及网络设备等详细信息。 -```shell +``` inxi -b ``` ![Detailed hardware and software information about machine as reported by inxi][3] -类似 `-b` 参数使用方法,`inxi` 还有许多其他的 `option` 参数可供使用。你可以综合使用这些参数来获取你关心的信息。 +类似 `-b` 参数使用方法,`inxi` 还有许多其他的参数可供使用。你可以综合使用这些参数来获取你关心的信息。 让我们看几个实例。 ### 获取音频设备信息 -使用 `-A` 参数可以获取有关音频【输出】设备信息,包括物理音频【输出】设备、声音服务器以及音频驱动等详细信息。 +使用 `-A` 参数可以获取有关音频(输出)设备信息,包括物理音频(输出)设备、声音服务器以及音频驱动等详细信息。 -```shell +``` inxi -A ``` ![Output of inxi command when “-A” flag is used][4] - - ### 获取电池信息 -使用 `-B` 参数,可以获取有关电池的信息(如果存在电池)。你将读取到例如以 `Wh` (瓦特小时)为单位的当前电池电量和状况。 +使用 `-B` 参数,可以获取有关电池的信息(如果安装了电池)。你将读取到例如以 `Wh`(瓦特小时)为单位的当前电池电量和状况。 因为我使用的是台式机,所以这里仅仅作为一个示例,让我们看看使用 `inxi -B` 会输出什么。 -```shell +``` Battery: ID-1: BAT0 charge: 50.0 Wh (100.0%) condition: 50.0/50.0 ``` - - ### 获取 CPU 信息 -`-C` 参数用于获取有关 `CPU` 的详细信息。比如包括 `CPU` 缓存大小、频率(单位 `MHz`,如果有多核,会显示每个核心的频率)、核心数、`CPU` 型号以及 `CPU` 是 `32` 位还是 `64` 位. +`-C` 参数用于获取有关 CPU 的详细信息。比如包括 CPU 缓存大小、频率(单位 `MHz`,如果有多核,会显示每个核心的频率)、核心数、CPU 型号以及 CPU 是 32 位还是 64 位。 -```shell +``` inxi -C ``` ![Detailed CPU information displayed by inxi][6] -注意,如果是在虚拟机中使用 `inix -C`,对于 `inxi` 而言,读取 `CPU` 的最大和最小频率可能显示异常。下面是一个在四核 `Debian 11` 虚拟机中使用 `-C` 参数的示例输出。 +注意,如果是在虚拟机中使用 `inix -C`,`inxi` 读取到的 `CPU` 的最大和最小频率可能异常。下面是一个在四核 Debian 11 虚拟机中使用 `-C` 参数的示例输出。 ![An example output of using the “-C” flag in a Virtual Machine][7] - - ### 获取更多的系统信息 使用 `-F` 参数可以获取更详细的系统信息(类似 `-b` 参数,但会更为详细)。几乎囊括了所有层次的系统信息。 -```shell +``` inxi -F ``` ![][8] - - ### 获取图形显示相关信息 `-G` 参数可以获取和图形相关的信息。 -它会显示所有的图形设备(`GPU`)、正在使用的 `GPU` 驱动(有助于检查是否使用 `Nvida` 驱动还是 `nouveau` 驱动)、显示输出分辨率和驱动程序版本。 +它会显示所有的图形设备(GPU)、正在使用的 GPU 驱动(有助于检查是否使用 Nvidia 驱动还是 nouveau 驱动)、显示输出分辨率和驱动程序版本。 -```shell +``` inxi -G ``` ![][9] - - ### 获取运行进程信息 -`-l` 参数(大写字母 `i`)显示正在运行的进程、当前 `shell` 、内存(内存使用情况)以及 `inxi` 版本号等信息。 +`-I` 参数(大写字母 `i`)显示正在运行的进程、当前 shell 、内存(内存使用情况)以及 `inxi` 版本号等信息。 ![inxi get running process info][10] -### 获取 RAM 信息 +### 获取内存信息 -可能你已经猜到了,`-m` 参数可以获取与内存(`RAM`)相关的信息。 +可能你已经猜到了,`-m` 参数可以获取与内存相关的信息。 -它读取了如总可用内存、最大内存容量(硬件或 `CPU` 支持的)、主板物理内存插槽数、`ECC` 是否存在、填充的内存插槽以及枚举每个插槽中运行的模块的大小和运行速度等信息。 +它读取了如总可用内存、最大内存容量(硬件或 CPU 支持的)、主板物理内存插槽数、是否存在 ECC、插入的内存插槽,以及枚举每个插槽中运行的内存模块的大小和运行速度等信息。 -```shell +``` inxi -m ``` -要使用 `-m` 参数获取更详细的信息,例如最大容量、每个插槽的 `RAM` 模块信息等,需要超级用户权限。 +要使用 `-m` 参数获取更详细的信息,例如最大容量、每个插槽的内存模块信息等,需要超级用户权限。 -```shell +``` sudo inxi -m ``` @@ -162,30 +151,24 @@ sudo inxi -m 使用 `-memroy-short` 参数将会只显示总内存以及当前已使用的内存量。 - - ### 查看正在使用的包存储库 当使用 `-r` 参数时,会列举当前正在使用的包管理仓库或者更新本地仓库缓存中的所有存储库列表。 ![List of repositories in use][12] - - ### 获取 RAID 设备信息 -`-R` 参数用于获取所有 `RAID` 设备相关信息。 +`-R` 参数用于获取所有 RAID 设备相关信息。 -令人惊喜的是,它甚至显示了有关 `ZFS RAID` (默认情况下,多数 `Linux` 系统不包含该文件系统)的信息。它显示了 `RAID` 设备上文件系统的详细信息、状态-(包含是离线状态、总大小和可用大小等)。 +令人惊喜的是,它甚至显示了有关 ZFS RAID(默认情况下,多数 Linux 系统不包含该文件系统)的信息。它显示了 RAID 设备上文件系统的详细信息、状态(包含离线状态、总大小和可用大小等)。 -```shell +``` inxi -R ``` ![][13] - - ### 在 Linux 终端中查询天气(对,这是可以的) 利用 `-W` 参数,你可以查询地球上任何地方的天气情况。 @@ -194,54 +177,48 @@ inxi -R * 邮政编码 * 纬度 -* 城市(,州),国家(不能含有空格,使用 “+” 替换空格) +* 城市(及州)、国家(不能含有空格,使用 “+” 替换空格) -```shell +``` inxi -W Baroda,India ``` ![Use of the “-W” flag with inxi followed by the city,country location descriptor][14] - - ### 监控系统资源使用情况 `inxi` 除了提供有关已安装的硬件和驱动的信息外,还可以用于资源监控。 -使用 `-t` 参数可以显示进程信息。你还可以可选项 `-c` (用于 `CPU` )和 `-m`(用于 `RAM`)。这些选项结合使用可以按指定数量列出进程信息。 +使用 `-t` 参数可以显示进程信息。你还可以可选项 `-c` (用于 CPU)和 `-m`(用于内存)。这些选项结合使用可以按指定数量列出进程信息。 下面是一些使用 `-t` 参数监控资源信息的示例。 -```shell +``` inxi -t ``` -命令 `inxi -t` 默认效果等同于 `inxi -t cm5`的效果。 +命令 `inxi -t` 默认效果等同于 `inxi -t cm5` 的效果。 ![No difference in output of “inti -t” and “inxi -t cm5”][15] -```shell +``` inxi -t cm10 ``` ![][16] -偶尔需要监控下资源使用情况时,该工具挺管用。如果需要更多的资源监控功能,则推荐使用[专用系统资源监控工具][17]。 +偶尔需要监控资源使用情况时,该工具挺管用。如果需要更多的资源监控功能,则推荐使用 [专用系统资源监控工具][17]。 +### 总结 - -### 最后 - -对于需要诊断计算机问题以及获取那些并不熟悉的软硬件信息的人来说,`inxi` 工具是十分便利且有用的。它能识别那些消耗 `CPU`、内存的进程;可以检查是否安装了合适的图形驱动程序、主板 `UEFI/BIOS` 是否需要更新等等。 +对于需要诊断计算机问题以及获取那些并不熟悉的软硬件信息的人来说,`inxi` 工具是十分便利且有用的。它能识别那些消耗 CPU、内存的进程;可以检查是否安装了合适的图形驱动程序、主板 UEFI/BIOS 是否需要更新等等。 事实上,在 `inxi` 开源社区论坛上,我们要求那些寻求帮助的成员提供 `inxi` 命令输出内容以便判断他们当前正在使用什么样的系统环境。 -我知道也有其他的工具可以读取 `Linux` 上的硬件信息,不过 `inxi` 同时能读取硬件和软件信息,这也是我喜欢它的地方所在。 +我知道也有其他的工具可以读取 Linux 上的硬件信息,不过 `inxi` 同时能读取硬件和软件信息,这也是我喜欢它的地方所在。 你使用 `inxi` 或者其他工具么?欢迎在评论区留言分享交流。 - - -------------------------------------------------------------------------------- via: https://itsfoss.com/inxi-system-info-linux/ @@ -249,7 +226,7 @@ via: https://itsfoss.com/inxi-system-info-linux/ 作者:[Pratham Patel][a] 选题:[lujun9972][b] 译者:[jrglinux](https://github.com/jrglinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From c5ab2b3cb4693b2ceca4929d4c03a1359bc7bbef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91?= Date: Fri, 17 Dec 2021 17:21:28 +0800 Subject: [PATCH 213/244] Translated MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 最后一篇 FreeDOS 文章 --- ...Get started with batch files in FreeDOS.md | 225 ------------------ ...Get started with batch files in FreeDOS.md | 221 +++++++++++++++++ 2 files changed, 221 insertions(+), 225 deletions(-) delete mode 100644 sources/tech/20210407 Get started with batch files in FreeDOS.md create mode 100644 translated/tech/20210407 Get started with batch files in FreeDOS.md diff --git a/sources/tech/20210407 Get started with batch files in FreeDOS.md b/sources/tech/20210407 Get started with batch files in FreeDOS.md deleted file mode 100644 index cd65ee4d3d..0000000000 --- a/sources/tech/20210407 Get started with batch files in FreeDOS.md +++ /dev/null @@ -1,225 +0,0 @@ -[#]: subject: (Get started with batch files in FreeDOS) -[#]: via: (https://opensource.com/article/21/3/batch-files-freedos) -[#]: author: (Kevin O'Brien https://opensource.com/users/ahuka) -[#]: collector: (lujun9972) -[#]: translator: (robsean) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Get started with batch files in FreeDOS -====== -Batch files are a great way to write your own simple programs and -automate tasks that normally require lots of typing. -![Computer screen with files or windows open][1] - -On Linux, it's common to create _shell scripts_ to automate repetitive tasks. Similarly, on [FreeDOS][2], the open source implementation of old DOS operating systems, you can create a _batch file_ containing several FreeDOS commands. Then you can run your batch file to execute each command in order. - -You create a batch file by using an ASCII text editor, such as the FreeDOS Edit application. Once you create a batch file, you save it with a file name and the extension `.bat`. The file name should be unique. If you use a FreeDOS command name as your own file name, the FreeDOS command probably will execute instead of your batch file. - -Virtually all internal and external FreeDOS commands can be used in a batch file. When you create a batch file, you are essentially writing a program. FreeDOS batch files may not have the power of a structured programming language, but they can be very handy for quick but repetitive tasks. - -### Commenting your code - -The No. 1 good habit for any programmer to learn is to put comments in a program to explain what the code is doing. This is a very good thing to do, but you need to be careful not to fool the operating system into executing your comments. The way to avoid this is to place `REM` (short for "remark") at the beginning of a comment line. - -FreeDOS ignores lines starting with `REM`. But anyone who looks at the source code (the text you've written in your batch file) can read your comments and understand what it's doing. This is also a way to temporarily disable a command without deleting it. Just open your batch file for editing, place `REM` at the beginning of the line you want to disable, and save it. When you want to re-enable that command, just open the file for editing and remove `REM`. This technique is sometimes referred to as "commenting out" a command. - -### Get set up - -Before you start writing your own batch files, I suggest creating a temporary directory in FreeDOS. This can be a safe space for you to play around with batch files without accidentally deleting, moving, or renaming important system files or directories. On FreeDOS, you [create a directory][3] with the `MD` command: - - -``` -C:\>MD TEMP -C:\>CD TEMP -C:\TEMP> -``` - -The `ECHO` FreeDOS command controls what is shown on the screen when you run a batch file. For instance, here is a simple one-line batch file: - - -``` -`ECHO Hello world` -``` - -If you create this file and run it, you will see the sentence displayed on the screen. The quickest way to do this is from the command line: Use the `COPY` command to take the input from your keyboard (`CON`) and place it into the file `TEST1.BAT`. Then press **Ctrl**+**Z** to stop the copy process, and press Return or Enter on your keyboard to return to a prompt. - -Try creating this file as `TEST1.BAT` in your temporary directory, and then run it: - - -``` -C:\TEMP>COPY CON TEST1.BAT -CON => TEST1.BAT -ECHO Hello world -^Z - -C:\TEMP>TEST1 -Hello world -``` - -This can be useful when you want to display a piece of text. For instance, you might see a message on your screen telling you to wait while a program finishes its task, or in a networked environment, you might see a login message. - -What if you want to display a blank line? You might think that the `ECHO` command all by itself would do the trick, but the `ECHO` command alone asks FreeDOS to respond whether `ECHO` is on or off: - - -``` -C:\TEMP>ECHO -ECHO is on -``` - -The way to get a blank line is to use a `+` sign immediately after `ECHO`: - - -``` -C:\TEMP>ECHO+ - -C:\TEMP> -``` - -### Batch file variables - -A variable is a holding place for information you need your batch file to remember temporarily. This is a vital function of programming because you don't always know what data you want your batch file to use. Here's a simple example to demonstrate. - -Create `TEST3.BAT`: - - -``` -@MD BACKUPS -COPY %1 BACKUPS\%1 -``` - -Variables are signified by the use of the percentage symbol followed by a number, so this batch file creates a `BACKUPS` subdirectory in your current directory and then copies a variable `%1` into a `BACKUPS` folder. What is this variable? That's up to you to decide when you run the batch file: - - -``` -C:\TEMP>TEST3 TEMP1.BAT -TEST1.BAT => BACKUPS\TEST1.BAT -``` - -Your batch file has copied `TEST1.BAT` into a subdirectory called `BACKUPS` because you identified that file as an argument when running your batch file. Your batch file substituted `TEST1.BAT` for `%1`. - -Variables are positional. The variable `%1` is the first argument you provide to your command, while `%2` is the second, and so on. Suppose you create a batch file to list the contents of a directory: - - -``` -`DIR %1` -``` - -Try running it: - - -``` -C:\TEMP>TEST4.BAT C:\HOME -ARTICLES -BIN -CHEATSHEETS -GAMES -DND -``` - -That works as expected. But this fails: - - -``` -C:\TEMP>TEST4.BAT C:\HOME C:\DOCS -ARTICLES -BIN -CHEATSHEETS -GAMES -DND -``` - -If you try that, you get the listing of the first argument (`C:\HOME`) but not of the second (`C:\DOCS`). This is because your batch file is only looking for one variable (`%1`), and besides, the `DIR` command can take only one directory. - -Also, you don't really need to specify a batch file's extension when you run it—unless you are unlucky enough to pick a name for the batch file that matches one of the FreeDOS external commands or something similar. When FreeDOS executes commands, it goes in the following order: - - 1. Internal commands - 2. External commands with the *.COM extension - 3. External commands with the *.EXE extension - 4. Batch files - - - -### Multiple arguments - -OK, now rewrite the `TEST4.BAT` file to use a command that takes two arguments so that you can see how this works. First, create a simple text file called `FILE1.TXT` using the `EDIT` application. Put a sentence of some kind inside (e.g., "Hello world"), and save the file in your `TEMP` working directory. - -Next, use `EDIT` to change your `TEST4.BAT` file: - - -``` -COPY %1 %2   -DIR -``` - -Save it, then execute the command: - - -``` -`C:\TEMP\>TEST4 FILE1.TXT FILE2.TXT` -``` - -Upon running your batch file, you see a directory listing of your `TEMP` directory. Among the files listed, you have `FILE1.TXT` and `FILE2.TXT`, which were created by your batch file. - -### Nested batch files - -Another feature of batch files is that they can be "nested," meaning that one batch file can be called and run inside another batch file. To see how this works, start with a simple pair of batch files. - -The first file is called `NBATCH1.BAT`: - - -``` -@ECHO OFF -ECHO Hello -CALL NBATCH2.BAT   -ECHO world -``` - -The first line (`@ECHO OFF`) quietly tells the batch file to show only the output of the commands (not the commands themselves) when you run it. You probably noticed in previous examples that there was a lot of feedback about what the batch file was doing; in this case, you're permitting your batch file to display only the results. - -The second batch file is called NBATCH2.BAT: - - -``` -`echo from FreeDOS` -``` - -Create both of these files using `EDIT`, and save them in your TEMP subdirectory. Run `NBATCH1.BAT` to see what happens: - - -``` -C:\TEMP\>NBATCH1.BAT   -Hello -from FreeDOS -world -``` - -Your second batch file was executed from within the first by the `CALL` command, which provided the string "from FreeDOS" in the middle of your "Hello world" message. - -### FreeDOS scripting - -Batch files are a great way to write your own simple programs and automate tasks that normally require lots of typing. The more you use FreeDOS, the more familiar you'll become with its commands, and once you know the commands, it's just a matter of listing them in a batch file to make your FreeDOS system make your life easier. Give it a try! - -* * * - -_Some of the information in this article was previously published in [DOS lesson 15: Introduction to batch files][4] and [DOS lesson 17: Batch file variables; nested batch files][5] (both CC BY-SA 4.0)._ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/3/batch-files-freedos - -作者:[Kevin O'Brien][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/ahuka -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_screen_windows_files.png?itok=kLTeQUbY (Computer screen with files or windows open) -[2]: https://www.freedos.org/ -[3]: https://opensource.com/article/21/2/freedos-commands-you-need-know -[4]: https://www.ahuka.com/dos-lessons-for-self-study-purposes/dos-lesson-15-introduction-to-batch-files/ -[5]: https://www.ahuka.com/dos-lessons-for-self-study-purposes/dos-lesson-17-batch-file-variables-nested-batch-files/ diff --git a/translated/tech/20210407 Get started with batch files in FreeDOS.md b/translated/tech/20210407 Get started with batch files in FreeDOS.md new file mode 100644 index 0000000000..63b059c70f --- /dev/null +++ b/translated/tech/20210407 Get started with batch files in FreeDOS.md @@ -0,0 +1,221 @@ +[#]: subject: (Get started with batch files in FreeDOS) +[#]: via: (https://opensource.com/article/21/3/batch-files-freedos) +[#]: author: (Kevin O'Brien https://opensource.com/users/ahuka) +[#]: collector: (lujun9972) +[#]: translator: (robsean) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +在 FreeDOS 中开始使用批处理文件 +====== +编写你自己的简单程序来自动执行通常需要大量输入的任务的批处理文件,是一种极好的方法。 +![Computer screen with files or windows open][1] + +在 Linux 上,创建 _shell 脚本_ 来自动执行重复的任务是很常见的。类似地,在 [FreeDOS][2] 上,旧式 DOS 操作系统的开放源文件的实现,你可以创建一个包含数个FreeDOS 命令的 _批处理文件_ 。接下来,你可以运行你的批处理文件来按顺序执行每个命令。 + +你可以使用一个 ASCII 文本编辑器来创建一个批处理文件,诸如 FeeDOS 的 Edit 应用程序。在你创建一个批处理文件后,你可以使用一个文件名称和扩展名 `.bat` 来保存它。文件名称应该是唯一的。如果你使用 FreeDOS 的一个命令的名称作为你自己的文件名称,那么可能将会执行 FreeDOS 的命令,而不会是你的批处理文件。 + +实际上,所有的内部的和外部的 FreeDOS 命令都可以在一个批处理文件中使用。在你创建一个批处理文件时,你基本上就是在编写一个程序。FreeDOS 批处理文件可能没有结构化编程语言的功能,但是对于耗时短暂却重复乏味的任务来说,它是非常方便的。 + +### 注释你的代码 + +对于任何程序员来说,学习的第一个好习惯都应该是:在一个程序中放置注释来解释该代码正在做什么。这是一件非常好完成的事情,但是你需要仔细,不要傻傻地让操作系统来执行你的注释。避免出现这种情况的方法是在一个注释行的开头处放置 `REM` ( "remark" 的简写) 。 + +FreeDOS 忽略以 `REM` 开头的代码行。但是任何查看源文件代码 (你在你的批处理文件中所编写的文本) 的人都可以读取你的注释并理解它在做什么。这也是一种临时性禁用一个命令而不需要删除它的一种方法。只需要打开你的批处理文件来进行编辑,在你想要禁用行的开头处放置 `REM` ,并保存它。在你想要重新启用这个命令时,只需要打开文件来进行编辑和移除 `REM` 。这种技巧有时被称为 "注释掉" 一个命令。 + +### 开始设置 + +在你开始编写你自己的批处理文件前,我建议在 FreeDOS 中创建一个临时目录. 这将会为你提供一个处理批处理文件的安全空间,不会意外地删除,移动,或重命名重要的系统文件或目录。在 FreeDOS 上,你可以使用 `MD` 命令来 [创建一个目录][3] : + + +``` +C:\>MD TEMP +C:\>CD TEMP +C:\TEMP> +``` + +FreeDOS 的 `ECHO` 命令会控制当你运行一个批处理文件时在屏幕上显示的东西。例如,这里是一个简单是单行批处理文件: + + +``` +`ECHO Hello world` +``` + +如果你创建这个文件并运行它,你将看到在屏幕上显示的句子。从命令行中完成这项操作的最快的方法是:使用 `COPY` 命令来从你的键盘中获取输入 (`CON`) ,并将其放置到文件 `TEST1.BAT` 之中。接下来,按下组合键 **Ctrl**+**Z** 来停止复制过程,按下你键盘上的 Return 或 Enter 按键来返回一个提示。 + +在你的临时目录中尝试创建这个文件为 `TEST1.BAT` ,接下来运行它: + + +``` +C:\TEMP>COPY CON TEST1.BAT +CON => TEST1.BAT +ECHO Hello world +^Z + +C:\TEMP>TEST1 +Hello world +``` + +当你想要显示一段文本使,这可能很有用。例如,在一个程序完成它的任务时,你可能会在你的屏幕上看到一条告诉你需要等待的消息,或者在一个网络环境中时,你可能会看到一条登录消息。 + +如果你想要显示一个空行怎么办?你可能会认为 `ECHO` 命令本身就可以达到目的,但是单独一个 `ECHO` 命令只会询问 FreeDOS 来响应 `ECHO` 是打开还是关闭: + + +``` +C:\TEMP>ECHO +ECHO is on +``` + +获取一个空白行的方法是在 `ECHO`后紧接着使用一个 `+`符号: + + +``` +C:\TEMP>ECHO+ + +C:\TEMP> +``` + +### 批处理文件变量 + +变量是一个存储你需要你的批处理文件临时记住的信息的位置。这是编程的一个重要的功能,因为你不能总是知道你的批处理文件需要使用什么样的数据。这里有一个用于演示的简单示例。 + +创建 `TEST3.BAT` : + + +``` +@MD BACKUPS +COPY %1 BACKUPS\%1 +``` + +变量是使用百分比符号和随后的数字表示的,因此,这个批处理文件将在你的当前目录中创建一个 `BACKUPS` 子目录,然后将复制变量 `%1` 到 `BACKUPS` 文件夹之中。这个变量是什么?当你运行批处理文件时,变量由你决定: + + +``` +C:\TEMP>TEST3 TEMP1.BAT +TEST1.BAT => BACKUPS\TEST1.BAT +``` + +你的批处理文件已经复制 `TEST1.BAT` 到一个名称为into a subdirectory called `BACKUPS` 的子目录,因为在你运行批处理文件时,你标识这个文件为一个参数。你的批处理文件将把 `%1` 替换为 `TEST1.BAT` 。 + +变量是按位置的。变量 `%1` 是你提供给命令的第一个参数,变量 `%2` 是第二个参数,以此类推。假设你创建一个批处理文件来列出一个目录的内容: + + +``` +`DIR %1` +``` + +尝试运行它: + + +``` +C:\TEMP>TEST4.BAT C:\HOME +ARTICLES +BIN +CHEATSHEETS +GAMES +DND +``` + +这像预期一样的工作。但是下面这个却失败了: + + +``` +C:\TEMP>TEST4.BAT C:\HOME C:\DOCS +ARTICLES +BIN +CHEATSHEETS +GAMES +DND +``` + +如果你尝试它,你将得到第一个参数 (`C:\HOME`) 的列表,而得不到第二个参数 (`C:\DOCS`) 的列表。这是因为你的批处理文件仅查找一个变量 (`%1`) ,此外,`DIR` 命令也仅能获取一个目录。 + +此外,当你运行一个批处理文件时,你也不需要为其具体指定扩展名—除非你运气相当不好地为批处理文件选取了一个与 FreeDOS 外部命令或类似命令相同的名称。当 FreeDOS 执行命令时,它按下面的顺序执行: + + 1. 内部命令 + 2. 带有 *.COM 扩展名的外部命令 + 3. 带有 *.EXE 扩展名的外部命令 + 4. 批处理文件 + + + +### 多个参数 + +好的,选择重新编写 `TEST4.BAT` 文件来使一个命令可以获取两个参数,以便你可以看到这是如何工作的。首先,使用 `EDIT` 应用程序来创建一个简单的名称为 `FILE1.TXT` 的文本文件。在其中放置一段某种类型 (例如,"Hello world") 的语句,并在你的 `TEMP` 工作目录中保存文件。 + +接下来,使用 `EDIT` 来更改你的 `TEST4.BAT` 文件: + + +``` +COPY %1 %2   +DIR +``` + +保存它,然后执行命令: + + +``` +`C:\TEMP\>TEST4 FILE1.TXT FILE2.TXT` +``` + +在运行你的批处理文件时,你会看一个你的 `TEMP` 目录的目录列表。在列出的文件之中,你有 `FILE1.TXT` 和 `FILE2.TXT` ,它们是由你的批处理文件所创建的。 + +### 嵌套批处理文件 + +批处理文件的另一个功能是能够 "嵌套" ,这意味着一个批处理文件可以在另外一个批处理文件中被调用和运行。为查看这是如何工作的,从一对简单的批处理文件开始: + +第一个文件被称为 `NBATCH1.BAT` : + + +``` +@ECHO OFF +ECHO Hello +CALL NBATCH2.BAT   +ECHO world +``` + +第一行 (`@ECHO OFF`) 轻轻地告诉批处理文件在你运行它时仅显示命令 (而不是命令本身) 的输出。你可能会在前面的示例中注意到这里有很多关于批处理文件正在做什么的反馈;在这种情况下,你正在允许你的批处理文件仅显示结果。 + +第二个批处理被称为 NBATCH2.BAT : + + +``` +`echo from FreeDOS` +``` + +使用 `EDIT` 来创建这两个文件,并在你的 TEMP 子目录中保存它们。运行 `NBATCH1.BAT` 来查看会发生什么: + + +``` +C:\TEMP\>NBATCH1.BAT   +Hello +from FreeDOS +world +``` + +你的第二个批处理文件将在第一个批处理文件之中通过 `CALL` 命令来执行,它将提供在你 "Hello world" 信息中间的字符串 "from FreeDOS" 。 + +### FreeDOS 脚本 + +编写你自己的简单程序来自动执行通常需要大量输入的任务的批处理文件,是一种极好的方法。你使用的 FreeDOS 越多, 你将越熟悉它的命令,在你熟知命令后,在一个批处理文件中列出它们仅是一件使你的 FreeDOS 系统让你生活轻松的事情。尝试一下! + + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/3/batch-files-freedos + +作者:[Kevin O'Brien][a] +选题:[lujun9972][b] +译者:[robsean]](https://github.com/robsean) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/ahuka +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_screen_windows_files.png?itok=kLTeQUbY (Computer screen with files or windows open) +[2]: https://www.freedos.org/ +[3]: https://opensource.com/article/21/2/freedos-commands-you-need-know +[4]: https://www.ahuka.com/dos-lessons-for-self-study-purposes/dos-lesson-15-introduction-to-batch-files/ +[5]: https://www.ahuka.com/dos-lessons-for-self-study-purposes/dos-lesson-17-batch-file-variables-nested-batch-files/ From 4184e6e2a94efad63af716717b340d8dc2eefda6 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 18 Dec 2021 05:02:23 +0800 Subject: [PATCH 214/244] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211218=20?= =?UTF-8?q?Fixing=20=E2=80=9CTarget=20Packages=20is=20configured=20multipl?= =?UTF-8?q?e=20times=E2=80=9D=20Error=20in=20Ubuntu=20&=20Debian=20Based?= =?UTF-8?q?=20Linux=20Distributions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211218 Fixing -Target Packages is configured multiple times- Error in Ubuntu - Debian Based Linux Distributions.md --- ...untu - Debian Based Linux Distributions.md | 186 ++++++++++++++++++ 1 file changed, 186 insertions(+) create mode 100644 sources/tech/20211218 Fixing -Target Packages is configured multiple times- Error in Ubuntu - Debian Based Linux Distributions.md diff --git a/sources/tech/20211218 Fixing -Target Packages is configured multiple times- Error in Ubuntu - Debian Based Linux Distributions.md b/sources/tech/20211218 Fixing -Target Packages is configured multiple times- Error in Ubuntu - Debian Based Linux Distributions.md new file mode 100644 index 0000000000..bb924cd4bb --- /dev/null +++ b/sources/tech/20211218 Fixing -Target Packages is configured multiple times- Error in Ubuntu - Debian Based Linux Distributions.md @@ -0,0 +1,186 @@ +[#]: subject: "Fixing “Target Packages is configured multiple times” Error in Ubuntu & Debian Based Linux Distributions" +[#]: via: "https://itsfoss.com/fixing-target-packages-configured-multiple-times/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Fixing “Target Packages is configured multiple times” Error in Ubuntu & Debian Based Linux Distributions +====== + +Recently, when I was [updating Ubuntu via command line][1], I encountered a warning that complained about target package being configured multiple times. + +The exact message after running sudo apt update command looked like this: + +**Fetched 324 kB in 6s (50.6 kB/s) +Reading package lists… Done +Building dependency tree… Done +Reading state information… Done +17 packages can be upgraded. Run ‘apt list –upgradable’ to see them. +W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/microsoft-edge-dev.list:3 and /etc/apt/sources.list.d/microsoft-edge.list:3** + +Since I know a few things about how the apt [package manager][2], I can already see the issue. + +Here’s the thing. A repository was added to the list of sources twice. This could happen in the same file or in separate files. + +The fix is to read the error message (it’s a warning, actually) correctly and edit the file to remove (or comment out) duplicate lines. You can see that it mentions the file name and the line number both. + +So, here in my case, I removed the third line of one of the file and it stopped showing the warning for me. To summarize, here’s what you need to do: + + * Read the error message and find out which line number of what files have the same entry. + * Use a terminal-based text editor like Nano to edit one of the files and either remove or comment the duplicate line. + * The solution may require you to be familiar (and comfortable) with basic Linux commands. + + + +But that’s too short an explanation if you are not familiar with package management in [Ubuntu and Debian][3]. + +### Understand and fixing the problem of package configured multiple times + +It is important to understand the issue in order to fix it. It’s because there is no single command to make it go away. The solution requires a little but effort from your side and you’ll see that the exact command/process may vary for different people. + +#### What causes this issue? + +If you read the warning message, you can at least guess that something is configured more than once. + +The APT package management works on sources.list. It’s just a text file that contains the information about repositories from where you can download certain packages. + +There is a main /etc/apt/sources.list file that contains the details of the official repositories provided by Ubuntu. Then, there is /etc/apt/sources.list.d directory that contains files for [additional external repositories][4]. + +The norm is that you do not touch the main /etc/apt/sources.list file. You add a new file in /etc/apt/sources.list.d for any additional repositories you add. + +![Sources list files][5] + +The problem arises when you are trying to install some software by reading various tutorials from the internet. You try adding an external repository, it doesn’t work to your liking. You try to add some other repository from some other tutorial and you end up with duplicate entries without even realizing. + +_**To be clear, this is not an error.**_ If you have duplicate entries in the sources list, your system will still be downloading the packages from it. It’s not stopping your system from working as usual. This is why _**it is a warning message, not an error**_. It’s just that it expects a repository to be added only once. + +#### Fixing the duplicate repository entries + +To fix the issue, you have to remove all the duplicate entries and leave just one of them in the system. + +That’s easier said than done, specially for beginners. Let me share a few tips and suggestion on that. + +##### Method 1: For Ubuntu desktop users + +There is an application called Software & Updates in Ubuntu. Start this application. + +![Go to Software and Updates application][6] + +Go to the **Other Software** tab and see the additional repositories added to your system. The checked ones are active. + +You may look through all the checked ones and see if you can spot duplicate entries. If yes, select one of them and hit the remove button. + +![Identify and remove the duplicate entries, leaving just one repository][7] + +You may run the update command again to see if the problem is fixed. I know it’s not very convenient but if you want the convenience of a GUI tool, this is what you have to do. + +If you cannot spot the duplicate entries, you have to be a detective and investigate it from the error message as explained in the next sections. + +##### Method 2: Remove duplicate entries using command line (if the duplicate error is not in /etc/apt/sources.list file) + +Please note the difference between /etc/apt sources.list (main sources file of the system) and /etc/apt/sources.list.d (folder to keep the files for additional repositories). + +If the error complains of **repeated entries in files under the /etc/apt/sources.list.d folder**, use this method. + +I’ll show it to you with my example. Follow the method with the details in your own error message. + +**W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/microsoft-edge-dev.list:3 and /etc/apt/sources.list.d/microsoft-edge.list:3** + +In the above error message, it tells me that line number 3 of file /etc/apt/sources.list.d/microsoft-edge-dev.list is the same as the line number 3 of the file /etc/apt/sources.list.d/microsoft-edge.list. + +It happened because I had Microsoft Edge browser beta version installed. When the stable version was released, I installed it from deb file and it added another entry. + +The decision for me is simple, I can delete one of the files and it won’t complain of the duplicate entry. If you are familiar with Linux command line, you can get the full path of the file and use the rm command with sudo to delete it. + +But if you are [clueless about Linux terminal][8], there is a safer approach and that is to comment out the repeated line. + +In the terminal, copy the full path of one of the trouble file. For me, it is /etc/apt/sources.list.d/microsoft-edge-dev.list. Use this sudo gedit command like this: + +``` + + sudo gedit /etc/apt/sources.list.d/microsoft-edge-dev.list + +``` + +It will open the file in graphical text editor and you can go to the line number the system was complaining about and add a # at the beginning of the line: + +![Go to the line number mentioned in the error and add # at the beginning of it][9] + +This will treat the line as a comment. Save the file and close the editor. Your problem should stop now. + +##### Method (or use case) 3: When one file is from /etc/apt/sources.list and other is from /etc/apt/sources.list.d directory + +The idea is to avoid touching the main /etc/apt/sources.list file. + +So if you have duplicate lines in this file and some other file in the /etc/apt/sources.list.d directory, you should edit the file in /etc/apt/sources.list.d folder. + +You copy its path and open it with sudo gedit the same way you saw in the previous method. + +##### Method (or use case) 4: When all duplicate entries are in the /etc/apt/sources.list file itself + +It’s possible that you added multiple entries in the main /etc/apt/sources.list file. You should not have but you are not familiar with things so you did it. Now it complains about duplicate entroes in the same file. + +**W: Target Packages (universe/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:16 and /etc/apt/sources.list:53** + +![Duplicate entries in /etc/apt/sources.list file][10] + +Now, the first thing here is to make a backup of this file with this command: + +``` + + sudo cp /etc/apt/sources.list /etc/apt/sources.list.back + +``` + +Next, open the file with Gedit text editor and sudo: + +``` + + sudo gedit /etc/apt/sources.list + +``` + +If you want, you can go to Preference in Gedit and display line numbers. It will be easier to see the line numbers. + +![Show line numbers in Gedit][11] + +Now look at the error message again and see which lines it complains about. Go to one of those lines and add the # before it or delete the line altogether. + +![Remove duplicate entry from sources list][12] + +Save the file and close the editor. That’s it. + +### Did it help you? + +I don’t know if I made things more complicated. I wanted to explain things in detail so that beginners specially could fix the issue without messing up with their system. + +Do let me know if it worked for you or not. If you still have questions, feel free to ask in the comment section. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/fixing-target-packages-configured-multiple-times/ + +作者:[Abhishek Prakash][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/update-ubuntu/ +[2]: https://itsfoss.com/package-manager/ +[3]: https://itsfoss.com/debian-vs-ubuntu/ +[4]: https://itsfoss.com/adding-external-repositories-ubuntu/ +[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/apt-sources-list.png?resize=800%2C418&ssl=1 +[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/software-and-updates.webp?resize=800%2C166&ssl=1 +[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/remove-duplicate-repositories-ubuntu.png?resize=800%2C403&ssl=1 +[8]: https://itsfoss.com/basic-terminal-tips-ubuntu/ +[9]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/disable-repository-ubuntu.png?resize=800%2C363&ssl=1 +[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/duplicate-entries-in-sources-list.png?resize=800%2C306&ssl=1 +[11]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/gedit-show-line-numbers.webp?resize=800%2C573&ssl=1 +[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/remove-duplicate-entry-from-sources-list.png?resize=800%2C427&ssl=1 From 0f745e64ecc35fa33c3cee23c41080c193847019 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 18 Dec 2021 05:02:41 +0800 Subject: [PATCH 215/244] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211217=20?= =?UTF-8?q?Write=20your=20screenplay=20on=20Linux=20in=20Fountain=20markdo?= =?UTF-8?q?wn?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211217 Write your screenplay on Linux in Fountain markdown.md --- ...creenplay on Linux in Fountain markdown.md | 159 ++++++++++++++++++ 1 file changed, 159 insertions(+) create mode 100644 sources/tech/20211217 Write your screenplay on Linux in Fountain markdown.md diff --git a/sources/tech/20211217 Write your screenplay on Linux in Fountain markdown.md b/sources/tech/20211217 Write your screenplay on Linux in Fountain markdown.md new file mode 100644 index 0000000000..40424efc9a --- /dev/null +++ b/sources/tech/20211217 Write your screenplay on Linux in Fountain markdown.md @@ -0,0 +1,159 @@ +[#]: subject: "Write your screenplay on Linux in Fountain markdown" +[#]: via: "https://opensource.com/article/21/12/linux-fountain" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Write your screenplay on Linux in Fountain markdown +====== +The Fountain markdown technique requires just a plain text editor, like +Atom, Kate, Gedit, or similar, and it exports to a properly formatted +HTML or PDF screenplay. +![Typewriter in the grass][1] + +A screenplay is the blueprint for a movie, and it used to be written on a typewriter. You bought the typewriter, and you could write a screenplay. And not just one screenplay, but lots of them. You could write screenplays until typewriters fell out of fashion. + +The puzzling thing is, though, that as technology for writing became "better," the harder it got to write screenplays. There are strict formatting rules in the screenplay world implemented to help the Assistant Director (AD) on a film shoot estimate how long each scene would take to shoot. You'd think that a computer would make this easier than the exclusively manual process required on a typewriter. Yet, popular computers managed to restrict writers with expensive software that became embedded in Hollywood culture. If you didn't have the right software, you were told that you could never be a serious screenwriter. + +All that changed with open source software, though, and one of the simplest methods of writing screenplays is not to use special software at all. The [Fountain][2] markdown technique requires just a plain text editor, like [Atom][3], [Kate][4], [Gedit][5], or similar, and it exports to a properly formatted HTML or PDF screenplay. + +### Install Fountain + +Fountain doesn't require installation because it's not software; it's a set of rules you use as you write. You already follow rules when writing: you capitalize the first letter of a sentence, end each sentence with a full-stop, and so on. When you write in Fountain, you add a few new rules specific to screenplays. + +### Slugs + +In a screenplay, each scene is delimited by a line written in capital letters, starting with either INT. or EXT., a location, a dash, and the time of day. These instructions are referred to as _slugs_. Conveniently, that's also the rule in Fountain, so there's nothing new to remember to create a slug. + + +``` +`EXT. CASTLE COURTYARD - DAY` +``` + +### Action + +When an actor is required to perform a specific action, a screenplay contains action text. This is normal prose, written exactly as you'd write text in a book. All normal rules apply, so nothing new to remember for action text. + + +``` + + +A wizard wanders out of a great stone door. She approaches the center of the courtyard and pauses. Something's caught her eye. + +It's a book. She leans down and picks it up. + +``` + +### Dialog + +Screenplays format dialog indented from both left and right margins. To a casual viewer, it might appear centered, but it's actually left-justified. It's formatted this way to help actors locate their lines and to force the screenplay to take up more space for spoken dialog because, in movies, that's often what occupies much of the running time. + +In Fountain, the rule for dialog is to write the name of the character who's speaking in capital letters. On the next line, write the dialog normally. + + +``` + + +WIZARD + +I can sense your power. Grep? Sed? What strange terms! + +``` + +When you export your screenplay, the dialog gets adjusted with the appropriate formatting. + +### Transitions + +It's somewhat fallen out of favor now, but traditionally, there were indications of special transitions in screenplays because, long ago, some transitions cost a lot of money. You still see transitions in screenplays today, but it's often meant more as a sort of punctuation mark for a group of scenes (or, in the case of the classic FADE OUT., the whole movie) rather than an actual instruction for the editor. + +To create a transition in Fountain, prefix your text with the greater-than symbol (>). + + +``` + + +>ANGLE ON: + +The book's title page. It reads "Introduction to Linux." + +>FADE OUT. + +``` + +### More rules + +You can use many other markdown conventions in your screenplays, such as asterisks to italicize, embolden, and underline text. And there are yet more rules in Fountain for edge cases and stylistic exceptions, but these four rules are all you need most of the time. + +The simplicity of Fountain, though, demonstrates how well designed the screenplay format was a hundred years ago. It had a standard structure that made it easy for human eyes to parse, and such predictability translates well for computer parsing, as well. + +### Exporting and rendering + +Once you're done writing, you can export your screenplay to its proper format using a rendering application. There are [several renderers available][6], but one of my favorites is the Atom editor. To configure Atom to display Fountain previews files in the appropriate format, and to export them to PDF when you're done, go to the **Edit** menu, select **Preferences**, and click the **Install** link in the left panel. In the search field, type **fountain** and install the Fountain plugin released by developer _superlou_. + +![Install a Fountain plugin for Atom][7] + +(Seth Kenlon, CC BY-SA 4.0) + +You're prompted to agree to install some of its dependencies as it installs. Once everything's installed, you can go to the **Packages** menu, select **Fountain**, and either view a preview of your screenplay or export a PDF version. + +There's a **fountain-mode** for Emacs, too, which has the added convenience of performing some basic formatting as you type. + +![Fountain-mode in Emacs][8] + +(Seth Kenlon, CC BY-SA 4.0) + +Regardless of what text editor you use, you can always render your screenplay using dedicated applications. There's a Python module called Screenplain that works well for me. To install it, type this into a terminal: + + +``` +`$ python3 -m pip install 'screenplain[PDF]' --user` +``` + +To render a screenplay to PDF: + + +``` +`$ screenplain --format pdf myscreenplay.fountain > script.pdf` +``` + +![A rendered Fountain file][9] + +(Seth Kenlon, CC BY-SA 4.0) + +### Screenplays with open source + +Fountain is about convenience. You can write your screenplay without the complexity of a special application. + +Fountain is about budget. You can write your screenplay without costly software. + +Fountain is about flexibility. You can create in the application you already use for writing. + +And Fountain is about preservation. You won't lose access to your work because an application goes out of style, or out of business, or because you can't afford it. + +There are many great reasons to use Fountain, but the most important one is that it helps you focus on creativity. If you've got a movie in mind, write it in Fountain. It's the first step to what could be a very exciting journey. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/linux-fountain + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/doc-dish-lead.png?itok=h3fCkVmU (Typewriter in the grass) +[2]: http://fountain.io +[3]: https://opensource.com/article/20/12/atom +[4]: https://opensource.com/article/20/12/kate-text-editor +[5]: https://opensource.com/article/20/12/gedit +[6]: https://fountain.io/apps +[7]: https://opensource.com/sites/default/files/fountain-atom.jpg (Install a Fountain plugin for Atom) +[8]: https://opensource.com/sites/default/files/fountain-emacs_0.jpg (Fountain-mode in Emacs) +[9]: https://opensource.com/sites/default/files/fountain-render.jpg (A rendered Fountain file) From b1e5519fa7f8749049f31c9f23e1b2e5661c8132 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 18 Dec 2021 05:02:51 +0800 Subject: [PATCH 216/244] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211217=20?= =?UTF-8?q?Manage=20your=20APC=20battery=20backup=20system=20with=20this?= =?UTF-8?q?=20Linux=20command?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211217 Manage your APC battery backup system with this Linux command.md --- ...y backup system with this Linux command.md | 240 ++++++++++++++++++ 1 file changed, 240 insertions(+) create mode 100644 sources/tech/20211217 Manage your APC battery backup system with this Linux command.md diff --git a/sources/tech/20211217 Manage your APC battery backup system with this Linux command.md b/sources/tech/20211217 Manage your APC battery backup system with this Linux command.md new file mode 100644 index 0000000000..ef8466e453 --- /dev/null +++ b/sources/tech/20211217 Manage your APC battery backup system with this Linux command.md @@ -0,0 +1,240 @@ +[#]: subject: "Manage your APC battery backup system with this Linux command" +[#]: via: "https://opensource.com/article/21/12/linux-apcupsd" +[#]: author: "David Both https://opensource.com/users/dboth" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Manage your APC battery backup system with this Linux command +====== +Protect yourself from power incidents by running a simple utility: +apcupsd. +![Light bulb][1] + +Back in the early days of personal computers, I wrote the IBM training course for the original IBM PC. To complete the course in time for the IBM, ComputerLand, and Sears training, IBM gave me a PC to take home so I could work over evenings and weekends—arguably the first instance of anyone having an IBM PC in their home. + +I did this work in Boca Raton, Florida, where the small, local power company was commonly known as "Florida Flicker and Flash," with good reason. The short but frequent power outages caused me to lose my work more than once. Unfortunately, there were no Uninterruptible Power Supply (UPS) systems to keep my PC up and running through these annoying and sometimes destructive incidents. + +A UPS keeps a computer running long enough to last through minor power events, such as outages and surges of a few seconds up to as much as 20 or 30 minutes. In the case of these longer outages, the function of the modern UPS is to notify the computer to power down before the UPS runs out of battery power. Otherwise, the sudden loss of power can lead to loss of data. + +The computer and UPS communicate through a serial or USB cable. A system service manages the communications and sends appropriate commands to both the UPS and the computer. Windows computers generally use a free version of the software provided by the UPS vendor. However, the apcupsd utility supports Linux, Windows, BSD, Solaris, and macOS, providing consistency across operating systems. + +This set of tools supports APC UPS systems and provides varying degrees of support for UPS systems produced by Tripp-Lite, CyberPower, and others. I currently have UPS systems from all three of these manufacturers running on networks for which I have responsibility. I have not found a list of supported UPS systems. Nor is the [apcupsd documentation][2] helpful on this, and I have seen nothing definitive in any web searches. + +Be aware that the "APC" portion of the names of these tools indicates that they were designed for APC UPS systems. Their efficacy on other UPS vendors' systems depends on how closely they follow the APC management interface. + +### Install apcupsd on Linux + +Because it is available from the Fedora repository, installation of apcupsd is simple. Issue the following command as root to install apcupsd: + +`# dnf -y install apcupsd` + +The following commands start and enable apcupsd so that it will restart after reboots. + +`# systemctl start apcupsd ; systemctl enable apcupsd` + +Other distributions also have apcupsd in their repositories. + +### Basic usage + +At this point, the apcupsd daemon has been started, so you can interact with it using the `apcaccess` command. This command without any options generates a status report describing the current state of the UPS. + + +``` + + +[root@test ~]# apcaccess +APC      : 001,033,0831 +DATE     : 2021-11-30 21:08:10 -0500   +HOSTNAME : test.both.org +VERSION  : 3.14.14 (31 May 2016) redhat +UPSNAME  : test.both.org +CABLE    : USB Cable +DRIVER   : USB UPS Driver +UPSMODE  : Stand Alone +STARTTIME: 2021-11-27 13:08:58 -0500   +MODEL    : CP1500PFCLCDa +STATUS   : ONLINE +LINEV    : 120.0 Volts +LOADPCT  : 32.0 Percent +BCHARGE  : 100.0 Percent +TIMELEFT : 22.5 Minutes +MBATTCHG : 5 Percent +MINTIMEL : 3 Minutes +MAXTIME  : 0 Seconds +OUTPUTV  : 120.0 Volts +DWAKE    : -1 Seconds +LOTRANS  : 100.0 Volts +HITRANS  : 139.0 Volts +ALARMDEL : 30 Seconds +NUMXFERS : 2 +XONBATT  : 2021-11-30 13:46:03 -0500   +TONBATT  : 0 Seconds +CUMONBATT: 5 Seconds +XOFFBATT : 2021-11-30 13:46:06 -0500   +SELFTEST : NO +STATFLAG : 0x05000008 +SERIALNO : CXXLT2001977 +NOMINV   : 120 Volts +NOMPOWER : 1000 Watts +END APC  : 2021-11-30 21:08:17 -0500   +[root@test ~]# + +``` + +In the output above, there are three fields of particular interest for managing battery backup. The load percentage (LOADPCT) indicates how much load is being placed on the UPS. When the unit is plugged in and power is applied, the battery charge (BCHARGE) should be 100%, but it will be lower when external power is removed. The TIMELEFT is the field of most concern. In this example, if power fails, the UPS can run at the current load for 22.5 minutes. + +Other items to look at include the CUMONBATT line, which is the cumulative time the UPS has been running on battery. This field accumulates all of the power outage times over multiple events. The TONBATT line is the time for a current ongoing power loss event. + +The man page for apcaccess describes the rest of the data items in this output. The displayed data can differ according to the UPS model. + +### Managing the UPS + +In the output from the `apcaccess` command above, the SELFTEST line says `NO`. This response means that a self-test has not been performed on this UPS since acpupsd was last started. Usually, that would be the time of the last system boot. Self-tests are performed once every seven days on most UPS systems, but you can initiate one using the `apctest` command. + +Unfortunately, the `apctest` command conflicts with the apcupsd daemon, so you need to stop apcupsd temporarily. Then you can launch apctest, which uses a menu-based interface. + + +``` + + +[root@myserver ~]# systemctl stop apcupsd +[root@myserver ~]# apctest + +2021-12-01 06:36:47 apctest 3.14.14 (31 May 2016) redhat +Checking configuration ... +sharenet.type = Network & ShareUPS Disabled +cable.type = USB Cable +mode.type = USB UPS Driver +Setting up the port ... +Doing prep_device() ... + +You are using a USB cable type, so I'm entering USB test mode. +Hello, this is the apcupsd Cable Test program. +This part of apctest is for testing USB UPSes. + +Getting UPS capabilities...SUCCESS + +Please select the function you want to perform. + +1)  Test kill UPS power +2)  Perform self-test +3)  Read last self-test result +4)  View/Change battery date +5)  View manufacturing date +6)  View/Change alarm behavior +7)  View/Change sensitivity +8)  View/Change low transfer voltage +9)  View/Change high transfer voltage +10) Perform battery calibration +11) Test alarm +12) View/Change self-test interval +Q) Quit + +Select function number: + +``` + +_**Warning:**_ be careful not to accidentally choose item 1 because that will turn off the UPS and, therefore, the computer. + +Enter 2 and press Enter to run a UPS self-test. Note that the menu is displayed again before the self-test has had enough time to complete, so the result is `IN PROGRESS`. This result is from the CyberPower UPS. The program waited for the self-test to complete on an APC UPS before returning to the menu. + + +``` + + +<snip> +Select function number: 2 + +This test instructs the UPS to perform a self-test +operation and reports the result when the test completes. + +Clearing previous self test result...CLEARED +Initiating self test...INITIATED +Waiting for test to complete...COMPLETED +Result of last self test: IN PROGRESS + +1)  Test kill UPS power +2)  Perform self-test +3)  Read last self-test result +4)  View/Change battery date +5)  View manufacturing date +6)  View/Change alarm behavior +7)  View/Change sensitivity +8)  View/Change low transfer voltage +9)  View/Change high transfer voltage +10) Perform battery calibration +11) Test alarm +12) View/Change self-test interval + Q) Quit + +``` + +The UPS beeps to indicate that the self-test has finished. The specific beep pattern may differ depending upon the UPS vendor and model. My CyberPower CP1500PFCLCDa gives two short beeps. The alarm will not sound if it has been manually silenced. + +After the self-test has completed, use menu item 3 to read the result. In this case, my UPS has passed the self-test. + + +``` + + +Select function number: 3 + +Result of last self test: PASSED + +1)  Test kill UPS power +2)  Perform self-test +3)  Read last self-test result +4)  View/Change battery date +5)  View manufacturing date +6)  View/Change alarm behavior +7)  View/Change sensitivity +8)  View/Change low transfer voltage +9)  View/Change high transfer voltage +10) Perform battery calibration +11) Test alarm +12) View/Change self-test interval + Q) Quit + +Select function number: + +``` + +Most of these other menu options do not work on my CyberPower devices, but they do work on APC UPS devices, as expected. + +Battery calibration can be used on supported UPS systems if the UPS's estimate of the remaining run time is incorrect. This option disconnects the UPS from main power and runs the computer on battery until it drains to about 10% of its maximum charge. This method enables a more accurate estimate of on-battery run time. + +Be sure to restart apcupsd after exiting from the apctest menu. + +### Final thoughts + +The apcupsd suite of programs provides easy tools to monitor and manage APC UPS systems, and it works with other vendors' UPS systems to varying degrees. It provides intelligent power incident protection and a managed shutdown if an outage lasts to the edge of the battery charge. + +The apcupsd background daemon works with most modern UPS systems and can initiate a power-off sequence on the computer when the UPS battery gets too low. I have found this to be the case for all three vendors for which I have UPS systems. Other functions, those accessible using the apctest program, are problematic. Some of those functions may work, and some may not. It depends upon the make and model of your UPS system. + +The most important consideration for me is that the apcupsd software can communicate with the UPS enough to initiate a power-off command to the computer when the UPS battery gets low. The second thing I care about is the information available from the `apcaccess` command. The rest is simply nice to have. + +For those who prefer a GUI interface, both CGI web and GUI interfaces are available in the Fedora repository. + +The apcupsd software is mature and stable. Development is limited to fixing bugs. It would be nice to have better support for UPS systems from vendors other than APC. That would require the vendors to cooperate and support the full APC software communications interface. + +Support is available on the project's [SourceForge page][3] via the mailing lists. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/linux-apcupsd + +作者:[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/bulb-light-energy-power-idea.png?itok=zTEEmTZB (Light bulb) +[2]: http://www.apcupsd.com/ +[3]: https://sourceforge.net/projects/apcupsd/ From 9ef54fc2028be6e1d875f76e9b360b4466cdbb9d Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 18 Dec 2021 09:34:33 +0800 Subject: [PATCH 217/244] PUB @geekpi https://linux.cn/article-14091-1.html --- ...al your source code with Jinja2 and Git.md | 35 +++++++++---------- 1 file changed, 16 insertions(+), 19 deletions(-) rename {translated/tech => published}/20211210 Reveal your source code with Jinja2 and Git.md (66%) diff --git a/translated/tech/20211210 Reveal your source code with Jinja2 and Git.md b/published/20211210 Reveal your source code with Jinja2 and Git.md similarity index 66% rename from translated/tech/20211210 Reveal your source code with Jinja2 and Git.md rename to published/20211210 Reveal your source code with Jinja2 and Git.md index 7f89520268..b0e3c850d5 100644 --- a/translated/tech/20211210 Reveal your source code with Jinja2 and Git.md +++ b/published/20211210 Reveal your source code with Jinja2 and Git.md @@ -3,56 +3,53 @@ [#]: author: "Ayush Sharma https://opensource.com/users/ayushsharma" [#]: collector: "lujun9972" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14091-1.html" -用 Jinja2 和 Git 公开你的源码 +用 Jekyll 和 Git 展示你的源码 ====== -这里是我如何通过链接每个页面回到其原始来源来保持我的网站开放的方法, -![Text editor on a browser, in blue][1] + +> 我如何通过链接每个页面回到其原始源代码来保持我的网站开放的方法, + +![](https://img.linux.net.cn/data/attachment/album/202112/18/093318uoud175bj4d55zz5.jpg) 我是一个开源的超级粉丝。 -我支持这项事业的一个小方法是从一开始就保持我的个人博客网站开放。我这样做的部分原因是让人们看到每个页面背后的变化历史。还因为当我开始使用 [Jekyll][2] 时,我没有找到很多开源的 Jekyll 博客可以学习。我希望保持我的网站开放并公开我的尝试和错误会为其他人节省很多时间。 +我支持这项事业的一个小方法是从一开始就保持我的个人博客网站开放。我这样做的部分原因是让人们看到每个页面背后的变化历史。还因为当我开始使用 [Jekyll][2] 时,我没有找到很多开源的 Jekyll 博客可以学习。我希望保持我的网站开放并公开我的尝试和错误,可以为其他人节省很多时间。 ### Jekyll 的 page.path 变量 -我实现这一目标的方法之一是将我发布的每一个条目链接到其原始的 [Markdown][3]。[Jekyll 的有用变量][4]正好有一个需要的工具:`page.path`。这个变量包含每个页面的原始文件系统路径。官方的描述甚至强调了它对链接回源的作用! +我实现这一目标的方法之一是将我发布的每一个条目链接到其原始的 [Markdown][3]。[Jekyll 的变量][4] 中正好有一个需要的工具:`page.path`。这个变量包含每个页面的原始文件系统路径。官方的描述甚至强调了它的作用是链接回源! 在一篇文章的 Markdown 文件中打印 `{{page.path }}`,可以得到类似这样的结果: - ``` -`_posts/2021-10-10-example.md` +_posts/2021-10-10-example.md ``` 假设该文章的源代码存在于这个路径: - ``` -`https://example.com/ayushsharma-in/-/blob/master/_posts/2021-10-10-example.md` +https://example.com/ayushsharma-in/-/blob/master/_posts/2021-10-10-example.md ``` 如果你在任何文章的 `page.path` 前加上 `https://example.com/ayushsharma-in/-/blob/master/`,它就会生成一个返回其源码的链接。 在 Jekyll 中,生成这个完整的链接看起来像这样: - ``` -`View source` +View source ``` 就是这么简单。 -### Jekyll 和开放网络 +### Jekyll 和开放 Web -现代网络是一种错综复杂的多层次技术,但这并不意味着它必须混淆。有了 Jekyll 的变量,你可以确保你的用户可以,如果他们愿意,了解更多关于你是如何建立你的网站的。 +现代 Web 是一种错综复杂的多层次技术,但这并不意味着它必须让人摸不清。有了 Jekyll 的变量,你可以确保你的用户可以,了解更多关于你是如何建立你的网站的,如果他们愿意的话。 你可以在我的[个人博客][5]上看到真实的例子:滚动到底部的查看源码链接。 -* * * - 本文改编自 [ayush sharma 的笔记][6],并经许可转载。 -------------------------------------------------------------------------------- @@ -62,7 +59,7 @@ via: https://opensource.com/article/21/12/reveal-source-code-jinja2-git 作者:[Ayush Sharma][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From e9d5ded7457648a84c87674595500fd0ba9c808c Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 18 Dec 2021 09:37:05 +0800 Subject: [PATCH 218/244] PRF --- .../20211210 Reveal your source code with Jinja2 and Git.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/published/20211210 Reveal your source code with Jinja2 and Git.md b/published/20211210 Reveal your source code with Jinja2 and Git.md index b0e3c850d5..227597e4dd 100644 --- a/published/20211210 Reveal your source code with Jinja2 and Git.md +++ b/published/20211210 Reveal your source code with Jinja2 and Git.md @@ -10,7 +10,7 @@ 用 Jekyll 和 Git 展示你的源码 ====== -> 我如何通过链接每个页面回到其原始源代码来保持我的网站开放的方法, +> 我如何通过链接每个页面回到其原始源代码来保持我的网站开放的方法。 ![](https://img.linux.net.cn/data/attachment/album/202112/18/093318uoud175bj4d55zz5.jpg) From 445ee4b6fcadf1a1d27e220e0a32ad6c2817de82 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 18 Dec 2021 09:38:12 +0800 Subject: [PATCH 219/244] Revert "PRF" This reverts commit e9d5ded7457648a84c87674595500fd0ba9c808c. --- .../20211210 Reveal your source code with Jinja2 and Git.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/published/20211210 Reveal your source code with Jinja2 and Git.md b/published/20211210 Reveal your source code with Jinja2 and Git.md index 227597e4dd..b0e3c850d5 100644 --- a/published/20211210 Reveal your source code with Jinja2 and Git.md +++ b/published/20211210 Reveal your source code with Jinja2 and Git.md @@ -10,7 +10,7 @@ 用 Jekyll 和 Git 展示你的源码 ====== -> 我如何通过链接每个页面回到其原始源代码来保持我的网站开放的方法。 +> 我如何通过链接每个页面回到其原始源代码来保持我的网站开放的方法, ![](https://img.linux.net.cn/data/attachment/album/202112/18/093318uoud175bj4d55zz5.jpg) From 40917d66936d83a5fad60a002744dcc2693804b5 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 18 Dec 2021 09:38:39 +0800 Subject: [PATCH 220/244] PRF --- .../20211210 Reveal your source code with Jinja2 and Git.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/published/20211210 Reveal your source code with Jinja2 and Git.md b/published/20211210 Reveal your source code with Jinja2 and Git.md index b0e3c850d5..febd04603e 100644 --- a/published/20211210 Reveal your source code with Jinja2 and Git.md +++ b/published/20211210 Reveal your source code with Jinja2 and Git.md @@ -10,7 +10,7 @@ 用 Jekyll 和 Git 展示你的源码 ====== -> 我如何通过链接每个页面回到其原始源代码来保持我的网站开放的方法, +> 我是如何通过链接每个页面回到其原始源代码来保持我的网站开放的。 ![](https://img.linux.net.cn/data/attachment/album/202112/18/093318uoud175bj4d55zz5.jpg) From 6d4d7e0e5b0905471ffa38e3f7900ade8682e305 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 18 Dec 2021 10:25:26 +0800 Subject: [PATCH 221/244] PRF&PUB @robsean https://linux.cn/article-14092-1.html --- ...0210603 FreeDOS commands for Linux fans.md | 178 +++++++++++++++++ ...0210603 FreeDOS commands for Linux fans.md | 188 ------------------ 2 files changed, 178 insertions(+), 188 deletions(-) create mode 100644 published/20210603 FreeDOS commands for Linux fans.md delete mode 100644 translated/tech/20210603 FreeDOS commands for Linux fans.md diff --git a/published/20210603 FreeDOS commands for Linux fans.md b/published/20210603 FreeDOS commands for Linux fans.md new file mode 100644 index 0000000000..5c21d79fb3 --- /dev/null +++ b/published/20210603 FreeDOS commands for Linux fans.md @@ -0,0 +1,178 @@ +[#]: subject: (FreeDOS commands for Linux fans) +[#]: via: (https://opensource.com/article/21/6/freedos-linux-users) +[#]: author: (Jim Hall https://opensource.com/users/jim-hall) +[#]: collector: (lujun9972) +[#]: translator: (robsean) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14092-1.html) + +为 Linux 用户准备的 FreeDOS 命令 +====== + +> 如果你已经熟悉了 Linux 命令行,尝试这些命令有助于轻松地进入 FreeDOS 。 + +![](https://img.linux.net.cn/data/attachment/album/202112/18/102331ubkem265eqz6u1mk.jpg) + +如果你已经尝试过 FreeDOS ,你可能已经被命令行所吓倒。DOS 命令可能稍微不同于你所使用的 Linux 命令行,因此,使用它的命令行上需要学习一些新的命令。 + +但是对于 Linux 用户来说,它不是一种 “全新的” 体验。在 FreeDOS 中,除了 DOS 命令之外,我们还包含一些已经熟悉的标准的 Unix 命令。因此,如果你已经熟悉了 Linux 命令行,尝试这些命令有助于轻松地进入 FreeDOS : + +### 在四周走走 + +在 FreeDOS 文件系统中使用 `cd` 命令来 _更改目录_ 。在 FreeDOS 上的用法在 Linux 上的用法基本相同。要更改到一个名称为 `apps` 的子目录,输入 `cd apps` 。要回到先前的目录,输入 `cd ..` 。 + +在 FreeDOS 上导航浏览目录和路径是仅有的不同点,目录分隔符是 `\`(“反斜杠”)而不是你在 Linux 上使用的 `/` (“正斜杠”)。例如,让我们假设你在 `\devel` 目录之中,你想移动到 `\fdos` 目录。这两个目录相对于 _根_ 目录而言是处于相同的 “层次” 之中的。因此,你可以输入 `cd ..\fdos` 来 “向后返回” 一个目录层次(使用 `..`) ,然后再 “转到” `fdos` 目录。 + +要更改到一个新的目录,你可以使用先前提到的反斜杠来替换需要给出的完整的路径。如果你已经深入了另外一个路径之中,并且只是像立即切换到新的位置,那么这会是非常方便的。例如,要更改到 `\temp` 目录,你可以输入 `cd \temp` 。 + +``` +C:\>cd apps +C:\APPS>cd .. +C:\>cd devel +C:\DEVEL>cd ..\fdos +C:\FDOS>cd \temp +C:\TEMP>_ +``` + +在 FreeDOS 中,像大多数的 DOS 系统一样,你可以在DOS 提示符中看到你的当前路径。在 Linux 上,你的提示符可能类似于 `$` 。在 FreeDOS 上,提示符会列出当前的驱动器及其当前的路径,接下来使用 `>` 作为提示符(看做 Linux 上的 `$`)。 + +### 列出和显示文件 + +在 Linux 上,列出当前目录中文件的标准命令是 `ls` 命令。在 FreeDOS ,它是一个不同的命令: `dir` 。但是你可以创建一个 _别名_ 来获取一种与 `ls` 类似的行为。 + +要为另外一个命令创建一个别名,使用内置的 `alias` 命令。例如,使用此命令来为 `ls` 定义一个别名,这个别名将显示一个目录列表,与在 Linux 上使用 `ls` 类似: + +``` +C:\>alias ls=dir /one /w /b /l +C:\>ls +[apps] command.com [devel] fdauto.bat fdconfig.sys +[fdos] kernel.sys [src] [temp] +C:\> +``` + +在 FreeDOS 上的命令选项格式与 Linux 稍微不同。在 Linux 上, 你使用一个连字符号(`-`)表示选项。但是在 FreeDOS 上,你使用一个正斜杠来表示选项。上面的 `alias` 命令使用斜杆杠字符 — 它们是 `dir` 的选项。`/one` 可选择项告诉 `dir` 以某种方式排序(`o`):先按名称(`n`)再按扩展名(`e`)来排序一些文件和目录。`/w` 使用一个 “宽” 目录列表,`/b` 使用一种不带有 `dir` 通常提供的其它信息的 “裸” 显示,`/l` 指示 `dir` 以小写字母的形式显示文件和目录。 + +注意,针对于 FreeDOS 的 `dir` 命令的命令行选项与针对于 Linux 的 `ls` 命令的命令行选项截然不同,因此,你不能像你在 Linux 上一样精确地使用这个 `ls` 别名。例如,在 FreeDOS 上使用此别名输入 `ls -l` 将产生一条 “文件未找到” 的错误,因为底层的 FreeDOS 的 `dir` 命令不能找到一个名称为 `-l` 的文件。不过,对于基本的 “查看在我的系统上有哪些文件” 来说,这个 `ls` 别名已经足够帮助 Linux 用户开始使用 FreeDOS 了。 + +类似地,你可以为 FreeDOS 的 `type` 命令创建一个别名,来像 Linux 的 `cat` 命令一样工作。两个重新都会显示一个文本文件的内容。虽然 `type` 不支持你可能在 Linux 下使用的命令行选项,但是显示一单个文件的基本用法是相同的。 + +``` +C:\FDOS>alias cat=type +C:\FDOS>cat version.fdi +PLATFORM=FreeDOS +VERSION=1.3-RC4 +RELEASE=2021-04-30 +C:\FDOS> +``` + +### 其它的类 Unix 命令 + +FreeDOS 包含一些精选的其它常见的类 Unix 命令,因此 Linux 用户将不会感觉到拘束。为在 FreeDOS 上使用这些 Linux 命令,你可能需要从 “FreeDOS Installer” - “My Package List Editor Software (FDIMPLES)” 软件包管理器来安装 “Unix Like Tools” 软件包。 + +![Installing the Unix-like package set][2] + +(Jim Hall, CC-BY SA 4.0) + +并不是所有的类 Unix 实用程序都能像在 Linux 上对应的实用程序一样 _一致地_ 工作。这就是我们称其为 _类 Unix_ 的原因。如果你将要使用一些深层次的命令行选项,你可能需要检查其兼容性,不过,对于典型的用法是没有问题的。开始在 FreeDOS 上使用这些类 Unix 命令: + +`cal` 命令是标准的 Unix 的日历程序。例如,为显示当前月份的日历,只需要输入 `cal` 。为查看一个具体指定的月份,将月份和年份作为参数予以给定: + +``` +C:\>cal 6 1994 + + June 1994 +Su Mo Tu We Th Fr Sa + 1 2 3 4 + 5 6 7 8 9 10 11 +12 13 14 15 16 17 18 +19 20 21 22 23 24 25 +26 27 28 29 30 +``` + +使用 `du` 命令来查看你的磁盘使用情况。这是 Linux 的 `du` 命令的简单版本,并且不支持路径以外的任何命令行选项。 + +``` +C:\>du -s apps +usage: du (start path) +C:\>du apps + 158784 C:\APPS\FED + 0 C:\APPS +Total from C:\APPS is 158784 +C:\> +``` + +`head` 命令显示一个文件的前几行。例如,这是一种确定一个文件是否包含正确数据的简单方法。 + +``` +C:>head fdauto.bat +@ECHO OFF +set DOSDIR=C"\FDOS +set LANG=EN +set TZ=UTC +set PATH=%dosdir%\BIN +if exist %dosdir%\LINKS\NUL set PATH=%path%;%dosdir%\LINKS +set NLSPATH=%dosdir%\NLS +set HELPPATH=%dosdir%\HELP +set TEMP=%dosdir%\TEMP +set TMP=%TEMP% +C:\> +``` + +要查看一个完整的文件,使用 `more` 命令,在 FreeDOS 上的默认文件查看器。这将一次显示一屏的文件,然后在显示下一屏的信息前,打印一个按下一次按键的提示。`more` 命令是一个非常简单的文件查看器;在 Linux 上你可能已经使用过一个功能更全面的查看器,可以尝试一下 `less` 命令。`less` 命令提供 “向后” 滚动一个文件的能力,以防你错过一些东西。你还可以搜索具体指定的文本。 + +``` +C:\>less fdauto.bat +@ECHO OFF +set DOSDIR=C"\FDOS +set LANG=EN +set TZ=UTC +set PATH=%dosdir%\BIN +if exist %dosdir%\LINKS\NUL set PATH=%path%;%dosdir%\LINKS +set NLSPATH=%dosdir%\NLS +set HELPPATH=%dosdir%\HELP +set TEMP=%dosdir%\TEMP +set TMP=%TEMP% +[...] +``` + +如果在你的程序路径变量(`PATH`)中有很多的目录,并且不确定某个程序是从哪里运行的,你可以使用 `which` 命令。这个命令将扫描程序路径变量,并且将打印出你正在查找的程序的完整的位置。 + +``` +C:\>which less +less C:\>FDOS\BIN\LESS.EXE +C:\>_ +``` + +FreeDOS 1.3 RC4 包含其它的类 Unix 命令,你可能会在其它更特殊的情况下使用。这些命令包括: + + * `bc`:任意精度数字处理语言 + * `sed`:流编辑器 + * `grep` 和 `xgrep`:使用正则表达式搜索一个文本文件 + * `md5sum`:生成一个文件的一个 MD5 签名 + * `nro`:简单排版,使用 nroff 宏 + * `sleep`:暂停系统几秒钟 + * `tee`:保存一个命令行流的副本 + * `touch`:修改一个文件的时间戳 + * `trch`:转换单个字符(像 Linux 的 `tr` 一样) + * `uptime`:报告你 FreeDOS 系统已经运行多长的时间 + +### 在你控制下的 FreeDOS + +FreeDOS ,像 Linux 和 BSD 一样,是开源的。不管你是想通过学习一种新的命令行交互方式来挑战你自己,还是想再去熟悉令人舒适的类 Unix 工具,FreeDOS 都是一款有趣的值得尝鲜的操作系统。尝试一下! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/6/freedos-linux-users + +作者:[Jim Hall][a] +选题:[lujun9972][b] +译者:[robsean](https://github.com/robsean) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jim-hall +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/freedos-fish-laptop-color.png?itok=vfv_Lpph (FreeDOS fish logo and command prompt on computer) +[2]: https://opensource.com/sites/default/files/uploads/unix-like.png (Installing the Unix-like package set) diff --git a/translated/tech/20210603 FreeDOS commands for Linux fans.md b/translated/tech/20210603 FreeDOS commands for Linux fans.md deleted file mode 100644 index 025ab91f15..0000000000 --- a/translated/tech/20210603 FreeDOS commands for Linux fans.md +++ /dev/null @@ -1,188 +0,0 @@ -[#]: subject: (FreeDOS commands for Linux fans) -[#]: via: (https://opensource.com/article/21/6/freedos-linux-users) -[#]: author: (Jim Hall https://opensource.com/users/jim-hall) -[#]: collector: (lujun9972) -[#]: translator: (robsean) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -为 Linux 粉丝准备的 FreeDOS 命令 -====== -如果你已经熟悉了 Linux 命令行,尝试这些命令有助于轻松地进入 FreeDOS 。 -![FreeDOS fish logo and command prompt on computer][1] - -如果你已经尝试过 FreeDOS ,你可能已经被命令行所吓倒。DOS 命令可能稍微不同于你所使用的 Linux 命令行,因此,在命令行上四周走走需要学习一些新的命令。 - -但是对于 Linux 用户来说,它不是一种 "全新的" 体验。在 FreeDOS 中,除了已经类似于 Linux 命令行的DOS 命令之外,我们还包含一些标准的 Unix 命令。因此,如果你已经熟悉了 Linux 命令行,尝试这些命令有助于轻松地进入 FreeDOS : - -### 在四周走走 - -在 FreeDOS 文件系统中使用 `cd` 命令来 _更改目录_ 。在 FreeDOS 上的用法在 Linux 上的用法基本相同。为更改到一个名称为  `apps` 的子目录,输入 `cd apps` 。为回到先前的目录,输入 `cd ..` 。 - -在 FreeDOS 上导航浏览目录和路径是仅有不同点,目录分隔符是 `\` ("反斜杠") 而不是你在 linux 上使用的 `/` ("正斜杠") 。例如,让我们假设你在 `\devel` 目录之中,你想移动到 `\fdos` 目录。这两个目录相对于 _根_ 目录而言是处于相同的 "层次" 之中的。因此,你可以输入 `cd ..\fdos` 来 "向后返回" 一个目录层次 (使用 `..`) ,然后再 "转到" `fdos` 目录。 - -为更改到一个新的目录,你可以使用先前提到的反斜杠来替换需要给出的完整的路径。如果你已经深入了另外一个路径之中,并且只是像立即切换到新的位置,那么这会是非常方便的。例如,为更改到 `\temp` 目录,你可以输入 `cd \temp` 。 -  - - -``` -C:\>cd apps -C:\APPS>cd .. -C:\>cd devel -C:\DEVEL>cd ..\fdos -C:\FDOS>cd \temp -C:\TEMP>_ -``` - -在 FreeDOS 中,像大多数的 DOS 系统一样,你可以在DOS 提示符中看到你的当前路径。在 Linux 上,你的提示符可能类似于 `$` 。在 FreeDOS 上,提示符会列出当前的驱动器及其当前的路径,接下来使用 `>` 作为提示符 (在 Linux 上使用 `$` ) 。 - -### 列出和显示文件 - -在 Linux 上,列出当前目录中文件的标准命令是 `ls` 命令。在 FreeDOS ,它是一个不同的命令: `dir` 。但是你可以创建一个 _别名_ 来获取一种与 `ls` 类似的行为。 - -要为另外一个命令创建一个别名,使用内置的 `alias` 命令。例如,使用此命令来为 `ls` 定义一个别名,这个别名将显示一个目录列表,与在 Linux 上使用 `ls`类似: -  - - -``` -C:\>alias ls=dir /one /w /b /l -C:\>ls -[apps]    command.com   [devel]  fdauto.bat   fdconfig.sys -[fdos]    kernel.sys    [src]    [temp] -C:\> -``` - -在 FreeDOS 上的命令选项格式与 Linux 稍微不同。在 Linux 上, 你使用一个连字符号 (`-`) 开始可选择项。但是在 FreeDOS 上,你使用一个正斜杠来开始可选择项。上面的 `alias` 命令使用斜杆字符—它们是 `dir` 的可选择项。`/one` 可选择项告诉 `dir` 以某种方式排序 (o):先按名称 (n) 再按扩展名 (e) 来排序一些文件和目录。`/w` 使用一个 "宽" 目录列表,`/b` 使用一种不带有 `dir` 通常提供的其它信息的 "裸" 显示,`/l` 指示 `dir` 以小写字母的形式显示文件和目录。 - -注意,针对于 FreeDOS 的 `dir` 命令的命令行选项与针对于 Linux 的 `ls` 命令的命令行选项截然不同,因此,你不能像你在 Linux 上一样精确地使用这个 `ls` 别名。例如,在 FreeDOS 上使用此别名输入 `ls -l` 将产生一条 "文件未找到" 的错误,因为底层的 FreeDOS 的 `dir` 命令将不能找到一个名称为 `-l` 的文件。不过,对于基本的 "查看在我的系统上有哪些文件" 来说,这个 `ls` 别名已经足够帮助 Linux 用户开始使用 FreeDOS 了。 - -类似地,你可以为 FreeDOS 的 `type` 命令创建一个别名,来像 Linux 的 `cat` 命令一样工作。两个重新都会显示一个文本文件的内容。虽然 `type` 不支持你可能在 Linux 下使用的命令行选项,但是显示一单个文件的基本用法是相同的。 - - -``` -C:\FDOS>alias cat=type -C:\FDOS>cat version.fdi -PLATFORM=FreeDOS -VERSION=1.3-RC4 -RELEASE=2021-04-30 -C:\FDOS> -``` - -### 其它的类 Unix 命令 - -FreeDOS 包含一些精选的其它常见的类 Unix 命令,因此 Linux 用户将不会感觉到拘束。为在 FreeDOS 上使用这些 Linux 命令,你可能需要从 **FreeDOS 安装程序 - 我的软件包列表编辑器软件** (FDIMPLES) 软件包管理器来安装 **Unix 类工具** 软件包。 - -![Installing the Unix-like package set][2] - -Jim Hall, CC-BY SA 4.0 - -并不是所有的类 Unix 实用程序都能像在 Linux 上对应的实用程序一样 _准确地_ 工作。这就是我们称其为 _类 Unix_ 的原因。如果你将要使用一些深层次的命令行选项,你可能需要检查其兼容性,不过,对于典型的用法是没有问题的。开始在 FreeDOS 上使用这些类 Unix 命令: - -`cal` 命令是标准的 Unix 的日历程序。例如,为显示当前月份的日历,只需要输入 `cal` 。为查看一个具体指定的月份,将月份和年份作为参数予以给定: - - -``` -C:\>cal 6 1994 - -      June 1994     -Su Mo Tu We Th Fr Sa -          1  2  3  4 - 5  6  7  8  9 10 11 -12 13 14 15 16 17 18 -19 20 21 22 23 24 25 -26 27 28 29 30       -``` - -使用 `du` 命令来查看你的磁盘使用情况。这是 Linux 的 _disk usage_ 命令的简单版本,并且不支持路径以外的任何命令行选项。 - - -``` -C:\>du -s apps -usage: du (start path) -C:\>du apps -    158784 C:\APPS\FED -         0 C:\APPS -Total from C:\APPS is 158784 -C:\> -``` - -`head` 命令显示一个文件的前几行。例如,这是一种确定一个文件是否包含正确数据的简单方法。 - - -``` -C:>head fdauto.bat -@ECHO OFF -set DOSDIR=C"\FDOS -set LANG=EN -set TZ=UTC -set PATH=%dosdir%\BIN -if exist %dosdir%\LINKS\NUL set PATH=%path%;%dosdir%\LINKS -set NLSPATH=%dosdir%\NLS -set HELPPATH=%dosdir%\HELP -set TEMP=%dosdir%\TEMP -set TMP=%TEMP% -C:\> -``` - -为查看一个完整的文件,使用 `more` 命令,在 FreeDOS 上的默认文件查看器。这将一次显示一幕的文件,然后在显示下一屏的信息前,打印一个按下一次按键的提示。`more` 命令是一个非常简单的文件查看器;在 Linux 上你可能已经使用过一个功能更全面的查看器,尝试 `less` 命令。`less` 命令提供 "向后" 滚动一个文件的能力,以防你错过一些东西。你还可以搜索具体指定的文本。 - - -``` -C:\>less fdauto.bat -@ECHO OFF -set DOSDIR=C"\FDOS -set LANG=EN -set TZ=UTC -set PATH=%dosdir%\BIN -if exist %dosdir%\LINKS\NUL set PATH=%path%;%dosdir%\LINKS -set NLSPATH=%dosdir%\NLS -set HELPPATH=%dosdir%\HELP -set TEMP=%dosdir%\TEMP -set TMP=%TEMP% -[...] -``` - -如果在你的程序路径变量 (`PATH`) 中有很多的目录,并且不确定某个程序是从哪里运行的,你可以使用 `which` 命令。这个命令将扫描程序路径变量,并且将打印出你正在查找的程序的完整的位置。 - - -``` -C:\>which less -less    C:\>FDOS\BIN\LESS.EXE -C:\>_ -``` - -FreeDOS 1.3 RC4 包含其它的类 Unix 命令,你可能会在其它更特殊的情况下使用。这些命令包括:  - - * **bc**: 任意精度数字处理语言 - * **sed**: 流编辑器 - * **grep** 和 **xgrep**:使用正则表达式搜索一个文本文件 - * **md5sum**: 生成一个文件的一个 MD5 签名 - * **nro**: 简单排版,使用 nroff 宏 - * **sleep**: 暂停系统几秒钟 - * **tee**: 保存一个命令行流的副本 - * **touch**: 修改一个文件的时间戳 - * **trch**: 转换单个字符 (像 Linux 的 tr 一样) - * **uptime**: 报告你 FreeDOS 系统已经运行多长的时间 - - - -### 在你控制下的 FreeDOS - -FreeDOS ,像 Linux 和 BSD 一样,是开放源文件的。不管你是想通过学习一种新的命令行交互方式来挑战你自己,还是想再去熟悉令人舒适的类 Unix 工具,FreeDOS 都是一款有趣的值得尝鲜的操作系统。尝试一下! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/6/freedos-linux-users - -作者:[Jim Hall][a] -选题:[lujun9972][b] -译者:[robsean](https://github.com/robsean) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/jim-hall -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/freedos-fish-laptop-color.png?itok=vfv_Lpph (FreeDOS fish logo and command prompt on computer) -[2]: https://opensource.com/sites/default/files/uploads/unix-like.png (Installing the Unix-like package set) From 1a0d190b69fd86272ee06aeeb1739f2938a68e17 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 18 Dec 2021 15:53:32 +0800 Subject: [PATCH 222/244] PRF&PUB @MjSeven https://linux.cn/article-14093-1.html --- published/20211212 What is TTY in Linux.md | 142 +++++++++++++++++ .../tech/20211212 What is TTY in Linux.md | 145 ------------------ 2 files changed, 142 insertions(+), 145 deletions(-) create mode 100644 published/20211212 What is TTY in Linux.md delete mode 100644 translated/tech/20211212 What is TTY in Linux.md diff --git a/published/20211212 What is TTY in Linux.md b/published/20211212 What is TTY in Linux.md new file mode 100644 index 0000000000..eaab8f356e --- /dev/null +++ b/published/20211212 What is TTY in Linux.md @@ -0,0 +1,142 @@ +[#]: subject: "What is TTY in Linux?" +[#]: via: "https://itsfoss.com/what-is-tty-in-linux/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "MjSeven" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14093-1.html" + +Linux 黑话解释:TTY 是什么? +====== + +![](https://img.linux.net.cn/data/attachment/album/202112/18/155143cz6aplfi8i6elmll.jpg) + +谈到 Linux 和 UNIX 时,你一定听说过 “TTY” 这个术语,但是,这玩意是什么? + +作为一个桌面用户,它对你有用吗?你需要它吗?你能用它做什么? + +在本文中,让我向你介绍这些,帮助你熟悉 Linux 中的 TTY。 + +注意:这个问题没有明确的答案,但它与过去的输入/输出设备的交互方式有关。因此,你必须了解一些历史,才能清楚地了解情况。 + +### “TTY” 背后的历史 + +一切始于 19 世纪 30 年代的电传打印机Teleprinter。 + +电传打印机可以让你通过电线发送或接受消息,它取代了摩尔斯电码通信,那是一种需要两个操作员才能有效地相互通信的方式。 + +一台电传打印机只需要一个操作员就可以轻松地传递消息。虽然它没有现代布局的键盘,但它的系统后来由 Donald Murray 在 1901 年进行了改良,包括了一个类似打字机的键盘。 + +Murray 电码减少了操作员发送消息的工作量。这才使得电传打印机在 1908 年有了发展成为商业电传打字机Teletypewriter的可能。TTY 即是电传打字机的缩写。 + +![二战期间在伦敦实际使用的电传打字机 | 图片来源于维基百科][1] + +电传打字机和普通打字机typewriter的区别在于,电传打字机连接到通信设备,直接发送输入的消息。 + +[电传打字机使人类在没有计算机的情况下通过电线进行更快的通信成为可能][2]。 + +从这时起,“TTY” 一词就存在了。 + +### (相对)现代的概念 + +现在,你一定想知道,它是如何进入现代计算机和 Linux 的? + +最初是当电传打字机进入了市场,几年后半导体晶体管发展起来,然后演变成微处理器,为计算机的出现做好了准备。 + +最初的计算机没有键盘的概念,打孔卡Punch card就是输入的方法。 + +![一种插入计算机而不是通过键盘(TTY)输入的打孔卡计算机程序 | 图片来源于维基百科][3] + +随着计算机的发展,批量输入的打孔卡最终被电传打字机取代,成为一种方便的输入/输出设备。 + +![1956 年的 LGP-30 计算机,附带 TTY][4] + +随着技术的进步,电传打字机被电子技术“虚拟化”了。因此,你不需要一个物理的、机械的 TTY,而是一个虚拟的电子 TTY。 + +早期的计算机甚至没有视频屏幕。字符被打印在纸上而不是显示在屏幕上。因此,你会看到“打印print”这个术语而不是“显示display”。随着技术的进步,视频显示后来被添加到终端中。 + +换句话说,你可能听说过把它们称为“视频终端”。或者,你可以称它们为“物理”终端。 + +后来,它们演变成具有更强的能力和功能的软件仿真的终端。 + +这就是所谓的“终端仿真器terminal emulator”,如 GNOME 终端或 Konsole,或者其他 [你在 Linux 上找到的各种终端仿真器][5]。 + +### 所以,Linux 中的 TTY 到底是什么? + +在 Linux 或 UNIX 中,TTY 变为了一个抽象设备。有时它指的是一个物理输入设备,例如串口,有时它指的是一个允许用户和系统交互的虚拟 TTY([参考此处][6])。 + +TTY 是 Linux 或 UNIX 的一个子系统,它通过 TTY 驱动程序在内核级别实现进程管理、行编辑和会话管理。 + +在编程的场景下,你还需要深入研究。但是考虑到本文的范围,这可能是一个容易理解的定义。 + +如果你好奇的话,你可以查看一个有点旧的资源([TTY 揭秘][7]),它尽可能的澄清了 Linux 和 UNIX 系统中的 TTY 的各种技术细节。 + +事实上,每当你在系统中启动一个终端仿真器或使用任何类型的 shell 时,它都会与虚拟 TTY(也被称为伪 TTYpseudo-TTY,即 PTY)进行交互。 + +你可以在终端仿真器中输入 `tty` 来找到相关联的 PTY。 + +### 如何在 Linux 中访问 TTY? + +![][8] + +在 Linux 中很容易访问 TTY。事实上,当我不知道它是什么时,我不小心打开了它,于是对要做什么、如何摆脱它感到恐慌。 + +在大多数 _发行版_ 中,你可以使用以下键盘快捷键来得到 TTY 屏幕: + +- `CTRL + ALT + F1` – 锁屏 +- `CTRL + ALT + F2` – 桌面环境 +- `CTRL + ALT + F3` – TTY3 +- `CTRL + ALT + F4` – TTY4 +- `CTRL + ALT + F5` – TTY5 +- `CTRL + ALT + F6` – TTY6 + +你最多可以访问六个 TTY。但是,前两个快捷方式指向发行版的锁定屏幕和桌面环境。 + +![][9] + +而其他快捷方式将会让你进入一个命令行界面。 + +### 什么时候应该使用 TTY? + +TTY 不仅是一个技术宝藏,即使像我这样不是开发人员的用户,它也很有用。 + +在图形桌面环境冻结的情况下,它应该可以派上用场。在某些情况下,从 TTY 重建桌面环境能帮助解决程序问题。 + +或者,你也可以选择在 TTY 中执行任务,例如更新 Linux 系统等。在这些情况下,你不希望显示问题中断你的进程。 + +最坏的情况是,如果图形用户界面失去响应,你可以进入 TTY 并重新启动计算机。 + +有些用户还喜欢在 TTY 的帮助下传输大文件(我不是其中之一)。 + +### Linux 中的 TTY 命令 + +![][10] + +当你在终端模拟器中输入 `tty` 时,它将打印连接到标准输入的终端文件名,就像手册页描述的一样。 + +换句话说,要知道你连接的 TTY 编号,只需输入 `tty`。并且,如果有多个用户远程连接到 Linux 机器,你可以使用 `who` 命令来检查其他用户连接到的是哪个 TTY。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/what-is-tty-in-linux/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[MjSeven](https://github.com/MjSeven) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/WACsOperateTeletype.jpg?resize=429%2C371&ssl=1 +[2]: https://en.wikipedia.org/wiki/Teletype_Corporation#/media/File:What-is-teletype.jpg +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/punch-card-program.jpg?resize=600%2C274&ssl=1 +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/LGP-30-early-computer-1956.jpg?resize=800%2C600&ssl=1 +[5]: https://itsfoss.com/linux-terminal-emulators/ +[6]: https://unix.stackexchange.com/questions/4126/what-is-the-exact-difference-between-a-terminal-a-shell-a-tty-and-a-con +[7]: https://www.linusakesson.net/programming/tty/index.php +[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/ubuntu-tty.png?resize=800%2C449&ssl=1 +[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/ubuntu-tty4.png?resize=420%2C124&ssl=1 +[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/ubuntu-terminal-tty-command.png?resize=800%2C544&ssl=1 diff --git a/translated/tech/20211212 What is TTY in Linux.md b/translated/tech/20211212 What is TTY in Linux.md deleted file mode 100644 index b511f02a6c..0000000000 --- a/translated/tech/20211212 What is TTY in Linux.md +++ /dev/null @@ -1,145 +0,0 @@ -[#]: subject: "What is TTY in Linux?" -[#]: via: "https://itsfoss.com/what-is-tty-in-linux/" -[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" -[#]: collector: "lujun9972" -[#]: translator: "MjSeven" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Linux 中的 TTY 是什么? -====== - -谈到 Linux 和 UNIX 时,你一定听说过 "TTY" 这个术语,但是,这玩意是什么? - -作为一个桌面用户,它对你有用吗?你需要它吗?你能用它做什么? - -在本文中,让我向你介绍一切,帮助你熟悉 Linux 中的 TTY。 - -注意:这个问题没有明确的答案,但它与过去输入/输出设备的交互方式有关。因此,你必须了解一些历史,才能清楚地了解情况。 - -### "TTY" 背后的历史 - -一切始于 19 世纪 30 年代的电传打字机。 - -电传打字机可以让你通过有线发送或接受短信,它取代了摩尔斯电码通信,一种需要两个操作员才能有效地相互通信的方式。 - -一台电传打字机只需要一个操作员就可以轻松地传递信息。虽然它没有现代布局的键盘,但它的系统后来由 Donald Murray 在 1901 年改良,包括一个类似打字机的键盘。 - -穆雷码减少了操作员发送消息的工作量。这使得电传打字机在 1908 年有可能发展成为商业电传打字机。TTY 是电传打字机的缩写。 - -![二战期间在伦敦使用地实际电传打字机 | 图片来源于维基百科][1] - -电传打字机和普通打字机的区别在于,电传打字机连接到通信设备,直接发送输入的消息。 - -[电传打字机使人类在没有计算机的情况下通过电线进行更快的通信成为可能][2]。 - -从这时起,"**TTY**" 一词就存在了。 - -### (相对)现代的概念 - -现在,你一定想知道,它是如何进入现代计算机和 Linux 的? - -首先,当电传打字机进入市场时,几年后半导体晶体管发展起来,然后演变成微处理器,计算机成为可能。 - -最初的计算机没有键盘的概念,打孔卡是输入的方法。 - -![一种插入计算机而不是通过键盘(TTY)输入的打孔卡计算机程序 | 图片来源于维基百科][3] - -随着计算机的发展,批量打孔卡最终被电传打字机取代,成为一种方便的输入/输出设备。 - -![1956 年的 LGP-30 计算机,附带 TTY][4] - -随着技术的进步,电传打字机被电子技术“虚拟化”了。因此,你不需要一个物理的、机械的 TTY,而是一个虚拟的电子 TTY。 - -早期的计算机甚至没有视频屏幕。东西被打印在纸上而不是显示在屏幕上。因此,你会看到“打印”这个术语而不是“显示”。随着技术的进步,视频后来被添加到终端中。 - -换句话说,你可能听说过把它们称为视频终端。或者,你可以称它们为“物理”终端。 - -后来,它们演变成软件模拟终端,具有更强的能力和功能。 - -这就是所谓的“终端模拟器”。例如,GNOME 终端或 Konsole,或者其他[你为 Linux 找到的最佳终端模拟器][5]。 - -### 所以,Linux 中的 TTY 到底是什么? - -在 Linux 或 UNIX 中,TTY 变为了一个抽象设备。有时它指的是一个物理输入设备,例如串口,有时它指的是一个允许用户和系统交互的虚拟 TTY([参考][6])。 - -TTY 是 Linux 或 UNIX 的一个子系统,它通过 TTY 驱动程序在内核级别实现进程管理、行编辑和会话管理。 - -对于编程,你需要深入研究。但是考虑到本文的范围,这可能是一个容易理解的定义。 - -如果你好奇的话,你可以查看一个旧资源([TTY 揭秘][7]),它会使用一切技术细节来解释 Linux 和 UNIX 系统中的 TTY。 - -事实上,每当你在系统中启动一个终端模拟器或使用任何类型的 shell 时,它都会与虚拟 TTY(也被称为伪 TTY 或 PTY)进行交互。 - -你可以在终端模拟器中输入 TTY 来找到相关联的 PTY。 - -### 如何在 Linux 中访问 TTY? - -![][8] - -在 Linux 中很容易访问 TTY。事实上,当我不知道它是什么时,我不小心访问了它,于是对要做什么,即如何摆脱它感到恐慌。 - -在大多数 _发行版_ 中,你可以使用以下键盘快捷键来获得 TTY 屏幕: - -**CTRL + ALT + F1** – 锁屏 - -**CTRL + ALT + F2** – 桌面环境 - -**CTRL + ALT + F3** – TTY3 - -**CTRL + ALT + F4** – TTY4 - -**CTRL + ALT + F5** – TT5 - -**CTRL + ALT + F6** – TTY6 - -你最多可以访问六个 TTY。但是,前两个快捷方式指向发行版的锁定屏幕和桌面环境。 - -![][9] - -因此,其他快捷方式将会让你获得一个命令行界面。 - -### 什么时候应该使用 TTY? - -TTY 不仅是一个技术宝藏,即使像我这样不是开发人员的用户,它也很有用。 - -在图形桌面环境冻结的情况下,它应该会派上用场。在某些情况下,从 TTY 重新安装桌面环境能帮助解决程序问题。 - -或者,你也可以选择在 TTY 中执行任务,例如更新 Linux 系统等。在这些情况下,你不希望它们中断你的进程。 - -最坏的情况是,如果图形用户界面失去响应,你可以进入 TTY 并重新启动计算机。 - -有些用户还喜欢在 TTY 的帮助下传输大文件(我不是其中之一)。 - -### Linux 中的 TTY 命令 - -![][10] - -当你在终端模拟器中输入 TTY 时,它将打印连接到标准输入的终端文件名,就像 man 页面描述的一样。 - -换句话说,要知道你连接的 TTY 编号,只需输入 TTY。并且,如果有多个用户远程连接到 Linux 机器,你可以使用 who 命令来检查其他用户连接到什么。 - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/what-is-tty-in-linux/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[MjSeven](https://github.com/MjSeven) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/WACsOperateTeletype.jpg?resize=429%2C371&ssl=1 -[2]: https://en.wikipedia.org/wiki/Teletype_Corporation#/media/File:What-is-teletype.jpg -[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/punch-card-program.jpg?resize=600%2C274&ssl=1 -[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/LGP-30-early-computer-1956.jpg?resize=800%2C600&ssl=1 -[5]: https://itsfoss.com/linux-terminal-emulators/ -[6]: https://unix.stackexchange.com/questions/4126/what-is-the-exact-difference-between-a-terminal-a-shell-a-tty-and-a-con -[7]: https://www.linusakesson.net/programming/tty/index.php -[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/ubuntu-tty.png?resize=800%2C449&ssl=1 -[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/ubuntu-tty4.png?resize=420%2C124&ssl=1 -[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/ubuntu-terminal-tty-command.png?resize=800%2C544&ssl=1 From ae2594544fa1b0d5e137cc733a9b05b7174c0023 Mon Sep 17 00:00:00 2001 From: Starryi Date: Sat, 18 Dec 2021 20:23:57 +0800 Subject: [PATCH 223/244] Translated --- ...with shaders- signed distance functions.md | 243 ------------------ ...with shaders- signed distance functions.md | 232 +++++++++++++++++ 2 files changed, 232 insertions(+), 243 deletions(-) delete mode 100644 sources/tech/20200315 Getting started with shaders- signed distance functions.md create mode 100644 translated/tech/20200315 Getting started with shaders- signed distance functions.md diff --git a/sources/tech/20200315 Getting started with shaders- signed distance functions.md b/sources/tech/20200315 Getting started with shaders- signed distance functions.md deleted file mode 100644 index d225ade5f9..0000000000 --- a/sources/tech/20200315 Getting started with shaders- signed distance functions.md +++ /dev/null @@ -1,243 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (Starryi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Getting started with shaders: signed distance functions!) -[#]: via: (https://jvns.ca/blog/2020/03/15/writing-shaders-with-signed-distance-functions/) -[#]: author: (Julia Evans https://jvns.ca/) - -Getting started with shaders: signed distance functions! -====== - -Hello! A while back I learned how to make fun shiny spinny things like this using shaders: - -![][1] - -My shader skills are still extremely basic, but this fun spinning thing turned out to be a lot easier to make than I thought it would be to make (with a lot of copying of code snippets from other people!). - -The big idea I learned when doing this was something called “signed distance functions”, which I learned about from a very fun tutorial called [Signed Distance Function tutorial: box & balloon][2]. - -In this post I’ll go through the steps I used to learn to write a simple shader and try to convince you that shaders are not that hard to get started with! - -### examples of more advanced shaders - -If you haven’t seen people do really fancy things with shaders, here are a couple: - - 1. this very complicated shader that is like a realistic video of a river: - 2. a more abstract (and shorter!) fun shader with a lot of glowing circles: - - - -### step 1: my first shader - -I knew that you could make shaders on shadertoy, and so I went to . They give you a default shader to start with that looks like this: - -![][3] - -Here’s the code: - -``` -void mainImage( out vec4 fragColor, in vec2 fragCoord ) -{ - // Normalized pixel coordinates (from 0 to 1) - vec2 uv = fragCoord/iResolution.xy; - - // Time varying pixel color - vec3 col = 0.5 + 0.5*cos(iTime+uv.xyx+vec3(0,2,4)); - - // Output to screen - fragColor = vec4(col,1.0); -} -``` - -This doesn’t do anythign that exciting, but it already taught me the basic structure of a shader program! - -### the idea: map a pair of coordinates (and time) to a colour - -The idea here is that you get a pair of coordinates as an input (`fragCoord`) and you need to output a RGBA vector with the colour of that. The function can also use the current time (`iTime`), which is how the picture changes over time. - -The neat thing about this programming model (where you map a pair of coordinates and the time to) is that it’s extremely trivially parallelizable. I don’t understand a lot about GPUs but my understanding is that this kind of task (where you have 10000 trivially parallelizable calculations to do at once) is exactly the kind of thing GPUs are good at. - -### step 2: iterate faster with `shadertoy-render` - -After a while of playing with shadertoy, I got tired of having to click “recompile” on the Shadertoy website every time I saved my shader. - -I found a command line tool that will watch a file and update the animation in real time every time I save called [shadertoy-render][4]. So now I can just run: - -``` -shadertoy-render.py circle.glsl -``` - -and iterate way faster! - -### step 3: draw a circle - -Next I thought – I’m good at math! I can use some basic trigonometry to draw a bouncing rainbow circle! - -I know the equation for a circle (`x**2 + y**2 = whatever`!), so I wrote some code to do that: - -![][5] - -Here’s the code: (which you can also [see on shadertoy][6]) - -``` -void mainImage( out vec4 fragColor, in vec2 fragCoord ) -{ - // Normalized pixel coordinates (from 0 to 1) - vec2 uv = fragCoord/iResolution.xy; - // Draw a circle whose center depends on what time it is - vec2 shifted = uv - vec2((sin(iGlobalTime) + 1)/2, (1 + cos(iGlobalTime)) / 2); - if (dot(shifted, shifted) < 0.03) { - // Varying pixel colour - vec3 col = 0.5 + 0.5*cos(iGlobalTime+uv.xyx+vec3(0,2,4)); - fragColor = vec4(col,1.0); - } else { - // make everything outside the circle black - fragColor = vec4(0,0,0,1.0); - } -} -``` - -This takes the dot product of the coordinate vector `fragCoord` with itself, which is the same as calculating `x^2 + y^2`. I played with the center of the circle a little bit in this one too – I made the center `vec2((sin(iGlobalTime) + 1)/2, (1 + cos(faster)) / 2)`, which means that the center of the circle also goes in a circle depending on what time it is. - -### shaders are a fun way to play with math! - -One thing I think is fun about this already (even though we haven’t done anything super advanced!) is that these shaders give us a fun visual way to play with math – I used `sin` and `cos` to make something go in a circle, and if you want to get some better intuition about how trigonometric work, maybe writing shaders would be a fun way to do that! - -I love that you get instant visual feedback about your math code – if you multiply something by 2, things get bigger! or smaller! or faster! or slower! or more red! - -### but how do we do something really fancy? - -This bouncing circle is nice but it’s really far from the super fancy things I’ve seen other people do with shaders. So what’s the next step? - -### idea: instead of using if statements, use signed distance functions! - -In my circle code above, I basically wrote: - -``` -if (dot(uv, uv) < 0.03) { - // code for inside the circle -} else { - // code for outside the circle -} -``` - -But the problem with this (and the reason I was feeling stuck) is that it’s not clear how it generalizes to more complicated shapes! Writing a bajillion if statements doesn’t seem like it would work well. And how do people render those 3d shapes anyway? - -So! **Signed distance functions** are a different way to define a shape. Instead of using a hardcoded if statement, instead you define a **function** that tells you, for any point in the world, how far away that point is from your shape. For example, here’s a signed distance function for a sphere. - -``` -float sdSphere( vec3 p, float center ) -{ - return length(p)-center; -} -``` - -Signed distance functions are awesome because they’re: - - * simple to define! - * easy to compose! You can take a union / intersection / difference with some simple math if you want a sphere with a chunk taken out of it. - * easy to rotate / stretch / bend! - - - -### the steps to making a spinning top - -When I started out I didn’t understand what code I needed to write to make a shiny spinning thing. It turns out that these are the basic steps: - - 1. Make a signed distance function for the shape I want (in my case an octahedron) - 2. Raytrace the signed distance function so you can display it in a 2D picture (or raymarch? The tutorial I used called it raytracing and I don’t understand the difference between raytracing and raymarching yet) - 3. Write some code to texture the surface of your shape and make it shiny - - - -I’m not going to explain signed distance functions or raytracing in detail in this post because I found this [AMAZING tutorial on signed distance functions][2] that is very friendly and honestly it does a way better job than I could do. It explains how to do the 3 steps above and the code has a ton of comments and it’s great. - - * The tutorial is called “SDF Tutorial: box & balloon” and it’s here: - * Here are tons of signed distance functions that you can copy and paste into your code (and ways to compose them to make other shapes) - - - -### step 4: copy the tutorial code and start changing things - -Here I used the time honoured programming practice here of “copy the code and change things in a chaotic way until I get the result I want”. - -My final shader of a bunch of shiny spinny things is here: - -The animation comes out looking like this: - -![][7] - -Basically to make this I just copied the tutorial on signed distance functions that renders the shape based on the signed distance function and: - - * changed `sdfBalloon` to `sdfOctahedron` and made the octahedron spin instead of staying still in my signed distance function - * changed the `doBalloonColor` colouring function to make it shiny - * made there be lots of octahedrons instead of just one - - - -### making the octahedron spin! - -Here’s some the I used to make the octahedron spin! This turned out to be really simple: first copied an octahedron signed distance function from [this page][8] and then added a `rotate` to make it rotate based on time and then suddenly it’s spinning! - -``` -vec2 sdfOctahedron( vec3 currentRayPosition, vec3 offset ){ - vec3 p = rotate((currentRayPosition), offset.xy, iTime * 3.0) - offset; - float s = 0.1; // what is s? - p = abs(p); - float distance = (p.x+p.y+p.z-s)*0.57735027; - float id = 1.0; - return vec2( distance, id ); -} -``` - -### making it shiny with some noise - -The other thing I wanted to do was to make my shape look sparkly/shiny. I used a noise funciton that I found in [this github gist][9] to make the surface look textured. - -Here’s how I used the noise function. Basically I just changed parameters to the noise function mostly at random (multiply by 2? 3? 1800? who knows!) until I got an effect I liked. - -``` -float x = noise(rotate(positionOfHit, vec2(0, 0), iGlobalTime * 3.0).xy * 1800.0); -float x2 = noise(lightDirection.xy * 400.0); -float y = min(max(x, 0.0), 1.0); -float y2 = min(max(x2, 0.0), 1.0) ; -vec3 balloonColor = vec3(y , y + y2, y + y2); -``` - -### writing shaders is fun! - -That’s all! I had a lot of fun making this thing spin and be shiny. If you also want to make fun animations with shaders, I hope this helps you make your cool thing! - -As usual with subjects I don’t know tha well, I’ve probably said at least one wrong thing about shaders in this post, let me know what it is! - -Again, here are the 2 resources I used: - - 1. “SDF Tutorial: box & balloon”: (which is really fun to modify and play around with) - 2. Tons of signed distance functions that you can copy and paste into your code - - - --------------------------------------------------------------------------------- - -via: https://jvns.ca/blog/2020/03/15/writing-shaders-with-signed-distance-functions/ - -作者:[Julia Evans][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://jvns.ca/ -[b]: https://github.com/lujun9972 -[1]: https://jvns.ca/images/spinny.gif -[2]: https://www.shadertoy.com/view/Xl2XWt -[3]: https://jvns.ca/images/colour.gif -[4]: https://github.com/alexjc/shadertoy-render -[5]: https://jvns.ca/images/circle.gif -[6]: https://www.shadertoy.com/view/tsscR4 -[7]: https://jvns.ca/images/octahedron2.gif -[8]: http://www.iquilezles.org/www/articles/distfunctions/distfunctions.htm -[9]: https://gist.github.com/patriciogonzalezvivo/670c22f3966e662d2f83 diff --git a/translated/tech/20200315 Getting started with shaders- signed distance functions.md b/translated/tech/20200315 Getting started with shaders- signed distance functions.md new file mode 100644 index 0000000000..567df87464 --- /dev/null +++ b/translated/tech/20200315 Getting started with shaders- signed distance functions.md @@ -0,0 +1,232 @@ +[#]: collector: (lujun9972) +[#]: translator: (Starryi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Getting started with shaders: signed distance functions!) +[#]: via: (https://jvns.ca/blog/2020/03/15/writing-shaders-with-signed-distance-functions/) +[#]: author: (Julia Evans https://jvns.ca/) + +着色器入门:符号距离函数! +====== + +大家好!不久前我学会了如何使用着色器制作有趣的闪亮旋转八面体: + +![][1] + +我的着色器能力仍然非常基础,但事实证明制作这个有趣的旋转八面体比我想象中要容易得多(从其他人那里复制了很多代码片段!)。 + +我在做这件事时, 从一个非常有趣的叫做[符号距离函数教程:盒子和气球][2]的教程中学到了“符号距离函数”的重要想法。 + +在本文中,我将介绍我用来学习编写简单着色器的步骤,并努力让你们相信着色器并不难入门! + +### 更高级着色器的示例 + +如果你还没有看过用着色器做的真正有趣的事情,这里有几个例子: + + 1. 这个非常复杂的着色器就像一条河流的真实视频: + 2. 一个更抽象(更短!)有趣的着色器,它有很多发光的圆圈: + +### 步骤一:我的第一个着色器 + +我知道你可以在 shadertoy 上制作着色器,所以我去了。它们提供了一个默认着色器,如下图所示: + +![][3] + +代码如下: + +```cpp +void mainImage( out vec4 fragColor, in vec2 fragCoord ) +{ + // 规范像素坐标 (从 0 到 1) + vec2 uv = fragCoord / iResolution.xy; + + // 随时间改变像素颜色 + vec3 col = 0.5 + 0.5 * cos(iTime + uv.xyx + vec3(0, 2, 4)); + + // 输出到屏幕 + fragColor = vec4(col, 1.0); +} +``` + +虽然还没有做什么令人兴奋的事情,但它已经教会了我着色器程序的基本结构! + +### 想法:将一对坐标(和时间)映射到一个颜色 + +这里的想法是获得一对坐标作为输入(`fragCoord`),你需要输出一个RGBA向量作为此坐标的颜色。该函数也可以使用当前时间(`iTime`),图像从而可以随时间变化。 + +这种编程模型(将一对坐标和时间映射到其中)的巧妙之处在于,它非常容易并行化。我对GPU了解不多,但我的理解是,这种任务(一次执行10000个微不足道的可并行计算)正是GPU擅长的事情。 + +### 步骤二:使用 `shadertoy-render` 加快开发迭代 + +玩了一段时间的 shadertoy 之后,我厌倦了每次保存我的着色器时都必须在 shadertoy 网站上单击“重新编译”。 + +我找到了一个名为 [shadertoy-render][4] 命令行工具,它会在每次保存时实时查看文件并更新动画。现在我可以运行: + +```bash +shadertoy-render.py circle.glsl +``` + +并更快地开发迭代! + +### 步骤三:画一个圆圈 + +接下来我想——我擅长数学!我可以用一些基本的三角学来画一个会弹跳的彩虹圈! + +我知道圆的方程为(`x^2 + y^2 = 任意正数`!),所以我写了一些代码来实现它: + +![][5] + +代码如下:(你也可以[在 shadertoy 上查看][6]) + +```cpp +void mainImage( out vec4 fragColor, in vec2 fragCoord ) +{ + // 规范像素坐标 (从 0 到 1) + vec2 uv = fragCoord / iResolution.xy; + // 绘制一个中心位置依赖于时间的圆 + vec2 shifted = uv - vec2((sin(iGlobalTime) + 1) / 2, (1 + cos(iGlobalTime)) / 2); + if (dot(shifted, shifted) < 0.03) { + // 改变像素颜色 + vec3 col = 0.5 + 0.5 * cos(iGlobalTime + uv.xyx + vec3(0, 2, 4)); + fragColor = vec4(col, 1.0); + } else { + // 使圆之外的其他像素都是黑色 + fragColor = vec4(0,0, 0, 1.0); + } +} +``` + +代码将坐标向量 `fragCoord` 与自身点积,这与计算 `x^2 + y^2` 相同。我还在这个圆圈的中心玩了一点花活 – 圆心为 `vec2((sin(iGlobalTime) + 1)/ 2,(1 + cos(faster)) / 2`,这意味着圆心也随着时间沿另一个圆移动。 + +### 着色器是一种学习数学的有趣方式! + +我觉得有意思的(即使我们没有做任何超级高级的事情!)是这些着色器为我们提供了一种有趣的可视化方式学习数学 - 我用 `sin` 和 `cos` 来使某些东西沿着圆移动,如果你想更直观地了解三角函数的工作方式, 也许编写着色器会是一种有趣的方法! + +我喜欢的是,可以获得有关数学代码的即时视觉反馈 - 如果你把一些东西乘以2,图像里的东西会变得更大!或更小!或更快!或更慢!或更红! + +### 但是我们如何做一些真正有趣的事情呢? + +这个会弹跳的圆圈很好,但它与我见过的其他人使用着色器所做的非常奇特的事情相去甚远。那么下一步要做什么呢? + +### 想法:不要使用 if 语句,而是使用符号距离函数! + +在我上面的圆圈代码中,我基本上是这样写的: + +```cpp +if (dot(uv, uv) < 0.03) { + // 圆里的代码 +} else { + // 圆外的代码 +} +``` + +但问题(也是我感到卡住的原因)是不清楚如何将它推广到更复杂的形状!编写大量的 if 语句似乎不太好用。那人们要如何渲染这些 3d 形状呢? + +所以!**符号距离函数** 是定义形状的另一种方式。不是使用硬编码的 if 语句,而是定义一个 **函数**,该函数告诉你,对于世界上的任何一个点,该点与你的形状有多远。比如,下面是球体的符号距离函数。 + +```cpp +float sdSphere( vec3 p, float center ) +{ + return length(p) - center; +} +``` + +符号距离函数非常棒,因为它们: + + * 易于定义! + * 易于组合!如果你想要一个被切去一块的球体, 你可以用一些简单的数学来计算并集/交集/差集。 + * 易于旋转/拉伸/弯曲! + +### 制作旋转陀螺的步骤 + +当我开始时,我不明白需要编写什么代码来制作一个闪亮的旋转东西。结果表明如下是基本步骤: + + 1. 为想要的形状创建一个符号距离函数(在我的例子里是八面体) + 2. 光线追踪符号距离函数,以便可以在 2D 图片中显示它(或光线行进?我使用的教程称之为光线追踪,我还不明白光线追踪和光线行进之间的区别) + 3. 编写代码处理形状的表面纹理并使其发光 + +我不打算在本文中详细解释符号距离函数或光线追踪,因为我发现这个[关于符号距离函数的惊人教程][2]非常友好,老实说,它比我做的更好,它解释了如何执行上述3个步骤,并且代码有大量的注释,非常棒。 + + * 该教程名为“符号距离函数教程:盒子和气球”,它在这里: + * 这里有大量符号距离函数,你可以将其复制粘贴到代码中(以及组合它们以制作其他形状的方法) + +### 步骤四:复制教程代码并开始更改内容 + +我在这里使用了久负盛名的编程实践,即“复制代码并以混乱的方式更改内容,直到得到我想要的结果”。 + +最后一堆闪亮的旋转八面体着色器在这里: + +动画出来的样子是这样的: + +![][7] + +为了做到这一点,我基本上只是复制了关于符号距离函数的教程,该函数根据符号距离函数呈现形状,并且: + + * 将 `sdfBalloon` 更改为 `sdfOctahedron`,并使八面体旋转而不是在我的符号距离函数中静止不动 + * 修改 `doBalloonColor` 着色功能,使其有光泽 + * 有很多八面体而不是一个 + +### 使八面体旋转! + +下面是我用来使八面体旋转的代码!事实证明这真的很简单:首先从 [这个页面][8] 复制一个八面体符号距离函数,然后添加一个 `rotate` 使其根据时间旋转,然后它就可以旋转了! + +```cpp +vec2 sdfOctahedron( vec3 currentRayPosition, vec3 offset ){ + vec3 p = rotate((currentRayPosition), offset.xy, iTime * 3.0) - offset; + float s = 0.1; // s 是啥? + p = abs(p); + float distance = (p.x + p.y + p.z - s) * 0.57735027; + float id = 1.0; + return vec2( distance, id ); +} +``` + +### 用一些噪音让它发光 + +我想做的另一件事是让我的形状看起来闪闪发光/有光泽。我使用了在[这个github gist][9]中找到的噪声函数使表面看起来有纹理。 + +以下是我如何使用噪声函数的代码。基本上,我只是随机地将参数更改为噪声函数(乘以2?3?1800?随你!),直到得到喜欢的效果。 + +```cpp +float x = noise(rotate(positionOfHit, vec2(0, 0), iGlobalTime * 3.0).xy * 1800.0); +float x2 = noise(lightDirection.xy * 400.0); +float y = min(max(x, 0.0), 1.0); +float y2 = min(max(x2, 0.0), 1.0); +vec3 balloonColor = vec3(y, y + y2, y + y2); +``` + +## 编写着色器很有趣! + +上面就是全部的步骤了!让这个八面体旋转并闪闪发光使我很开心。如果你也想用着色器制作有趣的动画,希望本文能帮助你制作出很酷的东西! + +通常对于不太了解的主题,我可能在文章中说了至少一件关于着色器的错误事情,请让我知道错误是什么! + +再说一遍,如下是我用到的两个资源: + + 1. “符号距离函数教程:盒子和气球”:(修改和玩起来真的很有趣) + 2. 可以将大量符号距离函数复制并粘贴到你的代码中 + + +-------------------------------------------------------------------------------- + +via: https://jvns.ca/blog/2020/03/15/writing-shaders-with-signed-distance-functions/ + +作者:[Julia Evans][a] +选题:[lujun9972][b] +译者:[Starryi](https://github.com/Starryi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://jvns.ca/ +[b]: https://github.com/lujun9972 +[1]: https://jvns.ca/images/spinny.gif +[2]: https://www.shadertoy.com/view/Xl2XWt +[3]: https://jvns.ca/images/colour.gif +[4]: https://github.com/alexjc/shadertoy-render +[5]: https://jvns.ca/images/circle.gif +[6]: https://www.shadertoy.com/view/tsscR4 +[7]: https://jvns.ca/images/octahedron2.gif +[8]: http://www.iquilezles.org/www/articles/distfunctions/distfunctions.htm +[9]: https://gist.github.com/patriciogonzalezvivo/670c22f3966e662d2f83 From 5c2fd99d5676ed795dc9cb30d0f51d9344dcd722 Mon Sep 17 00:00:00 2001 From: MjSeven Date: Sat, 18 Dec 2021 21:16:18 +0800 Subject: [PATCH 224/244] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...03 Print files from your Linux terminal.md | 161 ------------------ ...03 Print files from your Linux terminal.md | 155 +++++++++++++++++ 2 files changed, 155 insertions(+), 161 deletions(-) delete mode 100644 sources/tech/20210903 Print files from your Linux terminal.md create mode 100644 translated/tech/20210903 Print files from your Linux terminal.md diff --git a/sources/tech/20210903 Print files from your Linux terminal.md b/sources/tech/20210903 Print files from your Linux terminal.md deleted file mode 100644 index 970fbf048a..0000000000 --- a/sources/tech/20210903 Print files from your Linux terminal.md +++ /dev/null @@ -1,161 +0,0 @@ -[#]: subject: "Print files from your Linux terminal" -[#]: via: "https://opensource.com/article/21/9/print-files-linux" -[#]: author: "Seth Kenlon https://opensource.com/users/seth" -[#]: collector: "lujun9972" -[#]: translator: "MjSeven" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Print files from your Linux terminal -====== -To print a file from your terminal, use the lpr command. -![Typewriter with hands][1] - -[Printing on Linux is easy][2], but sometimes it feels like a lot of work to launch an application, open a file, find the **Print** selection in the menu, click a confirmation button, and so on. When you're a Linux terminal user, you often want to perform complex actions with simple triggers. Printing is complex, and there's little as simple as the `lpr` command. - -### Print using the lpr command - -To print a file from your terminal, use the `lpr` command: - - -``` -`$ lpr myfile.odt` -``` - -Should that fail, you need to set a default printer or specify a printer manually. - -### Setting a default printer - -According to my well-worn copy of a Berkeley 4.2 manual printed in 1984, the `lpr` command paginated and sent a file to a printer spool, which streamed data to something called a _line printer_. - -![book page displaying lpr command information][3] - -The lpr command. - -These days, the actual `lpr` command is insufficient because modern computers are likely to have access to several printers, and certainly to printers a lot more complex than a dot-matrix line printer. Now there's a subsystem, called the Common Unix Printing System (CUPS), to keep track of all the printers that you want your computer to access, which driver your computer should use to communicate with each printer, which printer to use by default, and so on. The `lpr.cups` or `lpr-cups` commands, bundled with CUPS and usually symlinked to `lpr`, allow you to print from a terminal by referencing your Common Unix Printing System (CUPS) configuration first. - -To print a file with `lpr`, you should first set a default printer. You can set a default printer in your system's printer settings: - -![dialog box to set default printer][4] - -Set a default printer. - -Alternately, you can mark a printer as the default with the `lpadmin` command: - - -``` -$ sudo lpadmin -d HP_LaserJet_P2015_Series -$ lpstat -v -device for HP_LaserJet_P2015_Series: ipp://10.0.1.222:631/printers/HP_LaserJet_P2015_Series -``` - -### Setting a default destination with environment variables - -You aren't permitted to set your own default printer on systems you don't have an admin account on because changing print destinations is considered a privileged task. Before `lpr` references CUPS for a destination, it queries your system for the **PRINTER** [environment variable][5]. - -In this example, `HP_LaserJet_P2015_Series` is the human-readable name given to the printer. Set **PRINTER** to that value: - - -``` -$ PRINTER=HP_LaserJet_P2015_Series -$ export PRINTER -``` - -Once the **PRINTER** variable has been set, you can print: - - -``` -`$ lpr myfile.pdf` -``` - -### Get a list of attached printers - -You can see all the printers that are accepting print jobs and that are attached to your system with the `lpstat` command: - - -``` -$ lpstat -a -HP_LaserJet_P2015_Series accepting requests since Sun 1 Aug 2021 10:11:02 PM NZST -r1060 accepting requests since Wed 18 Aug 2021 04:43:57 PM NZST -``` - -### Printing to an arbitrary printer - -Once you have added printers to your system, and now that you know how to identify them, you can print to any one of them, whether you have a default destination set or not: - - -``` -`$ lpr -P HP_LaserJet_P2015_Series myfile.txt` -``` - -### How printers are defined - -CUPS has a user-friendly front-end accessible through a web browser such as Firefox. Even though it uses a web browser as its user interface, it's actually a service running locally on your computer (a location called **localhost**) on port 631. CUPS manages printers attached to your computer, and it stores its configuration in `/etc/cups/printers.conf`. - -The `printers.conf` file consists of definitions detailing the printing devices your computer can access. You're not meant to edit it directly, but if you do, then you must stop the `cupsd` daemon first. - -A typical entry looks something like this: - - -``` -<Printer r1060> -  Info Ricoh 1060 -  Location Downstairs -  MakeModel Ricoh Aficio 1060 - CUPS+Gutenprint v5.2.6 -  DeviceURI lpd://192.168.4.8 -  State Idle -  StateTime 1316011347 -  Type 12308 -  Filter application/vnd.cups-raw 0 - -  Filter application/vnd.cups-raster 100 rastertogutenprint.5.2 -  Accepting Yes -  Shared No -  JobSheets none none -  QuotaPeriod 0 -  PageLimit 0 -  KLimit 0 -  OpPolicy default -  ErrorPolicy stop-printer -</Printer> -``` - -In this example, the printer's name is `r1060`, a human-readable identifier for a Ricoh Aficio 1060. - -The _MakeModel_ attribute is pulled from the `lpinfo` command, which lists all available printer drivers on your system. Assuming you know that you have a Ricoh Aficio 1060 that you want to print to, then you would issue this command: - - -``` -$ lpinfo -m | grep 1060 -gutenprint.5.2://brother-hl-1060/expert Brother HL-1060 - CUPS+Gutenprint v5.2.11 -gutenprint.5.2://ricoh-afc_1060/expert Ricoh Aficio 1060 - CUPS+Gutenprint v5.2.11 -``` - -This command lists the relevant drivers you have installed. - -The _MakeModel_ is the last half of the result. In this example, that's `Ricoh Aficio 1060 - CUPS+Gutenprint v5.2.11`. - -The _DeviceURI_ attribute identifies where the printer is found on the network (or physical location, such as the USB port). In this example, the _DeviceURI_ is `lpd://192.168.4.8` because I'm using the `lpd` (line printer daemon) protocol to send data to a networked printer. On a different system, I have an HP LaserJet attached by a USB cable, so the _DeviceURI_ is DeviceURI `hp:/usb/HP_LaserJet_P2015_Series?serial=00CNCJM26429`. - -### Printing from the terminal - -Sending a job to a printer is an easy process, as long as you understand the devices attached to your system and how to identify them. Printing from the terminal is fast, efficient, and easily scripted or done as a batch job. Try it out! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/9/print-files-linux - -作者:[Seth Kenlon][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/seth -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/typewriter-hands.jpg?itok=oPugBzgv (Typewriter with hands) -[2]: https://opensource.com/article/21/8/setup-your-printer-linux -[3]: https://opensource.com/sites/default/files/berkeley-1984-lpr.jpeg -[4]: https://opensource.com/sites/default/files/printer-default.jpeg -[5]: https://opensource.com/article/19/8/what-are-environment-variables diff --git a/translated/tech/20210903 Print files from your Linux terminal.md b/translated/tech/20210903 Print files from your Linux terminal.md new file mode 100644 index 0000000000..b3c3530fa1 --- /dev/null +++ b/translated/tech/20210903 Print files from your Linux terminal.md @@ -0,0 +1,155 @@ +[#]: subject: "Print files from your Linux terminal" +[#]: via: "https://opensource.com/article/21/9/print-files-linux" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "MjSeven" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +从 Linux 终端打印文件 +====== +使用 lpr 命令在终端中打印文件。 + +![手动打字机][1] + +[在 Linux 上打印很容易][2],但有时感觉要做很多工作,比如启动应用程序、打开文件、在菜单中找到**打印**选项,单击确认按钮等等。当你是一个终端用户时,通常希望使用简单的触发器执行复杂的操作。打印很复杂,但没有什么比 `lpr` 命令更简单了。 + +### 使用 lpr 命令打印 + +使用 `lpr` 命令在终端打印文件: + +``` +$ lpr myfile.odt +``` + +如果失败的话,你需要设置默认打印机或手动指定打印机。 + +### 设置默认打印机 + +根据我在 1984 年印刷的 Berkeley 4.2 手册的旧版本中找到的资料,`lpr` 命令会分页并将文件发送到打印机卷轴,后者将数据传输到称为 _行打印机_ 的东西。 + +![显示 LPR 命令信息的页面][3] + +lpr 命令 + +现在,原来的 `lpr` 命令已经无法满足,因为现代计算机可以访问多台打印机,而且是那些比点阵行式打印机复杂得多的打印机。现在有一个子系统,称为通用 Unix 打印系统(CUPS),可以跟踪所有计算机访问的打印机,计算机应该使用哪个驱动程序与每台打印机通信,默认使用哪台打印机等等。`lpr.cups` 或 `lpr-cups` 命令与 CUPS 捆绑在一起,通常以符号链接到 `lpr`,允许你引用通用 Unix 打印系统(CUPS)配置从终端打印。 + +使用 `lpr` 打印文件,你应该首先设置默认打印机。你可以在系统的打印机设置中设置: + +![设置默认打印机对话框][4] + +设置默认打印机。 + +或者,你也可以使用 `lpadmin` 命令设置: + +``` +$ sudo lpadmin -d HP_LaserJet_P2015_Series +$ lpstat -v +device for HP_LaserJet_P2015_Series: ipp://10.0.1.222:631/printers/HP_LaserJet_P2015_Series +``` + +### 使用环境变量设置 + +你不能在没有管理员账户的系统上设置默认打印机,因为更改打印机默认设置是一项特权任务。在 `lpr` 引用到 CUPS 前,它会在系统中查询 **PRINTER** [环境变量][5]。 + +在本例中,`HP_LaserJet_P2015_Series` 打印机的名称。将 **PRINTER** 设置为该值: + +``` +$ PRINTER=HP_LaserJet_P2015_Series +$ export PRINTER +``` + +一旦设置了 **PRINTER** 变量,你就可以打印了: + + +``` +$ lpr myfile.pdf +``` + +### 获取连接的打印机列表 + +你可以使用 `lpstat` 命令查看所有连接到系统接受打印任务的打印机: + +``` +$ lpstat -a +HP_LaserJet_P2015_Series accepting requests since Sun 1 Aug 2021 10:11:02 PM NZST +r1060 accepting requests since Wed 18 Aug 2021 04:43:57 PM NZST +``` + +### 打印到任意一台打印机 + +将打印机添加到系统后,并且现在你知道如何识别它们了,你可以打印到其中任何一台,无论你是否设置了默认打印机: + +``` +$ lpr -P HP_LaserJet_P2015_Series myfile.txt +``` + +### 如何定义打印机 + +CUPS 有一个友好的前端页面,可通过 Web 浏览器如 Firefox 访问。虽然它使用 Web 浏览器作为用户界面,但它实际上是在本机(一个称为 localhost 的位置)的 631 端口上提供服务。CUPS 管理连接到计算机的打印机,并将其配置存储在 `/etc/cups/priters.conf` 中。 + +`printers.conf` 文件包含详细描述计算机可以访问的打印设备的定义。不要直接编辑它,但如果你想,你必须先停止 `cupsd` 守护进程。 + +一个典型的文件定义如下所示: + +``` + + Info Ricoh 1060 + Location Downstairs + MakeModel Ricoh Aficio 1060 - CUPS+Gutenprint v5.2.6 + DeviceURI lpd://192.168.4.8 + State Idle + StateTime 1316011347 + Type 12308 + Filter application/vnd.cups-raw 0 - + Filter application/vnd.cups-raster 100 rastertogutenprint.5.2 + Accepting Yes + Shared No + JobSheets none none + QuotaPeriod 0 + PageLimit 0 + KLimit 0 + OpPolicy default + ErrorPolicy stop-printer + +``` + +在本例中,打印机的名称是 `r1060`,即 Ricoh Aficio 1060。 + +_MakeModel_ 属性是从 `lpinfo` 命令中提取的,该命令列出了系统上所有可用的打印机驱动程序。假设你知道要打印到 Ricoh Aficio 1060,那么你会发出以下命令: + +``` +$ lpinfo -m | grep 1060 +gutenprint.5.2://brother-hl-1060/expert Brother HL-1060 - CUPS+Gutenprint v5.2.11 +gutenprint.5.2://ricoh-afc_1060/expert Ricoh Aficio 1060 - CUPS+Gutenprint v5.2.11 +``` + +它会列出已安装的相关驱动程序。 + +_MakeModel_ 是结果的后半部分。在本例中为 `Ricoh Aficio 1060 - CUPS+Gutenprint v5.2.11`。 + +_DeviceURI_ 属性标识打印机在网络上的位置(或物理位置,例如 USB 端口)。在本例中,它是 `lpd://192.168.4.8`,因为我使用 `lpd` 协议将数据发送到一台网络打印机。在另一个系统上,我有一个通过 USB 连接的 HP LaserJect 打印机,因此 _DeviceURI_ 是 `hp:/usb/HP_LaserJet_P2015_Series?serial=00CNCJM26429`。 + +### 在终端中打印 + +将作业发送到打印机是一个简单的过程,只要你了解连接到系统的设备以及如何识别它们。在终端打印非常快速、高效,并且易于编写脚本或作为批处理作业完成。试试看! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/9/print-files-linux + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[MjSeven](https://github.com/MjSeven) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/typewriter-hands.jpg?itok=oPugBzgv (Typewriter with hands) +[2]: https://opensource.com/article/21/8/setup-your-printer-linux +[3]: https://opensource.com/sites/default/files/berkeley-1984-lpr.jpeg +[4]: https://opensource.com/sites/default/files/printer-default.jpeg +[5]: https://opensource.com/article/19/8/what-are-environment-variables From 9f713200a1a4b72fa0221f51027b519ffc24066e Mon Sep 17 00:00:00 2001 From: unigeorge <40418272+unigeorge@users.noreply.github.com> Date: Sat, 18 Dec 2021 21:16:46 +0800 Subject: [PATCH 225/244] unigeorge translating --- .../20210927 Bash Shell Scripting for beginners (Part 1).md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/tech/20210927 Bash Shell Scripting for beginners (Part 1).md b/sources/tech/20210927 Bash Shell Scripting for beginners (Part 1).md index 2e6a196059..a991696467 100644 --- a/sources/tech/20210927 Bash Shell Scripting for beginners (Part 1).md +++ b/sources/tech/20210927 Bash Shell Scripting for beginners (Part 1).md @@ -2,7 +2,7 @@ [#]: via: "https://fedoramagazine.org/bash-shell-scripting-for-beginners-part-1/" [#]: author: "zexcon https://fedoramagazine.org/author/zexcon/" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "unigeorge" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " @@ -205,7 +205,7 @@ via: https://fedoramagazine.org/bash-shell-scripting-for-beginners-part-1/ 作者:[zexcon][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[译者ID](https://github.com/unigeorge) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 3a41719667983aa9c9b7d19ddd67677a59ce6fbd Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sun, 19 Dec 2021 05:02:26 +0800 Subject: [PATCH 226/244] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211218=20?= =?UTF-8?q?How=20I=20play=20Tetris=20on=20the=20mainframe?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211218 How I play Tetris on the mainframe.md --- ...1218 How I play Tetris on the mainframe.md | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 sources/tech/20211218 How I play Tetris on the mainframe.md diff --git a/sources/tech/20211218 How I play Tetris on the mainframe.md b/sources/tech/20211218 How I play Tetris on the mainframe.md new file mode 100644 index 0000000000..b8e24f70ea --- /dev/null +++ b/sources/tech/20211218 How I play Tetris on the mainframe.md @@ -0,0 +1,76 @@ +[#]: subject: "How I play Tetris on the mainframe" +[#]: via: "https://opensource.com/article/21/12/mainframe-tetris" +[#]: author: "Elizabeth K. Joseph https://opensource.com/users/pleia2" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +How I play Tetris on the mainframe +====== +Here's how I compiled and play my favorite game on a mainframe by +accessing a virtual Linux server. +![Gaming artifacts with joystick, GameBoy, paddle][1] + +The ability to [run Linux on modern mainframes][2] opens doors to doing all kinds of things on the platform. An Apache HTTP server? Easy! A database? Would you like SQL or NoSQL? Kubernetes? Sure! As I concluded in [Linux on the mainframe: Then and now][3], all of the most popular Linux distributions for servers today have versions for the mainframe. + +This is great news for companies whose mission-critical infrastructures are running on a mainframe, but what if you just want to play around with one? The first time I got a bash shell on an IBM LinuxONE, I installed the irssi chat client and showed all my friends on IRC the output of `/proc/cpuinfo` to show off that it was an s390x architecture system. At first, I was at a loss as to what to do next. + +Then I thought it would be fun to use this huge computer to play a game. My first thought was [NetHack][4], but it turns out I could install that with a simple `apt install nethack-console`. No, I should compile something! For every computer architecture, you need compilers and interpreters written for that. With over 20 years of Linux on the mainframe, most compilers and interpreters you'd typically expect are already ported. + +Growing up, one of my all-time favorite games was Tetris, so it was the logical choice for my experimentation. I found an open source Tetris game written in C called [vitetris][5] and gave it a try. It was just like compiling a C program on any other Linux server. + +First, I needed to grab some dependencies. The mainframe was running Linux, so I could use my package manager to [install the build requirements][6], and I was well on my way. + +Next, it was just a matter of grabbing the code and building it: + + +``` + + +curl -LO +tar xvf v0.58.0.tar.gz +cd vitetris-0.58.0/ +./configure +make + +``` + +And in no time, I was playing my favorite game! + +`./tetris` + +![Screenshot of an open source Tetris game in progress, running on Linux][7] + +(Elizabeth Joseph, [CC BY-SA 4.0][8]) + +As I said, it's exactly like building any other C program on a Linux server, but you're doing it on a mainframe. + +Unfortunately, I don't have a mainframe in my garage (yet). Instead, I've done all of this on a virtual server hosted by Marist College through the [IBM LinuxONE Community Cloud][9] program. It gives you free access to an s390x architecture Linux server, with your choice of the most popular distributions. With this virtual server, you have access to experiment for 120 days. + +If you are a representative from an open source project that is considering building your application for Linux on s390x, there's a program for you, too. When I'm not playing Tetris, my actual job at IBM is working with open source communities to do just that. You can put in a request for a permanent Linux virtual server for your community to use for development, whether that's doing manual tests to see if your application will build or formally adding it to your project's continuous integration system. I recommend starting with the Community Cloud to do some experiments, and then you can fill out [this form][10] to get the process of getting a permanent virtual server rolling. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/mainframe-tetris + +作者:[Elizabeth K. Joseph][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/pleia2 +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/open_gaming_games_roundup_news.png?itok=KM0ViL0f (Gaming artifacts with joystick, GameBoy, paddle) +[2]: https://opensource.com/article/19/9/linux-mainframes-part-1 +[3]: https://opensource.com/article/19/9/linux-mainframes-part-2 +[4]: https://www.nethack.org/ +[5]: http://victornils.net/tetris/ +[6]: https://opensource.com/article/21/11/compiling-code +[7]: https://opensource.com/sites/default/files/uploads/tetris_osdotcom.png (Tetris) +[8]: https://creativecommons.org/licenses/by-sa/4.0/ +[9]: https://developer.ibm.com/gettingstarted/ibm-linuxone/ +[10]: https://www.ibm.com/community/z/open-source/virtual-machines-request/ From 784fc897ab084cd3b65a4b5a771c8d0c069b4dee Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sun, 19 Dec 2021 05:02:37 +0800 Subject: [PATCH 227/244] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211218=20?= =?UTF-8?q?Explore=203D=20scans=20with=20this=20open=20source=20tool?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211218 Explore 3D scans with this open source tool.md --- ...ore 3D scans with this open source tool.md | 151 ++++++++++++++++++ 1 file changed, 151 insertions(+) create mode 100644 sources/tech/20211218 Explore 3D scans with this open source tool.md diff --git a/sources/tech/20211218 Explore 3D scans with this open source tool.md b/sources/tech/20211218 Explore 3D scans with this open source tool.md new file mode 100644 index 0000000000..801137c1ad --- /dev/null +++ b/sources/tech/20211218 Explore 3D scans with this open source tool.md @@ -0,0 +1,151 @@ +[#]: subject: "Explore 3D scans with this open source tool" +[#]: via: "https://opensource.com/article/21/12/3d-scans-meshlab" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Explore 3D scans with this open source tool +====== +Anyone can play with the potential of LiDAR with MeshLab, an open source +LiDAR point cloud viewer and editor. +![woman on laptop sitting at the window][1] + +Light detection and ranging, better known as LiDAR, is a method of taking photographs of 3D space using lasers and GPS. That sounds like science fiction—I can think of a few scenes in some movies that probably reimagined this technology without realizing it—but it's a technology that's existed for over 50 years. + +LiDAR is useful for topographical surveying and archaeological recordkeeping, and it's useful for obtaining sources for 3D printing. I was introduced to it while working on a movie that needed to integrate an imaginary (or was it?) dragon with a real-world forest and foresting town. + +For all of these things to appear seamlessly in the same movie, digital artists were tasked with recreating, with 3D models, a tree or building that actually existed. To get the real-world objects exactly right in the 3D-modeling application, the artists needed to essentially trace the real-world object, just as you might trace a photograph to produce an accurate drawing on tracing paper. Instead of photographs, the 3D-modeling artists used LiDAR scans, which allowed them to "trace" an object in all dimensions. + +Anyone can play with the potential of LiDAR with MeshLab, an open source LiDAR point cloud viewer and editor. + +### Install MeshLab on Linux + +MeshLab is available on most Linux distributions from your package manager. + +On Fedora, Mageia, and similar distributions: + +`$ sudo dnf install meshlab` + +On Debian-based distributions: + +`$ sudo apt install meshlab` + +I use MeshLab as a [Flatpak][2], and there's a convenient AppImage available on [MeshLab.net][3]. + +### Getting a LiDAR scan + +LiDAR equipment isn't easy to obtain, so unless you're working on a project using LiDAR scan, you probably don't have a LiDAR scan just lying around. + +However, the [OpenHeritage][4] project is dedicated to archiving scans of significant scientific and public interest. The project has scans of ancient ruins at Tikal; cathedrals in France, Spain, and Italy; palaces in Syria and Jordan; and more, published under the terms of [Creative Commons][5] licenses. + +LiDAR scans contain millions of points that define an object, so they're very taxing on system resources. To work on a LiDAR scan comfortably, anticipate requiring a good graphics card and plenty of RAM. If you just want to browse through a scan, the [Pantheon (10.26301/t9sj-mf53)][6] dataset is surprisingly clean and is only 89 MB with just 6 million vertices. + +The Pantheon scan is attributed to Gerd Graßhoff, Michael Heinzelmann, Markus Wäfler, Christian Berndt, Jon Albers, Oskar Kaelin, Bernd Kulawik, Ralph Rosenbauer, Nikolaos Theocharis, Michael Lustenberger, Bernhard Fritsch in 2021, and is distributed by Open Heritage 3D under the CC BY-NC-SA license. + +After downloading the mesh file, unzip it to uncompress the .e57 file. + +For this article, the terms _mesh_, _point cloud_, _data set_ refer to the same thing: the collection of vertices produced by a LiDAR scan. + +### MeshLab interface + +When you launch MeshLab, there's usually no LiDAR scan loaded. To import one, go to the File menu and select Import Mesh or press **Ctrl+I** on your keyboard. + +Select your mesh. + +![A scan of the Pantheon monument within the the MeshLab interface][7] + +(Seth Kenlon, [CC BY-SA 4.0][8]) + +You can adjust your view of a point cloud by clicking and dragging on one of the axis handles (the _trackball,_ in MeshLab terminology) appearing around the origin point of the mesh. + +Use your scroll wheel to zoom in and out on the point cloud. Scroll down to zoom in and scroll up to zoom out. Don't confuse this with scaling. The trackball doesn't change with your mesh, so the point cloud only appears to be scaling up or down, but the panel at the bottom of the window reveals that your points haven't changed. + +![Mesh information][9] + +(Seth Kenlon, CC BY-SA 4.0) + +The top toolbar of the MeshLab window displays your primary editing tools. The first batch of tools are file operations used to load and save and export meshes. The second batch are display options you can use to change how you're viewing the dataset: you can view just the bounding box around the point cloud, the points within the cloud, just a wireframe, a gridded background layer, axis labels, and so on. The rest of the toolbar contains tools for editing meshes. + +When no editing tool is selected, you're in viewing mode. + +### Transforming a point cloud + +MeshLab is not a 3D-modeling application, even though there are many similarities in the general interface. However, MeshLab does edit meshes, so there are some tools that can transform a point cloud. The most basic edits are Rotate, Scale, and Translate. + +To transform a mesh, click the Manipulators tool icon in the top toolbar. + +![A screenshot showing the location of the MeshLab Manipulators tool icon in the tool bar][10] + +(Seth Kenlon, [CC BY-SA 4.0][8]) + +With the Manipulators tool active, you can press **T** to translate your mesh's position, **R** to rotate your mesh, or **S** to scale your mesh. Controls appear for each operation, and, as with Blender, you can press extra keys to further constrain what you're doing. For example, press **X** in translation mode to constrain your translation just along the X-axis. Instructions like these are provided in the top left corner of the MeshLab window. + +![Sample on-screen instructions for using the Translate function of the Manipulators tool][11] + +(Seth Kenlon, [CC BY-SA 4.0][8]) + +When you're finished with a tool, you must click its icon again to deactivate it. Clicking on a new tool does _not_ deactivate your current tool. + +Pressing **Escape** on your keyboard switches you to view mode, and pressing it again returns you to your previous tool. This way, you can adjust and edit and adjust quickly with no added mouse clicks. + +### Selecting points + +A common task in a mesh editor is cleaning up a LiDAR scan by removing extraneous points. The LiDAR scan of the Pantheon is pretty clean as it is, but not all are, and it can save a lot of processing power and hard drive space to eliminate vertices you don't need. + +You can select points using the Select vertex clusters, Select vertices on a plane, and Select faces/vertices inside polygonal area tools. The concept is similar to selection in any graphic application, although it's a little more complex in MeshLab because you're interacting with 3D space. + +My favorite selection method is with the Select faces/vertices inside polygonal area tool: + + 1. Draw a polygonal selection area encompassing the points you want to select. + 2. Once you've got a selection area, press **Q** on your keyboard to activate the selection on the points within your polygon. Selected points turn red. + 3. Press **Escape** on your keyboard to switch to view mode and rotate or reposition your point cloud to see it from a different angle. + 4. Add to your polygon selection and press **Q** to add the new points. + + + +Repeat that process until you have everything you need in your selection. + +You can refine your selection by pressing **C** to clear your polygon and start a new one. Pressing **C** doesn't clear your selection, just the selection area, so you can draw a new polygon and either add more points with **Q** or remove points you didn't mean to select with **W**. + +![Screenshot of MeshLab in which a section of the 3D image has been selected and highlighted in red, with instructions on which keystrokes to use to manipulate the highlighted area][12] + +(Seth Kenlon, [CC BY-SA 4.0][8]) + +Once you've got a selection, click on the Filters menu and browse through the Selection submenu to perform whatever action you need on your point cloud. + +### Exploring LiDAR + +MeshLab is packed with features, and this article has only covered the basics. + +There are lots of filters and lots of ways to read data in from reference sources, point cloud simplification, Z-painting, model aligning, and much more. + +Whether you're diving into LiDAR to clean up scans for your 3D printer, adjusting origin points for a carefully orchestrated tracking shot in the next blockbuster, or recording the states of historical sites over the years, MeshLab is an invaluable and unique open source tool. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/3d-scans-meshlab + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/lenovo-thinkpad-laptop-window-focus.png?itok=g0xPm2kD (young woman working on a laptop) +[2]: https://opensource.com/article/21/11/install-flatpak-linux +[3]: https://www.meshlab.net/#support +[4]: https://openheritage3d.org/ +[5]: https://opensource.com/article/20/1/what-creative-commons +[6]: https://doi.org/10.26301/t9sj-mf53 +[7]: https://opensource.com/sites/default/files/uploads/meshlab-import.jpeg (Pantheon) +[8]: https://creativecommons.org/licenses/by-sa/4.0/ +[9]: https://opensource.com/sites/default/files/meshlab-info.jpg (Mesh information) +[10]: https://opensource.com/sites/default/files/uploads/meshlab-manipulators.jpeg (Manipulators tool icon) +[11]: https://opensource.com/sites/default/files/uploads/meshlab-help.jpeg (Instructions) +[12]: https://opensource.com/sites/default/files/uploads/meshlab-select-polygon.jpeg (Selection from area) From c54d3a2da67c8e0f3e8820dcaa8acb7bc34ffd73 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 19 Dec 2021 09:35:32 +0800 Subject: [PATCH 228/244] PRF&PUB @geekpi https://linux.cn/article-14095-1.html --- ...stributed databases with ShardingSphere.md | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) rename {translated/tech => published}/20211207 Learn more about distributed databases with ShardingSphere.md (66%) diff --git a/translated/tech/20211207 Learn more about distributed databases with ShardingSphere.md b/published/20211207 Learn more about distributed databases with ShardingSphere.md similarity index 66% rename from translated/tech/20211207 Learn more about distributed databases with ShardingSphere.md rename to published/20211207 Learn more about distributed databases with ShardingSphere.md index 40301cf50f..955be134ae 100644 --- a/translated/tech/20211207 Learn more about distributed databases with ShardingSphere.md +++ b/published/20211207 Learn more about distributed databases with ShardingSphere.md @@ -3,33 +3,33 @@ [#]: author: "Trista Pan https://opensource.com/users/trista-pan" [#]: collector: "lujun9972" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14095-1.html" -了解更多关于 ShardingSphere 分布式数据库的信息 +ShardingSphere 分布式数据库简介 ====== -Apache ShardingSphere 是一个开源的分布式数据库,外加一个用户和开发人员需要的生态系统,为他们的数据库提供一个定制和云原生的体验。 -![Cloud and databsae incons][1] -Apache ShardingSphere 是一个开源的分布式数据库,外加一个用户和开发人员需要的生态系统,为他们的数据库提供一个定制和云原生的体验。在加入 Apache 基金会的三年里,ShardingSphere 核心团队与社区一起努力工作,创建了一个开源的、强大的、分布式的数据库和一个支持性生态系统。 +> Apache ShardingSphere 是一个开源的分布式数据库,它还有一个用户和开发人员需要的生态系统,为之提供了定制和云原生的体验。 -ShardingSphere 并不完全适合业界通常的简单分布式数据库中间件解决方案的模式。ShardingSphere 重新创建了分布式可插拔系统,使实际的用户实施方案得以蓬勃发展,并为社区和数据库行业贡献有价值的解决方案。 +![](https://img.linux.net.cn/data/attachment/album/202112/19/093406msdyogai9rzo2rvo.jpg) + +Apache ShardingSphere 是一个开源的分布式数据库,它还有一个用户和开发人员需要的生态系统,为之提供了定制和云原生的体验。在加入 Apache 基金会的三年里,ShardingSphere 核心团队与社区一起努力工作,创建了一个开源的、强大的、分布式的数据库和一个支持性生态系统。 + +ShardingSphere 并不完全符合业界通常的简单分布式数据库中间件解决方案的模式。ShardingSphere 重新创建了分布式可插拔系统,使实际的用户实施方案得以蓬勃发展,并为社区和数据库行业贡献有价值的解决方案。 ShardingSphere 的目标是 _Database Plus_ 概念。 ### Database Plus -Database Plus 的出发点是在零散的数据库基本服务之上建立一个标准层和生态系统层。统一的、标准化的数据库使用规范为上层应用提供了保障,企业因底层数据库碎片化而面临的挑战也得到了尽可能的减少。为了连接数据库和应用,它使用了流量和数据渲染和解析。它为用户提供了增强的核心功能,如分布式数据库、数据安全、数据库网关和压力测试。 - -ShardingSphere 为 Database Plus 使用了可插拔的内核架构。这意味着有模块化,这为用户提供了灵活性。它有几个不同的层: - - **基础层:**提供各种访问终端和访问形式,满足用户在不同场景下的需求。 - **插件层:**通过实现可扩展性提供基础设施支持。 - **功能层:**提供各种满足用户需求的功能插件,使用户在选择和组合插件时具有高度的灵活性。 - **产品层:**这是终端用户看到的层。这为他们提供了面向行业和特定场景的产品。换句话说,它为用户提供了适合他们所做的任何工作的工具。 +Database Plus 的出发点是在零散的数据库基本服务之上建立一个标准层和生态系统层。统一的、标准化的数据库使用规范为上层应用提供了保障,尽可能的减少了企业因底层数据库碎片化而面临的挑战。为了连接数据库和应用,它使用了流量和数据的渲染和解析。它为用户提供了增强的核心功能,如分布式数据库、数据安全、数据库网关和压力测试。 +ShardingSphere 为 Database Plus 使用了可插拔的内核架构。这意味着模块化,这为用户提供了灵活性。它有几个不同的层: + * **基础层:** 提供各种访问终端和访问形式,满足用户在不同场景下的需求。 + * **插件层:** 通过实现可扩展性提供基础设施支持。 + * **功能层:** 提供各种满足用户需求的功能插件,使用户在选择和组合插件时具有高度的灵活性。 + * **产品层:** 这是终端用户看到的层。这为他们提供了面向行业和特定场景的产品。换句话说,它为用户提供了适合他们所做的任何工作的工具。 ![Database Plus platform][2] @@ -55,7 +55,7 @@ ShardingSphere JDBC 和 ShardingSphere Proxy 经过两年的打磨和测试, ### 分布式治理 -在 ShardingSphere 生态系统中,计算和存储是分开的,因此有能力对数据库进行分布式治理,所以你可以维护许多存储节点、计算节点,实施断路器,并确保高可用性。 +在 ShardingSphere 生态系统中,计算和存储是分开的,因此具备对数据库进行分布式治理的能力,所以你可以维护许多存储节点、计算节点,实施断路器,并确保高可用性。 ![Distributed governance][6] @@ -80,7 +80,7 @@ via: https://opensource.com/article/21/12/apache-shardingsphere 作者:[Trista Pan][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 163f1eb9b1bac27c54f9a4a21d22a7269921be1a Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 19 Dec 2021 10:05:37 +0800 Subject: [PATCH 229/244] PRF&PUB @geekpi https://linux.cn/article-14096-1.html --- ...inux commands for optimizing web images.md | 70 +++++-------------- 1 file changed, 18 insertions(+), 52 deletions(-) rename {translated/tech => published}/20211213 My favorite Linux commands for optimizing web images.md (84%) diff --git a/translated/tech/20211213 My favorite Linux commands for optimizing web images.md b/published/20211213 My favorite Linux commands for optimizing web images.md similarity index 84% rename from translated/tech/20211213 My favorite Linux commands for optimizing web images.md rename to published/20211213 My favorite Linux commands for optimizing web images.md index 60aa2d4012..cac431740d 100644 --- a/translated/tech/20211213 My favorite Linux commands for optimizing web images.md +++ b/published/20211213 My favorite Linux commands for optimizing web images.md @@ -3,30 +3,30 @@ [#]: author: "Ayush Sharma https://opensource.com/users/ayushsharma" [#]: collector: "lujun9972" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14096-1.html" -我最喜欢的优化网络图片的 Linux 命令 +用 Linux 命令优化网页图片 ====== -为网络上的缩略图和横幅图片生成经过调整和优化的图片。 -![Digital creative of a browser on the internet][1] -以前我在处理网络工作时,我对图像敬而远之。处理和优化图像既不精确又费时。 +> 为网页上的缩略图和横幅图片生成经过调整和优化的图片。 + +![](https://img.linux.net.cn/data/attachment/album/202112/19/100432i8qzjr6t22g68uoi.jpg) + +以前我在处理网页工作时,我对图像敬而远之。处理和优化图像既不精确又费时。 后来我发现了一些命令,改变了我的想法。为了创建网页,我使用 Jekyll,所以我在说明中包括了它。然而,这些命令也可以用于其他静态网站生成器。 ### Linux 上的图像命令 -对我来说有用的命令是 `optipng`、`jpegoptim`,当然还有古老的 `imagemagick`。它们一起使处理图像变得容易管理,甚至是自动化。 +对我来说有用的命令是 `optipng`、`jpegoptim`,当然还有古老的 `imagemagick`。它们一起使处理图像变得容易管理,甚至可以自动化。 下面是我如何使用这些命令实现我的解决方案的概述。我把文章图片放在我的 `static/images` 文件夹中。在那里,我生成了所有 PNG 和 JPG 图片的两个副本: 1. 一个裁剪过的缩略图版本,尺寸为 422×316 2. 一个更大的横幅版本,尺寸为 1024×768 - - 然后,我把每个副本(缩略图和横幅)放入自己的文件夹,并利用 Jekyll 的自定义变量来确定文件夹路径。下面我将更详细地介绍这些步骤中的每一步。 #### 安装 @@ -35,7 +35,6 @@ 在 Fedora、CentOS、Mageia 和类似系统上: - ``` $ sudo dnf install optipng jpegoptim imagemagick ``` @@ -48,7 +47,6 @@ $ sudo apt install optipng jpegoptim imagemagick 在 macOS 上,使用 [MacPorts][2] 或 [Homebrew][3]: - ``` brew install optipng jpegoptim imagemagick ``` @@ -59,53 +57,37 @@ brew install optipng jpegoptim imagemagick 安装完这些命令后,我在 `static/images` 下创建了新的文件夹。生成的缩略图放在 `img-thumbs`,横幅放在 `img-normal`。 - ``` - - $ cd static/images $ mkdir -p img-thumbs img-normal - ``` 创建了文件夹后,我把所有的 GIF、SVG、JPG 和 PNG 文件复制到这两个文件夹。我把 GIF 和 SVG 原封不动地用于缩略图和横幅图片。 - ``` - - $ cp content/*.gif img-thumbs/; cp content/*.gif img-normal/ $ cp content/*.svg img-thumbs/; cp content/*.svg img-normal/ $ cp content/*.jpg img-thumbs/; cp content/*.jpg img-normal/ $ cp content/*.png img-thumbs/; cp content/*.png img-normal/ - ``` ### 处理缩略图 -为了调整和优化缩略图的大小,我使用了我的三个命令。 +为了调整和优化缩略图的大小,我使用了三个命令。 我使用 `ImageMagick` 的 `mogrify` 命令来调整 JPG 和 PNG 的大小。因为我希望缩略图是 422×316,所以命令看起来像这样: - ``` - - $ cd img-thumbs $ mogrify -resize 422x316 *.png $ mogrify -format jpg -resize 422x316 *.jpg - ``` 现在我用 `optipng` 优化 PNG,用 `jpegoptim` 优化 JPG: - ``` - - $ for i in *.png; do optipng -o5 -quiet "$i"; done $ jpegoptim -sq *.jpg - ``` 在上述命令中: @@ -113,65 +95,49 @@ $ jpegoptim -sq *.jpg * 对于 `optipng`,`-o5` 开关设置了优化的级别,0 是最低的。 * 对于`jpegoptim`,`-s` 剥离所有图像元数据,`-q` 设置安静模式。 - - ### 处理横幅 我处理横幅图片的方法与处理缩略图的方法基本相同,除了尺寸外,横幅图片的尺寸为 1024×768。 - ``` - - $ cd .. $ cd img-normal $ mogrify -resize 1024x768 *.png $ mogrify -format jpg -resize 1024x768 *.jpg $ for i in *.png; do optipng -o5 -quiet "$i"; done $ jpegoptim -sq *.jpg - ``` ### 配置 Jekyll 中的路径 -`img-thumbs` 目录现在包含我的缩略图,`img-normal` 包含横幅。为了使我的生活更轻松,我在Jekyll的 `_config.yml` 中把它们都设置为自定义变量。 - +`img-thumbs` 目录现在包含我的缩略图,`img-normal` 包含横幅。为了更轻松一些,我在Jekyll的 `_config.yml` 中把它们都设置为自定义变量。 ``` - - content-images-path: /static/images/img-normal/ content-thumbs-images-path: /static/images/img-thumbs/ - ``` 使用这些变量很简单。当我想显示缩略图时,我把 `content-thumbs-images-path` 加到图片上。当我想显示完整的横幅时,我在前面添加 `content-images-path`。 - ``` - - {% if page.banner_img %} -<img src="{{ page.banner_img | prepend: site.content-images-path | \ + Banner image for \
-{{ page.title }} {% endif %} - ``` ### 总结 我可以对我的优化命令做几个改进。 -使用 `rsync` 只复制改变过的文件到 `img-thumbs` 和 `img-normal` 是一个明显的改进。这样一来,我就不会一次又一次地重新处理文件。将这些命令添加到 [Git pre-commit hooks][5] 或 CI 流水线中是另一个有用的步骤。 +使用 `rsync` 只复制改变过的文件到 `img-thumbs` 和 `img-normal` 是一个明显的改进。这样一来,我就不会一次又一次地重新处理文件。将这些命令添加到 [Git 提交前钩子][5] 或 CI 流水线中是另一个有用的步骤。 -调整和优化图像以减少其大小,对用户和整个网络来说都是一种胜利。也许我减少图片尺寸的下一步将是 [webp][6]。 +调整和优化图像以减少其大小,对用户和整个网页来说都是一种胜利。也许我减少图片尺寸的下一步将是 [webp][6]。 更少的字节通过电线传输意味着更低的碳足迹,但这是另一篇文章。目前,用户体验的胜利已经足够好了。 -* * * - -_本文原载于[作者的博客][7],已获授权转载。_ +本文原载于[作者的博客][7],已获授权转载。 -------------------------------------------------------------------------------- @@ -180,7 +146,7 @@ via: https://opensource.com/article/21/12/optimize-web-images-linux 作者:[Ayush Sharma][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From cd60e164c64b8f4f2f226bc14025d1d2964a4671 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 19 Dec 2021 10:28:51 +0800 Subject: [PATCH 230/244] APL --- sources/tech/20210608 Play Doom on Kubernetes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210608 Play Doom on Kubernetes.md b/sources/tech/20210608 Play Doom on Kubernetes.md index 38f85bc387..be74b12de2 100644 --- a/sources/tech/20210608 Play Doom on Kubernetes.md +++ b/sources/tech/20210608 Play Doom on Kubernetes.md @@ -2,7 +2,7 @@ [#]: via: (https://opensource.com/article/21/6/kube-doom) [#]: author: (Jessica Cherry https://opensource.com/users/cherrybomb) [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 7230c493df04be1b3329a8b17e14026aa4a37441 Mon Sep 17 00:00:00 2001 From: MjSeven Date: Sun, 19 Dec 2021 18:22:44 +0800 Subject: [PATCH 231/244] Translating --- sources/tech/20200617 What happens when you update your DNS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20200617 What happens when you update your DNS.md b/sources/tech/20200617 What happens when you update your DNS.md index 0a17d1d621..73344f852d 100644 --- a/sources/tech/20200617 What happens when you update your DNS.md +++ b/sources/tech/20200617 What happens when you update your DNS.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (MjSeven) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 8964014b68d478427adaf8ed8d77a3cbd9b82cf5 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Mon, 20 Dec 2021 05:04:33 +0800 Subject: [PATCH 232/244] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211220=20?= =?UTF-8?q?Getting=20Nostalgic=20With=20Common=20Desktop=20Environment=20o?= =?UTF-8?q?n=20a=20Modern=20Linux=20Distro?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211220 Getting Nostalgic With Common Desktop Environment on a Modern Linux Distro.md --- ...op Environment on a Modern Linux Distro.md | 97 +++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 sources/tech/20211220 Getting Nostalgic With Common Desktop Environment on a Modern Linux Distro.md diff --git a/sources/tech/20211220 Getting Nostalgic With Common Desktop Environment on a Modern Linux Distro.md b/sources/tech/20211220 Getting Nostalgic With Common Desktop Environment on a Modern Linux Distro.md new file mode 100644 index 0000000000..7aa15e3b51 --- /dev/null +++ b/sources/tech/20211220 Getting Nostalgic With Common Desktop Environment on a Modern Linux Distro.md @@ -0,0 +1,97 @@ +[#]: subject: "Getting Nostalgic With Common Desktop Environment on a Modern Linux Distro" +[#]: via: "https://itsfoss.com/common-desktop-environment/" +[#]: author: "Bill Dyer https://itsfoss.com/author/bill/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Getting Nostalgic With Common Desktop Environment on a Modern Linux Distro +====== + +Recently, I installed the old [Common Desktop Environment (CDE)][1] on a [SparkyLinux][2] machine. It was the old window environment for [UNIX][3] back in the 1990s. I kept using it until it was finally discontinued in the early 2000s. I remember using CDE on [AIX][4], [HP-UX][5], [DG/UX][6], and I even got it to run on Slackware and RedHat distros running on a ‘386. + +![CDE desktop][7] + +Installing CDE had no real purpose, but I miss it sometimes. Feeling a bit nostalgic, I decided it would be nice to see again. It can’t handle some of the newer, more powerful programs today, but it was still nice to play with. How easily I can be entertained. + +Here’s a bit of history for you. CDE was a product of cooperation between companies – jointly developed by Hewlett-Packard, IBM, Novell, and Sun Microsystems. It was adopted as the standard operating environment by these companies and many others in the UNIX workstation market. + +![HP9000 workstation with CDE login screen | Image Credit Wikimedia][8] + +The color scheme wasn’t much to look at, but it could be changed. I recall that CDE was a bit buggy too. The Help Manager was rarely complete, so we always had to resort to man pages from xterm. + +![CDE help manager][9] + +The calendar never worked right. It would display dates fine but saving an event could turn out to be an impossible event in itself. + +CDE used the **dtwm** window manager, which was an X Window System window manager based upon the [Motif][10] window manager, `mwm`. It provided **mwm** compatible window management functionality to the user or programmer, including functions that facilitated control of elements of window state such as placement, size, icon/normal display, and input-focus ownership. + +In addition to window control, **dtwm** provided workspace management. Workspaces provide a way of grouping together logically related windows. Each workspace was shown independent of the other workspaces so that only those windows related to the immediate task were visible. Workspaces were an effective tool to organize windows by task and make efficient use of screen real estate. + +![CDE task bar][11] + +Today, we do these things with almost hardly a thought, but back then, it was rather novel (especially since it ran on different UNIX systems) and, despite some of the bugs CDE had, it was much better than [Windows 3.11][12], which was commonly used in the early-mid 1990’s. + +### For the More Adventurous + +![CDE on Linux in 2012 | Image Credit Wikimedia][13] + +It is the custom of [It’s FOSS][14] to go into details on how to install and run the package being featured. I’ll keep to that tradition, but with the warning that CDE depends on on older X code – you might not want that on your machine. To that end, I’ll tell you where you can find it, along with some documentation, and then you can decide. + +CDE is available in the SparkyLinux repository. SparkyLinux is a Debian derivative so it should work with some tweaking. Personally, I don’t like to “cross-pollenate” (adding the SparkyLinux repository to an Ubuntu system, for example), so I’ll leave this to the reader to perform due research before installing this on a distro other than SparkyLinux. + +SparkyLinux has two CDE packages. One is the older standard and the other a retro using more modern code. The older package, based on older X Windows code, is called simply: [Common Desktop Environment (CDE)][15]. + +The second package is called: [Not so Common Desktop Environment (NsCDE)][16] has the retro CDE look (and partial feel) but with a more powerful and flexible framework, under the hood, so more advanced software, in use today, can run on it. + +There is a [Reddit article][17] that explains how to add the SparklyLinux repository to your system and how to install it. Since there are two CDE packages on SparkyLinux, be sure to review the two wiki links fro CDE and NsCDE, so you’re sure to get the package you want. + +For RedHat, Fedora, and CentOS folks, there is an [RPM package][18] available. Most of the major work has been done, so it looks to have been sitting untouched for some time. However, it’s still being monitored and a little activity has been recorded over the last few months. + +![][19] + +CDE used to be proprietary software, but it was released as open source software in 2012. You can check out a major [SourceForge project][20] which is quite active. The same project also houses a copy of all of the [documentation][21]. For history buffs, this is worth checking out. + +### Conclusion + +CDE was once considered the de-facto standard windowing environment on UNIX systems. Seeing it resurrected as open-source projects was a pleasure and I was able to enjoy reliving a little bit of my early years in UNIX. + +[XFCE][22] was an open-source fork of CDE in 1996. It looks, or acts, nothing like CDE today, but it, and other similar projects laid the groundwork for the systems we have today. That’s a good thing. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/common-desktop-environment/ + +作者:[Bill Dyer][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/bill/ +[b]: https://github.com/lujun9972 +[1]: https://en.wikipedia.org/wiki/Common_Desktop_Environment +[2]: https://sparkylinux.org/ +[3]: https://en.wikipedia.org/wiki/Unix +[4]: https://en.wikipedia.org/wiki/IBM_AIX +[5]: https://en.wikipedia.org/wiki/HP-UX +[6]: https://en.wikipedia.org/wiki/DG/UX +[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/cde_desktop-4.jpg?resize=786%2C566&ssl=1 +[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/HP9000-Workstation_with_CDE.webp?resize=800%2C630&ssl=1 +[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/cde_helpmgr.jpg?resize=652%2C762&ssl=1 +[10]: https://en.wikipedia.org/wiki/Motif_Window_Manager +[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/cde_taskbar.jpg?resize=602%2C62&ssl=1 +[12]: https://en.wikipedia.org/wiki/Windows_3.1x +[13]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/CDE_2012_on_Linux.png?resize=800%2C604&ssl=1 +[14]: https://itsfoss.com/ +[15]: https://wiki.sparkylinux.org/doku.php/cde +[16]: https://wiki.sparkylinux.org/doku.php/nscde_desktop +[17]: https://www.reddit.com/r/linux/comments/jv7zra/guide_the_easiest_way_to_install_cde_common/ +[18]: https://github.com/zssfred/cderpm +[19]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/common-desktop-environment.png?resize=800%2C450&ssl=1 +[20]: https://sourceforge.net/p/cdesktopenv/wiki/Home/ +[21]: https://sourceforge.net/p/cdesktopenv/wiki/Documentation/ +[22]: https://en.wikipedia.org/wiki/Xfce From 3991ccdac00d7611d2f75f0f4c96b428bc5de046 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Mon, 20 Dec 2021 05:04:49 +0800 Subject: [PATCH 233/244] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211219=20?= =?UTF-8?q?Open=20source=20file=20sharing=20with=20this=20Linux=20tool?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211219 Open source file sharing with this Linux tool.md --- ...ource file sharing with this Linux tool.md | 135 ++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 sources/tech/20211219 Open source file sharing with this Linux tool.md diff --git a/sources/tech/20211219 Open source file sharing with this Linux tool.md b/sources/tech/20211219 Open source file sharing with this Linux tool.md new file mode 100644 index 0000000000..67e982259d --- /dev/null +++ b/sources/tech/20211219 Open source file sharing with this Linux tool.md @@ -0,0 +1,135 @@ +[#]: subject: "Open source file sharing with this Linux tool" +[#]: via: "https://opensource.com/article/21/12/file-sharing-linux-samba" +[#]: author: "Don Watkins https://opensource.com/users/don-watkins" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Open source file sharing with this Linux tool +====== +Samba is a flexible file sharing tool that unites all the different +platforms you might have running in your organization. +![Files in a folder][1] + +In the early days of my Linux experience, I was the technology director of a small PreK-12 school district in the state of New York. Our technology budget was always stretched to the limit. We were a Windows 2000 Active Directory Domain, but we had limited central server disk space and no teacher home directories. In addition, we experienced a dozen or so hard disk failures for staff computers. + +I was looking for a way to preserve staff work at a minimal cost. That's when I discovered Samba. I used Linux up to that point for content filtering, having no idea that our Windows workstations could connect to a server and keep their files backed up. + +The [Samba project][2] has been around since 1992. The project was 10 years old when I started experimenting with it and knew nothing about how to configure it. I bought a book and read about how to implement it, then I took one of the older computers from our computer closet, purchased a 300-gigabyte Seagate IDE drive, installed Linux, and configured Samba. I used a simple configuration, and it worked. After showing it to one of our IT assistants, we deployed the solution. The hard drive failure problem continued, but our staff no longer had to worry about losing all their hard work. + +Samba is licensed with [GPL][3] and is widely available on most Linux distributions. Samba has excellent [documentation][4], and Fedora users can consult documentation about [Samba on Fedora][5]. + +### Install Samba on Linux + +You can install Samba using your distribution's package manager. + +On Fedora, CentOS, RHEL, Mageia, and similar: + +`$ sudo dnf install samba` + +On Debian, Linux Mint, and similar: + +`$ sudo apt install samba` + +### Create a shared folder with Samba + +Creating a simple shared folder only takes five steps. + +1\. Create a directory on your Linux server where you want users to be able to save shared files. This directory can be anywhere on the server: in `/home` or `/opt` or whatever works best for you. I use my home directory, and I call the shared directory `sambashare`. + +`$ mkdir /home/don/sambashare` + +On Fedora and other distributions running SELinux, you must give security clearance to this shared directory: + + +``` + + +$ sudo semanage fcontext --add --type "samba_share_t" ~/sambashare +$ sudo restorecon -R ~/sambashare + +``` + +2\. Edit the Samba configuration file with Nano or the text editor of your choice. + +`$ sudo nano /etc/samba/smb.conf` + +Add this to the bottom of the `smb.conf` file, replacing my example path of `/home/don/sambashare` with the location of your own shared directory: + + +``` + + +[sambashare] +        comment = Samba on Linux        +        path = /home/don/sambashare +        read only = no +        browsable = yes + +``` + +If you're using Nano, press **Ctrl-O** and then **Return** to save and **Ctrl-X** to exit. + +3\. Start or restart the Samba service, depending on your distribution. + +On Fedora and similar, services don't start without your explicit permission, so enable Samba to start now, and on boot: + +`$ sudo systemctl enable –now smb.conf` + +On Debian and similar, Samba starts after installation by default, so you must restart it now: + +`$ sudo service smbd restart` + +4\. Update your firewall rules to allow access to your Samba share. How you do this depends on what firewall your system uses. + +If you're running firewalld: + + +``` + + +$ sudo firewall-cmd --permanent --add-service=samba +$ sudo firewall-cmd --reload + +``` + +If you're running UFW: + +`$ sudo ufw allow samba` + +5\. Now you need to set up a password to access your Samba share. The username (don, in my example) must belong to an account on your system. + +`$ sudo smbpasswd -a don` + +I place a simple `README` file in each Samba share so users understand that the directory is located on the server, that they must be on the VPN to access it from home, and so on. + +### Accessing Samba from Windows and Mac + +On a Windows computer, open the file manager (Windows Explorer) and edit the file path to `\ip-address-of-the-Linux-computer\sambashare`. You're prompted for the Samba share password, and then the files in the `sambashare` directory appear in your file manager window, just as if they existed locally on your desktop. You can begin storing your files on this new shared directory on your network. + +On a macOS computer, go to the Finder menu and select Go. In the dialogue box that appears, type in `smb://ip-address/sambashare` and follow the prompts to enter your Samba password. + +### Samba means sharing + +Samba makes sharing files easy. You can use many other schemes within Samba to create shared locations, including common folders for groups of users, inboxes that accept incoming files only, and whatever else you might need. It's open source, flexible, and it unites all the different platforms you might have running in your organization. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/file-sharing-linux-samba + +作者:[Don Watkins][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/don-watkins +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/files_documents_paper_folder.png?itok=eIJWac15 (Files in a folder) +[2]: https://www.samba.org/ +[3]: https://www.samba.org/samba/docs/GPL.html +[4]: https://www.samba.org/samba/docs/ +[5]: https://docs.fedoraproject.org/en-US/quick-docs/samba/ From 703b397c8ac8bb0a8fbd83cc0ebf31909e768b03 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Mon, 20 Dec 2021 05:04:59 +0800 Subject: [PATCH 234/244] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211219=20?= =?UTF-8?q?My=20favorite=20MyPaint=20features=20for=20digital=20painting?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211219 My favorite MyPaint features for digital painting.md --- ...e MyPaint features for digital painting.md | 144 ++++++++++++++++++ 1 file changed, 144 insertions(+) create mode 100644 sources/tech/20211219 My favorite MyPaint features for digital painting.md diff --git a/sources/tech/20211219 My favorite MyPaint features for digital painting.md b/sources/tech/20211219 My favorite MyPaint features for digital painting.md new file mode 100644 index 0000000000..5f0b80aae4 --- /dev/null +++ b/sources/tech/20211219 My favorite MyPaint features for digital painting.md @@ -0,0 +1,144 @@ +[#]: subject: "My favorite MyPaint features for digital painting" +[#]: via: "https://opensource.com/article/21/12/mypaint" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +My favorite MyPaint features for digital painting +====== +Whether you are a casual doodler or serious illustrator, this open +source digital painting tool is loaded with useful brushes, colors, and +other artistic features. +![Painting art on a computer screen][1] + +I don't practice drawing, so I don't expect to be able to draw well, but I do sometimes enjoy drawing, regardless of skill. One application I use when attempting to get some imagery out onto a canvas is [MyPaint][2], a digital paint application focusing on a clean interface, appealing brushes and materials, and ease of use. The ease of use part is important for artists and chronic doodlers like myself. When you sit down to do something, you generally want to do the thing, not spend hours learning new software or configuring a complex application. MyPaint manages to make it more comfortable to be in front of a blank canvas and empowering to produce something beautiful. + +### Install MyPaint on Linux + +MyPaint is [available for Linux, Windows, and macOS][3]. + +On Fedora, Mageia, and similar distributions, you can install it with your package manager: + + +``` +`$ sudo dnf install mypaint` +``` + +On Elementary, Mint, and other Debian-based distributions: + + +``` +`$ sudo apt install mypaint` +``` + +I use MyPaint as a [Flatpak][4]. + +### MyPaint interface + +The MyPaint window got designed for sparsity. Most of the application window is a blank canvas, and that's good because that's where the art happens. There's a toolbar along the top for tool selection, a properties panel on the right for configuration, and that's mostly everything you need to know to get started. + +![Mypaint UI][5] + +(Seth Kenlon, [CC BY-SA 4.0][6]) + +### Paintbrushes + +The star of any digital paint program are the paintbrushes themselves. Without a good brush engine, a paint application is just [pixel art][7] at a very high resolution. MyPaint's brush engine happens to be very good. In fact, it's too good for just one application, and so it's been borrowed and integrated into the photo editor [GIMP][8]. + +To see the brushes available to you in MyPaint, click the brush stroke icon in the bottom right corner of the window. + +![Mypaint brush stroke icon][9] + +(Seth Kenlon, [CC BY-SA 4.0][6]) + +This opens a pop-up window containing the Classic set of MyPaint brushes. Each of these provides a unique look for the paint strokes you make on the canvas. But that's not all of the brushes MyPaint has available. Click the arrow to the right of the **Classic** heading to scroll through other sets of brushes, and try not to be overwhelmed by the embarrassment of wealth you've just discovered. + +![Brushes][10] + +(Seth Kenlon, [CC BY-SA 4.0][6]) + +Try a few brushes to see how they feel and what kind of strokes they render. You can change the size of the brush tip, the sharpness of the line, the smoothness of your control, pressure, and many other attributes in the **Freehand Drawing** tab of the **Tool Options** panel on the right. + +![Freehand properties panel][11] + +(Seth Kenlon, [CC BY-SA 4.0][6]) + +Don't worry about experimentation. You can restore each brush's native settings at any time using the **Reset** button. + +### Painting with all the colors of the wind + +All the brushes in the world aren't of much use without paint. In digital painting, your media is color combined with a compositing effect imposed by the brush you're using. The same blue color swatch might produce several shades of blue as your brush strokes ramp up from a little paint to a lot of paint or as you paint over regions you've already covered, depending on your brush selection. + +The same blue color selection is responsible for both of these amorphous splotches: + +![Paint effects][12] + +(Seth Kenlon, [CC BY-SA 4.0][6]) + +The left region is a spray brush, and the right region is a watercolor brush tip with a little sponging around the edges to soften the spikes. + +Choosing the "right" color can be difficult, and in digital painting, the _method_ you're given to make your choice affects how easy it is to choose. Each artist has their own favorite color picker, and MyPaint has lots to choose from. + +![Color pickers][13] + +(Seth Kenlon, [CC BY-SA 4.0][6]) + +Your choices include the common additive color wheel with separate saturation control, a color wheel with separate chroma control, color swatches, an HSV square, a very fun liquid wash palette, and many more. + +![HCY][14] + +(Seth Kenlon, [CC BY-SA 4.0][6]) + +Take a look at them all, choose your favorite, and add the tab to the right panel. + +### Framing and exporting + +MyPaint's canvas is endless. There are no boundaries, and it's near-infinite blank space upon which you can paint. I love this because it encourages doodling and experimentation. It promotes happy little accidents as you mix colors and try out brush strokes. You never have to erase. You don't feel compelled to start a new document when you don't feel like it. You just draw. Of course, the result can be pretty chaotic, with scratches of ink and blobs of digital ink surrounding your latest Bob Ross-inspired masterpiece. Fortunately, MyPaint has an easy solution: The frame. + +![Frame button][15] + +(Seth Kenlon, [CC BY-SA 4.0][6]) + +A frame in MyPaint provides dynamic boundaries so you can export parts of your MyPaint document. When you first click the **Frame** button, a frame gets drawn around the parts of your document that's got paint on it. To draw a new frame, click the **Trash Bin** icon that appears on the canvas, and then draw a new frame around the part of your document you want to export. With the frame active, go to the **File** menu and select **Export**. + +![Set the frame][16] + +(Seth Kenlon, [CC BY-SA 4.0][6]) + +### Find your creativity + +MyPaint is one of my favorite applications for exploration. There are lots of great features and tools that I haven't covered in this article, and while those are fun to explore, it's even more fun to explore your own creativity. If you sit down for a few hours and just doodle and sketch, you never know what you might stumble onto. You may or may not end up with a great work of art, but then again, you might make something you really like. And if you're a skilled illustrator, then you're sure to welcome MyPaint, and you should share your art with other users over on the [MyPaint community Discourse server][17]. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/mypaint + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/painting_computer_screen_art_design_creative.png?itok=LVAeQx3_ (Painting art on a computer screen) +[2]: http://mypaint.org/ +[3]: http://mypaint.org/downloads/ +[4]: https://opensource.com/article/21/11/install-flatpak-linux +[5]: https://opensource.com/sites/default/files/uploads/mypaint-ui.jpg (Mypaint UI) +[6]: https://creativecommons.org/licenses/by-sa/4.0/ +[7]: https://opensource.com/article/17/2/mtpaint-pixel-art-animated-gifs +[8]: https://opensource.com/tags/gimp +[9]: https://opensource.com/sites/default/files/uploads/mypaint-button-brush.jpg (Mypaint brush stroke icon) +[10]: https://opensource.com/sites/default/files/uploads/mypaint-window-brush.jpg (Brushes) +[11]: https://opensource.com/sites/default/files/uploads/mypaint-panel-freehand.jpg (Freehand properties panel) +[12]: https://opensource.com/sites/default/files/uploads/mypaint-paint-effects.jpg (Paint effects) +[13]: https://opensource.com/sites/default/files/uploads/mypaint-button-colour.jpg (Color pickers) +[14]: https://opensource.com/sites/default/files/uploads/mypaint-colour-hsy.jpg (HCY) +[15]: https://opensource.com/sites/default/files/uploads/mypaint-button-frame.jpg (Frame button) +[16]: https://opensource.com/sites/default/files/uploads/mypaint-frame-set.jpg (Set the frame) +[17]: https://community.mypaint.org/ From f04c2158aa54a90028bc87ae9b7285a1eef6c9a5 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 20 Dec 2021 09:03:21 +0800 Subject: [PATCH 235/244] translated --- ...nu Launcher for Users Who Rely on Mouse.md | 117 ------------------ ...nu Launcher for Users Who Rely on Mouse.md | 117 ++++++++++++++++++ 2 files changed, 117 insertions(+), 117 deletions(-) delete mode 100644 sources/tech/20211214 Fly-Pie- An Interesting Menu Launcher for Users Who Rely on Mouse.md create mode 100644 translated/tech/20211214 Fly-Pie- An Interesting Menu Launcher for Users Who Rely on Mouse.md diff --git a/sources/tech/20211214 Fly-Pie- An Interesting Menu Launcher for Users Who Rely on Mouse.md b/sources/tech/20211214 Fly-Pie- An Interesting Menu Launcher for Users Who Rely on Mouse.md deleted file mode 100644 index 7b3c697614..0000000000 --- a/sources/tech/20211214 Fly-Pie- An Interesting Menu Launcher for Users Who Rely on Mouse.md +++ /dev/null @@ -1,117 +0,0 @@ -[#]: subject: "Fly-Pie: An Interesting Menu Launcher for Users Who Rely on Mouse" -[#]: via: "https://itsfoss.com/fly-pie/" -[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" -[#]: collector: "lujun9972" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Fly-Pie: An Interesting Menu Launcher for Users Who Rely on Mouse -====== - -_**Brief:** Fly-Pie is a unique menu launcher for GNOME that makes several actions accessible for a mouse-centric user._ - -An application launcher makes things convenient to quickly navigate to an active window, launch a new app, and so on. - -[Ulauncher][1] is one such application launcher to use if your Linux distribution does not offer any out-of-the-box. - -If that spikes your interest already, you will find Fly-Pie interesting! An application launcher tailored for users who primarily use a mouse and always place one hand to navigate using the mouse instead of the keyboard. - -![][2] - -### Fly-Pie: Customizable Menu That Works as a GNOME Shell Extension - -Yes, unfortunately, Fly-Pie is for GNOME users only. I’m not sure if there is something similar for KDE or other desktop environments; drop your suggestions in the comments box if you know. - -Fly-Pie focuses on providing visually interactive icons for shortcuts, applications, media controls, maximize/minimize window, workspace navigation, and more options than a traditional application launcher. - -![][3] - -It branches out to children sub-menus and grand-children menu as you expand further. So, you can have a lot of use-cases, and it should facilitate powerful navigation capabilities using the mouse or touchpad. - -![][4] - -The best thing is- it is highly customizable. You can choose a background image, color, customize the icons, branch menus, and more. - -Let me highlight some of its capabilities while mentioning the features available. - -### Features of Fly-Pie - -![][5] - -Fly-Pie gives you an exciting navigation capability if you are a mouse-centric or touchpad user. For obvious reasons, if you are a power keyboard user, this isn’t for you (but you should give it a try!). - -Here are some of the key features that you can expect with Fly-Pie: - - * Use a keyboard shortcut to launch the Fly-Pie menu - * Ability to add media controls and workspace navigation to the menu - * Add custom icons to personalize the menu for your desktop - * Add favorite apps for quick access - * Close an app window - * Check for running apps at a glance and navigate to the window - * Customize the animation for the menu to appear and disappear - * Ability to adjust opacity if you want it to stay on your screen as an overlay all the time - * Adjust the trace line connecting the sub-menus - * You can set a threshold or stroke angle to customize the user experience as per your mouse and touchpad sensitivity - * Fine grain controls to change the color, customize the icon, and more - * Ability to customize the sub-menu and the grandchildren menu - * Check livepreview to easily customize and test the menu before using it - * Select items by drawing gestures - - - -![][6] - -In addition to the features, it also adds an achievement functionality to encourage the user to explore a variety of use-cases with the menu tool. - -Here is an official YouTube video by the developer that shows it in action: - -### Installing Fly-Pie in Linux - -Considering it as a GNOME extension, you will have to first [set things to be able to use GNOME extensions on your Linux distribution][7]. - -Once you are done with the setup, you can head to [Fly-Pie’s GNOME extension page][8] and easily install the extension. - -You should be able to uninstall it from there and access the settings. If you are curious, you can explore its [GitHub page][9] for more information. - -The GitHub page also includes documentation to help you explore all of its capabilities. - -[Fly-Pie GNOME Extension][8] - -### Thoughts on Using Fly-Pie Menu Launcher - -The Fly-Pie menu is not exactly meant to replace the application launcher. However, depending on your use-case, it could come in extremely handy as an overlay-based menu or a mouse-centric launcher to access options/applications. - -Even though it is customizable, the stock looks the best and blends in easily with any type of theme you have going on in your Linux desktop. - -It is impressive to find fine-grained tweaks to customize the icons, scaling, color, transparency, and more. You can play around with it if you prefer. - -Considering I am not someone who navigates using the keyboard, Fly-Pie looks like a useful GNOME extension to have that saves time, and adds a unique point to the desktop experience. - -Even if you think this is not for you, I would suggest trying it out just to explore how it works, it is interesting indeed! - -What do you think about Fly-Pie? Feel free to share your thoughts in the comments down below. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/fly-pie/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://itsfoss.com/ulauncher/ -[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/fly-pie-feat.png?resize=800%2C556&ssl=1 -[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/fly-pie.png?resize=800%2C443&ssl=1 -[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/fly-pie-media-control.png?resize=789%2C586&ssl=1 -[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/fly-pie-global-appearance.png?resize=753%2C797&ssl=1 -[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/fly-pie-menu-editor-new.png?resize=800%2C749&ssl=1 -[7]: https://itsfoss.com/gnome-shell-extensions/ -[8]: https://extensions.gnome.org/extension/3433/fly-pie/ -[9]: https://github.com/Schneegans/Fly-Pie diff --git a/translated/tech/20211214 Fly-Pie- An Interesting Menu Launcher for Users Who Rely on Mouse.md b/translated/tech/20211214 Fly-Pie- An Interesting Menu Launcher for Users Who Rely on Mouse.md new file mode 100644 index 0000000000..f962569c5d --- /dev/null +++ b/translated/tech/20211214 Fly-Pie- An Interesting Menu Launcher for Users Who Rely on Mouse.md @@ -0,0 +1,117 @@ +[#]: subject: "Fly-Pie: An Interesting Menu Launcher for Users Who Rely on Mouse" +[#]: via: "https://itsfoss.com/fly-pie/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Fly-Pie:一个为依赖鼠标的用户提供的有趣菜单启动器 +====== + +_**简介:** Fly-Pie 是一个针对 GNOME 的菜单启动器,它使以鼠标为中心的用户可以进行一些操作。_ + +应用启动器可以方便地快速进入一个活动窗口,启动一个新的应用,等等。 + +[Ulauncher][1] 就是这样一个应用启动器,如果你的 Linux 发行版没有提供任何开箱即用的程序,那么你可以使用它。 + +如果这已经激起了你的兴趣,你会发现 Fly-Pie 很有趣!一个为主要使用鼠标的用户量身定做的应用启动器,他们总是把一只手放在鼠标上而不是键盘上进行导航。 + +![][2] + +### Fly-Pie:可定制的菜单,作为 GNOME shell 扩展使用 + +是的,不幸的是,Fly-Pie 只针对 GNOME 用户。我不确定是否有类似的东西适用于 KDE 或其他桌面环境。如果你知道的话,请在评论区提出你的建议。 + +Fly-Pie 专注于为快捷方式、应用、媒体控制、最大化/最小化窗口、工作区导航提供视觉上的互动图标,以及比传统应用启动器更多的选项。 + +![][3] + +当你进一步展开时,它就会展出子菜单和下下级菜单。所以,你可以有很多的用例,它应该能用上鼠标或触摸板的强大导航功能。 + +![][4] + +最重要的是它是高度可定制的。你可以选择背景图片、颜色、自定义图标、分支菜单等。 + +让我在提到它的一些功能时强调它的一些能力。 + +### Fly-Pie 的特点 + +![][5] + +如果你是一个以鼠标为中心的用户或触摸板用户,Fly-Pie给 你提供了一个令人兴奋的导航能力。显而易见,如果你是一个有经验的键盘用户,这并不适合你(但你应该试一下!)。 + +以下是你可以期待的 Fly-Pie 的一些主要功能: + + * 使用键盘快捷键启动 Fly-Pie 菜单 + * 能够在菜单上添加媒体控制和工作区导航 + * 添加自定义图标,为你的桌面定制个性化的菜单 + * 添加喜爱的应用,以便快速访问 + * 关闭一个应用程序窗口 + * 一目了然地检查正在运行的应用,并导航到该窗口 + * 自定义菜单的出现和消失的动画 + * 如果你想让它一直作为覆盖层留在你的屏幕上,能够调整不透明度 + * 调整连接子菜单的跟踪线 + * 你可以根据你的鼠标和触摸板的敏感度,设置一个阈值或笔触角度来定制用户体验 + * 细致的控制来改变颜色,定制图标等 + * 能够定制子菜单和下下级菜单 + * 检查实时预览,以便在使用前轻松定制和测试菜单 + * 通过绘画手势选择项目 + + + +![][6] + +除了这些功能外,它还增加了一个成就功能,以鼓励用户探索菜单工具的各种使用情况。 + +下面是开发者在YouTube上播放的一段官方视频,展示了它的操作: + +### 在 Linux 中安装 Fly-Pie + +考虑到它是一个 GNOME 扩展,你将不得不首先[进行设置,以便能够在你的 Linux 发行版上使用 GNOME 扩展][7]。 + +设置完成后,你就可以前往 [Fly-Pie 的 GNOME 扩展页面][8]并轻松地安装该扩展。 + +你应该能够在那里卸载它并访问设置。如果你很好奇,你可以探索它的 [GitHub 页面][9],了解更多信息。 + +GitHub页面还包括了帮助你探索其所有功能的文档。 + +[Fly-Pie GNOME Extension][8] + +### 关于使用 Fly-Pie 菜单启动器的想法 + +Fly-Pie 菜单并不完全是为了取代应用启动器。然而,根据你的使用情况,它可以作为一个基于覆盖层的菜单或一个以鼠标为中心的启动器来访问选项/应用,非常方便。 + +尽管它是可定制的,但原版看起来是最好的,可以很容易地与你在 Linux 桌面上的任何类型的主题融合在一起。 + +令人印象深刻的是,它可以找到细微的调整来定制图标、缩放、颜色、透明度等等。如果你愿意,你可以玩一玩。 + +考虑到我不是一个使用键盘导航的人,Fly-Pie 看起来是一个有用的 GNOME 扩展,可以节省时间,并为桌面体验增加一个独特的点。 + +即使你认为这不适合你,我也会建议你试一试,看看它是如何工作的,它确实很有趣。 + +你对 Fly-Pie 有什么看法?欢迎在下面的评论中分享你的想法。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/fly-pie/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/ulauncher/ +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/fly-pie-feat.png?resize=800%2C556&ssl=1 +[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/fly-pie.png?resize=800%2C443&ssl=1 +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/fly-pie-media-control.png?resize=789%2C586&ssl=1 +[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/fly-pie-global-appearance.png?resize=753%2C797&ssl=1 +[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/fly-pie-menu-editor-new.png?resize=800%2C749&ssl=1 +[7]: https://itsfoss.com/gnome-shell-extensions/ +[8]: https://extensions.gnome.org/extension/3433/fly-pie/ +[9]: https://github.com/Schneegans/Fly-Pie From fd20ea7a9a89afecf10def7a27cdd56d64f1a3a2 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 20 Dec 2021 09:06:45 +0800 Subject: [PATCH 236/244] translating --- ...215 4 ways you can edit a PDF with the pdftk-java command.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20211215 4 ways you can edit a PDF with the pdftk-java command.md b/sources/tech/20211215 4 ways you can edit a PDF with the pdftk-java command.md index 7ecd68fb61..f70ebac6f5 100644 --- a/sources/tech/20211215 4 ways you can edit a PDF with the pdftk-java command.md +++ b/sources/tech/20211215 4 ways you can edit a PDF with the pdftk-java command.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/21/12/edit-pdf-linux-pdftk" [#]: author: "Seth Kenlon https://opensource.com/users/seth" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From d016e54eea7e9d616a87a5fb102643fd017f7c90 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 20 Dec 2021 10:05:28 +0800 Subject: [PATCH 237/244] Revert "APL" This reverts commit cd60e164c64b8f4f2f226bc14025d1d2964a4671. --- sources/tech/20210608 Play Doom on Kubernetes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210608 Play Doom on Kubernetes.md b/sources/tech/20210608 Play Doom on Kubernetes.md index be74b12de2..38f85bc387 100644 --- a/sources/tech/20210608 Play Doom on Kubernetes.md +++ b/sources/tech/20210608 Play Doom on Kubernetes.md @@ -2,7 +2,7 @@ [#]: via: (https://opensource.com/article/21/6/kube-doom) [#]: author: (Jessica Cherry https://opensource.com/users/cherrybomb) [#]: collector: (lujun9972) -[#]: translator: (wxy) +[#]: translator: ( ) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 888f3fe2f353d77c8859bad6117d01f07bbde9f6 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 20 Dec 2021 10:05:36 +0800 Subject: [PATCH 238/244] APL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 放弃 --- .../tech/20210608 Play Doom on Kubernetes.md | 232 ++++++++++++++++++ 1 file changed, 232 insertions(+) create mode 100644 translated/tech/20210608 Play Doom on Kubernetes.md diff --git a/translated/tech/20210608 Play Doom on Kubernetes.md b/translated/tech/20210608 Play Doom on Kubernetes.md new file mode 100644 index 0000000000..38f85bc387 --- /dev/null +++ b/translated/tech/20210608 Play Doom on Kubernetes.md @@ -0,0 +1,232 @@ +[#]: subject: (Play Doom on Kubernetes) +[#]: via: (https://opensource.com/article/21/6/kube-doom) +[#]: author: (Jessica Cherry https://opensource.com/users/cherrybomb) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Play Doom on Kubernetes +====== +Terminate pods while having fun by playing Kube DOOM. +![A cat under a keyboard.][1] + +Do you ever feel nostalgic for Doom and other blocky video games, the ones that didn't require much more than a mouse and the hope that you could survive on a LAN with your friends? You know what I'm talking about; the days when your weekends were consumed with figuring out how you could travel with your desktop and how many Mountain Dews you could fit in your cargo pants pockets? If this memory puts a warm feeling in your heart, well, this article is for you. + +Get ready to play Doom again, only this time you'll be playing for a legitimate work reason: doing chaos engineering. I'll be using my [fork of Kube DOOM][2] (with a new Helm chart because that's how I sometimes spend my weekends). I also have a pull request with the [original Kube DOOM][3] creator that I'm waiting to hear about. + +The first article in this series explained [what chaos engineering is][4], and the second demonstrated how to get your [system's steady state][5] so that you can compare it against a chaos state. In the next few articles, I introduced some chaos engineering tools you can use: [Litmus for testing][6] arbitrary failures and experiments in your Kubernetes cluster; [Chaos Mesh][7], an open source chaos orchestrator with a web user interface; and [Kube-monkey][8] for stress-testing your systems by scheduling random termination pods in your cluster. + +In this sixth article, I'll use Pop!_OS 20.04, Helm 3, Minikube 1.14.2, a VNC viewer, and Kubernetes 1.19. + +### Configure Minikube + +If you haven't already, [install Minikube][9] in whatever way that makes sense for your environment. If you have enough resources, I recommend giving your virtual machine a bit more than the default memory and CPU power: + + +``` +$ minikube config set memory 8192 +❗  These changes will take effect upon a minikube delete and then a minikube start +$ minikube config set cpus 6 +❗  These changes will take effect upon a minikube delete and then a minikube start +``` + +Then start and check the status of your system: + + +``` +$ minikube start +😄  minikube v1.14.2 on Debian bullseye/sid +🎉  minikube 1.19.0 is available! Download it: +💡  To disable this notice, run: 'minikube config set WantUpdateNotification false' + +✨  Using the docker driver based on user configuration +👍  Starting control plane node minikube in cluster minikube +🔥  Creating docker container (CPUs=6, Memory=8192MB) ... +🐳  Preparing Kubernetes v1.19.0 on Docker 19.03.8 ... +🔎  Verifying Kubernetes components... +🌟  Enabled addons: storage-provisioner, default-storageclass +🏄  Done! kubectl is now configured to use "minikube" by default +$ minikube status +minikube +type: Control Plane +host: Running +kubelet: Running +apiserver: Running +kubeconfig: Configured +``` + +### Preinstall pods with Helm + +Before moving forward, you'll need to deploy some pods into your cluster. To do this, I generated a simple Helm chart and changed the replicas in my values file from 1 to 8. + +If you need to generate a Helm chart, you can read my article on [creating a Helm chart][10] for guidance. I created a Helm chart named `nginx` and created a namespace to install my chart into using the commands below. + +Create a namespace: + + +``` +`$ kubectl create ns nginx` +``` + +Install the chart in your new namespace with a name: + + +``` +$ helm install chaos-pods nginx -n nginx + +NAME: chaos-pods +LAST DEPLOYED: Sun May 23 10:15:52 2021 +NAMESPACE: nginx +STATUS: deployed +REVISION: 1 +NOTES: +1\. Get the application URL by running these commands: +  export POD_NAME=$(kubectl get pods --namespace nginx -l "app.kubernetes.io/name=nginx,app.kubernetes.io/instance=chaos-pods" -o jsonpath="{.items[0].metadata.name}") +  export CONTAINER_PORT=$(kubectl get pod --namespace nginx $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") +  echo "Visit to use your application" +  kubectl --namespace nginx port-forward $POD_NAME 8080:$CONTAINER_PORT +``` + +### Install Kube DOOM + +You can use any [Virtual Network Computer][11] (VNC) viewer you want; I installed [TigerVNC][12] on my Linux box. There are several ways you can set up Kube DOOM. Before I generated my Helm chart, you could set it up with [kind][13] or use it locally with Docker, and the [README][14] contains instructions for those uses. + +Get started with a `git clone`: + + +``` +$ git clone [git@github.com][15]:Alynder/kubedoom.git +Cloning into 'kubedoom'... +``` + +Then change directory into the `kubedoom/helm` folder: + + +``` +`$ cd kubedoom/helm/` +``` + +Since the base values file is already set up correctly, you just need to run a single install command: + + +``` +$ helm install kubedoom kubedoom/ -n kubedoom +NAME: kubedoom +LAST DEPLOYED: Mon May 31 11:16:58 2021 +NAMESPACE: kubedoom +STATUS: deployed +REVISION: 1 +NOTES: +1\. Get the application URL by running these commands: +  export NODE_PORT=$(kubectl get --namespace kubedoom -o jsonpath="{.spec.ports[0].nodePort}" services kubedoom-kubedoom-chart) +  export NODE_IP=$(kubectl get nodes --namespace kubedoom -o jsonpath="{.items[0].status.addresses[0].address}") +  echo http://$NODE_IP:$NODE_PORT +``` + +Everything should be installed, set up, and ready to go. + +### Play with Kube DOOM + +Now you just need to get in there, run a few commands, and start playing your new chaos video game. The first command is a port forward, followed by the VNC viewer connection command. The VNC viewer connection needs a password, which is `idbehold`. + +Find your pod for the port forward: + + +``` +$ kubectl get pods -n kubedoom +NAME                                       READY   STATUS    RESTARTS   AGE +kubedoom-kubedoom-chart-676bcc5c9c-xkwpp   1/1     Running   0          68m +``` + +Run the `port-forward` command using your pod name: + + +``` +$  kubectl port-forward  kubedoom-kubedoom-chart-676bcc5c9c-xkwpp 5900:5900 -n kubedoom +Forwarding from 127.0.0.1:5900 -> 5900 +Forwarding from [::1]:5900 -> 5900 +``` + +Everything is ready to play, so you just need to run the VNC viewer command (shown below with output): + + +``` +$  vncviewer viewer localhost:5900 + +TigerVNC Viewer 64-bit v1.10.1 +Built on: 2020-04-09 06:49 +Copyright (C) 1999-2019 TigerVNC Team and many others (see README.rst) +See for information on TigerVNC. + +Mon May 31 11:33:23 2021 + DecodeManager: Detected 64 CPU core(s) + DecodeManager: Creating 4 decoder thread(s) + CConn:       Connected to host localhost port 5900 +``` + +Next, you'll see the password request, so enter it (`idbehold`, as given above). + +![VNC authentication][16] + +(Jess Cherry, [CC BY-SA 4.0][17]) + +Once you are logged in, you should be able to walk around and see your enemies with pod names. + +![Kube Doom pods][18] + +(Jess Cherry, [CC BY-SA 4.0][17]) + +I'm terrible at this game, so I use some cheats to have a little more fun: + + * Type `idspispopd` to walk straight through a wall to get to your army of pods. + * Can't handle the gun? That's cool; I'm bad at it, too. If you type `idkfa` and press the number **5**, you'll get a better weapon. + + + +This is what it looks like when you kill something (I used [k9s][19] for this view). + +![Killing pods in Kube DOOM][20] + +(Jess Cherry, [CC BY-SA 4.0][17]) + +### Final notes + +Because this application requires a cluster-admin role, you have to really pay attention to the names of the pods—you might run into a kube-system pod, and you'd better run away. If you kill one of those pods, you will kill an important part of the system. + +I love this application because it's the quickest gamified way to do chaos engineering. It did remind me of how bad I was at this video game, but it was hilarious to try it. Happy hunting! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/6/kube-doom + +作者:[Jessica Cherry][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/cherrybomb +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc-lead_cat-keyboard.png?itok=fuNmiGV- (A cat under a keyboard.) +[2]: https://github.com/Alynder/kubedoom +[3]: https://github.com/storax/kubedoom +[4]: https://opensource.com/article/21/5/11-years-kubernetes-and-chaos +[5]: https://opensource.com/article/21/5/get-your-steady-state-chaos-grafana-and-prometheus +[6]: https://opensource.com/article/21/5/total-chaos-litmus +[7]: https://opensource.com/article/21/5/get-meshy-chaos-mesh +[8]: https://opensource.com/article/21/6/chaos-kubernetes-kube-monkey +[9]: https://minikube.sigs.k8s.io/docs/start/ +[10]: https://opensource.com/article/20/5/helm-charts +[11]: https://en.wikipedia.org/wiki/Virtual_Network_Computing +[12]: https://tigervnc.org/ +[13]: https://kind.sigs.k8s.io/ +[14]: https://github.com/Alynder/kubedoom/blob/master/README.md +[15]: mailto:git@github.com +[16]: https://opensource.com/sites/default/files/uploads/vnc-password.png (VNC authentication) +[17]: https://creativecommons.org/licenses/by-sa/4.0/ +[18]: https://opensource.com/sites/default/files/uploads/doom-pods.png (Kube Doom pods) +[19]: https://opensource.com/article/20/5/kubernetes-administration +[20]: https://opensource.com/sites/default/files/uploads/doom-pods_kill.png (Killing pods in Kube DOOM) From 0f6db4b052538698dc009f59b42f84f1c0f302c5 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 20 Dec 2021 10:06:34 +0800 Subject: [PATCH 239/244] APL --- .../tech/20210608 Play Doom on Kubernetes.md | 232 ------------------ 1 file changed, 232 deletions(-) delete mode 100644 translated/tech/20210608 Play Doom on Kubernetes.md diff --git a/translated/tech/20210608 Play Doom on Kubernetes.md b/translated/tech/20210608 Play Doom on Kubernetes.md deleted file mode 100644 index 38f85bc387..0000000000 --- a/translated/tech/20210608 Play Doom on Kubernetes.md +++ /dev/null @@ -1,232 +0,0 @@ -[#]: subject: (Play Doom on Kubernetes) -[#]: via: (https://opensource.com/article/21/6/kube-doom) -[#]: author: (Jessica Cherry https://opensource.com/users/cherrybomb) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Play Doom on Kubernetes -====== -Terminate pods while having fun by playing Kube DOOM. -![A cat under a keyboard.][1] - -Do you ever feel nostalgic for Doom and other blocky video games, the ones that didn't require much more than a mouse and the hope that you could survive on a LAN with your friends? You know what I'm talking about; the days when your weekends were consumed with figuring out how you could travel with your desktop and how many Mountain Dews you could fit in your cargo pants pockets? If this memory puts a warm feeling in your heart, well, this article is for you. - -Get ready to play Doom again, only this time you'll be playing for a legitimate work reason: doing chaos engineering. I'll be using my [fork of Kube DOOM][2] (with a new Helm chart because that's how I sometimes spend my weekends). I also have a pull request with the [original Kube DOOM][3] creator that I'm waiting to hear about. - -The first article in this series explained [what chaos engineering is][4], and the second demonstrated how to get your [system's steady state][5] so that you can compare it against a chaos state. In the next few articles, I introduced some chaos engineering tools you can use: [Litmus for testing][6] arbitrary failures and experiments in your Kubernetes cluster; [Chaos Mesh][7], an open source chaos orchestrator with a web user interface; and [Kube-monkey][8] for stress-testing your systems by scheduling random termination pods in your cluster. - -In this sixth article, I'll use Pop!_OS 20.04, Helm 3, Minikube 1.14.2, a VNC viewer, and Kubernetes 1.19. - -### Configure Minikube - -If you haven't already, [install Minikube][9] in whatever way that makes sense for your environment. If you have enough resources, I recommend giving your virtual machine a bit more than the default memory and CPU power: - - -``` -$ minikube config set memory 8192 -❗  These changes will take effect upon a minikube delete and then a minikube start -$ minikube config set cpus 6 -❗  These changes will take effect upon a minikube delete and then a minikube start -``` - -Then start and check the status of your system: - - -``` -$ minikube start -😄  minikube v1.14.2 on Debian bullseye/sid -🎉  minikube 1.19.0 is available! Download it: -💡  To disable this notice, run: 'minikube config set WantUpdateNotification false' - -✨  Using the docker driver based on user configuration -👍  Starting control plane node minikube in cluster minikube -🔥  Creating docker container (CPUs=6, Memory=8192MB) ... -🐳  Preparing Kubernetes v1.19.0 on Docker 19.03.8 ... -🔎  Verifying Kubernetes components... -🌟  Enabled addons: storage-provisioner, default-storageclass -🏄  Done! kubectl is now configured to use "minikube" by default -$ minikube status -minikube -type: Control Plane -host: Running -kubelet: Running -apiserver: Running -kubeconfig: Configured -``` - -### Preinstall pods with Helm - -Before moving forward, you'll need to deploy some pods into your cluster. To do this, I generated a simple Helm chart and changed the replicas in my values file from 1 to 8. - -If you need to generate a Helm chart, you can read my article on [creating a Helm chart][10] for guidance. I created a Helm chart named `nginx` and created a namespace to install my chart into using the commands below. - -Create a namespace: - - -``` -`$ kubectl create ns nginx` -``` - -Install the chart in your new namespace with a name: - - -``` -$ helm install chaos-pods nginx -n nginx - -NAME: chaos-pods -LAST DEPLOYED: Sun May 23 10:15:52 2021 -NAMESPACE: nginx -STATUS: deployed -REVISION: 1 -NOTES: -1\. Get the application URL by running these commands: -  export POD_NAME=$(kubectl get pods --namespace nginx -l "app.kubernetes.io/name=nginx,app.kubernetes.io/instance=chaos-pods" -o jsonpath="{.items[0].metadata.name}") -  export CONTAINER_PORT=$(kubectl get pod --namespace nginx $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") -  echo "Visit to use your application" -  kubectl --namespace nginx port-forward $POD_NAME 8080:$CONTAINER_PORT -``` - -### Install Kube DOOM - -You can use any [Virtual Network Computer][11] (VNC) viewer you want; I installed [TigerVNC][12] on my Linux box. There are several ways you can set up Kube DOOM. Before I generated my Helm chart, you could set it up with [kind][13] or use it locally with Docker, and the [README][14] contains instructions for those uses. - -Get started with a `git clone`: - - -``` -$ git clone [git@github.com][15]:Alynder/kubedoom.git -Cloning into 'kubedoom'... -``` - -Then change directory into the `kubedoom/helm` folder: - - -``` -`$ cd kubedoom/helm/` -``` - -Since the base values file is already set up correctly, you just need to run a single install command: - - -``` -$ helm install kubedoom kubedoom/ -n kubedoom -NAME: kubedoom -LAST DEPLOYED: Mon May 31 11:16:58 2021 -NAMESPACE: kubedoom -STATUS: deployed -REVISION: 1 -NOTES: -1\. Get the application URL by running these commands: -  export NODE_PORT=$(kubectl get --namespace kubedoom -o jsonpath="{.spec.ports[0].nodePort}" services kubedoom-kubedoom-chart) -  export NODE_IP=$(kubectl get nodes --namespace kubedoom -o jsonpath="{.items[0].status.addresses[0].address}") -  echo http://$NODE_IP:$NODE_PORT -``` - -Everything should be installed, set up, and ready to go. - -### Play with Kube DOOM - -Now you just need to get in there, run a few commands, and start playing your new chaos video game. The first command is a port forward, followed by the VNC viewer connection command. The VNC viewer connection needs a password, which is `idbehold`. - -Find your pod for the port forward: - - -``` -$ kubectl get pods -n kubedoom -NAME                                       READY   STATUS    RESTARTS   AGE -kubedoom-kubedoom-chart-676bcc5c9c-xkwpp   1/1     Running   0          68m -``` - -Run the `port-forward` command using your pod name: - - -``` -$  kubectl port-forward  kubedoom-kubedoom-chart-676bcc5c9c-xkwpp 5900:5900 -n kubedoom -Forwarding from 127.0.0.1:5900 -> 5900 -Forwarding from [::1]:5900 -> 5900 -``` - -Everything is ready to play, so you just need to run the VNC viewer command (shown below with output): - - -``` -$  vncviewer viewer localhost:5900 - -TigerVNC Viewer 64-bit v1.10.1 -Built on: 2020-04-09 06:49 -Copyright (C) 1999-2019 TigerVNC Team and many others (see README.rst) -See for information on TigerVNC. - -Mon May 31 11:33:23 2021 - DecodeManager: Detected 64 CPU core(s) - DecodeManager: Creating 4 decoder thread(s) - CConn:       Connected to host localhost port 5900 -``` - -Next, you'll see the password request, so enter it (`idbehold`, as given above). - -![VNC authentication][16] - -(Jess Cherry, [CC BY-SA 4.0][17]) - -Once you are logged in, you should be able to walk around and see your enemies with pod names. - -![Kube Doom pods][18] - -(Jess Cherry, [CC BY-SA 4.0][17]) - -I'm terrible at this game, so I use some cheats to have a little more fun: - - * Type `idspispopd` to walk straight through a wall to get to your army of pods. - * Can't handle the gun? That's cool; I'm bad at it, too. If you type `idkfa` and press the number **5**, you'll get a better weapon. - - - -This is what it looks like when you kill something (I used [k9s][19] for this view). - -![Killing pods in Kube DOOM][20] - -(Jess Cherry, [CC BY-SA 4.0][17]) - -### Final notes - -Because this application requires a cluster-admin role, you have to really pay attention to the names of the pods—you might run into a kube-system pod, and you'd better run away. If you kill one of those pods, you will kill an important part of the system. - -I love this application because it's the quickest gamified way to do chaos engineering. It did remind me of how bad I was at this video game, but it was hilarious to try it. Happy hunting! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/6/kube-doom - -作者:[Jessica Cherry][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/cherrybomb -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc-lead_cat-keyboard.png?itok=fuNmiGV- (A cat under a keyboard.) -[2]: https://github.com/Alynder/kubedoom -[3]: https://github.com/storax/kubedoom -[4]: https://opensource.com/article/21/5/11-years-kubernetes-and-chaos -[5]: https://opensource.com/article/21/5/get-your-steady-state-chaos-grafana-and-prometheus -[6]: https://opensource.com/article/21/5/total-chaos-litmus -[7]: https://opensource.com/article/21/5/get-meshy-chaos-mesh -[8]: https://opensource.com/article/21/6/chaos-kubernetes-kube-monkey -[9]: https://minikube.sigs.k8s.io/docs/start/ -[10]: https://opensource.com/article/20/5/helm-charts -[11]: https://en.wikipedia.org/wiki/Virtual_Network_Computing -[12]: https://tigervnc.org/ -[13]: https://kind.sigs.k8s.io/ -[14]: https://github.com/Alynder/kubedoom/blob/master/README.md -[15]: mailto:git@github.com -[16]: https://opensource.com/sites/default/files/uploads/vnc-password.png (VNC authentication) -[17]: https://creativecommons.org/licenses/by-sa/4.0/ -[18]: https://opensource.com/sites/default/files/uploads/doom-pods.png (Kube Doom pods) -[19]: https://opensource.com/article/20/5/kubernetes-administration -[20]: https://opensource.com/sites/default/files/uploads/doom-pods_kill.png (Killing pods in Kube DOOM) From c3626f4f339152d8ef4d4b498effa008fae83641 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 20 Dec 2021 12:55:24 +0800 Subject: [PATCH 240/244] PRF&PUB @geekpi https://linux.cn/article-14098-1.html --- ...212 Open source 3D pixel art with Goxel.md | 98 ++++++++++++++++ ...212 Open source 3D pixel art with Goxel.md | 106 ------------------ 2 files changed, 98 insertions(+), 106 deletions(-) create mode 100644 published/20211212 Open source 3D pixel art with Goxel.md delete mode 100644 translated/tech/20211212 Open source 3D pixel art with Goxel.md diff --git a/published/20211212 Open source 3D pixel art with Goxel.md b/published/20211212 Open source 3D pixel art with Goxel.md new file mode 100644 index 0000000000..811bd3d738 --- /dev/null +++ b/published/20211212 Open source 3D pixel art with Goxel.md @@ -0,0 +1,98 @@ +[#]: subject: "Open source 3D pixel art with Goxel" +[#]: via: "https://opensource.com/article/21/12/3d-pixel-art-goxel" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14098-1.html" + +使用 Goxel 制作开源 3D 像素艺术 +====== + +> 使用 Goxel 构建模型很有趣,就像没有锋利边缘的乐高、没有“爬行者”的 Minecraft 一样。 + +![](https://img.linux.net.cn/data/attachment/album/202112/20/125417v2ws2so5g527lpgu.jpg) + +我喜欢乐高,这不是什么秘密,但我的乐高收藏现在离我很远,而且把满满一柜子的经典乐高套装在世界各地搬来搬去看起来也不太可行。为了解决这个问题,从 [在乐高 CAD 中建立模型][2] 到 [在 Blender 中用乐高纹理对模型进行造型][3],我做了很多虚拟化的工作。最近我发现了 [Goxel][4]。这个简单得令人震惊的 3D 建模应用并没有自称是基于乐高的,也没提和乐高有什么关系。然而,用 3D 像素建立模型的感觉与用乐高积木建立模型的满足感惊人地相似。你可以把 Goxel 看作是一个像素绘画程序,但却是 3D 的。 + +Goxel 采取了一种独特的 3D 建模方法,它专门针对 低模low polygon 建模。如果你想雕刻出栩栩如生的模型,就不应该使用这个程序。但是,如果你喜欢 Minecraft 和其他低模艺术的美感,那么你应该试试 Goxel。 + +### 在 Linux 上安装 Goxel + +你可以从 [Flathub][6] 将 Goxel 作为 [Flatpak][5] 安装在 Linux 上。 + +对于 Android、Windows macOS 和 iOS,请到 [Goxel 网站][4] 下载安装程序。 + +Goxel 是开源的,在 GPLv3 许可下发布。 + +### 使用体素绘画 + +当你第一次启动 Goxel 时,在 Goxel 窗口的中间会有一个空的“空间”或容器。这就是你的画布。 + +![The Goxel canvas(Seth Kenlon, CC BY-SA 4.0)][7] + +正是在这个容器中,且只有在这个容器中,你才能建立你的模型。在大多数三维建模应用中,深度感知depth perception是一种努力才能得到的技能,所以 Goxel 限制了你工作的空间,以防止你最终出现模型和模型部件彼此相距甚远的情况。Goxel 还限制你在一个严格的网格中移动。你可以沿 Y 轴上下移动,沿 X 轴左右移动,沿 Z 轴前后移动,但只能在一个三维像素(或称为 体素voxel)的片段中移动。不管用于什么意图和目的,Goxel 的体素就是用来建立模型的虚拟乐高砖块。 + +Goxel 中没有太多工具,这对一个三维建模应用来说是一个真正的特点。默认情况下,你已经激活了铅笔工具,所以你可以通过点击鼠标在体素容器内的任何地方立即开始建造。 + +![Hello from Goxel(Seth Kenlon, CC BY-SA 4.0)][9] + +试着点击容器周围,以查看添加体素的位置。Goxel 让你比较容易地看到你的铅笔即将添加体素的地方,可以把体素当作砖块,它假设当你靠近一个现有的体素时是准备把你的下一个体素连接到它。即便如此,在二维屏幕上实现三维也很困难。有时,体素会被添加到一个你没有意识到的地方。确保你的体素被添加到你想添加的地方的最好方法是经常旋转容器。你可以用键盘上的方向键来旋转容器,或者你可以点击并拖动鼠标中键。右击并拖动容器可在 Goxel 工作区中移动,而鼠标的滚轮可以放大和缩小。 + +### 平面标记 + +Goxel 还提供了另一个对齐体素的技巧,那就是以半透明和临时平面的形式提供指导。当你在你的容器中添加一个平面时,它会创建一种力场,使你的铅笔无法通过。 + +![Goxel planar guide(Seth Kenlon, CC BY-SA 4.0)][10] + +其结果是,你只能沿着两个轴线安全地作画,而不能沿着第三个轴线作画。你可以沿着网格轻推平面,这样你就可以分片添加体素,就像 3D 打印机向物理模型添加一样。 + +禁用平面控制中的 “可见Visible” 选项可以移除平面。 + +![Plane controls(Seth Kenlon, CC BY-SA 4.0)][11] + +### Goxel 工具栏 + +顶部的工具栏包含七个按钮。从左到右: + + * 撤销Undo + * 重做Redo + * 删除所有的东西,且无需确认Delete everything without confirmation + * 添加一个体素Add a voxel + * 减去(删除)一个体素Subtract (remove) a voxel + * 画一个体素Paint a voxel + * 设置油漆颜色Set the paint color + +你可以在单个体素上作画,也可以使用铅笔左边的形状工具,一次性添加体素区域。 + +除了用铅笔删除体素外,你还可以使用激光工具在体素出现在作为计算机显示器的 2D 屏幕上时对其进行调整。在形状工具的右边,把你的光标变成一个十字准线。把它指向你看到的体素,然后点击它来擦除。 + +### 极简主义的宁静 + +Goxel 追求简单,不仅在于它生产的内容,还在于它的生产方式。我在本文中只讨论了 Goxel 的绘图工具。虽然还有其他功能,例如控制光线的俯仰角和偏航角的能力、阴影的强度以及虚拟摄像机的位置,但该应用力求以最佳方式使事情变得简单自然。使用 Goxel 构建模型非常有趣,就像没有锋利边缘的乐高玩具,或者没有“爬行者”的 Minecraft。去使用 Goxel,并构建一些模型吧! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/3d-pixel-art-goxel + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/uploads/header-image.jpg?itok=3MWdhreV (Pixel art in 3D with Goxel) +[2]: https://opensource.com/article/20/6/open-source-virtual-lego +[3]: https://opensource.com/article/20/7/lego-blender-bricker +[4]: https://goxel.xyz/ +[5]: https://opensource.com/article/21/11/install-flatpak-linux +[6]: https://flathub.org/apps/details/io.github.guillaumechereau.Goxel +[7]: https://opensource.com/sites/default/files/uploads/goxel-canvas.jpg (The Goxel canvas) +[8]: https://creativecommons.org/licenses/by-sa/4.0/ +[9]: https://opensource.com/sites/default/files/uploads/goxel-hello.jpg (Hello from Goxel) +[10]: https://opensource.com/sites/default/files/uploads/goxel-plane-guide.jpg (Goxel planar guide) +[11]: https://opensource.com/sites/default/files/uploads/goxel-plane-controls.jpg (Plane controls) diff --git a/translated/tech/20211212 Open source 3D pixel art with Goxel.md b/translated/tech/20211212 Open source 3D pixel art with Goxel.md deleted file mode 100644 index c9f1e11583..0000000000 --- a/translated/tech/20211212 Open source 3D pixel art with Goxel.md +++ /dev/null @@ -1,106 +0,0 @@ -[#]: subject: "Open source 3D pixel art with Goxel" -[#]: via: "https://opensource.com/article/21/12/3d-pixel-art-goxel" -[#]: author: "Seth Kenlon https://opensource.com/users/seth" -[#]: collector: "lujun9972" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -使用 Goxel 的开源 3D 像素艺术 -====== -使用 Goxel 构建模型很有趣,就像乐高最好的部分没有锋利的边缘,就像没有“爬行者”的 Minecraft。 -![Pixel art in 3D with Goxel][1] - -我喜欢乐高,这不是什么秘密,但我已经远离我的乐高收藏,把满满一柜子的经典乐高套装运到世界各地,这目前是一个有问题的提议。为了解决这个问题,我做了很多虚拟化的工作,从[在乐高 CAD 中建立模型][2]到[在 Blender 中用乐高纹理对模型进行造型][3]。最近我发现了 [Goxel][4]。这个简单得令人震惊的 3D 建模应用并没有自称是基于乐高的,甚至是与乐高相近的。然而,用 3D 像素建立模型的感觉与用乐高积木建立模型的满足感惊人地相似。你可以把 Goxel 看作是一个像素绘画程序,但却是 3D 的。 - -Goxel 采取了一种独特的 3D 建模方法,它专门针对_低模_建模。如果你想雕刻出栩栩如生的模型,就不应该使用这个程序。但是,如果你喜欢 Minecraft 和其他低模艺术的美感,那么你需要试试 Goxel。 - -### 在 Linux 上安装 Goxel - -你可以从 [Flathub][6] 将 Goxel 作为 [Flatpak][5] 安装在 Linux 上。 - -对于 Android、Windows macOS 和 iOS,请到 [Goxel 网站][4]下载安装程序。 - -Goxel 是开源的,在 GPLv3 许可下发布。 - -### 使用体素绘画 - -当你第一次启动 Goxel 时,在 Goxel 窗口的中间会有一个空的“空间”或容器。这就是你的画布。 - -![The Goxel canvas][7] - -(Seth Kenlon, [CC BY-SA 4.0][8]) - -正是在这个容器中,且只有在这个容器中,你才能建立你的模型。在大多数三维建模应用中,深度感知是一种后天的技能,所以 Goxel 限制了你工作的空间,以防止你最终出现模型和模型部件彼此相距甚远的情况。Goxel 还限制你在一个严格的网格中移动。你可以沿 Y 轴上下移动,沿 X 轴左右移动,沿 Z 轴“近”和“远”移动,但只能在一个三维像素(或称为 _体素_)的片段中移动。就所有的意图和目的而言,Goxel 的体素是你用来建立模型的虚拟乐高砖块。 - -Goxel 中没有很多工具,这对一个三维建模应用来说是一个真正的特点。默认情况下,你已经激活了铅笔工具,所以你可以通过点击鼠标在体素容器内的任何地方立即开始建造。 - -![Hello from Goxel][9] - -(Seth Kenlon, [CC BY-SA 4.0][8]) - -试着点击容器周围,看看哪里有体素被添加。Goxel 让你比较容易看到你的铅笔即将添加体素的地方,它把体素当作砖块,假设当你靠近一个现有的体素时,你想把你的下一个体素连接到它。即便如此,在二维屏幕上实现 3D 也很困难。有时,体素会被添加到一个你没有意识到的地方。确保你的体素被添加到你想添加的地方的最好方法是经常旋转容器。你可以用键盘上的方向键来旋转容器,或者你可以点击并拖动鼠标中键。右击并拖动容器在 Goxel 工作区中移动,而鼠标的滚轮可以放大和缩小。 - -### 平面标记 - -Goxel 还提供了另一个对齐体素的技巧,那就是以半透明和临时平面的形式提供指导。当你在你的容器中添加一个平面时,它会创建一种力场,你的铅笔无法通过。 - -![Goxel planar guide][10] - -(Seth Kenlon, [CC BY-SA 4.0][8]) - -其结果是,你只能沿着两个轴线安全地作画,而不能沿着第三个轴线作画。你可以沿着网格轻推平面,这样你就可以分片添加体素,就像 3D 打印机向物理模型添加一样。 - -禁用平面控制中的 **Visible** 选项来移除一个平面。 - -![Plane controls][11] - -(Seth Kenlon, [CC BY-SA 4.0][8]) - -### Goxel 工具栏 - -顶部的工具栏包含七个按钮。从左到右: - - * 撤销 - * 重做 - * 删除_所有的东西,且无需确认_ - * 添加一个象素 - * 减去(删除)一个体素 - * 画一个体素 - * 设置油漆颜色 - - - -你可以在单个体素上作画,也可以使用铅笔左边的形状工具,一次性添加体素区域。 - -除了用铅笔删除体素外,你还可以用激光工具来切割体素,因为它们出现在电脑显示器的 2D 屏幕上。激光工具,在形状工具的右边,把你的光标变成一个十字准线。把它指向你看到的体素,然后点击它来擦除。 - -### 极简主义的宁静 - -Goxel 有意简单,不仅在于它生产的内容,还在于它的生产方式。 我在本文中只讨论了 Goxel 的绘图工具。 虽然还有其他功能,例如控制光线的俯仰和偏航的能力、阴影的强度以及虚拟摄像机的位置,但该应用力求以最佳方式使事情变得简单和平常。 使用 Goxel 构建模型非常有趣,就像没有锋利边缘的乐高玩具,或者没有“爬行者”的 Minecraft。 去获取 Goxel,并构建一些模型! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/12/3d-pixel-art-goxel - -作者:[Seth Kenlon][a] -选题:[lujun9972][b] -译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/seth -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/uploads/header-image.jpg?itok=3MWdhreV (Pixel art in 3D with Goxel) -[2]: https://opensource.com/article/20/6/open-source-virtual-lego -[3]: https://opensource.com/article/20/7/lego-blender-bricker -[4]: https://goxel.xyz/ -[5]: https://opensource.com/article/21/11/install-flatpak-linux -[6]: https://flathub.org/apps/details/io.github.guillaumechereau.Goxel -[7]: https://opensource.com/sites/default/files/uploads/goxel-canvas.jpg (The Goxel canvas) -[8]: https://creativecommons.org/licenses/by-sa/4.0/ -[9]: https://opensource.com/sites/default/files/uploads/goxel-hello.jpg (Hello from Goxel) -[10]: https://opensource.com/sites/default/files/uploads/goxel-plane-guide.jpg (Goxel planar guide) -[11]: https://opensource.com/sites/default/files/uploads/goxel-plane-controls.jpg (Plane controls) From 7bc833da0b395be098ac60bac585cdd5e1d3af32 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 20 Dec 2021 14:00:39 +0800 Subject: [PATCH 241/244] PRF&PUB @geekpi https://linux.cn/article-14099-1.html --- ...03 Print files from your Linux terminal.md | 42 +++++++++---------- 1 file changed, 19 insertions(+), 23 deletions(-) rename {translated/tech => published}/20210903 Print files from your Linux terminal.md (66%) diff --git a/translated/tech/20210903 Print files from your Linux terminal.md b/published/20210903 Print files from your Linux terminal.md similarity index 66% rename from translated/tech/20210903 Print files from your Linux terminal.md rename to published/20210903 Print files from your Linux terminal.md index b3c3530fa1..4b1b1c40d3 100644 --- a/translated/tech/20210903 Print files from your Linux terminal.md +++ b/published/20210903 Print files from your Linux terminal.md @@ -3,17 +3,18 @@ [#]: author: "Seth Kenlon https://opensource.com/users/seth" [#]: collector: "lujun9972" [#]: translator: "MjSeven" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14099-1.html" 从 Linux 终端打印文件 ====== -使用 lpr 命令在终端中打印文件。 -![手动打字机][1] +> 使用 lpr 命令在终端中打印文件。 -[在 Linux 上打印很容易][2],但有时感觉要做很多工作,比如启动应用程序、打开文件、在菜单中找到**打印**选项,单击确认按钮等等。当你是一个终端用户时,通常希望使用简单的触发器执行复杂的操作。打印很复杂,但没有什么比 `lpr` 命令更简单了。 +![](https://img.linux.net.cn/data/attachment/album/202112/20/135809an6s6bxyg7sjnwyq.jpg) + +[在 Linux 上打印很容易][2],但有时感觉要做很多工作,比如启动应用程序、打开文件、在菜单中找到打印选项,单击确认按钮等等。当你是一个终端用户时,通常希望使用简单的触发器执行复杂的操作。打印很复杂,但没有什么比 `lpr` 命令更简单了。 ### 使用 lpr 命令打印 @@ -27,20 +28,16 @@ $ lpr myfile.odt ### 设置默认打印机 -根据我在 1984 年印刷的 Berkeley 4.2 手册的旧版本中找到的资料,`lpr` 命令会分页并将文件发送到打印机卷轴,后者将数据传输到称为 _行打印机_ 的东西。 +根据我在 1984 年印刷的 Berkeley 4.2 手册的旧版本中找到的资料,`lpr` 命令会分页并将文件发送到打印机池,后者将数据传输到称为 行式打印机line printer 的东西。 ![显示 LPR 命令信息的页面][3] -lpr 命令 - -现在,原来的 `lpr` 命令已经无法满足,因为现代计算机可以访问多台打印机,而且是那些比点阵行式打印机复杂得多的打印机。现在有一个子系统,称为通用 Unix 打印系统(CUPS),可以跟踪所有计算机访问的打印机,计算机应该使用哪个驱动程序与每台打印机通信,默认使用哪台打印机等等。`lpr.cups` 或 `lpr-cups` 命令与 CUPS 捆绑在一起,通常以符号链接到 `lpr`,允许你引用通用 Unix 打印系统(CUPS)配置从终端打印。 +现在,最初的 `lpr` 命令已经无法满足,因为现代计算机可以访问多台打印机,而且是那些比点阵行式打印机复杂得多的打印机。现在有一个称为通用 Unix 打印系统Common Unix Printing System(CUPS)子系统,可以跟踪你的计算机可以访问的所有打印机,计算机应该使用哪个驱动程序与每台打印机通信,默认使用哪台打印机等等。 CUPS 捆绑提供的 `lpr.cups` 或 `lpr-cups` 命令通常以符号链接到 `lpr`,允许你首先借助 CUPS 配置从终端打印。 使用 `lpr` 打印文件,你应该首先设置默认打印机。你可以在系统的打印机设置中设置: ![设置默认打印机对话框][4] -设置默认打印机。 - 或者,你也可以使用 `lpadmin` 命令设置: ``` @@ -51,17 +48,16 @@ device for HP_LaserJet_P2015_Series: ipp://10.0.1.222:631/printers/HP_LaserJet_P ### 使用环境变量设置 -你不能在没有管理员账户的系统上设置默认打印机,因为更改打印机默认设置是一项特权任务。在 `lpr` 引用到 CUPS 前,它会在系统中查询 **PRINTER** [环境变量][5]。 +你不能在没有管理员账户的系统上设置默认打印机,因为更改打印机默认设置是一项特权任务。在 `lpr` 借助 CUPS 找到目标打印机前,它会在系统中查询 `PRINTER` [环境变量][5]。 -在本例中,`HP_LaserJet_P2015_Series` 打印机的名称。将 **PRINTER** 设置为该值: +在本例中,`HP_LaserJet_P2015_Series` 是打印机的名称。将 `PRINTER` 设置为该值: ``` $ PRINTER=HP_LaserJet_P2015_Series $ export PRINTER ``` -一旦设置了 **PRINTER** 变量,你就可以打印了: - +一旦设置了 `PRINTER` 变量,你就可以打印了: ``` $ lpr myfile.pdf @@ -87,9 +83,9 @@ $ lpr -P HP_LaserJet_P2015_Series myfile.txt ### 如何定义打印机 -CUPS 有一个友好的前端页面,可通过 Web 浏览器如 Firefox 访问。虽然它使用 Web 浏览器作为用户界面,但它实际上是在本机(一个称为 localhost 的位置)的 631 端口上提供服务。CUPS 管理连接到计算机的打印机,并将其配置存储在 `/etc/cups/priters.conf` 中。 +CUPS 有一个友好的前端页面,可通过 Web 浏览器如 Firefox 访问。虽然它使用 Web 浏览器作为用户界面,但它实际上是在本机(一个称为 `localhost` 的位置)的 631 端口上提供服务。CUPS 管理连接到计算机的打印机,并将其配置存储在 `/etc/cups/priters.conf` 中。 -`printers.conf` 文件包含详细描述计算机可以访问的打印设备的定义。不要直接编辑它,但如果你想,你必须先停止 `cupsd` 守护进程。 +`printers.conf` 文件包含详细描述计算机可以访问的打印设备的定义。不要直接编辑它,但如果你想这样做,你必须先停止 `cupsd` 守护进程。 一个典型的文件定义如下所示: @@ -115,9 +111,9 @@ CUPS 有一个友好的前端页面,可通过 Web 浏览器如 Firefox 访问 ``` -在本例中,打印机的名称是 `r1060`,即 Ricoh Aficio 1060。 +在本例中,打印机的名称是 `r1060`,即 “Ricoh Aficio 1060”。 -_MakeModel_ 属性是从 `lpinfo` 命令中提取的,该命令列出了系统上所有可用的打印机驱动程序。假设你知道要打印到 Ricoh Aficio 1060,那么你会发出以下命令: +`MakeModel` 属性是从 `lpinfo` 命令中提取的,该命令列出了系统上所有可用的打印机驱动程序。假设你知道要打印到 Ricoh Aficio 1060,那么你会发出以下命令: ``` $ lpinfo -m | grep 1060 @@ -127,9 +123,9 @@ gutenprint.5.2://ricoh-afc_1060/expert Ricoh Aficio 1060 - CUPS+Gutenprint v5.2. 它会列出已安装的相关驱动程序。 -_MakeModel_ 是结果的后半部分。在本例中为 `Ricoh Aficio 1060 - CUPS+Gutenprint v5.2.11`。 +`MakeModel` 属性是结果的后半部分。在本例中为 `Ricoh Aficio 1060 - CUPS+Gutenprint v5.2.11`。 -_DeviceURI_ 属性标识打印机在网络上的位置(或物理位置,例如 USB 端口)。在本例中,它是 `lpd://192.168.4.8`,因为我使用 `lpd` 协议将数据发送到一台网络打印机。在另一个系统上,我有一个通过 USB 连接的 HP LaserJect 打印机,因此 _DeviceURI_ 是 `hp:/usb/HP_LaserJet_P2015_Series?serial=00CNCJM26429`。 +`DeviceURI` 属性标识打印机在网络上的位置(或物理位置,例如 USB 端口)。在本例中,它是 `lpd://192.168.4.8`,因为我使用 `lpd` 协议将数据发送到一台网络打印机。在我的另一个系统上,我有一个通过 USB 连接的 HP LaserJect 打印机,因此 `DeviceURI` 是 `hp:/usb/HP_LaserJet_P2015_Series?serial=00CNCJM26429`。 ### 在终端中打印 @@ -142,7 +138,7 @@ via: https://opensource.com/article/21/9/print-files-linux 作者:[Seth Kenlon][a] 选题:[lujun9972][b] 译者:[MjSeven](https://github.com/MjSeven) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From de55b0aa99ca1edc5553e6c9859e5b1679415e43 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 21 Dec 2021 08:57:26 +0800 Subject: [PATCH 242/244] translating --- ...in Ubuntu and Other Linux Distributions.md | 122 ------------------ 1 file changed, 122 deletions(-) delete mode 100644 sources/tech/20211216 Hide or Add Specific Folders From GNOME Search Results in Ubuntu and Other Linux Distributions.md diff --git a/sources/tech/20211216 Hide or Add Specific Folders From GNOME Search Results in Ubuntu and Other Linux Distributions.md b/sources/tech/20211216 Hide or Add Specific Folders From GNOME Search Results in Ubuntu and Other Linux Distributions.md deleted file mode 100644 index 14011ab7bf..0000000000 --- a/sources/tech/20211216 Hide or Add Specific Folders From GNOME Search Results in Ubuntu and Other Linux Distributions.md +++ /dev/null @@ -1,122 +0,0 @@ -[#]: subject: "Hide or Add Specific Folders From GNOME Search Results in Ubuntu and Other Linux Distributions" -[#]: via: "https://itsfoss.com/control-gnome-file-search/" -[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" -[#]: collector: "lujun9972" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Hide or Add Specific Folders From GNOME Search Results in Ubuntu and Other Linux Distributions -====== - -You might have already noticed that when you search for something in the GNOME menu/activities area, it also shows the files with names matching the searched term along with installed applications. - -![Search in GNOME activities shows installed applications and matching files][1] - -That’s a handy feature. If you remember the file name or even part of it, you can easily search for it and open it just by pressing the Super key (Windows key) and typing the name. - -But there are a few nit bits around this search feature that you might not know about or never cared for. - -In this article, I’ll share how you can control the GNOME search feature, add or hide folders from the search option and disable it completely. - -_**Note: This is exclusively for distributions using GNOME. Please [verify which desktop environment you are using][2] and ensure it is GNOME.**_ - -### Default locations for file search - -The GNOME search feature utilizes a utility called [Tracker Miner FS][3]. Please do not get alarmed by the terms like _tracker_ and _miner_. It’s not spying on you or mining crypto on your system. It basically functions as a search engine and a database to provide you instant search results. - -By default, the file indexing takes place in the meta folders like Documents, Music, Pictures and Videos directories and their sub-directories. Files in the Home and Downloads folders are also indexed but not the ones in their sub-directories. - -![Default locations for file search][4] - -If you have created some new directories in your home folder, those files will not be indexed. - -However, the recently accessed files are also indexed automatically. If you have opened a file recently, it is added to the ‘recent files’ and will appear in the search results irrespective of its location. - -In case you didn’t know already, you can see your recently accessed files in the file manager: - -![Accessing recent files in GNOME file manager][5] - -### Adding a folder content to search results - -Suppose you have created a folder for coding projects in your home directory. These files won’t be indexed and won’t appear in search results (unless you have opened a file by double clicking and it is added to the recent files). - -To add the files from a custom folder in the search result, you can add the folder to the search locations. - -Open the Settings application by searching for it in the menu/activity area: - -![Search for settings application][6] - -Go to the **Search** option from the left sidebar and click on the **Search Locations** option at the top. In the pop-up window, go to the **Other** tab and click on the **\+ symbol**. It will add the file browser and you can add your desired folder. - -![Adding a custom folder content to search][7] - -If you test by searching a filename in the just added folder, you should see it in the search results now. It should be instant but if it is not, try logging out or rebooting the system. - -### Hide a folder from search results - -If you don’t want files from a specific folder to appear in the search result, you can hide it. - -If you don’t want the content of the meta folders like Pictures, Documents, Videos in search, you disable it from the Search Location settings. - -![Disable meta folders from the search][8] - -If you want the contents of only a certain folder under Documents to NOT appear in the search result, you just have to create a new file named **.nomedia** in that folder. You may also name the file .git, .trackerignore or .hg. - -![Hide specific folder from search results by creating file named .nomedia or .hg or .git][9] - -If you don’t see the option to create new file in right mouse lick, you’ll have to do some tweaking to add the [create new document option in the right click context menu][10]. Also note that any files starting with a . in its name is hidden from normal view. To [toggle hidden files][11], press Ctrl+H keys. - -This hiding might not work immediately because the file is probably already indexed. You may have to log out or reboot to see the effect. - -If you access a file manually, it will be added to the recent files and will appear in the search result despite the ignore file in the folder. - -You can delete the recent files history or disable it altogether (if you want) from **Settings-> Privacy-> File History & Trash**. I don’t see the need of it, though, so make your own decision here. - -![Clear or disable file access history in GNOME][12] - -### Disable search results for all files - -If you do not want any files to appear in the search results, you can disable search for Files altogether from the search settings. - -![Disable search results for all files][13] - -You should disable the search functionality altogether by clicking the Search toggle button at the top as it may interfere with the normal functionality of the GNOME desktop environment. - -More details on it can be found on the [project’s homepage][14]. - -### Conclusion - -The _**discussion here is about file search**_. GNOME desktop also searches in Calendar, Characters and some other utilities. You can disable or enable the available search options but let’s not focus on that. - -I hope you find this quick tip helpful in [customizing your GNOME experience][15]. If you know some other neat trick that you want others to know, please share it with us in the comments. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/control-gnome-file-search/ - -作者:[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://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/gnome-file-search-result.png?resize=800%2C355&ssl=1 -[2]: https://itsfoss.com/find-desktop-environment/ -[3]: https://wiki.gnome.org/Projects/Tracker/Documentation/GettingStarted -[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/gnome-default-search-location.png?resize=800%2C533&ssl=1 -[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/access-recent-files-gnome-linux.png?resize=735%2C414&ssl=1 -[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/settings-search-ubuntu-20-04.jpg?resize=800%2C230&ssl=1 -[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/gnome-add-search-location.png?resize=800%2C525&ssl=1 -[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/disable-folders-from-search.png?resize=800%2C533&ssl=1 -[9]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/hide-specific-folder-from-search-results.png?resize=751%2C382&ssl=1 -[10]: https://itsfoss.com/add-new-document-option/ -[11]: https://itsfoss.com/hide-folders-and-show-hidden-files-in-ubuntu-beginner-trick/ -[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/clear-or-disable-file-history-gnome-linux.png?resize=800%2C389&ssl=1 -[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/disable-search-for-files-gnome.png?resize=800%2C475&ssl=1 -[14]: https://gnome.pages.gitlab.gnome.org/tracker/ -[15]: https://itsfoss.com/gnome-tricks-ubuntu/ From a203b32a235eb0ebcf5dcf522e30e2e8d5a11c97 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 21 Dec 2021 08:59:23 +0800 Subject: [PATCH 243/244] translated --- ...in Ubuntu and Other Linux Distributions.md | 122 ++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 translated/tech/20211216 Hide or Add Specific Folders From GNOME Search Results in Ubuntu and Other Linux Distributions.md diff --git a/translated/tech/20211216 Hide or Add Specific Folders From GNOME Search Results in Ubuntu and Other Linux Distributions.md b/translated/tech/20211216 Hide or Add Specific Folders From GNOME Search Results in Ubuntu and Other Linux Distributions.md new file mode 100644 index 0000000000..b0a346ad9f --- /dev/null +++ b/translated/tech/20211216 Hide or Add Specific Folders From GNOME Search Results in Ubuntu and Other Linux Distributions.md @@ -0,0 +1,122 @@ +[#]: subject: "Hide or Add Specific Folders From GNOME Search Results in Ubuntu and Other Linux Distributions" +[#]: via: "https://itsfoss.com/control-gnome-file-search/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +在 Ubuntu 和其他 Linux 发行版的 GNOME 搜索结果中隐藏或添加特定文件夹 +====== + +你可能已经注意到,当你在 GNOME 菜单/活动区搜索某样东西时,它也会显示名称与搜索词相匹配的文件,以及已安装的应用。 + +![Search in GNOME activities shows installed applications and matching files][1] + +这是个很方便的功能。如果你记得文件名,甚至是它的一部分,你可以很容易地搜索到它,只需按下超级键(Windows 键)并输入文件名就可以打开它。 + +但是,围绕这个搜索功能,有一些你可能不知道或从未关心过的小问题。 + +在这篇文章中,我将分享你如何控制GNOME搜索功能,从搜索选项中添加或隐藏文件夹,以及完全禁用它。 + +_**注意:这是专门针对使用 GNOME 的发行版。请[确认你使用的是哪种桌面环境][2]并确保是 GNOME。**_ + +### 文件搜索的默认位置 + +GNOME 的搜索功能使用了一个叫做 [Tracker Miner FS][3] 的工具。请不要被 _tracker_ 和 _miner_ 这样的术语吓到。它不是在监视你,也不是在你的系统上挖掘加密货币。它的基本功能是作为一个搜索引擎和数据库,为你提供即时搜索结果。 + +默认情况下,文件索引发生在元文件夹,如文档、音乐、图片和视频目录及其子目录。主页和下载文件夹中的文件也会被索引,但不包括其子目录中的文件。 + +![Default locations for file search][4] + +如果你在你的主文件夹中创建了一些新的目录,这些文件将不会被索引。 + +然而,最近访问的文件也会被自动编入索引。如果你最近打开了一个文件,它将被添加到“最近的文件”中,并将出现在搜索结果中,而不管它在什么地方。 + +如果你还不知道的话,你可以在文件管理器中看到你最近访问的文件: + +![Accessing recent files in GNOME file manager][5] + +### 在搜索结果中添加一个文件夹的内容 + +假设你在你的主目录中为编码项目创建了一个文件夹。这些文件不会被索引,也不会出现在搜索结果中(除非你通过双击打开了一个文件,并且它被添加到最近的文件中)。 + +要在搜索结果中添加自定义文件夹中的文件,你可以将该文件夹添加到搜索位置。 + +通过在菜单/活动区搜索打开“设置”应用。 + +![Search for settings application][6] + +从左侧边栏进入**搜索**选项,点击顶部的**搜索位置**选项。在弹出的窗口中,进入**其他**标签,点击 **+** 符号。它将添加文件浏览器,你可以添加你想要的文件夹。 + +![Adding a custom folder content to search][7] + +如果你在刚刚添加的文件夹中搜索一个文件名进行测试,你现在应该在搜索结果中看到它。它应该是即时的,但如果不是,请尝试注销或重启系统。 + +### 从搜索结果中隐藏一个文件夹 + +如果你不希望某个特定文件夹的文件出现在搜索结果中,你可以隐藏它。 + +如果你不希望在搜索中出现图片、文档、视频等元文件夹的内容,你可以从搜索位置设置中禁用它。 + +![Disable meta folders from the search][8] + +如果你只想让文档下的某个文件夹的内容不出现在搜索结果中,你只需要在该文件夹中创建一个名为 **.nomedia** 的新文件。你也可以将该文件命名为 .git、.trackerignore 或 .hg。 + +![Hide specific folder from search results by creating file named .nomedia or .hg or .git][9] + +如果你在鼠标右键中没有看到创建新文件的选项,你必须做一些调整来增加[在右键上下文菜单中创建新文件选项][10]。还要注意的是,任何名称中以 . 开头的文件都会被隐藏起来,不能被正常查看。要[切换显示隐藏文件][11],按 Ctrl+H 键。 + +这种隐藏可能不会立即生效,因为该文件可能已经被索引了。你可能必须注销或重启才能看到效果。 + +如果你手动访问一个文件,它将被添加到最近的文件中,并且会出现在搜索结果中,尽管文件夹中的文件被忽略了。 + +你可以从 **Settings-> Privacy-> File History & Trash** 删除最近的文件历史或完全禁用它(如果你想的话)。不过我认为没有必要,所以在这里你自己决定吧。 + +![Clear or disable file access history in GNOME][12] + +### 禁用所有文件的搜索结果 + +如果你不希望任何文件出现在搜索结果中,你可以在搜索设置中完全禁用对文件的搜索。 + +![Disable search results for all files][13] + +你应该通过点击顶部的搜索切换按钮完全禁用搜索功能,因为它可能会干扰 GNOME 桌面环境的正常功能。 + +关于它的更多细节可以在[项目主页]中找到。 + +### 总结 + +这里的**_讨论的是文件搜索_**。GNOME 桌面也在日历、字符映射和其他一些程序中进行搜索。你可以禁用或启用可用的搜索选项,但我们不要专注于此。 + +我希望你觉得这个快速提示对[定制你的 GNOME 体验][15]有帮助。如果你知道其他一些你想让别人知道的技巧,请在评论中与我们分享。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/control-gnome-file-search/ + +作者:[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://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/gnome-file-search-result.png?resize=800%2C355&ssl=1 +[2]: https://itsfoss.com/find-desktop-environment/ +[3]: https://wiki.gnome.org/Projects/Tracker/Documentation/GettingStarted +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/gnome-default-search-location.png?resize=800%2C533&ssl=1 +[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/access-recent-files-gnome-linux.png?resize=735%2C414&ssl=1 +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/settings-search-ubuntu-20-04.jpg?resize=800%2C230&ssl=1 +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/gnome-add-search-location.png?resize=800%2C525&ssl=1 +[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/disable-folders-from-search.png?resize=800%2C533&ssl=1 +[9]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/hide-specific-folder-from-search-results.png?resize=751%2C382&ssl=1 +[10]: https://itsfoss.com/add-new-document-option/ +[11]: https://itsfoss.com/hide-folders-and-show-hidden-files-in-ubuntu-beginner-trick/ +[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/clear-or-disable-file-history-gnome-linux.png?resize=800%2C389&ssl=1 +[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/disable-search-for-files-gnome.png?resize=800%2C475&ssl=1 +[14]: https://gnome.pages.gitlab.gnome.org/tracker/ +[15]: https://itsfoss.com/gnome-tricks-ubuntu/ From 21b81d0d2ff7436aef9dfc9389bd023ac208c20c Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 21 Dec 2021 09:02:46 +0800 Subject: [PATCH 244/244] translating --- sources/tech/20211218 How I play Tetris on the mainframe.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20211218 How I play Tetris on the mainframe.md b/sources/tech/20211218 How I play Tetris on the mainframe.md index b8e24f70ea..a360276e20 100644 --- a/sources/tech/20211218 How I play Tetris on the mainframe.md +++ b/sources/tech/20211218 How I play Tetris on the mainframe.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/21/12/mainframe-tetris" [#]: author: "Elizabeth K. Joseph https://opensource.com/users/pleia2" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " "