Craw Security RHCSA (SA1) - Class - 04
Craw Security RHCSA (SA1) - Class - 04
On a Linux operating system, all files are stored on file systems that are
structured into a single inverted tree of directories, referred to as the file-
system hierarchy.
The / directory serves as the root directory, positioned at the top of the
file-system hierarchy. Additionally, the / character functions as a directory
separator in file paths (e.g., /dev/sr0).
The /usr Installed software, shared libraries, include files, and read-only
program data.
[root@server1 ~] # which ls
Output: /usr/bin/ls
To check all available path from where commands can run, we can use:
(/var) - Variable data specific to this system that should persist between
boots. Files that dynamically change, such as databases, cache
directories, log files, printer-spooled documents, and website content may
be found under
/var.
The (/run) directory contains runtime data for processes that have started
since the last system boot. This data includes process ID files, lock files,
and other temporary information. The contents of this directory are
recreated at each reboot.
We can check all device mounted during run time using below command:
[root@server1 ~] # df -hT
The option (h) for Human Readable and (T) for filesystem.
>> User profiles (including Desktop, Downloads, Documents, etc.) are not
created until the user has logged into the system at least once.
Absolute Paths:
The path of a file or directory specifies its unique location within the file
system. It is a fully qualified name that denotes the exact position of the
file in the file-system hierarchy.
Starting from the root (/) directory, it includes each subdirectory that must
be traversed to reach the desired file.
Relative Paths:
The working directory, also called the current working directory, refers to
the user's current location within the file system.
If a path name begins with any character other than a forward slash (/), it
is considered a relative path name.