Try:
# hostname <hostname> hostname
<hostname> is the for the name you want to give to the machine without  < > signs.

Abhi.

Arnav Kalra wrote:
[log in to unmask]" type="cite"> Any recommendations?

Regards,
Arnav Kalra
104, Sector 14
Karnal - 132001
Mobile - +91 9896961018
Home - +91 184 4030104



On Wed, May 2, 2012 at 11:13 PM, Luke Teyssier <[log in to unmask]> wrote:

Dear Arnav,

 

Please consider investing in a good Linux System administration book.

 

Regards

 

From: [log in to unmask] [mailto:[log in to unmask]] On Behalf Of Arnav Kalra
Sent: Wednesday, May 02, 2012 10:42 AM
To: Tam Nguyen
Cc: [log in to unmask]
Subject: Re: How do i change hostname?

 

ok. i will edit the file now.

Regards,
Arnav Kalra
104, Sector 14
Karnal - 132001
Mobile - +91 9896961018
Home - +91 184 4030104


On Wed, May 2, 2012 at 11:11 PM, Tam Nguyen <[log in to unmask]> wrote:

Which instruction did you follow? 

To permanently change your hostname that will survive the reboot, you will have to edit the file /etc/sysconfig/network. 

 

the command:

$ hostname lappy

is just a temporary change.

 

On Wed, May 2, 2012 at 1:36 PM, Arnav Kalra <[log in to unmask]> wrote:

Yahoo. It has changed. When i reboot will i get the hostname as lappy or that dhcppc stuff?



Regards,
Arnav Kalra
104, Sector 14
Karnal - 132001
Mobile - +91 9896961018
Home - +91 184 4030104


On Wed, May 2, 2012 at 11:04 PM, Tam Nguyen <[log in to unmask]> wrote:

If you don't want to reboot your computer, then become root and type this:

[arnav@dhcppc1 ~]$ hostname lappy

 

then exit your terminal and open a new terminal. 

 

The actual file to change your hostname is:

[arnav@dhcppc1 ~]$ vi /etc/sysconfig/network

 

If you edited file /etc/sysconfig/network, then you need to reboot your computer.