Changing the Workspace's Hostname

workspace

#1

How can I change the hostname of my workspace?
I tried changing it on these files:
/etc/hosts
/etc/hostname
When I ran sudo hostname -F /etc/hostname, I got this result:
hostname: you must be root to change the host name
I also used su rather than sudo, but that didn’t help either. I tried rebooting it, but I ended up in the same situation. Any help would be greatly appreciated, thanks.