I want to create a new partition. Where is the disk memory taken from? An existing partition? Or from memory that isn't partitioned and don't appear in this list?
It's taken from unpartitioned space, which is not shown in
df because the command only shows currently active (mounted) filesystems. If you want to see low-level partition details, install GParted.
Alternatively, try the following commands:
sudo parted /dev/sda print free
sudo fdisk -l /dev/sda
sudo gdisk -l /dev/sda
When you partition a disk, the partitions are created exactly as large as you tell them to be. They do not automatically grow to occupy the entire disk; instead, unused space remains just like that: unallocated.
For example, if you have a 1 TB disk, and create two 500 GB and 300 GB partitions, they will only occupy 800 GB together; the disk will still have 200 GB left "unallocated" and not used by the operating system.
│ Unallocated │
║ Partition 1 ║ Unallocated │
║ Partition 1 │ Partition 2 ║Unallocated│
If you want to create a third partition (let's say 100 GB), it will take from the unallocated space.
║ Partition 1 │ Partition 2 │Part3║Unall│
Some tools (such as GParted) allow filesystems inside the partitions to be resized, so if you decide you need a larger partition than the unallocated space you have, you can take from the existing partitions:
║ Partition 1 │Partition 2│ Partition 3 ║
Sometimes it gets more complicated – the unallocated space is not always at the end, for example, if you delete a partition from the middle, it becomes necessary to move a partition somewhere else:
║ Partition 1 ║ Unallocated ║Part2║Unall│
║ Partition 1 │Part2║ Unallocated │
Another question related - is the default partition I am using at "/" ? and where is the installation directory of linux located?
Depends on what you mean by "default".
/ is where most of the system is kept. (But some people keep
/var in separate partitions from
/; others have a single partition for the entire system. Linux doesn't care too much.)
There is no single "installation directory – almost all directories under
/ contain various parts of the system. Typically
/etc contains system configuration;
/usr – programs, libraries, and various read-only program data;
/var – variable data such as mail, websites (on a web server), databases (MySQL), downloaded packages (apt-get), and such – not all of them can be considered part of the OS.
In your case – yes,
/ contains both the operating system and your own files. The only exception is
/boot which contains the Linux kernel itself and – in your system – has a dedicated partition.