LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-11-2017, 02:20 AM   #1
cjosephl
LQ Newbie
 
Registered: Nov 2017
Posts: 2

Rep: Reputation: Disabled
Restart systemctl*daemon​ - systemctl command not found


Hi all,

I'm running CentOS 6.8. I'm trying to run this command sudo systemctl daemon-reload but my system doesn't know systemctl.

Can you help me restart daemon in another way?

Thank you,
CJ
 
Old 11-11-2017, 02:59 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 17,237

Rep: Reputation: 2636Reputation: 2636Reputation: 2636Reputation: 2636Reputation: 2636Reputation: 2636Reputation: 2636Reputation: 2636Reputation: 2636Reputation: 2636Reputation: 2636
You need to make sure you are reading the appropriate documentation - systemd, which provides systemctl, wasn't introduced until CentOS 7.
The CentOS website should have pointers to the equivalent RHEL documentation - which is excellent.
 
Old 11-11-2017, 03:56 AM   #3
MadeInGermany
Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 953

Rep: Reputation: 417Reputation: 417Reputation: 417Reputation: 417Reputation: 417
Use the service command
Code:
service status ...
service reload ...
Not all services take reload, then do a restart (or stop and start)
Code:
service restart ...
The service command is the common frontend in Linux, it translates to SysV, systemd, upstart, ...
 
Old 11-11-2017, 04:31 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 17,237

Rep: Reputation: 2636Reputation: 2636Reputation: 2636Reputation: 2636Reputation: 2636Reputation: 2636Reputation: 2636Reputation: 2636Reputation: 2636Reputation: 2636Reputation: 2636
Maybe not for native systemd services. I get the following on Fedora.
Code:
service status NetworkManager
The service command supports only basic LSB actions (start, stop, restart, try-restart, reload, force-reload, status). For other actions, please try to use systemctl.
Been years since I used service command.
 
Old 11-11-2017, 02:33 PM   #5
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,511

Rep: Reputation: 1000Reputation: 1000Reputation: 1000Reputation: 1000Reputation: 1000Reputation: 1000Reputation: 1000Reputation: 1000
Service doesn't have the status command. The service command will only run one of the cases in the init scripts. Most scripts have start, stop, restart.
 
Old 11-11-2017, 02:56 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 17,826

Rep: Reputation: 2401Reputation: 2401Reputation: 2401Reputation: 2401Reputation: 2401Reputation: 2401Reputation: 2401Reputation: 2401Reputation: 2401Reputation: 2401Reputation: 2401
The syntax for the service command is opposite of systemctl i.e.

Code:
service daemon_name restart
As stated the invoked parameters (i.e. start stop etc) depend on the actual init script.
 
2 members found this post helpful.
Old 11-11-2017, 05:51 PM   #7
MadeInGermany
Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 953

Rep: Reputation: 417Reputation: 417Reputation: 417Reputation: 417Reputation: 417
Quote:
Originally Posted by michaelk View Post
The syntax for the service command is opposite of systemctl i.e.

Code:
service daemon_name restart
As stated the invoked parameters (i.e. start stop etc) depend on the actual init script.
Of course! I put the order wrongly
 
Old 11-11-2017, 05:53 PM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 17,237

Rep: Reputation: 2636Reputation: 2636Reputation: 2636Reputation: 2636Reputation: 2636Reputation: 2636Reputation: 2636Reputation: 2636Reputation: 2636Reputation: 2636Reputation: 2636
D'oh - like I said, been a while.
And yes,it does work. My apologies.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
systemctl start,enable service in one command. gctaylor1 Fedora 5 11-24-2018 01:20 PM
systemctl restart network FAILED Joseph2016 Linux - Newbie 8 07-17-2016 06:08 AM
Systemctl command error gowlet CentOS 3 06-06-2016 05:13 AM
Systemctl command error gowlet Fedora 2 06-05-2016 12:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration