Configuration
The core reads ~/.radare2rc
while starting. You can add e
commands to this file to tune radare configuration to your taste.
To prevent radare from parsing this file at start, pass it -n
option. To have a less verbose output for batch mode runs, it is also better to decrease verbosity level with -v
command-line option.
All the configuration of radare is done with the eval
commands. A typical startup configuration file looks like this:
$ cat ~/.radare2rc
e scr.color = true
e dbg.bep = loader
Configuration can also be changed with -e
scr.color
and asm.syntax
the following line may be used:
$ radare2 -n -e scr.color=true -e asm.syntax=intel -d /bin/ls
Internally, the configuration is stored in a hash table. The variables are grouped in namespaces: cfg.
, file.
, dbg.
, scr.
and so on.
To get a list of all configuration variables just type e
in the command line prompt. To limit output to a selected namespace, pass it with an ending dot to e
. For example, e file.
will display all variables defined inside "file" namespace.
To get help about e
command type e?
:
Usage: e[?] [var[=value]]
e? show this help
e?asm.bytes show description
e?? list config vars with description
e list config vars
e- reset config vars
e* dump config vars in r commands
e!a invert the boolean value of 'a' var
er [key] set config key as readonly. no way back
ec [k] [color] set color for given key (prompt, offset, ...)
e a get value of var 'a'
e a=b set var 'a' the 'b' value
env [k[=v]] get/set environment variable
A simpler alternative to e
command is accessible from the visual mode. Type Ve
to enter it, use arrows (up, down, left, right) to navigate the configuration, and q
to exit it. The start screen for the visual cofiguration edit looks like this:
Eval spaces:
> anal
asm
scr
asm
bin
cfg
diff
dir
dbg
cmd
fs
hex
http
graph
hud
scr
search
io