≡ Menu

gnu linux

Linux Find Out What Compilers Are Installed or Available On The System

How do I find out what compilers are installed under Debian / Ubuntu / Red hat Enterprise / CentOS Linux operating systems? How do I list all available compiler packages under Linux?
[click to continue…]

Debian Linux Install Truetype Fonts For Xorg

How do I install TrueType fonts under Debian GNU/Linux desktop operating systems?
[click to continue…]

HowTo: Upgrade Debian 5.0 (Lenny) To Debian 6.0 (Squeeze)

Debian 6.0 "Squeeze" has been released and how do I upgrade to Debian GNU/Linux 6.0 from the previous release, Debian GNU/Linux 5.0 ("Lenny") using command prompt?
[click to continue…]

du Command Output In Human Readable Format ( GB / MB / TB )

I need to get a list of sizes in human readable du output format. How do I get the output for du command in GB under Linux or UNIX operating systems?
[click to continue…]

Find: UNIX Operating System Release and Version Number

How do I find Unix version and release number using command line options? What version, release, and maintenance level of Unix is running on my system?
[click to continue…]

Linux Command: Show Linux Version

What command I need to type to display Linux kernel version and other information such as Linux distribution name? How do I check Linux kernel version number?
[click to continue…]

How To Select Best Linux Desktop Application

Q. I'm new to GNU/Linux world and a single query (apt-cache search office or yum search 'office') shows so many application for a single task such as network monitoring or office applications. The number of apps choices just confusing. How do you select application from so many choices?
[click to continue…]

Linux Downloads For Server / Desktop / Laptop Users

I would like to switch to Linux. I want to try free and functional operating system. How do I download Linux ISO images to install on my Desktop / Laptop / Server? Where can I download Linux operating system for my desktop usage?
[click to continue…]

HowTo: Find Out My Linux Distribution Name and Version

How do I find out what version of Linux distribution I'm using from the shell (bash) prompt?
[click to continue…]

If else statement in C Program

Q. Can you give me example for If else statement in C Program under Linux or TC?

A. C follows universal syntax for if..else. You can use any complier GNU Linux gcc or UNIX or old good TC.

if..else syntax

General if..else syntax is as follows:

if ( condition ) {
else  {

If given condition is TRUE, expr_set1 will get executed.
If given condition is FALSE (not TRUE), expr_set2 will get executed.

if..else example

Following example will find out large number from given input:

int main(){
        int x,y;
        printf("Enter value for x :");
        printf("Enter value for y :");
        if ( x > y ){
                printf("X is large number - %d\n",x);
                printf("Y is large number - %d\n",y);
        return 0;