1

I defined a systemd service, which has a name I always mistype (kafka in this instance) so I gave it a few easy aliases. In the systemd files, it means that I have the line:

Alias=k.service kakfa.service

Which make my inner sloth very happy as I can now use service k start or not bother about the kakfa typo.

When I want to check the logs, though, I still need to type the full original name, journaltcl -u k will not work, as in it will only output the laconic -- No entries --.

No googling or reading man pages helped. Is there a way to do what I want?

0

Shouldnt you be able to add an extra alias entry for the journaltcl command?ex: alias jfk="journalctl -fk" in a more similar fashion as required either for your kafka or systemd service.

  • It is of course possible but it's really not what I am looking for. If systemd aliases are defined somewhere, I want to use them without having to duplicate definitions or create personal commands. – Guillaume Sep 18 '17 at 5:22
-1

In your 'Alias' example you miss-typed "kafka" unless this was for illustrative purpose I would start by changeing "kakfa" to "kafka", i.e. the source code should look like this:

Alias=k.service kafka.service

  • 1
    I believe you've missed the main point of the question. – Jeff Schaller Dec 4 '18 at 10:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.