Failing with custom Ubuntu WS


I am trying to set up my own workstation using ubuntu but something is not working.

When i am trying to edit /etc/resolv.conf the settings are saved in the first place but after a restart of the vm they are like before again.
Also i am not able to add new network connections, don’t know what has caused this.

When editing sudo nano /etc/network/interfaces
it happens that nano saves all commands to one line before i exit.
Is this normal?
I just press justify and enter ant then all the commands jump into one line with spaces but without paragraphs.

I ended up editing the file using gedit because i was not able to install gksu because of the failing network connectivity.
Anyways i can leave all the lines with the hash signs at the beginning away right?
So the file should look like the following before i save it?

auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static

Thanks for your time.