How To Set the Date/Timezone on a Raspberry Pi or Ubuntu Linux

Advertisements
Advertisements

Need to set the date to your local time on a Raspberry Pi, Ubuntu Linux, or really most any variant of Linux? Here’s how to get it done: type the following at the command prompt:

date

This will show you the current date and time like so:

Wed 20 Feb 22:53:10 UTC 2019

sudo ln -sf /usr/share/America/Denver /etc/localtime

This will create a symbolic link, and if you need to set it to somewhere other than Denver Colorado, lol, just type it out to the slash before “America” and hit tab to find your region and locale. The -s is what takes care of making the symbolic link for you, and the f removes the existing destination file, making it all permanent. The sudo command will bump up your privileges to execute the command, and you will be asked for the root password.

Advertisements

1 thought on “How To Set the Date/Timezone on a Raspberry Pi or Ubuntu Linux

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.