Ubuntu 18.04 – shell commands date and time

Date

If you want to see the date and time of your system use the date command

How to see date and time of you system, <span>Ubuntu 18.04 – shell commands date and time</span>, KandZ

Date has many format options. You can use man date or read them here. If you want to find the week type the following:

date +"Week: %V"
How to see date and time of you system, <span>Ubuntu 18.04 – shell commands date and time</span>, KandZ

Other examples. With -d argument you can use now, today, yesterday, tomorrow, monday (all the days), next-monday and last-monday(with all the days), last-week, next-week, last-month, next-month, last-year and next-year.

How to see date and time of you system, <span>Ubuntu 18.04 – shell commands date and time</span>, KandZ

Timezone

You can use tzselect to see and find out a timezone

How to see date and time of you system, <span>Ubuntu 18.04 – shell commands date and time</span>, KandZ
How to see date and time of you system, <span>Ubuntu 18.04 – shell commands date and time</span>, KandZ
How to see date and time of you system, <span>Ubuntu 18.04 – shell commands date and time</span>, KandZ

If you want to change the timezone then add the line TZ=’Europe/Athens’; export TZ to the .profile file.

Calendar with cal

displays a calendar

How to see date and time of you system, <span>Ubuntu 18.04 – shell commands date and time</span>, KandZ

displays the calendar for a year

cal -y 2019
How to see date and time of you system, <span>Ubuntu 18.04 – shell commands date and time</span>, KandZ

Displays the previous, current and next month

cal -3
How to see date and time of you system, <span>Ubuntu 18.04 – shell commands date and time</span>, KandZ

You can read more here

THE END!!!

66720cookie-checkUbuntu 18.04 – shell commands date and timeUbuntu 18.04 – shell commands date and time

Related posts

2 Thoughts to “Ubuntu 18.04 – shell commands date and time

  1. […] Other examples. With -d argument you can use now, today, Read More […]

  2. […] Ubuntu 18.04 – shell commands date and time […]

Comments are closed.