Learn to Code via Tutorials on Repl.it!

← Back to all posts
How to use QEMU
CodeLongAndPros (1535)

How to emulate a x64, i386, or aarch64 computer

This is not a repl.it based tutorial, but it's related to some other topics like How a CPU works and How to make an operating system. QEMU will run on repl, but there's little CPU or RAM for it. I would use TC Linux if you have to have a go at it.

You'll first have to have QEMU installed.


I use Arch, so that's the only one that's correct.
If any of you replitors have a Ubuntu, Debain. Fedora, RHEL, CentOS, Gentoo, or SuSE system, tell me if it failed.

Arch Linux: sudo pacman -S qemu qemu-arch-extra
Debian/Ubuntu based: sudo apt install qemu qemu-kvm
Fedora dnf install @virtualization
Gentoo: emerge --ask app-emulation/qemu
SUSE: zypper install qemu
RHEL/CentOS: yum install qemu-kvm

For Mac users:

Homebrew: brew install qemu

Ports: sudo port install qemu

For Wandows users (Bleech):

Download and run this
No checksum for you!

Ok. now that you've got QEMU, let's fly!

Emulating a 64 bit system

Download the Manjaro XFCE iso, SHA1 checksum c44a2984aa2fada53c1db8c6b919b45152780489.

Create this directory structure:

└── manjaro

cd to qemu/manjaro

Let's make a 20Gb disk for manjaro:
qemu-img create -f qcow2 manjaro.img 20G

To break down the command:

qemu-img is the command, create is the verb, -f means format, qcow2 is the format, manjaro.img is the name of the file, and 20G is the size

Your qemu directory should look like this:

└── manjaro
    └── manjaro.img

Now, move the manjaro ISO to qemu/manjaro and rename it to manjaro.iso

Now let's run qemu-system-x64_64 -m 2048 -net nic -net user -enable-kvm -hda manjaro.img -cdrom manjaro.iso -boot cda

To break it down:

  • m: Memory 2048M = 2G
  • net nic -net user: Enable networking
  • enable-kvm: Enable kvm
  • hda: set hard disk to manjaro.img
  • cdrom: set cd to manjaro.iso
  • boot: cda: set boot to:
    - Hard disk
    - CDROM
    - Floppy
    Now, let's run it.

You should see the grub screen:

After it loads, select 'Launch installer' and follow it through:


There you go, you've got Manjaro Linux running on a x64 emulator!

You can swap qemu-system-x86_64 with qemu-system-{arch} for other archs.
For example:

  • qemu-system-i386
  • qemu-system-aarch64
  • qemu-system-sparc

To run an app compiled for aarch64, use qemu-aarch64 {program} to run it.

That's all, for now!

This post has been locked
CodeLongAndPros (1535)

SMH locking my own post

lilpeen (212)

I am leaving this comment because I counldn't think of any other way to contact you.
This is the comment you left on my post, https://repl.it/talk/share/Minecraft-in-JavaScript/86800:

I'm delisting this for 3 reasons.
Number one: This appears to have noted upvotes.
Number two: The code is stolen, as @minx28 said
Number three: This has an IP logger, which is against ToS

Here is my response:

Number one: I don't know what a noted upvote is, but I would like to know.
Number two: The code is not stolen, if you view the source of https://notblockedgames.cf/games/minecraft-updraded.html (the notblockedgames minecraft website), on line 28 you can see a link to my repl, so it is not copied from notblockedgames. It is also not copied from https://classic.minecraft.net; both the code and the game are clearly different.
Number three: The Minecraft repl does not have an IP logger, not even the website does. The IP logger never worked, but I have removed the remnants of it.

UPDATE: I have figured out what noted upvotes are, but is there a way I can prove to you that the post does not contain noted upvotes, or if it does, that I did not have anything to do with it?

@minx28 @tussiez

When I programmed the website, I was just starting out with programming, I had no idea what was and was not legal. It is just a small unblocked games website that I made for people at my school. The initial purpose of the IP logger was to be for an IP banning system and I have implemented an opt-out system for cookies. Finally, @minx28 I don't know why you would consider the IP logging system to be "obfuscated". It was three lines of code directly in the index.html file and I believe the variable was even called iplogger. It seems pretty simple in my opinion but I guess for people with minimal skills in programming it is not so easy to understand. And I don't think you have the right to criticize my program "Ah, apparently Minecraft (updraded) is your own one, and it's worse than the non-updraded version..." especially when you probably couldn't code it yourself.

CodeLongAndPros (1535)

@lilpeen first of all it's botted, my autocorrect got me.
Second, can you provide a diff of classic.minecraft.net and your code?

lilpeen (212)

@CodeLongAndPros I am sorry, but I don't know why it was botted, I didn't do it myself and didn't ask anyone else to. I am sure that everyone I know that also knows about the post has not done it. I did receive a weird comment from @TommyVictory containing a multiple screen shots of what appeared to be a lists of users that upvoted the post:
and "There's more if you want" to which I responded with "more what?" I did not have anything to do with this. It would be entirely fair if repl removed the botted upvotes, but closing the post entirely because of something I had no control over does not seem fair at all.

Second, if you look at the source code for classic.minecraft.net, most of it is in one file and compressed if I remember correctly, making it hard for someone like me to modify the game. If I am unable to modify it, I would not be able to make my own version and make it look different from the original, but if you visit each webpage they are clearly different. I do understand that there may be a lack of evidence proving that I wrote the code, but what people need to realize is this: lack of evidence to prove innocent, is not evidence to prove guilty.

CodeLongAndPros (1535)

