Wednesday, December 10, 2014

Working with NTP (Network Time Protocol) Part 2

Working with NTP (Network Time Protocol) Part2

to set the timezone after the installation in Linux we need to install the tzdata package in Linux 
use the following command to install the tzdata 
# yum install tzdata

# tzselect

and select the proper time zone .

change time zone for specific user in linux
Open the .profile file from the home directory of user in my case assume i have a use called nrathi

so open a file .profile using command 
 # vim /home/nrathi/.profile
it will look like this  
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc

add the following line to it will change the time zone for the specific user as the user local time zone is near to India.
# User specific environment and start-up programs
export PATHt

timezone='GMT+5.30'; export timezone

and some the file and we are done to test log-out and log-in as nrathi  and test it