First, SYSTEMD
System initialization program, the first process that the system starts, the PID is 1
Diagram: SYSTEMD System initial Program
650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M00/A6/DE/wKioL1ncxD7hCXEiAAFOnMthqrQ236.png-wh_500x0-wm_ 3-wmp_4-s_3312565531.png "title=" screenshot from 2017-10-10 16-03-04.png "alt=" Wkiol1ncxd7hcxeiaafonmthqrq236.png-wh_50 "style=" padding:0px;margin:0px;vertical-align:top;border:none; "/>
Second, Systemctl command
Systemctl List-units # #列出当前系统服务的状态, specific Xiang-san service status
Diagram: Current system service Status
650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M01/08/2C/wKiom1ndM12zVvE9AADcY_EobGY580.png-wh_500x0-wm_ 3-wmp_4-s_810381615.png "title=" screenshot from 2017-10-10 16-07-16.png "alt=" Wkiom1ndm12zvve9aadcy_eobgy580.png-wh _50 "style=" padding:0px;margin:0px;vertical-align:top;border:none; "/>
Systemctl List-unit-files # #列出服务的开机状态
Diagram: Service boot status
650) this.width=650; "Src=" Https://s3.51cto.com/wyfs02/M02/08/2C/wKiom1ndM2_gAaKoAADe1bS8c8U533.png-wh_500x0-wm _3-wmp_4-s_3685885002.png "title=" screenshot from 2017-10-10 16-08-15.png "alt=" wkiom1ndm2_ Gaakoaade1bs8c8u533.png-wh_50 "style=" padding:0px;margin:0px;vertical-align:top;border:none;/>
Systemctl Status sshd # #查看指定服务的状态
Loaded: "Loaded"
Active: "Available, running"
Main PID: "Executed ID"
CGroup: "Location"
Execution history
Figure: View the status of the SSHD service
650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M02/A6/DE/wKioL1ncxIrhXbRSAAC-DoLd-mU678.png-wh_500x0-wm_ 3-wmp_4-s_1828633141.png "title=" screenshot from 2017-10-10 16-08-52.png "alt=" Wkiol1ncxirhxbrsaac-dold-mu678.png-wh_50 "style=" padding:0px;margin:0px;vertical-align:top;border:none; "/>
Systemctl Stop sshd # #关闭指定服务
Diagram: Turn off the sshd service and view the sshd status
650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M00/08/2C/wKiom1ndM7GiEdoHAADxGdzAKpw982.png-wh_500x0-wm_ 3-wmp_4-s_1375894865.png "title=" screenshot from 2017-10-10 16-09-40.png "alt=" Wkiom1ndm7giedohaadxgdzakpw982.png-wh_50 "style=" padding:0px;margin:0px;vertical-align:top;border:none; "/>
Systemctl Start sshd # #开启指定服务
Diagram: Turn on the sshd service and view the sshd status
650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M00/A6/DE/wKioL1ncxLWzrRiHAADWjxjsvbc440.png-wh_500x0-wm_ 3-wmp_4-s_699105714.png "title=" screenshot from 2017-10-10 16-12-19.png "alt=" Wkiol1ncxlwzrrihaadwjxjsvbc440.png-wh _50 "style=" padding:0px;margin:0px;vertical-align:top;border:none; "/>
Systemctl Restart sshd # #重新启动服务
Diagram: Restart the sshd service and view the sshd status
650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M01/08/2C/wKiom1ndM9fwW31SAADiroqVg5M156.png-wh_500x0-wm_ 3-wmp_4-s_2342629468.png "title=" screenshot from 2017-10-10 16-12-41.png "alt=" Wkiom1ndm9fww31saadiroqvg5m156.png-wh_50 "style=" padding:0px;margin:0px;vertical-align:top;border:none; "/>
Systemctl Enable SSHD # #设定指定服务开机开启
Figure: Set the sshd service to boot and view the SSDHD status
650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M01/A6/DE/wKioL1ncxNnApuNdAADCF0QjcRk336.png-wh_500x0-wm_ 3-wmp_4-s_478637657.png "title=" screenshot from 2017-10-10 16-14-08.png "alt=" Wkiol1ncxnnapundaadcf0qjcrk336.png-wh _50 "style=" padding:0px;margin:0px;vertical-align:top;border:none; "/>
Systemctl Disable SSHD # #设定指定服务开机关闭
Figure: Set the sshd service to boot without booting and view the SSDHD status
650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M01/08/2C/wKiom1ndM_nC2ZziAADG1EpnKNc642.png-wh_500x0-wm_ 3-wmp_4-s_2203336179.png "title=" screenshot from 2017-10-10 16-15-35.png "alt=" wkiom1ndm_ Nc2zziaadg1epnknc642.png-wh_50 "style=" padding:0px;margin:0px;vertical-align:top;border:none; "/>
Systemctl Reload sshd # #使指定服务从新加载配置
Diagram: Reload the configuration of the SSHD service and view the SSDHD status
650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M01/A6/DE/wKioL1ncxP2SVufQAAE0vVvZvY8684.png-wh_500x0-wm_ 3-wmp_4-s_3179392086.png "title=" screenshot from 2017-10-10 16-16-32.png "alt=" Wkiol1ncxp2svufqaae0vvvzvy8684.png-wh_50 "style=" padding:0px;margin:0px;vertical-align:top;border:none; "/>
Systemctl list-dependencies sshd # #查看指定服务的依赖关系
Figure: View dependencies for an sshd service
650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M01/A6/DE/wKioL1ncxTOwXexEAACuIhjPCfw010.png-wh_500x0-wm_ 3-wmp_4-s_2002509863.png "title=" screenshot from 2017-10-10 16-17-50.png "alt=" Wkiol1ncxtowxexeaacuihjpcfw010.png-wh_50 "style=" padding:0px;margin:0px;vertical-align:top;border:none; "/>
Systemctl Mask sshd # #冻结指定服务
Diagram: Freeze the sshd service and view the SSDHD status
650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M02/08/2C/wKiom1ndNFPjszqsAAEXWWgY1PA378.png-wh_500x0-wm_ 3-wmp_4-s_274361928.png "title=" screenshot from 2017-10-10 16-18-43.png "alt=" Wkiom1ndnfpjszqsaaexwwgy1pa378.png-wh _50 "style=" padding:0px;margin:0px;vertical-align:top;border:none; "/>
Systemctl unmask sshd # #启用服务
Diagram: Enable the sshd service and view the SSDHD status
650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M00/A6/DE/wKioL1ncxW2iGt2jAAEmUyAACDM316.png-wh_500x0-wm_ 3-wmp_4-s_4276051751.png "title=" screenshot from 2017-10-10 16-19-18.png "alt=" Wkiol1ncxw2igt2jaaemuyaacdm316.png-wh_50 "style=" padding:0px;margin:0px;vertical-align:top;border:none; "/>
Systemctl Set-default Multi-user.target # #开机不开启图形, can reboot view
Diagram: Start-up graphics
650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M00/A6/DE/wKioL1ncxcDQUfy1AABQuaBmL7E299.png-wh_500x0-wm_ 3-wmp_4-s_122949990.png "title=" screenshot from 2017-10-10 16-20-07.png "alt=" Wkiol1ncxcdqufy1aabquabml7e299.png-wh _50 "style=" padding:0px;margin:0px;vertical-align:top;border:none; "/>
Systemctl Set-default Graphical.target # #开机启动图形
Setterm # #文本界面设定color
Iii. Status of Service
Systemctl Status Service Name
Loaded # #系统服务已经初始化完成, loaded configuration
Active (running) # #正有一个或多个程序正在系统中执行,
# VSFTPD is this pattern
Atcive (exited) # #僅執行一次就正常結束的服務,
# There are no programs in the system at this time.
Atcive (Waiting) # #正在執行當中,
# and wait for other events to continue
Inactive # #服务关闭
enbaled # #服务开机启动
Disabled # #服务开机不自启
Static # #服务开机启动项不可被管理
Failed # #系统配置错误
This article is from the "13342594" blog, please be sure to keep this source http://13352594.blog.51cto.com/13342594/1975407
Linux--system the command service status