How to set the date and time in Linux

To view the current date and time, issue the date command:

date-time-linux

Then view and set your time zone:

cd /usr/share/zoneinfo

timezone-info

I’m going to use the GMT time zone.

Copy the file with your timezone. (this could be ./Europe/London or whatever city you would like to use).

localtime in linux

Change the date and time in Linux via BASH:

For this purpose we will use the following command format:

date 082314422014   ### August/23rd/14:44/2014 ## Date /month/ day/ hour/ minutes/ year

 

date and time in linux bash

 

 

 

Posted in BASH. Tagged with , , , , .

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.