Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I do some group permission changes on the CentOS server, And then need restart all services. How can I restart all services safely without rebooting?

share|improve this question

3 Answers 3

You could switch to single user mode as SHW suggested and then back again. But for CentOS server you should do it this way:

init 1; init 3

Since the first command will disable your network, you should pass the second one on the same line. Otherwise you will not be able to connect to your server using SSH.

share|improve this answer
2  
To really restart ALL services, you had to go a bit further (ie udev, cpuspeed and some others are is still up at init 1). But in Mohammad Etemaddar case it might be enough. –  Ouki Apr 8 at 7:21

Simply execute these two commands:

  1. init 1
  2. init 5

Init 1 will bring your computer to single user mode, where minimal services are running, and init 5 will being the system back to GUI mode, by restarting all the services

share|improve this answer

To reload or restart network:

sudo service network restart or sudo /etc/init.d/network restart

To start networking service:

sudo service network start

share|improve this answer
1  
Consider, It's not only networking service! –  Mohammad Etemaddar Apr 8 at 7:03
1  
and has nothing to do with Windows. –  Ouki Apr 8 at 7:14
    
@Ouki I edited my answer; however, questions are not supposed to be specific to one persons situation. If the answer comes easy enough to cover multiple situations (OS's) then it is simply more thorough. Agreed? –  les Apr 8 at 8:09
    
@les I agree that answer need to be a bit broader than the questions, but you should at least answer to it. Your answer was only about network restart and it involved Windows as well ... totally out of the scope –  Ouki Apr 8 at 8:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.