How To Mount New Disk In Linux

Linux is a versatile operating system, and with this versatility comes the need to add or mount new storage options, such as hard drives or SSDs. In this blog post, we will guide you through the process of how to mount a new disk in Linux.

Steps to Mount a New Disk in Linux

Mounting a new disk in Linux involves three basic steps: Identifying the disk, creating a mount point, and mounting the disk.

Step 1: Identify the Disk

First, you need to identify the new disk that you want to mount. You can use the fdisk command to list the disks attached to your system. Here is what you need to type into the terminal:

sudo fdisk -l

This command will list all the partitions on all the drives on your computer. Find your new disk in this list. It will probably follow the naming convention /dev/sdx.

Step 2: Create a Mount Point

Before we can mount the new disk, we need to create a mount point. The mount point is simply a directory where you want the new disk to appear. You can create a new directory using the mkdir command, like this:

sudo mkdir /mnt/my_new_disk

Step 3: Mount the Disk

Now that we have a mount point, we can mount the new disk. This is done with the mount command, like this:

sudo mount /dev/sdx /mnt/my_new_disk

Replace /dev/sdx with the path to your new disk, and replace /mnt/my_new_disk with your desired mount point.

Automatically Mounting at Boot

If you want your new disk to be automatically mounted every time you boot your computer, you will need to edit your /etc/fstab file. Here is an example line that you can add to this file:

UUID=123456789abcdef0 /mnt/my_new_disk ext4 defaults 0 2

Replace UUID=123456789abcdef0 with the UUID of your new disk, and replace /mnt/my_new_disk with your desired mount point. You can find the UUID of your disk with the following command:

sudo blkid

That’s it! You have successfully mounted a new disk in Linux. Remember to replace example paths and UUID with those specific to your system. If you found this article helpful, share it with others who might also benefit from it. Happy Linux-ing!