By rayjamessaas
fresh ubuntu 18.04 build created new user and switched to that user installed apache2, php, mysql, essentials using sudo apt-get
Works: sudo /etc/init.d/apache2 restart sudo systemctl status apache2
Does not Work: sudo systemctl restart apache2 after I hit enter nothing is executed, just another standard line(user@server:~$)
Please advise. Thanks.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hello,
It is normal for the systemctl command not to provide you with any output after executing a restart command.
To check if the restart was successful, what you could do is run:
echo $?
This would provide you with the exit code of the previous command. If you get a 0 it means that it was successful, if you get 1 then something is wrong and you need to run the systemctl status command to get some more information.
Hope that this helps! Regards, Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.