Set or change hostname in FreeBSD12

Windows Articles

How to install OpenLiteSpeed on Ubuntu 20.04?

There are several web servers for Linux but other alternatives are always welcome. In this case, I will show you how to...

Linux 5.7 available

Time passes very quickly and we already have a new version of the Linux kernel that as always we are happy because...

How to install RStudio on Ubuntu 20.04 / 18.04

No matter how complete and robust a programming language is, the programmer will always need a tool to write the code. These programs have...

How to install Arduino IDE on Ubuntu 20.04 / 18.04 / Linux Mint 19.X?

Hi, folks. In this post, we will show you how to install Arduino IDE on Ubuntu 20.04/ 18.04 and Linux mint 19.x. You probably already...

How To Install Icinga 2 on Ubuntu 20.04

Today we are going to learn that how to Install Icinga 2 on Ubuntu 20.04. Before going to the installation process let's...
Mel Khamlichi
Mel Khamlichihttp://www.osradar.com
Founder of Osradar, from Amsterdam Netherlands

FreeBSD12 is just released , many people are interested to test it and maybe to run it on production Servers. let me show u in this small tutorial how to change or set new hostname on your machine and i will give this  example live from my server.

Normally the command hostname will show you the answer

hostname

i have no answer. because there is no hostname predefined

1-Set new hostname in FreeBSSD12

Set hostname  or change hostname

#hostname FreeBSD12.osradar.local

2-Set Hostname  permanently in FreeBSD12

Edit  /etc/rc.conf

Please add the hostname line to rc.conf file with the following command

echo hostname="FreeBSD12.osradar.local" >> /etc/rc.conf

2-2-Edit  /etc/hosts file

change the old hostname 127.0.0.1  old-hostname to

Please reboot and check with  hostname commands

root@FreeBSD12:~ # hostname -f
FreeBSD12.osradar.local
root@FreeBSD12:~ # hostname -d
osradar.local
root@FreeBSD12:~ # hostname -s
FreeBSD12
root@FreeBSD12:~ #

Your hostname settings are working fine now . Please enjoy!!

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article

How to install OpenLiteSpeed on Ubuntu 20.04?

There are several web servers for Linux but other alternatives are always welcome. In this case, I will show you how to...

Linux 5.7 available

Time passes very quickly and we already have a new version of the Linux kernel that as always we are happy because...

How to install RStudio on Ubuntu 20.04 / 18.04

No matter how complete and robust a programming language is, the programmer will always need a tool to write the code. These programs have...

How to install Arduino IDE on Ubuntu 20.04 / 18.04 / Linux Mint 19.X?

Hi, folks. In this post, we will show you how to install Arduino IDE on Ubuntu 20.04/ 18.04 and Linux mint 19.x. You probably already...

How To Install Icinga 2 on Ubuntu 20.04

Today we are going to learn that how to Install Icinga 2 on Ubuntu 20.04. Before going to the installation process let's...