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 11-01-2006, 09:16 PM   #1
icechong
Member
 
Registered: Oct 2006
Posts: 42

Rep: Reputation: 15
How to rename my machine


I have just installed a Mandriva 2007 into my linux box. The default machine name is "localhost". i would like to rename it. please help.
 
Old 11-01-2006, 09:45 PM   #2
fireant
LQ Newbie
 
Registered: Nov 2006
Location: Dalmatovo, Russia
Distribution: Debian GNU Linux Sarge
Posts: 26

Rep: Reputation: 15
Quote from man hostname:
Code:
The   host   name   is   usually   set   once   at  system  startup  in
       /etc/rc.d/rc.inet1 or /etc/init.d/boot (normally by  reading  the  con‐
       tents of a file which contains the host name, e.g.  /etc/hostname).
So, edit your /etc/hostname file, and put name of your machine in this file.
 
Old 11-01-2006, 10:02 PM   #3
icechong
Member
 
Registered: Oct 2006
Posts: 42

Original Poster
Rep: Reputation: 15
i cannt find all these files in my Mandriva 2007.
 
Old 11-01-2006, 10:07 PM   #4
fireant
LQ Newbie
 
Registered: Nov 2006
Location: Dalmatovo, Russia
Distribution: Debian GNU Linux Sarge
Posts: 26

Rep: Reputation: 15
Try to create file /etc/hostname, and write name of your machine there.

You can manually set hostname by running this command in terminal emulator:

Code:
$ sudo hostname your_hostname
or, if you create and edit file /etc/hostname by this way:

Code:
$ sudo hostname --file /etc/hostname
 
Old 11-01-2006, 11:54 PM   #5
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Run the Mandriva Control Center -> Networking and look for the option to change network settings (or something similar). There is an option there to change your hostname.
 
Old 11-02-2006, 12:26 AM   #6
icechong
Member
 
Registered: Oct 2006
Posts: 42

Original Poster
Rep: Reputation: 15
Got it changed. Thanks guys.
 
  


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
how to watch linux client machine desktop(activities) from windows machine deepak rawat Linux - Networking 7 07-03-2006 04:59 PM
how to shutdown,restart and log off windows machine remotely through a linux machine deepak rawat Fedora 1 05-23-2006 01:25 AM
sharing internet from a windows 98 machine to a Red Hat Linux machine ritwiksolutions Linux - Newbie 7 03-14-2006 10:20 AM
Rename local machine CloudBuilder Linux - Networking 9 10-14-2003 10:51 AM
Machine Rename? Cerillean Linux - Newbie 6 05-13-2002 02:09 AM

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

All times are GMT -5. The time now is 03:59 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
Open Source Consulting | Domain Registration