linux - ubuntu最佳分区方案是什么
高洛峰
高洛峰 2017-04-17 11:59:47
0
8
742

新手不懂,希望能详细点

高洛峰
高洛峰

拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...

reply all(8)
洪涛

It depends on personal habits, many people have different methods;
I use debian 7, the division is as follows:
Swap is as big as the memory. Personally, I think this highlights the significance of swap (as a memory swap, of course it must be able to fit the entire memory to be "perfect")
"/" can be divided into at most 30G, because I really can't think of any reason to put too many things in the non-home directory;
/opt: If you have the habit of installing programs here, then divide it into a larger one. I don’t have this habit, so I don’t divide it here. Let’s mix it with “/”
The rest are all in /home. I am used to bumping the installed programs into /home/xxx/installations/xxx

In this case, every time I change computers, I only need to tar -czvf xxx.tar.gz /home/xxx; then after the new machine is installed, go to tar -xzvf and it will be done

巴扎黑

Look at this ubuntu partition plan

In short, there are different partitioning schemes depending on your purpose and hard drive size. There is no recognized best, only what you think is best after using it. Just like going from Shanghai to Beijing, drive, take a long-distance bus, take a train, fly, walk, or ride a bicycle? All are available, depending on the needs.

In addition, I have a complaint: Linux is too customizable, and many novices are at a loss as to what to do. They are always thinking about: what kind of partition is optimal, what file system is best, what desktop system is best, and what kind of desktop system is best? Which player is best and which browser is best...

I would also struggle with this. So, I guess after you decide on the partition plan, you will be confused (perhaps after a while) about which file system to use. I'm not laughing at you, I'm complaining about Linux. It provides too many choices and is too unfriendly to novices. Novices should have no choice.

PHPzhong

If this is your first time using Linux or Ubuntu, I recommend using a virtual machine and selecting All to the root directory, which is the default partition plan of the installation wizard.
Familiarize yourself with the Linux directory file management method in the system. Once you are familiar with it, you can partition according to your own needs.

Tell me about your partition plan. Mine is a 2T warehouse hard drive + 240G SSD
The SSD is divided into /
The warehouse disk is divided into one /HDD
Then I created several directories such as Music Video Documents under /HDD and used links to do it under /home/User/

The Swap partition was also divided due to obsessive-compulsive disorder...

Ty80

It is recommended to directly default the partition

洪涛

I hung up the home myself...boot was not hung up~
/Directory gave 100G
/home gave 200G
swap is 2050M
The other 200G is given to windows...

黄舟

haha, I don’t partition

PHPzhong

I usually have a 2~4G swap space, a 200M boot partition, and then /home and / half each

左手右手慢动作

A system that I have used for several years, not a server, for reference:

$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda2        20G  7.3G   13G  37% /
/dev/sda9        11G   48M   11G   1% /tmp
/dev/sda3        10G  5.3G  4.8G  53% /var
/dev/sda5       103G   55G   49G  53% /home

/tmp is a little bit, it will be used when burning a CD or something. I ran some services, so /var is a bit big, and the space of / does not need to be too large. Of course, it depends on how many software you are used to installing.

For other things, use custom mount points in /home or other self-built partitions.

By the way, the memory is 8G, and swap is divided into 10G:

$ free -m
             total       used       free     shared    buffers     cached
Mem:          7942       6930       1012          0          5       1641
-/+ buffers/cache:       5283       2659
Swap:        10377        637       9740
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template