MikroTik RouterOS Commands

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.

Configuration Export (6)

ShortcutAction
compactOutputs only the modified configuration. Starting from v6rc1, "export compact" became
fileExport configuration to a specified file. When the file is not specified export output will be
pathParameter allows to include or exclude specific configuration menu from router entire
show-sensitiveShow sensitive information, like passwords, keys, etc. By default, sensitive information
terseWith this parameter, the export command will output the configuration as full commands
verboseWith this parameter, the export command will output whole configuration parameters and items

Configuration Import (3)

ShortcutAction
from-lineStart executing the script from the specified line number. This option is only available
file-nameName of the script (.rsc) file to be executed
dry-runSimulates the import without making any configuration changes. This helps in catching syntax

Startup delay (5)

ShortcutAction
keep-usersDo not remove existing users from the configuration
no-defaultsDo not load the default configuration, just clear the configuration
skip-backupSkip automatic backup file generation before reset
run-after-resetRun specified .rsc file after reset. That way you can load your custom configuration. If
caps-modeRun caps-mode script after configuration reset

Additional Commands (6)

ShortcutAction
/interface printList interfaces
/ip address printIP addresses
/ip firewall filter printFirewall rules
/ip route printRouting
/system resource printResources
/exportExport config
📄 View Printable Cheat Sheet — Download as PDF or print · 🧩 Combine with other tools

Related Shortcut Pages

Juniper JunOS Arista EOS Palo Alto PAN-OS Linux Ansible Nginx

Search 18,500+ shortcuts across 268 platforms

Explore All Platforms Practice Shortcuts
📜 Every shortcut on this page is taken from the official MikroTik RouterOS documentation — help.mikrotik.com

Exporting the configuration

/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.

Importing and resetting

/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.

Reading the current state

/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.

Frequently asked questions

What is the difference between export and backup?

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.

Why are passwords missing from my export?

Sensitive values are stripped by default. Add show-sensitive to include them.

How do I test an .rsc file before applying it?

/import file-name=config.rsc dry-run parses the script and reports errors without changing the configuration.

How do I reset a router and apply my own configuration?

/system reset-configuration no-defaults=yes run-after-reset=config.rsc, after uploading config.rsc to the router.

🤖 Ask AI about MikroTik RouterOS shortcuts

Open your assistant with this page preloaded as the source — great for follow-up questions like "which of these work in other apps?"

ChatGPT Claude Perplexity Gemini Grok
🔧 Spotted an error or a missing shortcut? Suggest an edit on GitHub — every accepted fix goes live on this page, the API and the CLI.