Home

Awesome

		     __       ________   _______   _____   _     _    __
		    |  |     |__    __| |   ____| |  _  | | \   / |   \ \           
		    |  |        |  |    |  |__    | |_| | |  \_/  |    \ \          
		    |  |      o |  |    |     |   |   __| |   _   |     \ \         
		    |  |      o |  |    |   __|   |   \   |  | |  |     / /         
		    |  |____  o |  |    |  |____  |    \  |  | |  |    / / ____   
		    |_______| o |__|    |_______| |__|\_\ |__| |__|   /_/ |____|  

lterm: Online bash terminal(emulator) tutorial

Check out the site live at: lterm Gitter

lterm is an online Terminal Emulator. It is a step by step tutorial that will teach you the bash commands by making you execute them.

Nothing is better than learning by doing.

It is fully online and doesn't require any extra shitty access. Being an emulator, it only virtualizes a terminal environment and so the commands executed doesn't effect either the server or your local machine.

List of commands available presently

CommandDoes...
echoTo display a string
pwdShows you the present working directory
lsLists all the files
cdTo change directory - change the current working directory to a specific directory
cd ..Moves you up one directory(parent)
catConcatenate and print the content of files
clearClears the terminal screen
touchChanges file timestamps or creates a new file
cp/mvTo copy/move files
rmDelets a file/directory
unameShows the name of the Linux/Unix system you are using
dateShows the local standard date & time
ifconfigShows information about active network interfaces.
mkdirCreates a new directory
ttyPrints the file name of the terminal connected to standard input
historyShows all the commands which are used in the previous iterations

List of commands that can be added

Contributing

  1. Fork it (https://github.com/sr6033/lterm/fork)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request

To add your new commands


// without argument
ls: function() {
        this.echo('This is the ls command\n');
}
// with argument
echo: function(arg1) {
        this.echo('This is the echo command' + arg1 + '\n');
}
cd: function(arg1) {
	this.push(function(cmd, term) {
                if(cmd == 'another_command')
                    this.echo('another_command');
		}, {
                    prompt: '[[b;#44D544;]lterm@localhost/' + arg1 + ':~$] ',
                   }
        );
}

IMPORTANT

var arr = [0,0,0,0,0,0,0,0,0,0,0,0,0,0]; // Will add another 0 here. The place where you added is the index.
var arr2 = ['list of all other commands']; // Will add the 'echo' command here
...
...
echo: function(arg1) {
            arr[index_where_you_added_0] = 1;	// Will make the value at that index to 1. 	
            this.echo(arg1 + '\n');
            this.echo('> The [[b;#ff3300;]echo] command prints back your arguments.');
            this.echo('> Type [[b;#ff3300;]help] and check your first task is completed.');
            this.echo('> Now type [[b;#ff3300;]pwd] to continue.');
},

NOTE: Kindly keep the display of the terminal intact while making an update. A single extra space can make the look of the emulator little odd. So keep that in mind while printing something using echo command.

Note: Kindly have interpretable & good commit messages. Don't assume me to be some Jedi with powers to be able to make out every commit with a single word as message. May the Force be with you.