Linux - Start, Stop, Restart Services (Systemd, systemctl, service, init.d )
HTML-код
- Опубликовано: 13 сен 2019
- Find code and diagrams at: www.EliTheComputerGuy.com
There are 3 ways to manage services on Ubuntu Linux. Systemd is considered the “right” way as of now, but using the service command and init.d scripts still work.
When. you make changes to configuration files for services such as Apache, UFW or SQUID those changes will not become active until you restart the service.
Systemd
sudo systemctl status - shows status of all services on server
sudo systemctl status apache2 - shows status of specific service
sudo systemctl start/restart/stop apache2 - start/stop restart service
Service
sudo service -status-all | less - shows status of services and allows you to scroll through results.
sudo service apache2 status/start/stop/restart - to manage services
Init.d (Depricated, but works)
sudo /etc/init.d/apache2 status/start/restart/stop - to manage services - Наука
This is gold! I love how you explain the 3 ways to do something. I think this is super important for noobs like me. Thanks for taking the time in explaining everything, and doing pretty well.
You and your channel is the Video Reference for the History of linux. I have been with your channel since 2010s/11s.
Ive watched pretty much all his more recent series (Networking, Linux, Mysql, Cloud, Programming) they are literal gold mine of information. Not only he's super clear but I especially love the way he tells you things you have to watch out for in the real world when introducing a subject or feature and how he sometimes adds historical context telling you how something has come to be for the thing he's explaining.
I like the map on your wall - nice ^^
Thank you for sharing your knowledge. Your teaching style is very convenient to understand.
Also remember the enable and disable options. These will enable/disable a service to start at computer/VM startup.
service apache2 enable
systemctl enable apache2
I wanted to say the same thing.
this is very important
That was perfect! Exactly what I was looking for!
Does it make it a difference whether you use foo.service or foo as an argument to systemctl status [service] ?
I miss the services menu that gnome-system-tools used to contain for administrators. Now with Debian 10 Buster it is gone. Wish I could find a substitute with a gui .
bro I was about to skip your video because the audio is low, but your content kept me back
How do you restart a service when if fails with a message "Start request repeated too quickly"? I'm certain that the related config file of the service has no problems. It's just that the service crashed due to starting and stopping it too quickly.
Love your lessons ....thank you !!!!
I am trying to understand what signals are sent when I do systemctl restart, stop, start service
Louis Rossmann brought me here!
Same. I have watched Eli's videos in the past. These two have years of beef between each other. There must be some level of respect between them as well, or who cares what the other says. There seems to be some sort of ego issues being tripped. The verbal blows, watching from the outside, have the vibe of teenagers with a bit of knowledge and their feelings get hurt. I enjoy both of them otherwise. They both share some traits. Both share info for the effort of empowering others. I will say that Eli does come off just a little bit authoritarian though. Louis comes off a little too much laissez faire to me. I would like to notice their perspectives as valid, yet maybe a bit excessive at times.
yes, but i think it will backfire to Louis - I had never heard of Eli, but I think his channel is interesting. I will subscribe here now too XD - sorry Louis.
Only difference is that Eli is not interesting at all sooooo boring!
As of today, init is still alive.
For those who want init freedom, check out Devuan which is a fork of debian. I like the old way, so I parted from debian to Devuan. We also have Slackware for the purist. Dont be a sheep and get intimidated by the blinking curser.
I have a systemd install on my 2nd hdd - Arch which is very flexible but has a learning curve.
I use Artix btw
my ubuntu computer auto start version 18.04.2 LTS,how solve this problem please guidance
Thanks for this lesson on Linux commands.✌😄
hey eil is it possible to install a GPS system into sheep? thanks
revealMe you can install anything into sheep as long as it is alive and well. But for this like this, donkeys are a better investment.
i was just concerned for this gentlosman, they seem to have trouble with sheep disappear so i thought to ask eil for help ! ruclips.net/video/jsUvcjk8J5c/видео.html
If your sheep is debian based then try
sudo apt install libgps-dev libsheep-dev shepple
sudo modprobe gps
sudo systemctl start sheeptracker
or better yet if u have docker running that do
docker run -d -p 80:80 sheeple:track
These are the videos I support! I let the ads run. This is why you are needed. Thank you.
how do you save and exit a edited file when you use systemctl edit
But what if a service is failed and we want to make it run ??
systemctl enable httpd
Cannot send after transport endpoint shutdown
Acually in M$ word you have different options to manage services as well. Cpanel, Net start/stop, sc, Powershell...
Thanks for explaining the 3 different ways.... Do you have a guide on how to setup a Systemd Unit on a Linux distro (antiX) without Systemd? How do I convert a service unit file into a script that would work when I type "service appname start"? Thanks in advance.
Great info!
I always thought that services in a Linux world are called daemons. Is it true? Is that name deprecated? Or is there a difference between daemons and services?
why r ur videos so silent on my computer? When I use VLC to play the yt video and turn the volume to 150% its ok
thanks for the videos
one thing is the audio is low try to fix that please !
sudo: service: command not found
Soooo Eli. Why did you remove the video where you were bashing Louis Rossmann??
go to the elicomputerguylive channel... the video was never meant to stay up here, it was simply a notice to my followers that the Daily Blob was coming back...
@@elithecomputerguy Ahh i was hoping you realized how stupid it was. Guess i was wrong
Hey your background map great do you have any link😅
"On Windows there is only one way to do things". Uh, nope. How about "sc", or good ol' "net"? Aside from services.msc... While it all interacts with the same Service Control Manager in the end, you definitely have multiple ways of controlling services in NT-based systems as well.
Where did your Louis rant go? I came back to laugh at it again and its gone!
Bill Codey boi it’s not even on this channel
Déjà vu. 🤔
Dady, the sound quality is a bit off. However, شكرا يا صاح for the effort that you putting.
Thanks for this fun series, enjoying the Proper Eli charisma!
10:55 😎😎 lines4-20 😎😎
why are there 109 dislikes?
Maybe because he shows Linux in a small Virtualbox Window? Big font is fine for Demos, but why not fullscreen or did I miss the explanation?
And systemctl status doesn't need sudo. And service --status-all neither.
salvatore aranzulla of the US
SystemD is THE PROPER WAY to eat up some ram for no reason.
see more on Windows
www.windows-commandline.com/start-stop-service-command-line/
Thanks Eli!
"StaaAaahp"
Bad sound
Just fired up the video. What's with the dislikes?
very long video with such little information. this can be done by 2 minutes video...
Just use windows and you will be fine
yeah, slow bloated windows servers are definitely superior to linux servers :/
Great.
I don't get why Louis is giving attention to this channel. I mean sure both channels have similar amount of subscribers but this one is mostly niche content for Linux users nowadays so why even compare.
I dislike for your audio quality