How to Edit a System File with sudoedit Preserving the Invoking User Environment
On Linux and other Unix-based operating systems, sudo is used to run a program with the privileges of another user, often root. Learn how to edit a system file here.
Source: Linuxtoday.com