KPIT Technologies Linux Interview Questions Answers

KPIT Technologies Most Frequently Asked Latest Linux Interview Questions Answers

Why Do We Need Virtual Device Drivers When We Have Physical Device Drivers?

Device drivers are basically a set of modules/routines so as to handle a device for which a direct way of communication is not possible through the user's application program and these can be thought of as an interface thus keeping the system small providing for minimalistic of additions of code, if any.

Physical device drivers can’t perform all the logical operations needed in a system in cases like IPC, Signals and so on...

The main reason for having virtual device drivers is to mimic the behaviour of certain hardware devices without it actually being present and these could be attributed to the high cost of the devices or the unavailability of such devices.

These basically create an illusion for the users as if they are using the actual hardware and enable them to carryout their simulation results.

Examples could be the use of virtual drivers in case of Network simulators,also the support of virtual device drivers in case a user runs an additional OS in a virtual box kind of a software.

What Does Nslookup Do? Explain Its Two Modes.

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]

What Is Bash Shell?

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.

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

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

What Does The Top Command Display?

Top provides an ongoing look at processor activity in real time.It displays a listing of the most CPU-intensive tasks on the system, and can provide an interactive inter¬ face for manipulating processes. (q is to quit)

How To Find Difference In Two Configuration Files On The Same Server?

Use diff command that is compare files line by line
diff -u /usr/home/my_project1/etc/ABC.conf /usr/home/my_project2/etc/ABC.conf
KPIT Technologies Most Frequently Asked Latest Linux Interview Questions Answers
KPIT Technologies Most Frequently Asked Latest Linux Interview Questions Answers

What Is The Best Way To See The End Of A Logfile.log File?

Use tail command - output the last part of files
tail -n file_name ( the last N lines, instead of the last 10 as default)

Please Write A Loop For Removing All Files In The Current Directory That Contains A Word 'log'?

for i in *log*; do rm $i; done

How To Switch To A Previously Used Directory?

cd -

What Are The Process States In Linux?

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.

What Is A Zombie?

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.

Explain Each System Calls Used For Process Management In Linux.

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

How Do You List Files In A Directory?

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

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

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

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

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

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

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

How Do You Kill A Process?

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)

What Would You Use To Edit Contents Of The File?

vi screen editor or jedit, nedit or ex line editor

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

tail -10 file_name ( last 10 rows)

How Do You Log In To A Remote Unix Box?

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

Post a Comment

Previous Post Next Post