I have a confession: my memory sucks. Especially with the wedding right around the corner, it’s even worse. There are a bunch of random SSH commands that I don’t use all that often (even less with Docker now). Just wanted an area for copy and pasting. I’m sure eventually that I’ll add all the docker commands too.
sudo service apache2 restart apachectl configtest sudo a2ensite <conf file> nano /var/log/apache2/error.log /etc/apache2/sites-available sudo apachectl -S # View all enabled sites. # Nano nano +10 file.txt # Jump to line 10 in file Ctrl+_ # In Nano line jump. # To axe a process kill -9 <id> # To open the current folder from Terminal in Finder xdg-open . # SCP to a remote system scp <folder or file to upload> <user>@<host>:<folder where it's going>
# SSH mysql dump from remote server.
mysqldump --column-statistics=0 -h <IP> -u <user> -p <db name> > <where to place dump>.sql
# Zip folder
zip -r <name>.zip folder_to_zip/