[PLUG] visudo for ubuntu ... pico? nano? joe?

Keith Lofstrom keithl at kl-ic.com
Mon Oct 4 08:12:35 UTC 2021


I am learning about Ubuntu sysadmin, and why I should use
visudo instead of logging in as root user to use vi.
This assumes that Eve hasn't inserted a malware version
of visudo into my path ...

Except - on Ubuntu 18.04 LTS, visudo calls the "nano"
text editor, and on 20.04 LTS it calls the "joe" text
editor.  So WHY still call it visudo?  

Anyway, I will use vi (aka vim) until they pry my keyboard
out of my cold dead fingers.  I change editors as often as
I change lungs.

Other helpful guest sysadmins may prefer this shifting
editor nonsense, so I plan to leave /usr/bin/visudo as-is
and create a /usr/local/sbin/vvisudo shell script
containing "sudo EDITOR=vim visudo" ...

... and add Yet Another Postit with how to exit nano
or joe, or whatever editor they eventually choose for
22.04 LTS, in case I forget the extra v for vvisudo.

Keith

P.S.  Ctl-x for nano, Ctl-k for joe.  I think ...

P.P.S.  vi turns fifty in 2026.  I've used it since it
was beta.  Others change editors more often than they
change their underwear.

-- 
Keith Lofstrom          keithl at keithl.com



More information about the PLUG mailing list