diff --git a/published/20201207 Add storage to your Fedora system with LVM.md b/published/20201207 Add storage to your Fedora system with LVM.md new file mode 100644 index 0000000000..9026ead2e4 --- /dev/null +++ b/published/20201207 Add storage to your Fedora system with LVM.md @@ -0,0 +1,272 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12936-1.html) +[#]: subject: (Add storage to your Fedora system with LVM) +[#]: via: (https://fedoramagazine.org/add-storage-to-your-fedora-system-with-lvm/) +[#]: author: (Tim Bosse https://fedoramagazine.org/author/maztaim/) + +使用 LVM 为你的 Fedora 系统添加存储 +====== + +![][1] + +有时需要在系统中添加另一块磁盘。这就是逻辑卷管理(LVM)的用武之地。LVM 的好处之处在于它相当灵活。有几种方法可以添加一块磁盘。这篇文章介绍了一种方法。 + +### 注意! + +这篇文章并不包括将新的磁盘物理地安装到系统中的过程。请查阅你的系统和磁盘文档,了解如何正确地进行安装。 + +**重要:** 一定要确保你已经备份重要数据。如果新磁盘已有数据,那么本文中描述的步骤将破坏数据。 + +### 最好了解 + +本文并没有深入介绍 LVM 的每一个功能,重点是添加磁盘。但基本上你要了解,LVM 有卷组(VG),它由一个或多个分区和/或磁盘组成。你把这些分区或磁盘以物理卷(PV)的方式添加到卷组。一个卷组可以分成许多逻辑卷(LV)。逻辑卷可以作为文件系统、ramdisk 等其他存储使用。更多信息可以在[这里][2]中找到。 + +可以看作是,把物理卷形成一个存储池(一个卷组),然后从这个存储池中划分出逻辑卷,供你的系统直接使用。 + +### 准备 + +确保你能看到你要添加的磁盘。在添加磁盘之前使用 `lsblk` 查看哪些存储空间已经可用或正在使用。 + +``` +$ lsblk +NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT +zram0 251:0 0 989M 0 disk [SWAP] +vda 252:0 0 20G 0 disk +├─vda1 252:1 0 1G 0 part /boot +└─vda2 252:2 0 19G 0 part +└─fedora_fedora-root 253:0 0 19G 0 lvm / +``` + +本文使用的是带有虚拟存储的虚拟机,因此设备名称以 `vda` 开头代表第一个磁盘,`vdb` 代表第二个磁盘,以此类推。你的设备名称可能不同。许多系统会将 `sda` 作为第一个物理磁盘,`sdb` 代表第二个磁盘,以此类推。 + +当已连接新磁盘,并且你的系统已备份且正在运行,再次使用 `lsblk` 来查看新的块设备。 + +``` +$ lsblk +NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT +zram0 251:0 0 989M 0 disk [SWAP] +vda 252:0 0 20G 0 disk +├─vda1 252:1 0 1G 0 part /boot +└─vda2 252:2 0 19G 0 part +└─fedora_fedora-root 253:0 0 19G 0 lvm / +vdb 252:16 0 10G 0 disk +``` + +现在有一个名为 `vdb` 的新设备。该设备的位置是 `/dev/vdb`。 + +``` +$ ls -l /dev/vdb +brw-rw----. 1 root disk 252, 16 Nov 24 12:56 /dev/vdb +``` + +我们可以看到磁盘,但我们还不能用 LVM 来使用它。如果你运行 `blkid`,你应该不会看到它被列出。对于这个和之后的命令,你需要确保你的系统[已配置好,这样你可以使用 sudo][3]: + +``` +$ sudo blkid +/dev/vda1: UUID="4847cb4d-6666-47e3-9e3b-12d83b2d2448" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="830679b8-01" +/dev/vda2: UUID="k5eWpP-6MXw-foh5-Vbgg-JMZ1-VEf9-ARaGNd" TYPE="LVM2_member" PARTUUID="830679b8-02" +/dev/mapper/fedora_fedora-root: UUID="f8ab802f-8c5f-4766-af33-90e78573f3cc" BLOCK_SIZE="4096" TYPE="ext4" +/dev/zram0: UUID="fc6d7a48-2bd5-4066-9bcf-f062b61f6a60" TYPE="swap" +``` + +### 将磁盘添加到 LVM 中 + +使用 `pvcreate` 初始化磁盘。你需要传递设备的完整路径。在这个例子中,它是 `/dev/vdb`。在你的系统中,它可能是 `/dev/sdb` 或其他设备名。 + +``` +$ sudo pvcreate /dev/vdb +Physical volume "/dev/vdb" successfully created. +``` + +当你运行 `blkid` 时,你应该看到磁盘已经被初始化为一个 `LVM2_member`: + +``` +$ sudo blkid +/dev/vda1: UUID="4847cb4d-6666-47e3-9e3b-12d83b2d2448" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="830679b8-01" +/dev/vda2: UUID="k5eWpP-6MXw-foh5-Vbgg-JMZ1-VEf9-ARaGNd" TYPE="LVM2_member" PARTUUID="830679b8-02" +/dev/mapper/fedora_fedora-root: UUID="f8ab802f-8c5f-4766-af33-90e78573f3cc" BLOCK_SIZE="4096" TYPE="ext4" +/dev/zram0: UUID="fc6d7a48-2bd5-4066-9bcf-f062b61f6a60" TYPE="swap" +/dev/vdb: UUID="4uUUuI-lMQY-WyS5-lo0W-lqjW-Qvqw-RqeroE" TYPE="LVM2_member" +``` + +你可以使用 `pvs` 列出当前所有可用的物理卷: + +``` +$ sudo pvs +PV VG Fmt Attr PSize PFree +/dev/vda2 fedora_fedora lvm2 a-- <19.00g 0 +/dev/vdb lvm2 --- 10.00g 10.00g +``` + +`/dev/vdb` 被列为一个 PV (物理卷),但还没有分配到一个 VG (卷组)。 + +### 将物理卷添加到一个卷组 + +你可以使用 `vgs` 找到可用的卷组列表: + +``` +$ sudo vgs +VG #PV #LV #SN Attr VSize VFree +fedora_fedora 1 1 0 wz--n- 19.00g 0 +``` + +在本例中,只有一个卷组可用。接下来,将物理卷添加到 `fedora_fedora`: + +``` +$ sudo vgextend fedora_fedora /dev/vdb +Volume group "fedora_fedora" successfully extended +``` + +你现在应该看到物理卷已被添加到卷组中: + +``` +$ sudo pvs +PV VG Fmt Attr PSize PFree +/dev/vda2 fedora_fedora lvm2 a– <19.00g 0 +/dev/vdb fedora_fedora lvm2 a– <10.00g <10.00g +``` + +看一下卷组: + +``` +$ sudo vgs +VG #PV #LV #SN Attr VSize VFree +fedora_fedora 2 1 0 wz–n- 28.99g <10.00g +``` + +你也可以获得具体卷组和物理卷的详细列表: + +``` +$ sudo vgdisplay fedora_fedora +--- Volume group --- +VG Name fedora_fedora +System ID +Format lvm2 +Metadata Areas 2 +Metadata Sequence No 3 +VG Access read/write +VG Status resizable +MAX LV 0 +Cur LV 1 +Open LV 1 +Max PV 0 +Cur PV 2 +Act PV 2 +VG Size 28.99 GiB +PE Size 4.00 MiB +Total PE 7422 +Alloc PE / Size 4863 / 19.00 GiB +Free PE / Size 2559 / 10.00 GiB +VG UUID C5dL2s-dirA-SQ15-TfQU-T3yt-l83E-oI6pkp +``` + +看下物理卷: + +``` +$ sudo pvdisplay /dev/vdb +--- Physical volume --- +PV Name /dev/vdb +VG Name fedora_fedora +PV Size 10.00 GiB / not usable 4.00 MiB +Allocatable yes +PE Size 4.00 MiB +Total PE 2559 +Free PE 2559 +Allocated PE 0 +PV UUID 4uUUuI-lMQY-WyS5-lo0W-lqjW-Qvqw-RqeroE +``` + +现在我们已经添加了磁盘,我们可以为逻辑卷 (LV) 分配空间: + +``` +$ sudo lvs +LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert +root fedora_fedora -wi-ao---- 19.00g +``` + +看一下逻辑卷。下面是详细的逻辑卷信息: + +``` +$ sudo lvdisplay fedora_fedora/root +--- Logical volume --- +LV Path /dev/fedora_fedora/root +LV Name root +VG Name fedora_fedora +LV UUID yqc9cw-AvOw-G1Ni-bCT3-3HAa-qnw3-qUSHGM +LV Write Access read/write +LV Creation host, time fedora, 2020-11-24 11:44:36 -0500 +LV Status available +LV Size 19.00 GiB +Current LE 4863 +Segments 1 +Allocation inherit +Read ahead sectors auto +- currently set to 256 +Block device 253:0 +``` + +查看根文件系统(`/`)的大小,并将它与逻辑卷大小进行比较。 + +``` +$ df -h / +Filesystem Size Used Avail Use% Mounted on +/dev/mapper/fedora_fedora-root 19G 1.4G 17G 8% / +``` + +逻辑卷和文件系统大小都为 19G。让我们给根逻辑卷(`root`)增加 5G。 + +``` +$ sudo lvresize -L +5G fedora_fedora/root +Size of logical volume fedora_fedora/root changed from 19.00 GiB (4863 extents) to 24.00 GiB (6143 extents). +Logical volume fedora_fedora/root successfully resized. +``` + +我们现在有 24G 的逻辑卷可用。看看根文件系统(`/`)。 + +``` +$ df -h / +Filesystem Size Used Avail Use% Mounted on +/dev/mapper/fedora_fedora-root 19G 1.4G 17G 8% / +``` + +我们仍然显示只有 19G 的空闲空间,这是因为逻辑卷与文件系统不一样。要使用增加到逻辑卷的新空间,请调整文件系统的大小。 + +``` +$ sudo resize2fs /dev/fedora_fedora/root +resize2fs 1.45.6 (20-Mar-2020) +Filesystem at /dev/fedora_fedora/root is mounted on /; on-line resizing required +old_desc_blocks = 3, new_desc_blocks = 3 +The filesystem on /dev/fedora_fedora/root is now 6290432 (4k) blocks long. +``` + +看看文件系统的大小。 + +``` +$ df -h / +Filesystem Size Used Avail Use% Mounted on +/dev/mapper/fedora_fedora-root 24G 1.4G 21G 7% / +``` + +正如你所看到的,根文件系统(`/`)已经占用了逻辑卷上的所有可用空间,而且不需要重新启动。 + +现在你已经将一个磁盘初始化为物理卷,并使用新的物理卷扩展了卷组。之后,你增加了逻辑卷的大小,并调整了文件系统的大小,以使用逻辑卷的新空间。 + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/add-storage-to-your-fedora-system-with-lvm/ + +作者:[Tim Bosse][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://fedoramagazine.org/author/maztaim/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2020/11/lvm-add-disk-816x345.jpg +[2]: https://en.wikipedia.org/wiki/Logical_Volume_Manager_(Linux) +[3]: https://fedoramagazine.org/howto-use-sudo/ \ No newline at end of file diff --git a/sources/tech/20190208 3 Ways to Install Deb Files on Ubuntu Linux.md b/sources/tech/20190208 3 Ways to Install Deb Files on Ubuntu Linux.md index 55c1067d12..b7f4497e20 100644 --- a/sources/tech/20190208 3 Ways to Install Deb Files on Ubuntu Linux.md +++ b/sources/tech/20190208 3 Ways to Install Deb Files on Ubuntu Linux.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (robsean) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) diff --git a/sources/tech/20201216 How to View Images from the Linux Terminal.md b/sources/tech/20201216 How to View Images from the Linux Terminal.md deleted file mode 100644 index f8f7c5f560..0000000000 --- a/sources/tech/20201216 How to View Images from the Linux Terminal.md +++ /dev/null @@ -1,193 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to View Images from the Linux Terminal) -[#]: via: (https://www.2daygeek.com/how-to-view-display-images-from-linux-terminal/) -[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) - -How to View Images from the Linux Terminal -====== - -Linux has many GUI applications for viewing images. - -But I have never tried any CLI applications to see it. - -Fortunately while working with the **[ImageMagick tool][1]** I got a command to view an image from the terminal. - -The command name is **“display”**, which is part of the ImageMagick tool. - -This is a great tool that allows NIX users to view images from the terminal. - -Also, I got another great tool called FIM for this purpose. - -We will show you how to install and use it to view images from the Linux terminal. - -These commands use the system’s framebuffer to display images directly from the command line. - -### How to View Images from Terminal Using display Command - -[ImageMagick][2] is a free and open source, feature-rich, command-line based image manipulation tool. - -It used to create, edit, compose, or convert bitmap images. - -It can read and write images in a variety of formats (over 200) including PNG, JPEG, GIF, PDF, SVG and etc,. - -It can resize, mirror, rotate, transform images, adjust image colors, apply various special effects, etc,. - -It supports batch process, which allow you to processes all images at once. - -### How to Install ImageMagick? - -The ImageMagick package is included in the official repository of most Linux distributions. Use the distribution package manager to install it. - -**Make a note:** Make sure you already have “**[Development Tools][3]**” installed on your Linux system as a prerequisite for this. - -For **RHEL/CentOS 6/7** systems, use the **[yum command][4]** to install ImageMagick. - -``` -$ sudo yum install -y ImageMagick ImageMagick-devel -``` - -For **RHEL/CentOS 8** and **Fedora** systems, use the **[dnf command][5]** to install ImageMagick. - -``` -$ sudo dnf install -y ImageMagick ImageMagick-devel -``` - -For **Debian/Ubuntu** systems, use the **[apt command][6]** or **[apt-get command][7]** to install ImageMagick. - -``` -$ sudo apt-get update -$ sudo apt-get install imagemagick -``` - -For **openSUSE** systems, use the **[zypper command][8]** to install ImageMagick - -``` -$ sudo zypper install -y ImageMagick -``` - -To view any image file, run display command as follows. You can close the image by pressing the **“Esc/q”** button. - -``` -$ display bird.jpg -``` - -![][9] - -If you want to open the image with the specified size of the window, use the **“-geometry”** flag. - -``` -$ display -geometry 1000x600 ~/Downloads/bird.jpg -``` - -You can also input position information of the image with display command. The below command open your image 800 pixels from the top and 800 pixels from the top left corner of your desktop. - -``` -$ display -geometry 1000x600+800+800 ~/Downloads/bird.jpg -``` - -If you want to resize the image with the display command, use the following format. - -``` -$ display -resize 600x400 ~/Downloads/bird.jp -``` - -Alternatively, you can use percentage to resize the image. - -``` -$ display -resize 50% ~/Downloads/bird.jpg -``` - -### How to View Images from the Terminal Using fim Command - -[FIM][10] is a lightweight global image viewer designed specifically for Linux. - -But it is not limited to Linux and can be configured to run on other OS such as MS-Windows. - -It’s highly customizable and scriptable image viewer for users who are familiar with software like the VIM text editor. - -It displays the image in full screen and can be easily controlled using the keyboard shortcuts. - -It is very lightweight tool because it only depends on certain libraries. - -It can open many file formats and it can display images in the following video modes. - - * Graphically, with the Linux framebuffer device - * Graphically, under X/Xorg, using the SDL library - * Graphically, under X/Xorg, using the Imlib2 library - * Rendered as ASCII Art in any textual console, using the AAlib library - - - -The right video mode gets auto-detected or selected at runtime, and may be opted in/out before build at configure time, if desired. - -FIM stands for Fbi IMproved, which is the fork of the Fbi Image viewer. - -FIM can be easily installed on Debian/Ubuntu based systems as the package is available in the distribution official repository. For other distributions, you may need to compile it from the source. - -``` -$ sudo apt install fim -``` - -Once installed, you can display an image using the following command. - -``` -$ fim bird.jpg -``` - -You can automatically zoom an image using the **“-a”** option. - -``` -$ fim -a bird.jpg -``` - -![][9] - -If you want to open multiple image files in the current directory, use the wildcard to open them all. Use the **“Pageup/Down”** keyboard shortcuts to move to the next or previous image. - -``` -$ fim -a *.jpg -``` - -To view the image in ASCII format, you can use the **“-t”** flag. - -``` -$ fim -t bird.jpg -``` - -The below keyboard shortcuts allow you to control the images. - - * PageUp/Down : Prev/Next image - * +/- : Zoom in/out - * a : Autoscale - * w : Fit to width - * ESC/q : Quit - - - --------------------------------------------------------------------------------- - -via: https://www.2daygeek.com/how-to-view-display-images-from-linux-terminal/ - -作者:[Magesh Maruthamuthu][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.2daygeek.com/author/magesh/ -[b]: https://github.com/lujun9972 -[1]: https://www.2daygeek.com/resize-convert-images-from-linux-command-line/ -[2]: https://imagemagick.org/ -[3]: https://www.2daygeek.com/install-development-tools-on-ubuntu-debian-arch-linux-mint-fedora-centos-rhel-opensuse/ -[4]: https://www.2daygeek.com/linux-yum-command-examples-manage-packages-rhel-centos-systems/ -[5]: https://www.2daygeek.com/linux-dnf-command-examples-manage-packages-fedora-centos-rhel-systems/ -[6]: https://www.2daygeek.com/apt-command-examples-manage-packages-debian-ubuntu-systems/ -[7]: https://www.2daygeek.com/apt-get-apt-cache-command-examples-manage-packages-debian-ubuntu-systems/ -[8]: https://www.2daygeek.com/zypper-command-examples-manage-packages-opensuse-system/ -[9]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7 -[10]: https://www.nongnu.org/fbi-improved/#docs diff --git a/sources/tech/20201218 Find out how your text will be read with Norka.md b/sources/tech/20201218 Find out how your text will be read with Norka.md index 95a05b8620..e54a0af64c 100644 --- a/sources/tech/20201218 Find out how your text will be read with Norka.md +++ b/sources/tech/20201218 Find out how your text will be read with Norka.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) diff --git a/sources/tech/20201219 6 ways this fullscreen text editor improves focus.md b/sources/tech/20201219 6 ways this fullscreen text editor improves focus.md new file mode 100644 index 0000000000..1671639d4c --- /dev/null +++ b/sources/tech/20201219 6 ways this fullscreen text editor improves focus.md @@ -0,0 +1,84 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (6 ways this fullscreen text editor improves focus) +[#]: via: (https://opensource.com/article/20/12/focuswriter) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) + +6 ways this fullscreen text editor improves focus +====== +This fullscreen editor helps you set your writing goals and keeps +distractions to a minimum so you can achieve them. +![Typewriter with hands][1] + +The great thing about computers is that they’re really good at multi-tasking. + +The bad thing about computers is that they’re really good at multi-tasking. + +Whether you consider yourself, as a human, good or bad at multi-tasking, sometimes you need a little help focusing. One of those times is when you’re trying to compose clear and concise communication. And that’s exactly why Focuswriter was developed. + +### Install + +On Linux, you can install Focuswriter as a Flatpak from [Flathub][2]. + +On Windows or Linux (if you don’t use Flatpak), you can [install Focuswriter from its website][3]. You can also install from source code, also available from the Focuswriter webpage. + +### Using Focuswriter + +Focuswriter is, admittedly, actually a cross between a text editor and a word processor. Its default format is the Open Document Text (.odt) format, so it allows you to style and align text, mark headers, and toggle smart quotes on and off. But that’s where its word processor features end because Focuswriter does mostly focus on _writing_, not on styling what you’ve written. + +Focuswriter encourages focus in a few different ways. + +#### Attractiveness + +Focuswriter doesn’t look like your usual computer application, much less your usual text editor. When it launches, it loads a theme behind your document. The theme is generally benign—a writing desk is the default, but there’s also a starry sky, a faraway landscape, and so on. You’re not meant to become preoccupied with the theme, of course, but it does help you from getting distracted by some other application window or your computer desktop lingering behind your editor. Because it’s easy to customize, there’s little chance of you being left without a theme you like. + +![Focuswriter white box with gray wording on wooden writing desk background theme][4] + +#### Sound effects + +Focuswriter is actually fun to use. Aside from its visual theme, it also has an _optional_ typewriter audio theme. Once enabled, every keypress makes the sound of a mechanical typewriter key. When you press **Return**, the satisfying sound of a carriage return is your reward for completing a paragraph (or a line, if you write one sentence per line to improve version control). + +This audio theme is entirely opt-in, and it’s not on by default. You may doubt its efficacy, but you shouldn’t underestimate the satisfaction of making those sounds of productivity while also wielding the powers of modern text editing. + +#### Fullscreen display + +Focuswriter not only launches fullscreen by default, but it also hides its menus and other widgets from view. To access the main menu bar, you place your cursor to the top of your screen until it appears. There’s a scroll bar hidden on the right, a document switcher widget on the left, and a status bar at the bottom. + +#### Minimalism + +There isn’t much to Focuswriter’s editing capabilities. It doesn’t have advanced search options or specialized options for code formatting or syntax highlighting. It lets you write text, and little else, into a document, by design. Even the contextual right-click menu only offers basic editing functions (copy, cut, paste, and so on) or spell-checking options. + +#### Line focus + +Another optional feature of Focuswriter is its ability to "grey out" all lines of text but your current one. This helps your eyes lazily locate your current line of text, which can be especially helpful if you’re not a touch-typist or if you’re transcribing something you’ve handwritten on physical paper and must look away from the screen often. + +#### Goal tracker + +You can set a daily word count goal or a timed goal for yourself in Focuswriter’s preferences. Your progress is tracked as you work and displayed in the status bar at the bottom of the screen. It’s hidden from your view unless you hover your cursor over it, so you’re not compelled to obsess over it, but it’s convenient enough to help you stay on track. + +### Try Focuswriter (even if you think it’s silly) + +I’ve heard about fullscreen text editors before, and I’ve never felt it was important for me to try one. After all, nearly any application can be made fullscreen, and I don’t personally have trouble focusing anyway. + +Having tried Focuswriter, though, I understand the appeal of a good fullscreen "focus first" text editor. It may not be necessary, but then again, open source is thriving. We have the luxury of redundant sets of applications that have minor differences in function but major differences in implementation. Focuswriter makes writing fun; it makes the work enjoyable. Download it, set a goal, and get writing! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/12/focuswriter + +作者:[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://flathub.org/apps/details/org.gottcode.FocusWriter +[3]: https://gottcode.org/focuswriter/ +[4]: https://opensource.com/sites/default/files/uploads/focuswriter-31_days_focuswriter-opensource.png (Focuswriter white box with gray wording on wooden writing desk background theme) diff --git a/sources/tech/20201220 How to use this KDE Plasma text editor.md b/sources/tech/20201220 How to use this KDE Plasma text editor.md new file mode 100644 index 0000000000..236e1f7b88 --- /dev/null +++ b/sources/tech/20201220 How to use this KDE Plasma text editor.md @@ -0,0 +1,76 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to use this KDE Plasma text editor) +[#]: via: (https://opensource.com/article/20/12/kwrite-kde-plasma) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) + +How to use this KDE Plasma text editor +====== +Part of the popular KDE Plasma desktop, KWrite hides a ton of useful +features in a deceptively simple, easy-to-use interface. +![Coding on a computer][1] + +KWrite is a desktop text editor for KDE’s Plasma desktop. It’s meant to be a universal application that anyone can reasonably use when they need to jot down a quick note, write a school paper, do some programming, and/or anything else you can think to do with a text editor. It uses components of the [Kate editor][2] to create a simple interface but leverages those same components to provide a long list of useful features. + +### Install + +KWrite isn’t intended for general availability; it’s a component of the [Plasma desktop by KDE][3], so if you’re running Plasma, then you already have KWrite. + +If you don’t run Plasma, then you can install Plasma, so you can either start using it along with KWrite or just use KWrite as needed. However, it’s intended as the default text editor for your Plasma desktop, so if you really want to use it as a standalone application, then it’s probably easier to just install Kate. + +### Using KWrite + +When you launch KWrite, you get what you’d expect from a text editor—a big empty field for typing, a menubar and toolbar at the top, and a status bar at the bottom. That’s all you really need to know before getting started. KWrite is an intuitive application, with toolbar buttons for the important activities such as opening and saving a file and a simple menu system for more advanced editing tasks. + +![Kwrite terminal containing dark gray html code on white background][4] + +Many of KWrite’s features are latent—they happen without you activating them yourself. For instance, should you open a file written in HTML, then KWrite highlights keywords (such as `class` and `id`) and recognizes code tags (such as `
` or `