Command line tool

SoftPerfect RAM Disk includes ramdiskctl, a command line tool for creating and managing RAM disks without the graphical interface. It is available on Windows, macOS and Linux, and uses the same commands, options, output and exit codes on every platform, which keeps scripts portable across systems.

On Windows, the older ramdiskc.exe remains for backward compatibility. It now forwards its old style arguments to ramdiskctl and prints a notice asking you to switch, so new scripts should call ramdiskctl directly. The previous practice of passing switches to the graphical application itself is no longer supported; use ramdiskctl or the Export and Import commands instead.

Usage

ramdiskctl <command> [arguments] [--option value ...]
ramdiskctl --help

A size is a whole number with an optional data unit suffix K, M, G or T. With no suffix the number signifies bytes. The minimum disk size is 64 MB. Two Linux filesystems require more: XFS needs at least 300 MB, and Btrfs at least 110 MB.

Managing disks

Command Description Examples
create Create a new RAM disk. See the options below.

ramdiskctl create --label work --size 512M --fs exfat

destroy <name> Delete a RAM disk by its label or drive letter. Add --force if the disk is busy.

ramdiskctl destroy work

ramdiskctl destroy R --force

list List all disks with their size, filesystem, device, mount point, allocated memory and image.

ramdiskctl list

status <name> Show detailed information for one disk, including allocated memory and garbage collection statistics.

ramdiskctl status work

resize <name> --size <size> Enlarge a disk. The new size must be larger than the current one. On Windows this requires NTFS; on Linux it works on every filesystem except FAT32 and exFAT. Not supported on macOS.

ramdiskctl resize work --size 1G

Options for the create command

Option Description
--size <size> Disk size. Required.
--label <name> or --letter <X> On macOS and Linux, the disk identifier and default mount point name. On Windows, the drive letter from A to Z. Required.
--fs <type> Filesystem. Windows: ntfs, ntfsc, fat32, exfat. Linux: ext2, ext4, xfs, btrfs, btrfsc, fat32, exfat. macOS: apfs, hfs+, fat32, exfat. The ntfsc and btrfsc variants enable compression.
--volume-label <name> Filesystem volume label shown in the file manager. Optional.
--mount <path> Custom mount point, on macOS and Linux only. Defaults to /mnt/ramdisk/<label> on Linux and /Volumes/<label> on macOS. The path must lie within the service's base folder.
--cluster-size <size> Allocation unit size, a power of two number from 512 bytes to 32 MB. Optional.
--dynamic Allocate memory on demand as data is written.
--trim Release memory when files are deleted. Requires --dynamic.
--hdd Emulate a hard disk with a partition table. Windows only.
--numa <n> Allocate memory in NUMA node n. Not available on macOS.
--folders <a,b,c> Create the specified folders after mounting. macOS and Linux only.

Examples:

ramdiskctl create --label cache --size 1G --fs exfat --dynamic --trim
ramdiskctl create --letter R --size 100M --fs ntfs --volume-label Scratch
ramdiskctl create --label build --size 2G --fs ext4 --mount /mnt/build --folders obj,bin

Image files

Command Description Examples
save <name> [--to <path>] Write a disk's contents to its image file. With --to, write to a different path.

ramdiskctl save work

ramdiskctl save work --to /backups/work.img

save-all Save every disk that has an image file configured.

ramdiskctl save-all

load <path> --label <name> Create a new RAM disk and fill it from an image file. The image is read into memory, which becomes the backing store. Accepts the same options as create.

ramdiskctl load disk.img --label data

create-image <path> --size <size> --fs <type> Create an empty, formatted image file on disk. It is not mounted. Use the base filesystems only, without the compressed variants.

ramdiskctl create-image new.img --size 256M --fs exfat

mount-image <path> --label <name> Mount an image file as an image backed disk. Its data is read from and written to the file, and no memory is allocated for the contents.

ramdiskctl mount-image disk.img --label data

unmount-image <name> [--force] Unmount an image backed disk. The image file stays on disk.

ramdiskctl unmount-image data

resize-image <name> --size <size> Grow an image backed disk and its backing file. The same filesystem rules as for resize apply.

ramdiskctl resize-image data --size 1G

Settings and licensing

Command Description Examples
get-settings Show the current service settings.

ramdiskctl get-settings

set-settings --admin-only=<yes|no> When set to yes, only an administrator (root on macOS and Linux) may create or change disks. Running this command itself requires administrator rights.

ramdiskctl set-settings --admin-only=yes

get-license-info Show the licence state, registered user and maximum build date.

ramdiskctl get-license-info

set-license <key> Apply a licence key. Use @file to read the key from a file. Requires administrator rights.

ramdiskctl set-license @licence.txt

Exit codes

The tool returns 0 on success and 1 on any failure, with the reason printed to standard error. This makes the result easy to check in scripts.