今まで、パラメータを渡して実行することしかしなかったので、パラメータなしで実行すると情報が出てくるっていうのをつい最近になって知りました(汗)。
hostnamectlコマンドは、ホスト名やOS名等々が表示される。
[hhelibex@centos7 ~]$ hostnamectl
Static hostname: centos7
Pretty hostname: CentOS7
Icon name: computer-vm
Chassis: vm
Machine ID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Boot ID: yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
Virtualization: kvm
Operating System: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 3.10.0-1062.9.1.el7.x86_64
Architecture: x86-64
[hhelibex@centos7 ~]$
systemctlコマンドは、操作できるUNITの一覧などを参照することができる。
[hhelibex@centos7 ~]$ systemctl UNIT LOAD ACTIVE SUB DESCRIPTION proc-sys-fs-binfmt_misc.automount loaded active running Arbitrary Executable File Formats File System Automount Point : sys-subsystem-net-devices-eth0.device loaded active plugged Virtio network device sys-subsystem-net-devices-eth1.device loaded active plugged Virtio network device -.mount loaded active mounted / boot.mount loaded active mounted /boot : postfix.service loaded active running Postfix Mail Transport Agent postgresql.service loaded active running PostgreSQL database server : sshd.service loaded active running OpenSSH server daemon : network.target loaded active active Network : systemd-tmpfiles-clean.timer loaded active waiting Daily Cleanup of Temporary Directories LOAD = Reflects whether the unit definition was properly loaded. ACTIVE = The high-level unit activation state, i.e. generalization of SUB. SUB = The low-level unit activation state, values depend on unit type. 101 loaded units listed. Pass --all to see loaded but inactive units, too. To show all installed unit files use 'systemctl list-unit-files'. [hhelibex@centos7 ~]$
ふと叩いてみた結果として気付いたんだけど、何がきっかけで知識を得られるか分からない。