Before, when installing the system for Kali, 40G disks were allocated, but as more and more files are stored in Kali, kali's disk possession is no longer enough. So how to expand the kali disk?
First, let’s take a look at the remaining space of this unit.
df
As you can see, disk ownership has accounted for 100%.
Allocate space to kali
Run the virtual machine settings, click Add below - Add Hard Drive
Here I am adding 10G capacity
Execute the following command in the terminal
fdisk -l Here we see the 10G capacity hard disk we just added.
Next we need to partition /dev/sda
Execute the command
fdisk /dev/sda
Format partition
mke2fs -t ext4 /dev/sda
mount disk
At this time, I want to mount the /root directory of 10G capacity
Execute the command
mount /dev/sda /root, but this can only be used once, that is, our mount will be lost after the PC is restarted, and we can set the configuration file
Modify the configuration file
The format is as follows:
UUID=Mount directory File system format Permanent Whether to backup Whether to self-check
UUID is available through blkid
vim /etc/fstab
In this way, we have completed the expansion of the disk
Recommended Comments