Author Topic: How to change hostname manually in Oracle Linux 7?  (Read 437 times)

0 Members and 1 Guest are viewing this topic.

Offline LuisaWalker

  • Jr. Member
  • **
  • Posts: 1
  • Karma: 0
  • I've just joined!
    • View Profile
    • Awards
How to change hostname manually in Oracle Linux 7?
« on: December 12, 2019, 12:40:23 pm »
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?

Offline Mark Greaves (PCNetSpec)

  • Hero Member
  • *****
  • Posts: 18277
  • Karma: 477
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: How to change hostname manually in Oracle Linux 7?
« Reply #1 on: December 12, 2019, 11:07:16 pm »
what's the contents of
Code: [Select]
gedit /etc/hostname
and
Code: [Select]
gedit /etc/hosts



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.
« Last Edit: December 12, 2019, 11:14:05 pm by Mark Greaves (PCNetSpec) »
WARNING: You are logged into reality as 'root'
logging in as 'insane' is the only safe option.
pcnetspec.co.uk

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal