When you first start learning programming or working with software development tools, you will often hear terms like CLI, paths, Git, and GitHub. These concepts can sound complicated at first, but they are actually quite simple once you understand the basics.
This guide will walk you through these ideas step-by-step using simple explanations and relatable examples.
1. Understanding Paths in an Operating System
In an operating system like Microsoft Windows, every file and folder has a specific address. This address is called a path.
Think of it like a street address for a house.
If you want to visit someone’s home, you need to know:
- The country
- The city
- The street
- The house number
Computers work in a very similar way. They organize files and folders using a system of locations.
For example:
C:
├─ Program Files (64-bit apps)
│ └─ Google
│ └─ Chrome
│ └─ Application
│ └─ chrome.exe
│
└─ Users
└─ Moses
├─ Desktop
└─ DocumentsHere we see several important things:
- C: → the main drive
- Users → a folder
- Moses → a user account
- Documents → a folder inside the user account
This structure is called a hierarchical structure, or a tree structure, because it looks like branches growing from a trunk.
2. What is a CLI?
Before continuing, we need to understand something called a CLI.
CLI stands for Command Line Interface.
A CLI is a way to interact with your computer by typing commands instead of clicking buttons.
Instead of using your mouse to open folders and programs, you type instructions in a terminal window.
Examples of CLI environments include:
- Windows Command Prompt
- Windows PowerShell
- Bash
- Linux Terminal
- Git Bash
Developers often use CLIs because they allow you to perform tasks quickly and precisely....and, it just looks cool in a Coffee Shop.
A CLI application is simply a program that runs inside a terminal and is controlled by commands instead of graphical buttons.
3. The Starting Point: The Root
Every path in Windows begins with a drive letter.
Most commonly, this is:
C:
This location is called the root.
Think of it as the trunk of a tree. Every folder and file grows from this starting point.
Example structure:
C:\Users\Moses\Documents
Here we move step-by-step from the root to the final folder.
4. Absolute Paths vs Relative...