Useful Linux Commands

I recently had to move a server and needed to set up another server. I’m a linux newbie so I needed to look up a lot of things. Below are some of the more common commands that I needed: (replace with your own command/name).

Create a short name or alias to run a command.

alias =''


Create a symbolic link to another directory/file

ln -s


Transfer files from your computer to a server

scp  :


Transfer files from a server to another server.

scp : :


Change file owner w/ recursion

chown -R :


Change file permissions for web w/ recursion

chmod -R 644 


Find a file

find / -name


Add a user

sudo useradd -d /home/ -m 
sudo passwd 


Change a users’ primary group

usermod -g  


Add a group



Add a user to a group

usermod -G  


Make everything in a dir owned by the dir group owner

sudo chmod g+s 
Tagged with: ,

Leave a Reply

Your email address will not be published. Required fields are marked *