How to check free space in CentOS?
To check the available space on CentOS, you can use the following command:
- The df command, specifically df -h, provides information on the usage and available space of file systems in a readable format for humans. It shows the space usage and availability for each mounted point.
- The “du” command can be used to check the disk usage of a specified directory or file in a human-readable format by using the command: “du -sh
“. - To analyze disk usage, you can use the ncdu command, which is a more advanced tool that displays directory usage in an interactive interface. To install it, use the following command: sudo yum install ncdu, then open the analysis interface with the ncdu command.
- Using graphical tools: If you are using the graphical interface of CentOS, simply open the file manager, right-click on the directory you want to view, select the “Properties” or “View Properties” option, and you can see the free space of that directory.