takeover.sh – Control Any Running Linux System Via SSH

Adding to the list of script we have covered before e.g. MultiCD and Wildevine we’re here with another nifty one for the Linux gurus and it goes by the name of takeover.sh.

takeover.sh is a free and open-source script with which you can remotely take over a running Linux system using SSH. It enables you to log into an in-memory rescue environment, unmount your root filesystem, etc. all without the need to reboot your laptop.

You can also replace your running distro with another one without touching a physical console. However, you will need to reboot your system. If you are interested, you can extend takeover.sh’s features to support re-executing a new init once you’re done so that you can switch to a new distro without rebooting. Hector Martin, the developer, is accepting pull requests.

takeover.sh was created for init systems that support reloading the init binary using the telinit u command i.e. sysvinit and systemd. You would have to adapt it if you use a different system type but it still might not work.

Features of takeover.sh

  • Free and open-source.
  • Log into an in-memory rescue environment.
  • Unmount your original root filesystem.


If anything goes wrong while you’re using the takeover script your computer system will panic.

  • Do not use this script if you don’t understand exactly how it works.
  • Do not use this script on any system you care about.
  • Do not use this script on any system you expect to be up.
  • Do not run this script unless you can afford to get physical access to fix a botched takeover.

Hector made it clear on GitHub that takover.sh is for Linux experts and he purposely left out steps from which you can copy and past commands.

In his own words:

This script does not have any provisions for exiting out of the new environment back into something sane. You will have to reboot when you’re done. If you get anything wrong, your machine won’t boot. Tough luck. This is not a guide for newbies. I’m deliberately not giving you commands you can copy and paste. If you can’t figure out what to do exactly without handholding, this script is not for you.

I haven’t included the usage details here because most readers wouldn’t need it. But if you are interested in using the script you can see the developer’s usage guide here.

You should try the script in a VM (Virtual Machine) where you can run a tarball of your live root filesystem for testing. Hector Martin wants setting up the boot loader to be an exercise for you.

What are your thoughts on takeover.sh? Will you be taking over any systems anytime soon? Is the script even useful to you in the first place? Share your ideas in the comments section below.

Divine Okoi is a cybersecurity postgrad with a passion for the open-source community. With 700+ articles covering different topics in IT, you can always trust him to inform you about the coolest tech.

Each tutorial at GeeksMint is created by a team of experienced writers so that it meets our high-quality writing standards.

5 thoughts on “takeover.sh – Control Any Running Linux System Via SSH”

  1. The name “takeover” is misleading. This appears to be an admin tool and not at all for gaining remote access. Cool idea if you need to rebuild a system. But, it does require that you already have root access to the box.

    • In alignment with @disqus_9IhhJVksT8:disqus’s observation. As far as I’m concerned, this is for experimental purposes only.

  2. Elitest hacker who built a “script” (translation: backdoor) and essentially says “don’t push the big red button”…

    This is an exploit waiting to happen! Quit being lazy and just go physically work on the box! Even the elitest hacker says not to use the script on anything you care about…

  3. *begin rant* The author of the script sounds like a tool, so elitest that he tricks even himself into thinking he’s better than he really is. Who cares if it’s for “not for newbies”, that’s not really something he needs to concern himself with. It’s a tool, just like all other software. It sounds to me like a bullshit excuse to not have to write proper documentation. And who cares if a newbie messes up his system… he will learn from his mistakes, he can reinstall. Like what if Microsoft shipped Windows without an installer, said it’s only for people who know what they are doing, so they intentionally left out instructions or commands because you might do it wrong. SMH…and you think before long, if the software is as good as he thinks, these coveted commands wont be just a google search away? Please treat me like a child, I’m too stupid to be responsible with my own shit. *end rant* People piss me off because in this case, it’s as if he’s trying to achieve some elite status by being too lazy to write complete docs, and then instead of just owning that they are too lazy they blame it on me being too stupid to use it. That’s a bad attitude towards others and I don’t like it.


Got Something to Say? Join the Discussion...