===== Hello World in C =====
- First of all we need to install gcc: GNU Compiler Collection
- At the beginning, update the packages by typing apt-get update
- Subsequently install the compiler by typing apt-get install gcc
- Now create and open a .c file using nano editor nano hello.c
- Type following code: #include
int main()
{
printf("Hello World");
return 0;
}
- Save it using Ctrl + O (German keyboard: Strg + O)
- Exit using Ctrl + X (German keyboard: Strg + X)
- Compile the program using gcc gcc hello.c -o hello
- Type ls -l
- The created file has rights 644. Change it to 755 chmod 755 hello
- Type ./hello
to run the program
===== Hello World shell script =====
- Create and open file using nano editor nano helloBash
- Type following code:
#!/bin/bash
echo "Hello World"
- Save it using Ctrl + O (German keyboard: Strg + O)
- Exit using Ctrl + X (German keyboard: Strg + X)
- Type ls -l
- The created file has rights 644. Change it to 755 chmod 755 helloBash
- Type ./helloBash
to run the program
===== Hello World in Python =====
- First of all we need to install Python
- At the beginning, update the packages by typing apt-get update
- Subsequently install Python by typing apt-get install python
- Create and open a .py file using nano editor nano helloPt.py
- Type following code: print "Hello World"
- Save it using Ctrl + O (German keyboard: Strg + O)
- Exit using Ctrl + X (German keyboard: Strg + X)
- Run the program using python helloPt.py