scy on Nostr: Instead of sudo nano /etc/whatever try running sudo -e /etc/whatever This will make a ...
Instead of
sudo nano /etc/whatever
try running
sudo -e /etc/whatever
This will make a copy of the file to be edited by your normal editor, unprivileged, and when you exit the editor, the original file's contents will be replaced.
The cool thing about this is that you're inside your familiar environment, with your editor's config and all.
The disadvantages are that you have to _exit_ the editor to apply the changes, and you can't load other files.
#Linux #CLI #sudo
sudo nano /etc/whatever
try running
sudo -e /etc/whatever
This will make a copy of the file to be edited by your normal editor, unprivileged, and when you exit the editor, the original file's contents will be replaced.
The cool thing about this is that you're inside your familiar environment, with your editor's config and all.
The disadvantages are that you have to _exit_ the editor to apply the changes, and you can't load other files.
#Linux #CLI #sudo