I've been ignoring systemd for a while until I watched this awesome talk from LISA18/USENIX [1] conference, then started looking at it again, mostly because I saw how it wraps linux cgroups  so well, someting that previously used from lxc and second because I saw a chance to be able to run another OS environment without using docker (keep it simple!).

So, I decided to start reading systemd manpages, more specifically systemd-run  and  systemd-exec[2], then spotted an interesting parameter I already saw on the talk [2] , I decided to try that my self on the cli!

Sadly I dint got the latest systemd tools version on my distro so I had to use ubuntu 18.10 from a free tier cloud service [3], clone systemd repo [4], install its dependecies [a], run a build script [b], bootstrap [c] a debian jessie userland and then with one simple but neat command [d], got a friendly bash environment running in seconds :D, going further with the mange I ended using systemd-nspawn to the a complete chroot like isolated "machine". [e]

    # [a]
    sudo apt-get build-dep systemd lib-systemd
    # [b]
    git clone https://github.com/systemd/systemd.git && cd systemd && ./mkosi.build
    # [c]
    mkdir debian && sudo debootstrap unstable ./debian http://deb.debian.org/debian
    # [d]
    sudo ./systemd/build/systemd-run --working-directory=/home/kristian_paul/debian -t bash

    # [e]
    sudo systemd-nspawn -D debian
    Spawning container debian on /home/kristian_paul/debian.
    Press ^] three times within 1s to kill container.
    root@debian:~# cat /etc/debian_version 
    buster/sid
    root@debian:~# 


I'll  keep looking at systemd docs and write some more about it later and also why not another technoliges i've found really usefull during the last years.

Thanks for reading

[1] https://www.youtube.com/watch?v=_OLwb8zV9r4&t=0s&list=WL&index=43
[2] https://www.freedesktop.org/software/systemd/man/systemd-run.html
[2] https://www.freedesktop.org/software/systemd/man/systemd.exec.html
[3] https://cloud.google.com/free/docs/gcp-free-tier#always-free-usage-limits
[4] https://github.com/systemd/systemd