LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   give my machine a name (https://www.linuxquestions.org/questions/linux-newbie-8/give-my-machine-a-name-146741/)

RIB 02-16-2004 10:59 AM

give my machine a name
 
How do I give my machine a name? All the other machines on my LAN are running windows and have names. The DHCP server entry for my machine is blank.

jtshaw 02-16-2004 11:05 AM

If you use the dhcpcd client then add a -h <name> to the command arguements.

fernashes 02-16-2004 11:06 AM

Do:

vim /etc/hostname

Or your favorite text editor...

Type in your machine's name. For example, the only thing in that file on my computer is: aphrodite

Save and quit.

Restart to see the change!

Whitehat 02-16-2004 11:07 AM

Look in /etc/sysconfig/network if you have a static IP address.

Since you said it's DHCP, it's probably in /etc/hostname or /etc/hosts

You should have a hostname in the /etc/hostname file for your computer already. Also look in /etc/hosts

Check these out and edit them to name your PC and get back to us :)

Peace,
Whitehat

As I was typing....everyone else answered :)

fernashes 02-16-2004 11:10 AM

Quote:

Originally posted by Whitehat

As I was typing....everyone else answered :)

Yep, I'm entertaining myself by seeing how many questions I can answer until somebody gets around to answering my question! :)


All times are GMT -5. The time now is 11:23 AM.