Linux cli command radare2
3 minute read
radare2 is a command-line hexadecimal editor.
“r2” is the alias program name for radare2.
This manpage is not updated yet. Feel free to contribute.
The options are:
Open radare2 on an empty file
Equivalent of ‘r2 malloc://512’
Print � after initialization and after every command executed
Close stderr before starting RCore
force asm.arch (x86, ppc, arm, mips, bf, java, …)
run ‘aaa’ command before prompt or patch to analyze all referenced code. Use -AA to run aaaa
force asm.bits (16, 32, 64)
Specify the base address to be used when loading a new binary. See ’e?bin.baddr’
Execute the given command before giving prompt
Start in debugger mode
Enable debug mode. Set cfg.debug=true
Set configuration eval variable key=value. For example -e scr.color=false. When -e is passed after -j, it will set the script source to run instead of setting eval vars.
Blocksize = file size
Run QJS script if an argument is passed or enter the qjs shell if no file is specified. You can evaluate expressions when passing the -e flag after the -j.
Run script file. After the file is loaded
Run script file. Before the file is loaded
Select kernel (asm.os) for syscall resolution
Load given plugin file
List loaded IO plugins.
List loaded core plugins.
map file at given address
Disable demangling
Do not perform any analysis (r_bin). Just load the raw file
Only load the rbin structures (elf, mach0, …)
Do not load user settings/projects from ~/.radare2rc, ~/.config/radare2/radare2rc and the scripts inside …/radare2rc.d/ directory.
Same as -N but also disables the automatic loading of plugins on startup time
Quiet mode (no prompt) and quit after running the commands specified with -i or -c
Quit before showing the prompt. Right after all the -e -c and -i arguments are evaluated.
Same as q, but exiting without freeing RCore, this produces leaks at exit time, but saves some precious ms to run the testsuite in fast mode.
Set project file
Apply rapatch file and quit (see doc/rapatch.md for more details)
Specify dbg.profile rarun2 profile to use when spawning a program for debugging
Specify custom rarun2 directives without having to create a rarun2 profile
Start seeking at this address
Enable sandboxed mode (same as -e cfg.sandbox=true)
Get binary information and analyze binary in a background thread
Avoid computing the file hashes
Set bin.filter=false to load rbin info without filtering names
Show version information and exit (Use -qv to get just the version number)
Show radare2 library versions (prints JSON format if -j is used)
Open in write mode
Show help message
Show files and environment help
Open the file map without executable permissions
Same as -e bin.usextr=false, do not use extract plugins, useful for dyldcache
Type ‘?’ for help
To enter visual mode use the ‘V’ command. Then press ‘?’ for help
In r2 the debugger commands are implemented under the ’d’ command. Type ’d?’ for help
R2_ARGS run radare2 with defined arguments in environment and ignore cli ones R2_IGNVER load plugins ignoring the specified version. (be careful) R2_DEBUG if defined, show error messages and crash signal R2_DEBUG_ASSERT=1 set a breakpoint when hitting an assert R2_MAGICPATH /Users/pancake/.local/share/radare2/share/radare2/4.5.0-git/magic R2_NOPLUGINS do not load r2 shared plugins R2_RCFILE ~/.radare2rc (user preferences, batch script) R2_RDATAHOME /usr/local
path to the current working file.
pancake <[email protected]>
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.