Objetivo: Para ver o status dos serviços ou habilitar / desabilitar serviços, configure como segue. 

[1] Exibir os serviços.

				
					root@debian:~# systemctl -t service

apparmor.service                                                                          loaded active exited  Load AppArmor profiles
  blk-availability.service                                                                  loaded active exited  Availability of block devices
  console-setup.service                                                                     loaded active exited  Set console font and keymap
  cron.service                                                                              loaded active running Regular background program processing daemon
  dbus.service                                                                              loaded active running D-Bus System Message Bus
  getty@tty1.service                                                                        loaded active running Getty on tty1
  ifup@ens18.service                                                                        loaded active exited  ifup for ens18
  ifupdown-pre.service                                                                      loaded active exited  Helper to synchronize boot up for ifupdown
  keyboard-setup.service                                                                    loaded active exited  Set the console keyboard layout
  kmod-static-nodes.service                                                                 loaded active exited  Create list of static device nodes for the current ker>
  lvm2-monitor.service                                                                      loaded active exited  Monitoring of LVM2 mirrors, snapshots etc. using dmeve>
  lvm2-pvscan@8:5.service                                                                   loaded active exited  LVM event activation on device 8:5
  networking.service                                                                        loaded active exited  Raise network interfaces
  rsyslog.service                                                                           loaded active running System Logging Service
  ssh.service                                                                               loaded active running OpenBSD Secure Shell server
  systemd-fsck@dev-disk-by\x2duuid-079bc19d\x2d073c\x2d4bc9\x2dbc45\x2d4e90739bde3b.service loaded active exited  File System Check on /dev/disk/by-uuid/079bc19d-073c-4>
  systemd-journal-flush.service                                                             loaded active exited  Flush Journal to Persistent Storage
  systemd-journald.service                                                                  loaded active running Journal Service
  systemd-logind.service                                                                    loaded active running User Login Management
  systemd-modules-load.service                                                              loaded active exited  Load Kernel Modules
  systemd-random-seed.service                                                               loaded active exited  Load/Save Random Seed
  systemd-remount-fs.service                                                                loaded active exited  Remount Root and Kernel File Systems
  systemd-sysctl.service                                                                    loaded active exited  Apply Kernel Variables
  systemd-sysusers.service                                                                  loaded active exited  Create System Users
  systemd-timesyncd.service                                                                 loaded active running Network Time Synchronization
  systemd-tmpfiles-setup-dev.service                                                        loaded active exited  Create Static Device Nodes in /dev
  systemd-tmpfiles-setup.service                                                            loaded active exited  Create Volatile Files and Directories
  systemd-udev-trigger.service                                                              loaded active exited  Coldplug All udev Devices
  systemd-udevd.service                                                                     loaded active running Rule-based Manager for Device Events and Files
  systemd-update-utmp.service                                                               loaded active exited  Update UTMP about System Boot/Shutdown
  systemd-user-sessions.service                                                             loaded active exited  Permit User Sessions
  user-runtime-dir@1000.service                                                             loaded active exited  User Runtime Directory /run/user/1000
  user@1000.service                                                                         loaded active running User Manager for UID 1000

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.
33 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.
				
			

[2] Se houver serviços desnecessários, é possível parar e desabilitar a configuração de início automático como a seguir. (você pode omitir o [.service] das palavras)

				
					root@debian:~# systemctl stop apparmor
root@debian:~# systemctl disable apparmor 
Synchronizing state of apparmor.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install disable apparmor
Removed /etc/systemd/system/sysinit.target.wants/apparmor.service.
				
			
Print Friendly, PDF & Email