Category Archives: Linux

Linux mixed reality

Linux C error handling, errno and perror

If you have Java or .Net programming background you used to be familiar with exception which generated in runtime if something is going wrong with code execution. Linux C does not provide direct support to runtime error handling or exception handling. Usually code developer has to check return values from the functions. Generally C function… Read More »

Bash script for xml parsing

Usually XML processing is already implemented in programming languages. Several of them have numerous API for that. However some of these API are awkward and cumbersome. Recently it was necessary to parse xml file from bash script so I create my own parser. Basically what I create it is not inversion but small and it… Read More »

Kill Process Programmatically by PID

If your computer is slow it could be that some of the running processes is frozen state. So it is time to terminate them. In Windows you can do it thought Task Manager in Mac using Activity Monitor. Similarly the process may be stopped in Windows command prompt by TaskKill command or in Mac/Linux terminal… Read More »

CentOS upgrade.

Updating CentOS Linux is pretty simple procedure. Recently I updated one of my CentOS VM from one release to another and I want to share this information and keep it for future reverences. I did it though terminal window and started with checking initial release version: # cat /etc/redhat-release CentOS Linux release 7.5.1804 (Core) So… Read More »

Astra Linux on Oracle Virtual Box

Astra Linux is Russian made Debian based operating system, mainly developed military needs. It is complete commercial product with 2 main releases: “Orel” (general purpose common edition) and “Smolenk” (special edition for government utilization including Russian army forces and intelligence agencies). The Astra Linux was developed by by Russian company RusBITech in 2008. The product… Read More »

Yum Repositories Control or “No package … available”

If you want to install something using yum for example abracadabra tool but get message “No package abracadabra available” it could mean that abracadabra tool does not exist at all, appropriate repository is not presented on your machine or repository is presented but not enabled. The first problem could not be fixed unless it is… Read More »

How to edit Mac dmg file on Linux Platform.

For example I have Apache Web server where Mac dmg file is located. I want to modify for every download adding specific readme file, depending on the region where download request is coming from. A special shell script can do this job, but before I need to verify all script steps manually. This article explains… Read More »

Compiling a Linux Kernel

Rebuilding the Linux kernel is very interesting and sometime often scares off newbies. But there is nothing difficult in this, and compiling the Linux kernel is no more complicated than compiling any other source code. You may need to rebuild the kernel when you need to add some functions not included in the current kernel,… Read More »

Get kernel information through command line and programatically

The primary command to get kernel information is uname. The uname command reports basic information about operating system and hardware kernel. For example “name -p” prints the processor type or “unknown”, if it cannot file one. The “-r” option returns the kernel release version. To get full configuration for currently used kernel run the followung… Read More »

sysctl command and function

sysctl is a operating system command of some Unix-like OS that permits to reads and/or modify the parameters of the OS kernel for example limit and setting values of some system attributes. It is available both as a system API for compiled programs, and an administrator command for terminal interface and scripting. Below presented 2… Read More »