Linux systemd Common Commands

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.