System Management Systemctl
Show System Status: $ SYSTEMCTL Status Activate unit now: # SYSTEMCTL start [unit] immediate Stop unit: # SYSTEMCTL Stop [unit] restart unit: # systemctl restart [unit] Automatic activation of the boot Unit: # SYSTEMCTL Enable [unit] Cancel boot Auto activation Unit: # systemctl Disable [Unit] command unit re-read configuration: # Systemctl Reload [cell] output unit running status: $ Systemctl statu s [unit] Check whether the unit is configured to start automatically: $ Systemctl is-enabled [unit] display unit of the Manual album: # SYSTEMCTL Help [unit] reload SYSTEMD, scan for new or changed units: # Systemctl Daemon-Reload output Active Unit: $ systemctl List-units View Activated services: $ systemctl List-units-T Service output failed unit: $ systemctl--failed Disable a unit: # SYSTEMCTL Mask [unit] cancels disabling a unit: # systemctl unmask [unit] View all installed services: $ systemctl List-unit-files Check all configuration details for a service # SYSTEMCTL show [service] get a list of dependencies for a service # Systemctl-dependencies [Service] View environment variable $ systemctl show-Environment Reboot System # SYSTEMCTL reboot shutdown system # Systemctl Poweroff Enter Standby # Systemctl suspend into hibernation # Systemctl Hibernate enters mixed sleep mode # SYSTEMCTL hybrid-SleepEnter Rescue status # SYSTEMCTL rescue
Viewing startup time Systemd-analyze
viewing startup time $ systemd-Analyze viewing the start of each service takes $ systemd-analyze blame show waterfall-like start process flow $ systemd-analyze critical-chain display the start stream for the specified service $ systemd-analyze critical-chain [service]
View current host information Hostnamectl
Displays the current host's information $ hostnamectl setting the hostname. # Hostnamectl Set-hostname [hostname]
Localization Settings Localectl
view localization Settings $ localectl set localization parameters. # Localectl Set-locale lang=en_us. utf-8# localectl set-keymap en_US
Time zone Settings Timedatectl
View current time zone settings $ timedatectl list all available time zones $ timedatectl List-timezones Set current time zone # Timedatectl set-timezone asia/ shanghai# Timedatectl Set- time yyyy-mm-dd# timedatectl set- time hh:mm: SS set hardware time to local time # Timedatectl settrue
View User Login Information Loginctl
list current all sessions $ loginctl list-sessions list current logged on user $ loginctl list-usersview specified user information $ loginctl show- User [Username]
Log Analysis Journalctl
5---since time ("2017-08-01 00:00:00")--until (" 2017-08-02 02:30:00 ")
Linux systemd Common Commands