# Is there a equivalent to "fdisk -l" in Linux?



## digitalsedition (Jun 20, 2009)

Is there a equivalent to "fdisk -l" in Linux?

I'm trying to get a output similar to "fdisk -l" in Linux, I've looked all over and I'm stuck. I just want to be able to see what flash drives or external HDD's are connected to my PC, partition info, stuff like that.

Thank you.


----------



## ericbsd (Jun 20, 2009)

You can use gnu-fdisk you need to install it.
gnu-fdisk replace the hold linux fdisk.


----------



## digitalsedition (Jun 20, 2009)

Is there a FreeBSD Style way of getting the same information?


----------



## vivek (Jun 20, 2009)

Not exactly like fdisk -l (FreeBSD is not Linux) but the following provide the same info:

```
bsdlabel da0s1
bsdlabel aacd0s1
```
da0s1 : SCSI hard drive.
aacd0s1 : hardware RAID hard disk.

To print slice table

```
fdisk -s
```

Read fdisk and bsdlabel man pages to understand output format. I suggest you also read handbook chapter about freebsd partitions http://www.freebsd.org/doc/en/books/handbook/index.html


----------



## anomie (Jun 20, 2009)

Right - just `# fdisk` for _slices_. 

An alternative way to look at FreeBSD _partitions_ is through `# sysinstall`. Go to Configure -> Label. (When finished, exit with 'Q'.) 

For mounted filesystems, you can of course view them using `% mount` or `% df -h`


----------



## digitalsedition (Jun 21, 2009)

I think I got it, sorry for the late response, the in laws are here...

Seriously I think I understand it. I think the  same commands different options, between fbsd and linux are really the biggest issue for me, but I certainly have been enjoying myself using this OS.

Ive got FBSD running on my Acer One pretty good.


----------



## phoenix (Jun 22, 2009)

anomie said:
			
		

> An alternative way to look at FreeBSD _partitions_ is through `# sysinstall`. Go to Configure -> Label. (When finished, exit with 'Q'.)



No, no, no.  Don't use sysinstall for anything, after the actual OS install has completed.

If you want a TUI interface, then use sade(8), or install sfdisk from ports.


----------



## anomie (Jun 22, 2009)

Well, I respect your opinion but I disagree.  The sysinstall method I mentioned is pretty and easy to read.


----------



## SirDice (Jun 22, 2009)

anomie said:
			
		

> Well, I respect your opinion but I disagree.  The sysinstall method I mentioned is pretty and easy to read.



Have a look at sade, notice anything different? :e


----------



## anomie (Jun 22, 2009)

Nope - it looks remarkably similar. And I appreciate the tip.  But I also don't buy the "don't ever use sysinstall after installation" argument if it is convenient and you're careful. 

But whatever. I have already argued over a trivial point enough in a thread that has already been satisfied.


----------

