When the user's home directory becomes larger and larger, you can consider migrating the home directory to a new partition. How to achieve it? Let me introduce it to you below. When I installed the system, I followed the online tutorial and allocated 20G space to the /home partition. After using Ubuntu for a while, I found that the disk where /home is located is about to be full, but there is no space to expand the disks where the /home directory is located. I had no choice but to "move". The following is the whole "moving" process: First, you need a completely blank disk as the target disk and a USB boot disk, and format it with the disk partitioning software that comes with the Ubuntu system. Mount the target disk (mine is /dev/sda9) to any directory (assuming it is /test) Copy all files in the home directory to the directory mounted on the target disk ( Be sure to add -a here, otherwise the owner of the copied file will become root, and the path must be set correctly, otherwise it will cause an infinite loop on the login interface when restarting and you will not be able to enter the graphical interface. ) Enter the original system /etc directory and modify the fstab file (note that the fstab file of the original system should be modified, not the fstab file of the boot disk system) Back up first (backup is a good habit) View the uuid of the target disk: Edit the fstab file. The two orange lines in the figure below are where the home directory is mounted. Replace the uuid in the file with the uuid found in the previous step. Restart and find that the home directory has changed Summarize It is not advisable to blindly copy the methods on the Internet, especially when modifying important system files. Sometimes a wrong command may cause the system to crash. You should develop the habit of backing up files before modifying them, so that you will have room for regret after making mistakes. Try not to reinstall the system as soon as a problem occurs, as it will not solve any problems. ———A newbie who has just started using Linux for more than a week This is the end of this article about moving the /home directory to a new partition in Ubuntu. For more information about moving the /home directory to a new partition in Ubuntu, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: jQuery achieves fade-in and fade-out effects
>>: mysql8.0.11 winx64 installation and configuration tutorial
Table of contents 1. Schematic diagram of group q...
1. Basic Environment 1. Operating system: CentOS ...
This article shares the specific code of Vue+echa...
This article introduces the CSS scrollbar selecto...
Table of contents 1. Teleport usage 2. Complete t...
You can go to the Ubuntu official website to down...
Table of contents umask Umask usage principle 1. ...
Table of contents Cross-domain reasons JSONP Ngin...
Open the scheduled task editor. Cent uses vim to ...
Cause of failure Today, when I was writing a caro...
When we want to add a shadow to a rectangle or ot...
This article explains the difference between arro...
In web front-end development, it is inevitable to ...
1. Add a comment block at the beginning of the sty...
Anyone who has read my articles recently knows th...