How to change hostname on Linux (Red Hat or Oracle)


This is post for those who are new to Red Hat Linux or Oracle Enterprise Linux (OEL) and wish to change hostname :-
.
#. How to find hostname on Linux/OEL ?

    
Use command “hostname” to find host name of Linux
 
#. How to change hostname on Linux/OEL ?
  1. Open file /etc/sysconfig/network  using editor like vi , nano or ed
  2.  Change entry HOSTNAME=XXXXXX to
    HOSTNAME=New_Host_Name
  3. Restart xinetd service or reboot Linux/OEL
    Restart xinetd service xinetd restart
    Reboot Linux reboot
  4. If you have defined hostname resolution in hosts file then change entry in /etc/hosts 

No comments:

How to set the schema session limit in Oracle 23 AI Database.

  In Oracle, to set a session limit per schema (user)—i.e., control how many concurrent sessions a specific user can have. You use profiles ...