vi /etc/hosts
Original content:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
Add the host name at the back, if the host name is git.abc.tech, modify it to
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 git.abc.tech
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 git.abc.tech
vi /etc/hostname
Original content:
localhost.localdomain
Modify to host name
git.abc.tech
reboot
Restart the host
Use to hostname
hostnamectl
check the modified results after booting