e---edit Verified current stable Not installed? System Operations

E Edit / Edit File As Superuser

Edit File As Superuser

Open and edit a critical system file under superuser privileges.

$
Terminal
sudo -e </etc/fstab>

When To Use

Prior to making configuration changes on critical system files like `/etc/fstab`.

Pro Tip

Always create a backup of critical files before editing. Use `cp /etc/fstab /etc/fstab.bak` before making changes.

Anatomy of Output

Understanding the result

# Entry for /dev/sda1 File Header Comment

Describes the purpose of the subsequent entry.

/dev/sda1 / ext4 errors=remount-ro 0 1 Fstab Entry

Defines mount point and options for the file system.

# Entry for swap File Header Comment

Denotes separate section for swap device.

Troubleshooting

Common pitfalls

Error: file not found

Solution: Ensure the correct file path is specified.

Error: permission denied while editing

Solution: Verify correct privileges are in place to edit the file.

Error: editor not set or configured

Solution: Set the editor variable, e.g., export EDITOR=nano.

Command Breakdown

What each part is doing

sudo
Base Command
The executable that performs this operation. Here it runs E Edit before the shell applies any redirect operators.
-e
e| edit
The value supplied for e| edit.
</etc/fstab>
etc fstab
The value supplied for etc fstab.
-e
Command Option
Tool-specific option used by this command invocation.

Alternative Approaches

Comparable commands in other tools

Alternative system operations tools for the same job.