In this day and age, it is not a bad idea to be leery of untrusted executable files, but is there a safe way to run one on your Linux system if you really need to do so? Today’s SuperUser Q&A post has some helpful advice in response to a worried reader’s query.

Today’s Question & Answer session comes to us courtesy of SuperUser—a subdivision of Stack Exchange, a community-driven grouping of Q&A web sites.

The Question

SuperUser reader Emanuele wants to know how to safely run an untrusted executable file on Linux:

How do you safely run an untrusted executable file on Linux?

Suppose this executable file contains a virus or backdoor, how should I run it? Should I create a new user profile, run it, then delete the user profile?

The Answer

SuperUser contributors Shiki and Emanuele have the answer for us. First up, Shiki:

Followed by the answer from Emanuele:

But let’s take off that tinfoil hat and jump back to reality for a bit.

No Virtualization – Quick to Use

Firejail

I had to run a similar untrusted binary file just a few days ago and my search led to this very cool small program. It is already packaged for Ubuntu, very small, and has virtually no dependencies. You can install it on Ubuntu using: sudo apt-get install firejail

Package info:

Virtualization

KVM or Virtualbox

This is the safest bet depending on the binary, but hey, see above. If it has been sent by “Mr. Hacker” who is a black belt, black hat programmer, there is a chance that the binary can escape a virtualized environment.

Malware Binary – Cost Saver Method

Have something to add to the explanation? Sound off in the comments. Want to read more answers from other tech-savvy Stack Exchange users? Check out the full discussion thread here.

Be extremely careful when you use it, it might give you a false sense of security without the right options.

Image Credit: Prison Cell Clip Art (Clker.com)