Command line cheat sheet: Revision

Last updated by Juho Jaakkola

Bacic commands for Linux command line

cd = change directory
Without arguments it goes to your home directory:

cd

So it's the same as:

cd /home/username

List the contents of the current directory:

ls

Same list with more details:

ls -l

Getting Elgg from git:

Go under the wwwroot (the location may vary depending on your server):

cd /home/username/public_html/

Then clone Elgg from Github:

git clone https://github.com/Elgg/Elgg.git

Go inside the cloned directory:

cd Elgg

See which git local branch you're on:

git branch

List also the remote (Github) branches:

git branch -a

Checkout a new branch from Github:

git checkout -b 1.x origin/1.x

git branch now gives an updated listing:

git branch

History