TL;DR: when posting a solution could you please standardize any editors to something that firstly comes with vanilla Ubuntu, and secondly, is simple to use, regardless of your personal preferences.
I just installed Ubuntu 17.04 for my daughter. It couldn't connect to wifi during installation, so had to install via Ethernet, and after installation during troubleshooting I found this question, which turns out is an easy fix.
Problem was, they chose
gksu gedit to edit the file,which is no longer native to vanilla Ubuntu, with other problems involved for 64-bit OS
A seasoned user may automatically replace
gksu gedit with
sudo vi without any thought,but I'm not one. I tried
gedit,etc; then had to google how to close vi. Laugh all you like. On the other hand, I approve of
gedit as a suitably Windows user-level editor, but if it can't be elevated using
sudo, it's no good either.
sudo -H gedit.
geditfor editing configuration files rather than
nano. After learning
ito jump to a line number in
geditwhy do I want to relearn that in a text based editor?
vimis the solution. ;)
vim. There is nothing to laugh about one having to Google how to exit them, because it's a weird mess. This has been already debated in a question.