# BSD Label Editor



## Niatross (Mar 4, 2014)

In the past, I have used the following command to edit a BSD label: `bsdlabel -A -e <slice>`. Does gpart, glabel or any other command out there do the same thing?


----------



## wblock@ (Mar 5, 2014)

gpart(8) does, yes.  A disklabel is just another type of partition table, and one of the types that gpart(8) handles.  See http://www.wonkity.com/~wblock/docs/html/disksetup.html#_the_old_standard_mbr for examples.


----------



## Niatross (Mar 5, 2014)

Maybe I'm missing something with the link you gave me.

What `gpart` command would be comparable to `bsdlabel -A -e <slice>`?


----------



## wblock@ (Mar 5, 2014)

It's not interactive, so -e does not apply.  I can't really tell what -A does, but gpart(8) knows the BSDlabel structure.

In short, use gpart(8)'s create, add, delete, and modify subcommands to modify BSDlabel partitions.


----------

