# check the status of the web server i.e apache2
sudo systemctl status apache2
# restart the service
sudo systemctl restart apache2
# return network-related information using a combination of flags along with the netstat command to check which process is using a particular port
sudo netstat -nlp
# find python3 programs running
ps -ax | grep python3
# kill a process by its process ID (PID)
sudo kill [process-id]
# let's check for the availability of any service with the keywords "python" or "jimmy"
sudo systemctl --type=service | grep jimmy
# stop and disable a service using
sudo systemctl stop _servicename_ && sudo systemctl disable _servicename_
# ssh-copy-id takes care of adding your key in the right place
ssh-copy-id -i "firstname.lastname@example.org -p2222"
# If you don't use -i all of your public keys will be copied over.
# Also a alias for the host can be used if configured in your ssh config.
# You will be asked for the password and after that all should be taken care of.