Linux: List of Top Directories

In Linux to store data, you need files. These files can reside in a directory. And, these files are of two types. Those are Sequential and Indexed. In this post, I am sharing about top directories present in Linux.


Root Directory

  • Before, you first start to learn about directory-You can think it is a ‘Folder’ in windows. In Linux, the ‘/’ (slash) is called root directory.
  • Under root directory all other directories like User or System directories are usually created.
mkdir name_of_your_dir

Active Directory

Active Directory provides a common interface for organizing and maintaining information related to resources connected to a variety of network directories.

The directories may be systems-based (like Windows OS), application-specific or network resources, like printers. Active Directory serves as a single data store for quick data access to all users and controls access for users based on the directory’s security policy.

Nested directory

You can say Nested Directory when you create a directory in another directory.

Linux Files

A file is called Regular file and Plain file, normally created in directories. Each file has some extension with (.) dot, so that you can easily recognise the type of files.

#creating files
>mydir vi
#when you save the data your file is ready


  2.  stdio.h

File structure in Linux

File structure
Unix directories

In the above structure, in the root directory, you can see both files,links and directories. You can create symbolic links like short links to quick use.

  • Every directory by default you can see two dots(dot-dot)-‘..’, this tells the link for directory itself
  • /.. tells root directory
  • File name should not be more that 255 bytes in Linux systems
  • Type ‘pwd’ to know present or current working directory
  • Path, it denotes the where directory or file is located
  • Example for absolute path name /home/mtk/.bashrc, /usr/include
  • Example for relative path name /include/stdio.h

Ownership of Files

  1. Files have ownership. The ownership can be read, write and execute
  2. Major operations on file i/o are open()read()write()close()

Interview question

UNIX systems have no end-of-filecharacter. The end of a file is detected by a read that returns no data.

Also read

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.