IceWalkers.com - Linux Software downloads and news
Name : Password :
Linux SoftwareLinux RPMLinux HowtosLink UsAboutAdvertise

HOWTOs

Search Howtos :Match :

4. The Correct Settings for Your Linux Box

For any OS installation, you must know your Time Zone. This is expressed in terms of a city, a state or a country. You must also decide how to set BIOS time, and we may follow two strategies here:

Linux Only Machine

In this case you should set BIOS time to UTC time. DST changes will be dynamically managed by Time Zone configurations.

Dual Boot Linux and MS Windows Machine

Windows handles time in a more primitive way than Linux. For Windows, BIOS time is allways your local time, so DST changes are more aggressive because they directly change hardware clock. And since both Linux and Windows initially get and set time from the hardware, when they are together, Linux must handle it in the same way. So set BIOS time to your localtime.

4.1. Setting Time Zone

On Red Hat Linux and derived systems, you can set the hardware clock strategy and Time Zone using the timeconfig command, that shows a user-friendly dialog. You can also use it non-interactively:

Example 2. Time Configuration Tool

bash# timeconfig "Brasil/East"   # set HC to localtime, and TZ to "Brazil/East"
bash# timeconfig --utc "Brasil/East"   # set HC to UTC, and TZ to "Brazil/East"

Anyway, it changes /etc/sysconfig/clock file that is read at boot time. You can edit it by hand, and that is how it looks:

Example 3. /etc/sysconfig/clock file


ZONE="Brazil/East"
UTC=true
ARC=false

4.2. Setting the Hardware Clock

I encourage you to set your hardware clock only after understanding how to get accurate time, described on Section 5.

The hwclock command reads and sets the hardware clock, based on several options you give to it, documented in its man page. But you don't have to use it if you have a modern Linux distribution. After defining your hardware clock strategy and Time Zone, you can use the high level setclock command to correctly set your hardware clock. You don't need to pass any parameters because setclock intelligently calls hwclock to set the BIOS based on your OS current date and time. So you should always use the setclock command.

But if you are a minimalist and prefer hard work, here are some hwclock examples:

Example 4. setclock and hwclock usage

bash# setclock					# The easy way to set HC
bash# hwclock					# reads HC
bash# hwclock --systohc --utc			# set HC with UTC time based on OS current time
bash# hwclock --systohc				# set HC with local time based on OS current time
bash# hwclock --set --date "21 Oct 2004 21:17"	# set HC with time specified on string

Since the OS time is independent from the hardware clock, any BIOS change we make will take place in the next boot.

Another option to change HC is rebooting and accessing your computer BIOS screens. On IBM e-server zSeries platforms you'll have to do it on z/VM level, because Linux here runs on virtual machines created by z/VM.

Search Howtos :Match :
Python 3.0
Interpreted, interactive, object-oriented programming language
VLC media player 0.9.8a
Cross-platform media player and streaming server
Transmission 1.41 beta 2
Lightweight, yet powerful BitTorrent client
X-Moto 0.5.0
2D motocross platform game
Gdm 2.25.1
Reimplementation of the well known xdm program.
Linux Kernel 2.6 2.6.28-rc7
Linux Kernel
Linux Kernel 2.4 2.4.37
Linux Kernel
SquirrelMail 1.4.17
PHP Based Webmail Product
GNOME 2.25.2
GNOME desktop environment
WebGUI 7.6.5
A fully featured content management system.
Free IT Magazines, White Papers, eBooks, and more !
Dr. Dobb's Journal

Dr. Dobb's Journal enables programmers to write the most efficient and sophisticated programs and help in daily programming quandaries.

The 7 Things that IT Security Professionals MUST KNOW!

Gain key insight into security problem and find the safest means to protect your technological assets.

Database Trends and Applications

Provides timely coverage of the technology, intelligence and insight needed to plan, implement and manage information-rich projects.

Linux Software Map
Find Linux RPM
Best Rated Linux Software
Most Rated Linux Software
Linux Distributions
Linux Howtos
Quick Survey

Please take our survey and help us improve our website to serve you better.

Thank you.
Linux Software
Linux / IT Resources
Site Resources
Google
Privacy Policy
Contact Us
Submit Software
Advertising info