ブログ

Linuxコマンドの使い方について調べる方法

at_takumi.mizutani
2022年7月29日 16時43分

Linuxコマンドのリファレンスマニュアルを表示するにはmanコマンドを使用します。
コマンドの概要のみを表示す場合にはwhatisコマンドを使用します。
※ここでは例として、systemctlコマンドについて調べます。

[armadillo ~]# man systemctl
SYSTEMCTL(1)                       systemctl                      SYSTEMCTL(1)
 
NAME
       systemctl - Control the systemd system and service manager
 
SYNOPSIS
       systemctl [OPTIONS...] COMMAND [UNIT...]
 
DESCRIPTION
       systemctl may be used to introspect and control the state of the
       "systemd" system and service manager. Please refer to systemd(1) for an
       introduction into the basic concepts and functionality this tool
       manages.
 
COMMANDS
       The following commands are understood:
 
   Unit Commands (Introspection and Modification)
       list-units [PATTERN...]
           List units that systemd currently has in memory. This includes
           units that are either referenced directly or through a dependency,
           units that are pinned by applications programmatically, or units
           that were active in the past and have failed. By default only units
 
[armadillo ~]# whatis systemctl
systemctl (1)        - Control the systemd system and service manager

また、aproposコマンドを使用することで部分一致検索でコマンドの概要を表示することもできます。

[armadillo ~]# apropos systemc
deb-systemd-helper (1p) - subset of systemctl for machines not running systemd
deb-systemd-invoke (1p) - wrapper around systemctl, respecting policy-rc.d
systemctl (1)        - Control the systemd system and service manager