The Proper Way to Change the VISUDO Editor on Ubuntu and Debian

The Proper Way to Change the VISUDO Editor on Ubuntu and Debian

Written By
i
iDoLinux
Apr 3, 2025

When managing a Linux system, there are times when you may need to modify the /etc/sudoers file to adjust user privileges. However, editing this file incorrectly can lock you out of your administrative privileges or cause serious system issues.

The safest way to edit the /etc/sudoers file is by using the visudo command, which prevents syntax errors and file corruption.

By default, visudo uses the system’s default text editor (often Vim), but you can change this to an editor you prefer. Below, we’ll show you how to safely change the visudo editor on Ubuntu and Debian.

i

iDoLinux

Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.