1RADARE2(1)                BSD General Commands Manual               RADARE2(1)
2

NAME

4     radare2 — Advanced command-line hexadecimal editor, disassembler and de‐
5     bugger
6

SYNOPSIS

8     radare2 [-a arch] [-b bits] [-B baddr] [-c cmd] [-e k=v] [-i file]
9             [-I prefile] [-k kernel] [-m addr] [-p project] [-P patch]
10             [-r rarun2] [-R rr2rule] [-s addr] [-0AdDjwntLquvVxX] -|--|=|file
11

DESCRIPTION

13     radare2 is a command-line hexadecimal editor.
14
15     "r2" is the alias program name for radare2.
16
17     This manpage is not updated yet. Feel free to contribute.
18
19     The options are:
20
21     --          Open radare2 on an empty file
22
23     -           Equivalent of 'r2 malloc://512'
24
25     -0          Print \x00 after initialization and after every command exe‐
26                 cuted
27
28     -2          Close stderr before starting RCore
29
30     -a arch     force asm.arch (x86, ppc, arm, mips, bf, java, ...)
31
32     -A          run 'aaa' command before prompt or patch to analyze all ref‐
33                 erenced code. Use -AA to run aaaa
34
35     -b bits     force asm.bits (16, 32, 64)
36
37     -B baddr    Specify the base address to be used when loading a new bi‐
38                 nary. See 'e?bin.baddr'
39
40     -c cmd      Execute the given command before giving prompt
41
42     -d          Start in debugger mode
43
44     -D dbg.backend
45                 Enable debug mode. Set cfg.debug=true
46
47     -e k=v      Set configuration eval variable key=value. For example -e
48                 scr.color=false. When -e is passed after -j, it will set the
49                 script source to run instead of setting eval vars.
50
51     -f          Blocksize = file size
52
53     -j          Run QJS script if an argument is passed or enter the qjs
54                 shell if no file is specified. You can evaluate expressions
55                 when passing the -e flag after the -j.
56
57     -i file     Run script file. After the file is loaded
58
59     -I file     Run script file. Before the file is loaded
60
61     -k kernel   Select kernel (asm.os) for syscall resolution
62
63     -l plugfile
64                 Load given plugin file
65
66     -L          List loaded IO plugins.
67
68     -LL         List loaded core plugins.
69
70     -m addr     map file at given address
71
72     -M          Disable demangling
73
74     -n          Do not perform any analysis (r_bin). Just load the raw file
75
76     -nn         Only load the rbin structures (elf, mach0, ...)
77
78     -N          Do not load user settings/projects from ~/.radare2rc, ~/.con‐
79                 fig/radare2/radare2rc and the scripts inside .../radare2rc.d/
80                 directory.
81
82     -NN         Same as -N but also disables the automatic loading of plugins
83                 on startup time
84
85     -q          Quiet mode (no prompt) and quit after running the commands
86                 specified with -i or -c
87
88     -qq         Quit before showing the prompt. Right after all the -e -c and
89                 -i arguments are evaluated.
90
91     -Q          Same as q, but exiting without freeing RCore, this produces
92                 leaks at exit time, but saves some precious ms to run the
93                 testsuite in fast mode.
94
95     -p prj      Set project file
96
97     -P file     Apply rapatch file and quit (see doc/rapatch.md for more de‐
98                 tails)
99
100     -r rarun2   Specify dbg.profile rarun2 profile to use when spawning a
101                 program for debugging
102
103     -R rarun2-directive
104                 Specify custom rarun2 directives without having to create a
105                 rarun2 profile
106
107     -s addr     Start seeking at this address
108
109     -S          Enable sandboxed mode (same as -e cfg.sandbox=true)
110
111     -t          Get binary information and analyze binary in a background
112                 thread
113
114     -T          Avoid computing the file hashes
115
116     -u          Set bin.filter=false to load rbin info without filtering
117                 names
118
119     -v          Show version information and exit (Use -qv to get just the
120                 version number)
121
122     -V          Show radare2 library versions (prints JSON format if -j is
123                 used)
124
125     -w          Open in write mode
126
127     -h          Show help message
128
129     -H          Show files and environment help
130
131     -x          Open the file map without executable permissions
132
133     -X          Same as -e bin.usextr=false, do not use extract plugins, use‐
134                 ful for dyldcache
135

SHELL

137     Type '?' for help
138

VISUAL

140     To enter visual mode use the 'V' command. Then press '?' for help
141

DEBUGGER

143     In r2 the debugger commands are implemented under the 'd' command. Type
144     'd?' for help
145

ENVIRONMENT

147      R2_IGNVER     load plugins ignoring the specified version. (be careful)
148      R2_DEBUG      if defined, show error messages and crash signal
149      R2_DEBUG_ASSERT=1 set a breakpoint when hitting an assert
150      R2_MAGICPATH /Users/pancake/.lo‐
151     cal/share/radare2/share/radare2/4.5.0-git/magic
152      R2_NOPLUGINS do not load r2 shared plugins
153      R2_RCFILE    ~/.radare2rc (user preferences, batch script)
154      R2_RDATAHOME /usr/local FILE path to the current working file.
155

SEE ALSO

157     r2r(1), rahash2(1), rafind2(1), rabin2(1), radiff2(1), rasm2(1), rax2(1),
158     ravc2(1), ragg2(1), rarun2(1),
159

AUTHORS

161     pancake <pancake@nopcode.org>
162
163                                 May 20, 2022
Impressum