Quick Reference

This page collects commands we have (or will) discuss throughout the course. Click on a command for more details on its operation and some examples of common or useful operations. We encourage students to contribute to this page through the advanced homework on git and open source contributions.

Basics

alias

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

bg

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

cat

cat is a command that concatenates files and prints the concatenated files to the standard output.

$ echo "This is an:" > beginning.txt
$ echo "example" > end.txt
$ cat beginning.txt end.txt
This is an:
example

cd

cd is used to change directory. Unlike most commands, cd is not a separate program, it is a shell built-in. cd is a useful tool to navigate up and down the hierarchy of the file systems on your machine, and move into a given directory.

$ cd ~
$ cd /home

chmod

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

chown/chgrp

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

cp

cp is used to copy files or directories.

$ cp source destination
$ cp file1.txt file2.txt
$ cp -b file1.txt file2.txt
$ cp -v file1.txt file2.txt
$ cp * ~/Desktop

date

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

df

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

dot (.)

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

du

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

echo

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

expand

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

fg

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

gcc flags

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

gzip

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

hash

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

history

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

id

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

jobs

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

join

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

kill

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

less

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

ln

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

locate

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

ls

ls is used to list the contents of a directory. By default, ls will simply print file names.

$ ls
directory file

man

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

mkdir

mkdir is used to create directories (if they do not already exist) on a file system.

The general format is

$ mkdir [options] directories

more

The more command displays the file called name in the screen. The RETURN key displays the next line of the file. The spacebar displays the next screen of the file.

The syntax is:

$ more [options] [files]

mv

mv is used to move a source file or directory into a destination directory. It is also commonly used to rename files.

$ mv source desination

nl

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

passwd

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

pwd

pwd stands for print working directory. pwd outputs the full pathname of the current work directory.

$ pwd
/home/bo/Desktop

pwd can also be used to store the full path to the current directory.

x=$(pwd)

rm

rm is used to delete one or multiple files from your current directory. Be careful when using because this does not move the item to trash, it permanetly deletes it.

$ rm file1.txt file2.txt

rmdir

rmdir is used to remove empty directories.

The format is

$ rmdir [options] directories

rsync

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

seq

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

sleep

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

sort

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

su

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

sudo

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

tail

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

tar

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

top

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

true

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

uniq

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

uptime

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

wc

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

whereis

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

which

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

who

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

whoami

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

Tutorials

Shells

Scripting

Tools

apropos

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

cmp

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

curl

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

dc

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

dd

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

diff

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

factor

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

ffmpeg

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

file

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

find

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

git

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

grep

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

ifconfig

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

ip

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

less

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

make

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

nslookup

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

objdump

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

ping

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

ps

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

rev

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

scp

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

sed

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

sftp

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

sshfs

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

stat

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

tac

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

tcpdump

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

telnet

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

time

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

tmux

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

touch

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

tr

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

units

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

wget

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

xclip

TODO: Add documentation for this command by submitting a pull request.

*short* example of command usage and output

Editors

Toys

Ubuntu

Os_x