Solved

Linux Command

Posted on 2009-07-10
8
1,021 Views
Last Modified: 2013-12-15
I have redhat linux server. I would like to know the hardware configuration of the server.
What is the command i should give so that it will give the hardware details of my server.
0
Comment
Question by:SrikantRajeev
8 Comments
 
LVL 1

Expert Comment

by:Avi000
ID: 24821866
lshw prints all the details, though it may not be installed.
0
 
LVL 1

Expert Comment

by:james2432
ID: 24821870
0
 
LVL 1

Accepted Solution

by:
lomaree earned 500 total points
ID: 24821878
Hi, basically there are many different command for different results.


# 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

HTH
0
 
LVL 1

Author Comment

by:SrikantRajeev
ID: 24821879
I am getting the below error

bash: lshw: command not found
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 7

Expert Comment

by:aamodt
ID: 24821887
lshw  ? or just install another hardware tool with your package manager.

Regards Aamodt
0
 
LVL 1

Expert Comment

by:james2432
ID: 24821905
that means that lshw is not installed on your computer
0
 
LVL 9

Expert Comment

by:michofreiha
ID: 24821971
try this

lspci -vv
0
 
LVL 1

Author Closing Comment

by:SrikantRajeev
ID: 31602009
Thanks
0

Featured Post

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

Suggested Solutions

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now