Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to run Linux on Web

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

How to run Linux on Web, I believe that many inexperienced people do not know what to do. Therefore, this paper summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.

A programmer named Fabrice Bellard wrote a Javascript to launch Linux in the Web browser (the original page, I put this page iframe below), currently, you can only use Firefox 4 and Chrome 11 to run this Linux. This is not a fake imitation of Linux, it is actually running a Linux. The move has also attracted a lot of attention, including Brendan Eich, the founder of Javascript.

IP route cache hash table entries: 1024 (order: 0, 4096 bytes) TCP established hash table entries: 1024 (order: 0, 4096 bytes) TCP bind hash table entries: 1024 (order:-1) 2048 bytes) TCP: Hash tables configured (established 1024 bind 512) TCP reno registered checking if image is initramfs...it isn't (bad gzip magic numbers) Looks like a n initrd Freeing initrd memory: 2048k freed Total HugeTLB memory allocated 0 io scheduler noop registered io scheduler anticipatory registered io scheduler deadline registered io scheduler cfq registered (default) Real Time Clock Driver v1.12ac JS clipboard: I take O at 0x03c0 Serial: 8250 max 16550 driver $Revision: 1.90 $4 ports IRQ sharing disabled serial8250: ttyS0 at 0x3f8 O 0x3f8 (irq = 4) isa 16450 RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize loop: loaded (max 8 devices) TCP cubic registered NET: Registered protocol family 1 NET: Registered protocol family 17 Using IPI Shortcut mode Time: pit clocksource has been installed. RAMDISK: ext2 filesystem found at block 0 RAMDISK: Loading 2048KiB [1 disk] into ram disk... Done. VFS: Mounted root (ext2 filesystem). Freeing unused kernel memory: 124k freed W IP route cache hash table entries: 1024 (order: 0, 4096 bytes) TCP established hash table entries: 1024 (order: 0, 4096 bytes) TCP bind hash table entries: 512 (order:-1) 2048 bytes) TCP: Hash tables configured (established 1024 bind 512) TCP reno registered checking if image is initramfs...it isn't (bad gzip magic numbers) Looks like a n initrd Freeing initrd memory: 2048k freed Total HugeTLB memory allocated 0 io scheduler noop registered io scheduler anticipatory registered io scheduler deadline registered io scheduler cfq registered (default) Real Time Clock Driver v1.12ac JS clipboard: I take O at 0x03c0 Serial: 8250 max 16550 driver $Revision: 1.90 $4 ports IRQ sharing disabled serial8250: ttyS0 at 0x3f8 O 0x3f8 (irq = 4) isa 16450 RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize loop: loaded (max 8 devices) TCP cubic registered NET: Registered protocol family 1 NET: Registered protocol family 17 Using IPI Shortcut mode Time: pit clocksource has been installed. RAMDISK: ext2 filesystem found at block 0 RAMDISK: Loading 2048KiB [1 disk] into ram disk... Done. VFS: Mounted root (ext2 filesystem). Freeing unused kernel memory: 124k freed Welcome to JS/Linux

Subsequently, Fabrice Bellard issued a related technical note: http://bellard.org/jslinux/tech.html, from which we can see:

This simulator is written entirely by Javascript

The CPU simulator uses QEMU (close to the original 486) and has made some changes to install Linux.

Javascript's terminal could have used termlib, but he wrote one himself because the button of OS is different from that of Web browser (here).

Linux uses the 2.6.20 kernel, compiled and configured here, and made some minor changes.

The disk uses Ram Disk and is loaded at startup. Its file system is generated by Buildroot and BusyBox.

There is a hello.c program in the Home directory, which you can compile using TinyCC (tcc, see Cool Shell article)

I have these feelings from this matter.

Running a Linux operating system on Web is not a problem. So is there anything else you can't do on Web?

Linux is really high performance, and it doesn't feel slow to run under Javascript.

After reading the above, have you mastered how to run Linux on Web? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report