Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 11-09-2008, 11:57 PM   #1
Registered: May 2008
Location: Sri Lanka
Distribution: Ubuntu
Posts: 57
Blog Entries: 1

Rep: Reputation: 16
Cool changing localhost

I want to change localhost to a name like
how to do that in ubuntu
Old 11-10-2008, 12:11 AM   #2
Registered: Aug 2008
Location: India
Distribution: Fedora, RedHat
Posts: 101

Rep: Reputation: 17
Either you edit your /etc/hosts file if you want some other name than localhost / localhost.localdomain for your IP.

Code:        localhost    localhost.localdomain
Other way is to edit zones in your local DNS server. Or if you just want to set hostname, you can edit /etc/sysconfig/network file and add entry like this.

Old 11-10-2008, 07:29 AM   #3
Registered: Oct 2008
Posts: 100

Rep: Reputation: 15
It is usually good to keep the name 'localhost', so that you know when you are accessing local web server. The IP will anyway point to the local web server.

I assume that you want to set up a public web server and are confused that your own webpages show up under localhost.

To allow for public web access you have to register the domain name, unless you want to give access IP-number. You then have to set up a virtual host in your local web server for that given domain name. If accessed by IP-number, the first virtual domain will be shown.

For virtual domains see the documentation of your web server.

Last edited by Tinkster; 10-30-2010 at 06:17 PM.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing from localhost? purelithium Mandriva 3 11-08-2005 08:52 PM
Changing localhost name aje Linux - General 1 11-11-2004 11:23 PM
Changing the localhost name in RH9 mosh Linux - Software 1 06-17-2004 11:21 AM
Changing name from localhost jbraum Mandriva 9 01-17-2004 02:04 AM
changing localhost endfx Linux - Software 6 05-15-2003 06:27 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:08 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration