Relative and Absolute Paths A relative path is a
path that is relative to your cwd
. An absolute path
is a path that points to an absolute location in the file system.
The Environment Variable $PATH
and friends
$PATH
tells the system where to look when you enter a
command.
Comments in BASH A one-line comment is a space then
a pound sign(#
). Do not forget the space or you will get
an ugly surprise. That means: deliberately make that mistake and
see what happens.
Aliases
Writing a Shell Script A shell script is just a bunch of UNIX
commands in a file. BASH is a turing-complete programming language. Using
a .sh
extension gives you proper syntax coloring.
The first line should be the shebang line which looks like this.
#!/bin/bash