RSS Subscription
Linux Howtos & Tutorials

Enter your email:

Delivered by


NOTE:New tutorials are from LinuxCareer.com

Poll

Do you own or wish to have iPhone?
 


Linux eBooks FREE Download
A guide to programming Linux kernel modules
Introduction to Linux - A Hands on Guide
A Newbie's Getting Started Guide to Linux

Linux from Scratch - Create Your Own Linux System - Free eBook

Linux: The Hacking Solution (v.3.0)

SQLite 3 with PHP Essential Training – Free Video Training Tutorials

This guide will introduce you to the world of GNU/Linux

The GNU/Linux Advanced Administration

A Complete Beginner's Manual for Ubuntu 10.04 (Lucid Lynx)

Advanced Bash-Scripting Guide

Set up, maintain, and secure a small office email server

Partner Linux Sites:
How-To.LinuxCareer.com
Jobs.LinuxCareer.com
TuxMachines
Monsterb
LinuxBloggers
AdamsInfo
LinuxScrew
All For Linux

Getting to know the hardware of your Linux box

Article Index
1. What hardware is in my Linux box:
2. What hardware is using which module.
3. BIOS
4. Retrieve information about your motherboard only:
5. What USB devices are plugged in:
6. Get USB disk device files
7. Hard drive model
8. Hard drive speed
9. Graphic card information:
10. Check the size of the hard drive and partitions
11. Locate CD/DVD-ROM device file:
12. Modules
13. Check for PCMCIA cards:
14. Processor type and socket
15. RAM
16. Sound Card
17. Available wireless cards:
18. What speed is set to FANs:
19. Battery
20. List Plug and Play BIOS device

When you buy a new PC, laptop or server and install a Linux you want to know what hardware is actually in the Linux box and more importantly which piece of hardware is supported by the kernel out of the box and which needs special tweaking with modules to get it work. Here is a list of commands which should help you to troubleshoot your hardware and find some information about it. This is not a ultimate troubleshooting guide but certainly will serve as a good starting point.

NOTE: some commands may not be avaiable for your platform after default installation as well as some commands may be distribution specific only.

1. What hardware is in my Linux box:

$ lspci

or

# dmidecode

2. What hardware is using which module.

NOTE:Root permissions are needed to execute this command:

# lspci -v

or

# lspci -vvv

or

# hardinfo

or

$ hardinfo ( GUI )

or

# lshw

or

# lshw-gtk  ( GUI )

or

# hwinfo

3. BIOS

Retrieve BIOS information:

# biosdecode

Retrieve BIOS vendor information:

# dmidecode -s  bios-vendor

4. Retrieve information about your motherboard only:

# dmidecode --type baseboard

5. What USB devices are plugged in:

$ lsusb

6. Get USB disk device files

ls -la /dev/disk/by-id/usb-*

7. Hard drive model

hdparm -I /dev/sdx

8. Hard drive speed

hdparm -tT /dev/sdx

9. Graphic card information:

$ lspci | grep VGA

10. Check the size of the hard drive and partitions

Check the size of the hard drive and what hard drives are available in the system.

This command will also list USB drives and sticks. You need a root permissions to execute this command:

# fdisk -l | grep GB

Check what partitions and file system is in use on my hard drives:

# fdisk -l

11. Locate CD/DVD-ROM device file:

$ wodim --devices

or

$ wodim --scanbus

12. Modules

What modules are currently loaded:

$ lsmod

get a information about any particular module:

$ /sbin/modinfo module_name

remove modules:

# modprobe --remove module_name

load a modules to the kernel:

# modprobe module_name

What hardware is using which module.

NOTE:Root permissions are needed to execute this command:

# lspci -v

or

# lspci -vvv

13. Check for PCMCIA cards:

# lspcmcia

14. Processor type and socket

$ cat /proc/cpuinfo

or

# dmidecode --type 4

Is my processor using 32 or 64 bit instruction set:

$ cat /proc/cpuinfo | grep flags | grep lm

if you get some output you have 64 bit if no output is presented you are using 32 or even 16 bit CPU. NOTE: grep command looks for lm flag.

Retrieve CPU / Processor socket type:

x86info -a 2> /dev/null | grep Connector | uniq

15. RAM

How much RAM is installed in my Linux and how much of it is in use ( mega bytes ).

It will also include swap memory:

$ free -m

or

$ top

or

$ cat /proc/meminfo

Detect number of RAM slots used, speed, and size:

# lshw -C memory -short

or

# dmidecode -t 17

16. Sound Card

Check sound card settings. This command will reveal whether your sound card is installed and what modules are in use:

$ cat /dev/sndstat

17. Available wireless cards:

$ iwconfig

18. What speed is set to FANs:

$  cat /proc/acpi/ibm/fan

19. Battery

Get a battery information on your laptop:

$ powersave -b

20. List Plug and Play BIOS device

# lspnp

Share this linux post:

Submit Getting to know the hardware of your Linux box in Delicious Submit Getting to know the hardware of your Linux box in Digg Submit Getting to know the hardware of your Linux box in FaceBook Submit Getting to know the hardware of your Linux box in Google Bookmarks Submit Getting to know the hardware of your Linux box in Stumbleupon Submit Getting to know the hardware of your Linux box in Technorati Submit Getting to know the hardware of your Linux box in Twitter
 
Comments for this page are closed !!!
Please visit our new Linux Forum for additional help or discussion.


Linux eBooks FREE Download