Jump to content

changing my hostname ???


bigjohn
 Share

Recommended Posts

[root@john@localhost john]# sed "s/(HOSTNAME=).*/1localhost.john/" /etc/sysconfig/network > /tmp/network && cat /tmp/network > / etc/sysconfig/network

bash: /: Is a directory

[root@john@localhost john]#

[root@john@localhost john]# service network restart

Shutting down interface eth0: [ OK ]

Shutting down loopback interface: [ OK ]

Setting network parameters: [ OK ]

Bringing up loopback interface: [ OK ]

Bringing up interface eth0: [ OK ]

[root@john@localhost john]#

 

Well, I did as you said, and got the above, judging by the root prompt it hasn't worked (yet, but it seems that we are getting closer!), though should I have done it logged into root properly, and not just have su'd into root?

 

regards

 

John

Link to comment
Share on other sites

[root@john@localhost john]# sed "s/(HOSTNAME=).*/1localhost.john/" /etc/sysconfig/network > /tmp/network && cat /tmp/network > / etc/sysconfig/network

bash: /: Is a directory

see the last part of the command? "/ etc/sysconfig/network" that space between the first / and the "etc/..." shouldn't exist.

 

Be sure that you are copy and pasting rightly. Try again w/o that space. Good luck :)

 

after running both commands remeber to logout and login to reflect the changes in your current session

Link to comment
Share on other sites

Excellent,

 

My host name now reflects

 

[john@localhost john]$

 

Many thanks aru, and sorry if it seems like you are having to answer posts from a total dummy - it's just that I can't get all the wind0w$ stuff out of my head!

 

regards

 

John

 

p.s. Out of curiosity, which part of Spain are you in - my sister lives in Madrid!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...