Keep It Simple Stupid

TIL: sudoedit

| comments

The command-line interface in Linux/UNIX is extremely powerful due to the combinable features of a shell and a vast number of different programs. You can discover new tools all the time. For example, I recently discovered that the sudo package has the sudoedit command to edit files as root.

So instead of

$ sudo vim /etc/hosts

you can

$ sudoedit /etc/hosts

The advantage of this is that the editor is run as your user, not as root, increasing security. Works in Linux and OS X.

There is a bit more information here: