About Linux Partitions
When installing Ubuntu / Kubuntu, you can choose to let the program partition automatically or choose custom partitioning. Generally speaking, Linux partitions can include the following:
/boot Operating system boot file partition, generally allocated size around 250MB-500MB
/usr Where the operating system stores software
/bin Stores standard system utility programs
/home Location of users' home directories; this partition is needed for multiple users. For example, user andrew's directory will be allocated under /home/andrew, while jay's directory will be allocated under /home/jay
/tmp Partition used to store some temporary files.
/var/log System log recording partition. Establishing this partition means that even if log files have problems, it will not affect the operating system's main partition
/srv Data started by the server is stored here
/opt Large programs, optional installed programs are stored here
/ Root directory
The /opt partition is easy for managing programs (taking LumaQQ backup as an example):
When reinstalling Linux, if you choose custom partitioning, you don’t need to format the /opt partition. First backup the XXX/lumaqq folder. After reinstalling the system, put the lumaqq folder back in the XXX directory, configure the Java environment, and enter the command:
sudo ln -s /opt/LumaQQ /usr/bin/lumaqq
ln - make new links to existing files
Partition Order:
It is not necessary to follow this order completely. According to partition usage and hard drive structure, efficiency is higher closer to the outside. For example, /boot and swap are the partitions where the system reads data most frequently. The recommended order is:
/boot -> SWAP -> /home -> /var/log -> /tmp -> /srv -> /opt -> /