![]() ![]() Of course, there can be more ways and tools to check disk space. You can search for it in the menu of your desktop Linux system. I think all major desktop environments have some sort of graphical tool to check the disk usage on Linux. If a partition is not mounted, mount it first by clicking the ‘play’ icon. Select a partition to see the free disk space. Otherwise, the GNOME Disks utility is also a pretty handy tool. Disk usage check Checking free disk space with GNOME Disks utility It displays the disk usage for all the mounted partitions. You may have to mount some partitions by clicking on them. You’ll see all the actual disks and partitions here. Method 3: Check free disk usage graphicallyĬhecking free disk space graphically is much easier in Ubuntu with the Disk Usage Analyzer tool. For other Linux distros, you can refer to its GitHub releases section. dust → An interesting alternative to the du command written in Rust, available for Arch Linux in the repositories.fdisk -l →Shows disk size along with disk partitioning information (may require sudo privileges).stat →Displays the size and other stats of a file/directory or a file system.ls -al →Lists the entire contents, along with their size, of a particular directory.du -s Provides the total disk space used by a particular file or directory.du -h → Shows disk usage in human-readable format for all directories and subdirectories.While df command is quite popular and should be enough for the use case, there are other alternatives that you can try including: Method 2: Using du, ls, and Other Commands I hope this gives you a pretty good idea about checking hard drive space on Linux. Once you have the disk partition name, you can mount it in this fashion: sudo mount /dev/sdb2 /mnt You can use the lsblk command to see all the disks and partitions on your system. It shows additional disks only when I mount them explicitly. If you are using more than one Linux distribution (or operating systems) on the same disk or you have multiple disks on your system, you need to mount them first in order to see the free space available on those partitions and disks.įor example, my Intel NUC has two SSDs and 4 or 5 Linux distributions installed on them. Keep in mind that the df command only shows disk space for mounted filesystems. Since they are under root, you don’t need to count their used disk space separately.Īnd, if you want to view the disk usage with more details like filesystem type and blocks, you can use the command: df -T Missing disk space? Check if you have mounted all disks and partitions With the loop devices, snap applications are sandboxed in their own virtual disk. Loops are virtual devices that allow normal files to be accessed as block devices. You’ll see plenty of them while checking disk space in Ubuntu because of snap applications. udev: The udev filesystem is used for storing information related to devices (like USB, network card, CD ROM etc) plugged to your system.You can ignore this virtual filesystem comfortably. tmpfs: The tmpfs (temporary filesystem) used for keeping files in virtual memory.If you have 2-3 big partitions (like root, home etc), you’ll have to make a calculation here. In my case, I have used 41% of the 232 GB of disk space under root. ![]() Root is mounted on /, EFI in /boot/EFI etc. You could identify which partition is used for what purpose from its mount point. In such cases, these partitions are reflected with a number at the end of the ‘disk name’, like /dev/sda1, /dev/nvme0n1p2 etc. Your Linux system might have several partitions on your disk for boot, EFI, root, swap, home etc. This is not a hard and fast rule but it gives you an indication to easily recognize the actual disk from the crowd. Your actual disks should normally be listed as one of the following: When you use the df command to check disk space, it will show a bunch of ‘file systems’ with their size, used space and free space. Method 1: Checking free disk space in Linux with df command (and understanding its output) With the information you gather, you can go about making some free space on Ubuntu. Using alternative commands like du and dust.I’ll also show the GUI method for desktop Linux users. I’ll explain a few things about checking available disk space on Linux. If the above output is confusing for you, don’t worry. Here’s the output of the df command for my Dell XPS system that has only Linux installed with encrypted disk: Checking free disk space with df command in Linux With -h option, it shows the disk space in human-readable format (MB and GB). The df command stands for disk-free and quite obviously, it shows you the free and available disk space on Linux systems. The simplest way to find the free disk space on Linux is to use df command. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |