← 返回命令列表

Linux command

roll 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Roll dice

roll [2d6]

Roll with modifier

roll [1d20+5]

Roll multiple times

roll [3x4d6]

Verbose output showing each die

roll -v [2d6]

Sum only output

roll -s [2d6]

Roll percentile

roll [1d100]

Roll with negative modifier

roll [1d20-2]

Multiple dice expressions

roll [1d20] [2d6+3]

说明

roll is a command-line dice roller that parses standard RPG dice notation in the NdS format, where N is the number of dice and S is the number of sides. It supports modifiers (+ or -) for adding or subtracting fixed values, and the TxNdS format for rolling the same expression multiple times. Multiple dice expressions can be specified on a single command line. The -v flag shows individual die results in addition to the total sum, while -s outputs only the final sum. Common RPG dice like d4, d6, d8, d10, d12, d20, and d100 (percentile) are all supported through the flexible notation.

参数

-v
Verbose, show each die.
-s
Sum only output.

FAQ

What is the roll command used for?

roll is a command-line dice roller that parses standard RPG dice notation in the NdS format, where N is the number of dice and S is the number of sides. It supports modifiers (+ or -) for adding or subtracting fixed values, and the TxNdS format for rolling the same expression multiple times. Multiple dice expressions can be specified on a single command line. The -v flag shows individual die results in addition to the total sum, while -s outputs only the final sum. Common RPG dice like d4, d6, d8, d10, d12, d20, and d100 (percentile) are all supported through the flexible notation.

How do I run a basic roll example?

Run `roll [2d6]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -v do in roll?

Verbose, show each die.