Need help with re-sizing file system

Installed Mate for Pi2 today. Everything is working. Great. Except the micro SD
card is unallocated totally.

I looked at the re-sizing commands:
Re-size file system

There are no utilities included for automatic file system re-sizing. However, it’s not hard to do manually. Once booted:

sudo fdisk /dev/mmcblk0

Delete the second partition (d, 2), then re-create it using the defaults (n, p, 2, enter, enter), then write and exit (w). Reboot the system, then:

sudo resize2fs /dev/mmcblk0p2

I am sorry, I do not understand them. fdisk does not provide a partition table.
Is (d, 2) a command? When do I enter it with parentheses or without? What is the command syntax to re-create the second partition?

you can use, ‘sudo raspi-config’ OR

When you type sudo fdisk /dev/mmcblk0, the prompt becomes command (m for help): type d enter then 2 enter then n enter p enter 2 enter, enter, enter. then write, exit and reboot. The do the next command, sudo resize2fs /dev/mmcblk0p2 You will see (use df -h) that the size is extended.

In fdisk lingo, the commands mean: delete partition #2, make a new partition, primary, #partition, do, do, write the partition table, and exit.

HTH

See Rasberry PI2 file system resizing

Thanks, Milliways and pavlos_kairis for the help.
Everything worked perfectly. Now I have problems with video performance.
Will open a new topic.

now why isn’t that in the gray window?? I totally ignored that line , corrupted the OS twice today and —Delete the second partition (d, 2), then re-create it using the
defaults (n, p, 2, enter, enter), then write and exit (w). Reboot the
system, then:---- is not in the commands window. sigh. Thanks for explaining it better than the intro page. so here I go again try 3. Third times a charm??

My bad choice of words … the first section (fdisk) modifies the partition table for partition 2 to extend all the way to the end of the disk. The second section (resize2fs /dev/mmcblk0p2) actually makes a file system out of partition p2.

The raw device is mmcblk0, the partitions are mmcblk0p1 (/boot) and mmcblk0p2 (the rest). You can ‘man resize2fs’ to understand the command resize2fs …