How to install GCC the C compiler on Ubuntu 20.04 LTS Focal Fossa Linux

GCC, the GNU Compiler Collection is a compiler system developed to support various programming languages. It is a standard compiler used in most projects related to GNU and Linux, for example, Linux kernel. The objective of this tutorial is to install GCC the C compiler on Ubuntu 20.04 LTS Focal Fossa Linux. This will be achieved by using the apt install command.

In this tutorial you will learn:

  • How to install GCC compiler
  • How to Check C compiler version
  • How to Compile basic C program from source code
  • How to run C program

Read more

How to switch between multiple GCC and G++ compiler versions on Ubuntu 20.04 LTS Focal Fossa

In this tutorial we will install multiple versions of GCC and G++ compilers using the apt install command. Furthermore, by use of the update-alternatives tool you will learn how to easily switch between multiple GCC and G++ compiler versions and how to check the currently selected compiler version.

In this tutorial you will learn:

  • How to install multiple GCC and G++ compiler versions
  • How to create alternative compiler version list
  • How to switch between multiple compiler versions

Read more

How to install G++ the C++ compiler on Ubuntu 20.04 LTS Focal Fossa Linux

G++, the GNU C++ Compiler is a compiler in Linux which was developed to compile C++ programs. The file extensions that can be compiled with G++ are .c and .cpp. The aim of this tutorial is to install G++ the C++ compiler on Ubuntu 20.04 LTS Focal Fossa Linux. This will be achieved by installing the build-essential package.

In this tutorial you will learn:

  • How to install G++ compiler on Ubuntu 20.04
  • How to Check C++ compiler version
  • How to Compile basic C++ program from source code
  • How to run G++ to compile C++ program

Read more

Oracle Java SE Development Kit on Ubuntu 20.04 Focal Fossa Desktop/Server

Oracle Java installation on Ubuntu 20.04 Focal Fossa Linux

In this tutorial we will perform an installation of Oracle Java SE Development Kit on Ubuntu 20.04 Focal Fossa Desktop/Server.

Do you with to install OpenJDK the Oracle’s free and GPL-licensed alternative?
Follow our tutorial on how to install OpenJDK java on Ubuntu 20.04 Focal Fossa.

In this tutorial you will learn:

  • How to download Oracle Java
  • How to install Oracle Java
  • How to set path to Java executable by using the update-alternatives tool
  • How to check Oracle Java version

Read more

Using cookies in PHP

How to enable sessions in PHP with cookies

Cookies are all around in our everyday life while we browse the Internet. Most people wouldn’t know much about them, if not for those “our website uses cookies to be operational” signs that are on mostly any page now since GDPR. Cookies have a long history if sometimes being good, sometimes bad. As it is usual with most aspects of the world, this technology can be used in a good or bad way.

In this tutorial we will explore cookies a bit from the server side programming perspective: we’ll create an example cookie in PHP, and store the visitor’s chosen username in it. The cookie will reside in the browser of the visitor, so on the next visit we can read it and use it to greet the visitor on the username submitted.

Our simple webpage will recognize the visitor as long as the cookie is present in the browser. We do not store any information on the server side: if the visitor first checks in from a PC, and next time from a smartphone, we will not know it is the same individual. This is one of the main point with cookies: we can only identify the given client, and only as long as the data is provided by that particular browser.

In this tutorial you will learn:

  • How to setup the test environment
  • How to write a simple example program that uses cookies
  • How to test the workings of the program
  • How to reset the environment

Read more

Eclipse IDE for C/C++ Developers on Ubuntu 20.04

Eclipse IDE for C/C++ Developers installation on Ubuntu 20.04

In this tutorial you will learn how to install the latest version of Eclipse IDE for C/C++ Developers on Ubuntu 20.04 Focal Fossa Linux Desktop.

In this tutorial you will learn:

  • How to install Eclipse IDE prerequisites
  • How to download Eclipse IDE for C/C++ Developers
  • How to extract Eclipse IDE for C/C++ Developers package
  • How to launch Eclipse IDE
  • How to create Eclipse IDE desktop launcher

Read more

Bash Script Comment Example

How to write comments in Bash Scripts

Well you have written an awesome Bash script. It works perfectly and perhaps there is no need to add new functionality. Well, maybe not for now, at least! At this stage you are happy with the script. However, after few months you reopen your bash script again to add new feature and you get a headache to figure out on how the script actually works. Hence, you need to spend additional energy and time before you can actually start editing the script in order to add new feature.

Well, at this point you regret that you did not put some comments ( notes ) into the script to remind you of how the bash script is structured. Not only that Bash comments serve as excellent notes for you or anybody else who might work with your script they may be to some extend also used as a basic bash script debugging tool.

In this tutorial you will learn:

  • How to comment on bash command line
  • How to write comment bash scripts
  • How to create multiple line comments

Read more

Bash Terminal

How to Debug Bash Scripts

There are techniques from traditional programming environments that can help.
Some basic tools like using an editor with syntax highlighting will help as well.
There are builtin options that Bash provides to make debugging and your everyday Linux System Administration job easier.

In this article you will learn some useful methods of debugging Bash scripts:

  • How to use traditonal techniques
  • How to use the xtrace option
  • How to use other Bash options
  • How to use trap

Read more

Recording data trough browser

Persisting data into a PosgreSQL database with PHP

PHP is a widely used server scripting language. It’s vast capabilities and lightweight nature makes it ideal for web frontend developing, and while it is possible to create advanced structures in it, it’s basic usage also easy to learn, which makes it a good starting point for beginners also. The data recorded, processed, sent or displayed by the application we build is need to be stored somewhere, however; our webpage is stateless without this data. We can store our data in many ways or even discard it after use, but the most standard way is storing it in a database designed for the sole purpose of storing data in a reliable way, and present it if needed, as fast as possible.

In this tutorial we will build a simple webpage to record and display user data. We will use a PostgreSQL RDBMS as backend, and develop our application in PHP that will run on an Apache Webserver. This way we can access our web application from any common browser to view or add to our user database. It is the nature of the web application that many users/operators can work with it simultaneously, all they need is a browser and network access to our application.

In this tutorial you will learn:

  • How to install needed packages for PostgreSQL connection in PHP
  • How to create the database side of the application
  • How to code the example application
  • How to operate and verify the example application

Read more

Project creation with Compass.

How to install compass on RHEL 8 / CentOS 8

Compass is an open-source CSS authoring framework that can compile .css stylesheet files from .sass files as they are written, thus making the life of a web designer easier. In this tutorial we will install Compass on RHEL 8 / CentOS 8, with all of it’s dependencies.

In this tutorial you will learn:

  • How to install dependencies required by Compass
  • How to Compass
  • How to create a Compass project

Read more