Skip to main content

Howdy, Ubuntu on Windows! Write and Execute Your First Program


Howdy, Ubuntu on Windows! Write and Execute Your First Program

Ubuntu on Windows
Canonical developer Dustin Kirkland is a space cowboy on the great Ubuntu-on-Windows frontier.
Microsoft’s addition of the Bash shell and Ubuntu user space in Windows 10 is a real win for developers working in dynamic, interpreted programming languages everywhere. Dozens of dynamic script interpreters are now immediately available on Windows desktops.
In this article, we’re going to write the classic “hello world” application in several different dynamically executed languages, install any necessary dependencies, and execute our interpreted code.
If you’d like to follow along this article and try out these examples, you can grab all of the source code from Git:
$ sudo apt update
$ sudo apt install -y git
$ cd howdy-windows

Now, let’s look at each language:
  1. Bash

  • Installation
    • None, bash is always installed in the default image, but just in case...
    • sudo apt install -y bash
  • Code: bash/howdy.sh
#!/bin/sh
echo "    ====> Shell: Howdy, Windows!”
  • Compilation
    • None, bash is an interpreted language
  • Execution
        $ chmod +x ./bash/howdy.sh
$ ./bash/howdy.sh
   ====> Shell: Howdy, Windows!
  1. Python

  • Installation
    • None, python is always installed in the default image, but just in case…
$ sudo apt install -y python
  • Code: python/howdy.py
        #!/usr/bin/python
print("    ====> Python: Howdy, Windows!")
  • Compilation
    • None, python is an interpreted language
  • Execution
        $ chmod +x ./python/howdy.py
$ ./python/howdy.py
   ====> Python: Howdy, Windows!
  1. Perl

  • Installation
$ sudo apt install -y perl
  • Code: perl/howdy.pl
        #!/usr/bin/perl
print("    ====> Perl: Howdy, Windows!\n");
  • Compilation
    • None, Perl is an interpreted language
  • Execution
        $ chmod +x ./perl/howdy.pl
$ ./perl/howdy.pl
   ====> Perl: Howdy, Windows!
  1. Ruby

  • Installation
$ sudo apt install -y ruby
  • Code: ruby/howdy.rb
        #!/usr/bin/ruby
puts "    ====> Ruby: Howdy, Windows!"
  • Compilation
    • None, Ruby is an interpreted language
  • Execution
        $ chmod +x ./ruby/howdy.rb
$ ./ruby/howdy.rb
   ====> Ruby: Howdy, Windows!
  1. PHP

  • Installation
$ sudo apt install -y php5-cli
  • Code: php/howdy.php
        #!/usr/bin/php
 print("    ===> PHP: Howdy, Windows!\n")
?>
  • Compilation
    • None, PHP is an interpreted language
  • Execution
        $ chmod +x ./php/howdy.php
$ ./php/howdy.php
   ===> PHP: Howdy, Windows!
  1. Node.js

  • Installation
$ sudo apt install -y nodejs
  • Code: nodejs/howdy.js
        console.log('    ====> NodeJS: Howdy, Windows!');
  • Compilation
    • None, Node.js is an interpreted language
  • Execution
        $ nodejs nodejs//howdy.js
   ====> NodeJS: Howdy, Windows!

Popular posts from this blog

Hidden Wiki

Welcome to The Hidden WikiNew hidden wiki url 2015 http://zqktlwi4fecvo6ri.onion Add it to bookmarks and spread it!!!
Editor's picks Bored? Pick a random page from the article index and replace one of these slots with it.
The Matrix - Very nice to read. How to Exit the Matrix - Learn how to Protect yourself and your rights, online and off. Verifying PGP signatures - A short and simple how-to guide. In Praise Of Hawala - Anonymous informal value transfer system. Volunteer Here are five different things that you can help us out with.
Plunder other hidden service lists for links and place them here! File the SnapBBSIndex links wherever they go. Set external links to HTTPS where available, good certificate, and same content. Care to start recording onionland's history? Check out Onionland's Museum Perform Dead Services Duties. Introduction PointsAhmia.fi - Clearnet search engine for Tor Hidden Services (allows you to add new sites to its database). DuckDuckGo - A Hidden S…

[SOLVED] IDM WAS REGISTERED WITH A FAKE SERIAL NUMBER

[SOLVED] IDM WAS REGISTERED WITH A FAKE SERIAL NUMBER
Good News [May 08, 2015]: IDM developers got smarter, but the crackers are always a step ahead. Follow this article and send an email to uglyduckblog@gmail.com if you are desperate. I can NOT post any crack here for legal reasons. Happy Downloading with IDM. ;) *********** first tip is to use latest crack for idm from  onhax.net idm universal web crack and make sure u are using all latest vers I am sure many of us are too much dependent on Internet Download Manager a.k.a. IDM. The main reason didn’t permanently switch to linux was IDM. I mainly use it for batch downloading and download streaming videos. Till yesterday, IDM was working fine with me (of course with fake serial numbers, keygen, crack, patch etc. which could be found with little effort). But few days ago, with the latest update version 6.18 build 7 (released on Nov 09, 2013) Internet Download Manager was literally had a breakthrough and crushed all the serial numbers, …

Mouse, touchpad, and keyboard problems in Windows

Mouse, touchpad, and keyboard problems in Windows Introduction This tutorial is designed to help you identify and fix common mouse, touchpad, and keyboard problems in Windows. It doesn't cover device problems related to specific programs. Mouse, touchpad, and keyboard problems can have a number of causes: Cables that aren't connected properly Incorrect device settings Missing updates Corrupted or incompatible drivers Hardware problems Check hardware Many mouse, touchpad, and keyboard problems are caused by hardware that isn't set up properly. Here's some information about how to check your device, make sure cables are connected properly, make sure the hardware has power, and check the settings. Make sure cables are connected properly Check that all cables are plugged in to the correct locations. This can include mouse and keyboard, PS2 and USB cables, and, in some cases, external USB touchpad cables. Disconnect USB cables and wait for a short time for the device drive…