Changing the HOSTNAME on Oracle Enterprise Linux

by Eric Jenkinson on September 27, 2011

Categories: Linux

Tagged: ,

Either due to cloning or corporate naming standards, you may find the need to change the hostname of an Oracle Enterprise Linux System.

The current hostname for this machine is and it will be changed to The hostname can be changed by editing /etc/sysconfig/network as the root user.

[root@odlinux ~]# hostname
[root@odlinux ~]# cat /etc/sysconfig/network
[root@odlinux ~]#

[root@odlinux ~]# cat /etc/sysconfig/network
[root@odlinux ~]#

After changing the hostname in you should also change the hostname in /etc/hosts.

[root@secondary ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.       localhost.localdomain localhost        wrath   secondary
::1             localhost6.localdomain6 localhost6
[root@secondary ~]#

While changing the host name is fairly easy care should be taken with applications that might already be installed on the system. Many applications will store the hostname of the system in configuration and start up files at the time of installation. You should check your applications and update their configurations with the new hostname.


  • Yosselyn (September 9, 2012 12:55 am)

    О! да вы производитель тоже. А у вас как система называется?У PIC18F87J60 ethernet тоже встроенный, снаружи только разъем с интегрированным трансформатором.Сколько вам обходится арм? мы пик берем за $5.Флеш атмел верно, на контроллерах на много карт ее стоит 4Мб. По цифрам вместимости в минимальном варианте у нас ключ это 4 байта, событие 9. Вообще надо мне эти цифры немного еще будет прокомментировать на сайте, т.к. они зависят от сложности режимов, но общий смысл их на контроллере 900-ой серии всех параметров достаточно всегда А у вас что в качестве памяти?

  • Kurt (October 16, 2012 11:46 am)

    This is helpful. Thanks for posting it.

  • Eric Jenkinson (October 18, 2012 2:55 pm)

    Hello Kurt,

    I am glad you found the post useful.


  • MIke Blaszczak (November 27, 2014 9:37 am)

    Why not use “hostname -b” to set the host name, and “domainname” to set the domain name?

    Looks like your /etc/hosts file is for a machine with a static IP address. How can the host name be changed on a machine which will receive an address from DHCP?

Post A Comment