Software Onboarding/Working on the terminal
The command line is an alternative to the typical desktop interface used on a system. It requires the user to memorize a set of commands to interact with it, but allows a user a much greater degree of control and freedom to what is possible in a graphical environment.
The directory tree[edit]
The command line and the directory tree and closely related. The directory tree is the collection of all of the files and folders on a system and the folders that contain them. A directory tree starts with the root directory, the directory that all other directories are a descendant of. In windows this is denoted by the C:\ drive. In linux this root directory is denoted by the symbol /. A absolute path describes a way of traversing this tree to get from the root to a file of interest. A windows path may take the form C:\Users\username\Documents\file.txt, indicating that the computer should start at the root, then move into the directory named Users, then into the directory named username, then into the directory named documents, and finally retrieve the file named file.txt. Each '\' indicates a step in the path. This symbol is called the separator. A linux path might look like this: "/home/username/Documents/file.txt" the structure is largely the same, the path starts with the root, and indicates several steps through the tree to get to a desired file. You'll notice in this case the separator is the / symbol.
Relative paths and the working directory[edit]
It would be inconvenient if we had to refer to the absolute path every time we needed to reference a file. The terminal solves this by introducing the concept of a working directory. The working directory is, unsurprisingly, the directory where you are currently working. Any time a path doesn't explicitly start at the root, it is known as a relative path. Before a relative path is evaluated, the working directory is added to the beginning of it to construct an absolute path. For example, if I open a terminal in the directory "/home/username" I could refer to the previous text file as "Documents/file.txt". Notice the lack of a leading slash indicating this path is a relative path. The working directory and the relative path are added together to produce the same path as the previous absolute path, but with much less typing.
Moving around the directory tree[edit]
We can change the current working directory with the command cd (change directory). We can view the current working directory with the command pwd (print working directory).