Difference between revisions of "Systemctl"

From wikieduonline
Jump to navigation Jump to search
Tags: Mobile web edit, Mobile edit
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
{{lowercase}}
 
<code>[[wikipedia:https://en.wikipedia.org/wiki/Systemd#Core_components_and_libraries|systemctl]]</code> command is used to control the [[systemd]] system and service manager.<ref>https://www.freedesktop.org/software/systemd/man/systemctl.html</ref>
 
<code>[[wikipedia:https://en.wikipedia.org/wiki/Systemd#Core_components_and_libraries|systemctl]]</code> command is used to control the [[systemd]] system and service manager.<ref>https://www.freedesktop.org/software/systemd/man/systemctl.html</ref>
  
Line 14: Line 15:
 
* <code>[[systemctl cat]] SERVICE_NAME</code> or  <code>[[systemctl cat]] SERVICE_NAME.service</code>
 
* <code>[[systemctl cat]] SERVICE_NAME</code> or  <code>[[systemctl cat]] SERVICE_NAME.service</code>
 
* <code>[[systemctl list-timers]]</code>
 
* <code>[[systemctl list-timers]]</code>
* <code>systemctl list-units</code>
+
* <code>[[systemctl list-units]]</code>
 
** <code>systemctl list-units --all</code>
 
** <code>systemctl list-units --all</code>
 
** <code>systemctl list-units --failed</code>
 
** <code>systemctl list-units --failed</code>
Line 22: Line 23:
 
** <code>[[systemctl list-unit-files]] --state=enabled</code>
 
** <code>[[systemctl list-unit-files]] --state=enabled</code>
 
* List services enabled: <code>systemctl list-unit-files --state=enabled</code>
 
* List services enabled: <code>systemctl list-unit-files --state=enabled</code>
* Show properties: <code>systemctl show sshd.service</code>
+
* Show properties:  
 +
** <code>[[systemctl show]] sshd.service</code>
 
* View dependencies: <code>systemctl list-dependencies sshd.service</code>
 
* View dependencies: <code>systemctl list-dependencies sshd.service</code>
 
* Creating new services in: <code>/etc/systemd/system/</code> https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/sect-managing_services_with_systemd-unit_files
 
* Creating new services in: <code>/etc/systemd/system/</code> https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/sect-managing_services_with_systemd-unit_files
* <code>systemctl -t mount</code>
+
* <code>[[systemctl -t]] mount</code>
* <code>systemctl list-units -t mount</code>
+
* <code>[[systemctl list-units]] -t mount</code>
 
* <code>[[systemctl enable]] FS_UNIT_NAME.mount</code>
 
* <code>[[systemctl enable]] FS_UNIT_NAME.mount</code>
* <code> sudo [[systemctl enable]] --now [[snap]]d.socket</code>
+
* <code>[[systemctl enable]] --now [[snap]]d.socket</code>
 
* <code>[[systemctl disable]] SERVICE_NAME</code>
 
* <code>[[systemctl disable]] SERVICE_NAME</code>
 
* <code>[[systemctl --type swap]]</code>
 
* <code>[[systemctl --type swap]]</code>
Line 48: Line 50:
  
 
== See also ==
 
== See also ==
* {{systemd}}
+
* {{systemctl list}}
 
* {{systemctl}}
 
* {{systemctl}}
 
* [[KVM services]]
 
* [[KVM services]]
Line 54: Line 56:
 
[[Category:Linux]]
 
[[Category:Linux]]
 
[[Category:systemd]]
 
[[Category:systemd]]
 +
[[Category:systemctl]]

Latest revision as of 23:36, 15 September 2021

systemctl command is used to control the systemd system and service manager.[1]

Services configuration directory:

/etc/systemd/system/
    sshd.service


Basic Usage[edit]

Activities[edit]

Basic[edit]

Advanced[edit]


Related terms[edit]

See also[edit]

  • https://www.freedesktop.org/software/systemd/man/systemctl.html
  • https://www.linuxtrainingacademy.com/systemd-cheat-sheet/
  • Advertising: