From 3140fc255490540983819df04498fa8893c1d088 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 1 Jul 2023 11:34:28 +0800 Subject: [PATCH 1/2] ATRP @wxy https://linux.cn/article-15957-1.html --- ... Lightweight Notepad for Ubuntu and Other Linux.md | 255 ++++++++++++++++++ ... Lightweight Notepad for Ubuntu and Other Linux.md | 220 --------------- 2 files changed, 255 insertions(+), 220 deletions(-) create mode 100644 published/20221205.4 ⭐️⭐️ True Lightweight Notepad for Ubuntu and Other Linux.md delete mode 100644 sources/tech/20221205.4 ⭐️⭐️ True Lightweight Notepad for Ubuntu and Other Linux.md diff --git a/published/20221205.4 ⭐️⭐️ True Lightweight Notepad for Ubuntu and Other Linux.md b/published/20221205.4 ⭐️⭐️ True Lightweight Notepad for Ubuntu and Other Linux.md new file mode 100644 index 0000000000..0bff3de2a8 --- /dev/null +++ b/published/20221205.4 ⭐️⭐️ True Lightweight Notepad for Ubuntu and Other Linux.md @@ -0,0 +1,255 @@ +[#]: subject: "True Lightweight Notepad for Ubuntu and Other Linux" +[#]: via: "https://www.debugpoint.com/lightweight-notepad-linux/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "ChatGPT" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15957-1.html" + +真正轻量级的 Linux 记事本 +====== + +> 轻量级、资源友好的基于 GUI 的基本记事本列表,适用于 Ubuntu 和其他 Linux。 + +![][1] + +Linux 是一个因其速度、稳定性和灵活性而广受欢迎的操作系统。Linux 的一个关键特点是能够根据你的需求自定义和配置系统。这包括选择适合你系统的正确应用程序和工具。本教程将介绍一些适用于 Linux 的最佳轻量级记事本。我们将查看它们的特点、优缺点,并提供选择适合你需求的正确记事本的建议。无论你是学生、程序员,还是喜欢做笔记的普通用户,一款优秀的记事本对于任何 Linux 用户来说都是必不可少的工具。 + +### Ubuntu 和其他发行版的最佳轻量级记事本 + +#### 1、Mousepad + +该列表中的第一个是流行的文本编辑器 - Mousepad。它是 Xfce 桌面环境的默认文本编辑器,使用 GTK 开发。它简单轻便,但与本列表中的 Leafpad 相比,它具有更多的设置和功能。 + +你可以将其视为具有一些额外功能的 Leafpad。 + +其关键特点包括深浅色主题、标签式编辑、字体和插件功能。你可以在安装后和使用过程中发现更多类似的设置。 + +下面是其外观示例: + +![在 Ubuntu 上运行的 mousepad][3] + +由于 Mousepad 在所有主要的 Linux 发行版仓库中都可用,所以安装非常简单。 + +对于 Ubuntu、Linux Mint 和相关发行版,使用以下命令进行安装。 + +``` +sudo apt install mousepad +``` + +对于 Fedora Linux,请使用以下命令: + +``` +sudo dnf install mousepad +``` + +而 Arch Linux 用户可以使用以下命令进行安装: + +``` +sudo pacman -S mousepad +``` + +#### 2、Featherpad + +[FeatherPad][4] 是一个独立于桌面环境的基于 Qt 的轻量级文本编辑器,适用于 Ubuntu 和其他 Linux 发行版。它的一些关键特性包括拖放支持、分离和附加标签、虚拟桌面感知,以及一个可选的固定搜索栏,并有每个标签的入口。 + +此外,它可以在搜索时立即突出显示找到的匹配项,提供了一个停靠窗口用于文本替换,并支持显示行号和跳转到特定行。 + +此外,Featherpad 可以检测文本编码,为常见的编程语言提供语法高亮,并支持会话管理。它还具有拼写检查(使用 Hunspell)、文本缩放、打印和自动保存等功能。 + +![在 Ubuntu 上运行的 Featherpad][5] + +安装 Featherpad 很简单。 + +对于 Ubuntu 和相关的发行版,你可以使用终端中的以下命令进行安装: + +``` +sudo apt install featherpad +``` + +对于 Fedora Linux,请使用以下命令进行安装: + +``` +sudo dnf install featherpad +``` + +Arch Linux 用户可以使用以下命令进行安装: + +``` +sudo pacman -S featherpad +``` + +#### 3、Leafpad + +[Leafpad][6] 是一个基于 GTK 的简单的轻量级 Linux 文本编辑器。它旨在快速、易于使用,并且需要最少的资源。Leafpad 具有干净直观的用户界面,提供了你所需的所有基本文本编辑工具,如剪切、复制和粘贴,并支持撤消和重做。此外,它还支持多种编程语言的语法高亮,使其成为程序员的有用工具。 + +由于其简单和高效性,Leafpad 是 Linux 用户的热门选择。它可能是 Windows 记事本应用程序的完美替代品。它具有所有基本功能,包括自动换行、行号、字体选择和自动缩进。 + +下面是它的外观示例。这是列表中最简单和轻量级的记事本。 + +![leafpad - 在 Ubuntu 上运行的简易记事本][7] + +但是,在 Ubuntu 上安装 Leafpad 有些棘手。不幸的是,它在 Universe 仓库中不可用,只能作为 Snap 软件包而不是 Flatpak 软件包使用。 + +但是,你可以从 Debian 仓库中获取并在 Ubuntu 中安装它。 + +从 Debian 仓库下载 deb 文件,并使用以下命令进行安装。 + +``` +wget http://ftp.us.debian.org/debian/pool/main/l/leafpad/leafpad_0.8.18.1-5_amd64.deb +``` + +``` +sudo dpkg -i leafpad_0.8.18.1-5_amd64.deb +``` + +Fedora 用户可以使用以下命令进行安装: + +``` +sudo dnf install leafpad +``` + +Arch Linux 用户可以使用以下命令进行安装: + +``` +sudo pacman -S leafpad +``` + +#### 4、Beaver 编辑器 + +[Beaver][8] 编辑器是一个轻量级、启动快速的文本编辑器,具有极少的依赖性。它是基于 GTK+2 库构建的,不需要额外安装的库,非常适合在较旧的计算机和小型 Linux 发行版上使用。Beaver 的核心功能包括基本功能和语法高亮,还可以通过插件添加额外功能。其界面简洁高效,并包含高质量的 Tango 美术作品。 + +![Beaver 编辑器在 Ubuntu 上运行][9] + +这是一个有些老旧的应用程序,但它仍然正常工作。目前,它仅适用于 Ubuntu 和相关的发行版。你可以下载预编译的 deb 文件,并使用以下命令进行安装: + +``` +wget https://www.bristolwatch.com/debian/packages/beaver_amd64.deb +``` + +``` +sudo dpkg -i beaver_amd64.deb +``` + +#### 5、Gedit + +[Gedit 文本编辑器][10] 是 GNOME 桌面环境的默认文本编辑器,被数百万用户在诸如 Ubuntu 和 Fedora 等各种 Linux 发行版上使用。它是核心 GNOME 应用程序的一部分,旨在成为一个轻量级的通用文本编辑器。然而,通过其设置和已安装的插件,Gedit 也包含许多增强生产力的功能,使得它能够与其他流行的文本编辑器竞争。 + +尽管如此,它最近已经从 GNOME 桌面的默认编辑器标签中“降级”。基于现代 GTK4 的 [GNOME 文本编辑器][11] 已取而代之。 + +但它仍然是最好的编辑器之一,你可以通过插件和 [各种技巧][12] 将其从简单的编辑器扩展为更高级的编辑器。 + +![Gedit 文本编辑器][13] + +要安装它,请使用以下命令(针对 Ubuntu 和相关发行版): + +``` +sudo apt install gedit +``` + +对于 Fedora Linux 用户,请使用以下命令进行安装。 + +``` +sudo dnf install gedit +``` + +最后,Arch Linux 用户可以使用以下命令进行安装: + +``` +sudo pacman -S gedit +``` + +#### 6. Xed + +如果你使用 Linux Mint,那么你可能听说过 Xed。Xed 是 Linux Mint 的默认文本编辑器,它非常轻量级。作为一个 “Xapp” 应用程序,它遵循 Linux Mint 的设计和功能指南,提供简单的用户界面、强大的菜单、工具栏和功能。 + +Xed 的一些主要特点包括: + +- 传统的用户界面,保持简洁易用 +- 强大的工具栏和上下文菜单选项,增强功能的能力 +- 语法高亮显示 +- 配置选项,如标签、编码等 +- 支持 UTF-8 文本 +- 编辑远程服务器文件 +- 广泛的插件支持,可根据需要添加更多高级功能 +- 支持概览地图 +- 可缩放的编辑窗口 + +Xed 是最好的编辑器之一,可作为 Linux 系统上轻量级记事本的替代品。 + +![Xed 编辑器来自 Linux Mint 团队][14] + +如果你使用的是 Linux Mint,它应该是默认安装的。然而,在 Ubuntu 中安装它需要运行一系列命令。打开终端并运行以下命令来在 Ubuntu 中安装 Xed。 + +``` +wget http://packages.linuxmint.com/pool/import/i/inxi/inxi_3.0.32-1-1_all.deb +wget http://packages.linuxmint.com/pool/backport/x/xapp/xapps-common_2.4.2+vera_all.deb +wget http://packages.linuxmint.com/pool/backport/x/xapp/libxapp1_2.4.2+vera_amd64.deb +wget http://packages.linuxmint.com/pool/backport/x/xed/xed-common_3.2.8+vera_all.deb +wget http://packages.linuxmint.com/pool/backport/x/xed/xed_3.2.8+vera_amd64.deb +``` + +``` +sudo dpkg -i inxi_3.0.32-1-1_all.deb +sudo dpkg -i xapps-common_2.4.2+vera_all.deb +sudo dpkg -i libxapp1_2.4.2+vera_amd64.deb +sudo dpkg -i xed-common_3.2.8+vera_all.deb +sudo dpkg -i xed_3.2.8+vera_amd64.deb +``` + +有关更多详情,请访问 [Xed 的 GitHub 存储库][15]。 + +### 内存和资源比较 + +由于我们在讨论性能,这是比较的关键,我们列出了上述所有应用程序在最新的 Ubuntu 安装中消耗的内存。 + +正如你所看到的,Xfce 的 Mousepad 最轻量级,而 Gedit 最占资源。 + +| 应用程序名称 | Ubuntu 闲置时消耗的内存 | +| :- | :- | +| Mousepad | 303 KB | +| Featherpad | 1.7 MB | +| Leafpad | 7.7 MB | +| Beaver pad | 11.1 MB | +| Gedit | 30.2 MB | +| Xed | 32.1 MB | + +### 总结 + +总之,在 Linux 上选择一个轻量级的记事本对于各种用途至关重要。无论你是需要记笔记、编写代码还是编辑文本,轻量级记事本可以让你的工作更快、更轻松、更高效。Linux 操作系统提供了各种记事本应用程序,每个应用程序都具有其独特的功能和能力。 + +这份轻量级 Linux 记事本的前几名(应用程序)列表探讨了一些应用程序,包括 Leafpad、Gedit、Mousepad 和其他应用程序。 + +无论你选择哪个记事本,你可以确信它将提供你在 Linux 系统上完成工作所需的功能。 + +你最喜欢哪个?在评论框里告诉我吧。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/lightweight-notepad-linux/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:ChatGPT +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/wp-content/uploads/2022/12/notepad-1head.jpg +[2]: https://www.debugpoint.com/notepad-replacement-ubuntu/ +[3]: https://www.debugpoint.com/wp-content/uploads/2022/12/mousepad-running-in-Ubuntu.jpg +[4]: https://github.com/tsujan/FeatherPad +[5]: https://www.debugpoint.com/wp-content/uploads/2022/12/featherpad-running-in-Ubuntu.jpg +[6]: http://tarot.freeshell.org/leafpad/v +[7]: https://www.debugpoint.com/wp-content/uploads/2022/12/leafpad-a-simple-notepad-running-in-Ubuntu.jpg +[8]: https://sourceforge.net/projects/beaver-editor/ +[9]: https://www.debugpoint.com/wp-content/uploads/2022/12/Beaver-editor-running-in-Ubuntu.jpg +[10]: https://wiki.gnome.org/Apps/Gedit +[11]: https://www.debugpoint.com/gnome-text-editor/ +[12]: https://www.debugpoint.com/gedit-features/ +[13]: https://www.debugpoint.com/wp-content/uploads/2022/12/gedit-text-editor.jpg +[14]: https://www.debugpoint.com/wp-content/uploads/2022/12/Xed-editor-from-Linux-Mint-team.jpg +[15]: https://github.com/linuxmint/xed \ No newline at end of file diff --git a/sources/tech/20221205.4 ⭐️⭐️ True Lightweight Notepad for Ubuntu and Other Linux.md b/sources/tech/20221205.4 ⭐️⭐️ True Lightweight Notepad for Ubuntu and Other Linux.md deleted file mode 100644 index f11a34a66c..0000000000 --- a/sources/tech/20221205.4 ⭐️⭐️ True Lightweight Notepad for Ubuntu and Other Linux.md +++ /dev/null @@ -1,220 +0,0 @@ -[#]: subject: "True Lightweight Notepad for Ubuntu and Other Linux" -[#]: via: "https://www.debugpoint.com/lightweight-notepad-linux/" -[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" -[#]: collector: "lkxed" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -True Lightweight Notepad for Ubuntu and Other Linux -====== - -**A current list of lightweight and resource-friendly basic GUI-based notepad(s) for Ubuntu and other Linux.** - -![][1] - -Linux is a popular operating system known for its speed, stability, and flexibility. One of the key features of Linux is the ability to customize and configure the system to suit your needs. This includes choosing the right applications and tools to use on your system. This tutorial will explore some of the best lightweight notepads for Linux. We will look at their features, pros, and cons and provide tips on choosing the right notepad for your needs. Whether you’re a student, programmer, or simply someone who likes to take notes, a good notepad is an essential tool for any Linux user. - -### Why this list? - -We highlighted some of the best Notepad++ replacements for Ubuntu and other Linux distros a few days back. Since Notepad++ is an advanced notepad, it may not fit the actual lightweight criteria. For example, if you want to take some quick notes and nothing else, then Notepad++ or code editors can be an overkill. - -Also, a thin resource footprint-based editor can be kept open for longer without worrying about memory and other things. - -In addition, many DebugPoint readers commented about the following editors in the [Notepad++ article][2]. Hence this special list. - -### Best lightweight notepad for Ubuntu and other distros - -#### 1. Mousepad - -The first on this list is the popular text editor – mousepad. It’s Xfce desktop’s default text editor developed with GTK. It’s simple and lightweight but has more settings and features, especially if you compare it with the leafpad in this list. - -You may call it a leafpad with some additional features. - -Key feature includes dark/light themes, tabbed editing support, font and plugin features. You can discover more such settings after installation and during usage. - -Here’s how it looks. - -![mousepad running in Ubuntu][3] - -Installing mousepad is easy since it is available in all the major Linux distro’s repo. - -For Ubuntu, Linux Mint and related distributions, use the following command to install. - -``` -sudo apt install mousepad -``` - -For Fedora Linux, use the following command: - -``` -sudo dnf install mousepad -``` - -And Arch Linux users can install it using the following command: - -``` -sudo pacman -S mousepad -``` - -#### 2. Featherpad - -[FeatherPad][4] is a lightweight Qt-based text editor for Ubuntu and other Linux distros that is independent of any desktop environment. Some key features include drag-and-drop support, including the ability to detach and attach tabs, virtual desktop awareness, and an optional permanent search bar with individual entries for each tab. - -In addition, it can instantly highlight found matches when searching, a docked window for text replacement and support for showing line numbers and jumping to specific lines. - -Furthermore, featherpad can detect text encoding, provide syntax highlighting for common programming languages, and support session management. It also has features like spell-checking with Hunspell, text zooming, printing, and auto-saving. - -Installing featherpad is easy. - -For Ubuntu and related distros you can install it using the following command from the terminal: - -``` -sudo apt install featherpad -``` - -For Fedora Linux, use the following command to install; - -``` -sudo dnf install featherpad -``` - -Arch Linux users can use the following to install: - -``` -sudo pacman -S featherpad -``` - -![featherpad running in Ubuntu][5] - -#### 3. Leafpad - -[Leafpad][6] is a simple and lightweight text editor for Linux based on GTK. It is designed to be fast, easy to use, and require minimal resources. Leafpad features a clean and intuitive user interface, with all the basic text editing tools you need, such as cut, copy, and paste, and support for undo and redo. Furthermore, it also includes support for syntax highlighting for several programming languages, making it a useful tool for programmers. - -Leafpad is a popular choice among Linux users due to its simplicity and efficiency. It is perhaps the exact replacement for the Windows Notepad application. It has all the basic features, including word wrap, line numbers, font selection and auto-indentation. - -Here’s how it looks. The most simple and lightweight notepad in this list. - -![leafpad - a simple notepad running in Ubuntu][7] - -But installing Leafpad is a little tricky in Ubuntu. Unfortunately, it’s unavailable in the Universe repo and only available as Snap and not Flatpak. - -However, you can get it from the Debian repo and install it in Ubuntu. - -Download the deb file from the Debian repo and install it using the following commands. - -``` -wget http://ftp.us.debian.org/debian/pool/main/l/leafpad/leafpad_0.8.18.1-5_amd64.deb -``` - -``` -sudo dpkg -i leafpad_0.8.18.1-5_amd64.deb -``` - -Fedora users can install it using the following command. - -``` -sudo dnf install leafpad -``` - -And Arch Linux users via below. - -``` -sudo pacman -S leafpad -``` - -#### 4. Beaver editor - -[Beaver][8] editor is a lightweight, fast-starting text editor with minimal dependencies. It is built on the GTK+2 library and does not require additional libraries to be installed, making it well-suited for use on older computers and in small Linux distributions. Beaver’s core features include basic functionality and syntax highlighting, and additional functionality can be added through plugins. Its interface is clean and efficient, and it includes high-quality Tango artwork. - -![Beaver editor running in Ubuntu][9] - -It’s a little older app, but it works fine. However, it is only available for Ubuntu and related distros at the moment. You can download the pre-compiled deb file and install it using the following command: - -``` -wget https://www.bristolwatch.com/debian/packages/beaver_amd64.deb -``` - -``` -sudo dpkg -i beaver_amd64.deb -``` - -#### 5. Gedit - -The [gedit text editor][10] is the default text editor for the GNOME desktop environment and is used by millions of people on various Linux distributions such as Ubuntu and Fedora. It is a part of the core GNOME applications and is intended to be a lightweight, general-purpose text editor. However, gedit also includes many productivity features through its settings and installed plugins, allowing it to compete with other popular text editors. - -That said, it has been “demoted” recently from its default editor tag on the GNOME desktop. The modern GTK4-based [gnome-text-editor][11] has replaced it. - -However, it’s one of the best editors, and you can expand it from a simple editor to a more advanced editor using plugins and [various tips][12]. - -![gedit text editor][13] - -To install it, use the following commands for Ubuntu and related distributions/ - -``` -sudo apt install gedit -``` - -For Fedora Linux users, use the following command. - -``` -sudo dnf install hgedit -``` - -Finally, Arch Linux users can use the following command to install it: - -``` -sudo pacman -S gedit -``` - -### Memory and resource comparison - -Since we are discussing the performance here, which is key to the comparison, we listed below the memory consumed by all the above apps in the latest Ubuntu install. - -As you can see, the Xfce’s mousepad is the most lightweight, whereas the gedit is the heavier. - -| **App name** | **memory consumed at idle in Ubuntu** | -| :- | :- | -| mousepad | 303 KB | -| featherpad | 1.7 MB | -| leafpad | 7.7 MB | -| beaver pad | 11.1 MB | -| gedit | 30.2 MB | - -### Wrapping Up - -In conclusion, a lightweight notepad for Linux is essential for every use case. Whether you need to take notes, write code, or edit text, a lightweight notepad can make your work faster, easier, and more efficient. The Linux operating system offers a wide range of notepad applications, each with its unique features and capabilities. - -This top list of lightweight Linux notepad(s) explored some apps, including Leafpad, Gedit, mousepad and others. - -No matter which notepad you choose, you can be sure it will provide the features you need to complete your work on your Linux system. - -Which one is your favourite? Let me know in the comment box. - --------------------------------------------------------------------------------- - -via: https://www.debugpoint.com/lightweight-notepad-linux/ - -作者:[Arindam][a] -选题:[lkxed][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.debugpoint.com/author/admin1/ -[b]: https://github.com/lkxed -[1]: https://www.debugpoint.com/wp-content/uploads/2022/12/notepad-1head.jpg -[2]: https://www.debugpoint.com/notepad-replacement-ubuntu/ -[3]: https://www.debugpoint.com/wp-content/uploads/2022/12/mousepad-running-in-Ubuntu.jpg -[4]: https://github.com/tsujan/FeatherPad -[5]: https://www.debugpoint.com/wp-content/uploads/2022/12/featherpad-running-in-Ubuntu.jpg -[6]: http://tarot.freeshell.org/leafpad/v -[7]: https://www.debugpoint.com/wp-content/uploads/2022/12/leafpad-a-simple-notepad-running-in-Ubuntu.jpg -[8]: https://sourceforge.net/projects/beaver-editor/ -[9]: https://www.debugpoint.com/wp-content/uploads/2022/12/Beaver-editor-running-in-Ubuntu.jpg -[10]: https://wiki.gnome.org/Apps/Gedit -[11]: https://www.debugpoint.com/gnome-text-editor/ -[12]: https://www.debugpoint.com/gedit-features/ -[13]: https://www.debugpoint.com/wp-content/uploads/2022/12/gedit-text-editor.jpg From 4c6cbe561cb2c62ffd6b308f2506869db71b31be Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 1 Jul 2023 17:42:28 +0800 Subject: [PATCH 2/2] RP @geekpi https://linux.cn/article-15958-1.html --- ...ays to Add Users to SUDOERS Group in Debian.md | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) rename {translated/tech => published}/20230623.0 ⭐️ 2 Ways to Add Users to SUDOERS Group in Debian.md (76%) diff --git a/translated/tech/20230623.0 ⭐️ 2 Ways to Add Users to SUDOERS Group in Debian.md b/published/20230623.0 ⭐️ 2 Ways to Add Users to SUDOERS Group in Debian.md similarity index 76% rename from translated/tech/20230623.0 ⭐️ 2 Ways to Add Users to SUDOERS Group in Debian.md rename to published/20230623.0 ⭐️ 2 Ways to Add Users to SUDOERS Group in Debian.md index 33cdb6ba7f..f52b02726d 100644 --- a/translated/tech/20230623.0 ⭐️ 2 Ways to Add Users to SUDOERS Group in Debian.md +++ b/published/20230623.0 ⭐️ 2 Ways to Add Users to SUDOERS Group in Debian.md @@ -3,18 +3,20 @@ [#]: author: "Arindam https://www.debugpoint.com/author/admin1/" [#]: collector: "lkxed" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15958-1.html" 在 Debian 中将用户添加到 SUDOERS 组的 2 种方法 ====== -**以下是如何将用户添加到 Debian Linux 中的 SUDOERS 组。** +![][0] + +> 以下是如何将用户添加到 Debian Linux 中的 SUDOERS 组的方法。 在 Debian Linux 中,SUDOERS 组在向用户授予管理权限方面发挥着至关重要的作用。将用户添加到 SUDOERS 组使他们能够以 root 权限执行命令,从而为他们提供必要的管理访问权限以在 Debian 系统上执行各种任务。 -在安装 Debian Linux 的过程中,如果你将 “root” 帐户的密码保留为空,那么系统中的[创建的第一个用户][1]将拥有管理权限。但是,如果你设置了 “root” 密码,那么用户名将不具有 sudo 权限。因此,在使用用户帐户执行管理任务时,你可能会遇到以下类似的错误。 +在安装 Debian Linux 的过程中,如果你将 `root` 帐户的密码保留为空,那么系统中的 [创建的第一个用户][1] 将拥有管理权限。但是,如果你设置了 `root` 密码,那么用户名将不具有 sudo 权限。因此,在使用用户帐户执行管理任务时,你可能会遇到以下类似的错误。 ``` is not in the sudoers file. This incident will be reported. @@ -37,7 +39,7 @@ su - 系统将提示你提供 root 密码。输入 root 密码并按回车键。 -以 root 用户身份登录后,输入以下命令。确保根据你的用户名进行更改。在此示例中,将 “arindam” 替换为你的用户名。 +以 root 用户身份登录后,输入以下命令。确保根据你的用户名进行更改。在此示例中,将 `arindam` 替换为你的用户名。 ``` /sbin/addgroup arindam sudo @@ -65,7 +67,7 @@ su - nano /etc/sudoers ``` -添加以下行和用户名。根据你的用户名更改 “arindam”。 +添加以下行和用户名。根据你的用户名替换 `arindam`。 ``` arindam ALL=(ALL) ALL @@ -75,7 +77,7 @@ arindam ALL=(ALL) ALL ### 验证 SUDOERS 组成员 -要验证用户是否已成功添加到 SUDOERS 组,你可以打开一个新的终端窗口并输入以下命令。将 “username” 替换为你添加到 SUDOERS 组的用户的实际用户名。 +要验证用户是否已成功添加到 SUDOERS 组,你可以打开一个新的终端窗口并输入以下命令。将 `arindam` 替换为你添加到 SUDOERS 组的用户的实际用户名。 ``` sudo -l -U arindam @@ -91,6 +93,8 @@ sudo -l -U arindam 请记住在委派管理权限时要小心谨慎,并定期检查用户权限以维护安全的 Debian 系统。 +*(题图:MJ/c71c2f28-51c7-44c7-87be-af88088bf459)* + -------------------------------------------------------------------------------- via: https://www.debugpoint.com/add-users-sudoers/ @@ -106,4 +110,5 @@ via: https://www.debugpoint.com/add-users-sudoers/ [b]: https://github.com/lkxed/ [1]: https://www.debian.org/releases/stable/amd64/ch06s03.en.html#user-setup-root [2]: https://www.debugpoint.com/wp-content/uploads/2023/06/Before-adding-a-user-to-SUDOERS-group.png -[3]: https://www.debugpoint.com/wp-content/uploads/2023/06/After-granting-priviledges.png \ No newline at end of file +[3]: https://www.debugpoint.com/wp-content/uploads/2023/06/After-granting-priviledges.png +[0]: https://img.linux.net.cn/data/attachment/album/202307/01/174031t6p74rx6ixlmyjr7.jpg \ No newline at end of file