Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

restart linux web server using ssh [closed]

Tags:

linux

ubuntu

I have shut down my linux web server using ssh command

  ~# shutdown -h now

how can i restart the server again. i am trying out different things but they are not helping. How to restart using ssh.

like image 215
Muhammad Umar Avatar asked Oct 22 '11 09:10

Muhammad Umar


2 Answers

reboot

or if you want to restart just apache then

/etc/init.d/apache2 restart

and if you want to shutdown then instead of shutdown -h now you can simply use poweroff

like image 128
kubal5003 Avatar answered Nov 26 '22 09:11

kubal5003


You have powered off the machine, you can't restart it from SSH. unless it supports Wake from Lan.

If you want to only restart your web server use

apachectl restart

like image 37
Nasreddine Avatar answered Nov 26 '22 10:11

Nasreddine