how to change the hostname is solaris 10

Posted on 2006-11-10
Last Modified: 2013-12-21
hi every one . i am using vmware. and running solaris 10  when it start up its saying unknown hostname. which file do i need to check and correct them  to make it usable

quesition -2
how should be name the hostname
xyz or or
or somthing else. what is right way to do it

i am trying to login remotely using reflectionx in to my solaris server i cant get into with root .it say i cant get
to make it work what the file and permission do i need to change

thanks very much   waiting for your early reply  
Question by:javeedabdul
  • 2
  • 2

Author Comment

ID: 17920505
i just did this coammand

#hostname vmsun1
and retype to see  and it worked . but the internet went down. i could able to surf an y more. but i restarted  every thing back . and again its stating as unknown host .

i think (hostname xyz) is just temporary name for a limited until i reboot.

but to be permanent and tob recognized what way should i need to do

on this machine i am thinking to ftp and email server once of my site
thanks inadvance
LVL 38

Expert Comment

ID: 17927443
The easy way to do it is to run "sys-unconfig" command to unconfigure the box, then
reboot the system and following the screen instructions to fill in your network configuration infor to get the box connet to you network.

For Solaris 10, you can also edit the following files:

To change  the hostname now only requires editing these files:
1. /etc/hosts
2. /etc/nodename
3. /etc/hostname.<interface name>

To change IP,editing two files:

1. /etc/hosts
2. /etc/inet/ipnodes

To set the domainname, edit:
/etc/defaultdomain   # set you default domain

then reboot

For security reason, you should not allow remote login as root (telnet, XDMCP login).

if you really want to do it, edit /etc/default/login file to comment out:

make it


Author Comment

ID: 17930977
i did
sys-unconfig  and did put the hostname in my vmware sol10 . but when it restarted its still showing as unknown

after rebooting its still the same

# cat /etc/hosts
# Internet host table
#       localhost    unknown # Added by DHCP

does not exist
if you asked to type nodename . what is a nodename . where can i find it

/etc/hostname.<interface name>
well this one also i couldnt find it out

how to find the interfacename.
which file does my interface name is stored in
doe i need to create this file

to every question if they do exist how should i write and what should i write
just my hostname  --vmsun1

please let me know
LVL 38

Accepted Solution

yuzh earned 250 total points
ID: 17935264
You should mention your Solaris box is the DHCP client, use a test editor (eg) vi
to create /etc/nodename file,

or do: (login as root)
echo "mybox"> /etc/nodename
then reboot.

If you still have problem, have a look at the following doc and fix it:

/etc/hostname.<interface name>
well this one also i couldnt find it out

Well, you need to replace .<interface name> with the real interface name for your box, type in:

ls -al /etc/hostname.*
 to see what you get

soemthing like /etc/hostsname.eri0
       where eri0, hme0 is the real NIC interface name.

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SSH commands for Nas4free 21 428
change HISTFILE for root user on AIX 3 81
Access Required to Read Linux Security Settings and User Permissions 13 133
Linux hostname change 2 73
Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question