> For the complete documentation index, see [llms.txt](https://cyber-salih.gitbook.io/cyber-salih/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cyber-salih.gitbook.io/cyber-salih/linux/how-to-expand-disk-on-kali-linux-vmware.md).

# How to expand disk on Kali Linux (VMware)

This guide will show you how to expand your disk space in your Kali Linux VMware machine.

{% embed url="<https://www.youtube.com/watch?t=15s&v=NwpzYlfKnrY>" %}
Video is more beginner friendly
{% endembed %}

### VMware Settings

Go into "Edit Virtual Machine Settings" in your VMware workstation player.&#x20;

Click on Hard Disk (SCSI) then click expand&#x20;

![](https://3723932848-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1P6amPpfWNCXg1eX0CGg%2Fuploads%2FpllbloecjpW5H1z0aek9%2F7.png?alt=media\&token=ea7052e2-b0d3-4223-a928-e1b181e5d2a7)

Type in the disk size you would like to increase it to. E.g. I did 200GB (which is adding 120GB to the default 80GB).

You should receive this message

![](https://3723932848-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1P6amPpfWNCXg1eX0CGg%2Fuploads%2FDOCK6U13hV2RuKEfhpnP%2F8.png?alt=media\&token=ee932257-8cb8-4c83-8c62-e425a8447dd3)

The VMware settings are done, now we need to dive into the Linux machine and repartition the disk and expand the file system.&#x20;

### Linux disk repartitioning and expanding the file system

Sign in to your machine and make sure you are logged in as the 'root' user&#x20;

Then use the fdisk command shown below to check we did the hypervisor (VMware) settings correctly.

```
fdisk -l
```

![](https://3723932848-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1P6amPpfWNCXg1eX0CGg%2Fuploads%2FlreXdZZrWZmFJqTRAS7F%2F9.png?alt=media\&token=b578e6b5-3c54-49c5-998e-4f7629c4afe7)

As you can see we have a maximum capacity of 200GB in Disk /dev/SDA however, /dev/sda1 has a size of 80GB.

Next we need to use a tool called gparted which we can use to graphically manage our disk.&#x20;

It should be already installed, if not install it then type: gparted to launch it.&#x20;

```
gparted
```

In gparted right click on/dev/sda5 linux swap and select swapoff

Then right click on /dev/sda2 extended and click Resize/move

Expand the partition all the way across to the end. Confirm this after clicking Resize/move

Then right click /dev/sfa5 Linux swap and then resize/move

Drag this all the way across

Click OK and ignore the warning

right click on /dev/sda2 extended and then select Resize/Move

Rezise this so we create some unallocated space

On the 'Align to:' drop down select Cylinder

Now right click on /dev/sda1 ext4 and select Resize/Move

Apply all the operations by clicking the tick

The last step from here is to right click /dev/sda5 linux-swap and turn swap back on by selecting 'swapon'

Reboot your machine

Use the command

```
fdisk -l
```

to check if it has worked after reboot.&#x20;

{% embed url="<https://www.youtube.com/watch?t=15s&v=NwpzYlfKnrY>" %}
If you are still struggling watch this video
{% endembed %}
