Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q1513 How do you change the time on a linux machine?

You are here: irt.org | FAQ | Linux | Q1513 [ previous next ]

If you have it installed, 'linuxconf' provides a friendly interface to the time managing functions. Setting the system time and many of the functions available through linuxconf require root access.

How the process might go...

In an xterm, Switch User to root by typing 'su' and then enter. After confirming you know root's password, type 'linuxconf' and Enter.

The linuxconf interface appears, showing an expandable tree-like menu structure down the left hand side. Click on the '+' sign next to the 'Control' item, and then click on 'date & time'. You'll then see a fairly self-explainatory form appear, which also displays a 'help' button if you are unsure how to fill-in some of the boxes. When you are done, press 'accept'.

When you are finished with the time, (and exploring the other menus), click on the 'quit' button at the bottom. Linuxconf will give your system a brief health check, and may ask you to confirm fixing any discrepencies it finds. Normally a good idea.

Now linuxconf has closed, DON'T FORGET TO LOG OUT FROM ROOT. In the xterm where you started linuxconf, type 'exit' and enter.

If you don't have linuxconf installed, then there may be other graphical interfaces to common system admin functions; such as control-panel in the older (4 series) of RedHat which you would start it in a similar way to linuxconf.

However, even if you don't have any GUI programs installed, there are many command line programs related to date and time. Following is the brief description that the 'whatis programname' command gives for each; for further usage information, type 'man programname'.

On virtually all linux systems...

  date (1)             - print or set the system date and time
  rdate (1)            - get the date and time via the network

Useful if you have installed a TV card...

  alevt-date (1)       - display/set time received via Teletext

If your want to accurately manage time across your whole network...

  ntpdate              - set the date and time via NTP
  (from the xntp package  )

©2018 Martin Webb