LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Hard drive serial Numbers. (https://www.linuxquestions.org/questions/linux-newbie-8/hard-drive-serial-numbers-4175417224/)

Lou898989 07-17-2012 12:02 PM

Hard drive serial Numbers.
 
Is there a command to list the hard drive serial numbers for the OS drives and an array? This is usefull for organizations who track serial numbers.

amani 07-17-2012 12:04 PM

hdparm, sdparm, gsmartctl, smartctl

Kustom42 07-17-2012 12:09 PM

I cant remember the exact syntax, but you can use the smartctl command.

I checked the man page and it looks like the command is:

Code:

smartctl --info /dev/hda
I didnt test it though, you may want to read over the man page to make sure the syntax is good.

etech3 07-17-2012 12:10 PM

Try
 
You can try:
Code:

apt-get install lshw
Then run
Code:

lshw
That will give all kinds of info about the hardware

Hope this helps :twocents:

Kustom42 07-17-2012 12:11 PM

Oh yea, you can also just run the dmidecode command.

amani 07-17-2012 12:24 PM

@Kustom42 dmidecode does not provide the info.
@etech3, lshw is overkill
while the ones suggested by me are more specific.

Kustom42 07-17-2012 12:25 PM

Quote:

Originally Posted by amani (Post 4730784)
@Kustom42 dmidecode does not provide the info.
.

Funny, it shows the serial number on my system when I run it..

Kustom42 07-17-2012 12:31 PM

I think it may be showing my serial number due to it being a VM? I don't ever check for this info so I'm just trying to clarify here...

amani 07-18-2012 02:46 PM

Quote:

Originally Posted by Kustom42 (Post 4730791)
I think it may be showing my serial number due to it being a VM? I don't ever check for this info so I'm just trying to clarify here...

Your bios must be reporting more, so dmidecode must be reporting that way. It does not scan h/w.

sharadchhetri 07-18-2012 04:20 PM

Quote:

Originally Posted by amani (Post 4731945)
Your bios must be reporting more, so dmidecode must be reporting that way. It does not scan h/w.


I edited my reply, I did mistake. Rather than serial no. I answered for UUID

For this Answer is

sdparm /dev/sdX

or

ls /dev/disk/by-id

amani 07-19-2012 09:33 AM

Quote:

Originally Posted by sharadchhetri (Post 4732022)
ls -l /dev/disk/by-uuid

Irrelevant. Read before posting.


All times are GMT -5. The time now is 01:49 AM.