AlmaLinux9ではsystemctlコマンドを使用することが多々あります。Redhat6までとは大きく異るものです。
# /etc/rc.d/init.d/[tab] |
でサービス名を自動補完することができていましたが、systemctlは自動補完がデフォルトでできない設定になっているので、これをできるようにやっておきます。
# dnf install bash-completion # wget https://github.com/terralinux/systemd/raw/master/src/systemctl-bash-completion.sh -O /etc/bash_completion.d/systemctl-bash-completion.sh |
ここで一旦再起動します。
# reboot |
再起動後はtabで補完されることを確認してください。
# systemctl [tab] add-requires halt list-unit-files set-default add-wants help list-units set-environment bind hibernate log-level set-property cancel hybrid-sleep log-target show cat import-environment mask show-environment condreload is-active mount-image start condrestart is-enabled poweroff status condstop is-failed preset stop daemon-reexec is-system-running preset-all suspend daemon-reload isolate reboot suspend-then-hibernate default kexec reenable switch-root disable kill reload try-reload-or-restart edit link reload-or-restart try-restart emergency list-dependencies rescue unmask enable list-jobs reset-failed unset-environment exit list-machines restart force-reload list-sockets revert get-default list-timers service-watchdogs # systemctl start [tab] Display all 175 possibilities? (y or n) "blockdev@dev-disk-by\\x2duuid-92615ef9\\x2d08f7\\x2d464c\\x2d9638\\x2d3ac153cc05cb.target" "blockdev@dev-disk-by\\x2duuid-ca913bd0\\x2d29bb\\x2d4490\\x2d9d2d\\x2d5a27b254dd50.target" "blockdev@dev-disk-by\\x2duuid-d6b3e815\\x2d081b\\x2d4c3b\\x2d80f0\\x2dc3775f8a9ecf.target" "system-systemd\\x2dcryptsetup.slice" NetworkManager-dispatcher.service arp-ethers.service blk-availability.service blockdev@dev-sda1.target blockdev@dev-sda2.target bluetooth.service bluetooth.target boot-complete.target chrony-wait.service cockpit-motd.service cockpit-wsinstance-http.service cockpit-wsinstance-http.socket cockpit-wsinstance-https-factory.socket cockpit.service cockpit.socket console-getty.service cpupower.service ctrl-alt-del.target dbus-org.bluez.service dbus-org.freedesktop.hostname1.service dbus-org.freedesktop.locale1.service dbus-org.freedesktop.nm-dispatcher.service dbus-org.freedesktop.timedate1.service debug-shell.service dm-event.service dnf-makecache.service dracut-cmdline.service dracut-initqueue.service dracut-mount.service dracut-pre-mount.service dracut-pre-pivot.service dracut-pre-trigger.service dracut-pre-udev.service dracut-shutdown-onfailure.service emergency.service emergency.target exit.target factory-reset.target fstrim.service fstrim.timer getty-pre.target graphical.target grub-boot-indeterminate.service grub2-systemd-integration.service halt.target hibernate.target hybrid-sleep.target initrd-cleanup.service initrd-fs.target initrd-parse-etc.service initrd-root-device.target initrd-root-fs.target initrd-switch-root.service initrd-switch-root.target initrd-udevadm-cleanup-db.service initrd-usr-fs.target initrd.target iprdump.service iprinit.service iprupdate.service iprutils.target kexec.target kpatch.service kvm_stat.service ldconfig.service ledmon.service logrotate.service lvm2-lvmpolld.service man-db-cache-update.service man-db-restart-cache-update.service mdcheck_continue.service mdcheck_continue.timer mdcheck_start.service mdcheck_start.timer mdmonitor-oneshot.service mdmonitor-oneshot.timer mdmonitor.service microcode.service mlocate-updatedb.service modprobe@configfs.service modprobe@drm.service modprobe@fuse.service nftables.service nm-priv-helper.service nvmefc-boot-connections.service nvmf-autoconnect.service nvmf-connect.target pam_namespace.service poweroff.target printer.target proc-sys-fs-binfmt_misc.mount psacct.service quotaon.service raid-check.service raid-check.timer rc-local.service rdisc.service realmd.service reboot.target remote-cryptsetup.target remote-veritysetup.target rescue.service rescue.target rpmdb-rebuild.service runlevel0.target runlevel1.target runlevel5.target runlevel6.target selinux-autorelabel-mark.service selinux-autorelabel.service selinux-autorelabel.target sigpwr.target smartcard.target sound.target sshd-keygen@ecdsa.service sshd-keygen@ed25519.service sshd-keygen@rsa.service sshd.socket sssd-autofs.socket sssd-kcm.service sssd-nss.socket sssd-pac.socket sssd-pam-priv.socket sssd-pam.socket sssd-ssh.socket sssd-sudo.socket sssd.service suspend-then-hibernate.target suspend.target syslog.socket system-cockpithttps.slice system-update-cleanup.service system-update.target systemd-ask-password-console.service systemd-ask-password-wall.service systemd-binfmt.service systemd-boot-check-no-failures.service systemd-exit.service systemd-firstboot.service systemd-fsck-root.service systemd-halt.service systemd-hibernate.service systemd-hostnamed.service systemd-hwdb-update.service systemd-hybrid-sleep.service systemd-initctl.service systemd-journal-catalog-update.service systemd-journald-audit.socket systemd-kexec.service systemd-localed.service systemd-machine-id-commit.service systemd-modules-load.service systemd-poweroff.service systemd-pstore.service systemd-quotacheck.service systemd-reboot.service systemd-repart.service systemd-rfkill.service systemd-suspend-then-hibernate.service systemd-suspend.service systemd-sysext.service systemd-sysusers.service systemd-timedated.service systemd-tmpfiles-clean.service systemd-udev-settle.service systemd-update-done.service systemd-update-utmp-runlevel.service systemd-vconsole-setup.service systemd-volatile-root.service tmp.mount usb-gadget.target |