Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

101.

What Can You Tell About The Tar Command?

Answer»

The TAR PROGRAM is an immensely useful archiving UTILITY. It can combine an entire directory tree into ONE large file suitable for TRANSFERRING or compression.

The tar program is an immensely useful archiving utility. It can combine an entire directory tree into one large file suitable for transferring or compression.

102.

What Linux Hotkeys Do You Know?

Answer»

Ctrl-Alt-F1 EXIT to command prompt
Ctrl-Alt-F7 or F8 Takes you back to KDE DESKTOP from command prompt
Crtl-Alt-Backspace Restart XWindows
Ctrl-Alt-D SHOW desktop

Ctrl-Alt-F1 Exit to command prompt
Ctrl-Alt-F7 or F8 Takes you back to KDE desktop from command prompt
Crtl-Alt-Backspace Restart XWindows
Ctrl-Alt-D Show desktop

103.

How Can You Find A Path To The File In The System?

Answer»

LOCATE file_name (locate - LIST files in DATABASES that match a PATTERN)

locate file_name (locate - list files in databases that match a pattern)

104.

How Can You See All Mounted Drives?

Answer»

MOUNT -L

mount -l

105.

What Is The Difference Between > And >> Operators?

Answer»

The operator > either overwrites the existing file (WITHOUT WARNING) or creates a new file.
The operator >> either adds the new CONTENTS to the END of an existing file or creates a new file.

The operator > either overwrites the existing file (WITHOUT WARNING) or creates a new file.
The operator >> either adds the new contents to the end of an existing file or creates a new file.

106.

List Two Ways To Create A New File:

Answer»

a.Copy a file to make a new file.
B. USE the output operator e.g. ls -L > newfile.txt

a.Copy a file to make a new file.
b. Use the output operator e.g. ls -l > newfile.txt

107.

What Is A Faster Way To Do The Same Command? Mv Fileo.txt Newdir Mv Filel.txt Newdir Mv File2.txt Newdir Mv File3.txt Newdir?

Answer»

A SHORTCUT METHOD WOULD be: mv file?.TXT newdir

A shortcut method would be: mv file?.txt newdir

108.

Which Of The Quoting Or Escape Characters Allows The Dollar Sign ($) To Retain Its Special Meaning?

Answer»

The double QUOTE (") allows the dollar sign ($) to RETAIN its SPECIAL MEANING. Both the backslash (\) and single quote (') would remove the special meaning of the dollar sign.

The double quote (") allows the dollar sign ($) to retain its special meaning. Both the backslash (\) and single quote (') would remove the special meaning of the dollar sign.

109.

List All The Files Beginning With A?

Answer»

To LIST all the FILES BEGINNING with A COMMAND: LS A*

To list all the files beginning with A command: ls A*

110.

Name Two Methods You Could Use To Rename A File?

Answer»

Two methods that could be used:
a. use the MV command
B. copy the FILE and give it a new name and then remove the original file if no longer needed.

Two methods that could be used:
a. use the mv command
b. copy the file and give it a new name and then remove the original file if no longer needed.

111.

What Are Two Functions The Move Mv Command Can Carry Out?

Answer»

The mv command moves files and can ALSO be USED to rename a file or DIRECTORY.

The mv command moves files and can also be used to rename a file or directory.

112.

When Is It Better To Use The More Command Rather Than Cat Command?

Answer»

It is SOMETIMES better to USE the more command when you are VIEWING a file that will display over one screen.

It is sometimes better to use the more command when you are viewing a file that will display over one screen.

113.

What Are Two Subtle Differences In Using The More And The Pg Commands?

Answer»

With the more COMMAND you display ANOTHER screenful by pressing the SPACEBAR, with pg you press the return key.

The more command returns you automatically to the UNIX SHELL when completed, while pg waits until you press return.

With the more command you display another screenful by pressing the spacebar, with pg you press the return key.

The more command returns you automatically to the UNIX shell when completed, while pg waits until you press return.

114.

Which Directory Is Closer To The Top Of The File System Tree, Parent Directory Or Current Directory?

Answer»

The PARENT directory is above the current directory, so it is CLOSER to the ROOT or TOP of the file system.

The parent directory is above the current directory, so it is closer to the root or top of the file system.

115.

What Is The Difference Between Home Directory And Working Directory?

Answer»

HOME DIRECTORY is the directory you begin at when you LOG into the system. Working directory can be ANYWHERE on the system and it is where you are currently working.

Home directory is the directory you begin at when you log into the system. Working directory can be anywhere on the system and it is where you are currently working.

116.

What Command Do You Type To Find Help About The Command Who?

Answer»

$ MAN who

$ man who

117.

Name Two Forms Of Security.

Answer»

TWO forms of security are PASSWORDS and FILE Security with PERMISSIONS specified.

Two forms of security are Passwords and File Security with permissions specified.

118.

What Is The Purpose Of Online Help?

Answer»

ONLINE HELP provides information on each operating system command, the syntax, the OPTIONS, the ARGUMENTS with DESCRIPTIVE information.

Online help provides information on each operating system command, the syntax, the options, the arguments with descriptive information.

119.

What Is The Difference Between An Argument And An Option (or Switch)?

Answer»

An argument is what the command should act on: it could be a filename, DIRECTORY or name. An option is SPECIFIED when you WANT to REQUEST additional INFORMATION over and above the basic information each command supplies.

An argument is what the command should act on: it could be a filename, directory or name. An option is specified when you want to request additional information over and above the basic information each command supplies.

120.

List The Three Main Parts Of An Operating System Command:

Answer»

The three MAIN PARTS are the command, options and ARGUMENTS.

The three main parts are the command, options and arguments.

121.

What Is The Difference Between Internal And External Commands?

Answer»

Internal COMMANDS are STORED in the; same level as the operating system while EXTERNAL commands are stored on the hard disk among the other UTILITY programs.

Internal commands are stored in the; same level as the operating system while external commands are stored on the hard disk among the other utility programs.

122.

How To Remove Directory With Files?

Answer»

RM -RF directory_name

rm -rf directory_name

123.

How To Copy File Into Directory?

Answer»

CP /tmp/file_name . (DOT MEAN in the CURRENT DIRECTORY)

cp /tmp/file_name . (dot mean in the current directory)

124.

What Utility Would You Use To Cut Off The First Column In A Text File?

Answer»

AWK, KDE

awk, kde

125.

What Utility Would You Use To Replace A String '2001' For '2002' In A Text File?

Answer»

GREP, KDE( WORKS on LINUX and UNIX)

Grep, Kde( works on Linux and Unix)

126.

How Do You Start A Job On Background?

Answer»

BG %4 (JOB 4)

bg %4 (job 4)

127.

How Do You Check For Processes Started By User 'pat'?

Answer»

PS -FU PAT (-F -full_format U -user_name )

ps -fu pat (-f -full_format u -user_name )

128.

How Do You Get Its Usage (a Filesystem)?

Answer»

By STORING and MANIPULATE FILES.

By storing and manipulate files.

129.

What Is A Filesystem?

Answer»

Sum of all DIRECTORIES called FILE system.
A file system is the primary means of file STORAGE in UNIX. File SYSTEMS are made of inodes and superblocks.

Sum of all directories called file system.
A file system is the primary means of file storage in UNIX. File systems are made of inodes and superblocks.

130.

How Do You List Contents Of A Directory Including All Of Its Subdirectories, Providing Full Details And Sorted By Modification Time?

Answer»

LS -LAC
-a all ENTRIES
-C by TIME

ls -lac
-a all entries
-c by time

131.

How Do You Get Help On A Unix Terminal?

Answer»

MAN command_name
INFO command_name (more INFORMATION)

man command_name
info command_name (more information)

132.

How Do You Log In To A Remote Unix Box?

Answer»

USING telnet server_name or SSH -l ( ssh - OpenSSH SSH CLIENT (REMOTE LOGIN program))

Using telnet server_name or ssh -l ( ssh - OpenSSH SSH client (remote login program))

133.

What Would You Use To View Contents Of A Large Error Log File?

Answer»

TAIL -10 file_name ( LAST 10 ROWS)

tail -10 file_name ( last 10 rows)

134.

What Would You Use To Edit Contents Of The File?

Answer»

VI screen EDITOR or jedit, nedit or EX LINE editor

vi screen editor or jedit, nedit or ex line editor

135.

How Do You Kill A Process?

Answer»

kill -9 8 (process_id 8) or kill -9 %7 (JOB number 7)
kill -9 -1 (Kill all processes you can kill.)
killall - kill processes by NAME most (useful - killall java)

kill -9 8 (process_id 8) or kill -9 %7 (job number 7)
kill -9 -1 (Kill all processes you can kill.)
killall - kill processes by name most (useful - killall java)

136.

How Do You Find Out The Processes That Are Currently Running Or A Particular User?

Answer»

ps -AU MYNAME (-u by EFFECTIVE user ID (supports names)) (a - all users)

ps -au Myname (-u by effective user ID (supports names)) (a - all users)

137.

How Do You Find Out All Processes That Are Currently Running?

Answer»

PS -F (-f does full-format LISTING.)

ps -f (-f does full-format listing.)

138.

How Do You List All Files In A Directory, Including The Hidden Files?

Answer»

LS -a (-a, do not HIDE ENTRIES STARTING with .)

ls -a (-a, do not hide entries starting with .)

139.

How Do You List Files In A Directory?

Answer»

ls - list DIRECTORY CONTENTS
ls -L (-l USE a LONG listing format)

ls - list directory contents
ls -l (-l use a long listing format)

140.

Explain Each System Calls Used For Process Management In Linux.

Answer»

SYSTEM calls USED for Process management:
Fork () :- Used to create a new process
Exec() :- Execute a new program
Wait():- wait until the process finishes execution
Exit():- Exit from the process
Getpid():- get the unique process ID of the process
Getppid():- get the parent process unique id
Nice():- to bias the existing PROPERTY of process

System calls used for Process management:
Fork () :- Used to create a new process
Exec() :- Execute a new program
Wait():- wait until the process finishes execution
Exit():- Exit from the process
Getpid():- get the unique process id of the process
Getppid():- get the parent process unique id
Nice():- to bias the existing property of process

141.

What Is A Zombie?

Answer»

ZOMBIE is a process state when the child dies before the parent process. In this case the structural information of the process is STILL in the process table. Since this process is not ALIVE, it cannot react to SIGNALS. Zombie state can FINISH when the parent dies. All resources of the zombie state process are cleared by the kernel.

Zombie is a process state when the child dies before the parent process. In this case the structural information of the process is still in the process table. Since this process is not alive, it cannot react to signals. Zombie state can finish when the parent dies. All resources of the zombie state process are cleared by the kernel.

142.

What Are The Process States In Linux?

Answer»

Process STATES in LINUX:
Running: Process is EITHER running or ready to run.

Interruptible: a Blocked state of a process and waiting for an event or signal from another process.

Uninterruptible:- a blocked state. Process waits for a hardware condition and cannot HANDLE any signal.

Stopped: Process is stopped or halted and can be restarted by some other process.

Zombie: process terminated, but information is still there in the process table.

Process states in Linux:
Running: Process is either running or ready to run.

Interruptible: a Blocked state of a process and waiting for an event or signal from another process.

Uninterruptible:- a blocked state. Process waits for a hardware condition and cannot handle any signal.

Stopped: Process is stopped or halted and can be restarted by some other process.

Zombie: process terminated, but information is still there in the process table.

143.

What Is Bash Shell?

Answer»

Bash is a free shell for UNIX. It is the default shell for most UNIX systems. It has a combination of the C and KORN shell features. Bash shell is not portable. any Bash-specific feature will not function on a system using the Bourne shell or one of its replacements, UNLESS bash is installed as a secondary shell and the script BEGINS with #!/bin/bash. It supports REGULAR and expressions. When bash script starts, it executes commands of DIFFERENT scripts.

Bash is a free shell for UNIX. It is the default shell for most UNIX systems. It has a combination of the C and Korn shell features. Bash shell is not portable. any Bash-specific feature will not function on a system using the Bourne shell or one of its replacements, unless bash is installed as a secondary shell and the script begins with #!/bin/bash. It supports regular and expressions. When bash script starts, it executes commands of different scripts.

144.

What Does Nslookup Do? Explain Its Two Modes.

Answer»

Nslookup is used to find details related to a Domain name server. Details like IP addresses of a machine, MX RECORDS, SERVERS etc. It sends a domain name query packet to the corresponding DNS.

Nslookup has two modes. Interactive and NON interactive. Interactive mode allows the user to interact by querying information about different hosts and domains.

Non interactive mode is used to fetch information about the specified HOST or domain.

Interactive mode:
Nslookup [options] [server]

Nslookup is used to find details related to a Domain name server. Details like IP addresses of a machine, MX records, servers etc. It sends a domain name query packet to the corresponding DNS.

Nslookup has two modes. Interactive and non interactive. Interactive mode allows the user to interact by querying information about different hosts and domains.

Non interactive mode is used to fetch information about the specified host or domain.

Interactive mode:
Nslookup [options] [server]

145.

What Stateless Linux Server? What Feature It Offers?

Answer»

A STATELESS Linux server is a centralized server in which no state exists on the single workstations. There may be scenarios when a state of a partilcuar system is meaningful (A snap SHOT is taken then) and the user wants all the other machines to be in that state. This is where the stateless Linux server COMES into picture.

Features:
It stores the prototypes of every machine.
It stores snapshots taken for those systems.
It stores home directories for those system.

Uses LDAP containing information of all systems to assist in FINDING out which snapshot (of state) should be running on which system.

A stateless Linux server is a centralized server in which no state exists on the single workstations. There may be scenarios when a state of a partilcuar system is meaningful (A snap shot is taken then) and the user wants all the other machines to be in that state. This is where the stateless Linux server comes into picture.

Features:
It stores the prototypes of every machine.
It stores snapshots taken for those systems.
It stores home directories for those system.

Uses LDAP containing information of all systems to assist in finding out which snapshot (of state) should be running on which system.

146.

Explain Trap Command; Shift Command, Getopts Command Of Linux

Answer»

Trap command: controls the action to be taken by the shell when a signal is received.
Trap [OPTIONS] [ [arg] signspec..]
Arg is the action to be taken or executed on receiving a signal specified in signspec.
e.g. trap “rm $FILE; exit” // exit (signal) and remove file (action).

SHIFT Command: USING shift command, command line arguments can be accessed. The command causes the positional parameters shift to the left. Shift [n] where n defaults to 1. It is USEFUL when several parameters NEED to be tested.

Getopts command: this command is used to parse arguments passed. It EXAMINES the next command line argument and determines whether it is a valid option.

Getopts {optstring} {variable1}. Here, optsring contains letters to be recognized if a letter is followed by a colon, an argument should be specified. E.g (whether the argument begins with a minus sign and is followed by any single letter contained inside options ) If not, diagnostic messages are shown. It is usually executed inside a loop.

Trap command: controls the action to be taken by the shell when a signal is received.
Trap [OPTIONS] [ [arg] signspec..]
Arg is the action to be taken or executed on receiving a signal specified in signspec.
e.g. trap “rm $FILE; exit” // exit (signal) and remove file (action).

Shift Command: Using shift command, command line arguments can be accessed. The command causes the positional parameters shift to the left. Shift [n] where n defaults to 1. It is useful when several parameters need to be tested.

Getopts command: this command is used to parse arguments passed. It examines the next command line argument and determines whether it is a valid option.

Getopts {optstring} {variable1}. Here, optsring contains letters to be recognized if a letter is followed by a colon, an argument should be specified. E.g (whether the argument begins with a minus sign and is followed by any single letter contained inside options ) If not, diagnostic messages are shown. It is usually executed inside a loop.

147.

What Are Pipes?

Answer»

A PIPE is a chain of processes so that OUTPUT of one process (STDOUT) is fed an input (stdin) to another. UNIX shell has a special syntax for creation of pipelines. The commands are written in sequence separated by |. Different filters are used for Pipes like AWK, GREP.
e.g. SORT file | lpr ( sort the file and send it to PRINTER)

A pipe is a chain of processes so that output of one process (stdout) is fed an input (stdin) to another. UNIX shell has a special syntax for creation of pipelines. The commands are written in sequence separated by |. Different filters are used for Pipes like AWK, GREP.
e.g. sort file | lpr ( sort the file and send it to printer)

148.

What Is Kernel? Explain The Task It Performs.

Answer»

Kernel is used in UNIX LIKE systems and is considered to be the heart of the operating system. It is responsible for communication between hardware and SOFTWARE components. It is primarily used for managing the systems resources as well.

Kernel Activities:

The Kernel task MANAGER allows tasks to run CONCURRENTLY.

Managing the computer resources: Kernel allows the other programs to run and use the resources.

Resources include i/o devices, CPU, memory.

Kernel is responsible for Process management. It allows multiple processes to run simultaneously allowing user to multitask.

Kernel has an access to the systems memory and allows the processes to access the memory when required.

Processes may also need to access the devices attached to the system. Kernel ASSISTS the processes in doing so.

For the processes to access and make use of these services, system calls are used.

Kernel is used in UNIX like systems and is considered to be the heart of the operating system. It is responsible for communication between hardware and software components. It is primarily used for managing the systems resources as well.

Kernel Activities:

The Kernel task manager allows tasks to run concurrently.

Managing the computer resources: Kernel allows the other programs to run and use the resources.

Resources include i/o devices, CPU, memory.

Kernel is responsible for Process management. It allows multiple processes to run simultaneously allowing user to multitask.

Kernel has an access to the systems memory and allows the processes to access the memory when required.

Processes may also need to access the devices attached to the system. Kernel assists the processes in doing so.

For the processes to access and make use of these services, system calls are used.

149.

What Is Linux Shell?

Answer»

Linux shell is a user interface USED for executing the commands. Shell is a program the user uses for executing the commands. In UNIX, any program can be the USERS shell. Shell categories in Linux are:
Bourne shell compatible, C shell compatible, nontraditional, and historical.

Linux shell is a user interface used for executing the commands. Shell is a program the user uses for executing the commands. In UNIX, any program can be the users shell. Shell categories in Linux are:
Bourne shell compatible, C shell compatible, nontraditional, and historical.