• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

sudoedit: command not found

by admin

Some Linux files require root user privileges to edit. This could be accomplished with a sudo configuration, but a simpler and more secure option is to use the sudoedit command. This command permits users to edit a file with their credentials, even if the file is only available to the root user. In addition, the user can use their preferred text editor.

To use sudoedit, you must make an entry in the sudoers file. For example, the following line could be added to the sudoers file:

%editors ALL = sudoedit /path/to/file

Any member of the editors group could then enter the following command to edit a file:

$ sudoedit /path/to/file

The sudo configuration is appropriate for commands that need to be executed with elevated privileges, while the sudoedit option is appropriate for files that need to be edited with elevated privileges.

Syntax

The syntax of the sudoedit command is:

$ sudoedit [options] {file name}

If you encounter the below error while running the sudo command:

sudoedit: command not found

you may try installing the sudo package as shown below as per your choice of distribution.

Distribution Command
Debian apt-get install sudo
Ubuntu apt-get install sudo
Alpine apk add sudo
Arch Linux pacman -S sudo
Kali Linux apt-get install sudo
CentOS yum install sudo
Fedora dnf install sudo
Raspbian apt-get install sudo

Filed Under: Linux

Some more articles you might also be interested in …

  1. How to Control user access to Virtual Machine in RedHat Virtualization
  2. bluetoothctl: command not found
  3. nsenter Command Examples in Linux
  4. gzip: command not found
  5. depmod: command not found
  6. colrm : command not found
  7. duc Command Examples in Linux
  8. mkswap: command not found
  9. unlink: command not found
  10. How to allow or deny telnet login to specific users only in CentOS/RHEL

You May Also Like

Primary Sidebar

Recent Posts

  • bazel: Open-source build and test tool similar to Make, Maven, and Gradle.
  • batch: Execute commands at a later time when the system load levels permit
  • bat: Print and concatenate files
  • bastet: Clone of the game Tetris in the terminal

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright