Tip & How-To about Computers & Internet

Openbsd how to change hostname

Login as root and type below command:
# echo "new-hostname.domain.com" > /etc/myname
# echo "server.nixcraft.in" > /etc/myname
# echo 'unixbox' > /etc/myname

Posted by on

Computers & Internet Logo

Related Topics:

Related Questions:

1 Answer

how to find the server name

I will assume "server" is a domain controller running a dhcp server.

you need to type two commands.

command 1: ipconfig

This will tell you the ip address of the server (gateway)

command 2: ping -a xxx.xxx.xxx.xxx (ip address of the server/gateway)

adding -a to ping resolves the ip address back to the hostname.

Hope this helps!

Aug 11, 2009 | Computers & Internet

1 Answer

Requirements RedHat Linux (should apply to 7.x and up) This tutorial covers changing your hostname in RedHat Linux without having to do a reboot for the changes to take effect. I?ve tested this on RedHat 7.3, 9, Fedora Core 9, and RHEL 5.3. It should work for all the versions in between since they all closely follow the same RedHat configuration. What?s the point of this tutorial? Never reboot if you don?t have to and keep your uptime intact. Make sure you are logged in as root and move to /etc/sysconfig and open the network file in vi. cd /etc/sysconfig vi network Look for the HOSTNAME line and replace it with the new hostname you want to use. In this example I want to replace localhost with ?MyServer?. HOSTNAME=MyServer When you are done, save your changes and exit vi. Next we will edit the /etc/hosts file and set the new hostname. vi /etc/hosts In hosts, edit the line that has the old hostname and replace it with your new one. MyServer Save your changes and exit vi. The changes to /etc/hosts and/etc/sysconfig/network are necessary to make your changes persistent(in the event of an unscheduled reboot). Now we use the hostname program to change the hostname that is currently set. hostname MyServer And run it again without any parameters to see if the hostname changed. hostname Finally we will restart the network to apply the changes we made to /etc/hosts and /etc/sysconfig/network. service network restart To verify the hostname has been fully changed, logout of your system and you should see your new hostname being used at the login prompt and after you?ve logged back in. Quick, painless, and you won?t lose your server?s uptime.

Jan 13, 2010 | Computers & Internet

2 Answers

how to speed up my net


Here you go;

Windows XP change DNS server
You can Click on Start button > Settings > Network connections
Double click on Local Area Connection or your Internet connection
Click on Properties button
Select Internet Protocol (TCP/IP)
Click on Properties button and Look for Preferred DNS Server:
Setup NS1 -
Setup NS2 -

Save and close the windows. If you are using old version of windows you may need to reboot the system.

To test new setting go to Start > Run > Type cmd
Type nslookup command
Now type domain name

Linux change DNS server
Please read following tnstructions:

If you are using a Linux, you can further increase speed by installing squid local proxy server and dns dnsmasq caching server.

For more information, see their website http://opendns.com/

- -

Good Luck

Please rate

Jan 20, 2009 | Microsoft Windows XP Home Edition

Not finding what you are looking for?

556 people viewed this tip

Ask a Question

Usually answered in minutes!

Top Computers & Internet Experts

Doctor PC
Doctor PC

Level 3 Expert

7733 Answers


Level 3 Expert

102366 Answers

David Payne
David Payne

Level 3 Expert

14161 Answers

Are you a Computer and Internet Expert? Answer questions, earn points and help others

Answer questions