So for this lab, let's go to Ubuntu,
because the CentOS machine was already correctly installed.
First, I need to check my journal d.conf.
And there you can see that on Ubuntu,
it lives in ETC system D. And the option I'm looking for
is right here.
Storage is auto.
That's all we need.
So I'm going to create a directory, var log journal.
Oh, file already exists.
Now, that's convenient.
I'm using ls minus l on var log journal.
And as you can see, we already have the consistent journal
on this Ubuntu machine.
Now, why do they do that?
Because on Red Hat, the journal's consistency
is guaranteed through rsyslog.
So we should check if we have rsyslog on Ubuntu.
And yeah, we also have rsyslog.
So that is kind of double, but it's a gender choice.
And that is how distributions can make their own choices
to do specific stuff.
Next, we need to do what?
We need to use logger to write a message with the priority
info in the text, hello world.
So logger minus p, info, hello world.
And journal CTL, uppercase G for the end.
And oh, there we can see that I made a typo.
Well, it made it to the journal, but not the right way.
Minus p is not the same as equals p.
So now it should be better.
And let's be a little bit more precise
while looking it up.
So journal CTL minus p, info, is showing all messages
with a state of info.
And there you can see it's a lot of messages,
including the message that I've just written to the logs.