What is Directory in Linux [A Complete Overview]

Though quite similar to Windows, the directory in Linux takes a different objective of using Terminal. In our day-to-day life, we don’t use Terminal, but for professional use and automation, we need Terminal. In Linux, you should learn the use of Terminal to access directories, and in this article, you will specifically learn different commands and applications of directories in Linux.

What is a Directory in Linux?

In a directory, we store files and folders. Linux has a hierarchical file system, just like UNIX and MS-DOS. In Windows, you can see a folder system in a GUI where you can store a file. Linux also has a similar directory system. But before GUI, every computer used DOS (Disk Operating System), which had a Terminal to type commands.

Here you will learn to access directories using a Terminal. First, you need to know about some basic directory systems.

  • Root Directory
  • Home Directory

1. Root Directory

The root directory in Linux is the ROOT or the starting point of all directories. It is considered the topmost directory in the Linux system.

You can access the root directory using the following command. The command ls is used to view the files inside the root directory.

cd / 
 ls