systemd on Linux 1: Intro and Unit Files

Поділитися
Вставка
  • Опубліковано 20 січ 2025

КОМЕНТАРІ • 86

  • @tutoriaLinux
    @tutoriaLinux  3 роки тому +16

    My Linux course for beginners: www.udemy.com/course/hands-on-linux-self-hosted-wordpress-for-linux-beginners/?referralCode=19C0A7DEE2FD53C9C09D
    Linode Referral Link (you get $100 credit when signing up): www.linode.com/tutorialinux
    tutorialinux Merch: ua-cam.com/channels/vA_wgsX6eFAOXI8Rbg_WiQ.htmlstore
    My Linux Course Playlist: ua-cam.com/play/PLtK75qxsQaMLZSo7KL-PmiRarU7hrpnwK.html

  • @unixbadger
    @unixbadger 11 місяців тому +8

    I really appreciate how you give some overview and operational examples instead of just diving into the configuration files like most books and videos.

    • @tutoriaLinux
      @tutoriaLinux  5 місяців тому +4

      Thank you so much! I often get a lot of "JUST GET TO THE POINT" comments on my videos, but I don't understand how anyone can retain technical information with zero context, so I've kept this format all these years. I guess I'll never be as big as jake paul, oh well :-D

  • @DonalTechTips
    @DonalTechTips 3 роки тому +16

    Thank you for making this, really interesting and well explained. Looking forward to the rest of the series.

  • @sadhucat4476
    @sadhucat4476 Рік тому +1

    This is some of the best explained material I've found anywhere. Every, "but why..." is addressed before moving on to the next step. Subscribed and gonna start checking this channel first when I go researching Linux topics.

  • @mrdr9534
    @mrdr9534 7 місяців тому

    Thanks for taking the time and effort of making this video and sharing Your knowledge. This was the best introduction to this subject that I have seen to date, and I have watched quite a number...;), and I will now go on to watch the rest in Your "systemd series" :)
    Again many thanks.
    Best regards.

  • @FailCommando
    @FailCommando 3 роки тому +7

    Exactly what i was searching for. Thank you so much!

  • @KM-sv4dh
    @KM-sv4dh 2 роки тому +1

    Your channel is under rated man, I do really enjoy your videos.

  • @_Zabamund_
    @_Zabamund_ 3 роки тому +3

    This is great thank you, I'm just a Linux and systemd user and while I know python I'm not a Linux sysadmin pro, so this is really helpful.

  • @Tech-ub8dd
    @Tech-ub8dd Рік тому

    Thank you for the video, i keep getting confused what systemd unit actually are because i see them all over the place. Love your tutorials!

  • @YosrDhaoui
    @YosrDhaoui Рік тому

    So grateful for finding this video! Thank u so much

  • @networker9304
    @networker9304 Рік тому

    Nice representation for orphaned process. Kudos to creator

  • @tornenic
    @tornenic 3 місяці тому

    Very well explained. Thanks a ton!

  • @gregzeng
    @gregzeng 2 роки тому +1

    This UA-cam production business shows the complications of technical communication. This is further detailed by the many comments from all types of viewers to this surviving video.
    Systemd, as you seem to explain it, is just another automation step that gatherers together a bunch of many small scripts, and both necessary and also optional alternatives.
    UA-cam "journalism" is similar to a large organisation's "Public Office". Your job is to represent the address of interest, only to the uninformed masses, at their selected level of simplicity: infants, children, teenagers, young adults, adults, and retirees. Each target audience really needs specialized attention. It is so hard to be everything to everybody, satisfactorily.
    All journalism, like all teaching, Chief Officer and parenting roles, is very demanding on our work performances, and the supposed quality of our work output.
    Systemd tried to be in operating systems, similar to UA-cam journalism, Chief Officer and parenting roles. Trying to become all things to all people.
    Systemd is an evolution to previous "solutions" detailed in this video and its comments from informed viewers. Init,... Etc.
    Some rebels prefer the older, "simpler" traditional methods. The latest version of Peppermint Linux now offers Debian instead of Ubuntu as a base. It uses Devuan which avoids the newer automation called "systemd", which is the subject of this specific UA-cam production.
    Systemd is a usual further evolutionary development in Linux. Linux was devised to be written in the computer language called "C". After many attempts to upgrade and modify "C", some of the heavyweights in Linux are now slowly trying to move to the "improvement" to C, called "Rust".
    Systemd, like the introduction of binary computers to machines, is replacing that older method. Older sceptics are resisting this new automation, simplifications and tidy gathering of independent scripts. This is standard evolutionary "progress". Three steps forward, then one or two steps backward.

  • @ArthurDebert
    @ArthurDebert Рік тому

    Thanks!

    • @tutoriaLinux
      @tutoriaLinux  5 місяців тому

      Thank you so much! Truly generous.

  • @abdelrahmanyasser3879
    @abdelrahmanyasser3879 Рік тому

    This is amazing, thanks for making this.

  • @portentouslad5051
    @portentouslad5051 3 роки тому

    Very welcome, thanks for the series.

  • @SouthBrooklynite
    @SouthBrooklynite Рік тому

    Hey thanks for making this. This has been very helpful for me.

  • @TheTheThewillow
    @TheTheThewillow 3 роки тому +3

    You sir, great at explaining! Thanks

  • @TecraTube
    @TecraTube 3 роки тому +1

    This video is soooo good, thanks bro.

  • @ansadahmad1958
    @ansadahmad1958 2 роки тому

    Hi I have a query. How do I safely make my postgresql service start only after docker service is up on boot. I need this because postgresql needs docker0 network to be up.

  • @Oswee
    @Oswee 3 роки тому +3

    + systemd-analyze, timer units i found quite important tools in a daily use.
    I would not put everything under "/etc/systemd/...". You have also "~/.config/systemd/..." for things like gpg-agent etc.
    Also... it could be quite important to mention about Environment and PassEnvironment to control unit environment. Or "~/.config/environment.d/*".
    Also "sudo strings /proc//environ" is quite handy at times.

    • @tutoriaLinux
      @tutoriaLinux  3 роки тому +1

      This is a great callout, thank you! I had planned another systemd video about timers but then forgot to do it (oops)! Maybe I'll film it next week. Timers are definitely a core part of the toolbox, and I find myself constantly using Environment/EnvironmentFile as well.

  • @rajeshch9884
    @rajeshch9884 3 роки тому +1

    Good information, thank you for the video 👌

  • @cheako91155
    @cheako91155 2 роки тому

    12:50 is that a typo, or does the dash prefix mean something?

  • @1oneguythat
    @1oneguythat Рік тому

    Steam updated then said i dont have 32bit library. Then got a systemd message on shutdown. File system was modified now i cant boot back into ubuntu. If it does i get a login loop. Wtf happened?

  • @tanchwa3740
    @tanchwa3740 2 роки тому

    with kubernetes, I've also seen some unit files get deployed in /var/lib/systemd like etcd and the scheduler... How does this work in the grand scheme of things? If I have to backup my etcd snapshot for example or if I have to run a custom scheduler, which file do these go in ?

    • @tanchwa3740
      @tanchwa3740 2 роки тому

      sorry I may be mistaken. It seems some of the config locations for these SPECIFIED BY the unite files are in /var/lib/....

  • @example101
    @example101 3 роки тому

    what config command or file references/finds all unit files? Are all systemd-path folders searched for unit files? Or just /etc/systemd?

  • @poornachandumarneni1068
    @poornachandumarneni1068 2 роки тому

    Can make a comparison video on systemd-analyze and bootchart

  • @milindatalwatte
    @milindatalwatte 2 роки тому +3

    Great tutorial. Quick question: Let's assume you are turning on your computer and haven't logged in as a user yet. Do these systemd services start before the user logs in? And if they do, does that mean they run as background processes for every user available on that box?

    • @tutoriaLinux
      @tutoriaLinux  2 роки тому +6

      Yeah, these services are defined at the system level, independent of any users who may or may not be logging in. Whether a user logs in (even if 0, or 100 users log in) interactively has no effect on them. That service will simply run as soon as it can (depending on when you told it to start in the unit file).

  • @veronikatolkachova4573
    @veronikatolkachova4573 2 місяці тому

    why on earth would you have dark blue font in terminal... while super helpful video, thanks a lot!

  • @timbear64
    @timbear64 8 місяців тому

    Do you have a version without the music?

  • @sanaetagui64
    @sanaetagui64 3 роки тому

    How do you save the systemd unit file please ?!

  • @sammygun84
    @sammygun84 3 роки тому +1

    Hi man may be you will recommend some courses on Udemy where you can prepare for junior devops after working in tech support as linux system administrator ?

  • @marcschlienger973
    @marcschlienger973 3 роки тому +2

    Interesting and helpful videos. Thank you! In another video you explained that you are using Arch even on servers. And now I saw that you are recording this video on Minibuntu running inside a virtual machine on Windows. Why? Also, it would be nice to get to know your Arch setup.

    • @tutoriaLinux
      @tutoriaLinux  3 роки тому +3

      I’ve tried recording on linux machines in the past and had a terrible experience every time. It’s nice to have a separate demo VM anyway, and this way I can have it work with my Windows recording and editing setup. I run about 10 OSes at my house; I I used to be a bit more religious about my usage but have relaxed in my old age.

    • @tutoriaLinux
      @tutoriaLinux  3 роки тому +4

      Forgot to add: my arch setup is relatively minimal; lightdm + i3, mostly zsh, I used to develop exclusively in emacs; now It’s a mix of things but mostly sublime text and vscode.

    • @marcschlienger973
      @marcschlienger973 3 роки тому

      @@tutoriaLinux Thank you for answering! For me it is the opposite: I got more religious about the software I use. But after using MacOS a couple of years I try to find my way around linux. Thats why I asked about your setup.

    • @Gamer-ct6hb
      @Gamer-ct6hb Рік тому +1

      @@tutoriaLinux Are you talking in minimal as in low packages or low size? Because I'm pretty sure minimal was under 1000 lines of code. And your using Arch Linux. It uses the whole suite of systemd. Over 1 million lines of code there already. So that's just not even close to minimal.

  • @infosandfacts7536
    @infosandfacts7536 3 роки тому +10

    Please turn down the music even more. It’s just too loud :(. Otherwise nice :)

    • @mostafaali6471
      @mostafaali6471 26 днів тому

      Imo it’s not that bad or maybe I’m used to working with music in the bg

  • @alessandroruggiero8932
    @alessandroruggiero8932 3 роки тому +6

    We need more of this, seeing the little windows icons at the too broke my heart tho 💔

    • @tutoriaLinux
      @tutoriaLinux  3 роки тому +4

      I like using different OSs for different stuff! I record and game on a windows machine, work on Linux and OS X, run a variety of smaller OSs at home for fun, and manage hordes of Linux machines across the cloud. Nothing wrong with a bit of variety.

  • @cyberspace5317
    @cyberspace5317 3 роки тому

    Quality Videos 🎸

  • @prcmmd
    @prcmmd 2 роки тому

    it was really useful

  • @jindiggs
    @jindiggs Рік тому

    Legend !

  • @a_maxed_out_handle_of_30_chars
    @a_maxed_out_handle_of_30_chars 3 роки тому +1

    Thank you ;)

  • @martinc.7424
    @martinc.7424 3 роки тому

    Thanks a lot !👍

  • @krishnakant744
    @krishnakant744 3 роки тому

    Thank you 😊

  • @gregf9160
    @gregf9160 3 роки тому +2

    Hiya buddy. This was really great, but audio level was _very_ low. Still loved this, though. systemd is good at killing zombie processes and that's both a good/bad thing. I'm trad Unix, and if a process misbehaves and semaphores lots of messages it ought to get killed (and possibly restarted or rescheduled, depending on the logs). What I have found, personally, systemd is a bit too lenient (at least on servers) but works _quite well_ at managing workstation processes. I still don't like the binary loggy-thang, though.

    • @josephgreene630
      @josephgreene630 3 роки тому +1

      Audio is very good on my end.

    • @KlanVinchenzo
      @KlanVinchenzo 3 роки тому

      It still works fine for me, just volumed up a little bit. But to be fair, volume is indeed noticeably lower than other videos on this channel. That could be a problem for those watching in Linux with BT speakers, as it's a common Linux issue with a BT sounding extremely low, so you barely hear anything. For those people increasing volume to previous level would be very helpful, I assume.
      Thx for great channel. My only wish for you, if you find that appropriate, to use less tech words and descriptions while speaking, as we can see that $bash command for example on the screen and there is no need to pronounce it again and again. But instead I usually find myself lacking of a true meaning of what I see on the screen and more human kind description would be very helpful for better understanding.
      Other than that it's nearly perfect. Thank you!

  • @thegorn
    @thegorn 6 місяців тому

    Systemd is pretty sweet

  • @DanielSMatthews
    @DanielSMatthews 3 роки тому

    Please fix your console colours, dark blue on deep purple is unreadable.

  • @purvashgangolli5968
    @purvashgangolli5968 Рік тому

    Thank you

  • @ramanagudluru
    @ramanagudluru 3 роки тому

    Thank u so much

  • @uszr1
    @uszr1 3 роки тому

    Like! And thank you!

  • @moneyteam8186
    @moneyteam8186 7 місяців тому

    Why do you pronounce etc as etsy?

    • @tutoriaLinux
      @tutoriaLinux  5 місяців тому

      It's faster and easier to say, and I spend a lot of time saying it.

  • @peterSobieraj
    @peterSobieraj 2 роки тому

    I'm not sure do I like this video.
    I hate systemd.
    But I like how you explained things.

    • @tutoriaLinux
      @tutoriaLinux  Рік тому +2

      Yeah, I totally get it. I didn't write systemd, I just have to work with it :-D

    • @peterSobieraj
      @peterSobieraj Рік тому +1

      Back in good old days we had control over what our own computer was doing.
      If I wanted something to run at startup I linked it in /etc/rc5.d or /etc/rc2.d.
      If I wanted something to run in cron, I put it in cron.
      If I wanted to have specific IP I was calling ifconfig.
      Everything was so simple and beautiful.

  • @JudgeGideon823
    @JudgeGideon823 3 роки тому +1

    "Did you ever hear the tragedy of systemd? I thought not..."

  • @Gamer-ct6hb
    @Gamer-ct6hb Рік тому +1

    You know an init is bad when there's a 14 minute video explaining it. It would literally take less time to explain the lines of code of sinit (Suckless init). And you could probably make an tutorial of every program in my system that's essential to boot ubase, sbase and sinit (Not including the Linux kernel because that's way too complicated) in the same time that this video took.

    • @tourdesource
      @tourdesource Рік тому

      Looking forward to those tutorials!

  • @demolazer
    @demolazer Рік тому

    I feel like im a 1930s bar talking about systemd over a Martini

  • @canerhacan
    @canerhacan Рік тому

    Sound is poor :(

  • @AntonioEating
    @AntonioEating 2 роки тому

    It is not guaranteed the PID of Init is 1. This is misleading information...

    • @tutoriaLinux
      @tutoriaLinux  Рік тому

      In what situations is init not PID1? Please elaborate.
      The only thing I can think of is inside a single-process docker container (running without any init process at all), the ENTRYPOINT's process would be PID1. However it's not really PID1, it only looks that way inside the container environment's process namespace (the container's PID1 would be mapped to a random high PID in the host environment).

  • @littlefrank90
    @littlefrank90 2 роки тому

    The forking part you did not explain very well. The rest is very clear, thank you!

  • @MrSandshadow
    @MrSandshadow 3 роки тому +5

    You call yourself a prefessional yet you quit vim using `:wq` instead of `:x` waisting this precious one clic!? That is just disgraceful, Sir!

    • @cuszco
      @cuszco 3 роки тому +1

      Why waste an enter on `:x` when `ZZ` does the job just fine? ;)

    • @JohannSuarez
      @JohannSuarez 3 роки тому

      I didn't know about this. Thank you!

  • @RaijaKaisaniemi-xi6bm
    @RaijaKaisaniemi-xi6bm Рік тому

    Ja noi varkaan,ahneen algoritmit voit työntää vaikka hanuriis!

  • @peepeehammer
    @peepeehammer 2 роки тому

    nice jazz

  • @_thehunter_
    @_thehunter_ 2 роки тому

    your mic sucks.. very very low volume

  • @rateater420
    @rateater420 2 роки тому

    systemd-bloatd

  • @pacman7168
    @pacman7168 Рік тому

    systemd is the worst created init

  • @BryanChance
    @BryanChance 2 роки тому

    Nooooooooooooo!!!

  • @koolade76
    @koolade76 2 роки тому

    I am trying to get something to run as a service but keep messing it up.
    Start the process with package-name but that's under my users context.
    Not alway great as the process regularly goes to sleep and dies.
    So I tried making myservice.sh in /usr/local/bin where the package is
    with:
    #!/bin/sh
    package-name
    then a unit file in /etc/systemd/system/ as myservice.service
    [Unit]
    After=network.target
    [Service]
    User=myuser
    Group=groupmyuserisin
    ExecStart=/usr/local/bin/myservice.sh
    [Install]
    WantedBy=default.target
    sytemctl daemon-reload
    It won't start log file comes back with permission denied failed to locate excutable of .sh file.
    Not sure what I am doing wrong. 😕