AI Hints
Home›Linux Tutorial›Files and Folders
Linux · Lesson 13 of 120

The File System Tree

How Linux stores files.

⏱ 2 min read▶ Video at 13:48🎓 Free
Watch this lesson in the Linux courseWatch on YouTube ↗Full Linux course

Everything on a Linux computer lives in one big tree of folders. Your documents, your programs, even your settings. Once you understand the shape of this tree, the rest of Linux makes a lot more sense.

The File System Tree
From the video: The File System Tree
  • One big tree of folders
  • Documents, programs, settings
  • Learn its shape first

One root for everything

The tree starts at a single folder, called the root, and written as a forward slash. Every other folder sits inside it. There are no drive letters like C colon, like on Windows. Even a USB stick appears as a folder somewhere in the tree. On Linux, folders are often called directories. The two words mean the same thing.

/the root of the tree
Everythinglives inside /
No C: driveUSB sticks are folders too
Folderalso called a directory

Looking at the root

Let's look at the top of the tree. LS lists what's inside a folder. LS slash shows the folders inside the root. It looks a bit strange at first, but each folder has a job. Let's meet the important ones.

Terminal
ls /
bin                dev   lib                mnt   root  sbin.usr-is-merged  tmp
bin.usr-is-merged  etc   lib.usr-is-merged  opt   run   srv                 usr
boot               home  media              proc  sbin  sys                 var

The important folders

Home holds a personal folder for each user. That's where your own files go. ETC holds settings for the whole system. Bin and user bin hold programs, like LS itself. Var holds files that change, such as logs. And TMP is for temporary files, that can be deleted at any time.

FolderWhat lives there
/homeeach user's personal folder
/etcsystem settings
/bin, /usr/binprograms, like ls
/varchanging files, like logs
/tmptemporary files

Summary

Linux has one tree of folders, starting at the root, slash. Your own files live in slash home. Next, how to find out where you are in the tree.

Key takeaways
  • One tree, starting at /
  • /home for your files
  • /etc for settings
Next up: pwd: Where Am I? — your current folder