If you want to try using a Linux terminal and you are not close to a Linux system, do not despair. There are some services that will allow you to run a Linux terminal in a browser. This post looks at some of them and should give you a sense of what you can do and the effectiveness you can experience.
The Linux terminal sessions described here were launched on Windows using the Chrome browser. Although you can just as easily run a Linux terminal in a Linux browser, you will probably be less motivated to do so.
You will find available links to JSLinux through this site:
Of the eight systems listed, six are Linux. Go to one of the listed console windows. These URLs include:
I prefer the implementation of Fedora 33 from JSLinux because it includes man pages, while the other two do not look.
Eventually you will be logged in as root, however WHO the command will not be available to confirm your presence. Even so, on who am I and on Pwd command will confirm your identity:
localhost:~# who; whoami; pwd sh: who: not found root /root
If you want, you can compile 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 may want to run some of your favorite Linux commands, compile one or two scripts, and explore the command line. I compiled 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
[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 encounter problems when trying to run a script, the source of the script is as follows:
[root@localhost ~]# ./count_commands sh: ./count_commands: not found [root@localhost ~]# . count_commands
Even with the current location of the file system in my search path for one of the systems, I had to retrieve 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 directories on the Fedora man page 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
Executing the man page command when man pages are available works as you would 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.
I asked for the IP address of the system I was using, I saw the feedback interface (127.0.0.1) and an 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 one of these JSLinux consoles, you will always start from the same location – a new Linux terminal. Any scripts or changes you make will not be saved in any way.
Copy.sh is another virtualization tool that allows you to run Linux (or a number of other operating systems) in a browser. To see all available options, go to http://copy.sh/v86/. You will find several dozen options that include Windows, FreeBSD, Oberon and many 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.
Once again, how to run my script varied depending on the distribution I used. I had to find my script from buildroot terminal, but not on archlinux 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 let go count_commands script
~% . ./count_commands
One of the things I really liked kopie.sh was that it gave me the ability to “Save Status” and “Load Status”. This means that I was able to save the scripts I added and restore them the next time I connected from v86state.bin a file that was saved to my system.
The only weird problem I encountered kopie.sh terminals to be used Control-Alt + Delete followed by pressing “Cancel” to free my trackball from the clutches of the terminal.
The speed of browser options in the browser is not always impressive, but it’s good to try Linux in the browser and explore what it can do for you. Many Linux commands are available, and despite some oddities and performance issues, virtualized Linux systems can be very enjoyable to use.
Copyright © 2022 IDG Communications, Inc.