The Forums > Linux Tips & Tricks
How to change hostname manually in Oracle Linux 7?
(1/1)
LuisaWalker:
Manually append "HOSTNAME=dbametrix.com" into file /etc/sysconfig/network and restart system does not work on Oracle Linux 7. Could anybody guide me how to change hostname manually in Oracle Linux 7?
Mark Greaves (PCNetSpec):
what's the contents of
--- Code: ---
gedit /etc/hostname
--- End code ---
and
--- Code: ---
gedit /etc/hosts
--- End code ---
See here:
https://docs.oracle.com/en/operating-systems/oracle-linux/8/obe-hostname-cli/index.html
for how to use hostnamectl set-hostname to change the hostname.
or here:
https://linuxforums.org.uk/index.php?topic=3832.msg27792#msg27792
for how to edit /etc/hostname manually.
Navigation
[0] Message Index
Go to full version