Complete MikroTik RouterOS commands reference — 20 commands across 4 categories. Quick reference cheat sheet for RouterOS.
RouterOS has a hierarchical command line — /ip address print — and this page covers the two commands that manage the configuration as a whole, export and import, together with the reset options and the print commands most people need first. Parameters in the table are given as RouterOS writes them; they are appended to the command, as in /export compact file=backup.
| Shortcut | Action |
|---|---|
| compact | Outputs only the modified configuration. Starting from v6rc1, "export compact" became |
| file | Export configuration to a specified file. When the file is not specified export output will be |
| path | Parameter allows to include or exclude specific configuration menu from router entire |
| show-sensitive | Show sensitive information, like passwords, keys, etc. By default, sensitive information |
| terse | With this parameter, the export command will output the configuration as full commands |
| verbose | With this parameter, the export command will output whole configuration parameters and items |
| Shortcut | Action |
|---|---|
| from-line | Start executing the script from the specified line number. This option is only available |
| file-name | Name of the script (.rsc) file to be executed |
| dry-run | Simulates the import without making any configuration changes. This helps in catching syntax |
| Shortcut | Action |
|---|---|
| keep-users | Do not remove existing users from the configuration |
| no-defaults | Do not load the default configuration, just clear the configuration |
| skip-backup | Skip automatic backup file generation before reset |
| run-after-reset | Run specified .rsc file after reset. That way you can load your custom configuration. If |
| caps-mode | Run caps-mode script after configuration reset |
| Shortcut | Action |
|---|---|
| /interface print | List interfaces |
| /ip address print | IP addresses |
| /ip firewall filter print | Firewall rules |
| /ip route print | Routing |
| /system resource print | Resources |
| /export | Export config |
/export prints the configuration as a script of RouterOS commands, and it is the form to keep in version control because it is readable and portable, unlike a binary backup. compact is the modern default and omits settings that match defaults; verbose writes every parameter and terse writes each item as one full command per line, which diffs cleanly. file saves to the router's filesystem instead of the screen, path limits the export to one menu such as /ip firewall, and show-sensitive includes passwords and keys, which are stripped otherwise — remember that when restoring.
/import runs a saved .rsc script: file-name names it, dry-run parses it without applying anything, which catches syntax errors from a hand-edited export, and from-line resumes a script that failed part-way. /system reset-configuration takes the options in the reset group: no-defaults leaves the router blank instead of loading the default firewall and bridge, keep-users preserves accounts, skip-backup avoids writing an automatic backup first, and run-after-reset applies a script immediately after the reset — the combination that provisions a fresh router from an exported file.
/interface print, /ip address print and /ip route print are the first three commands on any unfamiliar router; /ip firewall filter print shows the filter rules in order with packet and byte counters, and /system resource print shows uptime, CPU load, memory and the RouterOS version. Any print command accepts where for filtering and detail for every field. Tab completes both commands and parameters, and ? at any point lists what can follow.
export writes a readable command script (.rsc) that can be edited and imported on another router; backup writes a binary image tied to the same hardware and version.
Sensitive values are stripped by default. Add show-sensitive to include them.
/import file-name=config.rsc dry-run parses the script and reports errors without changing the configuration.
/system reset-configuration no-defaults=yes run-after-reset=config.rsc, after uploading config.rsc to the router.
Open your assistant with this page preloaded as the source — great for follow-up questions like "which of these work in other apps?"