Why Memory Usage is Important?
Nowadays we know the importance of open source software and their uses. Linux I also an open-source and licensed operating system. Similar to windows OS Linux also need some memory for its primary files. There are three types of memory in Linux.
- Memory for root
- Memory for Swap Area
- Memory for Home Directory
The use of Linux or command line operating system in server-side is very important and almost big data centres and cloud computing is based on open-source operating systems or and software. The file management of Linux is very fast and well designed. You can check the hierarchical structure of files in Linux using “ tree ” command. You check your free and useable space in Linux using commands and also graphical user interface. In this article, I will introduce some commands with examples to check the memory space in Linux.
Check Disk Space in Linux ( Ubuntu, Fedora, Mint etc)
- If you want to see the useable and free space in your Linux Operating System “ df ” command is very useful.
- Linux also provides a command “ du ”to check the useable space with specific subdirectory and some important and unimportant files.
- btrfs fi df /device/ also an important command for checking useable space based on the file system
How to Check Disk Space in Linux for Directory
The df command is the device I first used to discover drive area on Linux, way again in the Nineteen Nineties. It’s quite simple in both utilization and reporting. To at the moment, df is my go-to command for this undertaking. if you want to see the disk space ( free and usage ) space then df command is very useful. (Subcommands with df are given below).
- df command
Above is the simple df command without any parameter.
- df -H
df command with – H: the output of the df – H is consist of these important fields.
- Source –> complete file system source
- SIZE --> all the blocks in your memory
- USED –> used space of your PC
- avail –> avail means available space on your drive
- pcent –> pcent means per cent of your space in percentage from usage memory
- target –> drive point
Our next command is du. As you might assume, that stands for disk utilization. The du command is pretty one-of-a-kind to the df command, in that it reviews on directories and no longer drives. Because of this, you’ll need to understand the names of directories to be checked. Let’s say I actually have a listing containing virtual gadget documents on my gadget.
- du -h /your complete path
The output of the du –h command is something like this:
So ways, this command isn’t all that helpful. What if we need to realize the overall usage of a specific directory? Fortunately, du can handle that assignment.
- du -sh /your complete path
The output of this command is:
- du -a /your Complete path | sort -n -r | head -n 10
This command is also important for checking the memory usage in Linux.
How do I check disk space in Unix?
Unix command to check disk space: df command – Shows the amount of disk space used and available on Unix file systems. du command – Display disk usage statistic for each directory on Unix server.
How do I check my disk space?
- Open the System Monitor application from the Activities overview.
- Select the File Systems tab to view the system’s partitions and disk space usage. The information is displayed according to Total, Free, Available and Used.
How do I free up disk space on Linux?
- Get to the root of your machine by running cd /
- Run sudo du -h –max-depth=1.
- Note which directories are using a lot of disk space.
- cd into one of the big directories.
- Run ls -l to see which files are using a lot of space. Delete any you don’t need.
- Repeat steps 2 to 5.
What is using disk space Linux?
Size — gives us the total size of the specific file system. Used — shows how much disk space is used in the particular file system. Available — shows how much space is left in the file system. Use% — displays the percentage of disk space that is used.
How find large files in Linux?
- Open the terminal application.
- Login as root user using the sudo -i command.
- Type du -a /dir/ | sort -n -r | head -n 20.
- du will estimate file space usage.
- sort will sort out the output of du command.
- head will only show top 20 largest file in /dir/
What is the disk space?
How can I increase disk space?
- Uninstall unnecessary apps and programs.
- Clean your desktop.
- Get rid of monster files.
- Use the Disk Cleanup Tool.
- Discard temporary files.
- Deal with downloads.
- Save to the cloud.