Ubuntu Linux Partitions and Directories Explained - Dell Support Guide
Summary: Learn how Ubuntu Linux partitions, directories, and file systems work on your Dell computer. This complete guide covers root, home, swap, EFI partitions, the full directory structure, and all 7 file types, in plain, easy-to-follow language. ...
Instructions
New to Ubuntu Linux on your Dell computer? Understanding how Ubuntu organizes your storage is the first step to a smoother experience. This guide explains Ubuntu Linux partitions, directories, file systems, and file types in plain, easy-to-follow language — so you always know what's happening on your system.
If you've used Windows before, it helps to set those concepts aside when thinking about Ubuntu. The first thing to do is discard everything you already know about Windows partitions — trying to match the two only causes confusion. Think of them as two separate processes.
Windows Partitions (Quick Recap)
Windows partitions come in two types: Primary and Logical. On older SATA/IDE hard drives, you're limited to either four Primary partitions or a combination of some Primary and Logical partitions. Each receives a drive letter, but you can only install the operating system on a Primary partition.
Ubuntu Linux Partitions
Ubuntu works differently. Ubuntu Linux partitions also come in Primary and Logical types. The limit is either four primary partitions or a combination of Primary and Logical partitions. However, that is where the similarities end.
Here's the key difference: Unlike Windows, which uses drive letters to distinguish between different storage devices and partitions, Ubuntu and other Linux distributions use a unified file system tree where everything starts from the root directory, denoted as "/".
In Ubuntu Linux, your / (root) partition must be a primary partition, while every other partition — whether Primary or Logical — mounts to that root partition.
Think of it like a tree: The easiest way to picture Ubuntu's directories is as branches on a tree. The trunk of the tree is the root directory on your first partition. The other directories mount to this trunk as branches. Each branch has its purpose but may interact with others through the trunk, and may have subdirectories branching off from them.
Before you set up partitions, your drive uses one of two partition table formats. Understanding which one you have matters, especially on modern Dell computers.
MBR (Master Boot Record)
Older systems — typically those running Windows 7 and earlier — usually use an older style of partitioning called MBR. MBR is limited to four primary partitions and supports drives up to 2 TB.
GPT (GUID Partition Table)
Computers that come with Windows 8 and later use a newer style of partitioning called GPT. GPT doesn't contain a boot loader the same way MBR does and can have up to 128 partitions. Most modern computers come pre-configured with a GPT disk.
How do you check which type you have? Open a Terminal and run: sudo parted -l
If the disk is GPT type, you must also add a BIOS-Boot or an EFI partition depending on the boot mode of your system firmware.
Tip: On most modern Dell computers manufactured after 2012, your system uses UEFI firmware and GPT disks. If you're unsure, run the command above to confirm.
Ubuntu Linux separates its partitions into two categories — those that hold system data and those that hold user or swap data. Here's a breakdown of every partition you'll encounter.
1. The Root Partition (/)
This is the most important partition on your Ubuntu system. The root partition contains, by default, all your system files, program settings, and documents. The root filesystem is the top-level directory of the filesystem hierarchy. It contains all the essential components needed to boot, restore, recover, and repair the system. It must remain minimal to ensure reliability, portability, and ease of recovery.
- Mount point:
/ - File system: ext4 (recommended)
- Minimum size: 8 GB. It is recommended to make it at least 15 GB. For a general-purpose desktop, 25–50 GB is a comfortable size.
2. The Swap Partition (or Swap File)
Swap space is your system's safety net when it runs low on RAM (Random Access Memory). Swap is disk-backed space the kernel uses when it cannot keep all memory pages in RAM. When physical memory runs low, the kernel may write cold pages to swap so active workloads keep RAM. Reads and writes to swap are slower than RAM, so swap is a safety net — not a substitute for having enough RAM.
Swap space can be a dedicated swap partition (recommended), a swap file, or a combination of both.
How much swap do you need? Ubuntu takes hibernation into consideration when calculating swap size. If you need hibernation, a swap size equal to your RAM becomes necessary.
The hibernation feature (suspend-to-disk) writes out the contents of RAM to the swap partition before turning off the machine. Therefore, your swap partition should be at least as large as your RAM size if you plan to use hibernation.
Here are general guidelines:
| RAM Size | Swap (No Hibernation) | Swap (With Hibernation) |
|---|---|---|
| Up to 2 GB | Equal to RAM | 2× RAM |
| 2 GB – 8 GB | 2–4 GB | Equal to RAM |
| 8 GB – 16 GB | 4 GB | Equal to RAM |
| Above 16 GB | 2–4 GB | Equal to RAM |
3. The EFI System Partition (ESP) — /boot/efi
The EFI partition (also called the ESP — EFI System Partition) contains some boot files. It is required if your firmware (BIOS/UEFI) is set up to boot in EFI mode, which is the default on most modern computers. It must be located at the start of a GPT disk and have a "boot" flag.
Unlike other typical Linux partitions, the EFI partition must be formatted with FAT32. A size of 500 MB is a good way to guarantee you will not run out of space. Do not use this partition to store anything except bootloader information.
4. The Boot Partition (/boot)
The /boot directory contains the files needed to boot the system. For example, the GRUB bootloader's files and your Linux kernels are stored here.
Most standard Ubuntu installs don't need a separate /boot partition. However, some computers can't see boot files if they are located more than 100 GB from the start of the disk. This is why it is sometimes necessary to create a separate /boot partition at the start of the disk.
- Recommended size (if separate): 1 GB
- File system: ext4
5. The Home Partition (/home)
The /home directory contains a home folder for each user. For example, if your username is "bob", you have a home folder located at /home/bob. This home folder contains the user's data files and user-specific configuration files.
Keeping /home on its own partition is a great idea because if you reinstall Ubuntu, you can format the root partition and keep /home intact; when you reinstall your programs, their settings will reappear as they were.
Each user only has write access to their own home folder and must obtain elevated permissions to modify other files on the system.
6. Why Use Multiple Partitions?
Originally, having different partitions was to achieve higher data security in the event of a disaster. If an accident occurred, it would only affect the data in the affected partition. Data on the other partitions is likely to survive.
Here's a quick-reference table for a typical Ubuntu desktop installation on a modern Dell computer with a GPT disk and UEFI firmware:
| Partition | Mount Point | File System | Recommended Size |
|---|---|---|---|
| EFI System Partition | /boot/efi |
FAT32 | 500 MB |
| Boot Partition (optional) | /boot |
ext4 | 1 GB |
| Root Partition | / |
ext4 | 25–50 GB |
| Swap | (none / swap) | swap | Equal to RAM (if hibernating) |
| Home Partition | /home |
ext4 | Remaining space |
Tip: For most users doing a standard desktop install, the Ubuntu installer's automatic partitioning works well. Manual partitioning is recommended for advanced setups, servers, or dual-boot configurations.
Once Ubuntu is installed, all of your files and folders live within a single directory tree starting at / (root). The Linux Foundation maintains a Filesystem Hierarchy Standard (FHS). This FHS defines the directory structure and the content and purpose of the directories in Linux distributions. Thanks to this standard, you'll find the same directory structure in almost all Linux distributions.
Here's what each key directory does:
/ — Root Directory
The root directory is the starting point of the file system hierarchy in Ubuntu. It contains all other directories and files on the system and can be thought of as the "trunk" of the tree, whose branches extend to all locations on the system.
/bin — Essential Program Files
The /bin directory contains the essential user binaries (programs) that must be present when the system is in single-user mode. Applications such as Firefox are stored in /usr/bin, while important system programs and utilities such as the Bash shell are located in /bin.
/boot — Boot Files
The /boot directory contains everything required for the boot process to start the system. This includes the GRUB bootloader and Linux kernel files.
/dev — Device Files
The /dev directory contains a collection of special files that represent access points to devices on your system. This allows users to directly access these devices through the device files. For example, /dev/sda represents your primary hard drive.
/etc — System Configuration Files
The /etc directory contains system-global configuration files which affect the system's behavior for all users. User-specific configuration files are located in each user's home directory.
/etc can affect the entire system, so always make backups before editing.
/home — User Home Folders
The /home directory contains user data and user-specific configuration files. As a user, you'll put your personal files, notes, and programs in your home directory. When you create a user on your Linux system, it is standard practice to create a home directory for that user.
/lib — Essential Libraries
The /lib directory contains kernel modules and essential library files needed to boot the system and run the commands in the root filesystem — specifically those used by binaries in /bin and /sbin. They are essential for basic system functionality.
/media — Removable Media
The /media directory provides a standard location for automounting devices, in particular removable media. This directory contains subdirectories that are used as mount points for removable media such as USB drives and optical discs.
/mnt — Temporary Mount Points
The /mnt directory is also a place for mount points, but is dedicated specifically to "temporarily mounted" devices, such as network file systems.
/opt — Optional / Third-Party Software
The /opt directory is reserved for optional software and third-party applications. Software installed here is typically not managed by Ubuntu's built-in package manager.
/proc — Kernel and Process Information
The /proc directory is a virtual filesystem that provides a mechanism for the kernel to send information to processes. It doesn't contain real files — the information is generated dynamically by the kernel.
/root — Root User's Home Folder
The /root directory is the superuser's home directory. It is not located in /home to allow the system to boot even if /home is not available.
/run — Runtime Data
Modern Linux distributions include a /run directory as a temporary filesystem (tmpfs), which stores volatile runtime data, following the FHS version 3.0.
/sbin — System Administration Binaries
The /sbin directory contains important administrative commands that should generally only be used by the superuser (root).
/srv — Service Data
The /srv directory can contain data directories of services such as HTTP (/srv/www/) or FTP.
/sys — System/Kernel Information
The /sys directory is a virtual filesystem that can be accessed to set or obtain information about the kernel's view of the system.
/tmp — Temporary Files
The /tmp directory is a place for temporary files used by applications. The contents of the /tmp directory are deleted when your system restarts. Don't store anything important here.
/usr — User Programs and Data
The /usr directory contains the majority of user utilities and applications, and partly replicates the root directory structure, containing for instance /usr/bin/ and /usr/lib. The /usr hierarchy contains shareable, read-only data.
/var — Variable Data
The /var directory is dedicated to variable data, such as logs, databases, websites, and temporary spool files (e-mail, etc.) that persist from one boot to the next. The files stored here are not cleaned automatically, making it a good place for system administrators to look for information about their system's behavior.
The terms "filesystem" and "file system" are often used interchangeably, but they actually mean slightly different things in Linux:
- A filesystem (one word) is the organizational scheme that Ubuntu uses to store and find files on a partition. Think of it as the filing rules.
- The file system (two words) refers to all the files on your computer — both the files themselves and the format they're stored in.
Common File System Formats
| Format | Used For | Notes |
|---|---|---|
| ext4 | Root, Home, Boot partitions | Default for Ubuntu; fast, reliable, journaled |
| FAT32 | EFI System Partition | Required for UEFI boot |
| swap | Swap partition | Used for memory overflow and hibernation |
| NTFS | Shared data with Windows | To share data with Windows, choose NTFS. |
| exFAT | USB drives / cross-platform | Good for drives shared between Linux, Windows, and macOS |
Good to know: Other operating systems (Windows, macOS) cannot read or write to Ubuntu (ext4) partitions, but Ubuntu can read and write to almost any partition type.
In Ubuntu Linux, Linux treats everything as a file — from text documents to hard drives to network sockets. In UNIX-based systems, there are seven standard file types: regular, directory, symbolic link, FIFO special, block special, character special, and socket.
You can identify a file's type by running ls -l in a terminal. The very first character of each line tells you the file type.
1. Regular Files (-)
Regular files are the most common file type in Linux. They are versatile containers for storing a variety of data formats, including text, executable code, multimedia content, and system configuration files.
Identified by: A dash (-) at the start of ls -l output.
2. Directories (d)
Linux follows a hierarchical structure to organize files. This is achieved using directories. Directories are also Linux files. But rather than storing data, they store the location of other files.
Identified by: A d at the start of ls -l output.
3. Symbolic Links (l)
A symbolic link file (also called a symlink) is a type of file in Linux that points to another file or folder on your system. Symbolic link files are similar to shortcuts in Windows. Unlike a hard link, a symbolic link does not contain the data in the target file itself but simply points to another entry somewhere in the filesystem.
Identified by: An l at the start of ls -l output.
4. Block Device Files (b)
Block devices are a type of special file that provide buffered access to hardware devices, facilitating structured I/O operations. Examples of block devices include hard drives, flash drives, and other storage devices. They process data in blocks of multiple bytes and are essential for mounting different types of storage.
Identified by: A b at the start of ls -l output. Mostly found in /dev.
5. Character Device Files (c)
Character device files are special types of files in Linux that provide an interface for hardware devices that transmit data one character at a time, such as keyboards, mice, or serial ports. These files allow user-space programs to interact with hardware in a simple and standardized way.
Identified by: A c at the start of ls -l output. Mostly found in /dev.
6. Socket Files (s)
Sockets (shown with an s) are used in network communications to create a link between processes, either within the same system or over a network, allowing for data exchange.
Identified by: An s at the start of ls -l output.
7. Named Pipes / FIFO Files (p)
FIFOs (First In, First Out), indicated by a p, are special types of files used for inter-process communication. Data written to them by one process can be read by another.
Identified by: A p at the start of ls -l output.
Quick Reference: File Type Identifiers
| Symbol | File Type | Common Location |
|---|---|---|
- |
Regular file | Everywhere |
d |
Directory | Everywhere |
l |
Symbolic link | /usr, /lib, /bin |
b |
Block device | /dev |
c |
Character device | /dev |
s |
Socket | /run, /var/run |
p |
Named pipe (FIFO) | /tmp, /dev |
Q: Do I need a separate /home partition?
A: It's not required, but it's highly recommended. Keeping /home on its own partition means you can reinstall Ubuntu without losing your personal files.
Q: Do I need a swap partition on modern systems?
A: A distribution like Ubuntu automatically creates a swap file of 2 GB in size during installation. This is usually sufficient. You only need a larger dedicated swap partition if you plan to use hibernation.
Q: What's the difference between UEFI and BIOS?
A: BIOS (Basic Input/Output System) is low-level software that performs hardware initialization and loads the boot loader. Gradually, BIOS is being replaced by UEFI (Unified Extensible Firmware Interface). Most Dell computers made after 2012 use UEFI.
Q: Can Ubuntu read my Windows files?
A: Yes. Ubuntu can read and write to Windows partitions, but Windows cannot read Ubuntu (ext4) partitions.
Q: What is the /lost+found directory?
A: The /lost+found directory is used to store any files found to be corrupted after a system crash and provides a way to try to recover data from them. After a crash, at the next boot, a filesystem check is performed. The fsck tool will go through the system and try to recover any corrupt files. The result of this recovery operation is placed in the /lost+found directory.