![]() The du command lists all of the files and directories in the target directory and displays their disk usage in kilobytes. sudo du /etc/systemdĤ /etc/systemd/system/Ĥ /etc/systemd/system/Ĥ /etc/systemd/system/Ĥ /etc/systemd/system/ ![]() This command summarizes the space usage for a specified directory or the current directory if none is specified. Use the du command to analyze disk space at a more granular level. How to Check Linux Disk Space with the du Command The above command is equivalent to sudo df -h /. You can also use the df command to target a specific drive, using either its “Filesystem” or “Mounted on” description from the columns above. sudo df -hįilesystem Size Used Avail Use% Mounted on This option displays disk space in kilobytes (K), megabytes (M), and gigabytes (G). ![]() To make the output from df easier to read, you can add the -h option. Each “block” in the above output represents one kilobyte. The df command (short for “disk free”) shows each drive’s disk size, space used, and free space. sudo dfįilesystem 1K-blocks Used Available Use% Mounted on Use the df command to view your system’s available disk space for each drive. How to Check Linux Disk Space with the df Command ![]() These commands provide a high-level view of your whole system’s available disk space and the disk usage within particular directories. Linux systems have two commands readily available for checking your disk space. This guide shows you how to use those commands to get a closer look at your disk usage and start freeing up space. Linux provides several built-in commands for analyzing and cleaning up your system’s disk space. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |