# The Ubuntu Forum Community > Ubuntu Official Flavours Support > Hardware > [SOLVED] Hi. Is there a method to get the serial number of a laptop / desktop computer via the

## Rytron

Hi.
Is there a method to get the serial number of a laptop / desktop computer via the terminal or a program?
I know that in Windows you can use Belarc Advisor or run the command:


```
wmic bios get serialnumber
```

in DOS
Thanks.

----------


## Grannun

I think the one you are looking for is the very first entry only a couple of lines from the top



```
sudo lshw
```

----------


## Rytron

> I think the one you are looking for is the very first entry only a couple of lines from the top
> 
> 
> 
> ```
> sudo lshw
> ```


Thank you Grannun.

For future reference and easier to read I use:



```
sudo lshw > SN.txt
```

----------


## sergiom99

What about 'sudo dmidecode' ?

----------


## Rytron

> What about 'sudo dmidecode' ?


Thank you sergiom99. Its always great to have multiple methods. Excellent.

----------

