How to check disk space?

To check disk space in a Linux environment, you can use the df command. Here are some common usages:

  1. Check overall disk space:

    df -h
    

    The -h option makes the output human-readable, showing sizes in KB, MB, or GB.

  2. Check disk space for a specific directory: For example, to check the disk space for your home directory:

    df -h ~
    
  3. Check disk space for another specific directory: For example, to check the disk space for the /tmp directory:

    df -h /tmp
    

These commands will provide you with information about the total size, used space, available space, and usage percentage for the specified filesystems.

0 Comments

no data
Be the first to share your comment!