O'Reilly logo

CompTIA Linux+ Certification Guide by Philip Inshanally

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Date configuration

In most Linux environments, it's critical to have the systems synchronized with the correct time. We can expose the current date using the date command. We can view the system date and time by simply running the following command:

root@philip-virtual-machine:/home/philip# dateThu Sep  6 16:25:56 EDT 2018root@philip-virtual-machine:/home/philip#

Based on the preceding output, we can see the current date. It is also possible to set the date and time using the date command. To be able to specify the date in string format, we pass the -s option:

philip@philip-virtual-machine:~$ date -s "19 Dec 2020 12:00:00"date: cannot set date: Operation not permittedSat Dec 19 12:00:00 EST 2020philip@philip-virtual-machine:~$

Based on the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required