> ## Content Index
> Fetch the complete content index at: https://itsfoss.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Use 'maybe' to See What a Command or Script Will Do, Without Running It
- URL: https://itsfoss.com/maybe-command-tool/
- Published: 2017-08-14T23:38:08.000Z
- Updated: 2018-10-01T14:20:55.000Z
- Author: Munif Tanjim
- Tags: #Import 2022-12-26 08:27

Have you ever worried about what the script or command you are going to run is gonna do to your filesystem? Don’t worry, **maybe** is here to help you with that. Specially, if you are new to Linux, you are going to like it.

## maybe tells you what a script or command does without actually running it

[**maybe**](https://github.com/p-e-w/maybe?ref=itsfoss.com) is a small tool that allows you to run a command to see what it does to your filesystem without actually letting it do anything. It will show you a list of operations that was supposed to be performed by that command and then you can decide whether you want to permit those operations or not.

![maybe In Action](https://itsfoss.com/content/images/wordpress/2017/08/maybe.jpg)

*maybe* In Action

*maybe* is written in python. It uses the `[python-ptrace](https://github.com/haypo/python-ptrace?ref=itsfoss.com)` library to run the commands under the control of `ptrace`. In layman’s terms, when *maybe* is used to run a command, it makes that command believe that it is doing what it is trying to do, while in actuality, all of its operations are blocked and intercepted by *maybe* and then logged.

So, for example: if you have a long bash script you need to run, you can run it with *maybe*. And you won’t have to worry about if that script will delete some important directory from your system or do something fishy.

\[irp posts=”15178″ name=”Easily Find Bugs In Shell Scripts With ShellCheck”\]

## Is *maybe* Completely Safe?

The developer of *maybe*, [Philipp Emanuel Weidmann](https://github.com/p-e-w?ref=itsfoss.com), doesn’t claim that it is completely safe to run anything with *maybe*. In fact, he claims very little. In his words,

> Currently, `maybe` is best thought of as an (alpha-quality) “what exactly will this command I typed myself do?” tool.

So, you should never use *maybe* to run untrusted code on your primary machine. Because *maybe* might not be able to block all the operations that the command you are trying to run performs. Thus, some of those operations can still do serious damage to your system even after running with *maybe*.

## Installation on Ubuntu

For installing *maybe*, you will need a [Python environment set up](https://itsfoss.com/python-setup-linux/) on your system. You’ll also need to [install pip on Ubuntu](https://itsfoss.com/install-pip-ubuntu/).

Now, for installing *maybe*, use the following command:

```
pip install maybe
```

That’s all. You should be ready to use *maybe*.

---

So, what do you think about *maybe*? Let us know!