LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-16-2004, 10:43 AM   #1
harrycrumb11
Member
 
Registered: Aug 2003
Location: New York
Distribution: Redhat 9
Posts: 36

Rep: Reputation: 15
command to check hardware


I'm pretty new to linux. Just wondering if there is a command for linux to print up a list of hardware specs on a computer, also giving information on if the hardware is working properly or not. I'm using Knoppix 3.3. Thanks in advance.
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 01-16-2004, 11:22 AM   #2
fancypiper
LQ Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 60
You mean you don't know what hardware is in your computer? Here are a few bash commands for finding out stuff.

Handy bash commands for finding out stuff in Linux:
# Find CPU specifications
cat /proc/cpuinfo

# Find running kernel version
uname -r

# What compiler version do I have installed
gcc -v
gcc --version

# What is the running kernel and compiler installed
cat /proc/version

# Find X server version
X -showconfig

# What pci cards are installed and what irq/port is used
cat /proc/pci

# What kernel modules are loaded
lsmod

# Memory and swap information
cat /proc/meminfo
free
An article: Tips for Optimizing Linux Memory

# How are the hard drives partitioned
fdisk -l

# How much free/used drive space
df -h

# Show disk usage by current directory and all subdirectories
du | less

# What takes up so much space on your box
# Run from the directory in question and the largest chunk shows up last
find $1 -type d | xargs du -sm | sort -g

# What is the distribution
cat /etc/.product
cat /etc/.issue
cat /etc/issue
cat /etc/issue.net
sysinfo

# For finding or locating files
find
locate
which
whereis

# Use dmesg to view the kernel ring buffer (error messages)
dmesg | less

# Watch error messages as they happen (sysklog needed)
as root, tail -f /var/log/messages (shows last 10 lines, use a number in front of f for more lines)

# What processes are running
ps -A

# Find a process by name
ps -ef | grep -i <plain text>
For example, XCDroast
ps -ef xcdroast

# See current environment list, or pipe to file
env | more
env > environmentvariablelist.txt

# Show current userid and assigned groups
id

# See all command aliases for the current user
alias

# See rpms installed on current system
rpmquery --all | less
rpmquery --all > <filename>
rpmquery --all | grep -i <plaintext>

Autospec for tarballs
RPM tools

# What directory am I using
pwd

# Get ls colors in less
ls --color=always | less -R

Look at man <command> or info <command> for the flags I used and for other options you can use for bash commands.

Last edited by fancypiper; 01-16-2004 at 11:24 AM.
 
2 members found this post helpful.
Old 08-01-2012, 12:14 PM   #3
Techsystemquery
LQ Newbie
 
Registered: Jul 2010
Posts: 12

Rep: Reputation: 0
you can try below commands to get hardware details.
lspci
/proc
dmidecode
hwinfo

This article which I referred have linux hardware information
 
Old 08-01-2012, 12:21 PM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Thanks for the great link!! I want to find the GUI version of lshw!!

Normally, it's not good to reopen (very) old threads----but I think this is an exception.
 
Old 08-03-2012, 02:06 AM   #5
techguru666
LQ Newbie
 
Registered: Jul 2012
Posts: 24

Rep: Reputation: Disabled
Quote:
I'm pretty new to linux. Just wondering if there is a command for linux to print up a list of hardware specs on a computer, also giving information on if the hardware is working properly or not. I'm using Knoppix 3.3. Thanks in advance.
This is a nice tutorials for hardware related commands:
http://www.expertslogin.com/linux-ad...dware-details/
 
1 members found this post helpful.
Old 08-04-2012, 05:16 PM   #6
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by harrycrumb11 View Post
I'm pretty new to linux. Just wondering if there is a command for linux to print up a list of hardware specs on a computer, also giving information on if the hardware is working properly or not. I'm using Knoppix 3.3. Thanks in advance.
Have a gander at http://cb.vu/unixtoolbox.xhtml
 
1 members found this post helpful.
Old 11-19-2012, 01:03 PM   #7
fakie_flip
Senior Member
 
Registered: Feb 2005
Location: San Antonio, Texas
Distribution: Gentoo Hardened using OpenRC not Systemd
Posts: 1,495

Rep: Reputation: 85
There are a number of ways to check what hardware you have in Linux. These are all important to know when configuring a kernel from source before compiling it. I will be covering commands for finding hardware information because that's what you asked for, not information about your software like the first guy posted.

Code:
lspci
lsusb
lshw
cat /proc/cpuinfo
hwinfo
dmidecode (run as root)
There may be more that are just a google search away, and they might just give you the same info as the ones above do.

To see drivers (kernel modules) in use, use

Code:
lspci -nnk
On my machine, here is a snip of the output.

Code:
00:14.2 Audio device [0403]: ATI Technologies Inc SBx00 Azalia (Intel HDA) [1002:4383]
        Subsystem: ASUSTeK Computer Inc. Device [1043:8249]
        Kernel driver in use: snd_hda_intel
        Kernel modules: snd-hda-intel
You can see the kernel module (driver) in use is snd-hda-intel. This is extremely useful when compiling a kernel to know what to include in your kernel config. Most everything should be compiled directly into the kernel for your specific hardware. That will result in a much faster more efficient kernel.

For a few devices that are not always in use such as my usb webcam, I left it as a module, so that it only loads when in use. This is just my preference. You can do it either way.

If you plugin hardware such as a usb device while Linux is running, information about it will show in

Code:
dmesg | tail

Last edited by fakie_flip; 11-19-2012 at 01:05 PM.
 
Old 11-19-2012, 01:07 PM   #8
fakie_flip
Senior Member
 
Registered: Feb 2005
Location: San Antonio, Texas
Distribution: Gentoo Hardened using OpenRC not Systemd
Posts: 1,495

Rep: Reputation: 85
Quote:
Originally Posted by pixellany View Post
Thanks for the great link!! I want to find the GUI version of lshw!!
lshw -html > myhardware.html

Now you can open that file with a GUI such as firefox or your web browser of choice.
 
1 members found this post helpful.
Old 11-26-2013, 05:25 PM   #9
Techsystemquery
LQ Newbie
 
Registered: Jul 2010
Posts: 12

Rep: Reputation: 0
Linux hardware details

Sorry I mean to edit a different thread. Not sure how to delete this now :-)

Last edited by Techsystemquery; 11-26-2013 at 05:36 PM.
 
Old 11-26-2013, 07:32 PM   #10
Spect73
Member
 
Registered: Aug 2013
Distribution: Slackware 14.1
Posts: 128

Rep: Reputation: Disabled
Quote:
Originally Posted by Techsystemquery View Post
Sorry I mean to edit a different thread. Not sure how to delete this now :-)
Hey, I'm glad you got the wrong thread! Looking over this older stuff, I learned something new. Thanks

Coordially,
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a single command to list all hardware installed (command line)? davee Linux - Hardware 6 02-28-2009 07:19 PM
Stuck on the hardware check... wildrider30 Fedora - Installation 1 04-15-2006 01:20 AM
Hardware check? General Linux - Hardware 2 10-15-2005 12:12 PM
Check the hardware information ust Linux - General 3 12-12-2003 06:03 AM
Hardware check joeblack Linux - Newbie 2 10-24-2003 03:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration