Explaining the Types and Definitions of Ubuntu Linux Partitions and Directories
Summary: The following article is a reference to the various terms used in Ubuntu Linux. This is so that its structure can be described in a logical manner. (Terms can overlap between operating systems and sometimes mean two different things simultaneously.) ...
Instructions
See the various terms used in Ubuntu Linux for its structure can be described logically. Even though these terms can overlap and sometimes mean two different things simultaneously. This article is not meant to make you an expert in Linux. Only to clarify some terms and definitions. It helps to better understand, install, and use this operating system.
Table of Contents:
There are two options to install Ubuntu Linux on your Dell computer:
- Clean Install - For more information see the Dell Knowledge Base article: How to Install Ubuntu Linux on your Dell Computer
- Dual Boot Install - For more information see the Dell Knowledge Base article: How to Install Ubuntu and Windows 8 Through Windows 11 as a Dual Boot on your Dell Computer
They are largely automated and do not require this amount of knowledge to complete successfully or to use.
File system
Linux: A file system is a programmatic scheme that is used to organize and find files on a partition
Whereas: The File System references all the files on your computer
What this means is that the file system is the structure that is used to see, find and use your files using Ubuntu. However, the File System is both all the separate files in that structure and the file format.
| File System | Operating System | Description |
|---|---|---|
| FAT | Legacy | Legacy File System that was universally adopted and came in 12 FAT12, 16 FAT16, and 32 FAT32 |
| NTFS | Windows | New Tech File System: It replaced FAT on Windows computers, and it is still required to read Windows partitions |
| Ext2 | Linux | Second Extended file system: This is used in many Linux distributions' (distros) |
| Ext3 | Linux | Third Extended file system: Is the Ubuntu distros default choice: Journaling added |
| Ext4 | Linux | Fourth Extended file system: Many Linux distros use this format: Extends storage limits |
| JFS | Linux | Journaled File System - IBM introduced this file type and it is still supported, but Ext4 replaces it |
| XFS | Linux or Irix | 64-bit option that is mostly supported now as an option in Red Hat |
| ReiserFS | Linux or SUSE | This was a file format that was in use across several distros, but Ext3 replaces it now |
There are several types of files in Ubuntu Linux:
- Regular files:
-
They contain data, for example, text files, executable files or programs, input in or output out from a program and such.
- Directories:
-
These are the files and folders that are lists of other files
- Special files:
-
This is the mechanism that is used for input and output. Most special files are in
/dev - Links:
-
This makes a file or directory visible in several parts of the computer's file tree
- Domain sockets:
-
This is a special file type, and it is similar to Transmission Control Protocol/Internet Protocol (TCP/IP) sockets in windows. It provides interprocess networking that the file system's access control protects
- Named pipes:
-
These act more or less like sockets and are a way for processes to communicate with each other, without using network socket protocols
File Structure
For Ubuntu Linux, your / Partition must be a primary partition. While every other partition - Be it Primary or Logical, mounts to that partition. Each partition has a file format that is set and a purpose within the operating system. The directories and files are searchable and used within this structure. This is explained in more detail below.
Partitions
The First thing is to discard everything that you already know about Windows partitions. Trying to match the two only causes confusion. Take them as two separate processes.
Windows Partition Description
Windows partitions come in two types: Primary and Logical
On older SATA IDE Hard Drives, the limit is either four Primary partitions or a combination of some Primary and Logical partitions. Each receives a Drive letter, but you are only able to install the operating system on a Primary partition.
Ubuntu Linux Partition Description
Ubuntu Linux partitions also come in Primary and Logical. The limit is either four primary partitions or a combination of Primary and Logical partitions. However, that is where the similarities stop.
Your first partition is always your install partition on a primary partition. This partition can be called the root of the partition, or it is shown as a /. Depending on how you want to use and configure your Ubuntu install, you can make several partitions. Root is the most important partition. While you can create these partitions and give them a size, a file format, and a purpose, they must be mounted to the / of this partition to function correctly.
Ubuntu Linux Partition Categories
Ubuntu Linux further separates these partitions into two categories:
- Data partitions
-
These are partitions like the boot partition in that they hold directories and files or normal Linux system data. These are the files which start and run the computer.
- Swap partitions
-
These are partitions that expand the computer's physical memory by using the partition as a cache.
Partition types that are used in Ubuntu Linux Installs
There are several common partitions that are used for Ubuntu, they are listed below with some info for each. Those experienced with Linux uses a combination of some of these partitions as a scheme. This is when they know that they are using the custom Ubuntu install for a specific set of uses. These particular partitions make it easier and more efficient. A list of what combination of partitions are required for the most common generic install is included below. However, if you are going to use this scheme you would be better to use the auto-install guides above.
| Partition Name | Description |
|---|---|
/ |
The slash / alone stands for the root of the file system tree |
/bin |
This stands for binaries and contains the fundamental utilities that everyone needs |
/boot |
This contains all the files that are needed for the booting process |
/dev |
This stands for devices, which contain files for peripheral devices and pseudo devices |
/etc |
This contains configuration files for the computer and computer databases |
/home |
This holds all the home directories |
/lib |
This is the system libraries and has files like the kernel modules and device drivers |
/lib64 |
This is the system libraries and has files like the kernel modules and device drivers for 64-bit computers |
/media |
This is the default mount point for removable devices like USB drives and media players |
/mnt |
This stands for a mount and contains mount points for the file system. Used for multiple hard drives, multiple partitions, network file systems, and CD ROMs and such |
/opt |
Contains add-on software, and larger programs may be installed here rather than in /usr |
/proc |
This contains a virtual file system describing the process information as files |
/sbin |
This stands for System Binaries and contains the fundamental utilities that are used to start, maintain, and recover the computer |
/root |
This is the home location for the computer's administrator root. This account home directory is usually the root of the first partition |
/srv |
This is server data, which is data the computer provides for services |
/sys |
This contains a sysfs virtual file system which holds information that is related to the hardware operating system |
/tmp |
This is a place for temporary files. tmpfs that is mounted on it or scripts on startup usually clear this at boot |
/usr |
This holds the executables and shared resources that are not system critical |
/var |
This stands for variable and is a place for files that are in a changeable state. Such as size going up and down |
/swap |
The swap partition is where you extend the system memory by dedicating part of the hard drive to it |
Most Common Partition Scheme
| Name | Recommended Partition Space |
|---|---|
/home |
Remaining Free Space after other partitions created or second drive. |
/usr |
20 GB at least |
/var |
2 GB |
/lib |
5 GB |
/boot |
250 MB |
/opt |
500 MB to 5 GB |
/etc |
250 MB |
/sbin |
250 MB |
/bin |
250 MB |
/dev |
250 MB |
/srv |
100 MB |
/tmp |
Match this to the size of the Swap partition |
/mnt |
8 KB This is an empty partition that is used as a mount point for temporary files |
/media |
8 KB This contains subdirectories for mount points of removable media, such as CDs and USB flash drives |
/swap |
Twice as large as the amount of RAM in the computer |
There are many other schemes and many reasons for not splitting off a directory as a partition. As there are many reasons for creating a specific partition to streamline a particular process. How to proceed with a custom install is going to be up to you. It all depends on the use that you plan to put the computer.
If you need aid from Dell Technical Support in setting these up, then Dell Technologies advise contacting the Operating Systems manufacturer instead. This type of help is not going to be covered under our existing warranties. Only the Operating Systems developer can answer your questions on this subject. They are the acknowledged experts on their operating system.
Directories
In simple terms, Directories in Ubuntu Linux are folders that contain files. There is a certain amount of overlap with the terms that are used for the partitions in the section above. The reason for this is that Linux splits up the directories onto separate partitions. So that they could dedicate space to each of them and mostly to protect against data loss. This is so that if one partition was unresponsive or if it was lost it would not affect all the others. This is mostly a thing of the past due to Journaled file types such as Ext3 and Ext4. Once the separate partition is mounted to /, it then shows as a directory thereof.
The easiest way to think of the directories on an Ubuntu Linux computer is to think of them 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 have subdirectories branching off from those main branches.
| Directory Name | Content |
|---|---|
/bin |
Contains the common programs, which the computer, the system administrator, and the users share |
/boot |
This has the startup files and the kernel, vmlinuz. In some recent distributions, it also has grub data. GRUB is the Grand Unified Boot Loader |
/dev |
Contains references to all the CPU peripheral hardware, and they are represented as files with special properties |
/etc |
This has the most important system configuration files; this directory is similar to the control panel in Windows |
/home |
This is the home directory for the common users |
/initrd |
This contains information for booting in some distributions, Do Not Remove |
/lib |
This holds the library files; it includes files for all kinds of programs that you need |
/lost+found |
Every partition has a lost + found in its upper directory and files that were saved during failures reside here |
/misc |
For miscellaneous uses |
/mnt |
The standard mount point for external file systems, such as media players, digital cameras, and CD ROMs |
/net |
The standard mount point for the entire remote file system |
/opt |
Typically, this has third-party software and any extra files require |
/proc |
This is a virtual file system containing information about system resources. You can get more information about the meaning of the files in proc by entering the command man proc in a terminal window. The file proc.txt discusses the virtual file system in detail |
/root |
This is the system administrator user's home directory. Remember that there is a difference between / the root directory and /root the home directory of the root user |
/sbin |
This contains programs for use by the system administrator |
/tmp |
This is a temporary space for use by the computer. It is regularly wiped, so remember not to keep anything you want to retain here |
/usr |
This has programs, libraries, and documentation for all the user-related programs |
/var |
This is the storage for all the variable files and the temporary files that you create. Things like the log files, the mail queue, the print spooler area, space for the Internet cache. It keeps an image of a CD or DVD before burning it |
You can find a guide on using these directories after you have finished the install on the link below.
Additional Information
Software support is by Canonical through the following methods:
Dell provides Technical Support: