Investigating hardware resources

linux-penguinSometimes you'll need to know what hardware resources are available on your Linux system.  This article describes some common methods for gathering this information.

 


Terminal Session

Start a terminal session and run the following commands to access the required information...

 

To discover the number of processors

$ cat /proc/cpuinfo | grep processor | wc -l

 

Memory details.

$ less /proc/meminfo

Press q to quit the less environment.

 

Hard drive usage.

$ df -h

 

How many NICs.

$ vi /etc/network/interfaces

 

Installed applications.

$ aptitude

 

Ubuntu version.

lsb_release -a

 

Debian version.

vi /etc/os-release

 

Apache version.

apache2 -v

 

PHP version.

php -v

 

MySQL version.

mysql -u root -p

Enter your MySQL root password, and type exit when you're finished.

 

List PCI hardware

$ lspci -tv

 

Thanks for visiting.