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

Posted: December 8, 2012. At: 4:59 PM. This was 5 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.

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.

[email protected]:~/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

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/

No comments have been made. Use this form to start the conversation :)

Leave a Reply