How To Set Date, Time And Timezone In FreeBSD?

How To Set Date, Time And Timezone In FreeBSD?

   

This post was last updated on August 1st, 2020 at 10:27 am

FreeBSD is a free and open-source Unix-like operating system descended from the Berkeley Software Distribution. It is used to power modern servers, desktops, and embedded platforms.

In FreeBSD date and time can be displayed using the date command. This article describes how to set date and time using date command in FreeBSD.

How to display the current date and time

To display the current date and time use the following command in your terminal –

date

How to set date and time in FreeBSD

To modify systems date or time you need to be a superuser or root user.

Change the date and time in a single command

If you want to change both date and time then you should use the date command in the given format –

date yymmddHHMM

where,

yy – Year in two-digits

mm- Month of the year (1-12)

dd- Day of the month(1-31)

HH- hours(0-23)

MM-  Minutes (0-59)

For example to set today date July 13 2020, 13:07:00  you should use –

date 2007131307

Set the time only

To change the time without changing the date, you should use the date command in the given format –

date HHMM

For example to set time 13:07:00 we will use –

date 1307

How to change the timezone

For setting the local time zone tzsetup command is used in freebsd. This command reads the database of timezone information, the content of the database is indexed by
/usr/share/zoneinfo/zone.tab

Now to change the time zone execute the following command in your terminal –

tzsetup

This will open the terminal menu to select the time zone. Look in the image below –

First, choose your timezone area and then select your country or region and press ok. This will open another confirmation window if abbreviation looks reasonable then press enter. Your time zone is changed successfully.

Now run the date command –

date

As you can see that the time zone is changed from UTC to IST(Indian Standard Time).

Ok, that’s all for now. If you want to say something on this topic you can write to us in the comments below.

Previous [lubuntu] Where should I start for building the developers version for x86?
Next Backup for those times you get the "Emergency Screen"

About author

You might also like

Linux Topics 0 Comments

How To Run A Process In Background In Linux/Unix?

This post was last updated on August 1st, 2020 at 02:11 pmIn a Linux/Unix system, a process is an instance of a program that is running on a computer. When

How To 0 Comments

Kickstarter

This post was last updated on July 9th, 2020 at 01:54 pmks.cfg stuff: http://www.cpqlinux.com/ks-getting-started.html ks-merged-ks.cfg.html – A kickstart that works for 7.2, AS2.1, 7.3, 8.0, and 9 ks-create-merged-ks.cfg.sh.html – This

Installation 0 Comments

How To Install PyCharm in Ubuntu 20.04 LTS?

This post was last updated on August 1st, 2020 at 08:56 pmThe PyCharm is a fully-featured IDE for python which is developed by JetBrains. PyCharm supports many other programming languages

0 Comments

No Comments Yet!

You can be first to comment this post!

Leave a Reply