Mount Hard Drive in Ubuntu User Directory
To mount the hard drive to the user directory, first you need to determine the device name of the hard drive. You can use the following command to view it:
sudo fdisk -l
Then create a directory as the mount point, for example, creating a folder named “data” in the user directory.
mkdir ~/data
Next, you can use the following command to mount the hard drive to the newly created folder:
sudo mount /dev/sdX ~/data
The device name for the hard disk is “/dev/sdX”, which can be replaced according to the actual situation. After mounting successfully, you can access the files on the hard disk in the “~/data” directory. If you want the hard disk to be automatically mounted every time the system starts up, you can add the mounting information to the “/etc/fstab” file.