We are quite often asked by students “How can I compile a C or C++ program on Linux operating systems using bash Terminal application?” Today we will show you how!
How To Set Up SSH Keys
SSH keys provide a more secure way of logging into a virtual private server with SSH than using a password alone. While a password can eventually be cracked with a brute force attack, SSH keys are nearly impossible to decipher by brute force alone. Generating a key pair provides you with two long string of characters: a public and a private key. You can place the public key on any server, and then unlock it by connecting to it with a client that already has the private key. When the two match up, the system unlocks without the need for a password. You can increase security even more by protecting the private key with a passphrase.
Hello World in Python
This is how you would display “Hello World” in Python.
print("Hello, World!")
Android Hello World
Before you start writing your first example using Android SDK, you have to make sure that you have set-up your Android development environment properly. We also assume that you have a little bit working knowledge with Android Studio from class.
So let us proceed to write a simple Android Application which will print “Hello World!”.
Hello World in Perl
This is how you would display “Hello World” in Perl. It’s quite similar to Bash, but note the differences carefully!
Create a text file called hello_world.pl
containing the following code:
#!/usr/bin/perl # # The traditional first program. # Strict and warnings are recommended. use strict; use warnings; # Print a message. print "Hello, World!\n";
Navigate to a directory where your hello_world.pl
is located and make the file executable:
$ chmod +x hello_world.pl
Now you are ready to execute your first perl script:
./hello_world.pl
Hello World in Bash
This is how you would display “Hello World” in Bash.
Create a text file called hello_world.sh
containing the following code:
#!/bin/bash # declare STRING variable STRING="Hello World" #print variable on a screen echo $STRING
Navigate to a directory where your hello_world.sh
is located and make the file executable:
$ chmod +x hello_world.sh
Now you are ready to execute your first bash script:
./hello_world.sh