There are two ways to install the tools:

Download phar file


or if you have problems with SSL certificate:

curl -o n98-magerun.phar

You can make the .phar file executable.

chmod +x ./n98-magerun.phar

If you want to use command system wide you can copy it to /usr/local/bin.

sudo cp ./n98-magerun.phar /usr/local/bin/

Debian / suhosin:

On some debian systems with compiled in suhosin the phar extension must be added to a whitelist.

Add this to your php.ini file:


You don’t like the filename?

Just rename it to whatever you want.


Since version 1.1.0 we deliver a self-update script within the phar file:

$ n98-magerun.phar self-update

If file was installed system wide do not forget “sudo”.

See it in action: