LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 06-13-2002, 08:45 AM   #1
d-rez
LQ Newbie
 
Registered: May 2002
Distribution: RH 7.2
Posts: 18

Rep: Reputation: 0
Rename hostname


How do I rename my pc's hostname

I tried "hostname new_pcname"

and it changed but then when I rebooted

I got sooooooooo many errors (Apache ,squid, etc......)

Do any of you know of a way to change the hostname to where it does not give any errors?
 
Old 06-13-2002, 09:46 AM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 235Reputation: 235Reputation: 235
hostname name-of-host will change the host name... and if your running redhat, you can of course permanently change it in the /etc/sysconfig directory, forgot exact file.. might be hostname.
 
Old 06-13-2002, 10:23 AM   #3
NSKL
Senior Member
 
Registered: Jan 2002
Location: Rome, Italy ; Novi Sad, Srbija; Brisbane, Australia
Distribution: Ubuntu / ITOS2008
Posts: 1,207

Rep: Reputation: 46
On slack just edit /etc/HOSTNAME and put in your new host name, not sure about other distros but it's worth a try.
-NSKL
 
Old 06-13-2002, 11:34 AM   #4
shoot2kill
Member
 
Registered: Jan 2002
Location: California
Distribution: Red Hat
Posts: 402

Rep: Reputation: 30
try hostname -v 'newpcname'
 
Old 06-13-2002, 12:12 PM   #5
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 235Reputation: 235Reputation: 235
Quote:
Originally posted by NSKL
On slack just edit /etc/HOSTNAME and put in your new host name, not sure about other distros but it's worth a try.
-NSKL
Also to add for anyone with Slack, edit your /etc/rc.d/inet1.rc as the Hostname is set there during bootup as well.
 
Old 06-13-2002, 09:49 PM   #6
d-rez
LQ Newbie
 
Registered: May 2002
Distribution: RH 7.2
Posts: 18

Original Poster
Rep: Reputation: 0
Soory guys im using red hat 7.2
 
Old 06-13-2002, 11:32 PM   #7
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 235Reputation: 235Reputation: 235
Quote:
Originally posted by d-rez
Soory guys im using red hat 7.2
Yeah we know, I was just adding to NSKL's post about Slack... which not sure why it was mentioned. You can change your hostname from my first reply.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
is there a way to rename a user? Pear-i Linux - General 3 09-09-2005 04:16 PM
Rename my pc ? Tanc Linux - Newbie 6 09-13-2003 08:28 AM
rename to lowercase Jalalabee Linux - Newbie 11 09-10-2003 11:44 AM
Rename host rhstudent Linux - Networking 1 04-04-2002 09:19 PM
hostname command vs. $HOSTNAME env. variable Silly22 Linux - Networking 2 03-29-2002 05:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:58 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration