5

So I have been curious about one thing about systemd.

Lest say I wanted to update the time on my laptop. I use "timedatectl" command. But how did you know that the "prefix" for this command is "timedate"ctl? And not "timectl", or "datectl"?

I am guessing you can use systemctl command to list the units and targets in your Linux system? And I should find "timedatectl"?

So my point is where and how can I find the names of command when use ctl?

I hope I am making sense here.

Thanks a lot! Denny

3
  • You look at what executables the appropriate packages contain. Commented Feb 28, 2018 at 22:33
  • A related question is unix.stackexchange.com/questions/3362 . Commented Feb 28, 2018 at 22:34
  • Hi Ignacio, Can you please provide an example? Sorry, I am a Linux newbie. Commented Feb 28, 2018 at 22:46

3 Answers 3

3

You can use the apropos command to find commands if you aren't sure.

apropos search-string

Where search-string is along the lines of what you are looking for. Think of it as a way to grep for the commands.

1
  • sudo mandb was missing on my box Commented Mar 4, 2024 at 18:49
2

To list manual pages whose title or description contains a word ending with ctl:

$ apropos 'ctl\b' _sysctl (2) - read/write system parameters alsactl (1) - advanced controls for ALSA soundcard driver apachectl (8) - Apache HTTP Server Control Interface ... 
1

You can use either of these two equivalent commands:

apropos your-command-pattern 

Or

man -k your-command-pattern 

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.