Let CharlesWorks get you onto the web today! Click here and let us show you it IS affordable!
Make a special trip or stop in along your way at the Peterborough Car Wash at the Peterborough Plaza at the intersection of routes 101 and 202 in Peterborough, NH.
Check out your New England antique dealer located in Harrisville, in southern NH. We BUY and SELL antiques! And take M/C & Visa.
Click here to check out A.W.PETERS, INC. in Peterborough, NH - your top quality 24-7 oilheat service and fuel supplier.
Advertise with CharlesWorks! Click here for details!
     
 

Changing the DATE or TIME on a LINUX box

Feeling just plain lost at times? Let CharlesWorks help you find your way into website hosting on the Internet!

I discovered the time was off by a number of minutes on one of my servers. The server in question manages website hosting using Ensim WEBppliance Pro 3.5.10 on a Red Hat Linux 7.3 system. To say I am far less familiar with Linux than with windows would be an understatement.

The set of instructions below worked quickly and easily for me from the bash (command) prompt on my Linux machines running:

Red Hat Linux
release 5.2
(Apollo)
Kernel 2.0.36
on an i486

   and   

Red Hat Linux
release 7.3
(Valhalla)
Kernel 2.4.20-20.7
on an i586

Under most configurations, you must be logged on as "root" to make this change. You can log on locally (physically at the Linux box) as root. However, if you must perform this remotely (over a network or the Internet), you need to first log on to the machine under a user that will allow you to log on remotely. Then "switch user" to "root" by typing "su" at the prompt and pressing enter. When prompted, type root's password and press enter.

To change the time from the bash prompt, as root, use the "date" command. Typing "date" by itself will return the date, time, and year. Typing "date MMDDhhmmCCYY" will allow you to set any part of the date or time.

Linux Examples:

Login to Linux box as root and enter root's password:

[me@mybox me]$ su
password:

Check the current date and time of the Linux box by entering:

[root@mybox me]# date
Linux yields the current settings:
[root@mybox me]# Wed Apr 7 12:03:45 EDT 2004

Change the current time and date of the Linux box by entering:
[root@mybox me]# date 040713032004
would change the time and yield:
[root@mybox me]$ Wed Apr 7 13:03:00 EDT 2004

 

 

 

©2004-2009 CharlesWorks®
PO Box 128, Peterborough, New Hampshire 03458
Phone: 603-924-9867 in USA Mon-Fri 9-5 Eastern time

Website hosting by CharlesWorks®
Updated Thursday, April 08, 2004 at 11:10 pm
Hit Counter