≡ Menu

SELinux chconIn SELinux, one of the frequent task that you may do is to change the security context of an object. For this, you’ll use chcon command.

chcon stands for Change Context.

This command is used to change the SELinux security context of a file.

This tutorial explains the following chcon command examples:

  1. Change the Full SELinux Context
  2. Change Context Using Another File as a Reference
  3. Change Only the User in SELinux Context
  4. Change Only the Role in SELinux Context
  5. Change Only the Type in SELinux Context
  6. Change Only the Range (Level) in SELinux Context
  7. Combine User, Role, Type, Level in chcon
  8. Default Behavior of Chcon on Symbolic Link
  9. Force Change SELinux Context of Symbolic Link
  10. Change SELinux Context Recursively
  11. Display Verbose Details of chcon Operation
  12. Chcon Default Behavior on Symbolic links for Recursive
  13. Force chcon to Traverse Specified Symbolic links for Recursive
  14. Force chcon to Traverse ALL Symbolic links for Recursive
  15. Chcon Behavior on / root directory for Systemwide Change


In C++, the most common type of inheritance is public.

The public type of inheritance is used in order to broaden the parent class with some functionalities or some data members.

This type of public inheritance is sometimes called the ” is “, as the parent class and the child class are of the same type and that could be seen with conversions, where the child class has more to it, than parent one.

The private inheritance is of different type, it is of ” has ” type.

This means that private inheritance is suitable for situations in which we need to prevent main program to accidentally access some of the methods inherited from the parent class.

The protected inheritance is less restrictive than private and it is useful when we need some of the implementations from grand parent class.

12 Essential Python For Loop Command Examples

Python For LoopFor loop is an essential aspect of any programming language.

In python, for loop is very flexible and powerful.

In this tutorial, we’ve explained the following Python for loop examples.

  1. Python For Loop for Numbers
  2. Python For Loop for Strings
  3. Python For Loop Using Default Range Function
  4. Python For Loop With Custom Start and End Numbers
  5. Python For Loop With Incremental Numbers
  6. Python For Loop Range with Negative Values
  7. Continue Statement Inside Python For Loop
  8. Break Statement Inside Python For Loop
  9. Can a For Loop itself have an Else without If?
  10. Else and Break Combination Behavior Inside Python For
  11. Nested For Loops in Python
  12. Handling List-of-Lists in Python For Loop


If you are running VMWare ESXi, after you make certain configuration changes that doesn’t have anything to do with ip-address change, you might get the following error message during the system startup.

“Bringing up interface eth0: Error, Some other host already uses address [FAILED]”

As you can imagine, this will not start the network, and you cannot connect to the host node that is running on the VMWare ESXi.

Most of the time, this particular issue happens on ESXi host that is running Linux distros. In this particular example, I had this issue on CentOS 6 host.

In this quick article, we’ll explain how to fix this issue.

MariaDB Create Alter DropOnce you’ve installed and configured MySQL or MariaDB, the first step is to create a database.

Only after creating a database, you can create tables and insert records.

This tutorial explains the following examples that are used to create and manipulate a MySQL database:

  1. Create New MySQL Database
  2. Create MySQL DB with Specific Character Set (UTF8)
  3. Delete Existing MySQL Database
  4. Create MySQL DB Only If it Doesn’t Exists
  5. Drop MySQL DB Only If it Exists
  6. Alter Database Characteristics for db.opt
  7. Upgrade Data Directory Option for Migration and Encoding


Tomcat 9 InstallApache Tomcat is an open source Java server.

You need Tomcat when you want to deploy and execute a Java application that is written in any of the Java technologies including Java Servlet, JSP, etc.

This tutorial explains how to install the latest Apache Tomcat version 9.x on Linux platform

3 C Program Examples to Create a File with Data

This tutorial explains how to create a file from a C program.

In these examples, we’ll create new HTML files and write some content to it.

The content of the file will be different, but these three C example program should explain you how to use the c file functions like fopen, fprintf, etc., to create and manipulate files.

MariaDB Install and ConfigStarting from CentOS 7, you will not see a package called mysql-server in the yum repository.

Now the package is called as mariadb-server.

The original MySQL is now owned by Oracle corporation.

But MariaDB is a fork of the original MySQL database. Just like the original MySQL, MariaDB is also open source, developed by open source community, maintained and supported by MariaDB corporation.

From our point of view, only the package name is changed. MariaDB is still MySQL, and all the mysql command line utilities are still exactly named the same including the command called mysql.

This tutorial explains step-by-step on how to install and configure MariaDB on CentOS or RedHat based Linux distros.