3 min read

Learn/Try Linux in your web browser

Learn/Try Linux in your web browser

I always thought that to learn Linux, you should install it in your system and an operating system, and it can be a little intimidating for learners, but now it can also be done in your browser using WebVM, a web-based virtual Linux environment powered by WebAssembly.

This blog is written by Akshat Virmani at KushoAI. We're building the fastest way to test your APIs. It's completely free and you can sign up here.

What is WebVM?

WebVM is an open-source project on GitHub that lets you run a complete Linux environment in your browser. It uses WebAssembly that enables high-performance code execution in web browsers, to emulate a Linux virtual machine. With WebVM, you can execute Linux commands, write and run scripts, and interact with a virtual filesystem. There are many great things about WebVM. Some of them are:

1. No Installation Required

You only need a browser with WebAssembly support (e.g., Chrome, Firefox, or Edge) to run Linux commands, eliminating complex setups like dual-booting, creating virtual machines, or provisioning cloud servers.

2. Learn Linux Safely

WebVM provides a sandboxed environment, ensuring that you can experiment with commands without affecting your main operating system.

3. Lightweight and Fast

WebAssembly makes WebVM run efficiently, even on Chromebooks or older laptops.

4. Accessible Anywhere

Whether you’re on a Windows PC, Mac, or even a tablet, you can access WebVM as long as you have a compatible browser and an internet connection.

5. Learning Linux Basics

Beginners can familiarise themselves with Linux commands, file management, and scripting in a risk-free environment.

6. Experimenting with Tools

Try out tools without needing a dedicated Linux machine.

7. Teaching and Demonstrations

Instructors can use WebVM during workshops or courses to provide students with hands-on experience.

8. Testing and Prototyping

Developers can quickly test shell commands or scripts without affecting their local setup.

Other Platforms to Try Linux Online

There are many online browser-based Linux platforms other than WebVM that are worth checking out; some of them are:

  1. JSLinux: A complete Linux emulator in JavaScript.
  2. DistroTest: Explore and test various Linux distributions.
  3. Webminal: An online terminal for learning Linux commands.

Key Features of Browser-Based Linux Environments

Support for advanced tasks like shell scripting and programming: These environments also support complex activities, including scripting and writing code in multiple languages making it suitable for both beginners and experienced users.

Interactive tutorials for command-line basics: Many platforms offer step-by-step guides and interactive lessons to teach essential Linux commands. These tutorials help learners to gain knowledge by practising in a safe, guided environment.

Pre-configured setups for beginners: Browser-based Linux platforms come with fully set-up environments. This allows newcomers to learn without worrying about compatibility, complex installation or system requirements.

Getting Started with WebVM

1: Open WebVM

Visit the WebVM repository at https://github.com/leaningtech/webvm

2: Explore the Linux Shell

Once WebVM loads, you’ll see a Linux shell interface. This is your playground to execute commands and learn.

3: Basic Linux Commands

Start with simple commands to get comfortable:

# Display the current directory

pwd

# List files and directories

ls

# Create a new directory

mkdir my_folder

# Create a file

echo "Hello, WebVM!" > my_file.txt

# View file content

cat my_file.txt

Here’s the command execution

Limitations of WebVM

While WebVM is incredibly convenient, it’s not a replacement for a full Linux environment:

  1. Performance: Resource-intensive tasks may run slower.
  2. Limited Features: WebVM lacks access to hardware-specific features and custom kernel modules.
  3. Ephemeral Environment: Changes are not saved unless you configure persistent storage.

Conclusion

Now, you can learn and play with Linux without the headache of installing it on your system. Whether you’re a beginner learning the basics or an advanced user testing script, WebVM provides a simple and accessible way to explore Linux in your browser.

This blog is written by Akshat Virmani at KushoAIWe're building an AI agent that tests your APIs for you. Bring in API information and watch KushoAI turn it into fully functional and exhaustive test suites in minutes.