1. Tubelator AI
  2. >
  3. Videos
  4. >
  5. Science & Technology
  6. >
  7. systemd on Linux 1: Intro and Unit Files

systemd on Linux 1: Intro and Unit Files

Available In Following Subtitles
English
Variant 1
Turkish
Variant 1
Posted on:
Video by: tutoriaLinux
The first video in the systemd series, covering the basics of Linux init and systemd, including how to create systemd unit files for services. 0:00 Introduction 0:51 What is init in Linux? 1:45 SysV init 2:40 systemd's Components and Responsibilities 3:22 systemd Unit Types 4:52 Unit file locations 6:24 How to write a simple unit file 8:02 systemctl daemon-reload 8:56 deep dive on nginx unit file https://www.freedesktop.org/software/systemd/man/systemd.html Project-based Linux course for beginners: https://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): https://www.linode.com/tutorialinux tutorialinux Merch: https://www.youtube.com/channel/UCvA_wgsX6eFAOXI8Rbg_WiQ/store Free Linux Sysadmin Course Playlist: https://www.youtube.com/playlist?list=PLtK75qxsQaMLZSo7KL-PmiRarU7hrpnwK Patreon: https://www.patreon.com/tutorialinux Official Site & e-mail list: https://tutorialinux.com/ Twitter: https://twitter.com/tutorialinux Facebook: https://www.facebook.com/tutorialinux Podcast: http://kernelpanicpodcast.com
tubelator logo

Instantly generate YouTube summary, transcript and subtitles!

chrome-icon Install Tubelator On Chrome

Video Summary & Chapters

No chapters for this video generated yet.

Video Transcript

0:01
What's going on everyone?
0:02
In this video, I'm gonna cover kind of the basics
0:05
that you need to know about SystemD,
0:07
both theoretically and practically,
0:09
like how you're going to be interacting with SystemD
0:13
when it is your system's init process.
0:17
Firstly, what is init?
0:19
I'm just very quickly gonna cover that.
0:22
We're gonna talk about how SystemD kind of works,
0:25
the main ideas that you need to know to work with SystemD.
0:29
We're gonna cover units.
0:30
We're going to cover system CTL, we're going to cover system D targets, and we're going
0:35
to cover kind of the relationships between different system D units, what you might think
0:39
of as services.
0:40
right now, and how systemd handles dependencies and execution order.
0:45
You're also going to get all the ingredients that you need to like make a service in systemd and
0:50
manage it. So long story short, init is a special process that is started by the kernel. It's a
0:56
special process because it's the first process that really gets started by the kernel during
1:00
boot. The process id or pid is one, and it's a process that not only is it responsible for kind
1:07
of booting the rest of the system and getting the system to a state where
1:11
things are working, people can log in, etc. But in addition to starting services
1:16
and getting the system there, it's also a long-running process that kind of has
1:21
some power over other processes. For example, when a process is orphaned
1:26
because its parent process dies, it is reparented under init. So it's kind of
1:32
the ultimate mommy on the system.
1:34
It takes care of orphans, it kills zombie processes.
1:38
It's kind of responsible for process stuff
1:40
that can go wrong during the normal operation of a system.
1:46
Init used to be a series of plain text scripts,
1:50
essentially in ETC or Etsy init.d.
1:55
That's what's known as sys5 style init,
1:57
or you might see it written as sysv style init.
2:01
That's kind of the older Unix way of doing it.
2:03
You have a bunch of plain text scripts that get run essentially in order the user can
2:08
kind of munge that order around.
2:11
But long story short, there were some drawbacks to that and SystemD has kind of replaced how
2:17
that works in Linux.
2:20
It is not a Unix init system.
2:24
It is at this point purely in Linux.
2:27
So really when you think of Systemd, you think it's in it, but it also kind of handles all system state and service stuff during boot and then during the time that that system is up and running.
2:40
What is Systemd? It's really a collection of programs and libraries. It's not even just one binary.
2:45
You have the systemctl commands for interacting with it. You have journalctl. You have a bunch of tooling around that.
2:53
In fact, it does so much more than it. It's sort of an agglomeration of process
2:59
management, network management through NetworkD, logins through LoginD, and
3:05
logs that your services then emit through JournalD, and those are no longer
3:09
plain text logs. They're binary files, which has some advantages and
3:14
some disadvantages. So it's a bunch of stuff, and that's what you have to know
3:19
about SystemD before you actually start using it. SystemD units. What is a
3:26
SystemD unit? Well a unit is really what you might have called a service before
3:31
on an older style of init. A unit is any entity managed by SystemD and

Video Summary & Chapters

No chapters for this video generated yet.

Video Transcript

