Handy linux comands that you can use from command line

You are here

Here is a list of commands the help managed your Linux machine from day to day

Find and kill a linux process from the command line

Need to remove a software process that will not go away. You might need to do it more that once,

ps aux | grep <programs name(eg firefox)> | awk 'NR==1 {print $2}'
kill -9 <number that was printed>

Setup your public ssh key so you can auto login into a server

So pipes your local public ~/.ssh/id_rsa.pub andĀ It copies the public key to the remote serverĀ 

cat ~/.ssh/<id_rsa or other public key>.pub | ssh <username>@<ip or domain> "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"

Rsync from a server

When you need to copy files from server Rsync is what you neeed

rsync -azv <username>@<ip or domain>:/path/on/server/that/needs/copying  /path/on/local/machine
rsync -azv /path/on/local/machine/that/needs/coping <username>@<ip or domain>:/path/on/server