Editing Files on a Server: vim Essentials, nano, sudoedit and Changing Config Files Safely
Edit config files on a server with sudoedit instead of sudo vim, take a backup first, read the change with diff -u, test it with nginx -t or sshd -t and use reload instead of restart; a reload with a broken config keeps the site up, a restart takes it down. We cover vim's modes and essential commands, nano, why the editor falls back to nano under sudo, the CRLF and .swp pitfalls and tracking /etc in Git with etckeeper, with real output.
15 Nov 2026
·
14 min
·
9