Learn to Code via Tutorials on Repl.it!

← Back to all posts
Create Linux Jail on Linux!
GaneshaSharma (40)

It's not really a 'Jail'. It's supposed to be like "Windows Sandbox". If you are on Win10Home, you can do this in WSL.
I use Linux on my host.
If you can't delete the VM files, delete them using a console in recovery mode.

So, Open Terminal. Then you can run:

cd ~
mkdir jails
cd jails
mkdir $WHAT_YOU_WANT_TO_CALL_IT
pushd $WHAT_YOU_JUST_PUT
sudo curl -O http://tinycorelinux.net/5.x/x86_64/archive/5.4/distribution_files/rootfs64.gz
sudo gunzip rootfs64.gz
sudo cpio -id < rootfs64
sudo rm rootfs64 rootfs64.gz
sudo chroot .
popd

The lines with Sudo except the Chroot, is to prevent permission errors.

It's pretty simple. Right?

Comments
hotnewtop
CodeLongAndPros (1536)

Uh so Bsd Jail is a thing

Highwayman (1436)

Make a tutorial and battle for the better votes.
Gladiator time bois XP
@CodeLongAndPros

CodeLongAndPros (1536)

@Highwayman I mean I can duel like I did with @HahaYes but it’s not worth the effort

Highwayman (1436)

Tru enough I guess. The comment basically does the job anyways..
@CodeLongAndPros

Highwayman (1436)

XD WE SUMMON THE WILL OF THE HAHAYES!!!! COME FORTH!!!
@HahaYes

CodeLongAndPros (1536)

@HahaYes Yes. We were discussing the C++ wars