---
name: "Rex::Commands::Mkfs"
section: "3pm"
platform: "linux"
package: "rex"
version: "1.16.0-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Rex::Commands::Mkfs"
---

# Rex::Commands::Mkfs(3pm)

Create filesystems

## NAME

Rex::Commands::Mkfs - Create filesystems

## DESCRIPTION

With this module you can create filesystems on existing partitions and logical volumes.

## SYNOPSIS

```
 use Rex::Commands::Mkfs;
```

## EXPORTED FUNCTIONS

### mkfs($devname, %option)

Create a filesystem on device `$devname`.

```
 mkfs "sda1",
   fstype => "ext2",
   label  => "mydisk";
 mkfs "sda2",
   fstype => "swap";
```
