Systemd Installation on Debian Wheezy


I wanted to try the “infamous” systemd on my Debian Wheezy: Let’s start with a refresh (being root)
apt-get update && apt-get upgrade

After that we can install systemd  – initially I’ve used version present in repository Wheezy/stable (44-11 + deb7u4)
apt-get install systemd systemd-sysv
After writing the funny sentence,  installation is completed.

Now, we have to edit the grub to make sure that systemd will start without any problems:
nano /etc/default/grub
At the last row I added, (under the GRUB_CMDLINE_LINUX_DEFAULT section):


Then i have updated grub:
sudo update-grub2
After reboot, Systemd is perfectly working.

At that point I wanted to try also the latest systemd version present in backports repository (204-14 ~ bpo70 +1); so i’ve enabled backports repository
nano /etc/apt/sources.list
adding wheezy-backports repository in sources.list:
deb wheezy-backports main contrib non-free

After saving, type:
apt-get update
finally we can install  systemd backports repository version(204-14~bpo70+1):
apt-get install -t wheezy-backports systemd systemd-sysv

After reboot will have systemd working; considerations: the system reboot seems to be, in my case, slightly faster.

Below some useful commands operating in Systemd:

Show all active services

Prints the time spent in the kernel before userspace has been reached, the time spent in the initial RAM disk (initrd) before normal system userspace has been reached, and the time normal system userspace took to initialize. Note that these measurements simply measure the time passed up to the point where all system services have been spawned, but not necessarily until they fully finished initialization.
systemdanalyzesystemd-analyze blame
a list of all units running, sorted according to the time you have used the services. This information can be used to optimize startup times, for example we can disable startup of a service (systemctl disable foo service) that maybe we don’t need and that takes a long time to start.
Note that the result could be misleading; for example, the start time of a service might be slow simply because it waits for initialization of another service is complete.
systemctl start foo.service
activate a service immediately (replace foo service with a real service)

systemctl stop foo.service
Disable a service immediately

systemctl restart foo.service
Restart a service

systemctl status foo.service
Check status of a service

systemctl enable foo.service
Enable a service to startup on boot

systemctl disable foo.service
Disable a service at boot

systemctl is-enabled foo.service; echo $?
Check whether a particular service or less at startup

This entry was posted in Gnu-Linux. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *