Vidyalelo
Computer Science · all questions

Linux
practice.

Practice every MCQ with options. Use Show answers when you want the correct option and solution.

996

Questions

8/50

Page

Pick an option on a question to see the right answer and solution.

How to run a process in the background?

Select an option to see the answer and solution.

What is the output of the program?
#! /usr/bin/awk -f
BEGIN {
    a["linux","MCQ"]="example"
    print a["linux","MCQ"]	   
}

Select an option to see the answer and solution.

Which command wait for the specified process to complete and return the exit status?

Select an option to see the answer and solution.

Static files of the bootloader are installed in

Select an option to see the answer and solution.

Which built-in function divides string into pieces seperated by fieldsep and stores the pieces in array?

Select an option to see the answer and solution.

If you are a root user, how can you grand execute permission only for the owner of the file project1?

Select an option to see the answer and solution.

Assuming the files fileA, fileB, fileAB, fileBC and fileABC, exist in a directory, which files match with the pattern file[ABC]?

Select an option to see the answer and solution.

Which gcc option stops compilation process after preprocessing stage?

Select an option to see the answer and solution.

Running "make" command without the arguments starts the target . . . . . . . . in the makefile.

Select an option to see the answer and solution.

What is the output of this program?
#include<stdio.h>
#include<stdlib.h>
 
int main()
{
    int fd[2];
    int child;
    char buff[6];
    if(pipe(fd) != 0)               
        perror("pipe");
    child=fork();
    switch(child){
        case -1 :
            perror("fork");
            exit(1);
        case 0 :
            if (write(fd[1],"Linux",6) != 6)
                perror("write");
                break;
            default :
                read(fd[0],buff,6);
                printf("%s\n",buff);
                break;
    }
    return 0;
}

Select an option to see the answer and solution.

As we type "make" command on the terminal

Select an option to see the answer and solution.

which of these is NOT a valid variable in bash

Select an option to see the answer and solution.

Which command is used to display disk consumption of a specific directory

Select an option to see the answer and solution.

What is the output of this program?
#include<stdio.h>
#include<pthread.h>
 
int a;  
void *fun_t(void *arg);
void *fun_t(void *arg)
{       
    a = 20;
    pthread_exit("Bye");
}
int main()
{
    pthread_t pt;
    void *res_t;
    a = 10;        
    if(pthread_create(&pt,NULL,fun_t,NULL) != 0)
        perror("pthread_create");
    if(pthread_join(pt,&res_t) != 0)
        perror("pthread_join");
    printf("%d\n",a);
    return 0;
}

Select an option to see the answer and solution.

Attributes can be exported for objects in the form of . . . . . . . . in the file system.

Select an option to see the answer and solution.

What is the output of this program?
#! /usr/bin/awk -f
BEGIN {
    two=2;
    two++;
    print two 
}

Select an option to see the answer and solution.

Find / -name '*' will

Select an option to see the answer and solution.

. . . . . . . . is a directory (which should exist), on which to mount the file system?

Select an option to see the answer and solution.

The command "echo www.example.com > /proc/sys/kernel/hostname" will

Select an option to see the answer and solution.

Which one of the following is not true?

Select an option to see the answer and solution.