Localization File Locations (Demo)

Video Activity
Join over 3 million cybersecurity professionals advancing their career
Sign up with
Required fields are marked with an *
or

Already have an account? Sign In »

Time
21 hours 25 minutes
Difficulty
Intermediate
CEU/CPE
21
Video Transcription
00:00
>> Hey there, Cybrarians.
00:00
Welcome back to the Linux plus course here at Cybrary.
00:00
I'm your instructor Rob Goelz.
00:00
In today's lesson,
00:00
we're going to be looking into Localization Files.
00:00
Upon completion of today's lesson,
00:00
you're going to be able to understand why we use
00:00
localization files such
00:00
as etc/timezone and etc/localtime.
00:00
We'll also explain where
00:00
the user/share/zoneinfo directory and
00:00
file come into play.
00:00
In Ubuntu, the time zone,
00:00
and remember that's the tz variable,
00:00
the time zone is stored in the file /etc/timezone,
00:00
whereas in CentOS that same information is stored in
00:00
a different file location at /etc/localtime.
00:00
Now, both distros get
00:00
this information from
00:00
the same place, which is user/share/zoneinfo.
00:00
Shall we see this firsthand? I think we shall.
00:00
Let's do so with some demo time.
00:00
Here we are in our Ubuntu demo environment,
00:00
and we're going to look here first
00:00
and recall what I said that
00:00
the etc/timezone file holds the time zone for Ubuntu.
00:00
We can take a look at that.
00:00
We'll just put in cat etc/timezone
00:00
>> and hit "Enter" Here,
00:00
>> we'll see that the time zone is
00:00
>> set to America, New York.
00:00
>> That is the time zone we're going to
00:00
get for daylight savings time,
00:00
all that good stuff here in the US.
00:00
Now, let's take a look over at
00:00
CentOS for the same thing.
00:00
Here we are over in our CentOS demo environment,
00:00
and recall that in a CentOS we have
00:00
the etc/localtime file to hold the time zone.
00:00
Let's try and do the same thing.
00:00
What if we just try and do a cat etc/localtime
00:00
, well, we can't.
00:00
We can't really cut that out because what we're
00:00
looking at here is binary.
00:00
This is a binary file.
00:00
We can't really cut it out.
00:00
What we could do instead is we
00:00
can do ls-al etc/localtime.
00:00
This will display a sibling etc/localtime
00:00
that points to user share zone info America New York.
00:00
Here we can see that
00:00
the time zone on this system
00:00
is also set to American New York, which makes sense.
00:00
These are both my virtual machines,
00:00
I'm in that time zone, so
00:00
that's where we're getting that from.
00:00
We see that that is actually
00:00
similarly to user share zone info.
00:00
The users share zone info directory
00:00
has all of the timezone information.
00:00
It contains everything that we
00:00
need to see the time zone on either of these distro,
00:00
so we can just go to user share zone info
00:00
and we can see all of
00:00
the different time zones that
00:00
there are out there in the world.
00:00
With that, we've reached the end of the lesson.
00:00
In this lesson we covered the
00:00
localization files etc/timezone
00:00
>> which is used in Ubuntu,
00:00
>> and etc/locatime which is used in CentOS.
00:00
We also discussed the user share zone info directory,
00:00
which contains the actual source for
00:00
all the time zone information that we
00:00
get from those two files.
00:00
Thank you so much for being here.
00:00
I look forward to seeing you in our next lesson.
Up Next