I get a message saying: sudo: unable to resolve host (myhostname) each time I write a command.
My hostname does not contain any capital letters or numbers.
Sometimes, even if you've changed the host name via raspi-config, the settings don't stick. To make it permanent:
sudo nano /etc/hosts and change the line that says
127.0.1.1 raspberrypi to
127.0.1.1 myhostname assuming that myhostname is the name you want to use. Save, exit and reboot, and the message will go away.
/etc/hostscontain an entry like127.0.1.1 myhostname?raspi-configyou would not probably have had the problem you originally posted.