@lilpeen I'm going to CC @minx28 here.
Minx, if you could elaborate on the ip logger and the stolen code?

minx28 (483)

@CodeLongAndPros the stolen code - I never said anything like that. I don't know where you get that from, and I don't think the code is stolen (at least not for the Minecraft game).
The IP logger - I didn't notice the code in index.html, only a link to a JS file which subtly linked to 2 more JS files which @teamviewselect identified as an IP logger. And even if it was not an IP logger, why would it be so heavily obfuscated? Furthermore, why does the site prevent use of inspect element?
Anyway, I emailed [email protected] about the account @lilpeen with all the information I have, including links to the obfuscated files as well as several other dodgy repls on the profile.

CodeLongAndPros (1535)

@minx28 @lilpeen ok, it appears I was mistaken on a couple of points.

CodeLongAndPros (1535)

@lilpeen Sorry about the confusion, I've relisted it. Another mod locked it, but it's back on the site.

lilpeen (212)

@CodeLongAndPros Ok, thank you. @minx28 I think your criticism of the website I made almost a year ago is completely unnecessary. I don't know why a seperate website that I made has anything to do with my repl account. The reason the code was obfuscated wasn't because I was trying to hide anything but because I was just unorganized when I programmed it, and the reason I prevent inspect element is so people don't screw with my site. I also don't know what you mean by "dodgy repls". And what is your goal with contacting repl? Are you trying to get my account deleted or something because that seems like a really a** hole thing to do. Either way, your actions are very annoying to me.

teamviewselect (2)

@minx28 i have confirmed that there is a small line of code that is normally used on getting an iP address, i do NOT know if it's being logged into a db as it's in several different files

CodeLongAndPros (1535)

@lilpeen He is without fault here. I'd appreciate if you could take this to discord or email.

lilpeen (212)

@teamviewselect Is this about my repl or unblocked games website? Also, may I have the location of the line of code?

teamviewselect (2)

@lilpeen the unblocked games website and no you may not have the location of that line of code

CodeLongAndPros (1535)

@teamviewselect @lilpeen
Please take this to the original post, it's been relisted. This post is getting cluttered up. Thank you.

lilpeen (212)

@CodeLongAndPros The post is relisted but still locked, I am unable to leave comments. @teamviewselect Why tf can't I have the location of the code, I am trying to fix the problem. I do not remember creating an IP logger matching your description. What most likely happened, is your dumbass mistook a line of code for an IP logger and then started spreading misinformation. Give me a way to contact you so I can correct more of your obvious misinterpretations.

CodeLongAndPros (1535)

@lilpeen it is locked because I did not lock it. He is restricting the location so you do not remove it.

firefish (881)

[me thinking about how qemu is based on QCOW copy-on-write virtual hard disks then remembering that Fedora 33 is going to switch to Btrfs as it's primary file-system, copy-on-write is the future]

Highwayman (1439)

Why are there two as in aarch64?

Highwayman (1439)

Oh ok, thanks that makes sense now :P @CodeLongAndPros

CodeLongAndPros (1535)

@Highwayman They use them in chromebooks.

Highwayman (1439)

They’re using RISC on a computer?? Bruh. I know chrome books were bad but literally why. @CodeLongAndPros

Highwayman (1439)

Hm I have a feeling I just said something misguided... @Highwayman

CodeLongAndPros (1535)

@Highwayman Yeah that was a pain. I know that some have intel though.

Highwayman (1439)

Hm wait imagine they were like selling the chrome book and they were like “you can have a computer! shows one with intel chip or you can have even a phone! shows one with arm chip"
Oo look just one more upvote to 1024, imma upvote you

CodeLongAndPros (1535)

@Highwayman No, I bought a crappy chrome book for $400 that the touchscreen failed on and it was aarch64 /shudder

CodeLongAndPros (1535)

@Highwayman Just 15 more Gigs to go until I have as much cycles as I have Mb of ram! Yay!

Highwayman (1439)

Oof. They couldn’t even get it right XD @CodeLongAndPros

Highwayman (1439)

*me trying to do the math with my summer brain*

uhh... 2... times.... uhh.... no 2.... to the power.... uhh.... f.


Highwayman (1439)

Oof I wasn’t even close to that calculation, I think Im gonna cry in a corner XD @CodeLongAndPros

CodeLongAndPros (1535)

@Highwayman Don’t worry, I had to 50 math problems after my brain rotting this summer.

Highwayman (1439)

Huh I’ve never thought about it that way. I am always just like “I’m dumb -> school begins -> magic school stuff -> I no longer suck at thinking" @CodeLongAndPros

DynamicSquid (4534)

why are you so good with this low level stuff?

CodeLongAndPros (1535)

@DynamicSquid It's a UNIX thing. I also like installing Linux for fun.

CodeLongAndPros (1535)

@DynamicSquid And QEMU is not low level, BOCHS is.

JustAWalrus (1169)

It's not hard. I do it for a living. Honestly, depending on @CodeLongAndPros expertise, I'm probably the best at it on here. @DynamicSquid

JustAWalrus (1169)

I'm just good at anything low-level. QEMU isn't. Though I'm still good at it because I need it to run the operating systems I create. Actually, right now I am running a custom, ubuntu-based OS that I created. @CodeLongAndPros

CodeLongAndPros (1535)

@Wuru Bleeech.
I'm running a custom systems as well, based on Arch Linux.

DynamicSquid (4534)

@Wuru I'm running on a custom Windows 10. I changed the background colour so it's custom.

Highwayman (1439)


oh yeah? Well I’m running on a custom Mach! I have a wireless trackpad!