From c8cdbdc7e7d20c1cdc6f32e9435d4afc8e4ae4ec Mon Sep 17 00:00:00 2001 From: jbranchaud Date: Thu, 28 Mar 2019 16:31:17 -0500 Subject: [PATCH] Add Show Current System Time And Settings as a linux til --- README.md | 3 ++- .../show-current-system-time-and-settings.md | 20 +++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 linux/show-current-system-time-and-settings.md diff --git a/README.md b/README.md index 481f42e..c31f457 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ smart people at [Hashrocket](http://hashrocket.com/). For a steady stream of TILs from a variety of rocketeers, checkout [til.hashrocket.com](https://til.hashrocket.com/). -_798 TILs and counting..._ +_799 TILs and counting..._ --- @@ -326,6 +326,7 @@ _798 TILs and counting..._ - [Check Ubuntu Version](linux/check-ubuntu-version.md) - [Configure Your Server Timezone](linux/configure-your-server-timezone.md) - [List The Statuses Of All Upstart Jobs](linux/list-the-statuses-of-all-upstart-jobs.md) +- [Show Current System Time And Settings](linux/show-current-system-time-and-settings.md) - [Upgrading Ubuntu](linux/upgrading-ubuntu.md) ### Mac diff --git a/linux/show-current-system-time-and-settings.md b/linux/show-current-system-time-and-settings.md new file mode 100644 index 0000000..c768637 --- /dev/null +++ b/linux/show-current-system-time-and-settings.md @@ -0,0 +1,20 @@ +# Show Current System Time And Settings + +If you are accessing a remote server and viewing logs, you may want to know +what the current system time is. The `timedatectl` command can show the +current system date, time, and related settings. + +```bash +$ timedatectl + Local time: Di 2015-04-07 16:26:56 CEST + Universal time: Di 2015-04-07 14:26:56 UTC + RTC time: Di 2015-04-07 14:26:56 + Time zone: Europe/Berlin (CEST, +0200) + Network time on: yes + NTP synchronized: yes + RTC in local TZ: no +``` + +This command can also be used to modify these settings. + +[source](http://man7.org/linux/man-pages/man1/timedatectl.1.html)