Book
Of Zeus
Articles, Tutorials & Source Code
About
Contribute
© 2011-2025 Book of Zeus
All articles, code or tutorials listed on bookofzeus.com/ can be used as reference, links or as in a sharing matter without attribution.
You cannot copy whole tutorials (unless permission is given), either translating to another language.
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
By using and/or reading this site, you agree to our privacy policy and terms and conditions .
Set your hostname and host file
The hostname uniquely identifies your computer on the local network.
The hostname can be use in many services or applications. Once the hostname is set, it is not recommended changing it.
To setup the hostname run this command:
echo "choose_a_better_hostname" > /etc/hostname
hostname -F /etc/hostname
Now, let's set the hostname in the host file.
sudo vi /etc/hosts
and Add the IP address(es) and the hostname:
127.0.0.1 localhost.localdomain localhost
12.34.56.78 choose_a_better_hostname.domain.com choose_a_better_hostname