Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Common methods of ubuntu Partition

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

This article shares with you about the common methods of ubuntu partitioning. The editor thought it was very practical, so I shared it with you as a reference. Let's follow the editor and have a look.

Common scheme

Divided into three areas

1. Mount point /; main partition; installation system and software; size is 30G; partition format is ext4

two。 Mount point / home; logical partition; equivalent to "my document"; size for the rest of the hard drive; partition format ext4

3. Swap; logical partition; acts as virtual memory; size is equal to memory size (2G); partition format is swap

4. / boot; Boot partition; logical partition; size is 200m; Partition format is ext4

Ps: (I installed the Ubuntu14.04 version, 100g hard disk partition scheme)

+ buttons and-buttons are used to add and delete partitions, and change changes partition properties (partition format and mount point)

Because Linux's file system is a tree-like structure, a software will place many files in different directories, so each directory will expand at a different speed for different purposes. For example, when the computer is used as a server, because the changing files are generally located in / var, / var should plan enough space; when the computer is used as a daily desk application, / home will increase the usage, so / home will enlarge the space; if the computer will install a lot of software, then you may need to increase the space of / usr.

Of course, if you don't separate these spaces and use them together, you will have the best space efficiency, but it is easy to cause system instability or other problems. The root directory of the linux file system mentioned earlier must be mounted. Directories mounted without a specific partition will be placed in the same partition as the root directory.

Never put it in a different partition directory from the root directory:

/ bin,/sbin, / lib, / etc, / dev these five directories. It must not be separated from the partition where it is located, because these five directories have the necessary tools and data for the system. When the root directory is mounted during boot, these tools and data are needed to maintain normal operation. If you put these five directories in other partitions, the system will not boot properly.

Never mount the above directories to other partitions. Directories that do not need to be placed in a different partition from the root directory:

Such as / cdrom,/mnt, / media, / proc, / run, / sys,/srv, etc. These directories can be placed in other partitions, but do not need, because the existence of these directories, only in the process of operation, to maintain the operation of the need, most will not take up space. Putting it in other partitions is also not good for the performance of the system. For example, / mnt,/media, / cdrom only provides a mount point so that physical storage media can be mounted, or / sys,/proc is actually data on memory, and all the data above will not take up hard disk space at all. So these directories do not need additional partitions to store.

In the recommendation of FHS, it is mentioned that the smaller the partition of the root directory, the more conducive to the stability of the system and avoid other interference; when errors occur, it will be easier to maintain and correct; and can improve the performance of the system. Next, it is best to separate from the root directory to the directory of other partitions:

The so-called "best" is not "necessary" for the stability of the entire operating system. As I said at the beginning, as long as "/" exists, the Linux system will work.

/ home / var / usr must think about which spaces must be extra partitioned (see the role of the following partitions). Of course, as far as the stability of the system is concerned, it is best to divide them all.

Thank you for reading! So much for sharing the common methods of ubuntu partition. I hope the above content can help you to some extent, so that you can learn more knowledge. If you think the article is good, you can share it and let more people see it.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report