How to check the system time in Linux?

You can use the date command in a Linux system to query the system time. Simply enter the following command in the terminal to view the current system time:

date

You can use the following command to view the system time of a specific time zone:

TZ='Asia/Shanghai' date

This will display the current system time in the Shanghai time zone. Simply replace ‘Asia/Shanghai’ in the command with another time zone name to view the system time in different time zones.

bannerAds