Skip to content

Instantly share code, notes, and snippets.

@zspine
Last active Aug 1, 2018
Embed
What would you like to do?
#restart
sudo reboot
#shutdown
sudo poweroff
#copy from local to remote server
#scp target file user@ip-address destination
scp /home/migration/backup/example.txt root@1.1.1.1:/var/www/vhosts/example.com/backup
#extract tar.gz
tar -xvzf example.tar.gz
#extract .gz
gunzip -k example.gz
#apache version check
/usr/sbin/apache2 -v
#apache restart
sudo service apache2 restart
#restart mysql in case of failure
#sudo reboot
sudo service mysql stop
sudo service mysql start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment