LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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, 01: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, 01:59 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,152

Rep: Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125
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, 02:56 AM   #3
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 2,832

Rep: Reputation: 1218Reputation: 1218Reputation: 1218Reputation: 1218Reputation: 1218Reputation: 1218Reputation: 1218Reputation: 1218Reputation: 1218
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, 03:31 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,152

Rep: Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125
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, 01:33 PM   #5
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
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, 01:56 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,783

Rep: Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936
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, 04:51 PM   #7
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 2,832

Rep: Reputation: 1218Reputation: 1218Reputation: 1218Reputation: 1218Reputation: 1218Reputation: 1218Reputation: 1218Reputation: 1218Reputation: 1218
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, 04:53 PM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,152

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


Reply



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 12:20 PM
systemctl restart network FAILED Joseph2016 Linux - Newbie 8 07-17-2016 05:08 AM
Systemctl command error gowlet CentOS 3 06-06-2016 04:13 AM
Systemctl command error gowlet Fedora 2 06-05-2016 11:04 AM

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

All times are GMT -5. The time now is 10:16 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
Open Source Consulting | Domain Registration