Industry guru Dave Taylor answers free tech support questions about a wide variety of business and technical topics, including blogging, Google AdSense, MySpace, Sony PSP, Apple iPod, Mp3 players, management, Linux, SEO, Mac OS X, Facebook, Twitter, LinkedIn and Microsoft Windows.

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!



Help others find this article at Del.icio.us, Digg, Netscape, Reddit, and Simpy.

Subscribe!

Never miss another useful Q&A article again! Subscribe to AskDaveTaylor with Google Reader.

Comments
Rather amazingly, there are no comments on this article yet.

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

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









Remember personal info?


Please note that I will never send you any unsolicited commercial 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.









Search
Find just the answers you seek from among our 1700+ free tech support articles by using our Lijit search engine.


Help!





Subscribe to
Ask Dave Taylor!

Add to Google Reader
Add to My Yahoo!
Subscribe in NewsGator Online

RDF   XML

Free Updates!
Sign up and get free weekly updates and special offers on books, seminars, workshops and more.


Recent Entries
Join the List!
Join my author info mailing list, where you'll learn about my upcoming books, speaking gigs, and more!


Book Links
© 2002 - 2008 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]