48

Since Mark Shuttleworth decided to switch to sytemd in the future, I was wondering if I can install it on my Ubuntu now?

Braiam
  • 67,791
  • 32
  • 179
  • 269
blade19899
  • 26,704

2 Answers2

44

Wily Werewolf (15.10) and newer:

You don't have to do anything. You are using systemd by default.

Trusty (14.04) and older:

You are out of luck. Ubuntu repositories do not provide the systemd binaries for versions before Utopic, despite the fact that their sources do generate the files. You can learn more about this in this answer.

Braiam
  • 67,791
  • 32
  • 179
  • 269
  • Ubuntu 12.04 LTS: Unable to locate package systemd-services . I think you should add at least for which version this works, and/or which repository to add and how. – Anthon Mar 12 '14 at 05:04
  • @Anthon this only works with raring and newer. – Braiam Mar 12 '14 at 05:05
  • Or just raring? On 13.10 systemd-services doesn't include /lib/systemd/systemd, and there isn't another package that does. – sourcejedi Apr 09 '14 at 09:55
  • @sourcejedi you are right, I'm baffled, I've searched all the repository and /lib/systemd/systemd isn't provided by any package before utopic... I'm not sure what's going on since I have /lib/systemd/systemd in my updated-from-raring trusty system. – Braiam Sep 03 '14 at 01:12
  • As of now a lot of packages won't install or uninstall without upstart or editing prerm/preinst scripts. – int_ua Oct 27 '14 at 20:35
  • You should include a warning that this is experimental code and thus support is going to be limited and "off topic" - https://wiki.ubuntu.com/systemd#Warning.21_Experimental_code - "Warning! Experimental code systemd is under active development in Ubuntu although the rough plan would be to default to systemd during development of 15.04. If you want to help it's best to be running 15.04. (14.10 might be doable as well..)" If you really want to try systemd, I highly suggest you boot Fedora, Arch, or a distro that supports systemd. – Panther Dec 25 '14 at 17:38
  • 1
    @bodhi.zazen That presumes the package comes from the "PPA". If you check around, you will see that to install systemd it uses packages from a PPA. I do not, my instructions use "main" which are packages supported by Ubuntu/Canonical. Of course, people wanting to do the jump should be prepared before even trying. – Braiam Dec 25 '14 at 17:50
  • There are tons of questions poping up on this and although the code may be in main, people are having problems and systemd is considered experimental code in both Debian and Ubuntu, or at least according to the official documentation for both projects, which I referenced. I asked for clarification on this topic on meta – Panther Dec 25 '14 at 17:56
  • https://wiki.ubuntu.com/SystemdForUpstartUsers

    "While systemd is available in prior releases through the Ubuntu repositories, there is a deemphasis of support for these releases as noted here. https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1438967/comments/2 "

    – user14654 May 29 '15 at 10:54
  • @user14654 that's very old news. Ubuntu now use by default systemd. – Braiam May 09 '16 at 01:48
  • @Braiam user14654 posted his comment almost exactly 1 year before you said "that's very old news"... That said thank you for your answer above it was enlightening history about Ubuntu and SystemD relationship. – WinEunuuchs2Unix Sep 05 '16 at 20:18
4

add these ppas

sudo add-apt-repository ppa:ondrej/systemd
sudo apt-get update

systemd requires the directory /sys/fs/cgroup as a mountpoint. It doesn't exist in the current Ubuntu kernel (2.6.35). It can't be created with mkdir either because sysfs doesn't allow that. To create the directory this patch from the 2.6.36 kernel must be backported. A suitably patched kernel can be pulled via apt-get

sudo apt-get install linux-image-2.6.35-23-generic=2.6.35-23.41ppa1 linux-headers-2.6.35-23-generic=2.6.35-23.41ppa1 linux-headers-2.6.35-23=2.6.35-23.41ppa1

then install systemd

 sudo apt-get install systemd libpam-systemd systemd-gui systemd-extra-units

for more information go to this link

Avinash Raj
  • 78,556
Zuko
  • 1,267
  • 11
  • 12