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
Using the knowledge of CSS variables, I will dire...
1. Download the mysql repo source $ wget http://r...
First you need to install Vue-cli: npm install -g...
1. Use CSS Copy code The code is as follows: style...
Table of contents need Get data and submit Templa...
1. What is phantom reading? In a transaction, aft...
Software Version Windows: Windows 10 MySQL: mysql...
Install Enter the following command to install it...
Table of contents Overview Solution 1: Closures S...
question Recently I needed to log in to a private...
The cursor size in the input box is inconsistent T...
Table of contents BOM (Browser Object Model) 1. W...
premise In complex scenarios, a lot of data needs...
Everyone knows that images on web pages are genera...
1. Percentage basis for element width/height/padd...