Partitions in Linux (Linux learning and comparison)

Source: Internet
Author: User

1 boot-> 20-100 m

2. Swap-> swap partition (twice the memory)

3./-> 10 Gb or larger

4./var-> whatever size

5 optional
/Home
/Var/log

========================================================== ========================================================== ====================
Here is a brief introduction to several important directories. These directories can be mounted selectively in special partitions of Hard Disk Partitions installed in Ubuntu.
Files in the/usr file system that do not change, such as libraries and programs.
/Var file system contains the file that will change.
/Home file system contains the user's home directory, that is, all the actual data on the system.
/Tmp temporary file.
/Usr/local this is the/usr directory provided to general users. It is best to install the software here.
/Srv after some services start, put the required data here.
/OPT some large programs installed here for ease of management.
/Root directory.
My suggestion is that all the above directories are separately partitioned on the hard disk. If you want to ask why, I can give an example.
For example, we can install lumaqq under/OPT. If we need to reinstall the system, we can choose not to format/OPT and ~ /. The lumaqq folder is backed up, so when we reinstall the system and mount/OPT again, we only need to put the. lumaqq folder in ~ Run the following command to configure Java:
Code:
Sudo ln-S/opt/lumaqq/usr/bin/lumaqq

You can use lumaqq again, and a series of lumaqq-related settings such as chat records will not disappear, avoiding downloading and installation troubles.
From the perspective of disk fragments,/tmp,/var, And/home are the most active partitions. If we put them directly under the root directory, it will inevitably cause processing trouble, at that time, disk fragments will affect the performance of the entire disk.
Therefore, we recommend that you separately partition and mount all the preceding directories.
It is also a coincidence when partitioning. According to the characteristics of the disk, we know that the more we rely on the external cylinder of the disk, the faster the rotation, and each time we rotate, disk read/write headers can cover a large number of areas, which means that external cylinders can provide better performance. Therefore, when partitioning, we should consider placing partitions with a High Access frequency that has a relatively large impact on system performance on the disk's off-site. The best solution should be:
/Boot-> swap->/home->/var->/tmp->/srv->/opt->/usr/local->/
Of course, there is no need to stick to this rule and make large-scale modifications to the hard disk, which can be adjusted according to the existing partitions.
In addition, do not use all the space after dividing the above partitions. Leave a few empty partitions for backup, for example, the last partition of my hard disk is a backup partition of up to 30 GB, which stores various files I downloaded online and some of my own things. Besides this partition, I also have a 10 Gb partition, which does not store anything, just to sort out disk fragments.
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.