0:01
Herkesin başına ne oluyor?
0:02
Bu videoda, ben bir tür temelleri kapsayacağım
0:05
SystemD Hakkında Bilmeniz Gerekenler,
0:07
Hem teorik hem de pratik olarak,
0:09
SystemD ile nasıl etkileşim kuracağınız gibi
0:13
sisteminizin init işlemidir.
0:17
Öncelikle init nedir?
0:19
Bunu çok çabuk kaplayacağım.
0:22
Sistemin nasıl çalıştığı hakkında konuşacağız,
0:25
SystemD ile çalışmak için bilmeniz gereken temel fikirler.
0:29
Birimleri kapsayacağız.
0:30
Sistem CTL'yi kapsayacağız, sistem D hedeflerini kapsayacağız ve gideceğiz
0:35
Farklı sistem D üniteleri arasındaki ilişkilerin türünü kapsamak için, ne düşünebilirsiniz
0:39
veya hizmetler olarak.
0:40
Şu anda, ve sistemd bağımlılıkları ve uygulama emri nasıl ele alır.
0:45
Ayrıca sistemd'de bir hizmet yapmak için sevdiğiniz tüm malzemeleri alacaksınız ve
0:50
bu kadar uzun hikaye kısa, init çekirdek tarafından başlatılan özel bir süreçtir.
0:56
özel bir süreç çünkü çekirdek tarafından gerçekten başlatılan ilk süreçtir.
1:00
başlatma. işlem id veya pid birdir ve sadece türden sorumlu olmayan bir süreçtir
1:07
Sistemin geri kalanını başlatmak ve sistemin bir durumuna getirmek için
1:11
işler çalışıyor, insanlar oturum açabilir vb. Ama hizmetleri başlatmak için ek olarak
1:16
ve orada sistem almak, aynı zamanda bu tür bir uzun süren bir süreçtir
1:21
Diğer süreçler üzerinde bazı güçler. Örneğin, bir süreç yetim olduğunda
1:26
çünkü ebeveyn süreci ölür, init altında yeniden düzenlenir.
1:32
Sistemin en son anahtarı.
1:34
Yetimlere bakıyor, zombi süreçlerini öldürüyor.
1:38
İşletme konularından sorumlu bir tür
1:40
Bu bir sistemin normal çalışması sırasında yanlış olabilir.
1:46
Init, basit metin yazıları bir dizi olarak kullanılmıştır,
1:50
Temel olarak ETC veya Etsy init.d.
1:55
Sys5 tarzı init olarak bilinen bu,
1:57
Ya da sysv tarzı init olarak yazılmış olduğunu görebilirsiniz.
2:01
Bunu yapmanın eski bir Unix yöntemidir.
2:03
Basit metin senaryoyu bir sürü var
2:05
Kullanıcı için önemli ölçüde çalıştırılabilir
2:08
Çevresinde böyle bir sipariş verebilirsin.
2:11
Ama uzun bir hikaye kısa, bu konuda bazı dezavantajlar vardı.
2:14
Ve SystemD bunun nasıl çalıştığını bir çeşit değiştiriyor.
2:19
Linux'ta, bu bir Unix init sistemi değildir.
2:24
Bu noktada sadece Linux'ta.
2:27
Gerçekten SystemD'yi düşünüyorsanız,
2:29
içinde olduğunu düşünün ama aynı zamanda tüm sistem durumunu ve hizmetleri bir tür ele alır
2:34
Boot sırasında ve daha sonra o sistem yükseldi ve çalıştığı zaman içinde.
2:40
Sistemd nedir? Gerçekten programlar ve kütüphaneler bir koleksiyonudur.
2:44
sadece bir ikili. sen ile etkileşim için systemctl komutları var, sen
2:49
journalctl var, etrafında bir sürü araç var. Aslında bunu yapar
2:55
çok daha fazlası bir süreç yönetimi bir tür agglomeration,
3:00
NetworkD aracılığıyla ağ yönetimi, LoginD aracılığıyla oturumlar ve
3:06
Hizmetleriniz daha sonra JournalD aracılığıyla yayınlanır ve bunlar artık basit metin değildir.
3:10
günlükleri, bazı avantajları ve bazıları olan ikili dosyalarıdır
shape-icon

Download extension to view full transcript.

chrome-icon Install Tubelator On Chrome

YouTube First AI Assistant

chrome-icon Install On Chrome

AI Art For This Video No image generated for this video yet but here is the example.

ai art
0:09
Prompt
spider man in aladdin style, bright colors, hyper quality, high detail, high resolution, --video --s 750 --v 6. 0 --ar 1:2
ai images

Explore more in Science & Technology