USEFUL COMMANDS

A continuously updated page of commands to help get around the different software and tools.


Command line


COMMAND Description
Cd Change directory
Mkdir [dir] Make directory
Ls [-al] List contents of directory [include hidden]
Sudo [commands etc] Gives Admin permissions to commands if they require them.
Cat [file name] Outputs content of file.
Rm [file name] Remove [file name] (delete).
cp [source] [destination] Copy [file source/name] to [new destination/file name]
Mv [source] [destination] Move [file source/name] to [new destination]

Git


COMMAND Description
git init Initialise a repo
git add [.] or [filename] Add NEW files to be tracked by repo. [all inside the folder] or [single file]. ONLY need to be added once in their lifetime.
git commit [-m “description”] Finalise the changes to the staging queue. [add a title to commit]
git push Push commit changes queue from local.
git pull Pull files from repo.
git status Check status of changes and repo at any time.
git config –list *See values in config file. *
git restore [filename] Restore older version of file.
git clone [git path] Clone repo.

SSH


COMMAND Description
Ssh-keygen -t rsa -C “[filename]” Make a SSh rsa key pair.
Cat ~/.ssh/[filename].pub read ssh key public key.

HUGO (Static Site Generator)


COMMAND Description
hugo serve Start local server
git clone path-to-git-repo.git Import a theme