LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices

Reply
 
LinkBack Search this Thread
Old 07-20-2004, 02:53 PM   #1
jdmml
Member
 
Registered: Jul 2004
Location: Canada
Distribution: Fedora Core 2
Posts: 89

Rep: Reputation: 15
Change localhost


how do u change the default localhost.localdomain to something else
 
Old 07-20-2004, 03:28 PM   #2
bigdogg
Member
 
Registered: Oct 2003
Distribution: Fedora Core 1
Posts: 80

Rep: Reputation: 15
I'm no expert but I would change it in the /etc/hosts file. You can also make entries for other workstations to do the names resolution.

BiG
 
Old 07-20-2004, 03:32 PM   #3
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 95
Hi.

The file you need to change is /etc/sysconfig/network
Also, add the new name to the 127.0.0.1 line in /etc/hosts. Don't remove the localhost parts, otherwise X will fail - just add the new name to the line.

Dave

Last edited by ilikejam; 07-20-2004 at 03:35 PM.
 
Old 01-08-2011, 01:17 PM   #4
linux_alain
Member
 
Registered: Jan 2011
Location: UAE
Distribution: BackTrack, Ubuntu, Red Hat
Posts: 30

Rep: Reputation: 0
Quote:
Originally Posted by ilikejam View Post
Hi.

The file you need to change is /etc/sysconfig/network
Also, add the new name to the 127.0.0.1 line in /etc/hosts. Don't remove the localhost parts, otherwise X will fail - just add the new name to the line.

Dave
Hello there

would u mind type an example of each syntax? moreover, i would like to ask about vi command
I am suffering from this command? i dont know how to use it to edit the /etc/hosts file

thanks in advance (:
 
Old 01-08-2011, 11:23 PM   #5
novice06
Member
 
Registered: Mar 2006
Location: Singapore
Distribution: RHEL, CentOS
Posts: 131

Rep: Reputation: 22
Here we go
vi /etc/sysconfig/network
Press i to change INSERT MODE
Change
HOSTNAME=localhost.localdomain

ESC (switch mode)
:wq (write and quit)

reboot machine to activate
 
Old 01-09-2011, 12:18 AM   #6
linux_alain
Member
 
Registered: Jan 2011
Location: UAE
Distribution: BackTrack, Ubuntu, Red Hat
Posts: 30

Rep: Reputation: 0
Thanx
I'll try it n tell u about the result ^_^
 
Old 01-09-2011, 12:53 AM   #7
linux_alain
Member
 
Registered: Jan 2011
Location: UAE
Distribution: BackTrack, Ubuntu, Red Hat
Posts: 30

Rep: Reputation: 0
k iam using BackTrack4 r2 and i am trying to run apache Tomcat webserver, however, each time i am running the apache (using /apache7/bin/startup.sh) and i type ps to view the runnung processes i do see the java is running however, when i click on the web browser the process got killed immidiately!!?

FYI: i am using virtual box that is runnuing the backtrack on and my main OS is windows7

any hints y i have this prob?

thankssss
 
Old 01-09-2011, 12:59 AM   #8
linux_alain
Member
 
Registered: Jan 2011
Location: UAE
Distribution: BackTrack, Ubuntu, Red Hat
Posts: 30

Rep: Reputation: 0
Quote:
Originally Posted by novice06 View Post
Here we go
vi /etc/sysconfig/network
Press i to change INSERT MODE
Change
HOSTNAME=localhost.localdomain

ESC (switch mode)
:wq (write and quit)

reboot machine to activate
so in this line:-
HOSTNAME=localhost.localdomain
where i am suppose to type the ip address? in my case i want other computers to login to my webserver by typing the ip address of my machine

thanks once again!!
 
Old 01-09-2011, 07:41 AM   #9
novice06
Member
 
Registered: Mar 2006
Location: Singapore
Distribution: RHEL, CentOS
Posts: 131

Rep: Reputation: 22
This is where you can give your machine hostname. If you want to set IP address, you need to edit /etc/sysconfig/network-scripts/ifcfg-ethx
eth0 or eth1 or eth2
 
Old 01-09-2011, 09:17 AM   #10
linux_alain
Member
 
Registered: Jan 2011
Location: UAE
Distribution: BackTrack, Ubuntu, Red Hat
Posts: 30

Rep: Reputation: 0
yeah it is done
thanks lots
 
Old 07-02-2011, 11:18 AM   #11
eosoro
LQ Newbie
 
Registered: Jul 2009
Posts: 7

Rep: Reputation: 0
Edit file /etc/sysconfig/network using text editor e.g vi /etc/sysconfig/network
» Look for HOSTNAME= xxxxxx
» Change the xxxx to the name
you wish to set for your computer.
HOSTNAME= test.com)
» Save the file and restart the
xinetd service . (ex : type service
xinetd restart in your shell)

source : http://www.techiecorner.com/99/how-t...name-in-linux/
 
  


Reply


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change localhost name in username@localhost n175uj Linux - Newbie 4 07-01-2005 08:25 PM
change localhost w/o net legend1079 Red Hat 2 03-03-2004 01:30 PM
How to change localhost.localdomain learn25 Red Hat 1 02-24-2004 07:32 AM
how to change rh 9 box from localhost to something else izibo Linux - Networking 5 07-20-2003 07:01 PM
Localhost change ? mikeshn Linux - General 5 11-27-2002 02:30 PM


All times are GMT -5. The time now is 05:17 PM.

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