How to install Metasploit in Termux – Easiest Way(No root!)

To install Metasploit in Termux without root, install Termux from F-Droid or GitHub, then run the install script from the gushmazuko/metasploit_in_termux repository with bash metasploit.sh. When it finishes, start Metasploit with msfconsole.
Short version
pkg install wget
wget https://github.com/gushmazuko/metasploit_in_termux/raw/master/metasploit.sh
chmod +x metasploit.sh
./metasploit.sh
msfconsoleWelcome back, fellow security enthusiasts! Termux, a free Terminal Emulator for Android has gained a lot of attention lately. The first thing that came to my mind after installing it was: Can it run our favorite Penetration Testing Tool Metasploit?! And sure enough, it can! One of the best parts is, it doesn’t even require a rooted device! The installation is also very easy, thanks to a script provided by a Github user named “gushmazuko”. Let’s start, I’ll show you how to install Metasploit in Termux.
The main Termux package repository does not carry a Metasploit package, so there are two ways to install it: using the gushmazuko script, or going the manual way. Out of convenience, we only cover the easy way here. The script clones the Metasploit Framework from GitHub and builds its Ruby dependencies on your phone, so expect it to take a while.
Table of Contents
- Short version
- Step 1 - Installing Termux
- Step 2 - Installing wget and downloading the Script
- Step 3 - Install Metasploit in Termux
- Step 4 - Starting Metasploit
- FAQ
- Can I install Metasploit in Termux with pkg install?
- Do I need a rooted phone to run Metasploit in Termux?
- Why should I not use the Termux version from Google Play?
- How do I reinstall or update Metasploit in Termux?
- Conclusion
Step 1 - Installing Termux
If you haven’t already, go ahead and install Termux first. Install it from F-Droid or from the GitHub releases, which are the supported sources. Open Termux once so it can initialize.
The screenshot below shows the old Google Play install. Termux’s own docs now describe the Google Play build as experimental and recommend F-Droid or GitHub instead. If you installed Termux from Google Play in the past, clear its data, uninstall it and reinstall from F-Droid before you continue.

Step 2 - Installing wget and downloading the Script
First, make sure you are in the home directory by typing:
cd $HOMEFollowed by:
pkg install wgetTo install wget.

Now we need to download Auxilus’s script from Github using wget:
wget https://github.com/gushmazuko/metasploit_in_termux/raw/master/metasploit.sh
chmod +x metasploit.sh
Step 3 - Install Metasploit in Termux
To run the installer simply type:
bash metasploit.shAlternatively:
./metasploit.shThe repository also offers a one-liner that downloads and runs the script: source <(curl -fsSL https://kutt.it/msf).
This starts the Metasploit installation, doing all the jobs for you-you otherwise would have to do manually.

Step 4 - Starting Metasploit
You are already done! To start Metasploit type:
msfconsole
FAQ
Can I install Metasploit in Termux with pkg install?
No. The main Termux repository has no Metasploit package. That is why the script installs the dependencies with pkg, clones the Metasploit Framework from GitHub and builds the Ruby gems itself.
Do I need a rooted phone to run Metasploit in Termux?
No. Termux runs as a normal Android app, and the script installs everything in its own prefix. Features that need hardware access, like Wi-Fi monitor mode, are a different story and will not work on a stock phone.
Why should I not use the Termux version from Google Play?
Termux’s documentation calls the Google Play build experimental, and the script’s README says the Play Store version is outdated. Install Termux from F-Droid or GitHub, and do not mix sources for Termux and its plugins.
How do I reinstall or update Metasploit in Termux?
Run the script again. It erases the old $PREFIX/opt/metasploit-framework folder and installs a fresh copy from GitHub.
Conclusion
How easy was that, right? Now you can run Metasploit from your Mobile Phone! I haven’t had time yet to dig deeper into it, but I’m definitely planning to try out a couple of things. I’m very interested if I can plug in my trusted ALFA AWUSH036H to my phone and run some Wi-Fi testing from there.
Once I get to test some stuff, future tutorials will follow. Stay tuned and stay curious!
15 thoughts on “How to install Metasploit in Termux – Easiest Way(No root!)”
Comments are closed. I keep the discussion here because the answers still help.
More posts
All Cyber Security


goood
Lo instalé, ingreso el comando ./msfconsole y me dice No such file or directory. Cómo puedo iniciarlo?
Excellent article!
Please note that the script (https://github.com/gushmazuko/metasploit_in_termux/raw/master/metasploit.sh) contains some bad characters in lines 101 and 102 causing script failure. You can see them by opening that file in a hex editor.
Not too big a deal since the bulk of the work is already done by then and you can just fix that part of the script and re-run from there.
Hey John,
thanks for pointing that out!
pkg install metasploit
No group of mirrors selected. You might want to select a group by running 'termux-change-repo' Checking availability of current mirror:
[*] https://packages.termux.dev/apt/termux-main/: ok
Reading package lists... Done Building dependency tree... Done
Reading state information... Done E: Unable to locate package metasploit
Updated! Should work now!
Bro it is not working at last 404 command not found is showing
Recent versions of Ruby have serious problem related to how Android's linker works with shared libraries. We had to package Metasploit with all necessary fixes and now it is available in Unstable Termux repository. All other ways of Metasploit installation are no longer viable.
Use the following commands to install the package:
pkg install unstable-repo
pkg install metasploit
Will it really work mine is showing error finding ruby2 what should I do
i do this order but unable to locate metaspliot.pls help me
with witch commond can i install meta??
E: Unable to locate package metasploit-framework
people I just came across this error can anyone assist me please.
I was install it
How can i use
Type MacDonald
Failed to install nokogiri
Bundler installer, above that it's written failed to install nokogiri 1.8.4