Linux Time and Date

 

Linux Time and Date


 

Time and Date Configuration

Time and Date Properties Tool allows the user to change the system date and time, to configure the time zone used by the system, and to setup the Network Time Protocol (NTP) daemon to synchronize the system clock with a time server.

You must be running the X Window System and have root privileges. To start the application from the desktop go to the Main Menu Button (on the Panel) => System Settings => Date & Time or type the command redhat-config-date at a shell prompt (for example, in an XTerm or a GNOME terminal).

 

Time and Date Properties

The first tabbed window that appears is for configuring the system date and time and the NTP daemon (ntpd).

Time and Date Properties

To change the date, use the arrows to the left and right of the month to change the month. Use the arrows to the left and right of the year to change the year, and click on the day of the week to change the day of the week. Changes will not take place until you click the OK button.

To change the time, use the up and down arrow buttons beside the Hour, Minute, and Second in the Time section. Changes will not take place until you click the OK button.

Changing the date and time will change the system clock as well as the hardware clock. Clicking OK is equivalent to executing the date and hwclock commands with the selected date and time.

The Network Time Protocol (NTP) daemon synchronizes the system clock with a remote time server or time source (such as a satellite). The application allows you to configure a NTP daemon to synchronize your system clock with a remote server. To enable this feature, click the Enable Network Time Protocol button. This will enable the Server pulldown menu. You can choose one of the predefined servers or type a server name in the pulldown menu. Your system will not start synchronizing with the NTP server until you click OK. After you click OK, the configuration will be saved and the NTP daemon will be started (or restarted if it is already running). If you want this daemon to start automatically at boot time, you need to execute the command /sbin/chkconfig" --level 345 ntpd on to enable ntpd for runlevels 3, 4, and 5.

The NTP server is written to the /etc/ntp.conf and /etc/ntp/step-tickers files.

Clicking the OK button will apply any changes that you have made to the date and time, the NTP daemon settings, and the time zone settings and then exit the program.

If you configured a medium or high security level during installation or with Security Level Configuration Tool, the firewall rules will block the connection to the NTP port. To allow NTP to work, run the Security Level Configuration Tool, select Customize, and add ntp:udp to the other ports.

 

Time Zone Configuration

To configure the system time zone, click the Time Zone tab. The time zone can be changed by either using the interactive map or by choosing the desired time zone from the list below the map. To use the map, click on the city that represents the desired time zone. A red X will appear and the time zone selection will change in the list below the map. Click OK to apply the changes and exit the program.

If your system clock is set to use UTC, select the System clock uses UTC option. UTC stands for the universal time zone, also known as Greenwich mean time (GMT). Other time zones are determined by adding or subtracting from the UTC time.

 

Mail Transport Agent (MTA) Configuration

A Mail Transport Agent (MTA) is essential for sending email from a Red Hat Linux system. A Mail User Agent (MUA) such as Evolution, Mozilla Mail, and Mutt, is used to read and compose email. When a user sends an email from an MUA, the messages are handed off to the MTA, which sends the message to a series of MTAs until it reaches its destination.

Even if a user does not plan to send email from the system, some automated tasks or system programs might use the /bin/mail command to send email containing log messages to the root user of the local system.

Red Hat Linux 9 provides two MTAs: Sendmail and Postfix. If both are installed, sendmail is the default MTA. The Mail Transport Agent Switcher allows for the selection of either sendmail or postfix as the default MTA for the system.

The redhat-switch-mail RPM package must be installed to use the text-based version of the Mail Transport Agent Switcher program. If you want to use the graphical version, the redhat-switch-mail-gnome package must also be installed.

To start the Mail Transport Agent Switcher, select Main Menu Button (on the Panel) => System Tools => More System Tools => Mail Transport Agent Switcher, or type the command redhat-switch-mail at a shell prompt (for example, in an XTerm or GNOME terminal).

The program automatically detect if the X Window System is running. If it is running, the program starts in graphical mode If X is not detected, it starts in text-mode. To force Mail Transport Agent Switcher to run in text-mode, use the command redhat-switch-mail-nox.

Mail Transport Agent Switcher

If you select OK to change the MTA, the selected mail daemon is enabled to start at boot time, and the unselected mail daemon is disabled so that is does not start at boot time. The selected mail daemon is started, and the other mail daemon is stopped; thus making the changes take place immediately.


 

Home