Welcome to Linux Forums!

With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.

Linux Forum ArticlesLinux ForumsLinux Forum DownloadsLinux Hosts
Home|Register|FAQ|Member List|Calendar|Unanswered Posts|Forum Rules|Today's Posts|Advanced Search|
SEARCH FOR IN
Go Back   Linux Forums > The Community > Everything BSD
Reload this Page sysctl hostname
Linux Forums
Linux Forums
Welcome To The Linux Forums!
Welcome to Linux Forums. We pride ourselves in being one of the largest Linux communities on the web, we encourage you to REGISTER on our forums and participate in the community. There are over 150,000 members ready to answer your questions. JOINING US today will allow you to make new posts, get support, send messages to other members and submit downloads to our downloads directory and many other great features!

Everything BSD For all discussions regarding Free/NetBSD and OpenBSD.

Reply
 
Thread Tools Display Modes
Old 12-17-2006   #1 (permalink)
cipherus
Just Joined!
 
Join Date: Dec 2006
Posts: 12
sysctl hostname

freebsd 6.0

i try to set new hostname using:

Code:
sysctl kern.hostname=newhost.com
it works, but now when i try xterm it says:

Code:
$ xterm
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
xterm Xt error: Can't open display: :0.0
so i change hostname back and xterm works again. can i change hostname without restart?
cipherus is offline   Reply With Quote
Old 02-02-2007   #2 (permalink)
stukov
Just Joined!
 
stukov's Avatar
 
Join Date: Feb 2007
Posts: 37
You could try setting your hostname with the "hostname" command. I have absolutely no clue if it will work...

Let me know if it did.

EDIT: You can also set your hostname in /etc/rc.conf so that when you reboot it will be already set.
stukov is offline   Reply With Quote
Old 02-02-2007   #3 (permalink)
ajay.redhat
Just Joined!
 
Join Date: Jan 2007
Posts: 11
for changing the hostname without restart the system.

sysctl kernel.hostname=newhost.com

also make the entry in /etc/sysctl for permanent.

kernel.hostname=newhost.com
ajay.redhat is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT. The time now is 05:33 PM.




© 2000 - 2008 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.0.0