28
Unix Commands for the Everyday Web Developer Jim Reevior Everyday Web Developer

The Unix Command Line | Jim Reevior

Embed Size (px)

DESCRIPTION

Learn Unix commands for everyday web development. Given at Jim's Lunch&Learn on January 21st, 2014.

Citation preview

Page 1: The Unix Command Line | Jim Reevior

Unix Commands for the Everyday Web Developer

Jim ReeviorEveryday Web Developer

Page 2: The Unix Command Line | Jim Reevior

Some Ground Rules

I am not an expert.These are the commands I use on a daily basis and have the most understanding. There are tons more commands out there.

Page 3: The Unix Command Line | Jim Reevior

What I'm going to cover

● Getting around● Getting elevated● Getting stuff● Getting info● Getting creative

Page 4: The Unix Command Line | Jim Reevior

Getting Around

Page 5: The Unix Command Line | Jim Reevior

cdcd ➟ Go to Home folder

Page 6: The Unix Command Line | Jim Reevior

ls

Page 8: The Unix Command Line | Jim Reevior

chmod & chown

chown user:group file (or directory)

Page 9: The Unix Command Line | Jim Reevior

ln

Page 10: The Unix Command Line | Jim Reevior

sshssh gets you to a remote server securely.the command line gets fun when you get to mess with another machine

Page 11: The Unix Command Line | Jim Reevior

Couple other ssh related commands:ssh-keygen ➟ Create a private and public key for connecting to a remote server without a password

ssh-copy-id ➟ Copy a public key to a remote server.

ssh config file

The config file allows for easier ssh connections. Especially if there is a unique port or different key file Host *

IdentitiesOnly yesIdentityFile /Users/jreevior/.

ssh/xander

Host sta.oomphcloudHostname sta.oomphcloud.comPort 22User jreevior

Page 12: The Unix Command Line | Jim Reevior

screen

● Creates a terminal within the terminal.● It allows a remote session to continue running even if the terminal is disconnected.● Multiple "screens" can be created.

Page 13: The Unix Command Line | Jim Reevior

Getting elevated

Page 14: The Unix Command Line | Jim Reevior

sudo

Page 15: The Unix Command Line | Jim Reevior

Getting Stuff...

Page 16: The Unix Command Line | Jim Reevior

mysql

Page 17: The Unix Command Line | Jim Reevior

mysqldump

Page 18: The Unix Command Line | Jim Reevior

tar

Page 19: The Unix Command Line | Jim Reevior

...from here to there

Page 20: The Unix Command Line | Jim Reevior

cp

Page 21: The Unix Command Line | Jim Reevior

mv

Page 22: The Unix Command Line | Jim Reevior

rm

Page 23: The Unix Command Line | Jim Reevior

scp

Page 24: The Unix Command Line | Jim Reevior

Getting info

Page 25: The Unix Command Line | Jim Reevior

du

Page 26: The Unix Command Line | Jim Reevior

df

Page 27: The Unix Command Line | Jim Reevior

more and less

Page 28: The Unix Command Line | Jim Reevior

Getting creative

vim: http://www.openvim.com/tutorial.htmlbashrc screenrcvimrcbash scripting

http://explainshell.com/