From the course: Exploring Linux Internals: Advanced Insights and Practical Applications

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Running user processes in systemd

Running user processes in systemd

- So one cool thing about systemd is that it is not just used for system services. Users can run units in systemd as well. Now if a user wants to run their own units, they need to create a directory .conf/systemd/user, that's where all the user units are going to land and this directory needs to be created manually. There is also user lip/systemd/user as an option, which is a maintainer user units. And etc/systemd/user, which can have global units that apply to all users. User processes end up in a scope that is reserved for that specific user. We've already seen that when we talked about cgroups earlier in this lesson. And the systemd user environment has its own environment, which is set in the .config/environment.d directory. You can even show that using systemctl --user show-environment. And if you want to, you can use systemctl --user import-environment to import .bashrc and .bash_profile in the systemd environment…

Contents