linux in a window windows running linux by nicolas solerieu via unsplash

Run a Linux terminal in your Windows browser

If you want to try using a Linux terminal and are not sitting anywhere near a Linux system, don’t worry. There are some services that allow you to run a Linux terminal inside a browser. This post examines some of these and should give you a sense of what you can do and the performance you might encounter.

All Linux Terminal sessions described here ran on Windows using the Chrome browser. While you can easily run a Linux terminal in a browser on Linux, you will likely be less motivated to do so.

js linux

JSLinux is basically a PC 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 the links available for JSLinux through this site:

https://bellard.org/jslinux/

Of the eight systems listed, there are six Linux systems. Go to one of the listed console windows. These URLs include:

I prefer Fedora 33 from JSLinux because it includes human pages while the other two don’t seem to.

You will end up logging in as root, even though the . file World Health Organization It won’t be up to you to acknowledge your existence. However, the who am I and the pwd The command will confirm your identity:

localhost:~# who; whoami; pwd
sh: who: not found
root
/root

If you wish, you can collect files hi 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 may want to run some of your favorite Linux commands, put a text or two together and explore the command line. I compiled and ran a simple bash script to count the number of files in each directory 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
[root@localhost ~]# ./count_commands
/usr/local/sbin
0
===========
/bin
2349
===========
/sbin
609
===========
/usr/bin
2349
===========
/usr/sbin
609
===========
/usr/local/bin
9

It is clear that the system is equipped with many Linux commands.

If you run into problems when trying to run a script, source the script like this:

[root@localhost ~]# ./count_commands
sh: ./count_commands: not found
[root@localhost ~]# . count_commands

Even with the current file system location in my search path on one of the systems, I needed the source script to run.

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 man page directories in Fedora look like this:

[root@localhost ~]# ls /usr/local/share/man
man1   man2   man3   man4   man5   man6   man7   man8   man9   mann
man1x  man2x  man3x  man4x  man5x  man6x  man7x  man8x  man9x
[root@localhost ~]# 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 the man page command when man pages are available works as you expect.

[root#localhost !]# man date
[root@localhost ~]# 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.
...

When asking about the IP address of the system I was using, I saw the loopback interface (127.0.0.1) and the internal 10.xxx address.

localhost:~$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> 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: <BROADCAST,MULTICAST,UP,LOWER_UP> 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 a JSLinux console, it will always start from the same place—a fresh Linux terminal. Any texts or changes you make in any way will not be preserved.

copy.sh

Copy.sh is another virtual tool that allows you to run Linux (or a number of other operating systems) inside a browser. To see all 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 in addition to Linux.

I looked at these options:

The Damn Small Linux option provides a graphical interface that I haven’t fully explored yet.

Again, how my script would run varied with the distro I was using. I had to get my script source on Root building The station, but not on Archylinx One.

~% 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 Number_command script

~% . ./count_commands
/sbin
55
===========
/usr/sbin
32
===========
/bin
75
===========
/usr/bin
131
===========

One of the things I liked the most copy.sh Is that it gave me the option to Save Status and Load Status. This means that I was able to preserve the scripts I added and restore them on the next connection from v86state.bin The file that is saved on my system.

The only weird problem I’ve had with copy.sh Stations involving the need to use Control-Alt + Delete Followed by hitting “Cancel” to free my trackball from the clutches of the device.

is contained

The speed in Terminal-in-a-browser options isn’t always impressive, but it’s a good idea to try Linux in-browser and explore what it can do for you. There are a lot of Linux commands available, and despite some quirks and performance issues, Linux virtual systems can be very nice to use.

Join the Network World communities on Facebook and LinkedIn to comment on the topics we care about.

Copyright © 2022 IDG Communications, Inc.

Leave a Comment

Your email address will not be published.