File Structure

Linux uses the filesystem hierarchy standard which defines the way directories/folders are laid out. It’s important to understand this structure to understand how the operating system works. The top most directory is called the root directory(/). Since the file system is organised in a hierarchy, every file and folder is located under the root directory. Here’s the most common layout of the root directory:

Now that we have a brief explanation about the file structure, let’s dive straight in. To learn basic commands, we’ll assume the scenario of what an attacker would do if they gain access to a linux system

The first thing an attacker would do is gain access to the system. This can be done in many different ways, but the most common way is using a shell. A shell is used to run system commands(it can also be thought of as the terminal or as the actual command line). Shells are also programs and the most common shells are: