OpenBSD Change Hostname
Q. How do I change my hostname under OpenBSD operating system?
A. The hostname command displays the name of the current host. The superuser (root) can set the host name by editing a /etc/myname file. This is used at system boot time by netstart to initialize the hostname.
Task: OpenBSD Display hostname
Type the any one of the following command
# hostname
# cat /etc/myname
Output:
openbsd.nixcraft.in
Task: OpenBSD Chane Host Name
Simply login as root and type the following command:
# echo "new-hostname.domain.com" > /etc/myname
# echo "server.nixcraft.in" > /etc/myname
# echo 'unixbox' > /etc/myname
Subscribe to our free e-mail newsletter or RSS feed to get all updates.
You can Email this page to a friend.
Related Linux / UNIX FAQ:
- OpenBSD Change / Set IP Address For Network Interface
- Linux change my hostname / computer system name
- OpenBSD Install Ports Collection
- OpenBSD Set / Change Default Gateway
- OpenBSD Restart Networking Service
Leave a Reply
We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Please do not use the comment form to ask for help / question. Ask your question on the excellent Linux tech support forum. Thank you very much for stopping by our site!
Tags: /etc/myname, command echo, echo server, host name, hostname, hostname command, hostname_command, netstart, operating system, server hostname, system boot time ~ Last updated on: May 8, 2008



Recent Comments
Today ~ 17 Comments
Today ~ 2 Comments
Today ~ 37 Comments
Today ~ 46 Comments
Yesterday ~ 2 Comments