Skip main navigation

The Linux File System: Directories and Files

Hierarchy of the Linux file system
In Linux, as with other operating systems, information is stored in files.

As the week progresses, we will look in detail at files and investigate their content, how to create and edit them and how they are accessed. All files are stored in a file system which is organised into directories. Directories are equivalent to folders in Windows or Mac OS. They are used to organise how files are stored and, used well, can make it far easier to find and access your files. For example, creating a directory for each project you work on can make it far easier to find relevant information.

The Linux file system is arranged hierarchically:

hierarchical file system in Linux represented as tree of directories Directory names are separated by a / character, both when written and typed in the terminal.

The top level of the hierarchy is referred to as the root directory. This will typically contain some key files used by the system and the start of a hierarchy of directories. It is owned by the root user and cannot generally be written to by standard users. Think of the root user as the admin user on Windows or Mac OS but with far greater powers. The root directory is represented just by a / character when typed.

The directories may vary a little but include places where essential system software and libraries, default configuration files for all user accounts, file representations of devices and media attached to the system, software installed for general use and user home directories are stored. Each user will always have a home directory. This is where their files and directories are stored. An individual user will usually be the only person able to write to their home directory unless they set permissions so others can do so. We will learn about file permissions later in the week.

© Wellcome Genome Campus Advanced Courses and Scientific Conferences
This article is from the free online

Bioinformatics for Biologists: An Introduction to Linux, Bash Scripting, and R

Created by
FutureLearn - Learning For Life

Reach your personal and professional goals

Unlock access to hundreds of expert online courses and degrees from top universities and educators to gain accredited qualifications and professional CV-building certificates.

Join over 18 million learners to launch, switch or build upon your career, all at your own pace, across a wide range of topic areas.

Start Learning now