Changing hostname without errors

view full story

http://unix.stackexchange.com – I tried to change my hostname according to this guide for Debian based system: I edited /etc/hostname file run /etc/init.d/hostname start Though there are errors. Always when I write a sudo command it tells me it can't recognize hostname. After I restarted the system, graphical environment wasn't working, startx command wasn't successful. So, I changed the hostname to old name. Can I change the hostname without errors? (HowTos)