Account Links: Cart | Your Account | Logout

Skip to content

Red Hat Knowledgebase

Red Hat Knowledgebase Search:

Updated Within the Last:

New Solutions within the last day New Solutions within the last week New Solutions within the last month

Browse by topics:


Click to View a Topic
General Linux > Samba > Issue <<  12 of 98 >>

Solution Tools:


Email a Solution Postcard Printer version Submit a comment on this answer Update notifications Request an answer Back

Article Reference

Article ID: 1829
Last update: 07-21-04
Issue:
How do I change my hostname or the machine name?
Resolution:
IP hostnames or machine names can be changed dynamically with the command hostname and persistently by setting the HOSTNAME environment variable in /etc/sysconfig/network.

You can also run the redhat-config-network command, click on the "DNS" tab, and change the "Hostname" field. If samba is running and you wish to set the Netbios name of the system to something other than the IP hostname, this may be accomplished by setting the netbios name parameter in the file /etc/samba/smb.conf. Add a line in this file that denotes: netbios name = <SERVER NAME:>, where <SERVER NAME:> is the name you want Windows to see your machine as. Most people use the system's hostname.



Here is an example on changing the hostname from the command line from jaws to peahi. Note that just running hostname will display your current hostname.

 
# hostname
jaws.example.com
# hostname peahi.example.com
# hostname
peahi.example.com
      


Here is an example on changing the hostname in the /etc/sysconfig/network file from jaws to peahi. Use your preferred text editor to make the changes.

 
# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=jaws.example.com

# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=peahi.example.com
      



How well did this entry answer your question?


good wrong incomplete out of date
General Linux > Samba > Issue <<   12  of  98  >>