Hey guys, I'm fairly new to using linux however I need to know a few things. (I'm very aware there are examples on the web for most of these, but I want to know how you guys personally prefer to go about these)

1) Find hard drive serial (SCSI) without the use of sdparm
2) Find Ip Address of the current machine
3) Find the machine name of the current machine
4) Find the operating system of the current machine


My findings for this are:
1) (unsure)
2) ifconfig | grep "inet addr"
3) hostname
4) uname -a


Do you guys have better ways of finding these things? Also are my findings correct?

Recommended Answers

All 4 Replies

Alternativs:
3) uname -n
4) uname -s

grep is a command that returns a string with the desired text.
In my case the command ifconfig | grep "inet addr" gives me the same result as ifconfig | grep "inet" but ifconfig | grep "addr" gives an other result.

As long as you are not logged in as root or uses the sudo command you can play around and look at what you get for result.

Look in man pages to learn more.

for example ifconfig man
gives you information about ifconfig

and man man
gives you information about man pages

Quite from man pages with the Q key.

Use -help to show you more.
for example ifconfig -help
shows you available parameters like -a, -v, -s and what they stand for

Good luck :D

Thanks bud I'll check out the man pages, anyone know anything about question #1?

I am not sure this will work with SCSI but you could try.
It is a big i not a small L after hdparm -
sudo hdparm -I /dev/sda

( -I gives you detailed/current information directly from drive)

You can also search for scsi_id commands but they do not work on my computer so I can not help you with them.

I am not sure this will work with SCSI but you could try.
It is a big i not a small L after hdparm -
sudo hdparm -I /dev/sda

( -I gives you detailed/current information directly from drive)

You can also search for scsi_id commands but they do not work on my computer so I can not help you with them.

Yeah I had tried hdparm at the time that I had tried sdparm as well. Also scsi_id didn't work either. I had tried all three and was searching for alternatives, but after numerous pages through google I couldn't find much about it.

Thanks for your help sneaker, for now I think I'll have to find a way of installing sdparm.

I'll mark this solved for the time being

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.