Absolute
vs Relative
PathsAbsolute path
makes no assumptions about your current location
in relation to the location of the file or directory it's describing
relative path
which is location relative to your current location
# absolute /root/project/parent/file.txt # relative ../parent/file.txt
~
~
is a Linux shortcut for user's home directory
Path to desktop would be: ~/Desktop
/
A path starting with /
means the ROOT directory
of the filesystem
cwd
)Every process has a current directory
current directory
from its parent process; and it's not, for example, set to the directory which contains the program you are running.pwd
stands for "print working directory"
cwd
, just a command to print out the locationWhen disks became large enough that you did not want all your files in the same place, operating system vendors came up with a way to structure files in directories
This introduced the concept of a current working directory
cd
command born