excerpt from 'man mkfs';
mkfs - build a Linux file system
mkfs [ -V ] [ -t fstype ] [ fs-options ] filesys [ blocks ]
mkfs is used to build a Linux file system on a device, usually a hard
disk partition. filesys is either the device name (e.g. /dev/hda1,
/dev/sdb2). blocks is the number of blocks to be used for the file
The exit code returned by mkfs is 0 on success and 1 on failure.
In actuality, mkfs is simply a front-end for the various file system
builders (mkfs.fstype) available under Linux. The file system-specific
builder is searched for in a number of directories like perhaps /sbin,
/sbin/fs, /sbin/fs.d, /etc/fs, /etc (the precise list is defined at
compile time but at least contains /sbin and /sbin/fs), and finally in
the directories listed in the PATH environment variable. Please see
the file system-specific builder manual pages for further details.
excerpt from 'man mkswap';
mkswap - set up a Linux swap area
mkswap [-c] [-vN] [-f] [-p PSZ] [-L label] device [size]
mkswap sets up a Linux swap area on a device or in a file.
(After creating the swap area, you need the swapon command to start
using it. Usually swap areas are listed in /etc/fstab so that they can
be taken into use at boot time by a swapon -a command in some boot
The device argument will usually be a disk partition (something like
/dev/hda4 or /dev/sdb7) but can also be a file. The Linux kernel does
not look at partition Id's, but many installation scripts will assume
that partitions of hex type 82 (LINUX_SWAP) are meant to be swap parti-
tions. (Warning: Solaris also uses this type. Be careful not to kill
your Solaris partitions.)
The 'man command' is available to you online
or from the command line if you have 'man' installed.