Most Linux systems comes with a program called df, that stands for “disk free”. It displays the disk usage and available space for each disk that you have mounted in your system.
$ df -h Filesystem Size Used Avail Use% Mounted on /dev/nvme0n1p2 453G 19G 412G 5% / /dev/nvme0n1p1 511M 51M 461M 10% /boot/efi
Option -h here means human-readable format. When you use it, the results are displayed in megabytes (M), gigabytes (G), etc. instead of bytes.
If you like to check only one partition, like the root partition (/), you can specify it as an argument:
$ df -h / Filesystem Size Used Avail Use% Mounted on /dev/nvme0n1p2 453G 19G 412G 5% /
For modifying the output, you can use –output option and provide column names to be included as a comma-separated list.
$ df --output=target,avail / Mounted on Avail / 431122336
Valid column names are: source, fstype, itotal, iused, iavail, ipcent, size, used, avail, pcent, file and target.