I have 2 drives one that shipped with my laptop and another I pulled from my old laptop that previously had Ubuntu on it. It's a few years old but I would like to extend my storage so I can stop getting the low disk storage message and then I can use my laptop for more school work and to help me start learning python. Is there any resources I can use to better understand how my Linux OS uses storage and how to better read and understand what I'm seeing here?
Disk /dev/loop0: 9.7 MiB, 9510912 bytes, 18576 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk /dev/loop1: 8.54 MiB, 8945664 bytes, 17472 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk /dev/loop2: 97.72 MiB, 102445056 bytes, 200088 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk /dev/loop3: 97.6 MiB, 101777408 bytes, 198784 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk /dev/loop4: 55.33 MiB, 58007552 bytes, 113296 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk /dev/loop5: 54.97 MiB, 57614336 bytes, 112528 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk /dev/loop6: 57.33 MiB, 60108800 bytes, 117400 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk /dev/loop7: 57.42 MiB, 60194816 bytes, 117568 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk /dev/nvme0n1: 238.49 GiB, 256060514304 bytes, 500118192 sectors Disk model: INTEL SSDPEKKW256G7 Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: EFA94F34-B396-44F6-9FEA-937E13C836EA Device Start End Sectors Size Type /dev/nvme0n1p1 2048 206847 204800 100M EFI System /dev/nvme0n1p2 206848 239615 32768 16M Microsoft reserved /dev/nvme0n1p3 239616 498006015 497766400 237.4G Microsoft basic data /dev/nvme0n1p4 498008064 500105215 2097152 1G Windows recovery environment Disk /dev/sda: 931.53 GiB, 1000204886016 bytes, 1953525168 sectors Disk model: ST1000LM014-1EJ1 Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disklabel type: dos Disk identifier: 0x9aa4dd4d Device Boot Start End Sectors Size Id Type /dev/sda1 * 2048 718847 716800 350M 7 HPFS/NTFS/exFAT /dev/sda2 718848 975417991 974699144 464.8G 7 HPFS/NTFS/exFAT /dev/sda3 975419392 976961535 1542144 753M 82 Linux swap / Solaris /dev/sda4 976963582 1953523711 976560130 465.7G 5 Extended /dev/sda5 976963584 1016023039 39059456 18.6G 83 Linux /dev/sda6 1016025088 1953523711 937498624 447G 83 Linux Partition 4 does not start on physical sector boundary. Disk /dev/loop8: 217.92 MiB, 228478976 bytes, 446248 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk /dev/loop9: 162.89 MiB, 170778624 bytes, 333552 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk /dev/loop10: 44.9 MiB, 47063040 bytes, 91920 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk /dev/loop11: 161.42 MiB, 169254912 bytes, 330576 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk /dev/loop12: 62.9 MiB, 65105920 bytes, 127160 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk /dev/loop13: 144.98 MiB, 151998464 bytes, 296872 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk /dev/loop14: 144.25 MiB, 151248896 bytes, 295408 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk /dev/loop15: 290.45 MiB, 304545792 bytes, 594816 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk /dev/loop16: 50.69 MiB, 53133312 bytes, 103776 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk /dev/loop17: 133.1 MiB, 139472896 bytes, 272408 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk /dev/loop18: 202.92 MiB, 212758528 bytes, 415544 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes
EDIT: This is what is shown when I use df -h. Definitely shows me more information and how my system is storing everything.
df -h Filesystem Size Used Avail Use% Mounted on udev 7.8G 0 7.8G 0% /dev tmpfs 1.6G 91M 1.5G 6% /run /dev/sda5 19G 15G 2.8G 85% / tmpfs 7.8G 299M 7.5G 4% /dev/shm tmpfs 5.0M 4.0K 5.0M 1% /run/lock tmpfs 7.8G 0 7.8G 0% /sys/fs/cgroup /dev/loop0 9.2M 9.2M 0 100% /snap/canonical-livepatch/95 /dev/loop3 98M 98M 0 100% /snap/core/9993 /dev/loop1 8.7M 8.7M 0 100% /snap/canonical-livepatch/90 /dev/loop2 98M 98M 0 100% /snap/core/10126 /dev/loop4 56M 56M 0 100% /snap/core18/1885 /dev/loop5 55M 55M 0 100% /snap/core18/1705 /dev/loop6 58M 58M 0 100% /snap/discord/112 /dev/loop7 58M 58M 0 100% /snap/discord/115 /dev/loop8 218M 218M 0 100% /snap/gnome-3-34-1804/60 /dev/loop9 163M 163M 0 100% /snap/gnome-3-28-1804/145 /dev/loop10 45M 45M 0 100% /snap/gtk-common-themes/1440 /dev/loop11 162M 162M 0 100% /snap/gnome-3-28-1804/128 /dev/loop12 63M 63M 0 100% /snap/gtk-common-themes/1506 /dev/loop13 145M 145M 0 100% /snap/notepadqq/855 /dev/loop14 145M 145M 0 100% /snap/notepadqq/841 /dev/loop15 291M 291M 0 100% /snap/vlc/1700 /dev/loop16 51M 51M 0 100% /snap/snap-store/481 /dev/loop17 134M 134M 0 100% /snap/notepadqq/115 /dev/loop18 203M 203M 0 100% /snap/vlc/1397 /dev/sda6 440G 52G 366G 13% /home tmpfs 1.6G 24K 1.6G 1% /run/user/127 tmpfs 1.6G 84K 1.6G 1% /run/user/1000 /dev/sda2 465G 303M 465G 1% /media/USER/HP_LNX /dev/nvme0n1p3 238G 94G 144G 40% /media/USER/Acer
Best Answer
A better way to understand disk space usage is to use the handy app
Disk Usage Analyzer
, or to usedf -h
anddu -h
, which will show you disk usage by different volumes and files. The main drives you are concerned about are those beginning with/dev/sd
. These are physical drives in your system (or partitions if they have a number at the end).If you would like to "extend your disk space" to another drive, you can look at RAID (to increase the size of your entire root filesystem, ans share the used space among both drives, allowing you to expand every folder). You could also simply plug in another hard drive and use it as such. For example, just store all your big files or python projects there (it would be mounted in
/media
by default, but this can be changed; see link below.). Another solution would be to move your home folder to another drive. Copy your files to another drive, and then set the other drive to mount in /home/username (see https://www.man7.org/linux/man-pages/man5/fstab.5.html). This would put everything in~
(Desktop, Downloads, Documents, etc) on your second hard drive.EDIT For understanding loop devices, see here.
EDIT 2 The output you added from
df -h
shows that you have two separate partitions: one for/
, and one for/home
. You have plenty of disk space available in/home
, which contains your Desktop, Documents, etc. You may be able to shrink this partition and allocate more to the rest of the system, but that would be a different question (that has probably already been answered).