cannot start systemd

Issues related to applications and software problems
Post Reply
LMHmedchem
Posts: 53
Joined: 2011/03/22 17:32:25
Location: Boston

cannot start systemd

Post by LMHmedchem » 2023/03/14 17:56:17

Hello,

I have been trying to configure the services running on this CentOS 7.7 installation but I cannot start systemd.

When I try to run systemd from the command line I get the message: bash: systemd: command not found...

This would explain of course why I can't start it but when I tried to install systemd I got an error from YumExt that systemd could not be stopped as it was protected. This would imply that it is installed an running. Systemd appears in YumExt under the installed tab.

It doesn't matter if I run with sudo or not I still get the command not found message. The man pages are there as I can run man systemd and get the expected output.

How do I confirm if systemd is installed and how to start it?

LMHmedchem

User avatar
jlehtone
Posts: 4512
Joined: 2007/12/11 08:17:33
Location: Finland

Re: cannot start systemd

Post by jlehtone » 2023/03/14 18:56:08

You most likely do have systemd already running.
It is after all the very first process that kernel starts ...

Code: Select all

ps axfu | grep [s]ystem
You want to configure a service?
Perhaps enable it so that it starts on boot?

Code: Select all

systemctl enable mysrv.service

LMHmedchem
Posts: 53
Joined: 2011/03/22 17:32:25
Location: Boston

Re: cannot start systemd

Post by LMHmedchem » 2023/03/15 17:22:09

jlehtone wrote:
2023/03/14 18:56:08
You most likely do have systemd already running.
It is after all the very first process that kernel starts ...
Yes it does look like it is running.

Code: Select all

[user@localhost ~]$ ps axfu | grep [s]ystem
root         1  0.0  0.0 128924  7600 ?        Ss   09:58   0:03 /usr/lib/systemd/systemd --switched-root
Why do I get nothing when I run which systemd? I guess /usr/lib isn't in the default path?
Why do I get command not found when I run systemd --version?
jlehtone wrote:
2023/03/14 18:56:08
You want to configure a service?
Perhaps enable it so that it starts on boot?
I am trying to get a handle on the seemingly idiotic number of services and processes that are running on this system. This boots to hundreds of processes, most of which are not used and never will be used. I can't imagine why all of these processes are installed and running by default.

At any rate, it seems that on CentOS services can only be managed through the command line and it seems like systemd is the correct tool. Is that not correct? I have printed out allot of information about installed services using systemctl but I thought that enable/disable/uninstall and such were done using systemd.

LMHmedchem

User avatar
jlehtone
Posts: 4512
Joined: 2007/12/11 08:17:33
Location: Finland

Re: cannot start systemd

Post by jlehtone » 2023/03/15 17:48:15

LMHmedchem wrote:
2023/03/15 17:22:09
At any rate, it seems that on CentOS services can only be managed through the command line and it seems like systemd is the correct tool. Is that not correct? I have printed out allot of information about installed services using systemctl but I thought that enable/disable/uninstall and such were done using systemd.
No. Systemd is the machinery -- a service -- that handles many things. systemctl is the thing you use to talk to systemd.

Code: Select all

systemctl enable httpd
systemctl disable httpd
systemctl start httpd
systemctl restart httpd
systemctl stop httpd
systemctl status httpd

A very long time ago I got root access to Linux machine. It had "many" services. Maybe a dozen or two.
I disabled almost all of them. Guess what? Nothing did work after that. Don't mess with the default services.
It is no different in other systems; MS Windows has "idiotic" number of services too.

Do read: https://access.redhat.com/documentation ... th_systemd

Post Reply