You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17Lines changed: 17 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -583,12 +583,29 @@ Regular expressions.
583
583
584
584
585
585
## Managing systemd units
586
+
-`systemd` is the process process started by the kernel linux, systemd is responsible for rrunning the other processes, `pstree` to show the processes in a tree structure.
587
+
-`ps -ax` to show the processes, the id of `systemd` is 1.
588
+
-`systemd` is a system and service manager, it introduces a concept of system units.
589
+
- system units are represented by unit configuration files:
590
+
-`/etc/systemd/system/` --> managed by admin
591
+
-`/run/systemd/system` --> created at runtime.
592
+
-`usr/lib/systemd/system/` --> distributed with package installation.
593
+
- Types of system units:
594
+
-`service units`
595
+
-`socket units`
596
+
-`path units`
586
597
-`systemctl status jenkins`: systemctl is included in systemd, the preceding command check the status of the jenkins service.
587
598
-`systemctl disable jenkins`: do not start jenkins automatically after the boot.
588
599
-`systemctl enable jenkins`: start jenkins automatically after the boot.
589
600
-`systemctl stop jenkins`: stop the service jenkins.
590
601
-`systemctl start jenkins`: start jenkins.
591
602
-`systemctl restart jenkins`: restart jenkins.
603
+
-`systemctl is-active jenkins`: is the service jenkis active?.
604
+
-`systemctl --type=service`: show only service units.
605
+
-`systemctl list-dependencies ssh`: show the dependencies of a given service, in other word, what are the other units that will start when starting the given service.
606
+
-`systemctl edit --full sshd.service`: to edit the config unit file of the ssh service without the need to know the location of that file in the system.
607
+
-`systemctl cat sshd.service`: to print the config unit file.
608
+
-`system show ssh.service`: to print more details about the unit configiguration of that service.
592
609
593
610
## Viewing Logs
594
611
-`cat var/log/syslog`: print the content of the syslog file. The `var/log` directory contains logs of different services.
0 commit comments