Introduction This article records how to mount a disk to the desired directory in Ubuntu 18.04 desktop system. Please refer to the online tutorial for the content. This is my own operation record. View all current disk information Command: From the listed information, we can see that the two hard drives in the computer are sda and sdb. sdb is the solid-state drive with win10 system and win10 software installed, sda is installed with Linux system, sda3 and sda4 are used for file storage under win10, with the "Microsoft Basic Data" logo; the remaining disks are used for Linux, sda1 and sda2 are used as Linux file storage, with the "Linux Basic Data" logo. Now we are going to mount sda2 to the /home directory, still as a storage disk, to expand the space of /home. Create a mount point In /home/ cd /home/ Unmount Disk If you want to mount an existing disk to a directory, you need to unmount the disk from the system first. For desktop systems, you can uninstall the disk by opening the file manager -> Show other locations -> right-clicking the corresponding disk -> Uninstall option to complete the uninstallation of the current existing disk; or you can operate through the command line. Then execute the uninstall command Use the command again to check the current disk mount status and you can see that /dev/sda2 is no longer mounted. Disk Mount First use the command to view the UUID of /dev/sda2 To mount the disk, you need to edit the /etc/fstab file and use the command According to the content format of the /etc/fstab file, add at the end: The first column is UUID, the second column is the mount directory (the directory must be a blank directory), the third column is the file system type, the fourth column is the parameter, the fifth column 0 means no backup, and the last column must be 2 or 0 (unless the boot partition is 1) Disk Mount Execute the command to mount the disk You can use the command to check the disk mount point again. The mount directory of the /dev/sda2 disk has become the newly created folder directory of Byte. Summarize The above is what I introduced to you about mounting the disk in a certain directory under Ubuntu 18.04. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: Detailed explanation of the process of querying user permissions using mysql statements
>>: The implementation of Youda's new petite-vue
1. Compare the old virtual DOM with the new virtu...
Table of contents 1. Overview 1. Principle 2. Imp...
The layui table has multiple rows of data. Throug...
Regarding uninstalling the previously installed v...
Table of contents Preface The role of deconstruct...
Cocos Creator version: 2.3.4 Demo download: https...
This article shares the specific code of JS to ac...
How does "adaptive web design" work? It’...
I installed node to the D drive, and I also neede...
I wrote this blog to remember that I just install...
A simple MySQL full backup script that backs up t...
This article shares the specific code of js to re...
Preface I have always wanted to know how a SQL st...
background First, let me explain the background. ...
Table of contents 1. Install vmware 1.1 Download ...