Autostart: Difference between revisions
adds more Ubuntu reference |
m Text replacement - "<(\/?)source" to "<$1syntaxhighlight" Tags: Mobile edit Mobile web edit |
||
| Line 3: | Line 3: | ||
=== List services === | === List services === | ||
So what are the services controlled by init<ref>http://manpages.ubuntu.com/manpages/trusty/man5/init.5.html</ref><ref>http://manpages.ubuntu.com/manpages/trusty/man8/init.8.html</ref> scripts? | So what are the services controlled by init<ref>http://manpages.ubuntu.com/manpages/trusty/man5/init.5.html</ref><ref>http://manpages.ubuntu.com/manpages/trusty/man8/init.8.html</ref> scripts? | ||
< | <syntaxhighlight lang="bash"> | ||
# the easy way (if somewhat non-specific) | # the easy way (if somewhat non-specific) | ||
ls -l /etc/rc.d/init.d/ | ls -l /etc/rc.d/init.d/ | ||
| Line 20: | Line 20: | ||
# for newer systemd controlled systems | # for newer systemd controlled systems | ||
systemctl list-units | systemctl list-units | ||
</ | </syntaxhighlight> | ||
Here is an example list of the services you might find on your machine: | Here is an example list of the services you might find on your machine: | ||
# NetworkManager | # NetworkManager | ||
| Line 140: | Line 140: | ||
=== Enable/Disable/Start/Stop/Status a service === | === Enable/Disable/Start/Stop/Status a service === | ||
< | <syntaxhighlight lang="bash"> | ||
# for older systems using System V style init | # for older systems using System V style init | ||
chkconfig apache on|off|start|stop|status | chkconfig apache on|off|start|stop|status | ||
# for newer systemd controlled systems | # for newer systemd controlled systems | ||
systemctl enable|disable|start|stop|status <servicename>.service | systemctl enable|disable|start|stop|status <servicename>.service | ||
</ | </syntaxhighlight> | ||
== More == | == More == | ||