Home > Operation and Maintenance > Linux Operation and Maintenance > How to set the partition size of each directory in Linux

How to set the partition size of each directory in Linux

王林
Release: 2019-12-03 10:16:31
Original
6189 people have browsed it

How to set the partition size of each directory in Linux

Generally speaking, there are at least two mount points in the Linux system, which are / (root directory) and swap (swap partition), the former root directory is required. If you are only installing it on a virtual machine for testing or learning, it is no problem to divide it into two zones. However, if it is a production environment, it is recommended to mount the following major directories:

/: The root directory is the only directory that must be mounted. Don't hesitate, pick a partition and mount it! In most cases, 2G of capacity should be enough. Of course, more of many things is better.

swap: The swap partition may not be necessary, but according to tradition and taking care of your security, it is better to mount it. Its capacity only needs to be approximately equal to your physical memory. If it exceeds twice the capacity of your physical memory, it is absolutely a waste.

/home: This is your home directory. Usually the files you create are stored here. You'd better assign a partition to it.

/usr: Application directory. Most of the software is installed here. If you plan to install a lot of software, it is recommended to allocate a partition to it as well.

/var: If you want to do some server applications, you can consider allocating a larger partition to it.

/boot: If your hard drive does not support LBA mode (unlikely), you'd better mount it, and if so, mount it first on the hard drive Partitioning should be more secure. Generally speaking, the size of the mounted partition is only 100M.

Related video tutorial recommendations: linux video tutorial

Whether you want to separate these mount points independently should be based on your planning needs. , please refer to the following suggestions:

1. Installation suggestions for novices or Desktop users with limited hard disk space

How to set the partition size of each directory in Linux

2. Advanced Desktop users Installation suggestions

How to set the partition size of each directory in Linux

or

How to set the partition size of each directory in Linux

3. Installation suggestions for advanced Server users

How to set the partition size of each directory in Linux

or

How to set the partition size of each directory in Linux

Notes:

1. There are no partitions under Linux, only mount points. Similar to the partition under Window.

2. The size of Swap is approximately equal to the size of your memory, or slightly larger. It is recommended to set it to at least 512MB.

3. Regarding the file system, under Windows, the file systems we commonly see include FAT, FAT32, NTFS, and exFAT. Under Linux, the file system is as follows:

Ext2: Early format and does not support the logging function.

Ext3: An improved version of ext2, which adds a log function and is the most basic and commonly used format.

Ext4: An extended log file system for the ext3 system, which is the successor version of the ext3 file system.

ReiserFS: It also has a log function, which is characterized by fast processing of small files.

XFS: Stable and efficient, it has excellent performance in systems with a mix of large and small files.

JFS: Features that it takes up the least CPU resources. If your computer is old, this is the best choice.

Recommended related articles and tutorials: linux tutorial

The above is the detailed content of How to set the partition size of each directory in Linux. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template