4

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

Denny
  • 241
  • 1
  • 4
  • 10

3 Answers3

2

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.

Nasir Riley
  • 10,665
  • 2
  • 18
  • 27
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
...
builder-7000
  • 202
  • 1
  • 9
1

You can use either of these two equivalent commands:

apropos your-command-pattern

Or

man -k your-command-pattern
terdon
  • 234,489
  • 66
  • 447
  • 667
Pannag
  • 11
  • 1