Run a Linux terminal in your Windows browser

If you want to try using a Linux terminal and you’re not sitting near a Linux system, don’t despair. Some services will let you run a Linux terminal in a browser. This article takes a look at some of them and should give you an idea of what you can do and what performance you might experience.
The Linux terminal sessions described here were all run on a Windows system using a Chrome browser. While you could just as easily run a Linux terminal in a browser on a Linux system, you’d probably be less motivated to do so.
JSLinuxName
JSLinux is basically a computer implemented in JavaScript. So all you have to do is open a browser and type in the correct URL to get started.
You will find available links to JSLinux via this site:
https://bellard.org/jslinux/
Of the eight systems listed, six are Linux. Choose one of the console windows listed. These URLs include:
I prefer the Fedora 33 implementation of JSLinux because it includes man pages while the other two don’t seem to.
You will eventually be logged in as root, although the who will not be available to acknowledge your attendance. Even so, the who am I and the pwd command will confirm your identity:
localhost:~# who; whoami; pwd sh: who: not found root /root
If you wish, you can compile the Hello C program and run it, you should see this.
localhost:~# cc -o hello hello.c localhost:~# ls
bench.py hello hello.js hello.c readme.txt localhost:~# hello sh: hello: not found localhost:~# ./hello hello world
You might want to run some of your favorite Linux commands, create a script or two, and explore the command line. I assembled and ran a simple bash script to count the files in each of the directories in my search path.
$ cat count_commands #!/bin/bash for dir in `echo $PATH | sed “s,:, ,g”` do echo $dir ls $dir | wc -l echo “==========” done
[[email protected] ~]# ./count_commands /usr/local/sbin 0 =========== /bin 2349 =========== /sbin 609 =========== /usr/bin 2349 =========== /usr/sbin 609 =========== /usr/local/bin 9
Obviously, the system is equipped with many Linux commands.
If you are having trouble trying to run a script, source the script like this:
[[email protected] ~]# ./count_commands sh: ./count_commands: not found [[email protected] ~]# . count_commands
Even with the current filesystem location in my search path on one of the systems, I needed to source the script to make it work.
To check your search path, use a command like this:
$ echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
The manual page directories on Fedora look like this:
[[email protected] ~]# ls /usr/local/share/man man1 man2 man3 man4 man5 man6 man7 man8 man9 mann man1x man2x man3x man4x man5x man6x man7x man8x man9x [[email protected] ~]# ls /usr/share/man ca es it man1 man2x man4 man6 man8 mann pt_BR sv zh_TW cs fr ja man1p man3 man4x man6x man8x nl ru tr da hu ko man1x man3p man5 man7 man9 pl sk uk de id man0p man2 man3x man5x man7x man9x pt sr zh_CN
Running a manpage command when manpages are available works as expected.
[root#localhost !]# man date [[email protected] ~]# DATE(1) User Commands DATE(1) NAME date - print or set the system date and time SYNOPSIS date [OPTION]... [+FORMAT] date [-u|—utc|—universal] [MMDDhhmm[[CC]YY][.ss]] DESCRIPTION Display the current time in the given FORMAT, or set the system date. Mandatory arguments to long options are mandatory for short options too.
...
Asking for the IP address of the system I was using, I saw the loopback interface (127.0.0.1) and a 10.xxx internal address.
localhost:~$ ip a 1: lo:mtu 65536 qdisc noqueue state UNKNOWN qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever 2: eth0: mtu 1500 qdisc pfifo_fast state UNKNO WN qlen 1000 link/ether 02:46:81:31:ca:a3 brd ff:ff:ff:ff:ff:ff inet 10.5.218.60/16 brd 10.5.255.255 scope global dynamic eth0 valid_lft 817sec preferred_lft 667sec
NOTE: When you open one of these JSLinux consoles, you always boot to the same place: a new Linux terminal. Any scripts or changes you make will not be retained in any way.
copy.sh
Copy.sh is another virtualization tool that lets you run Linux (or a number of other operating systems) in a browser. To see all the available options, go to http://copy.sh/v86/. You’ll find a few dozen options that include Windows, FreeBSD, Oberon, and a number of others besides Linux.
I looked at these options:
The Damn Small Linux option provides a GUI that I haven’t fully explored yet.
Again, how to run my script varied depending on the distro I was using. I had to source my script from the buildroot terminal, but not on the archlinux a.
~% cat showme #!/bin/bash echo “Hi, there” echo -n “What are you looking for?: “ read ans echo “Sorry, I have never heard of coffee” ~% .showme ./showme: not found ~% . ./showme Hi, there What are you looking for?: coffee Sorry, I have never heard of coffee
I also ran count_commands script
~% . ./count_commands
/sbin
55
===========
/usr/sbin
32
===========
/bin
75
===========
/usr/bin
131
===========
One of the things that I really liked copy.sh was that it gave me the option to “Save State” and “Load State”. This means that I was able to keep the scripts I added and retrieve them the next time I logged in from the v86state.bin file that had been saved on my system.
The only strange problem I encountered with the copy.sh involved terminals to use Control-Alt+Delete followed by hitting “Cancel” to free my trackball from the clutches of the terminal.
Conclude
The speed of terminal options in a browser isn’t always impressive, but it’s nice to try Linux in a browser and explore what it can do for you. Many Linux commands are available, and despite some quirks and performance issues, virtualized Linux systems can be very enjoyable to use.
Copyright © 2022 IDG Communications, Inc.