6

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?

1

2 Answers 2

-1

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.

1
  • 1
    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. Commented Sep 18, 2017 at 5:22
-2

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
  • 4
    I believe you've missed the main point of the question. Commented Dec 4, 2018 at 10:43

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.