How to set current time on Linux?
Fresh3 days ago
Mar 15, 2026561794 viewsConfidence Score1%
1%
Problem
Why is the output of the following commands different? And can I change the current time on Linux?
Error Output
root@vmi2115:/var# hwclock Sun 26 Jun 2011 01:21:38 PM CEST -0.273230 seconds root@vmi2495:/var# date Sun Jun 26 15:21:39 CEST 2011 root@vmi2115:/var#
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Canonical Fix
Unverified Fix
New Fix – Awaiting Verification
Fix for: How to set current time on Linux?
Low Risk
Usually you'll want to have the time set automatically, and in that case, you'll want to set up to automatically set the time for you. The specifics differ slightly from distribution to distribution, but if you're running Ubuntu, for instance, there's a guide on setting up NTP on Ubuntu. Otherwise, just Google , and you'll probably find it. If you want to set it manually, however, you can use . Examples of this could be:
Awaiting Verification
Be the first to verify this fix
Sign in to verify this fix