How to Switch to systemd on Debian Wheezy

By | 2014/10/20

For Debian Wheezy, switching to systemd is easy. Here’s the scoop!

1. First, add the wheezy-backports repository to your /etc/apt/sources.list file:

deb wheezy-backports main contrib non-free

2. Refresh packages available:

$ sudo apt-get update

3. Install systemd:

$ sudo apt-get -t wheezy-backports install systemd

The output will look similar to the following:

smiller@bruckner:~$ sudo apt-get -t wheezy-backports install systemd
[sudo] password for smiller: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  libpam-systemd libsystemd-daemon0 libsystemd-journal0 libsystemd-login0 libudev1 systemd-sysv
Suggested packages:
The following NEW packages will be installed:
  libpam-systemd libsystemd-journal0 libudev1 systemd systemd-sysv
The following packages will be upgraded:
  libsystemd-daemon0 libsystemd-login0
2 upgraded, 5 newly installed, 0 to remove and 174 not upgraded.
Need to get 2,490 kB of archives.
After this operat$ sudo apt-get -t wheezy-backports install systemdion, 5,968 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 wheezy-backports/main libudev1 amd64 204-14~bpo70+1 [54.8 kB]
Get:2 wheezy-backports/main libsystemd-daemon0 amd64 204-14~bpo70+1 [25.1 kB]
Get:3 wheezy-backports/main libsystemd-journal0 amd64 204-14~bpo70+1 [74.2 kB]
Get:4 wheezy-backports/main libsystemd-login0 amd64 204-14~bpo70+1 [45.6 kB]
Get:5 wheezy-backports/main systemd amd64 204-14~bpo70+1 [2,219 kB]
Get:6 wheezy-backports/main systemd-sysv amd64 204-14~bpo70+1 [24.6 kB]
Get:7 wheezy-backports/main libpam-systemd amd64 204-14~bpo70+1 [46.4 kB]
Fetched 2,490 kB in 18s (136 kB/s)                                                                  
Reading changelogs... Done
Selecting previously unselected package libudev1:amd64.
(Reading database ... 324690 files and directories currently installed.)
Unpacking libudev1:amd64 (from .../libudev1_204-14~bpo70+1_amd64.deb) ...
Preparing to replace libsystemd-daemon0:amd64 44-11+deb7u4 (using .../libsystemd-daemon0_204-14~bpo70+1_amd64.deb) ...
Unpacking replacement libsystemd-daemon0:amd64 ...
Selecting previously unselected package libsystemd-journal0:amd64.
Unpacking libsystemd-journal0:amd64 (from .../libsystemd-journal0_204-14~bpo70+1_amd64.deb) ...
Preparing to replace libsystemd-login0:amd64 44-11+deb7u4 (using .../libsystemd-login0_204-14~bpo70+1_amd64.deb) ...
Unpacking replacement libsystemd-login0:amd64 ...
Selecting previously unselected package systemd.
Unpacking systemd (from .../systemd_204-14~bpo70+1_amd64.deb) ...
Selecting previously unselected package systemd-sysv.
Unpacking systemd-sysv (from .../systemd-sysv_204-14~bpo70+1_amd64.deb) ...
Replacing files in old package sysvinit ...
Selecting previously unselected package libpam-systemd:amd64.
Unpacking libpam-systemd:amd64 (from .../libpam-systemd_204-14~bpo70+1_amd64.deb) ...
Processing triggers for man-db ...
Setting up libudev1:amd64 (204-14~bpo70+1) ...
Setting up libsystemd-daemon0:amd64 (204-14~bpo70+1) ...
Setting up libsystemd-journal0:amd64 (204-14~bpo70+1) ...
Setting up libsystemd-login0:amd64 (204-14~bpo70+1) ...
Setting up systemd (204-14~bpo70+1) ...
Initializing machine ID from D-Bus machine ID.
Adding group `systemd-journal' (GID 137) ...
Setting up systemd-sysv (204-14~bpo70+1) ...
Setting up libpam-systemd:amd64 (204-14~bpo70+1) ...

4. Add your user to the group systemd-journal so you can run journalctl commands without sudo:

smiller@bruckner:~$ sudo gpasswd -a smiller systemd-journal
Adding user smiller to group systemd-journal

5. Make sure /sbin/init is linked to systemd (a Debian thing) as a quick check before rebooting:

$ ls -l /sbin/init 
lrwxrwxrwx 1 root root 20 Jul  5 08:33 /sbin/init -> /lib/systemd/systemd

6. Reboot!

$ sudo reboot