Posted: . At: 4:59 PM. This was 11 years ago. Post ID: 4991
Page permalink. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters.
These cookies expire two weeks after they are set.

Useful commands for getting information about your computers memory status and hard drives.

This command used with grep will return information about your computers memory.

jason@jason-desktop:~/Documents$ cat /proc/meminfo | grep Total
MemTotal:       12219468 kB
SwapTotal:      70311928 kB
VmallocTotal:   34359738367 kB
CmaTotal:              0 kB
HugePages_Total:       0

If you want to list all of the hard disk partitions on your Linux system then this command is for you.

jason@darkstar ~ $ sudo /sbin/fdisk -l

Use this command on a Linux system to list all of the supported file-systems available for mounting partitions on your Linux system.

jason@jason-desktop:~/Documents$ cat /proc/filesystems

Use the fdisk -l command to list all partition names on your machine, if they are mounted or not.

jason@jason-desktop:~/Documents$ sudo fdisk -l | grep '^/dev' | cut -d' ' -f1
/dev/sda1
/dev/sda2
/dev/sda3
/dev/sda4
/dev/sda5
/dev/sda6
/dev/sdb1
/dev/sdc1
/dev/sdd1
/dev/sdd2
/dev/sdd3
/dev/sde1s

And the du command is very useful for returning how much disk space a certain directory takes up.

jason@jason-desktop:~/Documents$ du -h ~/Documents/ | tail -n 1
7.2G	/home/jason/Documents/

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.