Business Management | Editors Column | Hosting Customers | Interviews & PR | Marketing/Advertising | Online Marketing/SEO | Web Hosting | Web Hosting Reviews

Web Hosting Reviews and Tutorials

Unlimited Web Hosting for under $4? Check out "Just Host" - Click here

How to check the disk space on a Linux server?

by WHRKIT on April 21, 2006

How to check the disk space on a Linux server?



Keeping an eye on disk space usage is critical for a server to stay healthy. The last thing a system admin wants is a system to run out of disk space. So, how does a Linux System Administrator checks his server for used and available disk space? Use Putty or your favorite SSH client and logon to your server. Switch to the root user once you are logged.



Then execute the following command:



root@server [~]# df



This command will show you the disk space among your partitions in KB size.



Sample Output:

Filesystem           1K-blocks      Used Available Use% Mounted on

/dev/hda3             37167560  14344212  20935312  41% /

/dev/hda1               256667     27790    215625  12% /boot

/dev/hdc1             38464340  16535548  19974888  46% /backup

none                    766696         0    766696   0% /dev/shm

/dev/tmpMnt             806288     17416    747912   3% /tmp



If you want to see your server disk space in Gigabyte data change the command as shown in our next example:



root@server [~]# df -h



Sample Output:

Filesystem            Size  Used Avail Use% Mounted on

/dev/hda3              36G   14G   20G  41% /

/dev/hda1             251M   28M  211M  12% /boot

/dev/hdc1              37G   16G   20G  46% /backup

none                  749M     0  749M   0% /dev/shm

/dev/tmpMnt           788M   18M  731M   3% /tmp



I make it a habit to check servers whenever I log into one via SSH. Next to using the "top" command, checking the disk space is one of my high priority items.

 

Related posts:

  1. How to check the port speed and duplex setting (Linux)?
  2. Linux Tutorial: How to change the IP ADDRESS on a Linux machine
  3. Automating Tasks in Linux using Cron
  4. Linux Server Load Averages Explained
  5. How to Secure your Dedicated Server (RedHat Linux + Cpanel)
  6. Deactivating Telnet on a Red Hat Linux server
  7. Linux Runlevels

Leave a Comment

Previous post:

Next post: