Free tech support / small logo


How do I change the hostname in Solaris 9?

Dave, I have just purchased your book Solaris 9 for Dummies to help me learn the OS. I have been accustomed to the rubbish Windows XP Pro system and fed up with crashes and the rest of the multitude of problems that are inherent to Windows therefore I purchased a Sun Ultra 5 workstation (refurbished) and really want to get to know it and how to use it.

My problem is that the welcome screen names Alfred as the host. Please would you tell me how to change the name? bearing in mind that I am completely new to Unix systems and somewhat intimidated by the jargon.


Dave's Answer:

Thanks for your note and for buying my Solaris book. True confession time, though: subsequent to writing that book, I have loaned out my Solaris Blade system to a colleague for a research project, so I actually don't have an Solaris 9 box available to test out my answer.

However, it's pretty straightforward nonetheless.

Your first step is to become root, which you should be able to do by using either the sudo or su root command. Try both, one will work (I prefer the former, personally).

Once you've done that, move into the /etc directory and use a combination of find and grep to see what files contain the name "alfred":

      find . -type f -print | xargs grep -i alfred

I'm sure it'll be in at least /etc/hosts, /etc/nodename and /etc/hostname.xxx (where 'xxx' is your network interface name, like en0 or hme0). It's possible that it might also appear in any of the following too: /etc/net/ticlts/hosts, /etc/net/ticots/hosts, /etc/net/ticotsord/hosts and /etc/inet/ipnodes.

Anywhere you find "alfred", change it to the hostname of your choice. Don't use spaces or punctuation in the name, however, to ensure that no Solaris applications trip up or get confused.

That should do the trick. Reboot and you should have re-christened your Solaris 9 system with a new hostname!









Subscribe!
Never miss another Q&A article! Click to subscribe: Add to Google Reader Add to My Yahoo! Subscribe in NewsGator RDF XML
Comments

We have on solaris 9 server running some telecom software. I have configured some clients and connected through xmanger (ms window xp OS). The problem is this that our clients speed is very slow.

Please any idea how to improve speed, the bandwidth is 2Mb/s.

Should I installed solaris, linux OS on clients to have an improve speed? or install some other software on MS windows instead of xmanager

thanks,

Jamil

Posted by: Jamil marri at October 14, 2009 1:37 PM

I have something to say, now that you mention it, but ...
Starbucks coffee cup I do have a lot to say, and questions of my own for that matter, but first I'd like to say thank you for all your efforts on this Web site by buying you a cup of coffee!

I do have a comment, now that you mention it!











Remember personal info?


Please note that I will never send you any unsolicited email. Ever.

While I'm at it, please note that by submitting a question or comment you're agreeing to my terms of service, which are: you relinquish any subsequent rights of ownership to your material by submitting it on this site.









Recent Entries


Search
I Need Help!
Need Help? Ask Dave Taylor!

Linux Journal: Free Issue!


© 2002 - 2012 by Dave Taylor. All Rights Reserved.

Note: This web site is for the purpose of disseminating information for educational purposes, free of charge, for the benefit of all visitors. We take great care to provide quality information. However, we do not guarantee, and accept no legal liability whatsoever arising from or connected to, the accuracy, reliability, currency or completeness of any material contained on this web site or on any linked site.

[whiteboard marker tray]
"Ask Dave Taylor®" is a registered trademark of Intuitive Systems, LLC.