LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Change computer name? (https://www.linuxquestions.org/questions/linux-newbie-8/change-computer-name-308878/)

amer_58 04-02-2005 03:56 AM

Change computer name?
 
What is the command to display the computer name(not user name)?

is it: uname

Also how can I change the name of the computer through a command line?

Thanks.

nwhite 04-02-2005 04:57 AM

uname is just for giving various information about the computer, type "man uname" for more information.

The computer's name is stored (at least in Slackware - as far as I know this is standard) in /etc/HOSTNAME as a plaintext file.
Just open it with any text editor and change it to what you want.

You'll probably need to restart the computer (or re-run some network config scripts - I don't know which ones, so restarting will be easier) for the change to take effect.

varunvarde2007 04-02-2005 08:10 AM

Hi,
For this... in Red Hat Linux 9 you just have to edit a file by giving the following command and just change the hostname with the name you want and to remove starting error of Login Anyway and Try Again screen in the Graphical Mode just edit the second file

1. to change the host name

vi /etc/sysconfig/network

2. to remove the error while starting

vi /etc/hosts

change the current name with the name which you gave in vi /etc/sysconfig/network

and you are done so enjoy still if you have any problem just tell me

Regards,

Varun Varde
varunvarde2007@yahoo.com
www.pcube.no-ip.com


All times are GMT -5. The time now is 04:33 AM.