Skip main navigation

The Linux File System: Directories and Files

Hierarchy of the Linux file system
© Wellcome Genome Campus Advanced Courses and Scientific Conferences

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

Our purpose is to transform access to education.

We offer a diverse selection of courses from leading universities and cultural institutions from around the world. These are delivered one step at a time, and are accessible on mobile, tablet and desktop, so you can fit learning around your life.

We believe learning should be an enjoyable, social experience, so our courses offer the opportunity to discuss what you’re learning with others as you go, helping you make fresh discoveries and form new ideas.
You can unlock new opportunities with unlimited access to hundreds of online short courses for a year by subscribing to our Unlimited package. Build your knowledge with top universities and organisations.

Learn more about how FutureLearn is transforming access to education